From 8c2d2d173576338e955a3690315fe2e77c98a53d Mon Sep 17 00:00:00 2001 From: xielue Date: Mon, 24 Jul 2023 21:07:56 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=8F=E8=BD=A6=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mk/components/editors/MkFormInputShow.vue | 5 +- .../Mes/MesProductionOrder/Batch/Detail.vue | 256 ++++++++++++++++++ .../Mes/MesProductionOrder/Batch/List.vue | 14 +- .../Mes/MesProductionOrder/router.map.js | 117 ++++---- 4 files changed, 338 insertions(+), 54 deletions(-) create mode 100644 src/pages/Middle/Mes/MesProductionOrder/Batch/Detail.vue diff --git a/src/application/mk/components/editors/MkFormInputShow.vue b/src/application/mk/components/editors/MkFormInputShow.vue index b7547c7..461416d 100644 --- a/src/application/mk/components/editors/MkFormInputShow.vue +++ b/src/application/mk/components/editors/MkFormInputShow.vue @@ -16,7 +16,7 @@ export default { }, props: { value: { - type: [String,Number] + type: [String,Number,Object] }, params: Object, }, @@ -41,6 +41,9 @@ export default { let v = this.value; this.valueShow = v ? "是" :"否"; } + else if(params && params.dataType == "object"){ + this.valueShow = this.value && this.value[params.textField] ? this.value[params.textField] :""; + } else if(params && params.dataType == "date"){ let v = this.value; if(typeof(v) == "number"){ diff --git a/src/pages/Middle/Mes/MesProductionOrder/Batch/Detail.vue b/src/pages/Middle/Mes/MesProductionOrder/Batch/Detail.vue new file mode 100644 index 0000000..cc10925 --- /dev/null +++ b/src/pages/Middle/Mes/MesProductionOrder/Batch/Detail.vue @@ -0,0 +1,256 @@ + + + + + + diff --git a/src/pages/Middle/Mes/MesProductionOrder/Batch/List.vue b/src/pages/Middle/Mes/MesProductionOrder/Batch/List.vue index 6b28f63..3917449 100644 --- a/src/pages/Middle/Mes/MesProductionOrder/Batch/List.vue +++ b/src/pages/Middle/Mes/MesProductionOrder/Batch/List.vue @@ -4,6 +4,11 @@ + + + @@ -111,7 +116,9 @@ export default { { title: '操作', slots: { default: 'op' }, width: 100 }, { slots: { default: 'column2' }, title: '扫码', width: 130 }, - { field: 'batch_no', sortable: true, title: '批次编号', width: 150 }, + { title: '批次编号', slots: { default: 'column3' }, width: 210 }, + + //{ field: 'batch_no', sortable: true, title: '批次编号', width: 150 }, { field: 'materials_name', title: '料品名称', width: 150 }, { field: 'production_number', title: '布产单编号', width: 150 }, { field: 'start_time', formatter: 'formatDate', title: '开始日期', width: 150 }, @@ -133,6 +140,11 @@ export default { this.pageOptions = pageData; }, + pageDetail(row){ + this.$openPage('/MesProductionOrder/MesProductionOrderBatchDetail/' + row.id); + + } + }, watch: { diff --git a/src/router/Middle/Mes/MesProductionOrder/router.map.js b/src/router/Middle/Mes/MesProductionOrder/router.map.js index f86fcc0..d5cbb55 100644 --- a/src/router/Middle/Mes/MesProductionOrder/router.map.js +++ b/src/router/Middle/Mes/MesProductionOrder/router.map.js @@ -1,7 +1,7 @@ - - -const FunName = 'MesProductionOrder'; + + +const FunName = 'MesProductionOrder'; const FunTitle = '布产单'; const InvisibleRouters = 'Detail,Delete,BatchDelete,BatchUpdate,BatchCreate,ExportExcel,LogDetail,LogList,Settings,SettingsUpdate,ImportExcel'.split(',') const InvisibleRouters2 = ''.split(',') @@ -11,11 +11,11 @@ const view = { blank: () => import('@/layouts/BlankView'), page: () => import('@/layouts/PageView') } - + // 路由组件注册 const routerMap = { }; -routerMap[FunName]= { +routerMap[FunName] = { name: FunTitle, icon: 'idcard', component: view.blank, @@ -23,79 +23,92 @@ routerMap[FunName]= { }, authority: { permission: [], - } + } }; -routerMap[FunName + 'List']= { - name: FunTitle, +routerMap[FunName + 'List'] = { + name: FunTitle, icon: 'idcard', path: `/${FunName}/${FunName}List`, - meta:{ + meta: { invisible: true, - page:{ cacheAble:false} + page: { cacheAble: false } }, component: () => import(`@/pages/Middle/Mes/MesProductionOrder/MesProductionOrder/List`), authority: { - permission: [], + permission: [], + } +}; + +routerMap[FunName + 'Create'] = { + name: '布产单', + icon: 'idcard', + path: `/${FunName}/${FunName}Voucher`, + component: () => import(`@/pages/Middle/Mes/MesProductionOrder/MesProductionOrder/voucher`), + meta: { + }, + authority: { + permission: [], + } +}; +routerMap[FunName + 'Update'] = { + name: FunTitle, + icon: 'idcard', + path: `/${FunName}/${FunName}Update/:id`, + component: () => import(`@/pages/Middle/Mes/MesProductionOrder/MesProductionOrder/Edit`), + meta: { + invisible: true, + }, + authority: { + permission: [], + } +}; + + +routerMap['MesProductionOrderBatch'] = { + name: '随车联', + icon: 'idcard', + path: `/MesProductionOrder/MesProductionOrderBatch`, + component: () => import(`@/pages/Middle/Mes/MesProductionOrder/Batch/List`), + + authority: { + permission: [], + } +}; + +routerMap['MesProductionOrderBatchDetail'] = { + name: '随车联详情', + icon: 'idcard', + meta: { + invisible: true, + }, + path: `/MesProductionOrder/MesProductionOrderBatchDetail/:id`, + component: () => import(`@/pages/Middle/Mes/MesProductionOrder/Batch/Detail`), + + authority: { + permission: [], } -}; - -routerMap[FunName + 'Create']= { - name: '布产单', - icon: 'idcard', - path: `/${FunName}/${FunName}Voucher`, - component: () => import(`@/pages/Middle/Mes/MesProductionOrder/MesProductionOrder/voucher`), - meta: { - }, - authority: { - permission: [], - } -}; -routerMap[FunName + 'Update']= { - name: FunTitle, - icon: 'idcard', - path: `/${FunName}/${FunName}Update/:id`, - component: () => import(`@/pages/Middle/Mes/MesProductionOrder/MesProductionOrder/Edit`), - meta: { - invisible: true, - }, - authority: { - permission: [], - } -}; - - -routerMap['MesProductionOrderBatch']= { - name: '随车连', - icon: 'idcard', - path: `/MesProductionOrder/MesProductionOrderBatch`, - component: () => import(`@/pages/Middle/Mes/MesProductionOrder/Batch/List`), - - authority: { - permission: [], - } }; - InvisibleRouters.forEach(item => { let name = FunName + item; - if (!(name in routerMap)) { + if (!(name in routerMap)) { routerMap[name] = { meta: { invisible: true } } - } + } }) InvisibleRouters2.forEach(item => { let name = item; - if (!(name in routerMap)) { + if (!(name in routerMap)) { routerMap[name] = { meta: { invisible: true } } - } + } }) export default routerMap