From 94c0d44a5eb71066f50ccf677835b2bd09e13bde Mon Sep 17 00:00:00 2001 From: 15820893422 <1978476055@qq.com> Date: Tue, 7 May 2024 11:11:12 +0800 Subject: [PATCH] edit --- src/views/product/addProduct/index.vue | 73 +++++++++++--------------- 1 file changed, 30 insertions(+), 43 deletions(-) diff --git a/src/views/product/addProduct/index.vue b/src/views/product/addProduct/index.vue index dd82dd6..0d88161 100644 --- a/src/views/product/addProduct/index.vue +++ b/src/views/product/addProduct/index.vue @@ -358,7 +358,7 @@ @@ -608,12 +608,12 @@ @@ -648,12 +648,12 @@ @@ -688,12 +688,12 @@ @@ -727,12 +727,12 @@ @@ -766,12 +766,12 @@ @@ -2617,23 +2617,7 @@ export default { this.setTagsViewTitle() this.getInfo() } else { - this.formValidate.qualification = { - production_name: '', - businessList: [], - licenceList: [], - trademarkList: [], - authorizedList: [], - commodityList: [], - otherList: [], - importBusinessList: [], - importAuthorizedList: [], - customsList: [], - packingList: [], - importOtherList: [], - commodity_type: 0, - brands_name: '', - import_name: '' - } + this.formValidate.qualification = Object.assign({}, defaultObj.qualification) this.getSpecsLst(this.formValidate.cate_id) this.productCon() if (this.deduction_set == -1) this.formValidate.integral_rate = -1 @@ -2698,7 +2682,7 @@ export default { console.log(file); // 预览pdf if (['application/pdf'].includes(file.type)) { - window.open(file.response.data.src) + window.open(file.url) return } // 预览pdf图片 @@ -2724,9 +2708,11 @@ export default { if (fileList.every(item => item.status == "success")) { let arr = [] fileList.map(item => { - item.response && arr.push({ ...item,url: item.response.data.src,type:item.raw.type||item.type}) + arr.push({ name:item.name,uid:item.uid,url: item?.response?.data?.src||item.url,type:item?.raw?.type||item.type}) }) + console.log(fileList); this.formValidate.qualification[name] = arr + console.log(this.formValidate.qualification[name]); } } }, @@ -3738,7 +3724,7 @@ export default { audit_type:info.audit_type, extend: info.extend || [], svip_price_type: info.svip_price_type || 0, - qualification:info.qualification, + qualification:info.qualification || Object.assign({}, defaultObj.qualification), is_huimei:info.is_huimei }; console.log(info.qualification); @@ -3830,6 +3816,7 @@ export default { console.log(this.currentTab) }, handleSubmitNest(name) { + console.log(this.formValidate); if (this.formValidate.spec_type === 1 && this.currentTab=='3') { let mode = this.ManyAttrValue.every(item=>{ return !(+item.ot_price