This commit is contained in:
aihe 2024-07-16 23:02:59 +08:00
parent 4b22b9a74e
commit c17ed1fc79
6 changed files with 71 additions and 42 deletions

View File

@ -25,5 +25,5 @@ export const getListBindSalesmen = (data = {})=> {
// 绑定业务员
export const bindSalesmen = (data = {})=> {
return coreRequest(url.bindSalesmen, data, {})
return coreRequest(url.bindSalesmen, data, {}, "GET")
}

View File

@ -23,7 +23,8 @@ const dateRangeList = [
const pageEventNames = {
globalClick: "globalClick", // 全局页面 click事件
chooseAddress: "chooseAddress", // 地址选择
chooseAddress: "chooseAddress", // 选择地址
chooseEpm: "chooseEpm", // 选择快递小哥
addressSaveSuccess: "addressSaveSuccess", // 地址保存成功
}

View File

@ -2,7 +2,7 @@
<u-row justify="between">
<text class="clr-sub">您的专属快递员</text>
<u-row>
<text class="">李晓</text>
<text class="">{{modelInfo.salesmen}}</text>
<view class="ml-10">
<u-avatar size="50" :src="''"></u-avatar>
</view>
@ -12,6 +12,8 @@
<script>
import * as apiService from "@/common/api"
import { pageEventNames } from "@/common/enum"
export default {
computed: {
modelInfo: {
@ -34,16 +36,31 @@
}
},
created() {
this.initEvent()
},
onHide() {
},
unmounted() {
uni.$off(pageEventNames.chooseEpm, this.chooseEmpEventBack)
},
methods: {
initEvent() {
if(!this.disabled) {
uni.$on(pageEventNames.chooseEpm, this.chooseEmpEventBack)
}
},
chooseEmpEventBack({ data, queryOption }){
const { tab } = queryOption
let isChange = false
let oldData = this.modelInfo
if(oldData.empName != data.empName) {
this.modelInfo.payee = data.empName
this.modelInfo.salesmen = data.empName
this.$emit("onChange", this.modelInfo)
}
},
}
}
</script>

View File

@ -3,13 +3,13 @@
<tpx-layout v-if="!pageLoading">
<template v-slot:body>
<view class="com-jianju pos-rlt pb-30" style="padding-top: 2rpx;">
<view class="blcok" style="background-color: #0E0708;">
<!-- <view class="blcok" style="background-color: #0E0708;">
<u-row>
<image class="mr-20" style="height: 28rpx;width: 34rpx;"
:src="getCdnUrl(`post/gangbo.png`)"></image>
<u-text size="24" color="#fff" text="下单后会有业务员及时联系您,请保持电话畅通!"></u-text>
</u-row>
</view>
</view> -->
<view class="mt-20">
<bpe-bindedpost-tmp v-model:value="submitParam"></bpe-bindedpost-tmp>
@ -221,7 +221,8 @@
return {
}
},
onLoad() {
onLoad(option = {}) {
this.queryOption = option
this.initData();
},
onUnload() {
@ -247,6 +248,8 @@
billCode: '', // 运单id
orderSn: '', // 订单id
copyBillCode: '', // 复制的运单id
bindEmpName: '',
bindEmpCode: ''
},
wayRes: { list: [] },
yuejieRes: { list: [] },
@ -275,6 +278,9 @@
console.error("queryOption.defaultSubParams=====转换失败===", this.queryOption.defaultSubParams)
}
}
this.submitParam.payee = this.queryOption.bindEmpName
this.submitParam.salesmen = this.queryOption.bindEmpName
if(this.isEdit) {
let res = await apiService.getOrderDetail({...this.queryOption, _loading: true})
let data = res.data || {}

View File

@ -5,7 +5,7 @@
<view class="customer_nav_bar">
<view class="com-jianju" style="width: 490rpx;">
<!-- 关键字搜索框 -->
<tpx-search placeholder="请输入运单号/订单号" v-model:value="searchParam.keyword" @change="handleSearch" bgColor="#FFF" :timelyTrigger="false"></tpx-search>
<tpx-search placeholder="请输入运单号/订单号" v-model:value="searchParam.billCode" @change="handleSearch" bgColor="#FFF" :timelyTrigger="false"></tpx-search>
</view>
<view class="com-jianju" style="padding-top: 40rpx;">
@ -146,7 +146,7 @@
},
searchParam: {
keyword: '',
billCode: '',
_date: [],
params: {
waybillStatType: dicData.emis_order_status?.[0]?.val,

View File

@ -17,38 +17,34 @@
</view>
<view class="pgb-cont">
<!-- 列表数据 -->
<!-- -->
<view>
<view v-for="(item) in resData.list" class="blcok-white radius-20 mb-20" style="margin-top: 0;"
>
<view>
<u-row justify="between">
<u-row @click="handleItemClick(item)">
<u-avatar size="90"></u-avatar>
<view class="pl-10">
<u-text :text="'李 晓'" size="30" :bold="true" lines="1"></u-text>
<view class="mt-10">
<u-row>
<uni-rate allow-half :value="3" activeColor="#B12D29" :readonly="true" size="18"></uni-rate>
<view class="pl-10">
<u-text :text="'3分'" size="26" color="#B12D29"></u-text>
</view>
</u-row>
</view>
<view v-for="(item) in resData.list" class="blcok-white radius-20 mb-20" style="margin-top: 0;"
>
<view>
<u-row justify="between">
<u-row @click="handleItemClick(item)">
<u-avatar :src="item.avatar" size="90"></u-avatar>
<view class="pl-10">
<u-text :text="item.empName" size="30" :bold="true" lines="1"></u-text>
<view class="mt-10">
{{item.phone}}
<!-- <u-row>
<uni-rate allow-half :value="3" activeColor="#B12D29" :readonly="true" size="18"></uni-rate>
<view class="pl-10">
<u-text :text="'3分'" size="26" color="#B12D29"></u-text>
</view>
</u-row> -->
</view>
</u-row>
<u-row
>
<u-button @click="handleItemClick(item)" shape="circle" type="primary"
custom-style="height: 54rpx; width:120rpx;margin-left: 12rpx;white-space: nowrap;">去发货</u-button>
</u-row>
</view>
</u-row>
</view>
<u-row
>
<u-button @click="handleItemClick(item)" shape="circle" type="primary"
custom-style="height: 54rpx; width:120rpx;margin-left: 12rpx;white-space: nowrap;">去发货</u-button>
</u-row>
</u-row>
</view>
</view>
</view>
</tpx-scroll-view>
</view>
@ -77,6 +73,7 @@
import { scanCode } from "@/common/untool"
import * as apiService from "@/common/api"
import { getQueryObject } from "@/common/util"
import { pageEventNames } from "@/common/enum"
export default {
props: {
@ -89,7 +86,9 @@
searchParam: {
searchValue: '',
},
queryOption: {},
queryOption: {
type: '', // 'choose' 选择操作
},
resData: { list: [] },
}
},
@ -104,6 +103,7 @@
this.initData();
},
onUnload() {
},
methods: {
getListFun: apiService.getListBindSalesmen,
@ -115,9 +115,13 @@
},
handleItemClick(item){
if(this.queryOption.type == "choose") {
uni.$emit(pageEventNames.chooseEpm, {
queryOption: this.queryOption,
data: item
})
this.goBack()
} else {
this.goto(`post/post?bindUserId=${item.id}`)
this.goto(`post/post?bindEmpCode=${item.empCode}&bindEmpName=${item.empName}`)
}
},
async handleScan() {
@ -126,7 +130,8 @@
await apiService.bindSalesmen(params)
this.showToast('绑定成功')
this.triggerListReload()
}
},
}
}
</script>
@ -148,6 +153,6 @@
position: relative;
}
.pgb-cont{
padding: 30rpx;
padding: 30rpx 30rpx 0 30rpx;
}
</style>