From 437b55a78ec92e4fa57f3ad01a224d9dd8873125 Mon Sep 17 00:00:00 2001 From: wangxy Date: Wed, 27 Oct 2021 17:01:13 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=EF=BC=8C=E5=AD=97=E6=AE=B5=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/quality/shipment.js | 2 +- .../basic/component/artComponent.vue | 19 +++++++ src/views/productexe/basic/dispatchOrder.vue | 56 +++++++++++++++++-- src/views/quality/component/shipmentCode.vue | 23 -------- src/views/quality/component/shipmentList.vue | 1 - .../quality/component/shipmentSearch.vue | 13 ++++- src/views/quality/shipment.vue | 1 - 7 files changed, 81 insertions(+), 34 deletions(-) diff --git a/src/api/quality/shipment.js b/src/api/quality/shipment.js index cdb5956..84ba204 100644 --- a/src/api/quality/shipment.js +++ b/src/api/quality/shipment.js @@ -3,7 +3,7 @@ import request from '@/utils/request' //获取待发运列表 export function getShiporderList (data) { return request({ - url: `/admin/jit/shiporder/query`, + url: `/admin/jit/shiporder/selectlist`, method: 'get', params: data }) diff --git a/src/views/productexe/basic/component/artComponent.vue b/src/views/productexe/basic/component/artComponent.vue index 123dd14..3247880 100644 --- a/src/views/productexe/basic/component/artComponent.vue +++ b/src/views/productexe/basic/component/artComponent.vue @@ -4,6 +4,7 @@ @@ -64,12 +65,30 @@ export default { "JIT_ShipOrderItemlst-ShortTime", ], dataList: [], + itemTypeArray: [], } }, + created() { + // 订单生产状态 + this.getStanderOne({ statid: 'ItemType' }).then(res => { + this.itemTypeArray = res.data + }) + }, methods: { cancel() { this.$emit('completeCallBack', false) }, + fieldTrans(value) { + if (this.itemTypeArray.length > 0) { + let fieldValue = '' + this.itemTypeArray.forEach(el => { + if (value === (el['stdeftab-stdeftyp'])) { + fieldValue = el['stdeftab-bez'] + } + }) + return fieldValue + } + }, }, mounted() { this.dataList = [] diff --git a/src/views/productexe/basic/dispatchOrder.vue b/src/views/productexe/basic/dispatchOrder.vue index c7c165e..033645a 100644 --- a/src/views/productexe/basic/dispatchOrder.vue +++ b/src/views/productexe/basic/dispatchOrder.vue @@ -28,10 +28,21 @@ - + @@ -86,6 +97,7 @@ import { } from '@/api/productexe/shipment'; import artComponent from './component/artComponent.vue' import pkgComponent from './component/pkgComponent.vue' +import moment from 'moment' export default { name: 'dispatchOrder', components: { @@ -112,8 +124,8 @@ export default { "JIT_ShipOrder-TemplateFile", "JIT_ShipOrder-PlanQty", "JIT_ShipOrder-ActualQty", - "JIT_ShipOrder-OpenTime", - "JIT_ShipOrder-CloseTime", + // "JIT_ShipOrder-OpenTime", + // "JIT_ShipOrder-CloseTime", "JIT_ShipOrder-Operator", "JIT_ShipOrder-SupplierCode", "JIT_ShipOrder-PurchaseOrderId", @@ -139,14 +151,30 @@ export default { uploadLoading: false, excel: '', uploadmustpic: '', + colorData:{ +        10:'not-plan-bg', +        20:'has-plan-bg', +        24:'has-lock-bg', +        26:'has-issued-bg', +        39:'interrupt-bg', +        40:'in-production-bg', +        80:'has-complete-bg', +        90:'has-shipment-bg', +        95:'freeze-bg', +        98:'has-cancel-bg', +      }, + orderStatusArray: [], } }, created() { this.getList() + this.getStanderOne({ statid: 'shipStatus' }).then(res => { + this.orderStatusArray = res.data + }) }, methods: { - /** 查询列表 */ - getList() { + moment, + getList() { // 查询列表 this.loading = true getShiporderList(this.queryParams).then( response => { @@ -156,6 +184,17 @@ export default { } ) }, + fieldTrans(value) { + if (this.orderStatusArray.length > 0) { + let fieldValue = '' + this.orderStatusArray.forEach(el => { + if (value === Number(el['stdeftab-stdeftyp'])) { + fieldValue = el['stdeftab-bez'] + } + }) + return fieldValue + } + }, // 上传文件预览 previewUpload(file) { this.excle = file.target.files[0] @@ -246,3 +285,10 @@ export default { } } + + diff --git a/src/views/quality/component/shipmentCode.vue b/src/views/quality/component/shipmentCode.vue index 3a2f704..d7da349 100644 --- a/src/views/quality/component/shipmentCode.vue +++ b/src/views/quality/component/shipmentCode.vue @@ -42,7 +42,6 @@ export default { // 扫码之后的处理 enterPress() { this.statusInfo = '' - // this.checkCode() if (this.pickCode.indexOf('PACK-') != -1) { // 拣料项 if (!this.shipOrderId) { this.msgInfo('请先扫描发运单!') @@ -77,33 +76,11 @@ export default { } this.$emit('handleSuccessCode', this.newEmitObj) } else { - this.statusInfo = '发运单信息不存在!' return } }) } }, - // 校验扫码是发运单还是拣料项 - checkCode() { - if (this.pickCode.indexOf('PACK-') != -1) { // 拣料项 - if (!this.shipOrderId) { - this.msgInfo('请先选择发运单!') - return - } - } else { // 发运单 - this.tableData.forEach(el => { - if (el['JIT_ShipOrder-ShipOrderId'] === this.pickCode) { - this.currentShipOrder = el['JIT_ShipOrder-ShipOrderId'] - this.newEmitObj = { - currentShipOrder: this.currentShipOrder, - } - this.$emit('handleSuccessCode', this.newEmitObj) - } else { - - } - }) - } - }, // 重置扫描条码 resetCode() { this.pickCode = '' diff --git a/src/views/quality/component/shipmentList.vue b/src/views/quality/component/shipmentList.vue index 30fde34..6208647 100644 --- a/src/views/quality/component/shipmentList.vue +++ b/src/views/quality/component/shipmentList.vue @@ -64,7 +64,6 @@ export default { } }, created() { - // 订单生产状态 this.getStanderOne({ statid: 'shipStatus' }).then(res => { this.orderStatusArray = res.data }) diff --git a/src/views/quality/component/shipmentSearch.vue b/src/views/quality/component/shipmentSearch.vue index 6e491d1..467a00b 100644 --- a/src/views/quality/component/shipmentSearch.vue +++ b/src/views/quality/component/shipmentSearch.vue @@ -34,7 +34,7 @@ import moment from 'moment' export default { data() { return { - dateValue: moment().format('YYYY-MM-DD'), + dateValue: undefined, tableData: [], loading: false, newObj: {}, @@ -53,8 +53,7 @@ export default { } getShiporderList(params).then(({code, data}) => { if (code === 200) { - this.tableData = data.records || [] - this.total = data.count + this.tableData = data || [] this.loading = false this.newObj = { tableData: this.tableData @@ -74,6 +73,10 @@ export default { }, // 前一天 beforeDayHandle() { + if (!this.dateValue) { + this.msgInfo('请先选择日期!') + return + } let afterDay = moment(this.dateValue).subtract(1,"days").format("YYYY-MM-DD") this.dateValue = afterDay this.getList() @@ -85,6 +88,10 @@ export default { }, // 后一天 afterDayHandle() { + if (!this.dateValue) { + this.msgInfo('请先选择日期!') + return + } let afterDay = moment(this.dateValue).add(1,"days").format("YYYY-MM-DD") this.dateValue = afterDay this.getList() diff --git a/src/views/quality/shipment.vue b/src/views/quality/shipment.vue index c80bf8b..7e4b5c4 100644 --- a/src/views/quality/shipment.vue +++ b/src/views/quality/shipment.vue @@ -41,7 +41,6 @@ export default { this.tableData = data.tableData }, handleSuccessCode(data) { - console.log(data) if (data.shipOrderId) { this.$refs.shipmentList.getInfo(data) } else { From 2db3212c608a65622096dd29ee3e3ddb6df871d1 Mon Sep 17 00:00:00 2001 From: wangxy Date: Wed, 27 Oct 2021 17:14:14 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=8F=91=E8=BF=90=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/component/artComponent.vue | 33 ++++++++++++++++--- .../basic/component/pkgComponent.vue | 29 ++++++++++++++-- src/views/productexe/basic/dispatchOrder.vue | 4 +++ 3 files changed, 60 insertions(+), 6 deletions(-) diff --git a/src/views/productexe/basic/component/artComponent.vue b/src/views/productexe/basic/component/artComponent.vue index 3247880..aaaf4a3 100644 --- a/src/views/productexe/basic/component/artComponent.vue +++ b/src/views/productexe/basic/component/artComponent.vue @@ -1,10 +1,19 @@