|
|
|
|
@@ -198,6 +198,9 @@
|
|
|
|
|
<el-table-column label="操作">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button size="mini" type="text" icon="el-icon-view" @click="handlePreviewLabel(scope.row)">
|
|
|
|
|
预览
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button size="mini" type="text" icon="el-icon-printer" @click="handlePrintLabel(scope.row)">
|
|
|
|
|
打印
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button v-if="scope.row.actionStatus == 0 || scope.row.actionStatus == 1" size="mini" type="text"
|
|
|
|
|
@@ -249,6 +252,8 @@
|
|
|
|
|
<label-render :content="labelRender.data" :labelType="labelRender.type" v-loading="labelRender.loading" />
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<label-render ref="labelRender" v-show="false" :content="labelRender.data" :labelType="labelRender.type" v-loading="labelRender.loading" />
|
|
|
|
|
|
|
|
|
|
<el-dialog v-loading="editCoil.loading" title="入库钢卷信息编辑" :visible.sync="editCoil.dialogVisible" width="30%">
|
|
|
|
|
<el-form ref="form" :model="editCoil.form" :rules="rules" label-width="100px">
|
|
|
|
|
<el-form-item label="入场钢卷号" prop="enterCoilNo">
|
|
|
|
|
@@ -730,7 +735,29 @@ export default {
|
|
|
|
|
updateTime: row.updateTime?.split(' ')[0] || '',
|
|
|
|
|
};
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
handlePrintLabel({ coilId, currentCoilNo, enterCoilNo, itemType }) {
|
|
|
|
|
listMaterialCoil({ coilId, currentCoilNo, enterCoilNo, itemType }).then(res => {
|
|
|
|
|
if (res.rows.length === 0) {
|
|
|
|
|
this.$modal.msgError("钢卷不存在");
|
|
|
|
|
this.labelRender.visible = false;
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
const row = res.rows[0]
|
|
|
|
|
// this.labelRender.loading = false;
|
|
|
|
|
const item = row.itemType === 'product' ? row.product : row.rawMaterial;
|
|
|
|
|
const itemName = row.itemType === 'product' ? item?.productName || '' : item?.rawMaterialName || '';
|
|
|
|
|
this.labelRender.type = row.itemType === 'product' ? '3' : '2'
|
|
|
|
|
this.labelRender.data = {
|
|
|
|
|
...row,
|
|
|
|
|
itemName: itemName,
|
|
|
|
|
updateTime: row.updateTime?.split(' ')[0] || '',
|
|
|
|
|
};
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.labelRender.printLabel()
|
|
|
|
|
})
|
|
|
|
|
// this.$message.success("打印成功");
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
console.log(row.coilId)
|
|
|
|
|
|