| | |
| | | <FormItem label="商品卖点" prop="sellingPoint"> |
| | | <Input v-model="baseInfoForm.sellingPoint" :rows="4" style="width: 260px" type="textarea"/> |
| | | </FormItem> |
| | | <FormItem label="商品品牌" prop="brandId"> |
| | | <Select v-model="baseInfoForm.brandId" filterable style="width: 200px"> |
| | | <Option v-for="item in brandList" :key="item.id" :label="item.name" :value="item.id"></Option> |
| | | </Select> |
| | | <Button class="refresh-icon" icon="md-refresh" shape="circle" type="text" |
| | | @click="refresh('brand')"></Button> |
| | | </FormItem> |
| | | <!-- <FormItem label="商品品牌" prop="brandId">--> |
| | | <!-- <Select v-model="baseInfoForm.brandId" filterable style="width: 200px">--> |
| | | <!-- <Option v-for="item in brandList" :key="item.id" :label="item.name" :value="item.id"></Option>--> |
| | | <!-- </Select>--> |
| | | <!-- <Button class="refresh-icon" icon="md-refresh" shape="circle" type="text"--> |
| | | <!-- @click="refresh('brand')"></Button>--> |
| | | <!-- </FormItem>--> |
| | | </div> |
| | | <h4>商品交易信息</h4> |
| | | <div class="form-item-view"> |
| | |
| | | </div> |
| | | <h4>商品规格及图片</h4> |
| | | <div class="form-item-view"> |
| | | <FormItem class="form-item-view-el required" label="主图" prop="goodsGalleryFiles" v-if=" baseInfoForm.goodsVideo ==null || baseInfoForm.goodsVideo ===''"> |
| | | <FormItem class="form-item-view-el required" label="主图" prop="goodsGalleryFiles" > |
| | | <div style="display: flex; flex-wrap: wrap;"> |
| | | <vuedraggable :animation="200" :list="showListImages"> |
| | | <div v-for="(item, __index) in showListImages" :key="__index" |
| | |
| | | <!-- </div>--> |
| | | <div style="color: grey" v-if="!baseInfoForm.goodsVideo">主图仅支持png,jpg,jpeg格式,宽高至少600*600px,大小2M内</div> |
| | | </FormItem> |
| | | <FormItem class="form-item-view-el" label="视频" prop="goodsVideo" v-if="!(baseInfoForm.goodsGalleryFiles !=null &&baseInfoForm.goodsGalleryFiles.length>0)"> |
| | | <FormItem class="form-item-view-el" label="视频" prop="goodsVideo" > |
| | | <div class="goods-video"> |
| | | <div v-if="baseInfoForm.goodsVideo"> |
| | | <div> |
| | |
| | | </div> |
| | | <FormItem class="form-item-view-el" label="PC商品描述" prop="intro" style="width: 100%"> |
| | | <editor |
| | | :show-upload="false" |
| | | ref="editor" |
| | | v-model="baseInfoForm.intro" |
| | | height="800px" |
| | |
| | | |
| | | <FormItem class="form-item-view-el" label="移动端描述" prop="skuList" style="width: 100%"> |
| | | <editor |
| | | :show-upload="false" |
| | | ref="introEditor" |
| | | v-model="baseInfoForm.mobileIntro" |
| | | height="800px" |
| | |
| | | <!--</Modal>--> |
| | | <!-- todo web--> |
| | | <Modal v-model="picModelFlag" width="1200px"> |
| | | <!-- <ossManage ref="ossManage" :isComponent="true" :initialize="picModelFlag" @callback="callbackSelected" @selected="(list)=>{ selectedImage = list}"/>--> |
| | | <!-- <ossManage ref="ossManRage" :isComponent="true" :initialize="picModelFlag" @callback="callbackSelected" @selected="(list)=>{ selectedImage = list}"/>--> |
| | | <div class="demo-upload-list" v-for="(item,index) in showListImages"> |
| | | <template> |
| | | <img :src="item"> |
| | |
| | | if (val) { |
| | | this.initVideo(); |
| | | } |
| | | }, |
| | | showListImages(newValue){ |
| | | this.baseInfoForm.goodsGalleryFiles = newValue.map(item => { |
| | | return item.split('/').slice(-2).join('/') |
| | | }) |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | // ship大小不正确 |
| | | handleVideoMaxSize(file) { |
| | | this.$Notice.warning({ |
| | | title: "超过文件大小限制", |
| | | desc: "视频大小不能超过10MB", |
| | | }); |
| | | // this.$Notice.warning({ |
| | | // title: "超过文件大小限制", |
| | | // desc: "视频大小不能超过10MB", |
| | | // }); |
| | | }, |
| | | onAddSku(index) { |
| | | if (!this.newSkuValues[index]) { |
| | |
| | | this.renderGoodsDetailSku(response.result.skuList); |
| | | |
| | | /** 查询品牌列表 */ |
| | | this.getGoodsBrandList(); |
| | | //todo 移除品牌概念 |
| | | // this.getGoodsBrandList(); |
| | | |
| | | /** 查询店铺商品分类 */ |
| | | this.GET_ShopGoodsLabel(); |
| | |
| | | this.firstData.goodsType && |
| | | (this.baseInfoForm.goodsType = this.firstData.goodsType); |
| | | /** 查询商品参数 */ |
| | | this.GET_GoodsParams(); |
| | | // this.GET_GoodsParams(); |
| | | }, |
| | | // 渲染sku数据 |
| | | renderGoodsDetailSku(skuList) { |
| | |
| | | this.baseInfoForm.goodsId = this.goodsId; |
| | | let submit = JSON.parse(JSON.stringify(this.baseInfoForm)); |
| | | console.log('----------------->提交',submit); |
| | | // if ( |
| | | // (submit.goodsGalleryFiles && |
| | | // submit.goodsGalleryFiles.length <= 0) && !submit.goodsVideo |
| | | // ) { |
| | | // this.submitLoading = false; |
| | | // this.$Message.error("请上传商品图片或者视频"); |
| | | // return; |
| | | // } |
| | | if ( |
| | | submit.goodsGalleryFiles && |
| | | submit.goodsGalleryFiles.length <= 0 |
| | | ) { |
| | | this.submitLoading = false; |
| | | this.$Message.error("请上传商品图片"); |
| | | return; |
| | | } |
| | | if (!submit.goodsVideo){ |
| | | this.submitLoading = false; |
| | | this.$Message.error("请上传商品视频"); |
| | | return; |
| | | } |
| | | if (submit.templateId === "") submit.templateId = 0; |
| | | let flag = false; |
| | | let paramValue = ""; |
| | |
| | | this.baseInfoForm.goodsType = this.firstData.goodsType; |
| | | |
| | | |
| | | /** 获取该商城分类下 商品参数信息 */ |
| | | this.GET_GoodsParams(); |
| | | /** 查询品牌列表 */ |
| | | this.getGoodsBrandList(); |
| | | /** 查询分类绑定的规格信息 */ |
| | | this.Get_SkuInfoByCategory(this.categoryId); |
| | | |
| | | |
| | | if (this.categoryId!=null && this.categoryId!=='') { |
| | | /** 获取该商城分类下 商品参数信息 */ |
| | | this.GET_GoodsParams(); |
| | | console.log('分类id------------------>',this.categoryId); |
| | | /** 查询分类绑定的规格信息 */ |
| | | this.Get_SkuInfoByCategory(this.categoryId); |
| | | /** 查询品牌列表 */ |
| | | this.getGoodsBrandList(); |
| | | } |
| | | // 获取商品单位 |
| | | this.GET_GoodsUnit(); |
| | | // 获取当前店铺分类 |