This commit is contained in:
aihe 2024-08-31 09:06:50 +08:00
parent e6b37143a4
commit 6ad67dbbe1
5 changed files with 171 additions and 99 deletions

View File

@ -193,12 +193,27 @@ export const cancelOrder = (data = {})=> {
return coreRequest(url.cancelOrder, data, {}) return coreRequest(url.cancelOrder, data, {})
} }
// 进仓登记
export const registerWarehouseInInfo = (data = {})=> {
return coreRequest(url.registerWarehouseInInfo, data, {})
}
// 获取新进仓单号 // 获取新进仓单号
export const getWareHouseInNo = (data = {})=> { export const getWareHouseInNo = (data = {})=> {
return coreRequest(url.getWareHouseInNo, data, {}) return coreRequest(url.getWareHouseInNo, data, {})
} }
// 获取进仓单详情
export const getWarehouseInInfo = (data = {})=> {
return coreRequest(url.getWarehouseInInfo, data, {}, "GET")
}
// 收货入仓登记
export const registerWarehouseInInfo = (data = {})=> {
return coreRequest(url.registerWarehouseInInfo, data, {})
}
// 进仓单列表
export const queryWarehouseList = (data = {})=> {
return coreRequest(url.queryWarehouseList, data, {}, "GET")
}
// 进仓单登记-列表
export const getWarehouseBatchInList = (data = {})=> {
return coreRequest(url.getWarehouseBatchInList, data, {}, "GET")
}

View File

