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, {})
}
// 进仓登记
export const registerWarehouseInInfo = (data = {})=> {
return coreRequest(url.registerWarehouseInInfo, data, {})
}
// 获取新进仓单号
export const 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 {
getLastAppVersion: `/emis/common/getLastAppVersion`, // 获取app最新版本
uploadFile: '/common/ossUpload',
uploadFile: '/common/ossUpload', // 上传文件
loginByApp: `/loginByApp`, // 登录
getInfoByApp: `/getInfoByApp`,// 获取用户基本信息
updatePwdByApp: `/updatePwdByApp`,// 修改密码
@ -57,10 +57,14 @@ export default {
uploadWaybillAttach: `/emis/emisWaybillAttachment/uploadWaybillAttach`, // 运单附件上传
getPackNo: `/emis/common/getPackNo`, // 生成合包号
getCarNoList: `/emis/emisTmsCar/listSimple`, // 获取车牌号列表
confirmOrder: `/emis/emisWaybill/confirmOrder`, // 确认接单
cancelOrder: `/emis/emisWaybill/cancelOrder`, // 取消订单
registerWarehouseInInfo: `/emis/emisWarehouseInBatch/registerWarehouseInInfo`, // 进仓登记
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">
<u-row justify="between">
<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 class="pl-10">
<u-button @click="handleScanValChange" custom-style="height: 74rpx;">确定</u-button>
@ -74,10 +74,10 @@
<template v-slot:footer>
<view class="pos-rlt blcok-white" style="border-radius: 0;margin-top: 0;">
<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>
<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>
</u-row>
</view>
@ -107,10 +107,10 @@
},
data() {
return {
billCode: '',
inNo: '',
pageLoading: true,
queryOption: {
billCode: '', // 运单id
inNo: '', // 进仓单号
},
submitParam: {
@ -130,16 +130,19 @@
},
methods: {
initData() {
this.billCode = this.queryOption.billCode
this.billCode && (this.queryOrderDetail(this.queryOption))
this.inNo = this.queryOption.inNo
this.inNo && (this.queryOrderDetail(this.queryOption))
},
async queryOrderDetail(params) {
let res = await apiService.getOrderDetail({...params, _loading: true})
this.submitParam = res.data
let res = await apiService.getWarehouseInInfo({...params, _loading: true})
if(!res.data) {
this.showToast("进仓单号数据不存在")
}
this.submitParam = res.data || {}
this.pageLoading = false
},
handleScanValChange: debounce(function(){
this.queryOrderDetail({ billCode: this.billCode })
this.queryOrderDetail({ inNo: this.inNo })
}),
handleDialogClick(curModal){
curModal.show = true
@ -152,9 +155,8 @@
},
resetForm() {
this.submitParam = {}
this.billCode = ''
this.inNo = ''
}
// getWareHouseInNo
}
}

View File

@ -9,7 +9,7 @@
<view class="pg-container">
<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>
<u-row>
<u-avatar size="120" :src="userInfo.avatar"></u-avatar>
@ -25,7 +25,7 @@
</u-row>
</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>
</u-row>

View File

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