emis-app/pages/post/openorder.vue
2024-04-27 17:59:09 +08:00

368 lines
13 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<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="submitParam.billCode"></tpx-scan-input>
</view>
<view class="pl-10">
<u-button @click="handleCreateOrderNo()"
custom-style="font-size: 28rpx;padding:0 10rpx;height: 74rpx;" :plain="true" >系统生成</u-button>
</view>
</u-row>
<u-row justify="between" custom-style="margin-top:20rpx;">
<view style="width: 130rpx;">客户</view>
<view style="flex:1;">
<tpx-select v-model:resObject="kehuRes" :getListFun="getCustomerUserList" :transKeyVal="{valKey: 'customerCode',titleKey: 'customerFullName'}" v-model:value="submitParam.customerCode" :isWhite="true"></tpx-select>
</view>
</u-row>
</view>
<view class="com-section mt-30" @click="goto('post/detail')">
<u-row justify="space-between">
<text>订单号:TWO291929</text>
<u-icon name="bag" size="42"></u-icon>
</u-row>
</view>
<view class="blcok-white">
<!-- 地址选择 -->
<bpe-addressinfo-tmp v-model:value="submitParam"></bpe-addressinfo-tmp>
</view>
<view class="com-section mt-30">路线信息</view>
<view class="blcok-white" style="padding-top: 0;padding-bottom: 0;">
<view>
<template v-if="submitParam.reciever.country && submitParam.sender.country">
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.transLine" v-model:resObject="wayRes" :getListFun="getTransLineList" :transKeyVal="{valKey: 'lineCode',titleKey: 'lineName'}" :customInput="true"
:searchParam="waySearchParam"
>
<tpx-text-item label="线路" :value="submitParam.transLine" :list="wayRes.list"></tpx-text-item>
</tpx-select>
</view>
</template>
<template v-if="submitParam.transLine">
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.productType" v-model:resObject="productRes" :getListFun="getTransProductList" :transKeyVal="{valKey: 'prodCode',titleKey: 'prodName'}" :isWhite="true" :customInput="true"
:searchParam="productSearchParam"
>
<tpx-text-item label="产品类型" :value="submitParam.productType" :list="productRes.list"></tpx-text-item>
</tpx-select>
</view>
</template>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.customsEclaration" :list="dicData.emis_declare_mode"
mode="drop" customInput="true"
>
<tpx-text-item label="报关方式" :value="submitParam.customsEclaration" :list="dicData.emis_declare_mode"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.customsClear" :list="dicData.emis_customs_clear"
mode="drop" customInput="true"
>
<tpx-text-item label="清关方式" :value="submitParam.customsClear" :list="dicData.emis_customs_clear"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.pickupMethod" :list="dicData.emis_qujian_fangshi"
mode="drop" customInput="true"
>
<tpx-text-item label="取件方式" :value="submitParam.pickupMethod" :list="dicData.emis_qujian_fangshi"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.operateEmployeeCode" v-model:resObject="caozuoRes" :getListFun="getOpStaffList" :transKeyVal="{valKey: 'empCode',titleKey: 'empName'}" :customInput="true">
<tpx-text-item label="操作员" :value="submitParam.operateEmployeeCode" :list="caozuoRes.list"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.takePieceEmployeeCode" v-model:resObject="shoupaiRes" :getListFun="getRSDStaffList" :transKeyVal="{valKey: 'empCode',titleKey: 'empName'}" :customInput="true">
<tpx-text-item label="收派员" :value="submitParam.takePieceEmployeeCode" :list="shoupaiRes.list"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.paymentType" :list="dicData.emis_payment_type"
mode="drop" customInput="true"
>
<tpx-text-item label="付款方式" :value="submitParam.paymentType" :list="dicData.emis_payment_type"></tpx-text-item>
</tpx-select>
<view v-if="submitParam.paymentType == 6" class="pt-10">
<u-textarea v-model="submitParam.feeRemaker" border="surround" height="120" placeholder="备注"
maxlength="50" count></u-textarea>
</view>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.custNo" v-model:resObject="yuejieRes" :getListFun="getMonthpayAccountList" :transKeyVal="{valKey: 'custNo',titleKey: 'custName'}" :customInput="true"
@onChange="handleYueJieSelect"
>
<tpx-text-item label="月结账户" :value="submitParam.custNo" :list="yuejieRes.list"></tpx-text-item>
</tpx-select>
</view>
<template v-if="submitParam.custNo">
<view class="yunf-input-item">
<tpx-text-item label="月结编号" :value="submitParam.custNo"></tpx-text-item>
</view>
<view class="yunf-input-item">
<tpx-text-item label="销售联系人" :value="submitParam.salesmenName"></tpx-text-item>
</view>
<view class="yunf-input-item">
<tpx-text-item label="回款联系人" :value="submitParam.payeeName"></tpx-text-item>
</view>
</template>
<view v-if="submitParam.transLine" class="yunf-input-item">
<tpx-select v-model:value="submitParam.destinationCode" v-model:resObject="destPostRes" :getListFun="getDestPositionList" :transKeyVal="{valKey: 'prodCode',titleKey: 'prodName'}" :isWhite="true" :customInput="true"
:searchParam="destPostParam"
>
<tpx-text-item label="目的地" :value="submitParam.destinationCode" :list="destPostRes.list"></tpx-text-item>
</tpx-select>
</view>
<view v-if="submitParam.destinationCode" class="yunf-input-item">
<tpx-text-item label="目的网点" :value="submitParam.payeeName"></tpx-text-item>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.type2" :list="[]"
mode="drop" customInput="true"
>
<u-row justify="between">
<text class="font-26 font-weight">进仓单</text>
<u-row justify="end" align="center">
<u-text align="right" margin="0 12rpx 0 0" size="26" text="请选择"></u-text>
<u-icon size="26" name="arrow-right" color="#333"></u-icon>
</u-row>
</u-row>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-select v-model:value="submitParam.dispatchMethod" :list="dicData.emis_tab_dispatch_mode"
mode="drop" customInput="true"
>
<tpx-text-item label="派送方式" :value="submitParam.dispatchMethod" :list="dicData.emis_tab_dispatch_mode"></tpx-text-item>
</tpx-select>
</view>
<view class="yunf-input-item">
<tpx-text-item label="寄件短信">
<template v-slot:right>
<text class="pr-20 clr-sub">是否短信</text>
<u-switch v-model="submitParam.blMessage" active-color="#B12D29" size="34"></u-switch>
</template>
</tpx-text-item>
</view>
<view class="yunf-input-item">
<tpx-text-item label="收件短信">
<template v-slot:right>
<text class="pr-20 clr-sub">是否短信</text>
<u-switch v-model="submitParam.blAcceptMessage" active-color="#B12D29" size="34"></u-switch>
</template>
</tpx-text-item>
</view>
</view>
</view>
<view class="com-section mt-30" @click="handleDialogClick(goodChooseModal)">
<u-row justify="space-between">
<text>发货信息(进仓情况)</text>
<u-icon name="edit-pen" size="42"></u-icon>
</u-row>
</view>
<view class="blcok-white">
<bpe-goodstatic-tmp v-model:value="submitParam"></bpe-goodstatic-tmp>
</view>
<view class="com-section mt-30">
<u-row justify="space-between">
<text>计费信息</text>
</u-row>
</view>
<view class="blcok-white">
<bpe-cost-tmp v-model:value="submitParam"></bpe-cost-tmp>
</view>
<view class="com-section mt-30">
<u-row justify="space-between">
<text>备注</text>
</u-row>
</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 size="large" shape="circle"
custom-style="width: 260rpx;height:80rpx;font-size: 30rpx;" :plain="true" type="primary">保存</u-button>
<u-button size="large" shape="circle"
custom-style="width: 400rpx;height:80rpx;font-size: 30rpx;" type="primary" >确认并打印</u-button>
</u-row>
</view>
</template>
</tpx-layout>
<buns-edit-sheet percentHeight="70" title="商品信息" v-model:show="goodChooseModal.show" v-model:value="submitParam" v-slot="tempObject">
<view class="mb-20">托寄货物描述</view>
<bpe-gooditem-edit-tmp :value="tempObject.value"></bpe-gooditem-edit-tmp>
<view class="mt-30">
<bpe-goodphoto-tmp title="货物照片" :value="tempObject.value" filedName="phName"></bpe-goodphoto-tmp>
</view>
<view class="mt-30">
<bpe-good-kuaidi-tmp :value="tempObject.value"></bpe-good-kuaidi-tmp>
</view>
</buns-edit-sheet>
</template>
<script>
// import { sendTypeEnum } from "@/common/enum"
import BpeAddressinfoTmp from "@/components/buns-post-edit-templates/bpe-addressinfo-tmp"
import BpeGoodstaticTmp from "@/components/buns-post-edit-templates/bpe-goodstatic-tmp"
import BpeCostTmp from "@/components/buns-post-edit-templates/bpe-cost-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 BpeGoodKuaidiTmp from "@/components/buns-post-edit-templates/bpe-good-kuaidi-tmp"
import * as apiService from "@/common/api"
import { getOrderModels } from "./model"
export default {
components: { BpeAddressinfoTmp, BpeGoodstaticTmp, BpeCostTmp, BpeGooditemEditTmp, BpeGoodphotoTmp, BpeGoodKuaidiTmp },
props: {
// hasLeftWin: {
// type: Boolean
// }
},
computed: {
waySearchParam() {
return { country: this.submitParam.reciever.country, fromCountry: this.submitParam.sender.country }
},
productSearchParam() {
return { transLineCode: this.submitParam.transLine }
},
destPostParam(){
return { lineCode: this.submitParam.transLine, ...this.submitParam.reciever }
},
dicData() {
return this.$store.getters.dicData
}
},
data() {
return {
kehuRes: { list: [] },
wayRes: { list: [] },
productRes: { list: [] },
caozuoRes: { list: [] },
shoupaiRes: { list: [] },
yuejieRes: { list: [] },
destPostRes: { list: [] },
goodChooseModal: {
show: false,
},
submitParam: {
...getOrderModels(),
}
}
},
onShareAppMessage() {
return {
// title: '',
// path: 'TODO'
}
},
onLoad() {
this.initData();
this.initEvent()
},
unmounted() {
},
methods: {
getCustomerUserList: apiService.getCustomerUserList,
getTransLineList: apiService.getTransLineList,
getTransProductList: apiService.getTransProductList,
getOpStaffList: apiService.getOpStaffList,
getRSDStaffList: apiService.getRSDStaffList,
getMonthpayAccountList: apiService.getMonthpayAccountList,
getDestPositionList: apiService.getDestPositionList,
getCaculteDestSite: apiService.getCaculteDestSite,
async initData() {
// uni.showLoading({
// title: '加载中'
// });
this.showLoading()
this.hideLoading()
},
initEvent() {
},
async handleCreateOrderNo() {
const res = await apiService.createOrderNo()
this.submitParam.billCode = res.data
},
handleYueJieSelect(val) {
const item = this.yuejieRes.list.filter(t=> t.val == val)[0]
this.submitParam.payee = item.payee
this.submitParam.salesmen = item.salesmen
this.submitParam.salesmenName = item.salesmenName
this.submitParam.payeeName = item.payeeName
},
handleDialogClick(curModal){
curModal.show = true
}
}
}
</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>