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
......@@ -214,6 +214,13 @@ export function deleteBillService(id) {
method: "delete",
});
}
// 检查提单状态是否已制作提单
export function checkBillOfLadingService(orderId) {
return request({
url: "/shipment/make-bill-of-lading/check/billOfLading/" + orderId,
method: "post",
});
}
// 获得制作提货单
export function getBillService(params) {
......
......@@ -60,13 +60,22 @@ export function exportCustomerFollowExcel(query) {
})
}
export function getCustomerFollowList(params) {
// 跟进分页列表
export function getCustomerFollowupList(params) {
return request({
url: "/customer/followup/page",
method: "get",
params
})
}
// 数据权限跟进分页列表
export function getDataSpaceCustomerFollowupList(params) {
return request({
url: "/customer/followup/data/space/page",
method: "get",
params
})
}
export function getCustomerFollowDetail(params) {
return request({
......@@ -99,7 +108,7 @@ export function updateCustomerFollowupStatus(data) {
})
}
export function exportCustomerFollow(params) {
export function exportCustomerFollowup(params) {
return request({
url: "/customer/followup/export-excel",
method: "get",
......@@ -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() {
return request({
url: "/customer/followup/getFollowupNewNumber",
......
......@@ -2,23 +2,24 @@
<div>
<div class="filters mb-10" v-if="showFilter">
<template v-if="!type">
{{$t('运输方式')}}
<dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')" :filter="transportFilter" style="width:150px" />
{{ $t('运输方式') }}
<dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')"
:filter="transportFilter" style="width:150px"/>
</template>
{{$t('始发地')}}:
{{ $t('始发地') }}:
<el-select :placeholder="$t('请选择始发地')" v-model="exportCity" clearable>
<el-option v-for="item in exportCityList" :key="item.id" :label="item.titleZh" :value="item.id" />
<el-option v-for="item in exportCityList" :key="item.id" :label="item.titleZh" :value="item.id"/>
</el-select>
{{$t('目的国')}}:
{{ $t('目的国') }}:
<el-select :placeholder="$t('请选择目的国')"
v-model="destCountryIds"
multiple
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>
{{$t('目的城市')}}:
{{ $t('目的城市') }}:
<!--
<el-select :placeholder="$t('请选择目的地')" v-model="importCity" clearable>
<el-option v-for="item in importCityList" :key="item.id" :label="item.titleZh" :value="item.id" />
......@@ -28,72 +29,77 @@
v-model="destCityIds"
multiple
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>
{{$t('目的仓')}}:
{{ $t('目的仓') }}:
<el-select :placeholder="$t('请选择目的仓')"
v-model="destWarehouseIds"
multiple
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>
<template v-if="type != 'sea'">
{{$t('出货渠道')}}:
{{ $t('出货渠道') }}:
<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>
</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 :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>
<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>
{{ $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 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')}}
{{ $l(row, 'startTitle') }}
</template>
</el-table-column>
<el-table-column :label="$t('目的仓')" prop="destTitleZh" >
<el-table-column :label="$t('目的仓')" prop="destTitleZh">
<template slot-scope="{row}">
{{$l(row, 'destTitle')}}
{{ $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')}}
{{ $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(',')}}
{{ 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>
<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>
<el-checkbox :key="getSelectedIndex(row)" :checked="getSelectedIndex(row) > -1"
@change="toggleChecker(row, $event)"></el-checkbox>
</template>
</el-table-column>
</el-table>
......@@ -110,26 +116,27 @@ import {getRegionList} from "@/api/ecw/order";
import {openedRouterList} from '@/api/ecw/warehouse'
import {getProductAttrList} from "@/api/ecw/productAttr";
import Template from "@/views/cms/template";
export default {
components: {Template},
props:{
props: {
value: {
type: Array
},
option: Object,
// 类型,sea海运,air空运
type: String,
showFilter:{
showFilter: {
type: Boolean,
default: true
}
},
data(){
data() {
return {
transportTypeDicts: this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE),
channelList:[],
tradeCityList:[],
openedRouterList:[], // 开放路线
channelList: [],
tradeCityList: [],
openedRouterList: [], // 开放路线
transportType: null, // 运输方式
importCity: null, // 目的地(进口城市)
exportCity: null, // 始发地(出口城市)
......@@ -138,33 +145,36 @@ export default {
hideMap: {}, // 折叠状态
checkAll: null,
groupChecker: {}, // 分组全选状态
attrList:[], // 商品特性
attrList: [], // 商品特性
inited: false,
countryList: [], //目的国
AddressCity: [], //目的地
AddressTown: [], //目的仓
destCountryIds: null,
destCityIds: null,
destWarehouseIds: null,
destCountryId: null,
destCityId: null,
destWarehouseId: null,
destCountryIds: [],
destCityIds: [],
destWarehouseIds: [],
}
},
computed:{
importCityList(){
computed: {
importCityList() {
return this.tradeCityList.filter(item => item.type == 1 || item.type == 3)
},
exportCityList(){
exportCityList() {
//字典:贸易类型字典region_trade_type,0非进出口,1进口,2出口,3进出口
return this.tradeCityList.filter(item => item.type == 2 || item.type == 3)
},
exportCityIds(){
exportCityIds() {
let ids = []
this.exportCityList.forEach(item => {
ids.push(item.id)
})
return ids
},
importCityIds(){
importCityIds() {
let ids = []
this.importCityList.forEach(item => {
ids.push(item.id)
......@@ -172,33 +182,33 @@ export default {
return ids
},
// 根据选择的渠道筛选
availChannelList(){
availChannelList() {
return this.channelList.filter(item => !this.channelId || this.channelId == item.channelId)
},
filteredRouterList(){
filteredRouterList() {
let transportTypeList = []
this.transportTypeDicts
.filter(this.transportFilter)
.filter(transport => !this.channelId || transport.cssClass == 'channel')
.forEach(item => {
if(this.transportType === null || this.transportType == '' || this.transportType == item.value){
if (this.transportType === null || this.transportType == '' || this.transportType == item.value) {
let routerList = []
this.openedRouterList.forEach(router => {
if(router.transportType == item.value){
if (router.transportType == item.value) {
let availChannels = []
// 空运相关的,没有可用的渠道则不显示线路
if(item.cssClass === 'channel'){
if (item.cssClass === 'channel') {
availChannels = this.availChannelList.filter(channel => channel.countryId == router.destCountryId)
if(!availChannels.length) return
if (!availChannels.length) return
}
routerList.push(Object.assign({
_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)
)
// 字典的cssClass =channel则表示渠道相关(空运,海空联运)
if(item.cssClass == 'channel'){
if (item.cssClass == 'channel') {
availChannels.slice(1).forEach(channel => {
routerList.push(Object.assign({channel, _merge: 0}, router))
})
......@@ -220,72 +230,72 @@ export default {
return transportTypeList
},
// 是否显示商品特性(渠道)
showAttr(){
showAttr() {
return this.type == 'air'
},
// 显示产品特性
getAttrName(){
getAttrName() {
return (id) => {
let item = this.attrList.find(item => item.id === +id)
if(!item) return ''
if (!item) return ''
return this.$l(item, 'attrName')
}
},
// 显示多个商品特性
getAttrNames(){
getAttrNames() {
return (ids) => {
if(!ids) return ''
return ids.split(',').filter( item => !!item).map(id => this.getAttrName(id)).join(',')
if (!ids) return ''
return ids.split(',').filter(item => !!item).map(id => this.getAttrName(id)).join(',')
}
}
},
watch:{
exportCity(){
watch: {
exportCity() {
this.getOpenedRouterList()
},
/*importCity(){
this.getChannelList()
this.getOpenedRouterList()
},*/
selectedRoutes(val){
selectedRoutes(val) {
this.$emit('input', val)
// 如果选择发生变化
let total = 0
this.filteredRouterList.forEach(item => {
total += item.routerList.length
})
if(total != val.length && val.length){
if (total != val.length && val.length) {
this.checkAll = null
}
},
value(val){
value(val) {
this.selectedRoutes = val || []
},
checkAll(val){
if(val === true || val === false){
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)
if (this.getSelectedIndex(router) > -1 != val) this.toggleChecker(router, val)
})
})
}
},
option(option){
if(option){
option(option) {
if (option) {
this.changeOption()
}
},
// 显示的路线发生变化之后,清空已勾选的路线
filteredRouterList(){
if(this.inited){
filteredRouterList() {
if (this.inited) {
this.selectedRoutes = []
Object.keys(this.groupChecker).forEach(key => {
this.groupChecker[key] = false
})
}
},
destCountryId: {
destCountryIds: {
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep: true, //深度监听
handler() {
......@@ -295,50 +305,48 @@ export default {
this.destWarehouseIds = "";
this.destCityIds = "";
this.findByprovinceCode();
if (this.destCountryIds == "") {
if (this.destCountryIds && this.destCountryIds.length > 0) {
//1 是所有区域,2 国家,3是市,
this.getAddressCity()
this.getAddressTown()
} else if (
this.destCountryIds != "" &&
this.destCityIds == "" &&
this.destWarehouseIds == ""
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.size() > 0
) {
this.getAddressTown()
}
this.getOpenedRouterList()
},
},
destCityId: {
destCityIds: {
deep: true, //深度监听 目的仓
handler() {
this.AddressTown = [];
this.destWarehouseIds = "";
this.findBycityCode();
if (
this.destCityIds != "" &&
this.destCountryIds != "" &&
this.destWarehouseIds == ""
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.length > 0 &&
this.destWarehouseIds && this.destWarehouseIds.length > 0
) {
//获取当前城市值id,获取该城市下区域
} else if (
this.destCountryIds == "" &&
this.destCityIds == "" &&
this.destWarehouseIds == ""
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.destCityIds == "" &&
this.destWarehouseIds == ""
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.length > 0
) {
this.findByprovinceCode()
this.getAddressTown()
} else if (
this.destCountryIds == "" &&
this.destCityIds != "" &&
this.destWarehouseIds == ""
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.length > 0 &&
this.destWarehouseIds && this.destWarehouseIds.length > 0
) {
//获取当前城市值id,获取该城市下区域
......@@ -347,26 +355,26 @@ export default {
this.getChannelList()
},
},
destWarehouseId: {
destWarehouseIds: {
deep: true, //深度监听
handler() {
if (
this.destCountryIds != "" &&
this.destCityIds != "" &&
this.destWarehouseIds == ""
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.destCityIds == "" &&
this.destWarehouseIds == ""
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.destCityIds != "" &&
this.destWarehouseIds == ""
this.destCountryIds && this.destCountryIds.length > 0 &&
this.destCityIds && this.destCityIds.length > 0 &&
this.destWarehouseIds && this.destWarehouseIds.length > 0
) {
this.findBycityCode()
}
......@@ -374,11 +382,11 @@ export default {
},
},
},
async created(){
async created() {
this.tradeCityList = (await getTradeCityList()).data
// 路线需要过滤失效的进出口城市,所以在程序加载后再加载路线
await this.getOpenedRouterList()
if(this.option){
if (this.option) {
this.changeOption()
}
await this.$nextTick()
......@@ -386,20 +394,20 @@ export default {
this.getAddressCity()
this.getAddressTown()
this.getChannelList()
if(this.value && this.value.length){
if (this.value && this.value.length) {
this.selectedRoutes = this.value
}
// 如果显示特性,则需要查询特数据备用
if(this.showAttr){
if (this.showAttr) {
this.getAttrList()
}
await this.$nextTick()
this.inited = true
},
methods:{
getChannelList(){
methods: {
getChannelList() {
if (this.type == 'sea') return
let query = {
// cityId: this.importCity
......@@ -409,41 +417,42 @@ export default {
this.channelList = res.data
})
},
getAttrList(){
getAttrList() {
getProductAttrList().then(res => {
this.attrList = res.data
})
},
changeOption(){
if(!this.option) return
this.destCountryIds = +this.option.destCountryId || null
this.destCityIds = +this.option.destCityId || null
this.destWarehouseIds = +this.option.destWarehouseId || null
changeOption() {
if (!this.option) return
console.log("线路信息", this.option)
this.destCountryId = +this.option.destCountryId || null
this.destCityId = +this.option.destCityId || null
this.destWarehouseId = +this.option.destWarehouseId || null
// this.importCity = +this.option.importCity || null
this.exportCity = +this.option.exportCity || null
this.transportType = this.option.transportId || null
this.channelId = +this.option.channelId || null
},
// 全选、全不选 某个运输方式所有线路
toggleGroupChecker(index, selected){
toggleGroupChecker(index, selected) {
let routerList = this.filteredRouterList[index].routerList
console.log(routerList.length, selected)
routerList.forEach(router => {
this.toggleChecker(router, selected)
})
},
async getOpenedRouterList(){
async getOpenedRouterList() {
let params = {}
if(this.exportCity){
if (this.exportCity) {
params.startCityId = this.exportCity
}
if(this.destCountryIds){
if (this.destCountryIds) {
params.destCountryIds = this.destCountryId
}
if(this.destCityIds){
if (this.destCityIds) {
params.destCityIds = this.destCityIds
}
if(this.destWarehouseIds){
if (this.destWarehouseIds) {
params.destWarehouseIds = this.destWarehouseIds
}
const res = await openedRouterList(params)
......@@ -452,7 +461,7 @@ export default {
})
},
// 切换路线选择
toggleChecker(router, selected){
toggleChecker(router, selected) {
// this.getSelectedIndex(router)
/* this.selectedRoutes.forEach((item, i)=>{
if(item.lineId == router.id && item.shippingChannelId == item.channel.id){
......@@ -460,29 +469,29 @@ export default {
break
}
}) */
if(selected){
if (selected) {
// 先判断是否已勾选
if(this.getSelectedIndex(router) > -1) return
if (this.getSelectedIndex(router) > -1) return
this.selectedRoutes.push({
lineId: router.id,
shippingChannelId: router.channel.channelId,
transportId: router.transportType
})
}else{
} else {
let index = this.getSelectedIndex(router)
if(index > -1){
if (index > -1) {
this.selectedRoutes.splice(index, 1)
}
}
},
getSelectedIndex(router){
getSelectedIndex(router) {
return this.selectedRoutes.findIndex(item => {
return item.lineId == router.id && item.shippingChannelId == router.channel.channelId
})
},
SpanMethod({ row, column, rowIndex, columnIndex }){
if (columnIndex < 2 ) {
SpanMethod({row, column, rowIndex, columnIndex}) {
if (columnIndex < 2) {
return {
rowspan: row._merge,
colspan: 1
......@@ -494,44 +503,44 @@ export default {
}
},
// 折叠,展开
toggleHide(value){
toggleHide(value) {
this.$set(this.hideMap, value, !this.hideMap[value])
},
// 运输方式筛选
transportFilter(item){
transportFilter(item) {
// 未指定类型则全部可用
if(!this.type) return true
return (this.type == 'sea' ? ['1','2'] : ['3', '4']).indexOf(item.value) > -1
if (!this.type) return true
return (this.type == 'sea' ? ['1', '2'] : ['3', '4']).indexOf(item.value) > -1
},
/* 国家 */
getCountryList() {
getListTree({ treeType: 1 }).then((response) => {
getListTree({treeType: 1}).then((response) => {
this.countryList = response.data;
})
},
getAddressCity() {
getRegionList(4, 4).then(({ data }) => {
getRegionList(4, 4).then(({data}) => {
this.AddressCity = data;
})
},
getAddressTown() {
getRegionList(5, 5).then(({ data }) => {
getRegionList(5, 5).then(({data}) => {
this.AddressTown = data;
})
},
findByprovinceCode() {
if (this.destCountryIds != null && this.destCountryIds != '') {
if (this.destCountryIds != null && this.destCountryIds.length > 0) {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryIds).then(({ data }) => {
getRegionList(2, this.destCountryIds).then(({data}) => {
this.AddressCity = data;
})
}
},
findBycityCode() {
if (this.destCityIds != null && this.destCityIds != '') {
if (this.destCityIds != null && this.destCityIds.length > 0) {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityIds).then(({ data }) => {
getRegionList(3, this.destCityIds).then(({data}) => {
this.AddressTown = data;
})
}
......@@ -540,7 +549,7 @@ export default {
}
</script>
<style scoped>
.mb-10{
.mb-10 {
margin-bottom: 10px
}
</style>
......@@ -171,9 +171,9 @@
}
</style>
<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 { getOfferPage, getOfferNumber } from "@/api/ecw/offer"
import {getOfferPage, getOfferNumber, getOffer} from "@/api/ecw/offer"
import { DICT_TYPE, getDictDataLabel } from "@/utils/dict"
import { getCustomerContactsListByCustomer } from "@/api/ecw/customerContacts"
import { listAllSimpl, listServiceUser, listSimpleUsers } from "@/api/system/user"
......@@ -259,8 +259,25 @@ export default {
watch: {
"form.offerId"(v) {
if (v) {
getOfferNumber(v).then((r) => {
this.form.offerNumber = r.data
getOffer(v).then((r) => {
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 {
this.form.offerNumber = ""
......@@ -406,7 +423,7 @@ export default {
this.$modal.msgError(this.$t("请选择跟进方式"))
return
}
if (!this.form.offerId && this.form.followType == 2) {
if (this.form.followType === 2 && !this.form.offerId) {
this.$modal.msgError(this.$t("请选择报价单"))
return
}
......@@ -414,6 +431,35 @@ export default {
if (status === 0) {
this.saveSubmitData(status)
} 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("提示"), {
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
......
......@@ -29,7 +29,7 @@
<script>
import {DICT_TYPE, getDictDatas, getDictDatas2} from "@/utils/dict";
import {getCustomerFollowList, updateCustomerFollowupStatus} from "@/api/ecw/customerFollow";
import {getCustomerFollowupList, updateCustomerFollowupStatus} from "@/api/ecw/customerFollow";
export default {
name: "customerFollowUpdateStatus",
......@@ -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() {
this.status = null;
this.$emit('update:show', false)
......
......@@ -79,12 +79,12 @@
</template>
</el-input>
</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-option :label="item.titleZh" :value="item.id" v-for="item in productTypeList" :key="item.id" />
</el-select>
</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-option :label="item.titleZh" :value="parseInt(item.id)" v-for="item in productList" :key="item.id" />
</el-select>
......@@ -666,7 +666,7 @@
<el-button @click="cancel">{{ $t("取 消") }}</el-button>
</div>
</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-complaints :customer-id="customerId" ref="customerComplaints"></customer-complaints>
<transfer-customer :show.sync="transferShow" :customer-ids.sync="selectCustomerList"></transfer-customer>
......
......@@ -377,7 +377,7 @@
<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/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/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>
......@@ -394,7 +394,7 @@
</el-card>
</el-tab-pane>
<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 name="complain" :label="$t('客户投诉')">
<customer-complaint v-if="activeName === 'complain'" ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint>
......@@ -672,12 +672,12 @@
</div>
</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>
</template>
<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 { DICT_TYPE, getDictDataLabel, getDictDatas2 } from "@/utils/dict"
import { getProductTypeList } from "@/api/ecw/productType"
......@@ -695,25 +695,23 @@ import { getCurrencyList } from "@/api/ecw/currency"
import customerLog from "@/views/ecw/customer/customerLog.vue"
import { checkPermi } from "@/utils/permission"
import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue"
import { getListTree } from "@/api/ecw/region"
import { getWarehouseList } from "@/api/ecw/warehouse"
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 LogListCustomerCommon from "@/views/ecw/offer/logListCustomerCommon.vue";
export default {
name: "query",
components: {
LogListCustomerCommon,
UserSelector,
ImageDisplay,
Template,
CustomerFollow,
CustomerComplaint,
customerLog,
logListCommon
customerLog
},
created() {
// 获取币种
......@@ -1286,7 +1284,7 @@ export default {
this.getInfoListOfferPage()
} else if (this.activeName == "follow") {
this.followForm.pageNo = 1
this.getCustomerFollowList()
this.getCustomerFollowupList()
}
},
getWarehouseList() {
......@@ -1323,8 +1321,8 @@ export default {
this.handleQuery()
})
},
logListCommonRefresh() {
this.$refs.logListCommon && this.$refs.logListCommon.handleQuery()
logListCustomerCommonRefresh() {
this.$refs.logListCustomerCommon && this.$refs.logListCustomerCommon.handleQuery()
}
}
}
......
......@@ -372,7 +372,7 @@
</el-table>
<!-- 分页组件 -->
<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-complaints ref="customerComplaint" :customer-id.sync="customerId"></customer-complaints>
<transfer-customer :show.sync="show" :customer-ids.sync="selectCustomerList"></transfer-customer>
......
......@@ -62,11 +62,10 @@
</el-descriptions>
</div>
</el-card>
<el-card class="card">
<div slot="header" class="card-title">{{ $t("运输") }}</div>
<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, "destCountryTitle") }} - {{ $l(list.logisticsInfoDto, "destCityTitle") }} - {{ $l(list.logisticsInfoDto, "destTitle") }} </el-descriptions-item>
<el-descriptions-item :label="$t('运输方式')">
......
......@@ -1088,9 +1088,11 @@ export default {
},
activated() {
if (this.$route.query.id && this.form.offerId !== this.$route.query.id) {
// if (this.$route.query.id) {
this.getOffer()
}
if (this.$route.query.copyId && this.form.copyId !== this.$route.query.copyId) {
// if (this.$route.query.copyId) {
this.getOffer()
}
},
......@@ -1105,7 +1107,7 @@ export default {
getRegionList(4, 4).then((res) => (this.AddressCity = 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()
} else {
// alert(this.$route.query.customer.defaultContactPhone)
......@@ -1126,7 +1128,7 @@ export default {
}
}
} else {
this.form.relation = 1
// this.form.relation = 1
}
},
methods: {
......@@ -1148,10 +1150,11 @@ export default {
//加了是否从全部客户列表中报价按钮进来的判断
if (this.$route.query.type !== 1) {
getOffer(this.$route.query.id || this.$route.query.copyId).then((res) => {
console.log("报价单信息", res.data)
let formData = res.data
formData.serviceType = formData.serviceType ? formData.serviceType.split(",").filter((item) => item != "") : []
console.log(formData.serviceType)
console.log(formData)
formData.prodCreateReqVOList = []
if (formData.transportVO && formData.transportVO.packageType) {
formData.transportVO.packageTypeArr = formData.transportVO.packageType.split(",").filter((item) => item && item != "")
......@@ -1195,18 +1198,26 @@ export default {
formData.channelId = formData.channelId || null
this.$set(this, "form", formData)
console.log("报价单归属", this.form.relation == 1? "发货人":"收货人")
// 接口只返回了发货人和收货人ID,还需要调用接口获取详细信息回显
getCustomerContactsSelect({
ids: [res.data.consigneeId, res.data.consignorId].join(",")
}).then(({ data }) => {
this.contactChooseType = "consignee"
this.onContactChoose(data.list.find((item) => item.customerContactsId == res.data.consigneeId))
this.contactChooseType = "consignor"
this.onContactChoose(data.list.find((item) => item.customerContactsId == res.data.consignorId))
this.onContactAssignValueBackToDisplay(data.list.find((item) => item.customerContactsId == res.data.consigneeId), "consignee")
this.onContactAssignValueBackToDisplay(data.list.find((item) => item.customerContactsId == res.data.consignorId), "consignor")
})
})
}
},
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) {
if (!contact) return
......
......@@ -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>
</template>
</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="relationPhone" width="150" />
<el-table-column :label="$t('重要程序')" align="center" prop="importance" />
......@@ -554,7 +564,12 @@ export default {
this.loading = false
})
},
handleCustomerFollowLink(row) {
this.customerFollowVisible = true
this.$nextTick((_) => {
this.$refs["customerFollow"].handleView(row)
})
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1
......
......@@ -41,12 +41,15 @@
</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="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>
</div>
</el-form-item>
......@@ -121,7 +124,7 @@
</template>
</el-table-column>
</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>
<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>
......@@ -129,7 +132,7 @@
</template>
<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 CustomerFollow from "@/views/ecw/customer/components/customerFollow"
import UserSelector from "@/components/UserSelector"
......@@ -155,6 +158,7 @@ export default {
pageSize: 10
},
followFormTmp: {
createTime: ["", ""],
nextTime: ["", ""]
}
}
......@@ -186,7 +190,7 @@ export default {
watch: {
selectCustomerFollowList(val) {
if (val.length === 0) {
this.getCustomerFollowList()
this.getDataSpaceCustomerFollowupList()
this.$refs.multipleTable.clearSelection()
}
},
......@@ -233,6 +237,8 @@ export default {
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
......@@ -243,13 +249,13 @@ export default {
this.followForm.pageNo = 1
this.customerFollowTotal = 0
this.customerFollowList = []
this.getCustomerFollowList()
this.getDataSpaceCustomerFollowupList()
},
/** 跟进记录导出按钮操作 */
handleExport() {
// 执行导出
this.$modal.confirm(this.$t("是否确认导出客户跟进记录数据项?")).then(() => {
exportCustomerFollow({
exportDataSpaceCustomerFollowup({
...this.followForm,
...this.formatQuery(),
pageNo: null,
......@@ -259,9 +265,9 @@ export default {
})
})
},
getCustomerFollowList() {
getDataSpaceCustomerFollowupList() {
this.loading = true
getCustomerFollowList({
getDataSpaceCustomerFollowupList({
...this.followForm,
...this.formatQuery()
}).then((r) => {
......@@ -271,12 +277,13 @@ export default {
})
},
reset() {
this.followFormTmp.createTime = ["", ""]
this.followFormTmp.nextTime = ["", ""]
this.followForm = {
pageNo: 1,
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 @@
</template>
<script>
import {parseTime} from '@/utils/ruoyi'
import {getLadingBill} from '@/api/ecw/order'
import lodop from '@/utils/lodop'
import PdfViewer from '@/components/PdfViewer'
import FileSaver from 'file-saver'
......
......@@ -63,10 +63,20 @@
</el-form-item>
</div>
</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>
<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 :label="true">{{ $t('') }}</el-radio>
<el-radio :label="false">{{ $t('') }}</el-radio>
......@@ -754,7 +764,7 @@ import Selector from '@/components/Selector'
import CustomerContactSelector from '@/components/CustomerContactSelector'
import {getGuojiaAndShiAndWarehouseList, openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse'
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 {getUnitList} from '@/api/ecw/unit'
import AreaSelector from '@/components/AreaSelector'
......@@ -770,6 +780,7 @@ import {getCustomer} from "@/api/ecw/customer";
import {debounce} from "@/utils";
import {getOfferSelect, getOfferCheck} from "@/api/ecw/offer"
import Template from '@/views/cms/template/index.vue'
import {checkBillOfLadingService} from "@/api/ecw/box";
// 缓存默认的表单数据
let makeDefaultFormData = () => {
......@@ -818,6 +829,7 @@ export default {
callback();
}
return {
DICT_TYPE,
validatorPositiveNumber,
customDraweeList: [],
// draweeList: [],
......@@ -1347,11 +1359,11 @@ export default {
// 默认不允许控货无收货人
this.noConsignee = false
}
// 如果订单无收货人,但是最新的发货人允许无收货人则重置状态
if (this.noConsignee && !this.hasConsignee) {
// 最新的发货人允许无收货人,则重置为有收货人
this.hasConsignee = true
}
// // 如果订单无收货人,但是最新的发货人允许无收货人则重置状态
// if (this.noConsignee && !this.hasConsignee) {
// // 最新的发货人允许无收货人,则重置为有收货人
// this.hasConsignee = true
// }
})
},
async getOrder() {
......@@ -1414,7 +1426,7 @@ export default {
// 是否有收货人
this.hasConsignee = !!res.data.consigneeVO
// this.hasConsignee = !!res.data.consigneeVO
if (this.form.channelId == 0) {
delete this.form.channelId
......@@ -1515,9 +1527,9 @@ export default {
this.hasConsignee = false
}*/
// 如果发货人不允许无收货人,则重置为有收货人
if (!this.noConsignee && !this.hasConsignee) {
this.$set(this, 'hasConsignee', true)
}
// if (!this.noConsignee && !this.hasConsignee) {
// this.$set(this, 'hasConsignee', true)
// }
// 如果默认付款则设置为发货人付款
if (contact.defaultPay) {
this.$set(this.form, 'drawee', 1)
......@@ -1698,6 +1710,12 @@ export default {
}
});
}
},
checkBillOfLading(){
return checkBillOfLadingService(this.form.orderId).then((res) => {
console.log("检查提单制作状态" , res.data)
return res.data
})
},
/** 提交按钮 */
// type 在新建的时候表示状态,0草稿,2带入仓
......@@ -1778,7 +1796,7 @@ export default {
// 修改的提交
if (this.form.orderId) {
if (this.form.tidanNo) {
if (await this.checkBillOfLading()) {
await this.$confirm(this.$t('提单已制作,如需修改请联系客服'))
}
let data = Object.assign({}, this.form, {
......
......@@ -332,7 +332,7 @@
<el-dropdown-menu slot="dropdown">
<!--出货订单编辑,shipmentState > 0表示出货后,inWarehouseState == 0 表示预装未审核或者是卸柜到仓 , shipmentState==307 表示已预装,待封柜, shipmentState==407 表示已预装,待封柜)-->
<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
@click.native="handleUpdate(scope.row)"
......@@ -348,7 +348,7 @@
scope.row.shipmentState == 314)) &&
!scope.row.abnormalState &&
exclude(scope.row.inWarehouseState, [204, 205, 206]) &&
exclude(scope.row.shipmentState, [307, 407])
exclude(scope.row.shipmentState, [305, 307, 407])
"
>
<el-dropdown-item
......@@ -474,12 +474,12 @@
<el-button type="text">{{ $t("仓库") }}</el-button>
<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>
</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
@click.native="$router.push('/order/warehousing-add?shipment=1&id=' + scope.row.orderId)"
......@@ -492,7 +492,7 @@
include(
scope.row.inWarehouseState,
[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
......@@ -507,7 +507,7 @@
</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
@click.native="$router.push('/order/warehousing-update?shipment=1&id=' + scope.row.orderId)"
......@@ -525,7 +525,7 @@
]
) &&
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
......@@ -611,7 +611,7 @@
>
</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
@click.native="
$router.push({
......
......@@ -232,7 +232,7 @@ export default {
isAllProduct: false, // 是否全部商品
isAllFilteredProduct: false, // 是否勾選全部搜索結果
specialProducts: [],
rules() {},
rules: {},
product: null,
currencyList: [],
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