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

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

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