Commit 567bf206 authored by Administrator's avatar Administrator

Merge branch 'pre-release' into 'jd_dev'

Pre Release最新代码合并入捷道研发分支20241119

See merge request !99
parents ca65a30e 2192026f
...@@ -127,7 +127,7 @@ export function getCostList(params) { ...@@ -127,7 +127,7 @@ export function getCostList(params) {
}); });
} }
// 收款单表 SELECT * from ecw_payment // 收款单表 SELECT * from ecw_payment
// 应付款表 SELECT * from ecw_payable // 应付款表 SELECT * from ecw_payable
// 根据明细获取主表ID // 根据明细获取主表ID
export function getPaymentId(id) { export function getPaymentId(id) {
return request({ return request({
...@@ -214,6 +214,13 @@ export function deleteBillService(id) { ...@@ -214,6 +214,13 @@ export function deleteBillService(id) {
method: "delete", method: "delete",
}); });
} }
// 检查提单状态是否已制作提单
export function checkBillOfLadingService(orderId) {
return request({
url: "/shipment/make-bill-of-lading/check/billOfLading/" + orderId,
method: "post",
});
}
// 获得制作提货单 // 获得制作提货单
export function getBillService(params) { export function getBillService(params) {
......
...@@ -60,13 +60,22 @@ export function exportCustomerFollowExcel(query) { ...@@ -60,13 +60,22 @@ export function exportCustomerFollowExcel(query) {
}) })
} }
export function getCustomerFollowList(params) { // 跟进分页列表
export function getCustomerFollowupList(params) {
return request({ return request({
url: "/customer/followup/page", url: "/customer/followup/page",
method: "get", method: "get",
params params
}) })
} }
// 数据权限跟进分页列表
export function getDataSpaceCustomerFollowupList(params) {
return request({
url: "/customer/followup/data/space/page",
method: "get",
params
})
}
export function getCustomerFollowDetail(params) { export function getCustomerFollowDetail(params) {
return request({ return request({
...@@ -99,7 +108,7 @@ export function updateCustomerFollowupStatus(data) { ...@@ -99,7 +108,7 @@ export function updateCustomerFollowupStatus(data) {
}) })
} }
export function exportCustomerFollow(params) { export function exportCustomerFollowup(params) {
return request({ return request({
url: "/customer/followup/export-excel", url: "/customer/followup/export-excel",
method: "get", method: "get",
...@@ -107,6 +116,16 @@ export function exportCustomerFollow(params) { ...@@ -107,6 +116,16 @@ export function exportCustomerFollow(params) {
}) })
} }
// 数据权限导出跟进 Excel
export function exportDataSpaceCustomerFollowup(query) {
return request({
url: "/customer/followup/data/space/export-excel",
method: "get",
params: query,
responseType: "blob"
})
}
export function getFollowupNewNumber() { export function getFollowupNewNumber() {
return request({ return request({
url: "/customer/followup/getFollowupNewNumber", url: "/customer/followup/getFollowupNewNumber",
......
<template> <template>
<div> <div>
<div class="filters mb-10" v-if="showFilter"> <div class="filters mb-10" v-if="showFilter">
<template v-if="!type"> <template v-if="!type">
{{$t('运输方式')}} {{ $t('运输方式') }}
<dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')" :filter="transportFilter" style="width:150px" /> <dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')"
</template> :filter="transportFilter" style="width:150px"/>
{{$t('始发地')}}: </template>
<el-select :placeholder="$t('请选择始发地')" v-model="exportCity" clearable> {{ $t('始发地') }}:
<el-option v-for="item in exportCityList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-select :placeholder="$t('请选择始发地')" v-model="exportCity" clearable>
</el-select> <el-option v-for="item in exportCityList" :key="item.id" :label="item.titleZh" :value="item.id"/>
</el-select>
{{$t('目的国')}}: {{ $t('目的国') }}:
<el-select :placeholder="$t('请选择目的国')" <el-select :placeholder="$t('请选择目的国')"
v-model="destCountryIds" v-model="destCountryIds"
multiple multiple
clearable> clearable>
<el-option v-for="item in countryList" :key="item.id" :label="$l(item, 'title')" :value="item.id" /> <el-option v-for="item in countryList" :key="item.id" :label="$l(item, 'title')" :value="item.id"/>
</el-select> </el-select>
{{$t('目的城市')}}: {{ $t('目的城市') }}:
<!-- <!--
<el-select :placeholder="$t('请选择目的地')" v-model="importCity" clearable> <el-select :placeholder="$t('请选择目的地')" v-model="importCity" clearable>
<el-option v-for="item in importCityList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in importCityList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select> </el-select>
--> -->
<el-select :placeholder="$t('请选择目的城市')" <el-select :placeholder="$t('请选择目的城市')"
v-model="destCityIds" v-model="destCityIds"
multiple multiple
clearable> clearable>
<el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi" /> <el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi"/>
</el-select> </el-select>
{{$t('目的仓')}}: {{ $t('目的仓') }}:
<el-select :placeholder="$t('请选择目的仓')" <el-select :placeholder="$t('请选择目的仓')"
v-model="destWarehouseIds" v-model="destWarehouseIds"
multiple multiple
clearable> clearable>
<el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"/>
</el-select> </el-select>
<template v-if="type != 'sea'"> <template v-if="type != 'sea'">
{{$t('出货渠道')}}: {{ $t('出货渠道') }}:
<el-select :placeholder="$t('请选择出货渠道')" v-model="channelId" clearable> <el-select :placeholder="$t('请选择出货渠道')" v-model="channelId" clearable>
<el-option v-for="item in channelList" :key="item.channelId" :label="item.nameZh" :value="item.channelId" /> <el-option v-for="item in channelList" :key="item.channelId" :label="item.nameZh" :value="item.channelId"/>
</el-select> </el-select>
</template> </template>
</div>
<div class="mb-10 flex-row" v-if="showFilter">
<el-radio-group v-model="checkAll">
<el-radio :label="true">{{$t('全选')}}</el-radio>
<el-radio :label="false">{{$t('全不选')}}</el-radio>
</el-radio-group>
<el-link class="ml-20" type="danger">{{$t('已选择{n}条路线', {n: selectedRoutes.length})}}</el-link>
</div>
<el-row class="" :gutter="10">
<template v-for="(item, index) in filteredRouterList">
<el-col :span="12" :key="item.value">
<el-card class="mb-10">
<div slot="header">
{{$l(item, 'label')}}
<el-link type="primary" @click.native="toggleHide(item.value)" style="float:right">{{item._hide ? $t('展开') : $t('折叠')}}</el-link>
</div>
<!--table需要给一个key,否则全选的时候不会自动更新渲染-->
<el-table v-if="!hideMap[item.value]" :data="item.routerList" :span-method="SpanMethod" border :key="item.value">
<el-table-column :label="$t('始发仓')" prop="startTitleZh">
<template slot-scope="{row}">
{{$l(row, 'startTitle')}}
</template>
</el-table-column>
<el-table-column :label="$t('目的仓')" prop="destTitleZh" >
<template slot-scope="{row}">
{{$l(row, 'destTitle')}}
</template>
</el-table-column>
<el-table-column :label="$t('渠道')" prop="startTitleZh" v-if="[3,4].indexOf(+item.value) > -1">
<template slot-scope="{row}">
{{$l(row.channel, 'name')}}
</template>
</el-table-column>
<el-table-column v-if="showAttr" :label="$t('商品特性')" prop="startTitleZh">
<template slot-scope="{row}">
<!--{{ getAttrNames(row.attrId) }}-->
<template v-if="row.channel && row.channel.attrNameList">
{{row.channel.attrNameList.join(',')}}
</template>
</template>
</el-table-column>
<el-table-column :label="$t('操作')" prop="">
<template slot="header">
<el-checkbox @change="toggleGroupChecker(index, $event)" v-model="groupChecker[item.value]"></el-checkbox>
</template>
<template slot-scope="{row}">
<!--给一个Key让他在全选后更新渲染-->
<el-checkbox :key="getSelectedIndex(row)" :checked="getSelectedIndex(row) > -1" @change="toggleChecker(row, $event)"></el-checkbox>
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
</template>
</el-row>
</div> </div>
<div class="mb-10 flex-row" v-if="showFilter">
<el-radio-group v-model="checkAll">
<el-radio :label="true">{{ $t('全选') }}</el-radio>
<el-radio :label="false">{{ $t('全不选') }}</el-radio>
</el-radio-group>
<el-link class="ml-20" type="danger">{{ $t('已选择{n}条路线', {n: selectedRoutes.length}) }}</el-link>
</div>
<el-row class="" :gutter="10">
<template v-for="(item, index) in filteredRouterList">
<el-col :span="12" :key="item.value">
<el-card class="mb-10">
<div slot="header">
{{ $l(item, 'label') }}
<el-link type="primary" @click.native="toggleHide(item.value)" style="float:right">
{{ item._hide ? $t('展开') : $t('折叠') }}
</el-link>
</div>
<!--table需要给一个key,否则全选的时候不会自动更新渲染-->
<el-table v-if="!hideMap[item.value]" :data="item.routerList" :span-method="SpanMethod" border
:key="item.value">
<el-table-column :label="$t('始发仓')" prop="startTitleZh">
<template slot-scope="{row}">
{{ $l(row, 'startTitle') }}
</template>
</el-table-column>
<el-table-column :label="$t('目的仓')" prop="destTitleZh">
<template slot-scope="{row}">
{{ $l(row, 'destTitle') }}
</template>
</el-table-column>
<el-table-column :label="$t('渠道')" prop="startTitleZh" v-if="[3,4].indexOf(+item.value) > -1">
<template slot-scope="{row}">
{{ $l(row.channel, 'name') }}
</template>
</el-table-column>
<el-table-column v-if="showAttr" :label="$t('商品特性')" prop="startTitleZh">
<template slot-scope="{row}">
<!--{{ getAttrNames(row.attrId) }}-->
<template v-if="row.channel && row.channel.attrNameList">
{{ row.channel.attrNameList.join(',') }}
</template>
</template>
</el-table-column>
<el-table-column :label="$t('操作')" prop="">
<template slot="header">
<el-checkbox @change="toggleGroupChecker(index, $event)"
v-model="groupChecker[item.value]"></el-checkbox>
</template>
<template slot-scope="{row}">
<!--给一个Key让他在全选后更新渲染-->
<el-checkbox :key="getSelectedIndex(row)" :checked="getSelectedIndex(row) > -1"
@change="toggleChecker(row, $event)"></el-checkbox>
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
</template>
</el-row>
</div>
</template> </template>
<script> <script>
import {getChannelList} from '@/api/ecw/channel' import {getChannelList} from '@/api/ecw/channel'
...@@ -110,437 +116,440 @@ import {getRegionList} from "@/api/ecw/order"; ...@@ -110,437 +116,440 @@ import {getRegionList} from "@/api/ecw/order";
import {openedRouterList} from '@/api/ecw/warehouse' import {openedRouterList} from '@/api/ecw/warehouse'
import {getProductAttrList} from "@/api/ecw/productAttr"; import {getProductAttrList} from "@/api/ecw/productAttr";
import Template from "@/views/cms/template"; import Template from "@/views/cms/template";
export default { export default {
components: {Template}, components: {Template},
props:{ props: {
value: { value: {
type: Array type: Array
},
option: Object,
// 类型,sea海运,air空运
type: String,
showFilter:{
type: Boolean,
default: true
}
}, },
data(){ option: Object,
return { // 类型,sea海运,air空运
transportTypeDicts: this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE), type: String,
channelList:[], showFilter: {
tradeCityList:[], type: Boolean,
openedRouterList:[], // 开放路线 default: true
transportType: null, // 运输方式 }
importCity: null, // 目的地(进口城市) },
exportCity: null, // 始发地(出口城市) data() {
channelId: null, return {
selectedRoutes: [], // 勾选的路线渠道 transportTypeDicts: this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE),
hideMap: {}, // 折叠状态 channelList: [],
checkAll: null, tradeCityList: [],
groupChecker: {}, // 分组全选状态 openedRouterList: [], // 开放路线
attrList:[], // 商品特性 transportType: null, // 运输方式
inited: false, importCity: null, // 目的地(进口城市)
countryList: [], //目的国 exportCity: null, // 始发地(出口城市)
AddressCity: [], //目的地 channelId: null,
AddressTown: [], //目的仓 selectedRoutes: [], // 勾选的路线渠道
destCountryIds: null, hideMap: {}, // 折叠状态
destCityIds: null, checkAll: null,
destWarehouseIds: null, groupChecker: {}, // 分组全选状态
attrList: [], // 商品特性
inited: false,
countryList: [], //目的国
AddressCity: [], //目的地
AddressTown: [], //目的仓
destCountryId: null,
destCityId: null,
destWarehouseId: null,
destCountryIds: [],
destCityIds: [],
destWarehouseIds: [],
} }
},
computed: {
importCityList() {
return this.tradeCityList.filter(item => item.type == 1 || item.type == 3)
}, },
computed:{ exportCityList() {
importCityList(){ //字典:贸易类型字典region_trade_type,0非进出口,1进口,2出口,3进出口
return this.tradeCityList.filter(item => item.type == 1 || item.type == 3) return this.tradeCityList.filter(item => item.type == 2 || item.type == 3)
}, },
exportCityList(){ exportCityIds() {
//字典:贸易类型字典region_trade_type,0非进出口,1进口,2出口,3进出口 let ids = []
return this.tradeCityList.filter(item => item.type == 2 || item.type == 3) this.exportCityList.forEach(item => {
}, ids.push(item.id)
exportCityIds(){ })
let ids = [] return ids
this.exportCityList.forEach(item => { },
ids.push(item.id) importCityIds() {
}) let ids = []
return ids this.importCityList.forEach(item => {
}, ids.push(item.id)
importCityIds(){ })
let ids = [] return ids
this.importCityList.forEach(item => { },
ids.push(item.id) // 根据选择的渠道筛选
}) availChannelList() {
return ids return this.channelList.filter(item => !this.channelId || this.channelId == item.channelId)
}, },
// 根据选择的渠道筛选 filteredRouterList() {
availChannelList(){ let transportTypeList = []
return this.channelList.filter(item => !this.channelId || this.channelId == item.channelId) this.transportTypeDicts
}, .filter(this.transportFilter)
filteredRouterList(){ .filter(transport => !this.channelId || transport.cssClass == 'channel')
let transportTypeList = [] .forEach(item => {
this.transportTypeDicts if (this.transportType === null || this.transportType == '' || this.transportType == item.value) {
.filter(this.transportFilter) let routerList = []
.filter(transport => !this.channelId || transport.cssClass == 'channel') this.openedRouterList.forEach(router => {
.forEach(item => { if (router.transportType == item.value) {
if(this.transportType === null || this.transportType == '' || this.transportType == item.value){ let availChannels = []
let routerList = [] // 空运相关的,没有可用的渠道则不显示线路
this.openedRouterList.forEach(router => { if (item.cssClass === 'channel') {
if(router.transportType == item.value){ availChannels = this.availChannelList.filter(channel => channel.countryId == router.destCountryId)
let availChannels = [] if (!availChannels.length) return
// 空运相关的,没有可用的渠道则不显示线路 }
if(item.cssClass === 'channel'){
availChannels = this.availChannelList.filter(channel => channel.countryId == router.destCountryId)
if(!availChannels.length) return
}
routerList.push(Object.assign({ routerList.push(Object.assign({
_merge: item.cssClass == 'channel' ? availChannels.length || 1 : 1, _merge: item.cssClass == 'channel' ? availChannels.length || 1 : 1,
channel: item.cssClass == 'channel' ? availChannels[0] || { channelId: 0} : {channelId: 0}, channel: item.cssClass == 'channel' ? availChannels[0] || {channelId: 0} : {channelId: 0},
}, router) }, router)
) )
// 字典的cssClass =channel则表示渠道相关(空运,海空联运) // 字典的cssClass =channel则表示渠道相关(空运,海空联运)
if(item.cssClass == 'channel'){ if (item.cssClass == 'channel') {
availChannels.slice(1).forEach(channel => { availChannels.slice(1).forEach(channel => {
routerList.push(Object.assign({channel, _merge: 0}, router)) routerList.push(Object.assign({channel, _merge: 0}, router))
}) })
} }
} }
}) })
let child = { let child = {
label: item.label, label: item.label,
labelEn: item.labelEn, labelEn: item.labelEn,
value: item.value, value: item.value,
_hide: false, // 是否折叠 _hide: false, // 是否折叠
routerList: routerList routerList: routerList
} }
transportTypeList.push(child) transportTypeList.push(child)
}
})
console.log(transportTypeList)
return transportTypeList
},
// 是否显示商品特性(渠道)
showAttr(){
return this.type == 'air'
},
// 显示产品特性
getAttrName(){
return (id) => {
let item = this.attrList.find(item => item.id === +id)
if(!item) return ''
return this.$l(item, 'attrName')
}
},
// 显示多个商品特性
getAttrNames(){
return (ids) => {
if(!ids) return ''
return ids.split(',').filter( item => !!item).map(id => this.getAttrName(id)).join(',')
} }
})
console.log(transportTypeList)
return transportTypeList
},
// 是否显示商品特性(渠道)
showAttr() {
return this.type == 'air'
},
// 显示产品特性
getAttrName() {
return (id) => {
let item = this.attrList.find(item => item.id === +id)
if (!item) return ''
return this.$l(item, 'attrName')
}
},
// 显示多个商品特性
getAttrNames() {
return (ids) => {
if (!ids) return ''
return ids.split(',').filter(item => !!item).map(id => this.getAttrName(id)).join(',')
}
}
},
watch: {
exportCity() {
this.getOpenedRouterList()
},
/*importCity(){
this.getChannelList()
this.getOpenedRouterList()
},*/
selectedRoutes(val) {
this.$emit('input', val)
// 如果选择发生变化
let total = 0
this.filteredRouterList.forEach(item => {
total += item.routerList.length
})
if (total != val.length && val.length) {
this.checkAll = null
}
},
value(val) {
this.selectedRoutes = val || []
},
checkAll(val) {
if (val === true || val === false) {
console.log('选中全部')
this.filteredRouterList.forEach(item => {
item.routerList.forEach(router => {
if (this.getSelectedIndex(router) > -1 != val) this.toggleChecker(router, val)
})
})
}
},
option(option) {
if (option) {
this.changeOption()
}
},
// 显示的路线发生变化之后,清空已勾选的路线
filteredRouterList() {
if (this.inited) {
this.selectedRoutes = []
Object.keys(this.groupChecker).forEach(key => {
this.groupChecker[key] = false
})
}
},
destCountryIds: {
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep: true, //深度监听
handler() {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = [];
this.AddressTown = [];
this.destWarehouseIds = "";
this.destCityIds = "";
this.findByprovinceCode();
if (this.destCountryIds && this.destCountryIds.length > 0) {
//1 是所有区域,2 国家,3是市,
this.getAddressCity()
this.getAddressTown()
} else if (
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.size() > 0
) {
this.getAddressTown()
} }
this.getOpenedRouterList()
},
}, },
watch:{ destCityIds: {
exportCity(){ deep: true, //深度监听 目的仓
this.getOpenedRouterList() handler() {
}, this.AddressTown = [];
/*importCity(){ this.destWarehouseIds = "";
this.getChannelList() this.findBycityCode();
this.getOpenedRouterList() if (
},*/ this.destCountryIds && this.destCountryIds.length > 0 &&
selectedRoutes(val){ this.destCityIds && this.destCityIds.length > 0 &&
this.$emit('input', val) this.destWarehouseIds && this.destWarehouseIds.length > 0
// 如果选择发生变化 ) {
let total = 0 //获取当前城市值id,获取该城市下区域
this.filteredRouterList.forEach(item => {
total += item.routerList.length
})
if(total != val.length && val.length){
this.checkAll = null
}
},
value(val){
this.selectedRoutes = val || []
},
checkAll(val){
if(val === true || val === false){
console.log('选中全部')
this.filteredRouterList.forEach(item => {
item.routerList.forEach(router => {
if(this.getSelectedIndex(router) > -1 != val )this.toggleChecker(router, val)
})
})
}
},
option(option){
if(option){
this.changeOption()
}
},
// 显示的路线发生变化之后,清空已勾选的路线
filteredRouterList(){
if(this.inited){
this.selectedRoutes = []
Object.keys(this.groupChecker).forEach(key => {
this.groupChecker[key] = false
})
}
},
destCountryId: {
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep: true, //深度监听
handler() {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = [];
this.AddressTown = [];
this.destWarehouseIds = "";
this.destCityIds = "";
this.findByprovinceCode();
if (this.destCountryIds == "") {
//1 是所有区域,2 国家,3是市,
this.getAddressCity()
this.getAddressTown()
} else if (
this.destCountryIds != "" &&
this.destCityIds == "" &&
this.destWarehouseIds == ""
) {
this.getAddressTown()
}
this.getOpenedRouterList()
},
},
destCityId: {
deep: true, //深度监听 目的仓
handler() {
this.AddressTown = [];
this.destWarehouseIds = "";
this.findBycityCode();
if (
this.destCityIds != "" &&
this.destCountryIds != "" &&
this.destWarehouseIds == ""
) {
//获取当前城市值id,获取该城市下区域
} else if ( } else if (
this.destCountryIds == "" && this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds == "" && this.destCityIds && this.destCityIds.length > 0 &&
this.destWarehouseIds == "" this.destWarehouseIds && this.destWarehouseIds.length > 0
) { ) {
this.getAddressTown() this.getAddressTown()
} else if ( } else if (
this.destCountryIds != "" && this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds == "" && this.destCityIds && this.destCityIds.length > 0
this.destWarehouseIds == "" ) {
) { this.findByprovinceCode()
this.findByprovinceCode() this.getAddressTown()
this.getAddressTown() } else if (
} else if ( this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCountryIds == "" && this.destCityIds && this.destCityIds.length > 0 &&
this.destCityIds != "" && this.destWarehouseIds && this.destWarehouseIds.length > 0
this.destWarehouseIds == "" ) {
) { //获取当前城市值id,获取该城市下区域
//获取当前城市值id,获取该城市下区域
}
this.getOpenedRouterList()
this.getChannelList()
},
},
destWarehouseId: {
deep: true, //深度监听
handler() {
if (
this.destCountryIds != "" &&
this.destCityIds != "" &&
this.destWarehouseIds == ""
) {
//获取当前城市值id,获取该城市下区域
this.findBycityCode()
} else if (
this.destCountryIds != "" &&
this.destCityIds == "" &&
this.destWarehouseIds == ""
) {
this.getAddressTown()
} else if (
this.destCountryIds == "" &&
this.destCityIds != "" &&
this.destWarehouseIds == ""
) {
this.findBycityCode()
}
this.getOpenedRouterList()
},
},
},
async created(){
this.tradeCityList = (await getTradeCityList()).data
// 路线需要过滤失效的进出口城市,所以在程序加载后再加载路线
await this.getOpenedRouterList()
if(this.option){
this.changeOption()
} }
await this.$nextTick() this.getOpenedRouterList()
this.getCountryList()
this.getAddressCity()
this.getAddressTown()
this.getChannelList() this.getChannelList()
if(this.value && this.value.length){ },
this.selectedRoutes = this.value },
destWarehouseIds: {
deep: true, //深度监听
handler() {
if (
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.length > 0 &&
this.destWarehouseIds && this.destWarehouseIds.length > 0
) {
//获取当前城市值id,获取该城市下区域
this.findBycityCode()
} else if (
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.length > 0 &&
this.destWarehouseIds && this.destWarehouseIds.length > 0
) {
this.getAddressTown()
} else if (
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.length > 0 &&
this.destWarehouseIds && this.destWarehouseIds.length > 0
) {
this.findBycityCode()
} }
this.getOpenedRouterList()
},
},
},
async created() {
this.tradeCityList = (await getTradeCityList()).data
// 路线需要过滤失效的进出口城市,所以在程序加载后再加载路线
await this.getOpenedRouterList()
if (this.option) {
this.changeOption()
}
await this.$nextTick()
this.getCountryList()
this.getAddressCity()
this.getAddressTown()
this.getChannelList()
if (this.value && this.value.length) {
this.selectedRoutes = this.value
}
// 如果显示特性,则需要查询特数据备用 // 如果显示特性,则需要查询特数据备用
if(this.showAttr){ if (this.showAttr) {
this.getAttrList() this.getAttrList()
} }
await this.$nextTick() await this.$nextTick()
this.inited = true this.inited = true
}, },
methods:{ methods: {
getChannelList(){ getChannelList() {
if (this.type == 'sea') return if (this.type == 'sea') return
let query = { let query = {
// cityId: this.importCity // cityId: this.importCity
cityId: this.destCityIds cityId: this.destCityIds
} }
getChannelList(query).then(res => { getChannelList(query).then(res => {
this.channelList = res.data this.channelList = res.data
}) })
}, },
getAttrList(){ getAttrList() {
getProductAttrList().then(res => { getProductAttrList().then(res => {
this.attrList = res.data this.attrList = res.data
}) })
}, },
changeOption(){ changeOption() {
if(!this.option) return if (!this.option) return
this.destCountryIds = +this.option.destCountryId || null console.log("线路信息", this.option)
this.destCityIds = +this.option.destCityId || null this.destCountryId = +this.option.destCountryId || null
this.destWarehouseIds = +this.option.destWarehouseId || null this.destCityId = +this.option.destCityId || null
// this.importCity = +this.option.importCity || null this.destWarehouseId = +this.option.destWarehouseId || null
this.exportCity = +this.option.exportCity || null // this.importCity = +this.option.importCity || null
this.transportType = this.option.transportId || null this.exportCity = +this.option.exportCity || null
this.channelId = +this.option.channelId || null this.transportType = this.option.transportId || null
}, this.channelId = +this.option.channelId || null
// 全选、全不选 某个运输方式所有线路 },
toggleGroupChecker(index, selected){ // 全选、全不选 某个运输方式所有线路
let routerList = this.filteredRouterList[index].routerList toggleGroupChecker(index, selected) {
console.log(routerList.length, selected) let routerList = this.filteredRouterList[index].routerList
routerList.forEach(router => { console.log(routerList.length, selected)
this.toggleChecker(router, selected) routerList.forEach(router => {
}) this.toggleChecker(router, selected)
}, })
async getOpenedRouterList(){ },
let params = {} async getOpenedRouterList() {
if(this.exportCity){ let params = {}
params.startCityId = this.exportCity if (this.exportCity) {
} params.startCityId = this.exportCity
if(this.destCountryIds){ }
params.destCountryIds = this.destCountryId if (this.destCountryIds) {
} params.destCountryIds = this.destCountryId
if(this.destCityIds){ }
params.destCityIds = this.destCityIds if (this.destCityIds) {
} params.destCityIds = this.destCityIds
if(this.destWarehouseIds){ }
params.destWarehouseIds = this.destWarehouseIds if (this.destWarehouseIds) {
} params.destWarehouseIds = this.destWarehouseIds
const res = await openedRouterList(params) }
this.openedRouterList = res.data.filter(item => { const res = await openedRouterList(params)
return this.exportCityIds.indexOf(item.startCityId) > -1 && this.importCityIds.indexOf(item.destCityId) > -1 this.openedRouterList = res.data.filter(item => {
}) return this.exportCityIds.indexOf(item.startCityId) > -1 && this.importCityIds.indexOf(item.destCityId) > -1
}, })
// 切换路线选择 },
toggleChecker(router, selected){ // 切换路线选择
// this.getSelectedIndex(router) toggleChecker(router, selected) {
/* this.selectedRoutes.forEach((item, i)=>{ // this.getSelectedIndex(router)
if(item.lineId == router.id && item.shippingChannelId == item.channel.id){ /* this.selectedRoutes.forEach((item, i)=>{
index = i if(item.lineId == router.id && item.shippingChannelId == item.channel.id){
break index = i
} break
}) */ }
if(selected){ }) */
// 先判断是否已勾选 if (selected) {
if(this.getSelectedIndex(router) > -1) return // 先判断是否已勾选
this.selectedRoutes.push({ if (this.getSelectedIndex(router) > -1) return
lineId: router.id, this.selectedRoutes.push({
shippingChannelId: router.channel.channelId, lineId: router.id,
transportId: router.transportType shippingChannelId: router.channel.channelId,
}) transportId: router.transportType
}else{ })
let index = this.getSelectedIndex(router) } else {
if(index > -1){ let index = this.getSelectedIndex(router)
this.selectedRoutes.splice(index, 1) if (index > -1) {
} this.selectedRoutes.splice(index, 1)
}
} }
}, },
getSelectedIndex(router){ getSelectedIndex(router) {
return this.selectedRoutes.findIndex(item => { return this.selectedRoutes.findIndex(item => {
return item.lineId == router.id && item.shippingChannelId == router.channel.channelId return item.lineId == router.id && item.shippingChannelId == router.channel.channelId
}) })
}, },
SpanMethod({ row, column, rowIndex, columnIndex }){ SpanMethod({row, column, rowIndex, columnIndex}) {
if (columnIndex < 2 ) { if (columnIndex < 2) {
return { return {
rowspan: row._merge, rowspan: row._merge,
colspan: 1 colspan: 1
} }
} }
return { return {
rowspan: 1, rowspan: 1,
colspan: 1 colspan: 1
} }
}, },
// 折叠,展开 // 折叠,展开
toggleHide(value){ toggleHide(value) {
this.$set(this.hideMap, value, !this.hideMap[value]) this.$set(this.hideMap, value, !this.hideMap[value])
}, },
// 运输方式筛选 // 运输方式筛选
transportFilter(item){ transportFilter(item) {
// 未指定类型则全部可用 // 未指定类型则全部可用
if(!this.type) return true if (!this.type) return true
return (this.type == 'sea' ? ['1','2'] : ['3', '4']).indexOf(item.value) > -1 return (this.type == 'sea' ? ['1', '2'] : ['3', '4']).indexOf(item.value) > -1
}, },
/* 国家 */ /* 国家 */
getCountryList() { getCountryList() {
getListTree({ treeType: 1 }).then((response) => { getListTree({treeType: 1}).then((response) => {
this.countryList = response.data; this.countryList = response.data;
}) })
}, },
getAddressCity() { getAddressCity() {
getRegionList(4, 4).then(({ data }) => { getRegionList(4, 4).then(({data}) => {
this.AddressCity = data; this.AddressCity = data;
}) })
}, },
getAddressTown() { getAddressTown() {
getRegionList(5, 5).then(({ data }) => { getRegionList(5, 5).then(({data}) => {
this.AddressTown = data; this.AddressTown = data;
}) })
}, },
findByprovinceCode() { findByprovinceCode() {
if (this.destCountryIds != null && this.destCountryIds != '') { if (this.destCountryIds != null && this.destCountryIds.length > 0) {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode //获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryIds).then(({ data }) => { getRegionList(2, this.destCountryIds).then(({data}) => {
this.AddressCity = data; this.AddressCity = data;
}) })
} }
}, },
findBycityCode() { findBycityCode() {
if (this.destCityIds != null && this.destCityIds != '') { if (this.destCityIds != null && this.destCityIds.length > 0) {
//获取当前城市值id,获取该城市下区域 //获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityIds).then(({ data }) => { getRegionList(3, this.destCityIds).then(({data}) => {
this.AddressTown = data; this.AddressTown = data;
}) })
} }
}, },
} }
} }
</script> </script>
<style scoped> <style scoped>
.mb-10{ .mb-10 {
margin-bottom: 10px margin-bottom: 10px
} }
</style> </style>
...@@ -171,9 +171,9 @@ ...@@ -171,9 +171,9 @@
} }
</style> </style>
<script> <script>
import { createCustomerFollow, getCustomerFollowPage, getCustomerFollowPage2, addCustomerFollow, getCustomerFollowList, editCustomerFollow, getFollowupNewNumber } from "@/api/ecw/customerFollow" import { addCustomerFollow, editCustomerFollow, getFollowupNewNumber } from "@/api/ecw/customerFollow"
import { getCustomerContactsSelect } from "@/api/ecw/customerContacts" import { getCustomerContactsSelect } from "@/api/ecw/customerContacts"
import { getOfferPage, getOfferNumber } from "@/api/ecw/offer" import {getOfferPage, getOfferNumber, getOffer} from "@/api/ecw/offer"
import { DICT_TYPE, getDictDataLabel } from "@/utils/dict" import { DICT_TYPE, getDictDataLabel } from "@/utils/dict"
import { getCustomerContactsListByCustomer } from "@/api/ecw/customerContacts" import { getCustomerContactsListByCustomer } from "@/api/ecw/customerContacts"
import { listAllSimpl, listServiceUser, listSimpleUsers } from "@/api/system/user" import { listAllSimpl, listServiceUser, listSimpleUsers } from "@/api/system/user"
...@@ -259,8 +259,25 @@ export default { ...@@ -259,8 +259,25 @@ export default {
watch: { watch: {
"form.offerId"(v) { "form.offerId"(v) {
if (v) { if (v) {
getOfferNumber(v).then((r) => { getOffer(v).then((r) => {
this.form.offerNumber = r.data let offer = r.data
// 选择了报价单后,需要将报价单中的客户及客户联系人信息回显
this.form.offerNumber = offer.number
this.form.customerId = offer.relationId
this.form.contactId = offer.relation === 1 ? offer.consignorId : offer.consigneeId
getCustomerContactsListByCustomer({
customerId: this.form.customerId
}).then((res) => {
this.customerContactsList = res.data
this.customerContactsList.forEach((item) =>{
if (item.id === this.form.contactId){
this.form.customerNumber = item.customerNumber
this.form.contactName = item.name
this.form.contactPhone = "+" + item.areaCode + item.phoneNew
this.form.followUserId = item.customerService
}
})
})
}) })
} else { } else {
this.form.offerNumber = "" this.form.offerNumber = ""
...@@ -406,7 +423,7 @@ export default { ...@@ -406,7 +423,7 @@ export default {
this.$modal.msgError(this.$t("请选择跟进方式")) this.$modal.msgError(this.$t("请选择跟进方式"))
return return
} }
if (!this.form.offerId && this.form.followType == 2) { if (this.form.followType === 2 && !this.form.offerId) {
this.$modal.msgError(this.$t("请选择报价单")) this.$modal.msgError(this.$t("请选择报价单"))
return return
} }
...@@ -414,6 +431,35 @@ export default { ...@@ -414,6 +431,35 @@ export default {
if (status === 0) { if (status === 0) {
this.saveSubmitData(status) this.saveSubmitData(status)
} else { } else {
// 提交结果时,除了附件和上级跟进单为非必填,其他都是必填
if (!this.form.customerId) {
this.$modal.msgError(this.$t("请选择客户"))
return
}
if (!this.form.contactId) {
this.$modal.msgError(this.$t("请选择客户联系人"))
return
}
if (!this.form.resultType) {
this.$modal.msgError(this.$t("请选择跟进结果"))
return
}
if (!this.form.purpose) {
this.$modal.msgError(this.$t("请填写跟进目的"))
return
}
if (!this.form.feedback) {
this.$modal.msgError(this.$t("请填写跟进情况"))
return
}
if (!this.form.nextTime) {
this.$modal.msgError(this.$t("请选择下次跟进时间"))
return
}
if (!this.form.nextPlan) {
this.$modal.msgError(this.$t("请填写下一步计划"))
return
}
this.$confirm(this.$t("提交后无法修改"), this.$t("提示"), { this.$confirm(this.$t("提交后无法修改"), this.$t("提示"), {
confirmButtonText: this.$t("确定"), confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"), cancelButtonText: this.$t("取消"),
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<script> <script>
import {DICT_TYPE, getDictDatas, getDictDatas2} from "@/utils/dict"; import {DICT_TYPE, getDictDatas, getDictDatas2} from "@/utils/dict";
import {getCustomerFollowList, updateCustomerFollowupStatus} from "@/api/ecw/customerFollow"; import {getCustomerFollowupList, updateCustomerFollowupStatus} from "@/api/ecw/customerFollow";
export default { export default {
name: "customerFollowUpdateStatus", name: "customerFollowUpdateStatus",
...@@ -77,17 +77,7 @@ export default { ...@@ -77,17 +77,7 @@ export default {
}) })
}, },
getCustomerFollowList() {
this.loading = true
getCustomerFollowList({
...this.followForm,
...this.formatQuery()
}).then((r) => {
this.customerFollowList = r.data.list
this.customerFollowTotal = r.data.total
this.loading = false
})
},
customerFollowUpdateStatusClose() { customerFollowUpdateStatusClose() {
this.status = null; this.status = null;
this.$emit('update:show', false) this.$emit('update:show', false)
......
...@@ -79,12 +79,12 @@ ...@@ -79,12 +79,12 @@
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('商品类别')" v-show="showSearch"> <el-form-item :label="$t('主营商品类别')" v-show="showSearch">
<el-select @change="handleSelectProductType" multiple v-model="queryParams.productTypes" :placeholder="$t('请选择')"> <el-select @change="handleSelectProductType" multiple v-model="queryParams.productTypes" :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-form-item> </el-form-item>
<el-form-item :label="$t('商品名称')" v-show="showSearch"> <el-form-item :label="$t('主营商品名称')" v-show="showSearch">
<el-select multiple filterable clearable v-model="queryParams.productIds" :placeholder="$t('请选择商品名称')"> <el-select multiple filterable clearable v-model="queryParams.productIds" :placeholder="$t('请选择商品名称')">
<el-option :label="item.titleZh" :value="parseInt(item.id)" v-for="item in productList" :key="item.id" /> <el-option :label="item.titleZh" :value="parseInt(item.id)" v-for="item in productList" :key="item.id" />
</el-select> </el-select>
...@@ -666,7 +666,7 @@ ...@@ -666,7 +666,7 @@
<el-button @click="cancel">{{ $t("取 消") }}</el-button> <el-button @click="cancel">{{ $t("取 消") }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
<customer-follow-list :customer-id="customerId" :id="customerId" :customer-service="customerService" :customer-number="customerNumber" ref="CustomerFollowList" v-if="customerFollowVisible"></customer-follow-list> <customer-follow-list :customer-id="customerId" :id="customerId" :customer-service="customerService" :customer-number="customerNumber" @refresh="handleQuery" ref="CustomerFollowList" v-if="customerFollowVisible"></customer-follow-list>
<customer-follow ref="customerFollow" @refresh="handleQuery" @close="customerFollowVisible = false" v-if="customerFollowVisible" /> <customer-follow ref="customerFollow" @refresh="handleQuery" @close="customerFollowVisible = false" v-if="customerFollowVisible" />
<customer-complaints :customer-id="customerId" ref="customerComplaints"></customer-complaints> <customer-complaints :customer-id="customerId" ref="customerComplaints"></customer-complaints>
<transfer-customer :show.sync="transferShow" :customer-ids.sync="selectCustomerList"></transfer-customer> <transfer-customer :show.sync="transferShow" :customer-ids.sync="selectCustomerList"></transfer-customer>
......
...@@ -377,7 +377,7 @@ ...@@ -377,7 +377,7 @@
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="$router.push('/offer/detail?offerId=' + scope.row.offerId)" v-hasPermi="['ecw:offer:show']">{{ $t("详情") }} </el-dropdown-item> <el-dropdown-item @click.native="$router.push('/offer/detail?offerId=' + scope.row.offerId)" v-hasPermi="['ecw:offer:show']">{{ $t("详情") }} </el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/edit?id=' + scope.row.offerId)" v-if="[1, 2, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{ $t("编辑") }} </el-dropdown-item> <el-dropdown-item @click.native="$router.push('/offer/edit?id=' + scope.row.offerId)" v-if="[1, 2, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:update']">{{ $t("编辑") }} </el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/logList?offerId=' + scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:loglist']">{{ $t("跟进") }} </el-dropdown-item> <el-dropdown-item @click.native="$router.push('/offer/logListCustomerCommon?offerId=' + scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:loglist']">{{ $t("跟进") }} </el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`/offer/result?offerId=${scope.row.offerId}&number=${scope.row.number}`)" v-if="[3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:result']">{{ $t("结果") }} </el-dropdown-item> <el-dropdown-item @click.native="$router.push(`/offer/result?offerId=${scope.row.offerId}&number=${scope.row.number}`)" v-if="[3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:result']">{{ $t("结果") }} </el-dropdown-item>
<el-dropdown-item @click.native="$router.push('/offer/special?offerId=' + scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:discount', 'ecw:offer:commission']">{{ $t("特价") }} </el-dropdown-item> <el-dropdown-item @click.native="$router.push('/offer/special?offerId=' + scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:discount', 'ecw:offer:commission']">{{ $t("特价") }} </el-dropdown-item>
<el-dropdown-item @click.native="cancel(scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:cancel']">{{ $t("取消") }} </el-dropdown-item> <el-dropdown-item @click.native="cancel(scope.row.offerId)" v-if="[1, 3, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:cancel']">{{ $t("取消") }} </el-dropdown-item>
...@@ -394,7 +394,7 @@ ...@@ -394,7 +394,7 @@
</el-card> </el-card>
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="follow" :label="$t('跟进')"> <el-tab-pane name="follow" :label="$t('跟进')">
<logListCommon ref="logListCommon" :customerService="customer.customerService" :customerNumber="customer.number" v-if="activeName === 'follow'" :customerId="id" /> <log-list-customer-common ref="logListCustomerCommon" :customerService="customer.customerService" :customerNumber="customer.number" v-if="activeName === 'follow'" :customerId="id" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="complain" :label="$t('客户投诉')"> <el-tab-pane name="complain" :label="$t('客户投诉')">
<customer-complaint v-if="activeName === 'complain'" ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint> <customer-complaint v-if="activeName === 'complain'" ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint>
...@@ -672,12 +672,12 @@ ...@@ -672,12 +672,12 @@
</div> </div>
</el-dialog> </el-dialog>
<customer-follow ref="customerFollow" v-if="customerFollowVisible" @close="customerFollowVisible = false" :customer-id="id" :customer-service="customer.customerService" :customer-number="customer.number" @refresh="logListCommonRefresh" /> <customer-follow ref="customerFollow" v-if="customerFollowVisible" @close="customerFollowVisible = false" :customer-id="id" :customer-service="customer.customerService" :customer-number="customer.number" @refresh="logListCustomerCommonRefresh" />
</div> </div>
</template> </template>
<script> <script>
import { getCustomer, getCustomerSelect, getBrankByCustomer, levelLogPage, customerCreditLogPage, infoListOrderPage, orderStatistics, creditLogCreate, creditScoreStatistic, infoListReceiptPage, memberUserList, deleteCustomer, infoListStatisticsOrder } from "@/api/ecw/customer" import { getCustomer, getBrankByCustomer, levelLogPage, customerCreditLogPage, infoListOrderPage, orderStatistics, creditLogCreate, creditScoreStatistic, infoListReceiptPage, memberUserList, deleteCustomer, infoListStatisticsOrder } from "@/api/ecw/customer"
import { getOfferPage as infoListOfferPage } from "@/api/ecw/offer" import { getOfferPage as infoListOfferPage } from "@/api/ecw/offer"
import { DICT_TYPE, getDictDataLabel, getDictDatas2 } from "@/utils/dict" import { DICT_TYPE, getDictDataLabel, getDictDatas2 } from "@/utils/dict"
import { getProductTypeList } from "@/api/ecw/productType" import { getProductTypeList } from "@/api/ecw/productType"
...@@ -695,25 +695,23 @@ import { getCurrencyList } from "@/api/ecw/currency" ...@@ -695,25 +695,23 @@ import { getCurrencyList } from "@/api/ecw/currency"
import customerLog from "@/views/ecw/customer/customerLog.vue" import customerLog from "@/views/ecw/customer/customerLog.vue"
import { checkPermi } from "@/utils/permission" import { checkPermi } from "@/utils/permission"
import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue" import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue"
import { getListTree } from "@/api/ecw/region"
import { getWarehouseList } from "@/api/ecw/warehouse" import { getWarehouseList } from "@/api/ecw/warehouse"
import { deleteOffer, cancel, recovery } from "@/api/ecw/offer" import { deleteOffer, cancel, recovery } from "@/api/ecw/offer"
import logListCommon from "@/views/ecw/offer/logListCommon"
import { getTradeCityList } from "@/api/ecw/region"
import UserSelector from "@/components/UserSelector" import UserSelector from "@/components/UserSelector"
import LogListCustomerCommon from "@/views/ecw/offer/logListCustomerCommon.vue";
export default { export default {
name: "query", name: "query",
components: { components: {
LogListCustomerCommon,
UserSelector, UserSelector,
ImageDisplay, ImageDisplay,
Template, Template,
CustomerFollow, CustomerFollow,
CustomerComplaint, CustomerComplaint,
customerLog, customerLog
logListCommon
}, },
created() { created() {
// 获取币种 // 获取币种
...@@ -1286,7 +1284,7 @@ export default { ...@@ -1286,7 +1284,7 @@ export default {
this.getInfoListOfferPage() this.getInfoListOfferPage()
} else if (this.activeName == "follow") { } else if (this.activeName == "follow") {
this.followForm.pageNo = 1 this.followForm.pageNo = 1
this.getCustomerFollowList() this.getCustomerFollowupList()
} }
}, },
getWarehouseList() { getWarehouseList() {
...@@ -1323,8 +1321,8 @@ export default { ...@@ -1323,8 +1321,8 @@ export default {
this.handleQuery() this.handleQuery()
}) })
}, },
logListCommonRefresh() { logListCustomerCommonRefresh() {
this.$refs.logListCommon && this.$refs.logListCommon.handleQuery() this.$refs.logListCustomerCommon && this.$refs.logListCustomerCommon.handleQuery()
} }
} }
} }
......
...@@ -372,7 +372,7 @@ ...@@ -372,7 +372,7 @@
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList" /> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList" />
<customer-follow-list :customer-id="customerId" :id="customerId" :customer-service="customerService" :customer-number="customerNumber" ref="CustomerFollowList" v-if="customerFollowVisible"></customer-follow-list> <customer-follow-list :customer-id="customerId" :id="customerId" :customer-service="customerService" :customer-number="customerNumber" @refresh="handleQuery" ref="CustomerFollowList" v-if="customerFollowVisible"></customer-follow-list>
<customer-follow ref="customerFollow" @close="customerFollowVisible = false" @refresh="handleQuery" v-if="customerFollowVisible" /> <customer-follow ref="customerFollow" @close="customerFollowVisible = false" @refresh="handleQuery" v-if="customerFollowVisible" />
<customer-complaints ref="customerComplaint" :customer-id.sync="customerId"></customer-complaints> <customer-complaints ref="customerComplaint" :customer-id.sync="customerId"></customer-complaints>
<transfer-customer :show.sync="show" :customer-ids.sync="selectCustomerList"></transfer-customer> <transfer-customer :show.sync="show" :customer-ids.sync="selectCustomerList"></transfer-customer>
......
...@@ -62,11 +62,10 @@ ...@@ -62,11 +62,10 @@
</el-descriptions> </el-descriptions>
</div> </div>
</el-card> </el-card>
<el-card class="card"> <el-card class="card">
<div slot="header" class="card-title">{{ $t("运输") }}</div> <div slot="header" class="card-title">{{ $t("运输") }}</div>
<div style="overflow: auto"> <div style="overflow: auto">
<el-descriptions :column="5" border class="card" v-if="list.consignorId" :labelStyle="{ width: '110px' }"> <el-descriptions :column="5" border class="card" :labelStyle="{ width: '110px' }">
<el-descriptions-item :label="$t('始发仓')">{{ $l(list.logisticsInfoDto, "startTitle") }}</el-descriptions-item> <el-descriptions-item :label="$t('始发仓')">{{ $l(list.logisticsInfoDto, "startTitle") }}</el-descriptions-item>
<el-descriptions-item :label="$t('目的仓')"> {{ $l(list.logisticsInfoDto, "destCountryTitle") }} - {{ $l(list.logisticsInfoDto, "destCityTitle") }} - {{ $l(list.logisticsInfoDto, "destTitle") }} </el-descriptions-item> <el-descriptions-item :label="$t('目的仓')"> {{ $l(list.logisticsInfoDto, "destCountryTitle") }} - {{ $l(list.logisticsInfoDto, "destCityTitle") }} - {{ $l(list.logisticsInfoDto, "destTitle") }} </el-descriptions-item>
<el-descriptions-item :label="$t('运输方式')"> <el-descriptions-item :label="$t('运输方式')">
......
...@@ -1088,9 +1088,11 @@ export default { ...@@ -1088,9 +1088,11 @@ export default {
}, },
activated() { activated() {
if (this.$route.query.id && this.form.offerId !== this.$route.query.id) { if (this.$route.query.id && this.form.offerId !== this.$route.query.id) {
// if (this.$route.query.id) {
this.getOffer() this.getOffer()
} }
if (this.$route.query.copyId && this.form.copyId !== this.$route.query.copyId) { if (this.$route.query.copyId && this.form.copyId !== this.$route.query.copyId) {
// if (this.$route.query.copyId) {
this.getOffer() this.getOffer()
} }
}, },
...@@ -1105,7 +1107,7 @@ export default { ...@@ -1105,7 +1107,7 @@ export default {
getRegionList(4, 4).then((res) => (this.AddressCity = res.data)) getRegionList(4, 4).then((res) => (this.AddressCity = res.data))
competitorListAll().then((res) => (this.competitorList = res.data)) competitorListAll().then((res) => (this.competitorList = res.data))
if (this.$route.query.id && this.$route.query.copyId) { if (this.$route.query.id || this.$route.query.copyId) {
this.getOffer() this.getOffer()
} else { } else {
// alert(this.$route.query.customer.defaultContactPhone) // alert(this.$route.query.customer.defaultContactPhone)
...@@ -1126,7 +1128,7 @@ export default { ...@@ -1126,7 +1128,7 @@ export default {
} }
} }
} else { } else {
this.form.relation = 1 // this.form.relation = 1
} }
}, },
methods: { methods: {
...@@ -1148,10 +1150,11 @@ export default { ...@@ -1148,10 +1150,11 @@ export default {
//加了是否从全部客户列表中报价按钮进来的判断 //加了是否从全部客户列表中报价按钮进来的判断
if (this.$route.query.type !== 1) { if (this.$route.query.type !== 1) {
getOffer(this.$route.query.id || this.$route.query.copyId).then((res) => { getOffer(this.$route.query.id || this.$route.query.copyId).then((res) => {
console.log("报价单信息", res.data)
let formData = res.data let formData = res.data
formData.serviceType = formData.serviceType ? formData.serviceType.split(",").filter((item) => item != "") : [] formData.serviceType = formData.serviceType ? formData.serviceType.split(",").filter((item) => item != "") : []
console.log(formData.serviceType) console.log(formData.serviceType)
console.log(formData)
formData.prodCreateReqVOList = [] formData.prodCreateReqVOList = []
if (formData.transportVO && formData.transportVO.packageType) { if (formData.transportVO && formData.transportVO.packageType) {
formData.transportVO.packageTypeArr = formData.transportVO.packageType.split(",").filter((item) => item && item != "") formData.transportVO.packageTypeArr = formData.transportVO.packageType.split(",").filter((item) => item && item != "")
...@@ -1195,18 +1198,26 @@ export default { ...@@ -1195,18 +1198,26 @@ export default {
formData.channelId = formData.channelId || null formData.channelId = formData.channelId || null
this.$set(this, "form", formData) this.$set(this, "form", formData)
console.log("报价单归属", this.form.relation == 1? "发货人":"收货人")
// 接口只返回了发货人和收货人ID,还需要调用接口获取详细信息回显 // 接口只返回了发货人和收货人ID,还需要调用接口获取详细信息回显
getCustomerContactsSelect({ getCustomerContactsSelect({
ids: [res.data.consigneeId, res.data.consignorId].join(",") ids: [res.data.consigneeId, res.data.consignorId].join(",")
}).then(({ data }) => { }).then(({ data }) => {
this.contactChooseType = "consignee" this.onContactAssignValueBackToDisplay(data.list.find((item) => item.customerContactsId == res.data.consigneeId), "consignee")
this.onContactChoose(data.list.find((item) => item.customerContactsId == res.data.consigneeId)) this.onContactAssignValueBackToDisplay(data.list.find((item) => item.customerContactsId == res.data.consignorId), "consignor")
this.contactChooseType = "consignor"
this.onContactChoose(data.list.find((item) => item.customerContactsId == res.data.consignorId))
}) })
}) })
} }
}, },
onContactAssignValueBackToDisplay(contact, contactChooseType) {
if (!contact) return
this.$set(this.form, contactChooseType + "Company", contact.company)
this.$set(this.form, contactChooseType + "Id", contact.customerContactsId)
this.$set(this.form, contactChooseType + "CountryCode", contact.areaCode)
this.$set(this.form, contactChooseType + "Email", contact.email)
this.$set(this.form, contactChooseType + "Name", contact.contactsName)
this.$set(this.form, contactChooseType + "Phone", contact.phoneNew)
},
onContactChoose(contact) { onContactChoose(contact) {
if (!contact) return if (!contact) return
......
...@@ -120,6 +120,16 @@ ...@@ -120,6 +120,16 @@
<a class="el-link el-link--primary is-underline" href="javascript:;" @click="$router.push(`/order/detail?orderId=${row.orderId}`)">{{ row.orderNo }}</a> <a class="el-link el-link--primary is-underline" href="javascript:;" @click="$router.push(`/order/detail?orderId=${row.orderId}`)">{{ row.orderNo }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('最新跟进时间')" width="120">
<template slot-scope="scope" v-if="scope.row.followupBackVO">
{{ parseTime(scope.row.followupBackVO.followTime) }}
</template>
</el-table-column>
<el-table-column :label="$t('最新跟进记录')" width="120">
<template slot-scope="scope" v-if="scope.row.followupBackVO">
<a href="javascript:void(0)" @click="handleCustomerFollowLink(scope.row.followupBackVO)" class="link-type">{{ scope.row.followupBackVO.number }}</a>
</template>
</el-table-column>
<el-table-column :label="$t('联系人')" align="left" prop="relationName" width="120" /> <el-table-column :label="$t('联系人')" align="left" prop="relationName" width="120" />
<el-table-column :label="$t('联系电话')" align="left" prop="relationPhone" width="150" /> <el-table-column :label="$t('联系电话')" align="left" prop="relationPhone" width="150" />
<el-table-column :label="$t('重要程序')" align="center" prop="importance" /> <el-table-column :label="$t('重要程序')" align="center" prop="importance" />
...@@ -554,7 +564,12 @@ export default { ...@@ -554,7 +564,12 @@ export default {
this.loading = false this.loading = false
}) })
}, },
handleCustomerFollowLink(row) {
this.customerFollowVisible = true
this.$nextTick((_) => {
this.$refs["customerFollow"].handleView(row)
})
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNo = 1 this.queryParams.pageNo = 1
......
...@@ -41,12 +41,15 @@ ...@@ -41,12 +41,15 @@
</el-form-item> </el-form-item>
</div> </div>
<div class="search-time"> <div class="search-time">
<el-form-item :label="$t('创建时间')">
<el-date-picker v-model="followFormTmp.createTime" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"> </el-date-picker>
</el-form-item>
<el-form-item :label="$t('下次跟进时间')"> <el-form-item :label="$t('下次跟进时间')">
<el-date-picker v-model="followFormTmp.nextTime" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"> </el-date-picker> <el-date-picker v-model="followFormTmp.nextTime" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item style="padding-left: 20px; width: auto"> <el-form-item style="padding-left: 20px; width: auto">
<div class="flex-c-c"> <div class="flex-c-c">
<el-button type="primary" icon="el-icon-search" @click="getCustomerFollowList">{{ $t("搜索") }} </el-button> <el-button type="primary" icon="el-icon-search" @click="getDataSpaceCustomerFollowupList">{{ $t("搜索") }} </el-button>
<el-button type="primary" @click="reset">{{ $t("重置") }} </el-button> <el-button type="primary" @click="reset">{{ $t("重置") }} </el-button>
</div> </div>
</el-form-item> </el-form-item>
...@@ -121,7 +124,7 @@ ...@@ -121,7 +124,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination :total="customerFollowTotal" :page.sync="followForm.pageNo" :limit.sync="followForm.pageSize" @pagination="getCustomerFollowList" /> <pagination :total="customerFollowTotal" :page.sync="followForm.pageNo" :limit.sync="followForm.pageSize" @pagination="getDataSpaceCustomerFollowupList" />
</el-card> </el-card>
<customer-follow ref="customerFollow" @close="customerFollowVisible = false" @handleCustomerFollowAdd="handleCustomerFollowAdd" @refresh="handleQuery" v-if="customerFollowVisible" :customer-id="customerId" :customerService="customerService" :customerNumber="customerNumber" /> <customer-follow ref="customerFollow" @close="customerFollowVisible = false" @handleCustomerFollowAdd="handleCustomerFollowAdd" @refresh="handleQuery" v-if="customerFollowVisible" :customer-id="customerId" :customerService="customerService" :customerNumber="customerNumber" />
<customer-follow-update-status :show.sync="updateStatus" :followup-ids.sync="selectCustomerFollowList" @refresh="handleQuery"></customer-follow-update-status> <customer-follow-update-status :show.sync="updateStatus" :followup-ids.sync="selectCustomerFollowList" @refresh="handleQuery"></customer-follow-update-status>
...@@ -129,7 +132,7 @@ ...@@ -129,7 +132,7 @@
</template> </template>
<script> <script>
import { getCustomerFollowList, exportCustomerFollow } from "@/api/ecw/customerFollow" import { getCustomerFollowupList, getDataSpaceCustomerFollowupList, exportDataSpaceCustomerFollowup } from "@/api/ecw/customerFollow"
import { getDictDatas, DICT_TYPE, getDictDatas2 } from "@/utils/dict" import { getDictDatas, DICT_TYPE, getDictDatas2 } from "@/utils/dict"
import CustomerFollow from "@/views/ecw/customer/components/customerFollow" import CustomerFollow from "@/views/ecw/customer/components/customerFollow"
import UserSelector from "@/components/UserSelector" import UserSelector from "@/components/UserSelector"
...@@ -155,6 +158,7 @@ export default { ...@@ -155,6 +158,7 @@ export default {
pageSize: 10 pageSize: 10
}, },
followFormTmp: { followFormTmp: {
createTime: ["", ""],
nextTime: ["", ""] nextTime: ["", ""]
} }
} }
...@@ -186,7 +190,7 @@ export default { ...@@ -186,7 +190,7 @@ export default {
watch: { watch: {
selectCustomerFollowList(val) { selectCustomerFollowList(val) {
if (val.length === 0) { if (val.length === 0) {
this.getCustomerFollowList() this.getDataSpaceCustomerFollowupList()
this.$refs.multipleTable.clearSelection() this.$refs.multipleTable.clearSelection()
} }
}, },
...@@ -233,6 +237,8 @@ export default { ...@@ -233,6 +237,8 @@ export default {
let obj = {} let obj = {}
obj.customerId = this.customerId || null obj.customerId = this.customerId || null
obj.offerId = this.offerId || null obj.offerId = this.offerId || null
obj.beginCreateTime = this.followFormTmp.createTime[0]
obj.endCreateTime = this.followFormTmp.createTime[1]
obj.beginNextTime = this.followFormTmp.nextTime[0] obj.beginNextTime = this.followFormTmp.nextTime[0]
obj.endNextTime = this.followFormTmp.nextTime[1] obj.endNextTime = this.followFormTmp.nextTime[1]
return obj return obj
...@@ -243,13 +249,13 @@ export default { ...@@ -243,13 +249,13 @@ export default {
this.followForm.pageNo = 1 this.followForm.pageNo = 1
this.customerFollowTotal = 0 this.customerFollowTotal = 0
this.customerFollowList = [] this.customerFollowList = []
this.getCustomerFollowList() this.getDataSpaceCustomerFollowupList()
}, },
/** 跟进记录导出按钮操作 */ /** 跟进记录导出按钮操作 */
handleExport() { handleExport() {
// 执行导出 // 执行导出
this.$modal.confirm(this.$t("是否确认导出客户跟进记录数据项?")).then(() => { this.$modal.confirm(this.$t("是否确认导出客户跟进记录数据项?")).then(() => {
exportCustomerFollow({ exportDataSpaceCustomerFollowup({
...this.followForm, ...this.followForm,
...this.formatQuery(), ...this.formatQuery(),
pageNo: null, pageNo: null,
...@@ -259,9 +265,9 @@ export default { ...@@ -259,9 +265,9 @@ export default {
}) })
}) })
}, },
getCustomerFollowList() { getDataSpaceCustomerFollowupList() {
this.loading = true this.loading = true
getCustomerFollowList({ getDataSpaceCustomerFollowupList({
...this.followForm, ...this.followForm,
...this.formatQuery() ...this.formatQuery()
}).then((r) => { }).then((r) => {
...@@ -271,12 +277,13 @@ export default { ...@@ -271,12 +277,13 @@ export default {
}) })
}, },
reset() { reset() {
this.followFormTmp.createTime = ["", ""]
this.followFormTmp.nextTime = ["", ""] this.followFormTmp.nextTime = ["", ""]
this.followForm = { this.followForm = {
pageNo: 1, pageNo: 1,
pageSize: 10 pageSize: 10
} }
this.getCustomerFollowList() this.getDataSpaceCustomerFollowupList()
} }
} }
} }
......
<template>
<div>
<el-card class="box-card">
<div slot="header" class="clearfix">
<el-form size="small" :inline="true" label-width="100px">
<div class="search-z">
<el-form-item :label="$t('编号')" prop="number">
<el-input v-model.trim="followForm.number" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('报价单号')" prop="offerNumber">
<el-input v-model.trim="followForm.offerNumber" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('联系人')" prop="contactName">
<el-input v-model.trim="followForm.contactName" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('联系方式')" prop="contactPhone">
<el-input v-model.trim="followForm.contactPhone" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('客户经理')" prop="followUserIds">
<user-selector v-model="followForm.followUserIds" multiple clearable @input="handleQuery" />
</el-form-item>
<el-form-item :label="$t('关联跟进记录')" prop="parentNumber">
<el-input v-model.trim="followForm.parentNumber" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('跟进类型')">
<dict-selector clearable :type="DICT_TYPE.CUSTOMER_FOLLOWUP_TYPE" v-model="followForm.followType" @input="handleQuery"></dict-selector>
</el-form-item>
<el-form-item :label="$t('跟进方式')">
<dict-selector clearable :type="DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD" v-model="followForm.followMethod" @input="handleQuery"></dict-selector>
</el-form-item>
<el-form-item :label="$t('跟进结果')">
<el-select clearable v-model="followForm.resultType" :placeholder="$t('请选择')" size="small" @change="handleQuery">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_RESULT_TYPE)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item :label="$t('跟进状态')">
<el-select clearable v-model="followForm.status" :placeholder="$t('请选择')" size="small" @change="handleQuery">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_STATUS)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="dict.value" />
</el-select>
</el-form-item>
</div>
<div class="search-time">
<el-form-item :label="$t('创建时间')">
<el-date-picker v-model="followFormTmp.createTime" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"> </el-date-picker>
</el-form-item>
<el-form-item :label="$t('下次跟进时间')">
<el-date-picker v-model="followFormTmp.nextTime" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"> </el-date-picker>
</el-form-item>
<el-form-item style="padding-left: 20px; width: auto">
<div class="flex-c-c">
<el-button type="primary" icon="el-icon-search" @click="getCustomerFollowupList">{{ $t("搜索") }} </el-button>
<el-button type="primary" @click="reset">{{ $t("重置") }} </el-button>
</div>
</el-form-item>
</div>
</el-form>
</div>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="success" @click="handleAdd" v-hasPermi="['ecw:customer:follow-create']">{{ $t("新增") }} </el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" @click="handleExport" v-hasPermi="['ecw:customer:follow-export']">
{{ $t("导出") }}
</el-button>
</el-col>
</el-row>
<el-table ref="multipleTable" :data="customerFollowList" v-loading="loading" @selection-change="handleSelectionChange" style="width: 100%">
<el-table-column type="selection" width="55" fixed></el-table-column>
<el-table-column prop="number" :label="$t('编号')" align="center" fixed>
<template slot-scope="scope">
<a href="javascript:void(0)" @click="handleCustomerFollowLink(scope.row)" class="link-type">{{ scope.row.number }}</a>
</template>
</el-table-column>
<el-table-column prop="followType" :label="$t('跟进类型')" :formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_TYPE, cellValue)"></el-table-column>
<el-table-column prop="offerNumber" :label="$t('报价单号')"> </el-table-column>
<el-table-column prop="followTime" :label="$t('跟进时间')" :formatter="(row, column, cellValue) => parseTime(cellValue)"></el-table-column>
<el-table-column prop="customerNumber" :label="$t('客户编号')">
<template slot-scope="scope">
<a href="javascript:void(0)" @click="handleCustomerViewLink(scope.row)" class="link-type">{{ scope.row.customerNumber }}</a>
</template>
</el-table-column>
<el-table-column prop="contactName" :label="$t('联系人')"></el-table-column>
<el-table-column prop="contactPhone" :label="$t('联系方式')"></el-table-column>
<el-table-column prop="followUserName" :label="$t('客户经理')"></el-table-column>
<el-table-column prop="followMethod" :label="$t('跟进方式')" :formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD, cellValue)"></el-table-column>
<el-table-column prop="purpose" :label="$t('目的')"></el-table-column>
<el-table-column prop="feedback" :label="$t('跟进情况')"></el-table-column>
<el-table-column prop="resultType" :label="$t('跟进结果')" :formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_RESULT_TYPE, cellValue)"></el-table-column>
<el-table-column :label="$t('下次跟进时间')" align="center">
<template slot-scope="scope">
{{ parseTime(scope.row.nextTime) }}
</template>
</el-table-column>
<el-table-column :label="$t('关联跟进记录')" align="center" prop="parentNumber"></el-table-column>
<el-table-column prop="nextPlan" :label="$t('下次计划')" align="center"></el-table-column>
<el-table-column :label="$t('跟进状态')" align="center">
<template slot-scope="scope">
{{ getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_STATUS, scope.row.status) }}
</template>
</el-table-column>
<el-table-column prop="creatorName" :label="$t('创建人')" align="center"></el-table-column>
<el-table-column :label="$t('创建时间')" align="center">
<template slot-scope="scope">
{{ parseTime(scope.row.createTime) }}
</template>
</el-table-column>
<el-table-column prop="updaterName" :label="$t('最后更新人')" align="center"></el-table-column>
<el-table-column :label="$t('最后更新时间')" align="center">
<template slot-scope="scope">
{{ parseTime(scope.row.updateTime) }}
</template>
</el-table-column>
<el-table-column width="150px" :label="$t('操作')" align="center" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" v-if="!scope.row.status" @click="handleCustomerFollow(scope.row)" v-hasPermi="['ecw:customer:follow-update']">{{ $t("编辑") }} </el-button>
<el-button size="mini" type="text" icon="el-icon-collection" @click="handleCustomerFollow(scope.row, true)" v-has-permi="['ecw:customer:follow-add-plan']">{{ $t("增加计划") }} </el-button>
</template>
</el-table-column>
</el-table>
<pagination :total="customerFollowTotal" :page.sync="followForm.pageNo" :limit.sync="followForm.pageSize" @pagination="getCustomerFollowupList" />
</el-card>
<customer-follow ref="customerFollow" @close="customerFollowVisible = false" @handleCustomerFollowAdd="handleCustomerFollowAdd" @refresh="handleQuery" v-if="customerFollowVisible" :customer-id="customerId" :customerService="customerService" :customerNumber="customerNumber" />
<customer-follow-update-status :show.sync="updateStatus" :followup-ids.sync="selectCustomerFollowList" @refresh="handleQuery"></customer-follow-update-status>
</div>
</template>
<script>
import { getCustomerFollowupList, exportCustomerFollowup } from "@/api/ecw/customerFollow"
import { getDictDatas, DICT_TYPE, getDictDatas2 } from "@/utils/dict"
import CustomerFollow from "@/views/ecw/customer/components/customerFollow"
import UserSelector from "@/components/UserSelector"
import customerFollowUpdateStatus from "@/views/ecw/customer/components/customerFollowUpdateStatus.vue"
export default {
name: "logListCustomerCommon",
components: { customerFollowUpdateStatus, UserSelector, CustomerFollow },
props: ["customerId", "offerId", "customerService", "customerNumber"],
data() {
return {
// 遮罩层
loading: true,
getDictDatas,
getDictDatas2,
DICT_TYPE,
updateStatus: false,
customerFollowVisible: false,
customerFollowTotal: 0,
customerFollowList: [],
selectCustomerFollowList: [],
followForm: {
pageNo: 1,
pageSize: 10
},
followFormTmp: {
createTime: ["", ""],
nextTime: ["", ""]
}
}
},
created() {
this.handleQuery()
},
updated() {
this.$nextTick(() => {
this.$refs.multipleTable.doLayout()
})
},
computed: {
// selectAuthorityFn() {
// return (val) => {
// let t = val.split(":")
// t[t.length - 1] = this.authorityFn + t[t.length - 1]
// console.log(t.join(":"))
// return t.join(":")
// }
// },
isChinese() {
return this.$i18n.locale === "zh_CN"
},
customerId_offerId() {
return `${this.customerId}_${this.offerId}`
}
},
watch: {
selectCustomerFollowList(val) {
if (val.length === 0) {
this.getCustomerFollowupList()
this.$refs.multipleTable.clearSelection()
}
},
customerId_offerId() {
this.handleQuery()
}
},
methods: {
handleSelectionChange(val) {
this.selectCustomerFollowList = val.map((i) => i.id)
},
handleCustomerFollowAdd(row) {
this.customerFollowVisible = false
setTimeout(() => {
this.customerFollowVisible = true
this.$nextTick((_) => {
this.$refs["customerFollow"].handleUpdate(row, true)
})
}, 100)
},
handleCustomerFollow(row, flag) {
this.customerFollowVisible = true
this.$nextTick((_) => {
this.$refs["customerFollow"].handleUpdate(row, flag)
})
},
handleAdd() {
this.customerFollowVisible = true
this.$nextTick(() => {
this.$refs["customerFollow"].handleAdd()
})
},
handleCustomerFollowLink(row) {
this.customerFollowVisible = true
this.$nextTick((_) => {
this.$refs["customerFollow"].handleView(row)
})
},
handleCustomerViewLink(row) {
this.$router.push(`/customer/query/${row.customerId}`)
},
formatQuery() {
let obj = {}
obj.customerId = this.customerId || null
obj.offerId = this.offerId || null
obj.beginCreateTime = this.followFormTmp.createTime[0]
obj.endCreateTime = this.followFormTmp.createTime[1]
obj.beginNextTime = this.followFormTmp.nextTime[0]
obj.endNextTime = this.followFormTmp.nextTime[1]
return obj
},
handleQuery() {
console.log(this.followForm)
this.followForm.pageNo = 1
this.customerFollowTotal = 0
this.customerFollowList = []
this.getCustomerFollowupList()
},
/** 跟进记录导出按钮操作 */
handleExport() {
// 执行导出
this.$modal.confirm(this.$t("是否确认导出客户跟进记录数据项?")).then(() => {
exportCustomerFollowup({
...this.followForm,
...this.formatQuery(),
pageNo: null,
pageSize: null
}).then((r) => {
this.$message.success(this.$t("已加入导出队列,请稍后在下载日志中下载"))
})
})
},
getCustomerFollowupList() {
this.loading = true
getCustomerFollowupList({
...this.followForm,
...this.formatQuery()
}).then((r) => {
this.customerFollowList = r.data.list
this.customerFollowTotal = r.data.total
this.loading = false
})
},
reset() {
this.followFormTmp.createTime = ["", ""]
this.followFormTmp.nextTime = ["", ""]
this.followForm = {
pageNo: 1,
pageSize: 10
}
this.getCustomerFollowupList()
}
}
}
</script>
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
</template> </template>
<script> <script>
import {parseTime} from '@/utils/ruoyi' import {parseTime} from '@/utils/ruoyi'
import {getLadingBill} from '@/api/ecw/order'
import lodop from '@/utils/lodop' import lodop from '@/utils/lodop'
import PdfViewer from '@/components/PdfViewer' import PdfViewer from '@/components/PdfViewer'
import FileSaver from 'file-saver' import FileSaver from 'file-saver'
...@@ -83,10 +82,10 @@ export default { ...@@ -83,10 +82,10 @@ export default {
this.show = false this.show = false
this.$emit('close'); this.$emit('close');
}, },
download(){ download(){
let blob = new Blob([this.pdfData], {type: "application/pdf"}) let blob = new Blob([this.pdfData], {type: "application/pdf"})
FileSaver.saveAs(blob, this.detail.imgUrl.split("/").pop()); FileSaver.saveAs(blob, this.detail.imgUrl.split("/").pop());
}, },
print(){ print(){
lodop().then(LODOP => { lodop().then(LODOP => {
...@@ -106,7 +105,7 @@ export default { ...@@ -106,7 +105,7 @@ export default {
} }
LODOP.PREVIEW(); LODOP.PREVIEW();
// LODOP.ADD_PRINT_PDF(0,0,"100%","100%",data); // LODOP.ADD_PRINT_PDF(0,0,"100%","100%",data);
// LODOP.PREVIEW(); // 预览 // LODOP.PREVIEW(); // 预览
/* LODOP.PRINTA(); // 选择打印机 /* LODOP.PRINTA(); // 选择打印机
// 直接打印 */ // 直接打印 */
...@@ -114,8 +113,8 @@ export default { ...@@ -114,8 +113,8 @@ export default {
console.error('lodop异常', err) console.error('lodop异常', err)
// alert('请检查LODOP打印控件是否安装并启动'); // alert('请检查LODOP打印控件是否安装并启动');
}) })
} }
} }
} }
...@@ -149,4 +148,4 @@ export default { ...@@ -149,4 +148,4 @@ export default {
.checkbox{text-align: center;} .checkbox{text-align: center;}
.checkbox input{text-decoration: none;padding:10px 15px;background:#ccc;border-radius: 5px; cursor: pointer;margin-bottom: 15px;font-size: 16px;margin:0 2px;} .checkbox input{text-decoration: none;padding:10px 15px;background:#ccc;border-radius: 5px; cursor: pointer;margin-bottom: 15px;font-size: 16px;margin:0 2px;}
</style> </style>
\ No newline at end of file
...@@ -63,10 +63,20 @@ ...@@ -63,10 +63,20 @@
</el-form-item> </el-form-item>
</div> </div>
</el-card> </el-card>
<el-card class="form-section mt-10"> <!--el-card如果只有header没有主题会显示异常,所以没有收货人的时候单独用一个-->
<el-card class="form-section mt-10" v-if="!hasConsignee">
<div class="flex items-center">
<div class="card-title mr-20">收货人</div>
<el-radio-group v-if="noConsignee" v-model="hasConsignee">
<el-radio :label="true">{{ $t('有') }}</el-radio>
<el-radio :label="false">{{ $t('无') }}</el-radio>
</el-radio-group>
</div>
</el-card>
<el-card class="form-section mt-10" v-else>
<template #header> <template #header>
<div class="flex items-center"> <div class="flex items-center">
<div slot="header" class="card-title mr-20">收货人</div> <div class="card-title mr-20">收货人</div>
<el-radio-group v-if="noConsignee" v-model="hasConsignee"> <el-radio-group v-if="noConsignee" v-model="hasConsignee">
<el-radio :label="true">{{ $t('') }}</el-radio> <el-radio :label="true">{{ $t('') }}</el-radio>
<el-radio :label="false">{{ $t('') }}</el-radio> <el-radio :label="false">{{ $t('') }}</el-radio>
...@@ -754,7 +764,7 @@ import Selector from '@/components/Selector' ...@@ -754,7 +764,7 @@ import Selector from '@/components/Selector'
import CustomerContactSelector from '@/components/CustomerContactSelector' import CustomerContactSelector from '@/components/CustomerContactSelector'
import {getGuojiaAndShiAndWarehouseList, openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse' import {getGuojiaAndShiAndWarehouseList, openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse'
import {checkCountryCode, getTradeCityList} from '@/api/ecw/region' import {checkCountryCode, getTradeCityList} from '@/api/ecw/region'
import {getDictData, getDictDatas} from '@/utils/dict' import {DICT_TYPE, getDictData, getDictDatas} from '@/utils/dict'
import {getCurrencyList} from '@/api/ecw/currency' import {getCurrencyList} from '@/api/ecw/currency'
import {getUnitList} from '@/api/ecw/unit' import {getUnitList} from '@/api/ecw/unit'
import AreaSelector from '@/components/AreaSelector' import AreaSelector from '@/components/AreaSelector'
...@@ -770,6 +780,7 @@ import {getCustomer} from "@/api/ecw/customer"; ...@@ -770,6 +780,7 @@ 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' import Template from '@/views/cms/template/index.vue'
import {checkBillOfLadingService} from "@/api/ecw/box";
// 缓存默认的表单数据 // 缓存默认的表单数据
let makeDefaultFormData = () => { let makeDefaultFormData = () => {
...@@ -818,6 +829,7 @@ export default { ...@@ -818,6 +829,7 @@ export default {
callback(); callback();
} }
return { return {
DICT_TYPE,
validatorPositiveNumber, validatorPositiveNumber,
customDraweeList: [], customDraweeList: [],
// draweeList: [], // draweeList: [],
...@@ -1347,11 +1359,11 @@ export default { ...@@ -1347,11 +1359,11 @@ export default {
// 默认不允许控货无收货人 // 默认不允许控货无收货人
this.noConsignee = false this.noConsignee = false
} }
// 如果订单无收货人,但是最新的发货人允许无收货人则重置状态 // // 如果订单无收货人,但是最新的发货人允许无收货人则重置状态
if (this.noConsignee && !this.hasConsignee) { // if (this.noConsignee && !this.hasConsignee) {
// 最新的发货人允许无收货人,则重置为有收货人 // // 最新的发货人允许无收货人,则重置为有收货人
this.hasConsignee = true // this.hasConsignee = true
} // }
}) })
}, },
async getOrder() { async getOrder() {
...@@ -1414,7 +1426,7 @@ export default { ...@@ -1414,7 +1426,7 @@ export default {
// 是否有收货人 // 是否有收货人
this.hasConsignee = !!res.data.consigneeVO // this.hasConsignee = !!res.data.consigneeVO
if (this.form.channelId == 0) { if (this.form.channelId == 0) {
delete this.form.channelId delete this.form.channelId
...@@ -1515,9 +1527,9 @@ export default { ...@@ -1515,9 +1527,9 @@ export default {
this.hasConsignee = false this.hasConsignee = false
}*/ }*/
// 如果发货人不允许无收货人,则重置为有收货人 // 如果发货人不允许无收货人,则重置为有收货人
if (!this.noConsignee && !this.hasConsignee) { // if (!this.noConsignee && !this.hasConsignee) {
this.$set(this, 'hasConsignee', true) // this.$set(this, 'hasConsignee', true)
} // }
// 如果默认付款则设置为发货人付款 // 如果默认付款则设置为发货人付款
if (contact.defaultPay) { if (contact.defaultPay) {
this.$set(this.form, 'drawee', 1) this.$set(this.form, 'drawee', 1)
...@@ -1699,6 +1711,12 @@ export default { ...@@ -1699,6 +1711,12 @@ export default {
}); });
} }
}, },
checkBillOfLading(){
return checkBillOfLadingService(this.form.orderId).then((res) => {
console.log("检查提单制作状态" , res.data)
return res.data
})
},
/** 提交按钮 */ /** 提交按钮 */
// type 在新建的时候表示状态,0草稿,2带入仓 // type 在新建的时候表示状态,0草稿,2带入仓
submitForm(submitType) { submitForm(submitType) {
...@@ -1778,7 +1796,7 @@ export default { ...@@ -1778,7 +1796,7 @@ export default {
// 修改的提交 // 修改的提交
if (this.form.orderId) { if (this.form.orderId) {
if (this.form.tidanNo) { if (await this.checkBillOfLading()) {
await this.$confirm(this.$t('提单已制作,如需修改请联系客服')) await this.$confirm(this.$t('提单已制作,如需修改请联系客服'))
} }
let data = Object.assign({}, this.form, { let data = Object.assign({}, this.form, {
......
...@@ -332,7 +332,7 @@ ...@@ -332,7 +332,7 @@
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<!--出货订单编辑,shipmentState > 0表示出货后,inWarehouseState == 0 表示预装未审核或者是卸柜到仓 , shipmentState==307 表示已预装,待封柜, shipmentState==407 表示已预装,待封柜)--> <!--出货订单编辑,shipmentState > 0表示出货后,inWarehouseState == 0 表示预装未审核或者是卸柜到仓 , shipmentState==307 表示已预装,待封柜, shipmentState==407 表示已预装,待封柜)-->
<template <template
v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0 && scope.row.shipmentState != 307 && scope.row.shipmentState != 407" v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0 && scope.row.shipmentState != 305 && scope.row.shipmentState != 307 && scope.row.shipmentState != 407"
> >
<el-dropdown-item <el-dropdown-item
@click.native="handleUpdate(scope.row)" @click.native="handleUpdate(scope.row)"
...@@ -348,7 +348,7 @@ ...@@ -348,7 +348,7 @@
scope.row.shipmentState == 314)) && scope.row.shipmentState == 314)) &&
!scope.row.abnormalState && !scope.row.abnormalState &&
exclude(scope.row.inWarehouseState, [204, 205, 206]) && exclude(scope.row.inWarehouseState, [204, 205, 206]) &&
exclude(scope.row.shipmentState, [307, 407]) exclude(scope.row.shipmentState, [305, 307, 407])
" "
> >
<el-dropdown-item <el-dropdown-item
...@@ -474,12 +474,12 @@ ...@@ -474,12 +474,12 @@
<el-button type="text">{{ $t("仓库") }}</el-button> <el-button type="text">{{ $t("仓库") }}</el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<!-- 入仓操作 --> <!-- 入仓操作 -->
<template v-if="include(scope.row.status, [0, 2]) || scope.row.inWarehouseState == 208"> <template v-if="(include(scope.row.status, [0, 2]) || scope.row.inWarehouseState == 208)">
<el-dropdown-item @click.native="$router.push('/order/warehousing?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:warehouse_add']">{{ $t("入仓操作") }}</el-dropdown-item> <el-dropdown-item @click.native="$router.push('/order/warehousing?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:warehouse_add']">{{ $t("入仓操作") }}</el-dropdown-item>
</template> </template>
<!-- 入仓补充 --> <!-- 入仓补充 -->
<template <template
v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0" v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0 && scope.row.shipmentState != 305 && scope.row.shipmentState != 307 && scope.row.shipmentState != 407"
> >
<el-dropdown-item <el-dropdown-item
@click.native="$router.push('/order/warehousing-add?shipment=1&id=' + scope.row.orderId)" @click.native="$router.push('/order/warehousing-add?shipment=1&id=' + scope.row.orderId)"
...@@ -492,7 +492,7 @@ ...@@ -492,7 +492,7 @@
include( include(
scope.row.inWarehouseState, scope.row.inWarehouseState,
[201, 202, 202, 210, 202, 211, 202, 214, 215, 216] [201, 202, 202, 210, 202, 211, 202, 214, 215, 216]
) && include(scope.row.status, [2, 3, 5, 10, 9, 8]) ) && include(scope.row.status, [2, 3, 5, 10, 9, 8]) && include(scope.row.airShipment, [0, 1])
" "
> >
<el-dropdown-item <el-dropdown-item
...@@ -507,7 +507,7 @@ ...@@ -507,7 +507,7 @@
</template> </template>
<!-- 入仓修改 --> <!-- 入仓修改 -->
<template <template
v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0" v-if="scope.row.shipmentState > 0 && scope.row.inWarehouseState == 0 && scope.row.shipmentState != 305 && scope.row.shipmentState != 307 && scope.row.shipmentState != 407"
> >
<el-dropdown-item <el-dropdown-item
@click.native="$router.push('/order/warehousing-update?shipment=1&id=' + scope.row.orderId)" @click.native="$router.push('/order/warehousing-update?shipment=1&id=' + scope.row.orderId)"
...@@ -525,7 +525,7 @@ ...@@ -525,7 +525,7 @@
] ]
) && ) &&
scope.row.status != 11 && scope.row.status != 11 &&
exclude(scope.row.shipmentState, [305, 307, 407]) exclude(scope.row.shipmentState, [305, 307, 407]) && include(scope.row.airShipment, [0, 1])
" "
> >
<el-dropdown-item <el-dropdown-item
...@@ -611,7 +611,7 @@ ...@@ -611,7 +611,7 @@
> >
</template> </template>
<!--修改备货--> <!--修改备货-->
<template v-if="include(scope.row.airShipment, [3, 4, 10]) && scope.row.abnormalState === 0 && scope.row.status <= 5"> <template v-if="include(scope.row.airShipment, [3, 4]) && scope.row.abnormalState === 0 && scope.row.status <= 5">
<el-dropdown-item <el-dropdown-item
@click.native=" @click.native="
$router.push({ $router.push({
......
...@@ -232,7 +232,7 @@ export default { ...@@ -232,7 +232,7 @@ export default {
isAllProduct: false, // 是否全部商品 isAllProduct: false, // 是否全部商品
isAllFilteredProduct: false, // 是否勾選全部搜索結果 isAllFilteredProduct: false, // 是否勾選全部搜索結果
specialProducts: [], specialProducts: [],
rules() {}, rules: {},
product: null, product: null,
currencyList: [], currencyList: [],
unitList: [], unitList: [],
......
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