Commit a4eeea5b authored by zhoutong's avatar zhoutong
parents ee47ae6e c5549bf9
import request from '@/utils/request'
import query from "@/views/ecw/customer/query";
import * as url from "url";
import {methods} from "vue2-ace-editor";
// 创建客户
export function createCustomer(data) {
......@@ -26,7 +27,14 @@ export function updateCustomer(data) {
data: data
})
}
// 新建潜在客户
export function createPotential(data){
return request({
url:'/ecw/customer/create-potential',
method:'post',
data
})
}
// 删除客户
export function deleteCustomer(id) {
return request({
......@@ -72,6 +80,14 @@ export function getCustomerSelect(query) {
params: query
})
}
// 潜在客户
export function getPotential(query){
return request({
url:'/ecw/customer/get-potential',
method:'get',
params:query
})
}
// 根据客户id集合获得客户详情列表
export function getCustomerList(query) {
......@@ -175,7 +191,20 @@ export function handOverCustomer(data) {
data: data,
})
}
export function handoverApproval(data) {
return request({
url: '/ecw/customer/handover/approval',
method: 'post',
data: data,
})
}
export function handoverApprovalDetails(params){
return request({
url:'/ecw/customer/handover/approval',
method:'get',
params
})
}
// 公海池客户
export function getPublicList(query) {
return request({
......@@ -381,6 +410,14 @@ export function changeCustomerAir(data){
})
}
// 设置整柜
export function setChangeCustomerFcl(data){
return request({
url:'/ecw/customer/change-customer-fcl',
method:'put',
data
})
}
//获得客户日志
export function getCustomerOperatelogPage(params){
return request({
......
......@@ -120,4 +120,22 @@ export function getOrderExcptionResult(query) {
method: 'get',
params: query
})
}
// 根据订单ID,异常ID获取价格
export function getOrderExceptionChannelPriceList(data) {
return request({
url: '/order/exception-channel-price/getOrderExceptionChannelPriceList',
method: 'post',
data: data
})
}
// 根据工作流中传的业务ID,获取不可出渠道异常详细信息
export function getExceptionDetailByBusinessId(query) {
return request({
url: '/ecw/order-exception/getExceptionDetailByBusinessId',
method: 'get',
params: query
})
}
\ No newline at end of file
......@@ -12,7 +12,7 @@
</div>
<el-form label-position="left" label-width="100px">
<el-form-item :label="$t('抄送')">
<el-select v-model="valueSync" multiple :placeholder="$t('请选择抄送人')" style="width:100%" filterable >
<el-select v-model="valueSync" multiple :placeholder="$t('请选择抄送人')" style="width:100%" filterable :disabled="disabled" >
<el-option
v-for="item in users"
:key="item.id"
......@@ -45,7 +45,8 @@ export default {
taskData: { // 任务实例的数据。传递时,可展示 UserTask 审核相关的信息
type: Array,
default: () => [],
}
},
disabled: Boolean
},
data(){
return {
......@@ -87,4 +88,4 @@ export default {
.workflow ::v-deep .my-process-designer{
height: auto;
}
</style>
\ No newline at end of file
</style>
This diff is collapsed.
......@@ -403,6 +403,18 @@ export default {
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
// 出货批量加价审核
box_batch_markup:{
component: () => import('@/views/ecw/box/components/batchMakeUpDetail.vue'),
processId: this.processInstance.businessKey,
type: this.processInstance.processDefinition?.formCustomViewPath
},
// 可获移交详情
customer_handover_details:{
component: () => import('@/views/ecw/customer/components/customer-handover-details.vue'),
processId: this.processInstance.businessKey,
type: this.processInstance.processDefinition?.formCustomViewPath
}
}
console.log('formCustomViewPath', this.processInstance.processDefinition.formCustomViewPath.trim())
return map[this.processInstance.processDefinition.formCustomViewPath.trim()]
......
This diff is collapsed.
<template>
<div class="app-approvalShipping">
<h1>{{$t('申请信息')}}{{$t('出货信息')}}</h1>
<el-descriptions :column="6" border>
<el-descriptions-item :label="$t('自编号')">{{boxBackVO.selfNo}}</el-descriptions-item>
<el-descriptions-item :label="$t('运输方式')">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="boxBackVO.transportType" />
</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')">
{{getShipChannelName(boxBackVO.shippingChannelId)}}
</el-descriptions-item>
<el-descriptions-item :label="$t('柜型')">
{{cabinetLabel}}
</el-descriptions-item>
<el-descriptions-item :label="$t('体积/重量')">
{{getVolumeWeight(loadDetail.totalStatistics)}}
</el-descriptions-item>
<el-descriptions-item :label="$t('货柜状态')">
{{boxBackVO.shipmentStatusText}}
</el-descriptions-item>
</el-descriptions>
<div v-if="approvalInfo.applyReason">
<h1>{{$t('申请原因')}}</h1>
<div>
{{approvalInfo.applyReason}}
</div>
</div>
<el-table :data="loadDetail.sectionOrderList" border class="mt-10">
<el-table-column prop="orderNo" :label="$t('订单号')" align="center">
<template v-slot="{row}">
<el-button type="text" @click="jumpOrderDetail(row)">{{row.orderNo}}</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('货物信息')" align="center" width="500px">
<template v-slot="{row}">
<section>
<div v-for="(item, index) in row.goodsList" :key="index">
<div>{{index+1}}{{$l(item, 'prodTitle')}}</div>
</div>
</section>
</template>
</el-table-column>
<el-table-column :label="$t('收费箱数')" align="center" prop="num"></el-table-column>
<el-table-column :label="$t('收费体积')" align="center" prop="chargeVolume"></el-table-column>
<el-table-column :label="$t('收费重量')" align="center" prop="chargeWeight"></el-table-column>
<el-table-column :label="$t('加价金额')" align="center">
<template slot-scope="{row}" v-if="details">
<div>
{{$t('运费')}}{{details.freightFee || 0}}{{ currencyMap[details.freightCurrencyId]}}/{{unitMap[details.freightUnitId]}}
</div>
<div>
{{$t('清关费')}}{{details.clearanceFee || 0}}{{ currencyMap[details.clearanceCurrencyId]}}/{{unitMap[details.clearanceUnitId]}}
</div>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { approvalDetail } from "@/api/ecw/box";
import { getSeaStatus, getTotlContent } from "../shippingSea/utils";
import { getCabinetPage } from "@/api/ecw/cabinet";
import { getChannelList } from "@/api/ecw/channel";
import Decimal from "decimal.js";
import Template from "@/views/cms/template/index.vue";
import {getUnitList} from "@/api/ecw/unit";
import {getCurrencyList} from "@/api/ecw/currency";
/**
* 批量加价审核详情
*/
export default {
name: "BatchMakeUpDetail",
components: {Template},
props: {
processId: {
type: [Number, String],
},
type: String,
},
data() {
return {
unitList:[],
currencyList:[],
approvalInfo: {},
boxBackVO: {},
loadDetail: {},
// 柜型
cabinetLabel: "",
//渠道
channelList: [],
// 弹出配置
dialogConfig: {
title: "",
visible: false,
},
srcStrs: [],
};
},
created() {
getUnitList().then(res => this.unitList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getChannelList().then((res) => (this.channelList = res.data));
},
methods: {
getTotlContent,
/* 获取详情 */
getApprovalDetail(processId) {
approvalDetail({ approvalId: processId }).then((res) => {
this.approvalInfo = res.data.approvalInfo;
this.boxBackVO = res.data.boxBackVO;
this.loadDetail = res.data.loadDetail;
});
},
/* 获取柜型 */
getCabinetLabel(cabinetId) {
getCabinetPage(null).then((response) => {
const cabinetList = response.data.list;
for (const cabinetItem of cabinetList) {
if (cabinetItem.id == cabinetId) {
this.cabinetLabel = cabinetItem.name;
break;
}
}
});
},
/* 合计 */
calcSum(goodsList) {
let sum = 0;
goodsList.forEach((element) => {
sum = Decimal.add(sum, element.num).toNumber();
});
return sum;
},
/* 跳转订单详情 */
jumpOrderDetail(row) {
this.$router.push("/order/detail?orderId=" + row.orderId);
},
},
watch: {
processId: {
immediate: true,
handler(val) {
this.getApprovalDetail(val);
},
},
boxBackVO(val) {
// 柜型
this.getCabinetLabel(val.cabinetId);
},
},
computed: {
/* 渠道 */
getShipChannelName() {
return (shippingChannelId) => {
for (const channelItem of this.channelList) {
if (channelItem.channelId == shippingChannelId) {
return this.$l(channelItem, "name");
}
}
};
},
/* 体积重量 */
getVolumeWeight() {
return (total) => {
return this.getTotlContent(total);
};
},
/* 是否显示卸柜箱数 */
isShowColumn() {
return (shippingVO) => {
return getSeaStatus(shippingVO) >= 182 ? true : false;
};
},
details(){
if(!this.approvalInfo) return null
return JSON.parse(this.approvalInfo?.details)
},
currencyMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = this.$l(item, 'title')
})
return map
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = this.$l(item, 'title')
})
return map
},
},
};
</script>
<style lang="scss" scoped>
.el-image {
border-radius: 5px;
background-color: #ebeef5;
box-shadow: 0 0 5px 1px #ccc;
::v-deep .el-image__inner {
transition: all 0.3s;
cursor: pointer;
&:hover {
transform: scale(1.2);
}
}
::v-deep .image-slot {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
color: #909399;
font-size: 30px;
}
}
</style>
......@@ -118,7 +118,7 @@
<el-dropdown-item command="error">{{$t('异常登记')}}</el-dropdown-item>
<el-dropdown-item command="cost">{{$t('费用登记')}}</el-dropdown-item>
<el-dropdown-item command="batchMarkup">{{$t('批量加价')}}</el-dropdown-item>
<el-dropdown-item :disabled="scope.row.ldStatus<46" command="editLadingBill">{{$t('编辑提货单')}}</el-dropdown-item>
<el-dropdown-item :disabled="scope.row.prStatus<25" command="editLadingBill">{{$t('编辑提货单')}}</el-dropdown-item>
<!-- <el-dropdown-item command="delete">{{$t('删除')}}</el-dropdown-item>-->
</el-dropdown-menu>
......
......@@ -494,7 +494,7 @@ export default {
break;
case "router":
this.$router.push("/boxSea/shippingSea/" + this.shipmentId);
this.$router.push("/boxAir/shippingAir/" + this.shipmentId);
break;
case "cost":
......
......@@ -70,7 +70,7 @@
{{getCheckExamineStatus}}
</el-form-item>
</el-form-item>
<el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1">
<el-form-item v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 1 && shipmentObj.overMachineExamineStatus == 0 && (typeof cusDeclarationObj.id != 'undefined')">
<el-button type="primary" @click="approvalCreate">{{$t('提交删单退场审核')}}</el-button>
</el-form-item>
<el-form-item prop="weightMisreport" v-show="cusDeclarationObj.overMachineStatus == 2 && cusDeclarationObj.overMachineAbnormalStatus == 2">
......@@ -106,11 +106,8 @@
</el-form-item>
</el-form>
<el-row class="operate-button" v-if="inReview">
<el-button type="primary" @click="jumpReviewDetail">{{cusDeclarationObj.dcCheckStatus === '1' ? $t('全部退场审核中') : $t('部分退场审核中')}}</el-button>
<el-button type="primary" plain @click="canclAudit">{{cusDeclarationObj.dcCheckStatus === '1' ? $t('取消全部退场审核') : $t('取消部分退场审核')}}</el-button>
</el-row>
<el-row class="operate-button">
<el-button type="primary" v-if="inReview" plain @click="canclAudit">{{$t('取消删单退场审核')}}</el-button>
<el-button type="primary" @click="onSubmit(1)" :disabled="isCheckDeal('submit')">{{$t('保存')}}</el-button>
<el-button type="success" v-if="!inReview" @click="onSubmit(2)" :disabled="isCheckDeal('submit')">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
......@@ -291,11 +288,16 @@ export default {
]);
oldData.overDealUser = this.strToArray(oldData.overDealUser)
oldData.overOrders = this.strToArray(oldData.overOrders)
this.cusDeclarationObj = oldData;
if(this.shipmentObj.overMachineExamineStatus == 1){
this.$set(this.cusDeclarationObj, "overMachineStatus", 2)
this.$set(this.cusDeclarationObj, "overMachineAbnormalStatus", 1)
}
},
methods: {
strToArray(str) {
if(str == 0) return []
if(!str) return []
let array = str?.split(",") ?? []
return array.map(item=>{return Number(item)})
},
......@@ -373,10 +375,9 @@ export default {
approvalCreate({
shipmentId: this.shipmentObj.id,
approvalStatus: 0,
approvalType: 10
approvalType: 11
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel("submit");
});
});
},
......@@ -403,18 +404,18 @@ export default {
}
// 3.查验状态,查验后放行 直接提交
if (dcCheckStatus === "3") {
const { checkExamineStatus } = this.shipmentObj;
const { overMachineExamineStatus } = this.shipmentObj;
// 没有退场审核中的状态
if (checkExamineStatus !== 1) {
if (overMachineExamineStatus !== 1) {
this.submitCustomsCreate(operateType);
return;
}
}
// 4.查验状态,退场/部分退场 提示
if (["1", "2"].includes(dcCheckStatus)) {
const { checkExamineStatus } = this.shipmentObj;
const { overMachineExamineStatus } = this.shipmentObj;
// 退场审核状态,1-审核中,2-审核成功,3-审核失败,4-取消
if ([0, 2, 3, 4].includes(checkExamineStatus)) {
if ([0, 2, 3, 4].includes(overMachineExamineStatus)) {
this.$modal
.confirm(this.$t(
`您确认提交${
......@@ -562,9 +563,10 @@ export default {
},
/* 取消审核 */
canclAudit() {
console.log(this.shipmentObj)
approvalCancel({
applyReason: this.$t("取消审核"),
id: this.shipmentObj["customsApprovalInfo"].id,
id: this.shipmentObj["customsDeleteExitApprovalInfo"].id,
shipmentId: this.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
......@@ -576,11 +578,11 @@ export default {
},
/* 判断查验选择是否禁用 */
disabledRadio(item) {
const { checkExamineStatus, checkDealStatus, customsInfo } =
const { overMachineExamineStatus, checkDealStatus, customsInfo } =
this.shipmentObj;
const { dcCheckStatus } = customsInfo ?? {}; // 部分退场状态并且审核通过,退场不可选择
if (
checkExamineStatus === 2 &&
overMachineExamineStatus === 2 &&
dcCheckStatus === 2 &&
checkDealStatus === 0 &&
item.value === "1"
......@@ -631,8 +633,8 @@ export default {
immediate: true,
handler: function (val) {
// 监听查验状态变化
let { checkExamineStatus } = val;
if (checkExamineStatus === 1) {
let { overMachineExamineStatus } = val;
if (overMachineExamineStatus === 1) {
// 按钮变成审核中
this.inReview = true;
}
......@@ -657,15 +659,15 @@ export default {
computed: {
/* 获取报关审核退场状态文字 */
getCheckExamineStatus() {
const { checkExamineStatus, checkDealStatus, customsInfo } =
const { overMachineExamineStatus, checkDealStatus, customsInfo } =
this.shipmentObj;
const { dcCheckStatus } = customsInfo ?? {};
if (checkExamineStatus === 1) {
if (overMachineExamineStatus === 1) {
return dcCheckStatus === 1
? this.$t("退场审核中")
: this.$t("部分退场审核中");
}
if (checkExamineStatus === 2 && checkDealStatus === 0) {
if (overMachineExamineStatus === 2 && checkDealStatus === 0) {
return dcCheckStatus === 1
? this.$t("审核通过,退场中")
: this.$t("审核通过,部分退场中");
......@@ -675,7 +677,7 @@ export default {
/* 判断是否已处理 */
isCheckDeal() {
return (type) => {
const { checkExamineStatus, checkDealStatus, customsInfo } =
const { overMachineExamineStatus, checkDealStatus, customsInfo } =
this.shipmentObj;
const { dcCheckStatus } = customsInfo ?? {};
......@@ -683,7 +685,7 @@ export default {
if (type === "status") {
// 退场/部分退场 审核通过未处理,禁用
if (
checkExamineStatus === 2 &&
overMachineExamineStatus === 2 &&
[1, 2].includes(dcCheckStatus) &&
checkDealStatus === 0
) {
......@@ -696,7 +698,7 @@ export default {
// 退场 审核通过未处理,禁用
// 部分退场 审核通过未处理,由 disabledRadio 方法判断
if (
checkExamineStatus === 2 &&
overMachineExamineStatus === 2 &&
[1].includes(dcCheckStatus) &&
checkDealStatus === 0
) {
......@@ -708,7 +710,7 @@ export default {
if (type === "submit") {
const { dcCheckStatus: newCheckStatus } = this.cusDeclarationObj;
// 退场/部分退场 审核通过未处理
if (checkExamineStatus === 2 && checkDealStatus === 0) {
if (overMachineExamineStatus === 2 && checkDealStatus === 0) {
// 退场,禁用
if (dcCheckStatus === 1) return true;
// 部分退场
......
......@@ -122,7 +122,7 @@
</div>
</el-dialog>
<!-- 打印标签 -->
<el-dialog :title="$t('集运封箱标签')" :visible.sync="printdialogVisible" width="300px" :modal-append-to-body="false" append-to-body>
<el-dialog :title="$t('集运封箱标签')" :visible.sync="printdialogVisible" width="350px" :modal-append-to-body="false" append-to-body>
<print-tag v-if="printdialogVisible" :tagData="tagData" />
</el-dialog>
</el-row>
......
......@@ -64,7 +64,7 @@
</template>
</el-table-column>
<el-table-column :label="$t('实装箱数')" align="center" prop="installNum" />
<el-table-column :label="$t('卸柜箱数')" align="center" prop="unloadNum" />
<el-table-column :label="$t('到仓箱数')" align="center" prop="unloadNum" />
<el-table-column :label="$t('清关状态')" align="center" prop="">
<template slot-scope="scope">{{clearStatus(scope.row)}}</template>
</el-table-column>
......@@ -106,7 +106,7 @@
</div>
<div class="label-font">
<p>
<span>{{$t('已卸')}}:</span>
<span>{{$t('到仓')}}:</span>
<span>{{getUnLoadNumCount}}</span>
</p>
</div>
......@@ -263,16 +263,21 @@ export default {
},
/** 提交 */
onSubmit() {
approvalCreate({
shipmentId: this.$attrs.shipmentObj.id,
approvalStatus: 0,
approvalType: 3, // 卸柜
copyUserId: this.selectedUsers,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
if(this.getUnLoadNumCount>0){
approvalCreate({
shipmentId: this.$attrs.shipmentObj.id,
approvalStatus: 0,
approvalType: 3, // 卸柜
copyUserId: this.selectedUsers,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.cancel();
});
});
});
}else{
this.$message.error(this.$t("货物到仓数小于实装数,请确认"));
}
},
/** 取消 */
cancel() {
......
......@@ -59,7 +59,7 @@
<el-table-column :label="$t('发布人') + '/' + $t('发布时间')" align="center" prop="startTime" width="180">
<template slot-scope="scope">
<div>{{ scope.row.creatorName }}</div>
<div>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</div>
<div>{{ parseTime(scope.row.createTime) }}</div>
</template>
</el-table-column>
<el-table-column :label="$t('开始时间')" align="center" prop="startTime" width="180">
......@@ -73,7 +73,7 @@
<div v-if="row.overdueStatus == 0" style="color: red">{{ $t('已过期') }}</div>
</template>
</el-table-column>
<!--
<!--
<el-table-column :label="$t('创建时间')" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
......@@ -82,7 +82,7 @@
<el-table-column :label="$t('更新人') + '/' + $t('更新时间')" align="center" width="180">
<template slot-scope="scope">
<div>{{ scope.row.updaterName }}</div>
<div>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</div>
<div>{{ parseTime(scope.row.updateTime)}}</div>
</template>
</el-table-column>
<el-table-column :label="$t('状态')" align="center" prop="createTime" width="180">
......@@ -108,7 +108,7 @@
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<el-dialog :title="$t('延期活动时间')" :visible="!!updateEndtimeItem" :before-close="() => updateEndtimeItem=null">
<div v-if="updateEndtimeItem">
{{$t('优惠活动“{name}”的当前结束时间:{time}',{
......@@ -312,4 +312,4 @@ export default {
}
}
};
</script>
\ No newline at end of file
</script>
<template>
<div>
<el-dialog :title="$t('新建潜在客户信息')" :visible.sync="dialogTableVisible">
<el-form ref="form" :rules="rules" :model="form" label-width="100px" style="padding: 0 20px;">
<el-form-item prop="name" :label="$t('客户姓名')">
<el-input v-model="form.name" :placeholder="$t('请输入客户姓名')"></el-input>
</el-form-item>
<el-form-item required :label="$t('联系方式')" >
<el-row :gutter="20">
<el-col :span="4" >
<el-form-item prop="customerContacts[0].areaCode" >
<area-code-selector v-model="form.customerContacts['0'].areaCode" />
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item prop="customerContacts[0].phoneNew">
<el-input style="width:100%;" v-model="form.customerContacts[0].phoneNew" maxlength="11" :placeholder="$t('请输入联系方式')" />
</el-form-item>
</el-col>
</el-row>
</el-form-item>
<el-form-item prop="source" :label="$t('客户来源')">
<el-select v-model="form.source" :placeholder="$t('请选择客户来源')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
<el-form-item :label="$t('客户类别')" prop="type" >
<dict-selector v-model="form.type" :type="DICT_TYPE.CUSTOMER_TYPE" form-type="checkbox" multiple ></dict-selector>
</el-form-item>
<el-form-item :label="$t('客户经理')" >
<el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')">
<el-option v-for="item in serviceUserList"
:key="item.id" :label="item.nickname" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('公司名称')">
<el-input v-model="form.company" ></el-input>
</el-form-item>
<el-form-item :label="$t('公司英文名称')">
<el-input v-model="form.companyEn" ></el-input>
</el-form-item>
<el-form-item :label="$t('主营类别')" prop="productType">
<el-row :gutter="10">
<el-col :span="11">
<el-select v-model="form.productType" style="width: 100%" @change="getProductListFn" :placeholder="$t('请选择产品类别')" >
<el-option :label="item.titleZh" :value="item.id" v-for="(item) in productTypeList" :key="item.id"/>
</el-select>
</el-col>
<el-col :span="11">
<el-select v-model="form.productId" style="width: 100%" :placeholder="$t('请选择')">
<el-option :label="item.titleZh" :value="parseInt(item.id)" v-for="(item) in productList" :key="item.id"/>
</el-select>
</el-col>
</el-row>
</el-form-item>
<el-form-item :label="$t('询盘信息')" >
<el-input
v-model="form.inquiry"
type="textarea"
:rows="3"
:placeholder="$t('请输入内容')">
</el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogTableVisible = false">{{$t('取 消')}}</el-button>
<el-button type="primary" @click="submit">{{$t('确 定')}}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import AreaCodeSelector from "@/components/AreaCodeSelector/index.vue";
import {listServiceUser} from "@/api/system/user";
import {getProductTypeList} from "@/api/ecw/productType";
import {getProductList} from "@/api/ecw/product";
import {createPotential} from "@/api/ecw/customer";
export default {
name: "addPotentialCustom",
methods: {
getDictDatas,
getProductListFn(val){
getProductList({typeId:val}).then(r => {
this.productList = r.data
})
},
reset(){
this.form = {
name:undefined,
customerContacts:[{areaCode:undefined,phoneNew:undefined,name:undefined,isDefault: 1}],
source:undefined,
type:[],
customerService:undefined,
company:undefined,
companyEn:undefined,
inquiry:undefined,
productType:undefined,
productId:undefined,
}
},
submit(){
this.$refs.form.validate((valId)=>{
if (valId){
let p = {...this.form}
p.type = p.type.join(',')
p.customerContacts[0].name = p.name + p.customerContacts[0].phoneNew
createPotential(p).then(r => {
if(r.code === 0){
this.$emit('change');
this.dialogTableVisible = false;
this.$message(this.$t('创建成功'));
}
})
}
})
},
},
components: {AreaCodeSelector},
created() {
this.reset()
listServiceUser().then(r => {
this.serviceUserList = r.data
})
getProductTypeList().then(r => {
this.productTypeList = r.data
})
},
computed: {
DICT_TYPE() {
return DICT_TYPE
},
rules(){
return {
name:{ required:true,message:this.$t('请输入名称'),target:'blur' },
customerContacts:[{areaCode:{required:true,message:this.$t('请输入区号。'),target:'blur'},phoneNew:{required:true,message:this.$t('请输入电话号码。'),target:'blur'} },],
type:{ type:'array', message:this.$t('请输入客户类别。'), required:true, target:['blur','change']},
source:{message:this.$t('前请输入客户来源'),required:true,target:'change',type:'number'}
}
}
},
data(){
return {
dialogTableVisible:false,
serviceUserList:[],
productTypeList:[],
productList:[],
form:{}
}
},
}
</script>
<style scoped>
</style>
<template>
<div style="display: inline-block">
<span @click="visible = true"> <slot></slot></span>
<el-dialog title="更多联系人" :visible.sync="visible">
<div v-if="info">
<div style="text-align: center;margin-bottom: 20px;" v-for="(item, index) in info" :key="index">
联系人{{index + 1}}{{$l('name', item)}}联系方式{{index + 1}}:+{{item.areaCode}} {{item.phoneNew}}<br/>
邮箱:{{item.email}}
</div>
</div>
<div v-else>
暂无数据
</div>
</el-dialog>
</div>
</template>
<script>
import {getCustomerContacts, getCustomerContactsListByCustomer} from "@/api/ecw/customerContacts";
export default {
name: "contacts",
props:{
id:[Number]
},
data(){
return {
visible:false,
info:null,
}
},
methods:{
getCustomerContactsFn() {
getCustomerContactsListByCustomer({customerId: this.id}).then(r => {
console.log(r,'rrr')
this.info = r.data
})
}
},
watch:{
visible(val){
if(val){
this.getCustomerContactsFn()
}
}
}
}
</script>
<style scoped>
</style>
<template>
<div>
<div v-for="(item, index) in info.customerHandoverDetailDtoList">
<div style="color: blue"> 客户编号{{index + 1}}{{item.customerNumber}} 客户名称{{index + 1}}{{item.customerName}} </div>
<div>就客户经理{{index + 1}}{{item.oldCustomerServiceName || '-'}} <span v-if="item.oldCustomerServiceDeptName">{{item.oldCustomerServiceDeptName}}</span></div>
</div>
<div style="color: blue">新客户经理:{{info.newCustomerServiceName || '-'}} <span v-if="info.newCustomerServiceDeptName">{{info.newCustomerServiceDeptName}}</span> </div>
<div>
申请理由:{{info.reason}}
</div>
</div>
</template>
<script>
import { handoverApprovalDetails} from "@/api/ecw/customer";
export default {
name: "customer-handover-details",
props: {
processId: {
type: [Number, String],
},
type: String,
},
data(){
return {
info:{
customerHandoverDetailDtoList:[]
}
}
},
mounted() {
this.handoverApprovalFn()
},
methods:{
handoverApprovalFn(){
handoverApprovalDetails({approvalId:this.processId}).then(r =>{
this.info =r.data
})
}
}
}
</script>
<style scoped>
</style>
......@@ -29,7 +29,7 @@ export default {
},
computed:{
getCustomerList(){
let index = this.customerList.findIndex(item => item.id !== this.recommended[0])
let index = this.customerList.findIndex(item => item.id === this.recommended[0]?.id)
if(index > -1) return this.customerList
else return [...this.customerList,...this.recommended]
}
......@@ -50,7 +50,6 @@ export default {
},
watch:{
value(val){
console.log(val,'val')
this.customer = val;
if(!(this.customerList.some(i => i.id === val)) && val !== undefined){
getCustomerList({ids:val}).then(r => {
......
......@@ -45,7 +45,7 @@
<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>-->
<el-checkbox-group v-model="form.transportType">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE)" :key="item.value" :label="item.value" :disabled="item.value == 4">{{item.label}}</el-checkbox>
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE)" :key="item.value" :label="item.value" :disabled="[3,4].includes(+item.value)">{{item.label}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
......@@ -60,7 +60,7 @@
<!-- </el-form-item>-->
<el-form-item :label="$t('常用提货网点')" prop="remarks">
<el-select v-model="form.pickupPoint">
<el-option v-for="item in serviceNetworkList " :value="item.id" :label="isChinese ? item.titleZh : item.titleEn "></el-option>
<el-option v-for="item in getNodeLists " :value="item.id" :label="isChinese ? item.titleZh : item.titleEn "></el-option>
</el-select>
</el-form-item>
</el-col>
......@@ -98,13 +98,13 @@
<el-form-item :label="$t('主营类别')" prop="productType">
<el-row :gutter="10">
<el-col :span="11">
<el-select v-model="form.productType" :placeholder="$t('请选择产品类别')" @change="form.productId = ''">
<el-select @change="change" v-model="form.productType" :placeholder="$t('请选择产品类别')">
<el-option :label="item.titleZh" :value="item.id" v-for="(item) in productTypeList" :key="item.id"/>
</el-select>
</el-col>
<el-col :span="11">
<el-select v-model="form.productId" :placeholder="$t('请选择')">
<el-option :label="item.titleZh" :value="parseInt(item.id)" v-for="(item) in productListFilter" :key="item.id"/>
<el-option :label="item.titleZh" :value="parseInt(item.id)" v-for="(item) in productList" :key="item.id"/>
</el-select>
</el-col>
</el-row>
......@@ -193,7 +193,11 @@
<el-switch v-model="form.isShowTidanPrice"></el-switch>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('询盘信息')">
<el-input show-word-limit v-model="form.inquiry" :rows="3" type="textarea" :maxlength="500"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item :label="$t('到仓确认')" prop="arrivalConfirm">
<el-switch v-model="form.arrivalConfirm" :active-value="1" :inactive-value="0" />
......@@ -358,12 +362,17 @@
</template>
</el-table-column>
<el-table-column
width="260px"
prop="email"
:label="$t('邮箱')"
>
<template v-slot="{row}">
<el-form-item label="">
<el-input v-model="row.email" :placeholder="$t('请输入邮箱')" size="mini"/>
<el-form-item v-for="(item, index) in row.email" :key="index" label="">
<div style="display: flex;align-items: center;">
<el-input v-model="row.email[index]" :placeholder="$t('请输入邮箱')" 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>
</el-form-item>
</template>
</el-table-column>
......@@ -592,19 +601,19 @@ export default {
this.getCustomer(this.customerId).then(() => {
getCustomerContactsListByCustomer({customerId: customerId}).then(r => {
this.form.customerContacts = r.data
let list = this.form.customerContacts.map(item => item.userid);
if(list.length >0){
memberUserList({ids:list.join(',')}).then(r=>{
this.selectMemberList = r.data
})
}
if(this.form.promoter){
getCustomerList({ids:this.form.promoter}).then(r => {
this.recommended = r.data;
})
}
this.form.customerContacts.forEach(item => {
if(item.email){
item.email = item.email.split(',')
}else {
item.email = [""]
}
})
})
if(this.form.promoter){
getCustomerList({ids:this.form.promoter}).then(r => {
this.recommended = r.data;
})
}
// 打开重泡货开关
if(this.form.weightUnit){
this.showZhong = true
......@@ -634,14 +643,12 @@ export default {
}
getNodeList().then(r => {
this.nodeList = r.data
this.getNodeLists = r.data
})
getProductTypeList().then(r => {
this.productTypeList = r.data
})
getProductList().then(r => {
this.productList = r.data
})
getTradeCityList({type: 1}).then(r => {
this.importCityList = r.data.filter(item => item.type === '1')
})
......@@ -657,13 +664,10 @@ export default {
getCountryListAll().then(r => {
this.countryList = r.data
})
// 获取服务网点
getServiceNetwork().then(r =>{
this.serviceNetworkList = r.data
})
},
data(){
return {
getNodeLists:[],
isCustomerServiceConfirmed:false,
getDictDatas,
DICT_TYPE,
......@@ -718,6 +722,21 @@ export default {
},
methods: {
addEmail(row){
row.push('')
},
deleteEmail(row, index){
row.splice(index, 1)
},
change(val){
this.form.productId = '';
this.getProductListFn(val);
},
getProductListFn(val){
getProductList({typeId:val}).then(r => {
this.productList = r.data
})
},
deleteBankData(index){
this.form.customerBanks.splice(index, 1);
},
......@@ -842,7 +861,10 @@ export default {
}
this.updateCustomerLines()
const form = {...this.form, type: this.form.type?.join(','), transportType: (this.form.transportType || [])?.join(','), taxRate: Number(this.form.taxRate)}
form.customerContacts = JSON.parse(JSON.stringify(this.form.customerContacts))
form.customerContacts.forEach(e =>{
e.email = [...e.email].join(',')
})
// 检查路线是否启用了但是没选择目的仓
let errors = 0
form.customerLines.forEach(line => {
......@@ -896,6 +918,7 @@ export default {
/** 表单重置 */
reset() {
this.form = {
inquiry:undefined,
id: undefined,
number: undefined,
name: undefined,
......@@ -949,6 +972,11 @@ export default {
return getCustomer(id).then(response => {
console.log(response,'response')
this.form = { ...this.form, ...response.data, id: this.customerId,transportType: response.data.transportType && response.data.transportType !== '' ? response.data.transportType.split(',') : [],customerBanks:response.data.customerBankBackVOList };
if(this.form.productType){
console.log('1231',this.form.productType)
this.getProductListFn(this.form.productType)
}
this.open = true;
this.title = this.$t('修改客户');
this.getZhongPao()
......@@ -969,7 +997,7 @@ export default {
"areaCode": "",
// "customerId": 0,q
"department": "",
"email": "",
"email": [''],
"isDefault": this.form.customerContacts.length === 0 ? 1 : 0,
"name": "",
"phoneNew": "",
......
......@@ -68,7 +68,8 @@
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
<el-button v-if="path === '/customer/potential'" type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddPotential">{{$t('新增潜在客户')}}</el-button>
<el-button v-else type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="[ selectAuthorityFn('ecw:customer:create')]">{{$t('新增')}}</el-button>
</el-col>
<el-col :span="1.5" >
......@@ -87,6 +88,16 @@
<el-button :disabled="!selectCustomerList.length" @click="setChangeCustomerAir(false)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"
v-hasPermi="['ecw:customer:transport']">{{$t('设为非空运客户')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['ecw:customer:fcl']" :disabled="!selectCustomerList.length" @click="setFullContainerLoad(true)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading">{{$t('设置海运整柜客户')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-hasPermi="['ecw:customer:create-potential']" :disabled="!selectCustomerList.length" @click="setFullContainerLoad(false)" v-if="$route.path === '/customer/customer'" type="primary" plain size="mini" :loading="exportLoading"
>{{$t('设置海运非整柜客户')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button v-has-permi="['ecw:customer:fcl-mistake']" v-if="path === '/customer/customer'" type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddPotential">{{$t('新增潜在客户')}}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -124,7 +135,10 @@
<el-table-column :label="$t('主联系人')" prop="defaultContactName"></el-table-column>
<el-table-column :label="$t('主联系方式')" prop="defaultContactPhone">
<template v-slot="{row}">
+{{row.defaultContactPhone}}
+{{row.defaultContactPhone}} <br/>
<contacts :id="row.id" >
<el-button v-if="$route.path === '/customer/customer'" type="text">更多</el-button>
</contacts>
</template>
</el-table-column>
<el-table-column :label="$t('创建时间')" align="center" prop="createTime" width="180">
......@@ -512,13 +526,24 @@
<customer-follow-list :customer-id="customerId" :id="customerId" ref="CustomerFollowList"></customer-follow-list>
<customer-complaints :customer-id="customerId" ref="customerComplaints"></customer-complaints>
<transfer-customer :show.sync="transferShow" :customer-ids.sync="selectCustomerList"></transfer-customer>
<add-potential-custom ref="potentialCustom" @change="getList" ></add-potential-custom>
</div>
</template>
<script>
import {
createCustomer, updateCustomer, deleteCustomer, getCustomer,
getCustomerPage, exportCustomerExcel, testEnterToOpenSea, getCustomerDeptPage, changeCustomerAir
createCustomer,
updateCustomer,
deleteCustomer,
getCustomer,
getCustomerPage,
exportCustomerExcel,
testEnterToOpenSea,
getCustomerDeptPage,
changeCustomerAir,
getPotential,
setChangeCustomerFcl
} from "@/api/ecw/customer";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import {CommonStatusEnum} from '@/utils/constants'
......@@ -533,10 +558,14 @@ import { getCountryListAll } from '@/api/ecw/country'
import {getCreditPage} from "@/api/customer/credit";
import transferCustomer from "@/views/ecw/customer/transferCustomer";
import Template from "@/views/cms/template/index.vue";
import AddPotentialCustom from "@/views/ecw/customer/addPotentialCustom.vue";
import Contacts from "@/views/ecw/customer/components/contacts.vue";
export default {
name: "EcwCustomerIndex",
components: {
Contacts,
AddPotentialCustom,
Template,
upload,
CustomerFollowList,
......@@ -604,6 +633,9 @@ export default {
};
},
computed:{
path(){
return this.$route.path
},
channel(){
return (val)=>{
return !!val ? this.getDictDatas(this.DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE).filter(i => (val.split(',') || []).includes(i.value)).map(i => this.isChinese ? i.label : i.labelEn ).join('') :''
......@@ -642,9 +674,6 @@ export default {
this.creditList = r.data.list
})
this.getList();
// getNodeList().then(r => {
// this.nodeList = r.data
// })
listServiceUser().then(r=>{
this.customerServiceList = r.data;
})
......@@ -656,6 +685,19 @@ export default {
this.getList();
},
methods: {
// 设置整柜
setFullContainerLoad(isFcl){
setChangeCustomerFcl({
"customerIdList": this.selectCustomerList,
isFcl
}).then(r =>{
if(r.code === 0){
this.$message.success(isFcl ? '设置客户为海运整柜成功!' : '设置客户为非海运整柜成功!')
this.selectCustomerList = []
this.getList()
}
})
},
// 设置空运客户
setChangeCustomerAir(isAir){
changeCustomerAir({
......@@ -709,6 +751,9 @@ export default {
case '/customer/department-customers':
getCustomerDeptPage(params).then(this.setData);
break;
case '/customer/potential':
getPotential(params).then(this.setData)
break;
}
},
......@@ -719,6 +764,10 @@ export default {
// this.open = true;
// this.title = this.$t("添加客户");
},
// 新增潜在客户
handleAddPotential(){
this.$refs.potentialCustom.dialogTableVisible = true;
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
......
......@@ -7,8 +7,8 @@
<div>
<el-button type="primary" size="small" v-has-permi="['ecw:customer:query-edit']" @click="$router.push('/customer/edit/' + id)">{{$t('编辑')}}</el-button>
<el-button v-has-permi="['ecw:customer:query-quoted-price']" @click="$router.push('/offer/create')" type="primary" size="small">{{$t('报价')}}</el-button>
<el-button v-has-permi="['ecw:customer:query-follow-up']" type="primary" size="small" @click="$refs['customerFollow'].customerFollow.dialogVisible = true">{{$t('跟进')}}</el-button>
<el-button v-has-permi="['ecw:customer:query-customer-complaint']" type="primary" size="small" @click="$refs['customerComplaint'].handleAdd()">{{$t('客诉')}}</el-button>
<el-button v-has-permi="['ecw:customer:query-follow-up']" type="primary" size="small" @click="customerFollowFn('follow')">{{$t('跟进')}}</el-button>
<el-button v-has-permi="['ecw:customer:query-customer-complaint']" type="primary" size="small" @click="customerFollowFn('complain')">{{$t('客诉')}}</el-button>
<el-button v-hasPermi="['ecw:customer:query-delete']" type="danger" size="small" @click="deleteCustomerFn()">{{$t('删除')}}</el-button>
</div>
</div>
......@@ -29,7 +29,7 @@
<el-descriptions-item :label="$t('客户等级')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}</el-descriptions-item>
<el-descriptions-item :label="$t('信用等级')">{{isChinese ? customer.creditLevelNameZh :customer.creditLevelNameEn }}</el-descriptions-item>
<el-descriptions-item :label="$t('国家')">{{ isChinese ? country.nameZh : country.nameEn }}</el-descriptions-item>
<el-descriptions-item :label="$t('国家')">{{$l(customer,'countryName')}}{{customer.countryName}}</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('业务员')">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item :label="$t('客户来源')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_SOURCE, customer.source) }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户类别')">
......@@ -37,17 +37,19 @@
</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('联系方式')">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item :label="$t('推介人')">{{ customer.promoterName }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户经理')">{{customerService }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户经理')">{{customer.customerServiceName }}</el-descriptions-item>
<el-descriptions-item :label="$t('公司名称')">{{ customer.company }}</el-descriptions-item>
<el-descriptions-item :label="$t('公司英文名称')">{{ customer.companyEn }}</el-descriptions-item>
<el-descriptions-item :label="$t('联系地址')">{{ customer.address }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">{{ parseTime(customer.createTime) }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建人')">{{ customer.founderName }}</el-descriptions-item>
<el-descriptions-item :label="$t('状态')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_STATUS, customer.status) }}</el-descriptions-item>
<el-descriptions-item :label="$t('主营类别')">{{ productType }}</el-descriptions-item>
<el-descriptions-item :label="$t('常提货网点')">{{ pickupPoint }}</el-descriptions-item>
<el-descriptions-item :label="$t('状态')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_STATUS, customer.status)}}</el-descriptions-item>
<el-descriptions-item :label="$t('主营类别')">{{ $l(customer,'productTypeName') }}</el-descriptions-item>
<el-descriptions-item :label="$t('常提货网点')">{{ $l(customer,'pickupPointName') }}</el-descriptions-item>
<el-descriptions-item :label="$t('图片')">
<el-image v-show="!!customer.picture" :src="customer.picture" style="width: 100px;height: 100px"></el-image>
<el-image v-if="customer.picture" :src="customer.picture" style="width: 100px;height: 100px">
<span slot="error">加载失败</span>
</el-image>
</el-descriptions-item>
<el-descriptions-item :label="$t('备注')">{{ customer.remarks }}</el-descriptions-item>
<el-descriptions-item :label="$t('业绩类型')">{{ customer.isNew ?$t('新客户') : $t('老客户') }}</el-descriptions-item>
......@@ -92,7 +94,7 @@
:label="$t('联系方式')"
>
<template v-slot="{row}">
{{ row.areaCode + row.phoneNew }}
+{{ row.areaCode}} {{row.phoneNew}}
</template>
</el-table-column>
<el-table-column
......@@ -303,10 +305,10 @@
<pagination @pagination="getInfoListOfferPage" :page.sync="infoListOfferFrom.pageNo" :limit.sync="infoListOfferFrom.pageSize" :total="infoListOfferTotal" ></pagination>
</el-tab-pane>
<el-tab-pane name="follow" :label="$t('跟进')">
<customer-follow customerQuery ref="customerFollow" :id="id" :customer-id="id"></customer-follow>
<customer-follow v-if="activeName === 'follow'" customerQuery ref="customerFollow" :id="id" :customer-id="id"></customer-follow>
</el-tab-pane>
<el-tab-pane name="complain" :label="$t('客户投诉')">
<customer-complaint ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint>
<customer-complaint v-if="activeName === 'complain'" ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint>
</el-tab-pane>
<el-tab-pane name="bill" :label="$t('账单')">
<el-table style="width: 100%" :data="infoListReceiptList">
......@@ -529,38 +531,31 @@ export default {
getCreditRulePage({page:1,rows:999,type:2}).then(r => {
this.creditTypeList = r.data.list
})
getNodeList().then(r => {
this.nodeList = r.data
})
// getNodeList().then(r => {
// this.nodeList = r.data
// })
getCustomer(this.id).then(response => {
this.customer = { ...this.customer, ...response.data }
console.log( this.customer,'this.customer')
getCustomerContactsListByCustomer({customerId: this.id}).then(r => {
this.customerContacts = r.data
let list = this.customerContacts.map(r => r.userid)
memberUserList({ids:list.join(',')}).then(r => {
this.memberList = r.data
})
let list = this.customerContacts.filter(r => r.userid)
if(list.length > 0){
memberUserList({ids:list.map(i=>i.userid).join(',')}).then(r => {
this.memberList = r.data
})
}
})
getCountry(this.customer.country ? this.customer.country : 0 ).then(r => {
this.country = r.data
})
})
getProductTypeList().then(r => {
this.productTypeList = r.data
})
getCustomerSelect({pageSize:1000,pageNo:1}).then(r => {
this.customerSelect = r.data.list
})
// getCustomerSelect({pageSize:1000,pageNo:1}).then(r => {
// this.customerSelect = r.data.list
// })
listServiceUser().then(r => {
this.serviceUserList = r.data
})
// this.getBrankByCustomerList()//品牌授权
this.getCustomerGrade()
// this.getCustomerGrade()
// this.creditLogPage()//等级日志
this.getorderList()//订单
// this.getInfoListOfferPage()//报价
......@@ -716,22 +711,16 @@ export default {
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
productType(){
const productType = this.productTypeList.find(p => p.id === parseInt(this.customer.productType))
return productType ? productType.titleZh : ''
},
pickupPoint(){
const pickupPoint = this.nodeList.find(p => p.id === parseInt(this.customer.pickupPoint))
return pickupPoint ? pickupPoint.titleZh : ''
},
promoter() {
return this.customerSelect.find(e => e.id === this.customer.promoter)?.name || ''
},
customerService() {
return this.serviceUserList.find(e => e.id === this.customer.customerService)?.nickname || ''
},
// promoter() {
// return this.customerSelect.find(e => e.id === this.customer.promoter)?.name || ''
// },
id() {
return this.customerId ? parseInt(this.customerId) : undefined
return parseInt(this.$route.params.customerId)
},
creditScoreCalculation(){
return (val)=>{
......@@ -745,6 +734,16 @@ export default {
}
},
methods:{
customerFollowFn(val){
this.activeName = val
this.$nextTick(()=>{
if(val === 'follow'){
this.$refs['customerFollow'].customerFollow.dialogVisible = true;
}else {
this.$refs['customerComplaint'].handleAdd()
}
})
},
checkPermi,
userIdFormatter(row, column, cellValue){
const member = this.memberList.find(e => e.id === cellValue)
......
......@@ -6,8 +6,12 @@
width="30%">
<div style="width: 100%;min-height: 200px;text-align: center">
<el-select filterable v-model="service">
<el-option v-for="(item,index) in customerServiceList" :key="index" :label="item.nickname" :value="item.id"></el-option>
<el-option v-for="(item,index) in customerServiceList" :key="index" :label="item.deptName ? item.nickname + `(${item.deptName})` : item.nickname " :value="item.id"></el-option>
</el-select>
<div style="display: flex;margin-top: 20px;">
<label style="width:100px;" >申请理由</label>
<el-input v-model="textarea" type="textarea"></el-input>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="$emit('update:show',false)" >{{$t('取 消')}}</el-button>
......@@ -18,7 +22,7 @@
<script>
import {listServiceUser} from "@/api/system/user";
import {handOverCustomer} from "@/api/ecw/customer";
import {handoverApproval, handOverCustomer} from "@/api/ecw/customer";
export default {
name: "transferCustomer",
......@@ -37,6 +41,7 @@ export default {
},
computed:{
getCustomerIds(){
console.log(this.customerIds,'this.customerIds')
if(this.customerIds instanceof Array) return this.customerIds
else return this.customerIds.split(',')
}
......@@ -45,6 +50,7 @@ export default {
return {
customerServiceList:[],
service:'',
textarea:''
}
},
methods:{
......@@ -52,13 +58,16 @@ export default {
if(!this.service){
return this.$message.warning(this.$t('请选择客户经理!'));
}
handOverCustomer({
handoverApproval({
customerServiceId:this.service,
customerIdList:this.getCustomerIds
customerIdList:this.getCustomerIds,
reason:this.textarea
}).then(r=>{
if(r.code === 0){
this.$emit('update:show',false)
this.$emit('update:customerIds',[])
this. service = '';
this.textarea = '';
this.$message.success(this.$t('用户批量转移成功!'))
}
})
......
......@@ -416,9 +416,13 @@ export default {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
getCustomerList({ids:this.list.map(i => i.customerId).join(',')}).then(r => {
this.customerSelect = r.data
})
let list = []
list = this.list.filter(i => i.customerId)
if(list.length > 0){
getCustomerList({ids:list.map(i => i.customerId).join(',')}).then(r => {
this.customerSelect = r.data
})
}
});
},
/** 取消按钮 */
......
......@@ -344,7 +344,7 @@
<el-button @click="cancelHandOver">{{$t('取 消')}}</el-button>
</div>
</el-dialog>
<transfer-customer :show.sync="openHandOver" :customer-ids.sync="handOverForm.customerIdList"></transfer-customer>
</div>
</template>
......@@ -363,6 +363,7 @@ import {CommonStatusEnum} from '@/utils/constants'
import {handOverCustomer} from "../../../api/ecw/customer";
import {getCountryListAll} from "@/api/ecw/country";
import {getCreditPage} from "@/api/customer/credit";
import transferCustomer from "@/views/ecw/customer/transferCustomer.vue";
......@@ -380,6 +381,7 @@ export default {
},
},
components: {
transferCustomer
},
data() {
return {
......@@ -570,8 +572,9 @@ export default {
},
/** 修改按钮操作 */
handOver(row) {
this.resetHandOverForm();
// this.resetHandOverForm();
this.openHandOver = true;
this.handOverForm.customerIdList = [row.id];
},
......
......@@ -411,9 +411,10 @@ export default {
},
//分配客服
distribution(row){
this.service = row.customerService;
this.transferData = row;
this.transferShow =true;
// this.service = row.customerService;
// this.transferData = row;
this.selectCustomerList = [row.id]
this.batchTransferShow =true;
},
transferFn(){
if(!this.service){
......
......@@ -102,7 +102,7 @@ import {getUnitList} from "@/api/ecw/unit"
import { getCurrencyList } from '@/api/ecw/currency'
import {getProductAttrList} from '@/api/ecw/productAttr'
import Decimal from 'decimal.js'
import {getExceptionById} from '@/api/ecw/orderException'
import {getExceptionDetailByBusinessId,getOrderExceptionChannelPriceList} from '@/api/ecw/orderException'
export default {
name: 'NotShipingChannel',
......@@ -147,6 +147,7 @@ export default {
}
},
async created(){
await getUnitList().then(res => this.unitList = res.data)
await getCurrencyList().then(res => this.currencyList = res.data)
this.productAttrList = (await getProductAttrList()).data
if(this.id){
......@@ -156,11 +157,12 @@ export default {
methods:{
Decimal,
getData(){
getExceptionById(this.id).then(res => {
getExceptionDetailByBusinessId({businessId:this.id}).then(res => {
this.orderExceptionData = res.data
if(res.data.orderId){
getOrder(res.data.orderId).then(res => {
this.order = res.data
this.getExceptionPriceList(res.data.orderId)
})
}
})
......@@ -182,6 +184,25 @@ export default {
this.channel = res.data
})
},
getExceptionPriceList(orderId){
let that = this
getOrderExceptionChannelPriceList({orderId:orderId,exceptionId:this.orderExceptionData.id,exceptionResultId:parseInt(that.id)}).then(res=>{
if(res.code==0&&res.data.length>0){
that.order.orderItemVOList.map(v=>{
var item = res.data.find(vs=>vs.orderItemId==v.orderItemId)
if(item){
v.oneSeaFreight = item.freightFee
v.seaFreightCurrency = item.freightCurrencyId
v.seaFreightVolume = item.freightUnitId
v.oneClearanceFreight = item.clearanceFee
v.clearanceFreightCurrency = item.clearanceCurrencyId
v.clearanceFreightVolume = item.clearanceUnitId
}
})
}
})
}
}
}
</script>
......
......@@ -48,7 +48,7 @@
<label style="font-weight: 600; font-size: 5.5mm">{{item.destTitleEn}} </label>
</p>
<p style=" padding: 0px; padding-top: 2.7mm; padding-bottom: 2.7mm; padding-left: 3mm; float: left; width: 29%; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; font-size: 4mm; text-transform: uppercase; margin: 0px; " >
LCL
{{item.transportType}}
</p>
<p style=" padding: 0px; padding-top: 2.7mm; padding-bottom: 2.7mm; padding-left: 4mm; float: left; border-left: 0.2mm solid #333; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; margin: 0px; font-size: 5mm; text-transform: uppercase; font-weight: 500; " >
{{item.inTime|parseTime('{y}-{m}-{d}')}}
......@@ -119,7 +119,7 @@ export default {
this.$set(this, 'tags', res.data)
// this.form.start = res.data[0].num
// 起始标签为入仓数 + 1
this.form.start = this.warehouseInNum + 1
this.form.start = (this.warehouseInNum || 0) + 1
this.form.end = res.data[res.data.length-1].num
})
},
......
......@@ -71,7 +71,9 @@
<el-descriptions-item :label="$t('运输方式')" >
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" />
</el-descriptions-item>
<el-descriptions-item v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, order.transportId).cssClass == 'channel'":label="$t('出货渠道')" >{{channelName}}</el-descriptions-item>
<el-descriptions-item v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, order.transportId).cssClass == 'channel'":label="$t('出货渠道')" >
{{order.channelName}}
</el-descriptions-item>
</el-descriptions>
</el-card>
......@@ -404,7 +406,12 @@
</div>
</el-col>
<el-col :span="12" v-if="feeDetail.charging != 1">
<div>{{$t('清关费')}}</div>
<div>
{{$t('清关费')}}
<template v-if="order.transportId == 3 || order.transportId == 4">
{{$t('来自{source}', {source: feeDetail.airClearanceSource + feeDetail.sourceName})}}
</template>
</div>
<div v-for="item in feeDetail.clearance">
{{item.label}}: {{item.value}}
<template v-if="item.currency">
......@@ -506,7 +513,7 @@ export default {
currencyList: [],
unitList:[],
feeList: [],
channelName: '/',
channel: null,
region: '',
orderWarehouseIn: null, // 入仓详情
showWarehouseInItemId: null, // 当前显示的入仓
......@@ -564,7 +571,7 @@ export default {
}
},
'order.channelId'(){
this.getChannel()
// this.getChannel()
},
'order.consigneeVO'(val){
if(!val) return '-'
......@@ -687,7 +694,16 @@ export default {
label: this.$t('价格更新时间'),
value: parseTime(row.updateTime)
})
this.feeDetail = {freight, clearance, charging: row.charging, coupons: row.couponInfoVOList}
this.feeDetail = {
freight,
clearance,
charging:
row.charging,
coupons: row.couponInfoVOList,
airClearanceSource: row.airClearanceSource == 1 ? this.$t('商品') : this.$t('渠道'), // 空运清关费来源:1 商品 2 渠道
airClearanceInfo: JSON.parse(row.airClearanceInfo), //空运清关费来源数据详情,
sourceName: row.airClearanceSource == 1 ? this.$l(row, 'prodTitle') : this.channelName
}
},
closeFeeDetail(){
......@@ -717,12 +733,12 @@ export default {
})
})
}, */
getChannel(){
/*getChannel(){
if(!this.order || !this.order.channelId || this.order.transportId == 1 || this.order.transportId == 2) return
getChannel(this.order.channelId).then(res => {
this.channelName = res.data.nameZh
this.channel = res.data
})
},
},*/
loadFeeList(){
getReceivableListByOrderId({id: this.orderId}).then(res => {
this.feeList = res.data
......
......@@ -832,8 +832,8 @@ export default {
}
},
'form.transportId'(transportId, oldTransportId){
// 海运拼柜给表单默认值
if(this.form.transportId == 4){
// 空运
if(this.form.transportId == 4 || this.form.transportId == 3){
this.$nextTick(() => {
this.$set(this, 'form', Object.assign(this.form, {
doubleClear: 2,
......@@ -854,8 +854,9 @@ export default {
this.$set(this.form, 'channelId', null)
}
// 如果是专线空运默认目的港清关选择我司
if(transportId == 3){
// 如果是专线空运默认目的港清关选择我司
this.$set(this.form, 'portDestCustomsClear', 1)
}
......
......@@ -632,9 +632,15 @@ export default {
// 渠道列表,空运需要渠道筛选
channelList:[],
// 编号搜索条件
noParam: {},
noParam: {
key: 'numberKey',
value: ''
},
// 商品搜索条件
prodParam: {}
prodParam: {
key: 'prodKey',
value: ''
}
};
},
watch:{
......@@ -877,6 +883,8 @@ export default {
page: 1,
rows: 10
}
this.noParam.value = ''
this.prodParam.value = ''
this.dateFilter = []
this.handleQuery();
},
......
This diff is collapsed.
......@@ -26,7 +26,8 @@
remote
@change="handleBrandChange"
:remote-method="getProductBrandPage"
disabled>
disabled
>
<el-option
v-for="item in brandList"
:key="item.id"
......@@ -368,24 +369,6 @@ export default {
feeType: undefined,
recordMode: undefined
},
form1: {
table: [],
brandType: undefined,
orderId: undefined,
orderNo: undefined,
brand: undefined,
inTime: undefined,
material: undefined,
orderItemId: undefined,
prodAttrIds: [],
prodId: undefined,
prodTitleEn: undefined,
prodTitleZh: undefined,
prodType: undefined,
type: 1,
feeType: undefined,
recordMode: undefined
},
brandList: [],
brandList1: [],
formRules: {
......@@ -474,15 +457,15 @@ export default {
})
if (!this.edit){
let protectRowCount = 0
/*let protectRowCount = 0
this.protectRowCount = this.form.table.map(e => {
if (e.id){
protectRowCount++
}
})
this.protectRowCount = protectRowCount
this.protectRowCount = protectRowCount*/
this.handleAdd()
this.handleAdd(1)
// this.handleAdd(1)
}
},
handleClose() {
......@@ -516,6 +499,7 @@ export default {
}
// 首次入仓、入仓补充
return finishPacked({
brand: this.form.brand,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderWarehouseInItemDtoList: this.form.table.map(e => {
......@@ -608,7 +592,7 @@ export default {
cartonsNum = this.warehousing.num - hasCartonsNum
}
const form = val === 1 ? this.form1 : this.form
const form = {...this.form}
const formLength = form.table.length
let orderLocationBackVOList = []
/* // 不默认使用上一条记录的储位 https://zentao.test.jdshangmen.com/bug-view-3344.html
......
......@@ -846,7 +846,8 @@ export default {
this.serviceOpen = true;
this.lineform.lineId = row.lineId;
this.lineform.transportType = row.transportType;
this.lineform.isClientShow = row.isClientShow;
this.lineform.isClientShow = row.isClientShow ? 1 : 0;
this.lineform.makeBillNode = row.makeBillNode;
},
......@@ -863,7 +864,7 @@ export default {
makeBillNode:this.lineform.makeBillNode
}).then(res => {
this.$modal.msgSuccess(this.$t("操作成功"));
this.getRouteList()
for(let index in this.routeList) {
let routeItem = this.routeList[index];
if(routeItem.lineId && routeItem.lineId == this.lineform.lineId) {
......@@ -1060,11 +1061,7 @@ export default {
this.changeContinents(response.data.zhou);
this.changeCountry(response.data.guojia);
this.changeProvince(response.data.sheng);
this.isUpdate = true;
this.open = true;
this.title = this.$t("修改仓库");
});
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment