209 lines
6.0 KiB
Vue
209 lines
6.0 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="flex:1;">
|
|
<tpx-scan-input v-model:value="inNo" @scanChange="handleScanValChange"
|
|
phyTrigger="focus"
|
|
></tpx-scan-input>
|
|
</view>
|
|
<view class="pl-10">
|
|
<u-button @click="handleScanValChange" custom-style="height: 74rpx;">确定</u-button>
|
|
</view>
|
|
|
|
</u-row>
|
|
</view>
|
|
|
|
<view v-if="submitParam.inNo" class="mt-30" @click="goto(`post/detail?billCode=${billInfo.billCode}`)">
|
|
<u-row justify="space-between">
|
|
<view class="com-section">进仓单号:{{submitParam.inNo || '-'}}</view>
|
|
<view>
|
|
<button size="mini">订单详情</button>
|
|
</view>
|
|
</u-row>
|
|
</view>
|
|
|
|
<view class="blcok-white">
|
|
<u-row justify="between">
|
|
<view class="font-36 font-weight">{{billInfo.receiveCountryName || '-'}}</view>
|
|
<view class="font-30 font-weight">{{billInfo.productTypeName || '-'}}</view>
|
|
</u-row>
|
|
<u-row custom-style="margin-top:20rpx;" justify="between">
|
|
<view >
|
|
<text class="clr-sub">寄件人:</text>
|
|
<text>{{billInfo.sendName || '-'}}</text>
|
|
</view>
|
|
<view >
|
|
<text class="clr-sub">手机号:</text>
|
|
<text>{{billInfo.sendMobile || '-'}}</text>
|
|
</view>
|
|
</u-row>
|
|
</view>
|
|
|
|
|
|
<view class="com-section mt-30">托寄货物描述</view>
|
|
<view class="blcok-white">
|
|
<tpx-input placeholder="进仓后缀" v-model:value="submitParam.inBatchNo" :isWhite="true"></tpx-input>
|
|
<view class="mt-30">
|
|
<bpe-gooditem-edit-tmp showMode="2" :showGoodSummary="false" :value="submitParam"></bpe-gooditem-edit-tmp>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="blcok-white">
|
|
<bpe-goodphoto-tmp title="货物照片" :value="submitParam" filedName="picUrl"></bpe-goodphoto-tmp>
|
|
</view>
|
|
|
|
<view class="blcok-white">
|
|
<bpe-good-kuaidi-tmp :value="submitParam"></bpe-good-kuaidi-tmp>
|
|
</view>
|
|
|
|
<view class="blcok-white">
|
|
<u-row justify="space-between" align="top" custom-style="margin-top:20rpx;">
|
|
<view >备注</view>
|
|
<view style="width: 70%;">
|
|
<u-textarea v-model="submitParam.remark" border="surround" height="120" placeholder="备注"
|
|
maxlength="300" count></u-textarea>
|
|
</view>
|
|
</u-row>
|
|
</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="handleJinCang" :disabled="!submitParam.inNo" size="large" shape="circle"
|
|
custom-style="width: 260rpx;height:80rpx;font-size: 30rpx;" :plain="true" type="primary">进仓登记</u-button>
|
|
|
|
<u-button @click="handleKaiDan" :disabled="!submitParam.inNo" size="large" shape="circle"
|
|
custom-style="width: 400rpx;height:80rpx;font-size: 30rpx;" type="primary">货齐开单</u-button>
|
|
</u-row>
|
|
</view>
|
|
</template>
|
|
</tpx-layout>
|
|
|
|
</tpx-page>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
import { debounce } from "@/common/util"
|
|
import dayjs from "dayjs"
|
|
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 BpeGoodKuaidiTmp from "@/components/buns-post-edit-templates/bpe-good-kuaidi-tmp"
|
|
import * as apiService from "@/common/api"
|
|
|
|
export default {
|
|
components: { BpeGooditemEditTmp, BpeGoodphotoTmp, BoDetailTmp, BpeGoodKuaidiTmp },
|
|
props: {
|
|
|
|
},
|
|
computed: {
|
|
|
|
},
|
|
data() {
|
|
return {
|
|
inNo: '',
|
|
pageLoading: true,
|
|
queryOption: {
|
|
inNo: '', // 进仓单号
|
|
},
|
|
submitParam: {
|
|
|
|
},
|
|
billInfo: {}
|
|
}
|
|
},
|
|
onShareAppMessage() {
|
|
return {
|
|
}
|
|
},
|
|
onLoad(option) {
|
|
this.queryOption = option
|
|
this.initData();
|
|
},
|
|
onUnload() {
|
|
|
|
},
|
|
methods: {
|
|
initData() {
|
|
this.inNo = this.queryOption.inNo
|
|
this.inNo && (this.queryOrderDetail(this.queryOption))
|
|
},
|
|
async queryOrderDetail(params) {
|
|
let res = await apiService.getWarehouseInInfo({...params, _loading: true})
|
|
if(!res.data) {
|
|
this.showToast("进仓单号数据不存在")
|
|
}
|
|
let data = res.data || {}
|
|
this.submitParam = Object.assign({}, data, {
|
|
pickupMethod: 1,
|
|
cargoList: [],
|
|
entryDate: dayjs().format("YYYY-MM-DD HH:mm:ss"),// 下单时间
|
|
})
|
|
this.billInfo = res?.data?.waybillDetail || []
|
|
this.pageLoading = false
|
|
},
|
|
handleScanValChange: debounce(function(){
|
|
this.queryOrderDetail({ inNo: this.inNo })
|
|
}),
|
|
handleDialogClick(curModal){
|
|
curModal.show = true
|
|
},
|
|
async submitJinang(){
|
|
let params = JSON.parse(JSON.stringify(this.submitParam));
|
|
params.picUrl = params?.picUrl?.join?.(",")
|
|
params._loading = true
|
|
await apiService.registerWarehouseInInfo({...params, _loading: true})
|
|
this.showToast('操作成功')
|
|
},
|
|
async handleJinCang() {
|
|
await this.submitJinang()
|
|
this.resetForm()
|
|
},
|
|
resetForm() {
|
|
this.submitParam = {}
|
|
this.billInfo = {}
|
|
this.inNo = ''
|
|
},
|
|
handleKaiDan(){
|
|
await this.submitJinang()
|
|
let cpData = JSON.parse(JSON.stringify({
|
|
warehouseInNo: this.submitParam.inNo
|
|
}))
|
|
this.goto(`post/openorder?billCode=${this.billInfo.billCode}&defaultSubParams=${encodeURIComponent(JSON.stringify(cpData))}`)
|
|
}
|
|
}
|
|
}
|
|
</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> |