@ -4,7 +4,7 @@ export const host = curEnvConf.apiHost
export default { export default {
getLastAppVersion: `/emis/common/getLastAppVersion`, // 获取app最新版本 getLastAppVersion: `/emis/common/getLastAppVersion`, // 获取app最新版本
uploadFile: '/common/ossUpload', uploadFile: '/common/ossUpload', // 上传文件
loginByApp: `/loginByApp`, // 登录 loginByApp: `/loginByApp`, // 登录
getInfoByApp: `/getInfoByApp`,// 获取用户基本信息 getInfoByApp: `/getInfoByApp`,// 获取用户基本信息
updatePwdByApp: `/updatePwdByApp`,// 修改密码 updatePwdByApp: `/updatePwdByApp`,// 修改密码
@ -57,10 +57,14 @@ export default {
uploadWaybillAttach: `/emis/emisWaybillAttachment/uploadWaybillAttach`, // 运单附件上传 uploadWaybillAttach: `/emis/emisWaybillAttachment/uploadWaybillAttach`, // 运单附件上传
getPackNo: `/emis/common/getPackNo`, // 生成合包号 getPackNo: `/emis/common/getPackNo`, // 生成合包号
getCarNoList: `/emis/emisTmsCar/listSimple`, // 获取车牌号列表 getCarNoList: `/emis/emisTmsCar/listSimple`, // 获取车牌号列表
confirmOrder: `/emis/emisWaybill/confirmOrder`, // 确认接单 confirmOrder: `/emis/emisWaybill/confirmOrder`, // 确认接单
cancelOrder: `/emis/emisWaybill/cancelOrder`, // 取消订单 cancelOrder: `/emis/emisWaybill/cancelOrder`, // 取消订单
registerWarehouseInInfo: `/emis/emisWarehouseInBatch/registerWarehouseInInfo`, // 进仓登记
getWareHouseInNo: `/emis/common/getWareHouseInNo`, // 获取新进仓单号 getWareHouseInNo: `/emis/common/getWareHouseInNo`, // 获取新进仓单号
getWarehouseInInfo: `/emis/emisWarehouseIn/getWarehouseInInfo`, // 获取进仓单详情
registerWarehouseInInfo: `/emis/emisWarehouseInBatch/registerWarehouseInInfo`, // 收货入仓登记
queryWarehouseList: `/emis/emisWarehouseIn/listSimple`, // 进仓单列表
getWarehouseBatchInList: `/emis/emisWarehouseIn/getWarehouseBatchInList`, // 进仓单登记-列表
} }

View File

@ -6,7 +6,7 @@
<view class="blcok-white"> <view class="blcok-white">
<u-row justify="between"> <u-row justify="between">
<view style="flex:1;"> <view style="flex:1;">
<tpx-scan-input v-model:value="billCode" @scanChange="handleScanValChange"></tpx-scan-input> <tpx-scan-input v-model:value="inNo" @scanChange="handleScanValChange"></tpx-scan-input>
</view> </view>
<view class="pl-10"> <view class="pl-10">
<u-button @click="handleScanValChange" custom-style="height: 74rpx;">确定</u-button> <u-button @click="handleScanValChange" custom-style="height: 74rpx;">确定</u-button>
@ -74,10 +74,10 @@
<template v-slot:footer> <template v-slot:footer>
<view class="pos-rlt blcok-white" style="border-radius: 0;margin-top: 0;"> <view class="pos-rlt blcok-white" style="border-radius: 0;margin-top: 0;">
<u-row> <u-row>
<u-button @click="goto(`warehousing/detail`)" size="large" shape="circle" <u-button @click="handleJinCang" size="large" shape="circle"
custom-style="width: 260rpx;height:80rpx;font-size: 30rpx;" :plain="true" type="primary">进仓登记</u-button> custom-style="width: 260rpx;height:80rpx;font-size: 30rpx;" :plain="true" type="primary">进仓登记</u-button>
<u-button @click="handleJinCang" size="large" shape="circle" <u-button @click="goto(`todo/detail`)" size="large" shape="circle"
custom-style="width: 400rpx;height:80rpx;font-size: 30rpx;" type="primary">货齐开单</u-button> custom-style="width: 400rpx;height:80rpx;font-size: 30rpx;" type="primary">货齐开单</u-button>
</u-row> </u-row>
</view> </view>
@ -107,10 +107,10 @@
}, },
data() { data() {
return { return {
billCode: '', inNo: '',
pageLoading: true, pageLoading: true,
queryOption: { queryOption: {
billCode: '', // 运单id inNo: '', // 进仓单号
}, },
submitParam: { submitParam: {
@ -130,16 +130,19 @@
}, },
methods: { methods: {
initData() { initData() {
this.billCode = this.queryOption.billCode this.inNo = this.queryOption.inNo
this.billCode && (this.queryOrderDetail(this.queryOption)) this.inNo && (this.queryOrderDetail(this.queryOption))
}, },
async queryOrderDetail(params) { async queryOrderDetail(params) {
let res = await apiService.getOrderDetail({...params, _loading: true}) let res = await apiService.getWarehouseInInfo({...params, _loading: true})
this.submitParam = res.data if(!res.data) {
this.showToast("进仓单号数据不存在")
}
this.submitParam = res.data || {}
this.pageLoading = false this.pageLoading = false
}, },
handleScanValChange: debounce(function(){ handleScanValChange: debounce(function(){
this.queryOrderDetail({ billCode: this.billCode }) this.queryOrderDetail({ inNo: this.inNo })
}), }),
handleDialogClick(curModal){ handleDialogClick(curModal){
curModal.show = true curModal.show = true
@ -152,9 +155,8 @@
}, },
resetForm() { resetForm() {
this.submitParam = {} this.submitParam = {}
this.billCode = '' this.inNo = ''
} }
// getWareHouseInNo
} }
} }

View File

@ -9,7 +9,7 @@
<view class="pg-container"> <view class="pg-container">
<view class="com-jianju" style="margin-top: 10rpx;"> <view class="com-jianju" style="margin-top: 10rpx;">
<u-row align="center" justify="between"> <u-row @click="goto('user/exclusiveQrcode')" align="center" justify="between">
<view> <view>
<u-row> <u-row>
<u-avatar size="120" :src="userInfo.avatar"></u-avatar> <u-avatar size="120" :src="userInfo.avatar"></u-avatar>
@ -25,7 +25,7 @@
</u-row> </u-row>
</view> </view>
<view> <view>
<u-image @click="goto('user/exclusiveQrcode')" height="140" width="140" :src="userInfo.qrCodeImgUrl" radius="10"></u-image> <u-image height="140" width="140" :src="userInfo.qrCodeImgUrl" radius="10"></u-image>
</view> </view>
</u-row> </u-row>

View File

@ -43,9 +43,9 @@
<u-row justify="between" align="top"> <u-row justify="between" align="top">
<u-col span="12"> <u-col span="12">
<!-- 订单状态 --> <!-- 订单状态 -->
<tpx-tabs :list="dicData.emis_waybill_stat_type" v-model:value="searchParam.params.waybillStatType" <tpx-tabs :list="dicData.emis_waybill_stat_type"
@tabchange="handleSearch" v-slot="curOrdTab" v-model:value="searchParam.params.waybillStatType" @tabchange="handleSearch"
> v-slot="curOrdTab">
<text slot> <text slot>
(<text>{{ staticInfo.orderStat[curOrdTab.item.val] || 0 }}</text>) (<text>{{ staticInfo.orderStat[curOrdTab.item.val] || 0 }}</text>)
</text> </text>
@ -57,8 +57,7 @@
<template v-slot:body> <template v-slot:body>
<view class="pos-abt-all"> <view class="pos-abt-all">
<tpx-scroll-view v-model:resObject="resData" :searchParam="searchParam" :getListFun="getListFun" <tpx-scroll-view v-model:resObject="resData" :searchParam="searchParam" :getListFun="getListFun"
ref="listRef" :autoReload="false" @onListReload="listenListReload" ref="listRef" :autoReload="false" @onListReload="listenListReload">
>
<view class="pgb-cont"> <view class="pgb-cont">
<!-- 列表数据 --> <!-- 列表数据 -->
<view v-for="(item) in resData.list" class="ord-list-item"> <view v-for="(item) in resData.list" class="ord-list-item">
@ -70,21 +69,28 @@
<u-row justify="end" custom-style="margin-top:20rpx;"> <u-row justify="end" custom-style="margin-top:20rpx;">
<view style="display: inline-block;white-space: nowrap;"> <view style="display: inline-block;white-space: nowrap;">
<u-row v-if="!item.billCode"> <u-row>
<u-button @click="handleDealItem(item, { type: 1 })" shape="circle" type="primary" <u-button v-if="item.pickupMethod == 1 && item.intoWarehouseBillCode"
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">接单</u-button> @click="handleDealItem(item, { type: 6 })" shape="circle" type="primary"
<u-button @click="handleDealItem(item, { type: 2 })" shape="circle" type="primary" :plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">入仓扫描</u-button>
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">立即开单</u-button>
<u-button @click="handleDealItem(item, { type: 3 })" shape="circle" type="primary" <template v-if="item.orderStatus == 0">
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">取消</u-button> <u-button @click="handleDealItem(item, { type: 1 })" shape="circle"
</u-row> type="primary" :plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">接单</u-button>
<u-row v-else> <u-button @click="handleDealItem(item, { type: 3 })" shape="circle"
<u-button v-if="item.waybillStatus == 0" @click="handleDealItem(item, { type: 2 })" shape="circle" type="primary" :plain="true" type="primary" :plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">取消</u-button>
custom-style="height: 54rpx;margin-left: 12rpx;">立即开单</u-button> </template>
<u-button v-if="item.waybillStatus == 0" @click="handleDealItem(item, { type: 4 })" shape="circle" type="primary" <template v-if="item.orderStatus == 1">
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">揽收</u-button> <u-button v-if="item.waybillStatus == 0"
<u-button v-if="item.waybillStatus == 40" @click="handleDealItem(item, { type: 5 })" shape="circle" type="primary" @click="handleDealItem(item, { type: 2 })" shape="circle"
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">签收扫描</u-button> type="primary" :plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">立即开单</u-button>
<u-button v-if="item.waybillStatus == 0"
@click="handleDealItem(item, { type: 4 })" shape="circle"
type="primary" :plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">揽收</u-button>
<u-button v-if="item.waybillStatus == 40"
@click="handleDealItem(item, { type: 5 })" shape="circle"
type="primary" :plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">签收扫描</u-button>
</template>
</u-row> </u-row>
</view> </view>
@ -107,34 +113,58 @@
</template> </template>
<script> <script>
import { dateRangeList } from "@/common/enum" import {
dateRangeList
} from "@/common/enum"
import * as apiService from "@/common/api" import * as apiService from "@/common/api"
import BpdSendRecieverTmp from "@/components/buns-post-detail-templates/bpd-send-reciever-tmp" import BpdSendRecieverTmp from "@/components/buns-post-detail-templates/bpd-send-reciever-tmp"
import { getAuthList, authCodeEnum } from "@/common/authCode" import {
getAuthList,
authCodeEnum
} from "@/common/authCode"
export default { export default {
props: { props: {},
},
computed: { computed: {
dicData() { dicData() {
return this.$store.getters.dicData return this.$store.getters.dicData
}, },
staticDataList(){ staticDataList() {
let { commStat } = this.staticInfo let {
let list = [ commStat
{ title: '待处理订单', subTitle: commStat.waitDoNum || 0, url: '', code: authCodeEnum.dingDanGaiKuang }, } = this.staticInfo
{ title: '累计处理订单', subTitle: commStat.hasDoNum || 0, url: '', code: authCodeEnum.dingDanGaiKuang } let list = [{
title: '待处理订单',
subTitle: commStat.waitDoNum || 0,
url: '',
code: authCodeEnum.dingDanGaiKuang
},
{
title: '累计处理订单',
subTitle: commStat.hasDoNum || 0,
url: '',
code: authCodeEnum.dingDanGaiKuang
}
] ]
list = getAuthList({ list, _thisPage: this }) list = getAuthList({
list,
_thisPage: this
})
return list return list
}, },
}, },
components: { BpdSendRecieverTmp }, components: {
BpdSendRecieverTmp
},
data() { data() {
let { dicData } = this.$store.getters let {
dicData
} = this.$store.getters
return { return {
authCodeEnum, authCodeEnum,
...JSON.parse(JSON.stringify({ dateRangeList })), ...JSON.parse(JSON.stringify({
dateRangeList
})),
searchParam: { searchParam: {
billCode: '', billCode: '',
_date: [], _date: [],
@ -166,60 +196,70 @@
// path: 'TODO' // path: 'TODO'
} }
}, },
onShow(){ onShow() {
this.triggerListReload() this.triggerListReload()
this.initData() this.initData()
}, },
onLoad(option) { onLoad(option) {
this.queryOption = option this.queryOption = option
}, },
onUnload() { onUnload() {},
},
methods: { methods: {
transSearchPm(param){ transSearchPm(param) {
let cpParam = JSON.parse(JSON.stringify(param)) let cpParam = JSON.parse(JSON.stringify(param))
cpParam.params.beginDate = cpParam?._date?.[0] cpParam.params.beginDate = cpParam?._date?.[0]
cpParam.params.endDate = cpParam?._date?.[1] cpParam.params.endDate = cpParam?._date?.[1]
return cpParam return cpParam
}, },
async getListFun(param){ async getListFun(param) {
let cpParam = this.transSearchPm(param) let cpParam = this.transSearchPm(param)
let res = await apiService.getOrderList(cpParam) let res = await apiService.getOrderList(cpParam)
return res return res
}, },
initData(){ initData() {
}, },
handleSearch(){ handleSearch() {
setTimeout(()=> { setTimeout(() => {
this.triggerListReload() this.triggerListReload()
}, 300) }, 300)
}, },
listenListReload(params){ listenListReload(params) {
// list重置到第一页,需重新查询统计数据 // list重置到第一页,需重新查询统计数据
this.getStaticData(params) this.getStaticData(params)
}, },
async getStaticData(params){ async getStaticData(params) {
let cpParam = this.transSearchPm(params) let cpParam = this.transSearchPm(params)
const staRes = await apiService.getWaybillStatMap(cpParam) const staRes = await apiService.getWaybillStatMap(cpParam)
let { hasDoNum, waitDoNum, statNumList } = staRes.data let {
this.staticInfo.commStat = { hasDoNum, waitDoNum } hasDoNum,
waitDoNum,
statNumList
} = staRes.data
this.staticInfo.commStat = {
hasDoNum,
waitDoNum
}
let orderStat = {} let orderStat = {}
statNumList.map(t=> { statNumList.map(t => {
orderStat[t.statType] = t.statNum orderStat[t.statType] = t.statNum
}) })
this.staticInfo.orderStat = orderStat this.staticInfo.orderStat = orderStat
}, },
triggerListReload(){ triggerListReload() {
this?.$refs?.listRef?.getDataList?.(true) // 重置到第一页数据 this?.$refs?.listRef?.getDataList?.(true) // 重置到第一页数据
}, },
async handleDealItem(item, deal = { type: '1' }) { async handleDealItem(item, deal = {
type: '1'
}) {
let itemQuery = `?billCode=${item.billCode || ''}&orderSn=${item.orderSn || ''}` let itemQuery = `?billCode=${item.billCode || ''}&orderSn=${item.orderSn || ''}`
switch (deal.type){ switch (deal.type) {
case 1: // 接单 case 1: // 接单
let conBl = await this.confirmModal('确认要接单吗?') let conBl = await this.confirmModal('确认要接单吗?')
if(conBl) { if (conBl) {
await apiService.confirmOrder({ orderSn: item.orderSn }) await apiService.confirmOrder({
orderSn: item.orderSn
})
this.showToast('操作成功') this.showToast('操作成功')
this.triggerListReload() this.triggerListReload()
} }
@ -229,11 +269,14 @@
break; break;
case 3: // 取消 case 3: // 取消
let canBl = await this.$refs.cancelRef.getConfirmResult() let canBl = await this.$refs.cancelRef.getConfirmResult()
if(canBl) { if (canBl) {
await apiService.cancelOrder({ orderSn: item.orderSn, ...this.cancelModal.data }) await apiService.cancelOrder({
orderSn: item.orderSn,
...this.cancelModal.data
})
this.triggerListReload() this.triggerListReload()
} }
this.cancelModal.data = { } this.cancelModal.data = {}
this.cancelModal.show = false this.cancelModal.show = false
break; break;
case 4: // 揽收 case 4: // 揽收
@ -242,6 +285,10 @@
case 5: // 签收扫描 case 5: // 签收扫描
this.goto(`deliveryDeal/signedScanning${itemQuery}`) this.goto(`deliveryDeal/signedScanning${itemQuery}`)
break; break;
case 6: // 入仓扫描
this.goto(`deliveryDeal/storage${itemQuery}&inNo=${item.intoWarehouseBillCode}`)
break;
default: default:
break; break;
} }
@ -252,25 +299,27 @@
<style lang="scss"> <style lang="scss">
@import '@/common/uni-nvue.scss'; @import '@/common/uni-nvue.scss';
page { page {
background-color: #fff !important; background-color: #fff !important;
height: 100% !important; height: 100% !important;
} }
</style> </style>
<style scoped lang="scss"> <style scoped lang="scss">
.pgb-cont{ .pgb-cont {
padding: 30rpx; padding: 30rpx;
} }
.ord-list-item{ .ord-list-item {
border: 2px solid #F6F6F6; border: 2px solid #F6F6F6;
box-shadow: 0rpx 3rpx 12rpx 0rpx rgba(139,139,139,0.06); box-shadow: 0rpx 3rpx 12rpx 0rpx rgba(139, 139, 139, 0.06);
border-radius: 20rpx; border-radius: 20rpx;
padding: 22rpx 30rpx; padding: 22rpx 30rpx;
background-color: #fff; background-color: #fff;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.search-more-panel{
.search-more-panel {
overflow: hidden; overflow: hidden;
position: absolute; position: absolute;
left: 0; left: 0;
@ -278,7 +327,8 @@
height: calc(70vh); height: calc(70vh);
z-index: 200; z-index: 200;
} }
.smp-body{
.smp-body {
padding: 30rpx; padding: 30rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -287,7 +337,8 @@
border-radius: 0 0 30rpx 30rpx; border-radius: 0 0 30rpx 30rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.smp-content{
.smp-content {
flex: 1; flex: 1;
position: relative; position: relative;
} }