Commit 65037cf5 authored by 我在何方's avatar 我在何方

Merge branch 'release2.2' of...

Merge branch 'release2.2' of http://gitlab.jdshangmen.com/jiedao-app/jiedao-app-operator into release2.2
parents 07b28f54 c2fae766
...@@ -145,3 +145,12 @@ export function deleteAllSplit(orderId) { ...@@ -145,3 +145,12 @@ export function deleteAllSplit(orderId) {
params: {orderId} params: {orderId}
}) })
} }
// 获取拆单订单的总货值与箱数拆分记录
export function splitItemWorthCheck(orderId, orderSplitItemId) {
return request({
url: '/order/split-item/worth/check',
method: 'get',
params: {orderId, orderSplitItemId}
})
}
...@@ -141,30 +141,34 @@ ...@@ -141,30 +141,34 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('入仓体积')" align="center" > <el-table-column :label="$t('入仓体积')" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.volume" @change="updateField(scope.row, 'volume')" size="mini" disabled> {{scope.row.volume}}
<!--<el-input v-model="scope.row.volume" @change="updateField(scope.row, 'volume')" size="mini" disabled>
<span slot="append"></span> <span slot="append"></span>
</el-input> </el-input>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('收费体积')" align="center" > <el-table-column :label="$t('收费体积')" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.chargeVolume" @change="updateField(scope.row, 'chargeVolume')" size="mini" disabled> {{scope.row.chargeVolume}}
<!--<el-input v-model="scope.row.chargeVolume" @change="updateField(scope.row, 'chargeVolume')" size="mini" disabled>
<span slot="append"></span> <span slot="append"></span>
</el-input> </el-input>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('入仓重量')" align="center"> <el-table-column :label="$t('入仓重量')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.weight" @change="updateField(scope.row, 'weight')" size="mini" disabled> {{scope.row.weight}}kg
<!--<el-input v-model="scope.row.weight" @change="updateField(scope.row, 'weight')" size="mini" disabled>
<span slot="append">kg</span> <span slot="append">kg</span>
</el-input> </el-input>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('收费重量')" align="center"> <el-table-column :label="$t('收费重量')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.chargeWeight" @change="updateField(scope.row, 'chargeWeight')" size="mini" disabled> {{scope.row.chargeWeight}}kg
<!--<el-input v-model="scope.row.chargeWeight" @change="updateField(scope.row, 'chargeWeight')" size="mini" disabled>
<span slot="append">kg</span> <span slot="append">kg</span>
</el-input> </el-input>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('货值')" align="center"> <el-table-column :label="$t('货值')" align="center">
...@@ -231,7 +235,7 @@ ...@@ -231,7 +235,7 @@
<span class="mr-10">{{ $t('入仓重量') }}:{{ mainOrderItem.weight || 0 }}kg</span> <span class="mr-10">{{ $t('入仓重量') }}:{{ mainOrderItem.weight || 0 }}kg</span>
<span class="mr-10">{{ $t('收费重量') }}:{{ mainOrderItem.chargeWeight || 0 }}kg</span> <span class="mr-10">{{ $t('收费重量') }}:{{ mainOrderItem.chargeWeight || 0 }}kg</span>
<span class="mr-10">{{ $t('数量(个)') }}:{{ mainOrderItem.quantity || 0 }}</span> <span class="mr-10">{{ $t('数量(个)') }}:{{ mainOrderItem.quantity || 0 }}</span>
<span class="mr-10">{{ $t('剩余货值') }}:{{ mainOrderItem.worth || 0 }}{{ $t('元') }}</span> <span class="mr-10">{{ $t('剩余可拆货值') }}:{{ leftWorth}}{{ $t('元') }}</span>
</div> </div>
<div class="page-title">{{$t('可拆入仓记录')}}</div> <div class="page-title">{{$t('可拆入仓记录')}}</div>
<el-table <el-table
...@@ -291,7 +295,7 @@ ...@@ -291,7 +295,7 @@
<el-table-column :label="$t('操作')"> <el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}"> <template v-slot="{ row, column, $index}">
<el-tag v-if="getWarehouseInSplitData(row.id,'num') >= row.cartonsNum" disabled size="mini" type="primary" >{{$t('已拆完')}}</el-tag> <el-tag v-if="getWarehouseInSplitData(row.id,'num') >= row.cartonsNum" disabled size="mini" type="primary" >{{$t('已拆完')}}</el-tag>
<el-button v-else size="mini" type="primary" @click="putInRecord(row)" :disabled="leftSplitNum <= 0">放入</el-button> <el-button v-else size="mini" type="primary" @click="putInRecord(row)" :disabled="leftSplitNum <= 0">{{$t('放入')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -299,7 +303,7 @@ ...@@ -299,7 +303,7 @@
<div class="page-title" style="margin: 0"> <div class="page-title" style="margin: 0">
{{$t('已放入入仓记录')}} {{$t('已放入入仓记录')}}
</div> </div>
<el-button type="danger" size="mini" @click="clearAll">清空放入数据</el-button> <el-button type="danger" size="mini" @click="clearAll">{{$t('清空放入数据')}}</el-button>
</div> </div>
<el-table <el-table
...@@ -348,12 +352,12 @@ ...@@ -348,12 +352,12 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')"> <el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}"> <template v-slot="{ row, column, $index}">
<el-button size="mini" type="primary" @click="deleteRow($index)">删除</el-button> <el-button size="mini" type="primary" @click="deleteRow($index)">{{$t('删除')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="page-title">放入数据</div> <div class="page-title">{{$t('放入数据')}}</div>
<div class="pl-20 mb-10"> <div class="pl-20 mb-10">
<span class="mr-10">{{$t('箱数')}}:{{ putin.num || 0 }},</span> <span class="mr-10">{{$t('箱数')}}:{{ putin.num || 0 }},</span>
<span class="mr-10">{{ $t('数量(个)') }}:{{ putin.quantity || 0 }},</span> <span class="mr-10">{{ $t('数量(个)') }}:{{ putin.quantity || 0 }},</span>
...@@ -368,7 +372,7 @@ ...@@ -368,7 +372,7 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('放入货值')"> <el-form-item :label="$t('放入货值')">
<el-input-number v-model="shopForm.worth" controls-position="right" :min="0" :max="mainOrderItem.worth"> <el-input-number v-model="shopForm.worth" controls-position="right" :min="0" :max="leftWorth">
<template slot="append">{{ $t('') }}</template> <template slot="append">{{ $t('') }}</template>
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
...@@ -400,7 +404,7 @@ import { ...@@ -400,7 +404,7 @@ import {
getSplitList, getSplitList,
// quantitycheck, // quantitycheck,
createSplitItem, createSplitItem,
deleteSplitItem, deleteSplitItem, splitItemWorthCheck,
} from "@/api/ecw/orderHandle"; } from "@/api/ecw/orderHandle";
import {quantityRequired} from "@/api/ecw/warehouse"; import {quantityRequired} from "@/api/ecw/warehouse";
import { getTradeCityList } from "@/api/ecw/region"; import { getTradeCityList } from "@/api/ecw/region";
...@@ -472,7 +476,9 @@ export default { ...@@ -472,7 +476,9 @@ export default {
// 当前选择的入仓记录ID // 当前选择的入仓记录ID
selectedWarehouseInId: null, selectedWarehouseInId: null,
// 当前正在放入的入仓记录 // 当前正在放入的入仓记录
currentPutIn: null currentPutIn: null,
/*// 订单剩余数据
orderLeftData: null*/
}; };
}, },
created() { created() {
...@@ -515,11 +521,17 @@ export default { ...@@ -515,11 +521,17 @@ export default {
'shopForm.orderItemId'(){ 'shopForm.orderItemId'(){
// 默认取以前放入的品名 // 默认取以前放入的品名
this.shopForm.specsRecordVOList = [] this.shopForm.specsRecordVOList = []
let specsRecordVOList = this.splitData.orderSplitItemBackVOList.find(item => item.orderItemId == this.shopForm.orderItemId)?.specsRecordVOList || [] const splitItem = this.splitData.orderSplitItemBackVOList.find(item => item.orderItemId == this.shopForm.orderItemId)
let specsRecordVOList = splitItem?.specsRecordVOList || []
specsRecordVOList.forEach(item => { specsRecordVOList.forEach(item => {
const [boxGauge1, boxGauge2, boxGauge3] = item.boxGauge.split('*') const [boxGauge1, boxGauge2, boxGauge3] = item.boxGauge.split('*')
this.shopForm.specsRecordVOList.push({...item, boxGauge1, boxGauge2, boxGauge3}) this.shopForm.specsRecordVOList.push({...item, boxGauge1, boxGauge2, boxGauge3})
}) })
// 显示原来默认的收费数据
this.$set(this.shopForm, 'chargeVolume', splitItem.chargeVolume)
this.$set(this.shopForm, 'chargeWeight', splitItem.chargeWeight)
this.$set(this.shopForm, 'worth', splitItem.worth)
} }
}, },
computed: { computed: {
...@@ -641,7 +653,23 @@ export default { ...@@ -641,7 +653,23 @@ export default {
num -= item.num num -= item.num
})*/ })*/
return num return num
},
// 订单剩余可拆货值
leftWorth(){
if(!this.orderData?.costVO?.totalWorth)return 0;
let worth = new Decimal(this.orderData.costVO.totalWorth)
this.splitData.orderSplitItemBackVOList.forEach(item =>{
worth = worth.minus(item.worth || 0)
})
// 包当前选择的品名之前填写的货值包含进去
if(this.shopForm.orderItemId){
let splitItem = this.splitData.orderSplitItemBackVOList.find(item => item.orderItemId == this.shopForm.orderItemId)
if(splitItem){
worth = worth.plus(splitItem.worth || 0)
} }
}
return worth.toNumber()
},
}, },
methods: { methods: {
/*检查并提交字段(体积,重量)修改*/ /*检查并提交字段(体积,重量)修改*/
...@@ -817,6 +845,10 @@ export default { ...@@ -817,6 +845,10 @@ export default {
if(this.isQuantity){ if(this.isQuantity){
params.quantity = this.putin.quantity params.quantity = this.putin.quantity
} }
// 货值不能超过剩余货值
if(params.worth > this.leftWorth){
return this.$message.error(this.$t("货值不能超过剩余货值"));
}
createSplitItem(params).then((res) => { createSplitItem(params).then((res) => {
this.$message.success(this.$t("放入成功")); this.$message.success(this.$t("放入成功"));
this.querySplitGoods(); this.querySplitGoods();
...@@ -952,9 +984,18 @@ export default { ...@@ -952,9 +984,18 @@ export default {
const chargeWeight = orderItem.itemType === 3 ? (orderItem.chargeWeight*rate).toFixed(2) : this.putin.weight const chargeWeight = orderItem.itemType === 3 ? (orderItem.chargeWeight*rate).toFixed(2) : this.putin.weight
this.$set(this.shopForm, 'chargeVolume', chargeVolume) this.$set(this.shopForm, 'chargeVolume', chargeVolume)
this.$set(this.shopForm, 'chargeWeight', chargeWeight) this.$set(this.shopForm, 'chargeWeight', chargeWeight)
this.$set(this.shopForm, 'worth', (orderItem.worth*rate).toFixed(2))
} // 货值按照主单的总货值*订单的箱数比例
let worth = (this.orderData.costVO.totalWorth * this.putin.num / this.orderData.sumNum).toFixed(2)
this.$set(this.shopForm, 'worth', worth)
}, },
// 查询订单剩余数据
/*getOrderLeftData(){
splitItemWorthCheck(this.orderData.orderId).then(res => {
this.orderLeftData = res.data
})
}*/
}
}; };
</script> </script>
......
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
}, },
computed:{ computed:{
getCustomerList(){ getCustomerList(){
let index = this.customerList.findIndex(item => item.id !== this.recommended[0]) let index = this.customerList.findIndex(item => item.id === this.recommended[0]?.id)
if(index > -1) return this.customerList if(index > -1) return this.customerList
else return [...this.customerList,...this.recommended] else return [...this.customerList,...this.recommended]
} }
...@@ -50,7 +50,6 @@ export default { ...@@ -50,7 +50,6 @@ export default {
}, },
watch:{ watch:{
value(val){ value(val){
console.log(val,'val')
this.customer = val; this.customer = val;
if(!(this.customerList.some(i => i.id === val)) && val !== undefined){ if(!(this.customerList.some(i => i.id === val)) && val !== undefined){
getCustomerList({ids:val}).then(r => { getCustomerList({ids:val}).then(r => {
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item :label="$t('常用提货网点')" prop="remarks"> <el-form-item :label="$t('常用提货网点')" prop="remarks">
<el-select v-model="form.pickupPoint"> <el-select v-model="form.pickupPoint">
<el-option v-for="item in serviceNetworkList " :value="item.id" :label="isChinese ? item.titleZh : item.titleEn "></el-option> <el-option v-for="item in getNodeLists " :value="item.id" :label="isChinese ? item.titleZh : item.titleEn "></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -98,13 +98,13 @@ ...@@ -98,13 +98,13 @@
<el-form-item :label="$t('主营类别')" prop="productType"> <el-form-item :label="$t('主营类别')" prop="productType">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="11"> <el-col :span="11">
<el-select v-model="form.productType" :placeholder="$t('请选择产品类别')" @change="form.productId = ''"> <el-select @change="change" v-model="form.productType" :placeholder="$t('请选择产品类别')">
<el-option :label="item.titleZh" :value="item.id" v-for="(item) in productTypeList" :key="item.id"/> <el-option :label="item.titleZh" :value="item.id" v-for="(item) in productTypeList" :key="item.id"/>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-select v-model="form.productId" :placeholder="$t('请选择')"> <el-select v-model="form.productId" :placeholder="$t('请选择')">
<el-option :label="item.titleZh" :value="parseInt(item.id)" v-for="(item) in productListFilter" :key="item.id"/> <el-option :label="item.titleZh" :value="parseInt(item.id)" v-for="(item) in productList" :key="item.id"/>
</el-select> </el-select>
</el-col> </el-col>
</el-row> </el-row>
...@@ -592,19 +592,12 @@ export default { ...@@ -592,19 +592,12 @@ export default {
this.getCustomer(this.customerId).then(() => { this.getCustomer(this.customerId).then(() => {
getCustomerContactsListByCustomer({customerId: customerId}).then(r => { getCustomerContactsListByCustomer({customerId: customerId}).then(r => {
this.form.customerContacts = r.data this.form.customerContacts = r.data
let list = this.form.customerContacts.map(item => item.userid);
if(list.length >0){
memberUserList({ids:list.join(',')}).then(r=>{
this.selectMemberList = r.data
}) })
}
if(this.form.promoter){ if(this.form.promoter){
getCustomerList({ids:this.form.promoter}).then(r => { getCustomerList({ids:this.form.promoter}).then(r => {
this.recommended = r.data; this.recommended = r.data;
}) })
} }
})
// 打开重泡货开关 // 打开重泡货开关
if(this.form.weightUnit){ if(this.form.weightUnit){
this.showZhong = true this.showZhong = true
...@@ -634,14 +627,12 @@ export default { ...@@ -634,14 +627,12 @@ export default {
} }
getNodeList().then(r => { getNodeList().then(r => {
this.nodeList = r.data this.getNodeLists = r.data
}) })
getProductTypeList().then(r => { getProductTypeList().then(r => {
this.productTypeList = r.data this.productTypeList = r.data
}) })
getProductList().then(r => {
this.productList = r.data
})
getTradeCityList({type: 1}).then(r => { getTradeCityList({type: 1}).then(r => {
this.importCityList = r.data.filter(item => item.type === '1') this.importCityList = r.data.filter(item => item.type === '1')
}) })
...@@ -657,13 +648,10 @@ export default { ...@@ -657,13 +648,10 @@ export default {
getCountryListAll().then(r => { getCountryListAll().then(r => {
this.countryList = r.data this.countryList = r.data
}) })
// 获取服务网点
getServiceNetwork().then(r =>{
this.serviceNetworkList = r.data
})
}, },
data(){ data(){
return { return {
getNodeLists:[],
isCustomerServiceConfirmed:false, isCustomerServiceConfirmed:false,
getDictDatas, getDictDatas,
DICT_TYPE, DICT_TYPE,
...@@ -718,6 +706,15 @@ export default { ...@@ -718,6 +706,15 @@ export default {
}, },
methods: { methods: {
change(val){
this.form.productId = '';
this.getProductListFn(val);
},
getProductListFn(val){
getProductList({typeId:val}).then(r => {
this.productList = r.data
})
},
deleteBankData(index){ deleteBankData(index){
this.form.customerBanks.splice(index, 1); this.form.customerBanks.splice(index, 1);
}, },
...@@ -949,6 +946,11 @@ export default { ...@@ -949,6 +946,11 @@ export default {
return getCustomer(id).then(response => { return getCustomer(id).then(response => {
console.log(response,'response') console.log(response,'response')
this.form = { ...this.form, ...response.data, id: this.customerId,transportType: response.data.transportType && response.data.transportType !== '' ? response.data.transportType.split(',') : [],customerBanks:response.data.customerBankBackVOList }; this.form = { ...this.form, ...response.data, id: this.customerId,transportType: response.data.transportType && response.data.transportType !== '' ? response.data.transportType.split(',') : [],customerBanks:response.data.customerBankBackVOList };
if(this.form.productType){
console.log('1231',this.form.productType)
this.getProductListFn(this.form.productType)
}
this.open = true; this.open = true;
this.title = this.$t('修改客户'); this.title = this.$t('修改客户');
this.getZhongPao() this.getZhongPao()
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
<div> <div>
<el-button type="primary" size="small" v-has-permi="['ecw:customer:query-edit']" @click="$router.push('/customer/edit/' + id)">{{$t('编辑')}}</el-button> <el-button type="primary" size="small" v-has-permi="['ecw:customer:query-edit']" @click="$router.push('/customer/edit/' + id)">{{$t('编辑')}}</el-button>
<el-button v-has-permi="['ecw:customer:query-quoted-price']" @click="$router.push('/offer/create')" type="primary" size="small">{{$t('报价')}}</el-button> <el-button v-has-permi="['ecw:customer:query-quoted-price']" @click="$router.push('/offer/create')" type="primary" size="small">{{$t('报价')}}</el-button>
<el-button v-has-permi="['ecw:customer:query-follow-up']" type="primary" size="small" @click="$refs['customerFollow'].customerFollow.dialogVisible = true">{{$t('跟进')}}</el-button> <el-button v-has-permi="['ecw:customer:query-follow-up']" type="primary" size="small" @click="customerFollowFn('follow')">{{$t('跟进')}}</el-button>
<el-button v-has-permi="['ecw:customer:query-customer-complaint']" type="primary" size="small" @click="$refs['customerComplaint'].handleAdd()">{{$t('客诉')}}</el-button> <el-button v-has-permi="['ecw:customer:query-customer-complaint']" type="primary" size="small" @click="customerFollowFn('complain')">{{$t('客诉')}}</el-button>
<el-button v-hasPermi="['ecw:customer:query-delete']" type="danger" size="small" @click="deleteCustomerFn()">{{$t('删除')}}</el-button> <el-button v-hasPermi="['ecw:customer:query-delete']" type="danger" size="small" @click="deleteCustomerFn()">{{$t('删除')}}</el-button>
</div> </div>
</div> </div>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<el-descriptions-item :label="$t('客户等级')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}</el-descriptions-item> <el-descriptions-item :label="$t('客户等级')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}</el-descriptions-item>
<el-descriptions-item :label="$t('信用等级')">{{isChinese ? customer.creditLevelNameZh :customer.creditLevelNameEn }}</el-descriptions-item> <el-descriptions-item :label="$t('信用等级')">{{isChinese ? customer.creditLevelNameZh :customer.creditLevelNameEn }}</el-descriptions-item>
<el-descriptions-item :label="$t('国家')">{{ isChinese ? country.nameZh : country.nameEn }}</el-descriptions-item> <el-descriptions-item :label="$t('国家')">{{$l(customer,'countryName')}}{{customer.countryName}}</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('业务员')">{{ customer }}</el-descriptions-item>--> <!-- <el-descriptions-item :label="$t('业务员')">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item :label="$t('客户来源')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_SOURCE, customer.source) }}</el-descriptions-item> <el-descriptions-item :label="$t('客户来源')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_SOURCE, customer.source) }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户类别')"> <el-descriptions-item :label="$t('客户类别')">
...@@ -37,17 +37,19 @@ ...@@ -37,17 +37,19 @@
</el-descriptions-item> </el-descriptions-item>
<!-- <el-descriptions-item :label="$t('联系方式')">{{ customer }}</el-descriptions-item>--> <!-- <el-descriptions-item :label="$t('联系方式')">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item :label="$t('推介人')">{{ customer.promoterName }}</el-descriptions-item> <el-descriptions-item :label="$t('推介人')">{{ customer.promoterName }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户经理')">{{customerService }}</el-descriptions-item> <el-descriptions-item :label="$t('客户经理')">{{customer.customerServiceName }}</el-descriptions-item>
<el-descriptions-item :label="$t('公司名称')">{{ customer.company }}</el-descriptions-item> <el-descriptions-item :label="$t('公司名称')">{{ customer.company }}</el-descriptions-item>
<el-descriptions-item :label="$t('公司英文名称')">{{ customer.companyEn }}</el-descriptions-item> <el-descriptions-item :label="$t('公司英文名称')">{{ customer.companyEn }}</el-descriptions-item>
<el-descriptions-item :label="$t('联系地址')">{{ customer.address }}</el-descriptions-item> <el-descriptions-item :label="$t('联系地址')">{{ customer.address }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">{{ parseTime(customer.createTime) }}</el-descriptions-item> <el-descriptions-item :label="$t('创建时间')">{{ parseTime(customer.createTime) }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建人')">{{ customer.founderName }}</el-descriptions-item> <el-descriptions-item :label="$t('创建人')">{{ customer.founderName }}</el-descriptions-item>
<el-descriptions-item :label="$t('状态')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_STATUS, customer.status) }}</el-descriptions-item> <el-descriptions-item :label="$t('状态')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_STATUS, customer.status)}}</el-descriptions-item>
<el-descriptions-item :label="$t('主营类别')">{{ productType }}</el-descriptions-item> <el-descriptions-item :label="$t('主营类别')">{{ $l(customer,'productTypeName') }}</el-descriptions-item>
<el-descriptions-item :label="$t('常提货网点')">{{ pickupPoint }}</el-descriptions-item> <el-descriptions-item :label="$t('常提货网点')">{{ $l(customer,'pickupPointName') }}</el-descriptions-item>
<el-descriptions-item :label="$t('图片')"> <el-descriptions-item :label="$t('图片')">
<el-image v-show="!!customer.picture" :src="customer.picture" style="width: 100px;height: 100px"></el-image> <el-image v-if="customer.picture" :src="customer.picture" style="width: 100px;height: 100px">
<span slot="error">加载失败</span>
</el-image>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('备注')">{{ customer.remarks }}</el-descriptions-item> <el-descriptions-item :label="$t('备注')">{{ customer.remarks }}</el-descriptions-item>
<el-descriptions-item :label="$t('业绩类型')">{{ customer.isNew ?$t('新客户') : $t('老客户') }}</el-descriptions-item> <el-descriptions-item :label="$t('业绩类型')">{{ customer.isNew ?$t('新客户') : $t('老客户') }}</el-descriptions-item>
...@@ -92,7 +94,7 @@ ...@@ -92,7 +94,7 @@
:label="$t('联系方式')" :label="$t('联系方式')"
> >
<template v-slot="{row}"> <template v-slot="{row}">
{{ row.areaCode + row.phoneNew }} +{{ row.areaCode}} {{row.phoneNew}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -303,10 +305,10 @@ ...@@ -303,10 +305,10 @@
<pagination @pagination="getInfoListOfferPage" :page.sync="infoListOfferFrom.pageNo" :limit.sync="infoListOfferFrom.pageSize" :total="infoListOfferTotal" ></pagination> <pagination @pagination="getInfoListOfferPage" :page.sync="infoListOfferFrom.pageNo" :limit.sync="infoListOfferFrom.pageSize" :total="infoListOfferTotal" ></pagination>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="follow" :label="$t('跟进')"> <el-tab-pane name="follow" :label="$t('跟进')">
<customer-follow customerQuery ref="customerFollow" :id="id" :customer-id="id"></customer-follow> <customer-follow v-if="activeName === 'follow'" customerQuery ref="customerFollow" :id="id" :customer-id="id"></customer-follow>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="complain" :label="$t('客户投诉')"> <el-tab-pane name="complain" :label="$t('客户投诉')">
<customer-complaint ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint> <customer-complaint v-if="activeName === 'complain'" ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="bill" :label="$t('账单')"> <el-tab-pane name="bill" :label="$t('账单')">
<el-table style="width: 100%" :data="infoListReceiptList"> <el-table style="width: 100%" :data="infoListReceiptList">
...@@ -529,38 +531,31 @@ export default { ...@@ -529,38 +531,31 @@ export default {
getCreditRulePage({page:1,rows:999,type:2}).then(r => { getCreditRulePage({page:1,rows:999,type:2}).then(r => {
this.creditTypeList = r.data.list this.creditTypeList = r.data.list
}) })
getNodeList().then(r => { // getNodeList().then(r => {
this.nodeList = r.data // this.nodeList = r.data
}) // })
getCustomer(this.id).then(response => { getCustomer(this.id).then(response => {
this.customer = { ...this.customer, ...response.data } this.customer = { ...this.customer, ...response.data }
console.log( this.customer,'this.customer') console.log( this.customer,'this.customer')
getCustomerContactsListByCustomer({customerId: this.id}).then(r => { getCustomerContactsListByCustomer({customerId: this.id}).then(r => {
this.customerContacts = r.data this.customerContacts = r.data
let list = this.customerContacts.map(r => r.userid) let list = this.customerContacts.filter(r => r.userid)
memberUserList({ids:list.join(',')}).then(r => { if(list.length > 0){
memberUserList({ids:list.map(i=>i.userid).join(',')}).then(r => {
this.memberList = r.data this.memberList = r.data
}) })
}
}) })
getCountry(this.customer.country ? this.customer.country : 0 ).then(r => {
this.country = r.data
})
})
getProductTypeList().then(r => {
this.productTypeList = r.data
}) })
getCustomerSelect({pageSize:1000,pageNo:1}).then(r => { // getCustomerSelect({pageSize:1000,pageNo:1}).then(r => {
this.customerSelect = r.data.list // this.customerSelect = r.data.list
}) // })
listServiceUser().then(r => {
this.serviceUserList = r.data
})
// this.getBrankByCustomerList()//品牌授权 // this.getBrankByCustomerList()//品牌授权
this.getCustomerGrade() // this.getCustomerGrade()
// this.creditLogPage()//等级日志 // this.creditLogPage()//等级日志
this.getorderList()//订单 this.getorderList()//订单
// this.getInfoListOfferPage()//报价 // this.getInfoListOfferPage()//报价
...@@ -716,22 +711,16 @@ export default { ...@@ -716,22 +711,16 @@ export default {
isChinese(){ isChinese(){
return this.$i18n.locale === 'zh_CN' return this.$i18n.locale === 'zh_CN'
}, },
productType(){
const productType = this.productTypeList.find(p => p.id === parseInt(this.customer.productType))
return productType ? productType.titleZh : ''
},
pickupPoint(){ pickupPoint(){
const pickupPoint = this.nodeList.find(p => p.id === parseInt(this.customer.pickupPoint)) const pickupPoint = this.nodeList.find(p => p.id === parseInt(this.customer.pickupPoint))
return pickupPoint ? pickupPoint.titleZh : '' return pickupPoint ? pickupPoint.titleZh : ''
}, },
promoter() { // promoter() {
return this.customerSelect.find(e => e.id === this.customer.promoter)?.name || '' // return this.customerSelect.find(e => e.id === this.customer.promoter)?.name || ''
}, // },
customerService() {
return this.serviceUserList.find(e => e.id === this.customer.customerService)?.nickname || ''
},
id() { id() {
return this.customerId ? parseInt(this.customerId) : undefined return parseInt(this.$route.params.customerId)
}, },
creditScoreCalculation(){ creditScoreCalculation(){
return (val)=>{ return (val)=>{
...@@ -745,6 +734,16 @@ export default { ...@@ -745,6 +734,16 @@ export default {
} }
}, },
methods:{ methods:{
customerFollowFn(val){
this.activeName = val
this.$nextTick(()=>{
if(val === 'follow'){
this.$refs['customerFollow'].customerFollow.dialogVisible = true;
}else {
this.$refs['customerComplaint'].handleAdd()
}
})
},
checkPermi, checkPermi,
userIdFormatter(row, column, cellValue){ userIdFormatter(row, column, cellValue){
const member = this.memberList.find(e => e.id === cellValue) const member = this.memberList.find(e => e.id === cellValue)
......
...@@ -416,9 +416,13 @@ export default { ...@@ -416,9 +416,13 @@ export default {
this.list = response.data.list; this.list = response.data.list;
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
getCustomerList({ids:this.list.map(i => i.customerId).join(',')}).then(r => { let list = []
list = this.list.filter(i => i.customerId)
if(list.length > 0){
getCustomerList({ids:list.map(i => i.customerId).join(',')}).then(r => {
this.customerSelect = r.data this.customerSelect = r.data
}) })
}
}); });
}, },
/** 取消按钮 */ /** 取消按钮 */
......
...@@ -71,6 +71,12 @@ ...@@ -71,6 +71,12 @@
{{getOperator(row.updater)}} {{getOperator(row.updater)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="有效期" v-slot="{row}" >
{{parseTime(row.expireDate)}}
</el-table-column>
<el-table-column label="状态" v-slot="{row}" >
{{new Date(row.expireDate).getTime() >= new Date().getTime() ? '正常' : '已过期'}}
</el-table-column>
<el-table-column :label="$t('备注')" prop="note"></el-table-column> <el-table-column :label="$t('备注')" prop="note"></el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
......
This diff is collapsed.
...@@ -53,11 +53,16 @@ ...@@ -53,11 +53,16 @@
<el-table-column :label="$t('提单号')" prop="tidanNo"></el-table-column> <el-table-column :label="$t('提单号')" prop="tidanNo"></el-table-column>
<el-table-column :label="$t('备注')" prop="remarks"></el-table-column> <el-table-column :label="$t('备注')" prop="remarks"></el-table-column>
<el-table-column :label="$t('操作人')" prop="operator"></el-table-column> <el-table-column :label="$t('操作人')" prop="operator"></el-table-column>
<el-table-column :label="$t('日期')" prop="createTime"> <el-table-column :label="$t('放货日期')" prop="createTime">
<template slot-scope="{row}"> <template slot-scope="{row}">
{{row.createTime|parseTime}} {{row.createTime|parseTime}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('复核日期')" prop="createTime">
<template slot-scope="{row}">
{{row.checkTime|parseTime}}
</template>
</el-table-column>
<el-table-column :label="$t('状态')" prop="status"> <el-table-column :label="$t('状态')" prop="status">
<template slot-scope="{row}"> <template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_RELEASE_STATUS" :value="row.status" /> <dict-tag :type="DICT_TYPE.ECW_RELEASE_STATUS" :value="row.status" />
......
...@@ -32,11 +32,20 @@ ...@@ -32,11 +32,20 @@
</el-descriptions-item> </el-descriptions-item>
<!-- 取消放货 --> <!-- 取消放货 -->
<el-descriptions-item :label="$t('申请原因')" v-if="applyType == 10"> <el-descriptions-item :label="$t('申请原因')" v-if="applyType == 10" :span="2">
<dict-tag :type="DICT_TYPE.ECW_CANCEL_PICK_TYPE" :value="detail.cancelPickType" /> <dict-tag :type="DICT_TYPE.ECW_CANCEL_PICK_TYPE" :value="detail.cancelPickType" />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item v-if="voucherList.length" :label="$t('凭证')" :span="3">
<div v-for="(item, index) in voucherList" :key="index" style="padding:5px">
<video v-if="isVideo(item)" :src="item" @click="playVideo(item)" style="width: 100px; height: 100px;"></video>
<el-image v-else :src="item" style="width: 100px; height: 100px;" :preview-src-list="voucherImages"></el-image>
</div>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-dialog :visible="!!videoUrl" :before-close="closeVideoPlayer">
<video v-if="!!videoUrl" :src="videoUrl" style="width: 500px; height: 500px" controls></video>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -44,7 +53,9 @@ import {getPickUpdateApproveInfo} from '@/api/ecw/orderCargoControl' ...@@ -44,7 +53,9 @@ import {getPickUpdateApproveInfo} from '@/api/ecw/orderCargoControl'
import {getOrder} from '@/api/ecw/order' import {getOrder} from '@/api/ecw/order'
import {getChannelListByIds} from '@/api/ecw/channel' import {getChannelListByIds} from '@/api/ecw/channel'
import {parseTime} from '@/utils/ruoyi' import {parseTime} from '@/utils/ruoyi'
import Template from "@/views/cms/template/index.vue";
export default { export default {
components: {Template},
filters: {parseTime}, filters: {parseTime},
props:{ props:{
id: [String, Number], id: [String, Number],
...@@ -55,7 +66,8 @@ export default { ...@@ -55,7 +66,8 @@ export default {
detail: null, detail: null,
order: null, order: null,
channels: [], channels: [],
channelName: '/' channelName: '/',
videoUrl: null
} }
}, },
watch:{ watch:{
...@@ -74,6 +86,23 @@ export default { ...@@ -74,6 +86,23 @@ export default {
let channel = this.channels.find(item => item.channelId == id) let channel = this.channels.find(item => item.channelId == id)
return channel ? channel.nameZh : '/' return channel ? channel.nameZh : '/'
} }
},
// 凭证
voucherList(){
if(!this.detail || !this.detail.voucher) return []
return this.detail.voucher.split(',')
},
// 图片类型的凭证
voucherImages(){
return this.voucherList.filter(item => {
return !this.isVideo(item)
})
},
// 判断是否是视频链接
isVideo(){
return (url) => {
return ['mp4'].indexOf(url.split('.').pop().toLowerCase()) > -1
}
} }
}, },
created(){ created(){
...@@ -97,6 +126,15 @@ export default { ...@@ -97,6 +126,15 @@ export default {
this.channelName = this.$l(res.data, 'name') this.channelName = this.$l(res.data, 'name')
}) })
}, },
// 播放视频
playVideo(url){
console.log('play video', url)
this.videoUrl = url
},
// 关闭视频播放器
closeVideoPlayer(){
this.videoUrl = null
}
} }
} }
</script> </script>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</template> </template>
<script> <script>
import {sendSmsCode} from '@/api/ecw/orderCargoControl' import {sendSmsCode} from '@/api/ecw/orderCargoControl'
const timeout = null let timeout = null
export default { export default {
props:{ props:{
orderId: [String, Number], orderId: [String, Number],
......
...@@ -397,6 +397,9 @@ export default { ...@@ -397,6 +397,9 @@ export default {
if(this.splitTotal('weight') > this.leftData('weight')){ if(this.splitTotal('weight') > this.leftData('weight')){
return this.$message.error("拆出重量不能大于剩余重量") return this.$message.error("拆出重量不能大于剩余重量")
} }
if(this.splitTotal('quantity') > this.leftData('quantity')){
return this.$message.error("拆出数量不能大于剩余数量")
}
// 如果全拆(拆出箱数 == 原入仓箱数),则体积重量也需要全拆 // 如果全拆(拆出箱数 == 原入仓箱数),则体积重量也需要全拆
if(this.splitTotal('num') === this.warehouseRecord.cartonsNum){ if(this.splitTotal('num') === this.warehouseRecord.cartonsNum){
if(this.splitTotal('volume') !== this.warehouseRecord.volume){ if(this.splitTotal('volume') !== this.warehouseRecord.volume){
......
This diff is collapsed.
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