提交 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: "查询业务类型",
});
};
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
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>
...@@ -112,7 +111,20 @@ ...@@ -112,7 +111,20 @@
</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>
...@@ -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>
...@@ -775,9 +744,6 @@ ...@@ -775,9 +744,6 @@
<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,6 +1004,7 @@ ...@@ -1055,6 +1004,7 @@
videoModel:{ videoModel:{
videoFullPath: '' videoFullPath: ''
}, },
businessCategoryList:[],
sumFile: 0, sumFile: 0,
uploadProgress:0, // 上传视频进度条 uploadProgress:0, // 上传视频进度条
} }
...@@ -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,6 +1071,14 @@ ...@@ -1120,6 +1071,14 @@
} }
}, },
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) {
...@@ -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(','));
...@@ -1225,10 +1184,10 @@ ...@@ -1225,10 +1184,10 @@
}); });
} }
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;
...@@ -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;
......
...@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册