diff --git a/.env.dev b/.env.dev index 26325c81..f97a7e9b 100644 --- a/.env.dev +++ b/.env.dev @@ -14,15 +14,13 @@ VUE_APP_TITLE = MES系统 # 芋道管理系统/开发环境 # VUE_APP_BASE_API = 'http://100.64.0.26:48082' # VUE_APP_BASE_API = 'http://10.70.2.2:8080' -VUE_APP_BASE_API = 'http://192.168.0.33:48082' -# VUE_APP_BASE_API = 'http://192.168.1.20:48080' # VUE_APP_BASE_API = 'http://192.168.1.20:48080' # VUE_APP_BASE_API = 'http://192.168.2.173:48080' # VUE_APP_BASE_API = 'http://192.168.1.49:48082' # VUE_APP_BASE_API = 'http://192.168.1.8:48082' # VUE_APP_BASE_API = 'http://192.168.4.159:48080' # VUE_APP_BASE_API = 'http://192.168.1.104:48082' -# VUE_APP_BASE_API = 'http://192.168.0.33:48082' +VUE_APP_BASE_API = 'http://192.168.0.33:48082' # VUE_APP_BASE_API = 'http://192.168.1.62:48082' # VUE_APP_BASE_API = 'http://192.168.1.78:48082' diff --git a/src/api/base/orderGroup.js b/src/api/base/orderGroup.js index 692fe74b..5751107f 100644 --- a/src/api/base/orderGroup.js +++ b/src/api/base/orderGroup.js @@ -51,4 +51,22 @@ export function orderGroupDetail(query) { method: 'get', params: query }) -} \ No newline at end of file +} + +// 创建集团订单与厂务订单表关联表 一对多 +export function orderConGroupOrder(data) { + return request({ + url: '/base/order-con-group-order/create', + method: 'post', + data: data + }) +} + +// 订单监控 +export function orderGroupMonitor(query) { + return request({ + url: '/base/order-group/orderGroupMonitor', + method: 'get', + params: query + }) +} diff --git a/src/api/base/orderManage.js b/src/api/base/orderManage.js index bd415ce0..732e13c7 100644 --- a/src/api/base/orderManage.js +++ b/src/api/base/orderManage.js @@ -8,6 +8,23 @@ export function orderList(query) { }) } +// 获得订单列表 +export function getOrderList(query) { + return request({ + url: '/base/order/list', + method: 'get', + params: query + }) +} + +// 获得订单列表 +export function getFreeOrderList() { + return request({ + url: '/base/order/getFreeOrderList', + method: 'get' + }) +} + // 条件获得工单列表 export function workOrderList(query) { return request({ @@ -113,24 +130,6 @@ export function getWorkOrderById(query) { }) } -// 订单监控 -export function orderMonitor(query) { - return request({ - url: '/base/order/orderMonitor', - method: 'get', - params: query - }) -} - -// 获取订单绑定的工单和数量信息,可传订单id列表,map索引为订单id -export function orderAssignmentList(query) { - return request({ - url: '/base/order/orderAssignmentList', - method: 'get', - params: query - }) -} - // 获得所有客户列表 export function customerList() { return request({ diff --git a/src/views/order/base/orderGroup/components/bindOrder.vue b/src/views/order/base/orderGroup/components/bindOrder.vue index 612cd94a..1d0eebd3 100644 --- a/src/views/order/base/orderGroup/components/bindOrder.vue +++ b/src/views/order/base/orderGroup/components/bindOrder.vue @@ -1,14 +1,11 @@ + \ 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 @@