Commit 68e15307 authored by dragondean@qq.com's avatar dragondean@qq.com

创建订单页面更新

parent 77a31264
...@@ -10,79 +10,82 @@ ...@@ -10,79 +10,82 @@
<el-table-column label="新内容" prop="newValue"></el-table-column> <el-table-column label="新内容" prop="newValue"></el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-card>
<div slot="header" class="card-title">{{ editMode ? $t('编辑订单') + '-' + form.orderNo : $t('新建订单')}}</div>
<!--默认显示类型(selectedRouter==null),如果选择路线后没开通则隐藏--> <div class="page-title">{{ editMode ? $t('编辑订单') + '-' + form.orderNo : $t('新建订单')}}</div>
<el-form-item :label="$t('订单类型')" v-if="routeOtherServices.indexOf('1') > -1 || routeOtherServices.indexOf('4') > -1">
<el-checkbox-group v-model="form.type" :disabled2="inWarehouse">
<el-checkbox label="1" v-if="routeOtherServices.indexOf('1') > -1">{{$t('集运服务')}}</el-checkbox>
<el-checkbox label="2" v-if="routeOtherServices.indexOf('4') > -1">{{$t('海外仓')}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<div class="form-section"> <el-card class="form-section mt-10">
<el-form-item :label="$t('发货人中文名称')" prop="consignorContactsId" > <template #header>
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> --> <div slot="header" class="card-title">发货人</div>
<div class="contact"> </template>
<el-input v-model="form.consignorName" placeholder="" :disabled2="inWarehouse"/> <el-form-item :label="$t('发货人中文名称')" prop="consignorContactsId" >
<img v-if="!updateChannel" src="@/assets/svg/contacts.svg" class="phonebook" @click="contactChooseType='consignor'" /> <!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<img v-if="!updateChannel" src="@/assets/svg/contact_create.svg" class="phonebook" @click="quickCreateType='0'" /> <div class="contact">
</div> <el-input v-model="form.consignorName" placeholder="" :disabled2="inWarehouse"/>
</el-form-item> <img v-if="!updateChannel" src="@/assets/svg/contacts.svg" class="phonebook" @click="contactChooseType='consignor'" />
<!-- v1.7新增 --> <img v-if="!updateChannel" src="@/assets/svg/contact_create.svg" class="phonebook" @click="quickCreateType='0'" />
<el-form-item :label="$t('发货人英文名称')" prop="consignorNameEn" >
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div class="contact">
<el-input v-model="form.consignorNameEn" placeholder="" :disabled2="inWarehouse"/>
</div>
</el-form-item>
<el-form-item :label="$t('发货人电话')" prop="consignorPhone">
<area-code-selector v-model="form.consignorCountryCode" class="w-200 mr-10" disabled />
<el-input v-model="form.consignorPhone" class="w-200" disabled />
</el-form-item>
<el-form-item :label="$t('发货人公司中文名称')" prop="consignorPhone">
<el-input v-model="form.consignorCompany" :disabled2="inWarehouse" />
</el-form-item>
<!-- v1.7新增 -->
<el-form-item :label="$t('发货人公司英文名称')" prop="consignorPhone">
<el-input v-model="form.consignorCompanyEn" :disabled2="inWarehouse" />
</el-form-item>
<el-form-item label="Email" prop="consignorPhone">
<el-input v-model="form.consignorEmail" :disabled2="inWarehouse" />
</el-form-item>
</div> </div>
<div class="form-section"> </el-form-item>
<el-form-item :label="$t('收货人中文名称')" prop="consigneeContactsId"> <!-- v1.7新增 -->
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> --> <el-form-item :label="$t('发货人英文名称')" prop="consignorNameEn" >
<div class="contact"> <!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<el-input v-model="form.consigneeName" placeholder="" :disabled2="inWarehouse"/> <div class="contact">
<img v-if="!updateChannel" src="@/assets/svg/contacts.svg" class="phonebook" @click="contactChooseType='consignee'" /> <el-input v-model="form.consignorNameEn" placeholder="" :disabled2="inWarehouse"/>
<img v-if="!updateChannel" src="@/assets/svg/contact_create.svg" class="phonebook" @click="quickCreateType='1'" />
</div>
</el-form-item>
<!-- v1.7新增 -->
<el-form-item :label="$t('收货人英文名称')" prop="consigneeNameEn">
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div class="contact">
<el-input v-model="form.consigneeNameEn" placeholder="" :disabled2="inWarehouse"/>
</div>
</el-form-item>
<el-form-item :label="$t('收货人电话')" prop="consigneePhone">
<area-code-selector v-model="form.consigneeCountryCode" class="w-200 mr-10" disabled/>
<el-input v-model="form.consigneePhone" class="w-200" disabled/>
</el-form-item>
<el-form-item :label="$t('收货人公司中文名称')" prop="consigneePhone">
<el-input v-model="form.consigneeCompany" :disabled2="inWarehouse" />
</el-form-item>
<!-- v1.7新增 -->
<el-form-item :label="$t('收货人公司英文名称')" prop="consigneePhone">
<el-input v-model="form.consigneeCompanyEn" :disabled2="inWarehouse" />
</el-form-item>
<el-form-item label="Email" prop="consigneePhone">
<el-input v-model="form.consigneeEmail" :disabled2="inWarehouse"/>
</el-form-item>
</div> </div>
</el-form-item>
<el-form-item :label="$t('发货人电话')" prop="consignorPhone">
<area-code-selector v-model="form.consignorCountryCode" class="w-200 mr-10" disabled />
<el-input v-model="form.consignorPhone" class="w-200" disabled />
</el-form-item>
<el-form-item :label="$t('发货人公司中文名称')" prop="consignorPhone">
<el-input v-model="form.consignorCompany" :disabled2="inWarehouse" />
</el-form-item>
<!-- v1.7新增 -->
<el-form-item :label="$t('发货人公司英文名称')" prop="consignorPhone">
<el-input v-model="form.consignorCompanyEn" :disabled2="inWarehouse" />
</el-form-item>
<el-form-item label="Email" prop="consignorPhone">
<el-input v-model="form.consignorEmail" :disabled2="inWarehouse" />
</el-form-item>
</el-card>
<el-card class="form-section mt-10">
<template #header>
<div slot="header" class="card-title">收货人</div>
<el-radio-group v-if="noConsignee && form.isCargoControl" v-model="hasConsignee">
<el-radio :label="true">{{$t('')}}</el-radio>
<el-radio :label="false">{{$t('')}}</el-radio>
</el-radio-group>
</template>
<el-form-item :label="$t('收货人中文名称')" prop="consigneeContactsId">
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div class="contact">
<el-input v-model="form.consigneeName" placeholder="" :disabled="!hasConsignee"/>
<img v-if="!updateChannel && hasConsignee" src="@/assets/svg/contacts.svg" class="phonebook" @click="contactChooseType='consignee'" />
<img v-if="!updateChannel && hasConsignee" src="@/assets/svg/contact_create.svg" class="phonebook" @click="quickCreateType='1'" />
</div>
</el-form-item>
<!-- v1.7新增 -->
<el-form-item :label="$t('收货人英文名称')" prop="consigneeNameEn">
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div class="contact">
<el-input v-model="form.consigneeNameEn" placeholder="" :disabled="!hasConsignee"/>
</div>
</el-form-item>
<el-form-item :label="$t('收货人电话')" prop="consigneePhone">
<area-code-selector v-model="form.consigneeCountryCode" class="w-200 mr-10" disabled/>
<el-input v-model="form.consigneePhone" class="w-200" disabled/>
</el-form-item>
<el-form-item :label="$t('收货人公司中文名称')" prop="consigneePhone">
<el-input v-model="form.consigneeCompany" :disabled="!hasConsignee" />
</el-form-item>
<!-- v1.7新增 -->
<el-form-item :label="$t('收货人公司英文名称')" prop="consigneePhone">
<el-input v-model="form.consigneeCompanyEn" :disabled="!hasConsignee" />
</el-form-item>
<el-form-item label="Email" prop="consigneePhone">
<el-input v-model="form.consigneeEmail" :disabled="!hasConsignee"/>
</el-form-item>
</el-card>
<el-card class="mt-10">
<div class="form-section"> <div class="form-section">
<el-form-item :label="$t('运输方式')" prop="transportId"> <el-form-item :label="$t('运输方式')" prop="transportId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" formatter="number" <dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" formatter="number"
...@@ -127,33 +130,13 @@ ...@@ -127,33 +130,13 @@
</el-form> </el-form>
</el-form-item> </el-form-item>
</div> </div>
<!--目的港清关:选择专线空运才显示,默认选中我司 <div>
我司选中后,按钮下方显示“多票”和“单票”的操作,默认选中多票。 <!--默认显示类型(selectedRouter==null),如果选择路线后没开通则隐藏-->
客户选中后,按钮下方显示“单票”的操作,默认选中,无需点击--> <el-form-item :label="$t('增值服务')" v-if="routeOtherServices.indexOf('1') > -1 || routeOtherServices.indexOf('4') > -1">
<div class="form-section" v-if="form.transportId == 3"> <el-checkbox-group v-model="form.type" :disabled2="inWarehouse">
<el-form-item :label="$t('目的港清关')"> <el-checkbox label="1" v-if="routeOtherServices.indexOf('1') > -1">{{$t('集运')}}</el-checkbox>
<el-radio-group v-model="form.portDestCustomsClear"> <el-checkbox label="2" v-if="routeOtherServices.indexOf('4') > -1">{{$t('海外仓')}}</el-checkbox>
<el-radio :label="1"> </el-checkbox-group>
{{$t('我司')}}
<el-tooltip effect="dark" :content="$t('我司承接')" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</el-radio>
<el-radio :label="2">
{{$t('客户')}}
<el-tooltip effect="dark" :content="$t('客户自清')" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</el-radio>
</el-radio-group>
</el-form-item>
</div>
<div class="form-section" v-if="form.transportId == 3">
<el-form-item :label="$t('发货方式')">
<el-radio-group v-model="form.deliveryWay">
<el-radio :label="1" v-if="form.portDestCustomsClear == 1">{{$t('多票')}}</el-radio>
<el-radio :label="2">{{$t('单票')}}</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
</div> </div>
</el-card> </el-card>
...@@ -161,8 +144,8 @@ ...@@ -161,8 +144,8 @@
<div slot="header" class="card-title"> <div slot="header" class="card-title">
<!--lanbm 根据需求文档改 商品信息 为 商品 --> <!--lanbm 根据需求文档改 商品信息 为 商品 -->
<div class="card-name">{{$t('商品')}}</div> <div class="card-name">{{$t('商品')}}</div>
<el-button type="primary" size="mini" @click="addProduct(null)" :disabled="!canAddProduct || !productEditable || updateChannel">{{$t('添加货物')}}</el-button> <el-button type="primary" size="mini" @click="addProduct(null)" :disabled="!canAddProduct || !productEditable || updateChannel">{{$t('添加')}}</el-button>
<el-button type="primary" size="mini" @click="showBatchImportDialog=true" :disabled="!canAddProduct || !productEditable || updateChannel">{{$t('批量添加货物')}}</el-button> <el-button type="primary" size="mini" @click="showBatchImportDialog=true" :disabled="!canAddProduct || !productEditable || updateChannel">{{$t('批量添加')}}</el-button>
</div> </div>
<el-table :data="form.orderItemVOList" border class="product-list" v-if="!initing"> <el-table :data="form.orderItemVOList" border class="product-list" v-if="!initing">
<el-table-column :label="$t('序号')" width="60px" fixed> <el-table-column :label="$t('序号')" width="60px" fixed>
...@@ -353,145 +336,149 @@ ...@@ -353,145 +336,149 @@
<el-form-item :label="$t('唛头')" prop="marks" > <el-form-item :label="$t('唛头')" prop="marks" >
<el-input v-model="form.marks" ></el-input> <el-input v-model="form.marks" ></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('是否控货')" prop="isCargoControl" class="ml-20"> <el-form-item :label="$t('单证报关')" :span="2" prop="customsType">
<template #label> <template #label>
{{$t('是否控货')}} {{$t('单证报关')}}
<el-tooltip effect="dark" :content="$t('是指由发货人与收货人约定在货物的国际运输过程中,我司作为第三方对该货物货权的控制;需由发货人授权我司放货的情况下收货人才能提取该票货物的一种交易方式')" placement="top"> <el-tooltip effect="dark" :content="$t('我司全代 : 该货物的出口手续由我司代为办理 ; 自单代报: 该货物由发货人提供相关出口单证并委托我司代为办理 ;混单代报该货物有以上两种情况出现')" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</template>
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="form.customsType" form-type="radio" defaultable :disabled="false" />
<!--自单代报显示提示-->
<div v-if="+form.customsType === 2" style="color:red;font-size:14px">{{$t('报关退税,请备齐资料。')}}</div>
</el-form-item>
</div>
<div class="form-section" v-if="form.transportId == 3">
<!--目的港清关:选择专线空运才显示,默认选中我司
我司选中后,按钮下方显示“多票”和“单票”的操作,默认选中多票。
客户选中后,按钮下方显示“单票”的操作,默认选中,无需点击-->
<div class="form-section">
<el-form-item :label="$t('目的港清关')">
<el-radio-group v-model="form.portDestCustomsClear">
<el-radio :label="1">
{{$t('我司')}}
<el-tooltip effect="dark" :content="$t('我司承接')" placement="top">
<i class="el-icon-question"></i> <i class="el-icon-question"></i>
</el-tooltip> </el-tooltip>
</template> </el-radio>
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" <el-radio :label="2">
v-model="form.isCargoControl" {{$t('客户')}}
formatter="bool" <el-tooltip effect="dark" :content="$t('客户自清')" placement="top">
form-type="radio"
:filter="(item) => {
return selectedRouter && selectedRouter.controlStatus === 1 && item.value === 'true' ? false : true
}"
/>
</el-form-item>
</div>
<div class="form-section" v-if="collectionProxy">
<el-form-item :label="$t('是否代收货款')" prop="isCollection">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.isCollection" form-type="radio" :disabled="false" />
</el-form-item>
<!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项-->
<el-form-item :label="$t('代收货款金额')" v-if="collectionProxy && form.isCollection" prop="collectionProxy" class="ml-20">
<el-input type="number" v-model="form.collectionProxy" class="w-200 mr-10" :disabled="false"></el-input>
<selector v-model="form.collectionProxyCurrency" :options="currencyList" label-field="titleZh" value-field="id" defaultable class="w-100" :disabled="false"/>
</el-form-item>
</div>
<div class="form-section">
<el-form-item :label="$t('单证报关')" :span="2" prop="customsType">
<template #label>
{{$t('单证报关')}}
<el-tooltip effect="dark" :content="$t('我司全代 : 该货物的出口手续由我司代为办理 ; 自单代报: 该货物由发货人提供相关出口单证并委托我司代为办理 ;混单代报该货物有以上两种情况出现')" placement="top">
<i class="el-icon-question"></i> <i class="el-icon-question"></i>
</el-tooltip> </el-tooltip>
</template> </el-radio>
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="form.customsType" form-type="radio" defaultable :disabled="false" /> </el-radio-group>
<!--自单代报显示提示-->
<div v-if="+form.customsType === 2" style="color:red;font-size:14px">{{$t('报关退税,请备齐资料。')}}</div>
</el-form-item> </el-form-item>
</div> </div>
<div> <div class="form-section">
<el-form-item :label="$t('出单方式')" prop="issuingMethod"> <el-form-item :label="$t('发货方式')">
<dict-selector :type="DICT_TYPE.ECW_SUING_METHOD" v-model="form.issuingMethod" form-type="radio" defaultable :disabled="false"/> <el-radio-group v-model="form.deliveryWay">
<el-radio :label="1" v-if="form.portDestCustomsClear == 1">{{$t('多票')}}</el-radio>
<el-radio :label="2">{{$t('单票')}}</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
</div>
</div> </div>
<div> <div class="form-section">
<el-form-item :label="$t('入仓类型')" prop="warehouseType"> <el-form-item :label="$t('是否控货')" prop="isCargoControl" class="ml-20">
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="form.warehouseType" defaultable :disabled="false" /> <template #label>
</el-form-item> {{$t('是否控货')}}
<el-tooltip effect="dark" :content="$t('是指由发货人与收货人约定在货物的国际运输过程中,我司作为第三方对该货物货权的控制;需由发货人授权我司放货的情况下收货人才能提取该票货物的一种交易方式')" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</template>
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING"
v-model="form.isCargoControl"
formatter="bool"
form-type="radio"
:filter="(item) => {
return selectedRouter && selectedRouter.controlStatus === 1 && item.value === 'true' ? false : true
}"
/>
</el-form-item>
<el-form-item :label="$t('付款人')" prop="drawee">
<dict-selector :formatter="Number" :type="DICT_TYPE.DRAWEE" v-model="form.drawee" defaultable form-type="radio" :disabled="false"/>
<el-table :data="customDraweeList" v-if="form.drawee==3" >
<el-table-column :label="$t('费用类型')" prop="label" width="200px"></el-table-column>
<el-table-column :label="$t('付款人')" width="300px">
<template slot-scope="{row}">
<dict-selector :formatter="Number" :type="DICT_TYPE.DRAWEE" :filter="(e) => e.value == 1 || e.value == 2" v-model="row.value" form-type="radio" :disabled="false"/>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item :label="$t('提单是否显示价格')" prop="displayBillLadingPrice">
<el-radio-group v-model="form.displayBillLadingPrice">
<el-radio :label="true">{{$t('显示')}}</el-radio>
<el-radio :label="false">{{$t('不显示')}}</el-radio>
</el-radio-group>
</el-form-item>
</div> </div>
<div> <div class="form-section flex">
<el-form-item :label="$t('入仓类型')" prop="warehouseType">
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="form.warehouseType" defaultable :disabled="false" />
</el-form-item>
<div>
<el-form-item :label="$t('外部仓库')" prop="isExternalWarehouse"> <el-form-item :label="$t('外部仓库')" prop="isExternalWarehouse">
<el-checkbox label="" v-model="form.isExternalWarehouse" @change="form.isExternalWarehouse=$event" :disabled="false"></el-checkbox> <el-checkbox label="" v-model="form.isExternalWarehouse" @change="form.isExternalWarehouse=$event" :disabled="false"></el-checkbox>
</el-form-item> </el-form-item>
<div v-if="form.isExternalWarehouse" class="pl-50"> <div v-if="form.isExternalWarehouse">
<div v-for="(item, index) in form.externalWarehouseDtoList" class="flex" :key="index"> <div v-for="(item, index) in form.externalWarehouseDtoList" class="flex" :key="index">
<div class="w-300"> <div class="w-300">
<el-form-item :label="$t('装货时间')" <el-form-item :label="$t('装货时间')"
:prop="'externalWarehouseDtoList.' + index + '.estLoadingTime'" :prop="'externalWarehouseDtoList.' + index + '.estLoadingTime'"
:rules="{ :rules="{
required: true, message: '装货时间不能为空', trigger: 'blur' required: true, message: '装货时间不能为空', trigger: 'blur'
}" }"
> >
<el-date-picker v-model="item.estLoadingTime" value-format="yyyy-MM-dd HH:mm:ss" class="w-200"></el-date-picker> <el-date-picker v-model="item.estLoadingTime" value-format="yyyy-MM-dd HH:mm:ss" class="w-200"></el-date-picker>
</el-form-item> </el-form-item>
</div>
<div class="w-500">
<el-form-item :label="$t('装货地址')"
:prop="'externalWarehouseDtoList.' + index + '.loadingAddress'"
:rules="{
required: true, message: '装货地址不能为空', trigger: 'blur'
}"
>
<el-input v-model="item.loadingAddress" placeholder="" class="w-200"></el-input>
</el-form-item>
<el-button type="primary" icon="el-icon-plus" v-if="index==0" @click="form.externalWarehouseDtoList.push({})"></el-button>
<el-button type="danger" icon="el-icon-delete" v-else-if="index == form.externalWarehouseDtoList.length-1" @click="form.externalWarehouseDtoList.splice(index, 1)"></el-button>
</div>
</div> </div>
<div class="w-500">
<el-form-item :label="$t('装货地址')"
:prop="'externalWarehouseDtoList.' + index + '.loadingAddress'"
:rules="{
required: true, message: '装货地址不能为空', trigger: 'blur'
}"
>
<el-input v-model="item.loadingAddress" placeholder="" class="w-200"></el-input>
</el-form-item>
<el-button type="primary" icon="el-icon-plus" v-if="index==0" @click="form.externalWarehouseDtoList.push({})"></el-button>
<el-button type="danger" icon="el-icon-delete" v-else-if="index == form.externalWarehouseDtoList.length-1" @click="form.externalWarehouseDtoList.splice(index, 1)"></el-button>
</div>
</div>
</div> </div>
</div>
</div> </div>
<div v-if="!form.isExternalWarehouse"> <div class="form-section">
<el-form-item :label="$t('预计送货日期')" prop="deliveryDate"> <el-form-item :label="$t('预计送货日期')" prop="deliveryDate" v-if="!form.isExternalWarehouse">
<el-date-picker v-model="form.deliveryDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-date-picker v-model="form.deliveryDate" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="$t('是否代收货款')" prop="isCollection" v-if="collectionProxy">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.isCollection" form-type="radio" :disabled="false" />
</el-form-item>
<!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项-->
<el-form-item :label="$t('代收货款金额')" v-if="collectionProxy && form.isCollection" prop="collectionProxy" class="ml-20">
<el-input type="number" v-model="form.collectionProxy" class="w-200 mr-10" :disabled="false"></el-input>
<selector v-model="form.collectionProxyCurrency" :options="currencyList" label-field="titleZh" value-field="id" defaultable class="w-100" :disabled="false"/>
</el-form-item>
</div> </div>
<div> <div class="form-section flex">
<el-form-item :label="$t('收货方式')" prop="harvestMethod" class="ml-20"> <el-form-item :label="$t('收货方式')" prop="harvestMethod" class="ml-20">
<!-- <el-select v-model="harvestMethod2" @change="handleChange">
<dict-selector :type="DICT_TYPE.ECW_HARVEST_METHOD" <el-option
v-model="form.harvestMethod" :filter="item => item.value == 1 v-for="dict in lunchList"
|| homeDeliveryService" defaultable :disabled="false" />--> :key="dict.value"
:label="dict.label"
<el-select v-model="harvestMethod2" @change="handleChange"> :value="dict.value"
<el-option ></el-option>
v-for="dict in lunchList" </el-select>
:key="dict.value" </el-form-item>
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item> <el-form-item :label="$t('关联报价单')" prop="offerId">
</div> <span v-if="offerIdNochange&&offerNumber">{{offerNumber}}</span>
<div v-if="showAdress">
<el-form-item :label="$t('收货地区')" prop="country">
<area-selector
:country="form.consigneeVO ? form.consigneeVO.country : undefined"
:province="form.consigneeVO ? form.consigneeVO.province : undefined"
:city="form.consigneeVO ? form.consigneeVO.city : undefined"
@countryChange="onAreaChange('country', $event)"
@provinceChange="onAreaChange('province', $event)"
@cityChange="onAreaChange('city', $event)"
:disabled="false"
></area-selector>
</el-form-item>
<br/>
<el-form-item :label="$t('收货详细地址')" prop="consigneeAddress">
<el-input v-model="form.consigneeAddress" :disabled="false" class="w-300"></el-input>
</el-form-item>
</div>
<div>
<el-form-item :label="$t('付款人')" prop="drawee">
<dict-selector :formatter="Number" :type="DICT_TYPE.DRAWEE" v-model="form.drawee" defaultable form-type="radio" :disabled="false"/>
<el-table :data="customDraweeList" v-if="form.drawee==3" >
<el-table-column :label="$t('费用类型')" prop="label" width="200px"></el-table-column>
<el-table-column :label="$t('付款人')" width="300px">
<template slot-scope="{row}">
<dict-selector :formatter="Number" :type="DICT_TYPE.DRAWEE" :filter="(e) => e.value == 1 || e.value == 2" v-model="row.value" form-type="radio" :disabled="false"/>
</template>
</el-table-column>
</el-table>
</el-form-item>
</div>
<el-form-item :label="$t('关联报价单')" prop="offerId">
<span v-if="offerIdNochange&&offerNumber">{{offerNumber}}</span>
<el-select <el-select
v-else v-else
v-model="form.offerId" v-model="form.offerId"
filterable filterable
clearable clearable
...@@ -506,74 +493,85 @@ ...@@ -506,74 +493,85 @@
:value="item.offerId" :value="item.offerId"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<div> </div>
<el-form-item :label="$t('提单是否显示价格')" prop="displayBillLadingPrice"> <div class="form-section" v-if="showAdress">
<el-radio-group v-model="form.displayBillLadingPrice"> <el-form-item :label="$t('收货地区')" prop="country">
<el-radio :label="true">{{$t('显示')}}</el-radio> <area-selector
<el-radio :label="false">{{$t('不显示')}}</el-radio> :country="form.consigneeVO ? form.consigneeVO.country : undefined"
</el-radio-group> :province="form.consigneeVO ? form.consigneeVO.province : undefined"
:city="form.consigneeVO ? form.consigneeVO.city : undefined"
@countryChange="onAreaChange('country', $event)"
@provinceChange="onAreaChange('province', $event)"
@cityChange="onAreaChange('city', $event)"
:disabled="false"
></area-selector>
</el-form-item>
<br/>
<el-form-item :label="$t('收货详细地址')" prop="consigneeAddress">
<el-input v-model="form.consigneeAddress" :disabled="false" class="w-300"></el-input>
</el-form-item> </el-form-item>
</div> </div>
</el-card> </el-card>
<el-card class="mt-10">
<el-card class="mt-10" v-if="transport"> <template #header>
<div class="card-title" slot="header">{{$l(transport, 'label')}}</div> <div class="card-title">其他</div>
<el-form-item :label="$t('快递单号')"> </template>
<div class="form-section">
<el-form-item :label="$t('特殊要求')" >
<template #label>
{{$t('特殊要求')}}
<el-tooltip effect="dark" :content="$t('如需我司打包,请勾选相应选项,费用付款人及打包要求可备注补充')" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</template>
<dict-selector v-model="form.packageTypeArr" form-type="checkbox" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" multiple :disabled="false"/>
</el-form-item>
<el-form-item :label="$t('特殊要求备注')">
<el-input v-model="form.packageRemarks" :disabled="false" ></el-input>
</el-form-item>
</div>
<div class="form-section">
<el-form-item :label="$t('快递单号')">
<el-input v-model="form.number" :placeholder="$t('请输入购买商品的快递单号')" :disabled="false"> <el-input v-model="form.number" :placeholder="$t('请输入购买商品的快递单号')" :disabled="false">
<el-button type="primary" slot="append" @click="getOrderCourierNumber" :disabled="false">{{$t('生成单号')}}</el-button> <el-button type="primary" slot="append" @click="getOrderCourierNumber" :disabled="false">{{$t('生成单号')}}</el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
<div v-if="[2,3,4].indexOf(+form.transportId) > -1">
<el-form-item :label="$t('是否双清')">
<dict-selector v-model="form.doubleClear" form-type="radio" :type="DICT_TYPE.ECW_DOUBLE_CLEAR" defaultable :disabled="false" />
</el-form-item>
</div>
<!--<div v-if="[3,4].indexOf(+form.transportId) > -1">
<el-form-item :label="$t('航空公司')">
<supplier-selector v-model="form.airlineCompany" company-type="10" :disabled="false"/>
</el-form-item>
</div>-->
<div v-if="[2].indexOf(+form.transportId) > -1">
<el-form-item :label="$t('船公司')">
<supplier-selector v-model="form.shippingCompany" company-type="9" :disabled="false" />
</el-form-item>
</div>
<div v-if="[2,3,4].indexOf(+form.transportId) > -1">
<el-form-item :label="$t('清关证书')">
<dict-selector v-model="form.customsClearCert" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" :defaultable="!editMode" :disabled="false" />
</el-form-item>
<el-form-item :label="$t('清关证书备注')" >
<el-input v-model="form.customsClearCertRemarks" :disabled="false"></el-input>
</el-form-item>
</div> </div>
<div v-if="[3,4].indexOf(+form.transportId) > -1"> <div class="form-section" v-if="[2,3,4].indexOf(+form.transportId) > -1">
<el-form-item :label="$t('是否拆包')"> <el-form-item :label="$t('清关证书')">
<dict-selector v-model="form.isUnpack" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" :defaultable="!editMode" :disabled="false" /> <dict-selector v-model="form.customsClearCert" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" :defaultable="!editMode" :disabled="false" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('清关证书备注')" >
<el-input v-model="form.customsClearCertRemarks" :disabled="false"></el-input>
</el-form-item>
</div> </div>
<div class="form-section"> <div class="form-section"v-if="[3,4].indexOf(+form.transportId) > -1">
<el-form-item :label="$t('单票立刻转运')" v-if="[3,4].indexOf(+form.transportId) > -1"> <el-form-item :label="$t('是否拆包')">
<dict-selector v-model="form.isSingleTicketTransport" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" :defaultable="!editMode" :disabled="false" /> <dict-selector v-model="form.isUnpack" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" :defaultable="!editMode" :disabled="false" />
<span style="margin-left:10px">{{$t('注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”')}}</span> </el-form-item>
</el-form-item> <el-form-item :label="$t('单票立刻转运')" v-if="[3,4].indexOf(+form.transportId) > -1">
<dict-selector v-model="form.isSingleTicketTransport" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" :defaultable="!editMode" :disabled="false" />
<span style="margin-left:10px">{{$t('注:若只有一件,货到仓库立即发,选“是”,多件需仓库集运待发,选“否”')}}</span>
</el-form-item>
</div> </div>
<div class="form-section"> <!-- 20240823 新需求改动:屏蔽出单方式 和 是否双清字段
<el-form-item :label="$t('特殊要求')" > https://471hsh.axshare.com/?id=uc7auj&p=%E5%90%8E%E5%8F%B0%E5%88%9B%E5%BB%BA%E8%AE%A2%E5%8D%95%E9%A1%B5%E9%9D%A2&g=1
<template #label> <el-form-item :label="$t('出单方式')" prop="issuingMethod">
{{$t('特殊要求')}} <dict-selector :type="DICT_TYPE.ECW_SUING_METHOD" v-model="form.issuingMethod" form-type="radio" defaultable :disabled="false"/>
<el-tooltip effect="dark" :content="$t('如需我司打包,请勾选相应选项,费用付款人及打包要求可备注补充')" placement="top"> </el-form-item>
<i class="el-icon-question"></i> <div v-if="[2,3,4].indexOf(+form.transportId) > -1">
</el-tooltip> <el-form-item :label="$t('是否双清')">
</template> <dict-selector v-model="form.doubleClear" form-type="radio" :type="DICT_TYPE.ECW_DOUBLE_CLEAR" defaultable :disabled="false" />
<dict-selector v-model="form.packageTypeArr" form-type="checkbox" :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" multiple :disabled="false"/>
</el-form-item> </el-form-item>
</div> </div>
<el-form-item :label="$t('特殊要求备注')"> </div>-->
<el-input v-model="form.packageRemarks" :disabled="false" ></el-input> <!--20240823 新需求原型没有船公司字段,暂时屏蔽
<div v-if="[2].indexOf(+form.transportId) > -1">
<el-form-item :label="$t('船公司')">
<supplier-selector v-model="form.shippingCompany" company-type="9" :disabled="false" />
</el-form-item> </el-form-item>
</div>-->
</el-card> </el-card>
<el-card class="mt-10" v-if="showWorkFlow"> <el-card class="mt-10" v-if="showWorkFlow">
...@@ -669,6 +667,7 @@ import WorkFlow from '@/components/WorkFlow' ...@@ -669,6 +667,7 @@ import WorkFlow from '@/components/WorkFlow'
import { getCustomer } from "@/api/ecw/customer"; import { getCustomer } from "@/api/ecw/customer";
import {debounce} from "@/utils"; import {debounce} from "@/utils";
import { getOfferSelect, getOfferCheck } from "@/api/ecw/offer" import { getOfferSelect, getOfferCheck } from "@/api/ecw/offer"
import Template from '@/views/cms/template/index.vue'
// 缓存默认的表单数据 // 缓存默认的表单数据
let makeDefaultFormData = () => { let makeDefaultFormData = () => {
...@@ -691,6 +690,7 @@ window.Decimal = Decimal ...@@ -691,6 +690,7 @@ window.Decimal = Decimal
export default { export default {
name: "EcwOrderEdit", name: "EcwOrderEdit",
components: { components: {
Template,
ProductSelector, Selector, CustomerContactSelector, AreaSelector, FileUpload, AreaCodeSelector, ChooseContactDialog, QuickCreateCustomer, SupplierSelector, WorkFlow ProductSelector, Selector, CustomerContactSelector, AreaSelector, FileUpload, AreaCodeSelector, ChooseContactDialog, QuickCreateCustomer, SupplierSelector, WorkFlow
}, },
data() { data() {
...@@ -703,7 +703,7 @@ export default { ...@@ -703,7 +703,7 @@ export default {
callback(); callback();
} }
return { return {
validatorPositiveNumber, validatorPositiveNumber,
customDraweeList: [], customDraweeList: [],
// draweeList: [], // draweeList: [],
// 遮罩层 // 遮罩层
...@@ -747,6 +747,10 @@ export default { ...@@ -747,6 +747,10 @@ export default {
{ label: "自提", value: 1 }, { label: "自提", value: 1 },
{ label: "送货上门", value: 2 }, { label: "送货上门", value: 2 },
], ],
// 发货人是否允许控货无收货人
noConsignee: false,
// 是否有收货人
hasConsignee: true
}; };
}, },
computed:{ computed:{
...@@ -756,10 +760,11 @@ export default { ...@@ -756,10 +760,11 @@ export default {
{required: true, message: this.$t('请填写唛头')}, {required: true, message: this.$t('请填写唛头')},
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if(!/[a-zA-Z]/.test(value.charAt(0))){ /* 20240823 新需求:唛头数据校验修改成字母+数字组合,去掉原必须字母开头的限制
return callback(new Error(this.$t('唛头必须以字母开头'))) if(!/[a-zA-Z]/.test(value.charAt(0))){
} return callback(new Error(this.$t('唛头必须以字母开头')))
callback() } */
callback()
}, },
trigger: 'blur' trigger: 'blur'
} }
...@@ -1311,6 +1316,7 @@ export default { ...@@ -1311,6 +1316,7 @@ export default {
this.$set(this.form, this.contactChooseType + 'Name', contact.contactsName) this.$set(this.form, this.contactChooseType + 'Name', contact.contactsName)
this.$set(this.form, this.contactChooseType + 'NameEn', contact.contactsNameEn||'') this.$set(this.form, this.contactChooseType + 'NameEn', contact.contactsNameEn||'')
this.$set(this.form, this.contactChooseType + 'Phone', contact.phoneNew) this.$set(this.form, this.contactChooseType + 'Phone', contact.phoneNew)
this.noConsignee = contact.noConsignee
this.contactChooseType = null this.contactChooseType = null
this.quickCreateType = null this.quickCreateType = null
if(this.form.lineId) this.getOfferData() if(this.form.lineId) this.getOfferData()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment