From 2ee2b2bfc7008c1242cc516f1193937bfb5b9660 Mon Sep 17 00:00:00 2001 From: juzi <819872918@qq.com> Date: Tue, 6 Feb 2024 14:11:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/base/orderGroup.js | 54 +++ src/api/base/orderManage.js | 9 + .../base/orderGroup/components/bindOrder.vue | 304 ++++++++++++ .../orderGroup/components/orderGroupAdd.vue | 196 ++++++++ src/views/order/base/orderGroup/index.vue | 437 ++++++++++++++++++ .../base/orderGroup/orderGroupDetailData.vue | 376 +++++++++++++++ .../orderManage/components/addWorkOrder.vue | 16 +- .../base/orderManage/components/orderAdd.vue | 137 +----- src/views/order/base/orderManage/index.vue | 147 +++--- .../base/orderManage/orderDetailData.vue | 66 ++- .../orderCompletionMonitoring/index.vue | 189 +++++--- 11 files changed, 1643 insertions(+), 288 deletions(-) create mode 100644 src/api/base/orderGroup.js create mode 100644 src/views/order/base/orderGroup/components/bindOrder.vue create mode 100644 src/views/order/base/orderGroup/components/orderGroupAdd.vue create mode 100644 src/views/order/base/orderGroup/index.vue create mode 100644 src/views/order/base/orderGroup/orderGroupDetailData.vue diff --git a/src/api/base/orderGroup.js b/src/api/base/orderGroup.js new file mode 100644 index 00000000..692fe74b --- /dev/null +++ b/src/api/base/orderGroup.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' +// 获得集团订单分页 +export function getOrderGroupPage(query) { + return request({ + url: '/base/order-group/page', + method: 'get', + params: query + }) +} + +// 获得集团订单 +export function getOrderGroup(query) { + return request({ + url: '/base/order-group/get', + method: 'get', + params: query + }) +} + +// 更新集团订单 +export function updateOrderGroup(data) { + return request({ + url: '/base/order-group/update', + method: 'put', + data: data + }) +} + +// 创建集团订单 +export function createOrderGroup(data) { + return request({ + url: '/base/order-group/create', + method: 'post', + data: data + }) +} + +// 修改集团订单状态,结束-终止-作废用 +export function groupOrderStatusSet(data) { + return request({ + url: '/base/order-group/groupOrderStatusSet', + method: 'put', + data: data + }) +} + +// 获得集团订单详情 +export function orderGroupDetail(query) { + return request({ + url: '/base/order-group/getDetail', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/api/base/orderManage.js b/src/api/base/orderManage.js index 9933c9b7..bd415ce0 100644 --- a/src/api/base/orderManage.js +++ b/src/api/base/orderManage.js @@ -86,6 +86,15 @@ export function orderDelete(query) { }) } +// 修改订单状态,结束-终止-作废用 +export function orderStatusSet(data) { + return request({ + url: '/base/order/orderStatusSet', + method: 'put', + data: data + }) +} + // 下发订单,绑定的穿工单id,新建不传 export function orderIssue(data) { return request({ diff --git a/src/views/order/base/orderGroup/components/bindOrder.vue b/src/views/order/base/orderGroup/components/bindOrder.vue new file mode 100644 index 00000000..612cd94a --- /dev/null +++ b/src/views/order/base/orderGroup/components/bindOrder.vue @@ -0,0 +1,304 @@ + + \ No newline at end of file diff --git a/src/views/order/base/orderGroup/components/orderGroupAdd.vue b/src/views/order/base/orderGroup/components/orderGroupAdd.vue new file mode 100644 index 00000000..1cf82535 --- /dev/null +++ b/src/views/order/base/orderGroup/components/orderGroupAdd.vue @@ -0,0 +1,196 @@ + + \ No newline at end of file diff --git a/src/views/order/base/orderGroup/index.vue b/src/views/order/base/orderGroup/index.vue new file mode 100644 index 00000000..2bbde83b --- /dev/null +++ b/src/views/order/base/orderGroup/index.vue @@ -0,0 +1,437 @@ + + \ No newline at end of file diff --git a/src/views/order/base/orderGroup/orderGroupDetailData.vue b/src/views/order/base/orderGroup/orderGroupDetailData.vue new file mode 100644 index 00000000..6d67d36e --- /dev/null +++ b/src/views/order/base/orderGroup/orderGroupDetailData.vue @@ -0,0 +1,376 @@ + + + \ No newline at end of file diff --git a/src/views/order/base/orderManage/components/addWorkOrder.vue b/src/views/order/base/orderManage/components/addWorkOrder.vue index 45f2a62e..d2a9465e 100644 --- a/src/views/order/base/orderManage/components/addWorkOrder.vue +++ b/src/views/order/base/orderManage/components/addWorkOrder.vue @@ -117,6 +117,20 @@ + + + + + + + + + + @@ -129,8 +143,6 @@ - - diff --git a/src/views/order/base/orderManage/components/orderAdd.vue b/src/views/order/base/orderManage/components/orderAdd.vue index df871a9e..e027839c 100644 --- a/src/views/order/base/orderManage/components/orderAdd.vue +++ b/src/views/order/base/orderManage/components/orderAdd.vue @@ -16,39 +16,6 @@ - - - - - {{ item.name }} - {{ item.specifications }} - - - - - - - - - - - - - - - - - - - @@ -61,43 +28,25 @@ - - - - - - - - - - - - - - - + + + {{ item.name }} + {{ item.specifications }} - - - - - + + @@ -112,8 +61,6 @@ - - - + + + - + \ No newline at end of file diff --git a/src/views/order/base/orderManage/index.vue b/src/views/order/base/orderManage/index.vue index 2031bfeb..4b46ebd9 100644 --- a/src/views/order/base/orderManage/index.vue +++ b/src/views/order/base/orderManage/index.vue @@ -70,17 +70,13 @@ const tableProps = [ { prop: 'name', label: '订单名称', - minWidth: 120, + minWidth: 140, showOverflowtooltip: true }, { prop: 'code', label: '订单编码', - minWidth: 180 - }, - { - prop: 'customerId', - label: '客户', + minWidth: 150, showOverflowtooltip: true }, { @@ -111,6 +107,7 @@ const tableProps = [ { prop: 'productName', label: '产品', + width: 200, showOverflowtooltip: true }, { @@ -187,7 +184,7 @@ export default { }, total: 0, tableProps, - list: [{name: '111111'}], + list: [], tableH: this.tableHeight(260), tableBtn: [ this.$auth.hasPermi('base:order-manage:addWorkOrder') @@ -195,26 +192,16 @@ export default { type: 'add', btnName: '新增', showTip: '新增工单', - // showParam: { - // type: '|', - // data: [ - // { - // type: 'equal', - // name: 'status', - // value: 1 - // }, - // { - // type: 'equal', - // name: 'status', - // value: 2 - // }, - // { - // type: 'equal', - // name: 'status', - // value: 3 - // } - // ] - // } + showParam: { + type: '&', + data: [ + { + type: 'less', + name: 'status', + value: 3 + } + ] + } } : undefined, this.$auth.hasPermi('base:order-manage:bindWorkOrder') @@ -222,41 +209,26 @@ export default { type: 'bind', btnName: '绑定', showTip: '绑定工单', - // showParam: { - // type: '|', - // data: [ - // { - // type: 'equal', - // name: 'status', - // value: 1 - // }, - // { - // type: 'equal', - // name: 'status', - // value: 2 - // }, - // { - // type: 'equal', - // name: 'status', - // value: 3 - // } - // ] - // } + showParam: { + type: '&', + data: [ + { + type: 'less', + name: 'status', + value: 3 + } + ] + } } : undefined, - this.$auth.hasPermi('base:order-manage:bindWorkOrder') + this.$auth.hasPermi('base:order-manage:complete') ? { type: 'complete', btnName: '完成', showTip: '完成订单', showParam: { - type: '|', + type: '&', data: [ - { - type: 'equal', - name: 'status', - value: 2 - }, { type: 'equal', name: 'status', @@ -266,16 +238,43 @@ export default { } } : undefined, - this.$auth.hasPermi('base:order-manage:detail') + this.$auth.hasPermi('base:order-manage:termination') ? { type: 'termination', - btnName: '终止' + btnName: '终止', + showTip: '终止', + showParam: { + type: '|', + data: [ + { + type: 'equal', + name: 'status', + value: 2 + }, + { + type: 'equal', + name: 'status', + value: 3 + } + ] + } } : undefined, - this.$auth.hasPermi('base:order-manage:detail') + this.$auth.hasPermi('base:order-manage:cancel') ? { type: 'cancel', - btnName: '作废' + btnName: '作废', + showTip: '作废', + showParam: { + type: '&', + data: [ + { + type: 'less', + name: 'status', + value: 2 + } + ] + } } : undefined, this.$auth.hasPermi('base:order-manage:detail') @@ -292,14 +291,9 @@ export default { type: '&', data: [ { - type: 'equal', - name: 'triggerOrigin', - value: 1 - }, - { - type: 'equal', + type: 'less', name: 'status', - value: 1 + value: 3 } ] } @@ -319,7 +313,7 @@ export default { window.addEventListener('resize', () => { this.tableH = this.tableHeight(260) }) - // this.getList() + this.getList() }, methods: { getList() { @@ -336,7 +330,7 @@ export default { item.customerId = i.name } } - item.price = item.price.toFixed(2) + item.price = item.price ? item.price.toFixed(2) : '0.00' }) this.list = arr } @@ -407,12 +401,38 @@ export default { }, // 完成,终止,作废 handleEditStatus(val, tip, status) { - this.$modal.confirm('是否确认'+tip+'"' + val.name + '"?').then(function() { - return orderStatusSet({ id: val.id }) + console.log(val) + if (val.workOrderNum > 0) {//有下级工单 + this.$confirm('是否将"'+tip+'"操作同步至下级工单?','确认信息', { + type: 'warning', + distinguishCancelAndClose: true, + confirmButtonText: '同步', + cancelButtonText: '不同步' + }).then(function() { + console.log('同步') + orderStatusSet({ id: val.id, status: status, isSync: true}).then(() => { + this.getList(); + this.$modal.msgSuccess("操作成功"); + }) + }).catch(action => { + if (action === 'cancel') { + console.log('不同步') + orderStatusSet({ id: val.id, status: status, isSync: false}).then(() => { + this.getList(); + this.$modal.msgSuccess("操作成功"); + }) + }else { + return console.log('关闭') + } + }) + }else{// 无下级工单 + this.$modal.confirm('是否确认"'+tip+'"厂务订单名称为"' + val.name + '"的数据项?').then(function() { + return orderStatusSet({ id: val.id, status: status}) }).then(() => { this.getList(); this.$modal.msgSuccess("操作成功"); }).catch(() => {}); + } }, // 新增 handleCancel() { diff --git a/src/views/order/base/orderManage/orderDetailData.vue b/src/views/order/base/orderManage/orderDetailData.vue index 033ca638..93ec49cd 100644 --- a/src/views/order/base/orderManage/orderDetailData.vue +++ b/src/views/order/base/orderManage/orderDetailData.vue @@ -1,11 +1,15 @@