173 lines
4.6 KiB
Vue
173 lines
4.6 KiB
Vue
<template>
|
|
<tpx-page>
|
|
<tpx-layout>
|
|
<template v-slot:body>
|
|
<view class="com-jianju pos-rlt pb-30" style="padding-top: 2rpx;">
|
|
<view class="blcok-white">
|
|
<u-row justify="between">
|
|
<view style="width: 130rpx;">运单号</view>
|
|
<view style="flex:1;">
|
|
<tpx-scan-input v-model:value="orderNo" @change="handleScanValChange"></tpx-scan-input>
|
|
</view>
|
|
<view class="pl-10">
|
|
<u-button custom-style="height: 74rpx;">确定</u-button>
|
|
</view>
|
|
|
|
</u-row>
|
|
</view>
|
|
|
|
<view v-if="submitParam.orderSn" class="mt-30" @click="handleDialogClick(orderDetailModal)">
|
|
<u-row justify="space-between">
|
|
<view class="com-section">订单号:{{submitParam.orderSn}}</view>
|
|
<view>
|
|
<button size="mini">订单详情</button>
|
|
</view>
|
|
</u-row>
|
|
</view>
|
|
|
|
<view class="blcok-white">
|
|
<bpe-addressjiami-tmp v-model:value="submitParam"></bpe-addressjiami-tmp>
|
|
</view>
|
|
|
|
|
|
<view class="com-section mt-30">托寄货物描述</view>
|
|
<view class="blcok-white">
|
|
<bpe-gooditem-edit-tmp v-model:value="submitParam"></bpe-gooditem-edit-tmp>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="com-section mt-30">揽收备注</view>
|
|
<view class="blcok-white">
|
|
<u-textarea v-model="submitParam.remark" border="surround" height="120" placeholder="备注"
|
|
maxlength="50" count></u-textarea>
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
<template v-slot:footer>
|
|
<view class="pos-rlt blcok-white" style="border-radius: 0;margin-top: 0;">
|
|
<u-row>
|
|
<u-button @click="handleLanShou" size="large" shape="circle"
|
|
custom-style="width: 400rpx;height:80rpx;font-size: 30rpx;" type="primary" >揽收</u-button>
|
|
</u-row>
|
|
</view>
|
|
</template>
|
|
</tpx-layout>
|
|
|
|
<tpx-dialog v-model:show="orderDetailModal.show" title="订单详情" contentStyle="padding:0;">
|
|
<bo-detail-tmp v-model:value="submitParam"></bo-detail-tmp>
|
|
</tpx-dialog>
|
|
</tpx-page>
|
|
</template>
|
|
|
|
<script>
|
|
import { debounce } from "@/common/util"
|
|
import dayjs from "dayjs"
|
|
import BpeAddressjiamiTmp from "@/components/buns-post-edit-templates/bpe-addressjiami-tmp"
|
|
import BpeGooditemEditTmp from "@/components/buns-post-edit-templates/bpe-gooditem-edit-tmp"
|
|
import BpeGoodphotoTmp from "@/components/buns-post-edit-templates/bpe-goodphoto-tmp"
|
|
import BoDetailTmp from "@/components/buns-order-templates/bo-detail-tmp"
|
|
import * as apiService from "@/common/api"
|
|
import { scanTypeEnum, getScanParams, ansScanResponse } from "@/common/scanUtil"
|
|
|
|
export default {
|
|
components: { BpeAddressjiamiTmp, BpeGooditemEditTmp, BpeGoodphotoTmp, BoDetailTmp },
|
|
props: {
|
|
// hasLeftWin: {
|
|
// type: Boolean
|
|
// }
|
|
},
|
|
computed: {
|
|
|
|
},
|
|
data() {
|
|
return {
|
|
billCode: '',
|
|
pageLoading: true,
|
|
queryOption: {
|
|
billCode: '', // 运单id
|
|
orderSn: '', // 订单id
|
|
},
|
|
orderDetailModal: {
|
|
show: false
|
|
},
|
|
submitParam: {
|
|
|
|
}
|
|
}
|
|
},
|
|
onShareAppMessage() {
|
|
return {
|
|
// title: '',
|
|
// path: 'TODO'
|
|
}
|
|
},
|
|
onLoad(option) {
|
|
this.queryOption = option
|
|
this.initData();
|
|
},
|
|
onUnload() {
|
|
|
|
},
|
|
methods: {
|
|
initData() {
|
|
this.billCode = this.queryOption.billCode || this.queryOption.orderSn
|
|
this.billCode && (this.queryOrderDetail(this.queryOption))
|
|
},
|
|
async queryOrderDetail(params) {
|
|
let res = await apiService.getOrderDetail({...params, _loading: true})
|
|
this.submitParam = res.data
|
|
this.pageLoading = false
|
|
},
|
|
handleScanValChange: debounce(function(val){
|
|
val && ( this.queryOrderDetail({ billCode: val, orderSn: val, }) )
|
|
}),
|
|
handleDialogClick(curModal){
|
|
curModal.show = true
|
|
},
|
|
async handleLanShou() {
|
|
await apiService.submitOrder({...this.submitParam, _loading: true})
|
|
let scnParam = getScanParams(scanTypeEnum.lanShou, {
|
|
billCode: this.submitParam.billCode,
|
|
dispatchOrSendManCode: this.submitParam.dispatchOrSendManCode,
|
|
})
|
|
let res = await apiService.scanRecord({...scnParam, _loading: true})
|
|
let { bl, resItem } = ansScanResponse({ res, title: "揽收" })
|
|
if(bl) {
|
|
this.resetForm()
|
|
}
|
|
},
|
|
resetForm() {
|
|
this.submitParam = {}
|
|
this.billCode = ''
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
@import '@/common/uni-nvue.scss';
|
|
|
|
page {
|
|
background-color: #F6F6F6;
|
|
height: 100% !important;
|
|
}
|
|
</style>
|
|
<style scoped lang="scss">
|
|
.yunf-item {
|
|
margin-bottom: 20rpx;
|
|
padding: 30rpx;
|
|
background: #F6F6F6;
|
|
border-radius: 20rpx;
|
|
border: 2rpx solid transparent;
|
|
&.active {
|
|
border-color: $uni-color-primary;
|
|
}
|
|
}
|
|
|
|
.yunf-input-item{
|
|
padding: 26rpx 0;
|
|
border-bottom: 2rpx solid #F6F6F6;
|
|
}
|
|
</style> |