Commit 1ccd9c22 authored by 332784038@qq.com's avatar 332784038@qq.com

Merge branch 'dev' into test

# Conflicts:
#	src/views/ecw/order/index.vue
parents 0b11ea75 39da2846
...@@ -6,7 +6,7 @@ VUE_APP_TITLE = 捷道管理系统-测试站 ...@@ -6,7 +6,7 @@ VUE_APP_TITLE = 捷道管理系统-测试站
# 捷道管理系统/开发环境 # 捷道管理系统/开发环境
VUE_APP_BASE_API = 'https://apitest.groupage.cn' VUE_APP_BASE_API = 'https://devapi.jd.qipx.top'
# VUE_APP_BASE_API = 'http://110.41.143.128:48080' # VUE_APP_BASE_API = 'http://110.41.143.128:48080'
# VUE_APP_BASE_API = 'http://127.0.0.1:48080' # VUE_APP_BASE_API = 'http://127.0.0.1:48080'
......
import request from '@/utils/request' import request from "@/utils/request"
// 创建跟进 // 创建跟进
export function createCustomerFollow(data) { export function createCustomerFollow(data) {
return request({ return request({
url: '/ecw/customer-follow/create', url: "/ecw/customer-follow/create",
method: 'post', method: "post",
data: data data: data
}) })
} }
...@@ -12,8 +12,8 @@ export function createCustomerFollow(data) { ...@@ -12,8 +12,8 @@ export function createCustomerFollow(data) {
// 更新跟进 // 更新跟进
export function updateCustomerFollow(data) { export function updateCustomerFollow(data) {
return request({ return request({
url: '/ecw/customer-follow/update', url: "/ecw/customer-follow/update",
method: 'put', method: "put",
data: data data: data
}) })
} }
...@@ -21,31 +21,31 @@ export function updateCustomerFollow(data) { ...@@ -21,31 +21,31 @@ export function updateCustomerFollow(data) {
// 删除跟进 // 删除跟进
export function deleteCustomerFollow(id) { export function deleteCustomerFollow(id) {
return request({ return request({
url: '/ecw/customer-follow/delete?id=' + id, url: "/ecw/customer-follow/delete?id=" + id,
method: 'delete' method: "delete"
}) })
} }
// 获得跟进 // 获得跟进
export function getCustomerFollow(id) { export function getCustomerFollow(id) {
return request({ return request({
url: '/ecw/customer-follow/get?id=' + id, url: "/ecw/customer-follow/get?id=" + id,
method: 'get' method: "get"
}) })
} }
// 获得跟进分页 // 获得跟进分页
export function getCustomerFollowPage(query) { export function getCustomerFollowPage(query) {
return request({ return request({
url: '/customer/detail/infoList/followPage', url: "/customer/detail/infoList/followPage",
method: 'get', method: "get",
params: query params: query
}) })
} }
export function getCustomerFollowPage2(query) { export function getCustomerFollowPage2(query) {
return request({ return request({
url: '/ecw/customer-follow/page', url: "/ecw/customer-follow/page",
method: 'get', method: "get",
params: query params: query
}) })
} }
...@@ -53,50 +53,56 @@ export function getCustomerFollowPage2(query) { ...@@ -53,50 +53,56 @@ export function getCustomerFollowPage2(query) {
// 导出跟进 Excel // 导出跟进 Excel
export function exportCustomerFollowExcel(query) { export function exportCustomerFollowExcel(query) {
return request({ return request({
url: '/ecw/customer-follow/export-excel', url: "/ecw/customer-follow/export-excel",
method: 'get', method: "get",
params: query, params: query,
responseType: 'blob' responseType: "blob"
}) })
} }
export function getCustomerFollowList(params) { export function getCustomerFollowList(params) {
return request({ return request({
url: '/customer/followup/page', url: "/customer/followup/page",
method: 'get', method: "get",
params params
}) })
} }
export function getCustomerFollowDetail(params) { export function getCustomerFollowDetail(params) {
return request({ return request({
url: '/customer/followup/get', url: "/customer/followup/get",
method: 'get', method: "get",
params params
}) })
} }
export function addCustomerFollow(data) { export function addCustomerFollow(data) {
return request({ return request({
url: '/customer/followup/create', url: "/customer/followup/create",
method: 'post', method: "post",
data data
}) })
} }
export function editCustomerFollow(data) { export function editCustomerFollow(data) {
return request({ return request({
url: '/customer/followup/update', url: "/customer/followup/update",
method: 'put', method: "put",
data data
}) })
} }
export function exportCustomerFollow(params) { export function exportCustomerFollow(params) {
return request({ return request({
url: '/customer/followup/export-excel', url: "/customer/followup/export-excel",
method: 'get', method: "get",
params params
}) })
} }
export function getFollowupNewNumber() {
return request({
url: "/customer/followup/getFollowupNewNumber",
method: "get"
})
}
<template> <template>
<div class="customer-follow"> <div class="customer-follow">
<el-dialog append-to-body :title="$t('客户跟进')" :visible.sync="customerFollow.dialogVisible" :before-close="customerFollowClose" width="900px"> <el-dialog append-to-body :title="$t('客户跟进')" :visible.sync="customerFollow.dialogVisible" :before-close="customerFollowClose" width="900px">
<el-form ref="customerFollowForm" :model="form" label-width="120px"> <el-form ref="customerFollowForm" :model="form" label-width="120px">
<el-row :gutter="10"> <el-row :gutter="10">
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('客户编号')"> <el-form-item :label="$t('客户编号')">
<el-input v-model="customerNumber" :placeholder="$t('请输入客户编号')" disabled /> <el-input v-model="form.customerNumber" :placeholder="$t('请输入客户编号')" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
...@@ -27,13 +27,6 @@ ...@@ -27,13 +27,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!--
<el-col :span="13">
<el-form-item :label="$t('报价单')">
<el-input v-model="form.offerId" :placeholder="$t('请输入报价单')" disabled />
</el-form-item>
</el-col>
-->
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('跟进时间')" required> <el-form-item :label="$t('跟进时间')" required>
<el-date-picker v-model="form.followTime" clearable type="datetime" :placeholder="$t('请选择')" :disabled="isView" /> <el-date-picker v-model="form.followTime" clearable type="datetime" :placeholder="$t('请选择')" :disabled="isView" />
...@@ -42,16 +35,14 @@ ...@@ -42,16 +35,14 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('联系人')" required> <el-form-item :label="$t('联系人')" required>
<el-select v-model="form.contactId" clearable :placeholder="$t('请选择')" :disabled="isView" @change="changeContactUser"> <el-select v-model="form.contactId" clearable :placeholder="$t('请选择')" :disabled="isView" @change="changeContactUser">
<el-option v-for="(item, index) in customerContactsList" :key="index" :label="item.name" :value="item.id"> <el-option v-for="(item, index) in customerContactsList" :key="index" :label="item.name" :value="item.id"> </el-option>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('客户经理')" required> <el-form-item :label="$t('客户经理')" required>
<el-select v-model="form.followUserId" clearable :placeholder="$t('请选择')" :disabled="isView"> <el-select v-model="form.followUserId" clearable :placeholder="$t('请选择')" :disabled="isView">
<el-option v-for="item in serviceUserList" :key="item.id" :label="item.nickname" :value="item.id"> <el-option v-for="item in serviceUserList" :key="item.id" :label="item.nickname" :value="item.id"> </el-option>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -82,6 +73,11 @@ ...@@ -82,6 +73,11 @@
<el-input rows="3" class="text_style" type="textarea" v-model="form.feedback" maxlength="500" show-word-limit :disabled="isView" /> <el-input rows="3" class="text_style" type="textarea" v-model="form.feedback" maxlength="500" show-word-limit :disabled="isView" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="20">
<el-form-item
><el-button size="mini" v-if="isView" type="text" icon="el-icon-collection" @click="$emit(handleCustomerFollowAdd, form)" v-has-permi="['ecw:customer:follow-add-plan']">{{ $t("增加计划") }} </el-button>
</el-form-item>
</el-col>
<el-col :span="20"> <el-col :span="20">
<el-form-item :label="$t('附件')" prop="attatchment"> <el-form-item :label="$t('附件')" prop="attatchment">
<FileUpload :limit="5" :isShowTip="true" v-model="form.attatchment" :fileType="fileType" :disabled="isView" /> <FileUpload :limit="5" :isShowTip="true" v-model="form.attatchment" :fileType="fileType" :disabled="isView" />
...@@ -89,8 +85,7 @@ ...@@ -89,8 +85,7 @@
</el-col> </el-col>
<el-col :span="13"> <el-col :span="13">
<el-form-item :label="$t('下次跟进时间')"> <el-form-item :label="$t('下次跟进时间')">
<el-date-picker v-model="form.nextTime" type="datetime" :placeholder="$t('请选择')" :disabled="isView" @change="changeNextTime"> <el-date-picker v-model="form.nextTime" type="datetime" :placeholder="$t('请选择')" :disabled="isView" @change="changeNextTime"> </el-date-picker>
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="20"> <el-col :span="20">
...@@ -101,76 +96,50 @@ ...@@ -101,76 +96,50 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('创建人')" prop="founder"> <el-form-item :label="$t('创建人')" prop="founder">
<el-select v-model="form.creatorName" disabled :placeholder="$t('请选择')"> <el-select v-model="form.creatorName" disabled :placeholder="$t('请选择')">
<el-option v-for="item in allSimplList" :key="item.id" :label="item.nickname" :value="item.id"> <el-option v-for="item in allSimplList" :key="item.id" :label="item.nickname" :value="item.id"> </el-option>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('创建时间')" prop="createTime"> <el-form-item :label="$t('创建时间')" prop="createTime">
<el-date-picker v-model="form.createTime" type="datetime" disabled :placeholder="$t('请选择')"> <el-date-picker v-model="form.createTime" type="datetime" disabled :placeholder="$t('请选择')"> </el-date-picker>
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('最后更新人')"> <el-form-item :label="$t('最后更新人')">
<el-select v-model="form.updaterName" disabled> <el-select v-model="form.updaterName" disabled>
<el-option v-for="item in allSimplList" :key="item.id" :label="item.nickname" :value="item.id"> <el-option v-for="item in allSimplList" :key="item.id" :label="item.nickname" :value="item.id"> </el-option>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('最后更新时间')"> <el-form-item :label="$t('最后更新时间')">
<el-date-picker v-model="form.updateTime" type="datetime" disabled :placeholder="$t('请选择')"> <el-date-picker v-model="form.updateTime" type="datetime" disabled :placeholder="$t('请选择')"> </el-date-picker>
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer" v-if="isView"> <div slot="footer" class="dialog-footer" v-if="isView">
<el-button type="warning" @click="customerFollowClose">{{$t('关 闭')}}</el-button> <el-button type="warning" @click="customerFollowClose">{{ $t("关 闭") }}</el-button>
</div> </div>
<div slot="footer" class="dialog-footer" v-else> <div slot="footer" class="dialog-footer" v-else>
<el-button type="warning" @click="goBack">{{$t('返 回')}}</el-button> <el-button type="warning" @click="goBack">{{ $t("返 回") }}</el-button>
<el-button type="primary" @click="customerFollowSubmit(0)">{{$t('保 存')}}</el-button> <el-button type="primary" @click="customerFollowSubmit(0)">{{ $t("保 存") }}</el-button>
<el-button type="success" @click="customerFollowSubmit(1)" v-if="isEdit">{{$t('提交结果')}}</el-button> <el-button type="success" @click="customerFollowSubmit(1)">{{ $t("提交结果") }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div>
<customer-follow-select-offer :customer-id="customerId" ref="customerFollowSelectOffer" @select="selectOffer" />
</div>
</template> </template>
<script> <script>
import { import { createCustomerFollow, getCustomerFollowPage, getCustomerFollowPage2, addCustomerFollow, getCustomerFollowList, editCustomerFollow, getFollowupNewNumber } from "@/api/ecw/customerFollow"
createCustomerFollow,
getCustomerFollowPage,
getCustomerFollowPage2,
addCustomerFollow,
getCustomerFollowList,
editCustomerFollow
} from "@/api/ecw/customerFollow"
import { getOfferPage } from "@/api/ecw/offer" import { getOfferPage } from "@/api/ecw/offer"
import CustomerFollowSelectOffer from "./customerFollowSelectOffer"; import { DICT_TYPE, getDictDataLabel } from "@/utils/dict"
import { import { getCustomerContactsListByCustomer } from "@/api/ecw/customerContacts"
DICT_TYPE, import { listAllSimpl, listServiceUser, listSimpleUsers } from "@/api/system/user"
getDictDataLabel import { parseTime } from "@/utils/ruoyi"
} from '@/utils/dict' import FileUpload from "@/components/FileUpload/fileUpload"
import { import { formatDate } from "@/utils/index"
getCustomerContactsListByCustomer
} from '@/api/ecw/customerContacts'
import {
listAllSimpl,
listServiceUser,
listSimpleUsers,
} from "@/api/system/user";
import {
parseTime
} from '@/utils/ruoyi'
import FileUpload from "@/components/FileUpload/fileUpload";
import {formatDate} from "@/utils/index";
export default { export default {
/** /**
* 客户跟进 * 客户跟进
...@@ -181,18 +150,12 @@ export default { ...@@ -181,18 +150,12 @@ export default {
/** /**
* 如果是客户投诉跟进,则id为客户投诉id;如果是客户跟进,则id为客户id * 如果是客户投诉跟进,则id为客户投诉id;如果是客户跟进,则id为客户id
*/ */
id: Number,
customerId: Number, customerId: Number,
customerQuery: {
type: Boolean,
default: false
},
customerNumber: String, customerNumber: String,
customerService: Number customerService: Number
}, },
components: { components: {
FileUpload, FileUpload
CustomerFollowSelectOffer
}, },
data() { data() {
return { return {
...@@ -207,7 +170,7 @@ export default { ...@@ -207,7 +170,7 @@ export default {
customerFollow: { customerFollow: {
dialogVisible: false, dialogVisible: false,
form: { form: {
followType: '3' followType: "3"
} }
}, },
offerDialogVisible: true, offerDialogVisible: true,
...@@ -219,9 +182,8 @@ export default { ...@@ -219,9 +182,8 @@ export default {
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() <= Date.now() return time.getTime() <= Date.now()
}
}, },
},
isEdit: true,
followTime: [], followTime: [],
nextTime: [], nextTime: [],
queryParams: { queryParams: {
...@@ -235,49 +197,41 @@ export default { ...@@ -235,49 +197,41 @@ export default {
}, },
computed: { computed: {
isChinese() { isChinese() {
return this.$i18n.locale === 'zh_CN' return this.$i18n.locale === "zh_CN"
} }
}, },
created() { created() {
this.init() this.init()
// this.resetCustomerFollowForm() listServiceUser().then((r) => {
listServiceUser().then(r => {
// console.log( r.data,'r.data跟进业务')
this.serviceUserList = r.data this.serviceUserList = r.data
}) })
listAllSimpl().then((r) => { listAllSimpl().then((r) => {
this.allSimplList = r.data; this.allSimplList = r.data
}); })
// this.getCustomerFollowList()
// this.reset()
}, },
methods: { methods: {
init() { init() {
if (!!this.customerId) getCustomerContactsListByCustomer({ if (!!this.customerId)
getCustomerContactsListByCustomer({
customerId: this.customerId customerId: this.customerId
}).then(r => { }).then((r) => {
this.customerContactsList = r.data this.customerContactsList = r.data
// this.form.customerId = this.customerId
// this.form.bizId = this.id
}) })
}, },
getOfferList() { getOfferList() {
getOfferPage(this.queryParams).then(response => { getOfferPage(this.queryParams).then((response) => {
this.offerList = response.data.list; this.offerList = response.data.list
this.offerTotal = response.data.total; this.offerTotal = response.data.total
}); })
}, },
handleFollowType(val) { handleFollowType(val) {
console.log(val) console.log(val)
if (val == '2') { if (val == "2") {
this.$refs['customerFollowSelectOffer'].offerDialogVisible = true this.$refs["customerFollowSelectOffer"].offerDialogVisible = true
} else { } else {
this.form.offerId = undefined this.form.offerId = undefined
} }
}, },
selectOffer(offerId) {
this.form.offerId = offerId
},
reset() { reset() {
this.form = { this.form = {
attatchment: undefined, attatchment: undefined,
...@@ -285,6 +239,7 @@ export default { ...@@ -285,6 +239,7 @@ export default {
contactName: undefined, contactName: undefined,
contactPhone: undefined, contactPhone: undefined,
customerId: this.customerId, customerId: this.customerId,
customerNumber: this.customerNumber,
feedback: undefined, feedback: undefined,
followMethod: undefined, followMethod: undefined,
followTime: new Date().getTime(), followTime: new Date().getTime(),
...@@ -303,7 +258,7 @@ export default { ...@@ -303,7 +258,7 @@ export default {
createTime: new Date().getTime(), createTime: new Date().getTime(),
updaterName: this.$store.getters.userId, updaterName: this.$store.getters.userId,
updateTime: new Date().getTime() updateTime: new Date().getTime()
}; }
}, },
changeNextTime(val) { changeNextTime(val) {
if (val) { if (val) {
...@@ -317,7 +272,7 @@ export default { ...@@ -317,7 +272,7 @@ export default {
}, },
changeContactUser(val) { changeContactUser(val) {
if (val) { if (val) {
for(const item of this.customerContactsList) { for (const item of this.customerContactsList) {
if (item.id == val) { if (item.id == val) {
this.form.contactName = item.name this.form.contactName = item.name
// this.form.contactPhone = `+${item.areaCode}${item.phoneNew}` // this.form.contactPhone = `+${item.areaCode}${item.phoneNew}`
...@@ -331,38 +286,38 @@ export default { ...@@ -331,38 +286,38 @@ export default {
}, },
customerFollowSubmit(status) { customerFollowSubmit(status) {
console.log(this.form) console.log(this.form)
this.$refs["customerFollowForm"].validate(valid => { this.$refs["customerFollowForm"].validate((valid) => {
if (!valid) { if (!valid) {
return return
} }
if (!this.form.followType) { if (!this.form.followType) {
this.$modal.msgError(this.$t("请选择跟进类型")); this.$modal.msgError(this.$t("请选择跟进类型"))
return return
} }
if (!this.form.followTime) { if (!this.form.followTime) {
this.$modal.msgError(this.$t('请选择跟进时间')); this.$modal.msgError(this.$t("请选择跟进时间"))
return return
} }
if (!this.form.contactName) { if (!this.form.contactName) {
this.$modal.msgError(this.$t('请选择联系人')); this.$modal.msgError(this.$t("请选择联系人"))
return return
} }
if (!this.form.followUserId) { if (!this.form.followUserId) {
this.$modal.msgError(this.$t('请选择客户经理')); this.$modal.msgError(this.$t("请选择客户经理"))
return return
} }
if (!this.form.followMethod) { if (!this.form.followMethod) {
this.$modal.msgError(this.$t('请选择跟进方式')); this.$modal.msgError(this.$t("请选择跟进方式"))
return return
} }
if (status === 0) { if (status === 0) {
this.saveSubmitData(status) this.saveSubmitData(status)
} else { } else {
this.$confirm(this.$t('提交后无法修改'), this.$t('提示'), { this.$confirm(this.$t("提交后无法修改"), this.$t("提示"), {
confirmButtonText: this.$t('确定'), confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t('取消'), cancelButtonText: this.$t("取消"),
type: 'warning' type: "warning"
}).then(() => { }).then(() => {
this.saveSubmitData(status) this.saveSubmitData(status)
}) })
...@@ -376,68 +331,24 @@ export default { ...@@ -376,68 +331,24 @@ export default {
followTime: this.form.followTime ? formatDate(this.form.followTime) : undefined, followTime: this.form.followTime ? formatDate(this.form.followTime) : undefined,
nextTime: this.form.nextTime ? formatDate(this.form.nextTime) : undefined, nextTime: this.form.nextTime ? formatDate(this.form.nextTime) : undefined,
status status
}).then(r => { }).then((r) => {
this.$message.success(this.$t("操作成功")) this.$message.success(this.$t("操作成功"))
this.$emit('refresh') this.$emit("refresh")
this.customerFollowClose() this.customerFollowClose()
}) })
}, },
goBack() { goBack() {
this.$confirm(this.$t('是否确认不保存信息'), this.$t('提示'), { this.$confirm(this.$t("是否确认不保存信息"), this.$t("提示"), {
confirmButtonText: this.$t('确定'), confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t('取消'), cancelButtonText: this.$t("取消"),
type: 'warning' type: "warning"
}).then(() => { }).then(() => {
this.customerFollowClose() this.customerFollowClose()
}) })
}, },
customerFollowClose() { customerFollowClose() {
// this.resetCustomerFollowForm()
this.customerFollow.dialogVisible = false this.customerFollow.dialogVisible = false
}, },
resetCustomerFollowForm() {
this.reset()
// this.$refs.dictType.changeValue(this.customerFollow.form.followType);
this.$refs.dictMethod.changeValue(this.customerFollow.form.followMethod);
},
handleQuery() {
this.pageNo = 1
this.queryParams.pageNo = 1
this.followTime = []
this.getCustomerFollowList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams = {
followType: null,
followMethod: null,
resultType: null,
status: null
};
this.handleQuery();
},
getCustomerFollowList() {
if (this.customerQuery) {
getCustomerFollowList({
customerId: this.customerId,
pageNo: this.pageNo,
pageSize: this.pageSize
}).then(r => {
this.$message.info(this.$t("操作成功"))
this.$emit('refresh')
})
} else {
getCustomerFollowPage2({
bizId: this.id,
followType: 3,
pageNo: this.pageNo,
pageSize: this.pageSize
}).then(r => {
this.$emit('refresh')
})
}
},
handleView(row) { handleView(row) {
this.isView = true this.isView = true
this.form = row this.form = row
...@@ -445,29 +356,34 @@ export default { ...@@ -445,29 +356,34 @@ export default {
}, },
handleAdd() { handleAdd() {
this.isView = false this.isView = false
this.isEdit = true
this.customerFollow.dialogVisible = true this.customerFollow.dialogVisible = true
this.reset() this.reset()
}, },
handleUpdate(row, flag) { async handleUpdate(row, flag) {
this.isView = false this.isView = false
this.isEdit = flag
this.customerFollow.dialogVisible = true this.customerFollow.dialogVisible = true
if (flag) { if (!flag) {
this.form = row this.form = row
} else { } else {
let r = await getFollowupNewNumber()
console.log(r)
this.form = { this.form = {
...row, ...row,
parentNumber: row.number parentNumber: row.number,
followTime: row.nextTime,
nextTime: "",
number: r.data,
nextPlan: ""
}
} }
} }
},
} }
} }
</script> </script>
<style scoped> <style scoped>
.text_style{ .text_style {
white-space: pre-wrap; white-space: pre-wrap;
} }
</style> </style>
<template xmlns=""> <template xmlns="">
<el-row <el-row type="flex" style="margin: 15px 0" justify="center">
type="flex"
style="margin: 15px 0"
justify="center"
>
<el-col :xs="24" :sm="24" :md="24" :lg="22" :xl="20"> <el-col :xs="24" :sm="24" :md="24" :lg="22" :xl="20">
<el-form ref="form" :model="form" :rules="rules" label-width="150px"> <el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span class="title-text">{{ $t('基本') }}</span> <span class="title-text">{{ $t("基本") }}</span>
<el-button <el-button style="float: right" size="small" type="primary" @click="showBaseFlag = !showBaseFlag">{{ showBaseFlag ? $t("隐藏") : $t("更多") }}</el-button>
style="float: right"
size="small"
type="primary"
@click="showBaseFlag = !showBaseFlag"
>{{showBaseFlag ? $t('隐藏') : $t('更多')}}</el-button
>
</div> </div>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('客户名称')" prop="name"> <el-form-item :label="$t('客户名称')" prop="name">
<el-input <el-input v-model="form.name" :placeholder="$t('请输入客户名称')" />
v-model="form.name"
:placeholder="$t('请输入客户名称')"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('客户英文名称')"> <el-form-item :label="$t('客户英文名称')">
<el-input <el-input v-model="form.nameEn" :placeholder="$t('请输入客户英文名称')"></el-input>
v-model="form.nameEn"
:placeholder="$t('请输入客户英文名称')"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('客户来源')" prop="source"> <el-form-item :label="$t('客户来源')" prop="source">
<el-select <el-select v-model="form.source" :placeholder="$t('请选择客户来源')">
v-model="form.source" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
:placeholder="$t('请选择客户来源')"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('国籍')" prop="country"> <el-form-item :label="$t('国籍')" prop="country">
<el-select <el-select filterable clearable v-model="form.country" :placeholder="$t('请选择国家')">
filterable <el-option v-for="dict in countryList" :key="dict.id" :label="isChinese ? dict.nameZh : dict.nameEn" :value="parseInt(dict.id)" />
clearable
v-model="form.country"
:placeholder="$t('请选择国家')"
>
<el-option
v-for="dict in countryList"
:key="dict.id"
:label="isChinese ? dict.nameZh : dict.nameEn"
:value="parseInt(dict.id)"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('客户经理')" prop="customerService"> <el-form-item :label="$t('客户经理')" prop="customerService">
<el-select <el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')" :disabled="(customerId !== '0' && $route.name !== 'allocatedCustomerEdit') || isCustomerServiceConfirmed">
v-model="form.customerService" <el-option v-for="item in !((customerId !== '0' && $route.name !== 'allocatedCustomerEdit') || isCustomerServiceConfirmed) ? serviceUserList : allSimplList" :key="item.id" :label="item.nickname" :value="item.id" />
:placeholder="$t('请选择客户经理')"
:disabled="
(customerId !== '0' &&
$route.name !== 'allocatedCustomerEdit') ||
isCustomerServiceConfirmed
"
>
<el-option
v-for="item in !(
(customerId !== '0' &&
$route.name !== 'allocatedCustomerEdit') ||
isCustomerServiceConfirmed
)
? serviceUserList
: allSimplList"
:key="item.id"
:label="item.nickname"
:value="item.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('推介人')" prop="promoter"> <el-form-item :label="$t('推介人')" prop="promoter">
<el-select <el-select clearable remote :remote-method="remoteMethod" v-model="form.promoter" :placeholder="$t('请输入推介人')" filterable>
clearable <el-option v-for="item in customerSelectFn" :key="item.id" :label="item.name" :value="item.id"> </el-option>
remote
:remote-method="remoteMethod"
v-model="form.promoter"
:placeholder="$t('请输入推介人')"
filterable
>
<el-option
v-for="item in customerSelectFn"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('备注')" prop="remarks"> <el-form-item :label="$t('备注')" prop="remarks">
<el-input <el-input v-model="form.remarks" :placeholder="$t('请输入备注')" />
v-model="form.remarks"
:placeholder="$t('请输入备注')"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('询盘信息')"> <el-form-item :label="$t('询盘信息')">
<el-input <el-input show-word-limit v-model="form.inquiry" :rows="3" type="textarea" :maxlength="500"></el-input>
show-word-limit
v-model="form.inquiry"
:rows="3"
type="textarea"
:maxlength="500"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -141,33 +66,19 @@ ...@@ -141,33 +66,19 @@
<el-row :gutter="10" v-show="showBaseFlag"> <el-row :gutter="10" v-show="showBaseFlag">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('联系地址')" prop="address"> <el-form-item :label="$t('联系地址')" prop="address">
<el-input <el-input v-model="form.address" :placeholder="$t('请输入联系地址')" />
v-model="form.address"
:placeholder="$t('请输入联系地址')"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('客户生日')" prop="birthday"> <el-form-item :label="$t('客户生日')" prop="birthday">
<el-date-picker <el-date-picker v-model="form.birthday" type="date" value-format="timestamp" :placeholder="$t('请输入客户生日')"> </el-date-picker>
v-model="form.birthday"
type="date"
value-format="timestamp"
:placeholder="$t('请输入客户生日')"
>
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('业绩类型')"> <el-form-item :label="$t('业绩类型')">
<el-switch <el-switch v-model="form.isNew" disabled active-text="新客户" inactive-text="老客户"> </el-switch>
v-model="form.isNew"
disabled
active-text="新客户"
inactive-text="老客户">
</el-switch>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
...@@ -178,158 +89,76 @@ ...@@ -178,158 +89,76 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('客户等级')" prop="level"> <el-form-item :label="$t('客户等级')" prop="level">
<el-select <el-select v-model="form.level" :placeholder="$t('请选择客户等级')" disabled>
v-model="form.level" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
:placeholder="$t('请选择客户等级')"
disabled
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('客户状态')" prop="status"> <el-form-item :label="$t('客户状态')" prop="status">
<el-select <el-select v-model="form.status" :placeholder="$t('请选择客户状态')" disabled>
v-model="form.status" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
:placeholder="$t('请选择客户状态')"
disabled
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('首次成交时间')"> <el-form-item :label="$t('首次成交时间')">
<el-date-picker <el-date-picker v-model="form.firstDealTime" type="datetime" :placeholder="$t('请选择')" disabled />
v-model="form.firstDealTime"
type="datetime"
:placeholder="$t('请选择')"
disabled
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('掉入公海时间')"> <el-form-item :label="$t('掉入公海时间')">
<el-date-picker <el-date-picker v-model="enterOpenSeaTime" type="datetime" :placeholder="$t('请选择')" disabled />
v-model="enterOpenSeaTime"
type="datetime"
:placeholder="$t('请选择')"
disabled
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('获取方式')" prop="getMethod"> <el-form-item :label="$t('获取方式')" prop="getMethod">
<el-select <el-select v-model="form.getMethod" :placeholder="$t('请选择')" disabled>
v-model="form.getMethod" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_GET_METHOD)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
:placeholder="$t('请选择')"
disabled
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_GET_METHOD)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('创建入口')" prop="createFrom"> <el-form-item :label="$t('创建入口')" prop="createFrom">
<el-select <el-select v-model="form.createFrom" :placeholder="$t('请选择')" disabled>
v-model="form.createFrom" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FROM)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
:placeholder="$t('请选择')"
disabled
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FROM)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('捞取时间')"> <el-form-item :label="$t('捞取时间')">
<el-date-picker <el-date-picker v-model="form.catchTime" type="datetime" :placeholder="$t('请选择')" disabled />
v-model="form.catchTime"
type="datetime"
:placeholder="$t('请选择')"
disabled
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('归属时间')"> <el-form-item :label="$t('归属时间')">
<el-date-picker <el-date-picker v-model="form.customerServiceConfirmedTime" type="datetime" disabled :placeholder="$t('请选择')"> </el-date-picker>
v-model="form.customerServiceConfirmedTime"
type="datetime"
disabled
:placeholder="$t('请选择')"
>
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('创建人')" prop="founder"> <el-form-item :label="$t('创建人')" prop="founder">
<el-select v-model="form.founder" disabled> <el-select v-model="form.founder" disabled>
<el-option <el-option v-for="item in allSimplList" :key="item.id" :label="item.nickname" :value="item.id"> </el-option>
v-for="item in allSimplList"
:key="item.id"
:label="item.nickname"
:value="item.id"
>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('创建时间')" prop="createTime"> <el-form-item :label="$t('创建时间')" prop="createTime">
<el-date-picker <el-date-picker v-model="form.createTime" type="datetime" value-format="timestamp" disabled :placeholder="$t('选择创建时间')"> </el-date-picker>
v-model="form.createTime"
type="datetime"
value-format="timestamp"
disabled
:placeholder="$t('选择创建时间')"
>
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('最后更新人')"> <el-form-item :label="$t('最后更新人')">
<el-select v-model="form.updater" disabled> <el-select v-model="form.updater" disabled>
<el-option <el-option v-for="item in allSimplList" :key="item.id" :label="item.nickname" :value="item.id"> </el-option>
v-for="item in allSimplList"
:key="item.id"
:label="item.nickname"
:value="item.id"
>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('最后更新时间')"> <el-form-item :label="$t('最后更新时间')">
<el-date-picker <el-date-picker v-model="form.updateTime" type="datetime" value-format="timestamp" disabled> </el-date-picker>
v-model="form.updateTime"
type="datetime"
value-format="timestamp"
disabled
>
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -337,54 +166,25 @@ ...@@ -337,54 +166,25 @@
<el-card style="margin-top: 15px"> <el-card style="margin-top: 15px">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span class="title-text">{{ $t('发货信息') }}</span> <span class="title-text">{{ $t("发货信息") }}</span>
<el-button <el-button style="float: right" size="small" type="primary" @click="showShippingFlag = !showShippingFlag">{{ showShippingFlag ? $t("隐藏") : $t("更多") }}</el-button>
style="float: right"
size="small"
type="primary"
@click="showShippingFlag = !showShippingFlag"
>{{showShippingFlag ? $t('隐藏') : $t('更多')}}</el-button
>
</div> </div>
<el-row :gutter="10" v-show="showShippingFlag"> <el-row :gutter="10" v-show="showShippingFlag">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('客户类别')" prop="type"> <el-form-item :label="$t('客户类别')" prop="type">
<dict-selector <dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" form-type="checkbox" multiple v-model="form.type"></dict-selector>
:type="DICT_TYPE.CUSTOMER_TYPE"
form-type="checkbox"
multiple
v-model="form.type"
></dict-selector>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('角色')"> <el-form-item :label="$t('角色')">
<dict-selector <dict-selector :type="DICT_TYPE.CUSTOMER_ROLE" form-type="checkbox" multiple v-model="form.roles"></dict-selector>
:type="DICT_TYPE.CUSTOMER_ROLE"
form-type="checkbox"
multiple
v-model="form.roles"
></dict-selector>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col <el-col :span="13" v-show="form.roles && form.roles.indexOf('2') !== -1">
:span="13"
v-show="form.roles && form.roles.indexOf('2') !== -1"
>
<el-form-item :label="$t('所属代理')" prop="agentId"> <el-form-item :label="$t('所属代理')" prop="agentId">
<el-select <el-select filterable clearable v-model="form.agentId" :placeholder="$t('请选择所属代理')">
filterable <el-option v-for="item in serviceUserList" :key="item.id" :label="item.nickname" :value="item.id" />
clearable
v-model="form.agentId"
:placeholder="$t('请选择所属代理')"
>
<el-option
v-for="item in serviceUserList"
:key="item.id"
:label="item.nickname"
:value="item.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -393,79 +193,36 @@ ...@@ -393,79 +193,36 @@
<el-form-item :label="$t('出货渠道')" prop="transportType"> <el-form-item :label="$t('出货渠道')" prop="transportType">
<!-- <dict-selector :type="DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE" form-type="checkbox" multiple v-model="form.transportType"></dict-selector>--> <!-- <dict-selector :type="DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE" form-type="checkbox" multiple v-model="form.transportType"></dict-selector>-->
<el-checkbox-group v-model="form.transportType"> <el-checkbox-group v-model="form.transportType">
<el-checkbox <el-checkbox v-for="item in getDictDatas(DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE)" :key="item.value" :label="item.value" :disabled="[3].includes(+item.value)">{{ item.label }}</el-checkbox>
v-for="item in getDictDatas(
DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE
)"
:key="item.value"
:label="item.value"
:disabled="[3].includes(+item.value)"
>{{ item.label }}</el-checkbox
>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('常用提货网点')" prop="pickupPoints"> <el-form-item :label="$t('常用提货网点')" prop="pickupPoints">
<el-select multiple v-model="form.pickupPoints"> <el-select multiple v-model="form.pickupPoints">
<el-option <el-option v-for="item in getNodeLists" :key="item.id" :value="item.id" :label="isChinese ? item.titleZh : item.titleEn"></el-option>
v-for="item in getNodeLists"
:key="item.id"
:value="item.id"
:label="isChinese ? item.titleZh : item.titleEn"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('业务国家')" prop="busiCountryIds"> <el-form-item :label="$t('业务国家')" prop="busiCountryIds">
<el-select <el-select multiple clearable v-model="form.busiCountryIds" :placeholder="$t('请选择')">
multiple <el-option v-for="dict in countryList" :key="dict.id" :label="isChinese ? dict.nameZh : dict.nameEn" :value="parseInt(dict.id)" />
clearable
v-model="form.busiCountryIds"
:placeholder="$t('请选择')"
>
<el-option
v-for="dict in countryList"
:key="dict.id"
:label="isChinese ? dict.nameZh : dict.nameEn"
:value="parseInt(dict.id)"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('主营类别')" prop="productType"> <el-form-item :label="$t('主营类别')" prop="productTypes">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="11"> <el-col :span="11">
<el-select <el-select @change="change" v-model="form.productTypes" multiple :placeholder="$t('请选择产品类别')">
@change="change" <el-option :label="isChinese ? item.titleZh : item.titleEn" :value="item.id" v-for="item in productTypeList" :key="item.id" />
v-model="form.productType"
:placeholder="$t('请选择产品类别')"
>
<el-option
:label="isChinese ? item.titleZh : item.titleEn"
:value="item.id"
v-for="item in productTypeList"
:key="item.id"
/>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-select <el-select multiple filterable clearable v-model="form.productIds" :placeholder="$t('请选择')">
multiple <el-option :label="item.titleZh" :value="parseInt(item.id)" v-for="item in productList" :key="item.id" />
filterable
clearable
v-model="form.productIds"
:placeholder="$t('请选择')"
>
<el-option
:label="item.titleZh"
:value="parseInt(item.id)"
v-for="item in productList"
:key="item.id"
/>
</el-select> </el-select>
</el-col> </el-col>
</el-row> </el-row>
...@@ -479,22 +236,9 @@ ...@@ -479,22 +236,9 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('主要竞争对手')" prop="competitorIds"> <el-form-item :label="$t('主要竞争对手')" prop="competitorIds">
<el-select <el-select clearable v-model="form.competitorIds" :placeholder="$t('请选择')" @change="changeCompetitor">
clearable <el-option v-for="item in competitorList" :key="item.id" :label="item.name" :value="item.id" />
v-model="form.competitorIds" <el-option :label="$t('其他')" :value="0" />
:placeholder="$t('请选择')"
@change="changeCompetitor"
>
<el-option
v-for="item in competitorList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
<el-option
:label="$t('其他')"
:value="0"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -503,61 +247,36 @@ ...@@ -503,61 +247,36 @@
<el-input-number v-model="form.numYearly" :min="1" /> <el-input-number v-model="form.numYearly" :min="1" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-card> </el-card>
</el-form> </el-form>
<el-card class="box-card" style="margin-top: 15px;"> <el-card class="box-card" style="margin-top: 15px">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span class="title-text">{{ $t("联系人") }}</span> <span class="title-text">{{ $t("联系人") }}</span>
<el-button <el-button style="float: right" size="small" type="primary" @click="handleAddContact">+</el-button>
style="float: right"
size="small"
type="primary"
@click="handleAddContact"
>+</el-button
>
</div> </div>
<el-form ref="contactForm" :rules="contactRules" :model="form"> <el-form ref="contactForm" :rules="contactRules" :model="form">
<el-table :data="form.customerContacts" style="width: 100%"> <el-table :data="form.customerContacts" style="width: 100%">
<el-table-column prop="department" :label="$t('部门')" width=""> <el-table-column prop="department" :label="$t('部门')" width="">
<template v-slot="{ row }"> <template v-slot="{ row }">
<el-form-item label=""> <el-form-item label="">
<el-input <el-input v-model="row.department" :placeholder="$t('请输入部门')" size="mini" />
v-model="row.department"
:placeholder="$t('请输入部门')"
size="mini"
/>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="position" :label="$t('职位')" width=""> <el-table-column prop="position" :label="$t('职位')" width="">
<template v-slot="{ row }"> <template v-slot="{ row }">
<el-form-item label=""> <el-form-item label="">
<el-input <el-input v-model="row.position" :placeholder="$t('请输入职位')" size="mini" />
v-model="row.position"
:placeholder="$t('请输入职位')"
size="mini"
/>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" :label="$t('联系人')"> <el-table-column prop="name" :label="$t('联系人')">
<template slot="header"> <template slot="header"> {{ $t("联系人") }} <span style="color: #ff0000">*</span> </template>
{{ $t("联系人") }} <span style="color: #ff0000">*</span>
</template>
<template v-slot="{ row, cellValue, $index }"> <template v-slot="{ row, cellValue, $index }">
<el-form-item <el-form-item :rules="contactRules.name" :prop="'customerContacts.' + $index + '.name'" label="">
:rules="contactRules.name" <el-input v-model="row.name" :placeholder="$t('请输入联系人')" size="mini" />
:prop="'customerContacts.' + $index + '.name'"
label=""
>
<el-input
v-model="row.name"
:placeholder="$t('请输入联系人')"
size="mini"
/>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -567,62 +286,25 @@ ...@@ -567,62 +286,25 @@
</template> </template>
<template v-slot="{ row, cellValue, $index }"> <template v-slot="{ row, cellValue, $index }">
<el-form-item label=""> <el-form-item label="">
<el-input <el-input v-model="row.nameEn" :placeholder="$t('请输入联系人英文名称')" size="mini" />
v-model="row.nameEn"
:placeholder="$t('请输入联系人英文名称')"
size="mini"
/>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="areaCode" :label="$t('区号')"> <el-table-column prop="areaCode" :label="$t('区号')">
<template slot="header"> <template slot="header"> {{ $t("区号") }} <span style="color: #ff0000">*</span> </template>
{{ $t("区号") }} <span style="color: #ff0000">*</span>
</template>
<template v-slot="{ row, cellValue, $index }"> <template v-slot="{ row, cellValue, $index }">
<el-form-item <el-form-item :rules="contactRules.areaCode" :prop="'customerContacts.' + $index + '.areaCode'" label="">
:rules="contactRules.areaCode" <el-select v-model="row.areaCode" :placeholder="$t('请选择区号')" filterable size="mini">
:prop="'customerContacts.' + $index + '.areaCode'" <el-option v-for="(item, index) in countryList" :key="index" :label="item.nameShort + (isChinese ? item.nameZh : item.nameEn) + '(' + item.tel + ')'" :value="item.tel" />
label=""
>
<el-select
v-model="row.areaCode"
:placeholder="$t('请选择区号')"
filterable
size="mini"
>
<el-option
v-for="(item, index) in countryList"
:key="index"
:label="
item.nameShort +
(isChinese ? item.nameZh : item.nameEn) +
'(' +
item.tel +
')'
"
:value="item.tel"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="phoneNew" :label="$t('联系方式')"> <el-table-column prop="phoneNew" :label="$t('联系方式')">
<template slot="header"> <template slot="header"> {{ $t("联系方式") }} <span style="color: #ff0000">*</span> </template>
{{ $t("联系方式") }} <span style="color: #ff0000">*</span>
</template>
<template v-slot="{ row, cellValue, $index }"> <template v-slot="{ row, cellValue, $index }">
<el-form-item <el-form-item :rules="contactRules.phoneNew" :prop="'customerContacts.' + $index + '.phoneNew'" label="">
:rules="contactRules.phoneNew" <el-input v-model.trim="row.phoneNew" :placeholder="$t('请输入联系方式')" size="mini" @input="row.phoneNew = row.phoneNew.replace(/\s+/g, '')" />
:prop="'customerContacts.' + $index + '.phoneNew'"
label=""
>
<el-input
v-model.trim="row.phoneNew"
:placeholder="$t('请输入联系方式')"
size="mini"
@input="row.phoneNew=row.phoneNew.replace(/\s+/g, '')"
/>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -639,67 +321,26 @@ ...@@ -639,67 +321,26 @@
<el-table-column prop="social" :label="$t('社交软件')"> <el-table-column prop="social" :label="$t('社交软件')">
<template v-slot="{ row }"> <template v-slot="{ row }">
<el-form-item label=""> <el-form-item label="">
<el-select <el-select v-model="row.social" :placeholder="$t('请选择社交软件')" size="mini">
v-model="row.social" <el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
:placeholder="$t('请选择社交软件')"
size="mini"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="socialNumber" :label="$t('社交软件号码')">
prop="socialNumber"
:label="$t('社交软件号码')"
>
<template v-slot="{ row }"> <template v-slot="{ row }">
<el-form-item label=""> <el-form-item label="">
<el-input <el-input v-model="row.socialNumber" :placeholder="$t('请输入社交软件号码')" size="mini" />
v-model="row.socialNumber"
:placeholder="$t('请输入社交软件号码')"
size="mini"
/>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="260px" prop="email" :label="$t('邮箱')"> <el-table-column width="260px" prop="email" :label="$t('邮箱')">
<template v-slot="{ row }"> <template v-slot="{ row }">
<el-form-item <el-form-item v-for="(item, index) in row.email" :key="index" label="">
v-for="(item, index) in row.email"
:key="index"
label=""
>
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<el-input <el-input v-model="row.email[index]" :placeholder="$t('请输入邮箱')" size="mini" />
v-model="row.email[index]" <el-button @click="deleteEmail(row.email, index)" v-if="row.email.length !== 1" style="height: 25px; margin-left: 5px" type="danger" size="mini">删除</el-button>
:placeholder="$t('请输入邮箱')" <el-button @click="addEmail(row.email)" style="height: 25px; margin-left: 5px" v-if="index === row.email.length - 1 && row.email.length < 5" size="mini" type="primary">添加</el-button>
size="mini"
/>
<el-button
@click="deleteEmail(row.email, index)"
v-if="row.email.length !== 1"
style="height: 25px; margin-left: 5px"
type="danger"
size="mini"
>删除</el-button
>
<el-button
@click="addEmail(row.email)"
style="height: 25px; margin-left: 5px"
v-if="
index === row.email.length - 1 &&
row.email.length < 5
"
size="mini"
type="primary"
>添加</el-button
>
</div> </div>
</el-form-item> </el-form-item>
</template> </template>
...@@ -707,18 +348,8 @@ ...@@ -707,18 +348,8 @@
<el-table-column prop="isDefault" :label="$t('设为默认')"> <el-table-column prop="isDefault" :label="$t('设为默认')">
<template v-slot="{ row, column, $index }"> <template v-slot="{ row, column, $index }">
<el-form-item label=""> <el-form-item label="">
<el-select <el-select v-model="row.isDefault" :placeholder="$t('设为默认')" @change="handleDefaultChange($index)" size="mini">
v-model="row.isDefault" <el-option v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="Number(dict.value)" />
:placeholder="$t('设为默认')"
@change="handleDefaultChange($index)"
size="mini"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="Number(dict.value)"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
...@@ -726,12 +357,7 @@ ...@@ -726,12 +357,7 @@
<el-table-column prop="name" :label="$t('操作')"> <el-table-column prop="name" :label="$t('操作')">
<template v-slot="{ row, column, $index }"> <template v-slot="{ row, column, $index }">
<el-form-item label=""> <el-form-item label="">
<el-button <el-button type="danger" @click="handleDeleteContact($index)" size="mini">{{ $t("删除") }}</el-button>
type="danger"
@click="handleDeleteContact($index)"
size="mini"
>{{ $t("删除") }}</el-button
>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
...@@ -739,16 +365,10 @@ ...@@ -739,16 +365,10 @@
</el-form> </el-form>
</el-card> </el-card>
<el-card class="box-card" style="margin-top: 15px;"> <el-card class="box-card" style="margin-top: 15px">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span class="title-text">{{ $t('设置') }}</span> <span class="title-text">{{ $t("设置") }}</span>
<el-button <el-button style="float: right" size="small" type="primary" @click="showSettingFlag = !showSettingFlag">{{ showSettingFlag ? $t("隐藏") : $t("更多") }}</el-button>
style="float: right"
size="small"
type="primary"
@click="showSettingFlag = !showSettingFlag"
>{{showSettingFlag ? $t('隐藏') : $t('更多')}}</el-button
>
</div> </div>
<el-form ref="setForm" label-width="150px" v-if="showSettingFlag"> <el-form ref="setForm" label-width="150px" v-if="showSettingFlag">
<el-row :gutter="10"> <el-row :gutter="10">
...@@ -759,22 +379,14 @@ ...@@ -759,22 +379,14 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('到仓确认')" prop="arrivalConfirm"> <el-form-item :label="$t('到仓确认')" prop="arrivalConfirm">
<el-switch <el-switch v-model="form.arrivalConfirm" :active-value="1" :inactive-value="0" />
v-model="form.arrivalConfirm"
:active-value="1"
:inactive-value="0"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="13"> <el-col :span="13">
<el-form-item :label="$t('重货标准')" prop="weightUnit"> <el-form-item :label="$t('重货标准')" prop="weightUnit">
<el-switch v-model="showZhong" /> <el-switch v-model="showZhong" />
<el-input <el-input v-model="form.weightUnit" :placeholder="$t('请输入重货标准')" v-show="showZhong">
v-model="form.weightUnit"
:placeholder="$t('请输入重货标准')"
v-show="showZhong"
>
<template slot="append">kg/cbm</template> <template slot="append">kg/cbm</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -782,24 +394,14 @@ ...@@ -782,24 +394,14 @@
<el-col :span="24" v-show="showZhong"> <el-col :span="24" v-show="showZhong">
<el-form-item :label="$t('指定线路')" prop="line"> <el-form-item :label="$t('指定线路')" prop="line">
<el-switch v-model="showZhong1"></el-switch> <el-switch v-model="showZhong1"></el-switch>
<customer-line-table <customer-line-table v-if="showZhong1" :warehouse-list="warehouseList" :import-city-list="importCityList" v-model="zhongLines" :zhong-pao-type="1"></customer-line-table>
v-if="showZhong1"
:warehouse-list="warehouseList"
:import-city-list="importCityList"
v-model="zhongLines"
:zhong-pao-type="1"
></customer-line-table>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="13"> <el-col :span="13">
<el-form-item :label="$t('泡货标准')" prop="lightUnit"> <el-form-item :label="$t('泡货标准')" prop="lightUnit">
<el-switch v-model="showPao" /> <el-switch v-model="showPao" />
<el-input <el-input v-model="form.lightUnit" :placeholder="$t('请输入泡货标准')" v-show="showPao">
v-model="form.lightUnit"
:placeholder="$t('请输入泡货标准')"
v-show="showPao"
>
<template slot="append">kg/cbm</template> <template slot="append">kg/cbm</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -807,13 +409,7 @@ ...@@ -807,13 +409,7 @@
<el-col :span="24" v-show="showPao"> <el-col :span="24" v-show="showPao">
<el-form-item :label="$t('指定线路')" prop="line"> <el-form-item :label="$t('指定线路')" prop="line">
<el-switch v-model="showPao1"></el-switch> <el-switch v-model="showPao1"></el-switch>
<customer-line-table <customer-line-table v-if="showPao1" :warehouse-list="warehouseList" :import-city-list="importCityList" v-model="paoLines" :zhong-pao-type="2"></customer-line-table>
v-if="showPao1"
:warehouse-list="warehouseList"
:import-city-list="importCityList"
v-model="paoLines"
:zhong-pao-type="2"
></customer-line-table>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -832,146 +428,91 @@ ...@@ -832,146 +428,91 @@
<el-switch v-model="form.defaultBilling" disabled /> <el-switch v-model="form.defaultBilling" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</el-card> </el-card>
<el-card class="box-card" style="margin-top: 15px;"> <el-card class="box-card" style="margin-top: 15px">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span class="title-text">{{ $t('财务') }}</span> <span class="title-text">{{ $t("财务") }}</span>
<el-button <el-button style="float: right" size="small" type="primary" @click="showFinanceFlag = !showFinanceFlag">{{ showFinanceFlag ? $t("隐藏") : $t("更多") }}</el-button>
style="float: right"
size="small"
type="primary"
@click="showFinanceFlag = !showFinanceFlag"
>{{showFinanceFlag ? $t('隐藏') : $t('更多')}}</el-button
>
</div> </div>
<el-form ref="financeForm" label-width="150px" v-if="showFinanceFlag"> <el-form ref="financeForm" label-width="150px" v-if="showFinanceFlag">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('公司名称')" prop="company"> <el-form-item :label="$t('公司名称')" prop="company">
<el-input <el-input v-model="form.company" :placeholder="$t('请输入公司名称')" />
v-model="form.company"
:placeholder="$t('请输入公司名称')"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('公司英文名称')"> <el-form-item :label="$t('公司英文名称')">
<el-input <el-input v-model="form.companyEn" :placeholder="$t('请输入客户英文名称')"></el-input>
v-model="form.companyEn"
:placeholder="$t('请输入客户英文名称')"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item v-hasPermi="['ecw:customer:edit-card']" :label="$t('身份证号码')">
v-hasPermi="['ecw:customer:edit-card']"
:label="$t('身份证号码')"
>
<el-input v-model="form.carNo"></el-input> <el-input v-model="form.carNo"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item v-hasPermi="['ecw:customer:edit-card']" :label="$t('身份证姓名')">
v-hasPermi="['ecw:customer:edit-card']"
:label="$t('身份证姓名')"
>
<el-input v-model="form.carName"></el-input> <el-input v-model="form.carName"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('结算方式')" prop="balance"> <el-form-item :label="$t('结算方式')" prop="balance">
<el-select <el-select v-model="form.balance" :placeholder="$t('请选择结算方式')">
v-model="form.balance" <el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)" :key="dict.value" :label="isChinese ? dict.label : dict.labelEn" :value="parseInt(dict.value)" />
:placeholder="$t('请选择结算方式')"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('付款人姓名')"> <el-form-item :label="$t('付款人姓名')">
<el-input <el-input v-model="form.payerName" :placeholder="$t('请输入付款人姓名')"></el-input>
v-model="form.payerName"
:placeholder="$t('请输入付款人姓名')"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<h3 style="font-size: 15px;">{{$t('开票信息')}}</h3> <h3 style="font-size: 15px">{{ $t("开票信息") }}</h3>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('发票抬头')" prop="invoiceTitle"> <el-form-item :label="$t('发票抬头')" prop="invoiceTitle">
<el-input <el-input v-model="form.invoiceTitle" :placeholder="$t('请输入发票抬头')" />
v-model="form.invoiceTitle"
:placeholder="$t('请输入发票抬头')"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('纳税人识别号')" prop="licenseNumber"> <el-form-item :label="$t('纳税人识别号')" prop="licenseNumber">
<el-input <el-input v-model="form.licenseNumber" :placeholder="$t('请输入纳税人识别号')" />
v-model="form.licenseNumber"
:placeholder="$t('请输入纳税人识别号')"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('开户行')" prop="bank"> <el-form-item :label="$t('开户行')" prop="bank">
<el-input <el-input v-model="form.bank" :placeholder="$t('请输入开户行')" />
v-model="form.bank"
:placeholder="$t('请输入开户行')"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('账户')" prop="bankNumber"> <el-form-item :label="$t('账户')" prop="bankNumber">
<el-input <el-input v-model="form.bankNumber" :placeholder="$t('请输入账户')" />
v-model="form.bankNumber"
:placeholder="$t('请输入账户')"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('项目')" prop="project"> <el-form-item :label="$t('项目')" prop="project">
<el-input <el-input v-model="form.project" :placeholder="$t('请输入项目')" />
v-model="form.project"
:placeholder="$t('请输入项目')"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('开票地址')" prop="billingAddress"> <el-form-item :label="$t('开票地址')" prop="billingAddress">
<el-input <el-input v-model="form.billingAddress" :placeholder="$t('请输入开票地址')" />
v-model="form.billingAddress"
:placeholder="$t('请输入开票地址')"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('开票电话')" prop="billingTell"> <el-form-item :label="$t('开票电话')" prop="billingTell">
<el-input <el-input v-model="form.billingTell" :placeholder="$t('请输入开票电话')" maxlength="50" />
v-model="form.billingTell"
:placeholder="$t('请输入开票电话')"
maxlength="50"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('税率')" prop="taxRate"> <el-form-item :label="$t('税率')" prop="taxRate">
<el-input <el-input v-model="form.taxRate" :placeholder="$t('请输入税率')" />
v-model="form.taxRate"
:placeholder="$t('请输入税率')"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -979,74 +520,41 @@ ...@@ -979,74 +520,41 @@
<el-form ref="bankForm" :model="form" v-if="showFinanceFlag"> <el-form ref="bankForm" :model="form" v-if="showFinanceFlag">
<el-row type="flex" class="row-bg" justify="space-between"> <el-row type="flex" class="row-bg" justify="space-between">
<span style="font-size: 15px; line-height: 30px">{{$t('银行信息')}}</span> <span style="font-size: 15px; line-height: 30px">{{ $t("银行信息") }}</span>
<el-button <el-button size="small" type="primary" @click="addBankData">+</el-button>
size="small"
type="primary"
@click="addBankData"
>+</el-button
>
</el-row> </el-row>
<el-table border :data="form.customerBanks" style="margin-top: 10px"> <el-table border :data="form.customerBanks" style="margin-top: 10px">
<el-table-column <el-table-column :label="$t('序号')" type="index"></el-table-column>
:label="$t('序号')"
type="index"
></el-table-column>
<el-table-column> <el-table-column>
<div slot="header"> <div slot="header">{{ $t("账户名称") }} <span style="color: red">*</span></div>
{{ $t("账户名称") }} <span style="color: red">*</span>
</div>
<template v-slot="{ row, $index }"> <template v-slot="{ row, $index }">
<el-form-item <el-form-item :rules="{ required: true, message: $t('请输入账户名称') }" :prop="'customerBanks.' + $index + '.accountName'">
:rules="{ required: true, message: $t('请输入账户名称') }"
:prop="'customerBanks.' + $index + '.accountName'"
>
<el-input size="mini" v-model="row.accountName"></el-input> <el-input size="mini" v-model="row.accountName"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('币别')"> <el-table-column :label="$t('币别')">
<div slot="header"> <div slot="header">{{ $t("币别") }} <span style="color: red">*</span></div>
{{ $t("币别") }} <span style="color: red">*</span>
</div>
<template v-slot="{ row, $index }"> <template v-slot="{ row, $index }">
<el-form-item <el-form-item :prop="'customerBanks.' + $index + '.currency'" :rules="{ required: true, message: $t('请输入币别') }">
:prop="'customerBanks.' + $index + '.currency'"
:rules="{ required: true, message: $t('请输入币别') }"
>
<el-select v-model="row.currency"> <el-select v-model="row.currency">
<el-option <el-option v-for="item in currecyList" :label="$l(item, 'title')" :value="item.id.toString()" :key="item.id"></el-option>
v-for="item in currecyList"
:label="$l(item, 'title')"
:value="item.id.toString()"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('银行名称')"> <el-table-column :label="$t('银行名称')">
<div slot="header"> <div slot="header">{{ $t("银行名称") }} <span style="color: red">*</span></div>
{{ $t("银行名称") }} <span style="color: red">*</span>
</div>
<template v-slot="{ row, $index }"> <template v-slot="{ row, $index }">
<el-form-item <el-form-item :prop="'customerBanks.' + $index + '.bankName'" :rules="{ required: true, message: $t('银行名称') }">
:prop="'customerBanks.' + $index + '.bankName'"
:rules="{ required: true, message: $t('银行名称') }"
>
<el-input v-model="row.bankName" size="mini"></el-input> <el-input v-model="row.bankName" size="mini"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('银行账户')"> <el-table-column :label="$t('银行账户')">
<div slot="header"> <div slot="header">{{ $t("银行账户") }} <span style="color: red">*</span></div>
{{ $t("银行账户") }} <span style="color: red">*</span>
</div>
<template v-slot="{ row, $index }"> <template v-slot="{ row, $index }">
<el-form-item <el-form-item :prop="`customerBanks.${$index}.bankAccount`" :rules="{ required: true, message: $t('请输入银行账户') }">
:prop="`customerBanks.${$index}.bankAccount`"
:rules="{ required: true, message: $t('请输入银行账户') }"
>
<el-input v-model="row.bankAccount" size="mini"></el-input> <el-input v-model="row.bankAccount" size="mini"></el-input>
</el-form-item> </el-form-item>
</template> </template>
...@@ -1087,9 +595,7 @@ ...@@ -1087,9 +595,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')"> <el-table-column :label="$t('操作')">
<template v-slot="{ $index }"> <template v-slot="{ $index }">
<el-button @click="deleteBankData($index)">{{ <el-button @click="deleteBankData($index)">{{ $t("删除") }}</el-button>
$t("删除")
}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -1097,9 +603,7 @@ ...@@ -1097,9 +603,7 @@
</el-card> </el-card>
<div style="margin-top: 15px; text-align: center"> <div style="margin-top: 15px; text-align: center">
<el-button type="primary" @click="submitForm">{{ <el-button type="primary" @click="submitForm">{{ $t("确 定") }}</el-button>
$t("确 定")
}}</el-button>
<el-button @click="cancel">{{ $t("取 消") }}</el-button> <el-button @click="cancel">{{ $t("取 消") }}</el-button>
</div> </div>
</el-col> </el-col>
...@@ -1107,42 +611,25 @@ ...@@ -1107,42 +611,25 @@
</template> </template>
<script> <script>
import { getDictDatas, DICT_TYPE } from "@/utils/dict"; import { getDictDatas, DICT_TYPE } from "@/utils/dict"
import upload from "@/components/ImageUpload"; import upload from "@/components/ImageUpload"
import { import { createCustomer, getCustomer, getCustomerList, getCustomerPage, memberUserList, updateCustomer, userMemberUserList, getCustomerLines, fillupCustomeInfo, getServiceNetwork, addCompetitor, competitorListAll } from "@/api/ecw/customer"
createCustomer, import { getNodeList } from "@/api/ecw/node"
getCustomer, import { getProductTypeList } from "@/api/ecw/productType"
getCustomerList, import { getProductList } from "@/api/ecw/product"
getCustomerPage, import { getTradeCityList } from "@/api/ecw/region"
memberUserList, import { getWarehouseList } from "@/api/ecw/warehouse"
updateCustomer, import CustomerLineTable from "@/components/CustomerLineTable"
userMemberUserList, import { getCustomerSelect } from "@/api/ecw/customer"
getCustomerLines, import { listAllSimpl, listServiceUser, listSimpleUsers } from "@/api/system/user"
fillupCustomeInfo, import { getZhongPaoBest, getZhongPaoPage } from "@/api/ecw/zhongPao"
getServiceNetwork, import { getCustomerContactsListByCustomer } from "@/api/ecw/customerContacts"
addCompetitor, import { getCountryListAll } from "@/api/ecw/country"
competitorListAll import Template from "@/views/cms/template"
} from "@/api/ecw/customer"; import { validatorMobile } from "@/api/ecw/validate"
import { getNodeList } from "@/api/ecw/node";
import { getProductTypeList } from "@/api/ecw/productType";
import { getProductList } from "@/api/ecw/product";
import { getTradeCityList } from "@/api/ecw/region";
import { getWarehouseList } from "@/api/ecw/warehouse";
import CustomerLineTable from "@/components/CustomerLineTable";
import { getCustomerSelect } from "@/api/ecw/customer";
import {
listAllSimpl,
listServiceUser,
listSimpleUsers,
} from "@/api/system/user";
import { getZhongPaoBest, getZhongPaoPage } from "@/api/ecw/zhongPao";
import { getCustomerContactsListByCustomer } from "@/api/ecw/customerContacts";
import { getCountryListAll } from "@/api/ecw/country";
import Template from "@/views/cms/template";
import { validatorMobile } from "@/api/ecw/validate";
// import {customerDropDownList} from "@/api/ecw/customerCommissionInfo"; // import {customerDropDownList} from "@/api/ecw/customerCommissionInfo";
import MemberSelector from "@/components/MemberSelector"; import MemberSelector from "@/components/MemberSelector"
import { getCurrencyList } from "@/api/ecw/currency"; import { getCurrencyList } from "@/api/ecw/currency"
export default { export default {
name: "EcwCustomerEdit", name: "EcwCustomerEdit",
...@@ -1151,46 +638,41 @@ export default { ...@@ -1151,46 +638,41 @@ export default {
Template, Template,
upload, upload,
CustomerLineTable, CustomerLineTable,
MemberSelector, MemberSelector
}, },
created() { created() {
getCurrencyList().then((response) => { getCurrencyList().then((response) => {
this.currecyList = response.data; this.currecyList = response.data
}); })
this.isCustomerServiceConfirmed = this.$route.query this.isCustomerServiceConfirmed = this.$route.query.isCustomerServiceConfirmed ? true : false
.isCustomerServiceConfirmed this.getCustomerSelect()
? true this.reset()
: false;
this.getCustomerSelect();
this.reset();
// this.getUserMemberUserFn() // this.getUserMemberUserFn()
if (this.customerId !== "0") { if (this.customerId !== "0") {
let customerId = this.customerId; let customerId = this.customerId
// 编辑客户 // 编辑客户
this.getCustomer(this.customerId).then(() => { this.getCustomer(this.customerId).then(() => {
getCustomerContactsListByCustomer({ customerId: customerId }).then( getCustomerContactsListByCustomer({ customerId: customerId }).then((r) => {
(r) => { this.form.customerContacts = r.data
this.form.customerContacts = r.data;
this.form.customerContacts.forEach((item) => { this.form.customerContacts.forEach((item) => {
if (item.email) { if (item.email) {
item.email = item.email.split(","); item.email = item.email.split(",")
} else { } else {
item.email = [""]; item.email = [""]
}
});
} }
); })
})
if (this.form.promoter) { if (this.form.promoter) {
getCustomerList({ ids: this.form.promoter }).then((r) => { getCustomerList({ ids: this.form.promoter }).then((r) => {
this.recommended = r.data; this.recommended = r.data
}); })
} }
// 打开重泡货开关 // 打开重泡货开关
if (this.form.weightUnit) { if (this.form.weightUnit) {
this.showZhong = true; this.showZhong = true
} }
if (this.form.lightUnit) { if (this.form.lightUnit) {
this.showPao = true; this.showPao = true
} }
// 掉入公海时间 // 掉入公海时间
this.enterOpenSeaTime = this.form.estimateEnterOpenSeaTime || this.form.enterOpenSeaTime || undefined this.enterOpenSeaTime = this.form.estimateEnterOpenSeaTime || this.form.enterOpenSeaTime || undefined
...@@ -1198,46 +680,46 @@ export default { ...@@ -1198,46 +680,46 @@ export default {
if (customerId) { if (customerId) {
// 获取重泡货路线 // 获取重泡货路线
getCustomerLines(customerId).then((res) => { getCustomerLines(customerId).then((res) => {
this.zhongLines = res.data.filter((item) => item.zhongPaoType == 1); this.zhongLines = res.data.filter((item) => item.zhongPaoType == 1)
this.paoLines = res.data.filter((item) => item.zhongPaoType == 2); this.paoLines = res.data.filter((item) => item.zhongPaoType == 2)
if (this.zhongLines.length) this.showZhong1 = true; if (this.zhongLines.length) this.showZhong1 = true
if (this.paoLines.length) this.showPao1 = true; if (this.paoLines.length) this.showPao1 = true
// /admin-api/customer-line/get-by-customer // /admin-api/customer-line/get-by-customer
// /admin-api/customer-line/get-by-customer?customerId=29564 // /admin-api/customer-line/get-by-customer?customerId=29564
}); })
} }
}); })
} else { } else {
this.getZhongPao(); this.getZhongPao()
// 新建客户 // 新建客户
this.handleAddContact(); this.handleAddContact()
if (this.isCustomerServiceConfirmed) { if (this.isCustomerServiceConfirmed) {
this.form.customerService = this.userId; this.form.customerService = this.userId
} }
} }
getNodeList().then((r) => { getNodeList().then((r) => {
this.getNodeLists = r.data; this.getNodeLists = r.data
}); })
getProductTypeList().then((r) => { getProductTypeList().then((r) => {
this.productTypeList = r.data; this.productTypeList = r.data
}); })
getTradeCityList({ type: 1 }).then((r) => { getTradeCityList({ type: 1 }).then((r) => {
this.importCityList = r.data.filter((item) => item.type === "1"); this.importCityList = r.data.filter((item) => item.type === "1")
}); })
getWarehouseList().then((r) => { getWarehouseList().then((r) => {
this.warehouseList = r.data; this.warehouseList = r.data
}); })
listServiceUser().then((r) => { listServiceUser().then((r) => {
this.serviceUserList = r.data; this.serviceUserList = r.data
}); })
listAllSimpl().then((r) => { listAllSimpl().then((r) => {
this.allSimplList = r.data; this.allSimplList = r.data
}); })
getCountryListAll().then((r) => { getCountryListAll().then((r) => {
this.countryList = r.data; this.countryList = r.data
}); })
this.getCompetitorList() this.getCompetitorList()
}, },
data() { data() {
...@@ -1255,89 +737,85 @@ export default { ...@@ -1255,89 +737,85 @@ export default {
{ {
required: true, required: true,
message: this.$t("客户名称不能为空"), message: this.$t("客户名称不能为空"),
trigger: "blur", trigger: "blur"
}, }
],
country: [
{ required: true, message: this.$t("国家不能为空"), trigger: "blur" },
], ],
country: [{ required: true, message: this.$t("国家不能为空"), trigger: "blur" }],
level: [ level: [
{ {
required: true, required: true,
message: this.$t("客户等级不能为空"), message: this.$t("客户等级不能为空"),
trigger: "blur", trigger: "blur"
}, }
], ],
type: [ type: [
{ {
required: true, required: true,
message: this.$t("客户类别不能为空"), message: this.$t("客户类别不能为空"),
trigger: "blur", trigger: "blur"
}, }
], ],
createTime: [ createTime: [
{ {
required: true, required: true,
message: this.$t("创建时间不能为空"), message: this.$t("创建时间不能为空"),
trigger: "blur", trigger: "blur"
}, }
], ],
source: [ source: [
{ {
required: true, required: true,
message: this.$t("客户来源不能为空"), message: this.$t("客户来源不能为空"),
trigger: "blur", trigger: "blur"
}, }
], ],
customerService: [ customerService: [
{ {
required: this.customerId === "0", required: this.customerId === "0",
message: this.$t("客户经理不能为空"), message: this.$t("客户经理不能为空"),
trigger: "blur", trigger: "blur"
}, }
], ],
status: [ status: [
{ {
required: true, required: true,
message: this.$t("客户状态不能为空"), message: this.$t("客户状态不能为空"),
trigger: "blur", trigger: "blur"
}, }
], ],
busiCountryIds: [ busiCountryIds: [
{ {
required: true, required: true,
message: this.$t("请选择业务国家"), message: this.$t("请选择业务国家"),
trigger: "blur", trigger: "blur"
}, }
], ],
competitorIds: [ competitorIds: [
{ {
required: true, required: true,
message: this.$t("请选择主要竞争对手"), message: this.$t("请选择主要竞争对手"),
trigger: "change", trigger: "change"
}, }
], ],
pickupPoints: [ pickupPoints: [
{ {
required: true, required: true,
message: this.$t("请选择常用提货网点"), message: this.$t("请选择常用提货网点"),
trigger: "change", trigger: "change"
}, }
], ],
productType: [ productTypes: [
{ {
required: true, required: true,
message: this.$t("请选择产品类别"), message: this.$t("请选择产品类别"),
trigger: "change", trigger: "change"
}, }
], ]
}, },
contactRules: { contactRules: {
name: [ name: [{ required: true, message: this.$t("请输入联系人"), trigger: "blur" }],
{ required: true, message: this.$t("请输入联系人"), trigger: "blur" },
],
areaCode: [ areaCode: [
{ required: true, message: this.$t("请选择区号"), trigger: "change" }, { required: true, message: this.$t("请选择区号"), trigger: "change" }
/*{ /*{
required: true, required: true,
trigger: "change", trigger: "change",
...@@ -1348,9 +826,9 @@ export default { ...@@ -1348,9 +826,9 @@ export default {
{ {
required: true, required: true,
trigger: "blur", trigger: "blur",
validator: this.phoneValidator, validator: this.phoneValidator
}, }
], ]
}, },
// 网点 // 网点
nodeList: [], nodeList: [],
...@@ -1379,28 +857,28 @@ export default { ...@@ -1379,28 +857,28 @@ export default {
showShippingFlag: true, showShippingFlag: true,
showSettingFlag: true, showSettingFlag: true,
showFinanceFlag: true, showFinanceFlag: true,
competitorList: [], competitorList: []
}; }
}, },
methods: { methods: {
addEmail(row) { addEmail(row) {
row.push(""); row.push("")
}, },
deleteEmail(row, index) { deleteEmail(row, index) {
row.splice(index, 1); row.splice(index, 1)
}, },
change(val) { change(val) {
this.form.productIds = []; this.form.productIds = []
this.getProductListFn(val); this.getProductListFn(val)
}, },
getProductListFn(val) { getProductListFn(val) {
getProductList({ typeId: val }).then((r) => { getProductList({ typeIds: val }).then((r) => {
this.productList = r.data; this.productList = r.data
}); })
}, },
deleteBankData(index) { deleteBankData(index) {
this.form.customerBanks.splice(index, 1); this.form.customerBanks.splice(index, 1)
}, },
//添加银行卡 //添加银行卡
addBankData() { addBankData() {
...@@ -1412,10 +890,10 @@ export default { ...@@ -1412,10 +890,10 @@ export default {
accountType: null, accountType: null,
status: null, status: null,
currency: "", currency: "",
accountName: "", accountName: ""
}; }
this.form.customerBanks = [...this.form.customerBanks, p]; this.form.customerBanks = [...this.form.customerBanks, p]
}, },
/* getUserMemberUserFn(val){ /* getUserMemberUserFn(val){
userMemberUserList({pageNo:1,pageSize:100,searchKey:val}).then(r => { userMemberUserList({pageNo:1,pageSize:100,searchKey:val}).then(r => {
...@@ -1423,87 +901,80 @@ export default { ...@@ -1423,87 +901,80 @@ export default {
}) })
}, */ }, */
remoteMethod(val) { remoteMethod(val) {
this.getCustomerSelect(val); this.getCustomerSelect(val)
}, },
getCustomerSelect(val = "") { getCustomerSelect(val = "") {
getCustomerSelect({ pageNo: 1, pageSize: 30, searchKey: val }).then( getCustomerSelect({ pageNo: 1, pageSize: 30, searchKey: val }).then((res) => {
(res) => { this.customerSelect = res.data.list
this.customerSelect = res.data.list; })
}
);
}, },
phoneValidator(rule, value, callback) { phoneValidator(rule, value, callback) {
if (!value) { if (!value) {
return callback(new Error(this.$t("请输入联系方式"))); return callback(new Error(this.$t("请输入联系方式")))
} }
let areaCode = this.form.customerContacts.find( let areaCode = this.form.customerContacts.find((e) => e.phoneNew === value).areaCode
(e) => e.phoneNew === value
).areaCode;
if (areaCode) { if (areaCode) {
validatorMobile({ validatorMobile({
code: areaCode, code: areaCode,
mobile: value, mobile: value
}) })
.then((r) => { .then((r) => {
if (r.data) { if (r.data) {
callback(); callback()
} else { } else {
callback(new Error(r.msg || this.$t("手机号验证失败"))); callback(new Error(r.msg || this.$t("手机号验证失败")))
} }
}) })
.catch((e) => { .catch((e) => {
console.error(e); console.error(e)
callback(new Error(this.$t("手机号验证失败"))); callback(new Error(this.$t("手机号验证失败")))
}); })
} }
}, },
codeValidator(rule, value, callback) { codeValidator(rule, value, callback) {
let index = +rule.field.split(".")[1]; let index = +rule.field.split(".")[1]
let phone = this.form.customerContacts[index].phoneNew; let phone = this.form.customerContacts[index].phoneNew
if (phone) { if (phone) {
validatorMobile({ validatorMobile({
code: value, code: value,
mobile: phone, mobile: phone
}) })
.then((r) => { .then((r) => {
if (r.data) { if (r.data) {
callback(); callback()
} else { } else {
callback(); callback()
this.$message.error(r.msg || this.$t("手机号验证失败")); this.$message.error(r.msg || this.$t("手机号验证失败"))
} }
}) })
.catch((e) => { .catch((e) => {
console.error(e); console.error(e)
callback(); callback()
this.$message.error(this.$t("手机号验证失败")); this.$message.error(this.$t("手机号验证失败"))
}); })
} }
}, },
handleDefaultChange($index) { handleDefaultChange($index) {
// 只有一个联系人,设置成非默认 // 只有一个联系人,设置成非默认
if ( if (this.form.customerContacts.length === 1 && this.form.customerContacts[0].isDefault === 0) {
this.form.customerContacts.length === 1 && this.$modal.msgWarning(this.$t("至少拥有一个默认联系人"))
this.form.customerContacts[0].isDefault === 0 this.form.customerContacts[0].isDefault = 1
) { return
this.$modal.msgWarning(this.$t("至少拥有一个默认联系人"));
this.form.customerContacts[0].isDefault = 1;
return;
} }
// 设置默认联系人 // 设置默认联系人
if (this.form.customerContacts[$index].isDefault === 1) { if (this.form.customerContacts[$index].isDefault === 1) {
// 其他的置否 // 其他的置否
let i = 0; let i = 0
this.form.customerContacts.forEach((e) => { this.form.customerContacts.forEach((e) => {
if (i !== $index) { if (i !== $index) {
e.isDefault = 0; e.isDefault = 0
} }
i++; i++
}); })
} else { } else {
// 第一个置是 // 第一个置是
this.form.customerContacts[0].isDefault = 1; this.form.customerContacts[0].isDefault = 1
} }
}, },
/* selectBD(val){ /* selectBD(val){
...@@ -1518,49 +989,49 @@ export default { ...@@ -1518,49 +989,49 @@ export default {
}, */ }, */
/** 取消按钮 */ /** 取消按钮 */
cancel() { cancel() {
this.$tab.closePage(); this.$tab.closePage()
this.open = false; this.open = false
this.reset(); this.reset()
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
if (this.form.customerContacts.length === 0) { if (this.form.customerContacts.length === 0) {
this.$modal.alert(this.$t("至少添加一位联系人")); this.$modal.alert(this.$t("至少添加一位联系人"))
return; return
} }
this.$refs["contactForm"].validate((valid1, err1) => { this.$refs["contactForm"].validate((valid1, err1) => {
this.$refs["form"].validate((valid2, err2) => { this.$refs["form"].validate((valid2, err2) => {
this.$refs.bankForm.validate((valid3, err3) => { this.$refs.bankForm.validate((valid3, err3) => {
console.log(valid3, "valid3"); console.log(valid3, "valid3")
if (!valid1 || !valid2 || !valid3) { if (!valid1 || !valid2 || !valid3) {
this.$showFormValidateErrors({ ...err1, ...err2, ...err3 }); this.$showFormValidateErrors({ ...err1, ...err2, ...err3 })
return; return
} }
if (this.form.customerContacts.length === 0) { if (this.form.customerContacts.length === 0) {
this.$modal.msgError(this.$t("至少填写一个联系人信息")); this.$modal.msgError(this.$t("至少填写一个联系人信息"))
return; return
} }
if (this.form.competitorIds == 0) { if (this.form.competitorIds == 0) {
this.$modal.msgError(this.$t("请重新选择主要竞争对手")); this.$modal.msgError(this.$t("请重新选择主要竞争对手"))
return; return
} }
// 重货标准和泡货标准,未打开就不传,提交前清空一下 // 重货标准和泡货标准,未打开就不传,提交前清空一下
if (!this.showZhong) { if (!this.showZhong) {
this.form.weightUnit = null; this.form.weightUnit = null
this.zhongLines = []; this.zhongLines = []
} }
if (!this.showZhong1) { if (!this.showZhong1) {
this.zhongLines = []; this.zhongLines = []
} }
if (!this.showPao) { if (!this.showPao) {
this.form.lightUnit = null; this.form.lightUnit = null
this.paoLines = []; this.paoLines = []
} }
if (!this.showPao1) { if (!this.showPao1) {
this.paoLines = []; this.paoLines = []
} }
this.updateCustomerLines(); this.updateCustomerLines()
const form = { const form = {
...this.form, ...this.form,
type: this.form.type?.join(","), type: this.form.type?.join(","),
...@@ -1569,68 +1040,67 @@ export default { ...@@ -1569,68 +1040,67 @@ export default {
roles: (this.form.roles || [])?.join(","), roles: (this.form.roles || [])?.join(","),
pickupPoints: (this.form.pickupPoints || [])?.join(","), pickupPoints: (this.form.pickupPoints || [])?.join(","),
productIds: (this.form.productIds || [])?.join(","), productIds: (this.form.productIds || [])?.join(","),
productTypes: (this.form.productTypes || [])?.join(","),
busiCountryIds: (this.form.busiCountryIds || [])?.join(","), busiCountryIds: (this.form.busiCountryIds || [])?.join(","),
noConsignee: undefined, noConsignee: undefined,
defaultPay: undefined, defaultPay: undefined,
defaultBilling: undefined, defaultBilling: undefined
}; }
form.customerContacts = JSON.parse( form.customerContacts = JSON.parse(JSON.stringify(this.form.customerContacts))
JSON.stringify(this.form.customerContacts)
);
form.customerContacts.forEach((e) => { form.customerContacts.forEach((e) => {
e.email = [...e.email].filter((i) => i !== "").join(","); e.email = [...e.email].filter((i) => i !== "").join(",")
}); })
// 检查路线是否启用了但是没选择目的仓 // 检查路线是否启用了但是没选择目的仓
let errors = 0; let errors = 0
form.customerLines.forEach((line) => { form.customerLines.forEach((line) => {
if (!line.objectiveIds || line.objectiveIds == "") { if (!line.objectiveIds || line.objectiveIds == "") {
errors++; errors++
} }
}); })
if (errors) { if (errors) {
return this.$message.error("有两条路线未选择目的地"); return this.$message.error("有两条路线未选择目的地")
} }
//我的客户页面跳转直接,完善客户 //我的客户页面跳转直接,完善客户
if (this.isCustomerServiceConfirmed) { if (this.isCustomerServiceConfirmed) {
form.isCustomerServiceConfirmed = this.isCustomerServiceConfirmed; form.isCustomerServiceConfirmed = this.isCustomerServiceConfirmed
} }
// 修改的提交 // 修改的提交
if (this.form.id != null) { if (this.form.id != null) {
this.form.customerContacts.forEach((e) => { this.form.customerContacts.forEach((e) => {
e.customerId = this.customerId; e.customerId = this.customerId
}); })
console.log(this.form) console.log(this.form)
if (this.$route.name === "perfect") { if (this.$route.name === "perfect") {
fillupCustomeInfo(form).then((r) => { fillupCustomeInfo(form).then((r) => {
this.$modal.msgSuccess(this.$t("修改成功")); this.$modal.msgSuccess(this.$t("修改成功"))
this.open = false; this.open = false
const obj = { path: "/customer/customer" }; const obj = { path: "/customer/customer" }
this.$tab.closeOpenPage(obj); this.$tab.closeOpenPage(obj)
}); })
} else { } else {
updateCustomer(form).then((response) => { updateCustomer(form).then((response) => {
this.$modal.msgSuccess(this.$t("修改成功")); this.$modal.msgSuccess(this.$t("修改成功"))
this.open = false; this.open = false
// this.getList(); // this.getList();
const obj = { path: "/customer/customer" }; const obj = { path: "/customer/customer" }
this.$tab.closeOpenPage(obj); this.$tab.closeOpenPage(obj)
}); })
} }
return; return
} }
// 添加的提交 // 添加的提交
createCustomer(form).then((response) => { createCustomer(form).then((response) => {
this.$modal.msgSuccess(this.$t("新增成功")); this.$modal.msgSuccess(this.$t("新增成功"))
this.open = false; this.open = false
// this.getList(); // this.getList();
const obj = { path: "/customer/customer" }; const obj = { path: "/customer/customer" }
this.$tab.closeOpenPage(obj); this.$tab.closeOpenPage(obj)
}); })
}); })
}); })
}); })
}, },
/** 表单重置 */ /** 表单重置 */
reset() { reset() {
...@@ -1683,63 +1153,61 @@ export default { ...@@ -1683,63 +1153,61 @@ export default {
carName: undefined, carName: undefined,
carNo: undefined, carNo: undefined,
customerBanks: [], customerBanks: [],
isNew: true,// 业绩类型 isNew: true, // 业绩类型
firstDealTime: undefined,// 首次成交时间 firstDealTime: undefined, // 首次成交时间
// estimateEnterOpenSeaTime: undefined,// 掉入公海时间 // estimateEnterOpenSeaTime: undefined,// 掉入公海时间
getMethod: undefined,// 获取方式 getMethod: undefined, // 获取方式
createFrom: undefined,// 创建入口 createFrom: undefined, // 创建入口
catchTime: undefined,//捞取时间 catchTime: undefined, //捞取时间
customerServiceConfirmedTime: undefined,//归属时间 customerServiceConfirmedTime: undefined, //归属时间
updater: this.$store.getters.userId,// 更新人 updater: this.$store.getters.userId, // 更新人
updateTime: undefined,// 更新时间 updateTime: undefined, // 更新时间
roles: undefined,// 客户角色 roles: undefined, // 客户角色
busiCountryIds: undefined,// 业务国家 busiCountryIds: undefined, // 业务国家
competitorIds: undefined,// 主要竞争对手 competitorIds: undefined, // 主要竞争对手
weightYearly: undefined,// 年度发货量 weightYearly: undefined, // 年度发货量
numYearly: undefined,// 年度发货次数 numYearly: undefined, // 年度发货次数
noConsignee: false,// 控制无收货人 noConsignee: false, // 控制无收货人
defaultPay: false,// 默认付款 defaultPay: false, // 默认付款
defaultBilling: false,// 默认开票 defaultBilling: false // 默认开票
}; }
this.form.createTime = new Date().getTime(); this.form.createTime = new Date().getTime()
this.form.updateTime = new Date().getTime(); this.form.updateTime = new Date().getTime()
this.resetForm("form"); this.resetForm("form")
}, },
getCustomer(id) { getCustomer(id) {
return getCustomer(id).then((response) => { return getCustomer(id).then((response) => {
console.log(response, "response"); console.log(response, "response")
this.form = { this.form = {
...this.form, ...this.form,
...response.data, ...response.data,
id: this.customerId, id: this.customerId,
transportType: transportType: response.data.transportType && response.data.transportType !== "" ? response.data.transportType.split(",") : [],
response.data.transportType && response.data.transportType !== ""
? response.data.transportType.split(",")
: [],
customerBanks: response.data.customerBankBackVOList, customerBanks: response.data.customerBankBackVOList,
roles: response.data.roles? response.data.roles.split(",") : [], roles: response.data.roles ? response.data.roles.split(",") : [],
pickupPoints: this.stringArrToNumberArr(response.data.pickupPoints), pickupPoints: this.stringArrToNumberArr(response.data.pickupPoints),
productIds: this.stringArrToNumberArr(response.data.productIds), productIds: this.stringArrToNumberArr(response.data.productIds),
busiCountryIds: this.stringArrToNumberArr(response.data.busiCountryIds), busiCountryIds: this.stringArrToNumberArr(response.data.busiCountryIds),
competitorIds: Number(response.data.competitorIds) competitorIds: Number(response.data.competitorIds),
}; productTypes: response.data.productTypes ? response.data.productTypes.split(",") : []
}
if (this.form.productType) { if (this.form.productType) {
console.log("1231", this.form.productType); console.log("1231", this.form.productType)
this.getProductListFn(this.form.productType); this.getProductListFn(this.form.productType)
} }
console.log(this.form) console.log(this.form)
this.open = true; this.open = true
this.title = this.$t("修改客户"); this.title = this.$t("修改客户")
this.$forceUpdate() this.$forceUpdate()
this.getZhongPao(); this.getZhongPao()
}); })
}, },
stringArrToNumberArr(data) { stringArrToNumberArr(data) {
if (data) { if (data) {
const strArr = data.split(",") const strArr = data.split(",")
const numArr = strArr.map(item => Number(item)) const numArr = strArr.map((item) => Number(item))
return numArr return numArr
} else { } else {
return [] return []
...@@ -1747,14 +1215,14 @@ export default { ...@@ -1747,14 +1215,14 @@ export default {
}, },
updateCustomerLines() { updateCustomerLines() {
let zhongLines = [], let zhongLines = [],
paoLines = []; paoLines = []
if (this.zhongLines.length > 0) { if (this.zhongLines.length > 0) {
zhongLines = this.zhongLines; zhongLines = this.zhongLines
} }
if (this.paoLines.length > 0) { if (this.paoLines.length > 0) {
paoLines = this.paoLines; paoLines = this.paoLines
} }
this.form.customerLines = [...zhongLines, ...paoLines]; this.form.customerLines = [...zhongLines, ...paoLines]
}, },
handleAddContact() { handleAddContact() {
this.form.customerContacts.push({ this.form.customerContacts.push({
...@@ -1769,47 +1237,52 @@ export default { ...@@ -1769,47 +1237,52 @@ export default {
social: undefined, social: undefined,
socialNumber: "", socialNumber: "",
userid: undefined, userid: undefined,
nameEn: "", nameEn: ""
// "username": "" // "username": ""
}); })
}, },
handleDeleteContact($index) { handleDeleteContact($index) {
this.form.customerContacts.splice($index, 1); this.form.customerContacts.splice($index, 1)
if (this.form.customerContacts.length > 0) { if (this.form.customerContacts.length > 0) {
this.$refs["contactForm"].clearValidate(); this.$refs["contactForm"].clearValidate()
if (!this.form.customerContacts.find((e) => e.isDefault)) { if (!this.form.customerContacts.find((e) => e.isDefault)) {
this.form.customerContacts[0].isDefault = 1; this.form.customerContacts[0].isDefault = 1
} }
} }
}, },
getZhongPao() { getZhongPao() {
getZhongPaoBest({ getZhongPaoBest({
customerId: this.customerId, customerId: this.customerId
// departureId: this.departureId, // departureId: this.departureId,
// objectiveId: this.objectiveId // objectiveId: this.objectiveId
}).then((r) => { }).then((r) => {
if (!this.form.weightUnit) this.form.weightUnit = r.data.zhongEdge; if (!this.form.weightUnit) this.form.weightUnit = r.data.zhongEdge
if (!this.form.lightUnit) this.form.lightUnit = r.data.paoEdge; if (!this.form.lightUnit) this.form.lightUnit = r.data.paoEdge
}); })
}, },
getCompetitorList() { getCompetitorList(callback) {
competitorListAll().then((r) => { competitorListAll().then((r) => {
this.competitorList = r.data; this.competitorList = r.data
this.$nextTick(() => {
callback && callback()
})
}) })
}, },
changeCompetitor(val) { changeCompetitor(val) {
if (val == 0) { if (val == 0) {
this.$prompt("请输入主要竞争对手", "提示", { this.$prompt("请输入主要竞争对手", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消"
}).then((data) => { }).then((data) => {
console.log(data) console.log(data)
addCompetitor({ addCompetitor({
name: data.value name: data.value
}).then(_ => { }).then((r) => {
this.$message.success('添加成功!') this.$message.success("添加成功!")
this.getCompetitorList() this.getCompetitorList(() => {
this.form.competitorIds = r.data
})
}) })
}) })
} }
...@@ -1817,13 +1290,13 @@ export default { ...@@ -1817,13 +1290,13 @@ export default {
}, },
computed: { computed: {
isChinese() { isChinese() {
return this.$i18n.locale === "zh_CN"; return this.$i18n.locale === "zh_CN"
}, },
userId() { userId() {
return this.$store.state.user.id; return this.$store.state.user.id
}, },
customerId() { customerId() {
return this.$route.params.customerId; return this.$route.params.customerId
}, },
/* userMemberUser(){ /* userMemberUser(){
let list = this.memberList.filter(item => { let list = this.memberList.filter(item => {
...@@ -1832,33 +1305,31 @@ export default { ...@@ -1832,33 +1305,31 @@ export default {
return [...this.selectMemberList,...list] return [...this.selectMemberList,...list]
}, */ }, */
productListFilter() { productListFilter() {
return this.productList.filter((p) => p.typeId === this.form.productType); return this.productList.filter((p) => p.typeId === this.form.productType)
}, },
customerSelectFn() { customerSelectFn() {
if (this.recommended.length > 0) { if (this.recommended.length > 0) {
let i = this.customerSelect.find( let i = this.customerSelect.find((item) => item.id === this.recommended[0].id)
(item) => item.id === this.recommended[0].id
);
if (!i) { if (!i) {
this.customerSelect.push(this.recommended[0]); this.customerSelect.push(this.recommended[0])
} }
return this.customerSelect; return this.customerSelect
} else { } else {
return this.customerSelect; return this.customerSelect
}
} }
},
}, },
watch: { watch: {
zhongLines() { zhongLines() {
console.log("zhongLines", this.zhongLines); console.log("zhongLines", this.zhongLines)
this.updateCustomerLines(); this.updateCustomerLines()
}, },
paoLines() { paoLines() {
console.log("paoLines", this.paoLines); console.log("paoLines", this.paoLines)
this.updateCustomerLines(); this.updateCustomerLines()
}, }
}, }
}; }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
......
...@@ -324,8 +324,17 @@ ...@@ -324,8 +324,17 @@
<!-- />--> <!-- />-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName"></el-table-column> <el-table-column
<el-table-column :label="$t('国籍')" align="center" prop="country" :formatter="countryFormatter"></el-table-column> :label="$t('客户经理')"
align="center"
prop="customerServiceName"
></el-table-column>
<el-table-column
:label="$t('国籍')"
align="center"
prop="country"
:formatter="countryFormatter"
></el-table-column>
<el-table-column :label="$t('出货渠道')" align="center"> <el-table-column :label="$t('出货渠道')" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
{{ channel(row.transportType) }} {{ channel(row.transportType) }}
...@@ -414,7 +423,12 @@ ...@@ -414,7 +423,12 @@
<span>{{ parseTime(scope.row.updateTime) }}</span> <span>{{ parseTime(scope.row.updateTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="200px" :label="$t('操作')" align="center" fixed="right"> <el-table-column
width="200px"
:label="$t('操作')"
align="center"
fixed="right"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button size="mini" type="text" v-show="'development' === env && scope.row.isInOpenSea" @click="seasPond(scope.row)"--> <!-- <el-button size="mini" type="text" v-show="'development' === env && scope.row.isInOpenSea" @click="seasPond(scope.row)"-->
<!-- v-hasPermi="['ecw:customer:query']">{{$t('掉入公海池')}}</el-button>--> <!-- v-hasPermi="['ecw:customer:query']">{{$t('掉入公海池')}}</el-button>-->
...@@ -965,22 +979,22 @@ export default { ...@@ -965,22 +979,22 @@ export default {
} }
}, },
combinedQueryParams() { combinedQueryParams() {
let queryParams = {} let queryParams = {};
if (this.enterOpenSeaTime && this.enterOpenSeaTime.length == 2) { if (this.enterOpenSeaTime && this.enterOpenSeaTime.length == 2) {
queryParams.beginEnterOpenSeaTime = this.enterOpenSeaTime[0] queryParams.beginEnterOpenSeaTime = this.enterOpenSeaTime[0];
queryParams.endEnterOpenSeaTime = this.enterOpenSeaTime[1] queryParams.endEnterOpenSeaTime = this.enterOpenSeaTime[1];
} }
if (this.customerServiceConfirmedTime && this.customerServiceConfirmedTime.length == 2) { if (this.customerServiceConfirmedTime && this.customerServiceConfirmedTime.length == 2) {
queryParams.beginCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[0] queryParams.beginCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[0]
queryParams.endCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[1] queryParams.endCustomerServiceConfirmedTime = this.customerServiceConfirmedTime[1]
} }
if (this.dateRangeCreateTime && this.dateRangeCreateTime.length == 2) { if (this.dateRangeCreateTime && this.dateRangeCreateTime.length == 2) {
queryParams.beginCreateTime = this.dateRangeCreateTime[0] queryParams.beginCreateTime = this.dateRangeCreateTime[0];
queryParams.endCreateTime = this.dateRangeCreateTime[1] queryParams.endCreateTime = this.dateRangeCreateTime[1];
} }
if (this.firstDealTime && this.firstDealTime.length == 2) { if (this.firstDealTime && this.firstDealTime.length == 2) {
queryParams.beginFirstDealTime = this.firstDealTime[0] queryParams.beginFirstDealTime = this.firstDealTime[0];
queryParams.endFirstDealTime = this.firstDealTime[1] queryParams.endFirstDealTime = this.firstDealTime[1];
} }
if (this.weightYearly.value) { if (this.weightYearly.value) {
let key = "eqWeightYearly" let key = "eqWeightYearly"
...@@ -1420,12 +1434,12 @@ export default { ...@@ -1420,12 +1434,12 @@ export default {
const strArr = [] const strArr = []
this.countryList.forEach((item) => { this.countryList.forEach((item) => {
if (idsArr.includes(item.id.toString())) { if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.nameZh : item.nameEn) strArr.push(this.isChinese ? item.nameZh : item.nameEn);
} }
}) })
return strArr.length > 0 ? strArr.join(",") : null return strArr.length > 0 ? strArr.join(",") : null
} else { } else {
return null return null;
} }
}, },
getPickupPointNames(ids) { getPickupPointNames(ids) {
...@@ -1434,7 +1448,7 @@ export default { ...@@ -1434,7 +1448,7 @@ export default {
const strArr = [] const strArr = []
this.getNodeLists.forEach((item) => { this.getNodeLists.forEach((item) => {
if (idsArr.includes(item.id.toString())) { if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.titleZh : item.titleEn) strArr.push(this.isChinese ? item.titleZh : item.titleEn);
} }
}) })
return strArr.length > 0 ? strArr.join(",") : null return strArr.length > 0 ? strArr.join(",") : null
...@@ -1453,7 +1467,7 @@ export default { ...@@ -1453,7 +1467,7 @@ export default {
}) })
return strArr.length > 0 ? strArr.join(",") : null return strArr.length > 0 ? strArr.join(",") : null
} else { } else {
return null return null;
} }
}, },
getProductTypeNames(ids) { getProductTypeNames(ids) {
...@@ -1462,12 +1476,12 @@ export default { ...@@ -1462,12 +1476,12 @@ export default {
const strArr = [] const strArr = []
this.productTypeList.forEach((item) => { this.productTypeList.forEach((item) => {
if (idsArr.includes(item.id.toString())) { if (idsArr.includes(item.id.toString())) {
strArr.push(this.isChinese ? item.titleZh : item.titleEn) strArr.push(this.isChinese ? item.titleZh : item.titleEn);
} }
}) })
return strArr.length > 0 ? strArr.join(",") : null return strArr.length > 0 ? strArr.join(",") : null
} else { } else {
return null return null;
} }
}, },
getPromoterName(id) { getPromoterName(id) {
...@@ -1475,13 +1489,13 @@ export default { ...@@ -1475,13 +1489,13 @@ export default {
let strName = "" let strName = ""
for (const item of this.customerSelectFn) { for (const item of this.customerSelectFn) {
if (item.id == id) { if (item.id == id) {
strName = item.name strName = item.name;
break break;
} }
} }
return strName return strName;
} else { } else {
return null return null;
} }
} }
} }
......
...@@ -334,106 +334,7 @@ ...@@ -334,106 +334,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('跟进')">
<el-card class="box-card"> <logListCommon ref="logListCommon" v-if="activeName === 'follow'" :customerId="id" />
<div slot="header" class="clearfix">
<el-form size="small" :inline="true" label-width="100px">
<el-form-item :label="$t('跟进类型')">
<el-select clearable multiple v-model="followForm.followTypes" :placeholder="$t('请选择')" size="small" @change="handleQuery">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_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 multiple v-model="followForm.followMethods" :placeholder="$t('请选择')" size="small" @change="handleQuery">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD)" :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 multiple v-model="followForm.resultTypes" :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 multiple v-model="followForm.statuses" :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>
<!--
<el-form-item :label="$t('跟进时间')">
<el-date-picker type="datetimerange" clearable v-model="followTime" style="width: 320px" value-format="yyyy-MM-dd HH:mm:ss" range-separator="-" :start-placeholder="$t('开始跟进时间')" :end-placeholder="$t('结束跟进时间')" />
</el-form-item>
<el-form-item :label="$t('下次跟进时间')">
<el-date-picker type="datetimerange" clearable v-model="nextTime" style="width: 320px" value-format="yyyy-MM-dd HH:mm:ss" range-separator="-" :start-placeholder="$t('开始下次跟进时间')" :end-placeholder="$t('结束下次跟进时间')" />
</el-form-item>
-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="getCustomerFollowList">{{ $t("搜索") }} </el-button>
<el-button
type="primary"
@click="
() => {
followForm = { pageNo: 1, pageSize: 10 }
getCustomerFollowList()
}
"
>{{ $t("重置") }}
</el-button>
<el-button type="success" @click="customerFollowFn('follow')" v-hasPermi="['ecw:customer:follow-create']">{{ $t("新增") }} </el-button>
<el-button type="warning" @click="handleExport" v-hasPermi="['ecw:customer:follow-export']">
{{ $t("导出") }}
</el-button>
</el-form-item>
</el-form>
</div>
<el-table :data="customerFollowList" style="width: 100%">
<el-table-column prop="number" :label="$t('编号')" width="120">
<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('客户编号')"></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" @click="handleCustomerFollow(scope.row, scope.row.status === 0)" 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="getCustomerFollowList" />
</el-card>
</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>
...@@ -705,7 +606,7 @@ ...@@ -705,7 +606,7 @@
</div> </div>
</el-dialog> </el-dialog>
<customer-follow ref="customerFollow" v-if="customerFollowVisible" :id="id" :customer-id="id" :customer-service="customer.customerService" :customer-number="customer.number" @refresh="getCustomerFollowList" /> <customer-follow ref="customerFollow" v-if="customerFollowVisible" :customer-id="id" :customer-service="customer.customerService" :customer-number="customer.number" @refresh="logListCommonRefresh" />
</div> </div>
</template> </template>
...@@ -731,7 +632,8 @@ import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue" ...@@ -731,7 +632,8 @@ import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue"
import { getListTree } from "@/api/ecw/region" 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 { getCustomerFollowList, exportCustomerFollow } from "@/api/ecw/customerFollow"
import logListCommon from "@/views/ecw/offer/logListCommon"
export default { export default {
name: "query", name: "query",
...@@ -740,7 +642,8 @@ export default { ...@@ -740,7 +642,8 @@ export default {
Template, Template,
CustomerFollow, CustomerFollow,
CustomerComplaint, CustomerComplaint,
customerLog customerLog,
logListCommon
}, },
created() { created() {
// 获取币种 // 获取币种
...@@ -811,7 +714,6 @@ export default { ...@@ -811,7 +714,6 @@ export default {
this.getInfoListOfferPage() //报价 this.getInfoListOfferPage() //报价
break break
case "follow": case "follow":
this.getCustomerFollowList()
case "bill": case "bill":
this.infoListReceiptFn() //账单 this.infoListReceiptFn() //账单
break break
...@@ -991,14 +893,7 @@ export default { ...@@ -991,14 +893,7 @@ export default {
objectiveId: null, objectiveId: null,
destWarehouseId: null, destWarehouseId: null,
customerFollowVisible: false, customerFollowVisible: false,
followForm: {
pageNo: 1,
pageSize: 10
},
followTime: [],
nextTime: [], nextTime: [],
customerFollowTotal: 0,
customerFollowList: [],
currencyList: [], currencyList: [],
userId: undefined userId: undefined
} }
...@@ -1080,18 +975,6 @@ export default { ...@@ -1080,18 +975,6 @@ export default {
this.$router.push({ path: "/offer/create", query: { customerId: row.id, customerType: row.type, type: 1 } }) this.$router.push({ path: "/offer/create", query: { customerId: row.id, customerType: row.type, type: 1 } })
}, },
handleCustomerFollow(row, flag) {
this.customerFollowVisible = true
this.$nextTick((_) => {
this.$refs["customerFollow"].handleUpdate(row, flag)
})
},
handleCustomerFollowLink(row) {
this.customerFollowVisible = true
this.$nextTick((_) => {
this.$refs["customerFollow"].handleView(row)
})
},
checkPermi, checkPermi,
userIdFormatter(row, column, cellValue) { userIdFormatter(row, column, cellValue) {
const member = this.memberList.find((e) => e.id === cellValue) const member = this.memberList.find((e) => e.id === cellValue)
...@@ -1192,27 +1075,6 @@ export default { ...@@ -1192,27 +1075,6 @@ export default {
this.infoListOfferFrom = { pageNo: 1, pageSize: 10 } this.infoListOfferFrom = { pageNo: 1, pageSize: 10 }
this.getInfoListOfferPage() this.getInfoListOfferPage()
}, },
getCustomerFollowList() {
getCustomerFollowList({
...this.followForm,
customerId: this.customerId
}).then((r) => {
this.customerFollowList = r.data.list
this.customerFollowTotal = r.data.total
})
},
/** 跟进记录导出按钮操作 */
handleExport() {
// 执行导出
this.$modal.confirm(this.$t("是否确认导出客户跟进记录数据项?")).then(() => {
exportCustomerFollow({
...this.followForm,
customerId: this.customerId
}).then((r) => {
this.$message.success(this.$t("已加入导出队列,请稍后在下载日志中下载"))
})
})
},
// 数据 // 数据
getOrderStatistics() { getOrderStatistics() {
orderStatistics({ customerId: this.id }).then((r) => { orderStatistics({ customerId: this.id }).then((r) => {
...@@ -1340,6 +1202,9 @@ export default { ...@@ -1340,6 +1202,9 @@ export default {
this.$message.success("操作成功") this.$message.success("操作成功")
this.handleQuery() this.handleQuery()
}) })
},
logListCommonRefresh() {
this.$refs.logListCommon && this.$refs.logListCommon.handleQuery()
} }
} }
} }
......
...@@ -25,14 +25,15 @@ ...@@ -25,14 +25,15 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10" v-for="(item, index) in queryParams.nodeIds"> <el-row :gutter="10" v-for="(item, index) in queryParams.nodeIds" :key="item.id">
<el-col :span="6"> <el-col :span="6">
<el-form-item v-if="title == 3" :label="$t('提货点')" :prop="`nodeIds[${index}].wareHouses`" :rules="rules.nodeIds.wareHouses"> <el-form-item v-if="title == 3" :label="$t('提货点')" :prop="`nodeIds[${index}].wareHouses`" :rules="rules.nodeIds.wareHouses">
<el-select v-model="item.wareHouses" :placeholder="$t('请选择提货点')" :disabled="isDisable" clearable multiple filterable remote reserve-keyword :remote-method="handleWarehouseList" @visible-change="changeWarehouseList" :loading="loading" size="small"> <el-select v-model="item.wareHouses" :placeholder="$t('请选择提货点')" :disabled="isDisable" clearable multiple filterable remote reserve-keyword :remote-method="handleWarehouseList" @visible-change="changeWarehouseList" :loading="loading" size="small">
<el-option v-for="nodeItem in warehouseList" :key="nodeItem.id" :label="isChinese ? nodeItem.titleZh : nodeItem.titleEn" :value="nodeItem.id" /> <el-option v-for="nodeItem in warehouseList" :key="nodeItem.id" :label="isChinese ? nodeItem.titleZh : nodeItem.titleEn" :value="nodeItem.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-else :label="$t('提货点')" :prop="`nodeIds[${index}].wareHouses`" :rules="rules.nodeIds.wareHouses"> <!-- 编辑对应单个提货点 逻辑显示-->
<el-form-item v-else :label="$t('提货点')" :prop="`nodeId`">
<el-select v-model="queryParams.nodeId" :placeholder="$t('请选择提货点')" :disabled="isDisable" clearable filterable remote reserve-keyword :remote-method="handleWarehouseList" @visible-change="changeWarehouseList" :loading="loading" size="small"> <el-select v-model="queryParams.nodeId" :placeholder="$t('请选择提货点')" :disabled="isDisable" clearable filterable remote reserve-keyword :remote-method="handleWarehouseList" @visible-change="changeWarehouseList" :loading="loading" size="small">
<el-option v-for="nodeItem in warehouseList" :key="nodeItem.id" :label="isChinese ? nodeItem.titleZh : nodeItem.titleEn" :value="nodeItem.id" /> <el-option v-for="nodeItem in warehouseList" :key="nodeItem.id" :label="isChinese ? nodeItem.titleZh : nodeItem.titleEn" :value="nodeItem.id" />
</el-select> </el-select>
...@@ -175,9 +176,16 @@ export default { ...@@ -175,9 +176,16 @@ export default {
this.queryParams = deepClone(newVal) this.queryParams = deepClone(newVal)
this.$set(this.queryParams, "dateRangeCreateTime", [parseTime(newVal.startTime), parseTime(newVal.endTime)]) this.$set(this.queryParams, "dateRangeCreateTime", [parseTime(newVal.startTime), parseTime(newVal.endTime)])
this.queryParams.pickMethod = newVal.pickMethod.split(",") this.queryParams.pickMethod = newVal.pickMethod.split(",")
this.$nextTick(() => {
this.$refs["queryForm"].clearValidate()
})
} else { } else {
this.resetFormQuery() this.resetFormQuery()
this.$nextTick(() => {
this.$refs["queryForm"].resetFields() this.$refs["queryForm"].resetFields()
this.$refs["queryForm"].clearValidate()
})
console.log("Prop is empty") console.log("Prop is empty")
} }
} }
...@@ -190,11 +198,10 @@ export default { ...@@ -190,11 +198,10 @@ export default {
endTime: null, endTime: null,
imgEn: null, imgEn: null,
imgZh: null, imgZh: null,
nodeIds: [{ wareHouses: "", points: "", quantityRemain: null }], nodeIds: [{ wareHouses: [], points: "", quantityRemain: null, id: 0 }],
nodeId: null, nodeId: null,
pickMethod: null, pickMethod: [],
pointsRequire: null, pointsRequire: null,
remarkEn: null, remarkEn: null,
remarkFr: null, remarkFr: null,
remarkZh: null, remarkZh: null,
...@@ -233,6 +240,13 @@ export default { ...@@ -233,6 +240,13 @@ export default {
trigger: "blur" trigger: "blur"
} }
], ],
nodeId: [
{
required: true,
message: this.$t("请选择提货点"),
trigger: "change"
}
],
nodeIds: { nodeIds: {
wareHouses: [ wareHouses: [
{ {
...@@ -303,9 +317,7 @@ export default { ...@@ -303,9 +317,7 @@ export default {
this.handleWarehouseList() this.handleWarehouseList()
}, },
methods: { methods: {
dataTimeFunc(e) { dataTimeFunc(e) {},
console.log("5555", e)
},
changeWarehouseList(e) { changeWarehouseList(e) {
if (e) { if (e) {
this.handleWarehouseList() this.handleWarehouseList()
...@@ -319,7 +331,7 @@ export default { ...@@ -319,7 +331,7 @@ export default {
}, },
handleOrderVRule(item, index) { handleOrderVRule(item, index) {
if (index == "0") { if (index == "0") {
this.queryParams.nodeIds.push({ nodeId: "", points: "" }) this.queryParams.nodeIds.push({ wareHouses: [], quantityRemain: null, points: "", id: index + 1 })
} else { } else {
this.queryParams.nodeIds.splice(index, 1) this.queryParams.nodeIds.splice(index, 1)
} }
...@@ -329,7 +341,9 @@ export default { ...@@ -329,7 +341,9 @@ export default {
params.startTime = this.queryParams?.dateRangeCreateTime?.[0] params.startTime = this.queryParams?.dateRangeCreateTime?.[0]
params.endTime = this.queryParams?.dateRangeCreateTime?.[1] params.endTime = this.queryParams?.dateRangeCreateTime?.[1]
params.pickMethod = this.queryParams.pickMethod.toString() params.pickMethod = this.queryParams.pickMethod.toString()
if (this.title != 3) {
params.nodeIds[0].wareHouses[0] = params.nodeId params.nodeIds[0].wareHouses[0] = params.nodeId
}
this.$refs["queryForm"].validate((valid) => { this.$refs["queryForm"].validate((valid) => {
if (valid) { if (valid) {
if (this.title == "2") { if (this.title == "2") {
...@@ -360,11 +374,11 @@ export default { ...@@ -360,11 +374,11 @@ export default {
this.queryParams = { this.queryParams = {
allowCount: null, allowCount: null,
endTime: null, endTime: null,
nodeIds: [{ wareHouses: "", points: "", quantityRemain: null }], nodeIds: [{ wareHouses: [], points: "", quantityRemain: null, id: 0 }],
imgEn: null, imgEn: null,
imgZh: null, imgZh: null,
nodeId: null, nodeId: null,
pickMethod: null, pickMethod: [],
pointsRequire: null, pointsRequire: null,
remarkEn: null, remarkEn: null,
remarkFr: null, remarkFr: null,
......
...@@ -1100,6 +1100,9 @@ export default { ...@@ -1100,6 +1100,9 @@ export default {
if (this.form.offerId != this.$route.query.id) { if (this.form.offerId != this.$route.query.id) {
this.getOffer() this.getOffer()
} }
if (this.$route.query.copyId && this.form.copyId != this.$route.query.copyId) {
this.getOffer()
}
}, },
async created() { async created() {
await this.getChannelList() await this.getChannelList()
...@@ -1154,7 +1157,7 @@ export default { ...@@ -1154,7 +1157,7 @@ export default {
getOffer() { getOffer() {
//加了是否从全部客户列表中报价按钮进来的判断 //加了是否从全部客户列表中报价按钮进来的判断
if (this.$route.query !== 1) { if (this.$route.query !== 1) {
getOffer(this.$route.query.id).then((res) => { getOffer(this.$route.query.id || this.$route.query.copyId).then((res) => {
let formData = res.data let formData = res.data
formData.type = formData.type ? formData.type.split(",").filter((item) => item != "") : [] formData.type = formData.type ? formData.type.split(",").filter((item) => item != "") : []
formData.prodCreateReqVOList = [] formData.prodCreateReqVOList = []
...@@ -1187,6 +1190,14 @@ export default { ...@@ -1187,6 +1190,14 @@ export default {
}) })
}) })
} }
if (this.$route.query.copyId) {
formData.offerId = ""
formData.startTime = ""
formData.endTime = ""
formData.stopTime = ""
}
this.$set(this, "form", formData) this.$set(this, "form", formData)
// 接口只返回了发货人和收货人ID,还需要调用接口获取详细信息回显 // 接口只返回了发货人和收货人ID,还需要调用接口获取详细信息回显
getCustomerContactsSelect({ getCustomerContactsSelect({
......
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
<el-form-item :label="$t('编号')" prop="searchNumber"> <el-form-item :label="$t('编号')" prop="searchNumber">
<el-input v-model="queryParams.searchNumber" :placeholder="$t('请输入报价单号、订单号')" clearable @keyup.enter.native="handleQuery"/> <el-input v-model.trim="queryParams.searchNumber" :placeholder="$t('请输入报价单号、订单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('客户')" prop="searchCustomer"> <el-form-item :label="$t('客户')" prop="searchCustomer">
<el-input v-model="queryParams.searchCustomer" :placeholder="$t('请输入客户')" clearable @keyup.enter.native="handleQuery"/> <el-input v-model.trim="queryParams.searchCustomer" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('联系方式')" prop="relationPhone">
<el-input v-model.trim="queryParams.relationPhone" clearable @keyup.enter.native="handleQuery" @input="queryParams.relationPhone = queryParams.relationPhone.replace(/\s+/g, '')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建时间')" prop="orderNo"> <el-form-item :label="$t('区号')" prop="relationAreaCode">
<el-date-picker type="datetime" v-model="queryParams.beginCreateTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>{{ $t('') }}<el-date-picker v-model="queryParams.endCreateTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-input v-model.trim="queryParams.relationAreaCode" :placeholder="$t('请输入客户')" clearable @keyup.enter.native="handleQuery" @input="queryParams.relationAreaCode = queryParams.relationAreaCode.replace(/\s+/g, '')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('始发地')" prop="departureId"> <el-form-item :label="$t('始发地')" prop="departureId">
...@@ -20,92 +23,149 @@ ...@@ -20,92 +23,149 @@
<el-option v-for="item in exportCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in exportCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的地')" prop="objectiveId">
<el-select v-model="queryParams.objectiveId" :placeholder="$t('请选择目的地')" clearable> <el-form-item :label="$t('目的国')" prop="destCountryId">
<el-option v-for="item in importCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option> <el-select v-model="destCountryId" multiple :label="destCountryId" :placeholder="$t('请选择目的国')" clearable @change="handleQuery">
<el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-select v-model="objectiveId" multiple :placeholder="$t('请选择目的城市')" style="width: 200px" clearable @change="handleQuery">
<el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select v-model="destWarehouseId" multiple :placeholder="$t('请选择目的仓')" style="width: 200px" clearable @change="handleQuery">
<el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('客户经理')" prop="salesmanIds">
<user-selector v-model="queryParams.salesmanIds" multiple clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('销售阶段')" prop="statusList">
<dict-selector :type="DICT_TYPE.ECW_OFFER_STATUS" multiple v-model="queryParams.statusList" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('重要程度')" prop="importances">
<el-select v-model="queryParams.importances" multiple :placeholder="$t('请选择')" clearable @change="handleQuery">
<el-option v-for="item in [1, 2, 3, 4, 5]" :label="item" :value="item" :key="item"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('运输方式')" prop="transportId"> <el-form-item :label="$t('创建时间')">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number" clearable /> <el-date-picker v-model="queryTmp.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>
<el-form-item :label="$t('商品')" prop="prodTitle">
<el-input v-model="queryParams.prodTitle" :placeholder="$t('请输入商品类型、品名或品牌')" clearable @keyup.enter.native="handleQuery"/> <el-form-item :label="$t('运输方式')" prop="transportId" v-show="showSearch">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" multiple formatter="number" clearable @change="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('控货')" prop="control"> <el-form-item :label="$t('出货渠道')" prop="channelIds" v-show="showSearch">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" v-model="queryParams.control" clearable /> <selector :clearable="true" :options="channelList" :label-field="$l('name')" value-field="channelId" v-model="queryParams.channelIds" multiple @change="handleQuery"></selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('客户经理')" prop="followUpSalesmanId"> <el-form-item :label="$t('商品')" prop="prodTitle" v-show="showSearch">
<user-selector v-model="queryParams.followUpSalesmanId" clearable /> <el-input v-model.trim="queryParams.prodTitle" :placeholder="$t('请输入商品类型、品名或品牌')" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('销售阶段')" prop="status"> <el-form-item :label="$t('控货')" prop="control" v-show="showSearch">
<dict-selector :type="DICT_TYPE.ECW_OFFER_STATUS" v-model="queryParams.status" clearable /> <dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" v-model="queryParams.control" clearable @change="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('报关方式')" prop="customsType"> <el-form-item :label="$t('报关方式')" prop="customsType" v-show="showSearch">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsType" clearable /> <dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsType" clearable @change="handleQuery" />
</el-form-item> </el-form-item>
<div> <el-form-item :label="$t('增值服务')" prop="serviceType" v-show="showSearch">
<el-form-item :label="$t('预计结束时间')" prop="orderNo"> <el-select v-model="queryParams.serviceType" :placeholder="$t('请选择')" clearable @change="handleQuery">
<el-date-picker type="datetime" v-model="queryParams.beginStopTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>{{ $t('') }}<el-date-picker type="datetime" v-model="queryParams.endStopTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-option :label="$t('普通订单')" :value="0"></el-option>
<el-option :label="$t('集运服务')" :value="1"></el-option>
<el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item :label="$t('客户来源')" prop="sourceIds" v-show="showSearch">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button> <dict-selector :type="DICT_TYPE.CUSTOMER_SOURCE" multiple v-model="queryParams.sourceIds" clearable @change="handleQuery" />
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button> </el-form-item>
<el-form-item :label="$t('有效期开始')" v-show="showSearch">
<el-date-picker v-model="queryTmp.startTime" type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd" @change="handleQuery"> </el-date-picker>
</el-form-item>
<el-form-item :label="$t('有效期结束')" v-show="showSearch">
<el-date-picker v-model="queryTmp.endTime" type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd" @change="handleQuery"> </el-date-picker>
</el-form-item> </el-form-item>
</div>
<el-form-item :label="$t('预计结束时间')" v-show="showSearch">
<el-date-picker v-model="queryTmp.stopTime" 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-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t("重置") }}</el-button>
</el-form-item>
</el-form> </el-form>
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['ecw:offer:create']">{{ $t("新增") }}</el-button>
v-hasPermi="['ecw:offer:create']">{{$t('新增')}}</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" v-hasPermi="['ecw:offer:export']">{{ $t("导出") }}</el-button>
v-hasPermi="['ecw:offer:export']">{{$t('导出')}}</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list" border> <el-table v-loading="loading" :data="list" border>
<el-table-column :label="$t('报价单号')" align="left" prop="number" width="200px"> <el-table-column :label="$t('报价单号')" align="left" prop="number" width="150">
<template slot-scope="{row}"> <template slot-scope="{ row }">
<el-link type="primary" @click.native="$router.push('detail?offerId=' + row.offerId)">{{row.number}}</el-link> <el-link type="primary" @click.native="$router.push('detail?offerId=' + row.offerId)">{{ row.number }}</el-link>
</template>
</el-table-column>
<el-table-column :label="$t('订单编号')" align="left" width="120">
<template slot-scope="{ row }">
<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('订单编号')" align="left" prop="orderNo" /> <el-table-column :label="$t('联系人')" align="left" prop="relationName" width="120" />
<el-table-column :label="$t('客户名称')" align="left" prop="relationName" /> <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="left" prop="departureName" />
<el-table-column :label="$t('目的地')" align="center" prop="objectiveName" /> <el-table-column :label="$t('目的地')" align="center" prop="objectiveName" />
<el-table-column :label="$t('销售阶段')" align="left" width="180"> <el-table-column :label="$t('运输方式')" align="center">
<template slot-scope="{row}"> <template slot-scope="{ row }">
{{ $l(transportTypes[row.transportType], "label") }}
</template>
</el-table-column>
<el-table-column :label="$t('销售阶段')" align="left" width="100">
<template slot-scope="{ row }">
<dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="row.status" /> <dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="row.status" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('预计结束时间')" align="left"> <el-table-column :label="$t('预计结束时间')" align="left" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.stopTime, "{y}-{m}-{d}") }}</span> <span>{{ parseTime(scope.row.stopTime, "{y}-{m}-{d}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('运输方式')" align="left"> <el-table-column :label="$t('运输方式')" align="left">
<template slot-scope="scope" > <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('预计销售额')" align="left" prop="estCost" width="160">
<el-table-column :label="$t('预计销售额')" align="left" prop="estCost"> <template slot-scope="{ row }">
<template slot-scope="{row}">
<div class="" v-for="(item, feeIndex) in row.estCostVO.feeDtoList" :key="feeIndex"> <div class="" v-for="(item, feeIndex) in row.estCostVO.feeDtoList" :key="feeIndex">
<dict-tag :type="DICT_TYPE.ECW_COST_FEE_TYPE" :value="item.feeType" /> <dict-tag :type="DICT_TYPE.ECW_COST_FEE_TYPE" :value="item.feeType" />
{{item.amount}} {{currencyMap[item.currencyId]}} {{ item.amount }} {{ currencyMap[item.currencyId] }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('客户经理')" align="left" prop="creatorName"> <el-table-column :label="$t('客户经理')" align="left" prop="creatorName"> </el-table-column>
<el-table-column :label="$t('创建时间')" align="left" width="120">
<template slot-scope="{ row }">
<span>{{ parseTime(row.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('有效期')" align="left" width="120">
<template slot-scope="{ row }">
<div>{{ parseTime(row.startTime, "{y}-{m}-{d}") }}</div>
{{ parseTime(row.endTime, "{y}-{m}-{d}") }}
</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -122,34 +182,37 @@ ...@@ -122,34 +182,37 @@
<el-dropdown> <el-dropdown>
<el-button icon="el-icon-plus" circle type="primary"></el-button> <el-button icon="el-icon-plus" circle type="primary"></el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="$router.push('detail?offerId=' + scope.row.offerId)" v-hasPermi="['ecw:offer:show']">{{$t('详情')}}</el-dropdown-item> <el-dropdown-item @click.native="$router.push('detail?offerId=' + scope.row.offerId)" v-hasPermi="['ecw:offer:show']">{{ $t("详情") }}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push('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('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('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('create?copyId=' + 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(`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('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/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(`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="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="$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="recovery(scope.row.offerId)" v-if="[0].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:recovery']">{{$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="deleteOffer(scope.row.offerId)" v-if="[0,1,2,3,4,5,6,7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:delete']">{{$t('删除')}}</el-dropdown-item> <el-dropdown-item @click.native="recovery(scope.row.offerId)" v-if="[0].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:recovery']">{{ $t("恢复") }}</el-dropdown-item>
<el-dropdown-item @click.native="deleteOffer(scope.row.offerId)" v-if="[0, 1, 2, 3, 4, 5, 6, 7].indexOf(scope.row.status) > -1" v-hasPermi="['ecw:offer:delete']">{{ $t("删除") }}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList" />
@pagination="getList"/>
</div> </div>
</template> </template>
<script> <script>
import { deleteOffer, getOfferPage, exportOfferExcel,cancel, recovery, offerDeptPage, exportDeptOfferExcel } from "@/api/ecw/offer"; import { deleteOffer, getOfferPage, exportOfferExcel, cancel, recovery, offerDeptPage, exportDeptOfferExcel } from "@/api/ecw/offer"
import { getCurrencyList } from '@/api/ecw/currency'; import { getChannelList } from "@/api/ecw/channel"
import {getTradeCityList} from '@/api/ecw/region' import { getRegionList } from "@/api/ecw/order"
import UserSelector from '@/components/UserSelector' import { getCurrencyList } from "@/api/ecw/currency"
import { getTradeCityList } from "@/api/ecw/region"
import UserSelector from "@/components/UserSelector"
import Selector from "@/components/Selector"
export default { export default {
name: "EcwOfferIndex", name: "EcwOfferIndex",
components: { components: {
Selector,
UserSelector UserSelector
}, },
data() { data() {
...@@ -159,70 +222,321 @@ export default { ...@@ -159,70 +222,321 @@ export default {
// 导出遮罩层 // 导出遮罩层
exportLoading: false, exportLoading: false,
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: false,
// 总条数 // 总条数
total: 0, total: 0,
// 报价单管理列表 // 报价单管理列表
list: [], list: [],
// 查询参数 // 查询参数
queryParams: { queryParams: {
salesmanIds: [],
statusList: [],
importances: [],
channelIds: [],
sourceIds: [],
pageNo: 1, pageNo: 1,
pageSize: 10 pageSize: 10
}, },
queryTmp: {
createTime: ["", ""],
stopTime: ["", ""],
startTime: ["", ""],
endTime: ["", ""]
},
currencyList: [], currencyList: [],
tradeCityList:[], tradeCityList: [],
dept: false, // 是否部门订单 channelList: [],
}; AddressCity: [],
AddressProvince: [],
AddressTown: [],
destCountryId: null,
objectiveId: null,
destWarehouseId: null,
// 选中数组
ids: [],
//目的国
countryList: [],
//目的城市
cityList: [],
//目的仓
destWarehouseList: [],
dept: false // 是否部门订单
}
}, },
computed:{ computed: {
currencyMap(){ currencyMap() {
let map = {} let map = {}
this.currencyList.forEach(item => { this.currencyList.forEach((item) => {
map[item.id] = this.$l(item, 'title') map[item.id] = this.$l(item, "title")
}) })
return map return map
}, },
exportCityList() { exportCityList() {
return this.tradeCityList.filter(item => item.type == 2) return this.tradeCityList.filter((item) => item.type == 2)
}, },
importCityList() { importCityList() {
return this.tradeCityList.filter(item => item.type == 1) return this.tradeCityList.filter((item) => item.type == 1)
}, },
transportTypes() {
let obj = {}
this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE).forEach((item) => {
obj[item.value] = item
})
return obj
}
}, },
activated(){ activated() {
this.getList() this.getList()
}, },
created() { created() {
console.log(this.getDictDatas(this.DICT_TYPE.ECW_OFFER_STATUS))
console.log("offer index", this.$route) console.log("offer index", this.$route)
// 部门订单 // 部门订单
if(this.$route.fullPath.indexOf('dept') > -1){ if (this.$route.fullPath.indexOf("dept") > -1) {
this.dept = true this.dept = true
} }
getTradeCityList().then(res => this.tradeCityList = res.data) getTradeCityList().then((res) => (this.tradeCityList = res.data))
getCurrencyList().then(res => { getCurrencyList().then((res) => {
this.currencyList = res.data this.currencyList = res.data
}) })
this.getList(); this.getList()
getChannelList().then((res) => (this.channelList = res.data))
this.init()
},
watch: {
destCountryId: {
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep: true, //深度监听
handler() {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = []
this.AddressTown = []
this.objectiveId = ""
this.destWarehouseId = ""
this.findByprovinceCode()
if (this.destCountryId == "") {
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
}
//重新加载目的城市
//目的城市
// getRegionList(4, 4).then(({data}) => {
// this.AddressCity = data;
// })
// .catch(error => {
// console.log(error);
// });
// getRegionList(5, 5).then(({data}) => {
// this.AddressTown = data;
// })
// .catch(error => {
// console.log(error);
// });
}
},
objectiveId: {
deep: true, //深度监听
handler() {
this.AddressTown = []
this.destWarehouseId = ""
this.findBycityCode()
if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.destCountryId == "" && this.objectiveId == "" && this.destWarehouseId == "") {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
}
}
},
destWarehouseId: {
deep: true, //深度监听
handler() {
if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
}
}
}
}, },
methods: { methods: {
init() {
//加载时发起请求获取所有省份值
getRegionList(1, 1)
.then(({ data }) => {
this.AddressProvince = data
console.log(this.AddressProvince)
})
.catch((error) => {
console.log(error)
})
//目的城市
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
//目的仓
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
},
findByprovinceCode() {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
},
findBycityCode() {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId)
.then(({ data }) => {
this.AddressTown = data
// 去重
// let uniqueDataList = data.filter((item, index, self) => {
// // 返回第一个匹配项的索引,用于判断当前项是否为第一个匹配项
// const firstIndex = self.findIndex((obj) => obj.guojia === item.guojia);
// // 如果当前项是第一个匹配项,则保留,否则过滤掉
// return index === firstIndex;
// });
// this.AddressProvince = uniqueDataList
})
.catch((error) => {
console.log(error)
})
},
formatQuery() {
let obj = {}
//目的国
if (this.destCountryId != null && this.destCountryId != "") {
obj.destCountryIds = this.destCountryId
}
//目的城市
if (this.objectiveId != null && this.objectiveId != "") {
obj.objectiveIds = this.objectiveId
}
//目的仓
if (this.destWarehouseId != null && this.destWarehouseId != "") {
obj.destWarehouseIds = this.destWarehouseId
}
obj.beginCreateTime = this.queryTmp.createTime[0]
obj.endCreateTime = this.queryTmp.createTime[1]
obj.beginStopTime = this.queryTmp.stopTime[0]
obj.endStopTime = this.queryTmp.stopTime[1]
obj.beginStartTime = this.queryTmp.startTime[0]
obj.endStartTime = this.queryTmp.startTime[1]
obj.beginEndTime = this.queryTmp.endTime[0]
obj.endEndTime = this.queryTmp.endTime[1]
return obj
},
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true
let func = this.dept ? offerDeptPage : getOfferPage let func = this.dept ? offerDeptPage : getOfferPage
// 执行查询 // 执行查询
func(this.queryParams).then(response => { func({
this.list = response.data.list; ...this.queryParams,
this.total = response.data.total; ...this.formatQuery()
this.loading = false; }).then((response) => {
}); this.list = response.data.list
this.total = response.data.total
this.loading = false
})
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNo = 1; this.queryParams.pageNo = 1
this.getList(); this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
...@@ -230,62 +544,70 @@ export default { ...@@ -230,62 +544,70 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 10 pageSize: 10
} }
this.handleQuery(); this.handleQuery()
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
return this.$router.push('create') return this.$router.push("create")
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
return this.$router.push('edit?id=' + row.offerId) return this.$router.push("edit?id=" + row.offerId)
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const offerId = row.offerId; const offerId = row.offerId
this.$modal.confirm(this.$t('是否确认删除报价单管理编号为{offerId}的数据项?', {offerId})).then(function() { this.$modal
return deleteOffer(offerId); .confirm(this.$t("是否确认删除报价单管理编号为{offerId}的数据项?", { offerId }))
}).then(() => { .then(function () {
this.getList(); return deleteOffer(offerId)
this.$modal.msgSuccess(this.$t("删除成功")); })
}).catch(() => {}); .then(() => {
this.getList()
this.$modal.msgSuccess(this.$t("删除成功"))
})
.catch(() => {})
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
// 处理查询参数 // 处理查询参数
let params = {...this.queryParams}; let params = { ...this.queryParams, ...this.formatQuery() }
params.pageNo = undefined; params.pageNo = undefined
params.pageSize = undefined; params.pageSize = undefined
// 执行导出 // 执行导出
this.$confirm(this.$t('是否确认导出所有报价单管理数据项?')).then(() => { this.$confirm(this.$t("是否确认导出所有报价单管理数据项?"))
this.exportLoading = true; .then(() => {
if(this.dept){ this.exportLoading = true
if (this.dept) {
return exportDeptOfferExcel(params) return exportDeptOfferExcel(params)
}else return exportOfferExcel(params); } else return exportOfferExcel(params)
}).then(response => { })
this.$download.excel(response, '报价列表.xls'); .then((response) => {
this.exportLoading = false; this.$download.excel(response, "报价列表.xls")
}).catch(() => {}); this.exportLoading = false
})
.catch(() => {})
}, },
cancel(id){ cancel(id) {
this.doAction(this.$t('确定要取消此报价单么?'), cancel, id); this.doAction(this.$t("确定要取消此报价单么?"), cancel, id)
}, },
recovery(id){ recovery(id) {
this.doAction(this.$t('确定要恢复此报价单么?'), recovery, id); this.doAction(this.$t("确定要恢复此报价单么?"), recovery, id)
}, },
deleteOffer(id){ deleteOffer(id) {
this.doAction(this.$t('确定要删除此报价单么?'), deleteOffer, id); this.doAction(this.$t("确定要删除此报价单么?"), deleteOffer, id)
}, },
doAction(tips, action, id){ doAction(tips, action, id) {
this.$confirm(tips).then(res => { this.$confirm(tips)
.then((res) => {
return action(id) return action(id)
}) })
.then(() => { .then(() => {
this.$message.success('操作成功') this.$message.success("操作成功")
this.handleQuery() this.handleQuery()
}) })
} }
} }
}; }
</script> </script>
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <logListCommon :offerId="offerId" />
<div slot="header" class="card-title">{{$t('跟进记录列表')}}</div>
<!-- 列表 -->
<div class="offer-header">
<span style="font-size: 15px;">{{$t('报价单号')}}{{number}}</span>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
>{{$t('新增')}}</el-button>
</div>
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('序号')" align="center" prop="id" type="index">
<template slot-scope="scope">
<span>{{scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('跟进类型')" align="center" prop="type" >
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_OFFER_TYPE" :value="scope.row.type"></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('联系人')" align="center" prop="contactName" />
<el-table-column :label="$t('跟进方式')" align="center" prop="followUpMethod">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_FOLLOW_METHOD" :value="scope.row.followUpMethod"></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('跟进时间')" align="center" prop="followUpTime" width="180">
<template slot-scope="scope">
<span>{{ scope.row.followUpTime}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('客户反馈')" align="center" prop="customerFeedback" />
<el-table-column :label="$t('处理结果')" align="center" prop="processingResults" />
<el-table-column :label="$t('客户经理')" align="center" prop="followUpSalesmanName">
<template slot-scope="scope">
<span>{{getCustomerService(scope.row.followUpSalesmanId)}}</span>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="params.page" :limit.sync="params.rows"
@pagination="getList"/>
</el-card>
</div> </div>
</template> </template>
<script> <script>
import {getOfferLogPage} from "@/api/ecw/offerLog"; import logListCommon from "@/views/ecw/offer/logListCommon"
import {DICT_TYPE} from '@/utils/dict'
import {getOffer} from '@/api/ecw/offer'
import { userList } from "@/api/system/user"
export default { export default {
name: "OfferLog", name: "offerLogList",
components: { components: { logListCommon },
},
data() { data() {
return { return {}
// 遮罩层
loading: true,
list: [],
total:0,
params:{
page:1,
rows:20,
offerId:0,
type:2
},
number:'',
relationId:0,
creatorName:'test',
creatorData:[]
};
}, },
created() { computed: {
if(this.$route.query.offerId){ offerId() {
this.params.offerId = this.$route.query.offerId return parseInt(this.$route.query.offerId || 0)
this.getList();
this.getRelationID()
} }
userList('customer service').then(res =>this.creatorData = res.data)
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
let params = {...this.params};
// 执行查询
getOfferLogPage(params).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
getCustomerService(id){
var user = this.creatorData.find(item=>item.id==id)
if(user) return user.nickname
return ''
},
getRelationID(){
getOffer(this.params.offerId).then(response => {
this.relationId = response.data.consignorId;
this.number = response.data.number;
})
},
/** 新增按钮操作 */
handleAdd() {
this.$router.push({
path: "/offer/createLog",
query:{
offerId:this.params.offerId,
number:this.number
} }
}); }
},
}
};
</script> </script>
<style scoped> <style scoped>
.card-title{ .card-title {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
} }
.offer-header{ .offer-header {
padding-bottom: 16px; padding-bottom: 16px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
</style> </style>
<template>
<div>
<el-card class="box-card">
<div slot="header" class="clearfix">
<el-form size="small" :inline="true" label-width="100px">
<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="salesmanIds">
<user-selector v-model="followForm.salesmanIds" multiple clearable @change="handleQuery" />
</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 :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" @change="handleQuery"></dict-selector>
</el-form-item>
<el-form-item :label="$t('跟进方式')">
<dict-selector clearable :type="DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD" v-model="followForm.followMethod" @change="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>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="getCustomerFollowList">{{ $t("搜索") }} </el-button>
<el-button
type="primary"
@click="
() => {
followForm = { pageNo: 1, pageSize: 10 }
getCustomerFollowList()
}
"
>{{ $t("重置") }}
</el-button>
<el-button type="success" @click="customerFollowFn('follow')" v-hasPermi="['ecw:customer:follow-create']">{{ $t("新增") }} </el-button>
<el-button type="warning" @click="handleExport" v-hasPermi="['ecw:customer:follow-export']">
{{ $t("导出") }}
</el-button>
</el-form-item>
</el-form>
</div>
<el-table :data="customerFollowList" style="width: 100%">
<el-table-column prop="number" :label="$t('编号')" width="120">
<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('客户编号')"></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="getCustomerFollowList" />
</el-card>
<customer-follow ref="customerFollow" @handleCustomerFollowAdd="handleCustomerFollowAdd" @refresh="handleQuery" v-if="customerFollowVisible" :customer-id="customerId" :offerId="offerId" />
</div>
</template>
<script>
import { getCustomerFollowList, exportCustomerFollow } from "@/api/ecw/customerFollow"
import CustomerFollow from "@/views/ecw/customer/components/customerFollow"
import UserSelector from "@/components/UserSelector"
export default {
name: "logListCommon",
components: { UserSelector, CustomerFollow },
props: ["customerId", "offerId"],
data() {
return {
customerFollowVisible: false,
customerFollowTotal: 0,
customerFollowList: [],
followForm: {
pageNo: 1,
pageSize: 10
},
followFormTmp: {
nextTime: ["", ""]
}
}
},
created() {
this.handleQuery()
},
computed: {
isChinese() {
return this.$i18n.locale === "zh_CN"
},
customerId_offerId() {
return `${this.customerId}_${this.offerId}`
}
},
watch: {
customerId_offerId() {
this.handleQuery()
}
},
methods: {
handleCustomerFollowAdd(row) {
this.customerFollowVisible = false
setTimeout(() => {
this.customerFollowVisible = true
this.$nextTick((_) => {
this.$refs["customerFollow"].handleUpdate(row)
})
}, 100)
},
handleCustomerFollow(row, flag) {
this.customerFollowVisible = true
this.$nextTick((_) => {
this.$refs["customerFollow"].handleUpdate(row, flag)
})
},
handleCustomerFollowLink(row) {
this.customerFollowVisible = true
this.$nextTick((_) => {
this.$refs["customerFollow"].handleView(row)
})
},
formatQuery() {
let obj = {}
obj.customerId = this.customerId || null
obj.offerId = this.offerId || null
obj.beginNextTime = this.followFormTmp.nextTime[0]
obj.endNextTime = this.followFormTmp.nextTime[1]
return obj
},
handleQuery() {
this.followForm.pageNo = 1
this.customerFollowTotal = 0
this.customerFollowList = []
this.getCustomerFollowList()
},
/** 跟进记录导出按钮操作 */
handleExport() {
// 执行导出
this.$modal.confirm(this.$t("是否确认导出客户跟进记录数据项?")).then(() => {
exportCustomerFollow({
...this.followForm,
...this.formatQuery(),
pageNo: 1,
pageSize: 10000000
}).then((r) => {
this.$message.success(this.$t("已加入导出队列,请稍后在下载日志中下载"))
})
})
},
getCustomerFollowList() {
getCustomerFollowList({
...this.followForm,
...this.formatQuery()
}).then((r) => {
this.customerFollowList = r.data.list
this.customerFollowTotal = r.data.total
})
}
}
}
</script>
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
>
<el-form-item :label="$t('编号')" prop="orderNo"> <el-form-item :label="$t('编号')" prop="orderNo">
<el-input <el-input v-model.trim="noParam.value" :placeholder="$t('请输入订单号、唛头、提单号')" clearable @input="replaceSpace(noParam, 'value')" @keyup.enter.native="handleQuery">
v-model.trim="noParam.value"
:placeholder="$t('请输入订单号、唛头、提单号')"
clearable
@input="replaceSpace(noParam, 'value')"
@keyup.enter.native="handleQuery"
>
<template slot="prepend"> <template slot="prepend">
<dict-selector <dict-selector :type="DICT_TYPE.ORDER_QUERY_NO_FIELD" defaultable v-model="noParam.key" class="w-50" />
:type="DICT_TYPE.ORDER_QUERY_NO_FIELD"
defaultable
v-model="noParam.key"
class="w-50"
/>
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
...@@ -29,130 +13,46 @@ ...@@ -29,130 +13,46 @@
</el-form-item> --> </el-form-item> -->
<el-form-item :label="$t('发货人')" prop="consignorKey"> <el-form-item :label="$t('发货人')" prop="consignorKey">
<el-input <el-input v-model.trim="queryParams.consignorKey" :placeholder="$t('发货人')" clearable @keyup.enter.native="handleQuery" @input="replaceSpace(queryParams, 'consignorKey')" />
v-model.trim="queryParams.consignorKey"
:placeholder="$t('发货人')"
clearable
@keyup.enter.native="handleQuery"
@input="replaceSpace(queryParams, 'consignorKey')"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('收货人')" prop="consigneeKey"> <el-form-item :label="$t('收货人')" prop="consigneeKey">
<el-input <el-input v-model.trim="queryParams.consigneeKey" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" @input="replaceSpace(queryParams, 'consigneeKey')" />
v-model.trim="queryParams.consigneeKey"
:placeholder="$t('收货人')"
clearable
@keyup.enter.native="handleQuery"
@input="replaceSpace(queryParams, 'consigneeKey')"
/>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<dict-selector <dict-selector :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" :filter="(item) => item.value != 'PickTime'" v-model="dateFilterType" defaultable style="width: 150px; margin-right: 5px" />
:type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" <el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"> </el-date-picker>
:filter="(item) => item.value != 'PickTime'"
v-model="dateFilterType"
defaultable
style="width: 150px; margin-right: 5px"
/>
<el-date-picker
v-model="dateFilter"
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>
<div> <div>
<el-form-item :label="$t('始发仓')" prop="startWarehouseIds"> <el-form-item :label="$t('始发仓')" prop="startWarehouseIds">
<el-select <el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发仓')" clearable @change="handleQuery">
v-model="queryParams.startWarehouseIds" <el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
multiple
:placeholder="$t('请选择始发仓')"
clearable
@change="handleQuery"
>
<el-option
v-for="item in exportWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的国')" prop="destCountryId"> <el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select <el-select v-model="destCountryId" multiple :label="destCountryId" :placeholder="$t('请选择目的国')" clearable @change="handleQuery">
v-model="destCountryId" <el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
multiple
:label="destCountryId"
:placeholder="$t('请选择目的国')"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressProvince"
:key="item.guojia"
:label="item.guojiaName"
:value="item.guojia"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的城市')" prop="objectiveId"> <el-form-item :label="$t('目的城市')" prop="objectiveId">
<el-select <el-select v-model="objectiveId" multiple :placeholder="$t('请选择目的城市')" style="width: 200px" clearable @change="handleQuery">
v-model="objectiveId" <el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option>
multiple
:placeholder="$t('请选择目的城市')"
style="width: 200px"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressCity"
:key="item.shi"
:label="item.shiName"
:value="item.shi"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId"> <el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select <el-select v-model="destWarehouseId" multiple :placeholder="$t('请选择目的仓')" style="width: 200px" clearable @change="handleQuery">
v-model="destWarehouseId" <el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
multiple
:placeholder="$t('请选择目的仓')"
style="width: 200px"
clearable
@change="handleQuery"
>
<el-option
v-for="item in AddressTown"
:key="item.id"
:label="item.titleZh"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
<el-form-item <el-form-item :label="$t('运输方式')" prop="transportId" v-if="!transportId">
:label="$t('运输方式')" <dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model.number="queryParams.transportId" clearable @change="handleQuery" />
prop="transportId"
v-if="!transportId"
>
<dict-selector
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model.number="queryParams.transportId"
clearable
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('商品类型')" prop="goodsTypes" v-show="showSearch"> <el-form-item :label="$t('商品类型')" prop="goodsTypes" v-show="showSearch">
<selector v-model="queryParams.goodsTypes" multiple :options="productAttrList" label-field="attrName" value-field="id"> <selector v-model="queryParams.goodsTypes" multiple :options="productAttrList" label-field="attrName" value-field="id"> </selector>
</selector>
</el-form-item> </el-form-item>
<!-- <!--
<el-form-item :label="$t('品名')" prop="prodId"> <el-form-item :label="$t('品名')" prop="prodId">
...@@ -164,93 +64,38 @@ ...@@ -164,93 +64,38 @@
</el-form-item> --> </el-form-item> -->
<el-form-item :label="$t('商品')" prop="tidanNo" v-show="showSearch"> <el-form-item :label="$t('商品')" prop="tidanNo" v-show="showSearch">
<el-input <el-input v-model.trim="prodParam.value" :placeholder="$t('请输入商品类型、品名或品牌')" clearable @keyup.enter.native="handleQuery" @input="replaceSpace(prodParam, 'value')">
v-model.trim="prodParam.value"
:placeholder="$t('请输入商品类型、品名或品牌')"
clearable
@keyup.enter.native="handleQuery"
@input="replaceSpace(prodParam, 'value')"
>
<template slot="prepend"> <template slot="prepend">
<dict-selector <dict-selector :type="DICT_TYPE.ORDER_QUERY_PROD_FIELD" defaultable v-model="prodParam.key" class="w-50" />
:type="DICT_TYPE.ORDER_QUERY_PROD_FIELD"
defaultable
v-model="prodParam.key"
class="w-50"
/>
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('控货')" prop="isCargoControl" v-show="showSearch"> <el-form-item :label="$t('控货')" prop="isCargoControl" v-show="showSearch">
<dict-selector <dict-selector v-model="queryParams.isCargoControl" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" clearable @change="handleQuery" />
v-model="queryParams.isCargoControl"
:type="DICT_TYPE.INFRA_BOOLEAN_STRING"
fomatter="bool"
clearable
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('入仓类型')" prop="warehouseType" v-show="showSearch"> <el-form-item :label="$t('入仓类型')" prop="warehouseType" v-show="showSearch">
<dict-selector <dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="queryParams.warehouseTypes" multiple clearable @change="handleQuery" />
:type="DICT_TYPE.ECW_WAREHOUSING_TYPE"
v-model="queryParams.warehouseTypes"
multiple
clearable
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('客户经理')"> <el-form-item :label="$t('客户经理')">
<user-selector <user-selector manage v-model="queryParams.salesmanIds" multiple clearable @change="handleQuery" :prepend="{ id: 0, nickname: $t('未分配客户经理') }" />
manage
v-model="queryParams.salesmanIds"
multiple
clearable
@change="handleQuery"
:prepend="{ id: 0, nickname: $t('未分配客户经理') }"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('动态')" prop="statusList"> <el-form-item :label="$t('动态')" prop="statusList">
<dict-selector <dict-selector :type="DICT_TYPE.ORDER_STATUS" multiple v-model="queryParams.statusList" @keyup.enter.native="handleQuery" :filter="statusDictFilter" clearable @change="handleQuery" />
:type="DICT_TYPE.ORDER_STATUS"
multiple
v-model="queryParams.statusList"
@keyup.enter.native="handleQuery"
:filter="statusDictFilter"
clearable
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('收货人')" v-show="showSearch"> <el-form-item :label="$t('收货人')" v-show="showSearch">
<el-select <el-select v-model="queryParams.hasConsignee" :placeholder="$t('请选择')" clearable @change="handleQuery">
v-model="queryParams.hasConsignee"
:placeholder="$t('请选择')"
clearable
@change="handleQuery"
>
<el-option :label="$t('有')" :value="true"></el-option> <el-option :label="$t('有')" :value="true"></el-option>
<el-option :label="$t('无')" :value="false"></el-option> <el-option :label="$t('无')" :value="false"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('报关方式')" prop="customsTypes" v-show="showSearch"> <el-form-item :label="$t('报关方式')" prop="customsTypes" v-show="showSearch">
<dict-selector <dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" multiple v-model="queryParams.customsTypes" clearable @change="handleQuery" />
:type="DICT_TYPE.ECW_CUSTOMS_TYPE"
multiple
v-model="queryParams.customsTypes"
clearable
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('是否齐货')" v-show="showSearch"> <el-form-item :label="$t('是否齐货')" v-show="showSearch">
<!--//字段存疑--> <!--//字段存疑-->
<dict-selector <dict-selector v-model="queryParams.isNeat" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" clearable @change="handleQuery" />
v-model="queryParams.isNeat"
:type="DICT_TYPE.INFRA_BOOLEAN_STRING"
fomatter="bool"
clearable
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<!-- <el-form-item :label="$t('重货比')" prop="weightRatio"> <!-- <el-form-item :label="$t('重货比')" prop="weightRatio">
<el-input style="width: 100px;" v-model="molecule" placeholder="" clearable @change="moleculeChange" <el-input style="width: 100px;" v-model="molecule" placeholder="" clearable @change="moleculeChange"
...@@ -260,314 +105,133 @@ ...@@ -260,314 +105,133 @@
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> --> </el-form-item> -->
<el-form-item :label="$t('备案属性')" prop="productRecords" v-show="showSearch"> <el-form-item :label="$t('备案属性')" prop="productRecords" v-show="showSearch">
<dict-selector <dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" multiple v-model="queryParams.productRecords" clearable @change="handleQuery" />
:type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE"
multiple
v-model="queryParams.productRecords"
clearable
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('快递单号')" prop="number" v-show="showSearch"> <el-form-item :label="$t('快递单号')" prop="number" v-show="showSearch">
<el-input <el-input v-model="queryParams.number" :placeholder="$t('快递单号')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
v-model="queryParams.number"
:placeholder="$t('快递单号')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/\s+/g, '')"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('外部仓')" prop="isExternalWarehouse" v-show="showSearch"> <el-form-item :label="$t('外部仓')" prop="isExternalWarehouse" v-show="showSearch">
<el-select <el-select v-model="queryParams.isExternalWarehouse" :placeholder="$t('请选择')" clearable @change="handleQuery">
v-model="queryParams.isExternalWarehouse"
:placeholder="$t('请选择')"
clearable
@change="handleQuery"
>
<el-option :label="$t('外部仓')" value="true"></el-option> <el-option :label="$t('外部仓')" value="true"></el-option>
<el-option :label="$t('自有仓')" value="false"></el-option> <el-option :label="$t('自有仓')" value="false"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('异常状态')" prop="abnormalStateList" v-show="showSearch"> <el-form-item :label="$t('异常状态')" prop="abnormalStateList" v-show="showSearch">
<dict-selector <dict-selector :type="DICT_TYPE.ORDER_ABNORMAL_STATE" multiple v-model="queryParams.abnormalStateList" @keyup.enter.native="handleQuery" clearable @change="handleQuery" />
:type="DICT_TYPE.ORDER_ABNORMAL_STATE"
multiple
v-model="queryParams.abnormalStateList"
@keyup.enter.native="handleQuery"
clearable
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('审核状态')" prop="auditTypeList" v-show="showSearch"> <el-form-item :label="$t('审核状态')" prop="auditTypeList" v-show="showSearch">
<dict-selector <dict-selector :type="DICT_TYPE.ECW_ORDER_APPROVAL_TYPE" multiple v-model="queryParams.auditTypeList" @keyup.enter.native="handleQuery" clearable @change="handleQuery" />
:type="DICT_TYPE.ECW_ORDER_APPROVAL_TYPE"
multiple
v-model="queryParams.auditTypeList"
@keyup.enter.native="handleQuery"
clearable
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('增值服务')" prop="types" v-show="showSearch"> <el-form-item :label="$t('增值服务')" prop="types" v-show="showSearch">
<el-select <el-select v-model="queryParams.types" multiple :placeholder="$t('请选择')" clearable @change="handleQuery">
v-model="queryParams.types"
multiple
:placeholder="$t('请选择')"
clearable
@change="handleQuery"
>
<el-option :label="$t('普通订单')" :value="0"></el-option> <el-option :label="$t('普通订单')" :value="0"></el-option>
<el-option :label="$t('集运服务')" :value="1"></el-option> <el-option :label="$t('集运服务')" :value="1"></el-option>
<el-option :label="$t('海外仓')" :value="2"></el-option> <el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!--空运多一个出货渠道筛选--> <!--空运多一个出货渠道筛选-->
<el-form-item <el-form-item :label="$t('出货渠道')" prop="channelIds" v-if="channelList.length">
:label="$t('出货渠道')" <selector :clearable="true" :options="channelList" :label-field="$l('name')" value-field="channelId" v-model="queryParams.channelIds" multiple></selector>
prop="channelIds"
v-if="channelList.length"
>
<selector
:clearable="true"
:options="channelList"
:label-field="$l('name')"
value-field="channelId"
v-model="queryParams.channelIds"
multiple
></selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('特需')" prop="packageType" v-show="showSearch"> <el-form-item :label="$t('特需')" prop="packageType" v-show="showSearch">
<el-select <el-select v-model="queryParams.packageTypeArr" multiple :placeholder="$t('请选择')" clearable>
v-model="queryParams.packageTypeArr"
multiple
:placeholder="$t('请选择')"
clearable
>
<template v-for="item in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)"> <template v-for="item in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)">
<el-option <el-option :label="$l(item, 'label')" :value="item.value"></el-option>
:label="$l(item, 'label')"
:value="item.value"
></el-option>
</template> </template>
</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">
<dict-selector <dict-selector :type="DICT_TYPE.PICK_STATE" multiple v-model="queryParams.pickStateList" clearable @change="handleQuery" />
:type="DICT_TYPE.PICK_STATE"
multiple
v-model="queryParams.pickStateList"
clearable
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('提货率')" v-show="showSearch"> <el-form-item :label="$t('提货率')" v-show="showSearch">
<el-input <el-input type="number" v-model.trim="pickRatio.value" :placeholder="$t('请输入数字')" clearable @keyup.enter.native="handleQuery">
type="number"
v-model.trim="pickRatio.value"
:placeholder="$t('请输入数字')"
clearable
@keyup.enter.native="handleQuery"
>
<template slot="prepend"> <template slot="prepend">
<dict-selector <dict-selector :type="DICT_TYPE.PICK_RATIO_FIELD" defaultable v-model="pickRatio.key" class="w-50" />
:type="DICT_TYPE.PICK_RATIO_FIELD"
defaultable
v-model="pickRatio.key"
class="w-50"
/>
</template> </template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" @click="handleQuery" :loading="loading">{{ $t("搜索") }}</el-button>
type="primary" <el-button icon="el-icon-refresh" @click="resetQuery">{{ $t("重置") }}</el-button>
icon="el-icon-search"
@click="handleQuery"
:loading="loading"
>{{ $t("搜索") }}</el-button
>
<el-button icon="el-icon-refresh" @click="resetQuery">{{
$t("重置")
}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5" v-if="transportId"> <el-col :span="1.5" v-if="transportId">
<el-button <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['ecw:order:create']">{{ $t("新增") }}</el-button>
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['ecw:order:create']"
>{{ $t("新增") }}</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<!-- <el-button type="primary" plain icon="el-icon-setting" size="mini" @click="handleEdit" :disabled="!batchWarehouseAdjustment">{{$t('批量调仓')}}--> <!-- <el-button type="primary" plain icon="el-icon-setting" size="mini" @click="handleEdit" :disabled="!batchWarehouseAdjustment">{{$t('批量调仓')}}-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button <el-button type="primary" v-hasPermi="['ecw:order:batch_release']" plain icon="el-icon-setting" size="mini" @click="showBatchPickup = true">{{ $t("批量提货") }}</el-button>
type="primary"
v-hasPermi="['ecw:order:batch_release']"
plain
icon="el-icon-setting"
size="mini"
@click="showBatchPickup = true"
>{{ $t("批量提货") }}</el-button
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" <!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
:loading="exportLoading" v-hasPermi="['ecw:order:export']">{{$t('导出')}}</el-button> --> :loading="exportLoading" v-hasPermi="['ecw:order:export']">{{$t('导出')}}</el-button> -->
<el-dropdown <el-dropdown v-hasPermi="isAll ? ['ecw:order:export', 'ecw:order:export:other'] : [exportPermiString]">
v-hasPermi=" <el-button type="primary" :loading="exportLoading" size="mini"> {{ $t("导出") }} <i class="el-icon-arrow-down el-icon--right"></i> </el-button>
isAll
? ['ecw:order:export', 'ecw:order:export:other']
: [exportPermiString]
"
>
<el-button type="primary" :loading="exportLoading" size="mini">
{{ $t("导出") }} <i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item <el-dropdown-item v-hasPermi="[exportPermiString]" @click.native="exportChecked">{{ $t("导出勾选") }}</el-dropdown-item>
v-hasPermi="[exportPermiString]" <el-dropdown-item v-hasPermi="[exportPermiString]" @click.native="exportSearch">{{ $t("导出搜索") }}</el-dropdown-item>
@click.native="exportChecked"
>{{ $t("导出勾选") }}</el-dropdown-item
>
<el-dropdown-item
v-hasPermi="[exportPermiString]"
@click.native="exportSearch"
>{{ $t("导出搜索") }}</el-dropdown-item
>
<template v-if="isAll"> <template v-if="isAll">
<el-dropdown-item <el-dropdown-item hasPermi="[exportPermiString]" @click.native="exportAbnormal">{{ $t("异常单统计") }}</el-dropdown-item>
hasPermi="[exportPermiString]" <el-dropdown-item hasPermi="[exportPermiString]" @click.native="exportHeavyOrder">{{ $t("重货单统计") }}</el-dropdown-item>
@click.native="exportAbnormal" <el-dropdown-item hasPermi="[exportPermiString]" @click.native="exportReturnOrder">{{ $t("退仓单统计") }}</el-dropdown-item>
>{{ $t("异常单统计") }}</el-dropdown-item <el-dropdown-item hasPermi="[exportPermiString]" @click.native="exportSaleRepay">{{ $t("售后赔偿金额统计") }}</el-dropdown-item>
> <el-dropdown-item hasPermi="[exportPermiString]" @click.native="exportCustomsDatas">{{ $t("报关数据统计") }}</el-dropdown-item>
<el-dropdown-item <el-dropdown-item hasPermi="[exportPermiString]" @click.native="exportShippingDatas">{{ $t("客户出货量统计") }}</el-dropdown-item>
hasPermi="[exportPermiString]" <el-dropdown-item hasPermi="[exportPermiString]" @click.native="exportShipFee">{{ $t("预付运费统计") }}</el-dropdown-item>
@click.native="exportHeavyOrder"
>{{ $t("重货单统计") }}</el-dropdown-item
>
<el-dropdown-item
hasPermi="[exportPermiString]"
@click.native="exportReturnOrder"
>{{ $t("退仓单统计") }}</el-dropdown-item
>
<el-dropdown-item
hasPermi="[exportPermiString]"
@click.native="exportSaleRepay"
>{{ $t("售后赔偿金额统计") }}</el-dropdown-item
>
<el-dropdown-item
hasPermi="[exportPermiString]"
@click.native="exportCustomsDatas"
>{{ $t("报关数据统计") }}</el-dropdown-item
>
<el-dropdown-item
hasPermi="[exportPermiString]"
@click.native="exportShippingDatas"
>{{ $t("客户出货量统计") }}</el-dropdown-item
>
<el-dropdown-item
hasPermi="[exportPermiString]"
@click.native="exportShipFee"
>{{ $t("预付运费统计") }}</el-dropdown-item
>
</template> </template>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</el-col> </el-col>
<el-col :span="15" v-if="statistics"> <el-col :span="15" v-if="statistics">
<!-- 订单列表显示搜索条件对应箱数、仓库实测、收款方数、重量 --> <!-- 订单列表显示搜索条件对应箱数、仓库实测、收款方数、重量 -->
{{ {{ $t("合计:{totalNum}箱,{totalVolume}m³(测) {totalChargeVolume}m³(重) {totalWeight}KG(测), {totalChargeWeight}kg(收费)", statistics) }}
$t(
"合计:{totalNum}箱,{totalVolume}m³(测) {totalChargeVolume}m³(重) {totalWeight}KG(测), {totalChargeWeight}kg(收费)",
statistics
)
}}
</el-col> </el-col>
<right-toolbar <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
v-loading="loading"
:data="list"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column <el-table-column :label="$t('订单编号')" width="120px" align="center" prop="orderNo">
:label="$t('订单编号')"
width="120px"
align="center"
prop="orderNo"
>
<template slot-scope="scope"> <template slot-scope="scope">
<router-link <router-link
:to="{ :to="{
path: '/order/detail', path: '/order/detail',
query: { orderId: scope.row.orderId }, query: { orderId: scope.row.orderId }
}" }"
class="link-type" class="link-type"
> >
<span>{{ scope.row.orderNo }}</span> <span>{{ scope.row.orderNo }}</span>
</router-link> </router-link>
<div <div style="display: flex; flex-wrap: wrap" v-if="scope.row.advanceType">
style="display: flex; flex-wrap: wrap" <el-button @click="deleteSpecial(item.value, scope.row.orderId)" size="mini" style="margin-left: 20px" type="danger" circle v-for="(item, index) in specialRendering(scope.row.advanceType)" :key="index">{{ item.symbol }}</el-button>
v-if="scope.row.advanceType"
>
<el-button
@click="deleteSpecial(item.value, scope.row.orderId)"
size="mini"
style="margin-left: 20px"
type="danger"
circle
v-for="(item, index) in specialRendering(scope.row.advanceType)"
:key="index"
>{{ item.symbol }}</el-button
>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('发货人编号')" align="center"> <el-table-column :label="$t('发货人编号')" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<router-link :to="`/customer/query/${row.consignorCustomerId}`" class="link-type"> <router-link :to="`/customer/query/${row.consignorCustomerId}`" class="link-type">
{{row.consignorCustomerNumber}} {{ row.consignorCustomerNumber }}
</router-link> </router-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('收货人编号')" align="center" prop="consigneeCustomerNumber"> <el-table-column :label="$t('收货人编号')" align="center" prop="consigneeCustomerNumber">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<router-link :to="`/customer/query/${row.consigneeCustomerId}`" class="link-type"> <router-link :to="`/customer/query/${row.consigneeCustomerId}`" class="link-type">
{{row.consigneeCustomerNumber}} {{ row.consigneeCustomerNumber }}
</router-link> </router-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('总箱数/入仓箱数')" align="center" prop="sumNum">
:label="$t('总箱数/入仓箱数')"
align="center"
prop="sumNum"
>
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<div :style="{ color: row.customsType != 1 ? 'red' : null }"> <div :style="{ color: row.customsType != 1 ? 'red' : null }">{{ row.totalNum }}{{ $t("") }}/{{ row.sumNum }}{{ $t("") }}</div>
{{ row.totalNum }}{{ $t("") }}/{{ row.sumNum }}{{ $t("") }} <dict-tag v-if="row.customsType != 1" style="color: red" :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="row.customsType"></dict-tag>
</div>
<dict-tag
v-if="row.customsType != 1"
style="color: red"
:type="DICT_TYPE.ECW_CUSTOMS_TYPE"
:value="row.customsType"
></dict-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('体积/重量')" align="center" prop="sumWeight"> <el-table-column :label="$t('体积/重量')" align="center" prop="sumWeight">
...@@ -577,14 +241,10 @@ ...@@ -577,14 +241,10 @@
:is="row.orderType > 1 ? 'el-tooltip' : 'div'" :is="row.orderType > 1 ? 'el-tooltip' : 'div'"
class="item" class="item"
:style="{ :style="{
color: row.orderType > 1 ? 'red' : null, color: row.orderType > 1 ? 'red' : null
}" }"
effect="dark" effect="dark"
:content=" :content="row.orderType === 2 ? (row.wvolume || 0) + 'm³' : (row.vweight || 0) + 'kg'"
row.orderType === 2
? (row.wvolume || 0) + 'm³'
: (row.vweight || 0) + 'kg'
"
placement="bottom" placement="bottom"
> >
<!-- <div v-if="row.sumNum > 0">{{row.sumVolume}}m³ /{{row.sumWeight}}Kg</div> <!-- <div v-if="row.sumNum > 0">{{row.sumVolume}}m³ /{{row.sumWeight}}Kg</div>
...@@ -594,47 +254,28 @@ ...@@ -594,47 +254,28 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('始发仓')" align="center" prop="startWarehouseName">
<el-table-column
:label="$t('始发仓')"
align="center"
prop="startWarehouseName"
>
<template slot-scope="{ row }"> <template slot-scope="{ row }">
{{ row.startWarehouseName }} {{ row.startWarehouseName }}
<span style="color: red" v-if="row.isExternalWarehouse" <span style="color: red" v-if="row.isExternalWarehouse">({{ $t("外部仓") }})</span>
>({{ $t("外部仓") }})</span
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('运输方式-渠道/目的地')" align="center" prop="transportId">
:label="$t('运输方式-渠道/目的地')"
align="center"
prop="transportId"
>
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<dict-tag <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" />
:type="DICT_TYPE.ECW_TRANSPORT_TYPE" <template v-if="row.channelName"> - {{ row.channelName }} </template>
:value="row.transportId"
/>
<template v-if="row.channelName">
- {{row.channelName}}
</template>
/ {{ row.dstWarehouseName }} / {{ row.dstWarehouseName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('控货')" align="center" prop="transportId"> <el-table-column :label="$t('控货')" align="center" prop="transportId">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<dict-tag <dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="row.isCargoControl" />
:type="DICT_TYPE.INFRA_BOOLEAN_STRING"
:value="row.isCargoControl"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('增值服务')" align="center" prop="status"> <el-table-column :label="$t('增值服务')" align="center" prop="status">
<template slot-scope="{row}"> <template slot-scope="{ row }">
{{ getTypeText(row.type)}} {{ getTypeText(row.type) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('状态')" align="center" prop="status"> <el-table-column :label="$t('状态')" align="center" prop="status">
...@@ -648,27 +289,15 @@ ...@@ -648,27 +289,15 @@
<el-table-column :label="$t('发货人客服')" align="center" prop="consignorFollowCustomerService" /> <el-table-column :label="$t('发货人客服')" align="center" prop="consignorFollowCustomerService" />
<el-table-column :label="$t('收货人客服')" align="center" prop="consigneeFollowCustomerService" /> <el-table-column :label="$t('收货人客服')" align="center" prop="consigneeFollowCustomerService" />
<el-table-column :label="$t('到仓箱数/方数重量')" align="center" prop="status"> <el-table-column :label="$t('到仓箱数/方数重量')" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope"> 暂无数据 </template>
暂无数据
</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('提货率')" align="center" prop="pickRatio" /> <el-table-column :label="$t('提货率')" align="center" prop="pickRatio" />
<el-table-column :label="$t('动态')" align="center" prop="statusMsg" /> <el-table-column :label="$t('动态')" align="center" prop="statusMsg" />
<el-table-column <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width actions" width="180px">
:label="$t('操作')"
align="center"
class-name="small-padding fixed-width actions"
width="180px"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 已删除的订单只需要删除和查看 https://zentao.jdshangmen.com/bug-view-684.html --> <!-- 已删除的订单只需要删除和查看 https://zentao.jdshangmen.com/bug-view-684.html -->
<template v-if="scope.row.status == 88"> <template v-if="scope.row.status == 88">
<el-button <el-button type="text" @click.native="oprateOrder(scope.row.orderId, 'deleteOrder')" v-hasPermi="['ecw:order:delete']">{{ $t("删除") }}</el-button>
type="text"
@click.native="oprateOrder(scope.row.orderId, 'deleteOrder')"
v-hasPermi="['ecw:order:delete']"
>{{ $t("删除") }}</el-button
>
</template> </template>
<template v-else> <template v-else>
<!--操作相关的--> <!--操作相关的-->
...@@ -693,7 +322,7 @@ ...@@ -693,7 +322,7 @@
'ecw:order:commission', 'ecw:order:commission',
'ecw:order:heavy', 'ecw:order:heavy',
'ecw:order:bulky', 'ecw:order:bulky',
'ecw:order:setCanNotShipment', 'ecw:order:setCanNotShipment'
]" ]"
> >
<el-button type="text">{{ $t("操作") }}</el-button> <el-button type="text">{{ $t("操作") }}</el-button>
...@@ -728,39 +357,21 @@ ...@@ -728,39 +357,21 @@
<!-- 删除 --> <!-- 删除 -->
<template v-if="include(scope.row.status, [0, 2, 88])"> <template v-if="include(scope.row.status, [0, 2, 88])">
<el-dropdown-item <el-dropdown-item @click.native="oprateOrder(scope.row.orderId, 'deleteOrder')" v-hasPermi="['ecw:order:delete']">{{ $t("删除") }}</el-dropdown-item>
@click.native="
oprateOrder(scope.row.orderId, 'deleteOrder')
"
v-hasPermi="['ecw:order:delete']"
>{{ $t("删除") }}</el-dropdown-item
>
</template> </template>
<!-- 取消 --> <!-- 取消 -->
<template v-if="include(scope.row.status, [2])"> <template v-if="include(scope.row.status, [2])">
<el-dropdown-item <el-dropdown-item @click.native="oprateOrder(scope.row.orderId, 'cancelOrder')" v-hasPermi="['ecw:order:cancel']">{{ $t("取消订单") }}</el-dropdown-item>
@click.native="
oprateOrder(scope.row.orderId, 'cancelOrder')
"
v-hasPermi="['ecw:order:cancel']"
>{{ $t("取消订单") }}</el-dropdown-item
>
</template> </template>
<!-- <el-dropdown-item @click.native="oprateOrder(scope.row.orderId, 'recoveryOrder')" >{{$t('恢复订单')}}</el-dropdown-item>--> <!-- <el-dropdown-item @click.native="oprateOrder(scope.row.orderId, 'recoveryOrder')" >{{$t('恢复订单')}}</el-dropdown-item>-->
<!-- 费用申请 --> <!-- 费用申请 -->
<template <template v-if="exclude(scope.row.status, [0, 88]) && exclude(scope.row.inWarehouseState, [204, 205, 206]) && exclude(scope.row.abnormalState, [1])">
v-if="
exclude(scope.row.status, [0, 88]) &&
exclude(scope.row.inWarehouseState, [204, 205, 206]) &&
exclude(scope.row.abnormalState, [1])
"
>
<el-dropdown-item <el-dropdown-item
@click.native=" @click.native="
feeApplicationBol = true; feeApplicationBol = true
orderId = scope.row.orderId; orderId = scope.row.orderId
" "
v-hasPermi="['ecw:order:fee_apply']" v-hasPermi="['ecw:order:fee_apply']"
>{{ $t("费用申请") }}</el-dropdown-item >{{ $t("费用申请") }}</el-dropdown-item
...@@ -768,305 +379,98 @@ ...@@ -768,305 +379,98 @@
</template> </template>
<!-- 特需,互斥,关联 --> <!-- 特需,互斥,关联 -->
<template <template v-if="include(scope.row.status, [2, 3, 5, 8, 9, 10]) && exclude(scope.row.abnormalState, [1, 99, 2, 3, 4, 9, 10, 11, 12, 14]) && exclude(scope.row.inWarehouseState, [204])">
v-if="
include(scope.row.status, [2, 3, 5, 8, 9, 10]) &&
exclude(
scope.row.abnormalState,
[1, 99, 2, 3, 4, 9, 10, 11, 12, 14]
) &&
exclude(scope.row.inWarehouseState, [204])
"
>
<el-dropdown-item <el-dropdown-item
@click.native=" @click.native="
orderId = scope.row.orderId; orderId = scope.row.orderId
orderNo = scope.row.orderNo; orderNo = scope.row.orderNo
isShow = true; isShow = true
" "
v-hasPermi="['ecw:order:special']" v-hasPermi="['ecw:order:special']"
>{{ $t("特需") }}</el-dropdown-item >{{ $t("特需") }}</el-dropdown-item
> >
<el-dropdown-item <el-dropdown-item @click.native="$router.push(`/order/associated-order/${scope.row.orderId}`)" v-hasPermi="['ecw:order:associate']">{{ $t("关联") }}</el-dropdown-item>
@click.native=" <el-dropdown-item @click.native="$router.push(`/order/mutex-order/${scope.row.orderId}`)" v-hasPermi="['ecw:order:mutex']">{{ $t("互斥") }}</el-dropdown-item>
$router.push(
`/order/associated-order/${scope.row.orderId}`
)
"
v-hasPermi="['ecw:order:associate']"
>{{ $t("关联") }}</el-dropdown-item
>
<el-dropdown-item
@click.native="
$router.push(`/order/mutex-order/${scope.row.orderId}`)
"
v-hasPermi="['ecw:order:mutex']"
>{{ $t("互斥") }}</el-dropdown-item
>
</template> </template>
<!-- 特价 --> <!-- 特价 -->
<template <template v-if="exclude(scope.row.status, [0]) && exclude(scope.row.abnormalState, [1]) && exclude(scope.row.inWarehouseState, [204, 205, 206])">
v-if="
exclude(scope.row.status, [0]) &&
exclude(scope.row.abnormalState, [1]) &&
exclude(scope.row.inWarehouseState, [204, 205, 206])
"
>
<!-- 特价里有多个操作,只要有其一权限就显示此菜单 --> <!-- 特价里有多个操作,只要有其一权限就显示此菜单 -->
<el-dropdown-item <el-dropdown-item @click.native="$router.push('/order/special/' + scope.row.orderId)" v-hasPermi="['ecw:order:discount', 'ecw:order:reduce', 'ecw:order:commission', 'ecw:order:heavy', 'ecw:order:bulky']">{{ $t("特价") }}</el-dropdown-item>
@click.native="
$router.push('/order/special/' + scope.row.orderId)
"
v-hasPermi="[
'ecw:order:discount',
'ecw:order:reduce',
'ecw:order:commission',
'ecw:order:heavy',
'ecw:order:bulky',
]"
>{{ $t("特价") }}</el-dropdown-item
>
</template> </template>
<!-- 确认提货 --> <!-- 确认提货 -->
<template <template v-if="scope.row.status >= 5 && exclude(scope.row.inWarehouseState, [1, 99, 2, 3, 4, 9, 10, 11, 12, 14]) && exclude(scope.row.inWarehouseState, [204, 205, 206]) && exclude(scope.row.abnormalState, [1])">
v-if=" <el-dropdown-item @click.native="$router.push(`/order/release?orderId=${scope.row.orderId}`)" v-hasPermi="['ecw:order:release']">{{ $t("确认提货") }}</el-dropdown-item>
scope.row.status >= 5 &&
exclude(
scope.row.inWarehouseState,
[1, 99, 2, 3, 4, 9, 10, 11, 12, 14]
) &&
exclude(scope.row.inWarehouseState, [204, 205, 206]) &&
exclude(scope.row.abnormalState, [1])
"
>
<el-dropdown-item
@click.native="
$router.push(
`/order/release?orderId=${scope.row.orderId}`
)
"
v-hasPermi="['ecw:order:release']"
>{{ $t("确认提货") }}</el-dropdown-item
>
</template> </template>
<!-- 合单,拆单 --> <!-- 合单,拆单 -->
<!--可出后不显示拆单(经确认合单也不显示) https://zentao.test.jdshangmen.com/bug-view-5322.html--> <!--可出后不显示拆单(经确认合单也不显示) https://zentao.test.jdshangmen.com/bug-view-5322.html-->
<template <template v-if="([3, 4].indexOf(scope.row.transportId) < 0 || scope.row.airShipment < 2) && (scope.row.status < 12 || (scope.row.status == 12 && scope.row.shipmentState == 314)) && !scope.row.abnormalState && scope.row.status > 3 && exclude(scope.row.inWarehouseState, [204, 205, 206, 212, 213])">
v-if=" <el-dropdown-item @click.native="$router.push(`/order/singleApply?orderNo=${scope.row.orderNo}`)" v-hasPermi="['ecw:order:merge']">{{ $t("合单申请") }}</el-dropdown-item>
([3, 4].indexOf(scope.row.transportId) < 0 ||
scope.row.airShipment < 2) &&
(scope.row.status < 12 ||
(scope.row.status == 12 &&
scope.row.shipmentState == 314)) &&
!scope.row.abnormalState &&
scope.row.status > 3 &&
exclude(
scope.row.inWarehouseState,
[204, 205, 206, 212, 213]
)
"
>
<el-dropdown-item
@click.native="
$router.push(
`/order/singleApply?orderNo=${scope.row.orderNo}`
)
"
v-hasPermi="['ecw:order:merge']"
>{{ $t("合单申请") }}</el-dropdown-item
>
<el-dropdown-item <el-dropdown-item @click.native="$router.push(`/order/splitApply?orderId=${scope.row.orderId}`)" v-hasPermi="['ecw:order:split']">{{ $t("拆单申请") }}</el-dropdown-item>
@click.native="
$router.push(
`/order/splitApply?orderId=${scope.row.orderId}`
)
"
v-hasPermi="['ecw:order:split']"
>{{ $t("拆单申请") }}</el-dropdown-item
>
</template> </template>
<!--撤销拆单,拆单的子订单,预装前显示,预装后变灰不可点击--> <!--撤销拆单,拆单的子订单,预装前显示,预装后变灰不可点击-->
<template <template v-if="scope.row.parentOrderId && scope.row.status < 11">
v-if="scope.row.parentOrderId && scope.row.status < 11" <el-dropdown-item @click.native="splitRevoke(scope.row)" v-hasPermi="['ecw:order:split_revoke']">{{ $t("撤销拆单") }}</el-dropdown-item>
>
<el-dropdown-item
@click.native="splitRevoke(scope.row)"
v-hasPermi="['ecw:order:split_revoke']"
>{{ $t("撤销拆单") }}</el-dropdown-item
>
</template> </template>
<template v-if="scope.row.parentOrderId"> <template v-if="scope.row.parentOrderId">
<el-dropdown-item <el-dropdown-item @click.native="showParentOrder(scope.row)">{{ $t("查看母订单") }}</el-dropdown-item>
@click.native="showParentOrder(scope.row)"
>{{ $t("查看母订单") }}</el-dropdown-item
>
</template> </template>
<!-- 合单日志,提货日志 --> <!-- 合单日志,提货日志 -->
<template v-if="scope.row.status > 2"> <template v-if="scope.row.status > 2">
<el-dropdown-item <el-dropdown-item @click.native="showMergedLogOrderNo = scope.row.orderNo" v-hasPermi="['ecw:order:merge_log']">{{ $t("合单日志") }}</el-dropdown-item>
@click.native="showMergedLogOrderNo = scope.row.orderNo" <el-dropdown-item @click.native="showPickupLogOrderNo = scope.row.orderNo" v-hasPermi="['ecw:order:split_log']">{{ $t("提货日志") }}</el-dropdown-item>
v-hasPermi="['ecw:order:merge_log']"
>{{ $t("合单日志") }}</el-dropdown-item
>
<el-dropdown-item
@click.native="showPickupLogOrderNo = scope.row.orderNo"
v-hasPermi="['ecw:order:split_log']"
>{{ $t("提货日志") }}</el-dropdown-item
>
</template> </template>
<!--变更出货渠道--> <!--变更出货渠道-->
<template v-if="scope.row.transportId == 3"> <template v-if="scope.row.transportId == 3">
<el-dropdown-item <el-dropdown-item @click.native="handleUpdate(scope.row, true)" v-hasPermi="['ecw:order:update_channel']">{{ $t("变更出货渠道") }}</el-dropdown-item>
@click.native="handleUpdate(scope.row, true)"
v-hasPermi="['ecw:order:update_channel']"
>{{ $t("变更出货渠道") }}</el-dropdown-item
>
</template> </template>
<!--不可出--> <!--不可出-->
<template <template v-if="include(scope.row.airShipment, [2, 3, 4]) && scope.row.status < 11">
v-if=" <el-dropdown-item @click.native="setCanNotShipment(scope.row)" v-hasPermi="['ecw:order:setCanNotShipment']">{{ $t("不可出") }}</el-dropdown-item>
include(scope.row.airShipment, [2, 3, 4]) &&
scope.row.status < 11
"
>
<el-dropdown-item
@click.native="setCanNotShipment(scope.row)"
v-hasPermi="['ecw:order:setCanNotShipment']"
>{{ $t("不可出") }}</el-dropdown-item
>
</template> </template>
<!--转异--> <!--转异-->
<el-dropdown-item <el-dropdown-item @click.native="handleException(scope.row)" v-hasPermi="['ecw:order:turnException']">{{ $t("转异") }}</el-dropdown-item>
@click.native="handleException(scope.row)"
v-hasPermi="['ecw:order:turnException']"
>{{ $t("转异") }}</el-dropdown-item
>
<template v-if="scope.row.abnormalState != 0">
<template <el-dropdown-item @click.native="openException(scope.row)">{{ $t("查看异常") }}</el-dropdown-item>
v-if="scope.row.abnormalState != 0" <el-dropdown-item @click.native="openException(scope.row)">{{ $t("处理异常") }}</el-dropdown-item>
>
<el-dropdown-item
@click.native="openException(scope.row)"
>{{ $t("查看异常") }}</el-dropdown-item
>
<el-dropdown-item
@click.native="openException(scope.row)"
>{{ $t("处理异常") }}</el-dropdown-item
>
</template> </template>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<template <template v-if="exclude(scope.row.status, [0, 11, 12, 13, 14, 15, 17, 18, 32]) && exclude(scope.row.inWarehouseState, [204, 205, 206])">
v-if="
exclude(
scope.row.status,
[0, 11, 12, 13, 14, 15, 17, 18, 32]
) && exclude(scope.row.inWarehouseState, [204, 205, 206])
"
>
<!-- <el-divider direction="vertical"></el-divider> --> <!-- <el-divider direction="vertical"></el-divider> -->
<!--仓库相关的--> <!--仓库相关的-->
<el-dropdown <el-dropdown v-hasPermi="['ecw:order:warehouse_add', 'ecw:order:warehouse_update', 'ecw:order:warehouse_exit', 'ecw:order:warehouse_adjustment', 'ecw:order:warehouse_transfer', 'ecw:order:warehouse_arrive', 'ecw:order:stocking']">
v-hasPermi="[
'ecw:order:warehouse_add',
'ecw:order:warehouse_update',
'ecw:order:warehouse_exit',
'ecw:order:warehouse_adjustment',
'ecw:order:warehouse_transfer',
'ecw:order:warehouse_arrive',
'ecw:order:stocking',
]"
>
<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 <template v-if="include(scope.row.status, [0, 2]) || scope.row.inWarehouseState == 208">
v-if=" <el-dropdown-item @click.native="$router.push('/order/warehousing?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:warehouse_add']">{{ $t("入仓操作") }}</el-dropdown-item>
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>
<!-- 入仓补充 --> <!-- 入仓补充 -->
<template <template v-if="include(scope.row.inWarehouseState, [201, 202, 202, 210, 202, 211, 202, 214, 215, 216]) && include(scope.row.status, [2, 3, 5, 10, 9, 8])">
v-if=" <el-dropdown-item @click.native="$router.push('/order/warehousing-add?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:warehouse_replenish']">{{ $t("入仓补充") }}</el-dropdown-item>
include(
scope.row.inWarehouseState,
[201, 202, 202, 210, 202, 211, 202, 214, 215, 216]
) && include(scope.row.status, [2, 3, 5, 10, 9, 8])
"
>
<el-dropdown-item
@click.native="
$router.push(
'/order/warehousing-add?id=' + scope.row.orderId
)
"
v-hasPermi="['ecw:order:warehouse_replenish']"
>{{ $t("入仓补充") }}</el-dropdown-item
>
</template> </template>
<!-- 入仓修改 --> <!-- 入仓修改 -->
<template <template v-if="include(scope.row.inWarehouseState, [201, 202, 207, 202, 209, 210, 202, 211, 202, 214, 215, 216, 204, 205]) && scope.row.status != 11 && exclude(scope.row.shipmentState, [314, 315, 317, 318])">
v-if=" <el-dropdown-item @click.native="$router.push('/order/warehousing-update?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:warehouse_update']" :disabled2="scope.row.parentOrderId">{{ $t("入仓修改") }}</el-dropdown-item>
include(
scope.row.inWarehouseState,
[
201, 202, 207, 202, 209, 210, 202, 211, 202, 214, 215,
216, 204, 205,
]
) &&
scope.row.status != 11 &&
exclude(scope.row.shipmentState, [314, 315, 317, 318])
"
>
<el-dropdown-item
@click.native="
$router.push(
'/order/warehousing-update?id=' + scope.row.orderId
)
"
v-hasPermi="['ecw:order:warehouse_update']"
:disabled2="scope.row.parentOrderId"
>{{ $t("入仓修改") }}</el-dropdown-item
>
</template> </template>
<!-- 退仓 --> <!-- 退仓 -->
<template <template v-if="(include(scope.row.inWarehouseState, [202, 210, 211, 214, 215, 216]) && exclude(scope.row.abnormalState, [1])) || include(scope.row.status, [16])">
v-if="
(include(
scope.row.inWarehouseState,
[202, 210, 211, 214, 215, 216]
) &&
exclude(scope.row.abnormalState, [1])) ||
include(scope.row.status, [16])
"
>
<el-dropdown-item <el-dropdown-item
@click.native=" @click.native="
show = true; show = true
orderId = scope.row.orderId; orderId = scope.row.orderId
" "
v-hasPermi="['ecw:order:warehouse_exit']" v-hasPermi="['ecw:order:warehouse_exit']"
>{{ $t("退仓") }}</el-dropdown-item >{{ $t("退仓") }}</el-dropdown-item
...@@ -1074,24 +478,11 @@ ...@@ -1074,24 +478,11 @@
</template> </template>
<!-- 调仓 --> <!-- 调仓 -->
<template <template v-if="(include(scope.row.inWarehouseState, [202, 207, 209, 210, 202, 211, 212, 215, 216, 218]) || (include(scope.row.status, [16]) && exclude(scope.row.inWarehouseState, [213, 214]))) && exclude(scope.row.abnormalState, [1, 99, 2, 3, 4, 9, 10, 11, 12, 14])">
v-if="
(include(
scope.row.inWarehouseState,
[202, 207, 209, 210, 202, 211, 212, 215, 216, 218]
) ||
(include(scope.row.status, [16]) &&
exclude(scope.row.inWarehouseState, [213, 214]))) &&
exclude(
scope.row.abnormalState,
[1, 99, 2, 3, 4, 9, 10, 11, 12, 14]
)
"
>
<el-dropdown-item <el-dropdown-item
@click.native=" @click.native="
orderId = scope.row.orderId; orderId = scope.row.orderId
warehouseBol = true; warehouseBol = true
" "
v-hasPermi="['ecw:order:warehouse_adjustment']" v-hasPermi="['ecw:order:warehouse_adjustment']"
>{{ $t("调仓") }}</el-dropdown-item >{{ $t("调仓") }}</el-dropdown-item
...@@ -1110,11 +501,7 @@ ...@@ -1110,11 +501,7 @@
<el-dropdown-item <el-dropdown-item
@click.native=" @click.native="
$router.push({ $router.push({
path: path: '/order/transfer-warehousing/' + scope.row.orderId + '/' + 1
'/order/transfer-warehousing/' +
scope.row.orderId +
'/' +
1,
}) })
" "
v-hasPermi="['ecw:order:warehouse_transfer']" v-hasPermi="['ecw:order:warehouse_transfer']"
...@@ -1127,11 +514,7 @@ ...@@ -1127,11 +514,7 @@
<el-dropdown-item <el-dropdown-item
@click.native=" @click.native="
$router.push({ $router.push({
path: path: '/order/transfer-to-warehouse/' + scope.row.orderId + '/' + 2
'/order/transfer-to-warehouse/' +
scope.row.orderId +
'/' +
2,
}) })
" "
v-hasPermi="['ecw:order:warehouse_arrive']" v-hasPermi="['ecw:order:warehouse_arrive']"
...@@ -1141,16 +524,11 @@ ...@@ -1141,16 +524,11 @@
<!--开始备货--> <!--开始备货-->
<!--需要异常处理后才能备货 https://zentao.test.jdshangmen.com/bug-view-4736.html--> <!--需要异常处理后才能备货 https://zentao.test.jdshangmen.com/bug-view-4736.html-->
<template <template v-if="include(scope.row.airShipment, [2]) && scope.row.abnormalState === 0">
v-if="
include(scope.row.airShipment, [2]) &&
scope.row.abnormalState === 0
"
>
<el-dropdown-item <el-dropdown-item
@click.native=" @click.native="
$router.push({ $router.push({
path: '/order/stocking?id=' + scope.row.orderId, path: '/order/stocking?id=' + scope.row.orderId
}) })
" "
v-hasPermi="['ecw:order:stocking']" v-hasPermi="['ecw:order:stocking']"
...@@ -1158,19 +536,11 @@ ...@@ -1158,19 +536,11 @@
> >
</template> </template>
<!--修改备货--> <!--修改备货-->
<template <template v-if="include(scope.row.airShipment, [3, 4, 10]) && scope.row.abnormalState === 0 && scope.row.status <= 5">
v-if="
include(scope.row.airShipment, [3, 4, 10]) &&
scope.row.abnormalState === 0 &&
scope.row.status <= 5
"
>
<el-dropdown-item <el-dropdown-item
@click.native=" @click.native="
$router.push({ $router.push({
path: path: '/order/stocking?action=update&id=' + scope.row.orderId
'/order/stocking?action=update&id=' +
scope.row.orderId,
}) })
" "
v-hasPermi="['ecw:order:stocking_update']" v-hasPermi="['ecw:order:stocking_update']"
...@@ -1183,202 +553,81 @@ ...@@ -1183,202 +553,81 @@
<!-- <el-divider direction="vertical" v-if="scope.row.status != 0"></el-divider> --> <!-- <el-divider direction="vertical" v-if="scope.row.status != 0"></el-divider> -->
<!--打印相关的--> <!--打印相关的-->
<el-dropdown <el-dropdown v-if="scope.row.status != 0" v-hasPermi="['ecw:order:print_tag', 'ecw:order:warehouse_receipt', 'ecw:order:landing_bill']">
v-if="scope.row.status != 0"
v-hasPermi="[
'ecw:order:print_tag',
'ecw:order:warehouse_receipt',
'ecw:order:landing_bill',
]"
>
<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 <template v-if="exclude(scope.row.status, [0]) && exclude(scope.row.abnormalState, [5, 6, 7, 8])">
v-if=" <el-dropdown-item @click.native="printTag(scope.row)" v-hasPermi="['ecw:order:print_tag']">{{ $t("打印标签") }}</el-dropdown-item>
exclude(scope.row.status, [0]) &&
exclude(scope.row.abnormalState, [5, 6, 7, 8])
"
>
<el-dropdown-item
@click.native="printTag(scope.row)"
v-hasPermi="['ecw:order:print_tag']"
>{{ $t("打印标签") }}</el-dropdown-item
>
</template> </template>
<!-- 打印入仓单 --> <!-- 打印入仓单 -->
<template <template v-if="exclude(scope.row.status, [0, 2]) && exclude(scope.row.abnormalState, [5, 6, 7, 8])">
v-if=" <el-dropdown-item @click.native="printWarehouseReceiptOrderId = scope.row.orderId" v-hasPermi="['ecw:order:warehouse_receipt']">{{ $t("打印入仓单") }}</el-dropdown-item>
exclude(scope.row.status, [0, 2]) &&
exclude(scope.row.abnormalState, [5, 6, 7, 8])
"
>
<el-dropdown-item
@click.native="
printWarehouseReceiptOrderId = scope.row.orderId
"
v-hasPermi="['ecw:order:warehouse_receipt']"
>{{ $t("打印入仓单") }}</el-dropdown-item
>
</template> </template>
<!-- 打印提单 --> <!-- 打印提单 -->
<el-dropdown-item <el-dropdown-item @click.native="printLadingBillOrderId = scope.row.orderId" :disabled="!scope.row.tidanNo" v-hasPermi="['ecw:order:landing_bill']">{{ $t("打印提单") }}</el-dropdown-item>
@click.native="printLadingBillOrderId = scope.row.orderId"
:disabled="!scope.row.tidanNo"
v-hasPermi="['ecw:order:landing_bill']"
>{{ $t("打印提单") }}</el-dropdown-item
>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-button type="text" @click="handleCopyOrder(scope.row.orderId)">{{$t('复制')}}</el-button> <el-button type="text" @click="handleCopyOrder(scope.row.orderId)">{{ $t("复制") }}</el-button>
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
v-show="total > 0"
:total="total" <special-needs :orderNo="orderNo" :show.sync="isShow" :currency="JSON.stringify(currencyList)" :order-id="orderId" @determine="getList"></special-needs>
:page.sync="queryParams.page" <print-tag v-if="printTagOrderId !== null" :order-id="printTagOrderId" @close="printTagOrderId = null" :warehouse-in-num="printTagWarehouseInNum" />
:limit.sync="queryParams.rows" <print-warehouse-receipt v-if="printWarehouseReceiptOrderId !== null" :order-id="printWarehouseReceiptOrderId" @close="printWarehouseReceiptOrderId = null" />
@pagination="getList" <print-lading-bill v-if="printLadingBillOrderId !== null" :order-id="printLadingBillOrderId" @close="printLadingBillOrderId = null" />
/> <batch-pickup v-if="showBatchPickup" @close="onBatchClose" @success="onBatchClose" />
<withdrawal v-if="show" :dialog-visible="show" :orderId="orderId"></withdrawal>
<special-needs <batch-single-application @getList="getList" :order-list="orderId" :dialog-visible.sync="warehouseBol"></batch-single-application>
:orderNo="orderNo" <fee-application v-if="feeApplicationBol" :order-id="orderId" :currencys="JSON.stringify(currencyList)" :dialog-visible.sync="feeApplicationBol"></fee-application>
:show.sync="isShow" <merge-log :order-no="showMergedLogOrderNo" v-if="showMergedLogOrderNo !== null" @close="showMergedLogOrderNo = null" />
:currency="JSON.stringify(currencyList)" <pickup-log v-if="showPickupLogOrderNo" :order-no="showPickupLogOrderNo" @close="showPickupLogOrderNo = null" @delete="getList" />
:order-id="orderId"
@determine="getList"
></special-needs>
<print-tag
v-if="printTagOrderId !== null"
:order-id="printTagOrderId"
@close="printTagOrderId = null"
:warehouse-in-num="printTagWarehouseInNum"
/>
<print-warehouse-receipt
v-if="printWarehouseReceiptOrderId !== null"
:order-id="printWarehouseReceiptOrderId"
@close="printWarehouseReceiptOrderId = null"
/>
<print-lading-bill
v-if="printLadingBillOrderId !== null"
:order-id="printLadingBillOrderId"
@close="printLadingBillOrderId = null"
/>
<batch-pickup
v-if="showBatchPickup"
@close="onBatchClose"
@success="onBatchClose"
/>
<withdrawal
v-if="show"
:dialog-visible="show"
:orderId="orderId"
></withdrawal>
<batch-single-application
@getList="getList"
:order-list="orderId"
:dialog-visible.sync="warehouseBol"
></batch-single-application>
<fee-application
v-if="feeApplicationBol"
:order-id="orderId"
:currencys="JSON.stringify(currencyList)"
:dialog-visible.sync="feeApplicationBol"
></fee-application>
<merge-log
:order-no="showMergedLogOrderNo"
v-if="showMergedLogOrderNo !== null"
@close="showMergedLogOrderNo = null"
/>
<pickup-log
v-if="showPickupLogOrderNo"
:order-no="showPickupLogOrderNo"
@close="showPickupLogOrderNo = null"
@delete="getList"
/>
<SplitRevoke <SplitRevoke
v-if="splitRevokeOrderId" v-if="splitRevokeOrderId"
:order-id="splitRevokeOrderId" :order-id="splitRevokeOrderId"
@close=" @close="
splitRevokeOrderId = null; splitRevokeOrderId = null
getList(); getList()
" "
></SplitRevoke> ></SplitRevoke>
<turn-exception <turn-exception v-if="!!tureExceptionOrder" ref="turnException" :order-no="tureExceptionOrder.orderNo" :order-id="tureExceptionOrder.orderId" @done="handleTurnExceptionDone" @cancel="handleExceptionClose"></turn-exception>
v-if="!!tureExceptionOrder"
ref="turnException"
:order-no="tureExceptionOrder.orderNo"
:order-id="tureExceptionOrder.orderId"
@done="handleTurnExceptionDone"
@cancel="handleExceptionClose"></turn-exception>
</div> </div>
</template> </template>
<script> <script>
//图片上传组件 lanbm 2024-06-19 add //图片上传组件 lanbm 2024-06-19 add
import imageUpload from "@/components/ImageUpload"; import imageUpload from "@/components/ImageUpload"
import Selector from "@/components/Selector"; import Selector from "@/components/Selector"
import ProductSelector from "@/components/ProductSelector"; import ProductSelector from "@/components/ProductSelector"
import { getProductAttrList } from "@/api/ecw/productAttr"; import { getProductAttrList } from "@/api/ecw/productAttr"
import CustomerSelector from "@/components/CustomerSelector"; import CustomerSelector from "@/components/CustomerSelector"
import specialNeeds from "@/views/ecw/order/components/specialNeeds"; import specialNeeds from "@/views/ecw/order/components/specialNeeds"
import { import { createOrder, updateOrder, deleteOrder, getOrder, getOrderPage, exportOrderExcel, orderSpecialNeed, cancelOrder, recoveryOrder, getMyOrderPage, deptOrderPage, orderStatistics, orderMyStatistics, orderDeptStatistics, orderExportSearch, orderExportMySearch, orderExportDeptSearch, exportAbnormal, exportHeavyOrder, exportReturnOrder, exportSaleRepay, exportCustomsDatas, exportShippingDatas, exportShipFee, exportUnload, splitCancelApply, orderSplitRevoke, setCanShipment, setCanNotShipment, getParentOrder, getRegionList, copyOrder } from "@/api/ecw/order"
createOrder,
updateOrder,
deleteOrder,
getOrder,
getOrderPage,
exportOrderExcel,
orderSpecialNeed,
cancelOrder,
recoveryOrder,
getMyOrderPage,
deptOrderPage,
orderStatistics,
orderMyStatistics,
orderDeptStatistics,
orderExportSearch,
orderExportMySearch,
orderExportDeptSearch,
exportAbnormal,
exportHeavyOrder,
exportReturnOrder,
exportSaleRepay,
exportCustomsDatas,
exportShippingDatas,
exportShipFee,
exportUnload,
splitCancelApply,
orderSplitRevoke,
setCanShipment,
setCanNotShipment,
getParentOrder,
getRegionList, copyOrder
} from '@/api/ecw/order'
/* import { getDictDatas, DICT_TYPE } from '@/utils/dict'; */ /* import { getDictDatas, DICT_TYPE } from '@/utils/dict'; */
import PrintTag from "./components/PrintTag"; import PrintTag from "./components/PrintTag"
import PrintWarehouseReceipt from "./components/PrintWarehouseReceipt"; import PrintWarehouseReceipt from "./components/PrintWarehouseReceipt"
import PrintLadingBill from "./components/PrintLadingBill"; import PrintLadingBill from "./components/PrintLadingBill"
import BatchPickup from "./components/BatchPickup"; import BatchPickup from "./components/BatchPickup"
import withdrawal from "@/views/ecw/order/withdrawal"; import withdrawal from "@/views/ecw/order/withdrawal"
import UserSelector from "@/components/UserSelector"; import UserSelector from "@/components/UserSelector"
import BatchSingleApplication from "@/views/ecw/order/batchSingleApplication"; import BatchSingleApplication from "@/views/ecw/order/batchSingleApplication"
import FeeApplication from "@/views/ecw/order/feeApplication"; import FeeApplication from "@/views/ecw/order/feeApplication"
import MergeLog from "@/views/ecw/order/components/MergeLog"; import MergeLog from "@/views/ecw/order/components/MergeLog"
import PickupLog from "./components/PickupLog"; import PickupLog from "./components/PickupLog"
import { getWarehouseList } from "@/api/ecw/warehouse"; import { getWarehouseList } from "@/api/ecw/warehouse"
import { getCurrencyPage } from "@/api/ecw/currency"; import { getCurrencyPage } from "@/api/ecw/currency"
import SplitRevoke from "@/views/ecw/order/components/SplitRevoke"; import SplitRevoke from "@/views/ecw/order/components/SplitRevoke"
import { getChannelList } from "@/api/ecw/channel"; import { getChannelList } from "@/api/ecw/channel"
import Template from "@/views/cms/template/index.vue"; import Template from "@/views/cms/template/index.vue"
import { getDictDatas } from "@/utils/dict"; import { getDictDatas } from "@/utils/dict"
import TurnException from '@/views/ecw/order/components/TurnException.vue' import TurnException from "@/views/ecw/order/components/TurnException.vue"
export default { export default {
name: "EcwOrderIndex", name: "EcwOrderIndex",
components: { components: {
...@@ -1399,11 +648,11 @@ export default { ...@@ -1399,11 +648,11 @@ export default {
PrintLadingBill, PrintLadingBill,
BatchPickup, BatchPickup,
withdrawal, withdrawal,
imageUpload, //图片上传组件 imageUpload //图片上传组件
}, },
props: { props: {
mine: Boolean, // 标识我的订单列表 mine: Boolean, // 标识我的订单列表
dept: Boolean, // 标识部门订单列表 dept: Boolean // 标识部门订单列表
}, },
data() { data() {
return { return {
...@@ -1445,7 +694,7 @@ export default { ...@@ -1445,7 +694,7 @@ export default {
rows: 10, rows: 10,
packageTypeArr: [], packageTypeArr: [],
channelIds: [], channelIds: [],
goodsTypes:[] goodsTypes: []
}, },
warehouseList: [], warehouseList: [],
//tradeCityList: [], //tradeCityList: [],
...@@ -1475,7 +724,7 @@ export default { ...@@ -1475,7 +724,7 @@ export default {
orderNo: "", orderNo: "",
params: { params: {
page: 1, page: 1,
rows: 20, rows: 20
}, },
currencyList: [], currencyList: [],
statistics: null, // 统计数据 statistics: null, // 统计数据
...@@ -1486,24 +735,24 @@ export default { ...@@ -1486,24 +735,24 @@ export default {
// 编号搜索条件 // 编号搜索条件
noParam: { noParam: {
key: "numberKey", key: "numberKey",
value: "", value: ""
}, },
// 商品搜索条件 // 商品搜索条件
prodParam: { prodParam: {
key: "prodKey", key: "prodKey",
value: "", value: ""
}, },
// 当前操作转异的订单 // 当前操作转异的订单
tureExceptionOrder: null, tureExceptionOrder: null,
pickRatio: { pickRatio: {
key: "eqPickRatio", key: "eqPickRatio",
value: "", value: ""
}
} }
};
}, },
watch: { watch: {
isChinese() { isChinese() {
this.getList(); this.getList()
}, },
// provinceCode destCountryId // provinceCode destCountryId
...@@ -1512,46 +761,42 @@ export default { ...@@ -1512,46 +761,42 @@ export default {
deep: true, //深度监听 deep: true, //深度监听
handler() { handler() {
//每当值省份值改变时其下地区值进行清空 //每当值省份值改变时其下地区值进行清空
this.AddressCity = []; this.AddressCity = []
this.AddressTown = []; this.AddressTown = []
this.objectiveId = ""; this.objectiveId = ""
this.destWarehouseId = ""; this.destWarehouseId = ""
this.findByprovinceCode(); this.findByprovinceCode()
if (this.destCountryId == "") { if (this.destCountryId == "") {
getRegionList(4, 4) getRegionList(4, 4)
.then(({ data }) => { .then(({ data }) => {
this.AddressCity = data; this.AddressCity = data
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error)
}); })
getRegionList(5, 5) getRegionList(5, 5)
.then(({ data }) => { .then(({ data }) => {
this.AddressTown = data; this.AddressTown = data
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error)
}); })
} else if ( } else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
getRegionList(2, this.destCountryId) getRegionList(2, this.destCountryId)
.then(({ data }) => { .then(({ data }) => {
this.AddressCity = data; this.AddressCity = data
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error)
}); })
getRegionList(5, 5) getRegionList(5, 5)
.then(({ data }) => { .then(({ data }) => {
this.AddressTown = data; this.AddressTown = data
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error)
}); })
} }
//重新加载目的城市 //重新加载目的城市
//目的城市 //目的城市
...@@ -1569,59 +814,47 @@ export default { ...@@ -1569,59 +814,47 @@ export default {
// .catch(error => { // .catch(error => {
// console.log(error); // console.log(error);
// }); // });
}, }
}, },
objectiveId: { objectiveId: {
deep: true, //深度监听 deep: true, //深度监听
handler() { handler() {
this.AddressTown = []; this.AddressTown = []
this.destWarehouseId = ""; this.destWarehouseId = ""
this.findBycityCode(); this.findBycityCode()
if ( if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域 //获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId) getRegionList(3, this.objectiveId)
.then(({ data }) => { .then(({ data }) => {
this.AddressTown = data; this.AddressTown = data
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error)
}); })
} else if ( } else if (this.destCountryId == "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.destCountryId == "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
getRegionList(5, 5) getRegionList(5, 5)
.then(({ data }) => { .then(({ data }) => {
this.AddressTown = data; this.AddressTown = data
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error)
}); })
} else if ( } else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
getRegionList(2, this.destCountryId) getRegionList(2, this.destCountryId)
.then(({ data }) => { .then(({ data }) => {
this.AddressCity = data; this.AddressCity = data
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error)
}); })
getRegionList(5, 5) getRegionList(5, 5)
.then(({ data }) => { .then(({ data }) => {
this.AddressTown = data; this.AddressTown = data
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error)
}); })
} }
// else if(this.objectiveId!="" && this.objectiveId=="" ){ // else if(this.objectiveId!="" && this.objectiveId=="" ){
// getRegionList(5, 5).then(({data}) => { // getRegionList(5, 5).then(({data}) => {
...@@ -1631,36 +864,28 @@ export default { ...@@ -1631,36 +864,28 @@ export default {
// console.log(error); // console.log(error);
// }); // });
// } // }
}, }
}, },
destWarehouseId: { destWarehouseId: {
deep: true, //深度监听 deep: true, //深度监听
handler() { handler() {
if ( if (this.objectiveId != "" && this.destCountryId != "" && this.destWarehouseId == "") {
this.objectiveId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域 //获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId) getRegionList(3, this.objectiveId)
.then(({ data }) => { .then(({ data }) => {
this.AddressTown = data; this.AddressTown = data
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error)
}); })
} else if ( } else if (this.destCountryId != "" && this.objectiveId == "" && this.destWarehouseId == "") {
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
getRegionList(5, 5) getRegionList(5, 5)
.then(({ data }) => { .then(({ data }) => {
this.AddressTown = data; this.AddressTown = data
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error)
}); })
} }
// else if(this.objectiveId=="" && this.destWarehouseId==""){ // else if(this.objectiveId=="" && this.destWarehouseId==""){
// getRegionList(5, 5).then(({data}) => { // getRegionList(5, 5).then(({data}) => {
...@@ -1670,43 +895,41 @@ export default { ...@@ -1670,43 +895,41 @@ export default {
// console.log(error); // console.log(error);
// }); // });
// } // }
}, }
}, }
}, },
computed: { computed: {
// 导出的权限字符串 // 导出的权限字符串
exportPermiString() { exportPermiString() {
let arr = ["ecw:order:export"]; let arr = ["ecw:order:export"]
if (this.mine) arr.push("my"); if (this.mine) arr.push("my")
if (this.dept) arr.push("dept"); if (this.dept) arr.push("dept")
if (this.transportId) arr.push(this.transportId); if (this.transportId) arr.push(this.transportId)
return arr.join(":"); return arr.join(":")
}, },
// 是否全部订单 // 是否全部订单
isAll() { isAll() {
return !(this.mine || this.dept || this.transportId); return !(this.mine || this.dept || this.transportId)
}, },
isChinese() { isChinese() {
return this.$i18n.locale === "zh_CN"; return this.$i18n.locale === "zh_CN"
}, },
exportWarehouseList() { exportWarehouseList() {
/* tradeType 1 进口,2出口,3进出口 */ /* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter( return this.warehouseList.filter((item) => item.tradeType == 2 || item.tradeType == 3)
(item) => item.tradeType == 2 || item.tradeType == 3
);
}, },
// importWarehouseList(){ // importWarehouseList(){
// return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3) // return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
// }, // },
importCountryList() { importCountryList() {
return this.countryList.filter((item) => item.id !== null); return this.countryList.filter((item) => item.id !== null)
}, },
importCityList() { importCityList() {
return this.cityList.filter((item) => item.id !== null); return this.cityList.filter((item) => item.id !== null)
}, },
importWarehouseList() { importWarehouseList() {
return this.destWarehouseList.filter((item) => item.id !== null); return this.destWarehouseList.filter((item) => item.id !== null)
}, },
/* exportCityList() { /* exportCityList() {
return this.tradeCityList.filter(item => item.type == 2) return this.tradeCityList.filter(item => item.type == 2)
...@@ -1715,91 +938,89 @@ export default { ...@@ -1715,91 +938,89 @@ export default {
return this.tradeCityList.filter(item => item.type == 1) return this.tradeCityList.filter(item => item.type == 1)
}, */ }, */
combinedQueryParams() { combinedQueryParams() {
let timeParams = {}; let timeParams = {}
if (this.dateFilterType && this.dateFilter) { if (this.dateFilterType && this.dateFilter) {
timeParams["begin" + this.dateFilterType] = this.dateFilter[0]; timeParams["begin" + this.dateFilterType] = this.dateFilter[0]
timeParams["end" + this.dateFilterType] = this.dateFilter[1]; timeParams["end" + this.dateFilterType] = this.dateFilter[1]
} }
let queryParams = Object.assign({}, this.queryParams, timeParams); let queryParams = Object.assign({}, this.queryParams, timeParams)
if (this.transportId) { if (this.transportId) {
queryParams.transportId = this.transportId; queryParams.transportId = this.transportId
} }
if (this.noParam.value) { if (this.noParam.value) {
queryParams[this.noParam.key] = this.noParam.value; queryParams[this.noParam.key] = this.noParam.value
} }
if (this.prodParam.value) { if (this.prodParam.value) {
queryParams[this.prodParam.key] = this.prodParam.value; queryParams[this.prodParam.key] = this.prodParam.value
} }
//目的国 //目的国
if (this.destCountryId != null && this.destCountryId != "") { if (this.destCountryId != null && this.destCountryId != "") {
queryParams.destCountryIds = this.destCountryId; queryParams.destCountryIds = this.destCountryId
} }
//目的城市 //目的城市
if (this.objectiveId != null && this.objectiveId != "") { if (this.objectiveId != null && this.objectiveId != "") {
queryParams.objectiveIds = this.objectiveId; queryParams.objectiveIds = this.objectiveId
} }
//目的仓 //目的仓
if (this.destWarehouseId != null && this.destWarehouseId != "") { if (this.destWarehouseId != null && this.destWarehouseId != "") {
queryParams.destWarehouseIds = this.destWarehouseId; queryParams.destWarehouseIds = this.destWarehouseId
} }
// 提货率 // 提货率
if (this.pickRatio.value) { if (this.pickRatio.value) {
queryParams[this.pickRatio.key] = this.pickRatio.value queryParams[this.pickRatio.key] = this.pickRatio.value
} }
if(queryParams.statusList?.length){ if (queryParams.statusList?.length) {
queryParams.statusString = queryParams.statusList.join(",") queryParams.statusString = queryParams.statusList.join(",")
} }
delete queryParams.statusList delete queryParams.statusList
return queryParams; return queryParams
}, },
/*batchWarehouseAdjustment(){ /*batchWarehouseAdjustment(){
return this.multipleSelection.length > 0 && this.multipleSelection.every(e => e.status === 5) return this.multipleSelection.length > 0 && this.multipleSelection.every(e => e.status === 5)
},*/ },*/
include() { include() {
return (state, arr) => { return (state, arr) => {
return arr.indexOf(state) > -1; return arr.indexOf(state) > -1
}; }
}, },
exclude() { exclude() {
return (state, arr) => { return (state, arr) => {
return arr.indexOf(state) == -1; return arr.indexOf(state) == -1
}; }
}, },
// 增值服务文本 // 增值服务文本
getTypeText(){ getTypeText() {
return type => { return (type) => {
if(!type) return "" if (!type) return ""
const arr = [] const arr = []
if(type.indexOf('1') > -1){ if (type.indexOf("1") > -1) {
arr.push(this.$t('集运')) arr.push(this.$t("集运"))
} }
if(type.indexOf('2') > -1){ if (type.indexOf("2") > -1) {
arr.push(this.$t('海外仓')) arr.push(this.$t("海外仓"))
} }
} }
} }
}, },
activated() { activated() {
this.getList(); this.getList()
}, },
created() { created() {
this.init(); // this.init() //
this.getTransportFromRoute(); this.getTransportFromRoute()
this.getList(); this.getList()
getProductAttrList().then((res) => (this.productAttrList = res.data)); getProductAttrList().then((res) => (this.productAttrList = res.data))
//getTradeCityList().then(res => this.tradeCityList = res.data) //getTradeCityList().then(res => this.tradeCityList = res.data)
getWarehouseList().then((res) => { getWarehouseList().then((res) => {
this.tradeCityList = res.data; this.tradeCityList = res.data
this.warehouseList = res.data; this.warehouseList = res.data
}); })
getCurrencyPage(this.params).then( getCurrencyPage(this.params).then((res) => (this.currencyList = res.data.list))
(res) => (this.currencyList = res.data.list)
);
// 如果是空运(专线空运和海空联运)则获取渠道 // 如果是空运(专线空运和海空联运)则获取渠道
//if (this.transportId == 3 || this.transportId == 4) { //if (this.transportId == 3 || this.transportId == 4) {
getChannelList().then((res) => (this.channelList = res.data)); getChannelList().then((res) => (this.channelList = res.data))
//} //}
}, },
methods: { methods: {
...@@ -1807,45 +1028,45 @@ export default { ...@@ -1807,45 +1028,45 @@ export default {
//加载时发起请求获取所有省份值 //加载时发起请求获取所有省份值
getRegionList(1, 1) getRegionList(1, 1)
.then(({ data }) => { .then(({ data }) => {
this.AddressProvince = data; this.AddressProvince = data
console.log(this.AddressProvince); console.log(this.AddressProvince)
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error)
}); })
//目的城市 //目的城市
getRegionList(4, 4) getRegionList(4, 4)
.then(({ data }) => { .then(({ data }) => {
this.AddressCity = data; this.AddressCity = data
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error)
}); })
//目的仓 //目的仓
getRegionList(5, 5) getRegionList(5, 5)
.then(({ data }) => { .then(({ data }) => {
this.AddressTown = data; this.AddressTown = data
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error)
}); })
}, },
findByprovinceCode() { findByprovinceCode() {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode //获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId) getRegionList(2, this.destCountryId)
.then(({ data }) => { .then(({ data }) => {
this.AddressCity = data; this.AddressCity = data
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error)
}); })
}, },
findBycityCode() { findBycityCode() {
//获取当前城市值id,获取该城市下区域 //获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId) getRegionList(3, this.objectiveId)
.then(({ data }) => { .then(({ data }) => {
this.AddressTown = data; this.AddressTown = data
// 去重 // 去重
// let uniqueDataList = data.filter((item, index, self) => { // let uniqueDataList = data.filter((item, index, self) => {
...@@ -1859,216 +1080,173 @@ export default { ...@@ -1859,216 +1080,173 @@ export default {
// this.AddressProvince = uniqueDataList // this.AddressProvince = uniqueDataList
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error)
}); })
}, },
getDictDatas, getDictDatas,
// 取消拆单申请 // 取消拆单申请
splitRevoke(row) { splitRevoke(row) {
this.splitRevokeOrderId = row.orderId; this.splitRevokeOrderId = row.orderId
}, },
// 获得导出函数 // 获得导出函数
getExportFunc() { getExportFunc() {
let func = orderExportSearch; let func = orderExportSearch
if (this.mine) func = orderExportMySearch; if (this.mine) func = orderExportMySearch
if (this.dept) func = orderExportDeptSearch; if (this.dept) func = orderExportDeptSearch
return func; return func
}, },
// 导出勾选 // 导出勾选
exportChecked() { exportChecked() {
if (!this.ids.length) { if (!this.ids.length) {
return this.$message.error(this.$t("请勾选需要导出的订单")); return this.$message.error(this.$t("请勾选需要导出的订单"))
} }
return this.exportExcel( return this.exportExcel(this.getExportFunc(), { orderIdList: this.ids }, this.$t("导出勾选"))
this.getExportFunc(),
{ orderIdList: this.ids },
this.$t("导出勾选")
);
}, },
// 导出搜索 // 导出搜索
exportSearch() { exportSearch() {
return this.exportExcel( return this.exportExcel(this.getExportFunc(), this.combinedQueryParams, this.$t("导出搜索"))
this.getExportFunc(),
this.combinedQueryParams,
this.$t("导出搜索")
);
}, },
// 导出异常单 // 导出异常单
exportAbnormal() { exportAbnormal() {
return this.exportExcel( return this.exportExcel(exportAbnormal, this.combinedQueryParams, this.$t("异常单统计"))
exportAbnormal,
this.combinedQueryParams,
this.$t("异常单统计")
);
}, },
// 重货单统计 // 重货单统计
exportHeavyOrder() { exportHeavyOrder() {
return this.exportExcel( return this.exportExcel(exportHeavyOrder, this.combinedQueryParams, this.$t("重货单统计"))
exportHeavyOrder,
this.combinedQueryParams,
this.$t("重货单统计")
);
}, },
// 退仓单统计 // 退仓单统计
exportReturnOrder() { exportReturnOrder() {
return this.exportExcel( return this.exportExcel(exportReturnOrder, this.combinedQueryParams, this.$t("退仓单统计"))
exportReturnOrder,
this.combinedQueryParams,
this.$t("退仓单统计")
);
}, },
// 售后赔偿金额统计 // 售后赔偿金额统计
exportSaleRepay() { exportSaleRepay() {
return this.exportExcel( return this.exportExcel(exportSaleRepay, this.combinedQueryParams, this.$t("售后赔偿金额统计"))
exportSaleRepay,
this.combinedQueryParams,
this.$t("售后赔偿金额统计")
);
}, },
// 报关数据统计 // 报关数据统计
exportCustomsDatas() { exportCustomsDatas() {
return this.exportExcel( return this.exportExcel(exportCustomsDatas, this.combinedQueryParams, this.$t("报关数据统计"))
exportCustomsDatas,
this.combinedQueryParams,
this.$t("报关数据统计")
);
}, },
// 客户出货量统计 // 客户出货量统计
exportShippingDatas() { exportShippingDatas() {
return this.exportExcel( return this.exportExcel(exportShippingDatas, this.combinedQueryParams, this.$t("客户出货量统计"))
exportShippingDatas,
this.combinedQueryParams,
this.$t("客户出货量统计")
);
}, },
// 预付运费统计 // 预付运费统计
exportShipFee() { exportShipFee() {
return this.exportExcel( return this.exportExcel(exportShipFee, this.combinedQueryParams, this.$t("预付运费统计"))
exportShipFee,
this.combinedQueryParams,
this.$t("预付运费统计")
);
}, },
// 卸货费统计 // 卸货费统计
exportUnload() { exportUnload() {
return this.exportExcel( return this.exportExcel(exportUnload, this.combinedQueryParams, this.$t("卸货费统计"))
exportUnload,
this.combinedQueryParams,
this.$t("卸货费统计")
);
}, },
// 通用导出函数 // 通用导出函数
exportExcel(func, params, fileName = null) { exportExcel(func, params, fileName = null) {
this.exportLoading = true; this.exportLoading = true
func(params) func(params)
.then((res) => { .then((res) => {
if (!fileName) { if (!fileName) {
fileName = this.$t("订单"); fileName = this.$t("订单")
} }
this.$message.success( this.$message.success(this.$t("已加入导出队列,请稍后在下载日志中下载"))
this.$t("已加入导出队列,请稍后在下载日志中下载")
);
// this.$download.excel(res, fileName + '.xls'); // this.$download.excel(res, fileName + '.xls');
}) })
.finally(() => { .finally(() => {
this.exportLoading = false; this.exportLoading = false
}); })
}, },
// 提取路径中的运输方式 // 提取路径中的运输方式
getTransportFromRoute() { getTransportFromRoute() {
let match = this.$route.path.match(/transport_(\d)/); let match = this.$route.path.match(/transport_(\d)/)
if (!match) return; if (!match) return
this.transportId = match[1]; this.transportId = match[1]
}, },
oprateOrder(orderId, type) { oprateOrder(orderId, type) {
let actions = { let actions = {
cancelOrder: { cancelOrder: {
callable: cancelOrder, callable: cancelOrder,
confirm: this.$t("确定要取消此订单么?"), confirm: this.$t("确定要取消此订单么?")
}, },
recoveryOrder: { recoveryOrder: {
callable: recoveryOrder, callable: recoveryOrder,
confirm: this.$t("确定要恢复此订单么?"), confirm: this.$t("确定要恢复此订单么?")
}, },
deleteOrder: { deleteOrder: {
callable: deleteOrder, callable: deleteOrder,
confirm: this.$t("确定要删除此订单么?"), confirm: this.$t("确定要删除此订单么?")
}, }
}; }
let action = actions[type]; let action = actions[type]
if (!action) { if (!action) {
return this.$alert("不支持此操作"); return this.$alert("不支持此操作")
} }
this.$confirm(action.confirm) this.$confirm(action.confirm)
.then(() => { .then(() => {
return action.callable(orderId); return action.callable(orderId)
}) })
.then(() => { .then(() => {
this.getList(); this.getList()
}); })
}, },
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true
const query = { ...this.combinedQueryParams }; const query = { ...this.combinedQueryParams }
if (query.packageTypeArr && query.packageTypeArr.length) { if (query.packageTypeArr && query.packageTypeArr.length) {
query.packageType = query.packageTypeArr.join(","); query.packageType = query.packageTypeArr.join(",")
} }
let func = getOrderPage; let func = getOrderPage
if (this.mine) { if (this.mine) {
func = getMyOrderPage; func = getMyOrderPage
/* return getMyOrderPage(this.combinedQueryParams).then(response => { /* return getMyOrderPage(this.combinedQueryParams).then(response => {
this.list = response.data.list; this.list = response.data.list;
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
}); */ }); */
} else if (this.dept) { } else if (this.dept) {
func = deptOrderPage; func = deptOrderPage
} }
// 执行查询 // 执行查询
func(query).then((response) => { func(query).then((response) => {
// 部分情况下,订单后面的操作下拉菜单会显示按钮,但是下来没有选项,在elTable组件更新的时候会导致渲染错误,所以要在更新渲染前清空一次list让table彻底重新渲染,避免部分更新导致异常 // 部分情况下,订单后面的操作下拉菜单会显示按钮,但是下来没有选项,在elTable组件更新的时候会导致渲染错误,所以要在更新渲染前清空一次list让table彻底重新渲染,避免部分更新导致异常
this.list = []; this.list = []
this.$nextTick(() => { this.$nextTick(() => {
this.list = response.data.list; this.list = response.data.list
}); })
this.total = response.data.total; this.total = response.data.total
this.loading = false; this.loading = false
}); })
this.getStatistics(); this.getStatistics()
}, },
// 获得统计数据 // 获得统计数据
getStatistics() { getStatistics() {
let func = orderStatistics; let func = orderStatistics
if (this.mine) { if (this.mine) {
func = orderMyStatistics; func = orderMyStatistics
} else if (this.dept) { } else if (this.dept) {
func = orderDeptStatistics; func = orderDeptStatistics
} }
const query = { ...this.combinedQueryParams }; const query = { ...this.combinedQueryParams }
if (query.packageTypeArr && query.packageTypeArr.length) { if (query.packageTypeArr && query.packageTypeArr.length) {
query.packageType = query.packageTypeArr.join(","); query.packageType = query.packageTypeArr.join(",")
delete query.packageTypeArr; delete query.packageTypeArr
} }
func(query).then((res) => { func(query).then((res) => {
this.statistics = res.data; this.statistics = res.data
}); })
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.page = 1; this.queryParams.page = 1
this.$nextTick(this.getList)
this.$nextTick(this.getList);
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
...@@ -2076,30 +1254,30 @@ export default { ...@@ -2076,30 +1254,30 @@ export default {
page: 1, page: 1,
rows: 10, rows: 10,
packageTypeArr: [], packageTypeArr: [],
channelId: '', channelId: "",
goodsTypes: [], goodsTypes: [],
channelIds: [] channelIds: []
}; }
this.destCountryId = null this.destCountryId = null
this.destWarehouseId = null this.destWarehouseId = null
this.objectiveId = null this.objectiveId = null
this.pickRatio.value = '' this.pickRatio.value = ""
this.noParam.value = ""; this.noParam.value = ""
this.prodParam.value = ""; this.prodParam.value = ""
this.dateFilter = []; this.dateFilter = []
this.handleQuery(); this.handleQuery()
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.$router.push("create?transportType=" + this.transportId); this.$router.push("create?transportType=" + this.transportId)
}, },
/** 修改按钮操作, updateChannel表示变更出货渠道 */ /** 修改按钮操作, updateChannel表示变更出货渠道 */
handleUpdate(row, updateChannel = false) { handleUpdate(row, updateChannel = false) {
let url = "edit?id=" + row.orderId; let url = "edit?id=" + row.orderId
if (updateChannel) { if (updateChannel) {
url += "&updateChannel=1"; url += "&updateChannel=1"
} }
this.$router.push(url); this.$router.push(url)
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
...@@ -2109,132 +1287,123 @@ export default { ...@@ -2109,132 +1287,123 @@ export default {
this.$modal this.$modal
.confirm(this.$t("是否确认导出所有订单数据项?")) .confirm(this.$t("是否确认导出所有订单数据项?"))
.then(() => { .then(() => {
this.exportLoading = true; this.exportLoading = true
return exportOrderExcel(this.combinedQueryParams); return exportOrderExcel(this.combinedQueryParams)
}) })
.then((response) => { .then((response) => {
this.$download.excel(response, "${table.classComment}.xls"); this.$download.excel(response, "${table.classComment}.xls")
this.exportLoading = false; this.exportLoading = false
}) })
.catch(() => {}); .catch(() => {})
}, },
// 表格多选 // 表格多选
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.multipleSelection = selection; this.multipleSelection = selection
this.ids = selection.map((item) => item.orderId); this.ids = selection.map((item) => item.orderId)
this.single = selection.length !== 1; this.single = selection.length !== 1
this.multiple = !selection.length; this.multiple = !selection.length
}, },
handleEdit() { handleEdit() {
this.warehouseBol = true; this.warehouseBol = true
this.orderId = this.ids.join(","); this.orderId = this.ids.join(",")
}, },
moleculeChange() {}, moleculeChange() {},
denominatorChange() {}, denominatorChange() {},
specialRendering(val) { specialRendering(val) {
console.log("val", val); console.log("val", val)
if (val !== undefined) { if (val !== undefined) {
let i = val.split(","); let i = val.split(",")
return this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS) return this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS)
.filter((e) => { .filter((e) => {
return i.indexOf(e.value) > -1; return i.indexOf(e.value) > -1
}) })
.map((item) => { .map((item) => {
// 打字开头的用最后一个字,否则取第一个字 // 打字开头的用最后一个字,否则取第一个字
item.symbol = item.symbol = item.label[0] == "" ? item.label[item.label.length - 1] : item.label[0]
item.label[0] == "" return item
? item.label[item.label.length - 1] })
: item.label[0];
return item;
});
} }
}, },
deleteSpecial(id, orderId) { deleteSpecial(id, orderId) {
this.$confirm(this.$t("确定删除此特需么?")) this.$confirm(this.$t("确定删除此特需么?"))
.then(() => { .then(() => {
return orderSpecialNeed({ orderId: orderId, advanceType: id }); return orderSpecialNeed({ orderId: orderId, advanceType: id })
}) })
.then(() => { .then(() => {
this.getList(); this.getList()
}); })
}, },
onBatchClose() { onBatchClose() {
this.showBatchPickup = false; this.showBatchPickup = false
this.handleQuery(); this.handleQuery()
}, },
// 打印标签 // 打印标签
printTag(order) { printTag(order) {
this.printTagOrderId = order.orderId; this.printTagOrderId = order.orderId
this.printTagWarehouseInNum = order.sumNum; this.printTagWarehouseInNum = order.sumNum
}, },
// 过滤订单状态筛选字典内容 // 过滤订单状态筛选字典内容
statusDictFilter(item) { statusDictFilter(item) {
if (this.transportId == 3 && item.cssClass && item.cssClass != "air") { if (this.transportId == 3 && item.cssClass && item.cssClass != "air") {
return false; return false
} }
if (this.transportId == 1 && item.cssClass && item.cssClass != "sea") { if (this.transportId == 1 && item.cssClass && item.cssClass != "sea") {
return false; return false
} }
if ( if (this.transportId == 4 && item.cssClass && item.cssClass != "sea-air") {
this.transportId == 4 && return false
item.cssClass &&
item.cssClass != "sea-air"
) {
return false;
} }
return true; return true
}, },
// 设置空运订单不可出 // 设置空运订单不可出
async setCanNotShipment(order) { async setCanNotShipment(order) {
await this.$confirm( await this.$confirm(this.$t("确定设置订单{orderNo}不可出么?", { orderNo: order.orderNo }))
this.$t("确定设置订单{orderNo}不可出么?", { orderNo: order.orderNo })
);
setCanNotShipment(order.orderId).then((res) => { setCanNotShipment(order.orderId).then((res) => {
this.$message(this.$t("操作成功")); this.$message(this.$t("操作成功"))
this.getList(); this.getList()
}); })
}, },
// 查看母订单 // 查看母订单
showParentOrder(row) { showParentOrder(row) {
getParentOrder(row.orderId).then((res) => { getParentOrder(row.orderId).then((res) => {
this.$router.push("./detail?orderId=" + res.data.orderId); this.$router.push("./detail?orderId=" + res.data.orderId)
}); })
}, },
oprateOrder2(row, type) { oprateOrder2(row, type) {
//lanbm 2024-06-19 添加的转异功能 //lanbm 2024-06-19 添加的转异功能
this.order.orderNo = row.orderNo; this.order.orderNo = row.orderNo
this.errorShow = true; this.errorShow = true
}, },
async handleException(order) { async handleException(order) {
this.tureExceptionOrder = order this.tureExceptionOrder = order
await this.$nextTick() await this.$nextTick()
this.$refs.turnException?.show() this.$refs.turnException?.show()
}, },
handleTurnExceptionDone(){ handleTurnExceptionDone() {
this.tureExceptionOrder = null this.tureExceptionOrder = null
this.getList() this.getList()
}, },
handleExceptionClose() { handleExceptionClose() {
this.tureExceptionOrder = null; this.tureExceptionOrder = null
}, },
// 复制订单 // 复制订单
handleCopyOrder(orderId){ handleCopyOrder(orderId) {
copyOrder(orderId).then(res => { copyOrder(orderId).then((res) => {
this.$router.push({ path: '/order/edit', query: { id: res.data } }); this.$router.push({ path: "/order/edit", query: { id: res.data } })
}); })
}, },
// 查看异常 // 查看异常
openException(order){ openException(order) {
this.$router.push({ this.$router.push({
path: "./pending?id=" + order.orderId, path: "./pending?id=" + order.orderId
}); })
}, },
// 自动去除空格 // 自动去除空格
replaceSpace(obj, field){ replaceSpace(obj, field) {
obj[field] = obj[field].replace(/\s+/g, ''); obj[field] = obj[field].replace(/\s+/g, "")
} }
}, }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .actions { ::v-deep .actions {
......
...@@ -317,7 +317,6 @@ export default { ...@@ -317,7 +317,6 @@ export default {
specialProducts: [], specialProducts: [],
// priceStepList: [{},{}], // 阶梯价格 // priceStepList: [{},{}], // 阶梯价格
// specialList:[], // 特殊需求,默认四个 // specialList:[], // 特殊需求,默认四个
rules() {},
product: null, product: null,
/* productType: null, */ /* productType: null, */
currencyList: [], currencyList: [],
......
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