Commit 9e08d3dc authored by dragondean@qq.com's avatar dragondean@qq.com

bug

parent 3f23d956
<template>
<selector v-model="valueSync" :options="countryList" value-field="tel" key-field="id" :label-field="item => item.nameZh + item.tel" filterable clearable></selector>
<selector v-model="valueSync" :options="countryList" value-field="tel" key-field="id" :label-field="item => item.nameZh + item.tel" filterable clearable :disabled="disabled"></selector>
</template>
<script>
import {getCountryListAll} from '@/api/ecw/country'
......@@ -8,6 +8,7 @@ export default {
components: {selector},
props: {
value: String,
disabled: Boolean
},
data(){
return {
......
<template>
<el-dialog title="选择联系人" visible :before-close="closeDialog" :close-on-click-modal="false">
<div class="header mb-10">
<div class="flex-center">关键字:</div>
<el-input v-model="form.searchKey" placeholder="" class="w-200"></el-input>
<el-button type="primary" class="ml-10" @click="handleQuery">搜索</el-button>
</div>
<div class="list">
<div class="list-item" v-for="item in list" :key="item.customerContactsId" @click="choose(item)">
<div class="item-box">
<div class="line">
<div class="label">姓名:</div>
<div class="value">{{item.contactsName}}</div>
</div>
<div class="line">
<div class="label">电话:</div>
<div class="value">{{item.areaCode}} {{item.phoneNew}}</div>
</div>
<div class="line">
<div class="label">邮箱:</div>
<div class="value">{{item.emial}}</div>
</div>
<div class="line">
<div class="label">公司:</div>
<div class="value">{{item.company}}</div>
</div>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts'
export default {
props:{
type: Number
},
data(){
return {
show: true,
form:{
/* pageNo: 1,
pageSize: 20, */
searchKey: ''
},
list:[]
}
},
created(){
this.show = true
this.loadList()
},
methods:{
handleQuery(){
// this.form.pageNo = 1
this.loadList()
},
loadList(){
getCustomerContactsSelect(this.form).then(res => {
this.list = res.data
})
},
closeDialog(){
this.show = false
this.$emit('close');
},
choose(contact){
this.$emit('choose', contact)
}
}
}
</script>
<style lang="scss" scoped>
.header{
display: flex;
}
.list{
display: flex;
flex-wrap: wrap;
justify-content: center;
&-item{
background: #eee;
width: 300px;
margin: 10px;
padding: 5px;
border-radius: 10px;
border: 5px solid transparent;
background: linear-gradient(white,white) padding-box,repeating-linear-gradient(-45deg, red 0, red 12.5%, transparent 0, transparent 25%, #58a 0, #58a 37.5%, transparent 0, transparent 50%) 0/5em 5em;
.item-box{
/* background: #fbfaf5; */
padding: 20px;
}
.line{
display: flex;
/* .label{
width: 100px;
} */
.value{
flex: 1;
margin-left: 10px;
}
}
}
}
</style>
......@@ -23,10 +23,10 @@
</template>
<script>
import {getCustomerContactsSelect, getCustomerContactsListByCustomer} from '@/api/ecw/customerContacts'
import QuickCreate from '@/views/ecw/customer/components/quickCreate'
import QuickCreateCustomer from '@/components/QuickCreateCustomer'
import Vue from 'vue'
export default {
components:{QuickCreate},
components:{QuickCreateCustomer},
props:{
value: [String, Number],
quickable: {
......@@ -75,7 +75,7 @@ export default {
},
showQuickCreate(){
if(!this.showQuickCreate)return
const QuickCreateComp = Vue.extend(QuickCreate)
const QuickCreateComp = Vue.extend(QuickCreateCustomer)
const dialog = new QuickCreateComp({
propsData:{
default: {type: this.type}
......
......@@ -55,11 +55,12 @@
import {createCustomer} from '@/api/ecw/customer'
import {listServiceUser} from "@/api/system/user"
import { getCountryListAll } from '@/api/ecw/country'
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts'
export default {
name: "quickCreateCustomer",
props:{
default: Object,
type: String,
},
data(){
......@@ -93,8 +94,8 @@ export default {
}
},
created() {
if(this.default){
this.$set(this, 'form', Object.assign({}, this.default, this.form))
if(this.type){
this.$set(this.form, 'type', this.type)
}
listServiceUser().then(r => {
this.serviceUserList = r.data
......@@ -120,9 +121,10 @@ export default {
// 添加的提交
createCustomer(this.form).then(res => {
this.$modal.msgSuccess("新增成功");
this.$emit('success', res.data)
// this.getList();
});
return getCustomerContactsSelect({ids: res.data})
}).then(res => {
this.$emit('success', res.data[0])
})
});
},
}
......
......@@ -53,6 +53,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
// 处理 meta 属性
route.meta = {
title: route.name,
titleEn: route.nameEn,
icon: route.icon
}
route.hidden = typeof route.isShowInMenuBar != 'undefined' && (route.isShowInMenuBar == 'false' || !route.isShowInMenuBar)
......
......@@ -130,27 +130,29 @@
{{scope.$index + 1}}
</template>
</el-table-column>
<el-table-column :label="$t('中文名')" width="160px">
<el-table-column :label="$t('中文名')" width="160px">
<template slot-scope="{row}">
<product-selector v-model="row.prodId" @change="onProductChange(row, $event)" />
</template>
</el-table-column>
<el-table-column :label="$t('英文名')" width="160px">
<el-table-column :label="$t('英文名')" width="160px">
<template slot-scope="{row}">
<product-selector v-model="row.prodId" @change="onProductChange(row, $event)" />
<product-selector lang="En" v-model="row.prodId" @change="onProductChange(row, $event)" />
</template>
</el-table-column>
<el-table-column :label="$t('商品类型')" width="160px">
<el-table-column :label="$t('品牌')" width="100px">
<template slot-scope="{row}">
<selector disabled v-model="row.goodsType" :options="productAttrList" label-field="attrName" value-field="id" @input="calculationPrice"></selector>
<dict-selector v-model="row.brand" :type="DICT_TYPE.ECW_IS_BRAND" defaultable @input="calculationPrice" />
</template>
</el-table-column>
<el-table-column :label="$t('品牌')" width="100px">
<!-- <el-table-column :label="$t('商品类型')" width="160px">
<template slot-scope="{row}">
<dict-selector v-model="row.brand" :type="DICT_TYPE.ECW_IS_BRAND" defaultable @input="calculationPrice" />
<selector disabled v-model="row.goodsType" :options="productAttrList" label-field="attrName" value-field="id" @input="calculationPrice"></selector>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column :label="$t('件数')" width="90px">
<template slot-scope="{row}">
<el-input v-model.number="row.num" @input="calculationPrice" />
......@@ -166,11 +168,11 @@
<el-input v-model.number="row.quantity" @input="calculationPrice" />
</template>
</el-table-column>
<el-table-column :label="$t('箱规') + '(m)'" width="120px">
<!-- <el-table-column :label="$t('箱规') + '(m)'" width="120px">
<template slot-scope="{row}">
<el-input v-model="row.boxGauge" @input="calcVolume(row);calculationPrice()" />
</template>
</el-table-column>
</el-table-column> -->
<el-table-column :label="$t('总体积') + '(m³)'" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.volume" @input="calculationPrice"/>
......@@ -181,7 +183,7 @@
<el-input v-model="row.weight" @input="calculationPrice" />
</template>
</el-table-column>
<el-table-column :label="$t('货值') + '(RMB)'" width="100px">
<el-table-column :label="$t('货值') + '(RMB)'" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.worth" />
</template>
......@@ -193,34 +195,6 @@
</el-checkbox-group>
</template>
</el-table-column>
<!-- <el-table-column label="运输方式" width="150px">
<template slot-scope="{row}">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="row.transportId"
@input="onTransportChange(row,$event)" formatter="number" />
</template>
</el-table-column>
<el-table-column label="出货渠道" width="150px">
<template slot-scope="{row}">
<selector
:disabled="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, row.transportId).cssClass != 'channel'"
v-model="row.channelId"
:options="channelList"
value-field="channelId"
label-field="nameZh"
@input="onChannelChange(row)"
></selector>
</template>
</el-table-column>
<el-table-column label="线路" width="200px">
<template slot-scope="{row}">
<selector
v-model="row.lineId"
:options="routerList"
@input="onLineChange(row)"
clearable
:label-field="(item, index) => item.startTitleZh + ' >> ' + item.destTitleZh" value-field="id"></selector>
</template>
</el-table-column> -->
<el-table-column :label="$t('运费')" width="200px">
<template slot-scope="{row}">
<template v-if="row.fee && row.fee.charging == 1">
......@@ -253,11 +227,15 @@
</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('快递单号')" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.expressNo" placeholder="缺少字段" />
</template>
</el-table-column>
<el-table-column :label="$t('操作')" width="180px" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="delProduct(scope.$index)">{{$t('删除')}}</el-button>
<el-button size="mini" type="primary" @click="showMorePrice($index)">{{$t('更多报价')}}</el-button>
<!-- <el-button size="mini" type="primary" @click="getProductFee(scope.row)">计算</el-button> -->
<!-- <el-button size="mini" type="primary" @click="showMorePrice($index)">{{$t('更多报价')}}</el-button> -->
</template>
</el-table-column>
</el-table>
......@@ -484,7 +462,6 @@ import {getCurrencyList} from '@/api/ecw/currency'
import {getUnitList} from '@/api/ecw/unit'
import {calculationPrice} from '@/api/ecw/product'
import {getCustomerAvailableCouponList} from '@/api/ecw/coupon'
import {arrryToKeyedObjectBy} from '@/utils/index'
export default {
name: "OfferEdit",
......@@ -696,11 +673,16 @@ export default {
if(this.getDictData(this.DICT_TYPE.ECW_TRANSPORT_TYPE, val).cssClass != 'channel') row.channelId = null
this.updateEnabledTransports()
}, */
onProductChange(row, product){
/* onProductChange(row, product){
row.goodsType = product.typeId;
// 保存商品id和品名,用于优惠信息显示
this.$set(this.productNames, product.id, product.titleZh)
this.calculationPrice()
}, */
onProductChange(row, product){
console.log(product)
row.goodsType = product ? product.typeId : null
row.prodAttrArr = !product ? [] : product.attrId.split(',').filter(item => item !== '').map(item => +item)
},
onLineChange(row){
this.calculationPrice()
......
<template>
<div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" inline>
<el-card>
<div slot="header" class="card-title">{{ editMode ? this.$t('编辑订单') : this.$t('新建订单')}}</div>
<!--默认显示类型(selectedRouter==null),如果选择路线后没开通则隐藏-->
<el-form-item label="订单类型" style="margin-bottom: 0" v-if="!selectedRouter || routeOtherServices.indexOf('1') > -1 || routeOtherServices.indexOf('4') > -1">
<el-form-item :label="$t('订单类型')" v-if="!selectedRouter || routeOtherServices.indexOf('1') > -1 || routeOtherServices.indexOf('4') > -1">
<el-checkbox-group v-model="form.type">
<el-checkbox label="1" v-if="!selectedRouter || routeOtherServices.indexOf('1') > -1">{{$t('集运服务')}}</el-checkbox>
<el-checkbox label="2" v-if="!selectedRouter || routeOtherServices.indexOf('2') > -1">{{$t('海外仓')}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-descriptions :column="3" border v-if="form.type.indexOf('1') < 0">
<el-descriptions-item :label="$t('发货人')" :labelStyle="labelStyle">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consignorContactsId">
<customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" />
</el-form-item>
<div class="form-section">
<el-form-item :label="$t('发货人')" prop="consignorContactsId" >
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div class="contact">
<el-input v-model="form.consignorName" placeholder="" :disabled="form.status !== 0"/>
<img v-if="!form.status" src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignor'" />
<img v-if="!form.status" src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='1'" />
</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" :disabled="form.status !== 0" />
</el-form-item>
<el-form-item label="Email" prop="consignorPhone">
<el-input v-model="form.consignorEmail" :disabled="form.status !== 0" />
</el-form-item>
</div>
<div class="form-section">
<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="form.status !== 0"/>
<img v-if="!form.status" src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignee'" />
<img v-if="!form.status" src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='2'" />
</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="form.status !== 0" />
</el-form-item>
<el-form-item label="Email" prop="consigneePhone">
<el-input v-model="form.consigneeEmail" :disabled="form.status !== 0"/>
</el-form-item>
</div>
<!-- <el-descriptions :column="3" border v-if="form.type.indexOf('1') < 0">
<el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('电话')" :labelStyle="labelStyle">
{{consignorContact.areaCode}} {{consignorContact.phoneNew || $t('')}}
......@@ -27,8 +65,8 @@
<el-descriptions-item label="Email" :labelStyle="labelStyle">
{{consignorContact.email || $t('')}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="3" border>
</el-descriptions> -->
<!-- <el-descriptions :column="3" border>
<el-descriptions-item :label="$t('收货人')" :labelStyle="labelStyle" >
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="consigneeContactsId">
<customer-contact-selector v-model="form.consigneeContactsId" @change="consigneeContact = $event" type="2" />
......@@ -43,57 +81,63 @@
<el-descriptions-item label="Email" :labelStyle="labelStyle">
{{consigneeContact.email || $t('')}}
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="3" border>
</el-descriptions> -->
<div class="form-section">
<el-form-item :label="$t('运输方式')" prop="transportId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" :disabled="form.status !== 0"/>
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="channelId" required v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'" :error="$t('请选择出货渠道')">
<selector
:disabled="form.status !== 0 || getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'"
v-model="form.channelId"
:options="channelList"
value-field="channelId"
:label-field="$l(null, 'name')"
></selector>
</el-form-item>
</div>
<div class="form-section">
<el-form-item :label="$t('始发城市')" prop="departureId">
<el-select v-model="form.departureId" :placeholder="$t('请选择始发地')" :disabled="form.status !== 0">
<el-option v-for="item in exportCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-select v-model="form.objectiveId" :placeholder="$t('请选择目的地')" :disabled="form.status !== 0">
<el-option v-for="item in importCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
</div>
<div class="form-section">
<el-form-item :label="$t('选择线路')" prop="lineId">
<el-input :value="selectedRouter ? $l(selectedRouter, 'startTitle') + ' > ' + $l(selectedRouter, 'destTitle') : ''" disabled :placeholder="$t('请在右侧选择线路')"></el-input>
</el-form-item>
<select size="5" v-model="form.lineId" style="min-width: 300px; border:1px solid #DCDFE6; border-radius:4px" :disabled="form.status !== 0">
<template v-for="item in routerList">
<option :value="item.id" :key="item.id">{{$l(item, 'startTitle')}} >> {{$l(item, 'destTitle')}}</option>
</template>
</select>
</div>
<!-- <el-descriptions :column="3" border>
<el-descriptions-item :label="$t('运输方式')" :labelStyle="labelStyle">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="transportId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="form.transportId" />
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'" :labelStyle="labelStyle">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="channelId" :required="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'" error="请选择出货渠道">
<selector
:disabled="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'"
v-model="form.channelId"
:options="channelList"
value-field="channelId"
:label-field="$l(null, 'name')"
></selector>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
<el-descriptions :column="2" border>
<el-descriptions-item :label="$t('始发城市')" :labelStyle="labelStyle">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="departureId">
<el-select v-model="form.departureId" :placeholder="$t('请选择始发地')">
<el-option v-for="item in exportCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('目的城市')" :labelStyle="labelStyle">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="objectiveId">
<el-select v-model="form.objectiveId" :placeholder="$t('请选择目的地')">
<el-option v-for="item in importCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('请选择线路')" :span="2" :labelStyle="labelStyle">
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="lineId">
<el-input :value="selectedRouter ? $l(selectedRouter, 'startTitle') + ' > ' + $l(selectedRouter, 'destTitle') : ''" readonly :placeholder="$t('请在右侧选择线路')"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<select size="5" v-model="form.lineId" style="min-width: 300px">
<template v-for="item in routerList">
<option :value="item.id" :key="item.id">{{$l(item, 'startTitle')}} >> {{$l(item, 'destTitle')}}</option>
</template>
</select>
</el-col>
</el-row>
</el-descriptions-item>
</el-descriptions>
</el-descriptions> -->
</el-card>
<el-card class="mt-10">
<div slot="header" class="card-title">
......@@ -148,17 +192,17 @@
<el-input v-model="row.boxGauge" @input="calcVolume(row)" />
</template>
</el-table-column> -->
<el-table-column :label="$t('体积') + '(m³)'" width="100px">
<el-table-column :label="$t('体积') + '(m³)'" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.volume" :disabled="!form.lineId || !productEditable" />
</template>
</el-table-column>
<el-table-column :label="$t('重量') + '(kg)'" width="100px">
<el-table-column :label="$t('重量') + '(kg)'" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.weight" :disabled="!form.lineId || !productEditable" />
</template>
</el-table-column>
<el-table-column :label="$t('货值') + '(RMB)'" width="100px">
<el-table-column :label="$t('货值') + '(RMB)'" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.worth" :disabled="!form.lineId" />
</template>
......@@ -209,6 +253,11 @@
<el-button size="mini" type="danger" @click="delProduct(scope.$index)">{{$t('删除')}}</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('快递单号')" width="100px">
<template slot-scope="{row}">
<el-input v-model="row.expressNo" placeholder="缺少字段" />
</template>
</el-table-column>
</el-table>
<!--
</el-card>
......@@ -447,6 +496,9 @@
<el-button type="default" @click="showBatchImportDialog=false">{{$t('取消')}}</el-button>
</div>
</el-dialog>
<choose-contact-dialog v-if="!!contactChooseType" @choose="onContactChoose" @close="contactChooseType=null" />
<quick-create-customer v-if="quickCreateType" :type="quickCreateType" @success="onContactChoose" @close="quickCreateType=null" />
</div>
</template>
......@@ -467,11 +519,13 @@ import AreaSelector from '@/components/AreaSelector'
import {calculationPrice} from '@/api/ecw/product'
import {getCustomerAvailableCouponList} from '@/api/ecw/coupon'
import FileUpload from '@/components/FileUpload'
import AreaCodeSelector from '@/components/AreaCodeSelector'
import ChooseContactDialog from '@/components/ChooseContactDialog'
import QuickCreateCustomer from '@/components/QuickCreateCustomer'
export default {
name: "OrderEdit",
components: {
ProductSelector, Selector, CustomerContactSelector, AreaSelector, FileUpload
ProductSelector, Selector, CustomerContactSelector, AreaSelector, FileUpload, AreaCodeSelector, ChooseContactDialog, QuickCreateCustomer
},
data() {
return {
......@@ -498,6 +552,7 @@ export default {
fee: {}, // 费用
// 表单参数
form: {
status:0,
sendstatus:0,
isCargoControl: false,
type:[]
......@@ -519,6 +574,8 @@ export default {
showBatchImportDialog: false, // 显示批量导入弹窗
importList:[],
exportLoading: false, // 装下单模板下载状态
contactChooseType: null, // 联系人选择对象consignor(发货人) 或者 consignee(收货人)
quickCreateType: null, // 快速新建客户类型,1发货人,2收货人
};
},
computed:{
......@@ -602,8 +659,8 @@ export default {
}
this.productList.forEach(item => {
sum.totalNum += parseInt(item.num) || 0
sum.totalVolume += parseFloat(item.volume) || 0
sum.totalWeight += parseFloat(item.weight) || 0
sum.totalVolume += (parseFloat(item.volume) || 0) // * (parseInt(item.num) || 0)
sum.totalWeight += (parseFloat(item.weight) || 0) // * (parseInt(item.num) || 0)
sum.totalWorth += parseFloat(item.worth) || 0
sum.totalQuatity += parseInt(item.quantity) || 0
......@@ -712,6 +769,22 @@ export default {
})
},
methods: {
onContactChoose(contact){
console.log('选择联系人', contact)
if(!this.contactChooseType && !this.quickCreateType) return
if(!this.contactChooseType && this.quickCreateType){
this.contactChooseType = this.quickCreateType == 1 ? 'consignor' : 'consignee'
}
this.$set(this.form, this.contactChooseType + 'Company', contact.company)
this.$set(this.form, this.contactChooseType + 'ContactsId', contact.customerContactsId)
this.$set(this.form, this.contactChooseType + 'CountryCode', contact.areaCode)
this.$set(this.form, this.contactChooseType + 'Email', contact.email)
this.$set(this.form, this.contactChooseType + 'Id', contact.customerId)
this.$set(this.form, this.contactChooseType + 'Name', contact.contactsName)
this.$set(this.form, this.contactChooseType + 'Phone', contact.phoneNew)
this.contactChooseType = null
this.quickCreateType = null
},
upload(e){
console.log({upload: e})
let form = new FormData()
......@@ -932,4 +1005,20 @@ export default {
/* .mt-10{
margin-top: 10px;
} */
.form-section{
/* ::v-deep.el-form-item{
width: 30%;
} */
.contact{
display: flex;
align-items: center;
img.phonebook{
width: 30px;
height: 30px;
margin-left: 10px;
cursor: pointer;
}
}
}
</style>
\ No newline at end of file
......@@ -101,8 +101,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="英文名称" prop="enName">
<el-input v-model="form.enName" placeholder="请输入菜单英文名称" />
<el-form-item label="英文名称" prop="nameEn">
<el-input v-model="form.nameEn" placeholder="请输入菜单英文名称" />
</el-form-item>
</el-col>
<el-col :span="12">
......
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