提交 3490e6bb 编写于 作者: yafei.li's avatar yafei.li

Merge branch 'feature/3.22.0-bh-lyf' into 'testing/3.22.0-bh'

添加业务类型

See merge request com.pica.cloud.education.frontend/pica.cloud.web-education-admin!361
...@@ -10,7 +10,7 @@ export const envConfig = { ...@@ -10,7 +10,7 @@ export const envConfig = {
// baseUrl: 'https://uat-sc.yunqueyi.com/', // baseUrl: 'https://uat-sc.yunqueyi.com/',
// baseUrl: 'http://10.177.15.150:10401/', // baseUrl: 'http://10.177.15.150:10401/',
// baseUrl: 'http://10.177.15.150:11905/', // baseUrl: 'http://10.177.15.150:11905/',
baseUrl: 'https://sc.yunqueyi.com/', baseUrl: 'https://dev-sc.yunqueyi.com/',
// baseUrl: 'https://test1-sc.yunqueyi.com/', // baseUrl: 'https://test1-sc.yunqueyi.com/',
// baseUrl: 'https://sc.yunqueyi.com/', // baseUrl: 'https://sc.yunqueyi.com/',
// baseUrl: 'https://uat-sc.yunqueyi.com/', // baseUrl: 'https://uat-sc.yunqueyi.com/',
......
...@@ -133,3 +133,14 @@ export const getTypeCodeList = () => { ...@@ -133,3 +133,14 @@ export const getTypeCodeList = () => {
}); });
}; };
export const getBusinessCategory = () => {
return fetch({
headers,
url: getBaseUrl(`store/category/businessCategory/0`),
method: "get",
description: "查询业务类型",
});
};
...@@ -45,8 +45,7 @@ ...@@ -45,8 +45,7 @@
maxlength="40" maxlength="40"
show-word-limit show-word-limit
></el-input> ></el-input>
<span class="word-tip">此文案可摘取药品说明书【功能主治】or【适应症】</span> <span class="word-tip">此文案可摘取药品说明书【功能主治】or【适应症】</span>
<!-- <span class="word-num">{{(formData.goodsDescription).replace(/\s+/g,"").length}}/1000</span> -->
</el-col> </el-col>
</el-form-item> </el-form-item>
...@@ -59,7 +58,7 @@ ...@@ -59,7 +58,7 @@
:before-upload="beforeUploadPic" :before-upload="beforeUploadPic"
multiple multiple
:on-exceed="imgExceed" :on-exceed="imgExceed"
:limit="6" :limit="6"
> >
<div class="file-pics" v-if="fileGoodsList.length > 0" :key="index" v-for="(item,index) in fileGoodsList"> <div class="file-pics" v-if="fileGoodsList.length > 0" :key="index" v-for="(item,index) in fileGoodsList">
<img :src="item.url" @mouseover.stop="headIndex=index" class="bg-img"/> <img :src="item.url" @mouseover.stop="headIndex=index" class="bg-img"/>
...@@ -92,27 +91,40 @@ ...@@ -92,27 +91,40 @@
:show-file-list="false" :show-file-list="false"
:disabled="videoList.length == 1" :disabled="videoList.length == 1"
:limit="1" :limit="1"
action="#" action="#"
class="bg-uploader" class="bg-uploader"
> >
<video id="introVideoLecture" :src="videoModel.videoFullPath" controls preload style="width: 100%;" v-if="videoList.length == 1"> <video id="introVideoLecture" :src="videoModel.videoFullPath" controls preload style="width: 100%;" v-if="videoList.length == 1">
视频 视频
</video> </video>
<img class="bg-img" src="../../assets/image/video.png" v-if="videoList.length <1"/> <img class="bg-img" src="../../assets/image/video.png" v-if="videoList.length <1"/>
<div class="limit-text" v-if="videoList.length <1"> <div class="limit-text" v-if="videoList.length <1">
<p>建议大小:20M以内</p> <p>建议大小:20M以内</p>
<p>仅支持MP4格式</p> <p>仅支持MP4格式</p>
<P>视频名称必须包含3个下划线:举例(YQ_01_02_03.mp4)</P> <P>视频名称必须包含3个下划线:举例(YQ_01_02_03.mp4)</P>
</div> </div>
</el-upload> </el-upload>
<el-progress :text-inside="true" :stroke-width="16" :percentage="uploadProgress" status="success" class="video-progress" <el-progress :text-inside="true" :stroke-width="16" :percentage="uploadProgress" status="success" class="video-progress"
v-show="uploadProgress>0&&uploadProgress<100"> v-show="uploadProgress>0&&uploadProgress<100">
</el-progress> </el-progress>
<el-button class="dl-video" icon="el-icon-delete" circle @click="deleteVideo" v-if="videoList.length == 1"></el-button> <el-button class="dl-video" icon="el-icon-delete" circle @click="deleteVideo" v-if="videoList.length == 1"></el-button>
</el-form-item> </el-form-item>
<el-form-item label="业务类型" prop="businessCategoryId">
<el-select
v-model="formData3.businessCategoryId"
placeholder="请选择业务类型"
size="small"
>
<el-option
v-for="item in businessCategoryList"
:key="item.id"
:label="item.categoryName"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="商品类型" prop="goodsType"> <el-form-item label="商品类型" prop="goodsType">
<el-select <el-select
v-model="formData3.goodsType" v-model="formData3.goodsType"
...@@ -128,6 +140,8 @@ ...@@ -128,6 +140,8 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否支持售后" prop="expressLimitFlag" v-if="storeType < 3"> <el-form-item label="是否支持售后" prop="expressLimitFlag" v-if="storeType < 3">
<el-radio-group v-model="formData3.expressLimitFlag" :disabled="!hasRepoFlag"> <el-radio-group v-model="formData3.expressLimitFlag" :disabled="!hasRepoFlag">
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
...@@ -135,7 +149,7 @@ ...@@ -135,7 +149,7 @@
</el-radio-group> </el-radio-group>
<p class="backTip" v-if="!hasRepoFlag" @click="goShopDeatil">若需设置商品支持售后,需先至店铺页<span class="ad-back">设置售后地址</span></p> <p class="backTip" v-if="!hasRepoFlag" @click="goShopDeatil">若需设置商品支持售后,需先至店铺页<span class="ad-back">设置售后地址</span></p>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
...@@ -628,18 +642,6 @@ ...@@ -628,18 +642,6 @@
format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<!-- <el-form-item label="商品使用日期" prop="endTime">
<el-col :span="13">
<el-input
size="small"
v-model="formData2.endTime"
placeholder="请输入商品使用日期"
style="width:70%;"
></el-input>
<span class="word-num"></span>
</el-col>
</el-form-item> -->
<el-form-item label="检测说明" > <el-form-item label="检测说明" >
<el-upload <el-upload
:file-list="goodsCheckList" :file-list="goodsCheckList"
...@@ -707,44 +709,19 @@ ...@@ -707,44 +709,19 @@
<el-radio :label="1">零售</el-radio> <el-radio :label="1">零售</el-radio>
<el-radio :label="2" :disabled="commissionFlag == 1">批发</el-radio> <el-radio :label="2" :disabled="commissionFlag == 1">批发</el-radio>
</el-radio-group> </el-radio-group>
<!-- <el-select-->
<!-- v-model="formData.saleType"-->
<!-- placeholder="请选择销售方式"-->
<!-- size="small"-->
<!-- @change="getSaleType(formData.saleType,2)">-->
<!-- <el-option-->
<!-- v-for="item in saleTypeList"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value"-->
<!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
</div> </div>
<div class="inline" v-if="formData.saleType == 1"> <div class="inline" v-if="formData.saleType == 1">
<el-form-item label="零售价" prop="optPrice"> <el-form-item label="零售价" prop="optPrice">
<el-col :span="20"> <el-col :span="20">
<!-- <el-input-->
<!-- @input="$forceUpdate();"-->
<!-- size="small"-->
<!-- v-model="formData.optPrice"-->
<!-- placeholder="请输入零售价"-->
<!-- ></el-input>-->
<el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.optPrice" size="small" :precision="2" :min="0.00" :max="99999.99"></el-input-number> <el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.optPrice" size="small" :precision="2" :min="0.00" :max="99999.99"></el-input-number>
<!-- <span class="word-num">{{(formData.name).replace(/\s+/g,"").length}}/60</span> -->
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
<div class="inline" v-if="formData.saleType == 2"> <div class="inline" v-if="formData.saleType == 2">
<el-form-item label="批发价" prop="optPrice"> <el-form-item label="批发价" prop="optPrice">
<el-col :span="20"> <el-col :span="20">
<!-- <el-input-->
<!-- @input="$forceUpdate();"-->
<!-- size="small"-->
<!-- v-model="formData.optPrice"-->
<!-- placeholder="请输入批发价"></el-input>-->
<el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.optPrice" size="small" :precision="2" :min="0" :max="99999.99"></el-input-number> <el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.optPrice" size="small" :precision="2" :min="0" :max="99999.99"></el-input-number>
</el-col> </el-col>
</el-form-item> </el-form-item>
...@@ -758,14 +735,6 @@ ...@@ -758,14 +735,6 @@
<span class="sp sp-r" @click="changeStock(2)"><i class="el-icon-plus"></i></span> <span class="sp sp-r" @click="changeStock(2)"><i class="el-icon-plus"></i></span>
</div> </div>
<p class="error-message" v-if="!isgoodStock">库存不能为0</p> <p class="error-message" v-if="!isgoodStock">库存不能为0</p>
<!-- <el-input
size="small"
v-model="formData.name"
placeholder="请输入库存"
></el-input> -->
<!-- <el-input-number readonly size="small" v-model="formData.stock"></el-input-number> -->
<!-- <span class="word-num">{{(formData.name).replace(/\s+/g,"").length}}/60</span> -->
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
...@@ -774,10 +743,7 @@ ...@@ -774,10 +743,7 @@
<el-form-item label="最小起购件数" prop="leastCount" class="required-label"> <el-form-item label="最小起购件数" prop="leastCount" class="required-label">
<el-col :span="20"> <el-col :span="20">
<div class="stock-com" style="width: 500px;display:flex"> <div class="stock-com" style="width: 500px;display:flex">
<el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.leastCount" size="small" :precision="0" :min="0" :max="9999"></el-input-number> <el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.leastCount" size="small" :precision="0" :min="0" :max="9999"></el-input-number>
<!-- <span class="sp sp-l" @click="minusCount(1)"><i class="el-icon-minus"></i></span>
<span class="sp sp-c">{{formData.leastCount}}</span>
<span class="sp sp-r" @click="plusCount(1)"><i class="el-icon-plus"></i></span> -->
<span class="word-num" style="margin-left: 10px;">最高9999件哦</span> <span class="word-num" style="margin-left: 10px;">最高9999件哦</span>
</div> </div>
<p class="error-message" v-if="formData.leastCount <= 0">最小起购件数不能为0</p> <p class="error-message" v-if="formData.leastCount <= 0">最小起购件数不能为0</p>
...@@ -799,18 +765,12 @@ ...@@ -799,18 +765,12 @@
<el-col :span="20" style="width: 300%;"> <el-col :span="20" style="width: 300%;">
<div class="stock-com" style="width: 500px;display:flex"> <div class="stock-com" style="width: 500px;display:flex">
<el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.mostCount" size="small" :precision="0" :min="-1" :max="9999"></el-input-number> <el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.mostCount" size="small" :precision="0" :min="-1" :max="9999"></el-input-number>
<!-- <span class="sp sp-l" @click="minusCount(2)"><i class="el-icon-minus"></i></span>
<span class="sp sp-c">{{formData.mostCount}}</span>
<span class="sp sp-r" @click="plusCount(2)"><i class="el-icon-plus"></i></span> -->
<span class="word-num" style="margin-left: 10px;">数值为-1时,代表单次购买上限已无限制(最高9999件哦)</span> <span class="word-num" style="margin-left: 10px;">数值为-1时,代表单次购买上限已无限制(最高9999件哦)</span>
</div> </div>
<p class="error-message" v-if="formData.mostCount === 0">单次购买上限不能为0</p> <p class="error-message" v-if="formData.mostCount === 0">单次购买上限不能为0</p>
<!-- <p class="error-message" v-if="formData.mostCount <= -1">单次购买上限已无限制</p>-->
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
<div class="inline" v-if="formData.saleType == 1"> <div class="inline" v-if="formData.saleType == 1">
<el-form-item label="第三方商品编码"> <el-form-item label="第三方商品编码">
<el-col :span="20"> <el-col :span="20">
...@@ -836,16 +796,6 @@ ...@@ -836,16 +796,6 @@
</div> </div>
</div> </div>
<!-- </el-form>-->
<!-- <el-form-->
<!-- ref="formData"-->
<!-- :model="formData"-->
<!-- :rules="rules"-->
<!-- label-width="150px"-->
<!-- label-suffix=":"-->
<!-- class="basic-form"-->
<!-- >-->
<div class="basic-item-icon" v-if="formData.saleType == 1"> <div class="basic-item-icon" v-if="formData.saleType == 1">
<div class="part-tit">限购条件</div> <div class="part-tit">限购条件</div>
<div v-for="(item, index) in buyLimitDtoList" :key="index" > <div v-for="(item, index) in buyLimitDtoList" :key="index" >
...@@ -901,7 +851,6 @@ ...@@ -901,7 +851,6 @@
</div> </div>
<span slot="footer" class="dialog-footer" style="text-align: right;"> <span slot="footer" class="dialog-footer" style="text-align: right;">
<!-- <el-button @click="centerDialogVisible = false">取 消</el-button> -->
<el-button type="primary" @click="updateStock">完成</el-button> <el-button type="primary" @click="updateStock">完成</el-button>
</span> </span>
</el-dialog> </el-dialog>
...@@ -914,7 +863,7 @@ ...@@ -914,7 +863,7 @@
import { openLoading, closeLoading } from "../../utils/utils"; import { openLoading, closeLoading } from "../../utils/utils";
import { isEmptyUtils } from "@/utils/index"; import { isEmptyUtils } from "@/utils/index";
import { doUpload, getFilePath, createFilePath } from "../../utils/qiniu-util"; import { doUpload, getFilePath, createFilePath } from "../../utils/qiniu-util";
import { updateGoods ,updateStock,dosageAll,getDeparts,getGoodsList, getGoodDetails, updateGoodsV2, getHospitalInfoByStoreId, getCheckPackageIdList, getTypeCodeList } from '@/utils/goods'; import { updateGoods ,updateStock,dosageAll,getDeparts,getGoodsList, getGoodDetails, updateGoodsV2, getHospitalInfoByStoreId, getCheckPackageIdList, getTypeCodeList,getBusinessCategory } from '@/utils/goods';
import { getStoreAdressRepot } from "@/utils/shop"; import { getStoreAdressRepot } from "@/utils/shop";
import Cropper from '@/components/common/cropper.vue' import Cropper from '@/components/common/cropper.vue'
import { originRules1, originRules2, originRules, originRules3 } from './rules'; import { originRules1, originRules2, originRules, originRules3 } from './rules';
...@@ -1055,12 +1004,13 @@ ...@@ -1055,12 +1004,13 @@
videoModel:{ videoModel:{
videoFullPath: '' videoFullPath: ''
}, },
businessCategoryList:[],
sumFile: 0, sumFile: 0,
uploadProgress:0, // 上传视频进度条 uploadProgress:0, // 上传视频进度条
} }
}, },
computed: { computed: {
idMedicEdit() { idMedicEdit() {
return this.isEdit && !this.isCheckServe;; return this.isEdit && !this.isCheckServe;;
} }
}, },
...@@ -1088,6 +1038,7 @@ ...@@ -1088,6 +1038,7 @@
this.curmbThird = this.title; this.curmbThird = this.title;
this.formData.storeId = Number(storeId) || ''; this.formData.storeId = Number(storeId) || '';
this.getTypeCodeList(); this.getTypeCodeList();
this.getBusinessCategory();
this.getLever(0,1) this.getLever(0,1)
dosageAll().then((res)=>{ dosageAll().then((res)=>{
this.doseAll = res.data this.doseAll = res.data
...@@ -1120,8 +1071,16 @@ ...@@ -1120,8 +1071,16 @@
} }
}, },
methods: { methods: {
// 获取业务类型
getBusinessCategory(){
getBusinessCategory().then((res) => {
if (res.code == '000000') {
this.businessCategoryList=res.data
}
}).catch((err)=>{})
},
// 判断imgurl是否有效 // 判断imgurl是否有效
checkImgExists(imgurl) { checkImgExists(imgurl) {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
var ImgObj = new Image() var ImgObj = new Image()
ImgObj.src = imgurl ImgObj.src = imgurl
...@@ -1169,12 +1128,12 @@ ...@@ -1169,12 +1128,12 @@
}; };
const { goodsInfo, medicalService, buyLimitDtoList, hasRepoFlag} = res.data; const { goodsInfo, medicalService, buyLimitDtoList, hasRepoFlag} = res.data;
const { goodsName, goodsDescription, goodsType, expressLimitFlag,goodsHeaderImages=[], goodsVideoList=[] } = goodsInfo; const { goodsName, goodsDescription, goodsType,businessCategoryId, expressLimitFlag,goodsHeaderImages=[], goodsVideoList=[] } = goodsInfo;
this.formData = {...this.formData, ...goodsInfo}; this.formData = {...this.formData, ...goodsInfo};
this.formData2 = medicalService; this.formData2 = medicalService;
this.formData = { ...this.formData, ...this.formData2 }; this.formData = { ...this.formData, ...this.formData2 };
this.formData3 = { goodsName, goodsDescription, goodsHeaderImages, goodsVideoList, goodsType, expressLimitFlag }; this.formData3 = { goodsName, goodsDescription, goodsHeaderImages, goodsVideoList, goodsType,businessCategoryId, expressLimitFlag };
this.buyLimitDtoList = buyLimitDtoList; this.buyLimitDtoList = buyLimitDtoList;
this.hasRepoFlag = hasRepoFlag; this.hasRepoFlag = hasRepoFlag;
this.$set(this.formData2, 'suitableArr', this.formData.suitable.split(',')); this.$set(this.formData2, 'suitableArr', this.formData.suitable.split(','));
...@@ -1185,14 +1144,14 @@ ...@@ -1185,14 +1144,14 @@
this.goodsCheckList = this.getImges(medicalService.goodsCheckImages, goodsType); this.goodsCheckList = this.getImges(medicalService.goodsCheckImages, goodsType);
if (goodsInfo.goodsVideoList.length > 0) { if (goodsInfo.goodsVideoList.length > 0) {
this.videoList.push(goodsInfo.goodsVideoList[0]); this.videoList.push(goodsInfo.goodsVideoList[0]);
this.videoModel.videoFullPath = this.videoList[0].goodsImgUrl; this.videoModel.videoFullPath = this.videoList[0].goodsImgUrl;
} }
let newImgList = []; let newImgList = [];
this.fileGoodsList.map((item,index) => { this.fileGoodsList.map((item,index) => {
this.checkImgExists(item.imageUrl).then(()=> { this.checkImgExists(item.imageUrl).then(()=> {
newImgList.push(item) newImgList.push(item)
}).catch(()=> { }).catch(()=> {
newImgList = this.fileGoodsList.splice(index,1); newImgList = this.fileGoodsList.splice(index,1);
}) })
}) })
this.fileGoodsList = newImgList; this.fileGoodsList = newImgList;
...@@ -1225,13 +1184,13 @@ ...@@ -1225,13 +1184,13 @@
}); });
} }
const {goodsList, hasRepoFlag } = res.data; const {goodsList, hasRepoFlag } = res.data;
const { goodsName, goodsDescription, goodsType, expressLimitFlag, goodsHeaderImages=[], goodsVideoList=[] } = goodsList[0]; const { goodsName, goodsDescription, goodsType, businessCategoryId,expressLimitFlag, goodsHeaderImages=[], goodsVideoList=[] } = goodsList[0];
this.formData1 = goodsList[0]; this.formData1 = goodsList[0];
this.formData = goodsList[0]; this.formData = goodsList[0];
this.formData3 = { goodsName, goodsDescription, goodsHeaderImages, goodsVideoList, goodsType, expressLimitFlag }; this.formData3 = { goodsName, goodsDescription, goodsHeaderImages, goodsVideoList, goodsType,businessCategoryId, expressLimitFlag };
this.hasRepoFlag = hasRepoFlag; this.hasRepoFlag = hasRepoFlag;
this.buyLimitDtoList = this.formData.buyLimitDtoList; this.buyLimitDtoList = this.formData.buyLimitDtoList;
this.formData.optPrice = this.formData.costPrice/100; this.formData.optPrice = this.formData.costPrice/100;
this.fileGoodsList = this.getImges(goodsList[0].goodsImgList,1); this.fileGoodsList = this.getImges(goodsList[0].goodsImgList,1);
this.fileIntrList = this.getImges(goodsList[0].medicImgList,2); this.fileIntrList = this.getImges(goodsList[0].medicImgList,2);
this.formData.stock = this.formData.goodsStock; this.formData.stock = this.formData.goodsStock;
...@@ -1245,10 +1204,10 @@ ...@@ -1245,10 +1204,10 @@
this.checkImgExists(item.imageUrl).then(()=> { this.checkImgExists(item.imageUrl).then(()=> {
newImgList.push(item) newImgList.push(item)
}).catch(()=> { }).catch(()=> {
newImgList = this.fileGoodsList.splice(index,1); newImgList = this.fileGoodsList.splice(index,1);
}) })
}) })
this.fileGoodsList = newImgList; this.fileGoodsList = newImgList;
if(this.isMedic){ if(this.isMedic){
this.getLever(5,2,1) this.getLever(5,2,1)
}else{ }else{
...@@ -1370,31 +1329,9 @@ ...@@ -1370,31 +1329,9 @@
}); });
}, },
// 销售方式
getSaleType(saleType, type){
},
getGoodsTypes(goodsType,type){ getGoodsTypes(goodsType,type){
this.goodsType = goodsType; this.goodsType = goodsType;
// if(goodsType == 5){
// this.isMedic = true;
// this.isCheckServe = false;
// this.getLever(goodsType,type);
// } else if(goodsType == 337){
// this.isMedic = false;
// this.isCheckServe = true;
// getHospitalInfoByStoreId(this.storeId).then(({code,message,data})=>{
// this.formData2.hospitalName = data.hospital;
// })
// getCheckPackageIdList().then(res=>{
// console.log(`getCheckPackageIdList`, res);
// this.checkPackageIdList = res.data;
// })
// }else{
// this.isMedic = false;
// this.isCheckServe = false;
// };
if(goodsType == 337){ if(goodsType == 337){
this.isMedic = false; this.isMedic = false;
this.isCheckServe = true; this.isCheckServe = true;
...@@ -1525,7 +1462,7 @@ ...@@ -1525,7 +1462,7 @@
formNameList = ['formData', 'formData2', 'formData3']; formNameList = ['formData', 'formData2', 'formData3'];
this.formData = { ...this.formData, ...this.formData3,...this.formData2 }; this.formData = { ...this.formData, ...this.formData3,...this.formData2 };
}else{ }else{
formNameList = ['formData', 'formData1', 'formData3']; formNameList = ['formData', 'formData1', 'formData3'];
this.formData = { ...this.formData,...this.formData1,...this.formData3}; this.formData = { ...this.formData,...this.formData1,...this.formData3};
} }
...@@ -1937,7 +1874,7 @@ ...@@ -1937,7 +1874,7 @@
} else { } else {
this.$message.error(res.message); this.$message.error(res.message);
} }
}) })
}, },
// 视频 // 视频
deleteVideo(videoList) { deleteVideo(videoList) {
...@@ -1954,7 +1891,7 @@ ...@@ -1954,7 +1891,7 @@
} }
else { else {
this.doVideoUpload(file, 1); this.doVideoUpload(file, 1);
} }
}, },
handleRemoveVideo(file, videoList) { handleRemoveVideo(file, videoList) {
//console.log(this.videoList); //console.log(this.videoList);
...@@ -2021,7 +1958,7 @@ ...@@ -2021,7 +1958,7 @@
// let videoPath = createFilePath(file,file.name) // let videoPath = createFilePath(file,file.name)
doUpload(self,file,self.videoModel.videoPath,"preview4", doUpload(self,file,self.videoModel.videoPath,"preview4",
"uploadProgress1", "uploadProgress1",
"").then(function (result) { "").then(function (result) {
console.log('成功result',result); console.log('成功result',result);
self.videoModel.videoFullPath = result.fullPath; self.videoModel.videoFullPath = result.fullPath;
// self.model.size = result.size; // self.model.size = result.size;
...@@ -2037,10 +1974,10 @@ ...@@ -2037,10 +1974,10 @@
deleteFlag: 0 deleteFlag: 0
} }
self.videoList.push(fileItem); self.videoList.push(fileItem);
self.$message.success('上传成功'); self.$message.success('上传成功');
console.log('sumFile',self.sumFile,'videoList',self.videoList); console.log('sumFile',self.sumFile,'videoList',self.videoList);
return false; return false;
}); });
}, },
}, },
} }
...@@ -2308,5 +2245,5 @@ ...@@ -2308,5 +2245,5 @@
} }
} }
</style> </style>
...@@ -75,6 +75,7 @@ const form3 = { ...@@ -75,6 +75,7 @@ const form3 = {
goodsHeaderImages: [], goodsHeaderImages: [],
goodsVideoList: [], goodsVideoList: [],
goodsType: "", goodsType: "",
businessCategoryId:"",
expressLimitFlag: 0, //是否支持退货退款 expressLimitFlag: 0, //是否支持退货退款
}; };
......
...@@ -124,6 +124,8 @@ const rules3 = { ...@@ -124,6 +124,8 @@ const rules3 = {
goodsHeaderImages: [ goodsHeaderImages: [
{ required: true, message: "请上传商品头图", trigger: "blur" }, { required: true, message: "请上传商品头图", trigger: "blur" },
], ],
businessCategoryId: [{ required: true, message: "请选择业务类型", trigger: "change" }],
goodsType: [{ required: true, message: "请选择商品类型", trigger: "change" }], goodsType: [{ required: true, message: "请选择商品类型", trigger: "change" }],
}; };
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册