Commit f5bfd046 by cwq0219

建议价

1 parent 2a47abb4
...@@ -540,6 +540,7 @@ export default { ...@@ -540,6 +540,7 @@ export default {
this.autoGenerate() this.autoGenerate()
}) })
}, },
// 改建议价
packageToPrice() { packageToPrice() {
var targetItem = this.packageList.find(item => item.packageCode == this.editForm.packageCode) var targetItem = this.packageList.find(item => item.packageCode == this.editForm.packageCode)
this.editForm.suggestedSellingPrice = '' this.editForm.suggestedSellingPrice = ''
...@@ -557,11 +558,14 @@ export default { ...@@ -557,11 +558,14 @@ export default {
var targetItem = this.packageList.find(item => item.packageCode == this.editForm.packageCode) var targetItem = this.packageList.find(item => item.packageCode == this.editForm.packageCode)
this.packageToPrice() this.packageToPrice()
// console.log(this.editForm) // console.log(this.editForm)
var tempObj = this.$common.utils.deepClone(this.editFormPro)
this.editRulePro = {} this.editRulePro = {}
this.editFormPro = {} this.editFormPro = {}
var attrName = ''
targetItem && targetItem.groupAttributeList.forEach(item => { targetItem && targetItem.groupAttributeList.forEach(item => {
if (item.attributeList.length == 1) { if (item.attributeList.length == 1) {
this.$set(this.editFormPro, item.attributeList[0].attributeName, '') attrName = item.attributeList[0].attributeName
this.$set(this.editFormPro, attrName, tempObj.hasOwnProperty(attrName) ? tempObj[attrName] : '')
if (item.attributeList[0].required == 1) { if (item.attributeList[0].required == 1) {
this.editRulePro[item.attributeList[0].attributeName] = [ this.editRulePro[item.attributeList[0].attributeName] = [
{ {
...@@ -571,6 +575,13 @@ export default { ...@@ -571,6 +575,13 @@ export default {
} }
] ]
} }
} else {
for(var i = 0; i < item.num; i++) {
item.attributeList.forEach(k => {
attrName = k.attributeName
this.$set(this.editFormPro, attrName + i, tempObj.hasOwnProperty(attrName + i) ? tempObj[attrName + i] : '')
})
}
} }
}) })
if (recovery) { if (recovery) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!