Commit 1bb78a76 by wangzhihui

```

feat(stockManage): 添加调出门店库存列并修复表格列插入逻辑

- 在transferDetailDialog.vue中修复了表格列插入方式,使用splice替代push以正确插入到倒数第二位
- 在handleReject.vue和handleReview.vue中添加了调出门店库存列的显示功能
- 为非操作员审核类型动态插入调出门店库存列
- 优化了代码格式,确保所有行长度不超过100个字符
- 调整了表格列配置以支持新的库存信息展示
```
1 parent ef513b6c
...@@ -357,7 +357,7 @@ export default { ...@@ -357,7 +357,7 @@ export default {
}, },
mounted() { mounted() {
if (this.isStore) { if (this.isStore) {
this.tableParams.tableColumns.push(this.formItem) this.tableParams.tableColumns.splice(this.tableParams.tableColumns.length - 1, 0, this.formItem)
} }
}, },
methods: { methods: {
......
...@@ -27,45 +27,27 @@ ...@@ -27,45 +27,27 @@
</div> </div>
<div class="table-content"> <div class="table-content">
<d2-table <d2-table ref="recordTable" :table-data="tableData" :table-params="tableParams" :table-total="tableTotal"
ref="recordTable" @refreshTable="refreshTable">
:table-data="tableData"
:table-params="tableParams"
:table-total="tableTotal"
@refreshTable="refreshTable"
>
<template #actionSlot="scope"> <template #actionSlot="scope">
<el-button <el-button type="text" @click="handleInventoryDetail(scope.scope)">
type="text"
@click="handleInventoryDetail(scope.scope)"
>
库存明细 库存明细
</el-button> </el-button>
</template> </template>
<template #filmRollNo="scope"> <template #filmRollNo="scope">
<div <div v-if="scope.scope.filmRollList &&
v-if="
scope.scope.filmRollList &&
scope.scope.filmRollList.length == 1 scope.scope.filmRollList.length == 1
" ">
>
{{ scope.scope.filmRollList[0] }} {{ scope.scope.filmRollList[0] }}
</div> </div>
<div <div v-else-if="scope.scope.filmRollList &&
v-else-if="
scope.scope.filmRollList &&
scope.scope.filmRollList.length > 1 scope.scope.filmRollList.length > 1
" ">
>
<el-popover placement="top" trigger="hover" width="200"> <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>
<div <div v-for="(subItem, subIndex) in scope.scope
v-for="(subItem, subIndex) in scope.scope .filmRollList" :key="subIndex" class="merchant-item">
.filmRollList"
:key="subIndex"
class="merchant-item"
>
{{ subItem }} {{ subItem }}
</div> </div>
</div> </div>
...@@ -79,32 +61,23 @@ ...@@ -79,32 +61,23 @@
</el-popover> </el-popover>
</div> </div>
<div v-else> <div v-else>
<span <span style="
style="
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
" ">
>
{{ "-" }} {{ "-" }}
</span> </span>
</div> </div>
</template> </template>
<template #carName="scope"> <template #carName="scope">
<el-tooltip <el-tooltip v-if="scope.scope.suitCarTypeList &&
v-if="
scope.scope.suitCarTypeList &&
scope.scope.suitCarTypeList.length scope.scope.suitCarTypeList.length
" " placement="top">
placement="top"
>
<template #content> <template #content>
<div class="car-type-list"> <div class="car-type-list">
<div <div v-for="(item, index) in scope.scope
v-for="(item, index) in scope.scope .suitCarTypeList" :key="index">
.suitCarTypeList"
:key="index"
>
{{ {{
`${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}` `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}`
}} }}
...@@ -119,70 +92,34 @@ ...@@ -119,70 +92,34 @@
</div> </div>
<div class="audit-section"> <div class="audit-section">
<el-form <el-form ref="rejectForm" class="audit-form" label-width="100px" :model="rejectForm" :rules="rules">
ref="rejectForm"
class="audit-form"
label-width="100px"
:model="rejectForm"
:rules="rules"
>
<el-form-item label="驳回节点:" prop="rejectNode"> <el-form-item label="驳回节点:" prop="rejectNode">
<el-select <el-select v-model="rejectForm.rejectNode" placeholder="请选择驳回节点" style="width: 100%">
v-model="rejectForm.rejectNode" <el-option v-for="item in rejectNodeOptions" :key="item.value" :label="item.label"
placeholder="请选择驳回节点" :value="item.value">
style="width: 100%"
>
<el-option
v-for="item in rejectNodeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="驳回原因:" prop="rejectCause"> <el-form-item label="驳回原因:" prop="rejectCause">
<el-input <el-input v-model="rejectForm.rejectCause" maxlength="200" placeholder="请输入驳回原因" :rows="4"
v-model="rejectForm.rejectCause" show-word-limit type="textarea">
maxlength="200"
placeholder="请输入驳回原因"
:rows="4"
show-word-limit
type="textarea"
>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="audit-history examine-record"> <div class="audit-history examine-record">
<div class="title">审核记录</div> <div class="title">审核记录</div>
<div <div v-if="auditDetaiList && auditDetaiList.length" class="up-down" @click="handleUpDown">
v-if="auditDetaiList && auditDetaiList.length" <el-button :icon="isVisible
class="up-down"
@click="handleUpDown"
>
<el-button
:icon="
isVisible
? 'el-icon-arrow-up' ? 'el-icon-arrow-up'
: 'el-icon-arrow-down' : 'el-icon-arrow-down'
" " size="mini" type="text" />
size="mini"
type="text"
/>
{{ isVisible ? "收起" : "展开" }} {{ isVisible ? "收起" : "展开" }}
</div> </div>
<div> <div>
<div <div v-if="auditDetaiList && auditDetaiList.length" class="record-div">
v-if="auditDetaiList && auditDetaiList.length" <div v-for="(item, index) in auditDetaiList" :key="index" class="record-div-d">
class="record-div"
>
<div
v-for="(item, index) in auditDetaiList"
:key="index"
class="record-div-d"
>
<span class="dot"></span> <span class="dot"></span>
<span class="span-txt-one"> <span class="span-txt-one">
{{ {{
...@@ -196,13 +133,10 @@ ...@@ -196,13 +133,10 @@
}} }}
</span> </span>
<span class="span-txt-two"> <span class="span-txt-two">
<span <span :class="item.status
:class="
item.status
? examineStatusClass[item.status] ? examineStatusClass[item.status]
: '' : ''
" ">
>
{{ {{
item.status item.status
? $$( ? $$(
...@@ -214,13 +148,10 @@ ...@@ -214,13 +148,10 @@
}} }}
</span> </span>
<span v-if="item.rejectedStatus"> <span v-if="item.rejectedStatus">
<span <span style="
style="
display: inline-block; display: inline-block;
margin: 0 8px; margin: 0 8px;
" ">至</span>
>至</span
>
<span> <span>
{{ {{
item.rejectedStatus item.rejectedStatus
...@@ -236,13 +167,8 @@ ...@@ -236,13 +167,8 @@
</span> </span>
<span class="span-txt-two reviewer ellipsis"> <span class="span-txt-two reviewer ellipsis">
审核人: 审核人:
<el-tooltip <el-tooltip class="item" :content="item.reviewedBy" effect="dark" placement="bottom"
class="item" popper-class="remark-popper-class">
:content="item.reviewedBy"
effect="dark"
placement="bottom"
popper-class="remark-popper-class"
>
<el-button type="text"> <el-button type="text">
{{ item.reviewedBy }} {{ item.reviewedBy }}
</el-button> </el-button>
...@@ -253,13 +179,8 @@ ...@@ -253,13 +179,8 @@
</span> </span>
<span v-if="item.remark" class="span-txt-two"> <span v-if="item.remark" class="span-txt-two">
备注: 备注:
<el-tooltip <el-tooltip class="item audit-remark-input" :content="item.remark" effect="dark"
class="item audit-remark-input" placement="bottom" popper-class="remark-popper-class">
:content="item.remark"
effect="dark"
placement="bottom"
popper-class="remark-popper-class"
>
<el-button type="text"> <el-button type="text">
{{ {{
item.remark item.remark
...@@ -274,18 +195,10 @@ ...@@ -274,18 +195,10 @@
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</span> </span>
<span <span v-if="[4, 6, 7, 9].includes(item.status)" class="span-txt-two">
v-if="[4, 6, 7, 9].includes(item.status)"
class="span-txt-two"
>
驳回原因: 驳回原因:
<el-tooltip <el-tooltip class="item" :content="item.rejectCause" effect="dark" placement="bottom"
class="item" popper-class="remark-popper-class">
:content="item.rejectCause"
effect="dark"
placement="bottom"
popper-class="remark-popper-class"
>
<el-button type="text"> <el-button type="text">
{{ {{
item.rejectCause item.rejectCause
...@@ -312,22 +225,15 @@ ...@@ -312,22 +225,15 @@
<template #footer> <template #footer>
<div class="footer-btns"> <div class="footer-btns">
<el-button <el-button :loading="loading" type="primary" @click="handleSubmit">
:loading="loading"
type="primary"
@click="handleSubmit"
>
确定 确定
</el-button> </el-button>
<el-button @click="handleCancel"> 取消 </el-button> <el-button @click="handleCancel"> 取消 </el-button>
</div> </div>
</template> </template>
<!-- 库存明细 --> <!-- 库存明细 -->
<StockDetailDialog <StockDetailDialog v-if="stockDetailDialogVisible" :record-info="stockDetailInfo"
v-if="stockDetailDialogVisible" :visible.sync="stockDetailDialogVisible" />
:record-info="stockDetailInfo"
:visible.sync="stockDetailDialogVisible"
/>
</d2-container> </d2-container>
</template> </template>
...@@ -460,26 +366,27 @@ export default { ...@@ -460,26 +366,27 @@ export default {
return qty === "-" ? "-" : `${qty}${unit}`; return qty === "-" ? "-" : `${qty}${unit}`;
}, },
}, },
// {
// label: "调出门店库存",
// prop: "outStockQty",
// width: 150,
// formatter: (cellValue) => {
// const qty = cellValue.outStockQty ?? "-";
// const unit = baseConfig.membraneTypeList.includes(
// cellValue.goodsType,
// )
// ? "米"
// : "件";
// return qty === "-" ? "-" : `${qty}${unit}`;
// },
// },
{ {
label: "膜卷号", label: "膜卷号",
prop: "filmRollNo", prop: "filmRollNo",
}, },
], ],
}, },
formItem: {
label: "调出门店库存",
prop: "outStockQty",
width: 150,
formatter: (cellValue) => {
const qty = cellValue.outStockQty ?? "-";
const unit = baseConfig.membraneTypeList.includes(
cellValue.goodsType,
)
? "米"
: "件";
return qty === "-" ? "-" : `${qty}${unit}`;
},
},
examineStatusClass: { examineStatusClass: {
2: "greenSp", 2: "greenSp",
4: "redSp", 4: "redSp",
...@@ -542,6 +449,12 @@ export default { ...@@ -542,6 +449,12 @@ export default {
}); });
} }
}, },
mounted() {
if (this.$route.query.reviewType != 'operator') {
this.tableParams.tableColumns.splice(this.tableParams.tableColumns.length - 2, 0, this.formItem)
}
},
methods: { methods: {
getDetail() { getDetail() {
const allocateCode = this.$route.query.allocateCode; const allocateCode = this.$route.query.allocateCode;
...@@ -766,6 +679,7 @@ export default { ...@@ -766,6 +679,7 @@ export default {
.emptyImg { .emptyImg {
width: 64px; width: 64px;
} }
.tips { .tips {
font-size: 14px; font-size: 14px;
color: #999999; color: #999999;
...@@ -778,6 +692,7 @@ export default { ...@@ -778,6 +692,7 @@ export default {
text-align: center; text-align: center;
padding: 10px 0; padding: 10px 0;
} }
::v-deep.audit-remark-input { ::v-deep.audit-remark-input {
.el-input__count { .el-input__count {
right: 15px; right: 15px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!