|
|
@ -18,6 +18,20 @@
|
|
|
|
</el-form-->
|
|
|
|
</el-form-->
|
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
v-hasPermi="['mes:barcode:add']"
|
|
|
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
|
|
|
plain
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
@click="handleAddProductBarcode"
|
|
|
|
|
|
|
|
v-if="addProductBarcodeBtnVisible"
|
|
|
|
|
|
|
|
>新增
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
v-hasPermi="['mes:barcode:add']"
|
|
|
|
v-hasPermi="['mes:barcode:add']"
|
|
|
@ -182,7 +196,8 @@
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="绑定柜体码" prop="bindBarcode">
|
|
|
|
<el-form-item label="绑定柜体码" prop="bindBarcode">
|
|
|
|
<el-input v-model="form.bindBarcode" :disabled="true" v-if="this.form.barcodeType === this.BARCODE_TYPE.BACK_PLANE || this.form.barcodeType === this.BARCODE_TYPE.DOOR">
|
|
|
|
<el-input v-model="form.bindBarcode" :disabled="true"
|
|
|
|
|
|
|
|
v-if="this.form.barcodeType === this.BARCODE_TYPE.BACK_PLANE || this.form.barcodeType === this.BARCODE_TYPE.DOOR">
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
@ -240,6 +255,48 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改条码信息对话框 -->
|
|
|
|
|
|
|
|
<el-dialog :title="addProductBarcodeTitle" :visible.sync="addProductBarcodeOpen" append-to-body width="500px">
|
|
|
|
|
|
|
|
<el-form ref="addProductBarcodeForm" :model="addProductBarcodeForm" :rules="addProductBarcodeRules"
|
|
|
|
|
|
|
|
label-width="120px">
|
|
|
|
|
|
|
|
<el-form-item label="原材料条码" prop="productBarcode">
|
|
|
|
|
|
|
|
<el-input v-model="addProductBarcodeForm.productBarcode" placeholder="请扫描或输入原材料条码" suffix-icon="el-icon-full-screen">
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="数量" prop="amount">
|
|
|
|
|
|
|
|
<el-input-number v-model="addProductBarcodeForm.amount" :min="0" placeholder="请输入数量" :disabled="true"/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="生产日期" prop="productionDate">
|
|
|
|
|
|
|
|
<el-date-picker v-model="addProductBarcodeForm.productionDate"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
placeholder="请选择生产日期"
|
|
|
|
|
|
|
|
type="date"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd">
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="最晚出库日期" prop="lastOutstockDate">
|
|
|
|
|
|
|
|
<el-date-picker v-model="addProductBarcodeForm.lastOutstockDate"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
placeholder="请选择最晚出库日期"
|
|
|
|
|
|
|
|
type="date"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd">
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
|
|
|
|
<el-input v-model="addProductBarcodeForm.remark" placeholder="请输入内容" type="textarea"/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="submitProductBarcodeForm">确 定</el-button>
|
|
|
|
|
|
|
|
<el-button @click="cancelProductBarcode">取 消</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加生产计划编号对话框 -->
|
|
|
|
<!-- 添加生产计划编号对话框 -->
|
|
|
|
<el-dialog :visible.sync="productPlanOpen" append-to-body title="选择生产计划编号">
|
|
|
|
<el-dialog :visible.sync="productPlanOpen" append-to-body title="选择生产计划编号">
|
|
|
|
<add-ProductPlan ref="productPlanRef" :defineData="defineData" @selection="handleSelection"></add-ProductPlan>
|
|
|
|
<add-ProductPlan ref="productPlanRef" :defineData="defineData" @selection="handleSelection"></add-ProductPlan>
|
|
|
@ -292,6 +349,15 @@ export default {
|
|
|
|
// 是否显示弹出层
|
|
|
|
// 是否显示弹出层
|
|
|
|
open: false,
|
|
|
|
open: false,
|
|
|
|
addBtnTitle: '新增条码',
|
|
|
|
addBtnTitle: '新增条码',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addProductBarcodeTitle: '新增成品条码',
|
|
|
|
|
|
|
|
addProductBarcodeForm: {},
|
|
|
|
|
|
|
|
addProductBarcodeRules: {
|
|
|
|
|
|
|
|
productBarcode: [
|
|
|
|
|
|
|
|
{required: true, message: "原材料条码不能为空", trigger: "blur"}
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
addProductBarcodeOpen: false,
|
|
|
|
// 查询参数
|
|
|
|
// 查询参数
|
|
|
|
queryParams: {
|
|
|
|
queryParams: {
|
|
|
|
pageNum: 1,
|
|
|
|
pageNum: 1,
|
|
|
@ -322,7 +388,8 @@ export default {
|
|
|
|
bindBy: null,
|
|
|
|
bindBy: null,
|
|
|
|
bindTime: null,
|
|
|
|
bindTime: null,
|
|
|
|
updateBy: null,
|
|
|
|
updateBy: null,
|
|
|
|
updateTime: null
|
|
|
|
updateTime: null,
|
|
|
|
|
|
|
|
singleFlag: null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 表单参数
|
|
|
|
// 表单参数
|
|
|
|
form: {},
|
|
|
|
form: {},
|
|
|
@ -379,14 +446,17 @@ export default {
|
|
|
|
addBarcodeBtnVisible: false,
|
|
|
|
addBarcodeBtnVisible: false,
|
|
|
|
addDoorBarcodeBtnVisible: false,
|
|
|
|
addDoorBarcodeBtnVisible: false,
|
|
|
|
batchPrintBtnDisabled: false,
|
|
|
|
batchPrintBtnDisabled: false,
|
|
|
|
|
|
|
|
addProductBarcodeBtnVisible: false,
|
|
|
|
|
|
|
|
|
|
|
|
BARCODE_TYPE: {
|
|
|
|
BARCODE_TYPE: {
|
|
|
|
PRODUCT: '3',//成品
|
|
|
|
PRODUCT: '3',//成品
|
|
|
|
BACK_PLANE: '4',//背板
|
|
|
|
BACK_PLANE: '4',//背板
|
|
|
|
DOOR: '5'//门板
|
|
|
|
DOOR: '5'//门板
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
SINGLE_FLAG: {
|
|
|
|
|
|
|
|
YES: '1',//是
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
@ -413,6 +483,7 @@ export default {
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
getData() {
|
|
|
|
getData() {
|
|
|
|
|
|
|
|
if (this.defineData.barcodeType) {
|
|
|
|
let barcodeType = this.defineData.barcodeType ? this.defineData.barcodeType : this.BARCODE_TYPE.PRODUCT;
|
|
|
|
let barcodeType = this.defineData.barcodeType ? this.defineData.barcodeType : this.BARCODE_TYPE.PRODUCT;
|
|
|
|
let bindBarcode = this.defineData.bindBarcode ? this.defineData.bindBarcode : '';
|
|
|
|
let bindBarcode = this.defineData.bindBarcode ? this.defineData.bindBarcode : '';
|
|
|
|
if (barcodeType === this.BARCODE_TYPE.BACK_PLANE) {
|
|
|
|
if (barcodeType === this.BARCODE_TYPE.BACK_PLANE) {
|
|
|
@ -432,6 +503,11 @@ export default {
|
|
|
|
this.queryParams.barcodeType = null;
|
|
|
|
this.queryParams.barcodeType = null;
|
|
|
|
this.queryParams.barcodeTypeStr = this.BARCODE_TYPE.DOOR + "," + this.BARCODE_TYPE.BACK_PLANE;
|
|
|
|
this.queryParams.barcodeTypeStr = this.BARCODE_TYPE.DOOR + "," + this.BARCODE_TYPE.BACK_PLANE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.queryParams.barcodeType = this.BARCODE_TYPE.PRODUCT;
|
|
|
|
|
|
|
|
this.queryParams.singleFlag = this.SINGLE_FLAG.YES;
|
|
|
|
|
|
|
|
this.addProductBarcodeBtnVisible = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -441,6 +517,9 @@ export default {
|
|
|
|
listProductBarcode(this.queryParams).then(response => {
|
|
|
|
listProductBarcode(this.queryParams).then(response => {
|
|
|
|
this.barcodeList = response.rows;
|
|
|
|
this.barcodeList = response.rows;
|
|
|
|
this.total = response.total;
|
|
|
|
this.total = response.total;
|
|
|
|
|
|
|
|
if (this.queryParams.singleFlag && this.queryParams.singleFlag === this.SINGLE_FLAG.YES) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
if (this.total && this.total > 0) {
|
|
|
|
if (this.total && this.total > 0) {
|
|
|
|
if (this.queryParams.barcodeTypeStr) {
|
|
|
|
if (this.queryParams.barcodeTypeStr) {
|
|
|
|
this.addBarcodeBtnVisible = true;
|
|
|
|
this.addBarcodeBtnVisible = true;
|
|
|
@ -460,6 +539,8 @@ export default {
|
|
|
|
this.addDoorBarcodeBtnVisible = true;
|
|
|
|
this.addDoorBarcodeBtnVisible = true;
|
|
|
|
this.handleAdd();
|
|
|
|
this.handleAdd();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -558,6 +639,56 @@ export default {
|
|
|
|
this.title = "添加条码信息";
|
|
|
|
this.title = "添加条码信息";
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 表单重置
|
|
|
|
|
|
|
|
resetProductBarcode() {
|
|
|
|
|
|
|
|
this.addProductBarcodeForm = {
|
|
|
|
|
|
|
|
barcodeId: null,
|
|
|
|
|
|
|
|
productBarcode: null,
|
|
|
|
|
|
|
|
printTime: null,
|
|
|
|
|
|
|
|
printPerson: null,
|
|
|
|
|
|
|
|
batchFlag: '0',
|
|
|
|
|
|
|
|
barcodeType: '3',
|
|
|
|
|
|
|
|
barcodeInfo: null,
|
|
|
|
|
|
|
|
batchCode: null,
|
|
|
|
|
|
|
|
palletInfoCode: null,
|
|
|
|
|
|
|
|
materialId: null,
|
|
|
|
|
|
|
|
manufacturerId: null,
|
|
|
|
|
|
|
|
amount: 1,
|
|
|
|
|
|
|
|
machineName: null,
|
|
|
|
|
|
|
|
printNumber: null,
|
|
|
|
|
|
|
|
poNo: null,
|
|
|
|
|
|
|
|
productionDate: null,
|
|
|
|
|
|
|
|
acceptedDate: null,
|
|
|
|
|
|
|
|
lastOutstockDate: null,
|
|
|
|
|
|
|
|
planCode: null,
|
|
|
|
|
|
|
|
planDetailCode: null,
|
|
|
|
|
|
|
|
saleOrderId: null,
|
|
|
|
|
|
|
|
saleorderCode: null,
|
|
|
|
|
|
|
|
projectNo: null,
|
|
|
|
|
|
|
|
serialNumber: null,
|
|
|
|
|
|
|
|
remark: null,
|
|
|
|
|
|
|
|
bindStatus: null,
|
|
|
|
|
|
|
|
bindBy: null,
|
|
|
|
|
|
|
|
bindTime: null,
|
|
|
|
|
|
|
|
updateBy: null,
|
|
|
|
|
|
|
|
updateTime: null
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
this.resetForm("addProductBarcodeForm");
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleAddProductBarcode() {
|
|
|
|
|
|
|
|
this.resetProductBarcode();
|
|
|
|
|
|
|
|
this.addProductBarcodeOpen = true;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 取消按钮
|
|
|
|
|
|
|
|
cancelProductBarcode() {
|
|
|
|
|
|
|
|
this.addProductBarcodeOpen = false;
|
|
|
|
|
|
|
|
this.resetProductBarcode();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/** 打印条码按钮操作 */
|
|
|
|
/** 打印条码按钮操作 */
|
|
|
|
handlePrintBarcodes(row) {
|
|
|
|
handlePrintBarcodes(row) {
|
|
|
|
const barcodeIds = row.barcodeId || this.ids;
|
|
|
|
const barcodeIds = row.barcodeId || this.ids;
|
|
|
@ -645,6 +776,21 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
|
|
|
submitProductBarcodeForm() {
|
|
|
|
|
|
|
|
this.$refs["addProductBarcodeForm"].validate(valid => {
|
|
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
this.addProductBarcodeForm.singleFlag = this.SINGLE_FLAG.YES;
|
|
|
|
|
|
|
|
addProductBarcode(this.addProductBarcodeForm).then(response => {
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
|
|
|
this.addProductBarcodeOpen = false;
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|