pull/6/head^2
dt_2916866708 10 months ago
parent 38a04d24b4
commit 3f76c2bf9a
  1. 13
      src/views/product/productAdd/newIndex.vue

@ -527,8 +527,7 @@ export default {
console.log(res, "productAddGetSites")
})
},
inverseAnalysis(data) {
console.log(data,"data")
async inverseAnalysis(data) {
let { categoryOneId, categoryTwoId } = data;
let categorys = [categoryOneId, categoryTwoId];
this.OilStationSelectionList = data.siteInfos;
@ -538,11 +537,8 @@ export default {
});
this.$refs.CustomUpload.fileList = [...this.formValidate.images.filter(item=>item.mainMark=="1")];
this.$refs.CustomLBUpload.fileList = [...this.formValidate.images.filter(item=>item.mainMark!="1")] ;
this.confirm();
await this.confirm();
this.$nextTick(()=>{
setTimeout(() => {
console.log(this.formValidate,"this.formValidate.arr")
}, 1000);
this.formValidate.attr = this.formValidate.attr.map(item=>{
let align = this.formValidate.checkedList.find(i=>item.id==i.attributeId);
if(align){
@ -562,7 +558,6 @@ export default {
let data = this.formValidate.stockList.find(i=>i.attributeJson==JSON.stringify(item.data))
if(data){
Object.assign(item,data);
console.log(data,item,"datadatadatadata")
}
})
}, 1000);
@ -776,13 +771,15 @@ export default {
if (num) this.productGetRule()
},
//
async confirm() {
async confirm(is=true) {
this.isAttr = true
if(is){
if (!this.formValidate.attributesTypeId) {
return this.$message.warning('请选择属性')
}
await this.productGetRule();
this.formValidate.attr = JSON.parse(JSON.stringify(this.ruleList.find(item => item.id == this.formValidate.attributesTypeId).attributesList));
}
},
//
getCategorySelect() {

Loading…
Cancel
Save