提交 16224f5e 编写于 作者: 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!435
......@@ -278,4 +278,9 @@
margin-top: 25px;
margin-bottom: 25px;
}
}
\ No newline at end of file
}
.add-btn.is-disabled {
background: #fff !important;
border: 1px solid #DCDFE6 !important;
color: #606266 !important;
}
\ No newline at end of file
......@@ -28,6 +28,7 @@
ref="cascader"
:props="cascaderProps"
clearable
filterable
v-model="formData3.goodsCategoryIdList"
@change="searchCategoryChange"
/>
......@@ -66,7 +67,7 @@
<el-form-item label="选择基础药品" prop="choiceGoods">
<el-col :span="16">
<el-button type="primary" @click="addMed" :disabled="isShowGoods">+添加药品</el-button>
<el-button @click="addNewGoods">新增药品</el-button>
<el-button @click="addNewGoods" :disabled="isShowGoods" class="add-btn">新增药品</el-button>
<div v-if="isShowGoodsMsg" :style="{color: '#f56c6c',fontSize: '12px'}">请选择基础药品</div>
</el-col>
<el-table
......@@ -602,12 +603,12 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="产品名称/通用名称" prop="medicCommonName">
<el-form-item :label="commonName" prop="medicCommonName">
<el-col :span="16">
<el-input
size="small"
v-model="formData1.medicCommonName"
placeholder="请输入通用名称"
placeholder="请输入名称"
style="width:70%;"
maxlength="60"
show-word-limit
......@@ -626,12 +627,12 @@
<span class="word-num">(点击可快速录入下面的基本信息)</span>
</el-col>
</el-form-item>
<el-form-item label="商品名称" prop="medicGoodsName">
<el-form-item label="品牌名/商品名" prop="medicGoodsName">
<el-col :span="16">
<el-input
size="small"
v-model="formData1.medicGoodsName"
placeholder="请输入商品名称"
placeholder="请输入品牌名/商品名"
maxlength="60"
show-word-limit
></el-input>
......@@ -664,12 +665,12 @@
</el-col>
</el-form-item>
<!-- 生产企业 -->
<el-form-item label="生产厂家" prop="manufacturer" v-if="![4,5].includes(formData1.medicalCategoryId)">
<el-form-item label="生产企业" prop="manufacturer" v-if="![4,5].includes(formData1.medicalCategoryId)">
<el-col :span="16">
<el-input
size="small"
v-model="formData1.manufacturer"
placeholder="请输入生产厂家"
placeholder="请输入生产企业"
style="width:70%;"
></el-input>
......@@ -844,6 +845,11 @@
isAddServe: false// 新增药品时 添加的是否为服务类 || 虚拟商品
}
},
computed: {
commonName() {
return [4,5].includes(this.formData1.medicalCategoryId) ? '产品名称' : '通用名称';
}
},
created() {
vm = this;
const { id, storeId, goodsType, inputType, commissionFlag, storeType} = this.$route.query;
......@@ -1099,66 +1105,9 @@
})
},
//eidt状态
async getDetailByEdit(id, goodsType){
async getDetailByEdit(id){
this.goodsId = id ;
if(goodsType == 337){
this.isCheckServe = true;
const res = await getGoodDetails(id);
console.log(`========================>`, res);
if(res.code != '000000'){
return this.$message({
message: res.message,
type: 'error'
});
};
closeLoading(this);
if(res.data == null){
return this.$message({
type: 'error'
});
};
const { goodsInfo, medicalService, buyLimitDtoList, hasRepoFlag} = res.data;
goodsInfo.goodsCategoryIdArr = [[40114,40115]];
const { goodsName, goodsDescription, goodsType, expressLimitFlag,goodsHeaderImages=[], goodsVideoList=[], contractId, cooperationProjectId, medicationId, goodsCategoryIdArr:goodsCategoryIdList} = goodsInfo;
// 查询药品列表
this.searchAddGoods(medicationId);
this.isProject = Boolean(cooperationProjectId);
if(this.isProject) {this.getContractList(cooperationProjectId) }
this.isContract = Boolean(contractId);
this.formData = {...this.formData, ...goodsInfo};
this.formData = { ...this.formData };
this.formData3 = { goodsName, goodsDescription, goodsHeaderImages, goodsVideoList, goodsType, expressLimitFlag, cooperationProjectId, contractId,goodsCategoryIdList };
console.log(this.formData3 ,'this.formData3 this.formData3 this.formData3 this.formData3 this.formData3 this.formData3 ')
this.buyLimitDtoList = buyLimitDtoList;
this.hasRepoFlag = hasRepoFlag;
this.formData.stock = this.formData.goodsStock;
this.formData.scorePerformance = this.formData.scorePerformance/100;
this.formData.optPrice = this.formData.costPrice/100;
this.fileGoodsList = this.getImges(goodsHeaderImages,1);
// this.goodsCheckList = this.getImges(medicalService.goodsCheckImages, goodsType);
if (goodsInfo.goodsVideoList.length > 0) {
this.videoList.push(goodsInfo.goodsVideoList[0]);
this.videoModel.videoFullPath = this.videoList[0].goodsImgUrl;
}
let newImgList = [];
this.fileGoodsList.map((item,index) => {
this.checkImgExists(item.imageUrl).then(()=> {
newImgList.push(item)
}).catch(()=> {
newImgList = this.fileGoodsList.splice(index,1);
})
})
this.fileGoodsList = newImgList;
console.log(this.fileGoodsList, '-=-=-=-=-fileGoodsListfileGoodsList')
this.rules = {
...this.rules,
...originRules
};
console.log(this.formData3.goodsCategoryIdList, 'this.formData3.goodsCategoryIdList')
}else{
const res = await getGoodsList({
goodsIdList:[id],
goodsName :'',
......@@ -1189,7 +1138,7 @@
this.isProject = Boolean(cooperationProjectId);
if(this.isProject) {this.getContractList(cooperationProjectId)}
this.isContract = Boolean(contractId);
this.formData1 = goodDet;
// this.formData1 = goodDet;
this.formData = goodDet;
this.formData3 = { goodsName, goodsDescription, goodsHeaderImages, goodsVideoList, goodsType, expressLimitFlag,contractId, cooperationProjectId,goodsCategoryIdList };
this.hasRepoFlag = hasRepoFlag;
......@@ -1216,7 +1165,7 @@
...this.rules,
...originRules
};
}
},
getImges(d,type){
let a = [];
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册