Commit 6e4e04d9 by 陈婉清

Merge branch 'feature/586/cwq' into 'SAAS+V5.8.6'

Feature/586/cwq

See merge request !987
2 parents 00ff56e6 0761d186
Pipeline #263 for 6e4e04d9 failed in 0 seconds
<template> <template>
<div> <div>
<baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config" <baseDialog :config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
:is-show.sync="dialogShow"
@closeDialog="handleDetailClose(false)"> @closeDialog="handleDetailClose(false)">
<div class="edit-order-dialog" v-if="dialogShow"> <div v-if="dialogShow" class="edit-order-dialog">
<div class="table-class"> <div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage" <d2-table ref="purchaseOrderDetailTable"
@refreshTable="refreshTable" :table-data="tableList" :table-total="detailInfo.tableTotal"> :has-page="hasPage"
<div slot="nowPurNum" slot-scope="scope" style="margin: 0 8px;"> :table-data="tableList"
<el-select v-model="nowPurNumList[scope.index]" placeholder="请选择" clearable> :table-params="tableParams"
<el-option v-for="item in staffList" :key="item.uuid" :label="item.staffName" :value="item.uuid"> :table-total="detailInfo.tableTotal"
@refreshTable="refreshTable">
<div slot="nowPurNum"
slot-scope="scope"
style="margin: 0 8px;">
<el-select v-model="nowPurNumList[scope.index]"
placeholder="请选择"
clearable>
<el-option v-for="item in staffList"
:key="item.uuid"
:label="item.staffName"
:value="item.uuid">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<template slot="upgradeGoodsName" slot-scope="scope"> <template slot="upgradeGoodsName" slot-scope="scope">
<div> <div>
<img v-if="scope.scope.refundStatus == 'Y'" class="return" src="@/assets/retrun.png" alt=""> <img v-if="scope.scope.refundStatus == 'Y'"
alt=""
class="return"
src="@/assets/retrun.png">
<span>{{ scope.scope.upgradeGoodsName }}</span> <span>{{ scope.scope.upgradeGoodsName }}</span>
</div> </div>
</template> </template>
...@@ -22,69 +38,91 @@ ...@@ -22,69 +38,91 @@
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top"> <el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top">
<div slot="content" class="car-type-list"> <div slot="content" class="car-type-list">
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index"> <div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">
{{ `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}` }}</div> {{ `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}` }}
</div>
</div> </div>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div> <div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
</el-tooltip> </el-tooltip>
<div v-else>-</div> <div v-else>
-
</div>
</template> </template>
<div slot="deliveryRemark" slot-scope="scope" style="margin: 0 8px;"> <div slot="deliveryRemark"
<el-input v-model="scope.scope.deliveryRemark" maxlength="50" placeholder="请输入"></el-input> slot-scope="scope"
style="margin: 0 8px;">
<el-input v-model="scope.scope.deliveryRemark"
maxlength="50"
placeholder="请输入">
</el-input>
</div> </div>
</d2-table> </d2-table>
</div> </div>
<div class="footer"> <div class="footer">
<el-button @click="handleDetailClose(false)">取消</el-button> <el-button @click="handleDetailClose(false)">
<el-button @click="submit" type="primary" v-preventReClick 取消
:loading="$store.state.d2admin.loading.value">确定</el-button> </el-button>
<el-button v-preventReClick
type="primary"
:loading="$store.state.d2admin.loading.value"
@click="submit">
确定
</el-button>
</div> </div>
</div> </div>
</baseDialog> </baseDialog>
<card-dialog v-if="cardVisible" :card-visible="cardVisible" :order-info="orderInfo" :selected-list="selectedCardList" <CardDialog v-if="cardVisible"
@handleClose="handleCardDialog" @handleConfirm="handleCardConfirm"></card-dialog> :card-visible="cardVisible"
<glsk-form-dialog v-if="batchVisible" :selectVisible="batchVisible" :dialogConfig="batchDialogConfig" :order-info="orderInfo"
label-width="200px" :formRules="batchRules" :editData="batchForm" :editFormData="batchEditFormData" :selected-list="selectedCardList"
:baseData="{ staffList: staffList }" @handleClose="batchDialogVisible" @handleClose="handleCardDialog"
@handleConfirm="handleBatchConfirm"></glsk-form-dialog> @handleConfirm="handleCardConfirm">
</CardDialog>
<glsk-form-dialog v-if="batchVisible"
label-width="200px"
:base-data="{ staffList }"
:dialog-config="batchDialogConfig"
:edit-data="batchForm"
:edit-form-data="batchEditFormData"
:form-rules="batchRules"
:select-visible="batchVisible"
@handleClose="batchDialogVisible"
@handleConfirm="handleBatchConfirm">
</glsk-form-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getShipperList, saveshipper } from '@/api/purchaseShopping.js' import { getShipperList, saveshipper } from "@/api/purchaseShopping.js";
import { baseConfig } from '@/main' import { baseConfig } from "@/main";
import CardDialog from './CardDialog' import CardDialog from "./CardDialog";
export default { export default {
name: 'AllocateDialog', name: "AllocateDialog",
components: {
CardDialog,
},
filters: {
formatCar(list) {
let str = list.map((item) => {
return `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`;
}).join(",");
return str.length > 15 ? str.substring(0, 15) + "..." : str;
},
},
props: { props: {
visible: { visible: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
tableList: { tableList: {
type: Array, type: Array,
default: () => [] default: () => [],
} },
// paramsObj: { // paramsObj: {
// type: Object, // type: Object,
// default: () => { } // default: () => { }
// } // }
}, },
components: {
CardDialog
},
computed: {
dialogShow: {
get() {
if (this.visible) {
return this.visible
}
return this.visible
},
set(val) {
this.$emit('update:visible', val)
}
}
},
data() { data() {
return { return {
dialogConfig: { dialogConfig: {
...@@ -92,32 +130,32 @@ export default { ...@@ -92,32 +130,32 @@ export default {
showClose: true, showClose: true,
appendToBody: true, appendToBody: true,
btnList: [ btnList: [
] ],
}, },
config: { config: {
title: '发货分配', title: "发货分配",
width: '1300px' width: "1300px",
} },
}, },
// 发货分配弹窗 // 发货分配弹窗
batchDialogConfig: { batchDialogConfig: {
title: '批量设置发货方', title: "批量设置发货方",
okText: '确定' okText: "确定",
}, },
batchVisible: false, batchVisible: false,
batchForm: { batchForm: {
consignor: '' consignor: "",
}, },
batchRules: { batchRules: {
consignor: [{ required: true, message: '请选择发货方', trigger: 'change' }] consignor: [{ required: true, message: "请选择发货方", trigger: "change" }],
}, },
batchEditFormData: [{ batchEditFormData: [{
name: 'consignor', name: "consignor",
label: '发货方', label: "发货方",
type: 'select', type: "select",
optionId: 'uuid', optionId: "uuid",
optionLabel: 'staffName', optionLabel: "staffName",
optionsName: 'staffList' optionsName: "staffList",
}], }],
isSubmit: false, isSubmit: false,
dialogData: {}, dialogData: {},
...@@ -129,158 +167,168 @@ export default { ...@@ -129,158 +167,168 @@ export default {
orderInfo: {}, orderInfo: {},
hasPage: false, hasPage: false,
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + Number.parseInt(Math.random() * 1000),
listName: 'list', listName: "list",
tableColumns: [ tableColumns: [
{ {
label: '产品名称', label: "产品名称",
addHtml: 'upgradeGoodsName', addHtml: "upgradeGoodsName",
prop: 'upgradeGoodsName' prop: "upgradeGoodsName",
},
{
label: "产品ID",
prop: "upgradeGoodsCommodityCode",
width: 100,
}, },
{ {
label: "供应商名称", label: "供应商名称",
prop: 'thirdPartyName', prop: "thirdPartyName",
width: 100, width: 100,
}, },
{ {
label: '产品编码', label: "产品编码",
prop: 'type' prop: "type",
}, },
{ {
label: '规格', label: "规格",
prop: 'specificationData' prop: "specificationData",
}, },
{ {
label: '供应商编码', label: "供应商编码",
prop: 'thirdPartyCode', prop: "thirdPartyCode",
width: 100 width: 100,
}, },
{ {
label: '适用车型', label: "适用车型",
addHtml: 'carName', addHtml: "carName",
width: 200 width: 200,
}, },
{ {
label: "产品别名", label: "产品别名",
prop: "purchaseGoodsName", prop: "purchaseGoodsName",
}, },
{ {
label: '系列', label: "系列",
prop: 'goodsName' prop: "goodsName",
}, },
{ {
label: '所属分类', label: "所属分类",
prop: 'goodsTypeName' prop: "goodsTypeName",
}, },
{ {
label: '采购数量', label: "采购数量",
prop: 'goodsNumber', prop: "goodsNumber",
formatter: (cellValue) => { formatter: (cellValue) => {
return baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.goodsNumber}卷` : `${cellValue.goodsNumber}件` return baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.goodsNumber}卷` : `${cellValue.goodsNumber}件`;
} },
}, },
{ {
label: '库存总量', label: "库存总量",
prop: '', prop: "",
formatter: (cellValue) => { formatter: (cellValue) => {
return baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : '-'}米` : `${cellValue.goodsNumber}件` return baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : "-"}米` : `${cellValue.goodsNumber}件`;
} },
}, },
{ {
label: '采购总价/元', label: "采购总价/元",
prop: 'goodsTotalPrice', prop: "goodsTotalPrice",
formatter: (cellValue) => { formatter: (cellValue) => {
return "¥" + cellValue.goodsTotalPrice return "¥" + cellValue.goodsTotalPrice;
} },
}, },
{ {
label: '备注', label: "备注",
prop: 'purchaseOrderGoodsRemark', prop: "purchaseOrderGoodsRemark",
width: 150 width: 150,
}, },
{ {
label: '已发货数量', label: "已发货数量",
prop: 'purchaseNumber', prop: "purchaseNumber",
formatter: (cellValue) => { formatter: (cellValue) => {
return baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber || 0}卷` : `${cellValue.purchaseNumber || 0}件` return baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber || 0}卷` : `${cellValue.purchaseNumber || 0}件`;
} },
}, },
{ {
label: '发货方', label: "发货方",
prop: '', prop: "",
width: 150, width: 150,
addHtml: 'nowPurNum', addHtml: "nowPurNum",
headerImgObj: { headerImgObj: {
imgUrl: 'icon-edit2.png', imgUrl: "icon-edit2.png",
fn: () => { fn: () => {
this.batchDialogVisible() this.batchDialogVisible();
} },
} },
}, },
{ {
label: '发货备注', label: "发货备注",
prop: 'deliveryRemark', prop: "deliveryRemark",
addHtml: 'deliveryRemark', addHtml: "deliveryRemark",
width: 150 width: 150,
} },
] ],
}, },
staffList: [], staffList: [],
detailInfo: {} detailInfo: {},
} };
}, },
filters: { computed: {
formatCar(list) { dialogShow: {
let str = list.map(item => { get() {
return `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}` if (this.visible) {
}).join(',') return this.visible;
return str.length > 15 ? str.substring(0, 15) + '...' : str
} }
return this.visible;
},
set(val) {
this.$emit("update:visible", val);
},
},
}, },
mounted() { mounted() {
console.log(this.tableList, 'tableList') console.log(this.tableList, "tableList");
this.getStaffList() this.getStaffList();
}, },
methods: { methods: {
batchDialogVisible() { batchDialogVisible() {
this.batchVisible = !this.batchVisible this.batchVisible = !this.batchVisible;
this.batchForm.consignor = '' this.batchForm.consignor = "";
}, },
handleBatchConfirm() { handleBatchConfirm() {
this.tableList.forEach((item, idx) => { this.tableList.forEach((item, idx) => {
this.nowPurNumList[idx] = this.batchForm.consignor this.nowPurNumList[idx] = this.batchForm.consignor;
}) });
// this.nowPurNumList.forEach((item, idx) => { // this.nowPurNumList.forEach((item, idx) => {
// this.nowPurNumList[idx] = this.batchForm.consignor // this.nowPurNumList[idx] = this.batchForm.consignor
// }) // })
this.batchDialogVisible() this.batchDialogVisible();
}, },
getStaffList() { getStaffList() {
getShipperList({}).then(res => { getShipperList({}).then((res) => {
this.staffList = res this.staffList = res;
this.tableList.forEach((item, idx) => { this.tableList.forEach((item, idx) => {
if (item.shipper) { if (item.shipper) {
this.nowPurNumList[idx] = {} this.nowPurNumList[idx] = {};
this.nowPurNumList[idx] = this.staffList.find(k => k.staffName == item.shipper)?.uuid || '' this.nowPurNumList[idx] = this.staffList.find(k => k.staffName == item.shipper)?.uuid || "";
} }
}) });
// this.getDetail({ currentPage: 1, pageSize: 999 }) // this.getDetail({ currentPage: 1, pageSize: 999 })
}) });
}, },
handleDetailClose(isRefresh = false) { handleDetailClose(isRefresh = false) {
this.$emit('editClose', isRefresh) this.$emit("editClose", isRefresh);
}, },
refreshTable(pageObj) { refreshTable(pageObj) {
this.getDetail(pageObj) this.getDetail(pageObj);
}, },
getDetail(pageObj) { getDetail(pageObj) {
// if (!this.paramsObj?.orderCode) { // if (!this.paramsObj?.orderCode) {
// return true // return true
// } // }
this.nowPurNumList = [] this.nowPurNumList = [];
// purchaseOrderDetail({ orderCode: this.paramsObj.orderCode, pageSize: pageObj.pageSize, currentPage: pageObj.currentPage }).then(res => { // purchaseOrderDetail({ orderCode: this.paramsObj.orderCode, pageSize: pageObj.pageSize, currentPage: pageObj.currentPage }).then(res => {
// this.detailInfo = res // this.detailInfo = res
// this.detailInfo.tableData = res.pagination.list // this.detailInfo.tableData = res.pagination.list
...@@ -294,34 +342,34 @@ export default { ...@@ -294,34 +342,34 @@ export default {
// }) // })
}, },
submit() { submit() {
this.isSubmit = true this.isSubmit = true;
// 验证本次发货数量 // 验证本次发货数量
// if (this.nowPurNumList.every(item => item == 0 || !item)) { // if (this.nowPurNumList.every(item => item == 0 || !item)) {
// this.notice.errorTips('发货方不能全为空') // this.notice.errorTips('发货方不能全为空')
// return true // return true
// } // }
var params = { let params = {
purchaseOrderGoodsList: [] purchaseOrderGoodsList: [],
} };
this.tableList.forEach((item, idx) => { this.tableList.forEach((item, idx) => {
// if (this.nowPurNumList[idx]) { // if (this.nowPurNumList[idx]) {
params.purchaseOrderGoodsList.push({ params.purchaseOrderGoodsList.push({
id: item.id, id: item.id,
shipperUuid: this.nowPurNumList[idx] || '', shipperUuid: this.nowPurNumList[idx] || "",
shipper: this.staffList.find(k => k.uuid == this.nowPurNumList[idx])?.staffName || '', shipper: this.staffList.find(k => k.uuid == this.nowPurNumList[idx])?.staffName || "",
deliveryRemark: item.deliveryRemark || '' deliveryRemark: item.deliveryRemark || "",
}) });
// } // }
}) });
console.log(params, 'params---') console.log(params, "params---");
saveshipper(params).then(res => { saveshipper(params).then((res) => {
this.handleDetailClose(true) this.handleDetailClose(true);
this.notice.okTips() this.notice.okTips();
}).catch(() => { }).catch(() => {
}) });
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -368,7 +416,7 @@ export default { ...@@ -368,7 +416,7 @@ export default {
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
>span { > span {
margin-right: 20px; margin-right: 20px;
margin-bottom: 10px; margin-bottom: 10px;
} }
......
...@@ -350,6 +350,11 @@ export default { ...@@ -350,6 +350,11 @@ export default {
prop: "upgradeGoodsName", prop: "upgradeGoodsName",
}, },
{ {
label: "产品ID",
prop: "upgradeGoodsCommodityCode",
width: 100,
},
{
label: "供应商名称", label: "供应商名称",
prop: "thirdPartyName", prop: "thirdPartyName",
width: 100, width: 100,
...@@ -683,8 +688,9 @@ export default { ...@@ -683,8 +688,9 @@ export default {
"goodsType", "goodsType",
"goodsTypeName", "goodsTypeName",
]; ];
if (this.page == "factory") if (this.page == "factory") {
delete params.shippingWarehouseId; delete params.shippingWarehouseId;
}
for (let idx = 0; idx < this.tableList.length; idx++) { for (let idx = 0; idx < this.tableList.length; idx++) {
const item = this.tableList[idx]; const item = this.tableList[idx];
if (this.nowPurNumList[idx] && this.nowPurNumList[idx] != 0) { if (this.nowPurNumList[idx] && this.nowPurNumList[idx] != 0) {
......
<!-- 发货单详情弹窗 --> <!-- 发货单详情弹窗 -->
<template> <template>
<div> <div>
<d2-dialog title="详细信息" :is-visible="detailVisible" class="stockMonthDailog" width="1400px" :no-cancel="true" <d2-dialog btn-ok-label="关闭"
btn-ok-label="关闭" @closeDialog="handleClose" @confirmDialog="handleClose"> class="stockMonthDailog"
title="详细信息"
width="1400px"
:is-visible="detailVisible"
:no-cancel="true"
@closeDialog="handleClose"
@confirmDialog="handleClose">
<div class="detail-info"> <div class="detail-info">
<div> <div>
发货单号: 发货单号:
...@@ -25,9 +31,13 @@ ...@@ -25,9 +31,13 @@
<div class="detail-info m-b-33" style="justify-content: flex-start; align-items: flex-start;"> <div class="detail-info m-b-33" style="justify-content: flex-start; align-items: flex-start;">
签收凭证: 签收凭证:
<div v-if="detailInfo.uploadFileUrl"> <div v-if="detailInfo.uploadFileUrl">
<el-image v-for="(url, index) in detailInfo.uploadFileUrl.split(',')" :key="index" :src="url" <el-image v-for="(url, index) in detailInfo.uploadFileUrl.split(',')"
:key="index"
class="sign-image"
fit="cover"
style="width: 36px; height: 36px; margin-right: 8px; cursor: pointer;"
:preview-src-list="detailInfo.uploadFileUrl.split(',')" :preview-src-list="detailInfo.uploadFileUrl.split(',')"
style="width: 36px; height: 36px; margin-right: 8px; cursor: pointer;" class="sign-image" fit="cover" /> :src="url" />
</div> </div>
<div v-else> <div v-else>
- -
...@@ -41,9 +51,15 @@ ...@@ -41,9 +51,15 @@
<span>{{ item.upgradeGoodsName }}&nbsp;&nbsp;&nbsp;&nbsp; {{ item.specificationData }}</span> <span>{{ item.upgradeGoodsName }}&nbsp;&nbsp;&nbsp;&nbsp; {{ item.specificationData }}</span>
</div> </div>
<div> <div>
产品ID:
<span>{{ item.upgradeCommodityCode }}</span>
</div>
<div>
发货数量: 发货数量:
<span>{{ item.purchaseNumber + (membraneTypeList.includes(item.goodsType) ? '卷' : '件') }}</span> <span>{{ item.purchaseNumber + (membraneTypeList.includes(item.goodsType) ? '卷' : '件') }}</span>
<el-button v-if="item.deliveryCardList && item.deliveryCardList.length > 0" type="text" class="lookNumber" <el-button v-if="item.deliveryCardList && item.deliveryCardList.length > 0"
class="lookNumber"
type="text"
@click="lookNumber(item.deliveryCardList)"> @click="lookNumber(item.deliveryCardList)">
查看卡号 查看卡号
</el-button> </el-button>
...@@ -53,19 +69,26 @@ ...@@ -53,19 +69,26 @@
<span>{{ item.stockNum + (membraneTypeList.includes(item.goodsType) ? '米' : '件') }}</span> <span>{{ item.stockNum + (membraneTypeList.includes(item.goodsType) ? '米' : '件') }}</span>
</div> </div>
</div> </div>
<d2-table v-if="item.deliveryCardList === null || item.deliveryCardList.length == 0" ref="recordTable" <d2-table v-if="item.deliveryCardList === null || item.deliveryCardList.length == 0"
:table-data="item.goodsWarehousingList" :table-params="tableParams" :has-page="false"> ref="recordTable"
:has-page="false"
:table-data="item.goodsWarehousingList"
:table-params="tableParams">
<template #filmRollNo="scope"> <template #filmRollNo="scope">
<div v-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1"> <div v-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1">
{{ scope.scope.filmRollList[0] }} {{ scope.scope.filmRollList[0] }}
</div> </div>
<div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1"> <div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1">
<el-popover placement="top" width="200" trigger="hover"> <el-popover placement="top"
trigger="hover"
width="200">
<div class="film-roll-box"> <div class="film-roll-box">
<div class="title"> <div class="title">
膜卷号 膜卷号
</div> </div>
<div v-for="(subItem, subIndex) in scope.scope.filmRollList" :key="subIndex" class="merchant-item"> <div v-for="(subItem, subIndex) in scope.scope.filmRollList"
:key="subIndex"
class="merchant-item">
{{ subItem }} {{ subItem }}
</div> </div>
</div> </div>
...@@ -87,10 +110,18 @@ ...@@ -87,10 +110,18 @@
</div> </div>
</template> </template>
</d2-dialog> </d2-dialog>
<d2-dialog title="查看发货卡号" :is-visible="innerVisible" width="500px" :no-cancel="true" btn-ok-label="关闭" <d2-dialog btn-ok-label="关闭"
@closeDialog="innerVisible = false" @confirmDialog="innerVisible = false"> title="查看发货卡号"
<d2-table ref="recordTable" class="deliveryCardCon" :table-data="tableDataCardList" :table-params="innerParams" width="500px"
:has-page="false"> :is-visible="innerVisible"
:no-cancel="true"
@closeDialog="innerVisible = false"
@confirmDialog="innerVisible = false">
<d2-table ref="recordTable"
class="deliveryCardCon"
:has-page="false"
:table-data="tableDataCardList"
:table-params="innerParams">
</d2-table> </d2-table>
</d2-dialog> </d2-dialog>
</div> </div>
......
<!-- 发货单详情弹窗 --> <!-- 发货单详情弹窗 -->
<template> <template>
<div> <div>
<baseDialog title="详细信息" :is-show.sync="detailVisible" :config="dialogConfig.setting" <baseDialog btn-ok-label="关闭"
:dialog-config="dialogConfig.config" width="1050px" :no-cancel="true" btn-ok-label="关闭" @closeDialog="handleClose" title="详细信息"
width="1050px"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
:is-show.sync="detailVisible"
:no-cancel="true"
@closeDialog="handleClose"
@confirmDialog="handleClose"> @confirmDialog="handleClose">
<div class="stockMonthDailog"> <div class="stockMonthDailog">
<div class="addressTitle"> <div class="addressTitle">
<img src="../images/addressIcon.webp" alt="" class="icon"> <img alt=""
class="icon"
src="../images/addressIcon.webp">
<span class="title">{{ recordInfo.merchantName }}</span> <span class="title">{{ recordInfo.merchantName }}</span>
</div> </div>
<div class="address-info" v-if="detailInfo[0]"> <div v-if="detailInfo[0]" class="address-info">
<span class="name">收货人:<span class="label">{{ detailInfo[0].contactName }}</span></span> <span class="name">收货人:<span class="label">{{ detailInfo[0].contactName }}</span></span>
<span class="phone">电话:<span class="label">{{ detailInfo[0].contactPhone }}</span></span> <span class="phone">电话:<span class="label">{{ detailInfo[0].contactPhone }}</span></span>
<span class="address">收货地址:<span class="label">{{ detailInfo[0].contactAddress }}</span></span> <span class="address">收货地址:<span class="label">{{ detailInfo[0].contactAddress }}</span></span>
...@@ -20,30 +28,50 @@ ...@@ -20,30 +28,50 @@
<div v-for="(itemList, index) in detailInfo" :key="index"> <div v-for="(itemList, index) in detailInfo" :key="index">
<div class="detail-info"> <div class="detail-info">
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">发货单号:</div> <div class="detail-label">
发货单号:
</div>
<span>{{ itemList.deliveryNumber }}</span> <span>{{ itemList.deliveryNumber }}</span>
</div> </div>
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">承运公司:</div> <div class="detail-label">
承运公司:
</div>
<span>{{ itemList.deliveryCompany }}</span> <span>{{ itemList.deliveryCompany }}</span>
</div> </div>
<div style="display: flex;"> <div style="display: flex;">
<div class="detail-label">发货时间:</div> <div class="detail-label">
发货时间:
</div>
<span>{{ itemList.deliveryDate }}</span> <span>{{ itemList.deliveryDate }}</span>
</div> </div>
<div> <div>
<el-button style="padding: 0;" v-if="itemList.putStatus == 0" type="text" <el-button v-if="itemList.putStatus == 0"
@click="handleEdit(itemList)">编辑</el-button> style="padding: 0;"
<el-button style="padding: 0;" type="text" @click="handleSign(itemList)">发货签收单</el-button> type="text"
@click="handleEdit(itemList)">
编辑
</el-button>
<el-button style="padding: 0;"
type="text"
@click="handleSign(itemList)">
发货签收单
</el-button>
</div> </div>
</div> </div>
<d2-table ref="recordTable" :table-data="itemList.deliveryDetailList" :table-params="tableParams" <d2-table ref="recordTable"
:has-page="false"> :has-page="false"
:table-data="itemList.deliveryDetailList"
:table-params="tableParams">
<span slot="deliveryCard" slot-scope="scope"> <span slot="deliveryCard" slot-scope="scope">
<template v-if="scope.scope.deliveryCardList && scope.scope.deliveryCardList.length > 1"> <template v-if="scope.scope.deliveryCardList && scope.scope.deliveryCardList.length > 1">
<!-- {{ scope.scope.deliveryCardList.length || 0 }} --> <!-- {{ scope.scope.deliveryCardList.length || 0 }} -->
<span>+{{ scope.scope.deliveryCardList.length }} </span> <span>+{{ scope.scope.deliveryCardList.length }} </span>
<el-button mini type="text" @click="handleDeliveryCard(scope.scope.deliveryCardList)">查看</el-button> <el-button type="text"
mini
@click="handleDeliveryCard(scope.scope.deliveryCardList)">
查看
</el-button>
</template> </template>
<template v-else-if="scope.scope.deliveryCardList && scope.scope.deliveryCardList.length == 1"> <template v-else-if="scope.scope.deliveryCardList && scope.scope.deliveryCardList.length == 1">
<!-- {{ scope.scope.deliveryCardList.length || 0 }} --> <!-- {{ scope.scope.deliveryCardList.length || 0 }} -->
...@@ -56,37 +84,55 @@ ...@@ -56,37 +84,55 @@
</div> </div>
</div> </div>
</baseDialog> </baseDialog>
<baseDialog title="查看发货卡号" :config="carDialogConfig.setting" :dialog-config="carDialogConfig.config" <baseDialog btn-ok-label="关闭"
:is-show.sync="handleDeliveryCardVisible" width="500px" :no-cancel="true" btn-ok-label="关闭" title="查看发货卡号"
@closeDialog="handleDeliveryCardVisible = false" @confirmDialog="handleDeliveryCardVisible = false"> width="500px"
<d2-table class="deliveryCardCon" ref="recordTable" :table-data="deliveryCardList" :table-params="innerParams" :config="carDialogConfig.setting"
:has-page="false"> :dialog-config="carDialogConfig.config"
:is-show.sync="handleDeliveryCardVisible"
:no-cancel="true"
@closeDialog="handleDeliveryCardVisible = false"
@confirmDialog="handleDeliveryCardVisible = false">
<d2-table ref="recordTable"
class="deliveryCardCon"
:has-page="false"
:table-data="deliveryCardList"
:table-params="innerParams">
</d2-table> </d2-table>
</baseDialog> </baseDialog>
<!-- 编辑 --> <!-- 编辑 -->
<glsk-form-dialog v-if="editVisible" :selectVisible="editVisible" :dialogConfig="editDialogConfig" label-width="104px" <glsk-form-dialog v-if="editVisible"
dialog-width="520px" :formRules="editRules" :editData="editData" :editFormData="editFormData" :base-data="baseData" dialog-width="520px"
@handleClose="editVisible = false" @handleConfirm="handleEditConfirm"></glsk-form-dialog> label-width="104px"
:base-data="baseData"
:dialog-config="editDialogConfig"
:edit-data="editData"
:edit-form-data="editFormData"
:form-rules="editRules"
:select-visible="editVisible"
@handleClose="editVisible = false"
@handleConfirm="handleEditConfirm">
</glsk-form-dialog>
</div> </div>
</template> </template>
<script> <script>
import { Util, deepClone } from '@/common/util' import { mapActions, mapState } from "vuex";
import { mapActions, mapState } from 'vuex' import { deliveryPdf, factoryUpdate, factoryView } from "@/api/purchaseShopping.js";
import { factoryView, factoryUpdate, deliveryPdf } from '@/api/purchaseShopping.js' import { deepClone, Util } from "@/common/util";
import { baseConfig } from '@/main' import { baseConfig } from "@/main";
export default { export default {
name: 'FactoryDeliveryDetailDialog', name: "FactoryDeliveryDetailDialog",
props: { props: {
visible: { visible: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
recordInfo: { recordInfo: {
type: Object, type: Object,
default: () => { } default: () => { },
} },
}, },
data() { data() {
return { return {
...@@ -95,229 +141,234 @@ export default { ...@@ -95,229 +141,234 @@ export default {
showClose: true, showClose: true,
appendToBody: false, appendToBody: false,
btnList: [ btnList: [
] ],
}, },
config: { config: {
title: '详细信息', title: "详细信息",
width: '1050px' width: "1050px",
} },
}, },
carDialogConfig: { carDialogConfig: {
setting: { setting: {
showClose: true, showClose: true,
appendToBody: false, appendToBody: false,
btnList: [ btnList: [
] ],
}, },
config: { config: {
title: '查看发货卡号', title: "查看发货卡号",
width: '500px' width: "500px",
} },
}, },
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: baseConfig.membraneTypeList, membraneTypeList: baseConfig.membraneTypeList,
detailInfo: '', detailInfo: "",
searchFormSearch: {}, searchFormSearch: {},
tableData: [], tableData: [],
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + Number.parseInt(Math.random() * 1000),
listName: 'list', listName: "list",
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '产品名称', label: "产品名称",
prop: 'upgradeGoodsName' prop: "upgradeGoodsName",
},
{
label: "产品ID",
prop: "upgradeCommodityCode",
width: 100,
}, },
{ {
label: "供应商名称", label: "供应商名称",
prop: 'thirdPartyName', prop: "thirdPartyName",
width: 100, width: 100,
}, },
{ {
label: '产品编码', label: "产品编码",
prop: 'type' prop: "type",
}, },
{ {
label: '规格', label: "规格",
prop: 'specificationData' prop: "specificationData",
}, },
{ {
label: '供应商编码', label: "供应商编码",
prop: 'thirdPartyCode', prop: "thirdPartyCode",
width: 100 width: 100,
}, },
{ {
label: "产品别名", label: "产品别名",
prop: "purchaseGoodsName", prop: "purchaseGoodsName",
}, },
{ {
label: '发货数量', label: "发货数量",
prop: 'purchaseNumber', prop: "purchaseNumber",
formatter: cellValue => { formatter: (cellValue) => {
return this.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件` return this.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件`;
} },
}, },
{ {
label: '备注', label: "备注",
prop: '', prop: "",
formatter: cellValue => { formatter: (cellValue) => {
return ((cellValue.deliveryRemark || '') + (cellValue.purchaseOrderRemark || '')) || '-' return ((cellValue.deliveryRemark || "") + (cellValue.purchaseOrderRemark || "")) || "-";
} },
}, },
{ {
label: '发货卡号', label: "发货卡号",
prop: 'deliveryCardList', prop: "deliveryCardList",
addHtml: 'deliveryCard' addHtml: "deliveryCard",
} },
] ],
}, },
innerParams: { innerParams: {
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '卡号', label: "卡号",
prop: 'cardNum' prop: "cardNum",
} },
] ],
}, },
handleDeliveryCardVisible: false, handleDeliveryCardVisible: false,
deliveryCardList: [], deliveryCardList: [],
// 编辑 // 编辑
editVisible: false, editVisible: false,
editData: { editData: {
id: '', id: "",
deliveryNumber: '', deliveryNumber: "",
deliveryCompany: '' deliveryCompany: "",
}, },
editFormData: [{ editFormData: [{
name: 'deliveryNumber', name: "deliveryNumber",
label: '承运单号', label: "承运单号",
type: 'input', type: "input",
inputType: 'textarea', inputType: "textarea",
rows: 3, rows: 3,
maxlength: '50', maxlength: "50",
isClear: true isClear: true,
}, { }, {
name: 'deliveryCompany', name: "deliveryCompany",
label: '承运公司', label: "承运公司",
type: 'input', type: "input",
maxlength: '20', maxlength: "20",
isClear: true isClear: true,
}], }],
editRules: { editRules: {
deliveryNumber: [{ required: true, message: '请输入承运单号', trigger: 'change' }], deliveryNumber: [{ required: true, message: "请输入承运单号", trigger: "change" }],
deliveryCompany: [{ required: true, message: '请输入承运公司', trigger: 'change' }] deliveryCompany: [{ required: true, message: "请输入承运公司", trigger: "change" }],
}, },
editDialogConfig: { editDialogConfig: {
title: '编辑' title: "编辑",
} },
} };
}, },
computed: { computed: {
detailVisible: { detailVisible: {
get() { get() {
return this.visible return this.visible;
}, },
set(val) { set(val) {
this.$emit('update:visible', val) this.$emit("update:visible", val);
} },
} },
}, },
mounted() { mounted() {
this.getDetail() this.getDetail();
}, },
methods: { methods: {
...mapActions({ ...mapActions({
get: 'd2admin/base/get', get: "d2admin/base/get",
close: 'd2admin/page/close' close: "d2admin/page/close",
}), }),
handleDeliveryCard(list) { handleDeliveryCard(list) {
this.handleDeliveryCardVisible = true this.handleDeliveryCardVisible = true;
this.deliveryCardList = list.map(item => { this.deliveryCardList = list.map((item) => {
return { cardNum: item } return { cardNum: item };
}) });
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm);
resolve() resolve();
}) });
}, },
getDetail() { getDetail() {
var params = { id: deepClone(this.recordInfo.id), currentPage: 1, pageSize: 1000 } let params = { id: deepClone(this.recordInfo.id), currentPage: 1, pageSize: 1000 };
factoryView(params).then(res => { factoryView(params).then((res) => {
console.log(res, 'res') console.log(res, "res");
this.detailInfo = res.list this.detailInfo = res.list;
this.detailInfo.forEach(item => { this.detailInfo.forEach((item) => {
if (item.deliveryDate) { if (item.deliveryDate) {
item.deliveryDate = Util.dateFormate(item.deliveryDate, 'YYYY-MM-DD HH:mm:ss') item.deliveryDate = Util.dateFormate(item.deliveryDate, "YYYY-MM-DD HH:mm:ss");
} }
const _deliveryDetailList = item.deliveryDetailList const _deliveryDetailList = item.deliveryDetailList;
console.log(_deliveryDetailList, '_deliveryDetailList') console.log(_deliveryDetailList, "_deliveryDetailList");
if (_deliveryDetailList && _deliveryDetailList.length > 0) { if (_deliveryDetailList && _deliveryDetailList.length > 0) {
_deliveryDetailList.forEach(info => { _deliveryDetailList.forEach((info) => {
const _goodsWarehousingList = info.goodsWarehousingList const _goodsWarehousingList = info.goodsWarehousingList;
if (_goodsWarehousingList && _goodsWarehousingList.length > 0) { if (_goodsWarehousingList && _goodsWarehousingList.length > 0) {
_goodsWarehousingList.forEach(item => { _goodsWarehousingList.forEach((item) => {
item.goodsType = info.goodsType item.goodsType = info.goodsType;
}) });
} }
}) });
} }
// item.deliveryDetailList.forEach(info => { // item.deliveryDetailList.forEach(info => {
// info.goodsWarehousingList.forEach(item => { // info.goodsWarehousingList.forEach(item => {
// item.goodsType = info.goodsType // item.goodsType = info.goodsType
// }) // })
// }) // })
}) });
}) });
}, },
// 编辑 // 编辑
editDialogVisible() { editDialogVisible() {
this.editVisible = !this.editVisible this.editVisible = !this.editVisible;
}, },
handleEdit(targetItem) { handleEdit(targetItem) {
this.editData = { this.editData = {
id: targetItem.id, id: targetItem.id,
deliveryNumber: targetItem.deliveryNumber, deliveryNumber: targetItem.deliveryNumber,
deliveryCompany: targetItem.deliveryCompany deliveryCompany: targetItem.deliveryCompany,
} };
this.editDialogVisible() this.editDialogVisible();
}, },
handleEditConfirm() { handleEditConfirm() {
this.loading = true this.loading = true;
factoryUpdate(this.editData).then((res) => { factoryUpdate(this.editData).then((res) => {
this.notice.okTips() this.notice.okTips();
this.editDialogVisible() this.editDialogVisible();
this.getDetail() this.getDetail();
// this.handleReset() // this.handleReset()
}).finally(() => { }).finally(() => {
this.loading = false this.loading = false;
}) });
}, },
handleSign(row) { handleSign(row) {
const params = { const params = {
id: row.id id: row.id,
} };
deliveryPdf(params).then((res) => { deliveryPdf(params).then((res) => {
console.log(res) console.log(res);
this.$open(res) this.$open(res);
}) });
}, },
handleClose() { handleClose() {
// this.$emit('dialogClose') // this.$emit('dialogClose')
this.detailVisible = false this.detailVisible = false;
} },
}
}
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.stockMonthDailog { .stockMonthDailog {
// ::v-deep.el-dialog { // ::v-deep.el-dialog {
...@@ -344,7 +395,7 @@ export default { ...@@ -344,7 +395,7 @@ export default {
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
>span { > span {
margin-right: 20px; margin-right: 20px;
margin-bottom: 10px; margin-bottom: 10px;
} }
......
...@@ -3,11 +3,17 @@ ...@@ -3,11 +3,17 @@
<d2-container class="container"> <d2-container class="container">
<template #header> <template #header>
<div class="header"> <div class="header">
<d2-search ref="showSearch" :labelWidth="labelWidth" class="show-search" :form-data="showFormData" <d2-search ref="showSearch"
class="show-search"
:form-data="showFormData"
:label-width="labelWidth"
:search-form="searchForm"> :search-form="searchForm">
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" handle size="small" type="primary"> <el-button :id="tableParams.btnId"
size="small"
type="primary"
handle>
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> <el-button size="small" @click="handleReset">
...@@ -25,18 +31,27 @@ ...@@ -25,18 +31,27 @@
<auth-button category="Button" :show-btn-ids="['9090704']" /> <auth-button category="Button" :show-btn-ids="['9090704']" />
</span> </span>
</d2-table-header> </d2-table-header>
<d2-table ref="purchaseAndDeliveryTable" :before-search-fn="beforeSearchFn" :get-list-api="getListApi" <d2-table ref="purchaseAndDeliveryTable"
:search-form="tableSearchForm" :table-params="tableParams" @searchChange="searchChange" :before-search-fn="beforeSearchFn"
@selectionTable="handleSelectionTable" @setTableFinishFun="setTableFinishFun"> :get-list-api="getListApi"
:search-form="tableSearchForm"
:table-params="tableParams"
@searchChange="searchChange"
@selectionTable="handleSelectionTable"
@setTableFinishFun="setTableFinishFun">
<template #upgradeGoodsName="scope"> <template #upgradeGoodsName="scope">
<div> <div>
<img v-if="scope.scope.refundStatus == 'Y'" alt="" class="return" src="@/assets/retrun.png"> <img v-if="scope.scope.refundStatus == 'Y'"
alt=""
class="return"
src="@/assets/retrun.png">
<span>{{ scope.scope.upgradeGoodsName }}</span> <span>{{ scope.scope.upgradeGoodsName }}</span>
</div> </div>
</template> </template>
<template #suitCarTypeList="scope"> <template #suitCarTypeList="scope">
<div> <div>
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" effect="dark" <el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length"
effect="dark"
placement="top"> placement="top">
<template #content> <template #content>
<div class="car-type-list"> <div class="car-type-list">
...@@ -58,8 +73,7 @@ ...@@ -58,8 +73,7 @@
</span> </span>
<!-- 确认发货 --> <!-- 确认发货 -->
<!-- style="margin-right: 10px;" --> <!-- style="margin-right: 10px;" -->
<span <span v-if="scope.scope.refundStatus != 'Y' && (scope.scope.deliveryStatus == 1 || scope.scope.deliveryStatus == 3)"
v-if="scope.scope.refundStatus != 'Y' && (scope.scope.deliveryStatus == 1 || scope.scope.deliveryStatus == 3)"
style="margin-right: 10px;"> style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9090702']" /> <auth-button :data="scope.scope" :show-btn-ids="['9090702']" />
</span> </span>
...@@ -77,20 +91,36 @@ ...@@ -77,20 +91,36 @@
</template> </template>
</d2-table> </d2-table>
</div> </div>
<FactoryDeliveryDetailDialog v-if="detailVisible" :record-info="detailInfo" :visible.sync="detailVisible"> <FactoryDeliveryDetailDialog v-if="detailVisible"
:record-info="detailInfo"
:visible.sync="detailVisible">
</FactoryDeliveryDetailDialog> </FactoryDeliveryDetailDialog>
<EditOrderDialog v-if="editVisible" page="factory" :params-obj="dialogData" :table-list="editTableList" <EditOrderDialog v-if="editVisible"
:visible.sync="editVisible" @editClose="editClose"> page="factory"
:params-obj="dialogData"
:table-list="editTableList"
:visible.sync="editVisible"
@editClose="editClose">
</EditOrderDialog> </EditOrderDialog>
<!-- :config="rejectConfig.setting" :dialog-config="rejectConfig.config" :config="rejectConfig.setting" --> <!-- :config="rejectConfig.setting" :dialog-config="rejectConfig.config" :config="rejectConfig.setting" -->
<baseDialog :dialog-config="rejectConfig.config" :is-show.sync="rejectVisible" @handleClick="handleRejectConfirm"> <baseDialog :dialog-config="rejectConfig.config"
:is-show.sync="rejectVisible"
@handleClick="handleRejectConfirm">
<!-- <d2-dialog v-if="rejectVisible" :is-visible="rejectVisible" title="驳回提2" @confirmDialog="handleRejectConfirm" <!-- <d2-dialog v-if="rejectVisible" :is-visible="rejectVisible" title="驳回提2" @confirmDialog="handleRejectConfirm"
@closeDialog="handleRejectClose"> --> @closeDialog="handleRejectClose"> -->
<div class="reject-dialog"> <div class="reject-dialog">
<el-form ref="delivery-dialog-form" label-width="150px" :model="rejectData" :rules="rejectRules"> <el-form ref="delivery-dialog-form"
label-width="150px"
:model="rejectData"
:rules="rejectRules">
<el-form-item label="驳回原因:" prop="rejectCause"> <el-form-item label="驳回原因:" prop="rejectCause">
<el-input v-model.trim="rejectData.rejectCause" class="dis-in-block reject-input" maxlength="50" <el-input v-model.trim="rejectData.rejectCause"
placeholder="请输入驳回原因" :rows="3" show-word-limit type="textarea" /> class="dis-in-block reject-input"
maxlength="50"
placeholder="请输入驳回原因"
type="textarea"
show-word-limit
:rows="3" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -121,7 +151,7 @@ export default { ...@@ -121,7 +151,7 @@ export default {
}, },
data() { data() {
return { return {
labelWidth: '100px', labelWidth: "100px",
editVisible: false, editVisible: false,
editTableList: [], editTableList: [],
reg: { reg: {
...@@ -154,6 +184,7 @@ export default { ...@@ -154,6 +184,7 @@ export default {
merchantName: "", merchantName: "",
deliveryStatus: "", deliveryStatus: "",
sendOutMerchantName: "", sendOutMerchantName: "",
commodityCode: "",
}, },
tableSearchForm: {}, tableSearchForm: {},
tableData: [], tableData: [],
...@@ -225,18 +256,26 @@ export default { ...@@ -225,18 +256,26 @@ export default {
isClear: true, isClear: true,
}, },
{ {
label: '供应商名称', label: "供应商名称",
name: 'thirdPartyName', name: "thirdPartyName",
type: 'input', type: "input",
isClear: true, isClear: true,
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList,
}, { },
label: '供应商编码', {
name: 'thirdPartyCode', label: "供应商编码",
type: 'input', name: "thirdPartyCode",
type: "input",
isClear: true, isClear: true,
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList,
} },
{
label: "产品ID",
name: "commodityCode",
type: "input",
isClear: true,
maxlength: 20,
},
], ],
selectedList: [], selectedList: [],
getListApi: warehousedeliverPage, getListApi: warehousedeliverPage,
...@@ -254,9 +293,14 @@ export default { ...@@ -254,9 +293,14 @@ export default {
prop: "upgradeGoodsName", prop: "upgradeGoodsName",
}, },
{ {
label: '供应商名称', label: "产品ID",
prop: 'thirdPartyName', prop: "upgradeGoodsCommodityCode",
width: 100 width: 100,
},
{
label: "供应商名称",
prop: "thirdPartyName",
width: 100,
}, },
{ {
label: "产品编码", label: "产品编码",
...@@ -276,9 +320,9 @@ export default { ...@@ -276,9 +320,9 @@ export default {
}, },
}, },
{ {
label: '供应商编码', label: "供应商编码",
prop: 'thirdPartyCode', prop: "thirdPartyCode",
width: 100 width: 100,
}, },
{ {
label: "系列", label: "系列",
......
...@@ -416,6 +416,11 @@ export default { ...@@ -416,6 +416,11 @@ export default {
prop: "upgradeGoodsName", prop: "upgradeGoodsName",
}, },
{ {
label: "产品ID",
prop: "upgradeGoodsCommodityCode",
width: 100,
},
{
label: "供应商名称", label: "供应商名称",
prop: "thirdPartyName", prop: "thirdPartyName",
width: 100, width: 100,
...@@ -518,6 +523,7 @@ export default { ...@@ -518,6 +523,7 @@ export default {
signStatusList: [], signStatusList: [],
thirdPartyName: "", thirdPartyName: "",
thirdPartyCode: "", thirdPartyCode: "",
commodityCode: "",
}, },
tableSearchForm: {}, tableSearchForm: {},
tableData: [], tableData: [],
...@@ -652,6 +658,13 @@ export default { ...@@ -652,6 +658,13 @@ export default {
isClear: true, isClear: true,
keyFn: this.keyDowmGetList, keyFn: this.keyDowmGetList,
}, },
{
label: "产品ID",
name: "commodityCode",
type: "input",
isClear: true,
maxlength: 20,
},
], ],
selectedList: [], selectedList: [],
getListApi: getPurchaseOrderShipmentList, getListApi: getPurchaseOrderShipmentList,
...@@ -669,6 +682,11 @@ export default { ...@@ -669,6 +682,11 @@ export default {
prop: "upgradeGoodsName", prop: "upgradeGoodsName",
}, },
{ {
label: "产品ID",
prop: "upgradeGoodsCommodityCode",
width: 100,
},
{
label: "供应商名称", label: "供应商名称",
prop: "thirdPartyName", prop: "thirdPartyName",
width: 100, width: 100,
......
...@@ -128,6 +128,13 @@ export default { ...@@ -128,6 +128,13 @@ export default {
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "inventoryTypeList", optionsName: "inventoryTypeList",
}, },
{
label: "产品ID",
name: "commodityCode",
type: "input",
isClear: true,
maxlength: 20,
},
], ],
getListApi: getInventoryTransactionRecordsPage, getListApi: getInventoryTransactionRecordsPage,
// 表格参数 // 表格参数
...@@ -145,6 +152,11 @@ export default { ...@@ -145,6 +152,11 @@ export default {
prop: "upgradeGoodsName", prop: "upgradeGoodsName",
}, },
{ {
label: "产品ID",
prop: "commodityCode",
width: 100,
},
{
label: "产品编码", label: "产品编码",
prop: "productCode", prop: "productCode",
}, },
......
...@@ -208,6 +208,12 @@ export default { ...@@ -208,6 +208,12 @@ export default {
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "inventoryTypeList", optionsName: "inventoryTypeList",
}, {
label: "产品ID",
name: "commodityCode",
type: "input",
isClear: true,
maxlength: 20,
}], }],
getListApi: getMerchantGoodsStockReduceRecord, getListApi: getMerchantGoodsStockReduceRecord,
tableParams: { tableParams: {
...@@ -226,6 +232,10 @@ export default { ...@@ -226,6 +232,10 @@ export default {
prop: "upgradeGoodsName", prop: "upgradeGoodsName",
width: "160px", width: "160px",
}, { }, {
label: "产品ID",
prop: "commodityCode",
width: 100,
}, {
label: "规格", label: "规格",
prop: "specificationData", prop: "specificationData",
width: "160px", width: "160px",
......
<template> <template>
<div> <div>
<baseDialog :is-show.sync="dialogShow" :dialog-config="rejectConfig.config" @handleClick="handleRejectConfirm" @closeDialog="handleRejectClose"> <baseDialog :dialog-config="rejectConfig.config"
<div class="reject-dialog" style="margin: 0;" v-if="dialogShow"> :is-show.sync="dialogShow"
@closeDialog="handleRejectClose"
@handleClick="handleRejectConfirm">
<div v-if="dialogShow"
class="reject-dialog"
style="margin: 0;">
<div class="address-info"> <div class="address-info">
<div class="info-item" v-for="(item, index) in infoList" :key="index" :class="{ 'remark-item': item.isRemark }"> <div v-for="(item, index) in infoList"
:key="index"
class="info-item"
:class="{ 'remark-item': item.isRemark }">
<span class="label-name">{{ item.label }}:</span> <span class="label-name">{{ item.label }}:</span>
<ellipsis-tooltip class="label-value" :content="detailInfo[item.prop]" /> <EllipsisTooltip class="label-value" :content="detailInfo[item.prop]" />
</div> </div>
</div> </div>
<div class="reject-page edit-tmpl"> <div class="reject-page edit-tmpl">
<div class="title">商品信息</div> <div class="title">
商品信息
</div>
<div class="content-box"> <div class="content-box">
<d2-table ref="purchaseOrderDetailTable" :table-params="rejectTableParams" :table-data="goodsList" @refreshTable="refreshTable" :table-total="tableTotal"> <d2-table ref="purchaseOrderDetailTable"
:table-data="goodsList"
:table-params="rejectTableParams"
:table-total="tableTotal"
@refreshTable="refreshTable">
</d2-table> </d2-table>
</div> </div>
</div> </div>
<el-form :rules="rejectRules" :model="formData" label-width="150px" ref="delivery-dialog-form"> <el-form ref="delivery-dialog-form"
label-width="150px"
:model="formData"
:rules="rejectRules">
<el-form-item label="驳回节点:" prop="rejectNode"> <el-form-item label="驳回节点:" prop="rejectNode">
<el-select v-model="formData.rejectNode" placeholder="请选择驳回节点" style="width: 450px"> <el-select v-model="formData.rejectNode"
<el-option v-for="item in rejectNodeOptions" :key="item.id" :label="item.label" :value="item.id" /> placeholder="请选择驳回节点"
style="width: 450px">
<el-option v-for="item in rejectNodeOptions"
:key="item.id"
:label="item.label"
:value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="驳回原因:" prop="rejectCause"> <el-form-item label="驳回原因:" prop="rejectCause">
<el-input type="textarea" placeholder="请输入驳回原因" maxlength="200" style="width: 450px;" :rows="4" show-word-limit v-model.trim="formData.rejectCause" class="dis-in-block reject-input" /> <el-input v-model.trim="formData.rejectCause"
class="dis-in-block reject-input"
maxlength="200"
placeholder="请输入驳回原因"
style="width: 450px;"
type="textarea"
show-word-limit
:rows="4" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<p style="margin-left: 150px; color: #999999;"> <p style="margin-left: 150px; color: #999999;">
说明:驳回后,整个调拨订单进行驳回,无法再重新进行发货操作。 说明:驳回后,整个调拨订单进行驳回,无法再重新进行发货操作。
</p> </p>
<div class="examine-record"> <div class="examine-record">
<div class="title">审核记录</div> <div class="title">
审核记录
</div>
<div class="log-box"> <div class="log-box">
<div class="record-div" v-if="detailInfo.auditDetaiList && detailInfo.auditDetaiList.length"> <div v-if="detailInfo.auditDetaiList && detailInfo.auditDetaiList.length" class="record-div">
<div class="record-div-d" v-for="(item, index) in detailInfo.auditDetaiList" :key="index"> <div v-for="(item, index) in detailInfo.auditDetaiList"
:key="index"
class="record-div-d">
<!-- <span class="dot"></span> --> <!-- <span class="dot"></span> -->
<div class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</div> <div class="span-txt-one">
{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}
</div>
<div class="span-txt-two" style="font-weight: 500;"> <div class="span-txt-two" style="font-weight: 500;">
<!-- :class="item.status ? examineStatusClass[item.status] : ''" --> <!-- :class="item.status ? examineStatusClass[item.status] : ''" -->
<span> <span>
{{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}</span> {{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}
</span>
<!-- <span v-if="item.rejectedStatus"> <!-- <span v-if="item.rejectedStatus">
<span style="display: inline-block; margin: 0 8px;">至</span> <span style="display: inline-block; margin: 0 8px;">至</span>
<span>{{ item.rejectedStatus ? $$(rejectedForShow, [item.rejectedStatus], 'rejectedStatus') : '' }}</span> <span>{{ item.rejectedStatus ? $$(rejectedForShow, [item.rejectedStatus], 'rejectedStatus') : '' }}</span>
</span> --> </span> -->
</div> </div>
<div class="span-txt-two reviewer ellipsis">审核人: <div class="span-txt-two reviewer ellipsis">
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.reviewedBy" placement="bottom"> 审核人:
<el-tooltip class="item"
effect="dark"
placement="bottom"
popper-class="remark-popper-class"
:content="item.reviewedBy">
<span>{{ item.reviewedBy }}</span> <span>{{ item.reviewedBy }}</span>
</el-tooltip> </el-tooltip>
</div> </div>
<div class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</div> <div class="span-txt-two">
<div v-if="item.remark" class="span-txt-two">备注: 审核时间:{{ item.reviewedDateFormat }}
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="bottom"> </div>
<span>{{ item.remark ? (item.remark.length > 5 ? (item.remark.slice(0, 5) + '...') : item.remark) : '' }}</span> <div v-if="item.remark" class="span-txt-two">
备注:
<el-tooltip class="item"
effect="dark"
placement="bottom"
popper-class="remark-popper-class"
:content="item.remark">
<span>{{ item.remark ? (item.remark.length > 5 ? (`${item.remark.slice(0, 5)}...`) : item.remark) : '' }}</span>
</el-tooltip> </el-tooltip>
</div> </div>
<div class="span-txt-two" v-if="[4, 6, 7, 9].includes(item.status)">驳回原因: <div v-if="[4, 6, 7, 9].includes(item.status)" class="span-txt-two">
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.rejectCause" placement="bottom"> 驳回原因:
<span>{{ item.rejectCause ? (item.rejectCause.length > 5 ? (item.rejectCause.slice(0, 5) + '...') : item.rejectCause) : '' }}</span> <el-tooltip class="item"
effect="dark"
placement="bottom"
popper-class="remark-popper-class"
:content="item.rejectCause">
<span>{{ item.rejectCause ? (item.rejectCause.length > 5 ? (`${item.rejectCause.slice(0, 5)}...`) : item.rejectCause) : '' }}</span>
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
</div> </div>
<div class="emptyCom" v-else> <div v-else class="emptyCom">
<img :src="emptyImgUrl" class="emptyImg" alt=""> <img alt=""
class="emptyImg"
:src="emptyImgUrl">
<span class="tips">暂无数据</span> <span class="tips">暂无数据</span>
</div> </div>
</div> </div>
...@@ -72,214 +127,222 @@ ...@@ -72,214 +127,222 @@
</baseDialog> </baseDialog>
</div> </div>
</template> </template>
<script> <script>
import { getTransferGoodsInfo, getTransferAuitInfo, deliveryReject } from '@/api/stockManage' import { deliveryReject, getTransferAuitInfo, getTransferGoodsInfo } from "@/api/stockManage";
import { deepClone, Util } from '@/common/util' import { deepClone, Util } from "@/common/util";
import { baseConfig } from "@/main" import { baseConfig } from "@/main";
import EllipsisTooltip from '../../components/EllipsisTooltip.vue' import EllipsisTooltip from "../../components/EllipsisTooltip.vue";
export default { export default {
name: "RejectDialog", name: "RejectDialog",
components: {
EllipsisTooltip,
},
props: { props: {
visible: { visible: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
rejectData: { rejectData: {
type: Object type: Object,
}
}, },
components: {
EllipsisTooltip
}, },
data() { data() {
return { return {
hasPage: false, hasPage: false,
emptyImgUrl: require("@/assets/empty-5.png"), emptyImgUrl: require("@/assets/empty-5.png"),
layout: 'total,sizes,prev,pager,next,jumper', layout: "total,sizes,prev,pager,next,jumper",
rejectNodeOptions: [ rejectNodeOptions: [
{ {
id: 1, id: 1,
label: "调拨商户" label: "调拨商户",
}, },
{ {
id: 2, id: 2,
label: "运营审核" label: "运营审核",
}, },
{ {
id: 3, id: 3,
label: "商务审核" label: "商务审核",
} },
], ],
rejectConfig: { rejectConfig: {
setting: { setting: {
showClose: true, showClose: true,
appendToBody: false, appendToBody: false,
btnList: [ btnList: [
] ],
}, },
config: { config: {
title: "驳回", title: "驳回",
width: "1080px" width: "1080px",
} },
}, },
examineStatusClass: { examineStatusClass: {
2: 'greenSp', 2: "greenSp",
4: 'redSp', 4: "redSp",
5: 'greenSp', 5: "greenSp",
6: 'redSp', 6: "redSp",
7: 'redSp', 7: "redSp",
8: 'greenSp', 8: "greenSp",
9: 'redSp' 9: "redSp",
}, },
statusForShow: { statusForShow: {
2: { text: '运营审核', status: '通过' }, 2: { text: "运营审核", status: "通过" },
4: { text: '运营审核', status: '驳回' }, 4: { text: "运营审核", status: "驳回" },
5: { text: '商务审核', status: '通过' }, 5: { text: "商务审核", status: "通过" },
6: { text: '商务审核', status: '驳回' }, 6: { text: "商务审核", status: "驳回" },
7: { text: '调拨驳回', status: '驳回' }, 7: { text: "调拨驳回", status: "驳回" },
8: { text: '总监审核', status: '通过' }, 8: { text: "总监审核", status: "通过" },
9: { text: '总监驳回', status: '驳回' } 9: { text: "总监驳回", status: "驳回" },
}, },
rejectedForShow: { rejectedForShow: {
1: { rejectedStatus: '调拨商户' }, 1: { rejectedStatus: "调拨商户" },
2: { rejectedStatus: '运营审核' }, 2: { rejectedStatus: "运营审核" },
3: { rejectedStatus: '商务审核' } 3: { rejectedStatus: "商务审核" },
}, },
rejectTableParams: { rejectTableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + Number.parseInt(Math.random() * 1000),
listName: 'list', listName: "list",
tableColumns: [ tableColumns: [
{ {
label: '产品名称', label: "产品名称",
prop: 'goodsName' prop: "goodsName",
},
{
label: "产品ID",
prop: "upgradeGoodsCommodityCode",
width: 100,
}, },
{ {
label: '产品编码', label: "产品编码",
prop: 'productCode' prop: "productCode",
}, },
{ {
label: '规格', label: "规格",
prop: 'specificationData' prop: "specificationData",
}, },
{ {
label: '系列', label: "系列",
prop: 'sourceMaterialName' prop: "sourceMaterialName",
}, },
{ {
label: '所属分类', label: "所属分类",
prop: 'goodsTypeName' prop: "goodsTypeName",
}, },
{ {
label: '调拨数量', label: "调拨数量",
prop: 'allocateNumber', prop: "allocateNumber",
formatter: (cellValue) => { formatter: (cellValue) => {
const qty = cellValue.allocateNumber ?? '-' const qty = cellValue.allocateNumber ?? "-";
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件' const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? "米" : "件";
return qty === '-' ? '-' : `${qty}${unit}` return qty === "-" ? "-" : `${qty}${unit}`;
} },
}, },
{ {
label: '调入门店库存', label: "调入门店库存",
prop: 'inStockQty', prop: "inStockQty",
formatter: (cellValue) => { formatter: (cellValue) => {
const qty = cellValue.inStockQty ?? '-' const qty = cellValue.inStockQty ?? "-";
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件' const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? "米" : "件";
return qty === '-' ? '-' : `${qty}${unit}` return qty === "-" ? "-" : `${qty}${unit}`;
} },
}, },
{ {
label: '调出门店库存', label: "调出门店库存",
prop: 'outStockQty', prop: "outStockQty",
formatter: (cellValue) => { formatter: (cellValue) => {
const qty = cellValue.outStockQty ?? '-' const qty = cellValue.outStockQty ?? "-";
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件' const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? "米" : "件";
return qty === '-' ? '-' : `${qty}${unit}` return qty === "-" ? "-" : `${qty}${unit}`;
} },
}, },
{ {
label: '膜卷号', label: "膜卷号",
prop: 'filmRollNo' prop: "filmRollNo",
} },
] ],
}, },
infoList: [ infoList: [
{ label: '调出仓库', prop: 'callOutYqMerchantName' }, { label: "调出仓库", prop: "callOutYqMerchantName" },
{ label: '调出门店', prop: 'callOutMerchantName' }, { label: "调出门店", prop: "callOutMerchantName" },
{ label: '调入仓库', prop: 'callInYqMerchantName' }, { label: "调入仓库", prop: "callInYqMerchantName" },
{ label: '调入门店', prop: 'callInMerchantName' }, { label: "调入门店", prop: "callInMerchantName" },
{ label: '备注', prop: 'remark', isRemark: true } { label: "备注", prop: "remark", isRemark: true },
], ],
rejectRules: { rejectRules: {
rejectNode: [ rejectNode: [
{ required: true, message: "请选择驳回节点", trigger: "change" } { required: true, message: "请选择驳回节点", trigger: "change" },
], ],
rejectCause: [ rejectCause: [
{ required: true, message: "请输入驳回原因", trigger: "blur" } { required: true, message: "请输入驳回原因", trigger: "blur" },
] ],
}, },
formData: {}, formData: {},
goodsList: [], goodsList: [],
tableTotal: 0, tableTotal: 0,
detailInfo: {}, detailInfo: {},
auditDetaiList: [], auditDetaiList: [],
} };
}, },
computed: { computed: {
dialogShow: { dialogShow: {
get() { get() {
if (this.visible) { if (this.visible) {
this.getGoodsDetail({ currentPage: 1, pageSize: 10 }) this.getGoodsDetail({ currentPage: 1, pageSize: 10 });
this.getInfoDetail() this.getInfoDetail();
} }
return this.visible return this.visible;
}, },
set(val) { set(val) {
this.$emit('update:visible', val) this.$emit("update:visible", val);
} },
} },
}, },
mounted() { mounted() {
}, },
methods: { methods: {
refreshTable(pageObj) { refreshTable(pageObj) {
this.getGoodsDetail(pageObj) this.getGoodsDetail(pageObj);
}, },
getGoodsDetail(pageObj) { getGoodsDetail(pageObj) {
getTransferGoodsInfo({ allocateCode: this.rejectData.allocateCode, pageSize: pageObj.pageSize, currentPage: pageObj.currentPage }).then(res => { getTransferGoodsInfo({ allocateCode: this.rejectData.allocateCode, pageSize: pageObj.pageSize, currentPage: pageObj.currentPage }).then((res) => {
this.goodsList = res.list || [] this.goodsList = res.list || [];
this.tableTotal = res.total this.tableTotal = res.total;
}) });
}, },
getInfoDetail() { getInfoDetail() {
getTransferAuitInfo({ allocateCode: this.rejectData.allocateCode }).then(res => { getTransferAuitInfo({ allocateCode: this.rejectData.allocateCode }).then((res) => {
res?.auditDetaiList?.forEach(item => { res?.auditDetaiList?.forEach((item) => {
item.reviewedDateFormat = item.reviewedDate item.reviewedDateFormat = item.reviewedDate
? Util.dateFormate(item.reviewedDate, 'YYYY-MM-DD HH:mm:ss') ? Util.dateFormate(item.reviewedDate, "YYYY-MM-DD HH:mm:ss")
: "" : "";
}) });
this.detailInfo = res this.detailInfo = res;
}) });
}, },
handleRejectClose(isRefresh = false) { handleRejectClose(isRefresh = false) {
this.$emit("rejectClose", isRefresh) this.$emit("rejectClose", isRefresh);
}, },
handleRejectConfirm() { handleRejectConfirm() {
this.$refs["delivery-dialog-form"].validate((valid) => { this.$refs["delivery-dialog-form"].validate((valid) => {
if (valid) { if (valid) {
deliveryReject({ allocateCode: this.rejectData.allocateCode, rejectNode: this.formData.rejectNode, rejectCause: this.formData.rejectCause }) deliveryReject({ allocateCode: this.rejectData.allocateCode, rejectNode: this.formData.rejectNode, rejectCause: this.formData.rejectCause })
.then((res) => { .then((res) => {
this.handleRejectClose(true) this.handleRejectClose(true);
this.notice.okTips('驳回成功') this.notice.okTips("驳回成功");
}) })
.catch(() => { .catch(() => {
this.handleRejectClose() this.handleRejectClose();
}) });
} }
}) });
}, },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.address-info { .address-info {
display: flex; display: flex;
...@@ -338,7 +401,7 @@ export default { ...@@ -338,7 +401,7 @@ export default {
.log-box { .log-box {
margin-top: 20px; margin-top: 20px;
border-radius: 4px; border-radius: 4px;
background: #FAFAFA; background: #fafafa;
padding: 16px; padding: 16px;
} }
.title { .title {
...@@ -370,7 +433,7 @@ export default { ...@@ -370,7 +433,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 10px; margin-bottom: 10px;
&:last-child{ &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
} }
......
<template> <template>
<div> <div>
<baseDialog :is-show.sync="dialogShow" :dialog-config="dialogConfig.config" @handleClick="submit" @closeDialog="handleShipmentClose(false)"> <baseDialog :dialog-config="dialogConfig.config"
<div class="edit-order-dialog" v-if="dialogShow"> :is-show.sync="dialogShow"
@closeDialog="handleShipmentClose(false)"
@handleClick="submit">
<div v-if="dialogShow" class="edit-order-dialog">
<div class="address-info"> <div class="address-info">
<div class="info-item" v-for="(item, index) in infoList" :key="index" :class="{ 'remark-item': item.isRemark }"> <div v-for="(item, index) in infoList"
:key="index"
class="info-item"
:class="{ 'remark-item': item.isRemark }">
<span class="label-name">{{ item.label }}:</span> <span class="label-name">{{ item.label }}:</span>
<ellipsis-tooltip class="label-value" :content="paramsObj[item.prop]" /> <EllipsisTooltip class="label-value" :content="paramsObj[item.prop]" />
</div> </div>
</div> </div>
<div class="table-class"> <div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage" :table-data="tableList"> <d2-table ref="purchaseOrderDetailTable"
<div slot="nowPurNum" slot-scope="scope" style="margin: 0 8px;"> :has-page="hasPage"
:table-data="tableList"
:table-params="tableParams">
<div slot="nowPurNum"
slot-scope="scope"
style="margin: 0 8px;">
<div> <div>
<el-input v-if=" <el-input v-if="
(!tableList[scope.index].shipperUuid) || tableList[scope.index].shipperUuid == userInfo.detail.uuid" :class="{ 'border-red': !nowPurNumList[scope.index] && isSubmit }" placeholder="请输入" v-model="nowPurNumList[scope.index]" @input="(e) => handleInput(e, scope)"></el-input> (!tableList[scope.index].shipperUuid) || tableList[scope.index].shipperUuid == userInfo.detail.uuid"
v-model="nowPurNumList[scope.index]"
placeholder="请输入"
:class="{ 'border-red': !nowPurNumList[scope.index] && isSubmit }"
@input="(e) => handleInput(e, scope)">
</el-input>
</div> </div>
</div> </div>
</d2-table> </d2-table>
</div> </div>
<div class="form-content"> <div class="form-content">
<el-form label-width="100px" :rules="dialogRules" :model="dialogData" ref="delivery-dialog-form"> <el-form ref="delivery-dialog-form"
label-width="100px"
:model="dialogData"
:rules="dialogRules">
<el-form-item label="承运单号:" prop="deliveryNumber"> <el-form-item label="承运单号:" prop="deliveryNumber">
<el-input maxlength="50" placeholder="请输入承运物流单号" v-model.trim="dialogData.deliveryNumber" class="dis-in-block" @input="deliveryNumberInput" /> <el-input v-model.trim="dialogData.deliveryNumber"
class="dis-in-block"
maxlength="50"
placeholder="请输入承运物流单号"
@input="deliveryNumberInput" />
</el-form-item> </el-form-item>
<el-form-item label="承运公司:" prop="deliveryCompany"> <el-form-item label="承运公司:" prop="deliveryCompany">
<el-input placeholder="请输入承运物流公司" maxlength="20" v-model.trim="dialogData.deliveryCompany" class="dis-in-block" /> <el-input v-model.trim="dialogData.deliveryCompany"
class="dis-in-block"
maxlength="20"
placeholder="请输入承运物流公司" />
</el-form-item> </el-form-item>
<el-form-item label="发货时间:" prop="deliveryDate"> <el-form-item label="发货时间:" prop="deliveryDate">
<el-date-picker class="dis-in-block" v-model="dialogData.deliveryDate" type="datetime" placeholder="请选择发货时间"> <el-date-picker v-model="dialogData.deliveryDate"
class="dis-in-block"
placeholder="请选择发货时间"
type="datetime">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -39,44 +68,44 @@ ...@@ -39,44 +68,44 @@
</template> </template>
<script> <script>
import { batchDelicery } from "@/api/stockManage.js" import _ from "lodash";
import { baseConfig } from "@/main" import { batchDelicery } from "@/api/stockManage.js";
import { limitPrice } from "@/common/format" import { limitPrice } from "@/common/format";
import { Util } from "@/common/util" import { Util } from "@/common/util";
import EllipsisTooltip from '../../components/EllipsisTooltip.vue' import { baseConfig } from "@/main";
import _ from "lodash" import EllipsisTooltip from "../../components/EllipsisTooltip.vue";
export default { export default {
name: "shipmentDialog", name: "shipmentDialog",
components: {
EllipsisTooltip,
},
filters: {
formatCar(list) {
// console.log(list, 'list')
let str = list.map((item) => {
return `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`;
}).join(",");
return str.length > 15 ? str.substring(0, 15) + "..." : str;
},
},
props: { props: {
page: { page: {
type: String, type: String,
default: "purchase" default: "purchase",
}, },
visible: { visible: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
paramsObj: { paramsObj: {
type: Object, type: Object,
default: () => { } default: () => { },
}, },
tableList: { tableList: {
type: Array, type: Array,
default: () => { } default: () => { },
}
},
components: {
EllipsisTooltip
}, },
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit("update:visible", val)
}
}
}, },
data() { data() {
return { return {
...@@ -90,12 +119,12 @@ export default { ...@@ -90,12 +119,12 @@ export default {
showClose: true, showClose: true,
appendToBody: false, appendToBody: false,
btnList: [ btnList: [
] ],
}, },
config: { config: {
title: "发货", title: "发货",
width: "1300px" width: "1300px",
} },
}, },
isSubmit: false, isSubmit: false,
dialogData: {}, dialogData: {},
...@@ -105,164 +134,170 @@ export default { ...@@ -105,164 +134,170 @@ export default {
orderInfo: {}, orderInfo: {},
hasPage: false, hasPage: false,
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + Number.parseInt(Math.random() * 1000),
listName: "list", listName: "list",
tableColumns: [ tableColumns: [
{ {
label: "产品名称", label: "产品名称",
prop: 'goodsName' prop: "goodsName",
},
{
label: "产品ID",
prop: "commodityCode",
width: 100,
}, },
{ {
label: "产品编码", label: "产品编码",
prop: "productCode" prop: "productCode",
}, },
{ {
label: "规格", label: "规格",
prop: "specificationData" prop: "specificationData",
}, },
{ {
label: "系列", label: "系列",
prop: "sourceMaterialName" prop: "sourceMaterialName",
}, },
{ {
label: "所属分类", label: "所属分类",
prop: "goodsTypeName" prop: "goodsTypeName",
}, },
{ {
label: "调拨数量", label: "调拨数量",
prop: "allocateNumber", prop: "allocateNumber",
formatter: (cellValue) => { formatter: (cellValue) => {
const qty = cellValue.allocateNumber ?? '-' const qty = cellValue.allocateNumber ?? "-";
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件' const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? "米" : "件";
return qty === '-' ? '-' : `${qty}${unit}` return qty === "-" ? "-" : `${qty}${unit}`;
} },
}, },
{ {
label: "发货数量", label: "发货数量",
prop: "", prop: "",
width: 124, width: 124,
addHtml: "nowPurNum" addHtml: "nowPurNum",
}, },
{ {
label: '调入门店库存', label: "调入门店库存",
prop: 'inStockQty', prop: "inStockQty",
formatter: (cellValue) => { formatter: (cellValue) => {
const qty = cellValue.inStockQty ?? '-' const qty = cellValue.inStockQty ?? "-";
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件' const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? "米" : "件";
return qty === '-' ? '-' : `${qty}${unit}` return qty === "-" ? "-" : `${qty}${unit}`;
} },
}, },
{ {
label: '调出门店库存', label: "调出门店库存",
prop: 'outStockQty', prop: "outStockQty",
formatter: (cellValue) => { formatter: (cellValue) => {
const qty = cellValue.outStockQty ?? '-' const qty = cellValue.outStockQty ?? "-";
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件' const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? "米" : "件";
return qty === '-' ? '-' : `${qty}${unit}` return qty === "-" ? "-" : `${qty}${unit}`;
} },
}, },
{ {
label: '膜卷号', label: "膜卷号",
prop: 'filmRollNo' prop: "filmRollNo",
} },
] ],
}, },
dialogRules: { dialogRules: {
deliveryCompany: [ deliveryCompany: [
{ required: true, message: "请输入承运公司", trigger: "blur" } { required: true, message: "请输入承运公司", trigger: "blur" },
], ],
deliveryNumber: [ deliveryNumber: [
{ required: true, message: "请输入承运单号", trigger: "blur" } { required: true, message: "请输入承运单号", trigger: "blur" },
], ],
deliveryDate: [ deliveryDate: [
{ required: true, message: "请选择发货时间", trigger: "blur" } { required: true, message: "请选择发货时间", trigger: "blur" },
] ],
}, },
shippingWarehouseList: [], shippingWarehouseList: [],
infoList: [ infoList: [
{ label: '调出仓库', prop: 'callOutYqMerchantName' }, { label: "调出仓库", prop: "callOutYqMerchantName" },
{ label: '调出门店', prop: 'callOutMerchantName' }, { label: "调出门店", prop: "callOutMerchantName" },
{ label: '调入仓库', prop: 'callInYqMerchantName' }, { label: "调入仓库", prop: "callInYqMerchantName" },
{ label: '调入门店', prop: 'callInMerchantName' }, { label: "调入门店", prop: "callInMerchantName" },
{ label: '备注', prop: 'remark', isRemark: true } { label: "备注", prop: "remark", isRemark: true },
], ],
} };
},
computed: {
dialogShow: {
get() {
return this.visible;
},
set(val) {
this.$emit("update:visible", val);
},
}, },
filters: {
formatCar(list) {
// console.log(list, 'list')
let str = list.map(item => {
return `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
}).join(',')
return str.length > 15 ? str.substring(0, 15) + '...' : str
}
}, },
mounted() { mounted() {
// 初始化发货数量输入数据列表 // 初始化发货数量输入数据列表
this.nowPurNumList = this.tableList?.map(() => '') this.nowPurNumList = this.tableList?.map(() => "");
}, },
methods: { methods: {
handleShipmentClose(isRefresh = false) { handleShipmentClose(isRefresh = false) {
this.$emit("shipmentClose", isRefresh) this.$emit("shipmentClose", isRefresh);
}, },
deliveryNumberInput(event, index) { deliveryNumberInput(event, index) {
this.$set( this.$set(
this.dialogData, this.dialogData,
"deliveryNumber", "deliveryNumber",
event.replace(/[^a-zA-Z0-9]/g, "") event.replace(/[^a-z0-9]/gi, ""),
) );
}, },
handleInput(val, scope) { handleInput(val, scope) {
const _row = scope.scope const _row = scope.scope;
const _index = scope.index const _index = scope.index;
const _oldVal = this.oldPurNumList[_index] || 0 const _oldVal = this.oldPurNumList[_index] || 0;
const _maxVal = _row.allocateNumber - _row.deliveryNumber const _maxVal = _row.allocateNumber - _row.deliveryNumber;
this.nowPurNumList[_index] = this.nowPurNumList[_index]
limitPrice(val, _oldVal, 9999, 0, 0, _maxVal) || (val ? _maxVal : "") = limitPrice(val, _oldVal, 9999, 0, 0, _maxVal) || (val ? _maxVal : "");
this.oldPurNumList = JSON.parse(JSON.stringify(this.nowPurNumList)) this.oldPurNumList = JSON.parse(JSON.stringify(this.nowPurNumList));
}, },
submit() { submit() {
this.isSubmit = true this.isSubmit = true;
this.$refs["delivery-dialog-form"].validate((valid) => { this.$refs["delivery-dialog-form"].validate((valid) => {
if (valid) { if (valid) {
// 验证本次发货数量 // 验证本次发货数量
if (this.nowPurNumList.some((item) => !item || item <= 0)) { if (this.nowPurNumList.some(item => !item || item <= 0)) {
this.notice.errorTips("发货数量必须全部填写且不能为0") this.notice.errorTips("发货数量必须全部填写且不能为0");
return true return true;
} }
var params = { let params = {
...this.dialogData, ...this.dialogData,
deliveryDate: Util.dateFormate( deliveryDate: Util.dateFormate(
this.dialogData.deliveryDate, this.dialogData.deliveryDate,
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss",
), ),
orderCode: this.paramsObj.allocateCode, orderCode: this.paramsObj.allocateCode,
deliveryDetailList: [] deliveryDetailList: [],
} };
for (let idx = 0; idx < this.tableList.length; idx++) { for (let idx = 0; idx < this.tableList.length; idx++) {
const item = this.tableList[idx] const item = this.tableList[idx];
if (this.nowPurNumList[idx] && this.nowPurNumList[idx] != 0) { if (this.nowPurNumList[idx] && this.nowPurNumList[idx] != 0) {
params.deliveryDetailList.push({ params.deliveryDetailList.push({
id: item.detailId, id: item.detailId,
purchaseNumber: this.nowPurNumList[idx], purchaseNumber: this.nowPurNumList[idx],
}) });
} }
} }
batchDelicery(params) batchDelicery(params)
.then((res) => { .then((res) => {
this.handleShipmentClose(true) this.handleShipmentClose(true);
this.notice.okTips() this.notice.okTips();
}) })
.catch(() => { .catch(() => {
this.handleShipmentClose(false) this.handleShipmentClose(false);
}) });
} }
}) });
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -3,10 +3,16 @@ ...@@ -3,10 +3,16 @@
<d2-container class="container"> <d2-container class="container">
<template #header> <template #header>
<div class="header"> <div class="header">
<d2-search ref="showSearch" class="show-search" :form-data="showFormData" :search-form="searchForm"> <d2-search ref="showSearch"
class="show-search"
:form-data="showFormData"
:search-form="searchForm">
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" handle size="small" type="primary"> <el-button :id="tableParams.btnId"
size="small"
type="primary"
handle>
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> <el-button size="small" @click="handleReset">
...@@ -25,12 +31,20 @@ ...@@ -25,12 +31,20 @@
<auth-button category="Button" :show-btn-ids="['9081102']" /> <auth-button category="Button" :show-btn-ids="['9081102']" />
</span> </span>
</d2-table-header> </d2-table-header>
<d2-table ref="transferShipmentTable" :before-search-fn="beforeSearchFn" :get-list-api="getListApi" <d2-table ref="transferShipmentTable"
:search-form="tableSearchForm" :selectable-fn="selectableFn" :table-data="tableData" :before-search-fn="beforeSearchFn"
:table-params="tableParams" @selectionTable="handleSelectionChange"> :get-list-api="getListApi"
:search-form="tableSearchForm"
:selectable-fn="selectableFn"
:table-data="tableData"
:table-params="tableParams"
@selectionTable="handleSelectionChange">
<template #receiver="scope"> <template #receiver="scope">
<div v-if="scope.scope.receiver"> <div v-if="scope.scope.receiver">
<el-popover v-if="scope.scope.receiver.length > 12" effect="dark" placement="top" trigger="hover" <el-popover v-if="scope.scope.receiver.length > 12"
effect="dark"
placement="top"
trigger="hover"
width="300"> width="300">
<div class="merchant-name-box"> <div class="merchant-name-box">
{{ spanFilter(scope.scope.receiver) }} {{ spanFilter(scope.scope.receiver) }}
...@@ -49,7 +63,10 @@ ...@@ -49,7 +63,10 @@
</template> </template>
<template #address="scope"> <template #address="scope">
<div v-if="scope.scope.address"> <div v-if="scope.scope.address">
<el-popover v-if="scope.scope.address.length > 12" effect="dark" placement="top" trigger="hover" <el-popover v-if="scope.scope.address.length > 12"
effect="dark"
placement="top"
trigger="hover"
width="300"> width="300">
<div class="merchant-name-box"> <div class="merchant-name-box">
{{ spanFilter(scope.scope.address) }} {{ spanFilter(scope.scope.address) }}
...@@ -76,18 +93,26 @@ ...@@ -76,18 +93,26 @@
<auth-button :data="scope.scope" :show-btn-ids="['9081104']" /> <auth-button :data="scope.scope" :show-btn-ids="['9081104']" />
</span> </span>
<auth-button v-if="scope.scope.billStatus != 7 && scope.scope.deliveryStatus == 1" <auth-button v-if="scope.scope.billStatus != 7 && scope.scope.deliveryStatus == 1"
:data="scope.scope" :show-btn-ids="['9081105']" /> :data="scope.scope"
:show-btn-ids="['9081105']" />
</div> </div>
</template> </template>
</d2-table> </d2-table>
</div> </div>
<ShipmentDialog v-if="shipmentVisible" :params-obj="shipmentDialogData" :table-list="shipmentTableList" <ShipmentDialog v-if="shipmentVisible"
:visible.sync="shipmentVisible" @shipmentClose="shipmentDialogClose"> :params-obj="shipmentDialogData"
:table-list="shipmentTableList"
:visible.sync="shipmentVisible"
@shipmentClose="shipmentDialogClose">
</ShipmentDialog> </ShipmentDialog>
<RejectDialog v-if="rejectVisible" :reject-data="rejectData" :visible.sync="rejectVisible" <RejectDialog v-if="rejectVisible"
:reject-data="rejectData"
:visible.sync="rejectVisible"
@rejectClose="handleRejectClose"> @rejectClose="handleRejectClose">
</RejectDialog> </RejectDialog>
<TransferDetailDialog v-if="transferDetailVisible" :params-obj="transferObj" :visible.sync="transferDetailVisible"> <TransferDetailDialog v-if="transferDetailVisible"
:params-obj="transferObj"
:visible.sync="transferDetailVisible">
</TransferDetailDialog> </TransferDetailDialog>
</d2-container> </d2-container>
</template> </template>
...@@ -117,6 +142,7 @@ export default { ...@@ -117,6 +142,7 @@ export default {
goodsName: "", goodsName: "",
productCode: "", productCode: "",
callOutName: "", callOutName: "",
commodityCode: "",
}, },
tableSearchForm: {}, tableSearchForm: {},
tableData: [], tableData: [],
...@@ -166,13 +192,20 @@ export default { ...@@ -166,13 +192,20 @@ export default {
type: "input", type: "input",
isClear: true, isClear: true,
}, },
{
label: "产品ID",
name: "commodityCode",
type: "input",
isClear: true,
maxlength: 20,
},
], ],
getListApi: getTransferShipmentList, getListApi: getTransferShipmentList,
// 表格参数 // 表格参数
tableParams: { tableParams: {
btnId: new Date().getTime() + Number.parseInt(Math.random() * 1000), btnId: new Date().getTime() + Number.parseInt(Math.random() * 1000),
listName: "list", listName: "list",
mutiSelectUniqueKey: "id", mutiSelectUniqueKey: "detailId",
mutiSelectName: "list", mutiSelectName: "list",
tableOption: { tableOption: {
width: "140", width: "140",
...@@ -193,6 +226,11 @@ export default { ...@@ -193,6 +226,11 @@ export default {
prop: "goodsName", prop: "goodsName",
}, },
{ {
label: "产品ID",
prop: "commodityCode",
width: 100,
},
{
label: "产品编码", label: "产品编码",
prop: "productCode", prop: "productCode",
}, },
...@@ -422,8 +460,9 @@ export default { ...@@ -422,8 +460,9 @@ export default {
}, },
shipmentDialogClose(obj) { shipmentDialogClose(obj) {
this.shipmentVisible = false; this.shipmentVisible = false;
if (obj) if (obj) {
this.$refs.transferShipmentTable.refreshTable(true); this.$refs.transferShipmentTable.refreshTable(true);
}
}, },
// 查看详情 // 查看详情
handleDetail(row) { handleDetail(row) {
...@@ -454,8 +493,9 @@ export default { ...@@ -454,8 +493,9 @@ export default {
}, },
handleRejectClose(obj) { handleRejectClose(obj) {
this.rejectVisible = false; this.rejectVisible = false;
if (obj) if (obj) {
this.$refs.transferShipmentTable.refreshTable(true); this.$refs.transferShipmentTable.refreshTable(true);
}
}, },
}, },
}; };
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
:search-form="searchForm"> :search-form="searchForm">
<template #filmRollNo> <template #filmRollNo>
<el-input v-model.trim="searchForm.filmRollNo" <el-input v-model.trim="searchForm.filmRollNo"
placeholder="请输入膜卷号"
:clearable="true" :clearable="true"
:maxlength="50" :maxlength="50"
placeholder="请输入膜卷号"
:style="{ width: '100%' }" :style="{ width: '100%' }"
@input="filmRollNoInput" /> @input="filmRollNoInput" />
</template> </template>
...@@ -179,6 +179,12 @@ export default { ...@@ -179,6 +179,12 @@ export default {
}, { }, {
label: "膜卷号", label: "膜卷号",
addHtml: "filmRollNo", addHtml: "filmRollNo",
}, {
label: "产品ID",
name: "commodityCode",
type: "input",
isClear: true,
maxlength: 20,
}], }],
getListApi: getGoodsWarehousingList, getListApi: getGoodsWarehousingList,
tableParams: { tableParams: {
...@@ -197,6 +203,10 @@ export default { ...@@ -197,6 +203,10 @@ export default {
prop: "upgradeGoodsName", prop: "upgradeGoodsName",
width: "160px", width: "160px",
}, { }, {
label: "产品ID",
prop: "commodityCode",
width: 100,
}, {
label: "规格", label: "规格",
prop: "specificationData", prop: "specificationData",
width: "160px", width: "160px",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!