Commit 704e5a30 by wangzhihui

```

feat(goods): 添加供应商编码字段到商品选择对话框

- 在selectGoodsDialog组件中新增供应商编码列显示
- 修改列插入逻辑,将供应商编码列正确插入到指定位置
- 移除重复的供应商编码列添加代码

feat(purchase): 增加上架表单中的产品别名验证和限制

- 将goodsAlias字段验证规则迁移到purchaseGoodsName字段
- 添加产品别名长度不超过30个字符的验证
- 移除冗余的goodsAlias字段初始化

feat(goods): 扩展上架列表中的供应商信息展示

- 在purchaseOnShelves列表中添加供应商名称列
- 调整供应商编码和产品编码列的数据获取路径
- 修正列配置结构以支持嵌套数据访问

refactor(delivery): 优化发货详情对话框模板结构

- 格式化长标签属性以提高代码可读性
- 统一模板语法风格,改善代码格式
- 添加缺失的parentProp配置以正确获取嵌套数据

feat(delivery): 补充发货详情表格中的产品信息列

- 新增供应商名称、供应商编码和产品别名列
- 配置相应的数据格式化器处理空值情况
- 调整列顺序以保持逻辑一致性

refactor(review): 优化审核页面布局和样式

- 简化模板中的多余换行和空格
- 添加缺失的样式类以改善视觉效果
- 调整CSS选择器格式以符合规范
```
1 parent 477bdf25
...@@ -242,7 +242,16 @@ export default { ...@@ -242,7 +242,16 @@ export default {
formatter: (cellValue) => { formatter: (cellValue) => {
return this.filterSpecsStr(cellValue); return this.filterSpecsStr(cellValue);
}, },
}, { },
{
label: "供应商编码",
prop: "thirdPartyCode",
width: 100,
formatter: (cellValue) => {
return cellValue?.thirdPartyCode || "-";
},
},
{
label: "运营成本/元", label: "运营成本/元",
prop: "operationCost", prop: "operationCost",
width: 150 width: 150
...@@ -308,7 +317,7 @@ export default { ...@@ -308,7 +317,7 @@ export default {
keyFn: this.keyDowmGetList, keyFn: this.keyDowmGetList,
}); });
const typeIndex = this.tableParams.tableColumns.findIndex(item => item.prop === 'type'); const typeIndex = this.tableParams.tableColumns.findIndex(item => item.prop === 'upgradeGoodsName');
if (typeIndex > -1) { if (typeIndex > -1) {
this.tableParams.tableColumns.splice(typeIndex + 1, 0, { this.tableParams.tableColumns.splice(typeIndex + 1, 0, {
label: "供应商名称", label: "供应商名称",
...@@ -319,18 +328,6 @@ export default { ...@@ -319,18 +328,6 @@ export default {
}, },
}); });
} }
const specIndex = this.tableParams.tableColumns.findIndex(item => item.prop === 'specificationData');
if (specIndex > -1) {
this.tableParams.tableColumns.splice(specIndex + 1, 0, {
label: "供应商编码",
prop: "thirdPartyCode",
width: 100,
formatter: (cellValue) => {
return cellValue?.thirdPartyCode || "-";
},
});
}
} }
}, },
searchInput(e, key) { searchInput(e, key) {
......
...@@ -382,8 +382,7 @@ export default { ...@@ -382,8 +382,7 @@ export default {
} }
} }
], ],
goodsAlias: [ purchaseGoodsName: [
{ required: true, message: "请输入产品别名", trigger: "blur" },
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
value.length > 30 ? callback(new Error("产品别名不能超过30个字符")) : callback() value.length > 30 ? callback(new Error("产品别名不能超过30个字符")) : callback()
......
...@@ -97,8 +97,8 @@ export default { ...@@ -97,8 +97,8 @@ export default {
label: '产品别名', label: '产品别名',
type: 'input', type: 'input',
width: '432px', width: '432px',
value: "purchaseGoodsName", maxlength: 30,
handleInput: true value: "purchaseGoodsName"
}, },
{ {
name: 'purchasePrice', name: 'purchasePrice',
...@@ -172,7 +172,6 @@ export default { ...@@ -172,7 +172,6 @@ export default {
// validMinSellPriceFlag: true, // validMinSellPriceFlag: true,
// validMinSellPrice: 'Y', // validMinSellPrice: 'Y',
suitCarType: 1, suitCarType: 1,
goodsAlias: '',
purchaseGoodsName: '' purchaseGoodsName: ''
}, },
secondGoodsList: [], secondGoodsList: [],
......
...@@ -300,7 +300,17 @@ export default { ...@@ -300,7 +300,17 @@ export default {
// formatter: (cellValue) => { // formatter: (cellValue) => {
// return cellValue.upgradeGoods.upgradeGoodsName || '-' // return cellValue.upgradeGoods.upgradeGoodsName || '-'
// } // }
}, { },
{
label: '供应商名称',
prop: 'thirdPartyName',
parentProp: 'upgradeGoods',
width: 100,
formatter: (cellValue) => {
return cellValue?.upgradeGoods?.thirdPartyName || '-'
}
},
{
label: '规格', label: '规格',
prop: 'thirdPartyCode', prop: 'thirdPartyCode',
width: 140, width: 140,
...@@ -327,22 +337,16 @@ export default { ...@@ -327,22 +337,16 @@ export default {
label: '产品编码', label: '产品编码',
prop: 'type', prop: 'type',
parentProp: 'upgradeGoods', parentProp: 'upgradeGoods',
// formatter: (cellValue) => {
// return cellValue.upgradeGoods.type || '-'
// }
}, {
label: '供应商名称',
prop: 'thirdPartyName',
width: 100,
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue?.thirdPartyName || '-' return cellValue.upgradeGoods.type || '-'
} }
}, { }, {
label: '供应商编码', label: '供应商编码',
prop: 'thirdPartyCode', prop: 'thirdPartyCode',
parentProp: 'upgradeGoods',
width: 100, width: 100,
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue?.thirdPartyCode || '-' return cellValue?.upgradeGoods.thirdPartyCode || '-'
} }
}, { }, {
label: '上架商户', label: '上架商户',
......
<!-- 发货单详情弹窗 --> <!-- 发货单详情弹窗 -->
<template> <template>
<div> <div>
<baseDialog title="详细信息" :is-show.sync="detailVisible" :config="dialogConfig.setting" :dialog-config="dialogConfig.config" width="1050px" :no-cancel="true" btn-ok-label="关闭" @closeDialog="handleClose" @confirmDialog="handleClose"> <baseDialog title="详细信息" :is-show.sync="detailVisible" :config="dialogConfig.setting"
:dialog-config="dialogConfig.config" width="1050px" :no-cancel="true" btn-ok-label="关闭" @closeDialog="handleClose"
@confirmDialog="handleClose">
<div class="stockMonthDailog"> <div class="stockMonthDailog">
<div class="addressTitle"> <div class="addressTitle">
<img src="../images/addressIcon.webp" alt="" class="icon"> <img src="../images/addressIcon.webp" alt="" class="icon">
...@@ -30,11 +32,13 @@ ...@@ -30,11 +32,13 @@
<span>{{ itemList.deliveryDate }}</span> <span>{{ itemList.deliveryDate }}</span>
</div> </div>
<div> <div>
<el-button style="padding: 0;" v-if="itemList.putStatus == 0" type="text" @click="handleEdit(itemList)">编辑</el-button> <el-button style="padding: 0;" v-if="itemList.putStatus == 0" type="text"
@click="handleEdit(itemList)">编辑</el-button>
<el-button style="padding: 0;" type="text" @click="handleSign(itemList)">发货签收单</el-button> <el-button style="padding: 0;" type="text" @click="handleSign(itemList)">发货签收单</el-button>
</div> </div>
</div> </div>
<d2-table ref="recordTable" :table-data="itemList.deliveryDetailList" :table-params="tableParams" :has-page="false"> <d2-table ref="recordTable" :table-data="itemList.deliveryDetailList" :table-params="tableParams"
:has-page="false">
<span slot="deliveryCard" slot-scope="scope"> <span slot="deliveryCard" slot-scope="scope">
<template v-if="scope.scope.deliveryCardList && scope.scope.deliveryCardList.length > 1"> <template v-if="scope.scope.deliveryCardList && scope.scope.deliveryCardList.length > 1">
<!-- {{ scope.scope.deliveryCardList.length || 0 }} --> <!-- {{ scope.scope.deliveryCardList.length || 0 }} -->
...@@ -52,12 +56,17 @@ ...@@ -52,12 +56,17 @@
</div> </div>
</div> </div>
</baseDialog> </baseDialog>
<baseDialog title="查看发货卡号" :config="carDialogConfig.setting" :dialog-config="carDialogConfig.config" :is-show.sync="handleDeliveryCardVisible" width="500px" :no-cancel="true" btn-ok-label="关闭" @closeDialog="handleDeliveryCardVisible = false" @confirmDialog="handleDeliveryCardVisible = false"> <baseDialog title="查看发货卡号" :config="carDialogConfig.setting" :dialog-config="carDialogConfig.config"
<d2-table class="deliveryCardCon" ref="recordTable" :table-data="deliveryCardList" :table-params="innerParams" :has-page="false"> :is-show.sync="handleDeliveryCardVisible" width="500px" :no-cancel="true" btn-ok-label="关闭"
@closeDialog="handleDeliveryCardVisible = false" @confirmDialog="handleDeliveryCardVisible = false">
<d2-table class="deliveryCardCon" ref="recordTable" :table-data="deliveryCardList" :table-params="innerParams"
:has-page="false">
</d2-table> </d2-table>
</baseDialog> </baseDialog>
<!-- 编辑 --> <!-- 编辑 -->
<glsk-form-dialog v-if="editVisible" :selectVisible="editVisible" :dialogConfig="editDialogConfig" label-width="104px" dialog-width="520px" :formRules="editRules" :editData="editData" :editFormData="editFormData" :base-data="baseData" @handleClose="editVisible = false" @handleConfirm="handleEditConfirm"></glsk-form-dialog> <glsk-form-dialog v-if="editVisible" :selectVisible="editVisible" :dialogConfig="editDialogConfig" label-width="104px"
dialog-width="520px" :formRules="editRules" :editData="editData" :editFormData="editFormData" :base-data="baseData"
@handleClose="editVisible = false" @handleConfirm="handleEditConfirm"></glsk-form-dialog>
</div> </div>
</template> </template>
...@@ -120,6 +129,11 @@ export default { ...@@ -120,6 +129,11 @@ export default {
prop: 'upgradeGoodsName' prop: 'upgradeGoodsName'
}, },
{ {
label: "供应商名称",
prop: 'thirdPartyName',
width: 100,
},
{
label: '产品编码', label: '产品编码',
prop: 'type' prop: 'type'
}, },
...@@ -128,6 +142,15 @@ export default { ...@@ -128,6 +142,15 @@ export default {
prop: 'specificationData' prop: 'specificationData'
}, },
{ {
label: '供应商编码',
prop: 'thirdPartyCode',
width: 100
},
{
label: "产品别名",
prop: "purchaseGoodsName",
},
{
label: '发货数量', label: '发货数量',
prop: 'purchaseNumber', prop: 'purchaseNumber',
formatter: cellValue => { formatter: cellValue => {
...@@ -321,7 +344,7 @@ export default { ...@@ -321,7 +344,7 @@ export default {
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
> span { >span {
margin-right: 20px; margin-right: 20px;
margin-bottom: 10px; margin-bottom: 10px;
} }
...@@ -347,10 +370,12 @@ export default { ...@@ -347,10 +370,12 @@ export default {
display: flex; display: flex;
width: 319px; width: 319px;
} }
.detail-label { .detail-label {
width: 70px; width: 70px;
flex-shrink: 0; flex-shrink: 0;
} }
span { span {
color: #333333ff; color: #333333ff;
} }
......
...@@ -233,10 +233,7 @@ export default { ...@@ -233,10 +233,7 @@ export default {
: `${cellValue.goodsNumber}件`; : `${cellValue.goodsNumber}件`;
}, },
}, },
{
label: "产品别名",
prop: "purchaseGoodsName",
},
{ {
label: "已发货数量", label: "已发货数量",
prop: "purchaseNumber", prop: "purchaseNumber",
...@@ -248,6 +245,10 @@ export default { ...@@ -248,6 +245,10 @@ export default {
}, },
}, },
{ {
label: "产品别名",
prop: "purchaseGoodsName",
},
{
label: "单价", label: "单价",
prop: "upgradePurchasePrice", prop: "upgradePurchasePrice",
formatter: (row) => { formatter: (row) => {
......
...@@ -609,9 +609,7 @@ export default { ...@@ -609,9 +609,7 @@ export default {
label: '供应商名称', label: '供应商名称',
prop: 'thirdPartyName', prop: 'thirdPartyName',
width: 100, width: 100,
formatter: (cellValue) => {
return cellValue?.upgradeGoods?.thirdPartyName || '-'
}
}, },
{ {
label: "产品编码", label: "产品编码",
...@@ -634,9 +632,7 @@ export default { ...@@ -634,9 +632,7 @@ export default {
label: '供应商编码', label: '供应商编码',
prop: 'thirdPartyCode', prop: 'thirdPartyCode',
width: 100, width: 100,
formatter: (cellValue) => {
return cellValue?.upgradeGoods?.thirdPartyCode || '-'
}
}, },
{ {
label: "系列", label: "系列",
......
<!-- 编辑 - 审核 --> <!-- 编辑 - 审核 -->
<template> <template>
<d2-container v-loading="loading"> <d2-container v-loading="loading">
<div class="edit-page edit-tmpl"> <div class="edit-page edit-tmpl">
<div class="title"> <div class="title">
产品信息 产品信息
</div> </div>
<div class="content-box"> <div class="content-box">
<d2-table ref="purchaseOrderDetailTable" <d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :table-data="detailInfo.tableData"
:table-params="tableParams" :layout="layout" :table-total="detailInfo.tableTotal" @refreshTable="refreshTable">
:table-data="detailInfo.tableData" <template #upgradeGoodsName="scope">
:layout="layout" <div>
:table-total="detailInfo.tableTotal" <img v-if="scope.scope.refundStatus == 'Y'" class="return" src="@/assets/retrun.png" alt="">
@refreshTable="refreshTable"> <span>{{ scope.scope.upgradeGoodsName }}</span>
<template #upgradeGoodsName="scope"> </div>
<div> </template>
<img v-if="scope.scope.refundStatus == 'Y'" <template #filmRollNo="scope">
class="return" <div v-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1">
src="@/assets/retrun.png" {{ scope.scope.filmRollList[0] }}
alt=""> </div>
<span>{{ scope.scope.upgradeGoodsName }}</span> <div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1">
</div> <el-popover placement="top" width="200" trigger="hover">
</template> <div class="film-roll-box">
<template #filmRollNo="scope"> <div class="title">
<div v-if="scope.scope.filmRollList && scope.scope.filmRollList.length == 1"> 膜卷号
{{ scope.scope.filmRollList[0] }} </div>
</div> <div v-for="(subItem, subIndex) in scope.scope.filmRollList" :key="subIndex"
<div v-else-if="scope.scope.filmRollList && scope.scope.filmRollList.length > 1"> class="merchant-item">
<el-popover placement="top" {{ subItem }}
width="200" </div>
trigger="hover"> </div>
<div class="film-roll-box"> <template #reference>
<div class="title"> <div>
膜卷号 <!-- <img style="width: 14px;height: 13px;" src="./images/merchant_icon.png"> -->
</div> <span style="color: #2A58AD;">(…{{ scope.scope.filmRollList.length }})</span>
<div v-for="(subItem, subIndex) in scope.scope.filmRollList" </div>
:key="subIndex" </template>
class="merchant-item"> </el-popover>
{{ subItem }} </div>
</div> <div v-else>
</div> <span style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{ '-' }}</span>
<template #reference> </div>
<div> </template>
<!-- <img style="width: 14px;height: 13px;" src="./images/merchant_icon.png"> --> <template #carName="scope">
<span style="color: #2A58AD;">(…{{ scope.scope.filmRollList.length }})</span> <el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length"
</div> placement="top">
</template> <template #content>
</el-popover> <div class="car-type-list">
</div> <div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index">
<div v-else> {{
<span style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{ '-' }}</span> `${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}` }}
</div> </div>
</template> </div>
<template #carName="scope"> </template>
<el-tooltip v-if="scope.scope.suitCarTypeList && scope.scope.suitCarTypeList.length" placement="top"> <div>{{ scope.scope.suitCarTypeList | formatCar }}</div>
<template #content> </el-tooltip>
<div class="car-type-list"> <div v-else>
<div v-for="(item, index) in scope.scope.suitCarTypeList" :key="index"> -
{{ </div>
`${item.brandName}-${item.childName}-${item.seriesName}-${item.carTypeName}` }} </template>
</div> </d2-table>
</div> </div>
</template> </div>
<div>{{ scope.scope.suitCarTypeList | formatCar }}</div> <div class="content-box">
</el-tooltip> <glsx-combi-form ref="editFormRef" class="edit-form-container" label-width="150px" default-width="470px"
<div v-else> :is-block="isBlock" :form-ref="editChildRef" :form-obj="infoForm" :form-data="editFormData"
- :form-rules="formRules">
</div> </glsx-combi-form>
</template> <ExamineRecord :use-expand="false" :list="detailInfo.auditDetaiList" style="margin-top:20px;" />
</d2-table>
</div>
</div>
<div class="content-box">
<glsx-combi-form ref="editFormRef"
class="edit-form-container"
label-width="150px"
default-width="470px"
:is-block="isBlock"
:form-ref="editChildRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules">
</glsx-combi-form>
<ExamineRecord :use-expand="false"
:list="detailInfo.auditDetaiList"
style="margin-top:20px;" />
</div> </div>
<div class="footer"> <div class="footer">
<el-button type="primary" <el-button type="primary" :loading="loading" @click="handleConfirm">
:loading="loading" 确定
@click="handleConfirm"> </el-button>
确定 <el-button @click="handleCancel">
</el-button> 取消
<el-button @click="handleCancel"> </el-button>
取消 </div>
</el-button> </d2-container>
</div>
</d2-container>
</template> </template>
<script> <script>
...@@ -140,6 +121,11 @@ export default { ...@@ -140,6 +121,11 @@ export default {
prop: "upgradeGoodsName", prop: "upgradeGoodsName",
}, },
{ {
label: "供应商名称",
prop: 'thirdPartyName',
width: 100,
},
{
label: "产品编码", label: "产品编码",
prop: "type", prop: "type",
}, },
...@@ -147,6 +133,12 @@ export default { ...@@ -147,6 +133,12 @@ export default {
label: "规格", label: "规格",
prop: "specificationData", prop: "specificationData",
}, },
{
label: '供应商编码',
prop: 'thirdPartyCode',
width: 100
},
{ {
label: "采购数量", label: "采购数量",
prop: "goodsNumber", prop: "goodsNumber",
...@@ -163,6 +155,7 @@ export default { ...@@ -163,6 +155,7 @@ export default {
return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件`; return this.paramsObj.purchaseType == 1 ? condition : `${cellValue.goodsNumber}件`;
}, },
}, },
{ {
label: "已发货数量", label: "已发货数量",
prop: "purchaseNumber", prop: "purchaseNumber",
...@@ -172,6 +165,10 @@ export default { ...@@ -172,6 +165,10 @@ export default {
}, },
}, },
{ {
label: "产品别名",
prop: "purchaseGoodsName",
},
{
label: "单价", label: "单价",
prop: "upgradePurchasePrice", prop: "upgradePurchasePrice",
formatter: (row) => { formatter: (row) => {
...@@ -420,6 +417,7 @@ export default { ...@@ -420,6 +417,7 @@ export default {
::v-deep .d2-container-full { ::v-deep .d2-container-full {
bottom: 60px !important; bottom: 60px !important;
} }
.edit-page.edit-tmpl { .edit-page.edit-tmpl {
background: #ffffff; background: #ffffff;
...@@ -433,11 +431,13 @@ export default { ...@@ -433,11 +431,13 @@ export default {
color: #333333; color: #333333;
} }
} }
.content-box { .content-box {
padding: 20px; padding: 20px;
background: #ffffff; background: #ffffff;
box-sizing: border-box; box-sizing: border-box;
} }
.car-type-list { .car-type-list {
max-height: 300px; max-height: 300px;
overflow-y: scroll; overflow-y: scroll;
...@@ -481,7 +481,7 @@ export default { ...@@ -481,7 +481,7 @@ export default {
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
> span { >span {
margin-right: 20px; margin-right: 20px;
margin-bottom: 10px; margin-bottom: 10px;
} }
...@@ -505,6 +505,7 @@ export default { ...@@ -505,6 +505,7 @@ export default {
margin-bottom: 8px; margin-bottom: 8px;
} }
} }
.remark-input { .remark-input {
width: 85%; width: 85%;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!