This commit is contained in:
aihe 2024-05-08 15:51:44 +08:00
parent aaaa63663f
commit ab78c6625d
2 changed files with 35 additions and 13 deletions

View File

@ -6,6 +6,7 @@ export const scanTypeEnum = {
faJian: 20, // 发件 faJian: 20, // 发件
daoJian: 30, // 到件 daoJian: 30, // 到件
paiJian: 40, // 派件 paiJian: 40, // 派件
qianShou: 50, // 签收
} }
export const getScanParams = (type, model = {})=> { export const getScanParams = (type, model = {})=> {

View File

@ -6,8 +6,8 @@
<view class="blcok-white-noradius" style="margin-top: 0;"> <view class="blcok-white-noradius" style="margin-top: 0;">
<u-row justify="between"> <u-row justify="between">
<view style="flex:1;"> <view style="flex:1;">
<tpx-scan-input v-model:value="submitParam.yundanhao" placeholder="请输入运单号或扫码" <tpx-scan-input v-model:value="submitParam.billCode" placeholder="请输入或扫码"
iconPos="left"></tpx-scan-input> @change="handleScanValChange" iconPos="left"></tpx-scan-input>
</view> </view>
</u-row> </u-row>
<u-row custom-style="margin-top:20rpx;"> <u-row custom-style="margin-top:20rpx;">
@ -17,10 +17,10 @@
</u-row> </u-row>
<view class="mt-20"> <view class="mt-20">
<bpe-goodphoto-tmp title="签收拍照" :value="submitParam" filedName="phName"></bpe-goodphoto-tmp> <bpe-goodphoto-tmp title="签收拍照" :value="submitParam" filedName="picUrl"></bpe-goodphoto-tmp>
</view> </view>
<view class="mt-10"> <view class="mt-10">
<u-textarea v-model="submitParam.otherDes" border="surround" height="120" placeholder="备注" <u-textarea v-model="submitParam.remark" border="surround" height="120" placeholder="备注"
maxlength="50" count></u-textarea> maxlength="50" count></u-textarea>
</view> </view>
</view> </view>
@ -29,7 +29,7 @@
<template v-slot:footer> <template v-slot:footer>
<view class="pos-rlt blcok-white" style="border-radius: 0;margin-top: 0;"> <view class="pos-rlt blcok-white" style="border-radius: 0;margin-top: 0;">
<u-row> <u-row>
<u-button size="large" shape="circle" <u-button @click="handleSubmit" size="large" shape="circle"
custom-style="width: 500rpx;height:80rpx;font-size: 30rpx;" type="primary">确认签收</u-button> custom-style="width: 500rpx;height:80rpx;font-size: 30rpx;" type="primary">确认签收</u-button>
</u-row> </u-row>
</view> </view>
@ -44,22 +44,27 @@
import { debounce } from "@/common/util" import { debounce } from "@/common/util"
import dayjs from "dayjs" import dayjs from "dayjs"
import * as apiService from "@/common/api" import * as apiService from "@/common/api"
import { scanTypeEnum, getScanParams, ansScanResponse } from "./scanUtil"
export default { export default {
components:{ BoOperatorTmp, BpeGoodphotoTmp }, components:{ BoOperatorTmp, BpeGoodphotoTmp },
props: { props: {
// hasLeftWin: {
// type: Boolean
// }
}, },
computed: { computed: {
}, },
data() { data() {
return { return {
queryOption: {
billCode: '', // 运单id
orderSn: '', // 订单id
},
submitParam: { submitParam: {
date: [], billCode: "",
type: 1, signMan: "",
picUrl: [],
remark: "",
scanDate: ""
}, },
} }
}, },
@ -67,7 +72,8 @@
return { return {
} }
}, },
onLoad() { onLoad(option) {
this.queryOption = option
this.initData(); this.initData();
}, },
onUnload() { onUnload() {
@ -76,9 +82,24 @@
methods: { methods: {
initData() { initData() {
this.submitParam.billCode = this.queryOption.billCode || this.queryOption.orderSn
}, },
handleSubmit() { handleScanValChange: debounce(function(val){
}),
async handleSubmit() {
this.submitParam.picUrl = this.submitParam.picUrl.join(",")
let scnParam = getScanParams(scanTypeEnum.qianShou, { ...this.submitParam })
let res = await apiService.scanRecord({...scnParam, _loading: true})
let { bl, resItem } = ansScanResponse({ res, title: "签收" })
if(bl) {
this.resetForm()
}
},
resetForm() {
this.submitParam = {
picUrl: []
}
} }
} }
} }