This commit is contained in:
aihe 2024-05-30 19:24:27 +08:00
parent f81698ca95
commit 6332401919
6 changed files with 203 additions and 183 deletions

View File

@ -122,6 +122,16 @@ export const getNextStationList = (data = {})=> {
return coreRequest(url.getNextStationList, data, {}, "GET") return coreRequest(url.getNextStationList, data, {}, "GET")
} }
// 扫描-获取上一网点
export const getPreStationList = (data = {})=> {
return coreRequest(url.getPreStationList, data, {}, "GET")
}
// 扫描-获取合包列表
export const getPackCodeList = (data = {})=> {
return coreRequest(url.getPackCodeList, data, {}, "GET")
}
// 获取打印运单信息-图片 // 获取打印运单信息-图片
export const getRealGetWaybillPrintData = (data = {})=> { export const getRealGetWaybillPrintData = (data = {})=> {
return coreRequest(url.getRealGetWaybillPrintData, data, {}, "GET") return coreRequest(url.getRealGetWaybillPrintData, data, {}, "GET")

View File

@ -40,6 +40,8 @@ export default {
getRealGetWaybillPrintData: `/emis/emisWaybill/realGetPrintList`, // 运单 打印数据 getRealGetWaybillPrintData: `/emis/emisWaybill/realGetPrintList`, // 运单 打印数据
queryPrintListSimple: `/emis/emisWaybill/queryPrintListSimple`, // 运单 打印数据-列表 queryPrintListSimple: `/emis/emisWaybill/queryPrintListSimple`, // 运单 打印数据-列表
getNextStationList: `/emis/emisTmsScanRecord/getNextStationList`, // 获取-扫描下一网点 getNextStationList: `/emis/emisTmsScanRecord/getNextStationList`, // 获取-扫描下一网点
getPreStationList: `/emis/emisTmsScanRecord/getPreStationList`, // 获取-扫描上一网点
getPackCodeList: `/emis/emisTmsPack/listSimple`, // 获取-合包列表
getPayeeList: `/emis/emisStaff/getPayeeList`, // 回款人联系列表 getPayeeList: `/emis/emisStaff/getPayeeList`, // 回款人联系列表
getSalemanList: `/emis/emisStaff/getSalemanList`, // 销售人联系列表 getSalemanList: `/emis/emisStaff/getSalemanList`, // 销售人联系列表
preCalcWaybillFee: `/emis/emisWaybill/preCalcWaybillFee`, // 报价试算 preCalcWaybillFee: `/emis/emisWaybill/preCalcWaybillFee`, // 报价试算

View File

@ -10,7 +10,8 @@ export const scanTypeEnum = {
liuCang: 70, // 留仓 liuCang: 70, // 留仓
zhuanJian: 80, // 转件 zhuanJian: 80, // 转件
heBao: 200, // 合包
chaiBao: 201, // 拆包
qingGuan: 800, // 清关 qingGuan: 800, // 清关
baoGUan: 700, // 报关 baoGUan: 700, // 报关
} }

View File

@ -90,7 +90,6 @@
pageLoading: true, pageLoading: true,
queryOption: { queryOption: {
billCode: '', // 运单id billCode: '', // 运单id
orderSn: '', // 订单id
}, },
resData: { resData: {
list: [] list: []
@ -115,7 +114,7 @@
methods: { methods: {
getNextStationList: apiService.getNextStationList, getNextStationList: apiService.getNextStationList,
initData() { initData() {
this.submitParam.billCode = this.queryOption.billCode || this.queryOption.orderSn this.submitParam.billCode = this.queryOption.billCode
}, },
async handleSubmit(val) { async handleSubmit(val) {
let extParam = {} let extParam = {}

View File

@ -1,44 +1,42 @@
<template> <template>
<tpx-page>
<tpx-layout> <tpx-layout>
<template v-slot:body> <template v-slot:body>
<view class="blcok-white-noradius" style="margin-top: 0;"> <view class="blcok-white-noradius" style="margin-top: 0;">
<u-row justify="between"> <u-row justify="between">
<view style="flex:1;"> <view style="flex:1;">
<tpx-scan-input v-model:value="submitParam.yundanhao" placeholder="请输入编号或扫码" <tpx-scan-input v-model:value="submitParam.billCode" placeholder="请输入或扫码"
iconPos="left"></tpx-scan-input> @change="handleScanValChange" iconPos="left"></tpx-scan-input>
</view> </view>
</u-row> </u-row>
<u-row custom-style="margin-top:20rpx;"> <u-row custom-style="margin-top:20rpx;">
<view style="flex: 1;"> <view style="flex: 1;">
<tpx-select placeholder="请获取新合包号" :isWhite="true"></tpx-select> <tpx-select v-model:resObject="siteRes" :getListFun="getNextStationList" :transKeyVal="{valKey: 'destSite',titleKey: 'destSiteName'}" v-model:value="submitParam.preOrNextStationCode" :isWhite="true" placeholder="请选择下一网点"></tpx-select>
</view>
</u-row>
<u-row custom-style="margin-top:20rpx;">
<view style="flex: 1;">
<tpx-select v-model:resObject="cpackRes" :getListFun="getPackCodeList" :transKeyVal="{valKey: 'packNo',titleKey: 'packNo'}" v-model:value="submitParam.bagNo" :isWhite="true" placeholder="请选择合包号"></tpx-select>
</view> </view>
</u-row> </u-row>
</view> </view>
<view class="blcok-white-noradius"> <view class="blcok-white-noradius">
<bo-operator-tmp> <bo-operator-tmp :list="resData.list">
<template v-slot:titleRight> <template v-slot:titleRight>
<!-- <button size="mini">查看历史到件</button> -->
</template> </template>
</bo-operator-tmp> </bo-operator-tmp>
</view> </view>
<view class="mt-40 pl-20 pr-20">
<tpx-tabs :list="tabList" v-model:value="tabType"
@tabchange="(val)=> { }" v-slot="curTab"
>
<text slot>
(<text>{{curTab.item.val}}</text>)
</text>
</tpx-tabs>
</view>
<view class="blcok-white-noradius"> <view class="blcok-white-noradius">
<view v-for="(item, index) in yundanList" class="yditem">
<view v-for="(item, index) in resData.list" class="yditem">
<u-row justify="between" align="top"> <u-row justify="between" align="top">
<view style="flex: 1;"> <view style="flex: 1;">
<view class=""> <view class="">
<text class="clr-sub lbwth">订单号</text> <text class="clr-sub lbwth">订单号</text>
<text class="">T2919292</text> <text class="">{{item.billCode}}</text>
</view> </view>
<view class="mt-10"> <view class="mt-10">
<text class="clr-sub lbwth">重量</text> <text class="clr-sub lbwth">重量</text>
@ -50,6 +48,7 @@
</view> </view>
</u-row> </u-row>
</view> </view>
<tpx-empty v-if="resData.list.length == 0" size="sm"></tpx-empty>
</view> </view>
</template> </template>
@ -62,27 +61,17 @@
</view> </view>
</template> </template>
</tpx-layout> </tpx-layout>
</tpx-page>
</template> </template>
<script> <script>
import getCdnUrl from "@/common/getCdnUrl" import { debounce } from "@/common/util"
import { import dayjs from "dayjs"
ordStaEnum,
ordStatusList,
payTypeEnum,
payTypeList,
dlvTypeEnum,
dlvTypeList,
dateTypeEnum,
dateTypeList
} from "@/common/enum"
import BoOperatorTmp from "@/components/buns-order-templates/bo-operator-tmp" import BoOperatorTmp from "@/components/buns-order-templates/bo-operator-tmp"
import BpeGoodphotoTmp from "@/components/buns-post-edit-templates/bpe-goodphoto-tmp" import * as apiService from "@/common/api"
import { import { scanTypeEnum, getScanParams, ansScanResponse } from "@/common/scanUtil"
goto
} from "@/common/untool"
export default { export default {
components:{ BoOperatorTmp, BpeGoodphotoTmp }, components:{ BoOperatorTmp },
props: { props: {
// hasLeftWin: { // hasLeftWin: {
// type: Boolean // type: Boolean
@ -93,41 +82,53 @@
}, },
data() { data() {
return { return {
submitParam: { queryOption: {
date: [], billCode: '', // 运单id
type: 1, },
resData: { list: [] },
siteRes: { list: [] },
cpackRes: { list: [] },
submitParam: {
billCode: '',
preOrNextStationCode: '',
}, },
tabType: 1,
tabList: [
{ title: '已扫描', val: 1 }
],
yundanList: [
{ val: 'T7080304037' },{ val: 'T708012124037' },{ val: 'T7080304092' }
]
} }
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
// title: '',
// path: 'TODO'
} }
}, },
onLoad() { onLoad(option) {
this.queryOption = option
this.initData(); this.initData();
}, },
onUnload() { onUnload() {
}, },
methods: { methods: {
getCdnUrl, getNextStationList: apiService.getNextStationList,
getPackCodeList: apiService.getPackCodeList,
initData() { initData() {
// uni.showLoading({ this.submitParam.billCode = this.queryOption.billCode
// title: '加载中'
// });
}, },
handleSubmit() { async handleSubmit(val) {
let extParam = {}
val && (extParam.billCode = val);
let scnParam = getScanParams(scanTypeEnum.heBao, { ...this.submitParam, ...extParam })
let res = await apiService.scanRecord({...scnParam, _loading: true})
let { bl, resItem } = ansScanResponse({ res, title: "合包" })
if(bl) {
this.curScanItem = resItem
this.resData.list.unshift({ ...resItem })
this.resetForm()
}
},
handleScanValChange: debounce(function(val){
val && (this.handleSubmit(val))
}),
resetForm() {
this.submitParam.billCode = ''
this.submitParam.preOrNextStationCode = ''
} }
} }
} }

View File

@ -1,36 +1,37 @@
<template> <template>
<tpx-page>
<tpx-layout> <tpx-layout>
<template v-slot:body> <template v-slot:body>
<view class="blcok-white-noradius" style="margin-top: 0;"> <view class="blcok-white-noradius" style="margin-top: 0;">
<u-row justify="between"> <u-row justify="between">
<view style="flex:1;"> <view style="flex:1;">
<tpx-scan-input v-model:value="submitParam.yundanhao" placeholder="请输入编号或扫码" <tpx-scan-input v-model:value="submitParam.billCode" placeholder="请输入或扫码"
iconPos="left"></tpx-scan-input> @change="handleScanValChange" iconPos="left"></tpx-scan-input>
</view> </view>
</u-row> </u-row>
<view class="mt-30"> <u-row custom-style="margin-top:20rpx;">
<u-button @click="handleSubmit()" type="primary" size="large" shape="square" <view style="flex: 1;">
custom-style="height:80rpx;font-size: 30rpx;border-radius: 14rpx;">确定</u-button> <tpx-select v-model:resObject="siteRes" :getListFun="getPreStationList" :transKeyVal="{valKey: 'destSite',titleKey: 'destSiteName'}" v-model:value="submitParam.preOrNextStationCode" :isWhite="true" placeholder="请选择上一网点"></tpx-select>
</view> </view>
</u-row>
</view> </view>
<view class="mt-40 pl-20 pr-20">
<tpx-tabs :list="tabList" v-model:value="tabType"
@tabchange="(val)=> { }" v-slot="curTab"
>
<text slot>
(<text>{{curTab.item.val}}</text>)
</text>
</tpx-tabs>
</view>
<view class="blcok-white-noradius"> <view class="blcok-white-noradius">
<view v-for="(item, index) in yundanList" class="yditem"> <bo-operator-tmp :list="resData.list">
<template v-slot:titleRight>
</template>
</bo-operator-tmp>
</view>
<view class="blcok-white-noradius">
<view v-for="(item, index) in resData.list" class="yditem">
<u-row justify="between" align="top"> <u-row justify="between" align="top">
<view style="flex: 1;"> <view style="flex: 1;">
<view class=""> <view class="">
<text class="clr-sub lbwth">订单号</text> <text class="clr-sub lbwth">订单号</text>
<text class="">T2919292</text> <text class="">{{item.billCode}}</text>
</view> </view>
<view class="mt-10"> <view class="mt-10">
<text class="clr-sub lbwth">重量</text> <text class="clr-sub lbwth">重量</text>
@ -38,38 +39,34 @@
</view> </view>
</view> </view>
<view> <view>
<u-icon name="trash" size="30"></u-icon>
</view> </view>
</u-row> </u-row>
</view> </view>
<tpx-empty v-if="resData.list.length == 0" size="sm"></tpx-empty>
</view> </view>
</template> </template>
<template v-slot:footer> <template v-slot:footer>
<!-- <view class="pos-rlt blcok-white" style="border-radius: 0;margin-top: 0;">
<u-row>
<u-button size="large" shape="circle"
custom-style="width: 500rpx;height:80rpx;font-size: 30rpx;" type="primary">打印合包条码</u-button>
</u-row>
</view> -->
</template> </template>
</tpx-layout> </tpx-layout>
</tpx-page>
</template> </template>
<script> <script>
import getCdnUrl from "@/common/getCdnUrl" import { debounce } from "@/common/util"
import { import dayjs from "dayjs"
ordStaEnum, import BoOperatorTmp from "@/components/buns-order-templates/bo-operator-tmp"
ordStatusList, import * as apiService from "@/common/api"
payTypeEnum, import { scanTypeEnum, getScanParams, ansScanResponse } from "@/common/scanUtil"
payTypeList,
dlvTypeEnum,
dlvTypeList,
dateTypeEnum,
dateTypeList
} from "@/common/enum"
import BpeGoodphotoTmp from "@/components/buns-post-edit-templates/bpe-goodphoto-tmp"
import {
goto
} from "@/common/untool"
export default { export default {
components:{ BpeGoodphotoTmp }, components:{ BoOperatorTmp },
props: { props: {
// hasLeftWin: { // hasLeftWin: {
// type: Boolean // type: Boolean
@ -80,41 +77,51 @@
}, },
data() { data() {
return { return {
submitParam: { queryOption: {
date: [], billCode: '', // 运单id
type: 1, },
resData: { list: [] },
siteRes: { list: [] },
submitParam: {
billCode: '',
preOrNextStationCode: '',
}, },
tabType: 1,
tabList: [
{ title: '已扫描', val: 1 }
],
yundanList: [
{ val: 'T7080304037' },{ val: 'T708012124037' },{ val: 'T7080304092' }
]
} }
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
// title: '',
// path: 'TODO'
} }
}, },
onLoad() { onLoad(option) {
this.queryOption = option
this.initData(); this.initData();
}, },
onUnload() { onUnload() {
}, },
methods: { methods: {
getCdnUrl, getPreStationList: apiService.getPreStationList,
initData() { initData() {
// uni.showLoading({ this.submitParam.billCode = this.queryOption.billCode
// title: '加载中'
// });
}, },
handleSubmit() { async handleSubmit(val) {
let extParam = {}
val && (extParam.billCode = val);
let scnParam = getScanParams(scanTypeEnum.chaiBao, { ...this.submitParam, ...extParam })
let res = await apiService.scanRecord({...scnParam, _loading: true})
let { bl, resItem } = ansScanResponse({ res, title: "拆包" })
if(bl) {
this.curScanItem = resItem
this.resData.list.unshift({ ...resItem })
this.resetForm()
}
},
handleScanValChange: debounce(function(val){
val && (this.handleSubmit(val))
}),
resetForm() {
this.submitParam.billCode = ''
this.submitParam.preOrNextStationCode = ''
} }
} }
} }