MES:原材料条码完善逻辑
master
xs 5 months ago
parent 24942596ca
commit 87d2aa5cdc

@ -82,6 +82,7 @@
icon="el-icon-printer"
size="mini"
@click="handlePrintBarcodes"
:disabled="batchPrintBtnDisabled"
v-hasPermi="['mes:barcode:print']"
>打印
</el-button>
@ -408,13 +409,13 @@
import {
listBarcode, getBarcode, delBarcode, addBarcode, updateBarcode,
printBarcodes, getMaterialInfoByErpId, selectProductBarcodeInfoByBarcodeInfo,
addInternalBarcode,regenerateBarcode
addInternalBarcode, regenerateBarcode
} from "@/api/mes/barcode";
import addPurchaseOrder from '@//views/mes/purchaseOrder/addPurchaseOrder.vue';
export default {
name: "Barcode",
dicts: ['bind_status', 'active_flag', 'barcode_type','mes_safe_flag','mes_print_flag'],
dicts: ['bind_status', 'active_flag', 'barcode_type', 'mes_safe_flag', 'mes_print_flag'],
components: {
'add-purchaseOrder': addPurchaseOrder
},
@ -552,6 +553,7 @@ export default {
],
},
batchPrintBtnDisabled: false
};
},
created() {
@ -687,9 +689,21 @@ export default {
/** 打印条码按钮操作 */
handlePrintBarcodes(row) {
const barcodeIds = row.barcodeId || this.ids;
if (barcodeIds == null || barcodeIds == '') {
this.$modal.msgWarning("请选择要打印的物料条码");
return;
}
if (row.printFlag) {
row.printFlag = '1';
} else {
this.batchPrintBtnDisabled = true;
}
printBarcodes(barcodeIds).then(response => {
this.$modal.msgSuccess("打印条码成功");
this.getList();
this.batchPrintBtnDisabled = false;
}).catch(() => {
});
@ -701,7 +715,7 @@ export default {
const barcodeInfo = row.barcodeInfo;
this.$modal.confirm('重新生成后之前的条码将会作废,是否确认重新生成条码内容为"' + barcodeInfo + '"的数据项?').then(function () {
return regenerateBarcode({"barcodeId":barcodeId,"barcodeInfo":barcodeInfo});
return regenerateBarcode({"barcodeId": barcodeId, "barcodeInfo": barcodeInfo});
}).then(() => {
this.getList();
this.$modal.msgSuccess("重新生成成功");
@ -812,28 +826,27 @@ export default {
return;
}
this.$set(this.internalForm,"materialId",response.data.materialId);
this.$set(this.internalForm,"materialCode",response.data.materialCode);
this.$set(this.internalForm,"materialName",response.data.materialName);
this.$set(this.internalForm,"productionDate",response.data.productionDate);
this.$set(this.internalForm,"saleOrderId",response.data.saleOrderId);
this.$set(this.internalForm,"saleorderCode",response.data.saleorderCode);
this.$set(this.internalForm, "materialId", response.data.materialId);
this.$set(this.internalForm, "materialCode", response.data.materialCode);
this.$set(this.internalForm, "materialName", response.data.materialName);
this.$set(this.internalForm, "productionDate", response.data.productionDate);
this.$set(this.internalForm, "saleOrderId", response.data.saleOrderId);
this.$set(this.internalForm, "saleorderCode", response.data.saleorderCode);
});
},
/** 提交按钮 */
submitInternalForm() {
this.$refs["internalForm"].validate(valid => {
if (valid) {
addInternalBarcode(this.internalForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.internalOpen = false;
this.getList();
});
addInternalBarcode(this.internalForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.internalOpen = false;
this.getList();
});
}
});

Loading…
Cancel
Save