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