diff --git a/src/api/product/productAttr.js b/src/api/product/productAttr.js index de06fe7..e63d756 100644 --- a/src/api/product/productAttr.js +++ b/src/api/product/productAttr.js @@ -75,6 +75,18 @@ export default { data }) }, + getChannels() { + return request({ + url: `/${service_name}/mallProductSiteRelation/getAllChannels`, + method: 'get', + }) + }, + getCheckedSites(productId) { + return request({ + url: `/${service_name}/mallProductSiteRelation/getCheckedSites/${productId}`, + method: 'get', + }) + }, brandGetAll(data) { return request({ url: `/${service_name}/mallProductBrands/getAll`, diff --git a/src/utils/auth.js b/src/utils/auth.js index 6a55096..2940a49 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -1,6 +1,6 @@ import Cookies from 'js-cookie' -const TokenKey = 'Authorization' +const TokenKey = 'mall_Authorization' const NetWorkId = 'networkId' const UserName = 'username' const PassWord = 'password' diff --git a/src/views/product/productAdd/components/OilStationSelection.vue b/src/views/product/productAdd/components/OilStationSelection.vue index 293a434..bfff141 100644 --- a/src/views/product/productAdd/components/OilStationSelection.vue +++ b/src/views/product/productAdd/components/OilStationSelection.vue @@ -1,30 +1,94 @@ - + diff --git a/src/views/product/productAdd/index.vue b/src/views/product/productAdd/index.vue index e764d53..2032d07 100644 --- a/src/views/product/productAdd/index.vue +++ b/src/views/product/productAdd/index.vue @@ -36,7 +36,7 @@ - + - + @@ -1166,7 +1166,7 @@
{{ color }} @@ -3052,7 +3052,7 @@ export default { } .box-video-style { - width: 375px; + width: 375px; height: 211px; border-radius: 10px; background-color: #707070; @@ -3276,7 +3276,7 @@ export default { .ifam { width: 344px; height: 644px; - + background-size: 344px 644px; padding: 40px 20px; padding-top: 50px; diff --git a/src/views/product/productAdd/newIndex.vue b/src/views/product/productAdd/newIndex.vue index 3bf9a2b..d447d37 100644 --- a/src/views/product/productAdd/newIndex.vue +++ b/src/views/product/productAdd/newIndex.vue @@ -77,7 +77,7 @@ --> - - - + +
@@ -575,7 +576,7 @@ export default { this.$destroy(); }, methods: { - async chenkId() { + async chenkId() { if (this.$route.query && this.$route.query.id) { await this.getproductInfo(this.$route.query.id) } @@ -619,17 +620,17 @@ export default { } else { return null } - }).filter(item => item); + }).filter(item => item); setTimeout(() => { this.ManyAttrValue.forEach((item, index) => { let data = this.formValidate.stockList.find(i => i.attributeJson == JSON.stringify(item.data)); if (data) { Object.assign(item, data,{delect:false}) - }else{ - Object.assign(item, data,{delect:true}) + }else{ + Object.assign(item, data,{delect:true}) } }) - this.ManyAttrValue = this.ManyAttrValue.filter(item=>!item.delect) + this.ManyAttrValue = this.ManyAttrValue.filter(item=>!item.delect) }, 1000) }) }, @@ -645,6 +646,9 @@ export default { }, delectOilStationSelectionList(e, index) { this.OilStationSelectionList.splice(index, 1) + if (this.$refs.selectSites&&this.$refs.selectSites.checkedSites){ + this.$refs.selectSites.checkedSites = this.$refs.selectSites.checkedSites.filter(site => e.siteId !== site.siteId); + } }, oilStationSelectionSubmit(e) { this.OilStationSelectionList = e @@ -1181,6 +1185,10 @@ export default { }, handleSubmitNest(name) { console.log(this.formValidate,"handleSubmitNest") + if (this.formValidate.attr<1){ + this.$message.error('规格属性不能为空') + return + } this.$refs[name].validate(valid => { if (valid) { if (this.currentTab++ > 2) this.currentTab = 0 @@ -1235,7 +1243,7 @@ export default { skuNum, id } - }) + }) this.formValidate[isRecommendOrNewMark] = '1' loadingFn.call( this, @@ -1253,7 +1261,7 @@ export default { if (res.code == 20000) { this.$message.success('操作成功') setTimeout(() => { - this.$router.push({ path: 'productList' }) + this.$router.push({ path: 'productList', query: { refresh: true }}) // this.$destroy() }, 1000) }