From ab78c6625dd9b3bfe0968c66b324f98d0965c73d Mon Sep 17 00:00:00 2001
From: aihe <961836564@qq.com>
Date: Wed, 8 May 2024 15:51:44 +0800
Subject: [PATCH] uu
---
pages/deliveryDeal/scanUtil.js | 1 +
pages/deliveryDeal/signedScanning.vue | 47 +++++++++++++++++++--------
2 files changed, 35 insertions(+), 13 deletions(-)
diff --git a/pages/deliveryDeal/scanUtil.js b/pages/deliveryDeal/scanUtil.js
index dbb632d..59cf171 100644
--- a/pages/deliveryDeal/scanUtil.js
+++ b/pages/deliveryDeal/scanUtil.js
@@ -6,6 +6,7 @@ export const scanTypeEnum = {
faJian: 20, // 发件
daoJian: 30, // 到件
paiJian: 40, // 派件
+ qianShou: 50, // 签收
}
export const getScanParams = (type, model = {})=> {
diff --git a/pages/deliveryDeal/signedScanning.vue b/pages/deliveryDeal/signedScanning.vue
index 471944d..f420f38 100644
--- a/pages/deliveryDeal/signedScanning.vue
+++ b/pages/deliveryDeal/signedScanning.vue
@@ -6,8 +6,8 @@
-
+
@@ -17,10 +17,10 @@
-
+
-
@@ -29,7 +29,7 @@
- 确认签收
@@ -44,22 +44,27 @@
import { debounce } from "@/common/util"
import dayjs from "dayjs"
import * as apiService from "@/common/api"
+ import { scanTypeEnum, getScanParams, ansScanResponse } from "./scanUtil"
export default {
components:{ BoOperatorTmp, BpeGoodphotoTmp },
props: {
- // hasLeftWin: {
- // type: Boolean
- // }
},
computed: {
},
data() {
return {
+ queryOption: {
+ billCode: '', // 运单id
+ orderSn: '', // 订单id
+ },
submitParam: {
- date: [],
- type: 1,
+ billCode: "",
+ signMan: "",
+ picUrl: [],
+ remark: "",
+ scanDate: ""
},
}
},
@@ -67,7 +72,8 @@
return {
}
},
- onLoad() {
+ onLoad(option) {
+ this.queryOption = option
this.initData();
},
onUnload() {
@@ -76,9 +82,24 @@
methods: {
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: []
+ }
}
}
}