uu
This commit is contained in:
parent
1bd6ca373f
commit
69bcdcd2b9
@ -1,4 +1,4 @@
|
|||||||
import getCdnUrl from "./getCdnUrl.js"
|
import getCdnUrl, { getCdnRoot } from "./getCdnUrl.js"
|
||||||
import { authCodeEnum } from "./authCode"
|
import { authCodeEnum } from "./authCode"
|
||||||
|
|
||||||
const dateTypeEnum = {
|
const dateTypeEnum = {
|
||||||
@ -74,6 +74,18 @@ const dealBtnMap = {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const audioTypeEnum = {
|
||||||
|
confirmation: getCdnRoot('tone/confirmation.mp3'),
|
||||||
|
correct: getCdnRoot('tone/correct.mp3'),
|
||||||
|
dotexist: getCdnRoot('tone/dotexist.mp3'),
|
||||||
|
networkError: getCdnRoot('tone/network-error.mp3'),
|
||||||
|
orderException: getCdnRoot('tone/order-exception.mp3'),
|
||||||
|
printCancel: getCdnRoot('tone/print-cancel.mp3'),
|
||||||
|
printFail: getCdnRoot('tone/print-fail.mp3'),
|
||||||
|
printSuccess: getCdnRoot('tone/print-success.mp3'),
|
||||||
|
repetitive: getCdnRoot('tone/repetitive.mp3'),
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
addressNameCodeMap,
|
addressNameCodeMap,
|
||||||
dateRangeList,
|
dateRangeList,
|
||||||
@ -82,4 +94,5 @@ export {
|
|||||||
dateTypeEnum,
|
dateTypeEnum,
|
||||||
dateTypeList,
|
dateTypeList,
|
||||||
authCodeEnum,
|
authCodeEnum,
|
||||||
|
audioTypeEnum,
|
||||||
}
|
}
|
||||||
@ -1,3 +1,7 @@
|
|||||||
export default (path)=> {
|
export default (path)=> {
|
||||||
return `/static/images/${path}`
|
return `/static/images/${path}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getCdnRoot = (path)=> {
|
||||||
|
return `/static/${path}`
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
import dayjs from "dayjs"
|
import dayjs from "dayjs"
|
||||||
import { showToast } from "@/common/untool"
|
import { showToast, playAudio } from "@/common/untool"
|
||||||
|
import { audioTypeEnum } from "@/common/enum"
|
||||||
|
|
||||||
export const scanTypeEnum = {
|
export const scanTypeEnum = {
|
||||||
lanShou: 10, // 揽收
|
lanShou: 10, // 揽收
|
||||||
@ -35,8 +36,20 @@ export const ansScanResponse = ({ res, title })=> {
|
|||||||
let bl = false
|
let bl = false
|
||||||
if(result == "success") {
|
if(result == "success") {
|
||||||
bl = true
|
bl = true
|
||||||
|
playAudio(audioTypeEnum.correct)
|
||||||
title && showToast(`${title}成功`)
|
title && showToast(`${title}成功`)
|
||||||
} else {
|
} else {
|
||||||
|
switch (resItem?.message){
|
||||||
|
case '重复扫描':
|
||||||
|
playAudio(audioTypeEnum.repetitive)
|
||||||
|
break;
|
||||||
|
case '运单号不存在':
|
||||||
|
playAudio(audioTypeEnum.dotexist)
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
playAudio(audioTypeEnum.networkError)
|
||||||
|
break;
|
||||||
|
}
|
||||||
showToast(resItem?.message || `${title}失败`)
|
showToast(resItem?.message || `${title}失败`)
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -266,6 +266,17 @@ const reloadCurrentPage = (_thisPage)=> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const playAudio = (src)=> {
|
||||||
|
const innerAudioContext = uni.createInnerAudioContext();
|
||||||
|
innerAudioContext.autoplay = true;
|
||||||
|
innerAudioContext.src = src
|
||||||
|
innerAudioContext.onPlay(() => {
|
||||||
|
console.log('开始播放===');
|
||||||
|
});
|
||||||
|
innerAudioContext.onError((res) => {
|
||||||
|
console.log("playAudio onError ======", res);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
reLaunch,
|
reLaunch,
|
||||||
@ -288,4 +299,5 @@ export {
|
|||||||
promiseTimeout,
|
promiseTimeout,
|
||||||
setNavigationBarTitle,
|
setNavigationBarTitle,
|
||||||
reloadCurrentPage,
|
reloadCurrentPage,
|
||||||
|
playAudio
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,7 +89,7 @@
|
|||||||
</u-row>
|
</u-row>
|
||||||
</view>
|
</view>
|
||||||
<view class="pt-20">
|
<view class="pt-20">
|
||||||
<u-textarea v-model="modelInfo.feeRemaker" border="surround" height="120" placeholder="费用备注"
|
<u-textarea v-model="modelInfo.feeRemark" border="surround" height="120" placeholder="费用备注"
|
||||||
maxlength="50" count></u-textarea>
|
maxlength="50" count></u-textarea>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -64,7 +64,7 @@
|
|||||||
<u-row justify="between">
|
<u-row justify="between">
|
||||||
<u-row>
|
<u-row>
|
||||||
<text class="clr-sub pr-10">费用备注</text>
|
<text class="clr-sub pr-10">费用备注</text>
|
||||||
<text>{{modelInfo.feeRemaker || '-'}}</text>
|
<text>{{modelInfo.feeRemark || '-'}}</text>
|
||||||
</u-row>
|
</u-row>
|
||||||
</u-row>
|
</u-row>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -23,6 +23,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-row>
|
</u-row>
|
||||||
|
|
||||||
|
<u-row custom-style="margin-top:20rpx;">
|
||||||
|
<view style="flex: 1;">
|
||||||
|
<tpx-select v-model:value="submitParam.dispatchOrSendManCode" v-model:resObject="paiRes" :getListFun="getRSDStaffList" :transKeyVal="{valKey: 'empCode',titleKey: 'empName'}" placeholder="请选择派件员" mode="drop"></tpx-select>
|
||||||
|
</view>
|
||||||
|
</u-row>
|
||||||
|
|
||||||
<view class="mt-20">
|
<view class="mt-20">
|
||||||
<bpe-goodphoto-tmp title="签收拍照" :value="submitParam" filedName="picUrl"></bpe-goodphoto-tmp>
|
<bpe-goodphoto-tmp title="签收拍照" :value="submitParam" filedName="picUrl"></bpe-goodphoto-tmp>
|
||||||
</view>
|
</view>
|
||||||
@ -51,6 +57,7 @@
|
|||||||
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 "@/common/scanUtil"
|
import { scanTypeEnum, getScanParams, ansScanResponse } from "@/common/scanUtil"
|
||||||
|
import { checkParams } from "@/common/validate"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components:{ BpeGoodphotoTmp },
|
components:{ BpeGoodphotoTmp },
|
||||||
@ -72,8 +79,14 @@
|
|||||||
signMan: "",
|
signMan: "",
|
||||||
picUrl: '',
|
picUrl: '',
|
||||||
remark: "",
|
remark: "",
|
||||||
scanDate: ""
|
dispatchOrSendManCode: ""
|
||||||
},
|
},
|
||||||
|
submitValidConfig: {
|
||||||
|
signMan: { required: true, requiredMsg: '签收人不能为空' },
|
||||||
|
// dispatchOrSendManCode: { required: true, requiredMsg: '请选择派件员' },
|
||||||
|
billCode: { required: true, requiredMsg: '运单号不能为空' },
|
||||||
|
},
|
||||||
|
paiRes: { list: [] },
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShareAppMessage() {
|
onShareAppMessage() {
|
||||||
@ -88,7 +101,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getRSDStaffList: apiService.getRSDStaffList,
|
||||||
initData() {
|
initData() {
|
||||||
this.submitParam.billCode = this.queryOption.billCode || this.queryOption.orderSn
|
this.submitParam.billCode = this.queryOption.billCode || this.queryOption.orderSn
|
||||||
},
|
},
|
||||||
@ -96,6 +109,7 @@
|
|||||||
|
|
||||||
}),
|
}),
|
||||||
async handleSubmit() {
|
async handleSubmit() {
|
||||||
|
await checkParams(this.submitParam, this.submitValidConfig)
|
||||||
this.submitParam.picUrl = this.submitParam.picUrl?.join?.(",") || ''
|
this.submitParam.picUrl = this.submitParam.picUrl?.join?.(",") || ''
|
||||||
let scnParam = getScanParams(scanTypeEnum.qianShou, { ...this.submitParam })
|
let scnParam = getScanParams(scanTypeEnum.qianShou, { ...this.submitParam })
|
||||||
let res = await apiService.scanRecord({...scnParam, _loading: true})
|
let res = await apiService.scanRecord({...scnParam, _loading: true})
|
||||||
|
|||||||
@ -67,7 +67,7 @@ export const getOrderModels = () => {
|
|||||||
blOverLong: undefined,
|
blOverLong: undefined,
|
||||||
blOverWeight: undefined,
|
blOverWeight: undefined,
|
||||||
overWeightNumber: undefined,
|
overWeightNumber: undefined,
|
||||||
feeRemaker: undefined, // 付款方式-其他-备注
|
feeRemark: undefined, // 付款方式-其他-备注
|
||||||
realValue: undefined,
|
realValue: undefined,
|
||||||
blDispFd: undefined,
|
blDispFd: undefined,
|
||||||
transferCode: undefined,
|
transferCode: undefined,
|
||||||
|
|||||||
BIN
static/tone/confirmation.mp3
Normal file
BIN
static/tone/confirmation.mp3
Normal file
Binary file not shown.
BIN
static/tone/correct.mp3
Normal file
BIN
static/tone/correct.mp3
Normal file
Binary file not shown.
BIN
static/tone/dotexist.mp3
Normal file
BIN
static/tone/dotexist.mp3
Normal file
Binary file not shown.
BIN
static/tone/network-error.mp3
Normal file
BIN
static/tone/network-error.mp3
Normal file
Binary file not shown.
BIN
static/tone/order-exception.mp3
Normal file
BIN
static/tone/order-exception.mp3
Normal file
Binary file not shown.
BIN
static/tone/print-cancel.mp3
Normal file
BIN
static/tone/print-cancel.mp3
Normal file
Binary file not shown.
BIN
static/tone/print-fail.mp3
Normal file
BIN
static/tone/print-fail.mp3
Normal file
Binary file not shown.
BIN
static/tone/print-success.mp3
Normal file
BIN
static/tone/print-success.mp3
Normal file
Binary file not shown.
BIN
static/tone/repetitive.mp3
Normal file
BIN
static/tone/repetitive.mp3
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user