This commit is contained in:
aihe 2024-05-08 00:13:08 +08:00
parent f8813979ad
commit 951a5cce64
8 changed files with 196 additions and 153 deletions

View File

@ -76,3 +76,8 @@ export const getOrderDetail = (data = {})=> {
}
// 扫描
export const scanRecord = (data = {})=> {
return coreRequest(url.scanRecord, data, {})
}

View File

@ -35,5 +35,7 @@ export default {
getOrderList: `/emis/emisWaybill/listSimple`, // 订单列表
getOrderDetail: `/emis/emisWaybill/getWaybillDetail`, // 订单详情
scanRecord: `/emis/emisTmsScanRecord/scan`, // 扫描- 揽收
}

View File

@ -7,7 +7,7 @@
</view>
<view style="flex: 1;padding: 0 30rpx;">
<view style="flex: 1;">
<template v-if="modelInfo.sender.name">
<template v-if="modelInfo.sender && modelInfo.sender.name">
<text class="font-weight pr-10">{{modelInfo.sender.name}}</text>
<text class="">{{modelInfo.sender.phone}}</text>
</template>
@ -43,7 +43,7 @@
</view>
<view class="pr-30 pl-30" style="flex: 1;">
<view style="flex: 1;">
<template v-if="modelInfo.reciever.name">
<template v-if="modelInfo.reciever && modelInfo.reciever.name">
<text class="font-weight pr-10">{{modelInfo.reciever.name}}</text>
<text class="">{{modelInfo.reciever.phone}}</text>
</template>

View File

@ -6,9 +6,17 @@
<image style="height: 50rpx;width: 42rpx;" :src="getCdnUrl(`post/ji.png`)"></image>
</view>
<view style="flex: 1;padding: 0 30rpx;">
<u-text text="寄件人信息" size="28" :bold="true"></u-text>
<view style="flex: 1;">
<template v-if="modelInfo.sender && modelInfo.sender.name">
<text class="font-weight pr-10">{{modelInfo.sender.name}}</text>
<text class="">{{modelInfo.sender.phone}}</text>
</template>
<template v-else>
<text class="font-weight">寄件人信息</text>
</template>
</view>
<view style="margin: 8rpx 0 0 0;">
<u-text text="请新建您的寄件地址信息" size="26" color="#999"></u-text>
<u-text :text="sendDetail" size="26" color="#999"></u-text>
</view>
</view>
<view class="flex-column-center">
@ -32,9 +40,17 @@
</image>
</view>
<view class="pr-30 pl-30" style="flex: 1;">
<u-text text="收件人信息" size="28" :bold="true"></u-text>
<view style="flex: 1;">
<template v-if="modelInfo.reciever && modelInfo.reciever.name">
<text class="font-weight pr-10">{{modelInfo.reciever.name}}</text>
<text class="">{{modelInfo.reciever.phone}}</text>
</template>
<template v-else>
<text class="font-weight">收件人信息</text>
</template>
</view>
<view style="margin: 8rpx 0 0 0;">
<u-text text="请填写收件人国家、姓名,电话" size="26" color="#999"></u-text>
<u-text :text="recieverDetail" size="26" color="#999"></u-text>
</view>
</view>
<view class="flex-column-center">
@ -46,16 +62,29 @@
</template>
<script>
import getCdnUrl from "@/common/getCdnUrl"
import { goto } from "@/common/untool"
import { pageEventNames } from "@/common/enum"
import { getAddressDetail } from "@/common/util"
export default {
computed: {
submitInfo: {
modelInfo: {
get(){
return this.value
}
}
},
sendDetail: {
get(){
const { sender: item } = this.modelInfo
return getAddressDetail(item) || '请填写寄件人国家、姓名,电话'
}
},
recieverDetail: {
get(){
const { reciever: item } = this.modelInfo
return getAddressDetail(item) || '请填写收件人国家、姓名,电话'
}
},
},
props: {
value: {
@ -78,7 +107,7 @@
},
methods: {
getCdnUrl,
}
}
</script>

View File

@ -1,79 +1,81 @@
<template>
<tpx-layout>
<template v-slot:body>
<view class="com-jianju pos-rlt pb-30" style="padding-top: 2rpx;">
<view class="blcok-white">
<u-row justify="between">
<view style="width: 130rpx;">运单号</view>
<view style="flex:1;">
<tpx-scan-input v-model:value="submitParam.yundanhao"></tpx-scan-input>
<tpx-page>
<tpx-layout>
<template v-slot:body>
<view class="com-jianju pos-rlt pb-30" style="padding-top: 2rpx;">
<view class="blcok-white">
<u-row justify="between">
<view style="width: 130rpx;">运单号</view>
<view style="flex:1;">
<tpx-scan-input v-model:value="orderNo" @change="handleScanValChange"></tpx-scan-input>
</view>
<view class="pl-10">
<u-button custom-style="height: 74rpx;">确定</u-button>
</view>
</u-row>
</view>
<view v-if="submitParam.orderSn" class="mt-30" @click="handleDialogClick(orderDetailModal)">
<u-row justify="space-between">
<view class="com-section">订单号:{{submitParam.orderSn}}</view>
<view>
<button size="mini">订单详情</button>
</view>
</u-row>
</view>
<view class="blcok-white">
<bpe-addressjiami-tmp v-model:value="submitParam"></bpe-addressjiami-tmp>
</view>
<view class="com-section mt-30">托寄货物描述</view>
<view class="blcok-white">
<bpe-gooditem-edit-tmp v-model:value="submitParam"></bpe-gooditem-edit-tmp>
<view class="mt-30">
<bpe-goodsize-tmp ref="goodSize" :value="submitParam"></bpe-goodsize-tmp>
</view>
<view class="pl-10">
<u-button custom-style="height: 74rpx;">确定</u-button>
</view>
</view>
<view class="com-section mt-30">揽收备注</view>
<view class="blcok-white">
<u-textarea v-model="submitParam.remark" border="surround" height="120" placeholder="备注"
maxlength="50" count></u-textarea>
</view>
</view>
</template>
<template v-slot:footer>
<view class="pos-rlt blcok-white" style="border-radius: 0;margin-top: 0;">
<u-row>
<u-button @click="handleLanShou" size="large" shape="circle"
custom-style="width: 400rpx;height:80rpx;font-size: 30rpx;" type="primary" >揽收</u-button>
</u-row>
</view>
<view class="mt-30" @click="handleDialogClick(orderDetailModal)">
<u-row justify="space-between">
<view class="com-section">订单号:TWO291929</view>
<view>
<button size="mini">订单详情</button>
</view>
</u-row>
</view>
<view class="blcok-white">
<bpe-addressjiami-tmp v-model:value="submitParam"></bpe-addressjiami-tmp>
</view>
<view class="com-section mt-30">托寄货物描述</view>
<view class="blcok-white">
<bpe-gooditem-edit-tmp v-model:value="submitParam"></bpe-gooditem-edit-tmp>
</view>
<view class="com-section mt-30">揽收备注</view>
<view class="blcok-white">
<u-textarea v-model="submitParam.otherDes" border="surround" height="120" placeholder="备注"
maxlength="50" count></u-textarea>
</view>
</view>
</template>
<template v-slot:footer>
<view class="pos-rlt blcok-white" style="border-radius: 0;margin-top: 0;">
<u-row>
<u-button size="large" shape="circle" @click="handleLan"
custom-style="width: 260rpx;height:80rpx;font-size: 30rpx;" :plain="true" type="primary">揽收</u-button>
<u-button size="large" shape="circle"
custom-style="width: 400rpx;height:80rpx;font-size: 30rpx;" type="primary" >揽收开单</u-button>
</u-row>
</view>
</template>
</tpx-layout>
<tpx-com-dialog v-model:show="lanDialog.show" title="揽收成功" cancelText="立即称重" sureText="带回仓库" @onCancel="handleLanConf(1)" @onSure="handleLanConf(2)">
<template v-slot:body>请现场称重或带回仓库称重!</template>
</tpx-com-dialog>
<tpx-dialog v-model:show="orderDetailModal.show" title="订单详情" contentStyle="padding:0;">
<bo-detail-tmp v-model:value="submitParam"></bo-detail-tmp>
</tpx-dialog>
</template>
</tpx-layout>
<tpx-dialog v-model:show="orderDetailModal.show" title="订单详情" contentStyle="padding:0;">
<bo-detail-tmp v-model:value="submitParam"></bo-detail-tmp>
</tpx-dialog>
</tpx-page>
</template>
<script>
import getCdnUrl from "@/common/getCdnUrl"
import { sendTypeEnum, sendTypeList, qingguanList, baoguanList, } from "@/common/enum"
import { goto } from "@/common/untool"
import { debounce } from "@/common/util"
import dayjs from "dayjs"
import BpeAddressjiamiTmp from "@/components/buns-post-edit-templates/bpe-addressjiami-tmp"
import BpeGooditemEditTmp from "@/components/buns-post-edit-templates/bpe-gooditem-edit-tmp"
import BpeGoodphotoTmp from "@/components/buns-post-edit-templates/bpe-goodphoto-tmp"
import BoDetailTmp from "@/components/buns-order-templates/bo-detail-tmp"
import BpeGoodsizeTmp from "@/components/buns-post-edit-templates/bpe-goodsize-tmp"
import * as apiService from "@/common/api"
export default {
components: { BpeAddressjiamiTmp, BpeGooditemEditTmp, BpeGoodphotoTmp, BoDetailTmp },
components: { BpeAddressjiamiTmp, BpeGooditemEditTmp, BpeGoodphotoTmp, BoDetailTmp, BpeGoodsizeTmp },
props: {
// hasLeftWin: {
// type: Boolean
@ -84,29 +86,17 @@
},
data() {
return {
kehuList: [{title: '李先生', val: '11'}],
...(JSON.parse(JSON.stringify({ qingguanList, baoguanList, sendTypeEnum, sendTypeList }))),
tipsList: [
],
lanDialog: {
show: false
orderNo: '',
pageLoading: true,
queryOption: {
billCode: '', // 运单id
orderSn: '', // 订单id
},
orderDetailModal: {
show: false
},
submitParam: {
yundanhao: '',
stockRoomId: '',
countryId: '',
wayId: '',
type: sendTypeList[0].val,
paytype: '',
otherDes: '',
prodId: 1,
tips: [],
revtime: '',
gdList: [{},{}]
}
}
},
@ -116,32 +106,42 @@
// path: 'TODO'
}
},
onLoad() {
onLoad(option) {
this.queryOption = option
this.initData();
},
onUnload() {
},
methods: {
getCdnUrl,
goto,
initData() {
// uni.showLoading({
// title: '加载中'
// });
this.orderNo = this.queryOption.billCode || this.queryOption.orderSn
this.orderNo && (this.queryOrderDetail(this.queryOption))
},
handleAgree() {
this.agreePrivateRule = !this.agreePrivateRule
async queryOrderDetail(params) {
let res = await apiService.getOrderDetail({...params, _loading: true})
this.submitParam = res.data
this.pageLoading = false
},
handleScanValChange: debounce(function(val){
val && ( this.queryOrderDetail({ billCode: val, orderSn: val, }) )
}),
handleDialogClick(curModal){
curModal.show = true
},
handleLan(){
this.handleDialogClick(this.lanDialog)
},
handleLanConf(type) {
debugger
async handleLanShou() {
await apiService.submitOrder({...this.submitParam, _loading: true})
let scnParam = {
scanType: 10, // 揽收
opType: 2,
scanData: [{
billCode: this.submitParam.billCode,
dispatchOrSendManCode: this.submitParam.dispatchOrSendManCode,
scanDate: dayjs().format("YYYY-MM-DD HH:mm:ss")
}]
}
await apiService.scanRecord({...scnParam, _loading: true})
this.showToast('揽收成功')
}
}
}

View File

@ -23,9 +23,9 @@
</u-row>
</view>
<view v-if="queryOption.orderSn" class="com-section mt-30" @click="goto('post/detail')">
<view v-if="submitParam.orderSn" class="com-section mt-30" @click="goto('post/detail')">
<u-row justify="space-between">
<text>订单号:TWO291929</text>
<text>订单号:{{submitParam.orderSn}}</text>
<u-icon name="bag" size="42"></u-icon>
</u-row>
</view>

View File

@ -1,49 +1,51 @@
<template>
<view>
<view class="dl-head">操作</view>
<view class="dl-blcok">
<view class="font-32 font-weight">网点发件</view>
<view class="mt-10">
<u-row justify="start" gutter="18" custom-style="flex-wrap: wrap;">
<u-col v-for="(item, index) in faBtnlist" span="3" @click="goto(item.url)">
<view class="dlb-item">
<u-image height="46" width="46" :src="item.icon"></u-image>
<view class="pt-10 font-26">{{item.title}}</view>
</view>
</u-col>
</u-row>
<tpx-page>
<view>
<view class="dl-head">操作</view>
<view class="dl-blcok">
<view class="font-32 font-weight">网点发件</view>
<view class="mt-10">
<u-row justify="start" gutter="18" custom-style="flex-wrap: wrap;">
<u-col v-for="(item, index) in faBtnlist" span="3" @click="goto(item.url)">
<view class="dlb-item">
<u-image height="46" width="46" :src="item.icon"></u-image>
<view class="pt-10 font-26">{{item.title}}</view>
</view>
</u-col>
</u-row>
</view>
</view>
<view class="dl-blcok">
<view class="font-32 font-weight">网点到件</view>
<view class="mt-10">
<u-row justify="start" gutter="18" custom-style="flex-wrap: wrap;">
<u-col v-for="(item, index) in daoBtnlist" span="3" @click="goto(item.url)">
<view class="dlb-item">
<u-image height="46" width="46" :src="item.icon"></u-image>
<view class="pt-10 font-26">{{item.title}}</view>
</view>
</u-col>
</u-row>
</view>
</view>
<view class="dl-blcok">
<view class="font-32 font-weight">其他</view>
<view class="mt-10">
<u-row justify="start" gutter="18" custom-style="flex-wrap: wrap;">
<u-col v-for="(item, index) in otherBtnlist" span="3" @click="goto(item.url)">
<view class="dlb-item">
<u-image height="46" width="46" :src="item.icon"></u-image>
<view class="pt-10 font-26">{{item.title}}</view>
</view>
</u-col>
</u-row>
</view>
</view>
</view>
<view class="dl-blcok">
<view class="font-32 font-weight">网点到件</view>
<view class="mt-10">
<u-row justify="start" gutter="18" custom-style="flex-wrap: wrap;">
<u-col v-for="(item, index) in daoBtnlist" span="3" @click="goto(item.url)">
<view class="dlb-item">
<u-image height="46" width="46" :src="item.icon"></u-image>
<view class="pt-10 font-26">{{item.title}}</view>
</view>
</u-col>
</u-row>
</view>
</view>
<view class="dl-blcok">
<view class="font-32 font-weight">其他</view>
<view class="mt-10">
<u-row justify="start" gutter="18" custom-style="flex-wrap: wrap;">
<u-col v-for="(item, index) in otherBtnlist" span="3" @click="goto(item.url)">
<view class="dlb-item">
<u-image height="46" width="46" :src="item.icon"></u-image>
<view class="pt-10 font-26">{{item.title}}</view>
</view>
</u-col>
</u-row>
</view>
</view>
</view>
</tpx-page>
</template>
<script>

View File

@ -118,6 +118,8 @@
<u-row justify="end" custom-style="margin-top:20rpx;">
<view style="display: inline-block;white-space: nowrap;">
<u-row>
<u-button @click="handleDealItem(item, { type: 6 })" shape="circle" type="primary"
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">揽收</u-button>
<u-button @click="handleDealItem(item, { type: 4 })" shape="circle" type="primary"
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">取消</u-button>
<u-button @click="handleDealItem(item, { type: 5 })" shape="circle" type="primary" :plain="true"
@ -182,6 +184,7 @@
},
async handleDealItem(item, deal = { type: '1' }) {
let itemQuery = `?billCode=${item.billCode || ''}&orderSn=${item.orderSn || ''}`
switch (deal.type){
case 1: // 跳转
this.goto(`post/detail?id=${item.id || ''}`)
@ -196,7 +199,10 @@
await this.confirmModal('确认要取消吗?')
break;
case 5: // 立即开单
this.goto(`post/openorder?billCode=${item.billCode || ''}&orderSn=${item.orderSn || ''}`)
this.goto(`post/openorder${itemQuery}`)
break;
case 6: // 揽收
this.goto(`deliveryDeal/pickUp${itemQuery}`)
break;
default:
break;
@ -219,7 +225,6 @@
}
.ord-list-item{
border: 2px solid #F6F6F6;
box-shadow: 0rpx 3rpx 12rpx 0rpx rgba(139,139,139,0.06);
border-radius: 20rpx;