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

Merge branch 'develop-3.18.0' of...

Merge branch 'develop-3.18.0' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into feature/shuang
...@@ -123,3 +123,13 @@ export const getGoodsIdList = (params) => { ...@@ -123,3 +123,13 @@ export const getGoodsIdList = (params) => {
description: '商品ID列表查询', description: '商品ID列表查询',
}) })
}; };
export const getTypeCodeList = () => {
return fetch({
headers,
url: getBaseUrl(`basic-data/constants/app?typeCodeList=P306`),
method: "get",
description: "获取适用人群类别",
});
};
...@@ -540,7 +540,7 @@ ...@@ -540,7 +540,7 @@
v-model="formData2.suitableArr" v-model="formData2.suitableArr"
:multiple="true" :multiple="true"
placeholder="请选择" placeholder="请选择"
size="small" class="suitableList-select"
> >
<el-option <el-option
v-for="(item,index) in suitableList" v-for="(item,index) in suitableList"
...@@ -859,7 +859,7 @@ ...@@ -859,7 +859,7 @@
let vm = null; let vm = null;
import { openLoading, closeLoading } from "../../utils/utils"; import { openLoading, closeLoading } from "../../utils/utils";
import { doUpload, getFilePath } from "../../utils/qiniu-util"; import { doUpload, getFilePath } from "../../utils/qiniu-util";
import { updateGoods ,updateStock,dosageAll,getDeparts,getGoodsList, getGoodDetails, updateGoodsV2, getHospitalInfoByStoreId, getCheckPackageIdList } from '@/utils/goods'; import { updateGoods ,updateStock,dosageAll,getDeparts,getGoodsList, getGoodDetails, updateGoodsV2, getHospitalInfoByStoreId, getCheckPackageIdList, getTypeCodeList } from '@/utils/goods';
import Cropper from '@/components/common/cropper.vue' import Cropper from '@/components/common/cropper.vue'
import { originRules1, originRules2, originRules } from './rules'; import { originRules1, originRules2, originRules } from './rules';
...@@ -947,8 +947,8 @@ ...@@ -947,8 +947,8 @@
checkPackageIdList: [{name:'其他',content:0}], checkPackageIdList: [{name:'其他',content:0}],
hospitalTypeList: [{label:'村卫生室',value:1},{label:'乡镇卫生院/中心',value:2}], // 医疗机构类型 hospitalTypeList: [{label:'村卫生室',value:1},{label:'乡镇卫生院/中心',value:2}], // 医疗机构类型
checkTypeList: [{label:'常规检测',value:1}], // 检测类型 checkTypeList: [{label:'常规检测',value:1}], // 检测类型
suitableList: [{label:'儿童',value:'1'},{label:'青年',value:'2'},{label:'中年',value:'4'},{label:'老年',value:'8'},{label:'40-74岁的结直肠癌高风险人群',value:'10'}], // 适用人群 // suitableList: [{label:'儿童',value:'1'},{label:'青年',value:'2'},{label:'中年',value:'4'},{label:'老年',value:'8'},{label:'40-74岁的结直肠癌高风险人群',value:'10'}], // 适用人群
suitableList: [],
// 不同类型服务的表单通用字段 // 不同类型服务的表单通用字段
// 不同类型服务的表单通用字段 // 不同类型服务的表单通用字段
// 不同类型服务的表单通用字段 // 不同类型服务的表单通用字段
...@@ -1017,6 +1017,7 @@ ...@@ -1017,6 +1017,7 @@
this.isEdit = id != 'add'; this.isEdit = id != 'add';
this.curmbThird = this.title; this.curmbThird = this.title;
this.formData.storeId = Number(storeId) || ''; this.formData.storeId = Number(storeId) || '';
this.getTypeCodeList();
this.getLever(0,1) this.getLever(0,1)
dosageAll().then((res)=>{ dosageAll().then((res)=>{
this.doseAll = res.data this.doseAll = res.data
...@@ -1047,11 +1048,26 @@ ...@@ -1047,11 +1048,26 @@
} }
}, },
methods: { methods: {
// 获取适用人群
getTypeCodeList() {
return getTypeCodeList().then((res) => {
if (res.code == '000000') {
this.suitableList = [];
for (const item of res.data) {
this.suitableList.push({
label: item.value,
value: item.no + ''
})
}
}
}).catch((err)=>{})
},
//eidt状态 //eidt状态
async getDetailByEdit(id, goodsType){ async getDetailByEdit(id, goodsType){
this.goodsId = id ; this.goodsId = id ;
if(goodsType == 337){ if(goodsType == 337){
this.isCheckServe = true; this.isCheckServe = true;
await this.getTypeCodeList();
const res = await getGoodDetails(id); const res = await getGoodDetails(id);
console.log(`========================>`, res); console.log(`========================>`, res);
if(res.code != '000000'){ if(res.code != '000000'){
...@@ -1790,6 +1806,9 @@ ...@@ -1790,6 +1806,9 @@
} }
} }
} }
.suitableList-select {
width: 445px;
}
.el-button--text{ .el-button--text{
color: #449284; color: #449284;
font-size: 14px; font-size: 14px;
......
...@@ -44,16 +44,13 @@ ...@@ -44,16 +44,13 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="status" prop="goodsShowStatusStr"
label="状态" label="状态"
min-width="100" min-width="100"
align="center" align="center"
:filters="getFilterStatusArr('status','showStatusStr')" :filters="getFilterArr('goodsShowStatusStr')"
:filter-method="filterStatusHandler" :filter-method="filterStatusHandler"
> >
<template slot-scope="scope">
<span>{{scope.row.goodsShowStatusStr}}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="expressCompany" label="物流公司" min-width="100" align="center"> <el-table-column prop="expressCompany" label="物流公司" min-width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -70,7 +67,7 @@ ...@@ -70,7 +67,7 @@
label="所属包裹" label="所属包裹"
min-width="100" min-width="100"
align="center" align="center"
:filters="getFilterPackageArr('belongPackage')" :filters="getFilterArr('belongPackage')"
:filter-method="filterPackageHandler" :filter-method="filterPackageHandler"
> >
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -520,17 +517,18 @@ ...@@ -520,17 +517,18 @@
} }
}); });
}, },
getFilterStatusArr(value,valueStr) { getFilterArr(value) {
let newFilterArr = []; let newFilterArr = [];
for (const newItem of this.tableData) { for (const newItem of this.tableData) {
let flag = true;
for (const item of newFilterArr) { for (const item of newFilterArr) {
if(item.text == this.orderDetailData[valueStr]) { if(item.text == newItem[value]) {
return newFilterArr; flag = false;
} }
} }
if (newItem[value]) { if(newItem[value] && flag) {
newFilterArr.push({ newFilterArr.push({
text: this.orderDetailData[valueStr], text: newItem[value],
value: newItem[value] value: newItem[value]
}) })
} }
...@@ -538,24 +536,7 @@ ...@@ -538,24 +536,7 @@
return newFilterArr; return newFilterArr;
}, },
filterStatusHandler(value, row, column) { filterStatusHandler(value, row, column) {
return row.status === value; return row.goodsShowStatusStr === value;
},
getFilterPackageArr(value) {
let newFilterArr = [];
for (const newItem of this.tableData) {
for (const item of newFilterArr) {
if(item.text == newItem[value]) {
return newFilterArr;
}
}
if (newItem[value]) {
newFilterArr.push({
text: newItem[value],
value: newItem[value]
})
}
}
return newFilterArr;
}, },
filterPackageHandler(value, row, column) { filterPackageHandler(value, row, column) {
return row.belongPackage === value; return row.belongPackage === value;
......
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册