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") 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`, // 月结账号列表 getMonthpayAccountList: `/emis/emisMonthpayAccount/listSimple`, // 月结账号列表
getDestPositionList: `/emis/emisDestination/listSimple`, // 目的地 列表 getDestPositionList: `/emis/emisDestination/listSimple`, // 目的地 列表
getCaculteDestSite: `/emis/emisDestination/getDestSite`, // 自动计算目的地 getCaculteDestSite: `/emis/emisDestination/getDestSite`, // 自动计算目的地
calcWaybillFee: `/emis/emisQuotePrice/calcWaybillFee`, // 计算运费 calcWaybillFee: `/emis/emisWaybill/calcWaybillFee`, // 计算运费
calcSetteldWeight: `/emis/emisWaybill/calcSetteldWeight`, // 计算结算重量、结算体积 calcSetteldWeight: `/emis/emisWaybill/calcSetteldWeight`, // 计算结算重量、结算体积
warehouseInList: `/emis/emisWarehouseIn/listSimple`, // 下单-进仓单列表 warehouseInList: `/emis/emisWarehouseIn/listSimple`, // 下单-进仓单列表
getOrderList: `/emis/emisWaybill/listSimple`, // 订单列表
getOrderDetail: `/emis/emisWaybill/getWaybillDetail`, // 订单详情
} }

View File

@ -43,6 +43,18 @@
</u-button> </u-button>
</u-row> </u-row>
</tpx-select> </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> </view>
</template> </template>
@ -105,8 +117,10 @@
this.calcWaybillFee({ calcFeeType: val }) this.calcWaybillFee({ calcFeeType: val })
}, },
async calcWaybillFee(params = {}) { async calcWaybillFee(params = {}) {
let res = await apiService.calcWaybillFee({ ...this.searchParam, ...params }) let res = await apiService.calcWaybillFee({ custNo: this.modelInfo.custNo, ...this.searchParam, ...params })
this.modelInfo.feeItems = res.data.feeItems this.modelInfo.feeItems = res.data.feeList
this.modelInfo.freight = res.data.totalFee
} }
} }
} }

View File

