From d5e803e354f92b34df4245fc168d8142b4cf07f8 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期三, 02 七月 2025 23:23:26 +0800
Subject: [PATCH] 会员标签
---
seller/src/views/goods/goods-seller/goodsOperationSec.vue | 80 ++++++++++++++++++++++++---------------
1 files changed, 49 insertions(+), 31 deletions(-)
diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue
index ce33407..c78ec8b 100644
--- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue
+++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue
@@ -26,13 +26,13 @@
<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">
@@ -101,7 +101,7 @@
</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"
@@ -151,11 +151,11 @@
<!-- </div>-->
<div style="color: grey" v-if="!baseInfoForm.goodsVideo">涓诲浘浠呮敮鎸乸ng锛宩pg锛宩peg鏍煎紡锛屽楂樿嚦灏�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>
- <video :src="baseInfoForm.showGoodsVideo" class="video" controls style="max-width: 300px;"/>
+ <video :src="baseInfoForm.showGoodsVideo" class="video" controls style="max-width: 300px;max-height: 400px"/>
</div>
</div>
<Upload ref="upload" action="-" :format="['avi', 'wmv', 'mpeg', 'mp4', 'mov']"
@@ -383,6 +383,7 @@
</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"
@@ -396,6 +397,7 @@
<FormItem class="form-item-view-el" label="绉诲姩绔弿杩�" prop="skuList" style="width: 100%">
<editor
+ :show-upload="false"
ref="introEditor"
v-model="baseInfoForm.mobileIntro"
height="800px"
@@ -496,7 +498,7 @@
<!--</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">
@@ -748,6 +750,11 @@
if (val) {
this.initVideo();
}
+ },
+ showListImages(newValue){
+ this.baseInfoForm.goodsGalleryFiles = newValue.map(item => {
+ return item.split('/').slice(-2).join('/')
+ })
}
},
methods: {
@@ -776,10 +783,10 @@
},
// ship澶у皬涓嶆纭�
handleVideoMaxSize(file) {
- this.$Notice.warning({
- title: "瓒呰繃鏂囦欢澶у皬闄愬埗",
- desc: "瑙嗛澶у皬涓嶈兘瓒呰繃10MB",
- });
+ // this.$Notice.warning({
+ // title: "瓒呰繃鏂囦欢澶у皬闄愬埗",
+ // desc: "瑙嗛澶у皬涓嶈兘瓒呰繃10MB",
+ // });
},
onAddSku(index) {
if (!this.newSkuValues[index]) {
@@ -1234,7 +1241,8 @@
this.renderGoodsDetailSku(response.result.skuList);
/** 鏌ヨ鍝佺墝鍒楄〃 */
- this.getGoodsBrandList();
+ //todo 绉婚櫎鍝佺墝姒傚康
+ // this.getGoodsBrandList();
/** 鏌ヨ搴楅摵鍟嗗搧鍒嗙被 */
this.GET_ShopGoodsLabel();
@@ -1254,7 +1262,7 @@
this.firstData.goodsType &&
(this.baseInfoForm.goodsType = this.firstData.goodsType);
/** 鏌ヨ鍟嗗搧鍙傛暟 */
- this.GET_GoodsParams();
+ // this.GET_GoodsParams();
},
// 娓叉煋sku鏁版嵁
renderGoodsDetailSku(skuList) {
@@ -1924,14 +1932,19 @@
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 = "";
@@ -2224,12 +2237,17 @@
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();
// 鑾峰彇褰撳墠搴楅摵鍒嗙被
--
Gitblit v1.8.0