Commit e80b18d5 by 张立顺

fix bug修复

1 parent a7e72bc0
...@@ -80,8 +80,8 @@ ...@@ -80,8 +80,8 @@
<el-button class="submitBtn" @click="validateGoodsNumber" type="primary">结算</el-button> <el-button class="submitBtn" @click="validateGoodsNumber" type="primary">结算</el-button>
</div> </div>
</el-drawer> </el-drawer>
<GLDialog class="addressDialog" mode="big" bigTitle="结算确认" okText="确定结算" :visible.sync="dialogShow" <GLDialog class="addressDialog" mode="big" bigTitle="结算确认" okText="确认结算" cancelText="取消结算"
:close-on-click-modal="false" @onOk="handleSubmit" @onCancel="dialogShow = false"> :visible.sync="dialogShow" :close-on-click-modal="false" @onOk="handleSubmit" @onCancel="dialogShow = false">
<div class="addressTitle"> <div class="addressTitle">
<img src="@/images/addressIcon.webp" alt="" class="icon" /> <img src="@/images/addressIcon.webp" alt="" class="icon" />
...@@ -204,11 +204,11 @@ export default { ...@@ -204,11 +204,11 @@ export default {
// width: 120, // width: 120,
line: 1 line: 1
}, },
// { {
// label: '商品编码', label: '商品编码',
// prop: 'type', prop: 'type',
// width: 100 width: 100
// }, },
{ {
label: '规格', label: '规格',
prop: 'formatSpecificationData', prop: 'formatSpecificationData',
...@@ -219,6 +219,12 @@ export default { ...@@ -219,6 +219,12 @@ export default {
addHtml: 'film', addHtml: 'film',
width: 200 width: 200
}, },
{
label: '系列',
prop: 'goodsName',
width: 150,
line: 1
},
// { // {
// label: '系列', // label: '系列',
// prop: 'goodsName', // prop: 'goodsName',
...@@ -228,38 +234,36 @@ export default { ...@@ -228,38 +234,36 @@ export default {
{ {
label: '所属分类', label: '所属分类',
prop: 'goodsTypeName', prop: 'goodsTypeName',
// width: 150 width: 90
}, },
{ {
label: '采购数量', label: '采购数量',
prop: 'goodsNumber', prop: 'goodsNumber',
width: 90
},
{
label: '库存总量',
prop: 'goodsTypeName',
formatter: cellValue => {
let unit = cellValue.goodsInfo.goodsType == 1 ? '米' : '件'
// let condition = list.includes(cellValue[attr]) ? `${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : '-'}米` : `${cellValue.goodsNumber}件`
let condition = (cellValue.goodsInfo.convertedValue ? cellValue.goodsNumber * cellValue.goodsInfo.convertedValue : cellValue.goodsNumber) + unit
return condition
},
width: 100
}, },
// {
// label: '库存总量',
// prop: 'goodsTypeName',
// formatter: cellValue => {
// // 商品来源 1-商城采购 2-自采入库
// let list = this.paramsObj.purchaseType == 1 ? membraneTypeList : goodsTypeList
// let attr = this.paramsObj.purchaseType == 1 ? 'goodsType' : 'goodsTypeName'
// let unit = list.includes(cellValue[attr]) ? '米' : '件'
// // let condition = list.includes(cellValue[attr]) ? `${cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : '-'}米` : `${cellValue.goodsNumber}件`
// let condition = (cellValue.conversionValue ? cellValue.goodsNumber * cellValue.conversionValue : cellValue.goodsNumber) + unit
// return condition
// },
// width: 100
// },
{ {
label: '采购价', label: '采购总价/元',
prop: 'goodsTotalPrice', prop: 'goodsTotalPrice',
formatter: cellValue => { formatter: cellValue => {
return '¥' + cellValue.purchasePrice return '¥' + (cellValue.goodsNumber * cellValue.purchaseGoodsInfo.purchasePrice)
}, },
width: 120 width: 120
}, },
{ {
label: '备注', label: '备注',
addHtml: 'remark', addHtml: 'remark',
width: 120
// width: // width:
}, },
] ]
...@@ -309,12 +313,15 @@ export default { ...@@ -309,12 +313,15 @@ export default {
goodsSelectStatus() { goodsSelectStatus() {
return this.goodsList.reduce((list, item) => { return this.goodsList.reduce((list, item) => {
item.upgradeGoodsList.forEach(goodsItem => { item.upgradeGoodsList.forEach(goodsItem => {
console.log(item, goodsItem, 'gods')
list.push({ list.push({
...item, ...item,
...goodsItem, ...goodsItem,
id: goodsItem.id, id: goodsItem.id,
upgradeGoodsId: goodsItem.upgradeGoodsId, upgradeGoodsId: goodsItem.upgradeGoodsId,
selectedFlag: goodsItem.selectedFlag ? 'Y' : 'N', selectedFlag: goodsItem.selectedFlag ? 'Y' : 'N',
goodsName: goodsItem.goodsInfo.goodsName,
type: goodsItem.upgradeGoods.type,
goodsNumber: goodsItem.goodsNumber goodsNumber: goodsItem.goodsNumber
}) })
}) })
...@@ -378,6 +385,8 @@ export default { ...@@ -378,6 +385,8 @@ export default {
// upgradeGoodsId: item.upgradeGoodsId, // upgradeGoodsId: item.upgradeGoodsId,
...item, ...item,
id: item.id, id: item.id,
type: item.upgradeGoods.type,
goodsNumber: item.goodsNumber, goodsNumber: item.goodsNumber,
remark: '' remark: ''
}) })
...@@ -475,6 +484,9 @@ export default { ...@@ -475,6 +484,9 @@ export default {
this.goodsList = result.map(item => { this.goodsList = result.map(item => {
const upgradeGoodsList = item.list.reduce((total, cur, index) => { const upgradeGoodsList = item.list.reduce((total, cur, index) => {
total.push({ total.push({
upgradeGoods: cur.upgradeGoods,
goodsInfo: cur.goodsInfo,
purchaseGoodsInfo: cur.purchaseGoodsInfo,
upgradeGoodsName: cur.upgradeGoods.upgradeGoodsName, upgradeGoodsName: cur.upgradeGoods.upgradeGoodsName,
specificationType: cur.upgradeGoods.specificationType, specificationType: cur.upgradeGoods.specificationType,
formatSpecificationData: cur.upgradeGoods.formatSpecificationData ? cur.upgradeGoods.formatSpecificationData.replaceAll(';~;', '/') : '', formatSpecificationData: cur.upgradeGoods.formatSpecificationData ? cur.upgradeGoods.formatSpecificationData.replaceAll(';~;', '/') : '',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!