|
|
|
@ -95,7 +95,7 @@
|
|
|
|
|
>配对码
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
<!--el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
plain
|
|
|
|
@ -103,7 +103,7 @@
|
|
|
|
|
@click="regenerateBarcode(scope.row)"
|
|
|
|
|
v-if="scope.row.printFlag ==='1' && scope.row.barcodeType !== BARCODE_TYPE.BIND_BARCODE"
|
|
|
|
|
>重新生成
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-button-->
|
|
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
@ -217,24 +217,25 @@
|
|
|
|
|
<el-dialog :title="internalTitle" :visible.sync="internalOpen" width="500px" append-to-body>
|
|
|
|
|
<el-form ref="internalForm" :model="internalForm" :rules="internalRules" label-width="100px">
|
|
|
|
|
<el-form-item label="成品条码" prop="productBarcode">
|
|
|
|
|
<el-input type="textarea" v-model="internalForm.productBarcode" placeholder="请输入或扫描成品条码,多个以,隔开" class="input-with-select">
|
|
|
|
|
<el-input type="textarea" v-model="internalForm.productBarcode" placeholder="请输入或扫描成品条码,多个以,隔开"
|
|
|
|
|
class="input-with-select">
|
|
|
|
|
<el-button slot="append" icon="el-icon-full-screen"></el-button>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<!-- <el-form-item label="物料ID" prop="materialId" v-if="false">-->
|
|
|
|
|
<!-- <el-input v-model="internalForm.materialId" placeholder="请输入物料ID"/>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="物料编码" prop="materialCode">-->
|
|
|
|
|
<!-- <el-input v-model="internalForm.materialCode" disabled/>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="物料名称" prop="materialName">-->
|
|
|
|
|
<!-- <el-input v-model="internalForm.materialName" :disabled="true"/>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="物料ID" prop="materialId" v-if="false">-->
|
|
|
|
|
<!-- <el-input v-model="internalForm.materialId" placeholder="请输入物料ID"/>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="物料编码" prop="materialCode">-->
|
|
|
|
|
<!-- <el-input v-model="internalForm.materialCode" disabled/>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="物料名称" prop="materialName">-->
|
|
|
|
|
<!-- <el-input v-model="internalForm.materialName" :disabled="true"/>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
|
|
<!-- <el-form-item label="物料规格" prop="materialSpec">-->
|
|
|
|
|
<!-- <el-input v-model="internalForm.materialSpec" :disabled="true"/>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="物料规格" prop="materialSpec">-->
|
|
|
|
|
<!-- <el-input v-model="internalForm.materialSpec" :disabled="true"/>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
|
|
|
|
|
<el-form-item label="生产日期" prop="productionDate">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
@ -275,8 +276,10 @@ import {
|
|
|
|
|
printProductBarcodes,
|
|
|
|
|
printBindBarcodes,
|
|
|
|
|
selectProductBarcodeInfoByBarcodeInfo,
|
|
|
|
|
addInternalBarcode, regenerateBarcode
|
|
|
|
|
addInternalBarcode, regenerateBarcode,
|
|
|
|
|
checkSemiOutstock
|
|
|
|
|
} from "@/api/board/barcode";
|
|
|
|
|
import {getMaterialInfoByMaterialId} from "@/api/board";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "Barcode",
|
|
|
|
@ -436,9 +439,9 @@ export default {
|
|
|
|
|
INTERNAL: "2",//对内生成原材料条码
|
|
|
|
|
INTERNAL_PRODUCT: "3",//对内生成成品条码
|
|
|
|
|
},
|
|
|
|
|
SAFE_FLAG:{
|
|
|
|
|
SAFE_FLAG: {
|
|
|
|
|
YES: '1',//
|
|
|
|
|
NO:"0"
|
|
|
|
|
NO: "0"
|
|
|
|
|
},
|
|
|
|
|
printNumber: null,
|
|
|
|
|
};
|
|
|
|
@ -512,6 +515,7 @@ export default {
|
|
|
|
|
planDetailCode: this.defineData.planDetailCode,
|
|
|
|
|
saleOrderId: this.defineData.saleOrderId,
|
|
|
|
|
saleorderCode: this.defineData.saleorderCode,
|
|
|
|
|
materialBomId: this.defineData.materialBomId,
|
|
|
|
|
batchFlag: '0',
|
|
|
|
|
amount: 1,
|
|
|
|
|
}
|
|
|
|
@ -712,20 +716,33 @@ export default {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.submitLoading = true;
|
|
|
|
|
if(this.defineData.barcodeType && this.defineData.barcodeType == this.BARCODE_TYPE_PARAM.SPLIT_BIND_BARCODE){
|
|
|
|
|
this.form.barcodeAmount = 1;
|
|
|
|
|
if (this.defineData.barcodeType && this.defineData.barcodeType === this.BARCODE_TYPE_PARAM.PRODUCT) {
|
|
|
|
|
|
|
|
|
|
checkSemiOutstock({productBatch: this.form.productBarcode}).then(e => {
|
|
|
|
|
this.addProductBarcode();
|
|
|
|
|
}).finally(e => {
|
|
|
|
|
this.submitLoading = false;
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
if (this.defineData.barcodeType && this.defineData.barcodeType === this.BARCODE_TYPE_PARAM.SPLIT_BIND_BARCODE) {
|
|
|
|
|
this.form.barcodeAmount = 1;
|
|
|
|
|
}
|
|
|
|
|
this.addProductBarcode();
|
|
|
|
|
}
|
|
|
|
|
addProductBarcode(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.addProductBarcodeOpen = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
}).finally(e => {
|
|
|
|
|
this.submitLoading = false;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
addProductBarcode() {
|
|
|
|
|
addProductBarcode(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.addProductBarcodeOpen = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
}).finally(e => {
|
|
|
|
|
this.submitLoading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 表单重置
|
|
|
|
|
resetInternal() {
|
|
|
|
|
this.internalForm = {
|
|
|
|
@ -871,8 +888,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|