Commit dc49d2e0 authored by 我在何方's avatar 我在何方
parents eabd78c9 763a4c6b
......@@ -534,7 +534,7 @@ export default {
checkPositive(object, field){
const lastChar = object[field].split('').pop()
object[field] = parseFloat(object[field])
if(!object[field] || object[field] < 0) object[field] = ''
if(isNaN(object[field]) || object[field] < 0) object[field] = ''
else object[field] = object[field].toString()
// 如果最后一位是.且没有其他点则补上
......
......@@ -30,7 +30,7 @@
<el-input v-model="form.address" :placeholder="$t('请输入联系地址')" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('出货渠道')" prop="transportType">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE" form-type="checkbox" multiple v-model="form.transportType"></dict-selector>
......@@ -46,7 +46,7 @@
<dict-selector :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" v-model="form.resourceType" formatter="number"></dict-selector>
</el-form-item>
</el-col>
<el-col :span="13" v-show="form.type && form.type.indexOf('2') !== -1">
<el-form-item :label="$t('所属代理')" prop="agentId">
<el-select filterable clearable v-model="form.agentId" :placeholder="$t('请选择所属代理')">
......@@ -171,7 +171,7 @@
<el-switch v-model="form.isShowTidanPrice"></el-switch>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('到仓确认')" prop="arrivalConfirm">
<el-switch v-model="form.arrivalConfirm" :active-value="1" :inactive-value="0" />
......@@ -492,7 +492,6 @@ export default {
// 新建客户
this.handleAddContact()
if(this.isCustomerServiceConfirmed){
console.log(this.userId);
this.form.customerService = this.userId
}
}
......@@ -512,7 +511,7 @@ export default {
getWarehouseList().then(r => {
this.warehouseList = r.data
})
listSimpleUsers().then(r => {
listServiceUser().then(r => {
this.serviceUserList = r.data
})
getCountryListAll().then(r => {
......@@ -657,7 +656,7 @@ export default {
return;
}
if (this.form.customerContacts.length === 0){
this.$modal.msgError(this.$t('至少填写一个联系人信息'));
this.$modal.msgError(this.$t('至少填写一个联系人信息'));
return
}
......@@ -700,7 +699,9 @@ export default {
}
// 添加的提交
//我的客户页面跳转直接
form.isCustomerServiceConfirmed = true;
if(this.isCustomerServiceConfirmed){
form.isCustomerServiceConfirmed = this.isCustomerServiceConfirmed;
}
createCustomer(form).then(response => {
this.$modal.msgSuccess(this.$t('新增成功'));
this.open = false;
......
......@@ -121,7 +121,7 @@
</el-table-column>
<el-table-column :label="$t('出货渠道')">
<template slot-scope="{row}">
<dict-tag v-if="row.transportType" v-for="item in row.transportType.split(',')" :type="DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE" :value="item"></dict-tag>
{{channel(row.transportType)}}
</template>
</el-table-column>
<el-table-column :label="$t('国家')" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
......@@ -517,6 +517,13 @@ import transferCustomer from "@/views/ecw/customer/transferCustomer";
export default {
name: "Customer",
computed:{
channel(){
return (val)=>{
return !!val ? this.getDictDatas(this.DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE).filter(i => (val.split(',') || []).includes(i.value)).map(i => i.label).join('') :''
}
}
},
components: {
upload,
CustomerFollowList,
......@@ -618,6 +625,7 @@ export default {
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行查询
getCustomerPage(params).then(response => {
console.log(response,'response')
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
......
......@@ -31,7 +31,7 @@
<el-descriptions-item :label="$t('客户类别')">{{ getDictDatas2(DICT_TYPE.CUSTOMER_TYPE, (customer.type||'').split(',')).map(e => e.label).join(', ') }}</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('联系方式')">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item :label="$t('推介人')">{{ promoter }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户经理')">{{ customerService }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户经理')">{{customerService }}</el-descriptions-item>
<el-descriptions-item :label="$t('公司名称')">{{ customer.company }}</el-descriptions-item>
<el-descriptions-item :label="$t('联系地址')">{{ customer.address }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">{{ parseTime(customer.createTime) }}</el-descriptions-item>
......@@ -469,6 +469,7 @@ export default {
getCustomerSelect().then(r => {
this.customerSelect = r.data.list
})
listServiceUser().then(r => {
this.serviceUserList = r.data
})
......@@ -601,6 +602,7 @@ export default {
return this.customerSelect.find(e => e.id === this.customer.promoter)?.name || ''
},
customerService() {
console.log(this.serviceUserList,'this.serviceUserList');
return this.serviceUserList.find(e => e.id === this.customer.customerService)?.nickname || ''
},
id() {
......
......@@ -18,17 +18,17 @@
<el-row v-if="!form.charging">
<el-col :span="12">
<el-form-item :label="$t('运费')">
{{form.orgSeaFreight}} {{ currencyMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
{{form.seaFreight}} {{ currencyMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('清关费')">
{{form.orgClearanceFreight}} {{ currencyMap[form.clearanceFreightCurrency] }} / {{ unitMap[form.clearanceFreightVolume] }}
{{form.clearanceFreight}} {{ currencyMap[form.clearanceFreightCurrency] }} / {{ unitMap[form.clearanceFreightVolume] }}
</el-form-item>
</el-col>
</el-row>
<el-form-item :label="$t('全包价')" v-if="form.charging">
{{form.orgSeaFreight}} {{ currencyMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
{{form.seaFreight}} {{ currencyMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
</el-form-item>
<el-form-item :label="$t('佣金类型')" prop="commissionType">
<dict-selector :type="DICT_TYPE.COMMISSION_TYPE" v-model="form.commissionType" form-type="radio" formatter="number" />
......@@ -52,7 +52,7 @@
<!-- 明佣+暗佣显示 -->
<div v-if="form.commissionType == 3">
{{$t('成本价')}}{{form.orgSeaFreight}} {{ currencyMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
{{$t('成本价')}}{{costPrice}} {{ currencyMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}
</div>
<!-- 暗佣显示 -->
......@@ -64,7 +64,7 @@
<el-link type="primary" @click.native="$router.push('/customer/customerCommission?customerId=' + offer.relationId)">去设置</el-link>
</div>
<div v-if="form.commissionType == 1 || form.commissionType == 3">{{$t('销售价')}}{{form.orgSeaFreight + form.shadeCommissionAmount + form.lightCommissionAmount }} {{ currencyMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}</div>
<div v-if="form.commissionType == 1 || form.commissionType == 3">{{$t('销售价')}}{{ salePrice }} {{ currencyMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}</div>
<div v-if="form.commissionType == 3">{{$t('实际佣金返点')}}{{form.shadeCommissionAmount + form.lightCommissionAmount }} {{ currencyMap[form.seaFreightCurrency] }} / {{ unitMap[form.seaFreightVolume] }}</div>
</div>
<div class="page-title">{{$t('审批流程')}}</div>
......@@ -96,6 +96,7 @@ import { getProductTypeList } from '@/api/ecw/productType'
import WorkFlow from '@/components/WorkFlow'
import {getDarkReturnCommission} from '@/api/ecw/customerCommission'
import {cancelProcessInstance} from '@/api/bpm/processInstance'
import Decimal from "decimal.js"
const TYPE = 3
export default {
name: "Commossion",
......@@ -158,6 +159,12 @@ export default {
return s ? '' + s + '' : ''
}
},
costPrice(){
return Decimal(this.form.seaFreight || 0).minus(this.form.orgShadeCommissionAmount || 0).minus(this.form.shadeCommissionAmount || 0)
},
salePrice(){
return Decimal(this.form.seaFreight || 0).minus(this.form.orgLightCommissionAmount || 0).plus(this.form.lightCommissionAmount || 0)
},
currencyMap(){
let map = {}
this.currencyList.forEach(item => {
......
......@@ -25,13 +25,13 @@
</div>
<div>
原运费:{{form.seaFreight}}{{currencyMap[form.seaFreightCurrency]}} / {{unitMap[form.seaFreightVolume]}}
原运费:{{form.orgSeaFreight}}{{currencyMap[form.seaFreightCurrency]}} / {{unitMap[form.seaFreightVolume]}}
</div>
<div>
新运费:{{newSeaFreight}}{{currencyMap[form.seaFreightCurrency]}} / {{unitMap[form.seaFreightVolume]}}
新运费:{{form.seaFreight}}{{currencyMap[form.seaFreightCurrency]}} / {{unitMap[form.seaFreightVolume]}}
</div>
<div>
成本价:{{form.orgSeaFreight}}{{currencyMap[form.seaFreightCurrency]}} / {{unitMap[form.seaFreightVolume]}}
成本价:{{costPrice}}{{currencyMap[form.seaFreightCurrency]}} / {{unitMap[form.seaFreightVolume]}}
</div>
<div>
明佣:{{ form.lightCommissionAmount}}{{currencyMap[form.seaFreightCurrency]}} / {{unitMap[form.seaFreightVolume]}}
......@@ -132,8 +132,12 @@ export default {
return map
},
// 新运费
newSeaFreight(){
/* newSeaFreight(){
return Decimal(this.form.seaFreight).plus(this.form.shadeCommissionAmount).plus(this.form.lightCommissionAmount)
}, */
// 成本价
costPrice(){
return Decimal(this.form.seaFreight || 0).minus(this.form.lightCommissionAmount || 0).minus(this.form.shadeCommissionAmount || 0)
}
},
methods: {
......
......@@ -70,7 +70,6 @@ export default {
i.todoDetail = this.todoDetail
})
let p = this.specialNeedsList.filter(i => this.advanceType.indexOf(i.advanceType) > -1)
console.log(p,'p')
let p1 = []
//获取新增的和修改的
p.forEach(item => {
......@@ -105,8 +104,8 @@ export default {
advanceType:r.value,
orderId:this.orderId,
transFee:'',//预计金额
transCurrency:'',//运输费币种
payType:''
transCurrency:1,//运输费币种
payType:'1'
})
})
//特需回显
......
......@@ -390,7 +390,7 @@ export default {
});
},
getChannel(){
if(!this.order || !this.order.channelId) return
if(!this.order || !this.order.channelId || this.order.transportId == 1 || this.order.transportId == 2) return
getChannel(this.order.channelId).then(res => {
this.channelName = res.data.nameZh
})
......
......@@ -698,6 +698,7 @@ export default {
totalWorth: new Decimal(0),
totalQuatity: new Decimal(0)
}
if(!this.form || !this.form.orderItemVOList) return sum
this.form.orderItemVOList.forEach(item => {
sum.totalNum = sum.totalNum.plus(item.num || 0)
sum.totalVolume = sum.totalVolume.plus(item.volume || 0)
......@@ -766,6 +767,11 @@ export default {
console.log('重置路线',oldTransportId, transportId, this.selectedRouter?.transportType)
this.$set(this.form, 'lineId', undefined)
}
// 选择海运拼柜和海运整柜清空渠道值
if(transportId == 1 || transportId == 2){
this.$set(this.form, 'channelId', null)
}
this.getOpenedRouterList()
},
......
......@@ -139,7 +139,8 @@
<el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('总箱数/入仓箱数')" align="center" prop="sumNum">
<template slot-scope="{row}">
{{row.totalNum}}{{$t('')}}/{{row.sumNum}}{{$t('')}}
<div :style="{color:row.customsType != 1 ? 'red' : null}">{{row.totalNum}}{{$t('')}}/{{row.sumNum}}{{$t('')}}</div>
<dict-tag v-if="row.customsType != 1" style="color:red" :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="row.customsType"></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('体积/重量')" align="center" prop="sumWeight">
......
......@@ -13,7 +13,7 @@
</template>
<template v-else>
<el-form-item :label="$t('原泡货标准')">
{{form.orgWVolume}} kg
{{form.orgVWeight}} kg
</el-form-item>
<el-form-item :label="$t('现泡货标准')" style="width: 400px" prop="clearanceFreight">
<el-input v-model="form.vweight" type="number" class="w-100" /> kg
......
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