@ -1,82 +1,84 @@
<template> <template>
<tpx-layout> <tpx-page>
<template v-slot:body> <tpx-layout>
<view class="com-jianju pos-rlt pb-30" style="padding-top: 2rpx;"> <template v-slot:body>
<view class="blcok-white radius-20"> <view class="com-jianju pos-rlt pb-30" style="padding-top: 2rpx;">
<u-textarea v-model="ansValue" border="none" height="110" placeholder="粘贴或输入地址,点击“智能识别”自动拆分姓名、电话和地址" custom-style="border:0;padding: 0;"></u-textarea> <view class="blcok-white radius-20">
<u-row justify="end"> <u-textarea v-model="ansValue" border="none" height="110" placeholder="粘贴或输入地址,点击“智能识别”自动拆分姓名、电话和地址" custom-style="border:0;padding: 0;"></u-textarea>
<view class="mt-10"> <u-row justify="end">
<u-button @click="handleAnsText()" type="primary" size="mini" shape="circle" custom-style="width: 130rpx;font-size: 24rpx;padding:0;">智能识别</u-button> <view class="mt-10">
</view> <u-button @click="handleAnsText()" type="primary" size="mini" shape="circle" custom-style="width: 130rpx;font-size: 24rpx;padding:0;">智能识别</u-button>
</u-row> </view>
</view> </u-row>
</view>
<view class="blcok-white radius-20"> <view class="blcok-white radius-20">
<view class=""> <view class="">
<view style="margin-top: 10rpx;"> <view style="margin-top: 10rpx;">
<u-row> <u-row>
<u-col span="4"> <u-col span="4">
<tpx-input v-model:value="submitParam.name" placeholder="真实姓名"></tpx-input> <tpx-input v-model:value="submitParam.name" placeholder="真实姓名"></tpx-input>
</u-col> </u-col>
<u-col offset="1" span="7"> <u-col offset="1" span="7">
<tpx-input v-model:value="submitParam.phone" placeholder="电话"></tpx-input> <tpx-input v-model:value="submitParam.phone" placeholder="电话"></tpx-input>
</u-col> </u-col>
</u-row> </u-row>
</view> </view>
<view class="mt-40 pos-rlt"> <view class="mt-40 pos-rlt">
<tpx-input :value="getAddressDetail(submitParam, false)" placeholder="所在地区"></tpx-input> <tpx-input :value="getAddressDetail(submitParam, false)" placeholder="所在地区"></tpx-input>
<view @click="handleDialogClick(addressModal)" class="pos-abt-all"></view> <view @click="handleDialogClick(addressModal)" class="pos-abt-all"></view>
</view> </view>
<view class="mt-30"> <view class="mt-30">
<tpx-textarea v-model:value="submitParam.address" placeholder="详细地址(例如**街道**号**)"></tpx-textarea> <tpx-textarea v-model:value="submitParam.address" placeholder="详细地址(例如**街道**号**)"></tpx-textarea>
</view> </view>
<view class="mt-30"> <view class="mt-30">
<tpx-input v-model:value="submitParam.postCode" placeholder="邮编"></tpx-input> <tpx-input v-model:value="submitParam.postCode" placeholder="邮编"></tpx-input>
</view> </view>
<view class="mt-30"> <view class="mt-30">
<tpx-input v-model:value="submitParam.email" placeholder="邮箱(选填"></tpx-input> <tpx-input v-model:value="submitParam.email" placeholder="邮箱(选填"></tpx-input>
</view> </view>
<view class="mt-30"> <view class="mt-30">
<tpx-input v-model:value="submitParam.company" placeholder="公司名称(选填)"></tpx-input> <tpx-input v-model:value="submitParam.company" placeholder="公司名称(选填)"></tpx-input>
</view>
</view> </view>
</view> </view>
</view>
<view class="mt-30 pl-30 pr-30"> <view class="mt-30 pl-30 pr-30">
<u-row justify="between"> <u-row justify="between">
<view> <view>
<u-checkbox-group v-model="submitParam.blDefaultFlag" placement="column"> <u-checkbox-group v-model="submitParam.blDefaultFlag" placement="column">
<u-checkbox <u-checkbox
:name="true" :name="true"
shape="circle" shape="circle"
size="30" label="默认地址" active-color="#B12D29" size="30" label="默认地址" active-color="#B12D29"
label-size="28" label-size="28"
> >
</u-checkbox> </u-checkbox>
</u-checkbox-group> </u-checkbox-group>
</view> </view>
<view @click="handleReset"> <view @click="handleReset">
<u-text text="清空" size="28" color="#0E0708"></u-text> <u-text text="清空" size="28" color="#0E0708"></u-text>
</view> </view>
</u-row> </u-row>
</view>
</view> </view>
</view> </template>
</template> <template v-slot:footer>
<template v-slot:footer> <view class="blcok-white-noradius">
<view class="blcok-white-noradius"> <u-button @click="handleSubmit()" type="primary" size="large" shape="circle"
<u-button @click="handleSubmit()" type="primary" size="large" shape="circle" custom-style="height:80rpx;font-size: 30rpx;"
custom-style="height:80rpx;font-size: 30rpx;" >确定</u-button>
>确定</u-button> </view>
</view> </template>
</template> </tpx-layout>
</tpx-layout> <buns-address-sheet v-model:show="addressModal.show" v-model:value="addressModal.values" @onSure="handleAddressChoose"></buns-address-sheet>
<buns-address-sheet v-model:show="addressModal.show" v-model:value="addressModal.values" @onSure="handleAddressChoose"></buns-address-sheet> </tpx-page>
</template> </template>
<script> <script>

View File

