diff --git a/components/tpx-text-dic/tpx-text-dic.vue b/components/tpx-text-dic/tpx-text-dic.vue index 14d2c21..43be7d1 100644 --- a/components/tpx-text-dic/tpx-text-dic.vue +++ b/components/tpx-text-dic/tpx-text-dic.vue @@ -7,9 +7,13 @@ computed: { title() { let title = this.value - !this.value && this.list && (title = '-'); - if(this.value && this.list) { - title = this.list.filter(t=> t.val == this.value || this.value.indexOf(t.val) > -1).map(t=> t.title).join(",") + let val = this.value + !val && this.list && (title = '-'); + if(val && this.list) { + if(!Array.isArray() && val.split) { + val = val.split(",") + } + title = this.list.filter(t=> t.val == val || (val.indexOf && val.indexOf(t.val) > -1)).map(t=> t.title).join(",") } return title } diff --git a/components/tpx-text-item/tpx-text-item.vue b/components/tpx-text-item/tpx-text-item.vue index abdd529..b7f1208 100644 --- a/components/tpx-text-item/tpx-text-item.vue +++ b/components/tpx-text-item/tpx-text-item.vue @@ -22,9 +22,13 @@ computed: { title() { let title = this.value - !this.value && this.list && (title = '请选择'); - if(this.value && this.list) { - title = this.list.filter(t=> t.val == this.value || this.value.indexOf(t.val) > -1).map(t=> t.title).join(",") + let val = this.value + !val && this.list && (title = '请选择'); + if(val && this.list) { + if(!Array.isArray() && val.split) { + val = val.split(",") + } + title = this.list.filter(t=> t.val == val || (val.indexOf && val.indexOf(t.val) > -1)).map(t=> t.title).join(",") } return title } diff --git a/pages/deliveryDeal/arriveDeliveryScanning.vue b/pages/deliveryDeal/arriveDeliveryScanning.vue index 42c44d2..57f9d27 100644 --- a/pages/deliveryDeal/arriveDeliveryScanning.vue +++ b/pages/deliveryDeal/arriveDeliveryScanning.vue @@ -3,15 +3,15 @@ - diff --git a/pages/deliveryDeal/arriveScanning.vue b/pages/deliveryDeal/arriveScanning.vue index 624ff26..52ce4d8 100644 --- a/pages/deliveryDeal/arriveScanning.vue +++ b/pages/deliveryDeal/arriveScanning.vue @@ -5,7 +5,7 @@ - @@ -40,10 +40,10 @@ - T2919292 + {{item.billCode}} - 12-18 13:18 + {{item.scanDate}} @@ -64,6 +64,7 @@ import dayjs from "dayjs" import BoOperatorTmp from "@/components/buns-order-templates/bo-operator-tmp" import * as apiService from "@/common/api" + import { scanTypeEnum, getScanParams, ansScanResponse } from "./scanUtil" export default { components:{ BoOperatorTmp }, props: { @@ -74,7 +75,9 @@ }, data() { return { - orderNo: '', + submitParam: { + billCode: '' + }, pageLoading: true, queryOption: { billCode: '', // 运单id @@ -100,11 +103,25 @@ }, methods: { initData() { - this.orderNo = this.queryOption.billCode || this.queryOption.orderSn + this.submitParam.billCode = this.queryOption.billCode || this.queryOption.orderSn + }, + async handleSubmit(val) { + let extParam = {} + val && (extParam.billCode = val); + let scnParam = getScanParams(scanTypeEnum.daoJian, { ...this.submitParam, ...extParam }) + let res = await apiService.scanRecord({...scnParam, _loading: true}) + let { bl, resItem } = ansScanResponse({ res, title: "到件" }) + if(bl) { + this.resData.list.push({ ...resItem }) + this.resetForm() + } }, handleScanValChange: debounce(function(val){ - val + val && (this.handleSubmit(val)) }), + resetForm() { + this.submitParam.billCode = '' + } } } diff --git a/pages/deliveryDeal/deliveryScanning.vue b/pages/deliveryDeal/deliveryScanning.vue index b0b2179..1a84bba 100644 --- a/pages/deliveryDeal/deliveryScanning.vue +++ b/pages/deliveryDeal/deliveryScanning.vue @@ -3,15 +3,15 @@