|
|
@ -44,43 +44,68 @@ |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
|
|
|
<crudOperation :permission="permission" /> |
|
|
|
<crudOperation :permission="permission" > |
|
|
|
<el-button |
|
|
|
slot="right" |
|
|
|
class="filter-item" |
|
|
|
type="success" |
|
|
|
icon="el-icon-printer" |
|
|
|
size="mini" |
|
|
|
@click="print" |
|
|
|
> |
|
|
|
打印 |
|
|
|
</el-button> |
|
|
|
</crudOperation> |
|
|
|
<!--表单组件--> |
|
|
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> |
|
|
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px"> |
|
|
|
<el-form-item label="载具编码"> |
|
|
|
<el-input v-model="form.vehicle_code" style="width: 370px;" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="载具名称"> |
|
|
|
<el-input v-model="form.vehicle_name" style="width: 370px;" /> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-form-item label="载具名称">--> |
|
|
|
<!-- <el-input v-model="form.vehicle_name" style="width: 370px;" />--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<el-form-item label="载具类型"> |
|
|
|
<el-input v-model="form.vehicle_type" style="width: 370px;" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="一维码"> |
|
|
|
<el-input v-model="form.one_code" style="width: 370px;" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="二维码"> |
|
|
|
<el-input v-model="form.two_code" style="width: 370px;" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="RFID编码"> |
|
|
|
<el-input v-model="form.rfid_code" style="width: 370px;" /> |
|
|
|
<!-- <el-input v-model="form.vehicle_type" style="width: 370px;" />--> |
|
|
|
<el-select |
|
|
|
v-model="form.vehicle_type" |
|
|
|
clearable |
|
|
|
size="mini" |
|
|
|
placeholder="载具类型" |
|
|
|
class="filter-item" |
|
|
|
style="width: 370px;" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in dict.vehicle_type" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-form-item label="一维码">--> |
|
|
|
<!-- <el-input v-model="form.one_code" style="width: 370px;" />--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item label="二维码">--> |
|
|
|
<!-- <el-input v-model="form.two_code" style="width: 370px;" />--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item label="RFID编码">--> |
|
|
|
<!-- <el-input v-model="form.rfid_code" style="width: 370px;" />--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<el-form-item label="载具宽度"> |
|
|
|
<el-input v-model="form.vehicle_width" style="width: 370px;" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="载具长度"> |
|
|
|
<el-input v-model="form.vehicle_long" style="width: 370px;" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="载具高度"> |
|
|
|
<el-input v-model="form.vehicle_height" style="width: 370px;" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="载具超仓位类型"> |
|
|
|
<el-input v-model="form.overstruct_type" style="width: 370px;" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="占仓位数"> |
|
|
|
<el-input v-model="form.occupystruct_qty" style="width: 370px;" /> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-form-item label="载具高度">--> |
|
|
|
<!-- <el-input v-model="form.vehicle_height" style="width: 370px;" />--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item label="载具超仓位类型">--> |
|
|
|
<!-- <el-input v-model="form.overstruct_type" style="width: 370px;" />--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item label="占仓位数">--> |
|
|
|
<!-- <el-input v-model="form.occupystruct_qty" style="width: 370px;" />--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="text" @click="crud.cancelCU">取消</el-button> |
|
|
@ -91,16 +116,20 @@ |
|
|
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> |
|
|
|
<el-table-column type="selection" width="55" /> |
|
|
|
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')"/> |
|
|
|
<el-table-column prop="vehicle_name" label="载具名称" :min-width="flexWidth('vehicle_name',crud.data,'载具名称')"/> |
|
|
|
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型')"/> |
|
|
|
<el-table-column prop="one_code" label="一维码" :min-width="flexWidth('one_code',crud.data,'一维码')"/> |
|
|
|
<el-table-column prop="two_code" label="二维码" :min-width="flexWidth('two_code',crud.data,'二维码')"/> |
|
|
|
<el-table-column prop="rfid_code" label="RFID编码" :min-width="flexWidth('rfid_code',crud.data,'RFID编码')"/> |
|
|
|
<!-- <el-table-column prop="vehicle_name" label="载具名称" :min-width="flexWidth('vehicle_name',crud.data,'载具名称')"/>--> |
|
|
|
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型')"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ dict.label.vehicle_type[scope.row.vehicle_type] }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column prop="one_code" label="一维码" :min-width="flexWidth('one_code',crud.data,'一维码')"/>--> |
|
|
|
<!-- <el-table-column prop="two_code" label="二维码" :min-width="flexWidth('two_code',crud.data,'二维码')"/>--> |
|
|
|
<!-- <el-table-column prop="rfid_code" label="RFID编码" :min-width="flexWidth('rfid_code',crud.data,'RFID编码')"/>--> |
|
|
|
<el-table-column prop="vehicle_width" label="载具宽度" :min-width="flexWidth('vehicle_width',crud.data,'载具宽度')"/> |
|
|
|
<el-table-column prop="vehicle_long" label="载具长度" :min-width="flexWidth('vehicle_long',crud.data,'载具长度')"/> |
|
|
|
<el-table-column prop="vehicle_height" label="载具高度" :min-width="flexWidth('vehicle_height',crud.data,'载具高度')"/> |
|
|
|
<el-table-column prop="overstruct_type" label="载具超仓位类型" :min-width="flexWidth('overstruct_type',crud.data,'载具超仓位类型')"/> |
|
|
|
<el-table-column prop="occupystruct_qty" label="占仓位数" :min-width="flexWidth('occupystruct_qty',crud.data,'占仓位数')"/> |
|
|
|
<!-- <el-table-column prop="vehicle_height" label="载具高度" :min-width="flexWidth('vehicle_height',crud.data,'载具高度')"/>--> |
|
|
|
<!-- <el-table-column prop="overstruct_type" label="载具超仓位类型" :min-width="flexWidth('overstruct_type',crud.data,'载具超仓位类型')"/>--> |
|
|
|
<!-- <el-table-column prop="occupystruct_qty" label="占仓位数" :min-width="flexWidth('occupystruct_qty',crud.data,'占仓位数')"/>--> |
|
|
|
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')"/> |
|
|
|
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')"/> |
|
|
|
<el-table-column prop="update_name" label="修改人" :min-width="flexWidth('update_name',crud.data,'修改人')"/> |
|
|
@ -174,6 +203,24 @@ export default { |
|
|
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
|
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
|
return true |
|
|
|
}, |
|
|
|
print() { |
|
|
|
const _selectData = this.$refs.table.selection |
|
|
|
if (!_selectData || _selectData.length < 1) { |
|
|
|
this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO) |
|
|
|
return |
|
|
|
} |
|
|
|
for (let i = 0; i < _selectData.length; i++) { |
|
|
|
const code = _selectData[i].vehicle_code |
|
|
|
const LODOP = getLodop() |
|
|
|
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮 |
|
|
|
// 打印纸张大小设置https://www.it610.com/article/2094844.html |
|
|
|
LODOP.SET_PRINT_PAGESIZE(1, '50mm', '30mm', '') |
|
|
|
LODOP.ADD_PRINT_BARCODE('4.3mm', '8.2mm', '40mm', '20mm', '128Auto', code) |
|
|
|
LODOP.PRINT()// 打印 |
|
|
|
this.crud.notify('打印成功', CRUD.NOTIFICATION_TYPE.SUCCESS) |
|
|
|
this.crud.toQuery() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|