提交 f8cc37f7 编写于 作者: shuang.zhou's avatar shuang.zhou

Merge branch 'feature/med-goods-zs' into 'testing/3.29.0'

Feature/med goods zs

See merge request com.pica.cloud.education.frontend/pica.cloud.web-education-admin!439
.create-shop-wrapper{
.create-shop-wrapper-new{
.create-shop-content{
background: #fff;
padding: 10px;
......@@ -40,8 +40,7 @@
}
}
}
}
.required-label .el-form-item__label::before {
.required-label .el-form-item__label::before {
content: "*";
color: #f56c6c;
margin-right: 4px;
......@@ -217,20 +216,14 @@
margin-right: 15px;
position: relative;
}
//.el-input-number__increase {
// right: 1px;
// border-radius: 0 4px 4px 0;
// border-left: 1px solid #449284;
//}
.el-input-number__decrease, .el-input-number__increase {
.el-input-number__decrease, .el-input-number__increase {
position: absolute;
z-index: 1;
top: 1px;
width: 40px;
height: auto;
text-align: center;
background: #449284;
background: #449284 !important;
color: #606266;
cursor: pointer;
font-size: 13px;
......@@ -279,8 +272,9 @@
margin-bottom: 25px;
}
}
.add-btn.is-disabled {
background: #fff !important;
border: 1px solid #DCDFE6 !important;
color: #606266 !important;
}
\ No newline at end of file
.add-btn.is-disabled {
background: #fff !important;
border: 1px solid #DCDFE6 !important;
color: #606266 !important;
}
}
<template>
<div class="create-shop-wrapper">
<div class="create-shop-wrapper-new">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :curmbThird="curmbThird" :jumPathThird="jumPathThird"></bread-crumb>
<div class="create-shop-content screenSet" id="screenSet">
<el-row class="step-content">
......@@ -386,7 +386,7 @@
</el-dialog>
</div>
<!-- 添加药品 -->
<el-dialog title="添加药品" :visible.sync="baseAddVisible" class="add-goods-dialog">
<el-dialog title="添加药品" :visible.sync="baseAddVisible" class="add-goods-dialog" width="70%">
<el-row type="flex" class="row-bg">
<el-col :span="21">
<el-input
......@@ -426,7 +426,7 @@
></el-pagination>
</div>
<el-row type="flex" class="row-bg" justify="end">
<el-col :span="4">
<el-col :span="6">
<el-button @click="baseAddVisible = false">取消</el-button>
<el-button type="primary" @click="confirmAddGoods">确认</el-button>
</el-col>
......@@ -497,7 +497,7 @@
</el-form-item>
<!-- 规格 -->
<el-form-item label="规格" prop="size" v-if="![4,5].includes(formData1.medicalCategoryId)">
<el-col :span="16">
<el-col :span="18">
<el-input
size="small"
v-model="formData1.size"
......@@ -706,6 +706,21 @@
this.getGoodsListAll();
},
methods: {
getArr(arr) {
if (arr.length > 0) {
let newoodsList = []
arr.forEach(item=> {
const subArr = item.filter(i=> {
return i !== -1;
})
console.log()
newoodsList.push(subArr)
})
return newoodsList;
} else {
return []
}
},
// 获取商品分类
getGoodsListAll() {
getGoodsListAll().then(res => {
......@@ -858,6 +873,9 @@
},
// 新增药品
addNewGoods(){
if (this.$refs.formData1) {
this.$refs.formData1.resetFields();
}
this.getCategorysList(); // 获取药品类别
this.isNewMeddialog = true;
},
......@@ -955,7 +973,7 @@
});
}
const {goodsList, hasRepoFlag } = res.data;
const { goodsName, goodsDescription, goodsType,expressLimitFlag, goodsHeaderImages=[], goodsVideoList=[],contractId, cooperationProjectId, medicationId,goodsCategoryIdArr,medicationInfo } = goodsList[0];
const { goodsName, goodsDescription, goodsType,expressLimitFlag, goodsHeaderImages=[], goodsVideoList=[],contractId, cooperationProjectId,goodsCategoryIdArr,medicationInfo } = goodsList[0];
const goodDet = goodsList[0];
goodDet.otc1 = goodDet.otc ? '1' : '0';
// 查询药品列表
......@@ -967,14 +985,15 @@
// this.formData1 = goodDet;
this.formData = goodDet;
this.formData3 = { goodsName, goodsDescription, goodsHeaderImages, goodsVideoList, goodsType, expressLimitFlag,contractId, cooperationProjectId };
this.formData3.goodsCategoryIdList = goodsCategoryIdArr;
this.formData3.medicationId = medicationInfo.tradeMedicalLibId;
this.formData3.goodsCategoryIdList = this.getArr(goodsCategoryIdArr);
console.log(this.formData3.goodsCategoryIdList, 'this.formData3.goodsCategoryIdListthis.formData3.goodsCategoryIdList')
this.hasRepoFlag = hasRepoFlag;
this.buyLimitDtoList = this.formData.buyLimitDtoList;
this.formData.optPrice = this.formData.costPrice/100;
this.formData.scorePerformance = this.formData.scorePerformance/100;
this.fileGoodsList = this.getImges(goodDet.goodsImgList,1);
this.fileIntrList = this.getImges(goodDet.medicImgList,2);
this.fileIntrList = this.getImges(goodDet.goodsDetailImageList,2);
this.formData.stock = this.formData.goodsStock;
if (goodDet.goodsVideoList.length > 0) {
this.videoList.push(goodDet.goodsVideoList[0]);
......@@ -1639,4 +1658,6 @@
},
}
</script>
<style lang="scss" scoped src="./create-good-new.scss"></style>
\ No newline at end of file
<style lang="scss">
@import "./create-good-new.scss";
</style>
\ No newline at end of file
......@@ -575,10 +575,10 @@
},
handleTableArry(item){
let str = ' '
if (item) {
str = item.join('/');
} else {
if (item.length > 0 && item[0] == '') {
str = '--'
} else {
str = item.join('/');
}
return str;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册