@ -1,82 +1,83 @@
<template> <template>
<tpx-layout> <tpx-page>
<template v-slot:header> </template> <tpx-layout>
<template v-slot:body> <template v-slot:header> </template>
<view class="pos-abt-all"> <template v-slot:body>
<tpx-scroll-view v-model:resObject="resData" :searchParam="searchParam" :getListFun="getListFun" <view class="pos-abt-all">
ref="listRef" <tpx-scroll-view v-model:resObject="resData" :searchParam="searchParam" :getListFun="getListFun"
> ref="listRef"
<view class="pgb-header"> >
<view class="com-jianju"> <view class="pgb-header">
<!-- 关键字搜索框 --> <view class="com-jianju">
<tpx-search placeholder="请输入姓名/电话/地址关键字" v-model:value="searchParam.searchValue"></tpx-search> <!-- 关键字搜索框 -->
</view> <tpx-search placeholder="请输入姓名/电话/地址关键字" v-model:value="searchParam.searchValue"></tpx-search>
<view class="com-jianju" style="padding-top: 40rpx;">
<u-row justify="between" align="top">
<u-col span="12">
<tpx-tabs :list="tabList" v-model:value="searchParam.addressType"
v-slot="curTab"
>
<text slot>
(<text>{{curTab.item.val}}</text>)
</text>
</tpx-tabs>
</u-col>
</u-row>
</view>
</view>
<view class="pgb-cont">
<!-- 列表数据 -->
<view v-for="(item) in resData.list" class="data-list-item">
<view @click="handleItemClick(item)">
<u-row>
<view class="pr-20">
<u-text :text="item.name" size="30" :bold="true"></u-text>
</view>
<view>
<u-text :text="item.phone" size="28" mode="phone" color="#999"></u-text>
</view>
</u-row>
<u-text :text="getAddressDetail(item)"
size="24" margin="20rpx 0 0 0" color="#999"
></u-text>
</view> </view>
<u-line color="#DEDEDE" margin="30rpx 0 0 0"></u-line>
<u-row custom-style="margin-top:20rpx;" justify="between"> <view class="com-jianju" style="padding-top: 40rpx;">
<u-row> <u-row justify="between" align="top">
<text class="pr-20 clr-sub">默认地址</text> <u-col span="12">
<u-switch v-model="item.blDefaultFlag" @change="handleDefaultSwitch(item)" activeValue="1" active-color="#B12D29" size="34"></u-switch> <tpx-tabs :list="tabList" v-model:value="searchParam.addressType"
v-slot="curTab"
>
<text slot>
(<text>{{curTab.item.val}}</text>)
</text>
</tpx-tabs>
</u-col>
</u-row> </u-row>
<u-row> </view>
<u-text @click="handleEditItem(item)" text="编辑" prefixIcon="edit-pen" size="26"></u-text>
<u-text @click="handleDelItem(item)" text="删除" prefixIcon="trash" size="26" margin="0 0 0 20rpx"></u-text>
</u-row>
</u-row>
</view> </view>
</view> <view class="pgb-cont">
</tpx-scroll-view> <!-- 列表数据 -->
</view> <view v-for="(item) in resData.list" class="data-list-item">
</template> <view @click="handleItemClick(item)">
<u-row>
<view class="pr-20">
<u-text :text="item.name" size="30" :bold="true"></u-text>
</view>
<view>
<u-text :text="item.phone" size="28" mode="phone" color="#999"></u-text>
</view>
</u-row>
<u-text :text="getAddressDetail(item)"
size="24" margin="20rpx 0 0 0" color="#999"
></u-text>
</view>
<u-line color="#DEDEDE" margin="30rpx 0 0 0"></u-line>
<template v-slot:footer> <u-row custom-style="margin-top:20rpx;" justify="between">
<view class="blcok-white-noradius"> <u-row>
<u-button @click="handleEditItem()" type="primary" size="large" shape="circle" <text class="pr-20 clr-sub">默认地址</text>
custom-style="height:80rpx;font-size: 30rpx;" <u-switch v-model="item.blDefaultFlag" @change="handleDefaultSwitch(item)" activeValue="1" active-color="#B12D29" size="34"></u-switch>
> </u-row>
<u-row> <u-row>
<u-icon size="34" color="#fff" name="plus"></u-icon> <u-text @click="handleEditItem(item)" text="编辑" prefixIcon="edit-pen" size="26"></u-text>
<text class="pl-10">新增地址</text> <u-text @click="handleDelItem(item)" text="删除" prefixIcon="trash" size="26" margin="0 0 0 20rpx"></u-text>
</u-row>
</u-row>
</view>
</view>
</tpx-scroll-view>
</view>
</template>
<u-icon size="34" color="#fff" ></u-icon> <template v-slot:footer>
</u-row> <view class="blcok-white-noradius">
</u-button> <u-button @click="handleEditItem()" type="primary" size="large" shape="circle"
</view> custom-style="height:80rpx;font-size: 30rpx;"
</template> >
</tpx-layout> <u-row>
<u-icon size="34" color="#fff" name="plus"></u-icon>
<text class="pl-10">新增地址</text>
<u-icon size="34" color="#fff" ></u-icon>
</u-row>
</u-button>
</view>
</template>
</tpx-layout>
</tpx-page>
</template> </template>
<script> <script>
@ -113,9 +114,7 @@
}, },
resData: { resData: {
list: [] list: []
}, }
showLoadMore: false,
loadedAll: false
} }
}, },
onShareAppMessage() { onShareAppMessage() {

View File

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

View File

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

View File

@ -15,7 +15,7 @@
<u-avatar size="120" :src="userInfo.avatar"></u-avatar> <u-avatar size="120" :src="userInfo.avatar"></u-avatar>
<view class="pl-30"> <view class="pl-30">
<u-row> <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="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 class="pos-abt-all" style="z-index: 0;background: #FFFFFF;opacity: 0.2;border-radius: 20rpx;"></view>
</view> </view>

View File

@ -1,143 +1,138 @@
<template> <template>
<tpx-layout> <tpx-page>
<template v-slot:header> <tpx-layout>
<template v-slot:header>
<view class="pt-30"> <view class="pt-30">
<view class="com-jianju" style="padding: 30rpx;background-color:#B12D29;border-radius: 30rpx;"> <view class="com-jianju" style="padding: 30rpx;background-color:#B12D29;border-radius: 30rpx;">
<u-row justify="between">
<view class="clr-wht font-32 font-weight">订单概况</view>
<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-row justify="between" custom-style="width: 100%;">
<view :style="'padding-right: 4rpx;white-space: nowrap;' + (hasExtSchParam?'color: #B12D29;':'color: #666;')">
统计
</view>
<u-icon :name="showSearchMore?'arrow-up-fill':'arrow-down-fill'"
color="#666" size="18" custom-style="margin-top: 2rpx;"
></u-icon>
</u-row>
</u-button>
</view>
</tpx-select>
</u-row>
<u-row justify="between" custom-style="margin-top:30rpx;">
<view style="flex: 1;text-align: center;">
<u-text :text="5" color="#fff" bold="true" size="40" align="center"></u-text>
<view class="pt-20 clr-wht font-26" style="opacity: 0.8;">
<u-row justify="center">
<u-icon name="order" color="#fff" custom-style="opacity: 0.8;" size="30"></u-icon>
<text class="pl-10">待处理订单</text>
</u-row>
</view>
</view>
<view>
<u-line direction="col" color="#fff" length="80"></u-line>
</view>
<view style="flex: 1;text-align: center;">
<u-text :text="118" color="#fff" bold="true" size="40" align="center"></u-text>
<view class="pt-20 clr-wht font-26" style="opacity: 0.8;">
<u-row justify="center">
<u-icon name="order" color="#fff" custom-style="opacity: 0.8;" size="30"></u-icon>
<text class="pl-10">累计处理订单</text>
</u-row>
</view>
</view>
</u-row>
</view>
</view>
<view class="com-jianju" style="padding-top: 30rpx;">
<u-row justify="between" align="top">
<u-col span="12">
<!-- 订单状态 -->
<tpx-tabs :list="ordStatusList" v-model:value="searchParam.ordStatus"
@tabchange="(val)=> { handleSearchParamChange() }" v-slot="curOrdTab"
>
<text slot>
(<text>{{curOrdTab.item.val}}</text>)
</text>
</tpx-tabs>
</u-col>
</u-row>
</view>
</template>
<template v-slot:body>
<scroll-view :scroll-y="true" @scrolltolower="onScrollBottom()" class="pos-abt-all"
>
<view class="pgb-cont">
<!-- 列表数据 -->
<view v-for="(orItem) in ordList" class="ord-list-item">
<u-row justify="between"> <u-row justify="between">
<u-col span="11"> <view class="clr-wht font-32 font-weight">订单概况</view>
<u-row @click="handleDealItem(orItem, { type: 2 })">
<view> <tpx-select mode="drop" v-model:value="searchParam.keyword" :list="dateRangeList" >
<u-text :text="'运单号:'+ 'T7080304038'" size="26"></u-text> <view style="width: 200rpx;;">
</view> <u-button :hairline="false" shape="circle" size="mini" custom-style="border-radius: 23rpx;font-size: 26rpx;height: 50rpx;width: 130rpx;">
<view class="pl-10"> <u-row justify="between" custom-style="width: 100%;">
<u-icon name="file-text" size="32" custom-style=""></u-icon> <view :style="'padding-right: 4rpx;white-space: nowrap;' + 'color: #666;'">
</view> 统计
</u-row> </view>
</u-col> <u-icon :name="showSearchMore?'arrow-up-fill':'arrow-down-fill'"
color="#666" size="18" custom-style="margin-top: 2rpx;"
></u-icon>
</u-row>
</u-button>
</view>
</tpx-select>
</u-row> </u-row>
<u-row @click="handleDealItem(orItem, { type: 1 })" custom-style="margin-top: 30rpx;" justify="center"> <u-row justify="between" custom-style="margin-top:30rpx;">
<u-col span="4"> <view style="flex: 1;text-align: center;">
<u-text :text="'中国上海'" size="30" :bold="true" align="center"></u-text> <u-text :text="5" color="#fff" bold="true" size="40" align="center"></u-text>
<u-text :text="'张三'" size="26" color="#999" margin="20rpx 0 0 0" <view class="pt-20 clr-wht font-26" style="opacity: 0.8;">
align="center"></u-text> <u-row justify="center">
</u-col> <u-icon name="order" color="#fff" custom-style="opacity: 0.8;" size="30"></u-icon>
<u-col span="4" justify="center" align="center" custom-style="text-align: center;"> <text class="pl-10">待处理订单</text>
<image style="width: 70rpx;height: 14rpx;" :src="getCdnUrl('search/toline.png')"> </u-row>
</image> </view>
<!-- getCdnUrl('search/toline-grey.png') --> </view>
<u-text :text="'待付款'" align="center" size="22" margin="10rpx 0 0 0"></u-text> <view>
</u-col> <u-line direction="col" color="#fff" length="80"></u-line>
<u-col span="4"> </view>
<u-text :text="'越南'" size="30" :bold="true" align="center"></u-text> <view style="flex: 1;text-align: center;">
<u-text :text="'李四'" size="26" color="#999" margin="20rpx 0 0 0" <u-text :text="118" color="#fff" bold="true" size="40" align="center"></u-text>
align="center"></u-text> <view class="pt-20 clr-wht font-26" style="opacity: 0.8;">
</u-col> <u-row justify="center">
</u-row> <u-icon name="order" color="#fff" custom-style="opacity: 0.8;" size="30"></u-icon>
<text class="pl-10">累计处理订单</text>
<u-text :text="'签收时间:' + '2022-04-30 15:25'" color="#999" size="24" </u-row>
margin="30rpx 0 0 0"></u-text> </view>
<u-line color="#DEDEDE" margin="30rpx 0 0 0"></u-line>
<u-row justify="end" custom-style="margin-top:20rpx;">
<view style="display: inline-block;white-space: nowrap;">
<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"
custom-style="height: 54rpx;margin-left: 12rpx;">立即开单</u-button>
</u-row>
</view> </view>
</u-row> </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>
</view> </view>
</scroll-view>
</template>
</tpx-layout>
<view class="com-jianju" style="padding-top: 30rpx;">
<u-row justify="between" align="top">
<u-col span="12">
<!-- 订单状态 -->
<tpx-tabs :list="ordStatusList" v-model:value="searchParam.ordStatus"
@tabchange="(val)=> { handleSearchParamChange() }" v-slot="curOrdTab"
>
<text slot>
(<text>{{curOrdTab.item.val}}</text>)
</text>
</tpx-tabs>
</u-col>
</u-row>
</view>
</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-cont">
<!-- 列表数据 -->
<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 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>
</view>
</u-row>
</u-col>
</u-row>
<u-row @click="handleDealItem(orItem, { type: 1 })" custom-style="margin-top: 30rpx;" justify="center">
<u-col span="4">
<u-text :text="'中国上海'" size="30" :bold="true" align="center"></u-text>
<u-text :text="'张三'" size="26" color="#999" margin="20rpx 0 0 0"
align="center"></u-text>
</u-col>
<u-col span="4" justify="center" align="center" custom-style="text-align: center;">
<image style="width: 70rpx;height: 14rpx;" :src="getCdnUrl('search/toline.png')">
</image>
<!-- getCdnUrl('search/toline-grey.png') -->
<u-text :text="'待付款'" align="center" size="22" margin="10rpx 0 0 0"></u-text>
</u-col>
<u-col span="4">
<u-text :text="'越南'" size="30" :bold="true" align="center"></u-text>
<u-text :text="'李四'" size="26" color="#999" margin="20rpx 0 0 0"
align="center"></u-text>
</u-col>
</u-row>
<u-text :text="'签收时间:' + '2022-04-30 15:25'" color="#999" size="24"
margin="30rpx 0 0 0"></u-text>
<u-line color="#DEDEDE" margin="30rpx 0 0 0"></u-line>
<u-row justify="end" custom-style="margin-top:20rpx;">
<view style="display: inline-block;white-space: nowrap;">
<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 @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>
</view>
</tpx-scroll-view>
</view>
</template>
</tpx-layout>
</tpx-page>
</template> </template>
<script> <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 { export default {
props: { props: {
@ -146,32 +141,20 @@
// } // }
}, },
computed: { 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() { data() {
return { return {
...JSON.parse(JSON.stringify({ ordStaEnum, dateRangeList, ordStatusList, payTypeEnum, payTypeList, dlvTypeEnum, dlvTypeList, dateTypeEnum, dateTypeList })), ...JSON.parse(JSON.stringify({ dateRangeList, ordStatusList })),
searchParam: { searchParam: {
keyword: '', searchValue: ''
ordStatus: ordStatusList[0].val // 订单状态, 1:寄件; 2:收件; 3:待付款;
}, },
ordList: [ queryOption: {
{}
// ,{},{},{},{},{},{},{} },
], resData: {
showLoadMore: false, list: []
loadedAll: false }
} }
}, },
onShareAppMessage() { onShareAppMessage() {
@ -181,45 +164,15 @@
} }
}, },
onLoad() { onLoad() {
this.queryOption = queryOption
this.initData(); this.initData();
}, },
onUnload() { onUnload() {
}, },
methods: { methods: {
getListFun: apiService.getOrderList,
initData(){ 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' }) { async handleDealItem(item, deal = { type: '1' }) {
switch (deal.type){ switch (deal.type){
@ -227,7 +180,7 @@
this.goto(`post/detail?id=${item.id || ''}`) this.goto(`post/detail?id=${item.id || ''}`)
break; break;
case 2: // 复制订单号 case 2: // 复制订单号
this.setClipboardData('xxxxxxx') this.setClipboardData(item.billCode || item.orderSn)
break; break;
case 3: // 删除 case 3: // 删除
await this.confirmModal('确认要删除吗?') await this.confirmModal('确认要删除吗?')
@ -235,6 +188,9 @@
case 4: // 取消 case 4: // 取消
await this.confirmModal('确认要取消吗?') await this.confirmModal('确认要取消吗?')
break; break;
case 5: // 理解开单
this.goto(`post/openorder?billCode=${item.billCode || ''}&orderSn=${item.orderSn || ''}`)
break;
default: default:
break; break;
} }