Commit d1430a30 by 张立顺

feat 评审需求修改

1 parent fbc7b1e0
...@@ -53,21 +53,21 @@ ...@@ -53,21 +53,21 @@
<td style="white-space: nowrap; text-overflow: ellipsis; overflow: hidden" v-for="(n, idx) in subItem.specsValueList" :key="idx" :title="n">{{ n }}</td> <td style="white-space: nowrap; text-overflow: ellipsis; overflow: hidden" v-for="(n, idx) in subItem.specsValueList" :key="idx" :title="n">{{ n }}</td>
<td> <td>
<!-- @input="handleTypeInput($event, subIndex)" --> <!-- @input="handleTypeInput($event, subIndex)" -->
<el-input placeholder="请输入" :disabled="routeInfo.type == 2" size="small" :class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.insuranceCost) && subItem.insuranceCostEmpty }" v-model.trim="subItem.insuranceCost" @input="handleKilometersInput($event, subIndex)" @blur="handleKilometersBlur($event, subIndex)"> <el-input placeholder="请输入" maxlength="20" :disabled="routeInfo.type == 2" size="small" :class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.insuranceCost) && subItem.insuranceCostEmpty }" v-model.trim="subItem.insuranceCost" @input="handleKilometersInput($event, subIndex)" @blur="handleKilometersBlur($event, subIndex)">
<el-popover v-if="filterEmpty(subItem.insuranceCost) && subItem.insuranceCostEmpty" slot="suffix" placement="top" title width="90" trigger="hover" content="投保成本是必填项"> <el-popover v-if="filterEmpty(subItem.insuranceCost) && subItem.insuranceCostEmpty" slot="suffix" placement="top" title width="90" trigger="hover" content="投保成本是必填项">
<i class="el-icon-warning color-red" slot="reference" /> <i class="el-icon-warning color-red" slot="reference" />
</el-popover> </el-popover>
</el-input> </el-input>
</td> </td>
<td> <td>
<el-input placeholder="请输入" :disabled="routeInfo.type == 2" size="small" v-model.trim="subItem.shelfCost" :class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.shelfCost) && subItem.shelfCostEmpty }" @input="handleWarrantyPeriodInput($event, subIndex)" @blur="handleWarrantyPeriodBlur($event, subIndex)"> <el-input placeholder="请输入" maxlength="20" :disabled="routeInfo.type == 2" size="small" v-model.trim="subItem.shelfCost" :class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.shelfCost) && subItem.shelfCostEmpty }" @input="handleWarrantyPeriodInput($event, subIndex)" @blur="handleWarrantyPeriodBlur($event, subIndex)">
<el-popover v-if="filterEmpty(subItem.shelfCost) && subItem.salesCostEmpty" slot="suffix" placement="top" title width="90" trigger="hover" content="上架成本是必填项"> <el-popover v-if="filterEmpty(subItem.shelfCost) && subItem.salesCostEmpty" slot="suffix" placement="top" title width="90" trigger="hover" content="上架成本是必填项">
<i class="el-icon-warning color-red" slot="reference" /> <i class="el-icon-warning color-red" slot="reference" />
</el-popover> </el-popover>
</el-input> </el-input>
</td> </td>
<td> <td>
<el-input placeholder="请输入" :disabled="routeInfo.type == 2" size="small" v-model.trim="subItem.salesCost" :class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.salesCost) && subItem.salesCostEmpty }" @input="handlePurchasePrice($event, subIndex)" @blur="handlePurchasePriceBlur($event, subIndex)"> <el-input placeholder="请输入" maxlength="20" :disabled="routeInfo.type == 2" size="small" v-model.trim="subItem.salesCost" :class="{ 'w-150-per': true, 'border-red': filterEmpty(subItem.salesCost) && subItem.salesCostEmpty }" @input="handlePurchasePrice($event, subIndex)" @blur="handlePurchasePriceBlur($event, subIndex)">
<el-popover v-if="filterEmpty(subItem.salesCost) && subItem.salesCostEmpty" slot="suffix" placement="top" title width="90" trigger="hover" content="嘀加成本是必填项"> <el-popover v-if="filterEmpty(subItem.salesCost) && subItem.salesCostEmpty" slot="suffix" placement="top" title width="90" trigger="hover" content="嘀加成本是必填项">
<i class="el-icon-warning color-red" slot="reference" /> <i class="el-icon-warning color-red" slot="reference" />
</el-popover> </el-popover>
......
<!-- 关联门店弹窗 --> <!-- 关联门店弹窗 -->
<template> <template>
<d2-dialog title="选择品牌" :is-visible.sync="relateStoreVisible" width="40%" btn-ok-label="确定" @confirmDialog="handleRelateStoreConfirm" @closeDialog="handleRelateStoreClose" class="relateSku"> <d2-dialog title="组合列表" :is-visible.sync="relateStoreVisible" width="40%" btn-ok-label="确定" @confirmDialog="handleRelateStoreConfirm" @closeDialog="handleRelateStoreClose" class="relateSku">
<el-form :model="searchForm" ref="relate" :inline="true"> <el-form :model="searchForm" ref="relate" :inline="true">
<el-form-item class="formItem" :label="`${item.specificationName}:`" v-for="(item, index) in specificationDetailList" :key="index"> <el-form-item class="formItem" :label="`${item.specificationName}:`" v-for="(item, index) in specificationDetailList" :key="index">
<el-select collapse-tags multiple v-model="searchForm[index]" placeholder="请选择规格" value-key="specificationValue"> <el-select collapse-tags multiple v-model="searchForm[index]" placeholder="请选择规格" value-key="specificationValue">
...@@ -125,6 +125,9 @@ export default { ...@@ -125,6 +125,9 @@ export default {
this.selectedData = [] //清空勾选 this.selectedData = [] //清空勾选
}, },
handleRelateStart() { handleRelateStart() {
if (!this.selectedData.length) {
return this.$message.error('请勾选规格')
}
this.tableData.forEach(item => { this.tableData.forEach(item => {
this.selectedData.forEach(subItem => { this.selectedData.forEach(subItem => {
if (JSON.stringify(subItem.specsValueList) === JSON.stringify(item.specsValueList)) { if (JSON.stringify(subItem.specsValueList) === JSON.stringify(item.specsValueList)) {
...@@ -134,6 +137,9 @@ export default { ...@@ -134,6 +137,9 @@ export default {
}) })
}, },
handleRelateStop() { handleRelateStop() {
if (!this.selectedData.length) {
return this.$message.error('请勾选规格')
}
this.tableData.forEach(item => { this.tableData.forEach(item => {
this.selectedData.forEach(subItem => { this.selectedData.forEach(subItem => {
if (JSON.stringify(subItem.specsValueList) === JSON.stringify(item.specsValueList)) { if (JSON.stringify(subItem.specsValueList) === JSON.stringify(item.specsValueList)) {
......
...@@ -306,18 +306,17 @@ export default { ...@@ -306,18 +306,17 @@ export default {
val.createdDateStr = `${val.createdBy}${spaces}${dayjs(val.createdDate).format('YYYY-MM-DD HH:mm:ss')}` val.createdDateStr = `${val.createdBy}${spaces}${dayjs(val.createdDate).format('YYYY-MM-DD HH:mm:ss')}`
// 规格A,服务年限5年,,投保成本/元 上架成本/元 嘀加成本/元 // 规格A,服务年限5年,,投保成本/元 上架成本/元 嘀加成本/元
// val.content = `规格${val.serviceGrade},服务年限${val.servicePeriod}年,` // val.content = `规格${val.serviceGrade},服务年限${val.servicePeriod}年,`
val.content = '' // val.content = ''
let childContent = '' let childContent = ''
if (val.recordType == 1) { if (val.recordType == 1) {
val.content = `【${val.recordType == 1 ? '删除' : '修改'}】投保成本${val.insuranceCost}元,上架成本${val.shelfCost}元,嘀加成本${val.salesCost}元,` val.content = `【${val.recordType == 1 ? '删除' : '修改'}】状态:${val.useStatus ? '禁用' : '启用'},投保成本${val.insuranceCost}元,上架成本${val.shelfCost}元,嘀加成本${val.salesCost}元,`
val?.deleteList?.forEach((v, index) => { val?.deleteList?.forEach((v, index) => {
// const unit = ['maxPrice', 'minPrice']?.includes(v.field) ? '万元' : ['priceCoefficient']?.includes(v.field) ? '' : '元'
childContent = `${v.fieldName}${v.beforeValue}${v.valueUnit}${index < val?.detailList?.length - 1 ? ',' : ''}` childContent = `${v.fieldName}${v.beforeValue}${v.valueUnit}${index < val?.detailList?.length - 1 ? ',' : ''}`
val.content += childContent val.content += childContent
}) })
} else { } else {
val?.detailList?.forEach((v, index) => { val?.detailList?.forEach((v, index) => {
// const unit = ['maxPrice', 'minPrice']?.includes(v.field) ? '万元' : ['priceCoefficient']?.includes(v.field) ? '' : '元' val.content = `【${val.recordType == 1 ? '删除' : '修改'}】状态:${val.useStatus ? '禁用' : '启用'},`
childContent = `${v.fieldName}由${v.beforeValue}${v.valueUnit}变为${v.afterValue}${v.valueUnit}${index < val?.detailList?.length - 1 ? ',' : ''}` childContent = `${v.fieldName}由${v.beforeValue}${v.valueUnit}变为${v.afterValue}${v.valueUnit}${index < val?.detailList?.length - 1 ? ',' : ''}`
val.content += childContent val.content += childContent
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!