2024-05-25 09:37:09 +00:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="app-container" >
|
2024-12-25 23:55:49 +00:00
|
|
|
|
<el-form ref="form" size="mini" :model="form" :rules="rules" :disabled="this.action=='modify' && this.form.lockFlag=='T'" label-width="100px">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-collapse v-model="activeNames">
|
|
|
|
|
|
<el-collapse-item title="" name="1">
|
|
|
|
|
|
<template slot="title">
|
2024-05-31 00:36:52 +00:00
|
|
|
|
<div style="display:inline-flex">
|
|
|
|
|
|
<div class="form-group-title"><span class="title">{{ $t('发货信息') }}</span></div>
|
|
|
|
|
|
</div>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</template>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
2024-05-31 00:36:52 +00:00
|
|
|
|
<!-- 运单录入 -->
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
2024-12-25 09:41:43 +00:00
|
|
|
|
<el-col :span="6" v-if="action=='add' || action=='preAdd' || action=='got'">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-form-item :label="$t('发货时间')" prop="sendDate">
|
2024-05-31 00:36:52 +00:00
|
|
|
|
<el-input v-model="sendDate" placeholder="" disabled />
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
2024-12-25 09:41:43 +00:00
|
|
|
|
<el-col :span="18" v-if="action=='add' || action=='preAdd' || action=='got'">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('运单号')" prop="billCode" >
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<div style="display:inline-flex">
|
|
|
|
|
|
<div>
|
2024-12-25 09:41:43 +00:00
|
|
|
|
<el-input v-model="form.billCode" placeholder="" @blur="onBillCodeChange" style="font-weight:600;color:black" :disabled="this.action=='got'" />
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</div>
|
2024-12-25 09:41:43 +00:00
|
|
|
|
<div style="padding-left:5px"> <el-checkbox v-model="form.blSelfBillCode" style="font-size:400;margin-right:10px;font-size:10px" :disabled="this.action=='got'" @change="checked=>handleBillCodeChange(checked)" :true-label="'1'" :false-label="'0'"><span style="font-size:10px">{{ $t('电子主单') }}</span></el-checkbox></div>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-12-25 09:41:43 +00:00
|
|
|
|
<!-- <el-col :span="8" v-if="action=='got'">
|
2024-07-29 00:20:56 +00:00
|
|
|
|
<el-form-item :label="$t('寄件网点')" prop="sendSiteCode">
|
|
|
|
|
|
<EmisSiteSimplePicker v-if="$store.getters.ownerSiteCode== '88888'" v-model="form.sendSiteCode" @onChange="onSendSiteSelect" ></EmisSiteSimplePicker>
|
|
|
|
|
|
<el-input v-else v-model="form.sendSiteName" placeholder="" disabled />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col> -->
|
2024-05-28 04:15:10 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<!-- 运单录入 end -->
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 运单修改 -->
|
|
|
|
|
|
<el-col :span="8" v-if="action=='modify'">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('运单号')" prop="billCode" >
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<div style="display:inline-flex">
|
|
|
|
|
|
<div>
|
2024-05-31 11:59:20 +00:00
|
|
|
|
<el-form :disabled="false" @submit.native.prevent>
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-input v-model="form.billCode" :placeholder="$t('单号输入后按回车')" @keyup.enter.native="handleScanInput" :disabled="false" style="font-weight:600;color:black" >
|
2024-05-31 11:59:20 +00:00
|
|
|
|
<i slot="suffix" class="iconfont"></i>
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</el-form>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="6" v-if="action=='modify'">
|
|
|
|
|
|
<el-form-item :label="$t('发货时间')" prop="sendDate">
|
2024-05-31 00:36:52 +00:00
|
|
|
|
<el-input v-model="form.sendDate" placeholder="" disabled />
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="10" v-if="action=='modify'">
|
|
|
|
|
|
</el-col>
|
2024-05-28 04:15:10 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<!-- 运单修改 end -->
|
|
|
|
|
|
<el-col :span="6">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('目的国')" prop="destinationCountry">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<CountryPicker0 v-model="form.destinationCountry" @onChange="onDestCountryChange"></CountryPicker0>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('产品类型')" prop="productType">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<TransProductCasPicker v-model="form.productTypeSelArr" :countryCode="form.destinationCountry" @onChange="onProductChange" ></TransProductCasPicker>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="5">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('报关方式')" prop="customsEclaration">
|
|
|
|
|
|
<el-select v-model="form.customsEclaration" placeholder="" @change="calcBillFee">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in dict.type.emis_declare_mode"
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="5">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('清关方式')" prop="customsClear">
|
|
|
|
|
|
<el-select v-model="form.customsClear" placeholder="" @change="calcBillFee">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in dict.type.emis_customs_clear"
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="6">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('取件方式')" prop="pickupMethod">
|
|
|
|
|
|
<el-select v-model="form.pickupMethod" placeholder="" @change="calcBillFee">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in dict.type.emis_qujian_fangshi"
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="6" v-if="form.pickupMethod==2">
|
|
|
|
|
|
<el-form-item :label="$t('取件员')" prop="takePieceEmployeeCode" >
|
2025-07-17 02:43:25 +00:00
|
|
|
|
<EmisUserSimplePicker0 :placeholder="$t('取件员')" :siteCode="form.startSiteCode" v-model="form.takePieceEmployeeCode" postCode="RSD" ></EmisUserSimplePicker0>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="6" v-if="form.pickupMethod==1">
|
|
|
|
|
|
<el-form-item :label="$t('操作员')" prop="operateEmployeeCode" >
|
2025-07-17 02:43:25 +00:00
|
|
|
|
<EmisUserSimplePicker1 :placeholder="$t('操作员')" :siteCode="form.startSiteCode" v-model="form.operateEmployeeCode" postCode="OP" ></EmisUserSimplePicker1>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
2024-06-20 04:37:30 +00:00
|
|
|
|
<el-col :span="6">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('派件方式')" prop="dispatchMethod">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-radio-group v-model="form.dispatchMethod">
|
|
|
|
|
|
<el-radio
|
|
|
|
|
|
v-for="dict in dict.type.emis_tab_dispatch_mode"
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
:label="dict.value"
|
|
|
|
|
|
>
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<span >{{ $t(dict.label) }}</span>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-radio>
|
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-06-20 04:37:30 +00:00
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
|
|
|
|
|
<el-col :span="8">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('月结客户')" prop="custNo" :rules="(form.paymentType == 2 || form.paymentType == 4 || form.paymentType == 5)?rules.custNo:[]" >
|
2024-06-20 04:37:30 +00:00
|
|
|
|
<EmisMonthpayAccountPicker v-model="form.custNo" @onChange="onSelectMonthUser"></EmisMonthpayAccountPicker>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-06-21 17:54:53 +00:00
|
|
|
|
<el-col :span="6">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('回款联系人')" prop="payee" label-width="85px">
|
2024-06-21 17:54:53 +00:00
|
|
|
|
<PayeePicker v-if="form.paymentType == 2 || form.paymentType == 4 || form.paymentType == 5" :placeholder="$t('回款联系人')" v-model="form.payee" :disabled="true" ></PayeePicker>
|
|
|
|
|
|
<PayeePicker v-else :placeholder="$t('回款联系人')" v-model="form.payee" ></PayeePicker>
|
|
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="6">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('销售联系人')" prop="salesmen" label-width="85px">
|
2024-06-21 17:54:53 +00:00
|
|
|
|
<SalemanPicker v-if="form.paymentType == 2 || form.paymentType == 4 || form.paymentType == 5" :placeholder="$t('销售联系人')" v-model="form.salesmen" :disabled="true" ></SalemanPicker>
|
|
|
|
|
|
<SalemanPicker v-else :placeholder="$t('销售联系人')" v-model="form.salesmen" ></SalemanPicker>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
2024-06-20 04:37:30 +00:00
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-col>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
|
|
|
|
|
</el-row>
|
2024-07-29 00:20:56 +00:00
|
|
|
|
<!-- v-if="action=='add' || action=='preAdd'" -->
|
2025-06-23 03:33:49 +00:00
|
|
|
|
<div style="position: absolute;right: 80px;top: 40px;z-index: 100;">
|
2024-07-29 00:20:56 +00:00
|
|
|
|
<!-- -->
|
|
|
|
|
|
<div style="display:inline-flex;font-size: 15px;font-weight: 700;">
|
2024-05-31 00:36:52 +00:00
|
|
|
|
|
|
|
|
|
|
<div style="width:230px">
|
|
|
|
|
|
<el-form-item prop="sendSiteCode">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<span slot="label" style="color:gray">{{ $t('寄件网点') }}:</span>
|
2024-05-31 00:36:52 +00:00
|
|
|
|
<EmisSiteSimplePicker v-if="$store.getters.ownerSiteCode== '88888'" v-model="form.sendSiteCode" @onChange="onSendSiteSelect" ></EmisSiteSimplePicker>
|
|
|
|
|
|
<el-input v-else v-model="form.sendSiteName" placeholder="" disabled />
|
2025-06-21 08:17:06 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<!-- 始发网点 -->
|
|
|
|
|
|
<el-form-item prop="startSiteCode">
|
|
|
|
|
|
<span slot="label" style="color:gray">{{ $t('始发网点') }}:</span>
|
2025-06-23 09:52:06 +00:00
|
|
|
|
<EmisSiteSimplePicker v-model="form.startSiteCode" @onChange="onStartSiteSelect" ></EmisSiteSimplePicker>
|
|
|
|
|
|
<!-- <el-input v-else v-model="form.startSiteName" placeholder="" disabled /> -->
|
2024-05-31 00:36:52 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</div>
|
2024-07-29 00:20:56 +00:00
|
|
|
|
<div style="margin-left: 12px;" v-if="totalAvailablePag.mainHasCnt>0">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
{{ $t('主单剩余') }}:<span>{{ totalAvailablePag.mainHasCnt }}</span>
|
2024-05-31 00:36:52 +00:00
|
|
|
|
</div>
|
2024-07-29 00:20:56 +00:00
|
|
|
|
<div v-if="totalAvailablePag.mainHasCnt>0">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
{{ $t('子单剩余') }}:<span>{{ totalAvailablePag.subHasCnt }}</span>
|
2024-05-31 00:36:52 +00:00
|
|
|
|
</div>
|
2024-07-29 00:20:56 +00:00
|
|
|
|
<div v-else @click="handleApplyPag" style="font-size: 15px;font-weight: 700;color:red;cursor: pointer;">{{ $t('主单余量') }}:0,{{ $t('请立即') }}【<span style="color:blue">{{ $t('申购') }}</span>】</div>
|
2024-05-31 00:36:52 +00:00
|
|
|
|
</div>
|
2024-07-29 00:20:56 +00:00
|
|
|
|
<!-- <div >
|
|
|
|
|
|
<div v-if="totalAvailablePag.mainHasCnt>0" style="font-size: 15px;font-weight: 700;color:red;cursor: pointer;">{{ $t('主单余量') }}:0,{{ $t('请立即') }}【<span style="color:blue">{{ $t('申购') }}</span>】</div>
|
|
|
|
|
|
</div> -->
|
2024-05-31 00:36:52 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</el-collapse-item>
|
|
|
|
|
|
<el-collapse-item title="" name="2">
|
|
|
|
|
|
<template slot="title">
|
|
|
|
|
|
<div class="form-group-title"><span class="title">{{ $t('收寄件信息') }}</span></div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;border: 1px dotted #f5f7fa;border-radius: 5px;">
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;background: #fdfdfd;padding:15px">
|
|
|
|
|
|
<el-col :span="24" style="display:inline-flex; margin-bottom: 10px;border-bottom: 1px dotted #e6ebf5">
|
|
|
|
|
|
<div class="form-group-title" style="width:50%">
|
|
|
|
|
|
<span style="border-radius: 15px;
|
|
|
|
|
|
padding: 5px 15px;
|
|
|
|
|
|
background: black;
|
|
|
|
|
|
font-size: 13px;
|
2024-06-26 23:31:39 +00:00
|
|
|
|
color: white;">{{ $t('寄件信息') }}</span>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
<div style="width:50%;text-align:right;padding-right: 15px;">
|
|
|
|
|
|
<!-- icon="el-icon-edit" -->
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
style="cursor:hand;font-weight:700;border:1px dotted #e2d8d8;padding: 2px 5px;color: black;"
|
|
|
|
|
|
class="iconfont icon-dizhibao"
|
|
|
|
|
|
@click="handleSelectCustomerAddress(1)"
|
2024-06-26 23:31:39 +00:00
|
|
|
|
>{{ $t('寄件地址薄') }}</el-button>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('寄件人')" prop="sender.name">
|
2024-05-26 09:46:38 +00:00
|
|
|
|
<CustomerAddressSimplePicker0 addressType="1" :useSiteCode="form.sendSiteCode" v-model="form.sender.name" @onChange="onChangeSelectSender"></CustomerAddressSimplePicker0>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('寄件电话')" prop="sender.phone">
|
2024-11-04 23:36:43 +00:00
|
|
|
|
<el-input v-model="form.sender.phone" placeholder="" maxlength="30"/>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="24">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('寄件公司')" prop="sender.company"
|
2024-05-25 09:37:09 +00:00
|
|
|
|
:rules="form.paymentType != 2 ? rules.sender.company : []"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="form.sender.company" placeholder="" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="24">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('国家地区')" prop="sender.province" >
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<div style="display:inline-flex">
|
|
|
|
|
|
<country-picker1 v-model="form.sender.country" ></country-picker1>
|
2025-07-17 05:33:17 +00:00
|
|
|
|
<province-picker1 v-model="form.sender.province" :countryCode="form.sender.country" style="margin-left:5px" @onChange="onChangeSenderProvince"></province-picker1>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<city-picker1 v-model="form.sender.city" :parentCode="form.sender.province" style="margin-left:5px"></city-picker1>
|
|
|
|
|
|
<district-picker1 v-model="form.sender.county" :parentCode="form.sender.city" style="margin-left:5px"></district-picker1>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="24">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('寄件地址')" prop="sender.address">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-input v-model="form.sender.address" rows="3" type="textarea" placeholder="" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
<el-form-item label="" prop="blMessage">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-checkbox style="font-size:400;margin-right:10px;font-size:10px" v-model="form.blMessage" :true-label="'1'" :false-label="'0'"><span style="font-size:10px"> {{ $t('寄件/签收短信') }} </span></el-checkbox>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2025-08-28 09:05:55 +00:00
|
|
|
|
<el-col :span="12" v-if="form.sender.country=='0086' ">
|
2025-08-25 08:08:28 +00:00
|
|
|
|
<el-form-item :label="$t('企业名称')" prop="sender.enterpriseName">
|
2025-10-15 06:15:50 +00:00
|
|
|
|
<el-input v-model="form.sender.enterpriseName" placeholder="请输入企业名称" :disabled="['2','4','5'].includes(form.paymentType)" @change="checkEnterprise(form.sender.enterpriseName)"></el-input>
|
2025-08-28 09:05:55 +00:00
|
|
|
|
|
2025-08-25 08:08:28 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2025-08-28 09:05:55 +00:00
|
|
|
|
<el-col :span="12" v-if="form.sender.country=='0086' ">
|
2025-08-25 08:08:28 +00:00
|
|
|
|
<el-form-item :label="$t('企业税号')" prop="sender.enterpriseTaxId">
|
2025-08-28 09:05:55 +00:00
|
|
|
|
<el-input v-model="form.sender.enterpriseTaxId" placeholder="请输入企业税号" :disabled="['2','4','5'].includes(form.paymentType)"></el-input>
|
|
|
|
|
|
|
2025-08-25 08:08:28 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;padding:15px">
|
|
|
|
|
|
<el-col :span="24" style="display:inline-flex;margin-bottom: 10px;border-bottom: 1px dotted #e6ebf5">
|
|
|
|
|
|
<div class="form-group-title" style="width:50%">
|
|
|
|
|
|
<span style="border-radius: 15px;
|
|
|
|
|
|
padding: 5px 15px;
|
|
|
|
|
|
background: #b12e29;
|
|
|
|
|
|
font-size: 13px;
|
2024-06-26 23:31:39 +00:00
|
|
|
|
color: white;"> {{ $t('收件信息') }}</span>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
<div style="width:50%;text-align:right;padding-right: 15px;">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
style="cursor:hand;font-weight:700;border:1px dotted #e2d8d8;padding: 2px 5px;"
|
|
|
|
|
|
class="iconfont icon-dizhibao"
|
|
|
|
|
|
@click="handleSelectCustomerAddress(2)"
|
2024-06-26 23:31:39 +00:00
|
|
|
|
> {{ $t('收件地址薄') }}</el-button>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('收件人')" prop="reciever.name">
|
2024-05-26 09:46:38 +00:00
|
|
|
|
<CustomerAddressSimplePicker1 addressType="2" :useSiteCode="form.sendSiteCode" :countryCode="form.reciever.country" v-model="form.reciever.name" @onChange="onChangeSelectReceiver"></CustomerAddressSimplePicker1>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('收件电话')" prop="reciever.phone">
|
2024-11-04 23:36:43 +00:00
|
|
|
|
<el-input v-model="form.reciever.phone" placeholder="" maxlength="30"/>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="24">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('收件公司')" prop="reciever.company"
|
2024-05-25 09:37:09 +00:00
|
|
|
|
:rules="form.paymentType != 4 ? rules.reciever.company : []"
|
|
|
|
|
|
>
|
2025-10-15 06:15:50 +00:00
|
|
|
|
<el-input v-model="form.reciever.company" placeholder="" @change="checkRecieverCompany(form.reciever.company)"/>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="24">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('国家地区')" prop="reciever.province">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<div style="display:inline-flex">
|
2024-05-25 14:22:10 +00:00
|
|
|
|
<country-picker2 v-model="form.reciever.country" ></country-picker2>
|
2025-07-17 05:33:17 +00:00
|
|
|
|
<ProvincePicker2 v-model="form.reciever.province" :countryCode="form.reciever.country" style="margin-left:5px" @onChange="onChangeRecieverProvince"></ProvincePicker2>
|
2024-06-28 02:32:32 +00:00
|
|
|
|
<city-picker2 v-model="form.reciever.city" :parentCode="form.reciever.province" style="margin-left:5px" @onChange="handleCalcDestSite" ></city-picker2>
|
|
|
|
|
|
<district-picker2 v-model="form.reciever.county" :parentCode="form.reciever.city" style="margin-left:5px" @onChange="handleCalcDestSite" ></district-picker2>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="24">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('收件地址')" prop="reciever.address">
|
2025-10-15 06:15:50 +00:00
|
|
|
|
<el-input v-model="form.reciever.address" type="textarea" rows="3" placeholder="" @change="handleRecieverAddressChange"/>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('目的地')" prop="destinationCode">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<DestinationPicker v-model="form.destinationCode" :countryCode="form.reciever.country" :lineCode="form.transLine" @onChange="onDestinationChange"></DestinationPicker>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
2024-06-28 01:40:27 +00:00
|
|
|
|
<el-form-item :label="$t('目的网点')" prop="dispatchUnderlingSiteName">
|
|
|
|
|
|
<el-input v-model="form.dispatchUnderlingSiteName" placeholder="" disabled />
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
<el-form-item label="" prop="blAcceptMessage">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-checkbox style="font-size:400;margin-right:10px;font-size:10px" v-model="form.blAcceptMessage" :true-label="'1'" :false-label="'0'"><span style="font-size:10px"> {{ $t('派件短信') }}</span></el-checkbox>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-collapse-item>
|
|
|
|
|
|
<el-collapse-item title="" name="3">
|
|
|
|
|
|
<template slot="title">
|
|
|
|
|
|
<div class="form-group-title"><span class="title">{{ $t('货物收费信息') }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;padding: 0px 15px;">
|
2024-06-01 11:43:18 +00:00
|
|
|
|
<!-- <el-col :span="24"><div style="font-weight:600">货物信息</div></el-col> -->
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-col :span="24">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('货物大类')" prop="goodsType" label-width="70px">
|
|
|
|
|
|
<GoodsMultiplePicker v-model="form.goodsType" @onChange="onGoodsChange" placeholder=""></GoodsMultiplePicker>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="24">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('货物名称')" prop="goodsInfo" label-width="70px">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-input v-model="form.goodsInfo" type="textarea" placeholder="" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('总件数')" prop="parcelQty" label-width="70px">
|
2024-05-29 01:59:04 +00:00
|
|
|
|
<el-input v-model="form.parcelQty" style="text-align: right;" @blur="handleCargoQtyChangeDebounce" @keyup.enter.native="handleCargoQtyChangeDebounce" placeholder="" />
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('实际重量')" prop="billWeight" label-width="70px">
|
2025-08-11 08:33:17 +00:00
|
|
|
|
<el-input v-model="form.billWeight" style="text-align: right;min-width: 80px" placeholder="" >
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<span slot="suffix">(kg)</span>
|
|
|
|
|
|
</el-input>
|
2024-12-25 09:41:43 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-05-26 10:44:55 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
<el-form-item label="" prop="goodsType" label-width="0px">
|
2024-06-01 11:43:18 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-table
|
|
|
|
|
|
class="cargoList"
|
|
|
|
|
|
:cell-style="{
|
|
|
|
|
|
'padding': '0px!important',
|
|
|
|
|
|
'padding-left': '0px!important',
|
|
|
|
|
|
'padding-right': '0px!important',
|
|
|
|
|
|
'font-size':'11px'
|
|
|
|
|
|
}"
|
|
|
|
|
|
:header-cell-style="{
|
|
|
|
|
|
'font-size':'11px'
|
|
|
|
|
|
}"
|
|
|
|
|
|
border
|
|
|
|
|
|
stripe
|
|
|
|
|
|
:data="form.cargoList"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
max-height="300px"
|
|
|
|
|
|
>
|
|
|
|
|
|
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-table-column :label="$t('序号')" align="center" width="60">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span > {{scope.$index+1}}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-table-column prop="length" :label="$t('长(cm)')" align="center" width="60">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<template slot-scope="scope">
|
2024-08-03 01:50:09 +00:00
|
|
|
|
<!-- @input="(val)=>handleCalcVolumeDebounce(scope.row)" -->
|
|
|
|
|
|
<el-input-number v-model="scope.row.length" @blur="(val)=>handleCalcVolumeDebounce(scope.row)" :ref="'input_'+scope.$index+'_1'" @keyup.enter.native="focusNextInput('input_'+scope.$index+'_2')" size="mini" placeholder="" :min="0" :controls="false" :precision="0"></el-input-number>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-table-column prop="width" :label="$t('宽(cm)')" align="center" width="60">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<template slot-scope="scope">
|
2024-08-03 01:50:09 +00:00
|
|
|
|
<!-- @input="(val)=>handleCalcVolumeDebounce(scope.row)" -->
|
|
|
|
|
|
<el-input-number v-model="scope.row.width" @blur="(val)=>handleCalcVolumeDebounce(scope.row)" :ref="'input_'+scope.$index+'_2'" @keyup.enter.native="focusNextInput('input_'+scope.$index+'_3')" size="mini" placeholder="" :min="0" :controls="false" :precision="0"></el-input-number>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-table-column prop="height" :label="$t('高(cm)')" align="center" width="60">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<template slot-scope="scope">
|
2024-08-03 01:50:09 +00:00
|
|
|
|
<!-- @input="(val)=>handleCalcVolumeDebounce(scope.row)" -->
|
|
|
|
|
|
<el-input-number v-model="scope.row.height" @blur="(val)=>handleCalcVolumeDebounce(scope.row)" :ref="'input_'+scope.$index+'_3'" @keyup.enter.native="focusNextInput('input_'+scope.$index+'_4')" size="mini" placeholder="" :min="0" :controls="false" :precision="0"></el-input-number>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-table-column prop="cargoQty" :label="$t('件数')" align="center" width="60">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<template slot-scope="scope">
|
2024-08-03 01:50:09 +00:00
|
|
|
|
<!-- -->
|
|
|
|
|
|
<el-input-number v-model="scope.row.cargoQty" @blur="(val)=>handleCargoQtyChangeDebounce(scope.row)" :ref="'input_'+scope.$index+'_4'" @keyup.enter.native="(val)=>{ handleCargoQtyChangeDebounce(scope.row); focusNextInput('input_'+(scope.$index+1)+'_1')}" size="mini" placeholder="" :min="0" :controls="false" :precision="0"></el-input-number>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-table-column prop="volume" :label="$t('体积(m³)')" align="center" width="80">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<template slot-scope="scope">
|
2024-08-03 01:50:09 +00:00
|
|
|
|
<span > {{scope.row.volume}}</span>
|
|
|
|
|
|
<!-- <el-input-number v-model="scope.row.volume" size="mini" placeholder="" disabled :min="0" :controls="false" :precision="5"></el-input-number> -->
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- @input="(val)=>handleCalcQty(val,scope.row)" -->
|
|
|
|
|
|
<!-- <el-table-column prop="goodsName" label="描述" align="center" width="60">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-input v-model="scope.row.goodsName" size="mini" placeholder=""></el-input>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
|
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-table-column :label="$t('操作')" align="left" min-width="50">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span class="icon iconfont"
|
|
|
|
|
|
style="cursor: pointer;font-size: 21px;color: #6e6e6e;"
|
|
|
|
|
|
@click="()=>deleteGoodsItem(scope.row,scope.$index)"></span>
|
|
|
|
|
|
<span class="icon iconfont"
|
|
|
|
|
|
style="cursor: pointer;font-size: 21px;color: #6e6e6e;"
|
|
|
|
|
|
@click="()=>copyGoodsItem(scope.row,scope.$index)"></span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('总体积')" prop="totalVolume" label-width="70px" >
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<div style="">
|
2025-08-11 08:33:17 +00:00
|
|
|
|
<el-input v-model="form.totalVolume" style="text-align: right;width: 120px" placeholder="体积" >
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<span slot="suffix">(m³)</span>
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
2024-07-05 12:01:45 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('体积重量')" prop="volumeWeight" label-width="70px">
|
2024-05-26 10:44:55 +00:00
|
|
|
|
<el-input v-model="form.volumeWeight" placeholder="" disabled>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<span slot="suffix">(kg)</span>
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('结算重量')" prop="settlementWeight" label-width="70px">
|
2024-05-26 10:44:55 +00:00
|
|
|
|
<el-input v-model="form.settlementWeight" placeholder="" disabled >
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<span slot="suffix">(kg)</span>
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-07-05 12:01:45 +00:00
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item :label="$t('货值')" prop="realValue" label-width="70px" >
|
|
|
|
|
|
<div style="">
|
|
|
|
|
|
<el-input v-model="form.realValue" style="text-align: right;width: 120px" placeholder="货值" >
|
|
|
|
|
|
<span slot="suffix">(USD)</span>
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-07-09 23:16:51 +00:00
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item :label="$t('附加信息')" prop="extInfo" label-width="70px" >
|
|
|
|
|
|
<div style="">
|
|
|
|
|
|
<el-input v-model="form.extInfo" style="text-align: right;width: 120px" placeholder="附加信息" >
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-col :span="12">
|
2024-10-17 22:52:31 +00:00
|
|
|
|
<el-form-item :label="$t('包装类型')" prop="packType" label-width="70px">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-select multiple="" v-model="form.packType" placeholder="">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in dict.type.emis_tab_packing_type"
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item label="" prop="blOverWeight">
|
|
|
|
|
|
<el-checkbox style="font-size:400;margin-right:10px;font-size:10px" v-model="form.blOverWeight" :true-label="'1'" :false-label="'0'" ><span style="font-size:10px">是否超重</span></el-checkbox>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12" v-if="form.blOverWeight==1">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('超重件数')" prop="overWeightNumber" label-width="70px">
|
|
|
|
|
|
<el-input :disabled="!form.blOverWeight" v-model="form.overWeightNumber" placeholder="" />
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('生成子单')" prop="blGenSubbill" label-width="70px" >
|
2024-06-01 11:43:18 +00:00
|
|
|
|
<el-radio-group v-model="form.blGenSubbill" @change="handleGenSubbill" >
|
|
|
|
|
|
<el-radio :key="'1'" label="1">是</el-radio>
|
|
|
|
|
|
<el-radio :key="'0'" label="0">否</el-radio>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2025-06-25 09:39:08 +00:00
|
|
|
|
<el-col :span="12" v-if="['012','002','014','078'].includes(form.transLine)">
|
2025-06-19 03:35:08 +00:00
|
|
|
|
<el-form-item label="" prop="blVirtual">
|
|
|
|
|
|
<el-checkbox style="font-size:400;margin-right:10px;font-size:10px" v-model="form.blVirtual" :true-label="'1'" :false-label="'0'" @change="handleVirtualChange"><span style="font-size:10px">是否为虚拟单</span></el-checkbox>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2025-06-26 02:13:33 +00:00
|
|
|
|
<el-col :span="12" v-if="['012','002','014','078'].includes(form.transLine) && form.blVirtual === '1' ">
|
2025-06-19 03:35:08 +00:00
|
|
|
|
<el-form-item :label="$t('关联主单')" prop="masterBillCode" label-width="70px">
|
2025-06-23 06:07:48 +00:00
|
|
|
|
<MasterBillCodePicker v-model="form.masterBillCode" :searchParams="masterBillSearchParams" @onMasterBillCodeChange="onMasterBillCodeChange"></MasterBillCodePicker>
|
2025-06-19 03:35:08 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-col :span="24" v-if="form.blGenSubbill==1">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('子单号')" prop="billCodeSub" label-width="70px">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-input v-model="form.billCodeSub" rows="5" type="textarea" placeholder="" disabled />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('进仓单')" prop="warehouseInNo" label-width="70px">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<WarehouseInNoPicker v-model="form.warehouseInNo"></WarehouseInNoPicker>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('合同号')" prop="custOrderId" label-width="70px">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-input v-model="form.custOrderId" placeholder="" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2025-04-25 01:04:28 +00:00
|
|
|
|
<el-col :span="12" v-if="form.carryType==4">
|
|
|
|
|
|
<el-form-item :label="$t('提单号')" prop="ladingBillCode" label-width="70px" >
|
|
|
|
|
|
<div style="">
|
|
|
|
|
|
<el-input v-model="form.ladingBillCode" placeholder="海运提单号" >
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12" v-if="form.carryType==4">
|
|
|
|
|
|
<el-form-item :label="$t('贵司编号')" prop="companyCode" label-width="70px" >
|
|
|
|
|
|
<div style="">
|
|
|
|
|
|
<el-input v-model="form.companyCode" placeholder="贵司编号" >
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12" v-if="form.carryType==4">
|
|
|
|
|
|
<el-form-item :label="$t('起运港')" prop="departurePort" label-width="70px" >
|
|
|
|
|
|
<div style="">
|
2025-04-29 02:20:53 +00:00
|
|
|
|
<SeaSiteSimplePicker0 :placeholder="$t('起运港')" v-model="form.departurePort" ></SeaSiteSimplePicker0>
|
2025-04-25 01:04:28 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12" v-if="form.carryType==4">
|
|
|
|
|
|
<el-form-item :label="$t('目的港')" prop="destinationPort" label-width="70px" >
|
|
|
|
|
|
<div style="">
|
2025-04-29 02:20:53 +00:00
|
|
|
|
<SeaSiteSimplePicker1 :placeholder="$t('目的港')" v-model="form.destinationPort" ></SeaSiteSimplePicker1>
|
2025-04-25 01:04:28 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12" v-if="form.carryType==4">
|
|
|
|
|
|
<el-form-item :label="$t('箱量')" prop="boxQuantity" label-width="70px" >
|
|
|
|
|
|
<div style="">
|
|
|
|
|
|
<el-input v-model="form.boxQuantity" placeholder="箱量" >
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-col :span="24">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('运单备注')" prop="remark" label-width="70px">
|
2024-11-08 09:46:55 +00:00
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="" maxlength="300" oninput="value=value.replace(/[\r|\n]/g,'')"
|
2024-07-05 12:01:45 +00:00
|
|
|
|
show-word-limit />
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12" >
|
|
|
|
|
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;padding: 0px 15px;">
|
|
|
|
|
|
|
2024-05-29 00:48:35 +00:00
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('付款方式')" prop="paymentType" label-width="70px">
|
|
|
|
|
|
<el-select v-model="form.paymentType" placeholder="" @change="onPaymentTypeChange">
|
2024-05-29 00:48:35 +00:00
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="dict in dict.type.emis_payment_type"
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="24" v-show="form.paymentType == 2 || form.paymentType == 4 || form.paymentType == 5">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('付款客户')" prop="custNo" :rules="(form.paymentType == 2 || form.paymentType == 4 || form.paymentType == 5)?rules.custNo:[]" label-width="70px">
|
2024-05-29 00:48:35 +00:00
|
|
|
|
<EmisMonthpayAccountPicker v-model="form.custNo" @onChange="onSelectMonthUser"></EmisMonthpayAccountPicker>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('回款联系人')" prop="payee" label-width="85px">
|
2024-05-29 00:48:35 +00:00
|
|
|
|
<PayeePicker v-if="form.paymentType == 2 || form.paymentType == 4 || form.paymentType == 5" :placeholder="$t('回款联系人')" v-model="form.payee" :disabled="true" ></PayeePicker>
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<PayeePicker v-else :placeholder="$t('回款联系人')" v-model="form.payee" ></PayeePicker>
|
2024-05-29 00:48:35 +00:00
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('销售联系人')" prop="salesmen" label-width="85px">
|
2024-05-29 00:48:35 +00:00
|
|
|
|
<SalemanPicker v-if="form.paymentType == 2 || form.paymentType == 4 || form.paymentType == 5" :placeholder="$t('销售联系人')" v-model="form.salesmen" :disabled="true" ></SalemanPicker>
|
|
|
|
|
|
<SalemanPicker v-else :placeholder="$t('销售联系人')" v-model="form.salesmen" ></SalemanPicker>
|
|
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-col :span="24">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('计费方式')" prop="calcFeeType" label-width="70px">
|
2024-05-31 00:36:52 +00:00
|
|
|
|
<el-radio-group v-model="form.calcFeeType" @change="calcBillFee" >
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<el-radio
|
|
|
|
|
|
v-for="dict in dict.type.emis_calc_fee_type"
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
:label="dict.value"
|
|
|
|
|
|
>{{dict.label}}</el-radio>
|
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('特殊报价')" prop="ext" label-width="70px">
|
2024-10-17 22:52:31 +00:00
|
|
|
|
<el-checkbox style="font-size:400;margin-right:10px;font-size:10px" v-model="form.blSpecialQuote" true-label="1" false-label="0" :disabled="form.calcFeeType==3"> {{ $t('特殊报价') }}</el-checkbox>
|
|
|
|
|
|
<el-checkbox style="font-size:400;margin-right:10px;font-size:10px" v-model="form.blSensitive" true-label="1" false-label="0" :disabled="form.calcFeeType==3"> {{ $t('敏感物') }}</el-checkbox>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
<el-form-item label="" prop="goodsType" label-width="0px">
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
class="cargoList"
|
|
|
|
|
|
:cell-style="{
|
|
|
|
|
|
'padding': '0px!important',
|
|
|
|
|
|
'padding-left': '0px!important',
|
|
|
|
|
|
'padding-right': '0px!important',
|
|
|
|
|
|
'font-size':'11px'
|
|
|
|
|
|
}"
|
|
|
|
|
|
:header-cell-style="{
|
|
|
|
|
|
'font-size':'11px'
|
|
|
|
|
|
}"
|
|
|
|
|
|
border
|
|
|
|
|
|
stripe
|
|
|
|
|
|
:data="form.feeItems"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
max-height="300px"
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-table-column prop="feeName" :label="$t('收费项')" align="center" width="70">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<template slot-scope="scope">
|
2024-07-18 12:05:49 +00:00
|
|
|
|
<span style="font-weight:600;color:red">{{ scope.row.feeName }}({{scope.row.currency}})</span>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-07-18 12:05:49 +00:00
|
|
|
|
<!-- <el-table-column prop="feeName" :label="$t('币种')" align="center" width="50" :show-overflow-tooltip="true">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span><dict-tag :options="dict.type.sys_currency_type" :value="scope.row.currency"/></span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column> -->
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-table-column prop="fee" :label="$t('应收')" align="center" width="50">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span>{{ scope.row.fee }}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-table-column prop="initialWeightFee" :label="$t('首重费')" align="center" width="60">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<template slot-scope="scope">
|
2024-08-03 01:50:09 +00:00
|
|
|
|
<el-input-number v-if="form.blSpecialQuote==1" v-model="scope.row.initialWeightFee" @blur="(val)=>handleCalcFeeItem(scope.row)" @keyup.enter.native="handleCalcFeeItem(scope.row)" size="mini" placeholder="" :min="0.00" :controls="false" :precision="2"></el-input-number>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<div v-else> {{scope.row.initialWeightFee}} </div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-table-column prop="addWeightPrice" :label="$t('续重单价')" align="center" width="70">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<template slot-scope="scope">
|
2024-07-06 00:00:04 +00:00
|
|
|
|
|
2024-08-03 01:50:09 +00:00
|
|
|
|
<el-input-number v-if="form.blSpecialQuote==1" v-model="scope.row.addWeightPrice" @blur="(val)=>handleCalcFeeItem(scope.row)" @keyup.enter.native="handleCalcFeeItem(scope.row)" size="mini" placeholder="" :min="0.00" :controls="false" :precision="2"></el-input-number>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<div v-else> {{scope.row.addWeightPrice}} </div>
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-table-column prop="realFee" :label="$t('实收')" align="center" width="50">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<template slot-scope="scope">
|
2024-08-03 01:50:09 +00:00
|
|
|
|
<el-input-number v-if="form.blSpecialQuote==1 && scope.row.addWeightPrice==0 && scope.row.initialWeightFee==0" v-model="scope.row.realFee" @blur="(val)=>handleCalcFeeItem(scope.row)" @keyup.enter.native="handleCalcFeeItem(scope.row)" size="mini" placeholder="" :min="0.00" :controls="false" :precision="2" ></el-input-number>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<div v-else> {{scope.row.realFee}} </div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-table-column prop="remark" :label="$t('描述')" align="center" min-width="50">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-input v-if="form.blSpecialQuote==1" v-model="scope.row.remark" size="mini" placeholder=""></el-input>
|
|
|
|
|
|
<div v-else> {{scope.row.remark}} </div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-table-column :label="$t('操作')" align="center" width="50">
|
2024-05-25 09:37:09 +00:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span class="icon iconfont"
|
|
|
|
|
|
style="cursor: pointer;font-size: 21px;color: #6e6e6e;"
|
|
|
|
|
|
v-if="scope.row.blAutoGen==0"
|
|
|
|
|
|
@click="()=>deleteFeeItem(scope.row)"></span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<el-popover
|
|
|
|
|
|
trigger="click"
|
|
|
|
|
|
ref="popoverFeeRef"
|
|
|
|
|
|
placement="top"
|
|
|
|
|
|
:width="400"
|
|
|
|
|
|
effect="light"
|
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
|
>
|
|
|
|
|
|
<feeItemForm :triggerCount="triggerCount" :feeList="this.form.feeItems" @on-changed="onFeeItemChange" @on-cancel="onFeeItemChange"></feeItemForm>
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
slot="reference"
|
|
|
|
|
|
style="padding: 0px;font-size: 12px;"
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
|
@click="handleAddFee"
|
2024-10-17 22:52:31 +00:00
|
|
|
|
:disabled="form.calcFeeType==3"
|
2024-06-26 23:31:39 +00:00
|
|
|
|
>{{ $t('增加自定义费用') }}</el-button>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-popover>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2025-06-11 08:00:29 +00:00
|
|
|
|
<el-col :span="12">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('总运费')" prop="freight" label-width="70px">
|
2025-06-11 08:00:29 +00:00
|
|
|
|
<el-input v-if="form.calcFeeType == 3" v-model="form.freight" placeholder="" oninput="value=value.replace(/[^\d.]/g,'')" >
|
|
|
|
|
|
<span slot="suffix">(CNY)</span>
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
<el-input v-else v-model="form.freight" disabled placeholder="" >
|
|
|
|
|
|
<span slot="suffix">(CNY)</span>
|
|
|
|
|
|
</el-input>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form-item>
|
2025-06-11 08:00:29 +00:00
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12"></el-col>
|
|
|
|
|
|
<el-col :span="24">
|
2024-07-18 13:24:03 +00:00
|
|
|
|
<!-- <el-form-item :label="$t('汇率')" prop="exchangeRate" label-width="70px">
|
|
|
|
|
|
<ExchangeRatePanel from="USD" to="CNY" v-model="exchangeRate"></ExchangeRatePanel>
|
|
|
|
|
|
</el-form-item> -->
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('费用备注')" prop="feeRemark" label-width="70px">
|
2024-07-05 12:01:45 +00:00
|
|
|
|
<el-input v-model="form.feeRemark" type="textarea" maxlength="150"
|
2024-07-06 00:08:04 +00:00
|
|
|
|
show-word-limit placeholder="" oninput="value=value.replace(/[\r|\n]/g,'')" >
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-input>
|
|
|
|
|
|
</el-form-item>
|
2025-03-28 01:08:59 +00:00
|
|
|
|
<el-form-item :label="$t('代收备注')" prop="codFeeDesc" label-width="70px">
|
|
|
|
|
|
<el-input v-model="form.codFeeDesc" maxlength="50"
|
|
|
|
|
|
show-word-limit placeholder="" oninput="value=value.replace(/[\r|\n]/g,'')" >
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</el-form-item>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-col>
|
|
|
|
|
|
|
2024-12-25 09:41:43 +00:00
|
|
|
|
<el-col :span="24" v-if="action=='add' || action=='preAdd' || action=='got' ">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('打印选项')" prop="printTypeCheckList">
|
2024-06-21 17:54:53 +00:00
|
|
|
|
<el-checkbox-group v-model="form.printTypeCheckList">
|
|
|
|
|
|
<el-checkbox :key="0" :label="0" >
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<span >{{$t('客户联')}}</span>
|
2024-06-21 17:54:53 +00:00
|
|
|
|
</el-checkbox>
|
|
|
|
|
|
<el-checkbox :key="1" :label="1" >
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<span >{{$t('寄件网点存根联')}}</span>
|
2024-06-21 17:54:53 +00:00
|
|
|
|
</el-checkbox>
|
|
|
|
|
|
<el-checkbox :key="5" :label="5" >
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<span >{{$t('子单')}}</span>
|
2024-06-21 17:54:53 +00:00
|
|
|
|
</el-checkbox>
|
|
|
|
|
|
</el-checkbox-group>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-12-25 09:41:43 +00:00
|
|
|
|
<el-col :span="24" v-if="action=='add' || action=='preAdd' || action=='got'">
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-form-item :label="$t('打印组件')" prop="printTypeCheckList">
|
2024-06-21 17:54:53 +00:00
|
|
|
|
<TanexPrinterPanel ref="tanexPrinter" :isShowPinters="true" v-model="printerStatus" @onPrint="handleBatchPrint" :isInitA4="false" @onPrintComplete="onComplete"></TanexPrinterPanel>
|
2024-08-16 00:24:55 +00:00
|
|
|
|
<!-- <el-button type="primary" @click="handleTestPrintPreview">{{$t('测试打印')}}</el-button> -->
|
2024-06-21 17:54:53 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-collapse-item>
|
|
|
|
|
|
|
|
|
|
|
|
</el-collapse>
|
|
|
|
|
|
|
2024-06-01 11:43:18 +00:00
|
|
|
|
<div style="text-align: center;margin-top: 10px;margin-bottom: 10px;">
|
2024-08-16 00:24:55 +00:00
|
|
|
|
|
2025-04-25 01:04:28 +00:00
|
|
|
|
<el-button type="primary" @click="submitForm" :disabled="isNeedCalcFee&&form.calcFeeType!=3&&form.blSpecialQuote!=1">{{$t('确 定')}}</el-button>
|
2024-06-26 23:31:39 +00:00
|
|
|
|
<el-button @click="initData">{{$t('重置')}}</el-button>
|
2024-06-01 11:43:18 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog :title="titleSelectAddress" :visible.sync="openSelectAddress" width="60%" :destroy-on-close="true" v-dialogDrag append-to-body>
|
2024-05-26 09:46:38 +00:00
|
|
|
|
<AddressSelectPicker0 :addressType="addressType" :useSiteCode="form.sendSiteCode" @onSelected="onAddressChangeSelect"></AddressSelectPicker0>
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-05-28 04:15:10 +00:00
|
|
|
|
import { realMatchWaybill,getTotalAvailablePag } from "@/api/emis/emisCommon";
|
2024-06-11 11:49:02 +00:00
|
|
|
|
import { checkWaybillIsExists,getWaybillDetail,realSubmitOrder,calcWaybillFee,calcSetteldWeight,calcVolumeWeight} from "@/api/emis/emisWaybill";
|
2025-10-15 06:15:50 +00:00
|
|
|
|
import { listCustomsLevel } from "@/api/emis/emisCustomsLevel";
|
2024-05-25 09:37:09 +00:00
|
|
|
|
import { parseTime } from "@/utils/custom";
|
2024-05-29 01:59:04 +00:00
|
|
|
|
import { debounce } from 'throttle-debounce'
|
2024-05-25 09:37:09 +00:00
|
|
|
|
import { getDestSite } from "@/api/emis/emisDestination";
|
2024-07-18 13:24:03 +00:00
|
|
|
|
import { getValidExchangeRate } from "@/api/emis/emisExchangeRate";
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
|
|
|
|
|
import DestinationPicker from '@/views/emis/EmisBaseTools/DestinationPicker.vue';
|
|
|
|
|
|
|
|
|
|
|
|
import EmisUserSimplePicker0 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
|
|
|
|
|
import EmisUserSimplePicker1 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
|
|
|
|
|
import EmisUserSimplePicker2 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
|
|
|
|
|
import EmisUserSimplePicker3 from '@/views/emis/EmisBaseTools/EmisUserSimplePicker.vue';
|
2025-08-21 03:30:37 +00:00
|
|
|
|
import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker2.vue';
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
2025-04-29 02:20:53 +00:00
|
|
|
|
import SeaSiteSimplePicker0 from '@/views/emis/EmisBaseTools/SeaSiteSimplePicker.vue';
|
|
|
|
|
|
import SeaSiteSimplePicker1 from '@/views/emis/EmisBaseTools/SeaSiteSimplePicker.vue';
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue';
|
|
|
|
|
|
import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue';
|
|
|
|
|
|
|
|
|
|
|
|
import CountryPicker0 from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
|
|
|
|
|
import CountryPicker1 from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
|
|
|
|
|
|
|
|
|
|
|
import ProvincePicker1 from '@/views/emis/EmisBaseTools/ProvincePicker.vue';
|
|
|
|
|
|
import CityPicker1 from '@/views/emis/EmisBaseTools/CityPicker.vue';
|
|
|
|
|
|
import DistrictPicker1 from '@/views/emis/EmisBaseTools/DistrictPicker.vue';
|
|
|
|
|
|
|
|
|
|
|
|
import CountryPicker2 from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
|
|
|
|
|
import ProvincePicker2 from '@/views/emis/EmisBaseTools/ProvincePicker.vue';
|
|
|
|
|
|
import CityPicker2 from '@/views/emis/EmisBaseTools/CityPicker.vue';
|
|
|
|
|
|
import DistrictPicker2 from '@/views/emis/EmisBaseTools/DistrictPicker.vue';
|
2024-05-31 00:36:52 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
|
|
|
|
|
import GoodsSimplePicker from '@/views/emis/EmisBaseTools/GoodsSimplePicker.vue';
|
|
|
|
|
|
import GoodsMultiplePicker from '@/views/emis/EmisBaseTools/GoodsMultiplePicker.vue';
|
|
|
|
|
|
|
|
|
|
|
|
import CustomerAddressSimplePicker0 from '@/views/emis/EmisBaseTools/CustomerAddressSimplePicker.vue';
|
|
|
|
|
|
import CustomerAddressSimplePicker1 from '@/views/emis/EmisBaseTools/CustomerAddressSimplePicker.vue';
|
|
|
|
|
|
import AddressSelectPicker0 from '@/views/emis/EmisBaseTools/AddressSelectPicker.vue';
|
|
|
|
|
|
import AddressSelectPicker1 from '@/views/emis/EmisBaseTools/AddressSelectPicker.vue';
|
|
|
|
|
|
import EmisMonthpayAccountPicker from '@/views/emis/EmisBaseTools/EmisMonthpayAccountPicker.vue';
|
|
|
|
|
|
import WarehouseInNoPicker from '@/views/emis/EmisBaseTools/WarehouseInNoPicker.vue';
|
|
|
|
|
|
|
|
|
|
|
|
import PayeePicker from '@/views/emis/EmisBaseTools/PayeePicker.vue';
|
|
|
|
|
|
import SalemanPicker from '@/views/emis/EmisBaseTools/SalemanPicker.vue';
|
2024-07-18 13:24:03 +00:00
|
|
|
|
import ExchangeRatePanel from '@/views/emis/EmisBaseTools/ExchangeRatePanel.vue';
|
|
|
|
|
|
|
2024-07-31 09:42:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
2024-07-06 00:00:04 +00:00
|
|
|
|
import TransProductCasPicker from '@/views/emis/EmisBaseTools/TransProductCasPicker.vue';
|
|
|
|
|
|
|
|
|
|
|
|
// import TransProductCasPicker from '@/views/emis/EmisBaseTools/TransProductCasPicker.vue';
|
2025-06-19 03:35:08 +00:00
|
|
|
|
import MasterBillCodePicker from '@/views/emis/EmisBaseTools/MasterBillCodePicker.vue';
|
2024-05-25 09:37:09 +00:00
|
|
|
|
import feeItemForm from './feeItemForm.vue';
|
|
|
|
|
|
|
2024-05-31 00:36:52 +00:00
|
|
|
|
import TanexPrinterPanel from '@/views/emis/EmisBaseTools/TanexPrinterPanel.vue';
|
2024-05-31 23:31:01 +00:00
|
|
|
|
import { doScan } from "@/api/emis/emisTmsScanRecord";
|
2024-06-01 11:43:18 +00:00
|
|
|
|
import { deepClone } from '@/utils/index'
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
|
|
|
|
|
export default {
|
2024-06-28 02:25:16 +00:00
|
|
|
|
// name: "WaybillRecord",
|
2024-12-25 09:41:43 +00:00
|
|
|
|
// name: "WaybillGot",
|
2024-06-28 02:25:16 +00:00
|
|
|
|
name: "WaybillModify",
|
2024-05-25 09:37:09 +00:00
|
|
|
|
components: {
|
|
|
|
|
|
SalemanPicker,
|
|
|
|
|
|
PayeePicker,
|
2024-05-31 00:36:52 +00:00
|
|
|
|
TanexPrinterPanel,
|
2024-05-25 09:37:09 +00:00
|
|
|
|
feeItemForm,
|
|
|
|
|
|
TransProductCasPicker,
|
|
|
|
|
|
WarehouseInNoPicker,
|
|
|
|
|
|
EmisMonthpayAccountPicker,
|
|
|
|
|
|
AddressSelectPicker0,
|
|
|
|
|
|
AddressSelectPicker1,
|
|
|
|
|
|
CustomerAddressSimplePicker0,
|
|
|
|
|
|
CustomerAddressSimplePicker1,
|
|
|
|
|
|
GoodsSimplePicker,
|
|
|
|
|
|
GoodsMultiplePicker,
|
|
|
|
|
|
EmisUserSimplePicker0,
|
|
|
|
|
|
EmisUserSimplePicker1,
|
|
|
|
|
|
EmisUserSimplePicker2,
|
|
|
|
|
|
EmisUserSimplePicker3,
|
|
|
|
|
|
EmisSiteSimplePicker,
|
|
|
|
|
|
DestinationPicker,
|
|
|
|
|
|
TransLinePicker,
|
|
|
|
|
|
TransProductPicker,
|
|
|
|
|
|
CountryPicker0,
|
|
|
|
|
|
CountryPicker1,
|
|
|
|
|
|
ProvincePicker1,
|
|
|
|
|
|
CityPicker1,
|
|
|
|
|
|
DistrictPicker1,
|
|
|
|
|
|
CountryPicker2,
|
|
|
|
|
|
ProvincePicker2,
|
|
|
|
|
|
CityPicker2,
|
|
|
|
|
|
DistrictPicker2,
|
2025-04-29 02:20:53 +00:00
|
|
|
|
ExchangeRatePanel,
|
|
|
|
|
|
SeaSiteSimplePicker0,
|
2025-06-19 03:35:08 +00:00
|
|
|
|
SeaSiteSimplePicker1,
|
|
|
|
|
|
MasterBillCodePicker,
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
|
|
|
|
|
dicts: ['emis_qujian_fangshi','emis_declare_mode','emis_customs_clear',
|
|
|
|
|
|
'emis_tab_packing_type','emis_tab_dispatch_mode','emis_payment_type',
|
2024-07-18 12:05:49 +00:00
|
|
|
|
'emis_calc_fee_type','emis_print_type','sys_currency_type'],
|
2024-05-25 09:37:09 +00:00
|
|
|
|
data() {
|
2025-06-19 03:35:08 +00:00
|
|
|
|
//校验关联主单线路
|
|
|
|
|
|
var checkmasterProductType = (rule, value, callback) => {
|
|
|
|
|
|
if (this.masterBillProductType && this.masterBillProductType != this.form.productType) {
|
2025-06-23 03:33:49 +00:00
|
|
|
|
callback(new Error('主单和虚拟单线路不一致'));// 关联主单和运单线路不一致
|
2025-06-19 03:35:08 +00:00
|
|
|
|
} else {
|
|
|
|
|
|
callback();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-07-17 05:33:17 +00:00
|
|
|
|
//校验寄件国家地区国家和省份是否匹配
|
|
|
|
|
|
var checkSenderCountryProvince = (rule, value, callback) => {
|
|
|
|
|
|
if (this.form.sender.country && this.senderCountryCode) {
|
|
|
|
|
|
if (this.form.sender.country != this.senderCountryCode) {
|
|
|
|
|
|
callback(new Error('寄件国家和省份不一致'));
|
|
|
|
|
|
} else {
|
|
|
|
|
|
callback();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
callback();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//校验收件国家地区国家和省份是否匹配
|
|
|
|
|
|
var checkRecieverCountryProvince = (rule, value, callback) => {
|
|
|
|
|
|
if (this.form.reciever.country && this.recieverCountryCode) {
|
|
|
|
|
|
if (this.form.reciever.country != this.recieverCountryCode) {
|
|
|
|
|
|
callback(new Error('收件国家和省份不一致'));
|
|
|
|
|
|
} else {
|
|
|
|
|
|
callback();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
callback();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-10-15 06:15:50 +00:00
|
|
|
|
//校验企业名称等级categorySender不等于4校验
|
|
|
|
|
|
var checkCategorySender = (rule, value, callback) => {
|
|
|
|
|
|
if (this.categorySender == '4') {
|
|
|
|
|
|
callback(new Error('该公司报关有问题无法报关,禁止走货。'));
|
|
|
|
|
|
} else {
|
|
|
|
|
|
callback();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//校验企业名称等级categorySender不等于4校验
|
|
|
|
|
|
var checkCategoryReciever = (rule, value, callback) => {
|
|
|
|
|
|
if (this.categoryReciever == '4') {
|
|
|
|
|
|
callback(new Error('该公司清关有问题无法清关,禁止走货。'));
|
|
|
|
|
|
} else {
|
|
|
|
|
|
callback();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-05-25 09:37:09 +00:00
|
|
|
|
return {
|
|
|
|
|
|
activeNames:['1','2','3','4'],
|
2024-07-18 13:24:03 +00:00
|
|
|
|
exchangeRate:null,
|
2024-05-25 09:37:09 +00:00
|
|
|
|
billCode:null,
|
|
|
|
|
|
emisWaybillOptions: [],
|
|
|
|
|
|
addressType:null,
|
|
|
|
|
|
// 遮罩层
|
|
|
|
|
|
loading: true,
|
|
|
|
|
|
triggerCount:0,
|
|
|
|
|
|
action:null,
|
2024-05-31 00:36:52 +00:00
|
|
|
|
sendDate:null,
|
2024-12-25 09:41:43 +00:00
|
|
|
|
lastTimestamp:null,
|
2024-05-25 09:37:09 +00:00
|
|
|
|
// 表单参数
|
|
|
|
|
|
form: {},
|
|
|
|
|
|
timer:null,
|
|
|
|
|
|
isNeedCalc:false,
|
2025-04-25 01:04:28 +00:00
|
|
|
|
isNeedCalcFee:false,
|
2024-05-25 09:37:09 +00:00
|
|
|
|
titleSelectAddress:'',
|
|
|
|
|
|
openSelectAddress:false,
|
2024-05-31 00:36:52 +00:00
|
|
|
|
printerStatus:0,
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
2024-08-03 01:50:09 +00:00
|
|
|
|
origBillCode:null,
|
|
|
|
|
|
|
2024-05-28 04:15:10 +00:00
|
|
|
|
// 可用面单数
|
|
|
|
|
|
totalAvailablePag:{
|
|
|
|
|
|
mainHasCnt:0,
|
|
|
|
|
|
subHasCnt:0
|
|
|
|
|
|
},
|
2025-06-23 03:33:49 +00:00
|
|
|
|
sendSiteSelectCount:0,//寄件网点变化次数
|
2025-07-17 05:33:17 +00:00
|
|
|
|
//寄件人省份的国家
|
|
|
|
|
|
senderCountryCode:null,
|
|
|
|
|
|
recieverCountryCode:null,
|
2025-10-11 05:10:05 +00:00
|
|
|
|
//收件人地区名称
|
|
|
|
|
|
recieverRegionName:null,
|
2025-08-27 09:56:56 +00:00
|
|
|
|
// 选中的寄件人企业名称
|
|
|
|
|
|
selectedSenderEnterpriseName:null,
|
|
|
|
|
|
// 选中的寄件人企业税号
|
|
|
|
|
|
selectedSenderEnterpriseTaxId:null,
|
2025-08-28 09:05:55 +00:00
|
|
|
|
//选中的月结客户企业号
|
|
|
|
|
|
selectedMonthUserEnterpriseName: null,
|
|
|
|
|
|
//选中的月结客户企业税号
|
|
|
|
|
|
selectedMonthUserEnterpriseTaxId: null,
|
2025-10-15 06:15:50 +00:00
|
|
|
|
//寄件企业名称等级
|
|
|
|
|
|
categorySender:null,
|
|
|
|
|
|
// 收件
|
|
|
|
|
|
categoryReciever:null,
|
2024-05-25 09:37:09 +00:00
|
|
|
|
// 表单校验
|
|
|
|
|
|
rules: {
|
|
|
|
|
|
billCode: [
|
|
|
|
|
|
{ required: true, message: "运单号不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
destinationCountry: [
|
|
|
|
|
|
{ required: true, message: "目的国不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
reciever:{
|
|
|
|
|
|
name: [
|
2024-05-25 14:22:10 +00:00
|
|
|
|
{ required: true, message: "收货人名不能为空", trigger: ["blur",'change'] }
|
2024-05-25 09:37:09 +00:00
|
|
|
|
],
|
|
|
|
|
|
phone: [
|
|
|
|
|
|
{ required: true, message: "收货人手机号不能为空", trigger: "blur" }
|
|
|
|
|
|
],
|
|
|
|
|
|
country: [
|
|
|
|
|
|
{ required: true, message: "收货人国家不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
province: [
|
2025-07-17 05:33:17 +00:00
|
|
|
|
{ required: true, message: "收货省不能为空", trigger: ["blur",'change'] }, {
|
|
|
|
|
|
validator: checkRecieverCountryProvince, trigger: ['blur', 'change']
|
|
|
|
|
|
}
|
2024-05-25 09:37:09 +00:00
|
|
|
|
],
|
|
|
|
|
|
company: [
|
2025-10-15 06:15:50 +00:00
|
|
|
|
{ required: true, message: "收货公司不能为空", trigger: ["blur",'change'] },
|
|
|
|
|
|
{ validator: checkCategoryReciever , trigger: ['change']}
|
2024-05-25 09:37:09 +00:00
|
|
|
|
],
|
|
|
|
|
|
// city: [
|
|
|
|
|
|
// { required: true, message: "市不能为空", trigger: "blur" }
|
|
|
|
|
|
// ],
|
|
|
|
|
|
// county: [
|
|
|
|
|
|
// { required: true, message: "区不能为空", trigger: "blur" }
|
|
|
|
|
|
// ],
|
|
|
|
|
|
address: [
|
|
|
|
|
|
{ required: true, message: "收货地址不能为空", trigger: "blur" }
|
|
|
|
|
|
],
|
|
|
|
|
|
},
|
|
|
|
|
|
sender:{
|
|
|
|
|
|
name: [
|
2024-05-25 14:22:10 +00:00
|
|
|
|
{ required: true, message: "寄件人名不能为空", trigger: ["blur",'change'] }
|
2024-05-25 09:37:09 +00:00
|
|
|
|
],
|
|
|
|
|
|
phone: [
|
|
|
|
|
|
{ required: true, message: "寄件人手机号不能为空", trigger: "blur" }
|
|
|
|
|
|
],
|
|
|
|
|
|
country: [
|
|
|
|
|
|
{ required: true, message: "寄件人国家不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
province: [
|
2025-07-17 05:33:17 +00:00
|
|
|
|
{ required: true, message: "寄件省不能为空", trigger: ["blur",'change'] },{
|
|
|
|
|
|
validator: checkSenderCountryProvince, trigger: ['blur', 'change'] }
|
2024-05-25 09:37:09 +00:00
|
|
|
|
],
|
|
|
|
|
|
company: [
|
2024-07-07 01:36:03 +00:00
|
|
|
|
{ required: true, message: "寄件公司不能为空", trigger: ["blur",'change'] }
|
2024-05-25 09:37:09 +00:00
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
// city: [
|
|
|
|
|
|
// { required: true, message: "寄件市不能为空", trigger: "blur" }
|
|
|
|
|
|
// ],
|
|
|
|
|
|
// county: [
|
|
|
|
|
|
// { required: true, message: "寄件区不能为空", trigger: "blur" }
|
|
|
|
|
|
// ],
|
|
|
|
|
|
address: [
|
|
|
|
|
|
{ required: true, message: "寄件地址不能为空", trigger: "blur" }
|
|
|
|
|
|
],
|
2025-10-15 06:15:50 +00:00
|
|
|
|
// 企业名称等级为4校验
|
|
|
|
|
|
enterpriseName: [
|
|
|
|
|
|
{ validator: checkCategorySender }
|
|
|
|
|
|
],
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
|
|
|
|
|
paymentType: [
|
|
|
|
|
|
{ required: true, message: "支付方式不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
calcFeeType: [
|
|
|
|
|
|
{ required: true, message: "计费方式不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
transLine: [
|
|
|
|
|
|
{ required: true, message: "快递线路不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
productType: [
|
|
|
|
|
|
{ required: true, message: "快递产品类型不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
customsClear: [
|
|
|
|
|
|
{ required: true, message: "清关方式不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
customsEclaration: [
|
|
|
|
|
|
{ required: true, message: "报关方式不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
packType: [
|
|
|
|
|
|
{ required: true, message: "包装类型不能为空",trigger: ["blur",'change'] }
|
2025-06-19 03:35:08 +00:00
|
|
|
|
],
|
2025-06-26 02:13:33 +00:00
|
|
|
|
//自定义校验
|
|
|
|
|
|
masterBillCode:[{ required: true, message: "关联主单不能为空", trigger: ["blur", 'change'] },
|
2025-06-19 03:35:08 +00:00
|
|
|
|
{validator: checkmasterProductType, trigger: ['blur', 'change']}
|
2024-05-25 09:37:09 +00:00
|
|
|
|
],
|
|
|
|
|
|
dispatchMethod: [
|
|
|
|
|
|
{ required: true, message: "派件方式不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
pickupMethod: [
|
|
|
|
|
|
{ required: true, message: "取件方式为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
goodsInfo: [
|
2024-06-01 11:43:18 +00:00
|
|
|
|
{ required: true, message: "货物名称不能为空", trigger: ["blur",'change'] }
|
2024-05-25 09:37:09 +00:00
|
|
|
|
],
|
|
|
|
|
|
totalVolume: [
|
|
|
|
|
|
{ required: true, message: "总体积不能为空", trigger: "blur" }
|
|
|
|
|
|
],
|
|
|
|
|
|
parcelQty: [
|
|
|
|
|
|
{ required: true, message: "件数不能为空", trigger: "blur" }
|
|
|
|
|
|
],
|
|
|
|
|
|
billWeight: [
|
|
|
|
|
|
{ required: true, message: "实际重量不能为空", trigger: "blur" }
|
|
|
|
|
|
],
|
2024-06-01 11:43:18 +00:00
|
|
|
|
// volumeWeight: [
|
|
|
|
|
|
// { required: true, message: "体积重量不能为空", trigger: "blur" }
|
|
|
|
|
|
// ],
|
|
|
|
|
|
// settlementWeight: [
|
|
|
|
|
|
// { required: true, message: "结算重量不能为空", trigger: "blur" }
|
|
|
|
|
|
// ],
|
2024-05-25 09:37:09 +00:00
|
|
|
|
freight: [
|
|
|
|
|
|
{ required: true, message: "运费不能为空", trigger: "blur" }
|
|
|
|
|
|
],
|
|
|
|
|
|
sendSiteCode: [
|
|
|
|
|
|
{ required: true, message: "发件网点代码不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
2025-06-21 08:17:06 +00:00
|
|
|
|
//始发网点
|
|
|
|
|
|
startSiteCode: [
|
|
|
|
|
|
{ required: true, message: "始发网点代码不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
2024-05-31 11:59:20 +00:00
|
|
|
|
// sendDate: [
|
|
|
|
|
|
// { required: true, message: "发货时间不能为空", trigger: "blur" }
|
|
|
|
|
|
// ],
|
2024-09-04 23:01:49 +00:00
|
|
|
|
destinationCode: [
|
|
|
|
|
|
{ required: true, message: "目的地不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
2024-05-25 09:37:09 +00:00
|
|
|
|
dispatchUnderlingSiteCode: [
|
|
|
|
|
|
{ required: true, message: "目的地网点代码不能为空", trigger: "blur" }
|
|
|
|
|
|
],
|
|
|
|
|
|
custNo: [
|
2024-05-26 09:46:38 +00:00
|
|
|
|
{ required: true, message: "月结卡号不能为空", trigger: ["blur",'change'] }
|
2024-05-25 09:37:09 +00:00
|
|
|
|
],
|
|
|
|
|
|
payee: [
|
2024-05-26 09:46:38 +00:00
|
|
|
|
{ required: true, message: "销售回款人不能为空", trigger: ["blur",'change'] }
|
2024-05-25 09:37:09 +00:00
|
|
|
|
],
|
|
|
|
|
|
salesmen: [
|
2024-05-26 09:46:38 +00:00
|
|
|
|
{ required: true, message: "销售联系人不能为空", trigger: ["blur",'change'] }
|
2024-05-25 09:37:09 +00:00
|
|
|
|
],
|
|
|
|
|
|
takePieceEmployeeCode: [
|
|
|
|
|
|
{ required: true, message: "取件员代码不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
operateEmployeeCode: [
|
|
|
|
|
|
{ required: true, message: "操作员代码不能为空", trigger: ["blur",'change'] }
|
2025-04-25 01:04:28 +00:00
|
|
|
|
],
|
|
|
|
|
|
ladingBillCode: [
|
|
|
|
|
|
{ required: true, message: "提单号不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
departurePort: [
|
|
|
|
|
|
{ required: true, message: "起运港不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
destinationPort: [
|
|
|
|
|
|
{ required: true, message: "目的港不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
|
|
|
|
|
boxQuantity: [
|
|
|
|
|
|
{ required: true, message: "箱量不能为空", trigger: ["blur",'change'] }
|
|
|
|
|
|
],
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
computed: {
|
2025-06-23 06:07:48 +00:00
|
|
|
|
masterBillSearchParams() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
transLineType: this.form.transLine,
|
|
|
|
|
|
productType: this.form.productType,
|
|
|
|
|
|
sendSiteCode: this.form.sendSiteCode
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
2024-12-25 23:55:49 +00:00
|
|
|
|
watch: {
|
2025-08-11 08:33:17 +00:00
|
|
|
|
|
|
|
|
|
|
// 监听实际重量
|
|
|
|
|
|
'form.billWeight': {
|
|
|
|
|
|
handler(newVal, oldVal) {
|
|
|
|
|
|
if(oldVal!=null){
|
|
|
|
|
|
this.handleCalcSettlementWeightDebounce();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
deep: true
|
|
|
|
|
|
},
|
|
|
|
|
|
//监听总体积
|
|
|
|
|
|
'form.totalVolume': {
|
|
|
|
|
|
handler(newVal, oldVal) {
|
|
|
|
|
|
if(oldVal!=null){
|
|
|
|
|
|
this.handleCalcVolumeWeightDebounce();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
deep: true
|
|
|
|
|
|
},
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
|
|
|
|
|
created() {
|
2024-12-25 23:55:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
this.action=this.$route.query.action;
|
2024-12-25 23:55:49 +00:00
|
|
|
|
|
2024-07-18 12:05:49 +00:00
|
|
|
|
if(!this.action){
|
|
|
|
|
|
this.action="add";
|
|
|
|
|
|
}
|
2024-07-27 05:11:35 +00:00
|
|
|
|
|
2024-12-25 09:41:43 +00:00
|
|
|
|
if(this.action=='add' ){
|
|
|
|
|
|
this.billCode=null;
|
|
|
|
|
|
const title = '运单录入';
|
|
|
|
|
|
const route = Object.assign({}, this.$route, { title: `${title}` })
|
|
|
|
|
|
this.$store.dispatch('tagsView/updateVisitedView', route)
|
2024-12-25 23:55:49 +00:00
|
|
|
|
|
|
|
|
|
|
this.initData();
|
|
|
|
|
|
|
2024-12-25 09:41:43 +00:00
|
|
|
|
}
|
|
|
|
|
|
else if(this.action=='got'){
|
2024-07-27 05:11:35 +00:00
|
|
|
|
this.billCode=this.$route.query.billCode;
|
2024-12-25 09:41:43 +00:00
|
|
|
|
const title = '接单:'+this.billCode;
|
|
|
|
|
|
const route = Object.assign({}, this.$route, { title: `${title}` })
|
|
|
|
|
|
this.$store.dispatch('tagsView/updateVisitedView', route)
|
2024-12-25 23:55:49 +00:00
|
|
|
|
this.initData();
|
|
|
|
|
|
|
2024-12-25 09:41:43 +00:00
|
|
|
|
}
|
|
|
|
|
|
else if(this.action=='modify'){
|
|
|
|
|
|
const title = '运单修改';
|
|
|
|
|
|
const route = Object.assign({}, this.$route, { title: `${title}` })
|
|
|
|
|
|
this.$store.dispatch('tagsView/updateVisitedView', route)
|
2024-12-25 23:55:49 +00:00
|
|
|
|
|
|
|
|
|
|
this.initData();
|
2024-07-27 05:11:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-05-31 00:36:52 +00:00
|
|
|
|
},
|
|
|
|
|
|
mounted() {
|
2024-05-28 04:15:10 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
handleScanInput(){
|
|
|
|
|
|
if(this.form.billCode==null || this.form.billCode==''){
|
2024-08-04 15:39:57 +00:00
|
|
|
|
this.$modal.msgError("输入单号后回车");
|
2024-05-25 09:37:09 +00:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
2024-08-16 22:13:34 +00:00
|
|
|
|
this.form.billCode=this.form.billCode.replace(/\s+/g, '');
|
2024-05-25 09:37:09 +00:00
|
|
|
|
this.billCode=this.form.billCode+"";
|
|
|
|
|
|
this.initData();
|
|
|
|
|
|
},
|
2024-06-11 11:49:02 +00:00
|
|
|
|
onBillCodeChange(){
|
2025-07-22 06:41:51 +00:00
|
|
|
|
if(this.form.billCode){
|
2024-08-16 22:13:34 +00:00
|
|
|
|
this.form.billCode=this.form.billCode.replace(/\s+/g, '');
|
2024-06-11 11:49:02 +00:00
|
|
|
|
checkWaybillIsExists(this.form.billCode).then(response => {
|
|
|
|
|
|
const result = response.data;
|
|
|
|
|
|
if(result){
|
2024-08-04 15:39:57 +00:00
|
|
|
|
this.$modal.msgError('运单号已存在!')
|
2024-06-11 11:49:02 +00:00
|
|
|
|
this.form.billCode=null;
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
2024-05-28 04:15:10 +00:00
|
|
|
|
// 初始化可用面单数量
|
2024-05-31 00:36:52 +00:00
|
|
|
|
initGetTotalAvailablePag(useSiteCode){
|
|
|
|
|
|
getTotalAvailablePag(useSiteCode,"T7080").then(response => {
|
2024-05-28 04:15:10 +00:00
|
|
|
|
let dataMap=response.data;
|
|
|
|
|
|
this.totalAvailablePag.mainHasCnt=dataMap["1001"];
|
|
|
|
|
|
this.totalAvailablePag.subHasCnt=dataMap["1002"];
|
|
|
|
|
|
|
2024-06-01 11:43:18 +00:00
|
|
|
|
if( (this.totalAvailablePag.mainHasCnt <=0 || this.totalAvailablePag.subHasCnt<=0 ) && this.action=="add"){
|
2024-05-28 04:15:10 +00:00
|
|
|
|
this.$confirm("电子面单数量不足,是否立即购买?", "提示", {
|
|
|
|
|
|
cancelButtonText: "返回",
|
|
|
|
|
|
confirmButtonText: "立即购买",
|
|
|
|
|
|
type: "warning",
|
|
|
|
|
|
distinguishCancelAndClose: true,
|
|
|
|
|
|
closeOnClickModal: false
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
this.handleApplyPag();
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
handleApplyPag(){
|
|
|
|
|
|
this.$router.push("/d24/electronicFormManagement/ApplyList");
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
handleBatchPrint(){
|
2024-08-16 00:24:55 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
if(this.printerStatus == 1){
|
|
|
|
|
|
if(this.form.billCode){
|
|
|
|
|
|
// 重要,设置为true才会把右上角X和取消区分开来
|
|
|
|
|
|
this.$confirm("确定打印?", "提示", {
|
|
|
|
|
|
cancelButtonText: "不打印",
|
|
|
|
|
|
confirmButtonText: "确定打印",
|
|
|
|
|
|
type: "warning",
|
|
|
|
|
|
distinguishCancelAndClose: true,
|
|
|
|
|
|
closeOnClickModal: false
|
|
|
|
|
|
}).then(() => {
|
2024-05-31 00:36:52 +00:00
|
|
|
|
|
|
|
|
|
|
let printDataList=[]
|
2024-05-25 09:37:09 +00:00
|
|
|
|
// 打印主单,子单
|
2024-08-16 00:24:55 +00:00
|
|
|
|
let orderList=[];
|
|
|
|
|
|
orderList.push(this.form.billCode);
|
2024-07-09 23:16:51 +00:00
|
|
|
|
// // 客户联
|
|
|
|
|
|
// let customerItem ={
|
|
|
|
|
|
// "tplCode":"TAN-CM-130",
|
2024-08-16 00:24:55 +00:00
|
|
|
|
// "printerName":this.$refs.tanexPrinter.getSelectPrinter(),
|
2024-07-09 23:16:51 +00:00
|
|
|
|
// "orderList":orderList.toString()
|
|
|
|
|
|
// }
|
|
|
|
|
|
// printDataList.push(customerItem);
|
2024-06-21 17:54:53 +00:00
|
|
|
|
|
|
|
|
|
|
// 主单
|
2024-08-03 01:50:09 +00:00
|
|
|
|
let mainBillItem ={
|
|
|
|
|
|
"tplCode":"TAN-GM-130",
|
2024-08-16 00:24:55 +00:00
|
|
|
|
"printerName":this.$refs.tanexPrinter.getSelectPrinter(),
|
2024-08-03 01:50:09 +00:00
|
|
|
|
"orderList":orderList.toString()
|
|
|
|
|
|
}
|
|
|
|
|
|
printDataList.push(mainBillItem);
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
2024-06-21 17:54:53 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
// 打印子单
|
2024-05-31 00:36:52 +00:00
|
|
|
|
// tplCode="探路速运-子单联(通用)";
|
|
|
|
|
|
// tplCode="TAN-GC-130";
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
|
|
|
|
|
let childOrderList=[]
|
2024-05-31 00:36:52 +00:00
|
|
|
|
let subBillArr=this.form.billCodeSub.split(',');
|
|
|
|
|
|
|
|
|
|
|
|
for(let i=0;i<subBillArr.length&&i<50;i++){
|
|
|
|
|
|
let item=subBillArr[i];
|
2024-05-25 09:37:09 +00:00
|
|
|
|
if(item!=null && item!=''){
|
|
|
|
|
|
childOrderList.push(item);
|
|
|
|
|
|
}
|
2024-05-31 00:36:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let subBillItem ={
|
|
|
|
|
|
"tplCode":"TAN-GC-130",
|
2024-08-16 00:24:55 +00:00
|
|
|
|
"printerName":this.$refs.tanexPrinter.getSelectPrinter(),
|
2024-05-31 00:36:52 +00:00
|
|
|
|
"orderList":childOrderList.toString()
|
|
|
|
|
|
}
|
|
|
|
|
|
printDataList.push(subBillItem);
|
|
|
|
|
|
// 直接打印主子单
|
|
|
|
|
|
this.$refs.tanexPrinter.batchPrintAdv(printDataList)
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else{
|
2024-07-20 05:00:02 +00:00
|
|
|
|
|
|
|
|
|
|
this.billCode=null;
|
|
|
|
|
|
this.form.billCode=null;
|
|
|
|
|
|
this.initData();
|
|
|
|
|
|
|
|
|
|
|
|
// this.$confirm("打印组件未连接,可【返回操作】稍后打印,或【操作下一单】", "提示", {
|
|
|
|
|
|
// confirmButtonText: "操作下一单",
|
|
|
|
|
|
// type: "warning",
|
|
|
|
|
|
// distinguishCancelAndClose: true,
|
|
|
|
|
|
// closeOnClickModal: false,
|
|
|
|
|
|
// showCancelButton: false,
|
|
|
|
|
|
// showClose: false
|
|
|
|
|
|
// }).then(() => {
|
|
|
|
|
|
// });
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
2024-08-16 00:24:55 +00:00
|
|
|
|
|
|
|
|
|
|
handleTestPrintPreview(){
|
|
|
|
|
|
this.printerStatus=1;
|
|
|
|
|
|
this.handlePrintPreview();
|
|
|
|
|
|
},
|
2024-05-25 09:37:09 +00:00
|
|
|
|
async handlePrintPreview(){
|
|
|
|
|
|
|
|
|
|
|
|
if(this.printerStatus == 1){
|
|
|
|
|
|
if(this.form.billCode){
|
2024-05-31 00:36:52 +00:00
|
|
|
|
|
|
|
|
|
|
let printDataList=[]
|
|
|
|
|
|
// 打印主单,子单
|
|
|
|
|
|
let orderList=[];
|
|
|
|
|
|
orderList.push(this.form.billCode);
|
2024-06-21 17:54:53 +00:00
|
|
|
|
|
|
|
|
|
|
// 客户联
|
2024-07-06 00:00:04 +00:00
|
|
|
|
let customerItem ={
|
|
|
|
|
|
"tplCode":"TAN-CM-130",
|
2024-08-16 00:24:55 +00:00
|
|
|
|
"printerName":this.$refs.tanexPrinter.getSelectPrinter(),
|
2024-07-06 00:00:04 +00:00
|
|
|
|
"orderList":orderList.toString()
|
|
|
|
|
|
}
|
|
|
|
|
|
printDataList.push(customerItem);
|
2024-06-21 17:54:53 +00:00
|
|
|
|
|
|
|
|
|
|
// 主单
|
2024-07-18 12:05:49 +00:00
|
|
|
|
let mainBillItem ={
|
|
|
|
|
|
"tplCode":"TAN-GM-130",
|
2024-08-16 00:24:55 +00:00
|
|
|
|
"printerName":this.$refs.tanexPrinter.getSelectPrinter(),
|
2024-07-18 12:05:49 +00:00
|
|
|
|
"orderList":orderList.toString()
|
|
|
|
|
|
}
|
|
|
|
|
|
printDataList.push(mainBillItem);
|
2024-06-21 17:54:53 +00:00
|
|
|
|
|
2024-05-31 00:36:52 +00:00
|
|
|
|
|
|
|
|
|
|
// 打印子单
|
|
|
|
|
|
// tplCode="探路速运-子单联(通用)";
|
|
|
|
|
|
// tplCode="TAN-GC-130";
|
|
|
|
|
|
|
2024-05-31 23:31:01 +00:00
|
|
|
|
this.handleGenSubbill();
|
|
|
|
|
|
|
2024-05-31 00:36:52 +00:00
|
|
|
|
let childOrderList=[]
|
|
|
|
|
|
let subBillArr=this.form.billCodeSub.split(',');
|
2024-07-31 09:42:48 +00:00
|
|
|
|
// 小于50单可以预览子单
|
|
|
|
|
|
if(subBillArr.length<50){
|
|
|
|
|
|
for(let i=0;i<subBillArr.length;i++){
|
|
|
|
|
|
let item=subBillArr[i];
|
|
|
|
|
|
if(item!=null && item!=''){
|
|
|
|
|
|
childOrderList.push(item);
|
|
|
|
|
|
// billCount=billCount+1;
|
|
|
|
|
|
}
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}
|
2024-05-31 00:36:52 +00:00
|
|
|
|
|
2024-07-31 09:42:48 +00:00
|
|
|
|
if(childOrderList&&childOrderList.length>0){
|
|
|
|
|
|
let subBillItem ={
|
|
|
|
|
|
"tplCode":"TAN-GC-130",
|
2024-08-16 00:24:55 +00:00
|
|
|
|
"printerName":this.$refs.tanexPrinter.getSelectPrinter(),
|
2024-07-31 09:42:48 +00:00
|
|
|
|
"orderList":childOrderList.toString()
|
|
|
|
|
|
}
|
|
|
|
|
|
printDataList.push(subBillItem);
|
2024-05-31 23:31:01 +00:00
|
|
|
|
}
|
2024-05-31 00:36:52 +00:00
|
|
|
|
}
|
2024-05-31 23:31:01 +00:00
|
|
|
|
|
2024-07-18 12:05:49 +00:00
|
|
|
|
let billCount=2+childOrderList.length;
|
2024-05-31 00:36:52 +00:00
|
|
|
|
// 预览主子单
|
|
|
|
|
|
this.$refs.tanexPrinter.printPreviewAdv(printDataList,billCount)
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else{
|
2024-07-20 05:00:02 +00:00
|
|
|
|
// this.$confirm("打印组件未连接,可【返回操作】稍后打印,或【操作下一单】", "提示", {
|
|
|
|
|
|
// confirmButtonText: "操作下一单",
|
|
|
|
|
|
// type: "warning",
|
|
|
|
|
|
// distinguishCancelAndClose: true,
|
|
|
|
|
|
// closeOnClickModal: false,
|
|
|
|
|
|
// showCancelButton: false,
|
|
|
|
|
|
// showClose: false
|
|
|
|
|
|
// }).then(() => {
|
|
|
|
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
this.billCode=null;
|
|
|
|
|
|
this.form.billCode=null;
|
2024-12-26 00:17:53 +00:00
|
|
|
|
// 如果接单则关闭当前标签页
|
|
|
|
|
|
if(this.action=='got'){
|
|
|
|
|
|
this.jumpToOrderList();
|
|
|
|
|
|
}else{
|
|
|
|
|
|
this.initData();
|
|
|
|
|
|
}
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
2024-06-01 11:43:18 +00:00
|
|
|
|
onComplete(){
|
2024-07-20 05:00:02 +00:00
|
|
|
|
// this.$confirm("操作已完成是否【操作下一单】", "提示", {
|
|
|
|
|
|
// confirmButtonText: "操作下一单",
|
|
|
|
|
|
// type: "warning",
|
|
|
|
|
|
// distinguishCancelAndClose: true,
|
|
|
|
|
|
// closeOnClickModal: false,
|
|
|
|
|
|
// showCancelButton: false,
|
|
|
|
|
|
// showClose: false
|
|
|
|
|
|
// }).then(() => {
|
|
|
|
|
|
|
|
|
|
|
|
// });
|
2024-06-01 11:43:18 +00:00
|
|
|
|
this.billCode=null;
|
|
|
|
|
|
this.form.billCode=null;
|
|
|
|
|
|
this.initData();
|
|
|
|
|
|
},
|
2024-05-25 09:37:09 +00:00
|
|
|
|
onDestCountryChange(item){
|
2024-05-25 14:50:01 +00:00
|
|
|
|
if(item){
|
|
|
|
|
|
this.form.reciever.country=item.code;
|
2024-08-03 01:50:09 +00:00
|
|
|
|
this.autoAjustBillCode();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
// 如果目的国为孟加拉,自动调整运单号
|
|
|
|
|
|
autoAjustBillCode(){
|
|
|
|
|
|
if(this.action != "add"){
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(!this.form.reciever.country){
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(this.form.reciever.country!='0880'){
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(!this.form.billCode){
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(this.form.billCode.length!=14){
|
|
|
|
|
|
return;
|
2024-05-25 14:50:01 +00:00
|
|
|
|
}
|
2024-08-03 01:50:09 +00:00
|
|
|
|
|
|
|
|
|
|
// 记住历史单号
|
|
|
|
|
|
this.origBillCode=this.form.billCode;
|
|
|
|
|
|
|
|
|
|
|
|
this.$confirm("注意:根据要求孟加拉单号自动调整为12位", "提示", {
|
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
|
type: "warning",
|
|
|
|
|
|
distinguishCancelAndClose: true,
|
|
|
|
|
|
closeOnClickModal: false,
|
|
|
|
|
|
showCancelButton: false,
|
|
|
|
|
|
showClose: false
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
// 去除第7,8个字符
|
|
|
|
|
|
// T7080300001796
|
|
|
|
|
|
let str =this.form.billCode;
|
|
|
|
|
|
let prefix=str.substring(0,6);
|
|
|
|
|
|
let other = str.substring(8);
|
|
|
|
|
|
this.form.billCode=prefix+other;
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
2024-05-29 00:48:35 +00:00
|
|
|
|
onPaymentTypeChange(){
|
2025-06-11 00:15:28 +00:00
|
|
|
|
//console.log("==onPaymentTypeChange==>")
|
2024-05-29 00:48:35 +00:00
|
|
|
|
// 非月结清空月结客户选择
|
2024-06-20 04:37:30 +00:00
|
|
|
|
if(this.form.paymentType == '1' ||
|
|
|
|
|
|
this.form.paymentType == '3' ||
|
|
|
|
|
|
this.form.paymentType == '6'
|
2024-05-29 00:48:35 +00:00
|
|
|
|
){
|
|
|
|
|
|
this.form.custNo=null;
|
|
|
|
|
|
this.form.customerCode=null;
|
2025-08-27 09:56:56 +00:00
|
|
|
|
//企业税号重新赋值
|
|
|
|
|
|
this.form.sender.enterpriseName=this.selectedSenderEnterpriseName;
|
|
|
|
|
|
this.form.sender.enterpriseTaxId=this.selectedSenderEnterpriseTaxId;
|
2024-05-29 00:48:35 +00:00
|
|
|
|
this.calcBillFee();
|
2025-10-15 06:15:50 +00:00
|
|
|
|
// 校验寄件人企业等级
|
|
|
|
|
|
this.checkEnterprise(this.form.sender.enterpriseName);
|
|
|
|
|
|
|
2024-05-29 00:48:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-10-17 23:14:19 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
onCalcFeeTypeChange(){
|
2025-06-11 00:15:28 +00:00
|
|
|
|
//console.log("==onCalcFeeTypeChange==>")
|
2025-06-11 00:14:20 +00:00
|
|
|
|
|
2024-10-17 23:14:19 +00:00
|
|
|
|
if(this.form.calcFeeType == '3' ){
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.calcBillFee();
|
|
|
|
|
|
|
2024-05-29 00:48:35 +00:00
|
|
|
|
},
|
2024-05-25 09:37:09 +00:00
|
|
|
|
onSelectMonthUser(item){
|
2025-06-11 00:15:28 +00:00
|
|
|
|
//console.log("==onSelectMonthUser==>")
|
2024-06-20 04:37:30 +00:00
|
|
|
|
if(item!=null){
|
|
|
|
|
|
this.form.payee=item.payee;
|
|
|
|
|
|
this.form.salesmen=item.salesmen;
|
|
|
|
|
|
this.form.paymentType= '2';
|
2025-08-27 09:56:56 +00:00
|
|
|
|
// 企业名称
|
|
|
|
|
|
this.form.sender.enterpriseName=item.enterpriseName;
|
|
|
|
|
|
// 企业税号
|
|
|
|
|
|
this.form.sender.enterpriseTaxId=item.enterpriseTaxId;
|
2025-08-28 09:05:55 +00:00
|
|
|
|
// 选中的月结客户企业号
|
|
|
|
|
|
this.selectedMonthUserEnterpriseName = item.enterpriseName;
|
|
|
|
|
|
// 选中的月结客户企业税号
|
|
|
|
|
|
this.selectedMonthUserEnterpriseTaxId = item.enterpriseTaxId;
|
2025-10-15 06:15:50 +00:00
|
|
|
|
// 校验企业等级
|
|
|
|
|
|
this.checkEnterprise(this.form.sender.enterpriseName); }else{
|
2024-06-20 04:37:30 +00:00
|
|
|
|
this.form.paymentType= '1';
|
|
|
|
|
|
this.form.payee=null;
|
|
|
|
|
|
this.form.salesmen=null;
|
|
|
|
|
|
this.onPaymentTypeChange();
|
|
|
|
|
|
}
|
2024-05-29 00:48:35 +00:00
|
|
|
|
this.calcBillFee();
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
|
|
|
|
|
handleAddFee(){
|
|
|
|
|
|
this.triggerCount++;
|
|
|
|
|
|
},
|
|
|
|
|
|
onFeeItemChange(item){
|
|
|
|
|
|
this.$refs.popoverFeeRef.doClose();
|
|
|
|
|
|
if(item!=null){
|
|
|
|
|
|
let newItem=Object.assign({},item)
|
2024-08-05 16:01:28 +00:00
|
|
|
|
if(!this.form.feeItems){
|
|
|
|
|
|
this.form.feeItems=[];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-31 09:10:34 +00:00
|
|
|
|
let expr="s+w*d";
|
|
|
|
|
|
if((newItem.initialWeightFee>0||newItem.addWeightPrice>0) && this.form.settlementWeight!=null){
|
|
|
|
|
|
expr=expr.replace("s",newItem.initialWeightFee);
|
|
|
|
|
|
expr=expr.replace("d",newItem.addWeightPrice);
|
2024-10-17 23:14:19 +00:00
|
|
|
|
// 如果按重量计费,则计算重量使用体积计算费用
|
|
|
|
|
|
let calcWeight = this.form.settlementWeight;
|
|
|
|
|
|
if(this.form.calcFeeType==2){
|
|
|
|
|
|
calcWeight=this.form.totalVolume;
|
|
|
|
|
|
}
|
|
|
|
|
|
expr=expr.replace("w",calcWeight);
|
|
|
|
|
|
// expr=expr.replace("w",this.form.settlementWeight);
|
2024-08-31 09:10:34 +00:00
|
|
|
|
newItem.realFee=parseFloat(eval(expr)).toFixed(2);
|
|
|
|
|
|
newItem.fee=newItem.realFee;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
this.form.feeItems.push(newItem);
|
2024-08-18 13:49:24 +00:00
|
|
|
|
|
|
|
|
|
|
this.form.blSpecialQuote='1';
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
this.handleCalcFeeItem();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
deleteFeeItem(row){
|
|
|
|
|
|
if(row.blAutoGen==1){
|
2024-08-04 15:39:57 +00:00
|
|
|
|
this.$modal.msgError('不允许删除!')
|
2024-05-25 09:37:09 +00:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.$confirm('确定删除?', '提示', {
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
let newList = this.form.feeItems.filter(item => item.feeCode !== row.feeCode);
|
|
|
|
|
|
this.form.feeItems=newList;
|
2024-07-18 13:24:03 +00:00
|
|
|
|
this.handleCalcFeeItem();
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
lpadZero(val,len) {
|
|
|
|
|
|
return (new Array(len + 1).join('0') + val).slice(-len);
|
|
|
|
|
|
},
|
|
|
|
|
|
handleGenSubbill(){
|
2024-05-31 23:31:01 +00:00
|
|
|
|
let billSubCodeStr="";
|
2024-05-25 09:37:09 +00:00
|
|
|
|
if(this.form.blGenSubbill==1 && this.form.parcelQty > 0 && this.form.billCode){
|
2024-05-31 23:31:01 +00:00
|
|
|
|
for(let i=1;i<=this.form.parcelQty&&i<50;i++){
|
|
|
|
|
|
let subBillCode = this.form.billCode+""+this.lpadZero(i,4);
|
|
|
|
|
|
billSubCodeStr=billSubCodeStr+subBillCode+","
|
|
|
|
|
|
}
|
2024-05-25 09:37:09 +00:00
|
|
|
|
this.form.billCodeSub=billSubCodeStr;
|
|
|
|
|
|
}else{
|
2024-05-31 23:31:01 +00:00
|
|
|
|
this.form.billCodeSub=billSubCodeStr;
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}
|
2024-05-31 23:31:01 +00:00
|
|
|
|
return billSubCodeStr;
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
|
|
|
|
|
openCollapse(index){
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
initData() {
|
2025-08-28 09:05:55 +00:00
|
|
|
|
console.log('----initData----')
|
|
|
|
|
|
|
2024-12-25 23:55:49 +00:00
|
|
|
|
|
2025-06-11 00:15:28 +00:00
|
|
|
|
//console.log("====>this.action=2222=>",this.action);
|
|
|
|
|
|
//console.log("====>this.billCode=2222=>",this.billCode);
|
2024-12-25 23:55:49 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
this.reset();
|
2024-06-06 08:36:55 +00:00
|
|
|
|
this.form.productTypeSelArr=null;
|
2025-06-23 03:33:49 +00:00
|
|
|
|
this.sendSiteSelectCount =0;
|
2024-05-25 09:37:09 +00:00
|
|
|
|
if(this.billCode && this.billCode!=undefined) {
|
|
|
|
|
|
this.loading = true;
|
2025-10-08 09:30:23 +00:00
|
|
|
|
getWaybillDetail(this.billCode).then(response => {
|
|
|
|
|
|
if(response.data.orderStatus=='0'){
|
|
|
|
|
|
this.$modal.msgError('未接单,不允许修改');
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2024-12-25 09:41:43 +00:00
|
|
|
|
if(this.$store.getters.ownerSiteCode!='88888'&&this.action!='got'){
|
2024-08-03 01:50:09 +00:00
|
|
|
|
if(this.$store.getters.ownerSiteCode!=response.data.sendSiteCode){
|
2024-08-04 15:39:57 +00:00
|
|
|
|
this.$modal.msgError('此单归属不允许修改');
|
2024-08-01 04:06:32 +00:00
|
|
|
|
return;
|
2024-07-27 05:11:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-03 01:50:09 +00:00
|
|
|
|
this.form = response.data;
|
2025-06-25 09:39:08 +00:00
|
|
|
|
//处理始发网点为空 始发网点等于寄件网点的值
|
|
|
|
|
|
if(!this.form.startSiteCode || this.form.startSiteCode.trim()==''){
|
|
|
|
|
|
this.form.startSiteCode=this.form.sendSiteCode;
|
|
|
|
|
|
}
|
2024-12-25 09:41:43 +00:00
|
|
|
|
if(this.form.lockFlag=="T"&&this.action!='got'){
|
2024-06-11 11:49:02 +00:00
|
|
|
|
this.$confirm(this.form.lockReason, '提示', {
|
2024-05-31 11:59:20 +00:00
|
|
|
|
confirmButtonText: '确认',
|
|
|
|
|
|
cancelButtonText: '返回',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-03 01:50:09 +00:00
|
|
|
|
this.form.productTypeSelArr=[this.form.transLine,this.form.productType];
|
|
|
|
|
|
this.loading = false;
|
|
|
|
|
|
|
|
|
|
|
|
this.form.printTypeCheckList=[0,1,5]
|
|
|
|
|
|
this.form.destinationCountry=this.form.reciever.country;
|
|
|
|
|
|
|
2024-11-04 23:36:43 +00:00
|
|
|
|
if(this.form.packType&&this.form.packType!=''){
|
2024-08-03 01:50:09 +00:00
|
|
|
|
this.form.packType=this.form.packType.split(",");
|
|
|
|
|
|
}
|
2024-08-01 04:06:32 +00:00
|
|
|
|
|
2024-08-03 01:50:09 +00:00
|
|
|
|
if(!this.form.attachmentList){
|
|
|
|
|
|
this.form.attachmentList=[];
|
|
|
|
|
|
}
|
2024-08-01 04:06:32 +00:00
|
|
|
|
|
2024-08-05 16:01:28 +00:00
|
|
|
|
if(!this.form.feeItems){
|
|
|
|
|
|
this.form.feeItems=[];
|
|
|
|
|
|
}
|
2024-08-01 04:06:32 +00:00
|
|
|
|
|
2024-08-05 16:01:28 +00:00
|
|
|
|
if(!this.form.cargoList){
|
|
|
|
|
|
this.form.cargoList=[];
|
|
|
|
|
|
}
|
2024-08-01 04:06:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
2025-06-11 00:14:20 +00:00
|
|
|
|
|
2024-08-05 16:01:28 +00:00
|
|
|
|
// 接单处理
|
2024-12-25 09:41:43 +00:00
|
|
|
|
if(this.action=="got"){
|
2024-07-29 00:20:56 +00:00
|
|
|
|
// 获取可用运单数
|
|
|
|
|
|
this.initGetTotalAvailablePag(this.form.sendSiteCode);
|
2024-12-25 23:55:49 +00:00
|
|
|
|
|
|
|
|
|
|
if(!this.form.cargoList){
|
|
|
|
|
|
this.handleInitGenGoods();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-07-27 05:11:35 +00:00
|
|
|
|
this.startTimer();
|
|
|
|
|
|
}
|
2025-07-22 06:41:51 +00:00
|
|
|
|
this.senderCountryCode = this.form.sender.country;
|
|
|
|
|
|
this.recieverCountryCode = this.form.reciever.country;
|
2025-10-11 05:10:05 +00:00
|
|
|
|
this.recieverRegionName = this.form.reciever.provinceName;
|
2025-10-15 06:15:50 +00:00
|
|
|
|
// 初始化企业等级
|
|
|
|
|
|
this.categorySender =null;
|
|
|
|
|
|
this.categoryReciever =null;
|
|
|
|
|
|
|
2025-08-28 09:05:55 +00:00
|
|
|
|
if(['2','4','5'].includes(this.form.paymentType)){ //月结
|
|
|
|
|
|
this.selectedMonthUserEnterpriseName = this.form.sender.enterpriseName;
|
|
|
|
|
|
this.selectedMonthUserEnterpriseTaxId = this.form.sender.enterpriseTaxId;
|
|
|
|
|
|
this.selectedSenderEnterpriseName ='';
|
|
|
|
|
|
this.selectedSenderEnterpriseTaxId ='';
|
|
|
|
|
|
}else{
|
|
|
|
|
|
this.selectedMonthUserEnterpriseName = '';
|
|
|
|
|
|
this.selectedMonthUserEnterpriseTaxId = '';
|
|
|
|
|
|
this.selectedSenderEnterpriseName = this.form.sender.enterpriseName;
|
|
|
|
|
|
this.selectedSenderEnterpriseTaxId = this.form.sender.enterpriseTaxId;
|
|
|
|
|
|
}
|
2024-05-25 09:37:09 +00:00
|
|
|
|
});
|
2025-06-11 00:14:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
else{
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
2024-05-31 00:36:52 +00:00
|
|
|
|
// this.startTimer();
|
|
|
|
|
|
// this.form.sendDate = parseTime(new Date());
|
2024-05-25 09:37:09 +00:00
|
|
|
|
this.form.sendSiteCode=this.$store.getters.ownerSiteCode;
|
|
|
|
|
|
this.form.sendSiteName=this.$store.getters.ownerSiteName;
|
2025-06-21 08:17:06 +00:00
|
|
|
|
this.form.startSiteCode = this.$store.getters.ownerSiteCode;
|
|
|
|
|
|
this.form.startSiteName = this.$store.getters.ownerSiteName;
|
2025-06-24 08:48:23 +00:00
|
|
|
|
this.form = {...this.form}
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
|
|
|
|
|
this.form.customsEclaration='1';
|
|
|
|
|
|
this.form.customsClear='1';
|
|
|
|
|
|
// this.form.pickupMethod='2';
|
|
|
|
|
|
this.form.dispatchMethod='1';
|
|
|
|
|
|
// this.form.billWeight=1.0;
|
|
|
|
|
|
// this.form.totalVolume=0.0;
|
|
|
|
|
|
this.form.parcelQty=1;
|
2024-08-16 00:24:55 +00:00
|
|
|
|
// this.form.packType=['2'];
|
2024-05-25 09:37:09 +00:00
|
|
|
|
this.form.blOverWeight='0';
|
2024-06-01 11:43:18 +00:00
|
|
|
|
this.form.blGenSubbill='1';
|
2024-05-25 09:37:09 +00:00
|
|
|
|
this.form.paymentType='1';
|
|
|
|
|
|
this.form.calcFeeType='1';
|
|
|
|
|
|
this.form.blMessage='1'
|
|
|
|
|
|
this.form.blAcceptMessage='1'
|
2024-08-03 01:50:09 +00:00
|
|
|
|
//
|
2024-06-21 17:54:53 +00:00
|
|
|
|
this.form.printTypeCheckList=[0,1,5],
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
2024-07-29 00:20:56 +00:00
|
|
|
|
// 获取可用运单数
|
2024-05-31 00:36:52 +00:00
|
|
|
|
this.initGetTotalAvailablePag(this.form.sendSiteCode);
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
this.handleInitGenGoods();
|
2024-05-31 00:36:52 +00:00
|
|
|
|
|
|
|
|
|
|
this.startTimer();
|
2024-08-03 01:50:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
beforeDestroy() {
|
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
|
|
},
|
2024-12-26 00:17:53 +00:00
|
|
|
|
jumpToOrderList(){
|
|
|
|
|
|
this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
|
|
|
this.$router.replace({ path: '/d24/orderManagement/UserOrderList'});
|
|
|
|
|
|
},
|
2024-05-25 09:37:09 +00:00
|
|
|
|
// 取消按钮
|
|
|
|
|
|
cancel() {
|
|
|
|
|
|
this.reset();
|
|
|
|
|
|
this.$emit("on-cancel");
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 表单重置
|
|
|
|
|
|
reset() {
|
|
|
|
|
|
this.form = {
|
|
|
|
|
|
id:null,
|
|
|
|
|
|
reciever: {
|
|
|
|
|
|
country: null,
|
|
|
|
|
|
name: null,
|
|
|
|
|
|
phone:null,
|
|
|
|
|
|
province: null,
|
|
|
|
|
|
city: null,
|
|
|
|
|
|
district: null,
|
|
|
|
|
|
town: null,
|
|
|
|
|
|
address: null,
|
|
|
|
|
|
postCode: null,
|
|
|
|
|
|
email: null,
|
|
|
|
|
|
company: null,
|
|
|
|
|
|
},
|
|
|
|
|
|
sender: {
|
|
|
|
|
|
country: null,
|
|
|
|
|
|
name: null,
|
|
|
|
|
|
phone:null,
|
|
|
|
|
|
province: null,
|
|
|
|
|
|
city: null,
|
|
|
|
|
|
district: null,
|
|
|
|
|
|
town: null,
|
|
|
|
|
|
address: null,
|
|
|
|
|
|
postCode: null,
|
|
|
|
|
|
email: null,
|
|
|
|
|
|
company: null,
|
|
|
|
|
|
},
|
|
|
|
|
|
feeItems: [],
|
|
|
|
|
|
cargoList: [],
|
|
|
|
|
|
attachmentList: [],
|
|
|
|
|
|
printTypeCheckList:[],
|
|
|
|
|
|
billCode: null,
|
|
|
|
|
|
orderDate: null,
|
|
|
|
|
|
openId: null,
|
|
|
|
|
|
customerCode: null,
|
|
|
|
|
|
paymentType: null,
|
|
|
|
|
|
calcFeeType: '1',
|
|
|
|
|
|
custNo: null,
|
|
|
|
|
|
productTypeSelArr: null,
|
|
|
|
|
|
transLine: null,
|
|
|
|
|
|
productType: null,
|
|
|
|
|
|
customsClear: null,
|
|
|
|
|
|
customsEclaration: null,
|
|
|
|
|
|
packType: null,
|
|
|
|
|
|
dispatchMethod: "1",
|
|
|
|
|
|
pickupMethod: null,
|
|
|
|
|
|
pickStartDate: null,
|
|
|
|
|
|
pickFinishDate: null,
|
|
|
|
|
|
intoWarehouseCode: null,
|
|
|
|
|
|
intoWarehouseName: null,
|
|
|
|
|
|
intoWarehouseAddress: null,
|
|
|
|
|
|
intoWarehouseContact: null,
|
|
|
|
|
|
intoWarehousePhone: null,
|
|
|
|
|
|
intoWarehouseBillCode: null,
|
|
|
|
|
|
customerDeliveryBeginTime: null,
|
|
|
|
|
|
goodsType:null,
|
|
|
|
|
|
goodsInfo: null,
|
|
|
|
|
|
length:null,
|
|
|
|
|
|
width:null,
|
|
|
|
|
|
height:null,
|
|
|
|
|
|
totalWeight: null,
|
|
|
|
|
|
totalVolume: null,
|
|
|
|
|
|
parcelQty: null,
|
|
|
|
|
|
billWeight: null,
|
|
|
|
|
|
volumeWeight: null,
|
|
|
|
|
|
settlementWeight: null,
|
|
|
|
|
|
feeWeight: null,
|
|
|
|
|
|
freight: null,
|
|
|
|
|
|
blOverLong: null,
|
|
|
|
|
|
blOverWeight: null,
|
|
|
|
|
|
overWeightNumber: null,
|
2024-06-08 07:20:21 +00:00
|
|
|
|
feeRemark: null,
|
2025-03-28 01:08:59 +00:00
|
|
|
|
codFeeDesc:null,
|
2024-05-25 09:37:09 +00:00
|
|
|
|
realValue: null,
|
|
|
|
|
|
takePieceEmployeeCode: null,
|
|
|
|
|
|
sendSiteCode: null,
|
|
|
|
|
|
sendSiteName: null,
|
|
|
|
|
|
destinationCountry: null,
|
|
|
|
|
|
destinationCode: null,
|
|
|
|
|
|
dispatchUnderlingSiteCode: null,
|
2024-06-28 01:40:27 +00:00
|
|
|
|
dispatchUnderlingSiteName:null,
|
2024-05-25 09:37:09 +00:00
|
|
|
|
destinationCenterCode: null,
|
|
|
|
|
|
marketManCode: null,
|
|
|
|
|
|
payee: null,
|
|
|
|
|
|
salesmen: null,
|
|
|
|
|
|
operateEmployeeCode: null,
|
|
|
|
|
|
blMessage: null,
|
|
|
|
|
|
blAcceptMessage: null,
|
|
|
|
|
|
meterType:null,
|
|
|
|
|
|
blGenSubbill:null,
|
|
|
|
|
|
billCodeSub:null,
|
|
|
|
|
|
blSpecialQuote:null,
|
|
|
|
|
|
blSensitive:null,
|
2024-05-31 11:59:20 +00:00
|
|
|
|
lockFlag:null,
|
2024-06-11 11:49:02 +00:00
|
|
|
|
lockReason:null,
|
2024-06-29 03:34:07 +00:00
|
|
|
|
blSelfBillCode:null,
|
2025-04-25 01:04:28 +00:00
|
|
|
|
extInfo:null,
|
|
|
|
|
|
ladingBillCode:null,
|
|
|
|
|
|
companyCode:null,
|
|
|
|
|
|
departurePort:null,
|
|
|
|
|
|
destinationPort:null,
|
|
|
|
|
|
boxQuantity:null,
|
2025-06-19 03:35:08 +00:00
|
|
|
|
carryType:null,
|
|
|
|
|
|
blVirtual:null,
|
|
|
|
|
|
masterBillCode:null
|
2024-05-25 09:37:09 +00:00
|
|
|
|
};
|
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
|
},
|
2025-06-11 08:11:46 +00:00
|
|
|
|
onProductChange(item,transType){
|
2025-06-24 08:48:23 +00:00
|
|
|
|
//非缅甸快递/缅甸快递进口/柬埔寨快递进口 重置虚拟单
|
2025-06-25 09:39:08 +00:00
|
|
|
|
if(!['002','012','014','078'].includes(item[0])){
|
2025-06-24 08:48:23 +00:00
|
|
|
|
this.form.masterBillCode = null;
|
|
|
|
|
|
this.form.blVirtual = null;
|
|
|
|
|
|
}
|
2025-06-25 09:56:44 +00:00
|
|
|
|
if(item && !['002'].includes(item[0]) && this.form.remark && this.form.remark!==null){
|
2025-06-24 08:48:23 +00:00
|
|
|
|
this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
|
2025-06-19 03:35:08 +00:00
|
|
|
|
}
|
2024-05-29 00:48:35 +00:00
|
|
|
|
if(item!=null && item.length==2){
|
|
|
|
|
|
this.form.transLine=item[0];
|
|
|
|
|
|
this.form.productType=item[1];
|
2025-04-25 01:04:28 +00:00
|
|
|
|
this.form.carryType=transType;
|
2024-10-07 04:03:07 +00:00
|
|
|
|
// this.calcBillFee();
|
2024-10-07 04:32:38 +00:00
|
|
|
|
this.handleCalcVolumeWeight();
|
2024-10-07 04:03:07 +00:00
|
|
|
|
|
2024-05-29 00:48:35 +00:00
|
|
|
|
}
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
|
|
|
|
|
onSendSiteSelect(item){
|
2025-06-23 03:33:49 +00:00
|
|
|
|
this.sendSiteSelectCount ++ ;
|
2025-06-11 00:15:28 +00:00
|
|
|
|
////console.log("==onSendSiteSelect==>",item)
|
|
|
|
|
|
////console.log("==onSendSiteSelect==this.form=>",this.form)
|
2025-06-11 00:14:20 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
if(!item){
|
|
|
|
|
|
this.form.sendSiteCode = null;
|
|
|
|
|
|
this.form.sendSiteName = null;
|
2025-06-21 08:17:06 +00:00
|
|
|
|
this.form.startSiteCode = null;
|
|
|
|
|
|
this.form.startSiteName = null;
|
2024-05-25 09:37:09 +00:00
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.form.sendSiteCode=item.siteCode;
|
|
|
|
|
|
this.form.sendSiteName=item.siteName;
|
2025-08-19 07:04:57 +00:00
|
|
|
|
// if(this.sendSiteSelectCount > 2){
|
2025-06-23 03:33:49 +00:00
|
|
|
|
this.form.startSiteCode = item.siteCode;
|
|
|
|
|
|
this.form.startSiteName = item.siteName;
|
2025-08-19 07:04:57 +00:00
|
|
|
|
// }
|
2024-05-31 00:36:52 +00:00
|
|
|
|
this.initGetTotalAvailablePag(this.form.sendSiteCode);
|
2025-06-11 00:14:20 +00:00
|
|
|
|
// this.calcBillFee();
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
2025-06-21 08:17:06 +00:00
|
|
|
|
onStartSiteSelect(item){
|
|
|
|
|
|
if(!item){
|
|
|
|
|
|
this.form.startSiteCode = null;
|
|
|
|
|
|
this.form.startSiteName = null;
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.form.startSiteCode=item.siteCode;
|
|
|
|
|
|
this.form.startSiteName=item.siteName;
|
|
|
|
|
|
},
|
2024-05-25 09:37:09 +00:00
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
|
submitForm() {
|
2024-05-31 00:36:52 +00:00
|
|
|
|
this.form.sendDate =this.sendDate;
|
2024-07-05 12:01:45 +00:00
|
|
|
|
this.$refs["form"].validate((valid,obj) => {
|
2024-05-25 09:37:09 +00:00
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
|
|
|
|
if(this.form.destinationCountry!=this.form.reciever.country){
|
|
|
|
|
|
this.$modal.msgError("收件国和目的国不一致");
|
|
|
|
|
|
return ;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(this.action=="modify" && this.billCode !=this.form.billCode){
|
2024-05-25 14:50:01 +00:00
|
|
|
|
this.$confirm("当前单号"+this.form.billCode+"与修改单号"+this.billCode+"不一致,不允许提交!", '提示', {
|
|
|
|
|
|
confirmButtonText: '确认',
|
|
|
|
|
|
cancelButtonText: '返回',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
this.calcDestSite();
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
}else{
|
|
|
|
|
|
this.realSaveOrderInfo();
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-05-25 14:50:01 +00:00
|
|
|
|
}
|
2024-07-05 12:01:45 +00:00
|
|
|
|
else {
|
|
|
|
|
|
var fail = [];
|
|
|
|
|
|
for (let key in obj) {
|
|
|
|
|
|
fail.push(obj[key][0].message);
|
|
|
|
|
|
}
|
|
|
|
|
|
this.$notify({
|
|
|
|
|
|
title: '校验失败',
|
|
|
|
|
|
message: '<span style="color:red;font-weight:600">'+fail[0]+'</span>',
|
|
|
|
|
|
type: 'error',
|
|
|
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
|
|
|
showClose: false,
|
|
|
|
|
|
duration: 2000,
|
|
|
|
|
|
// position: 'bottom-right',
|
|
|
|
|
|
offset: 100
|
|
|
|
|
|
});
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
2024-05-25 14:50:01 +00:00
|
|
|
|
});
|
|
|
|
|
|
},
|
2024-05-31 00:36:52 +00:00
|
|
|
|
startTimer(){
|
2024-12-25 09:41:43 +00:00
|
|
|
|
if(this.action=='add' || this.action=='preAdd' || this.action=='got'){
|
2024-05-31 00:36:52 +00:00
|
|
|
|
this.sendDate=parseTime(new Date());
|
|
|
|
|
|
this.timer = setTimeout(this.startTimer, 1000);
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
stopTimer(){
|
|
|
|
|
|
clearTimeout(this.timer);
|
|
|
|
|
|
this.timer=null;
|
|
|
|
|
|
},
|
2024-05-25 14:50:01 +00:00
|
|
|
|
realSaveOrderInfo(){
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
2024-06-01 11:43:18 +00:00
|
|
|
|
// 不影响原表单提交,clone 一份数据
|
|
|
|
|
|
let postForm=deepClone(this.form)
|
2024-05-25 14:50:01 +00:00
|
|
|
|
// 调整包装类型为多选
|
2024-05-31 00:36:52 +00:00
|
|
|
|
if(this.form.packType&&this.form.packType.length>0){
|
2024-06-01 11:43:18 +00:00
|
|
|
|
postForm.packType=this.form.packType.join(",");
|
2024-05-25 14:50:01 +00:00
|
|
|
|
}
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
2024-05-25 14:50:01 +00:00
|
|
|
|
|
2024-06-01 11:43:18 +00:00
|
|
|
|
realSubmitOrder(postForm).then(response => {
|
2024-05-25 14:50:01 +00:00
|
|
|
|
this.$modal.msgSuccess("下单成功");
|
2024-05-31 23:31:01 +00:00
|
|
|
|
// 新开单才需要打印
|
2024-12-25 09:41:43 +00:00
|
|
|
|
if(this.action == "add" || this.action == "got"){
|
2024-05-31 23:31:01 +00:00
|
|
|
|
// 做揽收扫描记录
|
2024-06-20 04:37:30 +00:00
|
|
|
|
// this.handDoGotScan();
|
2024-05-31 23:31:01 +00:00
|
|
|
|
|
2024-06-01 11:43:18 +00:00
|
|
|
|
// 弹出打印预览界面
|
|
|
|
|
|
this.handlePrintPreview();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if(this.action == "modify"){
|
|
|
|
|
|
// 弹出是否继续的窗口
|
|
|
|
|
|
this.onComplete();
|
2024-05-31 23:31:01 +00:00
|
|
|
|
}
|
2024-05-25 14:50:01 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
});
|
2024-05-31 23:31:01 +00:00
|
|
|
|
},
|
|
|
|
|
|
handDoGotScan(){
|
|
|
|
|
|
let opManCode=null;
|
|
|
|
|
|
if(this.form.pickupMethod==1){
|
|
|
|
|
|
opManCode=this.form.operateEmployeeCode;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if(this.form.pickupMethod==2){
|
|
|
|
|
|
opManCode=this.form.takePieceEmployeeCode;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 揽收扫描
|
2024-06-01 11:43:18 +00:00
|
|
|
|
let scanData=[{
|
2024-05-31 23:31:01 +00:00
|
|
|
|
billCode:this.form.billCode,
|
|
|
|
|
|
scanWeight:null,
|
|
|
|
|
|
scanDate:new Date(),
|
|
|
|
|
|
dispatchOrSendManCode:opManCode
|
2024-06-01 11:43:18 +00:00
|
|
|
|
}];
|
2024-05-31 23:31:01 +00:00
|
|
|
|
let scanInfo = {scanType:"10",opType:2,scanData:scanData}
|
2025-06-11 00:15:28 +00:00
|
|
|
|
////console.log(scanInfo)
|
2024-05-31 23:31:01 +00:00
|
|
|
|
doScan(scanInfo);
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
|
|
|
|
|
// 弹出地址簿选择
|
|
|
|
|
|
handleSelectCustomerAddress(addressType){
|
|
|
|
|
|
this.addressType = addressType;
|
|
|
|
|
|
this.titleSelectAddress = this.addressType==1? this.$t('选择寄件人'):this.$t('选择收件人');
|
|
|
|
|
|
this.openSelectAddress = true;
|
|
|
|
|
|
},
|
|
|
|
|
|
// 地址薄选择后返回
|
|
|
|
|
|
onAddressChangeSelect(item){
|
|
|
|
|
|
if(this.addressType == 1){
|
|
|
|
|
|
this.onChangeSelectSender(item);
|
|
|
|
|
|
}else{
|
|
|
|
|
|
this.onChangeSelectReceiver(item);
|
|
|
|
|
|
}
|
|
|
|
|
|
this.openSelectAddress = false;
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
onChangeSelectSender(value){
|
|
|
|
|
|
this.form.sender.name=value.name;
|
|
|
|
|
|
this.form.sender.phone=value.phone;
|
|
|
|
|
|
this.form.sender.country=value.country;
|
|
|
|
|
|
this.form.sender.province=value.province;
|
|
|
|
|
|
this.form.sender.city=value.city;
|
2024-06-06 08:36:55 +00:00
|
|
|
|
this.form.sender.county=value.county;
|
2024-05-25 09:37:09 +00:00
|
|
|
|
// this.form.receiveTown=value.town;
|
|
|
|
|
|
this.form.sender.address=value.address;
|
|
|
|
|
|
this.form.sender.company=value.company;
|
2025-07-30 07:56:18 +00:00
|
|
|
|
this.senderCountryCode=value.country;
|
2025-08-25 08:08:28 +00:00
|
|
|
|
this.form.sender.id = value.id;
|
2025-08-27 09:56:56 +00:00
|
|
|
|
// 选中的寄件人企业名称
|
|
|
|
|
|
this.selectedSenderEnterpriseName=value.enterpriseName;
|
|
|
|
|
|
// 选中的寄件人企业税号
|
|
|
|
|
|
this.selectedSenderEnterpriseTaxId=value.enterpriseTaxId;
|
2025-08-28 09:05:55 +00:00
|
|
|
|
//非月结且地址是中国 企业税号取值寄件地址
|
2025-08-27 09:56:56 +00:00
|
|
|
|
if(!['2','4','5'].includes(this.form.paymentType) && this.form.sender.country=='0086' ){
|
|
|
|
|
|
this.form.sender.enterpriseName=value.enterpriseName;
|
|
|
|
|
|
this.form.sender.enterpriseTaxId=value.enterpriseTaxId;
|
2025-08-28 09:05:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
//非月结且地址是非中国 企业号置空
|
|
|
|
|
|
if(this.form.sender.country!='0086' ){
|
|
|
|
|
|
this.form.sender.enterpriseName='';
|
|
|
|
|
|
this.form.sender.enterpriseTaxId='';
|
|
|
|
|
|
}
|
|
|
|
|
|
// 月结且中国 企业号取值月结客户企业号
|
|
|
|
|
|
if (['2', '4', '5'].includes(this.form.paymentType) && this.form.sender.country == '0086') {
|
|
|
|
|
|
this.form.sender.enterpriseName = this.selectedMonthUserEnterpriseName;
|
|
|
|
|
|
this.form.sender.enterpriseTaxId = this.selectedMonthUserEnterpriseTaxId;
|
2025-08-27 09:56:56 +00:00
|
|
|
|
}
|
2025-10-15 06:15:50 +00:00
|
|
|
|
//校验寄件人企业等级
|
|
|
|
|
|
this.checkEnterprise(this.form.sender.enterpriseName);
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
|
|
|
|
|
onChangeSelectReceiver(value){
|
|
|
|
|
|
this.form.reciever.name=value.name;
|
|
|
|
|
|
this.form.reciever.phone=value.phone;
|
|
|
|
|
|
this.form.reciever.country=value.country;
|
|
|
|
|
|
this.form.reciever.province=value.province;
|
|
|
|
|
|
this.form.reciever.city=value.city;
|
2024-06-06 08:36:55 +00:00
|
|
|
|
this.form.reciever.county=value.county;
|
2024-05-25 09:37:09 +00:00
|
|
|
|
// this.form.receiveTown=value.town;
|
|
|
|
|
|
this.form.reciever.address=value.address;
|
|
|
|
|
|
this.form.reciever.company=value.company;
|
2025-07-30 07:56:18 +00:00
|
|
|
|
this.recieverCountryCode=value.country;
|
2025-10-11 05:10:05 +00:00
|
|
|
|
this.recieverRegionName = value.provinceName;
|
2024-05-25 14:22:10 +00:00
|
|
|
|
this.handleCalcDestSite();
|
2025-10-15 06:15:50 +00:00
|
|
|
|
this.openSpecialZone(value.country ,value.address , value.provinceName);
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
|
|
|
|
|
// 计算目的站点
|
|
|
|
|
|
handleCalcDestSite(){
|
2024-05-25 14:22:10 +00:00
|
|
|
|
|
|
|
|
|
|
if(this.form.reciever.country != this.form.destinationCountry){
|
|
|
|
|
|
this.$confirm('收件国和目的国不一致,请调整!', '提示', {
|
|
|
|
|
|
confirmButtonText: '确认',
|
|
|
|
|
|
cancelButtonText: '返回',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
this.calcDestSite();
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
})
|
|
|
|
|
|
}else{
|
|
|
|
|
|
this.calcDestSite();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
calcDestSite(){
|
2025-06-11 00:15:28 +00:00
|
|
|
|
////console.log("==calcDestSite==>")
|
2025-06-11 00:14:20 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
let queryParams = {
|
2024-06-28 02:24:48 +00:00
|
|
|
|
country:this.form.reciever.country,
|
|
|
|
|
|
province:this.form.reciever.province,
|
|
|
|
|
|
city:this.form.reciever.city,
|
2024-06-28 02:32:32 +00:00
|
|
|
|
county:this.form.reciever.city,
|
2024-06-28 02:24:48 +00:00
|
|
|
|
address:this.form.reciever.address
|
2024-05-25 09:37:09 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if(this.form.reciever.province){
|
|
|
|
|
|
getDestSite(queryParams).then(response => {
|
|
|
|
|
|
this.form.destinationCode = response.data.destCode+'';
|
|
|
|
|
|
this.form.dispatchSiteCode= response.data.siteCode;
|
2024-05-25 14:22:10 +00:00
|
|
|
|
this.form.dispatchSite = response.data.siteName;
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
2024-05-25 14:22:10 +00:00
|
|
|
|
this.form.dispatchUnderlingSiteCode= response.data.siteCode;
|
2024-06-28 01:40:27 +00:00
|
|
|
|
this.form.dispatchUnderlingSiteName= response.data.siteName;
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
2024-09-04 07:31:11 +00:00
|
|
|
|
// 计算费用
|
|
|
|
|
|
this.calcBillFee();
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2024-07-20 05:00:02 +00:00
|
|
|
|
focusNextInput(nextRef) {
|
2025-06-11 00:15:28 +00:00
|
|
|
|
// ////console.log("====focusNextInput===>",nextRef)
|
2024-08-03 01:50:09 +00:00
|
|
|
|
if(this.$refs[nextRef]){
|
|
|
|
|
|
this.$refs[nextRef].focus()
|
|
|
|
|
|
}
|
2024-07-20 05:00:02 +00:00
|
|
|
|
},
|
2024-05-29 01:59:04 +00:00
|
|
|
|
handleCalcVolumeDebounce(row){
|
|
|
|
|
|
// 控制触发频率
|
|
|
|
|
|
debounce(250, this.handleCalcVolume(row))
|
|
|
|
|
|
},
|
2024-05-25 09:37:09 +00:00
|
|
|
|
handleCalcVolume(row){
|
|
|
|
|
|
|
|
|
|
|
|
if(row!=null){
|
|
|
|
|
|
let singleVolume=parseFloat(row.length)*parseFloat(row.width)*parseFloat(row.height);
|
|
|
|
|
|
let singleTotalVolume=singleVolume*parseFloat(row.cargoQty);
|
2024-08-16 00:24:55 +00:00
|
|
|
|
row.volume=parseFloat( (singleTotalVolume/1000000).toFixed(4) );
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let totalVolume=0.0;
|
|
|
|
|
|
this.form.cargoList.forEach(item=>{
|
|
|
|
|
|
totalVolume=totalVolume+item.volume;
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2024-11-17 01:43:01 +00:00
|
|
|
|
if(totalVolume>0.0){
|
|
|
|
|
|
this.form.totalVolume = parseFloat(totalVolume.toFixed(4));
|
|
|
|
|
|
this.handleCalcVolumeWeight();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2024-07-18 13:24:03 +00:00
|
|
|
|
async handleCalcFeeItem(row){
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
2024-08-03 01:50:09 +00:00
|
|
|
|
if(row!=null && this.form.settlementWeight!=null){
|
|
|
|
|
|
if(row.calcExp&&row.calcExp!='undefined'){
|
2024-06-01 11:43:18 +00:00
|
|
|
|
let expr=row.calcExp;
|
2024-07-31 09:42:48 +00:00
|
|
|
|
// 如果公式包含变量,使用变量进行计算
|
|
|
|
|
|
if(expr.indexOf('s')!=-1 || expr.indexOf('d')!=-1){
|
|
|
|
|
|
expr=expr.replace("s",row.initialWeightFee);
|
|
|
|
|
|
expr=expr.replace("d",row.addWeightPrice);
|
2024-10-17 22:52:31 +00:00
|
|
|
|
|
|
|
|
|
|
// 如果按重量计费,则计算重量使用体积计算费用
|
|
|
|
|
|
let calcWeight = this.form.settlementWeight;
|
|
|
|
|
|
if(this.form.calcFeeType==2){
|
|
|
|
|
|
calcWeight=this.form.totalVolume;
|
|
|
|
|
|
}
|
|
|
|
|
|
expr=expr.replace("w",calcWeight);
|
2024-07-31 09:42:48 +00:00
|
|
|
|
row.realFee=parseFloat(eval(expr)).toFixed(2);
|
|
|
|
|
|
}else{
|
|
|
|
|
|
//
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-07-27 05:11:35 +00:00
|
|
|
|
}else{
|
|
|
|
|
|
let expr="s+w*d";
|
|
|
|
|
|
if(row.initialWeightFee>0||row.addWeightPrice>0){
|
2024-08-03 01:50:09 +00:00
|
|
|
|
|
2024-07-27 05:11:35 +00:00
|
|
|
|
expr=expr.replace("s",row.initialWeightFee);
|
|
|
|
|
|
expr=expr.replace("d",row.addWeightPrice);
|
2024-10-17 22:52:31 +00:00
|
|
|
|
|
|
|
|
|
|
// 如果按重量计费,则计算重量使用体积计算费用
|
|
|
|
|
|
let calcWeight = this.form.settlementWeight;
|
|
|
|
|
|
if(this.form.calcFeeType==2){
|
|
|
|
|
|
calcWeight=this.form.totalVolume;
|
|
|
|
|
|
}
|
|
|
|
|
|
expr=expr.replace("w",calcWeight);
|
|
|
|
|
|
|
2024-07-27 05:11:35 +00:00
|
|
|
|
row.realFee=parseFloat(eval(expr)).toFixed(2);
|
|
|
|
|
|
}
|
2024-08-31 08:32:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}
|
2024-07-31 09:42:48 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-07-20 05:00:02 +00:00
|
|
|
|
let totalFee=Number(0);
|
2024-06-24 05:29:39 +00:00
|
|
|
|
if(this.form.feeItems&&this.form.feeItems.length>0){
|
2024-07-18 13:24:03 +00:00
|
|
|
|
let len=this.form.feeItems.length;
|
|
|
|
|
|
for(let i=0;i<len;i++){
|
|
|
|
|
|
let item=this.form.feeItems[i];
|
2024-07-27 05:11:35 +00:00
|
|
|
|
let newFee=Number(item.realFee);
|
2024-07-18 13:24:03 +00:00
|
|
|
|
if(item.currency&&item.currency !='CNY'){
|
2024-10-17 23:14:19 +00:00
|
|
|
|
if(this.form.sendDate==undefined||this.form.sendDate==null||this.form.sendDate==''){
|
|
|
|
|
|
this.form.sendDate =this.sendDate;
|
|
|
|
|
|
}
|
|
|
|
|
|
let qObj={from:item.currency,to:'CNY',rateDate:this.form.sendDate};
|
2025-06-11 00:15:28 +00:00
|
|
|
|
////console.log("===>getValidExchangeRate==>",qObj);
|
2024-10-17 23:14:19 +00:00
|
|
|
|
let res= await getValidExchangeRate(qObj);
|
2024-07-18 13:24:03 +00:00
|
|
|
|
if(res.code==200){
|
2024-07-20 05:00:02 +00:00
|
|
|
|
newFee=newFee*Number(res.data);
|
2024-08-31 08:32:09 +00:00
|
|
|
|
newFee=newFee.toFixed(2);
|
2024-07-25 00:47:55 +00:00
|
|
|
|
item.remark="汇率:"+res.data+","+newFee+"(CNY)"
|
2024-07-18 13:24:03 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-07-25 00:47:55 +00:00
|
|
|
|
|
2024-08-31 09:10:34 +00:00
|
|
|
|
newFee=Number(newFee).toFixed(2);
|
2024-07-20 05:00:02 +00:00
|
|
|
|
totalFee=Number(totalFee)+Number(newFee);
|
2024-08-31 08:32:09 +00:00
|
|
|
|
|
|
|
|
|
|
if(item.blAutoGen==0){
|
|
|
|
|
|
item.fee=item.realFee;
|
|
|
|
|
|
}
|
2024-07-18 13:24:03 +00:00
|
|
|
|
}
|
2024-06-24 05:29:39 +00:00
|
|
|
|
}
|
2024-07-20 05:00:02 +00:00
|
|
|
|
this.form.freight = totalFee.toFixed(2);
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
|
|
|
|
|
// 计算体积重量
|
|
|
|
|
|
handleCalcVolumeWeight(){
|
|
|
|
|
|
|
|
|
|
|
|
if( this.form.totalVolume
|
|
|
|
|
|
&& this.form.productType
|
|
|
|
|
|
){
|
|
|
|
|
|
let postData={
|
|
|
|
|
|
productType: this.form.productType,
|
|
|
|
|
|
totalVolume: this.form.totalVolume,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
calcVolumeWeight(postData).then(response => {
|
|
|
|
|
|
this.form.volumeWeight = response.data.volumeWeight;
|
|
|
|
|
|
// 计算结算重量
|
|
|
|
|
|
this.handleCalcSettlementWeight();
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
2025-08-11 08:33:17 +00:00
|
|
|
|
// 防抖 计算体积重量
|
|
|
|
|
|
handleCalcVolumeWeightDebounce:debounce(250,function(){
|
|
|
|
|
|
this.handleCalcVolumeWeight();
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
// 计算结算重量
|
|
|
|
|
|
handleCalcSettlementWeight(){
|
|
|
|
|
|
|
|
|
|
|
|
if(this.form.billWeight
|
|
|
|
|
|
&& this.form.volumeWeight
|
|
|
|
|
|
&& this.form.productType
|
|
|
|
|
|
){
|
|
|
|
|
|
|
|
|
|
|
|
let postData={
|
|
|
|
|
|
productType: this.form.productType,
|
|
|
|
|
|
volumeWeight: this.form.volumeWeight,
|
|
|
|
|
|
billWeight: this.form.billWeight,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
calcSetteldWeight(postData).then(response => {
|
2024-05-29 00:48:35 +00:00
|
|
|
|
// 结算重量发生改变才计算费用
|
2024-10-10 10:52:01 +00:00
|
|
|
|
// if(this.form.settlementWeight != response.data.settlementWeight ){
|
2024-05-29 00:48:35 +00:00
|
|
|
|
this.form.settlementWeight = response.data.settlementWeight;
|
|
|
|
|
|
this.form.feeWeight = this.form.settlementWeight ;
|
2024-05-26 10:44:55 +00:00
|
|
|
|
|
2025-04-25 01:04:28 +00:00
|
|
|
|
this.isNeedCalcFee=true;
|
|
|
|
|
|
|
2024-05-29 00:48:35 +00:00
|
|
|
|
// 计算费用
|
|
|
|
|
|
this.calcBillFee();
|
2024-10-10 10:52:01 +00:00
|
|
|
|
// }
|
2024-05-25 09:37:09 +00:00
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
2025-08-11 08:33:17 +00:00
|
|
|
|
// 防抖 计算结算重量
|
|
|
|
|
|
handleCalcSettlementWeightDebounce:debounce(250,function(){
|
|
|
|
|
|
this.handleCalcSettlementWeight();
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
2024-10-17 22:52:31 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
calcBillFee(){
|
2024-08-03 01:50:09 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
|
|
|
|
|
if(this.form.settlementWeight
|
|
|
|
|
|
&& this.form.productType
|
|
|
|
|
|
&& this.form.sendSiteCode
|
|
|
|
|
|
&& this.form.dispatchUnderlingSiteCode
|
|
|
|
|
|
&& this.form.calcFeeType
|
2024-05-26 09:46:38 +00:00
|
|
|
|
&& this.form.customsClear
|
|
|
|
|
|
&& this.form.customsEclaration
|
2024-05-25 09:37:09 +00:00
|
|
|
|
){
|
2024-05-26 09:46:38 +00:00
|
|
|
|
|
|
|
|
|
|
let calcFeeType=this.form.calcFeeType;
|
|
|
|
|
|
if(calcFeeType==3){
|
2024-07-18 12:05:49 +00:00
|
|
|
|
calcFeeType=1;
|
2024-10-17 22:52:31 +00:00
|
|
|
|
this.form.blSpecialQuote=0;
|
2024-07-05 12:01:45 +00:00
|
|
|
|
// 不要重算费用
|
2024-07-18 12:05:49 +00:00
|
|
|
|
// return;
|
2024-05-26 09:46:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
let postData={
|
|
|
|
|
|
productType: this.form.productType,
|
|
|
|
|
|
customerCode: this.form.customerCode,
|
|
|
|
|
|
custNo: this.form.custNo,
|
2024-05-26 09:46:38 +00:00
|
|
|
|
calcFeeType:calcFeeType,
|
2024-05-25 09:37:09 +00:00
|
|
|
|
settlementWeight: this.form.settlementWeight,
|
2024-08-04 15:39:57 +00:00
|
|
|
|
totalVolume: this.form.totalVolume,
|
2024-05-25 09:37:09 +00:00
|
|
|
|
sendSiteCode: this.form.sendSiteCode,
|
|
|
|
|
|
dispatchUnderlingSiteCode: this.form.dispatchUnderlingSiteCode,
|
2024-05-26 09:46:38 +00:00
|
|
|
|
customsClear:this.form.customsClear,
|
2025-07-15 05:17:06 +00:00
|
|
|
|
customsEclaration:this.form.customsEclaration,
|
|
|
|
|
|
startSiteCode:this.form.startSiteCode,
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-05-31 00:36:52 +00:00
|
|
|
|
|
|
|
|
|
|
// 提前重算费用
|
|
|
|
|
|
let custFeeList = [];
|
2024-07-29 00:20:56 +00:00
|
|
|
|
|
2024-05-31 00:36:52 +00:00
|
|
|
|
this.form.feeItems.forEach(item=>{
|
|
|
|
|
|
if(item.blAutoGen!='1'){
|
|
|
|
|
|
custFeeList.push(item);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
this.form.feeItems = custFeeList;
|
|
|
|
|
|
this.handleCalcFeeItem();
|
|
|
|
|
|
|
|
|
|
|
|
// 通过服务器其计算,保留自定义费用
|
2024-05-25 09:37:09 +00:00
|
|
|
|
calcWaybillFee(postData).then(response => {
|
2024-05-26 10:44:55 +00:00
|
|
|
|
let newFeeList=[];
|
|
|
|
|
|
let newFeeMap = new Map();
|
|
|
|
|
|
|
|
|
|
|
|
if(response.data.feeList){
|
|
|
|
|
|
newFeeList=response.data.feeList;
|
|
|
|
|
|
newFeeList.forEach(item=>{
|
|
|
|
|
|
newFeeMap[item.feeCode]=item;
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let custFeeList = [];
|
|
|
|
|
|
this.form.feeItems.forEach(item=>{
|
|
|
|
|
|
if(item.blAutoGen!='1' && !(item.feeCode in newFeeMap)){
|
|
|
|
|
|
custFeeList.push(item);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
2024-05-26 10:44:55 +00:00
|
|
|
|
this.form.feeItems = newFeeList.concat(custFeeList);
|
|
|
|
|
|
this.handleCalcFeeItem();
|
|
|
|
|
|
|
2025-04-25 01:04:28 +00:00
|
|
|
|
this.isNeedCalcFee=false;
|
|
|
|
|
|
|
2024-05-26 10:44:55 +00:00
|
|
|
|
// if(newFeeList && newFeeList.lenght>0){
|
|
|
|
|
|
|
|
|
|
|
|
// }else{
|
|
|
|
|
|
// this.form.feeItems=[]
|
|
|
|
|
|
// this.handleCalcFeeItem();
|
|
|
|
|
|
|
|
|
|
|
|
// // this.$confirm('该产品未配置报价,请联系管理员!', '提示', {
|
|
|
|
|
|
// // confirmButtonText: '确认',
|
|
|
|
|
|
// // cancelButtonText: '返回',
|
|
|
|
|
|
// // type: 'warning'
|
|
|
|
|
|
// // });
|
|
|
|
|
|
// }
|
2024-05-25 09:37:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onDestinationChange(item){
|
|
|
|
|
|
// this.form.destinationCode = item.destCode;
|
|
|
|
|
|
this.form.dispatchUnderlingSiteCode= item.siteCode;
|
2024-06-28 01:40:27 +00:00
|
|
|
|
// this.form.dispatchSiteCode= item.siteCode;
|
|
|
|
|
|
this.form.dispatchUnderlingSiteName= item.siteName;
|
|
|
|
|
|
// this.form.dispatchSite= item.siteName;
|
2024-07-07 09:17:38 +00:00
|
|
|
|
|
2025-06-11 00:15:28 +00:00
|
|
|
|
////console.log("==onDestinationChange==>")
|
2024-07-07 09:17:38 +00:00
|
|
|
|
// 需要触发重新计算费用
|
|
|
|
|
|
this.calcBillFee();
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
|
|
|
|
|
onGoodsChange(goodsList,selNameStr){
|
|
|
|
|
|
this.form.goodsInfo = selNameStr;
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
handleInitGenGoods(){
|
|
|
|
|
|
if(this.form.parcelQty>0){
|
|
|
|
|
|
|
|
|
|
|
|
let currentParcelQty = 0;
|
|
|
|
|
|
if(!this.form.cargoList){
|
|
|
|
|
|
this.form.cargoList=[];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.form.cargoList.forEach(item=>{
|
|
|
|
|
|
currentParcelQty = currentParcelQty+parseInt(item.cargoQty);
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// 新件数大于
|
|
|
|
|
|
if(this.form.parcelQty>currentParcelQty){
|
|
|
|
|
|
let len=this.form.parcelQty-currentParcelQty;
|
2024-05-29 00:48:35 +00:00
|
|
|
|
if(this.form.parcelQty>10){
|
2024-05-25 09:37:09 +00:00
|
|
|
|
let cargo={
|
|
|
|
|
|
"goodsCode": "",
|
|
|
|
|
|
"goodsName": "",
|
|
|
|
|
|
"cargoQty": len,
|
|
|
|
|
|
"length": 0,
|
|
|
|
|
|
"width": 0,
|
|
|
|
|
|
"height": 0,
|
|
|
|
|
|
"volume": 0,
|
|
|
|
|
|
}
|
|
|
|
|
|
this.form.cargoList.push(cargo);
|
|
|
|
|
|
}
|
|
|
|
|
|
else{
|
|
|
|
|
|
for(let i=0;i<len;i++){
|
|
|
|
|
|
let cargo={
|
|
|
|
|
|
"goodsCode": "",
|
|
|
|
|
|
"goodsName": "",
|
|
|
|
|
|
"cargoQty": 1,
|
|
|
|
|
|
"length": 0,
|
|
|
|
|
|
"width": 0,
|
|
|
|
|
|
"height": 0,
|
|
|
|
|
|
"volume": 0,
|
|
|
|
|
|
}
|
|
|
|
|
|
this.form.cargoList.push(cargo);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else{
|
|
|
|
|
|
let newList=[];
|
|
|
|
|
|
let incQty=0;
|
2024-05-29 01:59:04 +00:00
|
|
|
|
let zeroItem={
|
|
|
|
|
|
"goodsCode": "",
|
|
|
|
|
|
"goodsName": "",
|
|
|
|
|
|
"cargoQty": 1,
|
|
|
|
|
|
"length": 0,
|
|
|
|
|
|
"width": 0,
|
|
|
|
|
|
"height": 0,
|
|
|
|
|
|
"volume": 0,
|
|
|
|
|
|
};
|
2024-05-25 09:37:09 +00:00
|
|
|
|
for(let i=0;i<this.form.cargoList.length;i++){
|
|
|
|
|
|
let item=this.form.cargoList[i];
|
|
|
|
|
|
// 忽略未填写体积的数据
|
|
|
|
|
|
if(item.length==0&&item.width==0&&item.height==0){
|
|
|
|
|
|
continue;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if((incQty+parseInt(item.cargoQty))<this.form.parcelQty){
|
|
|
|
|
|
incQty = incQty+parseInt(item.cargoQty);
|
|
|
|
|
|
newList.push(item)
|
|
|
|
|
|
}else{
|
|
|
|
|
|
item.cargoQty=this.form.parcelQty-incQty;
|
|
|
|
|
|
newList.push(item)
|
|
|
|
|
|
incQty = incQty+parseInt(item.cargoQty);
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
// 补足数量
|
|
|
|
|
|
let bzLen=this.form.parcelQty-incQty;
|
2024-05-29 01:59:04 +00:00
|
|
|
|
if(bzLen>0){
|
|
|
|
|
|
if(newList.length>=10 || this.form.parcelQty>=10){
|
|
|
|
|
|
let newItem=Object.assign({},zeroItem);
|
|
|
|
|
|
newItem.cargoQty=bzLen;
|
|
|
|
|
|
newList.push(newItem);
|
|
|
|
|
|
}else{
|
|
|
|
|
|
for(let i=0;i<bzLen;i++){
|
|
|
|
|
|
let newItem=Object.assign({},zeroItem);
|
|
|
|
|
|
newList.push(newItem);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.form.cargoList=newList;
|
|
|
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
|
|
|
this.form.cargoList=[];
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2024-05-29 01:59:04 +00:00
|
|
|
|
handleCargoQtyChangeDebounce(row){
|
|
|
|
|
|
// 控制触发频率
|
|
|
|
|
|
debounce(250, this.handleCargoQtyChange(row))
|
|
|
|
|
|
},
|
2024-05-25 09:37:09 +00:00
|
|
|
|
handleCargoQtyChange(row){
|
2025-06-11 00:15:28 +00:00
|
|
|
|
// //console.log("====>handleCargoQtyChange===>")
|
2024-08-03 01:50:09 +00:00
|
|
|
|
|
2024-06-01 11:43:18 +00:00
|
|
|
|
this.handleGenSubbill();
|
2024-05-25 09:37:09 +00:00
|
|
|
|
this.handleInitGenGoods();
|
2024-08-03 01:50:09 +00:00
|
|
|
|
this.handleCalcVolumeDebounce(row);
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
|
|
|
|
|
deleteGoodsItem(row,index){
|
2024-08-03 01:50:09 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
this.$confirm('确定删除?', '提示', {
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
this.form.cargoList.splice(index,1)
|
2024-08-03 01:50:09 +00:00
|
|
|
|
this.handleCalcVolumeDebounce(row);
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
copyGoodsItem(row,index){
|
|
|
|
|
|
let newItem = Object.assign({},row);
|
|
|
|
|
|
newItem.cargoQty=1;
|
|
|
|
|
|
this.form.cargoList.splice(index+1, 0, newItem);
|
|
|
|
|
|
// this.form.cargoList.push(newItem);
|
2024-08-03 01:50:09 +00:00
|
|
|
|
this.handleCargoQtyChangeDebounce(row);
|
2024-05-25 09:37:09 +00:00
|
|
|
|
},
|
|
|
|
|
|
showLocalTime(){
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 鼠标移入cell */
|
|
|
|
|
|
handleGoodsCellEnter (row, column, cell, event) {
|
|
|
|
|
|
row.isEdit = true
|
|
|
|
|
|
},
|
|
|
|
|
|
/** 鼠标移出cell */
|
|
|
|
|
|
handleGoodsCellLeave (row, column, cell, event) {
|
|
|
|
|
|
row.isEdit = false
|
|
|
|
|
|
},
|
|
|
|
|
|
// 实时获取运单号
|
|
|
|
|
|
handleBillCodeChange(checked,item){
|
2025-06-11 00:15:28 +00:00
|
|
|
|
// //console.log("=handleBillCodeChange==>",checked);
|
2024-06-29 03:34:07 +00:00
|
|
|
|
|
|
|
|
|
|
if(checked==1){
|
2024-05-31 11:59:20 +00:00
|
|
|
|
let useSiteCode=this.form.sendSiteCode;
|
|
|
|
|
|
realMatchWaybill(useSiteCode).then(response => {
|
2024-05-25 09:37:09 +00:00
|
|
|
|
this.form.billCode=response.data;
|
2024-05-31 11:59:20 +00:00
|
|
|
|
this.initGetTotalAvailablePag(this.form.sendSiteCode);
|
2024-06-01 11:43:18 +00:00
|
|
|
|
this.handleGenSubbill();
|
2024-08-03 01:50:09 +00:00
|
|
|
|
this.autoAjustBillCode();
|
2024-05-25 09:37:09 +00:00
|
|
|
|
});
|
|
|
|
|
|
}else{
|
|
|
|
|
|
this.form.billCode=""
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-06-25 09:39:08 +00:00
|
|
|
|
//获取虚拟运单关联主单
|
2025-06-19 03:35:08 +00:00
|
|
|
|
onMasterBillCodeChange(val) {
|
|
|
|
|
|
if (val) {
|
|
|
|
|
|
this.form.masterBillCode = val.value;
|
|
|
|
|
|
this.masterBillProductType = val.productType;
|
2025-06-25 09:56:44 +00:00
|
|
|
|
if (['002'].includes(this.form.transLine)) {
|
2025-06-25 09:39:08 +00:00
|
|
|
|
if (this.form.remark == null || this.form.remark.trim() === '') {
|
2025-06-24 08:48:23 +00:00
|
|
|
|
//生成备注
|
|
|
|
|
|
this.form.remark = `该单为虚拟单:对应主单为${this.form.masterBillCode}`;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
if (this.form.remark.indexOf('该单为虚拟单:对应主单为') > -1) {
|
|
|
|
|
|
//替换主单号
|
|
|
|
|
|
this.form.remark = this.form.remark.replace(/主单为[\da-zA-Z]+/g, '主单为' + val.value);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
//判断结尾是不是逗号
|
2025-06-25 09:39:08 +00:00
|
|
|
|
if (!this.form.remark.endsWith(',')) {
|
|
|
|
|
|
this.form.remark = this.form.remark + ',';
|
2025-06-24 08:48:23 +00:00
|
|
|
|
}
|
2025-06-25 09:39:08 +00:00
|
|
|
|
this.form.remark = this.form.remark + '该单为虚拟单:对应主单为' + val.value;
|
2025-06-24 08:48:23 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-06-23 08:55:12 +00:00
|
|
|
|
} else {
|
2025-06-24 08:48:23 +00:00
|
|
|
|
//删除备注中虚拟单部分
|
2025-06-26 02:13:33 +00:00
|
|
|
|
if(this.form.remark){
|
|
|
|
|
|
this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
|
|
|
|
|
|
}
|
2025-06-23 08:55:12 +00:00
|
|
|
|
}
|
2025-06-25 09:39:08 +00:00
|
|
|
|
} else {
|
|
|
|
|
|
//删除备注中虚拟单部分
|
2025-06-26 02:13:33 +00:00
|
|
|
|
if(this.form.remark){
|
|
|
|
|
|
this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
|
|
|
|
|
|
}
|
2025-06-24 08:48:23 +00:00
|
|
|
|
}
|
2025-06-19 03:35:08 +00:00
|
|
|
|
},
|
|
|
|
|
|
//虚拟单变化
|
|
|
|
|
|
handleVirtualChange(){
|
|
|
|
|
|
if(this.form.blVirtual!=='1'){
|
|
|
|
|
|
this.form.masterBillCode =null;
|
2025-06-24 08:48:23 +00:00
|
|
|
|
//删除备注中虚拟单内容
|
|
|
|
|
|
if(this.form.remark && this.form.remark.trim()!=''){
|
|
|
|
|
|
this.form.remark = this.form.remark.replace(/该单为虚拟单:对应主单为[\da-zA-Z]+/g, '');
|
|
|
|
|
|
}
|
2025-06-19 03:35:08 +00:00
|
|
|
|
}
|
2025-07-17 05:33:17 +00:00
|
|
|
|
},
|
|
|
|
|
|
//寄件省份变化
|
|
|
|
|
|
onChangeSenderProvince(val){
|
|
|
|
|
|
if(val){
|
|
|
|
|
|
this.senderCountryCode = val.countryCode;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
//收件省份变化
|
|
|
|
|
|
onChangeRecieverProvince(val){
|
|
|
|
|
|
if(val){
|
|
|
|
|
|
this.recieverCountryCode = val.countryCode;
|
2025-10-11 05:10:05 +00:00
|
|
|
|
this.recieverRegionName = val.regionName;
|
|
|
|
|
|
}else{
|
|
|
|
|
|
this.recieverRegionName = null;
|
2025-07-17 05:33:17 +00:00
|
|
|
|
}
|
|
|
|
|
|
this.handleCalcDestSite();
|
2025-10-15 06:15:50 +00:00
|
|
|
|
this.openSpecialZone(this.recieverCountryCode,this.form.reciever.address , this.recieverRegionName);
|
2025-10-11 05:10:05 +00:00
|
|
|
|
},
|
|
|
|
|
|
//收件地址失去焦点时
|
2025-10-15 06:15:50 +00:00
|
|
|
|
handleRecieverAddressChange() {
|
|
|
|
|
|
this.openSpecialZone(this.recieverCountryCode,this.form.reciever.address , this.recieverRegionName);
|
|
|
|
|
|
},
|
|
|
|
|
|
// 弹出柬埔寨特区提醒
|
|
|
|
|
|
openSpecialZone(countryCode, address, recieverRegionName) {
|
|
|
|
|
|
if (countryCode !== '0855' || !address || !recieverRegionName) {
|
|
|
|
|
|
this.checkEnterprise(this.form.reciever.company, 2);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
// 校验是否属于特殊区域(特区/经济特区/特定产业园)
|
|
|
|
|
|
const isSpecialZone =
|
|
|
|
|
|
address.includes('Special Economic Zone') ||
|
|
|
|
|
|
recieverRegionName.includes('特区') ||
|
|
|
|
|
|
recieverRegionName === '中柬金属材料产业园';
|
|
|
|
|
|
// 根据区域类型执行对应逻辑
|
|
|
|
|
|
if (isSpecialZone) {
|
|
|
|
|
|
this.$confirm("该地区是特区!", "提示", {
|
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
|
type: "warning",
|
|
|
|
|
|
distinguishCancelAndClose: true,
|
|
|
|
|
|
closeOnClickModal: false,
|
|
|
|
|
|
showCancelButton: false,
|
|
|
|
|
|
showClose: false
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
this.checkRecieverCompany(this.form.reciever.company);
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.checkRecieverCompany(this.form.reciever.company);
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 校验寄件企业等级
|
|
|
|
|
|
checkEnterprise(enterpriseName) {
|
|
|
|
|
|
if(!enterpriseName || this.form.sender.country !== '0086' ){
|
|
|
|
|
|
this.categorySender = null;
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
let params = {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 1,
|
|
|
|
|
|
bizType: 1,
|
|
|
|
|
|
params: {
|
|
|
|
|
|
customerName: enterpriseName
|
2025-10-11 05:10:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-10-15 06:15:50 +00:00
|
|
|
|
listCustomsLevel(params).then(response => {
|
|
|
|
|
|
if (response.rows.length > 0 && response.rows[0].category !== '1' ) {
|
|
|
|
|
|
const data = response.rows[0];
|
|
|
|
|
|
//判断当前时间是否在有效期内
|
|
|
|
|
|
let currentTime = new Date().getTime();
|
|
|
|
|
|
let validFrom = new Date(data.startDate).getTime();
|
|
|
|
|
|
let validTo = new Date(data.endDate).getTime();
|
|
|
|
|
|
if (currentTime <= validFrom || currentTime >= validTo) {
|
|
|
|
|
|
this.categorySender = null;
|
|
|
|
|
|
this.$refs.form.validateField('sender.enterpriseName');
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.categorySender = data.category;
|
|
|
|
|
|
let msg = '';
|
|
|
|
|
|
let color = '';
|
|
|
|
|
|
if (this.categorySender === '2' ) {
|
|
|
|
|
|
msg = `该公司为特区货物报关比较麻烦,请注意跟进。`;
|
|
|
|
|
|
color = '#fccc0c';
|
|
|
|
|
|
} else if (this.categorySender === '3') {
|
|
|
|
|
|
msg = `该公司报关资料不配合存在过异常,请及时跟进。`;
|
|
|
|
|
|
color = 'red';
|
|
|
|
|
|
} else if (this.categorySender === '4') {
|
|
|
|
|
|
msg = `该公司报关有问题无法报关,禁止走货。`;
|
|
|
|
|
|
color = 'black'
|
|
|
|
|
|
}
|
|
|
|
|
|
const h = this.$createElement;
|
|
|
|
|
|
this.$msgbox({
|
|
|
|
|
|
title: '提示',
|
|
|
|
|
|
message: h('p', {
|
|
|
|
|
|
style: {
|
|
|
|
|
|
color: color,
|
|
|
|
|
|
// fontSize: '18px'
|
|
|
|
|
|
}
|
|
|
|
|
|
}, [
|
|
|
|
|
|
h('li', { class: 'el-icon-warning' }, ''),
|
|
|
|
|
|
h('span', null, msg),
|
|
|
|
|
|
]),
|
|
|
|
|
|
showCancelButton: false,
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
closeOnClickModal: false,
|
|
|
|
|
|
closeOnPressEscape: false,
|
|
|
|
|
|
showClose: false
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
this.$refs.form.validateField('sender.enterpriseName');
|
|
|
|
|
|
});
|
|
|
|
|
|
}else{
|
|
|
|
|
|
//清除之前的校验结果
|
|
|
|
|
|
this.categorySender = null;
|
|
|
|
|
|
this.$refs.form.validateField('sender.enterpriseName');
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
return true;
|
2025-10-11 05:10:05 +00:00
|
|
|
|
},
|
2025-10-15 06:15:50 +00:00
|
|
|
|
// 校验收件公司
|
|
|
|
|
|
checkRecieverCompany(company) {
|
|
|
|
|
|
const address = this.form.reciever.address;
|
|
|
|
|
|
if(!company && (!address || !this.recieverRegionName)){
|
|
|
|
|
|
this.categoryReciever = null;
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
let params = {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 1,
|
|
|
|
|
|
bizType: 2,
|
|
|
|
|
|
params: {
|
|
|
|
|
|
customerName: company
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
listCustomsLevel(params).then(response => {
|
|
|
|
|
|
if (response.rows.length > 0) {
|
|
|
|
|
|
const data = response.rows[0];
|
|
|
|
|
|
//判断当前时间是否在有效期内
|
|
|
|
|
|
let currentTime = new Date().getTime();
|
|
|
|
|
|
let validFrom = new Date(data.startDate).getTime();
|
|
|
|
|
|
let validTo = new Date(data.endDate).getTime();
|
|
|
|
|
|
if (currentTime <= validFrom || currentTime >= validTo) {
|
|
|
|
|
|
this.categoryReciever = null;
|
|
|
|
|
|
this.$refs.form.validateField('reciever.company');
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.categoryReciever = data.category;
|
|
|
|
|
|
let msg = '';
|
|
|
|
|
|
let color = '';
|
|
|
|
|
|
// 判断是否是特区
|
|
|
|
|
|
let SpecialZone =false;
|
|
|
|
|
|
if(address){
|
|
|
|
|
|
SpecialZone = address.includes('Special Economic Zone') || this.recieverRegionName.includes('特区') || this.recieverRegionName === '中柬金属材料产业园';
|
|
|
|
|
|
}
|
|
|
|
|
|
if ((this.categoryReciever === '2' || (SpecialZone && this.categoryReciever !=='4'))) {
|
|
|
|
|
|
msg = `该公司为特区货物清关比较麻烦,请注意跟进。`;
|
|
|
|
|
|
color = '#fccc0c';
|
|
|
|
|
|
} else if (this.categoryReciever === '3') {
|
|
|
|
|
|
msg = `该公司清关资料不配合存在过异常,请及时跟进。`;
|
|
|
|
|
|
color = 'red';
|
|
|
|
|
|
} else if (this.categoryReciever === '4') {
|
|
|
|
|
|
msg = `该公司清关有问题无法清关,禁止走货。`;
|
|
|
|
|
|
color = 'black'
|
|
|
|
|
|
}
|
|
|
|
|
|
const h = this.$createElement;
|
|
|
|
|
|
this.$msgbox({
|
|
|
|
|
|
title: '提示',
|
|
|
|
|
|
message: h('p', {
|
|
|
|
|
|
style: {
|
|
|
|
|
|
color: color,
|
|
|
|
|
|
// fontSize: '18px'
|
|
|
|
|
|
}
|
|
|
|
|
|
}, [
|
|
|
|
|
|
h('li', { class: 'el-icon-warning' }, ''),
|
|
|
|
|
|
h('span', null, msg),
|
|
|
|
|
|
]),
|
|
|
|
|
|
showCancelButton: false,
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
closeOnClickModal: false,
|
|
|
|
|
|
closeOnPressEscape: false,
|
|
|
|
|
|
showClose: false
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
this.$refs.form.validateField('reciever.company');
|
|
|
|
|
|
});
|
|
|
|
|
|
}else{
|
|
|
|
|
|
//清除之前的校验结果
|
|
|
|
|
|
this.categoryReciever = null;
|
|
|
|
|
|
this.$refs.form.validateField('reciever.company');
|
|
|
|
|
|
}
|
2025-10-11 05:10:05 +00:00
|
|
|
|
});
|
2025-10-15 06:15:50 +00:00
|
|
|
|
return true;
|
2025-06-19 03:35:08 +00:00
|
|
|
|
}
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
|
|
|
|
|
|
.el-form-item__label {
|
|
|
|
|
|
color: #000;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-input-group__append {
|
|
|
|
|
|
padding: 0 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-row{
|
|
|
|
|
|
display:flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
// padding-right: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-form-item__label {
|
|
|
|
|
|
font-size: 12px!important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.platform-auto-complete {
|
|
|
|
|
|
.el-autocomplete-suggestion__wrap {
|
|
|
|
|
|
padding: 5px 0;
|
|
|
|
|
|
ul li {
|
|
|
|
|
|
pointer-events: none; // 阻止可点击事件
|
|
|
|
|
|
.default {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
color: #999;
|
|
|
|
|
|
}
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-collapse {
|
|
|
|
|
|
border-top: none!important;
|
|
|
|
|
|
border-bottom: none!important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-table .el-table__cell:first-child .cell {
|
|
|
|
|
|
padding: 0px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-table .cell {
|
|
|
|
|
|
padding: 0px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cargoList{
|
|
|
|
|
|
.el-input__inner {
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
background: #ffffcd;
|
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
|
padding: 0px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
2024-07-06 00:00:04 +00:00
|
|
|
|
|
2024-07-07 01:36:03 +00:00
|
|
|
|
// .el-input-number--mini {
|
|
|
|
|
|
// width: 100%;
|
|
|
|
|
|
// line-height: 26px;
|
2025-06-24 08:48:23 +00:00
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
.el-input-number {
|
|
|
|
|
|
width: 100% !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-input-number.is-without-controls .el-input__inner {
|
2024-07-07 01:36:03 +00:00
|
|
|
|
height: 28px;
|
2024-07-06 00:00:04 +00:00
|
|
|
|
line-height: 28px;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
background: #ffffcd;
|
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
|
padding: 0px;
|
|
|
|
|
|
text-align: center;
|
2025-06-24 08:48:23 +00:00
|
|
|
|
}
|
2024-07-06 00:00:04 +00:00
|
|
|
|
}
|
2025-06-24 08:48:23 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
.el-collapse-item__content {
|
2025-06-24 08:48:23 +00:00
|
|
|
|
padding-bottom: 0px;
|
2024-05-25 09:37:09 +00:00
|
|
|
|
}
|
2025-06-24 08:48:23 +00:00
|
|
|
|
|
|
|
|
|
|
.el-collapse-item__header {
|
2024-05-25 09:37:09 +00:00
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-collapse-item__arrow {
|
|
|
|
|
|
pointer-events: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-07-05 12:01:45 +00:00
|
|
|
|
|
2024-05-25 09:37:09 +00:00
|
|
|
|
</style>
|
2024-07-29 00:20:56 +00:00
|
|
|
|
|