提交 2243c8cd 编写于 作者: 张敬贤's avatar 张敬贤

新增批发商品倍数递增逻辑

上级 67d73c84
...@@ -75,10 +75,10 @@ ...@@ -75,10 +75,10 @@
<el-button type="primary" @click="addMed" :disabled="isShowGoods">+添加药品</el-button> <el-button type="primary" @click="addMed" :disabled="isShowGoods">+添加药品</el-button>
<el-button @click="addNewGoods" :disabled="isShowGoods" class="add-btn">新增药品</el-button> <el-button @click="addNewGoods" :disabled="isShowGoods" class="add-btn">新增药品</el-button>
<div v-if="isShowGoodsMsg && !isShowGoods" :style="{color: '#f56c6c',fontSize: '12px'}">请选择基础药品</div> <div v-if="isShowGoodsMsg && !isShowGoods" :style="{color: '#f56c6c',fontSize: '12px'}">请选择基础药品</div>
</el-col> </el-col>
<el-table <el-table
v-if="isShowGoods" v-if="isShowGoods"
:data="choiceMedData" :data="choiceMedData"
ref="singlTable" ref="singlTable"
class="show-goods-table"> class="show-goods-table">
<el-table-column property="productName" label="产品名称/通用名称" width="180"></el-table-column> <el-table-column property="productName" label="产品名称/通用名称" width="180"></el-table-column>
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
</el-form-item> </el-form-item>
</div> </div>
<div class="inline" v-if="formData.saleType == 1"> <div class="inline" >
<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">
...@@ -287,8 +287,7 @@ ...@@ -287,8 +287,7 @@
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
<div class="inline" v-if="formData.leastCount > 1 ">
<div class="inline" v-if="formData.saleType == 1 && formData.leastCount > 1">
<el-form-item label="递增方式"> <el-form-item label="递增方式">
<el-col :span="24"> <el-col :span="24">
<el-radio size="mini" v-model="formData.incrType" :label="2">倍数递增</el-radio> <el-radio size="mini" v-model="formData.incrType" :label="2">倍数递增</el-radio>
...@@ -406,13 +405,13 @@ ...@@ -406,13 +405,13 @@
clearable clearable
class="input-el" class="input-el"
size="middle" size="middle"
placeholder="试试搜索:药品69开头条形码/通用名称/商品名称/拼音首字母" placeholder="试试搜索:药品69开头条形码/通用名称/商品名称/拼音首字母"
></el-input> ></el-input>
</el-col> </el-col>
<el-col :span="2"><el-button type="primary" @click="getSearchInfo" class="add-goods-search">搜索</el-button></el-col> <el-col :span="2"><el-button type="primary" @click="getSearchInfo" class="add-goods-search">搜索</el-button></el-col>
</el-row> </el-row>
<el-table <el-table
:data="medData" :data="medData"
ref="singleTable" ref="singleTable"
highlight-current-row highlight-current-row
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
...@@ -684,7 +683,7 @@ ...@@ -684,7 +683,7 @@
isAddServe: false, // 新增药品时 添加的是否为服务类 || 虚拟商品 isAddServe: false, // 新增药品时 添加的是否为服务类 || 虚拟商品
goodsCategoryList: [], goodsCategoryList: [],
isgoodsCategory: false, // 是否选择商品分类 isgoodsCategory: false, // 是否选择商品分类
isProjectId: false isProjectId: false
} }
}, },
computed: { computed: {
...@@ -772,7 +771,7 @@ ...@@ -772,7 +771,7 @@
type: 'warning', type: 'warning',
}).then(() => { }).then(() => {
this.$router.go(-1); this.$router.go(-1);
}).catch(() => { }).catch(() => {
}); });
}, },
// 药品分类切换 // 药品分类切换
...@@ -821,7 +820,7 @@ ...@@ -821,7 +820,7 @@
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
}); });
}).catch(() => { }).catch(() => {
}); });
}, },
contractChange(val) { contractChange(val) {
...@@ -847,11 +846,11 @@ ...@@ -847,11 +846,11 @@
if (!this.isSelectGoods) { if (!this.isSelectGoods) {
this.$message.error('您还未选择药品'); this.$message.error('您还未选择药品');
return; return;
} }
if (this.choiceMedData.length > 0) { if (this.choiceMedData.length > 0) {
this.isShowGoods = true; this.isShowGoods = true;
this.baseAddVisible = false; this.baseAddVisible = false;
} }
}, },
addMed() { addMed() {
this.baseAddVisible = true; this.baseAddVisible = true;
...@@ -896,7 +895,7 @@ ...@@ -896,7 +895,7 @@
medicGoodsName, medicGoodsName,
applySource: 2, applySource: 2,
} }
} else { } else {
data = { data = {
medicalCategoryId, medicalCategoryId,
medicCommonName, medicCommonName,
...@@ -1048,7 +1047,7 @@ ...@@ -1048,7 +1047,7 @@
this.isContract = Boolean(contractId); this.isContract = Boolean(contractId);
// this.formData1 = goodDet; // this.formData1 = goodDet;
this.formData = goodDet; this.formData = goodDet;
this.formData3 = { goodsName, goodsDescription, goodsHeaderImages, goodsVideoList, goodsType,contractId, cooperationProjectId }; this.formData3 = { goodsName, goodsDescription, goodsHeaderImages, goodsVideoList, goodsType,contractId, cooperationProjectId };
this.formData3.medicationId = medicationInfo.tradeMedicalLibId; this.formData3.medicationId = medicationInfo.tradeMedicalLibId;
this.formData3.medicationDetailId = medicationInfo.id; this.formData3.medicationDetailId = medicationInfo.id;
...@@ -1078,7 +1077,7 @@ ...@@ -1078,7 +1077,7 @@
...this.rules, ...this.rules,
...originRules ...originRules
}; };
}, },
getImges(d,type){ getImges(d,type){
let a = []; let a = [];
...@@ -1245,7 +1244,7 @@ ...@@ -1245,7 +1244,7 @@
// 是否上传商品头图 || 是否上传商品详情图片 || 库存是否为0 || 单次购买上线是否符合要求 // 是否上传商品头图 || 是否上传商品详情图片 || 库存是否为0 || 单次购买上线是否符合要求
if(!this.isgoodsImages || !this.isSpecification_url ||!this.isgoodStock || !this.checkCount()) return; if(!this.isgoodsImages || !this.isSpecification_url ||!this.isgoodStock || !this.checkCount()) return;
if(!isTrue){ if(!isTrue){
return false; return false;
}else{ }else{
...@@ -1320,7 +1319,7 @@ ...@@ -1320,7 +1319,7 @@
let len = vm.fileGoodsList.length; let len = vm.fileGoodsList.length;
vm.fileGoodsList.push({ url: path.fullPath, goodsImgUrl: path.fullPath,imageUrl:path.fullPath, imgSort: len+1,imageSort: len+1, goodsId: vm.formData.goodsId }); vm.fileGoodsList.push({ url: path.fullPath, goodsImgUrl: path.fullPath,imageUrl:path.fullPath, imgSort: len+1,imageSort: len+1, goodsId: vm.formData.goodsId });
vm.isgoodsImages = true; vm.isgoodsImages = true;
// vm.fileGoodsList.push({url:path.fullPath,goodsImgUrl: path.fullPath,imageUrl:path.fullPath,imageName:'',imageSort: len+1,imageType: 2,id: null,}) // vm.fileGoodsList.push({url:path.fullPath,goodsImgUrl: path.fullPath,imageUrl:path.fullPath,imageName:'',imageSort: len+1,imageType: 2,id: null,})
vm.$message.success("上传成功"); vm.$message.success("上传成功");
}); });
...@@ -1443,7 +1442,7 @@ ...@@ -1443,7 +1442,7 @@
//如果没有选择文件,返回 //如果没有选择文件,返回
if (isEmptyUtils(file)) return; if (isEmptyUtils(file)) return;
console.log('object :>> ', file.type.split('/')); console.log('object :>> ', file.type.split('/'));
let filety = "." + file.type.split('/')[1]; let filety = "." + file.type.split('/')[1];
if(filety != ".mp4"){ if(filety != ".mp4"){
self.$message.error('仅支持上传mp4格式视频'); self.$message.error('仅支持上传mp4格式视频');
...@@ -1752,4 +1751,4 @@ ...@@ -1752,4 +1751,4 @@
</script> </script>
<style lang="scss"> <style lang="scss">
@import "./create-good-new.scss"; @import "./create-good-new.scss";
</style> </style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册