This commit is contained in:
aihe 2024-07-31 01:15:38 +08:00
parent 8ee6c8eca1
commit 2d2e099e0d
7 changed files with 98 additions and 34 deletions

View File

@ -32,6 +32,12 @@ export const preCalcWaybillFee = (data = {})=> {
return coreRequest(url.preCalcWaybillFee, { ...data }, {})
}
// 下单-报价试算
export const calcProductFee = (data = {})=> {
return coreRequest(url.calcProductFee, { ...data }, {})
}
// 物流轨迹
export const queryWaybillTraceInfo = (data = {})=> {
return coreRequest(url.queryWaybillTraceInfo, { ...data }, {}, "GET")

View File

@ -48,6 +48,7 @@ export default {
getNextStationList: `/oms2c/emisTmsScanRecord/getNextStationList`, // 获取-扫描下一网点
getPreStationList: `/oms2c/emisTmsScanRecord/getPreStationList`, // 获取-扫描上一网点
preCalcWaybillFee: `/oms2c/emisWaybill/preCalcWaybillFee`, // 报价试算 -- DONE
calcProductFee: `/oms2c/emisWaybill/calcProductFee`, // 下单-报价试算 -- DONE
queryWaybillTraceInfo: `/oms2c/emisTmsScanRecord/queryWaybillTraceInfo`, // 物流轨迹 -- DONE
queryProblemTypeList: `/oms2c/emisProblemType/listSimple`, // 问题件类型列表
registerProblemInfo: `/oms2c/emisWaybillProblemInfo/registerProblemInfo`, // 问题件登记

View File

@ -1,10 +1,24 @@
<template>
<u-row justify="between" @click="goto(`user/exclusiveCourier`)">
<text class="clr-sub">您的专属快递员</text>
<u-row>
<text class="">{{modelInfo.salesmen}}</text>
<u-row justify="between">
<u-row @click="handleChooseEmp">
<view class="">
<u-avatar size="80" :src="''"></u-avatar>
</view>
<view class="ml-10">
<u-avatar size="50" :src="''"></u-avatar>
<view class="clr-sub font-26">您的专属快递员</view>
<view class="pt-5 font-26">
<text v-if="modelInfo.salesmen">{{modelInfo.salesmen}}</text>
<u-row v-else>
<u-icon name="attach" size="30"></u-icon>
去绑定
</u-row>
</view>
</view>
</u-row>
<u-row>
<view @click="handleConnect" class="text-center">
<u-icon name="kefu-ermai" size="40" custom-style="margin: 0 auto;"></u-icon>
<text class="pt-10">客服</text>
</view>
</u-row>
</u-row>
@ -61,6 +75,12 @@
this.$emit("onChange", this.modelInfo)
}
},
handleChooseEmp(){
this.goto(`user/exclusiveCourier?type=choose`)
},
handleConnect(){
},
}
}
</script>

View File

