diff --git a/src/pages/Middle/Mes/MesProductionOrder/Batch/Detail.vue b/src/pages/Middle/Mes/MesProductionOrder/Batch/Detail.vue index cc10925..9566093 100644 --- a/src/pages/Middle/Mes/MesProductionOrder/Batch/Detail.vue +++ b/src/pages/Middle/Mes/MesProductionOrder/Batch/Detail.vue @@ -15,7 +15,7 @@
- 新增报工 + 新增报工
@@ -204,6 +204,13 @@ export default { return this.$mk.toBigInt(dataId); }, + addReport(){ + let dataId = this.getDataId(); + + this.$openPage('/MesProductionOrder/Report/' + dataId); + + } + }, // 监听属性 diff --git a/src/pages/Middle/Mes/MesProductionOrder/Reporting/index.vue b/src/pages/Middle/Mes/MesProductionOrder/Reporting/index.vue new file mode 100644 index 0000000..b31c7c8 --- /dev/null +++ b/src/pages/Middle/Mes/MesProductionOrder/Reporting/index.vue @@ -0,0 +1,872 @@ + + + + + + diff --git a/src/pages/Middle/Mes/MesReporting/MesReporting/index.vue b/src/pages/Middle/Mes/MesReporting/MesReporting/index.vue index d4ec26c..bc8065a 100644 --- a/src/pages/Middle/Mes/MesReporting/MesReporting/index.vue +++ b/src/pages/Middle/Mes/MesReporting/MesReporting/index.vue @@ -147,7 +147,7 @@ export default { children: [ { field: '布产单信息', title: '布产单信息', span: 24, titleColon: false, className: 'formtitle' }, { field: 'production_number', title: '布产单号', span: 24, itemRender: { name: 'MkFormInputShow' } }, - { field: '布产部门', title: '布产部门', span: 24, itemRender: { name: 'MkFormInputShow' } }, + { field: 'production_department_name', title: '布产部门', span: 24, itemRender: { name: 'MkFormInputShow' } }, { field: '布产类型', title: '布产类型', span: 24, itemRender: { name: 'MkFormInputShow' } }, { field: '是否补单', title: '是否补单', span: 24, itemRender: { name: 'MkFormInputShow' } }, { field: '补单原因', title: '补单原因', span: 24, itemRender: { name: 'MkFormInputShow' } }, @@ -474,11 +474,47 @@ export default { keydownEvent(e) { let event = e.$event; const input = event.target; - const inputValue = input.value; + let inputValue = input.value; this.scanEntry = input.value; const now = Date.now(); if (event.key === 'Enter') { + + + if (inputValue && inputValue.indexOf('{') == 0) { + inputValue = inputValue.replace(/:/g, ":"); + inputValue = inputValue.replace(/,/g, ","); + inputValue = inputValue.replace(/”/g, "\""); + console.log(inputValue) + let v = JSONbig.parse(inputValue); + console.log(v) + this.lastScanTime = now; + if (v.types == 'staff') { + this.loadStaff({ id: v.id }); + } + + if (v.types == "processes") { + this.loadProcesses({ id: v.id }); + } + + if (v.types == "reporting") { + this.loadReporting({ id: v.id }); + } + + + setTimeout(() => { + const $pulldown = this.$refs.pulldownRef + if ($pulldown) { + $pulldown.hidePanel() + } + }, 20); + + + input.value = ''; + this.scanEntry = ''; + return; + } + setTimeout(() => { input.value = ''; @@ -487,15 +523,6 @@ export default { }, 10); - if (inputValue && inputValue.indexOf('{') == 0) { - let v = JSONbig.parse(inputValue); - this.lastScanTime = now; - if (v.types == 'staff') { - this.loadStaff({ id: v.id }); - } - - } - return; } @@ -527,6 +554,26 @@ export default { this.selectStaff({ data: a.data.mes_staff }) }); }, + loadProcesses({ id }) { + this.loading = true + this.$mk.get({ + url: `${BASE_URL.BASE_URL}/MesReporting/Get/TouchScreen/v1/mes/reporting/touchScreen/getProcess/${process.env.VUE_APP_BEID}/${process.env.VUE_APP_PTYID}/${process.env.VUE_APP_COMPANY_ID}/0/${process.env.VUE_APP_APPTOKEN}/${process.env.VUE_APP_COMPANYTOKEN}/${id}`, + + useBigInt: true, + }).then(a => { + this.formOptions3.data = a.data.mes_processes + }); + }, + loadReporting({ id }) { + this.loading = true + this.$mk.get({ + url: `${BASE_URL.BASE_URL}/MesReporting/Get/TouchScreen/v1/mes/reporting/touchScreen/getVehicle/${process.env.VUE_APP_BEID}/${process.env.VUE_APP_PTYID}/${process.env.VUE_APP_COMPANY_ID}/0/${process.env.VUE_APP_APPTOKEN}/${process.env.VUE_APP_COMPANYTOKEN}/${id}`, + + useBigInt: true, + }).then(a => { + this.formOptions4.data = a.data.production_order_array + }); + }, selectStaff({ data }) { let data2 = Object.assign({}, data); diff --git a/src/router/Middle/Mes/MesProductionOrder/router.map.js b/src/router/Middle/Mes/MesProductionOrder/router.map.js index d5cbb55..b2f834c 100644 --- a/src/router/Middle/Mes/MesProductionOrder/router.map.js +++ b/src/router/Middle/Mes/MesProductionOrder/router.map.js @@ -89,7 +89,19 @@ routerMap['MesProductionOrderBatchDetail'] = { permission: [], } }; +routerMap['MesProductionOrderReport'] = { + name: '报工', + icon: 'idcard', + meta: { + invisible: true, + }, + path: `/MesProductionOrder/Report/:id`, + component: () => import(`@/pages/Middle/Mes/MesProductionOrder/Reporting/index`), + authority: { + permission: [], + } +}; InvisibleRouters.forEach(item => { let name = FunName + item; if (!(name in routerMap)) {