uu
This commit is contained in:
parent
5ceb922ffb
commit
8be13768ab
@ -69,10 +69,11 @@ export const getCaculteSendSite = (data = {})=> {
|
||||
}
|
||||
|
||||
// 仓库列表
|
||||
export const getListBindSalesmen = (data = {})=> {
|
||||
return coreRequest(url.getListBindSalesmen, data, {}, "GET")
|
||||
export const getLisWarehouse = (data = {})=> {
|
||||
return coreRequest(url.getLisWarehouse, data, {}, "GET")
|
||||
}
|
||||
|
||||
|
||||
// 计算运费
|
||||
export const calcWaybillFee = (data = {})=> {
|
||||
return coreRequest(url.calcWaybillFee, data, {})
|
||||
|
||||
@ -30,11 +30,13 @@ export default {
|
||||
getMonthpayAccountList: `/oms2c/emisMonthpayAccount/listSimple`, // 月结账号列表 -- DONE
|
||||
getCaculteDestSite: `/oms2c/emisDestination/getDestSite`, // 自动计算目的地 -- DONE
|
||||
getCaculteSendSite: `/oms2c/emisDestination/getSendSite`, // 自动计算寄件网点 -- DONE
|
||||
getListBindSalesmen: `/oms2c/emisWaybill/listBindSalesmen`, // 仓库列表 -- DONE
|
||||
getLisWarehouse: `/oms2c/emisWaybill/listWmsWarehouse`, // 仓库列表 -- DONE
|
||||
getListBindSalesmen: `/oms2c/emisWaybill/listBindSalesmen`, // 绑定业务员列表 -- DONE
|
||||
bindSalesmen: `/oms2c/emisWaybill/bindSalesmen`, // 绑定业务员 -- DONE
|
||||
getSendSiteList: `/oms2c/emisSite/listSimple`, // 出发地-网点列表
|
||||
calcWaybillFee: `/oms2c/emisWaybill/calcWaybillFee`, // 计算运费
|
||||
warehouseInList: `/oms2c/emisWarehouseIn/listSimple`, // 下单-进仓单列表
|
||||
getOrderList: `/oms2c/emisWaybill/listSimple`, // 订单列表
|
||||
getOrderList: `/oms2c/emisWaybill/listSimple`, // 订单列表 -- DONE
|
||||
getOrderDetail: `/oms2c/emisWaybill/getWaybillDetail`, // 订单详情
|
||||
scanRecord: `/oms2c/emisTmsScanRecord/scan`, // 扫描- 揽收
|
||||
getRealGetWaybillPrintData: `/oms2c/emisWaybill/realGetPrintList`, // 运单 打印数据
|
||||
|
||||
@ -17,3 +17,13 @@ export const getInfoByApp = (data = {}, option = {})=> {
|
||||
return coreRequest(url.getInfoByApp, data, option, 'GET')
|
||||
}
|
||||
|
||||
|
||||
// 绑定业务员列表
|
||||
export const getListBindSalesmen = (data = {})=> {
|
||||
return coreRequest(url.getListBindSalesmen, data, {}, "GET")
|
||||
}
|
||||
|
||||
// 绑定业务员
|
||||
export const bindSalesmen = (data = {})=> {
|
||||
return coreRequest(url.bindSalesmen, data, {})
|
||||
}
|
||||
@ -179,6 +179,17 @@ const textDecoder = (input)=> {
|
||||
return decodeURIComponent(escape(String.fromCharCode(...[input])));
|
||||
}
|
||||
|
||||
const getQueryObject = (url)=> {
|
||||
var query = url.split('?')[1];
|
||||
var obj = {};
|
||||
|
||||
query = query.split('&');
|
||||
query.forEach(query => {
|
||||
var item = query.split('=');
|
||||
obj[item[0]] = item[1]; // 当然如果有中文/Unicode字符可以在这里用URIencode方法转码一下
|
||||
});
|
||||
return obj;
|
||||
}
|
||||
|
||||
export {
|
||||
getAddressDetail,
|
||||
@ -192,4 +203,5 @@ export {
|
||||
throttle,
|
||||
textEncoder,
|
||||
textDecoder,
|
||||
getQueryObject,
|
||||
}
|
||||
|
||||
@ -1,16 +1,22 @@
|
||||
<template>
|
||||
<u-input :placeholder="placeholder" :fontSize="fontSize" :modelValue="value"
|
||||
:custom-style="`border-radius: 10rpx;padding: 11rpx 20rpx;${customStyle};`"
|
||||
@change="handleInputChange"
|
||||
>
|
||||
<template v-if="iconPos == 'left'" v-slot:prefix>
|
||||
<u-icon @click="handleScan" name="scan" :size="fontSize*1.5"></u-icon>
|
||||
</template>
|
||||
<u-row>
|
||||
<u-input :placeholder="placeholder" :fontSize="fontSize" :modelValue="value"
|
||||
:custom-style="`border-radius: 10rpx;padding: 11rpx 20rpx;${customStyle};`"
|
||||
@change="handleInputChange"
|
||||
>
|
||||
<template v-if="iconPos == 'left'" v-slot:prefix>
|
||||
<u-icon @click="handleScan" name="scan" :size="fontSize*1.5"></u-icon>
|
||||
</template>
|
||||
|
||||
<template v-if="iconPos == 'right'" v-slot:suffix>
|
||||
<u-icon @click="handleScan" name="scan" :size="fontSize*1.5"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
|
||||
<template v-if="iconPos == 'right'" v-slot:suffix>
|
||||
<u-icon @click="handleScan" name="scan" :size="fontSize*1.5"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
<view v-if="showConfirm" @click="handleConfirm" class="ml-10">
|
||||
<u-button custom-style="height: 70rpx;" :plain="true">确认</u-button>
|
||||
</view>
|
||||
</u-row>
|
||||
<tpx-physics-scan @onChange="handleScanChange"></tpx-physics-scan>
|
||||
</template>
|
||||
|
||||
@ -50,6 +56,11 @@
|
||||
return ''
|
||||
}
|
||||
},
|
||||
showConfirm:{
|
||||
default () {
|
||||
return false
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
},
|
||||
@ -77,6 +88,9 @@
|
||||
handleScanChange(val){
|
||||
this.$emit('scanChange', val)
|
||||
this.handleChange(val)
|
||||
},
|
||||
handleConfirm(){
|
||||
this.$emit('confirmClick')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,7 +26,9 @@
|
||||
watch: {
|
||||
searchParam: {
|
||||
handler: function(cval, oval) {
|
||||
this.getDataList(true)
|
||||
if(this.autoReload) {
|
||||
this.getDataList(true)
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
@ -41,6 +43,11 @@
|
||||
}
|
||||
},
|
||||
props: {
|
||||
autoReload: {
|
||||
default () {
|
||||
return true
|
||||
}
|
||||
},
|
||||
searchParam: {
|
||||
default () {
|
||||
return {}
|
||||
|
||||
@ -45,12 +45,12 @@
|
||||
|
||||
<view v-if="submitParam.pickupMethod == 1 || submitParam.pickupMethod == 3" class="yunf-input-item">
|
||||
<tpx-select v-model:value="submitParam.intoWarehouseCode" v-model:text="submitParam.intoWarehouseName" v-model:resObject="wareRes"
|
||||
:getListFun="getListBindSalesmen" :transKeyVal="{valKey: 'lineCode',titleKey: 'lineName'}"
|
||||
:getListFun="getLisWarehouse" :transKeyVal="{valKey: 'code',titleKey: 'name'}"
|
||||
:searchParam="wareSearchParam" placeholder="请选择仓库"
|
||||
>
|
||||
<tpx-text-item label="仓库" :value="submitParam.intoWarehouseName"></tpx-text-item>
|
||||
</tpx-select>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view @click="handleDialogClick(revtimeModal)" class="yunf-input-item">
|
||||
<u-row justify="between">
|
||||
@ -229,7 +229,7 @@
|
||||
},
|
||||
methods: {
|
||||
getTransLineList: apiService.getTransLineList,
|
||||
getListBindSalesmen: apiService.getListBindSalesmen,
|
||||
getLisWarehouse: apiService.getLisWarehouse,
|
||||
getMonthpayAccountList: apiService.getMonthpayAccountList,
|
||||
getDefaultData() { // data的默认数据
|
||||
return {
|
||||
|
||||
@ -5,15 +5,15 @@
|
||||
<view class="customer_nav_bar">
|
||||
<view class="com-jianju" style="width: 490rpx;">
|
||||
<!-- 关键字搜索框 -->
|
||||
<tpx-search placeholder="请输入运单号/订单号" v-model:value="searchParam.keyword" @change="handleSearchParamChange()" bgColor="#FFF" :timelyTrigger="false"></tpx-search>
|
||||
<tpx-search placeholder="请输入运单号/订单号" v-model:value="searchParam.keyword" @change="handleSearch" bgColor="#FFF" :timelyTrigger="false"></tpx-search>
|
||||
</view>
|
||||
|
||||
<view class="com-jianju" style="padding-top: 40rpx;">
|
||||
<u-row justify="between" align="top">
|
||||
<u-col span="9">
|
||||
<!-- 订单状态 -->
|
||||
<tpx-tabs :list="dicData.emis_order_status" v-model:value="searchParam.ordStatus"
|
||||
@tabchange="(val)=> { handleSearchParamChange() }" mode="info" v-slot="curOrdTab"
|
||||
<tpx-tabs :list="dicData.emis_order_status" v-model:value="searchParam.params.waybillStatType"
|
||||
mode="info" v-slot="curOrdTab"
|
||||
>
|
||||
<text slot>
|
||||
(<text>{{curOrdTab.item.val}}</text>)
|
||||
@ -22,7 +22,7 @@
|
||||
</u-col>
|
||||
<u-col span="2">
|
||||
<!-- 更多查询条件 -->
|
||||
<u-button @click="handleSearchMoreBtn()" :hairline="false" shape="circle" size="mini" custom-style="border-radius: 23rpx;font-size: 26rpx;height: 50rpx;">
|
||||
<u-button :hairline="false" shape="circle" size="mini" custom-style="border-radius: 23rpx;font-size: 26rpx;height: 50rpx;">
|
||||
<u-row justify="center">
|
||||
<view :style="'padding-right: 4rpx;white-space: nowrap;' + (hasExtSchParam?'color: #B12D29;':'color: #666;')">
|
||||
{{hasExtSchParam?'已':''}}筛选
|
||||
@ -147,28 +147,42 @@
|
||||
},
|
||||
searchParam: {
|
||||
keyword: '',
|
||||
ordStatus: dicData.emis_order_status?.[0]?.val
|
||||
_date: [],
|
||||
params: {
|
||||
waybillStatType: dicData.emis_order_status?.[0]?.val,
|
||||
}
|
||||
},
|
||||
queryOption: {
|
||||
|
||||
},
|
||||
resData: {
|
||||
list: []
|
||||
}
|
||||
resData: { list: [] }
|
||||
}
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
onShow(){
|
||||
this.triggerListReload()
|
||||
this.initData()
|
||||
},
|
||||
onLoad(option) {
|
||||
this.queryOption = option
|
||||
this.initData();
|
||||
},
|
||||
onUnload() {
|
||||
},
|
||||
methods: {
|
||||
getListFun: apiService.getOrderList,
|
||||
transSearchPm(param){
|
||||
let cpParam = JSON.parse(JSON.stringify(param))
|
||||
cpParam.params.beginDate = cpParam?._date?.[0]
|
||||
cpParam.params.endDate = cpParam?._date?.[1]
|
||||
return cpParam
|
||||
},
|
||||
async getListFun(param){
|
||||
let cpParam = this.transSearchPm(param)
|
||||
let res = await apiService.getOrderList(cpParam)
|
||||
return res
|
||||
},
|
||||
initData(){
|
||||
|
||||
},
|
||||
@ -191,9 +205,14 @@
|
||||
break;
|
||||
}
|
||||
},
|
||||
handleSearchParamChange() {
|
||||
|
||||
}
|
||||
handleSearch(){
|
||||
setTimeout(()=> {
|
||||
this.triggerListReload()
|
||||
}, 300)
|
||||
},
|
||||
triggerListReload(){
|
||||
this?.$refs?.listRef?.getDataList?.(true) // 重置到第一页数据
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,92 +1,85 @@
|
||||
<template>
|
||||
<tpx-layout>
|
||||
<template v-slot:header>
|
||||
</template>
|
||||
|
||||
<template v-slot:body>
|
||||
<scroll-view :scroll-y="true" @scrolltolower="onScrollBottom()" class="pos-abt-all"
|
||||
>
|
||||
<view class="pgb-header">
|
||||
<view class="com-jianju">
|
||||
<!-- 关键字搜索框 -->
|
||||
<tpx-search placeholder="请输入工号或手机号码" v-model:value="searchParam.keyword" @change="handleSearchParamChange()" ></tpx-search>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="pgb-cont">
|
||||
<!-- 列表数据 -->
|
||||
<!-- -->
|
||||
<view>
|
||||
<view v-for="(item) in dataList" 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>
|
||||
</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>
|
||||
</u-row>
|
||||
<tpx-page>
|
||||
<tpx-layout>
|
||||
<template v-slot:header>
|
||||
</template>
|
||||
|
||||
<template v-slot:body>
|
||||
<view class="pos-abt-all">
|
||||
<tpx-scroll-view v-model:resObject="resData" :searchParam="searchParam" :getListFun="getListFun"
|
||||
ref="listRef"
|
||||
>
|
||||
<view class="pgb-header">
|
||||
<view class="com-jianju">
|
||||
<!-- 关键字搜索框 -->
|
||||
<tpx-search placeholder="请输入工号或手机号码" v-model:value="searchParam.searchValue"></tpx-search>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 加载更多 -->
|
||||
<u-loadmore icon-size="28" font-size="28" margin-top="30" v-if="showLoadMore || loadedAll"
|
||||
:status="loadedAll ? 'nomore' : 'loading'" />
|
||||
|
||||
<!-- 空数据页 -->
|
||||
<view v-if="dataList.length == 0" style="padding-top: 100rpx;">
|
||||
<u-empty text="无数据" :icon="getCdnUrl('kong.png')" textSize="28" width="86" height="97">
|
||||
</u-empty>
|
||||
</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>
|
||||
</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>
|
||||
</u-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</tpx-scroll-view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
<template v-slot:footer>
|
||||
<view class="blcok-white-noradius" @click="handleScan">
|
||||
<u-row justify="between">
|
||||
<view>
|
||||
<u-text :text="'扫码绑定'" size="30" :bold="true" lines="1"></u-text>
|
||||
<u-text margin="10rpx 0 0 0" :text="'扫描快递小哥二维码'" size="28" color="#999"></u-text>
|
||||
<u-text margin="10rpx 0 0 0" :text="'即可享受快递寄件、专属送快递服务'" size="28" color="#999"></u-text>
|
||||
</view>
|
||||
<view>
|
||||
<u-icon name="scan" size="88" color="#B12D29"></u-icon>
|
||||
</view>
|
||||
</u-row>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
</tpx-layout>
|
||||
|
||||
</template>
|
||||
|
||||
<template v-slot:footer>
|
||||
<view class="blcok-white-noradius" @click="handleScan">
|
||||
<u-row justify="between">
|
||||
<view>
|
||||
<u-text :text="'扫码绑定'" size="30" :bold="true" lines="1"></u-text>
|
||||
<u-text margin="10rpx 0 0 0" :text="'扫描快递小哥二维码'" size="28" color="#999"></u-text>
|
||||
<u-text margin="10rpx 0 0 0" :text="'即可享受快递寄件、专属送快递服务'" size="28" color="#999"></u-text>
|
||||
</view>
|
||||
<view>
|
||||
<u-icon name="scan" size="88" color="#B12D29"></u-icon>
|
||||
</view>
|
||||
</u-row>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
</tpx-layout>
|
||||
</tpx-page>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import getCdnUrl from "@/common/getCdnUrl"
|
||||
import { goto, goBack, scanCode, setClipboardData, confirmModal, showLoading } from "@/common/untool"
|
||||
import { scanCode } from "@/common/untool"
|
||||
import * as apiService from "@/common/api"
|
||||
import { getQueryObject } from "@/common/util"
|
||||
|
||||
export default {
|
||||
props: {
|
||||
// hasLeftWin: {
|
||||
// type: Boolean
|
||||
// }
|
||||
},
|
||||
computed: {
|
||||
|
||||
@ -94,14 +87,10 @@
|
||||
data() {
|
||||
return {
|
||||
searchParam: {
|
||||
keyword: '',
|
||||
searchValue: '',
|
||||
},
|
||||
queryOption: {},
|
||||
dataList: [
|
||||
{},{},{},{},{},{},{},{}
|
||||
],
|
||||
showLoadMore: false,
|
||||
loadedAll: false
|
||||
resData: { list: [] },
|
||||
}
|
||||
},
|
||||
onShareAppMessage() {
|
||||
@ -112,54 +101,31 @@
|
||||
},
|
||||
onLoad(queryOption) {
|
||||
this.queryOption = queryOption
|
||||
this.searchParam.tabType = queryOption.tab || tabList[0].val
|
||||
this.initData();
|
||||
},
|
||||
onUnload() {
|
||||
},
|
||||
methods: {
|
||||
goto,
|
||||
setClipboardData,
|
||||
getCdnUrl,
|
||||
getListFun: apiService.getListBindSalesmen,
|
||||
initData(){
|
||||
// showLoading()
|
||||
setTimeout(() => {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 300);
|
||||
},
|
||||
setListData() {
|
||||
|
||||
},
|
||||
|
||||
onScrollBottom() {
|
||||
console.log("onScrollBottom");
|
||||
if (this.loadedAll) {
|
||||
return;
|
||||
}
|
||||
this.showLoadMore = true;
|
||||
setTimeout(() => {
|
||||
this.setListData();
|
||||
}, 300);
|
||||
},
|
||||
handleSearchMoreBtn(){
|
||||
if(!this.showLoadMore) {
|
||||
// 回显更多条件
|
||||
Object.keys(this.tmpSearchParam).map(t=> {
|
||||
this.tmpSearchParam[t] = this.searchParam[t] || ''
|
||||
})
|
||||
}
|
||||
this.showSearchMore = !this.showSearchMore
|
||||
triggerListReload(){
|
||||
this?.$refs?.listRef?.getDataList?.(true) // 重置到第一页数据
|
||||
},
|
||||
handleItemClick(item){
|
||||
if(this.queryOption.type == "choose") {
|
||||
goBack()
|
||||
this.goBack()
|
||||
} else {
|
||||
goto(`post/post?bindUserId=${item.id}`)
|
||||
this.goto(`post/post?bindUserId=${item.id}`)
|
||||
}
|
||||
},
|
||||
async handleScan() {
|
||||
const res = await scanCode()
|
||||
debugger
|
||||
const resData = await scanCode()
|
||||
let params = getQueryObject(resData)
|
||||
await apiService.bindSalesmen(params)
|
||||
this.showToast('绑定成功')
|
||||
this.triggerListReload()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user