Commit 2a53df26 authored by houjn@hikoon.cn's avatar houjn@hikoon.cn
parents c7edde3a f5408f88
......@@ -318,3 +318,12 @@ export function downloadLadingCopy(params) {
params,
});
}
// 更新异常订单状态
export function updateAbnormalOrder(data) {
return request({
url: "/shipment/box/updateAbnormalOrder",
method: "post",
data,
});
}
......@@ -197,7 +197,7 @@ export function customerCreditLogPage(params){
//客户详情订单分页
export function infoListOrderPage(params){
return request({
url:'/customer/detail/infoList/orderPage',
url:'/ecw/order/customer-order-page',
method:'get',
params
})
......@@ -259,3 +259,46 @@ export function getCustomerLines(customerId){
})
}
// 获取客户延期调入公海池的审批详情
export function getDelayInfo(query) {
return request({
url: '/ecw/customer/delay/approval/info',
method: 'get',
params: query
})
}
//客户延期调入公海池的审批申请
export function creatDelayApproval(data){
return request({
url:'/ecw/customer/delay/approval',
method:'post',
data
})
}
// 取消客户延期调入公海池的审批申请
export function cancelDelayApproval(query) {
return request({
url: '/ecw/customer/cancel/delay/approval',
method: 'put',
params:query,
})
}
// 获取客户审批详情
export function getApproval(id) {
return request({
url: '/ecw/customer-approval/get',
method: 'get',
params: {id}
})
}
//调入公海池
export function testEnterToOpenSea(customerId) {
return request({
url: '/ecw/customer/test-enter-to-open-sea',
method: 'get',
params: {customerId}
})
}
......@@ -36,6 +36,13 @@ export function getCustomerFollow(id) {
// 获得跟进分页
export function getCustomerFollowPage(query) {
return request({
url: '/customer/detail/infoList/followPage',
method: 'get',
params: query
})
}
export function getCustomerFollowPage2(query) {
return request({
url: '/ecw/customer-follow/page',
method: 'get',
......
// 导出客户 Excel
import request from '@/utils/request'
import query from "@/views/ecw/customer/query";
import * as url from "url";
export function exportCustomerExcel(query) {
return request({
url: '/ecw/indirect-customer/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 获得客户
export function getCustomer(id) {
return request({
url: '/ecw/indirect-customer/get?id=' + id,
method: 'get'
})
}
// 获得客户分页
export function getCustomerPage(query) {
return request({
url: '/ecw/indirect-customer/page',
method: 'get',
params: query
})
}
// 更新客户
export function updateCustomer(data) {
return request({
url: '/ecw/indirect-customer/update',
method: 'put',
data: data
})
}
// 根据客户ID获得联系人列表
export function getCustomerContactsListByCustomer(query) {
return request({
url: '/ecw/indirect-customer-contacts/list-by-customer',
method: 'get',
params: query
})
}
......@@ -181,6 +181,15 @@ export function orderWarehouseInUpdateLabel(data){
})
}
// 入仓修改储位
export function saveOrUpdateOrderLocation(data){
return request({
url: '/order/order-warehouse-in/save-or-update-order-location',
method: 'post',
data
})
}
// 获取入仓修改审批单详情-审批使用
export function getWarehouseUpdateApprovalInfo(id) {
return request({
......
import request from '@/utils/request'
// 创建对内帮助文档
export function createInternalHelpDoc(data) {
return request({
url: '/system/internal-help-doc/create',
method: 'post',
data: data
})
}
// 更新对内帮助文档
export function updateInternalHelpDoc(data) {
return request({
url: '/system/internal-help-doc/update',
method: 'put',
data: data
})
}
// 删除对内帮助文档
export function deleteInternalHelpDoc(id) {
return request({
url: '/system/internal-help-doc/delete?id=' + id,
method: 'delete'
})
}
// 获得对内帮助文档
export function getInternalHelpDoc(id) {
return request({
url: '/system/internal-help-doc/get?id=' + id,
method: 'get'
})
}
// 获得对内帮助文档分页
export function getInternalHelpDocPage(query) {
return request({
url: '/system/internal-help-doc/page',
method: 'get',
params: query
})
}
// 导出对内帮助文档 Excel
export function exportInternalHelpDocExcel(query) {
return request({
url: '/system/internal-help-doc/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
......@@ -47,13 +47,13 @@
>
</el-table-column>
<el-table-column
prop="followUserId"
label="跟进业务"
:formatter="(row, column, cellValue) => serviceUserList.find(e => e.id === cellValue) ? serviceUserList.find(e => e.id === cellValue).nickname : ''"
prop="followUserName"
label="客户经理 "
>
</el-table-column>
</el-table>
<pagination :total="total" :page.sync="pageNo" :limit.sync="pageSize"
@pagination="getCustomerFollowList"/>
<el-dialog
append-to-body
title="客户跟进"
......@@ -65,7 +65,8 @@
<el-row :gutter="10">
<el-col>
<el-form-item label="跟进类型" required>
<dict-selector ref="dictType" form-type="radio" v-model="customerFollow.form.followType" :type="DICT_TYPE.CUSTOMER_FOLLOW_TYPE"></dict-selector>
<!-- <dict-selector ref="dictType" form-type="radio" v-model="customerFollow.form.followType" :type="DICT_TYPE.CUSTOMER_FOLLOW_TYPE"></dict-selector> -->
<el-radio v-model="customerFollow.form.followType" label="3">{{$t('投诉回访')}}</el-radio>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -86,7 +87,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="跟进业务" required>
<el-form-item label="客户经理" required>
<el-select v-model="customerFollow.form.followUserId" placeholder="请选择">
<el-option
v-for="item in serviceUserList"
......@@ -123,7 +124,7 @@
</template>
<script>
import {createCustomerFollow, getCustomerFollowPage} from "@/api/ecw/customerFollow"
import {createCustomerFollow, getCustomerFollowPage, getCustomerFollowPage2} from "@/api/ecw/customerFollow"
import { DICT_TYPE, getDictDataLabel } from '@/utils/dict'
import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts'
import {listServiceUser} from "@/api/system/user"
......@@ -152,8 +153,13 @@ export default {
customerFollow: {
dialogVisible: false,
form: {}
form: {
followType:'3'
}
},
pageNo:1,
pageSize:10,
total:10,
}
},
......@@ -227,13 +233,21 @@ export default {
"result": undefined,
"customerId":this.customerId
}
this.$refs.dictType.changeValue(this.customerFollow.form.followType);
// this.$refs.dictType.changeValue(this.customerFollow.form.followType);
this.$refs.dictMethod.changeValue(this.customerFollow.form.followMethod);
},
getCustomerFollowList() {
getCustomerFollowPage({bizId: this.id}).then(r => {
this.customerFollowList = r.data.list
if(this.$route.name === 'customerQuery'){
getCustomerFollowPage({customerId: this.customerId,pageNo:this.pageNo,pageSize:this.pageSize}).then(r => {
this.customerFollowList = r.data.list;
this.total = r.data.total;
})
}else {
getCustomerFollowPage2({bizId: this.id,followType:3,pageNo:this.pageNo,pageSize:this.pageSize}).then(r => {
this.customerFollowList = r.data.list;
this.total = r.data.total;
})
}
}
}
......
......@@ -64,7 +64,8 @@
</template>
<script>
import { getByWarehouseId } from '@/api/ecw/warehouseArea'
import {getByWarehouseId} from '@/api/ecw/warehouseArea'
import {saveOrUpdateOrderLocation} from "@/api/ecw/order"
export default {
name: 'WarehouseAreaDialog',
......@@ -82,6 +83,11 @@ export default {
warehouseId: {
type: Number,
default: undefined
},
// 是否入仓修改
isEditing: {
type: Boolean,
default: false
}
},
......@@ -102,26 +108,6 @@ export default {
visible(val) {
if (val) {
this.opened = true
if (this.area.length === 0) getByWarehouseId({cityId: this.cityId,warehouseId: this.warehouseId }).then(r => {
const area = r.data
area.forEach(e => {
// 仓库
e.children?.forEach(f => {
// 区域
f.selected = false
if(f.positionList) f.positionList.forEach(g => {
// 位置
g.selected = false
g.children?.forEach(k => {
// 子位置
k.selected = false
})
})
})
})
this.area = area
})
} else {
}
},
......@@ -134,9 +120,45 @@ export default {
},
methods: {
updateArea(){
this.initArea()
},
initArea(){
return getByWarehouseId({ cityId: this.cityId, warehouseId: this.warehouseId }).then(r => {
const area = r.data
area.forEach(e => {
// 仓库
e.children?.forEach(f => {
// 区域
f.selected = this.isSelected(e.id, f.id)
if(f.positionList) f.positionList.forEach(g => {
// 位置
g.selected = this.isSelected(e.id, f.id, g.id)
g.children?.forEach(k => {
// 子位置
k.selected = this.isSelected(e.id, f.id, k.id)
})
})
})
})
this.area = area
})
},
// 用于储位回显选中
isSelected(warehouse, area, position = 0){
return !!this.value.find(e => warehouse === e.wareId && area === e.areaId && position === e.locationId)
},
handleSubmit() {
this.$emit('input', this.inputValue)
this.opened = false
if (this.isEditing) {
this.$nextTick(() => {
saveOrUpdateOrderLocation({
"orderId": this.orderId,
"orderLocationCreateReqVOList": this.inputValue
})
})
}
},
handleClose() {},
handleSelectWarehouse(warehouse) {
......@@ -146,7 +168,6 @@ export default {
return
} else if(this.activeWarehouseId !== warehouse.id) {
this.activeWarehouseId = warehouse.id
console.log(this.inputValue.find(e => e.areaId === warehouse.id), warehouse.id)
if (this.inputValue.find(e => e.areaId === warehouse.id)){
return
}
......@@ -202,7 +223,6 @@ export default {
},
mounted() {
console.log('area dialog mounted')
},
computed: {
......
......@@ -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%">
<el-select v-model="valueSync" multiple :placeholder="$t('请选择抄送人')" style="width:100%" filterable >
<el-option
v-for="item in users"
:key="item.id"
......
......@@ -7,10 +7,14 @@
<div class="right-menu">
<template v-if="device!=='mobile'">
<div class="right-menu-item">
<el-image style="width: 22px;height: 22px;cursor: pointer;" :src="helpIcon" @click="tohelp"></el-image>
</div>
<el-badge :value="matterNum !== 0 ? matterNum : '' " class="right-menu-item badge">
<div @click="$router.push('/task/todo')" style="font-size: 28px; color: #cccccc;cursor: pointer;" class="el-icon-postcard"></div>
</el-badge>
<el-badge :value="notMessage !== 0 ? notMessage : '' " class="right-menu-item badge">
<el-image style="width: 22px;height: 20px;cursor: pointer;" :src="unreadMessage" @click="notRead"></el-image>
</el-badge>
......@@ -40,7 +44,7 @@
<dict-selector :type="DICT_TYPE.SYSTEM_LOCALE" v-model="lang" defaultable class="right-menu-item select-nav" />
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper flex-center">
{{$store.getters.name}}
<img :src="avatar" class="user-avatar ml-10">
......@@ -74,11 +78,13 @@ import RuoYiGit from '@/components/RuoYi/Git'
import RuoYiDoc from '@/components/RuoYi/Doc'
import {getLocale, saveLocale} from "@/utils/db";
import unreadMessage from "@/assets/images/unread-message.png"
import helpIcon from "@/assets/images/help.png"
import i18n from '@/i18n'
export default {
data() {
return {
unreadMessage,
helpIcon,
// locale: getLocale(),
// 枚举
// langDatas: LangEnum.LANG,
......@@ -159,6 +165,9 @@ export default {
},
notRead(){
this.$router.push({path:'/system/internalMessage/my-internal-message',query:{status:'0'}});
},
tohelp(){
this.$router.push({path:'/operation_manage/info'});
}
}
}
......
......@@ -115,7 +115,8 @@ export const DICT_TYPE = {
ECW_COST_FEE_TYPE: 'cost_fee_type', // 清单费用类型
ECW_PRICE_AUDIT_STATUS: 'price_audit_status', // 路线价格审核状态
ECW_CANCEL_PICK_TYPE: 'cancel_pick_type', // 取消放货类型
ECW_CUSTOMER_RESOURCE_TYPE: 'customer_resource_type', // 客户资源类型
ECW_CUSTOMER_TRANSPORT_TYPE: 'customer_transport_type', // 客户出货渠道(跟运输方式相同,但是显示全部)
//--------ecw---------
CUSTOMER_STATUS: 'customer_status',
CUSTOMER_SOURCE: 'customer_source',
......@@ -148,6 +149,7 @@ export const DICT_TYPE = {
//customer
CUSTOMER_CREDIT_RULE_TYPE: 'customer_credit_rule_type',
CUSTOMER_LEVEL_RULE_TYPE: 'customer_level_rule_type',
CUSTOMER_ESOURCE_TYPE:'customer_resource_type',//客户资源类型
// order
ORDER_TYPE: 'order_type', // 订单类型
PRODUCT_RECORD_ATTRIBUTE: 'product_record_attribute', //产品备案属性
......@@ -202,7 +204,14 @@ export const DICT_TYPE = {
BOX_SEA_AIR: 'shipping_process_sea_air', // 海空联运流程流程
BOX_SHIPPING_BRAND_TYPE: 'shipping_brand_type', // 出货品牌类型
BOX_SHIPPING_NOTICE_TYPE: 'shipping_notice_type', // 出货通知类型
BOX_ORDER_SHIPMENT_STATE: 'order_shipment_state'
BOX_ORDER_SHIPMENT_STATE: 'order_shipment_state',
BOX_INSPECTION_TIME_CUSTOMS: 'inspection_time_customs', // 校验时间-报关
BOX_INSPECTION_TIME_SHIPPING: 'inspection_time_shipping', // 校验时间-起运
BOX_INSPECTION_TIME_ARRIVAL: 'inspection_time_arrival', // 校验时间-到港
BOX_SHIPPING_UPDATE_TYPE: "shipping_update_type",// 更新类型
BOX_CUSTOMS_ERROR_TYPE: "customs_error_type",// 报关异常状态
BOX_SHIPPING_ERROR_TYPE: "shipping_error_type",// 起运异常状态
BOX_ARRIVAL_ERROR_TYPE: "arrival_error_type",// 到港异常状态
}
/**
......
......@@ -331,6 +331,12 @@ export default {
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
// 客户延期
customer_delay:{
component: () => import('@/views/ecw/customer/components/Delay'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
}
console.log(this.processInstance.processDefinition.formCustomViewPath.trim())
return map[this.processInstance.processDefinition.formCustomViewPath.trim()]
......
......@@ -156,7 +156,7 @@
<costForm v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
</template>
<template v-if="dialogCfg.dialogType === 'error'">
<regError v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" />
<regError v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :allUsers="allUsers"/>
</template>
<template v-if="dialogCfg.dialogType === 'editLadingBill'">
<ladingBill v-if="dialogCfg.open" @closeDialog="closeDialog" :shipmentObj="currRow" :getCabinetName="getCabinetName" />
......@@ -178,7 +178,7 @@
</el-table-column>
<el-table-column :label="$t('操作')" align="center" width="80">
<template slot-scope="scope">
<el-button type="text" @click="handleCommand(scope.row, 'sea')">{{$t('处理')}}</el-button>
<el-button type="text" @click="handleCommand(scope.row, 'handle')">{{$t('处理')}}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -212,6 +212,7 @@ import costForm from "./costForm.vue";
import regError from "./regError.vue";
import editForm from "./editForm.vue";
import ladingBill from "./ladingBill/index.vue";
import { listUser } from "@/api/system/user";
export default {
name: "EcwBoxIndexsea",
......@@ -266,6 +267,7 @@ export default {
countryList: [],
// 通知列表
noticeList: [],
allUsers: [],
};
},
computed: {
......@@ -301,6 +303,11 @@ export default {
this.getList();
this.getCountryList();
this.queryNotice();
// 用户
listUser({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allUsers = data.list ?? [];
});
},
methods: {
formatDate,
......@@ -372,7 +379,9 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
this.$modal
.confirm(this.$t('是否确认删除出货编号为 {no} 的数据项?', {no: row.selfNo}))
.confirm(
this.$t("是否确认删除出货编号为 {no} 的数据项?", { no: row.selfNo })
)
.then(function () {
return deletebox(row.id);
})
......@@ -432,11 +441,14 @@ export default {
case "editLadingBill":
const cabinetLabel = this.getCabinetName(row.cabinetId);
const title = this.$t('查看提单 {selfNo} 柜号:{cubNo} 柜型:{cabinetLabel}', {
selfNo: row.selfNo,
cubNo: row.cubNo,
cabinetLabel: cabinetLabel
})
const title = this.$t(
"查看提单 {selfNo} 柜号:{cubNo} 柜型:{cabinetLabel}",
{
selfNo: row.selfNo,
cubNo: row.cubNo,
cabinetLabel: cabinetLabel,
}
);
this.$set(this.dialogCfg, "title", title);
this.$set(this.dialogCfg, "fullscreen", true);
break;
......@@ -453,7 +465,7 @@ export default {
downloadFile(
command,
{ shipmentId: row.id },
this.$t('预装单')+`(${row.selfNo}).xlsx`,
this.$t("预装单") + `(${row.selfNo}).xlsx`,
"xlsx"
);
break;
......@@ -461,7 +473,7 @@ export default {
downloadFile(
command,
{ shipmentId: row.id },
this.$t('已装单') + `(${row.selfNo}).xlsx`,
this.$t("已装单") + `(${row.selfNo}).xlsx`,
"xlsx"
);
break;
......@@ -469,7 +481,7 @@ export default {
downloadFile(
command,
{ shipmentId: row.id },
this.$t('应收汇总表') + `(${row.selfNo}).xlsx`,
this.$t("应收汇总表") + `(${row.selfNo}).xlsx`,
"xlsx"
);
break;
......@@ -486,6 +498,16 @@ export default {
case "downloadLadingCopy":
downloadFileByUrl(command, { shipmentId: row.id });
break;
case "handle":
const { noticeType } = row;
if ([1, 2, 3, 4, 8].includes(noticeType)) {
this.$router.push("/boxSea/shippingSea/" + row.id);
}
if ([5, 6, 7].includes(noticeType)) {
this.$router.push("/boxSea/query/" + row.id);
}
this.closeDialog();
break;
}
if (["editLadingBill", "cost", "error"].includes(command)) {
......
......@@ -290,6 +290,7 @@
v-if="dialogCfg.open"
@closeDialog="closeDialog"
:shipmentObj="currRow"
:allUsers="allUsers"
/>
</template>
<template v-if="dialogCfg.dialogType === 'editLadingBill'">
......@@ -318,6 +319,7 @@ import costForm from './costForm.vue'
import regError from './regError.vue'
import editForm from './editSeaAirForm.vue'
import ladingBill from "./ladingBill/index.vue";
import { listUser } from "@/api/system/user";
export default {
name: 'EcwBoxIndexseaair',
......@@ -379,6 +381,7 @@ export default {
cabinetList: [],
channelList: [],
warehouseList: [],
allUsers: []
}
},
computed: {
......@@ -418,6 +421,11 @@ export default {
}
},
created() {
// 用户
listUser({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allUsers = data.list ?? [];
});
this.transportTypes = this.getDictDatas(
this.DICT_TYPE.ECW_TRANSPORT_TYPE
).filter((item) => item.value == '4')
......
......@@ -16,7 +16,8 @@
<div v-for="(item, index) in scope.row.orderItemList" :key="index" class="goodList-div">
<p>{{$t('品名')}}{{item.prodTitleZh}}</p>
<p>{{$t('品牌')}}:【
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="item.productRecord" />
<span v-if="item.feeType === 0">无品牌</span>
<dict-tag v-else :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="item.feeType" />
</p>
<p>{{$t('其他')}}{{getTotlContent(item)}}</p>
......@@ -26,7 +27,7 @@
</el-table-column>
<el-table-column :label="$t('控货')" align="center" prop="">
<template slot-scope="scope">
{{scope.row.isCargoControl}}
{{scope.row.isCargoControl ? '' : '' }}
</template>
</el-table-column>
<el-table-column :label="$t('计划箱数')" align="center" prop="loadNum">
......@@ -50,7 +51,7 @@
{{ scope.row.loadWeight }}kg
</template>
</el-table-column>
<el-table-column :label="$t(' 跟进客服')" align="center" prop="" />
<el-table-column :label="$t(' 跟进客服')" align="center" prop="" />
<el-table-column :label="$t('制作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- 0 (未制作提货单) 1(审核中) 2(审核通过) 3(审核拒绝) -->
......@@ -158,7 +159,7 @@ export default {
if (type === "query") {
this.getBillList();
}
if(type === 'close'){
if (type === "close") {
this.$emit("closeDialog");
}
},
......
......@@ -55,6 +55,10 @@
<p class="box-weight">
{{getSectionInfo}}
</p>
<div style="margin-left:30px;">
<el-button type="primary" size="small" @click="()=>updateStatus('selected')">{{$t('更新所选订单状态')}}</el-button>
<el-button type="primary" size="small" @click="()=>updateStatus('all')">{{$t('更新全部订单状态')}}</el-button>
</div>
<div class="document-status">
<p>{{$t('单证状态')}}</p>
<template v-for="(item, index) in getDocStatus(sectionObj.sectionOrderList)">
......@@ -62,7 +66,8 @@
</template>
</div>
</div>
<el-table :data="sectionObj.sectionOrderList" style="width: 100%" border>
<el-table :data="sectionObj.sectionOrderList" style="width: 100%" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" :selectable="selectable"></el-table-column>>
<el-table-column type="index" align="center" :label="$t('序号')" width="50" />
<el-table-column prop="orderNo" :label="$t('订单号')" align="center">
<template v-slot="scope">
......@@ -93,6 +98,11 @@
</template>
</el-table-column>
<el-table-column prop="customsFee" :label="$t('报关费用')" align="center"></el-table-column>
<el-table-column prop="" :label="$t('操作')" align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" :disabled="scope.row.abnormalDealStatus === 1" @click="()=>updateStatus('single', scope.row)">{{$t('更新状态')}}</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane :label="$t('状态')" name="status">
......@@ -137,7 +147,7 @@
<el-tab-pane :label="$t('异常')" name="error">
<el-table :data="errorList" style="width: 100%" border>
<el-table-column type="index" align="center" :label="$t('序号')" width="50" />
<el-table-column prop="opStep" :label="$t('操作步骤')" align="center">
<el-table-column prop="opStep" :label="$t('操作')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PROCESS" :value="scope.row.opStep" />
</template>
......@@ -147,8 +157,9 @@
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_TICKET_EXCEPTION" :value="scope.row.opStep" />
</template>
</el-table-column>
<el-table-column prop="abnDetail" :label="$t('异常详情')" align="center" width="800"></el-table-column>
<el-table-column prop="" :label="$t('异常时间')" align="center">
<el-table-column prop="abnDetail" :label="$t('异常描述')" align="center" width="700"></el-table-column>
<el-table-column prop="delayDays" :label="$t('异常延迟天数')" align="center"></el-table-column>
<el-table-column prop="" :label="$t('异常时间')" align="center" width="300">
<template slot-scope="scope">
<span v-if="scope.row.abnStartTime">{{formatDate(scope.row.abnStartTime)}} - </span>
<span v-if="scope.row.abnEndTime">{{formatDate(scope.row.abnEndTime)}}</span>
......@@ -180,7 +191,10 @@
<costForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :costDetail="costDetail" />
</template>
<template v-if="dialogConfig.type === 'error'">
<regError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" />
<regError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :allUsers="allUsers" />
</template>
<template v-if="dialogConfig.type === 'updateError'">
<updateError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :errorInfo="errorInfo" />
</template>
</el-dialog>
</div>
......@@ -199,8 +213,6 @@ import { getChannelList } from "@/api/ecw/channel";
import { getCabinetPage } from "@/api/ecw/cabinet";
import { getWarehouseList } from "@/api/ecw/warehouse";
import {
getSeaStatus,
getStatusName,
getTotlContent,
formatDate,
serviceMsg,
......@@ -212,6 +224,8 @@ import { getSupplierPage } from "@/api/ecw/supplier";
import costForm from "./costForm.vue";
import regError from "./regError.vue";
import editForm from "./editForm.vue";
import updateError from "./updateError.vue";
import { listUser } from "@/api/system/user";
export default {
name: "boxDetail",
......@@ -222,6 +236,7 @@ export default {
costForm,
regError,
editForm,
updateError,
},
created() {
this.transportTypes = this.getDictDatas(
......@@ -229,6 +244,11 @@ export default {
).filter((item) => item.value == "1" || item.value == "2");
this.initData();
this.queryAllData();
// 用户
listUser({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allUsers = data.list ?? [];
});
},
data() {
return {
......@@ -242,6 +262,7 @@ export default {
warehouseList: [],
// 供应商
allSupplier: [],
allUsers: [],
// 部分list
sectionList: [],
// 单证数组
......@@ -276,18 +297,88 @@ export default {
{ title: this.$t("预装单"), serviceName: "downloadPreloadGoodsList" },
{ title: this.$t("已装单"), serviceName: "downloadLoadGoodsList" },
{ title: this.$t("应收汇总表"), serviceName: "downloadReceivableList" },
{ title: this.$t("提货单"), serviceName: "zipDownload", fileFormat: "zip" },
{
title: this.$t("提货单"),
serviceName: "zipDownload",
fileFormat: "zip",
},
{
title: "agent list",
serviceName: "downloadAgentListFiles",
type: "url",
},
{ title: "soncap", serviceName: "downloadSoncapFiles", type: "url" },
{ title: this.$t("提单Copy"), serviceName: "downloadLadingCopy", type: "url" },
{
title: this.$t("提单Copy"),
serviceName: "downloadLadingCopy",
type: "url",
},
],
// 选中行
selectedRows: [],
// 修改异常
errorInfo: {
orderList: [],
errorType: "",
operate: "",
},
};
},
methods: {
selectable(row, index) {
if (row.abnormalDealStatus === 1) return false;
return true;
},
/* 全选 */
handleSelectionChange(selected) {
this.selectedRows = selected;
},
/* 更新状态 */
updateStatus(type, row) {
let orders = [];
if (type === "selected") {
if (!this.selectedRows.length) {
this.$message.error("请选择需要更新的订单");
return;
}
orders = this.selectedRows;
} else if (type === "all") {
// 筛选未处理的订单
orders = this.sectionObj.sectionOrderList.filter(
(item) => item.abnormalDealStatus === 0
);
if (!orders.length) {
this.$message.error("没有订单需要更新");
return;
}
} else if (type === "single") {
orders = [row];
}
this.getErrorType();
this.$set(this.errorInfo, "orderList", orders);
this.$set(this.errorInfo, "operate", type);
// 判断异常类型
this.handleCommand("updateError");
},
getErrorType() {
for (const [key, value] of Object.entries(this.shipmentObj)) {
// 报关异常 customsInfo
if (key === "customsInfo" && value.hasAbnormal) {
this.$set(this.errorInfo, "errorType", "customs");
this.$set(this.dialogConfig, "title", this.$t("更新报关异常状态"));
}
// 起运异常 shippingInfo
if (key === "shippingInfo" && value.hasAbnormal) {
this.$set(this.errorInfo, "errorType", "shipping");
this.$set(this.dialogConfig, "title", this.$t("更新起运异常状态"));
}
// 到港异常 arrivalInfo
if (key === "arrivalInfo" && value.hasAbnormal) {
this.$set(this.errorInfo, "errorType", "arrival");
this.$set(this.dialogConfig, "title", this.$t("更新到港异常状态"));
}
}
},
// 初始化字典数据
initData() {
// 查询渠道
......@@ -316,7 +407,7 @@ export default {
this.sectionList = res.data.map((item, index) => {
return {
...item,
title: this.$t('第{index}部分', {index: index + 1}),
title: this.$t("第{index}部分", { index: index + 1 }),
};
});
});
......@@ -363,7 +454,7 @@ export default {
// 供应商
getSupplier(id) {
let arr = this.allSupplier.find((item) => item.id == id) ?? {};
return this.$l(arr, 'company');
return this.$l(arr, "company");
},
editCostClick(row) {
this.costDetail = row;
......@@ -401,15 +492,19 @@ export default {
this.$set(this.dialogConfig, "title", this.$t("费用登记"));
this.$set(this.dialogConfig, "type", "cost");
break;
case "error":
this.$set(this.dialogConfig, "visible", true);
this.$set(this.dialogConfig, "title", this.$t("异常登记"));
this.$set(this.dialogConfig, "type", "error");
break;
case "delete":
this.$modal
.confirm(
$t('是否确认删除出货编号为 {no} 的数据项?', {no: this.shipmentObj.selfNo})
this.$t("是否确认删除出货编号为 {no} 的数据项?", {
no: this.shipmentObj.selfNo,
})
)
.then(() => {
return deletebox(this.shipmentId);
......@@ -430,6 +525,11 @@ export default {
})
.catch(() => {});
break;
case "updateError":
this.$set(this.dialogConfig, "visible", true);
this.$set(this.dialogConfig, "type", "updateError");
break;
}
},
// 关闭弹框
......@@ -446,6 +546,9 @@ export default {
this.errorList = res.data;
});
}
if (type === "detail") {
this.getBoxGoodsDetail();
}
},
formatDate,
downloadDetailFile(row) {
......@@ -483,7 +586,7 @@ export default {
return (shippingChannelId) => {
for (const channelItem of this.channelList) {
if (channelItem.channelId == shippingChannelId) {
return this.$l(channelItem, 'name');
return this.$l(channelItem, "name");
}
}
};
......@@ -498,20 +601,14 @@ export default {
}
};
},
/* 状态 */
getBoxStatus() {
return (shippingVO) => {
return getStatusName(getSeaStatus(shippingVO));
};
},
/* 总计 */
getBoxSum() {
return (boxStatistics) => {
if (boxStatistics) {
return this.$t("{num}箱 {volum}m³", {
num: boxStatistics.num ?? 0,
volume: boxStatistics.weight ?? 0
})
volume: boxStatistics.weight ?? 0,
});
/* `${boxStatistics.num ?? 0} ${boxStatistics.volume ?? 0}m3 ${
boxStatistics.weight ?? 0
}kg`; */
......@@ -523,7 +620,7 @@ export default {
getCityName() {
return (id) => {
let arr = this.warehouseList.filter((item) => item.id == id);
return arr.length > 0 ? this.$l(arr[0], 'title') : this.$t("无");
return arr.length > 0 ? this.$l(arr[0], "title") : this.$t("无");
};
},
// 部分信息
......
......@@ -17,12 +17,17 @@
<el-form-item :label="$t('异常情况')">
<el-input v-model="errorObj.abnDetail" type="textarea" rows="2" :placeholder="$t('请输入异常情况')"></el-input>
</el-form-item>
<el-form-item :label="$t('异常时间')" prop="arrivalTime" class="two-element">
<el-form-item :label="$t('异常时间')" prop="arrivalTime" class="three-element">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="errorObj.abnStartTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="errorObj.abnEndTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<div class="delayTime">延迟时间:{{delayDay}}</div>
</el-form-item>
<el-form-item :label="$t('是否更新订单状态')">
<el-form-item :label="$t('通知人')">
<userSelect v-model="errorObj.notifyUsers" :placeholder="$t('请选择通知人')" :allUsers="this.$attrs.allUsers" multiple />
</el-form-item>
<!-- <el-form-item :label="$t('是否更新订单状态')">
<el-radio-group v-model="errorObj.orderStatus">
<el-radio v-for="item in status" :key="item.value" :label="item.value">{{item.label}}</el-radio>
</el-radio-group>
......@@ -32,7 +37,7 @@
</el-form-item>
<el-form-item :label="$t('英文内容')">
<el-input v-model="errorObj.contentEn" type="textarea" rows="2" :placeholder="$t('请输入英文内容')"></el-input>
</el-form-item>
</el-form-item> -->
</el-form>
<el-row class="operate-button">
......@@ -45,12 +50,16 @@
<script>
import { abnormalCreate } from "@/api/ecw/boxSea";
import { serviceMsg } from "./shippingSea/utils";
import userSelect from "./shippingSea/nodePage/common/userSelect.vue";
import dayjs from "dayjs";
/**
* 异常登记
*/
export default {
name: "regError",
inheritAttrs: false,
components: { userSelect },
data() {
return {
// 异常对象
......@@ -66,23 +75,47 @@ export default {
label: this.$t(""),
},
],
flag: 'sea'
flag: "sea",
delayDay: 0,
};
},
created() {
const { currNode } = this.$attrs;
this.errorObj = { opStep: currNode?.dataKey ?? undefined };
if(this.$attrs.shipmentObj.bosType == 'seaAir'){
this.flag = 'seaAir';
if (this.$attrs.shipmentObj.bosType == "seaAir") {
this.flag = "seaAir";
}
},
watch: {
// 异常开始时间
"errorObj.abnStartTime"(val) {
this.compareDate(val, this.errorObj.abnEndTime);
},
// 异常结束时间
"errorObj.abnEndTime"(val) {
this.compareDate(this.errorObj.abnStartTime, val);
},
},
methods: {
// 时间比较
compareDate(abnStartTime, abnEndTime) {
this.delayDay = 0;
let date1 = null,
date2 = null;
if (abnStartTime) date1 = dayjs(abnStartTime);
if (abnEndTime) date2 = dayjs(abnEndTime);
if (date1 && date2) {
this.delayDay = date2.diff(date1, "day");
}
},
/** 提交 */
onSubmit() {
this.$refs["errorForm"].validate((valid) => {
if (valid) {
abnormalCreate({
...this.errorObj,
delayDays: this.delayDay,
notifyUsers: this.errorObj.notifyUsers?.join(",") ?? "",
shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
......@@ -108,18 +141,14 @@ export default {
.operate-button {
text-align: center;
}
.two-element-formItem {
display: flex;
> :last-child {
width: 100%;
margin-left: 10px;
}
}
.two-element {
.three-element {
.el-form-item__content {
display: flex;
> :last-child {
margin-left: 10px;
> .el-date-editor {
margin-right: 10px;
}
> .delayTime {
width: 300px;
}
}
}
......
......@@ -93,7 +93,6 @@
import { approvalDetail } from "@/api/ecw/box";
import {
getSeaStatus,
getStatusName,
getTotlContent,
} from "./shippingSea/utils";
import { getCabinetPage } from "@/api/ecw/cabinet";
......@@ -196,12 +195,6 @@ export default {
}
};
},
/* 货柜状态 */
getCabinetStatus() {
return (shippingVO) => {
return getStatusName(getSeaStatus(shippingVO));
};
},
/* 体积重量 */
getVolumeWeight() {
return (total) => {
......
......@@ -24,7 +24,7 @@
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="$t('票异常')" :visible.sync="dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close>
<regError @closeDialog="dialogVisible = false" v-bind="$attrs" />
<regError @closeDialog="regCloseDialog" v-bind="$attrs" />
</el-dialog>
</div>
</template>
......@@ -50,12 +50,17 @@ export default {
arrivalObj: {},
// 校验
rules: {
apRealTime: [{ required: true, message: this.$t("必填"), trigger: "change" }],
apRealTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
},
// 弹窗配置
dialogVisible: false,
// 提示消息
showMsg: false,
inspectionTimeArrival: this.getDictDatas(
this.DICT_TYPE.BOX_INSPECTION_TIME_ARRIVAL
)[0].value,
};
},
created() {
......@@ -76,11 +81,19 @@ export default {
},
},
methods: {
regCloseDialog(type) {
this.dialogVisible = false;
if (type === "error") {
this.$emit("getBoxInfo");
}
},
// 获取预计到港时间
getExpectedTime() {
const { shippingInfo } = this.$attrs.shipmentObj;
if (shippingInfo) {
return dayjs(shippingInfo.dtEstArrivalTime).format("YYYY-MM-DD HH:mm:ss");
return dayjs(shippingInfo.dtEstArrivalTime).format(
"YYYY-MM-DD HH:mm:ss"
);
}
return null;
},
......@@ -93,7 +106,7 @@ export default {
if (apConfirmTime) date2 = dayjs(apConfirmTime);
if (date1 && date2) {
const days = date2.diff(date1, "day");
if (days > 5) {
if (days > this.inspectionTimeArrival) {
this.showMsg = true;
}
}
......
......@@ -35,6 +35,9 @@
<el-form-item :label="$t('截关时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cusDeclarationObj.dcCutOffTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('报关时间')" prop="dcDecTime">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cusDeclarationObj.dcDecTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('状态')" prop="dcCustomsStatus">
<el-radio-group v-model="cusDeclarationObj.dcCustomsStatus" :disabled="inReview || isCheckDeal('status')">
<el-radio v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_DCCUSTOMS_STATUS)" :key="item.value" :label="item.value">{{item.label}}</el-radio>
......@@ -74,7 +77,7 @@
<!-- <el-form-item :label="$t('装箱单')">
<el-button type="primary">{{$t('下载装箱单')}}</el-button>
</el-form-item> -->
<el-form-item :label="$t('报关单')">
<el-form-item :label="$t('报关单')" v-show="isDownload">
<el-button type="primary" @click="downloadCusFile">{{$t('下载所有报关单')}}</el-button>
</el-form-item>
......@@ -88,6 +91,7 @@
<el-button type="success" v-if="!inReview" @click="onSubmit(2)" :disabled="isCheckDeal('submit')">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
<el-button type="primary" @click="extraCost" v-show="cusDeclarationObj.dcCustomsStatus === '2' || cusDeclarationObj.dcCustomsStatus === '3'">{{$t('额外费用')}}</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!isShowError">{{$t('异常登记')}}</el-button>
</el-row>
<!-- 对话框 -->
......@@ -141,6 +145,11 @@
</el-row>
</el-row>
</el-dialog>
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="$t('票异常')" :visible.sync="regDialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close>
<regError @closeDialog="regCloseDialog" v-bind="$attrs" :shipmentObj="shipmentObj" />
</el-dialog>
</div>
</template>
......@@ -165,6 +174,8 @@ import {
} from "../utils";
import ImageUpload from "@/components/ImageUpload";
import Decimal from "decimal.js";
import regError from "../../regError";
import dayjs from "dayjs";
/**
* 报关
......@@ -172,7 +183,7 @@ import Decimal from "decimal.js";
export default {
name: "cusDeclaration",
inheritAttrs: false,
components: { supplierSelect, ImageUpload },
components: { supplierSelect, ImageUpload, regError },
props: {
shipmentObj: Object,
},
......@@ -194,6 +205,9 @@ export default {
dcCustomsStatus: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
dcDecTime: [
{ required: true, message: this.$t("必填"), trigger: "change" },
],
},
// 弹窗配置
dialogConfig: {
......@@ -208,6 +222,13 @@ export default {
costList: [],
// 是否审核中
inReview: false,
// 异常登记
regDialogVisible: false,
isShowError: false,
inspectionTimecustoms: this.getDictDatas(
this.DICT_TYPE.BOX_INSPECTION_TIME_CUSTOMS
)[0].value,
isDownload: false,
};
},
created() {
......@@ -228,15 +249,39 @@ export default {
"dcCutOffTime",
"dcCheckTime",
"dcPassTime",
"dcDecTime",
]);
oldData = formatNumberString(oldData, [
"dcCustomsType",
"dcCustomsStatus",
"dcCheckStatus",
]);
this.cusDeclarationObj = oldData;
},
methods: {
regCloseDialog(type) {
this.regDialogVisible = false;
if (type === "error") {
this.$emit("getBoxInfo");
}
},
// 时间比较
compareDate(dcDecTime, dcPassTime) {
this.isShowError = false;
let date1 = null,
date2 = null;
if (dcDecTime) date1 = dayjs(dcDecTime);
if (dcPassTime) date2 = dayjs(dcPassTime);
if (date1 && date2) {
const delayDay = date2.diff(date1, "day");
if (delayDay >= this.inspectionTimecustoms) this.isShowError = true;
}
},
// 异常登记
exceptionReg() {
this.regDialogVisible = true;
},
/* 跳转订单详情 */
jumpOrderDetail(row) {
this.$router.push({
......@@ -489,6 +534,12 @@ export default {
},
},
watch: {
"cusDeclarationObj.documentInfo"(val) {
this.isDownload = false;
if (val.includes("2")) {
this.isDownload = true;
}
},
"cusDeclarationObj.dcBoxWgt"(dcBoxWgt) {
this.calcVGM(dcBoxWgt, this.cusDeclarationObj.dcGoodsWgt);
},
......@@ -498,6 +549,7 @@ export default {
"cusDeclarationObj.dcCustomsStatus"(val) {
if (val !== "3") {
this.$set(this.cusDeclarationObj, "dcCheckStatus", "");
this.$set(this.cusDeclarationObj, "dcPassTime", "");
} else {
const { customsInfo = {} } = this.shipmentObj;
this.$set(
......@@ -520,6 +572,21 @@ export default {
}
},
},
// 报关时间
"cusDeclarationObj.dcDecTime"(val) {
this.compareDate(val, this.cusDeclarationObj.dcPassTime);
},
// 放行时间
"cusDeclarationObj.dcPassTime"(val) {
this.compareDate(this.cusDeclarationObj.dcDecTime, val);
},
// 查验状态
"cusDeclarationObj.dcCheckStatus"(val) {
const { customsInfo = {} } = this.shipmentObj;
if (val != customsInfo.dcCheckStatus) {
this.$set(this.cusDeclarationObj, "dcPassTime", "");
}
},
},
computed: {
/* 获取报关审核退场状态文字 */
......
......@@ -19,12 +19,12 @@
<el-button type="primary" @click="onSubmit(1)">{{$t('保存')}}</el-button>
<el-button type="success" @click="onSubmit(2)">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!showMsg">{{$t('异常登记')}}</el-button>
<el-button type="primary" @click="exceptionReg" :disabled="!isShowError">{{$t('异常登记')}}</el-button>
</el-row>
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" :title="$t('票异常')" :visible.sync="dialogVisible" width="700px" :modal-append-to-body=false append-to-body destroy-on-close>
<regError @closeDialog="dialogVisible = false" v-bind="$attrs" />
<regError @closeDialog="regCloseDialog" v-bind="$attrs" />
</el-dialog>
</div>
</template>
......@@ -56,6 +56,11 @@ export default {
dialogVisible: false,
// 提示消息
showMsg: false,
// 异常登记
isShowError: false,
inspectionTimeShipping: this.getDictDatas(
this.DICT_TYPE.BOX_INSPECTION_TIME_SHIPPING
)[0].value,
};
},
created() {
......@@ -69,9 +74,16 @@ export default {
// 实际开船时间
"departureObj.dtRealShipTime"(val) {
this.compareDate(val, this.getSailingTime());
this.compareDate1(val, this.getSailingTime());
},
},
methods: {
regCloseDialog(type) {
this.dialogVisible = false;
if (type === "error") {
this.$emit("getBoxInfo");
}
},
// 时间比较
compareDate(dtRealShipTime, sailTime) {
this.showMsg = false;
......@@ -83,6 +95,17 @@ export default {
this.showMsg = true;
}
},
compareDate1(dtRealShipTime, sailTime) {
this.isShowError = false;
let date1 = null,
date2 = null;
if (dtRealShipTime) date1 = dayjs(dtRealShipTime);
if (sailTime) date2 = dayjs(sailTime);
if (date1 && date2) {
const delayDay = date1.diff(date2, "day");
if (delayDay >= this.inspectionTimeShipping) this.isShowError = true;
}
},
// 异常登记
exceptionReg() {
this.dialogVisible = true;
......
......@@ -8,13 +8,14 @@
<el-row class="operate-button">
<el-button type="success" @click="onSubmit" v-show="!isReview">{{$t('发起申请')}}</el-button>
<el-button type="primary" @click="jumpReviewDetail" v-show="isReview">{{$t('审核中')}}</el-button>
<el-button plain type="primary" @click="canclAudit" v-show="isReview">{{$t('取消审核')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
</el-row>
</div>
</template>
<script>
import { approvalCreate } from "@/api/ecw/boxSea";
import { approvalCreate, approvalCancel } from "@/api/ecw/boxSea";
import { serviceMsg, toReviewDetail } from "../utils";
/**
......@@ -29,41 +30,56 @@ export default {
reviewObj: {},
isReview: false,
bpmProcessId: "",
voKey: "",
};
},
created() {
const { currNode, shipmentObj } = this.$attrs;
const {
preInstallBackInfo,
cabinetBackInfo,
cabinetUnloadBackApprovalInfo,
} = shipmentObj;
if (currNode.type === "preinstall") {
this.isReview = preInstallBackInfo ? true : false;
if (preInstallBackInfo && preInstallBackInfo.approvalStatus !== 1) {
this.isReview = false;
}
this.bpmProcessId = preInstallBackInfo?.bpmProcessId;
let voKey = "";
switch (currNode.type) {
case "preinstall":
voKey = "preInstallBackInfo";
break;
case "cabinet":
voKey = "cabinetBackInfo";
break;
case "unloading":
voKey = "cabinetUnloadBackApprovalInfo";
break;
}
if (currNode.type === "cabinet") {
this.isReview = cabinetBackInfo ? true : false;
if (cabinetBackInfo && cabinetBackInfo.approvalStatus !== 1) {
if (voKey) {
this.isReview = shipmentObj[voKey] ? true : false;
if (shipmentObj[voKey] && shipmentObj[voKey].approvalStatus !== 1) {
this.isReview = false;
}
this.bpmProcessId = cabinetBackInfo?.bpmProcessId;
}
if (currNode.type === "unloading") {
this.isReview = cabinetUnloadBackApprovalInfo ? true : false;
if (
cabinetUnloadBackApprovalInfo &&
cabinetUnloadBackApprovalInfo.approvalStatus !== 1
) {
this.isReview = false;
this.bpmProcessId = shipmentObj[voKey].bpmProcessId;
if (this.isReview) {
this.$set(
this.reviewObj,
"applyReason",
shipmentObj[voKey].applyReason
);
}
this.bpmProcessId = cabinetUnloadBackApprovalInfo?.bpmProcessId;
}
this.voKey = voKey;
},
methods: {
/* 取消审核 */
canclAudit() {
const { shipmentObj } = this.$attrs;
approvalCancel({
applyReason: this.$t("取消反审核"),
id: shipmentObj[this.voKey].id,
shipmentId: shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "submit");
});
});
},
jumpReviewDetail() {
toReviewDetail.apply(this, [this.bpmProcessId]);
this.$emit("closeDialog");
......
......@@ -54,6 +54,9 @@ export default {
warehouseId: this.$attrs.shipmentObj.startWarehouseId,
};
},
mounted() {
this.$refs.area.updateArea()
},
methods: {
getTotlContent,
// 打开储位
......
......@@ -2,7 +2,9 @@
<div>
<el-form ref="unloadingForm" :model="unloadingObj" label-width="100px">
<el-form-item :label="$t('网点')">
<dockSelect v-model="unloadingObj.ulOutletsId" :placeholder="$t('请选择网点')" :allDocks="this.$attrs.allDocks" />
<el-select filterable v-model="unloadingObj.ulOutletsId" clearable>
<el-option v-for="node in nodes" :key="node.id" :label="$l(node, 'title')" :value="node.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('到仓时间')">
<el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="unloadingObj.ulWarehouseTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
......@@ -30,7 +32,7 @@
import startUnloading from "./startUnloading.vue";
import { unloadCreate } from "@/api/ecw/boxSea";
import { formatDateStr, serviceMsg } from "../../utils";
import dockSelect from "../common/dockSelect.vue";
import { getNodePage } from "@/api/ecw/node";
/**
* 卸柜
......@@ -38,13 +40,14 @@ import dockSelect from "../common/dockSelect.vue";
export default {
name: "unloading",
inheritAttrs: false,
components: { startUnloading, dockSelect },
components: { startUnloading },
data() {
return {
// 清关对象
unloadingObj: {},
// 弹窗状态
dialogVisible: false,
nodes: [],
};
},
created() {
......@@ -52,6 +55,12 @@ export default {
let oldData = { ...this.$attrs.shipmentObj[voName] };
oldData = formatDateStr(oldData, ["ulWarehouseTime", "ulBoxTime"]);
this.unloadingObj = oldData;
// 进入卸柜,仓库给了默认值为0,并且底下显示无匹配数据。应该默认为空,让手动去选择
if(this.unloadingObj.ulOutletsId === 0) this.unloadingObj.ulOutletsId = ''
getNodePage({ pageNo: 1, pageSize: 1000, status: 0 }).then((res) => {
const { data } = res;
this.nodes = data?.list ?? [];
});
},
methods: {
/** 提交 */
......
......@@ -236,6 +236,10 @@ export default {
if (end.includes(val[keyName])) {
node.currStatus = "end";
// 判断是否存在异常未处理
if (val[voName].hasAbnormal) {
continue;
}
// 报关
if (type === "cusDeclaration") {
const { dcCustomsStatus, dcCheckStatus } = val;
......
......@@ -45,7 +45,7 @@ import { getDockPage } from "@/api/ecw/dock";
import { listUser } from "@/api/system/user";
// 这里引入的数据切换语言后要刷新才生效,优化办法是label同时配备labelEn字段,然后再页面上用$l函数调用
import { getSeaStatus, getStatusName, seaBaseData } from "./utils";
import { seaBaseData } from "./utils";
/**
* 海运操作主页面
*/
......@@ -115,12 +115,6 @@ export default {
});
},
},
watch: {
/* 监听发货对象 */
shipmentObj(val) {
// this.statusLabel = getStatusName(getSeaStatus(val));
},
},
};
</script>
......
......@@ -4,79 +4,6 @@ import FileSaver from "file-saver";
import Decimal from "decimal.js";
import i18n from "@/i18n";
/**
* 节点状态值
*
* @return {*}
*/
function getStatusName(statu) {
const statusName = new Map();
statusName.set(11, i18n.$t("未订舱"));
statusName.set(12, i18n.$t("已订舱"));
statusName.set(21, i18n.$t("未预装"));
statusName.set(22, i18n.$t("预装中"));
statusName.set(23, i18n.$t("预装审核中"));
statusName.set(24, i18n.$t("预装审核失败"));
statusName.set(25, i18n.$t("预装审核成功"));
statusName.set(2111, i18n.$t("未理货"));
statusName.set(2112, i18n.$t("已理货"));
statusName.set(31, i18n.$t("未派车"));
statusName.set(32, i18n.$t("已派车"));
statusName.set(41, i18n.$t("未装柜"));
statusName.set(42, i18n.$t("装柜中"));
statusName.set(43, i18n.$t("已装柜、待封柜"));
statusName.set(44, i18n.$t("封柜审核中"));
statusName.set(45, i18n.$t("封柜审核失败"));
statusName.set(46, i18n.$t("封柜审核成功"));
statusName.set(47, i18n.$t("已封柜,待出仓"));
statusName.set(51, i18n.$t("未报关"));
statusName.set(52, i18n.$t("报关中"));
statusName.set(53, i18n.$t("已报关"));
statusName.set(61, i18n.$t("未配船"));
statusName.set(62, i18n.$t("已配船"));
statusName.set(71, i18n.$t("未提单补料"));
statusName.set(72, i18n.$t("已提单补料"));
statusName.set(81, i18n.$t("未驳船"));
statusName.set(82, i18n.$t("已驳船"));
statusName.set(91, i18n.$t("未起运"));
statusName.set(92, i18n.$t("已起运"));
statusName.set(101, i18n.$t("未上传"));
statusName.set(102, i18n.$t("已上传"));
statusName.set(111, i18n.$t("未清关文件"));
statusName.set(112, i18n.$t("已清关文件"));
statusName.set(121, i18n.$t("未到港"));
statusName.set(122, i18n.$t("已到港"));
statusName.set(131, i18n.$t("未清关"));
statusName.set(132, i18n.$t("已清关"));
statusName.set(181, i18n.$t("未卸柜"));
statusName.set(182, i18n.$t("卸柜中"));
statusName.set(183, i18n.$t("卸柜审核中"));
statusName.set(184, i18n.$t("卸柜审核失败"));
statusName.set(185, i18n.$t("卸柜审核成功"));
statusName.set(186, i18n.$t("已卸柜"));
statusName.set(191, i18n.$t("未结算"));
statusName.set(192, i18n.$t("结算中"));
statusName.set(193, i18n.$t("已结算"));
return statusName.get(statu);
}
/**
* 海运流程
*
......@@ -1537,7 +1464,6 @@ function downloadFileByUrl(funName, params) {
}
export {
getStatusName,
getColmnMapping,
getSeaStatus,
seaBaseData,
......
......@@ -44,7 +44,7 @@ import { getSupplierPage } from "@/api/ecw/supplier";
import { getChannelList } from '@/api/ecw/channel';
import { getDockPage } from "@/api/ecw/dock";
import { listUser } from "@/api/system/user";
import { getSeaStatus, getStatusName, seaAirBaseData } from "../shippingSea/utils";
import { seaAirBaseData } from "../shippingSea/utils";
import {arrryToKeyedObjectBy} from '@/utils/index'
/**
......@@ -130,12 +130,6 @@ export default {
});
},
},
watch: {
/* 监听发货对象 */
shipmentObj(val) {
this.statusLabel = getStatusName(getSeaStatus(val));
},
},
};
</script>
......
<template>
<div class="shipping-update-error">
<!-- 更新报关异常状态 -->
<div class="message-title">{{headerTitle}}</div>
<el-form ref="updateErrorForm" :rules="rules" :model="updateObj" label-width="140px">
<el-form-item :label="$t('更新类型')" prop="type">
<el-radio-group v-model="updateObj.type">
<el-radio v-for="item in this.getDictDatas(this.DICT_TYPE.BOX_SHIPPING_UPDATE_TYPE)" :key="item.value" :label="item.value">{{$l(item, 'label')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('更新订单状态')">
<el-radio-group v-model="updateObj.updateOrder">
<el-radio v-for="item in types" :key="item.value" :label="item.value">{{$l(item, 'label')}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="customize">
<el-input v-model="updateObj.customize" :placeholder="$t('请输入')" :disabled="!isEnter"></el-input>
</el-form-item>
</el-form>
<el-row class="operate-button">
<el-button type="primary" @click="onSubmit">{{$t('提交')}}</el-button>
<el-button @click="cancel">{{$t('关闭')}}</el-button>
</el-row>
</div>
</template>
<script>
import { updateAbnormalOrder } from "@/api/ecw/box";
import { serviceMsg } from "./shippingSea/utils";
export default {
name: "updateError",
inheritAttrs: false,
components: {},
props: {
shipmentObj: Object,
errorInfo: Object,
},
data() {
return {
updateObj: {},
rules: {
type: [{ required: true, message: this.$t("必填"), trigger: "change" }],
},
types: [],
isEnter: false,
headerTitle: "",
};
},
methods: {
onSubmit() {
this.$refs["updateErrorForm"].validate((valid) => {
if (valid) {
let text = "";
// 自定义
if (this.updateObj.updateOrder === "0") {
text = this.updateObj.customize;
} else {
const dict = this.types.find(
(item) => item.value === this.updateObj.updateOrder
);
text = this.$l(dict, "label");
}
const { orderList } = this.errorInfo;
updateAbnormalOrder({
shipmentId: this.shipmentObj.id,
orderIdList: orderList.map((item) => item.orderId) ?? [],
type: this.updateObj.type,
text,
}).then((res) => {
serviceMsg(res, this).then(() => {
this.$emit("closeDialog", "detail");
});
});
}
});
},
cancel() {
this.$emit("closeDialog");
},
},
watch: {
errorInfo: {
handler: function (val) {
const { errorType, orderList, operate } = val;
if (operate === "single") {
this.headerTitle = this.$t(
"确定给{selfNo}下的{orderNos}更新状态吗?",
{
selfNo: this.shipmentObj.selfNo,
orderNos: orderList.map((item) => item.orderNo).join(",") ?? "",
}
);
} else {
this.headerTitle = this.$t(
`确定给{selfNo}下的${
operate === "all" ? "所有订单" : "所选订单"
}更新状态吗?`,
{
selfNo: this.shipmentObj.selfNo,
}
);
}
switch (errorType) {
// 报关异常
case "customs":
this.types = this.getDictDatas(
this.DICT_TYPE.BOX_CUSTOMS_ERROR_TYPE
);
break;
case "shipping":
this.types = this.getDictDatas(
this.DICT_TYPE.BOX_SHIPPING_ERROR_TYPE
);
break;
case "arrival":
this.types = this.getDictDatas(
this.DICT_TYPE.BOX_ARRIVAL_ERROR_TYPE
);
break;
}
},
immediate: true,
},
"updateObj.updateOrder"(val) {
if (val === "0") {
this.isEnter = true;
this.rules.customize = [
{ required: true, message: this.$t("必填"), trigger: "change" },
];
} else {
this.isEnter = false;
this.rules.customize = [];
this.$refs["updateErrorForm"].clearValidate("customize");
}
},
},
};
</script>
<style lang="scss" scoped>
.shipping-update-error {
.message-title {
text-align: center;
font-size: 20px;
margin: 0 20px 10px;
}
}
</style>
<template>
<div>
<el-descriptions :column="4">
<el-descriptions-item label="客户编号">{{detail.customerId}}</el-descriptions-item>
<el-descriptions-item label="客户名称">{{detail.customerName}}</el-descriptions-item>
<el-descriptions-item label="跟进客服">{{detail.followUpSalesmanName}}</el-descriptions-item>
<el-descriptions-item label="创建时间">{{detail.createTime|parseTime}}</el-descriptions-item>
<el-descriptions-item label="申请凭证" :span="4">
<el-image v-for="(item, index) in pictures" :key="index" :src="item" style="width:100px; height:100px" :preview-src-list="pictures"></el-image>
</el-descriptions-item>
<el-descriptions-item label="申请原因" :span="4">{{detail.reason}}</el-descriptions-item>
</el-descriptions>
</div>
</template>
<script>
import { getApproval } from '@/api/ecw/customer';
import {parseTime} from '@/utils/ruoyi'
export default {
filters: {parseTime},
props:{
id: [String, Number]
},
data(){
return {
info: null
}
},
computed:{
detail(){
if(!this.info) return null
return JSON.parse(this.info.details)
},
pictures(){
if(!this.detail) return []
return this.detail.voucher.split(',').filter(item => !!item)
}
},
created(){
getApproval(this.id).then(res => {
this.info = res.data
})
}
}
</script>
\ No newline at end of file
<template>
<div class="app-container">
<el-card>
<el-form :model="handlerParams" ref="queryForms" size="small" :inline="true" label-width="180px" class="card">
<el-row>
<el-form-item :label="$t('客户名称')+':'">
<span style="margin-left: 8px;">{{handlerParams.customerName}}</span>
</el-form-item>
</el-row>
<el-row >
<el-form-item :label="$t('原计划掉入公海池时间')+':'">
<span style="margin-left: 8px;">{{handlerParams.orgEstimateEnterOpenSeaTime}}</span>
</el-form-item>
</el-row>
<el-row>
<el-form-item :label="$t('申请延期后掉入时间')+':'">
<el-date-picker
v-model="handlerParams.estimateEnterOpenSeaTime"
type="date"
:picker-options="pickerOptions"
value-format="timestamp"
:placeholder="$t('请输入申请延期后掉入时间')">
</el-date-picker>
</el-form-item>
</el-row>
<el-row :span="8">
<el-form-item :label="$t('凭证')+':'" size="medium" :require="true">
<upload v-model="handlerParams.voucher" :limit="1"></upload>
</el-form-item>
</el-row>
<el-row :span="8">
<el-form-item :label="$t('申请理由')+':'" size="medium">
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.reason" />
</el-form-item>
</el-row>
</el-form>
</el-card>
<!-- 只有不需要预付才需要审核 -->
<template>
<div class="page-title">{{$t('审批流程')}}</div>
<work-flow xmlkey="quotation_customer_delay_public" v-model="ccIdArr" />
</template>
<div slot="footer" class="dialog-footer">
<!-- bpmStatus
异常流程状态,1处理中2通过3不通过4已取消
待审核可能没有bpmStatus字段
-->
<template v-if="handlerParams.status == 1">
<el-button type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+handlerParams.formId)">{{$t('审核中')}}</el-button>
<el-button plain type="primary" @click="cancelAudit">{{$t('取消审核')}}</el-button>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</template>
<template v-else>
<el-button type="primary" @click="submitForm">{{$t('提交')}}</el-button>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('取消')}}</el-button>
</template>
</div>
</div>
</template>
<script>
import upload from '@/components/ImageUpload'
import {getDictData, getDictDatas} from '@/utils/dict'
import {getCustomer,getDelayInfo,creatDelayApproval,cancelDelayApproval} from '@/api/ecw/customer'
import WorkFlow from '@/components/WorkFlow'
import {cancelProcessInstance} from '@/api/bpm/processInstance'
export default {
name: "Delay",
components: {
upload, WorkFlow
},
data() {
return {
// 遮罩层
loading: false,
handlerParams:{
},
customerData:{},
showWorkFlow: false, // 是否显示工作流
dateRangeCreateTime:[],
pickerOptions: {
},
ccIdArr:[]
};
},
watch:{
ccIdArr(){
this.$set(this.handlerParams, 'ccIds', this.ccIdArr.join(','))
}
},
created() {
if(this.$route.query.id){
this.getData(this.$route.query.id)
}
},
methods: {
getData(id){
getCustomer(id).then(response => {
this.customerData = response.data
this.getDely(id)
});
},
getDely(id){
console.log(this.customerData)
let that = this
getDelayInfo({customerId:id}).then(res=>{
if(res.data){
that.handlerParams = res.data
if(!that.handlerParams.orgEstimateEnterOpenSeaTime){
that.handlerParams.orgEstimateEnterOpenSeaTime = that.getNowDate(that.customerData.enterOpenSeaTime)
}
if(that.handlerParams.estimateEnterOpenSeaTime){
that.handlerParams.estimateEnterOpenSeaTime = that.getTime(that.handlerParams.estimateEnterOpenSeaTime)
}else{
that.$set(that.handlerParams,'estimateEnterOpenSeaTime',that.customerData.estimateEnterOpenSeaTime)
}
if(that.handlerParams.ccIds){
var ids = that.handlerParams.ccIds.split(',')
ids.map(v=>{
that.ccIdArr.push(parseInt(v))
})
}
console.log(that.ccIdArr)
}else{
that.handlerParams = {
customerId:that.customerData.id,
customerName:that.customerData.name,
orgEstimateEnterOpenSeaTime: that.getNowDate(that.customerData.enterOpenSeaTime)
}
}
that.pickerOptions = {
disabledDate: (time) => {
var date = new Date(that.handlerParams.orgEstimateEnterOpenSeaTime);
return (
time.getTime() < date.getTime()
);
},
}
})
},
submitForm(){
// if(!this.handlerParams.orderExceptionHandlerResult){
// this.$modal.msgError(this.$t('请选择处理结果'));
// return
// }
// if(!this.handlerParams.fileList||this.handlerParams.fileList.length==0){
// this.$modal.msgError(this.$t('请上传报关资料'));
// return
// }
this.$set(this.handlerParams,'createTime',this.formatDate())
var params = Object.assign({},this.handlerParams)
// var ccIds = Array.isArray(this.handlerParams.ccIds) ? this.handlerParams.ccIds.join(',') : this.handlerParams.ccIds
// params.ccIds = ccIds
params.voucher = Array.isArray(this.handlerParams.voucher) ? this.handlerParams.voucher.join(',') : this.handlerParams.voucher
params.estimateEnterOpenSeaTime = this.getNowDate(this.handlerParams.estimateEnterOpenSeaTime)
creatDelayApproval(params).then(res=>{
this.$modal.msgSuccess(this.$t('提交成功'));
this.$store.dispatch('tagsView/delCurrentView')
})
},
getTime(dateTime){
var date = new Date(dateTime);
return date.getTime()
},
getNowDate(time) {
if(time){
var date = new Date(time);
}else{
var date = new Date();
}
var year = date.getFullYear() // 年
var month = date.getMonth() + 1; // 月
var day = date.getDate(); // 日
// 给一位数的数据前面加 “0”
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (day >= 0 && day <= 9) {
day = "0" + day;
}
return year + "-" + month + "-" + day
},
formatDate() {
var date = new Date()
var year = date.getFullYear()
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
},
// 取消审核
cancelAudit(){
this.$prompt("请输入取消原因", {
inputPattern: /[\S]+/,
inputErrorMessage: '不能为空'
}).then(({value}) => {
console.log(this.handlerParams.approvalId)
return cancelDelayApproval({approveId:this.handlerParams.approvalId,reason:value})
})
.then(res => {
this.$store.dispatch('tagsView/delCurrentView')
})
}
}
};
</script>
<style scoped>
.card-title{
font-size: 18px;
font-weight: bold;
margin-top: 10px;
}
.header{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.card{
margin-top: 20px;
}
.dialog-footer{
padding: 40px;
width: 60%;
align-items: center;
display: flex;
/* justify-content: space-between; */
}
</style>
......@@ -30,19 +30,23 @@
<el-input v-model="form.address" :placeholder="$t('请输入联系地址')" />
</el-form-item>
</el-col>
<el-col :span="12">
<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-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户类别')" prop="type">
<dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" form-type="checkbox" multiple v-model="form.type"></dict-selector>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('常用提货网点')" prop="pickupPoint">
<el-select v-model="form.pickupPoint" :placeholder="$t('请输入常用提货网点')">
<el-option v-for="node in nodeList"
:key="node.id" :label="node.titleZh" :value="node.id" />
</el-select>
<el-form-item :label="$t('资源类型')" prop="remarks">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" v-model="form.resourceType" formatter="number"></dict-selector>
</el-form-item>
</el-col>
<el-col :span="13" v-show="form.type && form.type.indexOf('2') !== -1">
<el-form-item :label="$t('所属代理')" prop="agentId">
<el-select filterable clearable v-model="form.agentId" :placeholder="$t('请选择所属代理')">
......@@ -167,6 +171,7 @@
<el-switch v-model="form.isShowTidanPrice"></el-switch>
</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" />
......@@ -656,7 +661,7 @@ export default {
return
}
const form = {...this.form, type: this.form.type?.join(','), taxRate: Number(this.form.taxRate)}
const form = {...this.form, type: this.form.type?.join(','), transportType: (this.form.transportType || [])?.join(','), taxRate: Number(this.form.taxRate)}
// 检查路线是否启用了但是没选择目的仓
let errors = 0
......@@ -715,6 +720,7 @@ export default {
level: 1,
country: undefined,
type: undefined,
transportType:[],
agentId: undefined,
company: undefined,
address: undefined,
......
<template xmlns="">
<div>
<el-row type="flex" style="margin-top: 15px;margin-bottom: 15px" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="22" :xl="20">
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-row :gutter="10">
<el-col :span="12">
<el-form-item :label="$t('客户名称')" prop="name">
<el-input v-model="form.name" :placeholder="$t('请输入客户名称')" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('国家')" prop="country">
<el-select filterable clearable v-model="form.country" :placeholder="$t('请选择国家')">
<el-option v-for="dict in countryList"
:key="dict.id" :label="dict.nameZh" :value="parseInt(dict.id)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户等级')" prop="level">
<el-select v-model="form.level" :placeholder="$t('请选择客户等级')" disabled>
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('联系地址')" prop="address">
<el-input v-model="form.address" :placeholder="$t('请输入联系地址')" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户类别')" prop="type">
<dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" form-type="checkbox" multiple v-model="form.type"></dict-selector>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('常用提货网点')" prop="pickupPoint">
<el-select v-model="form.pickupPoint" :placeholder="$t('请输入常用提货网点')">
<el-option v-for="node in nodeList"
:key="node.id" :label="node.titleZh" :value="node.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="13" v-show="form.type && form.type.indexOf('2') !== -1">
<el-form-item :label="$t('所属代理')" prop="agentId">
<el-select filterable 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-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('公司名称')" prop="company">
<el-input v-model="form.company" :placeholder="$t('请输入公司名称')" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户生日')" prop="birthday">
<el-date-picker
v-model="form.birthday"
type="date"
value-format="timestamp"
:placeholder="$t('请输入客户生日')">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<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-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-select>
</el-col>
</el-row>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户来源')" prop="source">
<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-col>
<el-col :span="12">
<el-form-item :label="$t('结算方式')" prop="balance">
<el-select v-model="form.balance" :placeholder="$t('请选择结算方式')">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户经理')" prop="customerService">
<el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')" :disabled="(!!(customerId !== '0' && form.customerService) || isCustomerServiceConfirmed)">
<el-option v-for="item in serviceUserList"
:key="item.id" :label="item.nickname" :value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('图片')" prop="picture">
<upload v-model="form.picture" :limit="1"></upload>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户状态')" prop="status">
<el-select v-model="form.status" :placeholder="$t('请选择客户状态')" disabled>
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('推介人')" prop="promoter">
<el-select clearable 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-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('创建人')" prop="founder">
<el-select v-model="form.founder" disabled>
<el-option
v-for="item in serviceUserList"
:key="item.id"
:label="item.nickname"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('创建时间')" prop="createTime">
<el-date-picker
v-model="form.createTime"
type="datetime"
value-format="timestamp"
disabled
:placeholder="$t('选择创建时间')">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('备注')" prop="remarks">
<el-input v-model="form.remarks" :placeholder="$t('请输入备注')"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('是否显示提单价格')" prop="remarks">
<el-switch v-model="form.isShowTidanPrice"></el-switch>
</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" />
</el-form-item>
</el-col>
<el-col :span="13">
<el-form-item :label="$t('重货标准')" prop="weightUnit">
<el-switch v-model="showZhong"/>
<el-input v-model="form.weightUnit" :placeholder="$t('请输入重货标准')" v-show="showZhong">
<template slot="append">kg/cbm</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-show="showZhong">
<el-form-item :label="$t('指定线路')" prop="line">
<el-switch v-model="showZhong1"></el-switch>
<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-col>
<el-col :span="13">
<el-form-item :label="$t('泡货标准')" prop="weightUnit">
<el-switch v-model="showPao"/>
<el-input v-model="form.lightUnit" :placeholder="$t('请输入泡货标准')" v-show="showPao">
<template slot="append">kg/cbm</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-show="showPao">
<el-form-item :label="$t('指定线路')" prop="line">
<el-switch v-model="showPao1"></el-switch>
<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-col>
</el-row>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>{{$t('联系人')}}</span>
<el-button style="float: right;" size="small" type="primary" @click="handleAddContact">+</el-button>
</div>
<el-form ref="contactForm" :rules="contactRules" :model="form">
<el-table
:data="form.customerContacts"
style="width: 100%"
>
<el-table-column
prop="department"
:label="$t('部门')"
width=""
>
<template v-slot="{ row }">
<el-form-item label="">
<el-input v-model="row.department" :placeholder="$t('请输入部门')" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="position"
:label="$t('职位')"
width=""
>
<template v-slot="{row}">
<el-form-item label="">
<el-input v-model="row.position" :placeholder="$t('请输入职位')" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="name"
:label="$t('联系人')"
>
<template slot="header">
{{$t('联系人')}} <span style="color: #ff0000">*</span>
</template>
<template v-slot="{row, cellValue, $index}">
<el-form-item :rules="contactRules.name" :prop="'customerContacts.' + $index + '.name'" label="">
<el-input v-model="row.name" :placeholder="$t('请输入联系人')" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="areaCode"
:label="$t('区号')"
>
<template slot="header">
{{$t('区号')}} <span style="color: #ff0000">*</span>
</template>
<template v-slot="{row, cellValue, $index}">
<el-form-item :rules="contactRules.areaCode" :prop="'customerContacts.' + $index + '.areaCode'" 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 + item.nameZh + '(' + item.tel + ')'" :value="item.tel" />
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="phoneNew"
:label="$t('联系方式')"
>
<template slot="header">
{{$t('联系方式')}} <span style="color: #ff0000">*</span>
</template>
<template v-slot="{row, cellValue, $index}">
<el-form-item :rules="contactRules.phoneNew" :prop="'customerContacts.' + $index + '.phoneNew'" label="">
<el-input v-model="row.phoneNew" :placeholder="$t('请输入联系方式')" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop=""
:label="$t('关联账号')"
>
<template v-slot = "{row}">
<el-form-item label="">
<!-- <el-select v-model="row.userid" clearable remote :remote-method="getUserMemberUserFn" @change="selectBD" size="mini" filterable>
<el-option v-for="(item,index) in userMemberUser" :value="item.id" :key="index" :label="item.nickname + '(' + item.mobile + ')'" ></el-option>
</el-select> -->
<MemberSelector v-model="row.userid" size="mini" />
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="social"
:label="$t('社交软件')"
>
<template v-slot="{row}">
<el-form-item label="">
<el-select v-model="row.social" :placeholder="$t('请选择社交软件')" size="mini">
<el-option v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="socialNumber"
:label="$t('社交软件号码')"
>
<template v-slot="{row}">
<el-form-item label="">
<el-input v-model="row.socialNumber" :placeholder="$t('请输入社交软件号码')" size="mini"/>
</el-form-item>
</template>
</el-table-column>
<el-table-column
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>
</template>
</el-table-column>
<el-table-column
prop="isDefault"
:label="$t('设为默认')"
>
<template v-slot="{ row, column, $index }">
<el-form-item label="">
<el-select v-model="row.isDefault" :placeholder="$t('设为默认')" @change="handleDefaultChange($index)" size="mini">
<el-option v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key="dict.value" :label="dict.label" :value="Number(dict.value)" />
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="name"
:label="$t('操作')"
>
<template v-slot="{ row, column, $index }">
<el-form-item label="">
<el-button type="danger" @click="handleDeleteContact($index)" size="mini">{{$t('删除')}}</el-button>
</el-form-item>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
<el-row :gutter="10" style="margin-top: 15px">
<el-col :span="12">
<el-form-item label="发票抬头" prop="invoiceTitle">
<el-input v-model="form.invoiceTitle" :placeholder="$t('请输入发票抬头')" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('纳税人识别号')" prop="licenseNumber">
<el-input v-model="form.licenseNumber" :placeholder="$t('请输入纳税人识别号')" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('开户行')" prop="bank">
<el-input v-model="form.bank" :placeholder="$t('请输入开户行')" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('账户')" prop="bankNumber">
<el-input v-model="form.bankNumber" :placeholder="$t('请输入账户')" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('项目')" prop="project">
<el-input v-model="form.project" :placeholder="$t('请输入项目')" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('开票地址')" prop="billingAddress">
<el-input v-model="form.billingAddress" :placeholder="$t('请输入开票地址')" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('开票电话')" prop="billingTell">
<el-input v-model="form.billingTell" :placeholder="$t('请输入开票电话')" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('税率')" prop="taxRate">
<el-input v-model="form.taxRate" :placeholder="$t('请输入税率')" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="text-align: center">
<el-button type="primary" @click="submitForm">{{$t('确 定')}}</el-button>
<el-button @click="cancel">{{$t('取 消')}}</el-button>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import upload from '@/components/ImageUpload'
import {
createCustomer,
getCustomerList,
memberUserList,
userMemberUserList,
getCustomerSelect,
getCustomerLines, fillupCustomeInfo
} from '@/api/ecw/customer'
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 {getCustomerContactsListByCustomer,getCustomer,getCustomerPage,updateCustomer} from "@/api/ecw/indirectCustomer"
import {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 MemberSelector from '@/components/MemberSelector'
export default {
name: "editIndirect",
props: {
customerId: String,
},
components: {
Template,
upload,
CustomerLineTable,
MemberSelector
},
created() {
this.isCustomerServiceConfirmed = this.$route.query.isCustomerServiceConfirmed ? true : false
this.getCustomerSelect()
this.reset()
// this.getUserMemberUserFn()
if(this.$route.query.id) {
// 编辑客户
this.customerId = this.$route.query.id
this.getCustomer(this.customerId).then(() => {
getCustomerContactsListByCustomer({customerId: this.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;
})
}
})
// 打开重泡货开关
if(this.form.weightUnit){
this.showZhong = true
}
if(this.form.lightUnit){
this.showPao = true
}
// 获取重泡货路线
getCustomerLines(this.customerId).then(res => {
console.log({getCustomerLines: res})
this.zhongLines = res.data.filter(item => item.zhongPaoType == 1)
this.paoLines = res.data.filter(item => item.zhongPaoType == 2)
if(this.zhongLines.length)this.showZhong1 = true
if(this.paoLines.length) this.showPao1 = true
// /admin-api/customer-line/get-by-customer
// /admin-api/customer-line/get-by-customer?customerId=29564
})
})
} else {
// 新建客户
this.handleAddContact()
if(this.isCustomerServiceConfirmed){
console.log(this.userId);
this.form.customerService = this.userId
}
}
getNodeList().then(r => {
this.nodeList = 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')
})
getWarehouseList().then(r => {
this.warehouseList = r.data
})
listSimpleUsers().then(r => {
this.serviceUserList = r.data
})
getCountryListAll().then(r => {
this.countryList = r.data
})
this.getZhongPao()
},
data(){
return {
isCustomerServiceConfirmed:false,
getDictDatas,
DICT_TYPE,
// 表单参数
form: {},
// 表单校验
rules: {
name: [{ required: true, message: this.$t('客户名称不能为空'), trigger: "blur" }],
country: [{ required: true, message: this.$t('国家不能为空'), trigger: "blur" }],
level: [{ required: true, message: this.$t('客户等级不能为空'), trigger: "blur" }],
type: [{ required: true, message: this.$t('客户类别不能为空'), trigger: "blur" }],
createTime: [{ required: true, message: this.$t('创建时间不能为空'), trigger: "blur" }],
source: [{ required: true, message: this.$t('客户来源不能为空'), trigger: "blur" }],
customerService: [{ required: true, message: this.$t('客户经理不能为空'), trigger: "blur" }],
status: [{ required: true, message: this.$t('客户状态不能为空'), trigger: "blur" }],
founder: [{ required: true, message: this.$t('创建人不能为空'), trigger: "blur" }],
},
contactRules: {
name: [{ required: true, message: this.$t('请输入联系人'), trigger: "blur" }],
areaCode: [{ required: true, message: this.$t('请选择区号'), trigger: "change" }],
phoneNew: [{
required: true,
trigger: "blur",
validator: this.phoneValidator
}],
},
// 网点
nodeList: [],
productTypeList: [],
productList: [],
showZhong: false,
showZhong1: false,
showPao: false,
showPao1: false,
warehouseList: [], // 仓库列表
importCityList: [], // 进口地址
customerSelect: [],
recommended:[],
serviceUserList: [],
countryList: [],
zhongLines: [], // 重货线路
paoLines: [], // 泡货线路
memberList:[],//会员列表
selectMemberList:[]//选中会员列表
}
},
methods: {
/* getUserMemberUserFn(val){
userMemberUserList({pageNo:1,pageSize:100,searchKey:val}).then(r => {
this.memberList = r.data.list
})
}, */
remoteMethod(val){
this.getCustomerSelect(val);
},
getCustomerSelect(val = ''){
getCustomerSelect({pageNo:1,pageSize:30,searchKey:val}).then(res => {
this.customerSelect = res.data.list
})
},
phoneValidator(rule, value, callback){
if (!value) {
return callback(new Error(this.$t('请输入联系方式')));
}
validatorMobile({
code: this.form.customerContacts.find(e => e.phoneNew === value).areaCode,
mobile: value
}).then(r => {
if (r.data){
callback()
} else {
callback(new Error(r.msg || this.$t('手机号验证失败')))
}
}).catch(e => {
console.error(e)
callback(new Error(this.$t('手机号验证失败')))
})
},
handleDefaultChange($index){
// 只有一个联系人,设置成非默认
if (this.form.customerContacts.length === 1 && this.form.customerContacts[0].isDefault === 0){
this.$modal.msgWarning(this.$t('至少拥有一个默认联系人'))
this.form.customerContacts[0].isDefault = 1
return
}
// 设置默认联系人
if (this.form.customerContacts[$index].isDefault === 1) {
// 其他的置否
let i = 0
this.form.customerContacts.forEach(e => {
if (i !== $index){
e.isDefault = 0
}
i++
})
} else {
// 第一个置是
this.form.customerContacts[0].isDefault = 1
}
},
/* selectBD(val){
if(!val){
return
}
let i = this.selectMemberList.find(item => item.id === val);
if(i === undefined){
this.selectMemberList.push(this.memberList.find(item => item.id === val))
}
// this.getUserMemberUserFn()
}, */
/** 取消按钮 */
cancel() {
this.$tab.closePage()
this.open = false;
this.reset();
},
/** 提交按钮 */
submitForm() {
if(this.form.customerContacts.length === 0){
this.$modal.alert(this.$t('至少添加一位联系人'))
return
}
this.$refs["contactForm"].validate((valid1,err1) => {
this.$refs["form"].validate((valid2,err2) => {
if (!valid1 || !valid2) {
this.$showFormValidateErrors({...err1,...err2})
return;
}
if (this.form.customerContacts.length === 0){
this.$modal.msgError(this.$t('至少填写一个联系人信息'));
return
}
const form = {...this.form, type: this.form.type?.join(','), taxRate: Number(this.form.taxRate)}
// 检查路线是否启用了但是没选择目的仓
let errors = 0
form.customerLines.forEach(line => {
if(!line.objectiveIds || line.objectiveIds == ''){
errors ++
}
})
if(errors){
return this.$message.error('有两条路线未选择目的地')
}
// 修改的提交
if (this.form.id != null) {
this.form.customerContacts.forEach(e => {
e.customerId = this.customerId
})
if(this.$route.name === 'perfect'){
fillupCustomeInfo(form).then(r => {
this.$modal.msgSuccess(this.$t('修改成功'));
this.open = false;
const obj = { path: "/customer/customer" };
this.$tab.closeOpenPage(obj);
})
}else {
updateCustomer(form).then(response => {
this.$modal.msgSuccess(this.$t('修改成功'));
this.open = false;
// this.getList();
const obj = { path: "/customer/customer" };
this.$tab.closeOpenPage(obj);
})
}
return;
}
// 添加的提交
//我的客户页面跳转直接
// form.isCustomerServiceConfirmed = true;
// createCustomer(form).then(response => {
// this.$modal.msgSuccess(this.$t('新增成功'));
// this.open = false;
// // this.getList();
// const obj = { path: "/customer/customer" };
// this.$tab.closeOpenPage(obj);
// })
});
})
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
number: undefined,
name: undefined,
level: 1,
country: undefined,
type: undefined,
agentId: undefined,
company: undefined,
address: undefined,
productType: undefined,
productId: undefined,
pickupPoint: undefined,
memberId: undefined,
birthday: undefined,
balance: undefined,
source: undefined,
picture: undefined,
customerService: undefined,
customerContacts: [],
customerLines: [],
lightUnit: undefined,
promoter: undefined,
status: 1,
founder: this.$store.getters.userId,
department: undefined,
invoiceTitle: undefined,
licenseNumber: undefined,
bank: undefined,
bankNumber: undefined,
project: undefined,
billingAddress: undefined,
billingTell: undefined,
taxRate: undefined,
remarks: undefined,
arrivalConfirm: undefined,
weightUnit: undefined,
createTime: undefined,
isShowTidanPrice:true,
};
this.form.createTime = (new Date()).getTime()
this.resetForm("form");
},
getCustomer(id) {
return getCustomer(id).then(response => {
this.form = { ...this.form, ...response.data, id: this.customerId };
this.open = true;
this.title = this.$t('修改客户');
});
},
updateCustomerLines() {
let zhongLines = [], paoLines = []
if (this.zhongLines.length > 0) {
zhongLines = this.zhongLines
}
if (this.paoLines.length > 0) {
paoLines = this.paoLines
}
this.form.customerLines = [...zhongLines, ...paoLines]
},
handleAddContact() {
this.form.customerContacts.push({
"areaCode": "",
// "customerId": 0,
"department": "",
"email": "",
"isDefault": this.form.customerContacts.length === 0 ? 1 : 0,
"name": "",
"phoneNew": "",
"position": "",
"social": undefined,
"socialNumber": "",
"userid": undefined,
// "username": ""
})
},
handleDeleteContact($index){
this.form.customerContacts.splice($index, 1)
if (this.form.customerContacts.length > 0) {
this.$refs['contactForm'].clearValidate()
if (!this.form.customerContacts.find(e => e.isDefault)){
this.form.customerContacts[0].isDefault = 1
}
}
},
getZhongPao(){
getZhongPaoBest({
customerId: this.customerId,
// departureId: this.departureId,
// objectiveId: this.objectiveId
}).then(r => {
this.form.weightUnit = r.data.zhongEdge
this.form.lightUnit = r.data.paoEdge
})
}
},
computed: {
userId(){
return this.$store.state.user.id
},
/* userMemberUser(){
let list = this.memberList.filter(item => {
return this.selectMemberList.findIndex(i => i.id === item.id) < 0
})
return [...this.selectMemberList,...list]
}, */
productListFilter(){
return this.productList.filter((p) => p.typeId === this.form.productType)
},
customerSelectFn(){
if(this.recommended.length > 0){
let i = this.customerSelect.find(item => item.id === this.recommended[0].id)
if(!i){
this.customerSelect.push(this.recommended[0])
}
return this.customerSelect
}else {
return this.customerSelect
}
}
},
watch: {
zhongLines() {
console.log('zhongLines', this.zhongLines)
this.updateCustomerLines()
},
paoLines() {
console.log('paoLines', this.paoLines)
this.updateCustomerLines()
}
}
}
</script>
<style scoped lang="scss">
::v-deep .el-table__cell {
padding-bottom: 0;
.cell {
.el-form-item {
margin-bottom: 9px;
}
.el-form-item__error {
z-index: 1;
padding-top: 0;
top: 32px;
}
}
}
</style>
......@@ -84,7 +84,12 @@
width="55">
</el-table-column>
<el-table-column :label="$t('客户编号')" align="center" prop="number" />
<el-table-column :label="$t('客户名称')" align="center" prop="name" />
<el-table-column :label="$t('客户名称')" align="center" prop="name">
<template slot-scope="{row}">
{{row.name}} <el-tag v-if="row.isInOpenSea" size="mini"></el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('客户等级')" align="center" prop="vipLevelNameZh">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL" :value="scope.row.level" />
......@@ -107,11 +112,23 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('入公海时间')" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.enterOpenSeaTime) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerService" :formatter="customerServiceFn">
</el-table-column>
<el-table-column :label="$t('出货渠道')">
<template slot-scope="{row}">
<dict-tag v-if="row.transportType" v-for="item in row.transportType.split(',')" :type="DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE" :value="item"></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('国家')" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- <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>-->
<el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)"
v-hasPermi="['ecw:customer:query']">{{$t('查看')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
......@@ -120,6 +137,7 @@
v-hasPermi="['ecw:customer:delete']">{{$t('删除')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-collection" @click="followUp(scope.row)">{{$t('跟进')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-user" @click="complaint(scope.row)">{{$t('客诉')}}</el-button>
<el-button :disabled="scope.row.isInOpenSea" size="mini" type="text" icon="el-icon-user" @click="delay(scope.row)">{{$t('延期')}}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -480,8 +498,10 @@
</template>
<script>
import { createCustomer, updateCustomer, deleteCustomer, getCustomer,
getCustomerPage, exportCustomerExcel } from "@/api/ecw/customer";
import {
createCustomer, updateCustomer, deleteCustomer, getCustomer,
getCustomerPage, exportCustomerExcel, testEnterToOpenSea
} from "@/api/ecw/customer";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import {CommonStatusEnum} from '@/utils/constants'
import { uploadFile } from "@/api/infra/file";
......@@ -505,6 +525,7 @@ export default {
},
data() {
return {
env:process.env.NODE_ENV,
getDictDatas,
DICT_TYPE,
// 遮罩层
......@@ -683,6 +704,15 @@ export default {
handleView(row) {
this.$router.push('/customer/query/' + row.id)
},
/** 调入公海池测试用 */
seasPond(row) {
testEnterToOpenSea(row.id).then(r => {
if(r.code === 0){
this.$t('调入公海池成功!')
this.getList();
}
})
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$router.push('/customer/edit/' + row.id)
......@@ -753,6 +783,10 @@ export default {
this.$refs.CustomerFollowList.customerFollow.dialogVisible = true;
})
},
delay(row){
this.$router.push({path:'/customer/delay',query:{id:row.id}})
},
complaint(row){
this.customerId = row.id;
this.$nextTick(()=>{
......
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('客户名称')" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入客户名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('联系方式')">
<el-input :placeholder="$t('请输入联系方式')" v-model="queryParams.defaultContactPhone"></el-input>
</el-form-item>
<el-form-item :label="$t('客户经理')" prop="customerService">
<el-select clearable v-model="queryParams.customerService" :placeholder="$t('请选择客户经理')" clearable size="small">
<el-option v-for="dict in customerServiceList"
:key="dict.id" :label="dict.nickname" :value="dict.id"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('客户来源')" prop="source">
<el-select clearable v-model="queryParams.source" :placeholder="$t('请选择客户来源')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker clearable v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</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-table ref="multipleTable" v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column :label="$t('客户名称')" align="center" prop="name" >
<template v-slot="scope">
<router-link :to="{path: '/customer/indirectInfo',query: {id: scope.row.id}}" class="link-type">
<span>{{ scope.row.name }}</span>
</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('联系方式')" prop="defaultContactPhone">
<template v-slot="{row}">
+{{row.defaultContactPhone}}
</template>
</el-table-column>
<el-table-column :label="$t('客户来源')" align="center" prop="sourse">
<template v-slot="{row}">
<span>{{row.agentCustomerName}}</span>
<!-- <dict-tag :value="row.resourceType" :type="DICT_TYPE.CUSTOMER_SOURCE" /> -->
</template>
</el-table-column>
<el-table-column :label="$t('资源类型')" align="center" prop="resourceType">
<template v-slot="{row}">
<dict-tag :value="row.resourceType" :type="DICT_TYPE.CUSTOMER_ESOURCE_TYPE" />
</template>
</el-table-column>
<el-table-column :label="$t('客户类别')" align="center" prop="sourse">
<template v-slot="{row}">
<dict-tag :value="row.type" :type="DICT_TYPE.CUSTOMER_TYPE" />
</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>
</template>
</el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerService" :formatter="customerServiceFn">
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-user" @click="delay(scope.row)">{{$t('完善')}}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
</div>
</template>
<script>
import {updateCustomer, getCustomer,
getCustomerPage, exportCustomerExcel } from "@/api/ecw/indirectCustomer";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import {listServiceUser} from "@/api/system/user";
export default {
name: "IndirectCustomer",
data() {
return {
getDictDatas,
DICT_TYPE,
// 遮罩层
loading: true,
// 导出遮罩层
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 客户列表
list: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
dateRangeCreateTime: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
name: null,
source: null,
customerService: null,
},
// 网点
nodeList: [],
customerId:undefined,
customerServiceList:[],
};
},
created() {
this.getList();
listServiceUser().then(r=>{
this.customerServiceList = r.data;
})
},
methods: {
customerServiceFn(val){
if(this.customerServiceList.length > 0){
let index =this.customerServiceList.findIndex(item => item.id === val.customerService);
return index !== -1 ? this.customerServiceList[index]?.nickname :''
}else {
return ''
}
},
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行查询
getCustomerPage(params).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.resetForm("queryForm");
this.queryParams = {
pageNo: 1,
pageSize: 10,
name: null,
source: null,
customerService: null,
}
this.handleQuery();
},
delay(row){
this.$router.push({path:'/customer/editIndirect',query:{id:row.id}})
},
handleSelectionChange(val){
}
}
};
</script>
<template>
<div>
<el-row type="flex" style="margin-top: 15px;margin-bottom: 15px" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16">
<div style="display: flex;justify-content: space-between;align-items: flex-end;">
<h2>{{$t('查看')}}</h2>
<div>
<el-button type="primary" size="small" @click="$router.push('/customer/edit/' + id)">{{$t('编辑')}}</el-button>
<!-- <el-button @click="$router.push('/offer/create')" type="primary" size="small">{{$t('报价')}}</el-button>
<el-button type="primary" size="small" @click="$refs['customerFollow'].customerFollow.dialogVisible = true">{{$t('跟进')}}</el-button>
<el-button type="primary" size="small" @click="$refs['customerComplaint'].handleAdd()">{{$t('客诉')}}</el-button> -->
<el-button type="danger" size="small">{{$t('删除')}}</el-button>
</div>
</div>
<el-card style="margin-top: 15px;">
<el-descriptions :column="4" border>
<el-descriptions-item :label="$t('客户编号')">{{ customer.number }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户名称')">{{ customer.name }}</el-descriptions-item>
<el-descriptions-item :label="$t('结算方式')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_BALANCE, customer.balance) }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户生日')">{{ parseTime(customer.birthday, '{y}-{m}-{d}') }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户等级')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}</el-descriptions-item>
<el-descriptions-item :label="$t('国家')">{{ country }}</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('客户类别')">{{ getDictDatas2(DICT_TYPE.CUSTOMER_TYPE, (customer.type||'').split(',')).map(e => e.label).join(', ') }}</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('联系方式')">{{ customer }}</el-descriptions-item>-->
<el-descriptions-item :label="$t('推介人')">{{ promoter }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户经理')">{{ customerService }}</el-descriptions-item>
<el-descriptions-item :label="$t('公司名称')">{{ customer.company }}</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('状态')">{{ 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('图片')">
<el-image v-show="!!customer.picture" :src="customer.picture" style="width: 100px;height: 100px"></el-image>
</el-descriptions-item>
<el-descriptions-item :label="$t('备注')">{{ customer.remarks }}</el-descriptions-item>
<!-- <el-descriptions-item label="信用等级">{{ customer }}</el-descriptions-item>-->
</el-descriptions>
</el-card>
<el-card style="margin-top: 15px">
<h3>{{$t('联系人')}}</h3>
<el-table
:data="customerContacts"
style="width: 100%"
border
>
<el-table-column
prop="department"
:label="$t('部门')"
>
</el-table-column>
<el-table-column
prop="position"
:label="$t('职位')"
>
</el-table-column>
<el-table-column
prop="name"
:label="$t('联系人')"
>
</el-table-column>
<el-table-column
prop="phoneNew"
:label="$t('联系方式')"
>
<template v-slot="{row}">
{{ row.areaCode + row.phoneNew }}
</template>
</el-table-column>
<el-table-column
prop="userid"
:label="$t('关联账号')"
:formatter="userIdFormatter"
>
</el-table-column>
<el-table-column
prop="social"
:label="$t('社交软件')"
:formatter="(row, column, cellValue) => getDictDataLabel(DICT_TYPE.SOCIAL, cellValue)"
>
</el-table-column>
<el-table-column
prop="socialNumber"
:label="$t('社交软件号码')"
>
</el-table-column>
<el-table-column
prop="email"
:label="$t('邮箱')"
>
</el-table-column>
</el-table>
</el-card>
<!-- <el-tabs style="margin-top: 15px" type="border-card">
<el-tab-pane :label="$t('订单')">
<el-card class="box-card">
<div slot="header" class="clearfix">
<el-form :inline="true">
<el-form-item :label="$t('运输方式:')">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportType" formatter="number" />
</el-form-item>
<el-form-item :label="$t('订单状态:')">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status"/>
</el-form-item>
<el-form-item :label="$t('报关方式:')">
<dict-selector
:type="DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model="queryParams.customerType"
/>
</el-form-item>
<el-form-item :label="$t('控货')">
<dict-selector
:type="DICT_TYPE.INFRA_BOOLEAN_STRING"
v-model="queryParams.isCargoControl"
/>
</el-form-item>
<el-form-item :label="$t('入仓时间:')">
<el-date-picker v-model="rucangtime"
@change="changeDate"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
type="daterange"
range-separator="-"
:start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getorderList">{{$t('搜索')}}</el-button>
<el-button type="primary" @click="()=>{
queryParams = { rows:10,page:1}; getorderList()
}">{{$t('重置')}}</el-button>
</el-form-item>
</el-form>
</div>
<el-table :data="orderList">
<el-table-column :label="$t('订单编号')" width="120px" align="center" prop="orderNo" >
<template slot-scope="scope">
<router-link :to="{path: '/order/detail',query: {orderId: scope.row.orderId}}" class="link-type">
<span>{{ scope.row.orderNo }}</span>
</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('总箱数/入仓箱数')" align="center" prop="sumNum">
<template slot-scope="{row}">
{{row.totalNum}}{{$t('')}}/{{row.sumNum}}{{$t('')}}
</template>
</el-table-column>
<el-table-column :label="$t('体积/重量')" align="center" prop="sumWeight">
<template slot-scope="{row}">
//入仓前是填单数据,入仓后是入仓数据
<template v-if="row.inWarehouseState <= 1">{{row.costVO.totalVolume}}m³ /{{row.costVO.totalWeight}}Kg</template>
<template v-else>{{row.sumVolume}}m³ /{{row.sumWeight}}Kg</template>
</template>
</el-table-column>
<el-table-column :label="$t('始发仓')" align="center" prop="departureName" />
<el-table-column :label="$t('运输方式/目的地')" align="center" prop="transportId">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" /> / {{row.objectiveName}}
</template>
</el-table-column>
<el-table-column :label="$t('控货')" align="center" prop="transportId">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="row.isCargoControl" />
</template>
</el-table-column>
<el-table-column :label="$t('订单状态')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
</el-table>
<pagination @pagination="getorderList" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="orderTotal" ></pagination>
</el-card>
</el-tab-pane>
<el-tab-pane :label="$t('报价')">
<el-table
:data="infoListOfferList"
style="width: 100%"
>
<el-table-column
type="index"
:label="$t('序号')"
>
</el-table-column>
<el-table-column
prop="number"
:label="$t('报价单号')"
>
</el-table-column>
<el-table-column
prop="orderNo"
:label="$t('订单号')"
>
</el-table-column>
<el-table-column
prop="consignorName"
:label="$t('客户名称')"
>
</el-table-column>
<el-table-column
prop="objectiveName"
:label="$t('目的地')"
>
</el-table-column>
<el-table-column
:label="$t('销售阶段')"
>
<template v-slot="{row}">
{{STATUS[row.status]}}
</template>
</el-table-column>
<el-table-column
prop="stopTime"
:label="$t('预计结束时间')"
>
</el-table-column>
<el-table-column
prop="businessManagerName"
:label="$t('负责人')"
>
</el-table-column>
</el-table>
<pagination @pagination="getInfoListOfferPage" :page.sync="infoListOfferFrom.pageNo" :limit.sync="infoListOfferFrom.pageSize" :total="infoListOfferTotal" ></pagination>
</el-tab-pane>
<el-tab-pane :label="$t('跟进')">
<customer-follow ref="customerFollow" :id="id" :customer-id="id"></customer-follow>
</el-tab-pane>
<el-tab-pane :label="$t('客户投诉')">
<customer-complaint ref="customerComplaint" :customer-id="id" hidden-search></customer-complaint>
</el-tab-pane>
<el-tab-pane :label="$t('账单')">
<el-table style="width: 100%" :data="infoListReceiptList">
<el-table-column :label="$t('序号')" type="index"></el-table-column>
<el-table-column :label="$t('账单')" prop="receiptNo"></el-table-column>
<el-table-column :label="$t('订单号')" prop="orderNo"></el-table-column>
<el-table-column :label="$t('箱数')" prop="num"></el-table-column>
<el-table-column :label="$t('方数')" prop="volume" ></el-table-column>
<el-table-column :label="$t('重量')" prop="weight" ></el-table-column>
<el-table-column :label="$t('类型')">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.PAYMENT_TYPE" :value="row.collectionType" />
</template>
</el-table-column>
<el-table-column :label="$t('费用类型')">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.FEE_TYPE" :value="row.feeType" />
</template>
</el-table-column>
<el-table-column :label="$t('金额')" prop="totalAmount">
</el-table-column>
<el-table-column :label="$t('已核销比例')" prop="writeOffScale"></el-table-column>
<el-table-column :label="$t('实收日期')" prop="writeOffAt"></el-table-column>
<el-table-column :label="$t('业务员')" prop="salesmanName"></el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane :label="$t('数据')">
<el-descriptions :column="2">
<el-descriptions-item :label="$t('海空联运/海运拼柜/海运整柜/专线空运')">{{orderStatisticsObj.hklyTotal || 0}}/{{orderStatisticsObj.hypgTotal || 0 }}/{{orderStatisticsObj.hyzgTotal || 0}}/{{orderStatisticsObj.zxkyTotal || 0}}</el-descriptions-item>
<el-descriptions-item :label="$t('最后交易日期')">{{orderStatisticsObj.lastBusinessDate}}</el-descriptions-item>
<el-descriptions-item :label="$t('全部订单/控货订单')">{{orderStatisticsObj.allOrderTotal || 0}}/{{orderStatisticsObj.controlOrderTotal || 0}}</el-descriptions-item>
<el-descriptions-item :label="$t('最后交易单号')">{{orderStatisticsObj.lastBusinessOrderNo}}</el-descriptions-item>
<el-descriptions-item :label="$t('报价/下单/入仓')">{{orderStatisticsObj.offerOrderTotal || 0}}/{{orderStatisticsObj.pickOrderTotal || 0}}/{{orderStatisticsObj.wareHousingTotal || 0}}</el-descriptions-item>
<el-descriptions-item :label="$t('储存量')">{{orderStatisticsObj.stock || 0}}</el-descriptions-item>
<el-descriptions-item :label="$t('已出货订单')">{{orderStatisticsObj.shipmentTotal || 0}}</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane :label="$t('品牌授权')">
<el-table border style="width:100%" :data="brandAuthorizationList">
<el-table-column type="index" :prop="$t('序号')"></el-table-column>
<el-table-column :label="$t('中文标题')" prop="titleZh" ></el-table-column>
<el-table-column prop="titleEn" :label="$t('英文标题')"></el-table-column>
<el-table-column :label="$t('有无备案')">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.BRAND_REG_TYPE" :value="row.filing" />
</template>
</el-table-column>
<el-table-column :label="$t('授权开始')">
<template v-slot="{row}">
{{parseTime(row.startTime)}}
</template>
</el-table-column>
<el-table-column :label="$t('授权结束')">
<template v-slot="{row}">
{{parseTime(row.endTime)}}
</template>
</el-table-column>
<el-table-column :label="$t('授权证明')">
<template v-slot="{row}">
<div v-if="!!row.fileUrl && row.fileUrl.length > 0">
<span v-for="(item, index) in (row.fileUrl||'').split(',')">
<a :href="item" target="_blank">{{$t('附件')}}{{ index + 1 }}</a>,
</span>
</div>
</template>
</el-table-column>
<el-table-column
prop="feeScale"
:formatter="(row) => getDictDataLabel(DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL, row.feeScale)"
:label="$t('收费标准')">
</el-table-column>
<el-table-column
prop="createUsername"
:label="$t('添加人')">
</el-table-column>
<el-table-column :label="$t('创建时间')">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
</template>
</el-table-column>
</el-table>
<pagination v-show="brandAuthorizationTotal > 0" :total="brandAuthorizationTotal" :page.sync="brandAuthorizationFrom.pageNo" :limit.sync="brandAuthorizationFrom.pageSize"
@pagination="getBrankByCustomerList"/>
</el-tab-pane>
<el-tab-pane :label="$t('信用日志')">
<el-card class="box-card">
<div slot="header" class="clearfix">
<el-button style="float: right;" type="primary" @click="dialogVisible = true" >{{$t('添加信用日志')}}</el-button>
<el-descriptions :column="5" border>
<el-descriptions-item v-for="(item,index) in creditScoreStatisticObj" :key="index" :label="creditScoreCalculation(item.type)">{{item.score}}</el-descriptions-item>
</el-descriptions>
</div>
<el-table :data="customerCreditLogList">
<el-table-column :label="$t('序号')" type="index"></el-table-column>
<el-table-column prop="name" :label="$t('规则名称')"></el-table-column>
<el-table-column prop="type" :label="$t('规则分类')">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE" :value="row.type" />
</template>
</el-table-column>
<el-table-column prop="score" :label="$t('规则得分')"></el-table-column>
<el-table-column prop="remark" :label="$t('备注')"></el-table-column>
<el-table-column :label="$t('添加人')" prop="createName"></el-table-column>
<el-table-column :label="$t('时间')">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
</template>
</el-table-column>
</el-table>
<pagination @pagination="creditLogPage" :page.sync="customerCreditLogFrom.pageNo" :limit.sync="customerCreditLogFrom.pageSize" :total="customerCreditLogFrom.total" ></pagination>
</el-card>
</el-tab-pane>
<el-tab-pane :label="$t('等级日志')">
<el-table style="width: 100%" :data="getCustomerGradeList">
<el-table-column :label="$t('序号')" type="index"></el-table-column>
<el-table-column :label="$t('规则名称')" prop="name"></el-table-column>
<el-table-column :label="$t('规则分类')" prop="type">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.CUSTOMER_LEVEL_RULE_TYPE" :value="row.type" />
</template>
</el-table-column>
<el-table-column :label="$t('规则得分')" prop="score"></el-table-column>
<el-table-column :label="$t('备注')" prop="remark"></el-table-column>
<el-table-column :label="$t('时间')">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
</template>
</el-table-column>
</el-table>
<pagination @pagination="getCustomerGrade" :page.sync="getCustomerGradeFrom.pageNo" :limit.sync="getCustomerGradeFrom.pageSize" :total="getCustomerGradeFrom.total" ></pagination>
</el-tab-pane>
</el-tabs>-->
</el-col>
</el-row>
<el-dialog
:visible.sync="dialogVisible"
width="30%"
>
<h1 slot="title">
{{$t('给客户')}}{{customer.name}}{{$t('添加信用日志')}}
</h1>
<el-form label-width="100">
<el-form-item :label="$t('客户编号:')">{{customer.number}}</el-form-item>
<el-form-item :label="$t('信用类别')">
<el-select v-model="creditFrom.ruleId">
<el-option v-for="(item,index) in creditTypeList" :key="index" :value="item.id" :label="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="creditTypeList.length > 0" :label="$t('信用分')">{{(creditTypeList.find(r=>creditFrom.ruleId === r.id) || {}).score }}{{$t('')}}</el-form-item>
<el-form-item :label="$t('备注')">
<el-input type="textarea" v-model="creditFrom.remark"> </el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="submit">{{$t('提交')}}</el-button>
<el-button @click="dialogVisible = false" >{{$t('取消')}}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getCustomerSelect,
getBrankByCustomer,
levelLogPage,
customerCreditLogPage,
infoListOrderPage,
infoListOfferPage,
orderStatistics,
creditLogCreate,
creditScoreStatistic,
infoListReceiptPage, memberUserList
} from '@/api/ecw/customer'
import { DICT_TYPE, getDictDataLabel, getDictDatas2 } from '@/utils/dict'
import { getProductTypeList } from '@/api/ecw/productType'
import { getNodeList } from '@/api/ecw/node'
import CustomerFollow from "@/components/CustomerFollow"
import { parseTime } from '@/utils/ruoyi'
import CustomerComplaint from '@/views/ecw/customerComplaint'
import { listServiceUser } from '@/api/system/user'
import { getCustomerContactsListByCustomer,getCustomer } from '@/api/ecw/indirectCustomer'
import {getOrderPage} from "@/api/ecw/order";
import Template from "@/views/cms/template";
import {getCreditRulePage} from "@/api/customer/creditRule";
import {getCountry} from "@/api/ecw/country"
export default {
name: 'IndirectInfo',
components: {
Template,
CustomerFollow,
CustomerComplaint
},
created() {
//获取信用类型
if(this.$route.query.id){
this.id = this.$route.query.id
}
getCreditRulePage({page:1,rows:999,type:2}).then(r => {
this.creditTypeList = r.data.list
})
getNodeList().then(r => {
this.nodeList = r.data
})
getCustomer(this.id).then(response => {
this.customer = { ...this.customer, ...response.data }
console.log(this.id)
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
})
})
getCountry(this.customer.country ? this.customer.country : 0 ).then(r => {
this.country = r.data.nameZh
})
})
getProductTypeList().then(r => {
this.productTypeList = r.data
})
getCustomerSelect().then(r => {
this.customerSelect = r.data.list
})
listServiceUser().then(r => {
this.serviceUserList = r.data
})
this.getBrankByCustomerList()
this.getCustomerGrade()
this.creditLogPage()
this.getorderList()
this.getInfoListOfferPage()
this.getOrderStatistics()
this.creditScoreStatisticFn()
this.infoListReceiptFn()
},
data() {
return {
STATUS:{
0:this.$t('取消报价'),
1:this.$t('特价审批中'),
2:this.$t('需求确认'),
3:this.$t('跟进中'),
4:this.$t('赢单'),
5:this.$t('输单'),
6:this.$t('报价完成')
},
dialogVisible:false,
DICT_TYPE,
getDictDataLabel,
getDictDatas2,
parseTime,
nodeList: [],
id:0,
productTypeList: [],
customerSelect: [],
serviceUserList: [],
customerContacts: [],
memberList: [],
customer: {
id: undefined,
number: undefined,
name: undefined,
level: undefined,
country: undefined,
type: undefined,
agentId: undefined,
company: undefined,
address: undefined,
productType: undefined,
productId: undefined,
pickupPoint: undefined,
memberId: undefined,
birthday: undefined,
balance: undefined,
source: undefined,
picture: undefined,
customerService: undefined,
customerLines: [],
promoter: undefined,
status: undefined,
founder: undefined,
department: undefined,
invoiceTitle: undefined,
licenseNumber: undefined,
bank: undefined,
bankNumber: undefined,
project: undefined,
billingAddress: undefined,
billingTell: undefined,
taxRate: undefined,
remarks: undefined,
arrivalConfirm: undefined,
weightUnit: undefined,
createTime: undefined
},
brandAuthorizationFrom:{
pageNo:1,
pageSize:10,
},
brandAuthorizationList:[],
brandAuthorizationTotal:0,
getCustomerGradeFrom:{
pageNo:1,
pageSize:10,
total:0
},
getCustomerGradeList:[],
customerCreditLogFrom:{
pageNo:1,
pageSize:10,
total:0
},
customerCreditLogList:[],
rucangtime:[],
queryParams:{
pageSize:10,
pageNo:1
},
orderList:[],
orderTotal:0,
infoListOfferFrom:{
pageNo:1,
pageSize:10,
},
infoListOfferTotal:0,
infoListOfferList:[],
orderStatisticsObj:{},
creditTypeList:[],
creditFrom:{},//添加信用 日志
creditScoreStatisticObj:[],
infoListReceiptList:[],
infoListReceiptFrom:{
pageNo:1,
pageSize:10,
},
infoListReceiptTotal:0,
country: ''
}
},
computed: {
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() {
console.log(this.customerSelect,'this.customerSelect.find');
return this.customerSelect.find(e => e.id === this.customer.promoter)?.name || ''
},
customerService() {
return this.serviceUserList.find(e => e.id === this.customer.customerService)?.nickname || ''
},
id() {
return this.customerId ? parseInt(this.customerId) : undefined
},
creditScoreCalculation(){
return (val)=>{
if(val === 'all'){
return this.$t('信用分')
}else{
return (this.getDictDatas(DICT_TYPE.CUSTOMER_CREDIT_RULE_TYPE).find(i => i.value === val)||{}).label
}
}
}
},
methods:{
userIdFormatter(row, column, cellValue){
const member = this.memberList.find(e => e.id === cellValue)
if (member) {
return member.nickname + '(' + member.mobile + ')'
} else {
return ''
}
},
changeDate(val){
if(val){
this.queryParams.houseStartDate = val[0];
this.queryParams.houseEndDate = val[1];
}else {
this.queryParams.houseStartDate = undefined;
this.queryParams.houseEndDate = undefined;
}
},
//品牌授权
getBrankByCustomerList(){
getBrankByCustomer({...this.brandAuthorizationFrom,customerId:this.id}).then(r => {this.brandAuthorizationList = r.data.list; this.brandAuthorizationTotal = r.data.total})
},
getCustomerGrade(){
levelLogPage({...this.getCustomerGradeFrom,customerId:this.id,total:undefined}).then(r => {
console.log(r,'客户等级');
if(r.code === 0){
this.getCustomerGradeList = r.data.list;
this.getCustomerGradeFrom.total = r.data.total;
}
})
},
// 获取信用等级日志列表
creditLogPage(){
customerCreditLogPage({...this.customerCreditLogFrom,customerId:this.id}).then(r => {
if(r.code === 0){
console.log(r,'r');
this.customerCreditLogList = r.data.list;
this.customerCreditLogFrom.total = r.data.total;
}
})
},
//订单
getorderList(){
infoListOrderPage({customerId:this.id,...this.queryParams}).then(r => {
console.log(r)
if(r.code === 0){
this.orderList = r.data.list
this.orderTotal = r.data.total
}
})
},
// 客户报价
getInfoListOfferPage(){
infoListOfferPage({...this.infoListOfferFrom,customerId:this.id}).then(r => {
this.infoListOfferList = r.data.list;
this.infoListOfferTotal = r.data.total;
}).catch(r => {
})
},
// 数据
getOrderStatistics(){
orderStatistics({customerId:this.id}).then(r => {
console.log(r,'数据')
if(r.code === 0){
this.orderStatisticsObj = r.data
}
})
},
submit(){
creditLogCreate({customerId:this.id,...this.creditFrom}).then(r => {
if(r.code === 0){
this.creditLogPage();
this.creditFrom = {};
this.dialogVisible = false;
}
})
},
//获得信用客户统计
creditScoreStatisticFn(){
creditScoreStatistic({customerId:this.id}).then(r => {
console.log(r)
if(r.code === 0) this.creditScoreStatisticObj = r.data
})
},
// 获取账单数据
infoListReceiptFn(){
infoListReceiptPage({...this.infoListReceiptFrom,customerId:this.id}).then(r => {
console.log(r)
if(r.code === 0){
this.infoListReceiptList = r.data.list;
this.infoListReceiptTotal = r.data.total;
}
})
}
}
}
</script>
<style scoped>
</style>
......@@ -18,6 +18,12 @@
<el-descriptions-item :label="$t('客户名称')">{{ customer.name }}</el-descriptions-item>
<el-descriptions-item :label="$t('结算方式')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_BALANCE, customer.balance) }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户生日')">{{ parseTime(customer.birthday, '{y}-{m}-{d}') }}</el-descriptions-item>
<el-descriptions-item :label="$t('出货渠道')">
<dict-tag v-if="customer.transportType" v-for="item in customer.transportType.split(',')" :type="DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE" :value="item"></dict-tag>
</el-descriptions-item>
<el-descriptions-item :label="$t('资源类型')">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMER_RESOURCE_TYPE" :value="customer.resourceType"></dict-tag>
</el-descriptions-item>
<el-descriptions-item :label="$t('客户等级')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_LEVEL, customer.level) }}</el-descriptions-item>
<el-descriptions-item :label="$t('国家')">{{ country }}</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('业务员')">{{ customer }}</el-descriptions-item>-->
......@@ -110,7 +116,7 @@
<el-form-item :label="$t('报关方式:')">
<dict-selector
:type="DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model="queryParams.customerType"
v-model="queryParams.customsType"
/>
</el-form-item>
<el-form-item :label="$t('控货')">
......@@ -201,6 +207,9 @@
prop="consignorName"
:label="$t('客户名称')"
>
<template v-slot>
{{customer.name}}
</template>
</el-table-column>
<el-table-column
prop="objectiveName"
......@@ -483,7 +492,8 @@ export default {
3:this.$t('跟进中'),
4:this.$t('赢单'),
5:this.$t('输单'),
6:this.$t('报价完成')
6:this.$t('报价完成'),
7:this.$t('跟进中')
},
dialogVisible:false,
DICT_TYPE,
......@@ -617,11 +627,11 @@ export default {
},
changeDate(val){
if(val){
this.queryParams.houseStartDate = val[0];
this.queryParams.houseEndDate = val[1];
this.queryParams.beginRucangTime = val[0];
this.queryParams. endRucangTime = val[1];
}else {
this.queryParams.houseStartDate = undefined;
this.queryParams.houseEndDate = undefined;
this.queryParams.beginRucangTime = undefined;
this.queryParams.endRucangTime = undefined;
}
},
//品牌授权
......@@ -649,7 +659,7 @@ export default {
},
//订单
getorderList(){
infoListOrderPage({customerId:this.id,...this.queryParams}).then(r => {
infoListOrderPage({customerDetailld:this.id,...this.queryParams}).then(r => {
console.log(r)
if(r.code === 0){
this.orderList = r.data.list
......
......@@ -3,15 +3,33 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('关键字')" prop="transportType">
<el-input v-model="queryParams.key" :placeholder="$t('请输入关键字查找')" />
</el-form-item>
<el-form-item :label="$t('运输方式')" prop="transportType">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportType" formatter="number"/>
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="shippingChannel">
<el-select v-model="queryParams.shippingChannel" :placeholder="$t('请选择出货渠道')">
<el-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId"
:key="item.channelId"></el-option>
</el-select>
<el-form-item :label="$t('唛头')" prop="transportType">
<el-input v-model="queryParams.marks" :placeholder="$t('请输入关键字查找')" />
</el-form-item>
<el-form-item :label="$t('资源类型')" prop="customerType">
<el-select clearable v-model="queryParams.customerType" :placeholder="$t('请选择资源类型')" clearable size="small">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_ESOURCE_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('客户经理')" prop="customerService">
<el-select clearable v-model="queryParams.customerService" :placeholder="$t('请选择客户经理')" clearable size="small">
<el-option v-for="dict in customerServiceList"
:key="dict.id" :label="dict.nickname" :value="dict.id"/>
</el-select>
</el-form-item> -->
<!-- <el-form-item prop="customerService">
<el-select clearable v-model="queryParams.customerService" clearable size="small">
<el-option label="下单时间" value="createTime"/>
<el-option label="装柜时间" value="ldBoxTime"/>
</el-select>
</el-form-item> -->
<el-form-item>
<el-date-picker v-model="dateFilter" type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<!-- <el-date-picker v-model="queryParams.beginStartTime" :placeholder="$t('请选择开始时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>-->
......@@ -21,36 +39,65 @@
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
>{{$t('导出')}}</el-button> -->
</el-form-item>
</el-form>
<div class="total_num">
<span>开发客户:</span>
<span>总箱数 {{totalData.developNum}}</span>
<span>总方数 {{totalData.developNum}}</span>
<span>总重量 {{totalData.developNum}}KG </span>
<span>公司客户:</span>
<span>总箱数 {{totalData.companyNum}}</span>
<span>总方数 {{totalData.companyNum}}</span>
<span>总重量 {{totalData.companyNum}}KG </span>
<span>汇总:</span>
<span>总箱数 {{totalData.sumNum}}</span>
<span>总方数 {{totalData.sumNum}}</span>
<span>总重量 {{totalData.sumNum}}KG </span>
</div>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('序号')" align="center" type="index"></el-table-column>
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<!-- <el-table-column :label="$t('序号')" align="center" type="index"></el-table-column> -->
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column :label="$t('资源类型')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.CUSTOMER_ESOURCE_TYPE" :value="scope.row.customerType"/>
</template>
</el-table-column>
<el-table-column :label="$t('报价单号')" align="center" width="180">
<template slot-scope="scope">
<span>{{scope.row.offerId}}</span>
<span>{{scope.row.number}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('报价结果')" align="center">
<!-- <el-table-column :label="$t('报价结果')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="scope.row.offerStatus"/>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column :label="$t('订单号')" align="center" prop="orderNo"/>
<el-table-column :label="$t('发货人')" align="center" prop="consignorName"/>
<el-table-column :label="$t('客户名称')" align="center" prop="name"/>
<el-table-column :label="$t('联系方式')" align="center" prop="phoneNew"/>
<el-table-column :label="$t('唛头')" align="center" prop="marks"/>
<el-table-column :label="$t('订单状态')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column :label="$t('是否控货')" align="center" prop="isCargoControl">
<template slot-scope="scope">
{{scope.row.isCargoControl?$t(''):$t('')}}
</template>
</el-table-column>
<el-table-column :label="$t('方数')" align="center" prop="sumVolume"/>
<el-table-column :label="$t('重量')" align="center" prop="completeWeight"/>
<el-table-column :label="$t('方数')" align="center" prop="completeVolume"/>
<el-table-column :label="$t('下单时间')" align="center" prop="createTime"/>
<el-table-column :label="$t('订单状态')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status"/>
</template>
<el-table-column :label="$t('装柜时间')" align="center" prop="ldBoxTime"/>
<el-table-column :label="$t('客户经理')" align="center" prop="userId" :formatter="customerServiceFn">
</el-table-column>
</el-table>
<!-- 分页组件 -->
......@@ -74,6 +121,7 @@
import {listSimpleDepts} from "@/api/system/dept";
import {getChannelList} from '@/api/ecw/channel';
import dayjs from "dayjs";
import {listServiceUser} from "@/api/system/user";
export default {
name: "DeptTarget",
......@@ -131,12 +179,25 @@
},
// 表单参数
form: {},
customerServiceList:[],
// 表单校验
rules: {
deptId: [{required: true, message: this.$t("部门ID不能为空"), trigger: "blur"}],
targetType: [{required: true, message: this.$t("目标类型不能为空"), trigger: "change"}],
cubeNum: [{required: true, message: this.$t("立方数不能为空"), trigger: "blur"}],
}
},
totalData:{
companyWeight:0,
companyVolume:0,
companyNum:0,
developWeight:0,
developVolume:0,
developNum:0,
sumWeight:0,
sumVolume:0,
sumNum:0,
},
myAchievementData:{}
};
},
computed: {
......@@ -155,6 +216,9 @@
created() {
this.getChannelList();
this.getList();
listServiceUser().then(r=>{
this.customerServiceList = r.data;
})
},
methods: {
getChannelList() {
......@@ -183,13 +247,31 @@
}
})
},
customerServiceFn(val){
if(this.customerServiceList.length > 0){
let index =this.customerServiceList.findIndex(item => item.id === val.userId);
return index !== -1 ? this.customerServiceList[index]?.nickname :''
}else {
return ''
}
},
/** 查询列表 */
getList() {
this.loading = true;
// 执行查询
myAchievementByPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.list = response.data.myAchievementDtos.list;
this.total = response.data.myAchievementDtos.total;
this.myAchievementData = response.data
this.totalData.sumWeight =this.myAchievementData.totalWeight
this.totalData.sumVolume =this.myAchievementData.totalVolume
this.totalData.sumNum =this.myAchievementData.totalNum
this.totalData.companyWeight =this.myAchievementData.companyTotaWeight
this.totalData.companyVolume =this.myAchievementData.companyTotaVolume
this.totalData.companyNum =this.myAchievementData.companyTotaNum
this.totalData.developWeight =this.myAchievementData.devTotaWeight
this.totalData.developVolume =this.myAchievementData.devTotaVolume
this.totalData.developNum =this.myAchievementData.devTotalNum
this.loading = false;
});
},
......@@ -299,6 +381,46 @@
}).catch(() => {
});
},
handleSelectionChange(val){
if(val&&val.length>0){
var data={
companyWeight:0,
companyVolume:0,
companyNum:0,
developWeight:0,
developVolume:0,
developNum:0,
sumWeight:0,
sumVolume:0,
sumNum:0,
}
val.forEach(item=>{
if(item.customerType==1){
data.developWeight += item.completeWeight
data.developVolume += item.completeVolume
data.developNum += item.sumNum
}else{
data.companyWeight += item.completeWeight
data.companyVolume += item.completeVolume
data.companyNum += item.sumNum
}
data.sumWeight += item.completeWeight
data.sumVolume += item.completeVolume
data.sumNum += item.sumNum
})
this.$set(this,'totalData',data)
}else{
this.totalData.sumWeight =this.myAchievementData.totalWeight
this.totalData.sumVolume =this.myAchievementData.totalVolume
this.totalData.sumNum =this.myAchievementData.totalNum
this.totalData.companyWeight =this.myAchievementData.companyTotaWeight
this.totalData.companyVolume =this.myAchievementData.companyTotaVolume
this.totalData.companyNum =this.myAchievementData.companyTotaNum
this.totalData.developWeight =this.myAchievementData.devTotaWeight
this.totalData.developVolume =this.myAchievementData.devTotaVolume
this.totalData.developNum =this.myAchievementData.devTotalNum
}
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
......@@ -313,7 +435,8 @@
this.exportLoading = true;
return exportDeptTargetExcel(params);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.$download.excel(response, `${this.$t('我的业绩')}.xls`);
this.exportLoading = false;
}).catch(() => {
});
......@@ -321,3 +444,17 @@
}
};
</script>
<style scoped >
.total_num{
display:flex;
align-items: center;
justify-content: center;
margin:20px 0;
font-size:15px;
}
.total_num span{
margin: 0 8px;
}
</style>
......@@ -112,6 +112,7 @@
v-hasPermi="['ecw:customer:update']" @click="complaint(scope.row)">{{$t('客诉')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:customer:delete']">{{$t('删除')}}</el-button>
<el-button :disabled="scope.row.isInOpenSea" size="mini" type="text" icon="el-icon-user" @click="delay(scope.row)">{{$t('延期')}}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -219,6 +220,9 @@ export default {
handleSelectionChange(val){
this.selectCustomerList = val.map(i => i.id);
},
delay(row){
this.$router.push({path:'/customer/delay',query:{id:row.id}})
},
countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue)
return country?.nameZh
......
......@@ -95,7 +95,7 @@
if(this.$route.query.number){
this.form.number = this.$route.query.number
}
userList('documentary customer service').then(res =>this.creatorData = res.data)
userList('customer service').then(res =>this.creatorData = res.data)
},
methods: {
getList() {
......
......@@ -6,7 +6,7 @@
<div class="offer-header">
<span style="font-size: 15px;">{{$t('报价单号')}}{{list.number}}</span>
<div class="btns">
<el-button size="mini" type="primary" @click="$router.push('edit?id=' + offerId)">{{$t('编辑')}}</el-button>
<el-button size="mini" type="primary" v-if="list.status!=5" @click="$router.push('edit?id=' + offerId)">{{$t('编辑')}}</el-button>
<el-button type="primary" v-if="[1,3,7].indexOf(list.status) > -1" size="mini" @click="handleAdd">{{$t('跟进')}}</el-button>
<el-button type="primary" v-if="[3,7].indexOf(list.status) > -1" size="mini" @click="toResult">{{$t('结果')}}</el-button>
<el-button size="mini" v-if="[1,3,7].indexOf(list.status) > -1" type="primary" @click.native="$router.push('/offer/special?offerId=' + offerId)" >{{$t('特价')}}</el-button>
......@@ -245,7 +245,11 @@
</el-descriptions-item>
<el-descriptions-item :label="$t('预计费用')">
<template >
<div v-for="item in estimatedCosts" :key="item.currencyId">{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</div>
<div style="display:flex;flex-direction:column">
<div v-for="item in estimatedCosts" :key="item.currencyId">
<span>{{item.amount || 0}}{{currentcyMap[item.currencyId]}}</span>
</div>
</div>
</template>
</el-descriptions-item>
</el-descriptions>
......@@ -470,6 +474,18 @@
}
arr.push(it)
})
this.freightFeeList.forEach(item => {
if(!arr.find(items=>items.currencyId==item.currencyId)){
let its = {...item}
// let freights = this.clearanceFeeList.find(fee => fee.currencyId == item.currencyId)
// if(freights){
// its.amount += freights.amount
// }
arr.push(its)
}
})
return arr
},
// 预计费用(原价 - 优惠金额)
......@@ -495,8 +511,13 @@
if(coupon){
it.amount = it.amount.minus(coupon.reduceAmount)
}
if(this.list.otherFee && this.list.otherFeeCurrencyId == item.currencyId){
it.amount = it.amount.plus(this.list.otherFee)
// if(this.list.otherFee && this.list.otherFeeCurrencyId == item.currencyId){
// it.amount = it.amount.plus(this.list.otherFee)
// withOtherFee = true
// }
let otherFee = this.otherFeeList.find(fee => fee.currencyId == item.currencyId)
if(otherFee){
it.amount += otherFee.amount
withOtherFee = true
}
// 保价费(美元)
......@@ -527,7 +548,17 @@
amount: Decimal(this.fee.insuranceFee)
})
}
this.otherFeeList.forEach(item => {
if(!arr.find(items=>items.currencyId==item.currencyId)){
let its = {...item}
// let freights = this.clearanceFeeList.find(fee => fee.currencyId == item.currencyId)
// if(freights){
// its.amount += freights.amount
// }
arr.push(its)
}
})
return arr
}
},
......@@ -562,7 +593,7 @@
that.loading = true;
// 执行查询
getOrder(id).then(response => {
that.orderDat = response.data;
that.orderData = response.data;
});
},
getSupplierData(id){
......@@ -628,9 +659,9 @@
that.getChannelData()
}
that.calculationPrice()
if(that.list.orderId){
that.getOrderData(that.list.orderId)
}
// if(that.list.orderId){
// that.getOrderData(that.list.orderId)
// }
getCustomerContactsSelect({ids: [that.list.consignorId, that.list.consigneeId].join(',')}).then((res) => {
let consignor = res.data.list.find(item => item.customerContactsId == that.list.consignorId)
if(consignor) that.consignorData=consignor
......
......@@ -221,8 +221,8 @@
</template>
<template slot-scope="scope">
<el-form-item label=""
:prop="`prodCreateReqVOList.${scope.$index}.worth`"
:rules="{
:prop2="`prodCreateReqVOList.${scope.$index}.worth`"
:rules2="{
// required: true, message: $t('货值不能为空'), trigger: 'blur'
}"
class="mb-0 mr-0"
......
......@@ -34,8 +34,11 @@
</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" />
<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"/>
......@@ -47,6 +50,7 @@
import {getOfferLogPage} from "@/api/ecw/offerLog";
import {DICT_TYPE} from '@/utils/dict'
import {getOffer} from '@/api/ecw/offer'
import { userList } from "@/api/system/user"
export default {
name: "OfferLog",
components: {
......@@ -67,6 +71,7 @@ export default {
number:'',
relationId:0,
creatorName:'test',
creatorData:[]
};
},
created() {
......@@ -75,6 +80,7 @@ export default {
this.getList();
this.getRelationID()
}
userList('customer service').then(res =>this.creatorData = res.data)
},
methods: {
/** 查询列表 */
......@@ -89,6 +95,11 @@ export default {
});
},
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;
......
......@@ -79,13 +79,14 @@
<el-row style="margin-top: 30px">
<el-col :span="8">
<div style="text-align: right;">
{{ list[0] && list[0].adjustToStartWarehouseName ? list[0].adjustToStartWarehouseName : list[0] && list[0].startWarehouseName ? list[0].startWarehouseName : '' }}
{{ list[0] && list[0].adjustToStartWarehouseName ? list[0].adjustToStartWarehouseName : list[0] ? [14,16,15].includes(this.list[0].status) ? list[0].dstWarehouseName : list[0].startWarehouseName : '' }}
</div>
</el-col>
<el-col :span="3"><div style="text-align:center">
{{$t('调至')}}
</div></el-col>
<el-col :span="8"><el-select clearable v-model="params.warehouseInId">
<el-col :span="8">
<el-select clearable v-model="params.warehouseInId">
<el-option v-for="(item ,index) in availableWarehouse" v-if="item.status !== 1" :value="item.id" :label="item.titleZh"
:key="index"></el-option>
</el-select></el-col>
......@@ -222,8 +223,7 @@ export default {
getOrderListFn() {
getOrderPage({orderIdList: this.orderList}).then(r => {
this.list = r.data.list
console.log(this.list,'this.list[0].startWarehouseId');
warehouseAdjustmentList({id: this.list[0].adjustToStartWarehouseId ? this.list[0].adjustToStartWarehouseId : this.list[0].startWarehouseId}).then(r => this.availableWarehouse = r.data)
warehouseAdjustmentList({id: this.list[0].adjustToStartWarehouseId ? this.list[0].adjustToStartWarehouseId :[14,16,15].includes(this.list[0].status) ? this.list[0].dstWarehouseId : this.list[0].startWarehouseId }).then(r => this.availableWarehouse = r.data)
adjustLastWithStatus({orderId:this.list[0].orderId,lang:0}).then(r =>{
this.applyStatus = r.data
if(r.data?.orderWarehouseAdjustBackVO?.status === 1){
......@@ -235,7 +235,7 @@ export default {
submit() {
let p = this.list.map(e => e.orderId).join(',');
this.params.orderIds = p;
this.params.warehouseOutId = this.list[0].adjustToStartWarehouseId ? this.list[0].adjustToStartWarehouseId : this.list[0].startWarehouseId;
this.params.warehouseOutId = this.list[0].adjustToStartWarehouseId ? this.list[0].adjustToStartWarehouseId : [14,16,15].includes(this.list[0].status) ? this.list[0].dstWarehouseId : this.list[0].startWarehouseId;
this.params.orderNo = this.list[0].orderNo
orderWarehouseInAdjustApply(this.params).then(r => {
if (r.code === 0) {
......
......@@ -3,7 +3,7 @@
<el-card class="card">
<div slot="header" class="card-title">
{{$t('订单编号')}}{{order.orderNo}}
<template v-if="order.tidanNo">- {{order.tidanNo}}</template>
<template v-if="order.containerNumber"> - {{order.containerNumber}}</template>
</div>
<el-row :gutter="20">
<el-col :span="8" v-if="order.consignorVO">
......
......@@ -783,10 +783,10 @@ export default {
this.calculationPrice()
},
'form.packageTypeArr'(val){
/* 'form.packageTypeArr'(val){
console.log('packageType', val, val.length)
this.$set(this.form, 'packageType', val ? val.join(',') : '')
},
}, */
'form.isExternalWarehouse'(isExternalWarehouse){
// 勾选外部仓则添加一个默认的,取消则删除默认的空的
if(!isExternalWarehouse){
......@@ -1067,6 +1067,7 @@ export default {
item.channelIds = Array.from(item.channelIdSet).join(',')
}
})
this.form.packageType = this.form.packageTypeArr.join(',')
// 修改的提交
if (this.form.orderNo != null) {
let data = Object.assign({}, this.form, {
......
......@@ -172,7 +172,7 @@
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="150px">
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width actions" width="150px">
<template slot-scope="scope">
<!-- 已删除的订单只需要删除和查看 https://zentao.jdshangmen.com/bug-view-684.html -->
<template v-if="scope.row.status == 88">
......@@ -180,7 +180,7 @@
</template>
<template v-else>
<!--操作相关的-->
<el-dropdown>
<el-dropdown v-if="exclude(scope.row.inWarehouseState, [204,205,206])">
<el-button type="text">{{$t('操作')}}</el-button>
<el-dropdown-menu slot="dropdown">
<!-- 编辑 -->
......@@ -251,77 +251,77 @@
</el-dropdown-menu>
</el-dropdown>
<el-divider direction="vertical" v-if="scope.row.status != 0"></el-divider>
<!--仓库相关的-->
<el-dropdown v-if="scope.row.status != 0">
<el-button type="text">{{$t('仓库')}}</el-button>
<el-dropdown-menu slot="dropdown">
<!-- 入仓操作 -->
<template v-if="include(scope.row.status, [0,2]) || include(scope.row.abnormalState, [1]) || scope.row.inWarehouseState == 208">
<el-dropdown-item @click.native="$router.push('/order/warehousing?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']">{{$t('入仓操作')}}</el-dropdown-item>
</template>
<!-- 入仓补充 -->
<template v-if="
include(scope.row.inWarehouseState, [201,202, 202, 210, 202, 211, 202, 213, 214, 215, 216]) &&
scope.row.abnormalState != 1 &&
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:update']">{{$t('入仓补充')}}</el-dropdown-item>
</template>
<!-- 入仓修改 -->
<template v-if="
include(scope.row.inWarehouseState, [202, 207, 202, 209, 210, 202, 211, 212, 202, 213, 214, 215, 216, 204, 205, 206])
">
<el-dropdown-item @click.native="$router.push('/order/warehousing-update?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']">{{$t('入仓修改')}}</el-dropdown-item>
</template>
<!-- 退仓 -->
<template v-if="
(
include(scope.row.inWarehouseState, [202, 210, 211, 213, 214, 215, 216]) &&
exclude(scope.row.abnormalState, [1])
) ||
include(scope.row.status, [16])
">
<el-dropdown-item @click.native="show = true;orderId = scope.row.orderId; " v-hasPermi="['ecw:order:update']">{{$t('退仓')}}</el-dropdown-item>
</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]))
">
<el-dropdown-item @click.native="orderId = scope.row.orderId;warehouseBol=true;" >{{$t('调仓')}}</el-dropdown-item>
</template>
<!-- 取消调仓 -->
<!-- <template v-if="
include(scope.row.inWarehouseState, [212,213,214])
">
<el-dropdown-item @click.native="$alert('// TODO')" >{{$t('取消调仓')}}</el-dropdown-item>
</template> -->
<!-- 调拨出仓 -->
<template v-if="
include(scope.row.inWarehouseState, [213])
">
<el-dropdown-item @click.native="$router.push({path:'/order/transfer-warehousing/' + scope.row.orderId + '/' + 1 })" >{{$t('调拨出仓')}}</el-dropdown-item>
</template>
<!-- 调拨到仓 -->
<template v-if="
include(scope.row.inWarehouseState, [214])
">
<el-dropdown-item @click.native="$router.push({path:'/order/transfer-to-warehouse/' + scope.row.orderId + '/' + 2 })" >{{$t('调拨到仓')}}</el-dropdown-item>
</template>
</el-dropdown-menu>
</el-dropdown>
<el-divider direction="vertical" v-if="scope.row.status != 0"></el-divider>
<template v-if="scope.row.status != 0 && [204,205,206].indexOf(scope.row.inWarehouseState) < 0">
<!-- <el-divider direction="vertical"></el-divider> -->
<!--仓库相关的-->
<el-dropdown>
<el-button type="text">{{$t('仓库')}}</el-button>
<el-dropdown-menu slot="dropdown">
<!-- 入仓操作 -->
<template v-if="include(scope.row.status, [0,2]) || include(scope.row.abnormalState, [1]) || scope.row.inWarehouseState == 208">
<el-dropdown-item @click.native="$router.push('/order/warehousing?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']">{{$t('入仓操作')}}</el-dropdown-item>
</template>
<!-- 入仓补充 -->
<template v-if="
include(scope.row.inWarehouseState, [201,202, 202, 210, 202, 211, 202, 213, 214, 215, 216]) &&
scope.row.abnormalState != 1 &&
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:update']">{{$t('入仓补充')}}</el-dropdown-item>
</template>
<!-- 入仓修改 -->
<template v-if="
include(scope.row.inWarehouseState, [202, 207, 202, 209, 210, 202, 211, 212, 202, 213, 214, 215, 216, 204, 205])
">
<el-dropdown-item @click.native="$router.push('/order/warehousing-update?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']">{{$t('入仓修改')}}</el-dropdown-item>
</template>
<!-- 退仓 -->
<template v-if="
(
include(scope.row.inWarehouseState, [202, 210, 211, 213, 214, 215, 216]) &&
exclude(scope.row.abnormalState, [1])
) ||
include(scope.row.status, [16])
">
<el-dropdown-item @click.native="show = true;orderId = scope.row.orderId; " v-hasPermi="['ecw:order:update']">{{$t('退仓')}}</el-dropdown-item>
</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]))
">
<el-dropdown-item @click.native="orderId = scope.row.orderId;warehouseBol=true;" >{{$t('调仓')}}</el-dropdown-item>
</template>
<!-- 取消调仓 -->
<!-- <template v-if="
include(scope.row.inWarehouseState, [212,213,214])
">
<el-dropdown-item @click.native="$alert('// TODO')" >{{$t('取消调仓')}}</el-dropdown-item>
</template> -->
<!-- 调拨出仓 -->
<template v-if="
include(scope.row.inWarehouseState, [213])
">
<el-dropdown-item @click.native="$router.push({path:'/order/transfer-warehousing/' + scope.row.orderId + '/' + 1 })" >{{$t('调拨出仓')}}</el-dropdown-item>
</template>
<!-- 调拨到仓 -->
<template v-if="
include(scope.row.inWarehouseState, [214])
">
<el-dropdown-item @click.native="$router.push({path:'/order/transfer-to-warehouse/' + scope.row.orderId + '/' + 2 })" >{{$t('调拨到仓')}}</el-dropdown-item>
</template>
</el-dropdown-menu>
</el-dropdown>
</template>
<!-- <el-divider direction="vertical" v-if="scope.row.status != 0"></el-divider> -->
<!--打印相关的-->
<el-dropdown v-if="scope.row.status != 0">
<el-button type="text">{{$t('打印')}}</el-button>
......@@ -649,3 +649,13 @@ export default {
}
};
</script>
<style lang="scss" scoped>
::v-deep .actions{
.el-dropdown{
margin-right: 10px;
&::last-child{
margin-right: 0;
}
}
}
</style>
\ No newline at end of file
......@@ -4,6 +4,9 @@
<el-card>
<div slot="header" class="card-title">{{$t('查看')}}</div>
<el-descriptions :column="4">
<el-descriptions-item :label="$t('订单号')">
{{orderData.orderNo||''}}
</el-descriptions-item>
<el-descriptions-item :label="$t('唛头')">
{{orderData.marks?orderData.marks:$t('')}}
</el-descriptions-item>
......
......@@ -286,7 +286,7 @@
</el-select>
</el-form-item>
</el-row>
<el-row :span="8" v-if="orderExceptionData.orderExceptionType!='order_lack_box_exception'&&orderExceptionData.orderExceptionType!='order_lack_box_exception'">
<el-row :span="8">
<el-form-item :label="$t('备注')+':'" size="medium">
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" />
</el-form-item>
......
......@@ -147,7 +147,7 @@
</el-form>
<warehouse-area-dialog ref="area" :visible.sync="areaVisible" v-model="form.orderLocationCreateReqVOList"
:order-id="orderId" :warehouse-id="warehouseId"></warehouse-area-dialog>
:order-id="orderId" :warehouse-id="warehouseId" :is-editing="isEdit"></warehouse-area-dialog>
<edit-dialog :title="title" :order-id="order.orderId" :visible.sync="warehousingVisible" :warehousing="warehousing" :edit="isEdit"></edit-dialog>
......@@ -226,7 +226,12 @@ export default {
this.getOrder()
getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data.reverse())
getSpecialListByOrderId(this.orderId).then(r => this.specialList = r.data)
listByOrderId({ orderId: this.orderId }).then(r => this.form.orderLocationCreateReqVOList = r.data)
listByOrderId({ orderId: this.orderId }).then(r => {
this.form.orderLocationCreateReqVOList = r.data
this.$nextTick(() => {
this.$refs.area.updateArea()
})
})
}
getCurrencyList().then(res => this.currencyList = res.data)
},
......
......@@ -103,7 +103,7 @@
<el-button plain type="primary" @click="submit('process')">{{$t('设为已处理')}}</el-button>
</div>
</div>
<el-form v-if="type=='order_heavy_cargo_exception'" :model="handlerParams" ref="queryForms" size="small" label-width="50px" class="card">
<el-form :model="handlerParams" ref="queryForms" size="small" label-width="50px" class="card">
<el-form-item :label="$t('备注')+':'" size="medium">
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" />
</el-form-item>
......
......@@ -21,7 +21,7 @@
</div>
<div>
<el-button v-if="isExamine" @click="submit" type="primary" style="margin-right: 20px;">{{$t('确定退仓')}}</el-button>
<el-button v-if="!isExamine" @click="$router.push({query:{id:details.formId},path:'/bpm/process-instance/detail'})" type="primary" style="margin-right: 20px;">{{$t('审核中')}}</el-button>
<el-button v-if="!isExamine" @click="goBpm" type="primary" style="margin-right: 20px;">{{$t('审核中')}}</el-button>
<el-button v-if="!isExamine" type="primary" style="margin-right: 20px;" @click="cancellationOfOrder">{{$t('取消审核')}}</el-button>
<el-button @click="$parent.show = false;">{{$t('不,再考虑考虑')}}</el-button>
</div>
......@@ -75,6 +75,10 @@ export default {
})
},
methods:{
goBpm(){
this.$parent.show = false
this.$router.push({query:{id:this.details.formId},path:'/bpm/process-instance/detail'})
},
submit(){
this.params.orderId = this.orderDetails.orderId;
this.params.orderNo =this.orderDetails.orderNo;
......
......@@ -3,7 +3,7 @@
<el-form ref="form" :model="form" :rules="rules" label-width="150px" :disabled="readonly">
<el-form-item :label="$t('商品类型')" prop="productType">
<el-select v-model="form.productType" :disabled="!!$route.query.ids">
<el-select v-model="form.productType" :disabled="!!$route.query.action">
<el-option
v-for="type in productTypeList"
:key="type.id"
......@@ -14,7 +14,7 @@
</el-form-item>
<el-form-item :label="$t('商品名称')" prop="titleZh">
<product-selector v-model="form.productId" :product-type="form.productType" @change="product = $event" :disabled="!!$route.query.ids" />
<product-selector v-model="form.productId" :product-type="form.productType" @change="product = $event" :disabled="!!$route.query.action" />
</el-form-item>
<el-form-item :label="$t('英文名称')" prop="titleEn">
......
<template>
<div class="infoheader">
<el-collapse v-model="activeNames">
<div v-for="item in helpData" :key="item.id">
<el-collapse-item :title="item.titleZh" :name="item.id">
<span v-html="item.contentZh">{{ item.contentZh }}</span>
</el-collapse-item>
</div>
</el-collapse>
</div>
</template>
<script>
import { getInternalHelpDocPage} from "@/api/system/internalHelpDoc";
export default {
data() {
return {
activeNames: [],
helpData: []
}
},
created() {
getInternalHelpDocPage({ pageNo: 1, pageSize: 100 }).then((r) => {
this.helpData = r.data.list
this.activeNames = this.helpData.map(m => { return m.id })
})
}
}
</script>
<style scoped>
.infoheader{
padding:20px
}
</style>
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="标题中文" prop="titleZh">
<el-input v-model="queryParams.titleZh" placeholder="请输入标题中文" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="标题英文" prop="titleEn">
<el-input v-model="queryParams.titleEn" placeholder="请输入标题英文" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['system:internal-help-doc:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['system:internal-help-doc:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="" align="center" prop="id" />
<el-table-column label="标题中文" align="center" prop="titleZh" />
<el-table-column label="标题英文" align="center" prop="titleEn" />
<el-table-column label="内容中文" align="center" prop="contentZh" />
<el-table-column label="内容英语" align="center" prop="contentEn" />
<el-table-column label="状态" align="center" prop="status" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['system:internal-help-doc:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['system:internal-help-doc:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="标题中文" prop="titleZh">
<el-input v-model="form.titleZh" placeholder="请输入标题中文" />
</el-form-item>
<el-form-item label="标题英文" prop="titleEn">
<el-input v-model="form.titleEn" placeholder="请输入标题英文" />
</el-form-item>
<el-form-item label="内容中文" prop="contentZh">
<editor v-model="form.contentZh" placeholder="请输入内容中文" />
</el-form-item>
<el-form-item label="内容英语" prop="contentEn">
<editor v-model="form.contentEn" placeholder="请输入内容英语" />
</el-form-item>
<el-form-item label="0-启用,1-停用" prop="status">
<el-radio-group v-model="form.status">
<el-radio v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key="dict.value" :label="parseInt(dict.value)">{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createInternalHelpDoc, updateInternalHelpDoc, deleteInternalHelpDoc, getInternalHelpDoc, getInternalHelpDocPage, exportInternalHelpDocExcel } from "@/api/system/internalHelpDoc";
import Editor from '@/components/Editor';
export default {
name: "InternalHelpDoc",
components: {
Editor
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 对内帮助文档列表
list: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
dateRangeCreateTime: [],
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
titleZh: null,
titleEn: null,
contentZh: null,
contentEn: null,
status: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行查询
getInternalHelpDocPage(params).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
titleZh: undefined,
titleEn: undefined,
contentZh: undefined,
contentEn: undefined,
status: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加对内帮助文档";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getInternalHelpDoc(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改对内帮助文档";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
// 修改的提交
if (this.form.id != null) {
updateInternalHelpDoc(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
// 添加的提交
createInternalHelpDoc(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除对内帮助文档编号为"' + id + '"的数据项?').then(function() {
return deleteInternalHelpDoc(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm('是否确认导出所有对内帮助文档数据项?').then(() => {
this.exportLoading = true;
return exportInternalHelpDocExcel(params);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
......@@ -163,6 +163,11 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="hasCustomerServicePost">
<el-form-item label="不掉公海">
<el-switch v-model="form.notAllowedToEnterOpenSea"></el-switch>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
......
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