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