@ -48,10 +48,6 @@
handler(newVal, oldVal){
let vals = Object.values(newVal)
this.proTypeList = []
this.modelInfo.freight = 0
this.modelInfo.productType = ''
this.modelInfo.productTypeName = ''
if(this.autoCalc) {
// 所有关联入参都有值再 执行自动计算,数据未变化不做计算
if(vals.length == vals.filter(v => !!v).length) {
@ -60,6 +56,10 @@
this.calcTypeFee(newVal);
}
}
} else {
this.modelInfo.freight = 0
this.modelInfo.productType = ''
this.modelInfo.productTypeName = ''
}
},
deep: true,
@ -75,7 +75,12 @@
default () {
return { }
}
}
},
calType: {
default () {
return 1 // 1 试算 2 下单试算
}
},
},
data() {
return {
@ -91,9 +96,16 @@
},
methods: {
checkeCalParams(){
let vals = Object.values(this.searchParam)
return vals.length == vals.filter(v => !!v).length
},
async calcTypeFee(params = {}){
let res = await apiService.preCalcWaybillFee({ ...this.searchParam, custNo: this.modelInfo.custNo, ...params, _loading: true })
let handleServer = apiService.preCalcWaybillFee
if(this.calType == 2) {
handleServer = apiService.calcProductFee
}
let res = await handleServer({ ...this.searchParam, custNo: this.modelInfo.custNo, ...params, _loading: true })
this.proTypeList = res.data || []
},
handleChooseItem(val, text, checkedList){

View File

@ -48,7 +48,7 @@
{
"path": "pages/post/post",
"style": {
"navigationBarTitleText": "上门取件"
"navigationBarTitleText": "下单寄件"
}
},
{

View File

@ -11,7 +11,7 @@
</u-row>
</view> -->
<view class="mt-20">
<view class="blcok-white">
<bpe-bindedpost-tmp v-model:value="submitParam"></bpe-bindedpost-tmp>
</view>
@ -22,7 +22,7 @@
<view class="com-section mt-30">路线信息</view>
<view class="blcok-white">
<view>
<view v-if="submitParam.reciever.country && submitParam.sender.country">
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.transLine" v-model:text="submitParam.transLineTypeName" v-model:resObject="wayRes"
:getListFun="getTransLineList" :transKeyVal="{valKey: 'lineCode',titleKey: 'lineName'}"
@ -42,13 +42,24 @@
</view>
<view>
<view v-if="submitParam.pickupMethod == 1" class="yunf-input-item">
<tpx-select v-model:value="submitParam.intoWarehouseCode" v-model:text="submitParam.intoWarehouseName" v-model:resObject="wareRes"
:getListFun="getLisWarehouse" :transKeyVal="{valKey: 'code',titleKey: 'name'}"
:searchParam="wareSearchParam" placeholder="请选择仓库"
>
<tpx-text-item label="仓库" :value="submitParam.intoWarehouseName"></tpx-text-item>
</tpx-select>
<view v-if="submitParam.pickupMethod == 1">
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.intoWarehouseCode" v-model:text="submitParam.intoWarehouseName" v-model:resObject="wareRes"
:getListFun="getLisWarehouse" :transKeyVal="{valKey: 'code',titleKey: 'name'}"
:searchParam="wareSearchParam" placeholder="请选择仓库" @onChange="handleWareHouseChange"
>
<tpx-text-item label="仓库" :value="submitParam.intoWarehouseName"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-text-item label="仓库地址" :value="submitParam.intoWarehouseAddress"></tpx-text-item>
</view>
<view class="yunf-input-item">
<tpx-text-item label="仓库联系人" :value="submitParam.intoWarehouseContact"></tpx-text-item>
</view>
<view class="yunf-input-item">
<tpx-text-item label="仓库联系人电话" :value="submitParam.intoWarehousePhone"></tpx-text-item>
</view>
</view>
<view @click="handleDialogClick(revtimeModal)" v-if="submitParam.pickupMethod == 1 || submitParam.pickupMethod == 2" class="yunf-input-item">
@ -138,7 +149,7 @@
<view class="com-section mt-30">产品类型</view>
<view class="blcok-white yunf-list" style="padding-bottom: 2rpx;">
<bpe-choosetypelist-tmp v-model:value="submitParam"></bpe-choosetypelist-tmp>
<bpe-choosetypelist-tmp ref="caleRef" v-model:value="submitParam" :calType="2"></bpe-choosetypelist-tmp>
</view>
<view class="com-section mt-30">给快递员捎话</view>
@ -211,7 +222,7 @@
return { country: this.submitParam.reciever.country, fromCountry: this.submitParam.sender.country }
},
wareSearchParam(){
return { }
return { params: { transLine: this.submitParam.transLine } }
},
dicData() {
return this.$store.getters.dicData
@ -243,7 +254,7 @@
return {
pageTypeEnum,
pageTypeMap: {
[pageTypeEnum.create]: { title: '上门取件', savedConfirmTitle: '是否操作下一单' },
[pageTypeEnum.create]: { title: '下单寄件', savedConfirmTitle: '是否操作下一单' },
[pageTypeEnum.edit]: { title: '运单修改', savedConfirmTitle: '是否操作下一单' }
},
curPageType: {},
@ -300,6 +311,12 @@
}
}
this.pageLoading = false
setTimeout(async ()=> {
if(this.$refs.caleRef.checkeCalParams()) {
// 重新计算费用
await this.$refs.caleRef.calcTypeFee()
}
}, 1000)
},
handleAddressChange() { // 地址切换
let { wayRes, submitParam } = this.getDefaultData()
@ -327,8 +344,6 @@
this.submitParam.destinationName = data.destName
this.submitParam.dispatchUnderlingSiteCode = data.siteCode;
this.submitParam.dispatchUnderlingSiteName = data.siteName;
},
async updateDltSendSite({ lineCode }) {
const { country, province, city, county, address } = this.submitParam.sender
@ -338,6 +353,13 @@
this.submitParam.sendSiteName = data.siteName
},
async handleWareHouseChange(val){
const item = this.wareRes.list.filter(t=> t.val == val)[0]
this.submitParam.intoWarehouseAddress = item.address
this.submitParam.intoWarehouseContact = item.contact
this.submitParam.intoWarehousePhone = item.tel
},
handleDialogClick(curModal){
curModal.show = true
},

View File

@ -9,7 +9,9 @@
<view class="header" >
<u-text size="40" :bold="true" text="探路物流 速运全球" color="#fff"></u-text>
<u-text margin="22rpx 0 0 0" size="24" :bold="true" text="省钱,省时,省力" color="#fff"></u-text>
<button class="btn-ljyy" type="primary">立即预约</button>
<!-- <button class="btn-ljyy" type="primary">立即预约</button> -->
<view style="height: 50rpx;"></view>
<view class="btnlist1">
<u-row>
<u-col v-for="(mbItem, mIndex) in mainBtnlist" span="6" align="center" @click="goto(mbItem.url)">
@ -46,8 +48,8 @@
</view>
<!-- #ifdef MP-WEIXIN -->
<view class="pfoot">
<u-row v-if="showFollow" justify="between">
<view v-show="showFollow" class="pfoot">
<u-row justify="between">
<u-text size="24" color="#fff" text="关注探路者官方公众号,实时接收物流信息"></u-text>
<u-button type="primary" custom-style="width: 120rpx;border-radius: 30rpx;margin: 0;font-size: 26rpx;" size="mini">去关注</u-button>
</u-row>
@ -77,18 +79,18 @@
{ title: '专属小哥', subTitle: "下单给专属业务员", icon: getCdnUrl(`sdg/btn-bindbr.png`), url: 'user/exclusiveCourier' }
],
toolBtnlist: [
{ title: '进仓单', subTitle: "货物进仓信息", icon: getCdnUrl(`sdg/t-jcd.png`), url: 'warehousing/list' },
// { title: '进仓单', subTitle: "货物进仓信息", icon: getCdnUrl(`sdg/t-jcd.png`), url: 'warehousing/list' },
{ title: '运费时效', subTitle: "运费预估,时效查看", icon: getCdnUrl(`sdg/t-shisuan.png`), url: 'post/freightCalculate' },
{ title: '运单列表', subTitle: "寄件,收件运单", icon: getCdnUrl(`sdg/t-dingdan.png`), url: 'tabBar/search/search' },
{ title: '网点查询', subTitle: "查看收寄件网点", icon: getCdnUrl(`sdg/t-wangdain.png`), url: 'service/list' },
{ title: '地址簿', subTitle: "收件 寄件地址管理", icon: getCdnUrl(`sdg/t-dizhi.png`), url: 'address/list' },
{ title: '信息速递', subTitle: "快递信息列表", icon: getCdnUrl(`sdg/t-xuzhi.png`), url: 'service/articlelist' },
// { title: '信息速递', subTitle: "快递信息列表", icon: getCdnUrl(`sdg/t-xuzhi.png`), url: 'service/articlelist' },
// { title: 'HSCODE', subTitle: "海关归类信息", icon: getCdnUrl(`sdg/t-HS.png`), url: '' },
// { title: 'RECP', subTitle: "优惠税率安排查询", icon: getCdnUrl(`sdg/t-RE.png`), url: '' },
{ title: '扫码寄件', subTitle: "扫描条码发货", icon: getCdnUrl(`sdg/t-saoma.png`), url: 'action:smjj' },
// { title: '扫码寄件', subTitle: "扫描条码发货", icon: getCdnUrl(`sdg/t-saoma.png`), url: 'action:smjj' },
{ title: '快递查询', subTitle: "快递单跟踪查询", icon: getCdnUrl(`sdg/t-yundan.png`), url: 'post/query' },
],
showFollow: true // TODO!
showFollow: false
}
},
onShareAppMessage() {
@ -108,6 +110,7 @@
}
},
officialOnload(e) {
this.showFollow = true
console.log('公众号组件加载成功===', e.detail.status)
},
officialOnError(e) {