diff --git a/src/api/kanban/Packagingline.js b/src/api/kanban/Packagingline.js index cff605f..e0d0eed 100644 --- a/src/api/kanban/Packagingline.js +++ b/src/api/kanban/Packagingline.js @@ -47,3 +47,11 @@ export function getProductionNumberPLC(data){ data: data }); } + +export function getProductionLineData(data){ + return request({ + url: '/mes/mesborad/getProductionLineData', + method: 'get', + data: data + }); +} diff --git a/src/api/kanban/quality.js b/src/api/kanban/quality.js index 31f1038..af251f0 100644 --- a/src/api/kanban/quality.js +++ b/src/api/kanban/quality.js @@ -111,3 +111,12 @@ export function getKBTest() { method: 'post' }); } + +// 白坯每月不合格数量 +export function getBpMonthNoOk(data) { + return request({ + url: '/quality/qcInterface/getBpMonthNoOk', + method: 'get', + data: data + }); +} diff --git a/src/api/wms/product.js b/src/api/wms/product.js index fb3c99b..94d6582 100644 --- a/src/api/wms/product.js +++ b/src/api/wms/product.js @@ -73,3 +73,11 @@ export function addProductAttached(data) { data: data }); } +// 手动同步物料 +export function syncProduct(data) { + return request({ + url: '/wms/product/sync', + method: 'post', + data: data + }); +} diff --git a/src/router/index.js b/src/router/index.js index b6d75de..6888b1c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -156,6 +156,11 @@ export const constantRoutes = [ component: () => import("@/views/kanban/Dryingprocess/index"), hidden: true, }, + { + path: "/kanban/productLine", + component: () => import("@/views/kanban/productLine/index"), + hidden: true, + }, // { // path: "/report/board/LeadershipViewCheart", // component: () => import("@/views/energy/LeadershipView/LeadershipViewChearts"), diff --git a/src/views/device/sparePartsLedger/index.vue b/src/views/device/sparePartsLedger/index.vue index 154da55..d8f97eb 100644 --- a/src/views/device/sparePartsLedger/index.vue +++ b/src/views/device/sparePartsLedger/index.vue @@ -207,6 +207,12 @@ prop="materialDesc" width="120" /> + + + + + + + - - + @@ -524,6 +448,39 @@ /> + + + + + + + + + + + + + + + + + + + { + this.initCategoryList(); + }); + }, methods: { + dict, + validateWlCodeBlur(rule, value, callback){ + if (typeof value !== 'string') { + callback(new Error('请输入正确的库位编码')); + }else { + const reg = /^[a-zA-Z0-9]+$/; + if (reg.test(value)){ + callback(); + }else { + callback(new Error('请输入正确的库位编码')); + } + } + }, // 生成表头序号 indexMethod(index) { return index + 1; @@ -1172,6 +1159,45 @@ export default { `sparePartsLedger_template_${new Date().getTime()}.xlsx` ); }, + initCategoryList(){ + // 同时监听两个字典,任意一个变化都会触发回调 + this.$watch( + () => [ + this.dict.type.power_transmission_parts, + this.dict.type.hydraulic_components, + this.dict.type.pneumatic_components, + this.dict.type.electric_control, + this.dict.type.process_consumables, + this.dict.type.general_pipeline_parts, + this.dict.type.fastening_sealing_parts, + this.dict.type.spare_part_type_other + ], + ([val1, val2, val3, val4, val5, val6, val7, val8]) => { + // 确保两个字典都已加载完成(非undefined) + if (val1 && val2 && val3 && val4 && val5 && val6 && val7 && val8) { + this.categoryList = [ + ...val1, + ...val2, + ...val3, + ...val4, + ...val5, + ...val6, + ...val7, + ...val8 + ] + } + }, + { immediate: true, deep: true } + ); + }, + changeType(res){ + if (!res){ + this.initCategoryList() + this.form.spareCategory = '' + }else { + this.categoryList = this.dict.type[res] + } + }, }, }; diff --git a/src/views/kanban/productLine/index.vue b/src/views/kanban/productLine/index.vue new file mode 100644 index 0000000..0b81a26 --- /dev/null +++ b/src/views/kanban/productLine/index.vue @@ -0,0 +1,420 @@ + + + + + diff --git a/src/views/kanban/quality/kanban1.vue b/src/views/kanban/quality/kanban1.vue index 31150d8..be3828b 100644 --- a/src/views/kanban/quality/kanban1.vue +++ b/src/views/kanban/quality/kanban1.vue @@ -211,7 +211,7 @@
-
本年各月产品不合格数量对比
+
本年各月白坯不合格数量对比
{ diff --git a/src/views/quality/sampleCheck/index.vue b/src/views/quality/sampleCheck/index.vue index 1464a73..37472f4 100644 --- a/src/views/quality/sampleCheck/index.vue +++ b/src/views/quality/sampleCheck/index.vue @@ -2,6 +2,13 @@
+ + + 同步物料工艺 + + 同步单个物料信息 + + + + 同步所有物料信息 + + { + let inputValue = result.value; + if (inputValue.length < 18){ + inputValue = "0000000"+inputValue + } + syncProduct({ + matnr:inputValue, + werks:localStorage.getItem('USER_POOL_NAME_CURRENT').replace("ds_","") + }).then(res=>{ + if (res.code === 200){ + this.$message.success(`操作成功!`); + }else { + this.$message.error(`操作失败!`+res.msg); + } + }) + + }).catch(() => { + + }); + }, + handleSyncMultipleProduct(){ + this.$modal + .confirm( + '是否同步所有物料?' + ) + .then((res) => { + console.log(res) + if (res === "confirm"){ + syncProduct({ + werks:localStorage.getItem('USER_POOL_NAME_CURRENT').replace("ds_","") + }).then(()=>{ + this.$message.success(`操作成功!`); + }) + } + }) + .catch(() => {}); + } }, };