This commit is contained in:
aihe 2024-05-27 16:37:58 +08:00
parent d822296cba
commit 52430ac0ae

View File

@ -7,7 +7,7 @@
<u-row justify="between"> <u-row justify="between">
<view style="width: 130rpx;">运单号</view> <view style="width: 130rpx;">运单号</view>
<view style="flex:1;"> <view style="flex:1;">
<tpx-scan-input v-model:value="submitParam.billCode" @scanChange="handleScanChange"></tpx-scan-input> <tpx-scan-input v-model:value="submitParam.billCode" @change="handleScanChange"></tpx-scan-input>
</view> </view>
<view class="pl-10" v-if="queryOption.type == 'create' || queryOption.copyBillCode"> <view class="pl-10" v-if="queryOption.type == 'create' || queryOption.copyBillCode">
<u-button @click="handleCreateOrderNo()" <u-button @click="handleCreateOrderNo()"
@ -273,7 +273,7 @@
import BpeGoodphotoTmp from "@/components/buns-post-edit-templates/bpe-goodphoto-tmp" import BpeGoodphotoTmp from "@/components/buns-post-edit-templates/bpe-goodphoto-tmp"
import BpeGoodKuaidiTmp from "@/components/buns-post-edit-templates/bpe-good-kuaidi-tmp" import BpeGoodKuaidiTmp from "@/components/buns-post-edit-templates/bpe-good-kuaidi-tmp"
import BpeGoodsizeTmp from "@/components/buns-post-edit-templates/bpe-goodsize-tmp" import BpeGoodsizeTmp from "@/components/buns-post-edit-templates/bpe-goodsize-tmp"
import { debounce } from "@/common/util"
import * as apiService from "@/common/api" import * as apiService from "@/common/api"
import { getOrderModels } from "./model" import { getOrderModels } from "./model"
@ -389,12 +389,15 @@
initEvent() { initEvent() {
}, },
handleScanChange(val) { handleScanChange: debounce(function(val){
// 扫码回调 要重新查询新运单信息,并覆盖老的 // 创建不做 查询详情
this.queryOption.billCode = val if(this.queryOption.type != 'create') {
this.initData(); // 扫码回调 要重新查询新运单信息,并覆盖老的
this.initEvent() this.queryOption.billCode = val
}, this.initData();
this.initEvent()
}
}),
async handleCreateOrderNo() { async handleCreateOrderNo() {
const res = await apiService.createOrderNo() const res = await apiService.createOrderNo()
this.submitParam.billCode = res.data this.submitParam.billCode = res.data