Commit f9fc8536 by zhangxw

bug修复

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