Commit d323f776 by zhangxw

调拨管理需求开发联调

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