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 = {})=> { 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 = { const pageEventNames = {
globalClick: "globalClick", // 全局页面 click事件 globalClick: "globalClick", // 全局页面 click事件
chooseAddress: "chooseAddress", // 地址选择 chooseAddress: "chooseAddress", // 选择地址
chooseEpm: "chooseEpm", // 选择快递小哥
addressSaveSuccess: "addressSaveSuccess", // 地址保存成功 addressSaveSuccess: "addressSaveSuccess", // 地址保存成功
} }

View File

@ -2,7 +2,7 @@
<u-row justify="between"> <u-row justify="between">
<text class="clr-sub">您的专属快递员</text> <text class="clr-sub">您的专属快递员</text>
<u-row> <u-row>
<text class="">李晓</text> <text class="">{{modelInfo.salesmen}}</text>
<view class="ml-10"> <view class="ml-10">
<u-avatar size="50" :src="''"></u-avatar> <u-avatar size="50" :src="''"></u-avatar>
</view> </view>
@ -12,6 +12,8 @@
<script> <script>
import * as apiService from "@/common/api" import * as apiService from "@/common/api"
import { pageEventNames } from "@/common/enum"
export default { export default {
computed: { computed: {
modelInfo: { modelInfo: {
@ -34,16 +36,31 @@
} }
}, },
created() { created() {
this.initEvent()
}, },
onHide() { onHide() {
}, },
unmounted() { unmounted() {
uni.$off(pageEventNames.chooseEpm, this.chooseEmpEventBack)
}, },
methods: { 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> </script>

View File

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

View File

@ -5,7 +5,7 @@
<view class="customer_nav_bar"> <view class="customer_nav_bar">
<view class="com-jianju" style="width: 490rpx;"> <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>
<view class="com-jianju" style="padding-top: 40rpx;"> <view class="com-jianju" style="padding-top: 40rpx;">
@ -146,7 +146,7 @@
}, },
searchParam: { searchParam: {
keyword: '', billCode: '',
_date: [], _date: [],
params: { params: {
waybillStatType: dicData.emis_order_status?.[0]?.val, waybillStatType: dicData.emis_order_status?.[0]?.val,

View File

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