Commit d323f776 by zhangxw

调拨管理需求开发联调

1 parent 7127745a
...@@ -136,6 +136,7 @@ fetch( ...@@ -136,6 +136,7 @@ fetch(
// console.log("baseConfig", baseConfig) // console.log("baseConfig", baseConfig)
// window.$fetchConfig = data // window.$fetchConfig = data
} else { } else {
response.axios.baseURL = 'http://192.168.1.127:8392/rop-dj-smartcarlife/router'
baseConfig = response baseConfig = response
window.$fetchConfig = response window.$fetchConfig = response
console.log(response) console.log(response)
......
...@@ -46,6 +46,48 @@ ...@@ -46,6 +46,48 @@
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
> >
<template slot="remark" slot-scope="scope">
<div v-if="scope.scope.remark">
<el-popover v-if="scope.scope.remark.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.remark) }}
</div>
<div slot="reference">
{{ spanFilter(scope.scope.remark, 12) }}
</div>
</el-popover>
<div v-else>{{ scope.scope.remark }}</div>
</div>
<span v-else>-</span>
</template>
<template slot="receiver" slot-scope="scope">
<div v-if="scope.scope.receiver">
<el-popover v-if="scope.scope.receiver.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.receiver) }}
</div>
<div slot="reference">
{{ spanFilter(scope.scope.receiver, 12) }}
</div>
</el-popover>
<div v-else>{{ scope.scope.receiver }}</div>
</div>
<span v-else>-</span>
</template>
<template slot="address" slot-scope="scope">
<div v-if="scope.scope.address">
<el-popover v-if="scope.scope.address.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.address) }}
</div>
<div slot="reference">
{{ spanFilter(scope.scope.address, 12) }}
</div>
</el-popover>
<div v-else>{{ scope.scope.address }}</div>
</div>
<span v-else>-</span>
</template>
<auth-button <auth-button
slot="auth-button" slot="auth-button"
slot-scope="scope" slot-scope="scope"
...@@ -300,11 +342,14 @@ export default { ...@@ -300,11 +342,14 @@ export default {
}, },
{ {
label: "备注", label: "备注",
prop: "remark" prop: "remark",
width: 120,
addHtml: "remark"
}, },
{ {
label: "收货人", label: "收货人",
prop: "receiver" prop: "receiver",
addHtml: 'receiver'
}, },
{ {
label: "收货人电话", label: "收货人电话",
...@@ -313,7 +358,8 @@ export default { ...@@ -313,7 +358,8 @@ export default {
}, },
{ {
label: "收货地址", label: "收货地址",
prop: "address" prop: "address",
addHtml: 'address'
} }
] ]
}, },
...@@ -393,7 +439,18 @@ export default { ...@@ -393,7 +439,18 @@ export default {
// async getBaseData() { // async getBaseData() {
// this.getOptionsList() // this.getOptionsList()
// }, // },
spanFilter(ele, lenght) {
if (ele) {
const text = `${ele}`
return lenght
? text?.length > lenght
? text.substring(0, lenght) + "\u2026"
: text.substring(0, lenght)
: text
} else {
return "-"
}
},
beforeSearchFn () { beforeSearchFn () {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
......
<template>
<el-tooltip :content="content || ''" :disabled="isDisabled" :placement="placement" effect="dark">
<div class="ellipsis-tooltip-content" @mouseenter="checkOverflow">
<slot>{{ content || '-' }}</slot>
</div>
</el-tooltip>
</template>
<script>
export default {
name: 'EllipsisTooltip',
props: {
content: {
type: [String, Number],
default: ''
},
placement: {
type: String,
default: 'top'
}
},
data() {
return {
isDisabled: true
}
},
methods: {
checkOverflow(e) {
const target = e.target
if (target.scrollWidth > target.clientWidth) {
this.isDisabled = false
} else {
this.isDisabled = true
}
}
}
}
</script>
<style scoped>
.ellipsis-tooltip-content {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
}
</style>
...@@ -2,16 +2,10 @@ ...@@ -2,16 +2,10 @@
<baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config" @closeDialog="handleDetailClose"> <baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config" @closeDialog="handleDetailClose">
<div class="detail-content" v-if="dialogShow"> <div class="detail-content" v-if="dialogShow">
<div class="address-info"> <div class="address-info">
<template v-if="!hideContact"> <div class="info-item" v-for="(item, index) in infoList" :key="index" :class="{ 'remark-item': item.isRemark }">
<span class="name">收货人:<span class="label">{{ detailInfo.receiver }}</span></span> <span class="label-name">{{ item.label }}:</span>
<span class="name">收货人电话:<span class="label">{{ detailInfo.phone }}</span></span> <ellipsis-tooltip class="label-value" :content="detailInfo[item.prop]" />
<span class="name">收货地址:<span class="label">{{ detailInfo.address }}</span></span> </div>
</template>
<span class="name">调出仓库:<span class="label">{{ detailInfo.callOutYqMerchantName }}</span></span>
<span class="name">调出门店:<span class="label">{{ detailInfo.callOutMerchantName }}</span></span>
<span class="name">调入仓库:<span class="label">{{ detailInfo.callInYqMerchantName }}</span></span>
<span class="name">调入门店:<span class="label">{{ detailInfo.callInMerchantName }}</span></span>
<span class="name">备注:<span class="label">{{ detailInfo.remark }}</span></span>
</div> </div>
<div class="table-class"> <div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" @refreshTable="refreshTable" :table-data="goodsList" :table-total="tableTotal"> <d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" @refreshTable="refreshTable" :table-data="goodsList" :table-total="tableTotal">
...@@ -55,8 +49,8 @@ ...@@ -55,8 +49,8 @@
<div class="record-div" v-if="detailInfo.auditDetaiList && detailInfo.auditDetaiList.length"> <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 class="record-div-d" v-for="(item, index) in detailInfo.auditDetaiList" :key="index">
<!-- <span class="dot"></span> --> <!-- <span class="dot"></span> -->
<span class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</span> <div class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</div>
<span class="span-txt-two" style="display: inline-block; width: 116px;"> <div class="span-txt-two" style="font-weight: 500;">
<!-- :class="item.status ? examineStatusClass[item.status] : ''" --> <!-- :class="item.status ? examineStatusClass[item.status] : ''" -->
<span> <span>
{{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}</span> {{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}</span>
...@@ -64,29 +58,23 @@ ...@@ -64,29 +58,23 @@
<span style="display: inline-block; margin: 0 8px;">至</span> <span style="display: inline-block; margin: 0 8px;">至</span>
<span>{{ item.rejectedStatus ? $$(rejectedForShow, [item.rejectedStatus], 'rejectedStatus') : '' }}</span> <span>{{ item.rejectedStatus ? $$(rejectedForShow, [item.rejectedStatus], 'rejectedStatus') : '' }}</span>
</span> --> </span> -->
</span> </div>
<span class="span-txt-two reviewer ellipsis">审核人: <div class="span-txt-two reviewer ellipsis">审核人:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.reviewedBy" placement="right"> <el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.reviewedBy" placement="right">
<el-button type="text"> <span>{{ item.reviewedBy }}</span>
{{ item.reviewedBy }}
</el-button>
</el-tooltip> </el-tooltip>
</span> </div>
<span class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</span> <div class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</div>
<span v-if="item.remark" class="span-txt-two">备注: <div v-if="item.remark" class="span-txt-two">备注:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="right"> <el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="right">
<el-button type="text"> <span>{{ item.remark ? (item.remark.length > 12 ? (item.remark.slice(0, 12) + '...') : item.remark) : '-' }}</span>
{{ item.remark ? (item.remark.length > 12 ? (item.remark.slice(0, 12) + '...') : item.remark) : '' }}
</el-button>
</el-tooltip> </el-tooltip>
</span> </div>
<span class="span-txt-two" v-if="[4, 6, 7, 9].includes(item.status)">驳回原因: <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="right"> <el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.rejectCause" placement="right">
<el-button type="text"> <span>{{ item.rejectCause ? (item.rejectCause.length > 12 ? (item.rejectCause.slice(0, 12) + '...') : item.rejectCause) : '' }}</span>
{{ item.rejectCause ? (item.rejectCause.length > 12 ? (item.rejectCause.slice(0, 12) + '...') : item.rejectCause) : '' }}
</el-button>
</el-tooltip> </el-tooltip>
</span> </div>
</div> </div>
</div> </div>
<div class="emptyCom" v-else> <div class="emptyCom" v-else>
...@@ -106,8 +94,12 @@ ...@@ -106,8 +94,12 @@
import { getTransferGoodsInfo, getTransferAuitInfo } from '@/api/stockManage' import { getTransferGoodsInfo, getTransferAuitInfo } from '@/api/stockManage'
import { baseConfig } from '@/main' import { baseConfig } from '@/main'
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import EllipsisTooltip from './EllipsisTooltip.vue'
export default { export default {
name: 'OrderDetailDialog', name: 'OrderDetailDialog',
components: {
EllipsisTooltip
},
props: { props: {
visible: { visible: {
type: Boolean, type: Boolean,
...@@ -123,6 +115,24 @@ export default { ...@@ -123,6 +115,24 @@ export default {
} }
}, },
computed: { computed: {
infoList() {
const list = []
if (!this.hideContact) {
list.push(
{ label: '收货人', prop: 'receiver' },
{ label: '收货人电话', prop: 'phone' },
{ label: '收货地址', prop: 'address' }
)
}
list.push(
{ label: '调出仓库', prop: 'callOutYqMerchantName' },
{ label: '调出门店', prop: 'callOutMerchantName' },
{ label: '调入仓库', prop: 'callInYqMerchantName' },
{ label: '调入门店', prop: 'callInMerchantName' },
{ label: '备注', prop: 'remark', isRemark: true }
)
return list
},
dialogShow: { dialogShow: {
get() { get() {
if (this.visible) { if (this.visible) {
...@@ -191,7 +201,7 @@ export default { ...@@ -191,7 +201,7 @@ export default {
label: '调拨数量', label: '调拨数量',
prop: 'allocateNumber', prop: 'allocateNumber',
formatter: (cellValue) => { formatter: (cellValue) => {
const condition = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.allocateNumber}卷` : `${cellValue.allocateNumber}件` const condition = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.allocateNumber}米` : `${cellValue.allocateNumber}件`
return condition return condition
} }
}, },
...@@ -200,27 +210,27 @@ export default { ...@@ -200,27 +210,27 @@ export default {
prop: 'deliveryNumber', prop: 'deliveryNumber',
formatter: cellValue => { formatter: cellValue => {
const qty = cellValue.deliveryNumber ?? '-' const qty = cellValue.deliveryNumber ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '卷' : '件' const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}` return qty === '-' ? '-' : `${qty}${unit}`
} }
}, },
{ {
label: '调入门店库存', label: '调入门店库存',
prop: 'inStockQty', prop: 'inStockQty',
width: 150, width: 120,
formatter: cellValue => { formatter: cellValue => {
const qty = cellValue.inStockQty ?? '-' const qty = cellValue.inStockQty ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '卷' : '件' const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}` return qty === '-' ? '-' : `${qty}${unit}`
} }
}, },
{ {
label: '调出门店库存', label: '调出门店库存',
prop: 'outStockQty', prop: 'outStockQty',
width: 150, width: 120,
formatter: cellValue => { formatter: cellValue => {
const qty = cellValue.outStockQty ?? '-' const qty = cellValue.outStockQty ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '卷' : '件' const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}` return qty === '-' ? '-' : `${qty}${unit}`
} }
}, },
...@@ -330,37 +340,39 @@ export default { ...@@ -330,37 +340,39 @@ export default {
.address-info { .address-info {
display: flex; display: flex;
box-sizing: border-box; box-sizing: border-box;
align-items: center;
// justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
width: 100%; width: 100%;
// height: 36px;
padding: 0 20px; padding: 0 20px;
margin-top: 10px; margin-top: 10px;
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
.name {
width: 33%; .info-item {
width: 33.33%;
display: flex; display: flex;
.label { align-items: center;
width: calc(100% - 100px); margin-bottom: 10px;
display: -webkit-box; padding-right: 15px;
-webkit-line-clamp: 2; box-sizing: border-box;
-webkit-box-orient: vertical;
.label-name {
white-space: nowrap;
min-width: fit-content;
}
.label-value {
flex: 1;
color: #333333;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap;
display: block;
} }
}
> span {
margin-bottom: 10px;
}
.label {
color: #333333;
}
.address { &.remark-item {
min-width: 500px; flex-grow: 1;
width: 33.33%;
}
} }
} }
...@@ -382,6 +394,7 @@ export default { ...@@ -382,6 +394,7 @@ export default {
margin-top: 20px; margin-top: 20px;
border-radius: 4px; border-radius: 4px;
background: #FAFAFA; background: #FAFAFA;
padding: 16px;
} }
.title { .title {
margin: 16px 0; margin: 16px 0;
...@@ -403,30 +416,37 @@ export default { ...@@ -403,30 +416,37 @@ export default {
} }
.record-div { .record-div {
margin: 16px 20px;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
letter-spacing: 0; letter-spacing: 0;
.record-div-d { .record-div-d {
margin-top: 10px; display: flex;
align-items: center;
margin-bottom: 10px;
&:last-child{
margin-bottom: 0;
}
} }
.span-txt-one { .span-txt-one {
margin-left: 14px;
width: 203px;
height: 21px; height: 21px;
font-weight: 500;
color: #333333;
} }
.reviewer { .reviewer {
display: inline-block;
width: 140px; width: 140px;
&.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
} }
.span-txt-two { .span-txt-two {
margin-left: 20px; margin-left: 40px;
} }
.greenSp { .greenSp {
...@@ -446,7 +466,6 @@ export default { ...@@ -446,7 +466,6 @@ export default {
align-items: center; align-items: center;
.emptyImg { .emptyImg {
margin-top: 20px;
width: 64px; width: 64px;
} }
.tips { .tips {
......
...@@ -95,10 +95,7 @@ export default { ...@@ -95,10 +95,7 @@ export default {
{ {
label: '出入库时间', label: '出入库时间',
prop: 'flowTime', prop: 'flowTime',
width: 150, width: 150
formatter: (cellValue) => {
return dayjs(cellValue.flowTime).format("YYYY-MM-DD HH:mm:ss")
}
}, },
{ {
label: '商品名称', label: '商品名称',
......
...@@ -2,34 +2,10 @@ ...@@ -2,34 +2,10 @@
<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 title="详细信息" :is-visible="detailVisible" class="stockMonthDailog" width="1400px" :no-cancel="true" :isShowFooter="false" @closeDialog="handleClose" @confirmDialog="handleClose">
<div class="detail-info"> <div class="address-info">
<div class="item"> <div class="info-item" v-for="(item, index) in infoList" :key="index" :class="{ 'remark-item': item.isRemark }">
收货人: <span class="label-name">{{ item.label }}:</span>
<span>{{ detailInfo.contactName }}</span> <ellipsis-tooltip class="label-value" :content="detailInfo[item.prop]" />
</div>
<div class="item">
收货人电话:
<span>{{ detailInfo.contactPhone }}</span>
</div>
<div class="item">
收货地址:
<span>{{ detailInfo.contactAddress }}</span>
</div>
<div class="item">
发货单号:
<span>{{ detailInfo.deliveryNumber }}</span>
</div>
<div class="item">
发货仓库:
<span>{{ detailInfo.shippingWarehouseName }}</span>
</div>
<div class="item">
承运公司:
<span>{{ detailInfo.deliveryCompany }}</span>
</div>
<div class="item">
发货时间:
<span>{{ detailInfo.deliveryDate }}</span>
</div> </div>
</div> </div>
<template v-for="(item, index) in detailInfo.deliveryDetailList"> <template v-for="(item, index) in detailInfo.deliveryDetailList">
...@@ -41,7 +17,7 @@ ...@@ -41,7 +17,7 @@
</div> </div>
<div class="item wid-30"> <div class="item wid-30">
发货数量: 发货数量:
<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-30">
可用库存数量: 可用库存数量:
...@@ -85,6 +61,7 @@ import { Util, deepClone } from '@/common/util' ...@@ -85,6 +61,7 @@ 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 { baseConfig } from '@/main' import { baseConfig } from '@/main'
import EllipsisTooltip from '../../components/EllipsisTooltip.vue'
export default { export default {
name: 'DeliveryDetailDialog', name: 'DeliveryDetailDialog',
data() { data() {
...@@ -103,7 +80,7 @@ export default { ...@@ -103,7 +80,7 @@ export default {
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) ? parseFloat(cellValue.increaseStockNum / cellValue.alternateUnits).toFixed(2) : parseFloat(cellValue.increaseStockNum).toFixed(2)) + (baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件') : '-'
} }
}, { }, {
label: '膜卷号', label: '膜卷号',
...@@ -120,25 +97,21 @@ export default { ...@@ -120,25 +97,21 @@ export default {
// width: '200px' // width: '200px'
}] }]
}, },
baseData: { baseData: {},
infoList: [
}, { label: '收货人', prop: 'contactName' },
merchantDialogVisible: false, { label: '收货人电话', prop: 'contactPhone' },
tableDataCardList: [], { label: '收货地址', prop: 'contactAddress' },
innerVisible: false, { label: '发货单号', prop: 'deliveryNumber' },
innerParams: { { label: '发货仓库', prop: 'shippingWarehouseName' },
tableOption: false, { label: '承运公司', prop: 'deliveryCompany' },
tableColumns: [ { label: '发货时间', prop: 'deliveryDate' }
{ ]
label: '卡号',
prop: 'cardNum'
// width:630
}
]
}
} }
}, },
components: {
EllipsisTooltip
},
props: { props: {
detailVisible: { detailVisible: {
type: Boolean, type: Boolean,
...@@ -203,7 +176,6 @@ export default { ...@@ -203,7 +176,6 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.detail-info { .detail-info {
display: flex; display: flex;
align-items: center;
color: #666666ff; color: #666666ff;
font-size: 14px; font-size: 14px;
margin-bottom: 16px; margin-bottom: 16px;
...@@ -229,6 +201,44 @@ export default { ...@@ -229,6 +201,44 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
} }
} }
.address-info {
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;
.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;
}
&.remark-item {
flex-grow: 1;
width: 33.33%;
}
}
}
.border-b { .border-b {
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
margin-bottom: 12px; margin-bottom: 12px;
......
...@@ -20,13 +20,40 @@ ...@@ -20,13 +20,40 @@
</span> </span>
</d2-table-header> </d2-table-header>
<d2-table ref="purchasementReviewTable" :search-form="tableSearchForm" :table-params="tableParams" :table-data="tableData" :selectable-fn="selectableFn" :get-list-api="getListApi" :before-search-fn="beforeSearchFn"> <d2-table ref="purchasementReviewTable" :search-form="tableSearchForm" :table-params="tableParams" :table-data="tableData" :selectable-fn="selectableFn" :get-list-api="getListApi" :before-search-fn="beforeSearchFn">
<template slot="contactName" slot-scope="scope">
<div v-if="scope.scope.contactName">
<el-popover v-if="scope.scope.contactName.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.contactName) }}
</div>
<div slot="reference">
{{ spanFilter(scope.scope.contactName, 12) }}
</div>
</el-popover>
<div v-else>{{ scope.scope.contactName }}</div>
</div>
<span v-else>-</span>
</template>
<template slot="contactAddress" slot-scope="scope">
<div v-if="scope.scope.contactAddress">
<el-popover v-if="scope.scope.contactAddress.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.contactAddress) }}
</div>
<div slot="reference">
{{ spanFilter(scope.scope.contactAddress, 12) }}
</div>
</el-popover>
<div v-else>{{ scope.scope.contactAddress }}</div>
</div>
<span v-else>-</span>
</template>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9081202']" /> <auth-button :data="scope.scope" :show-btn-ids="['9081202']" />
</span> </span>
<auth-button :data="scope.scope" :show-btn-ids="['9081203']" /> <auth-button :data="scope.scope" :show-btn-ids="['9081203']" />
</div> </div>
</d2-table> </d2-table>
</div> </div>
<!-- 查看 --> <!-- 查看 -->
...@@ -153,7 +180,9 @@ export default { ...@@ -153,7 +180,9 @@ export default {
}, },
{ {
label: '收货人', label: '收货人',
prop: 'contactName' prop: 'contactName',
width: 120,
addHtml: 'contactName'
}, },
{ {
label: '收货人电话', label: '收货人电话',
...@@ -161,7 +190,9 @@ export default { ...@@ -161,7 +190,9 @@ export default {
}, },
{ {
label: '收货地址', label: '收货地址',
prop: 'contactAddress' prop: 'contactAddress',
width: 120,
addHtml: 'contactAddress'
} }
] ]
}, },
...@@ -209,6 +240,18 @@ export default { ...@@ -209,6 +240,18 @@ export default {
} }
}) })
}, },
spanFilter(ele, lenght) {
if (ele) {
const text = `${ele}`
return lenght
? text?.length > lenght
? text.substring(0, lenght) + "\u2026"
: text.substring(0, lenght)
: text
} else {
return "-"
}
},
selectableFn(row, index) { selectableFn(row, index) {
return row.status == 1 && row.sendOutMerchantId != null return row.status == 1 && row.sendOutMerchantId != null
}, },
......
...@@ -3,21 +3,10 @@ ...@@ -3,21 +3,10 @@
<baseDialog :is-show.sync="dialogShow" :dialog-config="rejectConfig.config" @handleClick="handleRejectConfirm" @closeDialog="handleRejectClose"> <baseDialog :is-show.sync="dialogShow" :dialog-config="rejectConfig.config" @handleClick="handleRejectConfirm" @closeDialog="handleRejectClose">
<div class="reject-dialog" style="margin: 0;" v-if="dialogShow"> <div class="reject-dialog" style="margin: 0;" v-if="dialogShow">
<div class="address-info"> <div class="address-info">
<span class="name">调出仓库: <div class="info-item" v-for="(item, index) in infoList" :key="index" :class="{ 'remark-item': item.isRemark }">
<span class="label">{{ detailInfo.callOutYqMerchantName }}</span> <span class="label-name">{{ item.label }}:</span>
</span> <ellipsis-tooltip class="label-value" :content="detailInfo[item.prop]" />
<span class="name">调出门店: </div>
<span class="label">{{ detailInfo.callOutMerchantName }}</span>
</span>
<span class="name">调入仓库:
<span class="label">{{ detailInfo.callInYqMerchantName }}</span>
</span>
<span class="name">调入门店:
<span class="label">{{ detailInfo.callInMerchantName }}</span>
</span>
<span class="name">备注:
<span class="label">{{ detailInfo.remark }}</span>
</span>
</div> </div>
<div class="reject-page edit-tmpl"> <div class="reject-page edit-tmpl">
<div class="title">商品信息</div> <div class="title">商品信息</div>
...@@ -45,8 +34,8 @@ ...@@ -45,8 +34,8 @@
<div class="record-div" v-if="detailInfo.auditDetaiList && detailInfo.auditDetaiList.length"> <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 class="record-div-d" v-for="(item, index) in detailInfo.auditDetaiList" :key="index">
<!-- <span class="dot"></span> --> <!-- <span class="dot"></span> -->
<span class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</span> <div class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</div>
<span class="span-txt-two" style="display: inline-block; width: 116px;"> <div class="span-txt-two" style="font-weight: 500;">
<!-- :class="item.status ? examineStatusClass[item.status] : ''" --> <!-- :class="item.status ? examineStatusClass[item.status] : ''" -->
<span> <span>
{{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}</span> {{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}</span>
...@@ -54,29 +43,23 @@ ...@@ -54,29 +43,23 @@
<span style="display: inline-block; margin: 0 8px;">至</span> <span style="display: inline-block; margin: 0 8px;">至</span>
<span>{{ item.rejectedStatus ? $$(rejectedForShow, [item.rejectedStatus], 'rejectedStatus') : '' }}</span> <span>{{ item.rejectedStatus ? $$(rejectedForShow, [item.rejectedStatus], 'rejectedStatus') : '' }}</span>
</span> --> </span> -->
</span> </div>
<span class="span-txt-two reviewer ellipsis">审核人: <div class="span-txt-two reviewer ellipsis">审核人:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.reviewedBy" placement="bottom"> <el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.reviewedBy" placement="bottom">
<el-button type="text"> <span>{{ item.reviewedBy }}</span>
{{ item.reviewedBy }}
</el-button>
</el-tooltip> </el-tooltip>
</span> </div>
<span class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</span> <div class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</div>
<span v-if="item.remark" class="span-txt-two">备注: <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"> <el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="bottom">
<el-button type="text"> <span>{{ item.remark ? (item.remark.length > 5 ? (item.remark.slice(0, 5) + '...') : item.remark) : '' }}</span>
{{ item.remark ? (item.remark.length > 5 ? (item.remark.slice(0, 5) + '...') : item.remark) : '' }}
</el-button>
</el-tooltip> </el-tooltip>
</span> </div>
<span class="span-txt-two" v-if="[4, 6, 7, 9].includes(item.status)">驳回原因: <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"> <el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.rejectCause" placement="bottom">
<el-button type="text"> <span>{{ item.rejectCause ? (item.rejectCause.length > 5 ? (item.rejectCause.slice(0, 5) + '...') : item.rejectCause) : '' }}</span>
{{ item.rejectCause ? (item.rejectCause.length > 5 ? (item.rejectCause.slice(0, 5) + '...') : item.rejectCause) : '' }}
</el-button>
</el-tooltip> </el-tooltip>
</span> </div>
</div> </div>
</div> </div>
<div class="emptyCom" v-else> <div class="emptyCom" v-else>
...@@ -93,6 +76,7 @@ ...@@ -93,6 +76,7 @@
import { getTransferGoodsInfo, getTransferAuitInfo, deliveryReject } from '@/api/stockManage' import { getTransferGoodsInfo, getTransferAuitInfo, deliveryReject } from '@/api/stockManage'
import { deepClone, Util } from '@/common/util' import { deepClone, Util } from '@/common/util'
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import EllipsisTooltip from '../../components/EllipsisTooltip.vue'
export default { export default {
name: "RejectDialog", name: "RejectDialog",
props: { props: {
...@@ -104,6 +88,9 @@ export default { ...@@ -104,6 +88,9 @@ export default {
type: Object type: Object
} }
}, },
components: {
EllipsisTooltip
},
data() { data() {
return { return {
hasPage: false, hasPage: false,
...@@ -187,7 +174,7 @@ export default { ...@@ -187,7 +174,7 @@ export default {
prop: 'allocateNumber', prop: 'allocateNumber',
formatter: (cellValue) => { formatter: (cellValue) => {
const qty = cellValue.allocateNumber ?? '-' const qty = cellValue.allocateNumber ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '卷' : '件' const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}` return qty === '-' ? '-' : `${qty}${unit}`
} }
}, },
...@@ -196,7 +183,7 @@ export default { ...@@ -196,7 +183,7 @@ export default {
prop: 'inStockQty', prop: 'inStockQty',
formatter: (cellValue) => { formatter: (cellValue) => {
const qty = cellValue.inStockQty ?? '-' const qty = cellValue.inStockQty ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '卷' : '件' const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}` return qty === '-' ? '-' : `${qty}${unit}`
} }
}, },
...@@ -205,7 +192,7 @@ export default { ...@@ -205,7 +192,7 @@ export default {
prop: 'outStockQty', prop: 'outStockQty',
formatter: (cellValue) => { formatter: (cellValue) => {
const qty = cellValue.outStockQty ?? '-' const qty = cellValue.outStockQty ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '卷' : '件' const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}` return qty === '-' ? '-' : `${qty}${unit}`
} }
}, },
...@@ -215,6 +202,13 @@ export default { ...@@ -215,6 +202,13 @@ export default {
} }
] ]
}, },
infoList: [
{ label: '调出仓库', prop: 'callOutYqMerchantName' },
{ label: '调出门店', prop: 'callOutMerchantName' },
{ label: '调入仓库', prop: 'callInYqMerchantName' },
{ label: '调入门店', prop: 'callInMerchantName' },
{ label: '备注', prop: 'remark', isRemark: true }
],
rejectRules: { rejectRules: {
rejectNode: [ rejectNode: [
{ required: true, message: "请选择驳回节点", trigger: "change" } { required: true, message: "请选择驳回节点", trigger: "change" }
...@@ -290,29 +284,40 @@ export default { ...@@ -290,29 +284,40 @@ export default {
.address-info { .address-info {
display: flex; display: flex;
box-sizing: border-box; box-sizing: border-box;
align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
width: 100%; width: 100%;
padding: 0 20px;
margin-top: 10px; margin-top: 10px;
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
> span { .info-item {
margin-bottom: 10px; width: 33.33%;
width: 33%;
display: flex; display: flex;
} align-items: center;
margin-bottom: 10px;
padding-right: 15px;
box-sizing: border-box;
.label { .label-name {
color: #333333; white-space: nowrap;
width: calc(100% - 80px); min-width: fit-content;
display: -webkit-box; }
-webkit-line-clamp: 2;
-webkit-box-orient: vertical; .label-value {
overflow: hidden; flex: 1;
text-overflow: ellipsis; color: #333333;
} overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}
&.remark-item {
flex-grow: 1;
width: 33.33%;
}
}
} }
.reject-page { .reject-page {
margin-bottom: 20px; margin-bottom: 20px;
...@@ -334,6 +339,7 @@ export default { ...@@ -334,6 +339,7 @@ export default {
margin-top: 20px; margin-top: 20px;
border-radius: 4px; border-radius: 4px;
background: #FAFAFA; background: #FAFAFA;
padding: 16px;
} }
.title { .title {
margin: 16px 0; margin: 16px 0;
...@@ -355,30 +361,37 @@ export default { ...@@ -355,30 +361,37 @@ export default {
} }
.record-div { .record-div {
margin: 16px 20px;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
letter-spacing: 0; letter-spacing: 0;
.record-div-d { .record-div-d {
margin-top: 10px; display: flex;
align-items: center;
margin-bottom: 10px;
&:last-child{
margin-bottom: 0;
}
} }
.span-txt-one { .span-txt-one {
margin-left: 14px;
width: 203px;
height: 21px; height: 21px;
font-weight: 500;
color: #333333;
} }
.reviewer { .reviewer {
display: inline-block;
width: 140px; width: 140px;
&.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
} }
.span-txt-two { .span-txt-two {
margin-left: 20px; margin-left: 40px;
} }
.greenSp { .greenSp {
...@@ -398,7 +411,6 @@ export default { ...@@ -398,7 +411,6 @@ export default {
align-items: center; align-items: center;
.emptyImg { .emptyImg {
margin-top: 20px;
width: 64px; width: 64px;
} }
.tips { .tips {
......
...@@ -3,21 +3,10 @@ ...@@ -3,21 +3,10 @@
<baseDialog :is-show.sync="dialogShow" :dialog-config="dialogConfig.config" @handleClick="submit" @closeDialog="handleShipmentClose(false)"> <baseDialog :is-show.sync="dialogShow" :dialog-config="dialogConfig.config" @handleClick="submit" @closeDialog="handleShipmentClose(false)">
<div class="edit-order-dialog" v-if="dialogShow"> <div class="edit-order-dialog" v-if="dialogShow">
<div class="address-info"> <div class="address-info">
<span class="name">调出仓库: <div class="info-item" v-for="(item, index) in infoList" :key="index" :class="{ 'remark-item': item.isRemark }">
<span class="label">{{ paramsObj.callOutYqMerchantName }}</span> <span class="label-name">{{ item.label }}:</span>
</span> <ellipsis-tooltip class="label-value" :content="paramsObj[item.prop]" />
<span class="name">调出门店: </div>
<span class="label">{{ paramsObj.callOutMerchantName }}</span>
</span>
<span class="name">调入仓库:
<span class="label">{{ paramsObj.callInYqMerchantName }}</span>
</span>
<span class="name">调入门店:
<span class="label">{{ paramsObj.callInMerchantName }}</span>
</span>
<span class="name">备注:
<span class="label">{{ paramsObj.remark }}</span>
</span>
</div> </div>
<div class="table-class"> <div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage" :table-data="tableList"> <d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage" :table-data="tableList">
...@@ -54,6 +43,7 @@ import { batchDelicery } from "@/api/purchaseShopping.js" ...@@ -54,6 +43,7 @@ import { batchDelicery } from "@/api/purchaseShopping.js"
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import { limitPrice } from "@/common/format" import { limitPrice } from "@/common/format"
import { Util } from "@/common/util" import { Util } from "@/common/util"
import EllipsisTooltip from '../../components/EllipsisTooltip.vue'
import _ from "lodash" import _ from "lodash"
export default { export default {
name: "shipmentDialog", name: "shipmentDialog",
...@@ -75,6 +65,9 @@ export default { ...@@ -75,6 +65,9 @@ export default {
default: () => { } default: () => { }
} }
}, },
components: {
EllipsisTooltip
},
computed: { computed: {
dialogShow: { dialogShow: {
get() { get() {
...@@ -140,7 +133,7 @@ export default { ...@@ -140,7 +133,7 @@ export default {
prop: "allocateNumber", prop: "allocateNumber",
formatter: (cellValue) => { formatter: (cellValue) => {
const qty = cellValue.allocateNumber ?? '-' const qty = cellValue.allocateNumber ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '卷' : '件' const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}` return qty === '-' ? '-' : `${qty}${unit}`
} }
}, },
...@@ -155,7 +148,7 @@ export default { ...@@ -155,7 +148,7 @@ export default {
prop: 'inStockQty', prop: 'inStockQty',
formatter: (cellValue) => { formatter: (cellValue) => {
const qty = cellValue.inStockQty ?? '-' const qty = cellValue.inStockQty ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '卷' : '件' const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}` return qty === '-' ? '-' : `${qty}${unit}`
} }
}, },
...@@ -164,7 +157,7 @@ export default { ...@@ -164,7 +157,7 @@ export default {
prop: 'outStockQty', prop: 'outStockQty',
formatter: (cellValue) => { formatter: (cellValue) => {
const qty = cellValue.outStockQty ?? '-' const qty = cellValue.outStockQty ?? '-'
const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '卷' : '件' const unit = baseConfig.membraneTypeList.includes(cellValue.goodsType) ? '米' : '件'
return qty === '-' ? '-' : `${qty}${unit}` return qty === '-' ? '-' : `${qty}${unit}`
} }
}, },
...@@ -185,7 +178,14 @@ export default { ...@@ -185,7 +178,14 @@ export default {
{ required: true, message: "请选择发货时间", trigger: "blur" } { required: true, message: "请选择发货时间", trigger: "blur" }
] ]
}, },
shippingWarehouseList: [] shippingWarehouseList: [],
infoList: [
{ label: '调出仓库', prop: 'callOutYqMerchantName' },
{ label: '调出门店', prop: 'callOutMerchantName' },
{ label: '调入仓库', prop: 'callInYqMerchantName' },
{ label: '调入门店', prop: 'callInMerchantName' },
{ label: '备注', prop: 'remark', isRemark: true }
],
} }
}, },
filters: { filters: {
...@@ -198,11 +198,8 @@ export default { ...@@ -198,11 +198,8 @@ export default {
} }
}, },
mounted() { mounted() {
if (this.paramsObj.factoryType) { // 初始化发货数量输入数据列表
this.tableParams.tableColumns = this.tableParams.tableColumns.filter( this.nowPurNumList = this.tableList?.map(() => '')
(item) => item.prop != "goodsTotalPrice"
)
}
}, },
methods: { methods: {
handleShipmentClose(isRefresh = false) { handleShipmentClose(isRefresh = false) {
...@@ -221,7 +218,6 @@ export default { ...@@ -221,7 +218,6 @@ export default {
const _index = scope.index const _index = scope.index
const _oldVal = this.oldPurNumList[_index] || 0 const _oldVal = this.oldPurNumList[_index] || 0
const _maxVal = _row.allocateNumber - _row.deliveryNumber const _maxVal = _row.allocateNumber - _row.deliveryNumber
console.log(_row)
this.nowPurNumList[_index] = this.nowPurNumList[_index] =
limitPrice(val, _oldVal, 9999, 0, 0, _maxVal) || (val ? _maxVal : "") limitPrice(val, _oldVal, 9999, 0, 0, _maxVal) || (val ? _maxVal : "")
this.oldPurNumList = JSON.parse(JSON.stringify(this.nowPurNumList)) this.oldPurNumList = JSON.parse(JSON.stringify(this.nowPurNumList))
...@@ -232,8 +228,8 @@ export default { ...@@ -232,8 +228,8 @@ export default {
this.$refs["delivery-dialog-form"].validate((valid) => { this.$refs["delivery-dialog-form"].validate((valid) => {
if (valid) { if (valid) {
// 验证本次发货数量 // 验证本次发货数量
if (this.nowPurNumList.every((item) => item == 0 || !item)) { if (this.nowPurNumList.some((item) => !item || item <= 0)) {
this.notice.errorTips("发货数量不能全为0") this.notice.errorTips("发货数量必须全部填写且不能为0")
return true return true
} }
var params = { var params = {
...@@ -242,7 +238,7 @@ export default { ...@@ -242,7 +238,7 @@ export default {
this.dialogData.deliveryDate, this.dialogData.deliveryDate,
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss"
), ),
// orderCode: this.paramsObj.orderCode, orderCode: this.paramsObj.allocateCode,
deliveryDetailList: [] deliveryDetailList: []
} }
for (let idx = 0; idx < this.tableList.length; idx++) { for (let idx = 0; idx < this.tableList.length; idx++) {
...@@ -254,8 +250,6 @@ export default { ...@@ -254,8 +250,6 @@ export default {
}) })
} }
} }
console.log(params)
return
batchDelicery({ dataString: JSON.stringify(params) }) batchDelicery({ dataString: JSON.stringify(params) })
.then((res) => { .then((res) => {
this.handleShipmentClose(true) this.handleShipmentClose(true)
...@@ -306,32 +300,40 @@ export default { ...@@ -306,32 +300,40 @@ export default {
.address-info { .address-info {
display: flex; display: flex;
box-sizing: border-box; box-sizing: border-box;
align-items: center;
justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
width: 100%; width: 100%;
// height: 36px; padding: 0 20px;
// padding: 0 20px;
margin-top: 10px; margin-top: 10px;
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
> span { .info-item {
margin-right: 20px; width: 33.33%;
margin-bottom: 10px;
display: flex; display: flex;
} align-items: center;
margin-bottom: 10px;
padding-right: 15px;
box-sizing: border-box;
.label { .label-name {
width: calc(100% - 80px); white-space: nowrap;
color: #333333; min-width: fit-content;
display: -webkit-box; }
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.label-value {
flex: 1;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}
&.remark-item {
flex-grow: 1;
width: 33.33%;
}
}
} }
.form-content { .form-content {
......
...@@ -24,14 +24,42 @@ ...@@ -24,14 +24,42 @@
</span> </span>
</d2-table-header> </d2-table-header>
<d2-table ref="transferShipmentTable" :search-form="tableSearchForm" :table-params="tableParams" :table-data="tableData" :selectable-fn="selectableFn" @selectionTable="handleSelectionChange" :get-list-api="getListApi" :before-search-fn="beforeSearchFn"> <d2-table ref="transferShipmentTable" :search-form="tableSearchForm" :table-params="tableParams" :table-data="tableData" :selectable-fn="selectableFn" @selectionTable="handleSelectionChange" :get-list-api="getListApi" :before-search-fn="beforeSearchFn">
<template slot="receiver" slot-scope="scope">
<div v-if="scope.scope.receiver">
<el-popover v-if="scope.scope.receiver.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.receiver) }}
</div>
<div slot="reference">
{{ spanFilter(scope.scope.receiver, 12) }}
</div>
</el-popover>
<div v-else>{{ scope.scope.receiver }}</div>
</div>
<span v-else>-</span>
</template>
<template slot="address" slot-scope="scope">
<div v-if="scope.scope.address">
<el-popover v-if="scope.scope.address.length > 12" placement="top" effect="dark" width="300" trigger="hover">
<div class="merchant-name-box">
{{ spanFilter(scope.scope.address) }}
</div>
<div slot="reference">
{{ spanFilter(scope.scope.address, 12) }}
</div>
</el-popover>
<div v-else>{{ scope.scope.address }}</div>
</div>
<span v-else>-</span>
</template>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9081103']" /> <auth-button :data="scope.scope" :show-btn-ids="['9081103']" />
</span> </span>
<span style="margin-right: 10px" v-if="scope.scope.deliveryStatus != 1"> <span style="margin-right: 10px" v-if="scope.scope.deliveryStatus != 2">
<auth-button :data="scope.scope" :show-btn-ids="['9081104']" /> <auth-button :data="scope.scope" :show-btn-ids="['9081104']" />
</span> </span>
<auth-button v-if="scope.scope.billStatus != 7" :data="scope.scope" :show-btn-ids="['9081105']" /> <auth-button v-if="scope.scope.billStatus != 7 && scope.scope.deliveryStatus == 1" :data="scope.scope" :show-btn-ids="['9081105']" />
</div> </div>
</d2-table> </d2-table>
</div> </div>
...@@ -42,8 +70,7 @@ ...@@ -42,8 +70,7 @@
<reject-dialog v-if="rejectVisible" :visible.sync="rejectVisible" :rejectData="rejectData" @rejectClose="handleRejectClose"></reject-dialog> <reject-dialog v-if="rejectVisible" :visible.sync="rejectVisible" :rejectData="rejectData" @rejectClose="handleRejectClose"></reject-dialog>
<transferDetailDialog :visible.sync="transferDetailVisible" <transferDetailDialog :visible.sync="transferDetailVisible"
v-if="transferDetailVisible" v-if="transferDetailVisible"
:params-obj="transferObj" :params-obj="transferObj"></transferDetailDialog>
:show-film-roll-no="paramsObj.purchaseType != 1"></transferDetailDialog>
</d2-container> </d2-container>
</template> </template>
...@@ -154,7 +181,7 @@ export default { ...@@ -154,7 +181,7 @@ export default {
label: '调拨数量', label: '调拨数量',
prop: 'allocateNumber', prop: 'allocateNumber',
formatter: (cellValue) => { formatter: (cellValue) => {
return !((cellValue.allocateNumber ?? '') === '') ? `${cellValue.allocateNumber}${cellValue.conversionValue ? '卷': '件'}` : '-' return !((cellValue.allocateNumber ?? '') === '') ? `${cellValue.allocateNumber}${cellValue.conversionValue ? '米': '件'}` : '-'
} }
}, },
{ {
...@@ -179,7 +206,9 @@ export default { ...@@ -179,7 +206,9 @@ export default {
}, },
{ {
label: '收货人', label: '收货人',
prop: 'receiver' prop: 'receiver',
width: 120,
addHtml: 'receiver'
}, },
{ {
label: '收货人电话', label: '收货人电话',
...@@ -188,7 +217,9 @@ export default { ...@@ -188,7 +217,9 @@ export default {
}, },
{ {
label: '收货地址', label: '收货地址',
prop: 'address' prop: 'address',
width: 120,
addHtml: 'address'
}, },
{ {
label: '发货状态', label: '发货状态',
...@@ -198,9 +229,9 @@ export default { ...@@ -198,9 +229,9 @@ export default {
}, },
className: (cellValue) => { className: (cellValue) => {
return { return {
0: 'ashSpot', 1: 'ashSpot',
1: 'greenSpot', 2: 'greenSpot',
2: 'yellowSpot' 3: 'yellowSpot'
}[cellValue.deliveryStatus] }[cellValue.deliveryStatus]
} }
}, },
...@@ -228,13 +259,13 @@ export default { ...@@ -228,13 +259,13 @@ export default {
// 基本数据 // 基本数据
baseData: { baseData: {
deliveryStatusOptions: [{ deliveryStatusOptions: [{
confId: '0', confId: '1',
confLabel: '未发货' confLabel: '未发货'
}, { }, {
confId: '2', confId: '3',
confLabel: '部分发货' confLabel: '部分发货'
}, { }, {
confId: '1', confId: '2',
confLabel: '全部发货' confLabel: '全部发货'
}], }],
billStatusOptions: [{ billStatusOptions: [{
...@@ -287,11 +318,23 @@ export default { ...@@ -287,11 +318,23 @@ export default {
} }
}) })
}, },
spanFilter(ele, lenght) {
if (ele) {
const text = `${ele}`
return lenght
? text?.length > lenght
? text.substring(0, lenght) + "\u2026"
: text.substring(0, lenght)
: text
} else {
return "-"
}
},
selectableFn(row, index) { selectableFn(row, index) {
if (this.selectedList.length) { if (this.selectedList.length) {
return this.selectedList?.some(val => val.allocateCode == row.allocateCode) return this.selectedList?.some(val => val.allocateCode == row.allocateCode) && (row.deliveryStatus == 1 || row.deliveryStatus == 3)
} else { } else {
return row.deliveryStatus == 0 || row.deliveryStatus == 2 return row.deliveryStatus == 1 || row.deliveryStatus == 3
} }
}, },
handleSelectionChange(selection) { handleSelectionChange(selection) {
...@@ -334,22 +377,15 @@ export default { ...@@ -334,22 +377,15 @@ export default {
this.notice.errorTips('请选择要发货的订单') this.notice.errorTips('请选择要发货的订单')
return return
} }
const params = { const target = this.selectedList[0]
// 是否为工厂发货 0-否 1-是 this.shipmentTableList = deepClone(this.selectedList)
factoryOperation: 0, this.shipmentDialogData.callOutYqMerchantName = target.callOutYqMerchantName
deliveryDetailList: this.selectedList.map(item => { return { id: item.id } }) this.shipmentDialogData.callOutMerchantName = target.callOutMerchantName
} this.shipmentDialogData.callInYqMerchantName = target.callInYqMerchantName
deliveryBatchCheck(params).then(res => { this.shipmentDialogData.callInMerchantName = target.callInMerchantName
if (res) { this.shipmentDialogData.remark = target.remark
const target = this.selectedList[0] this.shipmentDialogData.allocateCode = target.allocateCode
this.shipmentTableList = deepClone(this.selectedList) this.shipmentVisible = true
this.shipmentDialogData.callOutYqMerchantName = target.callOutYqMerchantName
this.shipmentDialogData.callOutMerchantName = target.callOutMerchantName
this.shipmentDialogData.callInYqMerchantName = target.callInYqMerchantName
this.shipmentDialogData.callInMerchantName = target.callInMerchantName
this.shipmentVisible = true
}
})
}, },
shipmentDialogClose(obj) { shipmentDialogClose(obj) {
this.shipmentVisible = false this.shipmentVisible = false
...@@ -372,6 +408,7 @@ export default { ...@@ -372,6 +408,7 @@ export default {
this.shipmentDialogData.callInYqMerchantName = row.callInYqMerchantName this.shipmentDialogData.callInYqMerchantName = row.callInYqMerchantName
this.shipmentDialogData.callInMerchantName = row.callInMerchantName this.shipmentDialogData.callInMerchantName = row.callInMerchantName
this.shipmentDialogData.remark = row.remark this.shipmentDialogData.remark = row.remark
this.shipmentDialogData.allocateCode = row.allocateCode
this.shipmentVisible = true this.shipmentVisible = true
}, },
// 驳回 // 驳回
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!