Commit f9fc8536 by zhangxw

bug修复

1 parent 0e5db6ee
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
label: '商品名称', label: '商品名称',
name: 'upgradeGoodsName', name: 'upgradeGoodsName',
type: 'input', type: 'input',
maxLength: 50, maxlength: 50,
isClear: true, isClear: true,
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList
}, { }, {
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
label: '规格', label: '规格',
name: 'specificationData', name: 'specificationData',
type: 'input', type: 'input',
maxLength: 50, maxlength: 50,
isClear: true, isClear: true,
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList
}, { }, {
...@@ -124,14 +124,14 @@ export default { ...@@ -124,14 +124,14 @@ export default {
label: '适用车型', label: '适用车型',
name: 'carTypeSearch', name: 'carTypeSearch',
type: 'input', type: 'input',
maxLength: 50, maxlength: 50,
isClear: true, isClear: true,
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList
}, { }, {
label: '所属系列', label: '所属系列',
name: 'goodsName', name: 'goodsName',
type: 'input', type: 'input',
maxLength: 50, maxlength: 50,
isClear: true, isClear: true,
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList
}, { }, {
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
@click="handleSpecsEdit(2, subItem, subIndex)">编辑</el-button> @click="handleSpecsEdit(2, subItem, subIndex)">编辑</el-button>
<el-button type="text" <el-button type="text"
:disabled="goodsInfoData.scrmFlag == 'Y' || pageData.pageDisabled" :disabled="goodsInfoData.scrmFlag == 'Y' || pageData.pageDisabled"
@click="handleSpecsDelete(subIndex)">删除</el-button> @click="handleSpecsItemDelete(subIndex)">删除</el-button>
</div> </div>
</div> </div>
<div v-if="$$(goodsInfoData.specificationDetailList,'length')"> <div v-if="$$(goodsInfoData.specificationDetailList,'length')">
...@@ -244,6 +244,7 @@ ...@@ -244,6 +244,7 @@
@focus="carSeriesSelectFocus($event, subIndex)" @focus="carSeriesSelectFocus($event, subIndex)"
popper-class="service_select_class" popper-class="service_select_class"
:popper-append-to-body="false" :popper-append-to-body="false"
clearable
:disabled="goodsInfoData.scrmFlag == 'Y'"> :disabled="goodsInfoData.scrmFlag == 'Y'">
</el-select> </el-select>
</td> </td>
...@@ -306,7 +307,7 @@ ...@@ -306,7 +307,7 @@
</div> </div>
<div style="margin-top: 10px;">共<span <div style="margin-top: 10px;">共<span
class="tip-text">{{ goodsInfoData.goodsSpecificationList.length }}</span>件规格商品。价格区间<span class="tip-text">{{ goodsInfoData.goodsSpecificationList.filter(v => v.statusFlag != 2).length }}</span>件规格商品。价格区间<span
class="tip-text">¥{{ minPrice }}~{{ maxPrice }}</span> class="tip-text">¥{{ minPrice }}~{{ maxPrice }}</span>
</div> </div>
</div> </div>
...@@ -980,8 +981,8 @@ export default { ...@@ -980,8 +981,8 @@ export default {
this.$refs.specsRef?.clearValidate() this.$refs.specsRef?.clearValidate()
}) })
}, },
// 删除规格值 // 删除规格
handleSpecsDelete(index) { handleSpecsItemDelete(index) {
this.secondSimpleConfirm('删除', '是否删除该规格?', () => { this.secondSimpleConfirm('删除', '是否删除该规格?', () => {
this.goodsInfoData.specificationDetailList.splice(index, 1) this.goodsInfoData.specificationDetailList.splice(index, 1)
this.changeSpecs() this.changeSpecs()
...@@ -1028,6 +1029,7 @@ export default { ...@@ -1028,6 +1029,7 @@ export default {
this.isChange = true this.isChange = true
this.changeIndex = i this.changeIndex = i
}, },
// 删除规格值
handleSpecsDelete(tag) { handleSpecsDelete(tag) {
this.isChange = false this.isChange = false
this.specsEditForm.specificationValueList.splice(this.specsEditForm.specificationValueList.indexOf(tag), 1) this.specsEditForm.specificationValueList.splice(this.specsEditForm.specificationValueList.indexOf(tag), 1)
...@@ -1057,20 +1059,21 @@ export default { ...@@ -1057,20 +1059,21 @@ export default {
} }
if (this.specsEditForm.specificationValueList.findIndex(i => i.specificationValue == specsInputVal) != -1) { if (this.specsEditForm.specificationValueList.findIndex(i => i.specificationValue == specsInputVal) != -1) {
this.$message({ this.$message({
message: specsInputVal + '规格值已经存在', message: (this.selectTypeSequence > 0 ? Number(specsInputVal) : specsInputVal) + '规格值已经存在',
type: 'warning', type: 'warning',
customClass: 'message-Z-zinde' customClass: 'message-Z-zinde'
}) })
return true return true
} }
if (this.isChange && specsInputVal) { if (this.isChange && specsInputVal) {
this.specsEditForm.specificationValueList[this.specsEditForm.specificationValueList.findIndex(i => i.specificationValue == this.tempTag)].specificationValue = specsInputVal this.specsEditForm.specificationValueList[this.specsEditForm.specificationValueList.findIndex(i => i.specificationValue == this.tempTag)].specificationValue = this.selectTypeSequence > 0 ? Number(specsInputVal) : specsInputVal
this.specsInputVisible = false this.specsInputVisible = false
this.isChange = false this.isChange = false
return return
} }
if (specsInputVal) { if (!this.filterEmpty(specsInputVal)) {
this.specsEditForm.specificationValueList.push({ specificationValue: specsInputVal }) // 预设规格输入的是数字类型对数据进行处理
this.specsEditForm.specificationValueList.push({ specificationValue: this.selectTypeSequence > 0 ? Number(specsInputVal) : specsInputVal })
} }
// 适用车价 // 适用车价
if (this.selectTypeSequence == 3) { if (this.selectTypeSequence == 3) {
...@@ -1081,9 +1084,9 @@ export default { ...@@ -1081,9 +1084,9 @@ export default {
type: 'warning', type: 'warning',
customClass: 'message-Z-zinde' customClass: 'message-Z-zinde'
}) })
if (this.specsEditForm.specificationValueList.findIndex(i => i.specificationValue == `${this.specsStartInputVal}-${this.specsEndInputVal}`) != -1) { if (this.specsEditForm.specificationValueList.findIndex(i => i.specificationValue == `${Number(this.specsStartInputVal)}-${Number(this.specsEndInputVal)}`) != -1) {
this.$message({ this.$message({
message: `${this.specsStartInputVal}-${this.specsEndInputVal}规格值已经存在`, message: `${Number(this.specsStartInputVal)}-${Number(this.specsEndInputVal)}规格值已经存在`,
type: 'warning', type: 'warning',
customClass: 'message-Z-zinde' customClass: 'message-Z-zinde'
}) })
...@@ -1104,13 +1107,13 @@ export default { ...@@ -1104,13 +1107,13 @@ export default {
}) })
} }
if (this.isChange && !this.filterEmpty(this.specsStartInputVal) && !this.filterEmpty(this.specsEndInputVal)) { if (this.isChange && !this.filterEmpty(this.specsStartInputVal) && !this.filterEmpty(this.specsEndInputVal)) {
this.specsEditForm.specificationValueList[this.specsEditForm.specificationValueList.findIndex(i => i.specificationValue == this.tempTag)].specificationValue = `${this.specsStartInputVal}-${this.specsEndInputVal}` this.specsEditForm.specificationValueList[this.specsEditForm.specificationValueList.findIndex(i => i.specificationValue == this.tempTag)].specificationValue = `${Number(this.specsStartInputVal)}-${Number(this.specsEndInputVal)}`
this.specsInputVisible = false this.specsInputVisible = false
this.isChange = false this.isChange = false
this.changeIndex = null this.changeIndex = null
return return
} }
if (!this.filterEmpty(this.specsStartInputVal) && !this.filterEmpty(this.specsEndInputVal)) this.specsEditForm.specificationValueList.push({ specificationValue: `${this.specsStartInputVal}-${this.specsEndInputVal}` }) if (!this.filterEmpty(this.specsStartInputVal) && !this.filterEmpty(this.specsEndInputVal)) this.specsEditForm.specificationValueList.push({ specificationValue: `${Number(this.specsStartInputVal)}-${Number(this.specsEndInputVal)}` })
} }
this.$refs.specsRef?.clearValidate() this.$refs.specsRef?.clearValidate()
this.specsInputVisible = false this.specsInputVisible = false
......
...@@ -243,6 +243,7 @@ ...@@ -243,6 +243,7 @@
collapse-tags collapse-tags
@focus="carSeriesSelectFocus($event, subIndex)" @focus="carSeriesSelectFocus($event, subIndex)"
popper-class="service_select_class" popper-class="service_select_class"
clearable
:popper-append-to-body="false"> :popper-append-to-body="false">
</el-select> </el-select>
</td> </td>
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
</div> </div>
</div> </div>
<div class="speci-box" id="specificationDetailList"> <div class="speci-box" id="specificationDetailList">
<singleSpecificationForm ref="singleSpecificationFormRef" v-if="goodsInfoData.specificationType == '1'" <singleSpecificationForm ref="singleSpecificationFormRef" v-show="goodsInfoData.specificationType == '1'"
:product-service-item-list="productServiceItemList" :extend-service-part-list="extendServicePartList"> :product-service-item-list="productServiceItemList" :extend-service-part-list="extendServicePartList">
</singleSpecificationForm> </singleSpecificationForm>
<multipleSpecificationForm ref="multipleSpecificationFormRef" v-if="goodsInfoData.specificationType == '2'" <multipleSpecificationForm ref="multipleSpecificationFormRef" v-show="goodsInfoData.specificationType == '2'"
:product-service-item-list="productServiceItemList" :extend-service-part-list="extendServicePartList"> :product-service-item-list="productServiceItemList" :extend-service-part-list="extendServicePartList">
</multipleSpecificationForm> </multipleSpecificationForm>
</div> </div>
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<span style="margin-right: 10px;"> <span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9030703']" /> <auth-button :data="scope.scope" :show-btn-ids="['9030703']" />
</span> </span>
<auth-button :data="scope.scope" <auth-button :data="scope.scope" v-if="scope.scope.goodsInfo.scrmFlag != 'Y'"
:show-btn-ids="['9030706']" /> :show-btn-ids="['9030706']" />
</div> </div>
</d2-table> </d2-table>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!