Commit 64ee5ef8 authored by 我在何方's avatar 我在何方
parents 04d0dc85 b33c61d8
......@@ -233,7 +233,6 @@ export function getBoxApproval(params) {
export function downloadAgentListFiles(params) {
return request({
url: "/ecw/box-preload-goods/downloadAgentListFiles",
responseType: "arraybuffer",
method: "get",
params,
});
......@@ -243,7 +242,6 @@ export function downloadAgentListFiles(params) {
export function downloadSoncapFiles(params) {
return request({
url: "/ecw/box-preload-goods/downloadSoncapFiles",
responseType: "arraybuffer",
method: "get",
params,
});
......@@ -288,3 +286,12 @@ export function downloadReceivableList(params) {
params,
});
}
// 下载提单copy
export function downloadLadingCopy(params) {
return request({
url: "/ecw/box-lading-copy/downloadLadingCopy",
method: "get",
params,
});
}
......@@ -137,8 +137,8 @@
<el-dropdown-item command="downloadReceivableList">应收汇总表</el-dropdown-item>
<el-dropdown-item command="downloadAgentListFiles">agent list</el-dropdown-item>
<el-dropdown-item command="downloadSoncapFiles">soncap</el-dropdown-item>
<el-dropdown-item command="">提货单</el-dropdown-item>
<el-dropdown-item command="">提单Copy</el-dropdown-item>
<el-dropdown-item command="zipDownload">提货单</el-dropdown-item>
<el-dropdown-item command="downloadLadingCopy">提单Copy</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
......@@ -166,8 +166,15 @@
</template>
<script>
import { deletebox, getbox, getboxPage, exportboxExcel } from "@/api/ecw/box";
import { downloadFile } from "./shippingSea/utils";
import {
deletebox,
getbox,
getboxPage,
exportboxExcel,
downloadAgentListFiles,
downloadSoncapFiles,
} from "@/api/ecw/box";
import { downloadFile, downloadFileByUrl } from "./shippingSea/utils";
import { getCabinetPage } from "@/api/ecw/cabinet";
import { getWarehouseList } from "@/api/ecw/warehouse";
import { getListTree } from "@/api/ecw/region";
......@@ -418,21 +425,18 @@ export default {
"xlsx"
);
break;
case "downloadAgentListFiles":
case "zipDownload":
downloadFile(
command,
{ shipmentId: row.id },
`agentList(${row.selfNo}).xlsx`,
"xlsx"
`提货单(${row.selfNo}).zip`,
"zip"
);
break;
case "downloadAgentListFiles":
case "downloadSoncapFiles":
downloadFile(
command,
{ shipmentId: row.id },
`soncap(${row.selfNo}).xlsx`,
"xlsx"
);
case "downloadLadingCopy":
downloadFileByUrl(command, { shipmentId: row.id });
break;
}
......
......@@ -205,6 +205,7 @@ import {
formatDate,
serviceMsg,
downloadFile,
downloadFileByUrl,
} from "./shippingSea/utils";
import { getSectionList, boxGoodsDetail } from "@/api/ecw/boxSea";
import { getSupplierPage } from "@/api/ecw/supplier";
......@@ -275,10 +276,14 @@ export default {
{ title: "预装单", serviceName: "downloadPreloadGoodsList" },
{ title: "已装单", serviceName: "downloadLoadGoodsList" },
{ title: "应收汇总表", serviceName: "downloadReceivableList" },
{ title: "提货单", serviceName: "" },
{ title: "agent list", serviceName: "" },
{ title: "soncap", serviceName: "" },
{ title: "提单Copy", serviceName: "" },
{ title: "提货单", serviceName: "zipDownload", fileFormat: "zip" },
{
title: "agent list",
serviceName: "downloadAgentListFiles",
type: "url",
},
{ title: "soncap", serviceName: "downloadSoncapFiles", type: "url" },
{ title: "提单Copy", serviceName: "downloadLadingCopy", type: "url" },
],
};
},
......@@ -444,12 +449,20 @@ export default {
},
formatDate,
downloadDetailFile(row) {
const { fileFormat, type } = row;
if (type === "url") {
downloadFileByUrl(row.serviceName, { shipmentId: this.shipmentId });
} else {
let fileName = `${row.title}(${this.shipmentObj.selfNo}).${
fileFormat ?? "xlsx"
}`;
downloadFile(
row.serviceName,
{ shipmentId: this.shipmentId },
`${row.title}(${this.shipmentObj.selfNo}).xlsx`,
"xlsx"
fileName,
fileFormat ?? "xlsx"
);
}
},
},
computed: {
......
......@@ -1501,6 +1501,12 @@ function downloadFile(funName, params, fileName, fileFormat) {
});
}
function downloadFileByUrl(funName, params) {
_BOX[funName](params).then((res) => {
if (res.data) FileSaver.saveAs(res.data);
});
}
export {
getStatusName,
getColmnMapping,
......@@ -1518,4 +1524,5 @@ export {
serviceMsg,
toReviewDetail,
downloadFile,
downloadFileByUrl,
};
......@@ -103,7 +103,7 @@
</el-col>
<el-col :span="12">
<el-form-item :label="$t('客户经理')" prop="customerService">
<el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')">
<el-select v-model="form.customerService" :placeholder="$t('请选择客户经理')" :disabled="customerId !== '0' && form.customerService">
<el-option v-for="item in serviceUserList"
:key="item.id" :label="item.nickname" :value="item.id" />
</el-select>
......@@ -431,6 +431,8 @@ export default {
},
created() {
this.reset()
this.handleAddContact()
if(this.customerId !== '0') {
this.getCustomer(this.customerId).then(() => {
getCustomerContactsListByCustomer({customerId: this.customerId}).then(r => {
......@@ -664,6 +666,7 @@ export default {
createTime: undefined,
isShowTidanPrice:true,
};
this.form.createTime = (new Date()).getTime()
this.resetForm("form");
},
getCustomer(id) {
......
......@@ -20,10 +20,10 @@
<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('国家')">{{ getDictDataLabel(DICT_TYPE.COUNTRY, customer.country) }}</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('客户类别')">{{ getDictDataLabel(DICT_TYPE.CUSTOMER_TYPE, customer.type) }}</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>
......@@ -73,13 +73,15 @@
</template>
</el-table-column>
<el-table-column
prop="username"
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
......@@ -404,9 +406,9 @@ import {
orderStatistics,
creditLogCreate,
creditScoreStatistic,
infoListReceiptPage
infoListReceiptPage, userMemberUserList
} from '@/api/ecw/customer'
import { DICT_TYPE, getDictDataLabel } from '@/utils/dict'
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"
......@@ -417,6 +419,7 @@ import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts'
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: 'query',
......@@ -442,6 +445,10 @@ export default {
getCustomerContactsListByCustomer({customerId: this.id}).then(r => {
this.customerContacts = r.data
})
getCountry(this.customer.country).then(r => {
this.country = r.data.nameZh
})
})
getProductTypeList().then(r => {
this.productTypeList = r.data
......@@ -461,6 +468,10 @@ export default {
this.getOrderStatistics()
this.creditScoreStatisticFn()
this.infoListReceiptFn()
userMemberUserList().then(r => {
this.memberList = r.data
})
},
data() {
return {
......@@ -476,12 +487,14 @@ export default {
dialogVisible:false,
DICT_TYPE,
getDictDataLabel,
getDictDatas2,
parseTime,
nodeList: [],
productTypeList: [],
customerSelect: [],
serviceUserList: [],
customerContacts: [],
memberList: [],
customer: {
id: undefined,
number: undefined,
......@@ -559,7 +572,8 @@ export default {
pageNo:1,
pageSize:10,
},
infoListReceiptTotal:0
infoListReceiptTotal:0,
country: ''
}
},
computed: {
......@@ -591,6 +605,14 @@ export default {
}
},
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];
......
......@@ -8,9 +8,16 @@
<el-tabs v-model="activeName" type="card" @tab-click="handleTabs">
<el-tab-pane :label="edit ? '货物修改' : '货物入仓'" name="first">
<el-descriptions border :column="2">
<el-descriptions-item label="中文品名">{{ warehousing.prodTitleZh }}</el-descriptions-item>
<el-descriptions-item label="英文品名">{{ warehousing.prodTitleEn }}</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span> 中文品名</template>
{{ warehousing.prodTitleZh }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span> 英文品名</template>
{{ warehousing.prodTitleEn }}
</el-descriptions-item>
<el-descriptions-item label="品牌">
<template slot="label"><span style="color: red">*</span> 品牌</template>
<span v-if="false">{{ form.brand ? brand : '无' }}</span>
<el-select
v-else v-model="form.brand"
......@@ -22,12 +29,18 @@
v-for="item in brandList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
:value="item.titleZh">
</el-option>
</el-select>
</el-descriptions-item>
<el-descriptions-item label="是否备案">{{ isBeian }}</el-descriptions-item>
<el-descriptions-item label="收费模式">{{ feeType }}</el-descriptions-item>
<el-descriptions-item label="是否备案">
<template slot="label"><span style="color: red">*</span> 是否备案</template>
{{ isBeian }}
</el-descriptions-item>
<el-descriptions-item label="收费模式">
<template slot="label"><span style="color: red">*</span> 收费模式</template>
{{ feeType }}
</el-descriptions-item>
<el-descriptions-item label="填单参数">
箱数:
<el-input size="mini" v-if="edit" v-model="warehousing.num" style="display: inline-block;width: 100px"></el-input>
......@@ -359,7 +372,7 @@ export default {
opened: false,
brandList: [],
form: {
"brand": "",
"brand": "0",
"brandType": 0,
"inTime": "",
"material": "",
......@@ -386,7 +399,7 @@ export default {
quantityAll: [{required: true, message: "数量不能为空", trigger: "blur"}]
},
form1: {
"brand": "",
"brand": "0",
"brandType": 0,
"inTime": "",
"material": "",
......
......@@ -291,14 +291,14 @@ export default {
})
},
getTowSum(){
let sumVolume = 0
let sumWeight = 0
this.order.orderItemVOList.forEach(e => {
if (e?.warehouseInInfoVO?.volume) sumVolume += e.warehouseInInfoVO.volume
if (e?.warehouseInInfoVO?.weight) sumWeight += e.warehouseInInfoVO.weight
})
this.form.sumVolume = sumVolume
this.form.sumWeight = sumWeight
// let sumVolume = 0
// let sumWeight = 0
// this.order.orderItemVOList.forEach(e => {
// if (e?.warehouseInInfoVO?.volume) sumVolume += e.warehouseInInfoVO.volume
// if (e?.warehouseInInfoVO?.weight) sumWeight += e.warehouseInInfoVO.weight
// })
this.form.sumVolume = this.order.sumVolume// || sumVolume
this.form.sumWeight = this.order.sumWeight// || sumWeight
},
getOrder(){
getOrder(this.orderId).then(r => {
......
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