| | |
| | | </FormItem> |
| | | <FormItem v-if="baseInfoForm.goodsType == 'PHYSICAL_GOODS'" class="form-item-view-el" label="商品类型"> |
| | | <Select |
| | | v-model="baseInfoForm.customizeGoodsType" |
| | | v-model="baseInfoForm.customizeFlag" |
| | | clearable |
| | | style="width: 160px" |
| | | @on-clear="handleGoodsType" |
| | |
| | | @on-change="editSkuItem(item.name, $index, item)"> |
| | | </AutoComplete> |
| | | |
| | | <!-- <iSwitch v-if="$index === 0" style="margin-left: 10px" size="small"--> |
| | | <!-- @on-change="changeSkuOpenImage" v-model="openImage"/>--> |
| | | <!-- <span v-if="$index === 0" style="margin-left: 5px">添加规格图片</span>--> |
| | | <iSwitch v-if="$index === 0" style="margin-left: 10px" size="small" |
| | | @on-change="changeSkuOpenImage" v-model="openImage"/> |
| | | <span v-if="$index === 0" style="margin-left: 5px">添加规格图片</span> |
| | | </div> |
| | | </FormItem> |
| | | |
| | |
| | | </Button> |
| | | </div> |
| | | |
| | | <!-- <Button class="add-sku-btn" size="small" type="warning" @click="handleClearSku">清空规格项--> |
| | | <!-- </Button>--> |
| | | <Button class="add-sku-btn" size="small" type="warning" @click="handleClearSku">清空规格项 |
| | | </Button> |
| | | </div> |
| | | </Panel> |
| | | <Panel name="2"> |
| | |
| | | ], |
| | | /** 发布商品基本参数 */ |
| | | baseInfoForm: { |
| | | customizeGoodsType:"", |
| | | customizeFlag:"", |
| | | virtualGoodsType:"", |
| | | salesModel: "RETAIL", |
| | | /** 商品相册列表 */ |
| | |
| | | }, |
| | | }); |
| | | console.log("上传成功", upData) |
| | | this.$nextTick(() => { |
| | | this.listImages.push(fileKey); |
| | | this.showListImages.push(sts.data.endpoint + "/" + fileKey); |
| | | this.baseInfoForm.goodsGalleryFiles.push(fileKey); |
| | | }) |
| | | // this.$nextTick(() => { |
| | | // this.listImages.push(fileKey); |
| | | // this.showListImages.push(sts.data.endpoint + "/" + fileKey); |
| | | // this.baseInfoForm.goodsGalleryFiles.push(fileKey); |
| | | // }) |
| | | |
| | | } catch (e) { |
| | | console.log("上传失败", upData) |
| | |
| | | } |
| | | ) |
| | | } |
| | | if(this.baseInfoForm.goodsType==="PHYSICAL_GOODS" &&this.baseInfoForm.customizeGoodsType==="CUSTOMIZE"){ |
| | | if(this.baseInfoForm.goodsType==="PHYSICAL_GOODS" &&this.baseInfoForm.customizeFlag==="CUSTOMIZE"){ |
| | | pushData.push({ |
| | | title:"定制商品模板", |
| | | slot:"CUSTOMIZE" |
| | |
| | | quantity: sku.quantity, |
| | | couponName:this.baseInfoForm.virtualGoodsType === "COUPON" ? sku.couponName:null, |
| | | couponId:this.baseInfoForm.virtualGoodsType === "COUPON" ? sku.couponId:null, |
| | | customizeTemplateName:this.baseInfoForm.customizeGoodsType === "CUSTOMIZE" ? sku.customizeTemplateName : null, |
| | | customizeTemplateId:this.baseInfoForm.customizeGoodsType === "CUSTOMIZE" ? sku.customizeTemplateId :null, |
| | | customizeTemplateName:this.baseInfoForm.customizeFlag === "CUSTOMIZE" ? sku.customizeTemplateName : null, |
| | | customizeTemplateId:this.baseInfoForm.customizeFlag === "CUSTOMIZE" ? sku.customizeTemplateId :null, |
| | | // alertQuantity: sku.alertQuantity, |
| | | sn: sku.sn, |
| | | images: [], |
| | |
| | | } |
| | | } |
| | | if(this.baseInfoForm.goodsType === "PHYSICAL_GOODS" && |
| | | this.baseInfoForm.customizeGoodsType === "CUSTOMIZE"){ |
| | | this.baseInfoForm.customizeFlag === "CUSTOMIZE"){ |
| | | if (sku.customizeTemplateId === null || sku.customizeTemplateId === undefined){ |
| | | this.$Message.error("请选择定制模板") |
| | | return; |