Commit 3abc43ec authored by 我在何方's avatar 我在何方
parents b07cd6fb 68b7bb0e
...@@ -275,7 +275,6 @@ export function downloadSoncapFiles(params) { ...@@ -275,7 +275,6 @@ export function downloadSoncapFiles(params) {
export function downloadCustomFiles(params) { export function downloadCustomFiles(params) {
return request({ return request({
url: "/ecw/box-preload-goods/downloadCustomFiles", url: "/ecw/box-preload-goods/downloadCustomFiles",
responseType: "arraybuffer",
method: "get", method: "get",
params, params,
}); });
......
...@@ -701,6 +701,21 @@ export function batchUnload(data) { ...@@ -701,6 +701,21 @@ export function batchUnload(data) {
}); });
} }
/**
* 单个卸柜
*
* @export
* @param {*} data
* @return {*}
*/
export function singleUnload(data) {
return request({
url: "/ecw/box-load-info/singleUnload",
method: "post",
data,
});
}
/** /**
* 一键卸柜 * 一键卸柜
* *
......
...@@ -149,10 +149,18 @@ export function getMyCustomerService(query){ ...@@ -149,10 +149,18 @@ export function getMyCustomerService(query){
}) })
} }
//获取会员列表 //获取会员列表
export function userMemberUserList(){ export function userMemberUserList(params){
return request({ return request({
url:'/member/user/member-user-list', url:'/member/user/member-user-list',
method:'get' method:'get',
params
})
}
export function memberUserList(params){
return request({
url:'/member/user/list',
method:'get',
params
}) })
} }
//查看某客户授权的品牌 //查看某客户授权的品牌
......
...@@ -21,11 +21,11 @@ export function itemTypeListApi(query){ ...@@ -21,11 +21,11 @@ export function itemTypeListApi(query){
}) })
} }
// //
export function customerDropDownList(query){ export function customerDropDownList(params){
return request({ return request({
url:'/ecw/customer/select', url:'/ecw/customer/select',
method:'get', method:'get',
query, params,
}) })
} }
//商品 //商品
......
...@@ -128,4 +128,4 @@ export default { ...@@ -128,4 +128,4 @@ export default {
overflow-x: hidden; overflow-x: hidden;
padding: 0 10px; padding: 0 10px;
} }
</style> </style>
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div style="text-align: center">区域</div> <div style="text-align: center">区域</div>
<div style="background-color: #efefef;padding: 10px 10px 0;border: #dcdcdc solid 1px;border-radius: 2px"> <div style="background-color: #efefef;padding: 10px 10px 0;border: #dcdcdc solid 1px;border-radius: 2px">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12" v-for="(warehouse, i) in item.children" :key="i"> <el-col :span="12" v-for="warehouse in item.children" :key="warehouse.id">
<div <div
class="warehouse-block" class="warehouse-block"
:class="{'warehouse-block-selected': warehouse.selected, 'warehouse-block-active': warehouse.id === activeWarehouse.id}" :class="{'warehouse-block-selected': warehouse.selected, 'warehouse-block-active': warehouse.id === activeWarehouse.id}"
...@@ -28,14 +28,25 @@ ...@@ -28,14 +28,25 @@
<div> <div>
<div style="text-align: center">仓位</div> <div style="text-align: center">仓位</div>
<div class="position-group"> <div class="position-group">
<div class="position" v-for="position in activeWarehouse.positionList" :key="item.id"> <div class="position" v-for="position in activeWarehouse.positionList" :key="position.id" @click="handleSelectPosition(position)">
<div <template v-if="position.children">
class="position-item" <div
v-for="item in position.children" class="position-item"
@click="handleSelectPosition(item)" v-for="item in position.children"
:class="{'position-item-active': item.selected}"> :key="item.id"
{{ item.code }} @click.stop="handleSelectPositionChild(item)"
</div> :class="{'position-item-active': item.selected}">
{{ item.code }}
</div>
</template>
<template v-else>
<div
class="position-item"
:class="{'position-item-active': position.selected}">
{{ position.code }}
</div>
</template>
</div> </div>
</div> </div>
</div> </div>
...@@ -82,7 +93,8 @@ export default { ...@@ -82,7 +93,8 @@ export default {
activeName: '0', activeName: '0',
selectedWarehouse: [], selectedWarehouse: [],
selectedPosition: [], selectedPosition: [],
activeWarehouse: {} activeWarehouse: {},
activeWarehouseId: undefined
}; };
}, },
...@@ -100,6 +112,7 @@ export default { ...@@ -100,6 +112,7 @@ export default {
f.selected = false f.selected = false
if(f.positionList) f.positionList.forEach(g => { if(f.positionList) f.positionList.forEach(g => {
// 位置 // 位置
g.selected = false
g.children?.forEach(k => { g.children?.forEach(k => {
// 子位置 // 子位置
k.selected = false k.selected = false
...@@ -130,18 +143,21 @@ export default { ...@@ -130,18 +143,21 @@ export default {
this.activeWarehouse = warehouse this.activeWarehouse = warehouse
if (!!warehouse.selected) { if (!!warehouse.selected) {
warehouse.selected = false warehouse.selected = false
} else if(this.activeWarehouseId !== warehouse.id) {
this.activeWarehouseId = warehouse.id
} else { } else {
warehouse.selected = true warehouse.selected = true
// 区域被选,清空该区域下的位置 // 区域被选,清空该区域下的位置
if(warehouse.positionList) warehouse.positionList.forEach(g => { if(warehouse.positionList) warehouse.positionList?.forEach(g => {
g.selected = false
g.children?.forEach(k => { g.children?.forEach(k => {
k.selected = false k.selected = false
}) })
}) })
} }
}, },
handleSelectPosition(position) { handleSelectPositionChild(position) {
if (!!position.selected) { if (!!position.selected) {
position.selected = false position.selected = false
...@@ -150,7 +166,7 @@ export default { ...@@ -150,7 +166,7 @@ export default {
if (!parentAre.selected) { if (!parentAre.selected) {
// 检查父区域下是否所有位置被反选 // 检查父区域下是否所有位置被反选
let hasSelected = false let hasSelected = false
parentAre.positionList.forEach(g => { parentAre.positionList?.forEach(g => {
// 位置 // 位置
g.children?.forEach(k => { g.children?.forEach(k => {
// 子位置 // 子位置
...@@ -166,6 +182,17 @@ export default { ...@@ -166,6 +182,17 @@ export default {
// 选位置时,父区域反选 // 选位置时,父区域反选
this.area.find(e => e.id === position.domainId).children.find(f => f.id === position.areaId).selected = false this.area.find(e => e.id === position.domainId).children.find(f => f.id === position.areaId).selected = false
}
},
handleSelectPosition(position) {
if (!!position.selected) {
position.selected = false
} else {
position.selected = true
// 选位置时,父区域反选
this.area.find(e => e.id === position.domainId).children.find(f => f.id === position.areaId).selected = false
} }
} }
}, },
...@@ -179,17 +206,17 @@ export default { ...@@ -179,17 +206,17 @@ export default {
selected() { selected() {
const result = [] const result = []
this.area.forEach(e => { this.area?.forEach(e => {
// 仓库 // 仓库
e.children.forEach(f => { e.children?.forEach(f => {
// 区域 // 区域
if (f.selected) result.push(f.code) if (f.selected) result.push(f.code)
else if(f.positionList) f.positionList.forEach(g => { else f.positionList?.forEach(g => {
// 位置 // 位置
if (g.selected) result.push(k.code) if (g.selected) result.push(f.code + g.code)
g.children?.forEach(k => { else if(g.children) g.children?.forEach(k => {
// 子位置 // 子位置
if (k.selected) result.push(k.code) if (k.selected) result.push(f.code + k.code)
}) })
}) })
}) })
...@@ -200,33 +227,35 @@ export default { ...@@ -200,33 +227,35 @@ export default {
inputValue(){ inputValue(){
const result = [] const result = []
this.area.forEach(e => { this.area?.forEach(e => {
// 仓库 // 仓库
e.children.forEach(f => { e.children?.forEach(f => {
// 区域 // 区域
if (f.selected) result.push({ if (f.selected) result.push({
orderId: this.orderId, orderId: this.orderId,
wareId: f.pid, wareId: f.pid,
areaId: f.id areaId: f.id
}) })
else if(f.positionList) f.positionList.forEach(g => { else {
// 位置 f.positionList?.forEach(g => {
if (g.selected) result.push({ // 位置
orderId: this.orderId, if (g.selected) result.push({
wareId: g.domainId,
areaId: g.areaId,
locationId: g.id
})
else g.children.forEach(k => {
// 子位置
if (k.selected) result.push({
orderId: this.orderId, orderId: this.orderId,
wareId: k.domainId, wareId: g.domainId,
areaId: k.areaId, areaId: g.areaId,
locationId: k.id locationId: g.id
})
else g.children?.forEach(k => {
// 子位置
if (k.selected) result.push({
orderId: this.orderId,
wareId: k.domainId,
areaId: k.areaId,
locationId: k.id
})
}) })
}) })
}) }
}) })
}) })
...@@ -269,9 +298,10 @@ export default { ...@@ -269,9 +298,10 @@ export default {
border: 1px #EFEFEF solid; border: 1px #EFEFEF solid;
gap: 1px; gap: 1px;
min-height: 64px; min-height: 64px;
flex-flow: wrap;
} }
.position{ .position{
width: 20%; width: calc(20% - 1px);
height: 64px; height: 64px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
This diff is collapsed.
...@@ -192,6 +192,7 @@ export default { ...@@ -192,6 +192,7 @@ export default {
} }
this.currRow = row; this.currRow = row;
this.$set(this.dialogCfg, "type", type); this.$set(this.dialogCfg, "type", type);
this.$set(this.dialogCfg, "width", "750px");
this.$set(this.dialogCfg, "visible", true); this.$set(this.dialogCfg, "visible", true);
}, },
makeBill(row) { makeBill(row) {
...@@ -201,11 +202,10 @@ export default { ...@@ -201,11 +202,10 @@ export default {
}).then((res) => { }).then((res) => {
const { data } = res; const { data } = res;
const { titleZh = "", contentZh = "" } = data?.ladingTemplate ?? {}; const { titleZh = "", contentZh = "" } = data?.ladingTemplate ?? {};
let billContent = `${titleZh}${data.orderInfo}${contentZh}`, let billContent = `${titleZh}${data.orderInfo}${contentZh}`;
orderNo = data.orderInfo?.orderNo ?? "";
this.currData = { this.currData = {
billContent, billContent,
orderNo, orderNo: this.currRow.orderNo,
}; };
}); });
}, },
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
<el-row> <el-row>
<div class="title-orderNo">订单号:{{orderNo}}</div> <div class="title-orderNo">订单号:{{orderNo}}</div>
</el-row> </el-row>
<vue-ueditor-wrap v-model="billContent" :config="editorConfig" editor-id="billUeditor" /> <el-row class="ueditor-row">
<vue-ueditor-wrap v-model="billContent" :config="editorConfig" editor-id="billUeditor" style="max-width: 690px;" />
</el-row>
<!-- 审核流程 --> <!-- 审核流程 -->
<el-row class="process-area"> <el-row class="process-area">
...@@ -22,7 +24,7 @@ ...@@ -22,7 +24,7 @@
</div> </div>
</el-row> </el-row>
<el-dialog :title="dialogCfg.title" :visible.sync="visible" width="80%" append-to-body class="shippingSea-dialog"> <el-dialog :title="dialogCfg.title" :visible.sync="visible" width="850px" append-to-body class="shippingSea-dialog">
<previewBill v-if="visible" :contentHtml="billContent" :currRow="currRow" :type="dialogCfg.type" /> <previewBill v-if="visible" :contentHtml="billContent" :currRow="currRow" :type="dialogCfg.type" />
</el-dialog> </el-dialog>
</el-row> </el-row>
...@@ -234,5 +236,9 @@ export default { ...@@ -234,5 +236,9 @@ export default {
text-align: center; text-align: center;
} }
} }
.ueditor-row {
display: flex;
justify-content: center;
}
} }
</style> </style>
<template> <template>
<el-row> <el-row>
<div v-html="contentHtml"></div> <div v-html="contentHtml" class="contentHtml"></div>
<el-row v-if="currRow.status === 2 && type === 'previewBill'" style="text-align: center;"> <el-row v-if="currRow.status === 2 && type === 'previewBill'" style="text-align: center;">
<el-button type="primary" @click="download">下载</el-button> <el-button type="primary" @click="download">下载</el-button>
<el-button type="primary" @click="print">打印</el-button> <el-button type="primary" @click="print">打印</el-button>
...@@ -55,6 +55,11 @@ export default { ...@@ -55,6 +55,11 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .contentHtml {
> table {
width: 96% !important;
margin-left: 2%;
}
}
</style> </style>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
{{getVolumeWeight(loadDetail.totalStatistics)}} {{getVolumeWeight(loadDetail.totalStatistics)}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="货柜状态"> <el-descriptions-item label="货柜状态">
{{getCabinetStatus(boxBackVO)}} {{boxBackVO.shipmentStatusText}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
{{getVolumeWeight(loadDetail.totalStatistics)}} {{getVolumeWeight(loadDetail.totalStatistics)}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="货柜状态"> <el-descriptions-item label="货柜状态">
{{getCabinetStatus(boxBackVO)}} {{boxBackVO.shipmentStatusText}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
......
...@@ -182,15 +182,15 @@ ...@@ -182,15 +182,15 @@
<el-form ref="shopForm" :model="shopForm" :rules="shopRules" label-width="100px"> <el-form ref="shopForm" :model="shopForm" :rules="shopRules" label-width="100px">
<el-row> <el-row>
<el-form-item label="中文品名:" prop="prodTitleZh"> <el-form-item label="中文品名:" prop="prodTitleZh">
<el-select v-model="shopForm.prodTitleZh" placeholder="请选择中文品名" @change="changeProdTitleZh"> <el-select v-model="shopForm.zhId" placeholder="请选择中文品名" @change="changeProdTitleZh">
<el-option v-for="item in orderItems" :label="item.prodTitleZh" :value="item.prodTitleZh" :key="item.prodTitleZh"></el-option> <el-option v-for="item in orderItems" :label="item.prodTitleZh" :value="iitem.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="英文品名:" prop="prodTitleEn"> <el-form-item label="英文品名:" prop="prodTitleEn">
<el-select v-model="shopForm.prodTitleEn" placeholder="请选择英文品名" @change="changeProdTitleEn"> <el-select v-model="shopForm.enId" placeholder="请选择英文品名" @change="changeProdTitleEn">
<el-option v-for="item in orderItems" :label="item.prodTitleEn" :value="item.prodTitleEn" :key="item.prodTitleEn"></el-option> <el-option v-for="item in orderItems" :label="item.prodTitleEn" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="剩余箱数:"> <el-form-item label="剩余箱数:">
...@@ -318,22 +318,18 @@ export default { ...@@ -318,22 +318,18 @@ export default {
}, },
/* 打开拆单 */ /* 打开拆单 */
getSplit() { getSplit() {
this.querySplitGoods().then((res) => { if (this.currRow.goodsList && this.currRow.goodsList.length) {
if (res) { const [orderItem] = this.currRow.goodsList;
if (this.currRow.goodsList && this.currRow.goodsList.length) { createSplit({
const [orderItem] = this.currRow.goodsList; parentOrderId: this.currRow.orderId,
createSplit({ parentOrderNo: this.currRow.orderNo,
parentOrderId: this.currRow.orderId, dstWarehouseId: orderItem.destWarehouseId,
parentOrderNo: this.currRow.orderNo, transportId: orderItem.transportId,
dstWarehouseId: orderItem.destWarehouseId, shipmentType: 1,
transportId: orderItem.transportId, }).then((res) => {
shipmentType: 1, this.querySplitGoods();
}).then((res) => { });
this.querySplitGoods(); }
});
}
}
});
}, },
/* 查询拆单项 */ /* 查询拆单项 */
querySplitGoods() { querySplitGoods() {
...@@ -346,6 +342,7 @@ export default { ...@@ -346,6 +342,7 @@ export default {
const { orderSplitBackVOList } = res.data; const { orderSplitBackVOList } = res.data;
if (orderSplitBackVOList && orderSplitBackVOList.length) { if (orderSplitBackVOList && orderSplitBackVOList.length) {
this.orderItems = this.currRow.goodsList ?? []; this.orderItems = this.currRow.goodsList ?? [];
console.log(this.orderItems)
// 取拆单项 // 取拆单项
this.splitData = orderSplitBackVOList.filter( this.splitData = orderSplitBackVOList.filter(
(item) => !item.isMaster (item) => !item.isMaster
...@@ -389,8 +386,14 @@ export default { ...@@ -389,8 +386,14 @@ export default {
leviteSum, leviteSum,
column.warehouseInInfoVO?.cartonsNum ?? 0 column.warehouseInInfoVO?.cartonsNum ?? 0
).toNumber(); ).toNumber();
leviteV += Decimal.add(leviteV, column.warehouseInInfoVO?.volume ?? 0).toFixed(2); leviteV = Decimal.add(
leviteW += Decimal.add(leviteW, column.warehouseInInfoVO?.weight ?? 0).toFixed(2); leviteV,
column.warehouseInInfoVO?.volume ?? 0
).toFixed(2);
leviteW = Decimal.add(
leviteW,
column.warehouseInInfoVO?.weight ?? 0
).toFixed(2);
}); });
sums[1] = sums[1] =
"下单统计:" + "下单统计:" +
...@@ -438,7 +441,7 @@ export default { ...@@ -438,7 +441,7 @@ export default {
changeProdTitleZh() { changeProdTitleZh() {
let list = []; let list = [];
list = this.currRow.goodsList.filter( list = this.currRow.goodsList.filter(
(item) => item.prodTitleZh == this.shopForm.prodTitleZh (item) => item.id == this.shopForm.zhId
); );
this.shopForm.sum = this.shopForm.sum =
this.currRow.num - this.currRow.installNum - this.totalSplitNum(); this.currRow.num - this.currRow.installNum - this.totalSplitNum();
...@@ -448,7 +451,7 @@ export default { ...@@ -448,7 +451,7 @@ export default {
changeProdTitleEn() { changeProdTitleEn() {
let list = []; let list = [];
list = this.orderData.orderItemVOList.filter( list = this.orderData.orderItemVOList.filter(
(item) => item.prodTitleEn == this.shopForm.prodTitleEn (item) => item.id == this.shopForm.enId
); );
this.shopForm.sum = this.shopForm.sum =
this.currRow.num - this.currRow.installNum - this.totalSplitNum(); this.currRow.num - this.currRow.installNum - this.totalSplitNum();
...@@ -460,7 +463,10 @@ export default { ...@@ -460,7 +463,10 @@ export default {
if (valid) { if (valid) {
// 输入箱数大于实装箱数 // 输入箱数大于实装箱数
const total = this.totalSplitNum(); const total = this.totalSplitNum();
const canSplitNum = Decimal.sub(this.currRow.num, this.currRow.installNum).toNumber(); const canSplitNum = Decimal.sub(
this.currRow.num,
this.currRow.installNum
).toNumber();
const remain = Decimal.sub(canSplitNum, total).toNumber(); const remain = Decimal.sub(canSplitNum, total).toNumber();
if (this.shopForm.num > remain) { if (this.shopForm.num > remain) {
this.$message.error("放入箱数不能大于总箱数"); this.$message.error("放入箱数不能大于总箱数");
......
...@@ -545,7 +545,7 @@ export default { ...@@ -545,7 +545,7 @@ export default {
}, },
/* 是否显示拆单 */ /* 是否显示拆单 */
isShowSplitOrder(row) { isShowSplitOrder(row) {
if (row.num > row.installNum) { if (row.num > row.installNum && row.installNum !== 0) {
return true; return true;
} }
return false; return false;
......
...@@ -159,7 +159,7 @@ import { ...@@ -159,7 +159,7 @@ import {
formatDateStr, formatDateStr,
serviceMsg, serviceMsg,
toReviewDetail, toReviewDetail,
downloadFile, downloadFileByUrl,
} from "../utils"; } from "../utils";
import ImageUpload from "@/components/ImageUpload"; import ImageUpload from "@/components/ImageUpload";
import Decimal from "decimal.js"; import Decimal from "decimal.js";
...@@ -477,12 +477,7 @@ export default { ...@@ -477,12 +477,7 @@ export default {
}, },
/* 下载报关单 */ /* 下载报关单 */
downloadCusFile() { downloadCusFile() {
downloadFile( downloadFileByUrl('downloadCustomFiles', { shipmentId: this.shipmentObj.id });
"downloadCustomFiles",
{ shipmentId: this.shipmentObj.id },
`报关单(${this.shipmentObj.selfNo}).xlsx`,
"xlsx"
);
}, },
}, },
watch: { watch: {
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
<el-row class="number-area"> <el-row class="number-area">
<p class="label-font">自编号:</p> <p class="label-font">自编号:</p>
<p class="label-font">{{selfNo}}</p> <p class="label-font">{{selfNo}}</p>
<el-input v-model="labelNo" placeholder="请输入标签号"></el-input> <el-input v-model="labelNo" placeholder="请输入"></el-input>
<div> <div>
<el-button type="primary" @click="modifyUnload">提交</el-button>
<el-button type="primary" @click="modifyBatchUnload">批量输入</el-button> <el-button type="primary" @click="modifyBatchUnload">批量输入</el-button>
<el-button type="primary" @click="modifyAllUnload">一键卸柜</el-button> <el-button type="primary" @click="modifyAllUnload">一键卸柜</el-button>
</div> </div>
...@@ -122,6 +123,7 @@ import { ...@@ -122,6 +123,7 @@ import {
approvalCreate, approvalCreate,
approvalCancel, approvalCancel,
getSectionList, getSectionList,
singleUnload,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import { serviceMsg, getTotlContent, toReviewDetail } from "../../utils"; import { serviceMsg, getTotlContent, toReviewDetail } from "../../utils";
import WorkFlow from "@/components/WorkFlow"; import WorkFlow from "@/components/WorkFlow";
...@@ -190,14 +192,30 @@ export default { ...@@ -190,14 +192,30 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
/* 单个卸柜 */
modifyUnload() {
if (!this.labelNo) {
this.$message.error("请输入箱号标签");
return;
}
singleUnload({
orderNumCode: this.labelNo,
shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => {
serviceMsg(res, this).then((res) => {
this.labelNo = "";
this.getLoadGoodsList();
});
});
},
/* 批量输入 */ /* 批量输入 */
modifyBatchUnload() { modifyBatchUnload() {
if (!this.labelNo) { if (!this.labelNo) {
this.$message.error("请输入标签"); this.$message.error("请输入订单");
return; return;
} }
batchUnload({ batchUnload({
orderNumCode: this.labelNo, orderNo: this.labelNo,
shipmentId: this.$attrs.shipmentObj.id, shipmentId: this.$attrs.shipmentObj.id,
}).then((res) => { }).then((res) => {
serviceMsg(res, this).then((res) => { serviceMsg(res, this).then((res) => {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
{{importCityName(shipmentObj.destWarehouseId)}} {{importCityName(shipmentObj.destWarehouseId)}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="状态"> <el-descriptions-item label="状态">
{{statusLabel}} {{shipmentObj.shipmentStatusText}}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
......
...@@ -282,8 +282,8 @@ ...@@ -282,8 +282,8 @@
> >
<template v-slot = "{row}"> <template v-slot = "{row}">
<el-form-item label=""> <el-form-item label="">
<el-select v-model="row.userid" @change="selectBD" size="mini" filterable> <el-select v-model="row.userid" remote :remote-method="getUserMemberUserFn" @change="selectBD" size="mini" filterable>
<el-option v-for="(item,index) in memberList" :value="item.id" :key="item.id" :label="item.nickname + '(' + item.mobile + ')'" ></el-option> <el-option v-for="(item,index) in userMemberUser" :value="item.id" :key="index" :label="item.nickname + '(' + item.mobile + ')'" ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
...@@ -408,7 +408,7 @@ import { ...@@ -408,7 +408,7 @@ import {
createCustomer, createCustomer,
getCustomer, getCustomer,
getCustomerList, getCustomerList,
getCustomerPage, getCustomerPage, memberUserList,
updateCustomer, updateCustomer,
userMemberUserList, userMemberUserList,
} from '@/api/ecw/customer' } from '@/api/ecw/customer'
...@@ -440,16 +440,23 @@ export default { ...@@ -440,16 +440,23 @@ export default {
created() { created() {
this.getCustomerSelect() this.getCustomerSelect()
this.reset() this.reset()
this.getUserMemberUserFn()
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 => {
this.form.customerContacts = r.data this.form.customerContacts = r.data
getCustomerList({ids:this.form.promoter}).then(r => { let list = this.form.customerContacts.map(item => item.userid);
console.log(r,'r'); if(list.length >0){
this.recommended = r.data; 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;
})
}
}) })
}) })
} else { } else {
...@@ -478,10 +485,6 @@ export default { ...@@ -478,10 +485,6 @@ export default {
getCountryListAll().then(r => { getCountryListAll().then(r => {
this.countryList = r.data this.countryList = r.data
}) })
userMemberUserList().then(r => {
this.memberList = r.data
})
this.getZhongPao() this.getZhongPao()
}, },
data(){ data(){
...@@ -532,10 +535,16 @@ export default { ...@@ -532,10 +535,16 @@ export default {
zhongLines: [], // 重货线路 zhongLines: [], // 重货线路
paoLines: [], // 泡货线路 paoLines: [], // 泡货线路
memberList:[],//会员列表 memberList:[],//会员列表
selectMemberList:[]//选中会员列表
} }
}, },
methods: { methods: {
getUserMemberUserFn(val){
userMemberUserList({pageNo:1,pageSize:100,searchKey:val}).then(r => {
this.memberList = r.data.list
})
},
remoteMethod(val){ remoteMethod(val){
this.getCustomerSelect(val); this.getCustomerSelect(val);
}, },
...@@ -585,8 +594,12 @@ export default { ...@@ -585,8 +594,12 @@ export default {
this.form.customerContacts[0].isDefault = 1 this.form.customerContacts[0].isDefault = 1
} }
}, },
selectBD(){ selectBD(val){
this.$forceUpdate(); 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() { cancel() {
...@@ -743,6 +756,12 @@ export default { ...@@ -743,6 +756,12 @@ export default {
} }
}, },
computed: { computed: {
userMemberUser(){
let list = this.memberList.filter(item => {
return this.selectMemberList.findIndex(i => i.id === item.id) < 0
})
return [...this.selectMemberList,...list]
},
productListFilter(){ productListFilter(){
return this.productList.filter((p) => p.typeId === this.form.productType) return this.productList.filter((p) => p.typeId === this.form.productType)
}, },
......
...@@ -406,7 +406,7 @@ import { ...@@ -406,7 +406,7 @@ import {
orderStatistics, orderStatistics,
creditLogCreate, creditLogCreate,
creditScoreStatistic, creditScoreStatistic,
infoListReceiptPage, userMemberUserList infoListReceiptPage, userMemberUserList, memberUserList
} from '@/api/ecw/customer' } from '@/api/ecw/customer'
import { DICT_TYPE, getDictDataLabel, getDictDatas2 } from '@/utils/dict' import { DICT_TYPE, getDictDataLabel, getDictDatas2 } from '@/utils/dict'
import { getProductTypeList } from '@/api/ecw/productType' import { getProductTypeList } from '@/api/ecw/productType'
...@@ -444,6 +444,10 @@ export default { ...@@ -444,6 +444,10 @@ export default {
getCustomerContactsListByCustomer({customerId: this.id}).then(r => { getCustomerContactsListByCustomer({customerId: this.id}).then(r => {
this.customerContacts = r.data 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 => { getCountry(this.customer.country ? this.customer.country : 0 ).then(r => {
...@@ -469,9 +473,7 @@ export default { ...@@ -469,9 +473,7 @@ export default {
this.creditScoreStatisticFn() this.creditScoreStatisticFn()
this.infoListReceiptFn() this.infoListReceiptFn()
userMemberUserList().then(r => {
this.memberList = r.data
})
}, },
data() { data() {
return { return {
......
...@@ -5,13 +5,15 @@ ...@@ -5,13 +5,15 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('客户名称')" prop="customerId" > <el-form-item :label="$t('客户名称')" prop="customerId" >
<el-select <el-select
:remote-method="customerDropDownFn"
remote
clearable clearable
filterable filterable
v-model="queryParams.customerId" v-model="queryParams.customerId"
:placeholder="$t('请输入关键词')"> :placeholder="$t('请输入关键词')">
<el-option <el-option
v-for="(item, index) in customeList" v-for="(item, index) in customerNameFn"
:key="index" :key="item.id"
:value="item.id" :value="item.id"
:label="item.name" :label="item.name"
> >
...@@ -140,6 +142,7 @@ import {deleteCustomerCommission, getCustomerCommissionPage, exportCustomerCommi ...@@ -140,6 +142,7 @@ import {deleteCustomerCommission, getCustomerCommissionPage, exportCustomerCommi
import {DICT_TYPE, getDictDatas} from "@/utils/dict"; import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import {getTradeCityList} from "@/api/ecw/region"; import {getTradeCityList} from "@/api/ecw/region";
import {customerDropDownList} from "@/api/ecw/customerCommissionInfo"; import {customerDropDownList} from "@/api/ecw/customerCommissionInfo";
import {getCustomerList} from "@/api/ecw/customer";
export default { export default {
name: "CustomerCommission", name: "CustomerCommission",
...@@ -187,6 +190,7 @@ export default { ...@@ -187,6 +190,7 @@ export default {
darkReturnType: [{ required: true, message: this.$t('暗佣类型 1产品2达标不能为空'), trigger: "change" }], darkReturnType: [{ required: true, message: this.$t('暗佣类型 1产品2达标不能为空'), trigger: "change" }],
}, },
customeList:[], customeList:[],
selectCustomeList:[]
}; };
}, },
computed:{ computed:{
...@@ -198,16 +202,24 @@ export default { ...@@ -198,16 +202,24 @@ export default {
exportCityList(){ exportCityList(){
return this.tradeCityList.filter(item => item.type == 2) return this.tradeCityList.filter(item => item.type == 2)
}, },
customerNameFn(){
if(this.selectCustomeList.length > 0){
let i = this.customeList.findIndex(item => item.id === this.selectCustomeList[0].id)
if(i < 0){
this.customeList.unshift(this.selectCustomeList[0])
}
}
return this.customeList
}
}, },
created() { created() {
customerDropDownList().then(res => { this.customerDropDownFn()
console.log(res);
if (res.code === 0) {
this.customeList = res.data
}
})
if(this.$route.query.customerId){ if(this.$route.query.customerId){
this.queryParams.customerId = Number(this.$route.query.customerId) this.queryParams.customerId = Number(this.$route.query.customerId)
getCustomerList({ids:this.queryParams.customerId}).then(r =>{
console.log(r,'rrr');
this.selectCustomeList = r.data
})
} }
this.getList(); this.getList();
getTradeCityList().then(res => { getTradeCityList().then(res => {
...@@ -215,6 +227,13 @@ export default { ...@@ -215,6 +227,13 @@ export default {
}) })
}, },
methods: { methods: {
customerDropDownFn(val){
customerDropDownList({pageNo:1,pageSize: 100,searchKey:val}).then(res => {
if (res.code === 0) {
this.customeList = res.data.list
}
})
},
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
......
This diff is collapsed.
...@@ -84,7 +84,10 @@ ...@@ -84,7 +84,10 @@
<el-descriptions-item :label="$t('联系电话')"> <el-descriptions-item :label="$t('联系电话')">
<el-input :disabled="type == 2" v-model="params.phone"></el-input> <el-input :disabled="type == 2" v-model="params.phone"></el-input>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('出仓日期')" > <el-descriptions-item>
<template slot="label">
<span style="color: red;font-size: 20px;margin-right: 5px;">*</span>{{$t('出仓日期')}}
</template>
<el-date-picker <el-date-picker
:disabled="type == 2" :disabled="type == 2"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
......
...@@ -174,13 +174,16 @@ ...@@ -174,13 +174,16 @@
<el-tab-pane label="添加新品名" name="second" v-if="!edit"> <el-tab-pane label="添加新品名" name="second" v-if="!edit">
<el-descriptions border :column="2"> <el-descriptions border :column="2">
<el-descriptions-item label="中文品名"> <el-descriptions-item>
<template slot="label"><span style="color: red">*</span> 中文品名</template>
<product-selector v-model="form1.prodId" @change="onProductChange"/> <product-selector v-model="form1.prodId" @change="onProductChange"/>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="英文品名"> <el-descriptions-item>
<template slot="label"><span style="color: red">*</span> 英文品名</template>
<product-selector lang="En" v-model="form1.prodId" @change="onProductChange"/> <product-selector lang="En" v-model="form1.prodId" @change="onProductChange"/>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="品牌"> <el-descriptions-item label="品牌">
<template slot="label"><span style="color: red">*</span> 品牌</template>
<el-select <el-select
v-model="form1.brand" v-model="form1.brand"
placeholder="可修改" placeholder="可修改"
...@@ -195,8 +198,14 @@ ...@@ -195,8 +198,14 @@
</el-option> </el-option>
</el-select> </el-select>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="是否备案">{{ isBeian1 }}</el-descriptions-item> <el-descriptions-item label="是否备案">
<el-descriptions-item label="收费模式">{{ feeType1 }}</el-descriptions-item> <template slot="label"><span style="color: red">*</span> 是否备案</template>
{{ isBeian1 }}
</el-descriptions-item>
<el-descriptions-item label="收费模式">
<template slot="label"><span style="color: red">*</span> 收费模式</template>
{{ feeType1 }}
</el-descriptions-item>
<el-descriptions-item label="填单参数">非填单货物</el-descriptions-item> <el-descriptions-item label="填单参数">非填单货物</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-form ref="form" :model="form" label-width="80px" style="margin-top: 20px"> <el-form ref="form" :model="form" label-width="80px" style="margin-top: 20px">
...@@ -219,6 +228,9 @@ ...@@ -219,6 +228,9 @@
:data="tableData1" :data="tableData1"
style="width: 100%"> style="width: 100%">
<el-table-column label="箱数" width="150px"> <el-table-column label="箱数" width="150px">
<template v-slot:header>
<span style="color: red">*</span> 箱数
</template>
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.cartonsNum" :prop="$index + '.cartonsNum'"> <el-form-item :rules="tableFormRules.cartonsNum" :prop="$index + '.cartonsNum'">
<span v-if="tableData1[$index].id"> <span v-if="tableData1[$index].id">
...@@ -232,6 +244,9 @@ ...@@ -232,6 +244,9 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="包装类型" width="100px"> <el-table-column label="包装类型" width="100px">
<template v-slot:header>
<span style="color: red">*</span> 包装类型
</template>
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item> <el-form-item>
<span v-if="tableData1[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, tableData1[$index].unit) }}</span> <span v-if="tableData1[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, tableData1[$index].unit) }}</span>
...@@ -264,6 +279,9 @@ ...@@ -264,6 +279,9 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="体积(m³)"> <el-table-column label="体积(m³)">
<template v-slot:header>
<span style="color: red">*</span> 体积(m³)
</template>
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.volume" :prop="$index + '.volume'"> <el-form-item :rules="tableFormRules.volume" :prop="$index + '.volume'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].volume }}</span> <span v-if="tableData1[$index].id">{{ tableData1[$index].volume }}</span>
...@@ -272,6 +290,9 @@ ...@@ -272,6 +290,9 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="重量(Kg)"> <el-table-column label="重量(Kg)">
<template v-slot:header>
<span style="color: red">*</span> 重量(Kg)
</template>
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.weight" :prop="$index + '.weight'"> <el-form-item :rules="tableFormRules.weight" :prop="$index + '.weight'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].weight }}</span> <span v-if="tableData1[$index].id">{{ tableData1[$index].weight }}</span>
...@@ -280,6 +301,9 @@ ...@@ -280,6 +301,9 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" width="130px"> <el-table-column label="数量" width="130px">
<template v-slot:header>
<span style="color: red">*</span> 数量
</template>
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.quantityAll" :prop="$index + '.quantityAll'"> <el-form-item :rules="tableFormRules.quantityAll" :prop="$index + '.quantityAll'">
<span v-if="tableData1[$index].id">{{ tableData1[$index].quantityAll }}</span> <span v-if="tableData1[$index].id">{{ tableData1[$index].quantityAll }}</span>
...@@ -424,7 +448,7 @@ export default { ...@@ -424,7 +448,7 @@ export default {
quantityAll: [{required: true, message: "数量不能为空", trigger: "change"}] quantityAll: [{required: true, message: "数量不能为空", trigger: "change"}]
}, },
form1: { form1: {
"brand": "0", "brand": undefined,
"brandType": 0, "brandType": 0,
"inTime": "", "inTime": "",
"material": "", "material": "",
...@@ -463,7 +487,7 @@ export default { ...@@ -463,7 +487,7 @@ export default {
opened(val) { opened(val) {
if (val) { if (val) {
this.form.material = this.warehousing.material this.form.material = this.warehousing.material
this.form.brand = this.warehousing.brand || '0' this.form.brand = this.warehousing.brand
this.handleBrandChange(this.form.brand) this.handleBrandChange(this.form.brand)
} else { } else {
this.$emit('update:visible', false) this.$emit('update:visible', false)
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment