Commit 44a77dcf by 张立顺

fix bug

1 parent 36861bb7
......@@ -1915,7 +1915,7 @@ export default {
// let _price = this.editForm.vehicle.invoicePrice
_list.forEach(item => {
// 套餐商品不做过滤 没有这个字段也给全部默认显示
if (!item.vehicleSeriesConfigs || (item.vehicleSeriesConfigs && item.vehicleSeriesConfigs.some(ele => ele.vehicleSeriesId == cartype))) {
if (item.parentId || !item.vehicleSeriesConfigs || (item.vehicleSeriesConfigs && item.vehicleSeriesConfigs.some(ele => ele.vehicleSeriesId == cartype))) {
list2.push(item)
} else {
if (this.autoPackageCodeList.includes(item.packageCode)) {
......@@ -1938,7 +1938,7 @@ export default {
let _list = []
this.copyCustomProductList.forEach(item => {
// 套餐商品不做过滤 没有这个字段也给全部默认显示
if (!item.vehicleSeriesConfigs || (item.vehicleSeriesConfigs && item.vehicleSeriesConfigs.some(ele => ele.vehicleSeriesId == cartype))) {
if (item.parentId || !item.vehicleSeriesConfigs || (item.vehicleSeriesConfigs && item.vehicleSeriesConfigs.some(ele => ele.vehicleSeriesId == cartype))) {
_list.push(item)
} else {
if (this.autoPackageCodeList.includes(item.packageCode)) {
......
......@@ -89,8 +89,8 @@ export default {
}
}
var specificationDetailListOther = (rule, value, callback) => {
console.log(this.formObj.specificationDetailList, 'this.formObj.specificationDetailList')
if (!this.formObj.specificationDetailList.some(item => item.useStatus == 0)) {
console.log(this.goodsInfoData, 'this.formObj.specificationDetailList')
if (this.goodsInfoData.specificationDetailList.length == 0 || !this.goodsInfoData.goodsSpecificationList.some(item => item.useStatus != 1)) {
callback(new Error('至少启用一个规格'))
} else {
callback()
......@@ -117,8 +117,8 @@ export default {
],
contractList: [{ required: true, message: '请选择关联合同', trigger: ['blur', 'change'] }],
specificationDetailList: [
{ required: true, message: '请选择规格', trigger: ['blur', 'change'] },
{ validator: specificationDetailListOther, trigger: 'blur' }
// { required: true, message: '请选择规格', trigger: ['change'] },
{ validator: specificationDetailListOther, trigger: 'change' }
]
},
formObj: {
......@@ -132,7 +132,7 @@ export default {
placeholder: '请输入服务项目名称',
type: 'input',
isDisabled: false,
maxlength: 50
maxlength: 20
},
{
label: '服务介绍:',
......
......@@ -18,7 +18,7 @@
</el-tooltip> -->
</th>
<th :key="index">
滴加成本
嘀加成本
<!-- <el-tooltip class="item" effect="dark" content="提示待运营提供" placement="top">
<img class="tip" :src="require('@/assets/tip.png')" />
</el-tooltip> -->
......
......@@ -139,11 +139,11 @@ export default {
}
}
</script>
<style lang="scss" >
<style lang="scss" scoped >
.relateStore .table {
margin: 0 auto 20px !important;
}
.relateStore .tableCon {
.tableCon {
width: 100%;
margin-top: 20px;
display: flex;
......@@ -168,26 +168,4 @@ export default {
.d2-form .relateStore .el-table--medium td {
padding: 6px 8px !important;
}
.relateStore .red {
color: red;
}
.relateStore .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
.pagination {
.el-pager {
line-height: 20px;
}
}
</style>
......@@ -73,7 +73,7 @@
</el-popover>
</el-input>
</td>
<td>
<td class="select">
<el-select ref="chooseProjectName" placeholder="车型" :disabled="routeInfo.type == 2" size="small" multiple collapse-tags :class="{ 'w-200-per': false }" v-model="subItem.seriesConfigList" @focus="carTypeSelect(false, subItem, subIndex)" value-key="seriesId">
<el-option v-for="item in subItem.seriesConfigList" :key="item.vehicleSeriesId" :label="item.vehicleSeriesName" :value="item"></el-option>
</el-select>
......@@ -105,7 +105,7 @@
<el-form-item label="规格值:" prop="specificationValueList">
<el-tag style="margin-right: 10px" v-for="(tag, i) in spescEditForm.specificationValueList" :key="i" @click="changeValue(tag, i)" closable @close="handleSpescDelete(tag)">{{ tag.specificationValue }}</el-tag>
<!-- <el-input min="0" max="100" clearable type="number" step="0.0001" class="!w-[120px]" placeholder="输入检测值" v-model="value" @input="value = value.replace(/^(100|[1-9]?\d)(\.\d{0,4})?.*$/, '$1$2')"></el-input> -->
<el-input class="input-new-tag" v-if="specsInputVisible && spescEditForm.type == 0" v-model="spescInputVal" maxlength="10" ref="saveSpescInput" size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm"></el-input>
<el-input class="input-new-tag" v-if="specsInputVisible && spescEditForm.type == 0" v-model="spescInputVal" maxlength="20" ref="saveSpescInput" size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm"></el-input>
<el-input min="0" max="100" type="number" class="input-new-tag" v-else-if="specsInputVisible && spescEditForm.type != 3" v-model="spescInputVal" ref="saveSpescInput" @input="spescInputVal = spescInputVal.replace(/^(100|[1-9]?\d).*$/, '$1')" size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm"></el-input>
<input-number-range v-else-if="specsInputVisible && spescEditForm.type == 3" :disabled="false" :precision="num" :spescInputVal="spescInputVal" @confirm="handleInputConfirmMue" @input="spescInputVal = spescInputVal.replace(/^(100|[1-9]?\d)(\.\d{0,4})?.*$/, '$1$2')"></input-number-range>
<el-button v-else class="button-new-tag" size="small" @click="showInput">+ 规格值</el-button>
......@@ -178,22 +178,6 @@ export default {
specificationValueList: []
}
],
equitySceneType: [], // 权益类目
extendedPosiType: [], // 延保类
batchObj: {
type: '',
thirdPartyCode: '',
upgradePrice: '',
warningValue: '',
warningValueMax: '',
warrantyPeriod: '',
purchasePrice: '',
serviceYears: '',
insuranceCost: '', // 投保成本,单位元
shelfCost: '', // 上架成本,单位元
salesCost: '', // salesCost
useStatus: 0
},
batchSubmitted: {
upgradePriceEmpty: false,
purchasePriceEmpty: false,
......@@ -290,7 +274,7 @@ export default {
let _this = this
console.log(_this.$refs.chooseProjectName[rowindex])
_this.$refs.chooseProjectName[rowindex].blur()
item && _this.$refs.chooseProjectName[rowindex].blur()
if (!type) {
this.carSelectName = item.specsValueList
......@@ -530,7 +514,6 @@ export default {
this.computedTableWidth(this.goodsInfoData.goodsType)
console.log(this.goodsInfoData, 'goodsInfoData')
const copySpecificationValueList = JSON.parse(JSON.stringify(this.goodsInfoData.goodsSpecificationList))
// const copySpecificationValueList = JSON.parse(JSON.stringify(this.goodsInfoData.goodsSpecificationList))
const copyDetailLength = this.goodsInfoData.goodsSpecificationNameList?.length
const copyDetailData = this.goodsInfoData.goodsSpecificationNameList
this.goodsInfoData.goodsSpecificationList = []
......@@ -541,6 +524,7 @@ export default {
markIdx = 0
// 规格名有变化 需清空id
if (copyDetailLength && this.goodsInfoData.specificationDetailList[i]?.specificationName !== copyDetailData[i]?.specificationName) {
console.log(this.goodsInfoData.specificationDetailList[i]?.specificationName, copyDetailData[i]?.specificationName)
flag = false
delete this.goodsInfoData.specificationDetailList[i]?.id
}
......@@ -554,16 +538,10 @@ export default {
specsValueList: [this.goodsInfoData.specificationDetailList[i]?.specificationValueList[j]?.specificationValue],
type: '',
thirdPartyCode: '',
// upgradePrice: this.equitySceneType.includes(this.goodsInfoData.goodsType) && this.baseConfig.supplierCode.includes(`${this.goodsInfoData.supplierCode}`) ? 0 : '',
upgradePrice: this.equitySceneType.includes(this.goodsInfoData.goodsType) ? 0 : '',
warningValue: '',
warningValueMax: '',
warrantyPeriod: '5',
editGoodNameInput: false,
serviceItemArr: [],
serviceYears: '',
entityCardFlag: false,
extendServiceItemArr: [],
insuranceCost: '', // 投保成本,单位元
shelfCost: '', // 上架成本,单位元
salesCost: '', // salesCost
......@@ -574,8 +552,11 @@ export default {
var targetValLen = this.goodsInfoData.specificationDetailList[i]?.specificationValueList?.length
var loopNum = 0
var tempMarkIdx = 0
// debugger
if (j == 0 && targetValLen > 1) {
var obj = JSON.parse(JSON.stringify(this.goodsInfoData.goodsSpecificationList))
console.log(obj, 'obj')
this.goodsInfoData.goodsSpecificationList = []
obj.forEach(item => {
for (var k = 0; k < targetValLen; k++) {
......@@ -593,28 +574,15 @@ export default {
}
}
}
this.batchObj = {
upgradePrice: '',
warningValue: '',
warningValueMax: '',
warrantyPeriod: '',
type: '',
thirdPartyCode: '',
purchasePrice: '',
serviceYears: '',
insuranceCost: '', // 投保成本,单位元
shelfCost: '', // 上架成本,单位元
salesCost: '', // salesCost
useStatus: 0
}
this.goodsInfoData.goodsSpecificationList.forEach(item => {
for (var i = 0; i < copySpecificationValueList.length; i++) {
var temp = copySpecificationValueList[i]
console.log(flag, !restData, temp.specificationData, item.specsValueList.join(';~;'), '!restData')
console.log(temp.specificationData)
console.log(item.specsValueList.join(';~;'))
if (temp.specificationData == item.specsValueList.join(';~;') && flag && !restData) {
console.log(temp, item, flag, !restData, temp.specificationData, item.specsValueList.join(';~;'), '!restData')
item.id = temp.id ? temp.id : ''
// item.upgradePrice = this.equitySceneType.includes(this.goodsInfoData.goodsType) && this.baseConfig.supplierCode.includes(`${this.goodsInfoData.supplierCode}`) ? 0 : temp.upgradePrice
item.upgradePrice = this.equitySceneType.includes(this.goodsInfoData.goodsType) ? 0 : temp.upgradePrice
item.warningValue = temp.warningValue
item.warningValueMax = temp.warningValueMax
item.position = temp.position
......@@ -622,20 +590,17 @@ export default {
item.thirdPartyCode = temp.thirdPartyCode
item.purchasePrice = temp.purchasePrice
item.warrantyPeriod = temp.warrantyPeriod || '5'
;(item.serviceItemArr = temp.upgradeGoodsServiceItemsList?.map(v => {
return v.serviceCode
})),
(item.serviceYears = temp.serviceYears)
item.entityCardFlag = temp.entityCardFlag
item.insuranceCost = temp.insuranceCost
item.shelfCost = temp.shelfCost
item.salesCost = temp.salesCost
item.useStatus = temp.useStatus
item.seriesConfigList = temp.seriesConfigList
item.specificationData = temp.specificationData
break
}
}
})
console.log(this.goodsInfoData.goodsSpecificationList, 'this.goodsInfoData.goodsSpecificationList')
},
// 校验型号
handleTypeInput(newValue, index) {
......@@ -780,6 +745,11 @@ export default {
color: #999999;
}
}
.select {
::v-deep .el-select .el-tag {
max-width: 77%;
}
}
.w-320 {
width: 320px !important;
}
......
......@@ -316,7 +316,7 @@ export default {
})
} else {
val?.detailList?.forEach((v, index) => {
val.content = `【${val.recordType == 1 ? '删除' : '修改'}】状态:${val.useStatus ? '禁用' : '启用'},`
val.content = `【${val.recordType == 1 ? '删除' : '修改'}】,`
childContent = `${v.fieldName}由${v.beforeValue}${v.valueUnit || ''}变为${v.afterValue}${v.valueUnit || ''}${index < val?.detailList?.length - 1 ? ',' : ''}`
val.content += childContent
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!