diff --git a/src/api/base/delivery.js b/src/api/base/delivery.js index 4c095c6a..82c371c3 100644 --- a/src/api/base/delivery.js +++ b/src/api/base/delivery.js @@ -71,3 +71,21 @@ export function deliveryLogDetCreate(data) { data: data }) } + +// 获得一条发货详细 +export function deliveryLogDetGet(query) { + return request({ + url: '/extend/delivery-log-det/get', + method: 'get', + params: query + }) +} + +// 编辑发货详情 +export function deliveryLogDetUpdate(data) { + return request({ + url: '/extend/delivery-log-det/update', + method: 'put', + data: data + }) +} diff --git a/src/api/base/orderManage.js b/src/api/base/orderManage.js index 37cace76..38085d6a 100644 --- a/src/api/base/orderManage.js +++ b/src/api/base/orderManage.js @@ -137,4 +137,13 @@ export function bomUseNum(query) { method: 'get', params: query }) +} + +// 完成订单 +export function orderFinish(query) { + return request({ + url: '/base/order/finish', + method: 'post', + params: query + }) } \ No newline at end of file diff --git a/src/views/delivery/deliveryLog/components/deliveryLogDetail.vue b/src/views/delivery/deliveryLog/components/deliveryLogDetail.vue index caa9aef9..9f1b0827 100644 --- a/src/views/delivery/deliveryLog/components/deliveryLogDetail.vue +++ b/src/views/delivery/deliveryLog/components/deliveryLogDetail.vue @@ -1,46 +1,69 @@ \ No newline at end of file diff --git a/src/views/delivery/deliveryLog/index.vue b/src/views/delivery/deliveryLog/index.vue index 844f5030..c1eea8d0 100644 --- a/src/views/delivery/deliveryLog/index.vue +++ b/src/views/delivery/deliveryLog/index.vue @@ -302,7 +302,7 @@ export default { successSubmit2() { this.handleCancel2() this.getList() - }, + } } } \ No newline at end of file diff --git a/src/views/delivery/deliveryLogDet/components/deliveryLogDetDetail.vue b/src/views/delivery/deliveryLogDet/components/deliveryLogDetDetail.vue index f26889a9..9d5ff8c4 100644 --- a/src/views/delivery/deliveryLogDet/components/deliveryLogDetDetail.vue +++ b/src/views/delivery/deliveryLogDet/components/deliveryLogDetDetail.vue @@ -19,11 +19,11 @@
{{orderMsg.num ? orderMsg.num : '-'}}
-
累积占比(%)
+
累计占比(%)
{{orderMsg.rate ? orderMsg.rate : '-'}}
-
累积运输费用
+
累计运输费用
{{orderMsg.cost ? orderMsg.cost : '-'}}
@@ -305,8 +305,11 @@ export default { } }, legend: { - bottom: '5%', - left: 'center', + type: 'scroll', + orient: 'vertical', + right: '10%', + top: 20, + bottom: 20, icon: 'rect', itemHeight: 8, itemWidth: 8 diff --git a/src/views/delivery/deliveryLogDet/index.vue b/src/views/delivery/deliveryLogDet/index.vue index 7a21fa78..dc02ec0c 100644 --- a/src/views/delivery/deliveryLogDet/index.vue +++ b/src/views/delivery/deliveryLogDet/index.vue @@ -61,7 +61,7 @@ const tableProps = [ }, { prop: 'rate', - label: '累积发货比例(%)' + label: '累计发货比例(%)' } ] export default { diff --git a/src/views/order/base/orderManage/components/addWorkOrder.vue b/src/views/order/base/orderManage/components/addWorkOrder.vue index b4d3e899..69d9904c 100644 --- a/src/views/order/base/orderManage/components/addWorkOrder.vue +++ b/src/views/order/base/orderManage/components/addWorkOrder.vue @@ -25,23 +25,18 @@ - + + {{ item.name }} + {{ item.specifications }} - - - - - - - + + - - + + - - - + + + - + 产品基础 工艺扩展 - - @@ -114,6 +109,8 @@ + + @@ -126,8 +123,6 @@ - - @@ -140,6 +135,8 @@ + + @@ -170,7 +167,6 @@ export default { name: '', code: '', planProductId: '', - productSpec: '', planStartTime: '', planFinishTime: '', planAssignQuantity: 0, @@ -205,14 +201,17 @@ export default { } }, methods: { - init(id, param) { - this.form.orderId = id + init(data, param) { + this.form.orderId = data.id this.getList() if (param === 'add') { this.isBind = false getWorkOrderCode().then(res => { this.form.code = res.data || '' }) + this.form.planProductId = data.planProductId + this.form.processFlowId = data.processFlowId + this.form.materialMethod = data.materialMethod }else{//绑定 this.isBind = true } @@ -237,18 +236,6 @@ export default { this.workOrderList = res.data || [] }) }, - // 选产品带出规格 - selectProduct(val) { - if (val) { - this.productList.map(item => { - if (val === item.id) { - this.form.productSpec = item.specifications - } - }) - } else { - this.form.productSpec = '' - } - }, addWorkOrderSubmit() { this.$refs['addWorkOrder'].validate((valid) => { if (valid) { @@ -298,8 +285,6 @@ export default { if (res.code === 0) { this.form.code = res.data.code this.form.planProductId = res.data.planProductId - this.selectProduct(this.form.planProductId) - this.form.productSpec = res.data.productSpec this.planStartTime = res.data.planStartTime ? moment.unix(res.data.planStartTime).format('YYYY-MM-DD HH:mm:ss') : null this.planFinishTime = res.data.planFinishTime ? moment.unix(res.data.planFinishTime).format('YYYY-MM-DD HH:mm:ss') : null this.form.planAssignQuantity = res.data.planAssignQuantity diff --git a/src/views/order/base/orderManage/components/orderAdd.vue b/src/views/order/base/orderManage/components/orderAdd.vue index 4a5317b5..daf4c18b 100644 --- a/src/views/order/base/orderManage/components/orderAdd.vue +++ b/src/views/order/base/orderManage/components/orderAdd.vue @@ -8,7 +8,7 @@ - + @@ -20,12 +20,14 @@ - + + {{ item.name }} + {{ item.specifications }} @@ -37,13 +39,6 @@ - - - - - - - @@ -56,6 +51,8 @@ + + @@ -68,8 +65,6 @@ - - @@ -82,13 +77,13 @@ + + - - @@ -101,6 +96,8 @@ + + @@ -109,35 +106,33 @@ - - - + - - - - - - - + + + + + + + @@ -168,7 +163,6 @@ export default { planQuantity: '', planProductId: '', price: '', - productSpec: '', customerId: '', priority: '', packSpec: '', @@ -180,8 +174,6 @@ export default { planStartTime: '', planFinishTime: '' }, - planStartTime: '', - planFinishTime: '', rules: { name: [{ required: true, message: "订单名称不能为空", trigger: "blur" }], planQuantity: [{ required: true, message: "计划加工数量不能为空", trigger: "blur" }], @@ -205,16 +197,15 @@ export default { this.form.code = res.data.code this.form.planQuantity = res.data.planQuantity this.form.planProductId = res.data.planProductId - this.selectProduct(this.form.planProductId) this.form.price = res.data.price this.form.customerId = res.data.customerId this.form.priority = res.data.priority ? res.data.priority + '' : '' - this.planStartTime = res.data.planStartTime ? moment(res.data.planStartTime).format('YYYY-MM-DD') : null + this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : '' this.form.workers = res.data.workers this.form.processFlowId = res.data.processFlowId this.form.materialMethod = res.data.materialMethod - this.planFinishTime = res.data.planFinishTime ? moment(res.data.planFinishTime).format('YYYY-MM-DD') : null + this.form.planFinishTime = res.data.planFinishTime ? res.data.planFinishTime : null this.form.remark = res.data.remark this.form.description = res.data.description } @@ -242,24 +233,23 @@ export default { this.processFlowList = res.data || [] }) }, - // 选产品带出规格 - selectProduct(val) { - if (val) { - this.productList.map(item => { - if (val === item.id) { - this.form.productSpec = item.specifications - } - }) - } else { - this.form.productSpec = '' + timeChange() { + if (this.form.planStartTime && this.form.planFinishTime) { + if (this.form.planStartTime > this.form.planFinishTime) { + this.$modal.msgError('计划开始时间不能大于结束时间') + } } }, submitForm() { this.$refs['orderAddForm'].validate((valid) => { if (valid) { - this.form.planStartTime = this.planStartTime ? new Date(this.planStartTime).valueOf() : '' - this.form.planFinishTime = this.planFinishTime ? new Date(this.planFinishTime).valueOf() : '' - console.log(this.form) + if (this.form.planStartTime && this.form.planFinishTime) { + if (this.form.planStartTime > this.form.planFinishTime) { + this.$modal.msgError('计划开始时间不能大于结束时间') + return false + } + } + // console.log(this.form) if (this.isEdit) { //编辑 orderUpdate({ ...this.form }).then((res) => { @@ -288,10 +278,6 @@ export default { this.form.materialMethod = 1 this.form.price = 0.00 this.form.planQuantity = 0 - this.planFinishTime = '' - this.planStartTime = '' - this.form.planFinishTime = '' - this.form.planStartTime = '' this.isEdit = false } } diff --git a/src/views/order/base/orderManage/index.vue b/src/views/order/base/orderManage/index.vue index d8181ad5..ec44b927 100644 --- a/src/views/order/base/orderManage/index.vue +++ b/src/views/order/base/orderManage/index.vue @@ -17,7 +17,7 @@