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

联调问题

上级 21396767
...@@ -278,4 +278,9 @@ ...@@ -278,4 +278,9 @@
margin-top: 25px; margin-top: 25px;
margin-bottom: 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 @@ ...@@ -28,6 +28,7 @@
ref="cascader" ref="cascader"
:props="cascaderProps" :props="cascaderProps"
clearable clearable
filterable
v-model="formData3.goodsCategoryIdList" v-model="formData3.goodsCategoryIdList"
@change="searchCategoryChange" @change="searchCategoryChange"
/> />
...@@ -66,7 +67,7 @@ ...@@ -66,7 +67,7 @@
<el-form-item label="选择基础药品" prop="choiceGoods"> <el-form-item label="选择基础药品" prop="choiceGoods">
<el-col :span="16"> <el-col :span="16">
<el-button type="primary" @click="addMed" :disabled="isShowGoods">+添加药品</el-button> <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> <div v-if="isShowGoodsMsg" :style="{color: '#f56c6c',fontSize: '12px'}">请选择基础药品</div>
</el-col> </el-col>
<el-table <el-table
...@@ -602,12 +603,12 @@ ...@@ -602,12 +603,12 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="产品名称/通用名称" prop="medicCommonName"> <el-form-item :label="commonName" prop="medicCommonName">
<el-col :span="16"> <el-col :span="16">
<el-input <el-input
size="small" size="small"
v-model="formData1.medicCommonName" v-model="formData1.medicCommonName"
placeholder="请输入通用名称" placeholder="请输入名称"
style="width:70%;" style="width:70%;"
maxlength="60" maxlength="60"
show-word-limit show-word-limit
...@@ -626,12 +627,12 @@ ...@@ -626,12 +627,12 @@
<span class="word-num">(点击可快速录入下面的基本信息)</span> <span class="word-num">(点击可快速录入下面的基本信息)</span>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="商品名称" prop="medicGoodsName"> <el-form-item label="品牌名/商品名" prop="medicGoodsName">
<el-col :span="16"> <el-col :span="16">
<el-input <el-input
size="small" size="small"
v-model="formData1.medicGoodsName" v-model="formData1.medicGoodsName"
placeholder="请输入商品名称" placeholder="请输入品牌名/商品名"
maxlength="60" maxlength="60"
show-word-limit show-word-limit
></el-input> ></el-input>
...@@ -664,12 +665,12 @@ ...@@ -664,12 +665,12 @@
</el-col> </el-col>
</el-form-item> </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-col :span="16">
<el-input <el-input
size="small" size="small"
v-model="formData1.manufacturer" v-model="formData1.manufacturer"
placeholder="请输入生产厂家" placeholder="请输入生产企业"
style="width:70%;" style="width:70%;"
></el-input> ></el-input>
...@@ -844,6 +845,11 @@ ...@@ -844,6 +845,11 @@
isAddServe: false// 新增药品时 添加的是否为服务类 || 虚拟商品 isAddServe: false// 新增药品时 添加的是否为服务类 || 虚拟商品
} }
}, },
computed: {
commonName() {
return [4,5].includes(this.formData1.medicalCategoryId) ? '产品名称' : '通用名称';
}
},
created() { created() {
vm = this; vm = this;
const { id, storeId, goodsType, inputType, commissionFlag, storeType} = this.$route.query; const { id, storeId, goodsType, inputType, commissionFlag, storeType} = this.$route.query;
...@@ -1099,66 +1105,9 @@ ...@@ -1099,66 +1105,9 @@
}) })
}, },
//eidt状态 //eidt状态
async getDetailByEdit(id, goodsType){ async getDetailByEdit(id){
this.goodsId = 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({ const res = await getGoodsList({
goodsIdList:[id], goodsIdList:[id],
goodsName :'', goodsName :'',
...@@ -1189,7 +1138,7 @@ ...@@ -1189,7 +1138,7 @@
this.isProject = Boolean(cooperationProjectId); this.isProject = Boolean(cooperationProjectId);
if(this.isProject) {this.getContractList(cooperationProjectId)} if(this.isProject) {this.getContractList(cooperationProjectId)}
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, expressLimitFlag,contractId, cooperationProjectId,goodsCategoryIdList }; this.formData3 = { goodsName, goodsDescription, goodsHeaderImages, goodsVideoList, goodsType, expressLimitFlag,contractId, cooperationProjectId,goodsCategoryIdList };
this.hasRepoFlag = hasRepoFlag; this.hasRepoFlag = hasRepoFlag;
...@@ -1216,7 +1165,7 @@ ...@@ -1216,7 +1165,7 @@
...this.rules, ...this.rules,
...originRules ...originRules
}; };
}
}, },
getImges(d,type){ getImges(d,type){
let a = []; let a = [];
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册