Commit 9ce6f71c by 陈婉清

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

```

See merge request !996
2 parents 2a29653c ac17d305
Pipeline #278 for 9ce6f71c skipped in 0 seconds
<!-- 发货单详情弹窗 --> <!-- 发货单详情弹窗 -->
<template> <template>
<div> <div>
<d2-dialog title="详细信息" :is-visible="detailVisible" class="stockMonthDailog" width="1400px" :no-cancel="true" :isShowFooter="false" @closeDialog="handleClose" @confirmDialog="handleClose"> <d2-dialog class="stockMonthDailog"
title="详细信息"
width="1400px"
:is-show-footer="false"
:is-visible="detailVisible"
:no-cancel="true"
@closeDialog="handleClose"
@confirmDialog="handleClose">
<div class="address-info"> <div class="address-info">
<div class="info-item" v-for="(item, index) in infoList" :key="index" :class="{ 'remark-item': item.isRemark }"> <div v-for="(item, index) in infoList"
:key="index"
class="info-item"
:class="{ 'remark-item': item.isRemark }">
<span class="label-name">{{ item.label }}:</span> <span class="label-name">{{ item.label }}:</span>
<ellipsis-tooltip class="label-value" :content="detailInfo[item.prop]" /> <EllipsisTooltip class="label-value" :content="detailInfo[item.prop]" />
</div> </div>
</div> </div>
<template v-for="(item, index) in detailInfo.deliveryDetailList"> <template v-for="(item, index) in detailInfo.deliveryDetailList">
<div class="table-wrap" :key="index"> <div :key="index" class="table-wrap">
<div class="detail-info border-b"> <div class="detail-info border-b">
<div class="item wid-40"> <div class="item wid-40">
产品名称: 产品名称:
<span>{{ item.upgradeGoodsName }}&nbsp;&nbsp;&nbsp;&nbsp; {{item.specificationData}}</span> <span>{{ item.upgradeGoodsName }}&nbsp;&nbsp;&nbsp;&nbsp; {{ item.specificationData }}</span>
</div> </div>
<div class="item wid-30"> <div class="item wid-20">
产品ID:
<span>{{ item.upgradeCommodityCode }}</span>
</div>
<div class="item wid-20">
发货数量: 发货数量:
<span>{{ item.purchaseNumber + (baseConfig.membraneTypeList.includes(item.goodsType) ? '米' : '件') }}</span> <span>{{ item.purchaseNumber + (baseConfig.membraneTypeList.includes(item.goodsType) ? '米' : '件') }}</span>
</div> </div>
<div class="item wid-30"> <div class="item wid-20">
可用库存数量: 可用库存数量:
<span>{{ item.stockNum + (baseConfig.membraneTypeList.includes(item.goodsType) ? '米' : '件') }}</span> <span>{{ item.stockNum + (baseConfig.membraneTypeList.includes(item.goodsType) ? '米' : '件') }}</span>
</div> </div>
</div> </div>
<d2-table ref="recordTable" v-if="item.deliveryCardList === null || item.deliveryCardList.length == 0" :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 slot="filmRollNo" slot-scope="scope"> <template slot="filmRollNo" slot-scope="scope">
<div v-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1"> <div v-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1">
{{ scope.scope.filmRollList[0] }} {{ scope.scope.filmRollList[0] }}
</div> </div>
<div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1"> <div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1">
<el-popover placement="top" width="200" trigger="hover"> <el-popover placement="top"
trigger="hover"
width="200">
<div class="film-roll-box"> <div class="film-roll-box">
<div class="title">膜卷号</div> <div class="title">
<div class="merchant-item" v-for="(subItem, subIndex) in scope.scope.filmRollList" :key="subIndex"> 膜卷号
</div>
<div v-for="(subItem, subIndex) in scope.scope.filmRollList"
:key="subIndex"
class="merchant-item">
{{ subItem }} {{ subItem }}
</div> </div>
</div> </div>
...@@ -57,13 +81,27 @@ ...@@ -57,13 +81,27 @@
</template> </template>
<script> <script>
import { Util, deepClone } from '@/common/util' import { mapActions, mapState } from "vuex";
import { mapActions, mapState } from 'vuex' import { getDeliveryDetail } from "@/api/stockManage.js";
import { getDeliveryDetail } from '@/api/stockManage.js' import { deepClone, Util } from "@/common/util";
import { baseConfig } from '@/main' import { baseConfig } from "@/main";
import EllipsisTooltip from '../../components/EllipsisTooltip.vue' import EllipsisTooltip from "../../components/EllipsisTooltip.vue";
export default { export default {
name: 'DeliveryDetailDialog', name: "DeliveryDetailDialog",
components: {
EllipsisTooltip,
},
props: {
detailVisible: {
type: Boolean,
default: false,
},
recordInfo: {
type: Object,
default: () => { },
},
},
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
...@@ -71,108 +109,95 @@ export default { ...@@ -71,108 +109,95 @@ export default {
searchFormSearch: {}, searchFormSearch: {},
// tableData: [], // tableData: [],
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + Number.parseInt(Math.random() * 1000),
listName: 'list', listName: "list",
// singleSelectUniqueKey: 'id', // singleSelectUniqueKey: 'id',
tableOption: false, tableOption: false,
tableColumns: [{ tableColumns: [{
label: '入库数量', label: "入库数量",
prop: 'increaseStockNum', prop: "increaseStockNum",
// width: '200px' // width: '200px'
formatter: (cellValue) => { formatter: (cellValue) => {
return (cellValue.increaseStockNum || cellValue.increaseStockNum == 0) ? (baseConfig.membraneTypeList.includes(cellValue.goodsType) ? parseFloat(cellValue.increaseStockNum / cellValue.alternateUnits).toFixed(2) : parseFloat(cellValue.increaseStockNum).toFixed(2)) + (baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-' return (cellValue.increaseStockNum || cellValue.increaseStockNum == 0) ? (baseConfig.membraneTypeList.includes(cellValue.goodsType) ? Number.parseFloat(cellValue.increaseStockNum / cellValue.alternateUnits).toFixed(2) : Number.parseFloat(cellValue.increaseStockNum).toFixed(2)) + (baseConfig.membraneTypeList.includes(cellValue.goodsType) ? "米" : "件") : "-";
} },
}, { }, {
label: '膜卷号', label: "膜卷号",
name: '', name: "",
type: 'slot', type: "slot",
addHtml: 'filmRollNo' addHtml: "filmRollNo",
}, { }, {
label: '入库仓库', label: "入库仓库",
prop: 'yqMerchantName' prop: "yqMerchantName",
// width: '150px' // width: '150px'
}, { }, {
label: '入库门店', label: "入库门店",
prop: 'merchantName' prop: "merchantName",
// width: '200px' // width: '200px'
}] }],
}, },
baseData: {}, baseData: {},
infoList: [ infoList: [
{ label: '收货人', prop: 'contactName' }, { label: "收货人", prop: "contactName" },
{ label: '收货人电话', prop: 'contactPhone' }, { label: "收货人电话", prop: "contactPhone" },
{ label: '收货地址', prop: 'contactAddress' }, { label: "收货地址", prop: "contactAddress" },
{ label: '发货单号', prop: 'deliveryNumber' }, { label: "发货单号", prop: "deliveryNumber" },
{ label: '发货仓库', prop: 'shippingWarehouseName' }, { label: "发货仓库", prop: "shippingWarehouseName" },
{ label: '承运公司', prop: 'deliveryCompany' }, { label: "承运公司", prop: "deliveryCompany" },
{ label: '发货时间', prop: 'deliveryDate' } { label: "发货时间", prop: "deliveryDate" },
] ],
} };
},
components: {
EllipsisTooltip
},
props: {
detailVisible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => { }
}
}, },
computed: { computed: {
}, },
mounted() { mounted() {
this.getDetail() this.getDetail();
}, },
methods: { methods: {
...mapActions({ ...mapActions({
get: 'd2admin/base/get', get: "d2admin/base/get",
close: 'd2admin/page/close' close: "d2admin/page/close",
}), }),
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm);
resolve() resolve();
}) });
}, },
getDetail() { getDetail() {
var params = { id: deepClone(this.recordInfo.id) } let params = { id: deepClone(this.recordInfo.id) };
getDeliveryDetail(params).then(res => { getDeliveryDetail(params).then((res) => {
this.detailInfo = res this.detailInfo = res;
if (this.detailInfo.deliveryDate) { if (this.detailInfo.deliveryDate) {
this.detailInfo.deliveryDate = Util.dateFormate(this.detailInfo.deliveryDate, 'YYYY-MM-DD HH:mm:ss') this.detailInfo.deliveryDate = Util.dateFormate(this.detailInfo.deliveryDate, "YYYY-MM-DD HH:mm:ss");
} }
const _deliveryDetailList = this.detailInfo.deliveryDetailList const _deliveryDetailList = this.detailInfo.deliveryDetailList;
if (_deliveryDetailList && _deliveryDetailList.length > 0) { if (_deliveryDetailList && _deliveryDetailList.length > 0) {
_deliveryDetailList.forEach(info => { _deliveryDetailList.forEach((info) => {
const _goodsWarehousingList = info.goodsWarehousingList const _goodsWarehousingList = info.goodsWarehousingList;
if (_goodsWarehousingList && _goodsWarehousingList.length > 0) { if (_goodsWarehousingList && _goodsWarehousingList.length > 0) {
_goodsWarehousingList.forEach(item => { _goodsWarehousingList.forEach((item) => {
item.goodsType = info.goodsType item.goodsType = info.goodsType;
// 换算单位 // 换算单位
item.alternateUnits = info?.stockNum / info?.purchaseNumber item.alternateUnits = info?.stockNum / info?.purchaseNumber;
}) });
} }
}) });
} }
}) });
}, },
handleClose() { handleClose() {
this.$emit('dialogClose') this.$emit("dialogClose");
} },
}
}
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.detail-info { .detail-info {
display: flex; display: flex;
...@@ -188,8 +213,8 @@ export default { ...@@ -188,8 +213,8 @@ export default {
.wid-40 { .wid-40 {
width: 40%; width: 40%;
} }
.wid-30 { .wid-20 {
width: 30%; width: 20%;
} }
span { span {
color: #333333ff; color: #333333ff;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!