This commit is contained in:
aihe 2024-05-07 00:38:24 +08:00
parent fd62d4ca1e
commit c53a2d5e74
9 changed files with 345 additions and 358 deletions

View File

@ -65,5 +65,14 @@ export const warehouseInList = (data = {})=> {
return coreRequest(url.warehouseInList, data, {}, "GET")
}
// 订单列表
export const getOrderList = (data = {})=> {
return coreRequest(url.getOrderList, data, {}, "GET")
}
// 订单详情
export const getOrderDetail = (data = {})=> {
return coreRequest(url.getOrderDetail, data, {}, "GET")
}

View File

@ -28,9 +28,12 @@ export default {
getMonthpayAccountList: `/emis/emisMonthpayAccount/listSimple`, // 月结账号列表
getDestPositionList: `/emis/emisDestination/listSimple`, // 目的地 列表
getCaculteDestSite: `/emis/emisDestination/getDestSite`, // 自动计算目的地
calcWaybillFee: `/emis/emisQuotePrice/calcWaybillFee`, // 计算运费
calcWaybillFee: `/emis/emisWaybill/calcWaybillFee`, // 计算运费
calcSetteldWeight: `/emis/emisWaybill/calcSetteldWeight`, // 计算结算重量、结算体积
warehouseInList: `/emis/emisWarehouseIn/listSimple`, // 下单-进仓单列表
getOrderList: `/emis/emisWaybill/listSimple`, // 订单列表
getOrderDetail: `/emis/emisWaybill/getWaybillDetail`, // 订单详情
}

View File

@ -43,6 +43,18 @@
</u-button>
</u-row>
</tpx-select>
<view class="pt-20">
<u-row custom-style="flex: 1">
<text class="font-26 pr-10">总费用</text>
<tpx-input v-model:value="modelInfo.freight" :isWhite="true" type="number"
custom-style="width: 120rpx;height: 46rpx;" suffix="CNY"></tpx-input>
</u-row>
</view>
<view class="pt-20">
<u-textarea v-model="modelInfo.feeRemaker" border="surround" height="120" placeholder="费用备注"
maxlength="50" count></u-textarea>
</view>
</view>
</template>
@ -105,8 +117,10 @@
this.calcWaybillFee({ calcFeeType: val })
},
async calcWaybillFee(params = {}) {
let res = await apiService.calcWaybillFee({ ...this.searchParam, ...params })
this.modelInfo.feeItems = res.data.feeItems
let res = await apiService.calcWaybillFee({ custNo: this.modelInfo.custNo, ...this.searchParam, ...params })
this.modelInfo.feeItems = res.data.feeList
this.modelInfo.freight = res.data.totalFee
}
}
}

View File

@ -1,4 +1,5 @@
<template>
<tpx-page>
<tpx-layout>
<template v-slot:body>
<view class="com-jianju pos-rlt pb-30" style="padding-top: 2rpx;">
@ -77,6 +78,7 @@
</template>
</tpx-layout>
<buns-address-sheet v-model:show="addressModal.show" v-model:value="addressModal.values" @onSure="handleAddressChoose"></buns-address-sheet>
</tpx-page>
</template>
<script>

View File

@ -1,4 +1,5 @@
<template>
<tpx-page>
<tpx-layout>
<template v-slot:header> </template>
<template v-slot:body>
@ -76,7 +77,7 @@
</view>
</template>
</tpx-layout>
</tpx-page>
</template>
<script>
@ -113,9 +114,7 @@
},
resData: {
list: []
},
showLoadMore: false,
loadedAll: false
}
}
},
onShareAppMessage() {

View File

@ -61,7 +61,6 @@ export const getOrderModels = () => {
"currency": undefined,
"settlementWeight": undefined, // 结算重量
"feeWeight": undefined,
"freight": undefined,
"blOverLong": undefined,
"blOverWeight": undefined,
"overWeightNumber": undefined,
@ -132,7 +131,6 @@ export const getOrderModels = () => {
"prepareInRemark": undefined, // 预入仓自定义标识
"prepareInSupplier": undefined, // 预入仓供应商
"warehouseInNo": [], // 进仓单号
"meterRate": undefined, // 泡重比
"goodsPics": [], // 货物图片
}
}

View File

@ -1,6 +1,6 @@
<template>
<tpx-page>
<tpx-layout>
<tpx-layout v-if="!pageLoading">
<template v-slot:body>
<view class="com-jianju pos-rlt pb-30" style="padding-top: 2rpx;">
<view class="blcok-white">
@ -23,12 +23,13 @@
</u-row>
</view>
<view class="com-section mt-30" @click="goto('post/detail')">
<view v-if="queryOption.orderSn" class="com-section mt-30" @click="goto('post/detail')">
<u-row justify="space-between">
<text>订单号:TWO291929</text>
<u-icon name="bag" size="42"></u-icon>
</u-row>
</view>
<view class="blcok-white">
<!-- 地址选择 -->
<bpe-addressinfo-tmp v-model:value="submitParam"></bpe-addressinfo-tmp>
@ -99,11 +100,6 @@
>
<tpx-text-item label="付款方式" :value="submitParam.paymentType" :list="dicData.emis_payment_type"></tpx-text-item>
</tpx-select>
<view v-if="submitParam.paymentType == 6" class="pt-10">
<u-textarea v-model="submitParam.feeRemaker" border="surround" height="120" placeholder="备注"
maxlength="50" count></u-textarea>
</view>
</view>
<view v-if="submitParam.paymentType == 2 || submitParam.paymentType == 4 || submitParam.paymentType == 5" class="yunf-input-item">
@ -278,7 +274,6 @@
let param = {
productType: info.productType,
customerCode: info.customerCode,
custNo: info.custNo,
calcFeeType: info.calcFeeType,
settlementWeight: info.settlementWeight,
totalVolume: info.totalVolume,
@ -294,8 +289,11 @@
},
data() {
return {
pageLoading: true,
isEdit: false,
queryOption: {
id: '', // 运单id
billCode: '', // 运单id
orderSn: '', // 订单id
},
kehuRes: { list: [] },
wayRes: { list: [] },
@ -321,7 +319,7 @@
}
},
onLoad(option) {
this.queryOption = queryOption
this.queryOption = option
this.initData();
this.initEvent()
},
@ -337,8 +335,15 @@
getMonthpayAccountList: apiService.getMonthpayAccountList,
getDestPositionList: apiService.getDestPositionList,
getWarehouseInList: apiService.warehouseInList,
async initData() {
this.isEdit = Boolean(this.queryOption.billCode || this.queryOption.orderSn)
if(this.isEdit) {
let res = await apiService.getOrderDetail({...this.queryOption, _loading: true})
let data = res.data || {}
data.warehouseInNo = (data.warehouseInNo && data.warehouseInNo.split) || []
this.submitParam = res.data
}
this.pageLoading = false
},
initEvent() {
@ -357,7 +362,6 @@
},
handleWayChange(val) {
const item = this.wayRes.list.filter(t=> t.val == val)[0]
this.submitParam.meterRate = item.meterRate
this.updateDltDestSite({ lineCode: val })
},
handleDestPostChange(val) {
@ -372,8 +376,10 @@
const { country, province, city, county, address } = this.submitParam.reciever
let res = await apiService.getCaculteDestSite({ lineCode, country, province, city, county, address })
// 更新路线推荐的默认目的地
this.submitParam.destinationCode = res.data.destCode
this.handleDestPostChange(this.submitParam.destinationCode)
let data = res.data || {}
this.submitParam.destinationCode = data.destCode
this.submitParam.dispatchUnderlingSiteCode = data.siteCode;
this.submitParam.dispatchUnderlingSite = data.siteName;
},
async handleGoodInfoSure() {
// 校验各个组件的参数
@ -381,7 +387,7 @@
},
async handleSave(type) {
let saveServerHand = apiService.submitOrder
if(this.queryOption.id) {
if(this.isEdit) {
// 编辑订单 TODO
}
let params = JSON.parse(JSON.stringify(this.submitParam));

View File

@ -15,7 +15,7 @@
<u-avatar size="120" :src="userInfo.avatar"></u-avatar>
<view class="pl-30">
<u-row>
<u-text :text="userInfo.nickName" color="#fff" size="32" bold="true"></u-text>
<u-text :text="userInfo.empName" color="#fff" size="32" bold="true"></u-text>
<view class="ml-20 clr-wht font-24 pos-rlt" style="padding: 8rpx 12rpx;">南京网点
<view class="pos-abt-all" style="z-index: 0;background: #FFFFFF;opacity: 0.2;border-radius: 20rpx;"></view>
</view>

View File

@ -1,7 +1,7 @@
<template>
<tpx-page>
<tpx-layout>
<template v-slot:header>
<view class="pt-30">
<view class="com-jianju" style="padding: 30rpx;background-color:#B12D29;border-radius: 30rpx;">
<u-row justify="between">
@ -9,9 +9,9 @@
<tpx-select mode="drop" v-model:value="searchParam.keyword" :list="dateRangeList" >
<view style="width: 200rpx;;">
<u-button @click="handleSearchMoreBtn()" :hairline="false" shape="circle" size="mini" custom-style="border-radius: 23rpx;font-size: 26rpx;height: 50rpx;width: 130rpx;">
<u-button :hairline="false" shape="circle" size="mini" custom-style="border-radius: 23rpx;font-size: 26rpx;height: 50rpx;width: 130rpx;">
<u-row justify="between" custom-style="width: 100%;">
<view :style="'padding-right: 4rpx;white-space: nowrap;' + (hasExtSchParam?'color: #B12D29;':'color: #666;')">
<view :style="'padding-right: 4rpx;white-space: nowrap;' + 'color: #666;'">
统计
</view>
<u-icon :name="showSearchMore?'arrow-up-fill':'arrow-down-fill'"
@ -65,16 +65,19 @@
</view>
</template>
<template v-slot:body>
<scroll-view :scroll-y="true" @scrolltolower="onScrollBottom()" class="pos-abt-all"
<view class="pos-abt-all">
<tpx-scroll-view v-model:resObject="resData" :searchParam="searchParam" :getListFun="getListFun"
ref="listRef"
>
<view class="pgb-cont">
<!-- 列表数据 -->
<view v-for="(orItem) in ordList" class="ord-list-item">
<view v-for="(orItem) in resData.list" class="ord-list-item">
<u-row justify="between">
<u-col span="11">
<u-row @click="handleDealItem(orItem, { type: 2 })">
<view>
<u-text :text="'运单号:'+ 'T7080304038'" size="26"></u-text>
<u-text v-if="orItem.billCode" :text="'运单号:' + orItem.billCode" size="26"></u-text>
<u-text v-else :text="'订单号:'+ orItem.orderSn" size="26"></u-text>
</view>
<view class="pl-10">
<u-icon name="file-text" size="32" custom-style=""></u-icon>
@ -112,32 +115,24 @@
<u-row>
<u-button @click="handleDealItem(orItem, { type: 4 })" shape="circle" type="primary"
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">取消</u-button>
<u-button shape="circle" type="primary" :plain="true"
<u-button @click="handleDealItem(orItem, { type: 5 })" shape="circle" type="primary" :plain="true"
custom-style="height: 54rpx;margin-left: 12rpx;">立即开单</u-button>
</u-row>
</view>
</u-row>
</view>
<!-- 加载更多 -->
<u-loadmore icon-size="28" font-size="28" margin-top="30" v-if="showLoadMore || loadedAll"
:status="loadedAll ? 'nomore' : 'loading'" />
<!-- 空数据页 -->
<view v-if="ordList.length == 0" style="padding-top: 100rpx;">
<u-empty text="无数据" :icon="getCdnUrl('kong.png')" textSize="28" width="86" height="97">
</u-empty>
</view>
</view>
</scroll-view>
</tpx-scroll-view>
</view>
</template>
</tpx-layout>
</tpx-page>
</template>
<script>
import { ordStaEnum, dateRangeList, ordStatusList, payTypeEnum, payTypeList, dlvTypeEnum, dlvTypeList, dateTypeEnum, dateTypeList } from "@/common/enum"
import { dateRangeList, ordStatusList } from "@/common/enum"
import * as apiService from "@/common/api"
export default {
props: {
@ -146,32 +141,20 @@
// }
},
computed: {
hasExtSchParam() {
let hasExt = false
const searchParam = this.searchParam
if(
(searchParam.postStatus && searchParam.postStatus.length > 0)
|| (searchParam.payType && searchParam.payType.length > 0)
|| (searchParam.date || (searchParam.dateType && searchParam.dateType != dateTypeEnum.custom) )
) {
hasExt = true
}
return hasExt
},
},
data() {
return {
...JSON.parse(JSON.stringify({ ordStaEnum, dateRangeList, ordStatusList, payTypeEnum, payTypeList, dlvTypeEnum, dlvTypeList, dateTypeEnum, dateTypeList })),
...JSON.parse(JSON.stringify({ dateRangeList, ordStatusList })),
searchParam: {
keyword: '',
ordStatus: ordStatusList[0].val // 订单状态, 1:寄件; 2:收件; 3:待付款;
searchValue: ''
},
ordList: [
{}
// ,{},{},{},{},{},{},{}
],
showLoadMore: false,
loadedAll: false
queryOption: {
},
resData: {
list: []
}
}
},
onShareAppMessage() {
@ -181,45 +164,15 @@
}
},
onLoad() {
this.queryOption = queryOption
this.initData();
},
onUnload() {
},
methods: {
getListFun: apiService.getOrderList,
initData(){
// this.showLoading()
setTimeout(() => {
uni.stopPullDownRefresh();
}, 300);
},
loadListData() {
// 请求列表数据 TODO
console.log('====this.searchParam===', this.searchParam)
},
onScrollBottom() {
console.log("onScrollBottom");
if (this.loadedAll) {
return;
}
this.showLoadMore = true;
this.handleSearchParamChange();
},
handleSearchMoreBtn(){
if(!this.showLoadMore) {
// 回显更多条件
Object.keys(this.tmpSearchParam).map(t=> {
const val = this.searchParam[t]
typeof val != 'undefined' && (this.tmpSearchParam[t] = val)
})
}
this.showSearchMore = !this.showSearchMore
},
handleSearchParamChange(key, val) {
if(key) {
this.searchParam[key] = val
}
this.loadListData()
},
async handleDealItem(item, deal = { type: '1' }) {
switch (deal.type){
@ -227,7 +180,7 @@
this.goto(`post/detail?id=${item.id || ''}`)
break;
case 2: // 复制订单号
this.setClipboardData('xxxxxxx')
this.setClipboardData(item.billCode || item.orderSn)
break;
case 3: // 删除
await this.confirmModal('确认要删除吗?')
@ -235,6 +188,9 @@
case 4: // 取消
await this.confirmModal('确认要取消吗?')
break;
case 5: // 理解开单
this.goto(`post/openorder?billCode=${item.billCode || ''}&orderSn=${item.orderSn || ''}`)
break;
default:
break;
}