Commit 8c4737f5 authored by 我在何方's avatar 我在何方
parents 46f81137 92740aec
......@@ -70,7 +70,7 @@ export function getCustomerList(query) {
})
}
// 导出客户 Excel
// 导出客户 Excel 全部
export function exportCustomerExcel(query) {
return request({
url: '/ecw/customer/export-excel',
......@@ -79,7 +79,55 @@ export function exportCustomerExcel(query) {
responseType: 'blob'
})
}
// 我的客户导出
export function mineExporteExcel(query) {
return request({
url: '/ecw/customer/mine-export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 我的待接收客户列表导出
export function waiteConfirmExportExcel(query) {
return request({
url: '/ecw/customer/waite-confirm-export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
/**
* // 待分配客户列表导出
* @param query
* @return {*}
*/
export function waitDistributionExportExcel(query) {
return request({
url: '/ecw/customer/wait-distribution-export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 公海池客户列表导出
export function publicExportExcel(query) {
return request({
url: '/ecw/customer/public-export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
export function indirectCustomerExportExcel(query) {
return request({
url: '/ecw/indirect-customer/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 待接收客户列表
export function getWaitForConfirmList(query) {
return request({
......
......@@ -48,6 +48,7 @@ export function exportProductPriceExcel(query) {
return request({
url: '/ecw/product-price/export-excel',
method: 'get',
timeout: 3*60*1000,
params: query,
responseType: 'blob'
})
......
......@@ -30,14 +30,14 @@
{{scope.row.isCargoControl ? '' : '' }}
</template>
</el-table-column>
<el-table-column :label="$t('计划箱数')" align="center" prop="loadNum">
<el-table-column :label="$t('计划箱数')" align="center" prop="num">
<template slot-scope="scope">
{{ scope.row.loadNum }}{{$t('')}}
{{ scope.row.num }}{{$t('')}}
</template>
</el-table-column>
<el-table-column :label="$t('实装箱数')" align="center" prop="num">
<el-table-column :label="$t('实装箱数')" align="center" prop="loadNum">
<template slot-scope="scope">
{{ scope.row.num }}{{$t('')}}
{{ scope.row.loadNum }}{{$t('')}}
</template>
</el-table-column>
<el-table-column :label="$t('提货点')" align="center" prop="destWarehouse" />
......@@ -65,6 +65,7 @@
<template v-if="scope.row.status === 3">
{{$t('审核拒绝')}}
<el-button type="text" size="small" @click="handleCommand('queryBill',scope.row)">{{$t('重新制作')}}</el-button>
<el-button type="text" size="small" @click="handleCommand('resetBill',scope.row)" style="color:#333333">{{$t('重置')}}</el-button>
</template>
</template>
</el-table-column>
......
......@@ -74,7 +74,7 @@
<a href="javascript:void(0)" @click="jumpOrderDetail(scope.row)">{{ scope.row.orderNo }}</a>
</template>
</el-table-column>
<el-table-column prop="goodsList" :label="$t('货物信息')" width="250px" align="center">
<el-table-column prop="goodsList" :label="$t('货物信息')" width="230px" align="center">
<template v-slot="{row}">
<section>
<div v-for="(item, index) in row.goodsList" :key="index">
......@@ -98,7 +98,7 @@
</template>
</el-table-column>
<el-table-column prop="customsFee" :label="$t('报关费用')" align="center"></el-table-column>
<el-table-column prop="" :label="$t('操作')" align="center">
<el-table-column prop="" :label="$t('操作')" align="center" width="120px">
<template slot-scope="scope">
<el-button type="primary" size="small" :disabled="scope.row.abnormalDealStatus === 1" @click="()=>updateStatus('single', scope.row)">{{$t('更新状态')}}</el-button>
</template>
......@@ -154,7 +154,7 @@
</el-table-column>
<el-table-column prop="billAbnId" :label="$t('异常')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_TICKET_EXCEPTION" :value="scope.row.opStep" />
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_TICKET_EXCEPTION" :value="scope.row.billAbnId" />
</template>
</el-table-column>
<el-table-column prop="abnDetail" :label="$t('异常描述')" align="center" width="700"></el-table-column>
......@@ -363,17 +363,17 @@ export default {
getErrorType() {
for (const [key, value] of Object.entries(this.shipmentObj)) {
// 报关异常 customsInfo
if (key === "customsInfo" && value.hasAbnormal) {
if (key === "customsInfo" && value && value.hasAbnormal) {
this.$set(this.errorInfo, "errorType", "customs");
this.$set(this.dialogConfig, "title", this.$t("更新报关异常状态"));
}
// 起运异常 shippingInfo
if (key === "shippingInfo" && value.hasAbnormal) {
if (key === "shippingInfo" && value && value.hasAbnormal) {
this.$set(this.errorInfo, "errorType", "shipping");
this.$set(this.dialogConfig, "title", this.$t("更新起运异常状态"));
}
// 到港异常 arrivalInfo
if (key === "arrivalInfo" && value.hasAbnormal) {
if (key === "arrivalInfo" && value && value.hasAbnormal) {
this.$set(this.errorInfo, "errorType", "arrival");
this.$set(this.dialogConfig, "title", this.$t("更新到港异常状态"));
}
......@@ -605,13 +605,11 @@ export default {
getBoxSum() {
return (boxStatistics) => {
if (boxStatistics) {
return this.$t("{num}箱 {volum}m³", {
return this.$t("{num}箱 {volume}m³ {weight}kg", {
num: boxStatistics.num ?? 0,
volume: boxStatistics.weight ?? 0,
volume: boxStatistics.volume ?? 0,
weight: boxStatistics.weight ?? 0,
});
/* `${boxStatistics.num ?? 0} ${boxStatistics.volume ?? 0}m3 ${
boxStatistics.weight ?? 0
}kg`; */
}
return;
};
......
......@@ -53,9 +53,8 @@
<section class="table-goodList">
<div v-for="(item, index) in scope.row.goodsList" :key="index" class="goodList-div">
<p>{{$t('品名')}}{{item.prodTitleZh}}</p>
<p>{{$t('品牌')}}:【
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="item.productRecord" />
<p>{{$t('品牌')}}:【<template v-if="item.brandName">{{item.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="item.feeType" />
</p>
<p>{{$t('其他')}}:{{getTotlContent(item)}}</p>
</div>
......
......@@ -24,7 +24,7 @@
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_CUSTOMS_TYPE)" :key="type.value" :label="type.label" :value="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('正常报关订单')">
<el-form-item :label="$t('正常报关订单')" v-show="isShowNormal">
<div v-for="item in normalOrderList" :key="item.orderId">
<a href="javascript:void(0)" @click="jumpOrderDetail(item)">{{ item.orderNo }}</a>
</div>
......@@ -231,6 +231,7 @@ export default {
)[0].value,
isDownload: false,
normalOrderList: [],
isShowNormal: false,
};
},
created() {
......@@ -240,6 +241,7 @@ export default {
...this.shipmentObj[voName],
documentInfo: this.shipmentObj.documentInfo?.split(",") ?? [],
};
console.log(oldData)
if (!this.shipmentObj[voName]) {
oldData.dcCustomsType = oldData.dcCustomsType
......@@ -260,7 +262,6 @@ export default {
]);
this.cusDeclarationObj = oldData;
// this.getCustomsOrderList(oldData.dcCustomsType);
},
methods: {
getCustomsOrderList(dcCustomsType) {
......@@ -269,6 +270,11 @@ export default {
customsTypes: dcCustomsType === "3" ? "2,3" : dcCustomsType,
}).then((res) => {
this.normalOrderList = res.data ?? [];
if (dcCustomsType === "1") {
this.isShowNormal = false;
} else {
this.isShowNormal = true;
}
});
},
regCloseDialog(type) {
......@@ -520,11 +526,8 @@ export default {
},
/* 判断查验选择是否禁用 */
disabledRadio(item) {
const {
checkExamineStatus,
checkDealStatus,
customsInfo,
} = this.shipmentObj;
const { checkExamineStatus, checkDealStatus, customsInfo } =
this.shipmentObj;
const { dcCheckStatus } = customsInfo ?? {}; // 部分退场状态并且审核通过,退场不可选择
if (
checkExamineStatus === 2 &&
......@@ -562,7 +565,7 @@ export default {
"cusDeclarationObj.dcCustomsStatus"(val) {
if (val !== "3") {
this.$set(this.cusDeclarationObj, "dcCheckStatus", "");
this.$set(this.cusDeclarationObj, "dcPassTime", "");
// this.$set(this.cusDeclarationObj, "dcPassTime", "");
} else {
const { customsInfo } = this.shipmentObj;
this.$set(
......@@ -604,11 +607,8 @@ export default {
computed: {
/* 获取报关审核退场状态文字 */
getCheckExamineStatus() {
const {
checkExamineStatus,
checkDealStatus,
customsInfo,
} = this.shipmentObj;
const { checkExamineStatus, checkDealStatus, customsInfo } =
this.shipmentObj;
const { dcCheckStatus } = customsInfo ?? {};
if (checkExamineStatus === 1) {
return dcCheckStatus === 1
......@@ -625,11 +625,8 @@ export default {
/* 判断是否已处理 */
isCheckDeal() {
return (type) => {
const {
checkExamineStatus,
checkDealStatus,
customsInfo,
} = this.shipmentObj;
const { checkExamineStatus, checkDealStatus, customsInfo } =
this.shipmentObj;
const { dcCheckStatus } = customsInfo ?? {};
// 状态
......
......@@ -30,8 +30,8 @@
<el-option v-for="item in declarationMethodOps" :label="item.label" :value="item.value" :key="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('订单号')" prop="toBePreOrderNo">
<el-input v-model="queryParams.toBePreOrderNo" :placeholder="$t('请输入订单号码')" clearable />
<el-form-item :label="$t('待预装订单')" prop="toBePreOrderNo">
<el-input v-model="queryParams.toBePreOrderNo" :placeholder="$t('请输入待预装订单')" clearable />
</el-form-item>
<el-form-item :label="$t('已预装单号')" prop="preOrderNo">
<el-input v-model="queryParams.preOrderNo" :placeholder="$t('请输入已预装单号')" clearable />
......@@ -153,8 +153,9 @@
</template>
</el-table-column>
<el-table-column :label="$t('备案')" align="center" prop="productRecord" width="100">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_BRAND_TYPE" :value="scope.row.productRecord" />
<template slot-scope="{row}">
<template v-if="row.brandName">{{row.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="row.feeType" />
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" width="160" class-name="small-padding fixed-width" fixed="right">
......@@ -236,9 +237,10 @@
<el-table v-loading="toBePreLoading" :data="item.boxOrderItemList" border show-summary :summary-method="getSummaries">
<el-table-column type="index" align="center" :label="$t('序号')" width="50" />
<el-table-column :label="$t('品名')" align="center" prop="prodTitleZh" />
<el-table-column :label="$t('备案')" align="center" prop="brandType">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_BRAND_TYPE" :value="scope.row.brandType" />
<el-table-column :label="$t('备案')" align="center" prop="feeType">
<template slot-scope="{row}">
<template v-if="row.brandName">{{row.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="row.feeType" />
</template>
</el-table-column>
<el-table-column :label="$t('箱数')" align="center" prop="num" />
......
......@@ -41,8 +41,9 @@
<el-table-column :label="$t('商品信息')" width="250px" align="center" prop="prodTitleZh">
</el-table-column>
<el-table-column :label="$t('备案')" align="center" prop="feeType">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.feeType" />
<template slot-scope="{row}">
<template v-if="row.brandName">{{row.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="row.feeType" />
</template>
</el-table-column>
<el-table-column :label="$t('报关方式')" align="center" prop="customsType">
......
......@@ -34,11 +34,14 @@
{{ scope.row.orderNo }}
</template>
</el-table-column>
<el-table-column :label="$t('商品信息')" align="center" prop="goodsList">
<el-table-column :label="$t('商品信息')" align="center" prop="goodsList" width="200px">
<template slot-scope="scope">
<section class="table-goodList">
<div v-for="(item, index) in scope.row.goodsList" :key="index" class="goodList-div">
<p>{{index+1}}{{$l(item, 'prodTitle')}}</p>
<p>{{$t('品名')}}{{item.prodTitleZh}}</p>
<p>{{$t('品牌')}}:【<template v-if="item.brandName">{{item.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="item.feeType" />
</p>
</div>
</section>
</template>
......@@ -392,14 +395,16 @@ export default {
.table-area {
.table-goodList {
.goodList-div {
border-bottom: 1px solid #e6ebf5;
> p {
text-align: left;
}
> p:last-child {
> span {
margin-right: 5px;
margin-right: 0px;
}
}
}
> div:last-child {
border-bottom: none;
}
}
}
......
......@@ -509,7 +509,7 @@ export default {
currencyId = this.currencyList[0].id
}
this.$set(item, 'reduceCurrencyId', currencyId)
}
}else this.$set(item, 'reduceCurrencyDisabled', false)
return
}
......
......@@ -479,7 +479,6 @@ export default {
// 获取重泡货路线
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
......@@ -489,6 +488,7 @@ export default {
})
})
} else {
this.getZhongPao()
// 新建客户
this.handleAddContact()
if(this.isCustomerServiceConfirmed){
......@@ -517,7 +517,6 @@ export default {
getCountryListAll().then(r => {
this.countryList = r.data
})
this.getZhongPao()
},
data(){
return {
......@@ -535,7 +534,7 @@ export default {
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" }],
customerService: [{ required:this.customerId === '0', message: this.$t('客户经理不能为空'), trigger: "blur" }],
status: [{ required: true, message: this.$t('客户状态不能为空'), trigger: "blur" }],
......@@ -761,6 +760,7 @@ export default {
this.form = { ...this.form, ...response.data, id: this.customerId };
this.open = true;
this.title = this.$t('修改客户');
this.getZhongPao()
});
},
updateCustomerLines() {
......@@ -805,8 +805,8 @@ export default {
// departureId: this.departureId,
// objectiveId: this.objectiveId
}).then(r => {
this.form.weightUnit = r.data.zhongEdge
this.form.lightUnit = r.data.paoEdge
if(!this.form.weightUnit) this.form.weightUnit = r.data.zhongEdge
if(!this.form.lightUnit) this.form.lightUnit = r.data.paoEdge
})
}
},
......
......@@ -66,14 +66,14 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['ecw:customer:create']">{{$t('新增')}}</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="['ecw:customer:export']">{{$t('导出')}}</el-button>
</el-col>
<el-col :span="1.5" >
<el-button :disabled="selectCustomerList.length === 0" type="primary" size="mini" @click="transferShow = true;"
v-hasPermi="['ecw:customer:export']">{{$t('批量移交')}}</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="['ecw:customer:export']">{{$t('导出')}}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -83,7 +83,13 @@
type="selection"
width="55">
</el-table-column>
<el-table-column :label="$t('客户编号')" align="center" prop="number" />
<el-table-column :label="$t('客户编号')" align="center" prop="number" >
<template v-slot="{row}">
<router-link :to="'/customer/query/' + row.id">
{{row.number}}
</router-link>
</template>
</el-table-column>
<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>
......@@ -514,6 +520,7 @@ import {listServiceUser} from "@/api/system/user";
import { getCountryListAll } from '@/api/ecw/country'
import {getCreditPage} from "@/api/customer/credit";
import transferCustomer from "@/views/ecw/customer/transferCustomer";
import Template from "@/views/cms/template/index.vue";
export default {
name: "Customer",
......@@ -525,6 +532,7 @@ export default {
}
},
components: {
Template,
upload,
CustomerFollowList,
customerComplaints,
......
......@@ -25,8 +25,11 @@
<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-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-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['ecw:customer:export']">{{$t('导出')}}</el-button>
</el-form-item>
</el-form>
......@@ -90,11 +93,14 @@ import {updateCustomer, getCustomer,
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import {listServiceUser} from "@/api/system/user";
import {exportCustomerComplaintExcel} from "@/api/ecw/customerComplaint";
import {indirectCustomerExportExcel} from "@/api/ecw/customer";
export default {
name: "IndirectCustomer",
data() {
return {
exportLoading:false,
getDictDatas,
DICT_TYPE,
// 遮罩层
......@@ -132,6 +138,22 @@ export default {
})
},
methods: {
// 导出
handleExport() {
// 处理查询参数
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm(this.$t('是否确认导出间接客户数据项?')).then(() => {
this.exportLoading = true;
return indirectCustomerExportExcel(params);
}).then(response => {
this.$download.excel(response, '间接客户列表.xls');
this.exportLoading = false;
}).catch(() => {});
},
customerServiceFn(val){
if(this.customerServiceList.length > 0){
let index =this.customerServiceList.findIndex(item => item.id === val.customerService);
......
......@@ -9,7 +9,7 @@
<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>
<el-button v-hasPermi="['ecw:customer:delete']" type="danger" size="small" @click="deleteCustomerFn()">{{$t('删除')}}</el-button>
</div>
</div>
<el-card style="margin-top: 15px;">
......@@ -19,7 +19,7 @@
<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>
<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>
......@@ -414,7 +414,8 @@ import {
orderStatistics,
creditLogCreate,
creditScoreStatistic,
infoListReceiptPage, userMemberUserList, memberUserList
infoListReceiptPage, userMemberUserList, memberUserList, deleteCustomer,
} from '@/api/ecw/customer'
import { DICT_TYPE, getDictDataLabel, getDictDatas2 } from '@/utils/dict'
import { getProductTypeList } from '@/api/ecw/productType'
......@@ -710,8 +711,21 @@ export default {
this.infoListReceiptTotal = r.data.total;
}
})
},
deleteCustomerFn(){
this.$confirm(`${this.$t('是否要删除当前客户')}《${this.customer.name}》?`, `${this.$t('提示')}`, {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
type: 'warning'
}).then(() => {
deleteCustomer(this.customerId).then(r => {
this.$modal.msgSuccess(this.$t('删除成功'));
this.$router.back()
})
})
}
}
},
}
</script>
......
......@@ -62,21 +62,26 @@
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['ecw:customer:export']">{{$t('导出')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="$router.push({path:'/customer/add-edit/0',query:{isCustomerServiceConfirmed:true,}})"
v-hasPermi="['ecw:customer:create']">{{$t('新增')}}</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="['ecw:customer:export']">{{$t('导出')}}</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="$t('客户编号')" align="center" prop="number" />
<el-table-column :label="$t('客户编号')" align="center" prop="number" >
<template v-slot="{row}">
<router-link :to="'/customer/query/' + row.id">
{{row.number}}
</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('客户名称')" align="center" prop="name" />
<el-table-column :label="$t('客户等级')" align="center" prop="vipLevelNameZh">
<template slot-scope="scope">
......@@ -98,6 +103,11 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('预计入公海时间')" align="center" prop="createTime" width="180">
<template v-slot = {row}>
<span>{{ parseTime(row.estimateEnterOpenSeaTime ) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName">
</el-table-column>
<el-table-column :label="$t('国家')" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
......@@ -332,7 +342,14 @@
</template>
<script>
import { updateCustomer, getCustomer, exportCustomerExcel, getWaitForConfirmList, confirm } from "@/api/ecw/customer";
import {
updateCustomer,
getCustomer,
exportCustomerExcel,
getWaitForConfirmList,
confirm,
waiteConfirmExportExcel
} from "@/api/ecw/customer";
import { listServiceUser } from "@/api/system/user"
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import {CommonStatusEnum} from '@/utils/constants'
......@@ -573,11 +590,11 @@ export default {
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm(this.$t('是否确认导出所有客户数据项?')).then(() => {
this.$modal.confirm(this.$t('是否确认导出我的待接受客户数据项?')).then(() => {
this.exportLoading = true;
return exportCustomerExcel(params);
return waiteConfirmExportExcel(params);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.$download.excel(response, `${this.$t('我的待接收客户')}.xls`);
this.exportLoading = false;
}).catch(() => {});
},
......
......@@ -86,7 +86,13 @@
type="selection"
width="55">
</el-table-column>
<el-table-column :label="$t('客户编号')" align="center" prop="number" />
<el-table-column :label="$t('客户编号')" align="center" prop="number" >
<template v-slot="{row}">
<router-link :to="'/customer/query/' + row.id">
{{row.number}}
</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('客户名称')" align="center" prop="name" />
<el-table-column :label="$t('客户等级')" align="center" prop="vipLevelNameZh">
<template slot-scope="scope">
......@@ -151,8 +157,10 @@
</template>
<script>
import { createCustomer, updateCustomer, deleteCustomer, getCustomer,handOverCustomer,
exportCustomerExcel,getCustomerToBeAssigned } from "@/api/ecw/customer";
import {
createCustomer, updateCustomer, deleteCustomer, getCustomer, handOverCustomer,
exportCustomerExcel, getCustomerToBeAssigned, waitDistributionExportExcel
} from "@/api/ecw/customer";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import upload from '@/components/ImageUpload'
import {listServiceUser} from "@/api/system/user";
......@@ -420,9 +428,9 @@ export default {
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm(this.$t('是否确认导出所有客户数据项?')).then(() => {
this.$modal.confirm(this.$t('是否确认导出待分配客户数据项?')).then(() => {
this.exportLoading = true;
return exportCustomerExcel(params);
return waitDistributionExportExcel(params);
}).then(response => {
this.$download.excel(response, `${this.$t('待分配客户')}.xls`);
this.exportLoading = false;
......
......@@ -516,6 +516,7 @@ export default {
},
WriteOffProportion(){
let total = 0
if(!this.form.receiptAccountList) return 0
let amountTotal = this.form.receiptAccountList.find(item=>item.type=='total').writeOffAmount
this.detailed.forEach(item => {
......@@ -609,23 +610,23 @@ export default {
var n
// 收款总计
var amountList =[]
this.currencyList.forEach((item,index)=>{
var nairaListByList = this.list.filter(v => v.currencyId === item.id)
if(nairaListByList.length>0){
var discountNaira = nairaListByList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
var n = res.data.find(v => v.currencyId == item.id)
n = res.data.find(v => v.currencyId == item.id)
n && (n.discountTotal = discountNaira)
}
var dollarList = this.form.receiptAccountList.filter(v => v.collectionCurrencyId == item.id)
if(dollarList.length>0){
var dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0).toFixed(2)
if(n.discountTotal&&n.discountTotal>0){
amountList.push({currencyName:item.titleZh,amount:(dollar-n.discountTotal).toFixed(2)})
if(n && n.discountTotal&&n.discountTotal>0){
amountList.push({currencyName:item.titleZh, currencyId: item.id, amount:(dollar-n.discountTotal).toFixed(2)})
}else{
amountList.push({currencyName:item.titleZh,amount:dollar})
amountList.push({currencyName:item.titleZh, currencyId: item.id, amount:dollar})
}
}
......@@ -910,6 +911,8 @@ export default {
},
handleAddReceiptItem() {
this.surplusData = []
// 已收
let recepted = []
this.detailed.forEach(item => {
......@@ -918,13 +921,19 @@ export default {
}else recepted[item.currencyId] = NP.plus(recepted[item.currencyId], item.amount)
})
console.log('rece',recepted)
// 应收
let collom = []
this.form.receiptAccountList.forEach(item => {
/* this.form.receiptAccountList.forEach(item => {
if(item.type!='total'){
if(!collom[item.currencyId]){
collom[item.currencyId] = item.receivableAmount-item.discountTotal
}else collom[item.currencyId] = NP.plus(collom[item.currencyId], item.receivableAmount)
}
}) */
// 从期望收费金额中提取应收币种和金额
this.form.receiptAccountList.find(item => item.type == 'total').collectionAmount.forEach(item => {
collom[item.currencyId] = item.amount
})
console.log('collom',collom)
// if(recepted.length>collom.length){
......
......@@ -44,6 +44,7 @@
<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-form-item :label="$t('信用等级')" prop="department">
<el-select clearable v-model="queryParams.creditLevel" >
<el-option v-for="(item,index) in creditList" :label="item.nameZh" :key="index" :value="item.id" ></el-option>
......@@ -74,7 +75,13 @@
type="selection"
width="55">
</el-table-column>
<el-table-column :label="$t('客户编号')" align="center" prop="number" />
<el-table-column :label="$t('客户编号')" align="center" prop="number" >
<template v-slot="{row}">
<router-link :to="'/customer/query/' + row.id">
{{row.number}}
</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('客户名称')" align="center" prop="name" />
<el-table-column :label="$t('客户等级')" align="center" prop="vipLevelNameZh">
<template slot-scope="scope">
......@@ -98,6 +105,11 @@
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('预计入公海时间')" align="center" prop="createTime" width="180">
<template v-slot = {row}>
<span>{{ parseTime(row.estimateEnterOpenSeaTime ) }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('客户经理')" align="center" prop="customerServiceName">
</el-table-column>
<el-table-column :label="$t('国家')" align="center" prop="country" :formatter="countryFormatter"></el-table-column>
......@@ -127,7 +139,13 @@
</template>
<script>
import { createCustomer, updateCustomer, deleteCustomer, getCustomer, exportCustomerExcel,getMyCustomerService } from "@/api/ecw/customer";
import {
createCustomer,
updateCustomer,
deleteCustomer,
getMyCustomerService,
mineExporteExcel
} from "@/api/ecw/customer";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import upload from '@/components/ImageUpload'
import customerFollowList from "@/components/CustomerFollowList";
......@@ -373,9 +391,9 @@ export default {
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm(this.$t('是否确认导出所有客户数据项?')).then(() => {
this.$modal.confirm(this.$t('是否确认导出我的客户数据项?')).then(() => {
this.exportLoading = true;
return exportCustomerExcel(params);
return mineExporteExcel(params);
}).then(response => {
this.$download.excel(response, `${this.$t('我的客户列表')}.xls`);
this.exportLoading = false;
......
......@@ -80,7 +80,13 @@
type="selection"
width="55">
</el-table-column>
<el-table-column :label="$t('客户编号')" align="center" prop="number" />
<el-table-column :label="$t('客户编号')" align="center" prop="number" >
<template v-slot="{row}">
<router-link :to="'/customer/query/' + row.id">
{{row.number}}
</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('客户名称')" align="center" prop="name" />
<el-table-column :label="$t('客户等级')" align="center" prop="vipLevelNameZh">
<template slot-scope="scope">
......@@ -114,8 +120,8 @@
<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" icon="el-icon-folder-add" @click="distribution(scope.row)">{{$t('移交')}}</el-button>
<el-button size="mini" type="text" icon="el-icon-crop" @click="fishingFn(scope.row)">{{$t('捞取')}}</el-button>
<!-- <el-button size="mini" type="text" @click="distribution(scope.row)">{{$t('移交')}}</el-button>-->
<el-button size="mini" type="text" @click="fishingFn(scope.row)">{{$t('捞取')}}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -146,7 +152,15 @@
</template>
<script>
import { createCustomer, updateCustomer, deleteCustomer,handOverCustomer,getPublicList,exportCustomerExcel, setFishing } from "@/api/ecw/customer";
import {
createCustomer,
updateCustomer,
deleteCustomer,
handOverCustomer,
getPublicList,
setFishing,
publicExportExcel
} from "@/api/ecw/customer";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import upload from '@/components/ImageUpload'
import {listServiceUser} from "@/api/system/user";
......@@ -382,9 +396,9 @@ export default {
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm(this.$t('是否确认导出所有客户数据项?')).then(() => {
this.$modal.confirm(this.$t('是否确认导出公海池客户数据项?')).then(() => {
this.exportLoading = true;
return exportCustomerExcel(params);
return publicExportExcel(params);
}).then(response => {
this.$download.excel(response, `${this.$t('公海池客户')}.xls`);
this.exportLoading = false;
......
......@@ -101,7 +101,7 @@
</el-descriptions-item>
<el-descriptions-item :label="$t('集运仓库')">
{{order.isExternalWarehouse ? $t('外部仓') : $t('自有仓') }}
<template v-for="(item, index) in order.externalWarehouseDtoList" >
<template v-if="order.isExternalWarehouse" v-for="(item, index) in order.externalWarehouseDtoList" >
<div v-if="item.estLoadingTime || item.loadingAddress" :key="index">
{{$t('装柜时间')}}{{item.estLoadingTime}}
{{$t('装柜地址')}}{{item.loadingAddress}}
......@@ -195,7 +195,7 @@
</el-tab-pane>
<el-tab-pane :label="$t('运单资料/提货单')" name="three">
<!--inWarehouseState 1待入库,2多了,3少了,4到齐-->
<el-button type="text" @click="showWarehouseReceipt=true" :disabled="order.inWarehouseState <= 1">{{$t('查看入仓单')}}</el-button>
<el-button type="text" @click="showWarehouseReceipt=true" :disabled="order.inWarehouseState == 0 && order.shipmentState == 0">{{$t('查看入仓单')}}</el-button>
<el-button type="text" @click.native="showLadingBill=true" :disabled="!order.ladingState">{{$t('查看提货单')}}</el-button>
<el-button :disabled="!order.packingListUrl" type="text" @click="downloadPackingList">{{$t('装箱单')}}</el-button>
</el-tab-pane>
......@@ -418,7 +418,6 @@ export default {
const brandType = row.warehouseInInfoVO ? row.feeType : row.brandType
// 不是特价则显示其他字段
if(!row.specialPriceType){
freightFields = [
// {field: 'oneSeaFreight', label: '成交单价'},
{field: 'originalSeaFreight', label: this.$t('默认单价(无牌无液无电)')},
......@@ -439,6 +438,7 @@ export default {
freightFields.push({field: 'afterDiscountSeaFreight', label: this.$t('优惠后单价')})
}
freightFields.push({field: 'oneSeaFreight', label: this.$t('成交单价')})
console.log({freightFields})
freightFields.forEach(item => {
if(row[item.field]){
freight.push({
......@@ -460,7 +460,7 @@ export default {
]
// 品牌加价
if(row['brandClearanceFeePrice'] && row['brandClearanceFeePrice'] > 0){
freightFields.push({field: 'brandClearanceFeePrice', label: brandType == 1 ? this.$t('有品牌加价') : this.$t('中性品牌加价')})
clearanceFields.push({field: 'brandClearanceFeePrice', label: brandType == 1 ? this.$t('有品牌加价') : this.$t('中性品牌加价')})
}
if(row['discountClearanceFeePrice'] && row['discountClearanceFeePrice'] > 0){
clearanceFields.push({field: 'afterDiscountClearanceFreight', label: this.$t('优惠后单价')})
......@@ -477,7 +477,7 @@ export default {
})
}
})
}
freight.push({
label: '价格更新时间',
......
......@@ -498,6 +498,8 @@ export default {
this.form.material = this.warehousing.material
if (this.warehousing.brand && this.warehousing.brand !== 0){
this.form.brand = this.warehousing.brand.toString() || ''
} else {
this.form.brand = ''
}
this.handleBrandChange(this.form.brand)
getWarehouseLastUpdateApprovalInfo({
......
......@@ -54,6 +54,10 @@
<el-button type="primary" plain icon="el-icon-setting" size="mini" @click="handleEdit" v-hasPermi="['ecw:product:attr']">{{$t('批量设置商品属性')}}</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" >{{$t('导出')}}</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
......@@ -92,14 +96,11 @@
</template>
</el-table-column>
<el-table-column prop="status" align="center" :label="$t('状态')" width="120">
<!-- <el-table-column prop="status" align="center" :label="$t('状态')" width="120">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/>
<!-- <el-select v-model="scope.row.status" @change="handleStatusChange(scope.row, 'status')">
<el-option v-for="statusItem in statusDictDatas" :key="statusItem.id" :label="statusItem.value == CommonStatusEnum.ENABLE + '' ? '已上架' : '已下架'" :value="parseInt(statusItem.value)" />
</el-select> -->
</template>
</el-table-column>
</el-table-column> -->
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
......@@ -385,6 +386,7 @@ export default {
this.loading = true;
// 处理查询参数
let params = { ...this.queryParams };
params.filter=false;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行查询
getProductPage(params).then(response => {
......@@ -502,7 +504,7 @@ export default {
this.exportLoading = true;
return exportProductExcel(params);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.$download.excel(response, '商品.xlsx');
this.exportLoading = false;
}).catch(() => { });
},
......
......@@ -77,6 +77,9 @@
<el-button v-if="!$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="batchBlock" :disabled="multiple">{{$t('批量加入黑名单')}}</el-button>
<el-button v-if="!$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="batchOff" :disabled="multiple">{{$t('批量下架')}}</el-button>
<el-button v-if="!$route.query.product_id" type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" >{{$t('导出')}}</el-button>
</el-col>
<!--指定商品-->
<el-button v-if="$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="batchSetSingleProductPrice">{{$t('批量设置单个商品的路线')}}</el-button>
</el-col>
......@@ -711,14 +714,16 @@ export default {
params.pageNo = undefined;
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm(this.$t('是否确认导出所有产品价格数据项?')).then(() => {
// c
this.$modal.confirm(this.$t('是否确认导出所有数据项?')).then(() => {
this.exportLoading = true;
return exportProductPriceExcel(params);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
this.$download.excel(response, '路线价格.xlsx');
this.exportLoading = false;
}).catch(() => {});
}).catch(() => {
this.exportLoading = false;
});
},
// 表格多选
handleSelectionChange(selection) {
......
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