|
|
@@ -14,6 +14,16 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="机构" prop="orgCode">
|
|
|
+ <el-select v-model="queryParams.orgCode">
|
|
|
+ <el-option
|
|
|
+ v-for="item in dropDownOrgList"
|
|
|
+ :key="item.orgCode"
|
|
|
+ :label="item.orgName"
|
|
|
+ :value="item.orgCode">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
@@ -87,6 +97,16 @@
|
|
|
<el-form-item prop="packageDesn" label="套餐描述">
|
|
|
<el-input v-model.trim="form.packageDesn" placeholder="请输入套餐描述" type="textarea" maxlength="200" />
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="机构" prop="orgCode">
|
|
|
+ <el-select v-model="form.orgCode">
|
|
|
+ <el-option
|
|
|
+ v-for="item in dropDownOrgList"
|
|
|
+ :key="item.orgCode"
|
|
|
+ :label="item.orgName"
|
|
|
+ :value="item.orgCode">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
@@ -97,9 +117,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { selectAll, save, del,edit } from '@/api/comboMeal/index'
|
|
|
+import { selectAll, save, del,edit,list } from '@/api/comboMeal/index'
|
|
|
// import lookDetail from './lookDetail.vue';
|
|
|
// import trainDetatil from './trainDetatil.vue';
|
|
|
+import {dropDownOrg} from '@/api/system/dept.js'
|
|
|
export default {
|
|
|
name: "patient_list",
|
|
|
dicts: ['time_type', 'package_type', 'dict_status'],
|
|
|
@@ -122,7 +143,8 @@ export default {
|
|
|
queryParams: {
|
|
|
packageType: '',
|
|
|
packageName: '',
|
|
|
- status: '0,1'
|
|
|
+ status: '0,1',
|
|
|
+ orgCode: ""
|
|
|
},
|
|
|
statusOption: [
|
|
|
{
|
|
|
@@ -148,18 +170,26 @@ export default {
|
|
|
},
|
|
|
form: {
|
|
|
|
|
|
- }
|
|
|
+ },
|
|
|
+ dropDownOrgList: []
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
+ this.dropDownOrg();
|
|
|
},
|
|
|
mounted() {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ /** 机构下拉框 */
|
|
|
+ dropDownOrg() {
|
|
|
+ dropDownOrg().then(resp =>{
|
|
|
+ this.dropDownOrgList = resp.data
|
|
|
+ })
|
|
|
+ },
|
|
|
handleStatus(e, status) {
|
|
|
- edit({ id: e.id, status: status }).then(response => {
|
|
|
+ edit({ id: e.id, status: status, orgCode: e.orgCode, orgName: e.orgName }).then(response => {
|
|
|
this.$modal.msgSuccess(status == 0 ? `启用成功` : '停用成功');
|
|
|
this.getList();
|
|
|
});
|
|
|
@@ -168,12 +198,15 @@ export default {
|
|
|
handleAdd(row) {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
+ if(this.queryParams.orgCode != '') {
|
|
|
+ this.form.orgCode = this.queryParams.orgCode
|
|
|
+ }
|
|
|
this.title = "添加套餐";
|
|
|
},
|
|
|
/** 查询机构列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- selectAll(this.queryParams).then(response => {
|
|
|
+ list(this.queryParams).then(response => {
|
|
|
this.listData = response.data
|
|
|
this.total = response.data.total;
|
|
|
this.loading = false;
|
|
|
@@ -219,6 +252,9 @@ export default {
|
|
|
handelEdit(row) {
|
|
|
let catchForm = JSON.parse(JSON.stringify(row));
|
|
|
this.form = catchForm
|
|
|
+ if(this.queryParams.orgCode != '') {
|
|
|
+ this.form.orgCode = this.queryParams.orgCode
|
|
|
+ }
|
|
|
this.open = true;
|
|
|
this.title = "编辑套餐";
|
|
|
},
|
|
|
@@ -232,7 +268,7 @@ export default {
|
|
|
res.data.geneticDiseases = res.data.geneticDiseases ? res.data.geneticDiseases.split(',') : undefined
|
|
|
res.data.tags = res.data.tags ? res.data.tags.split(',') : undefined
|
|
|
res.data.diagnoseResultType = res.data.diagnoseResultType ? res.data.diagnoseResultType.split(',') : undefined
|
|
|
- learnSelectAll().then(res1 => {
|
|
|
+ learnSelectAll(item).then(res1 => {
|
|
|
res1.data.map((item) => {
|
|
|
if (item.id == res.data.packageId) {
|
|
|
res.data.packageName = item.packageName
|
|
|
@@ -266,6 +302,11 @@ export default {
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
+ if(this.form.orgCode != '' && this.form.orgCode != undefined) {
|
|
|
+ const org = this.dropDownOrgList.find(item => item.orgCode === this.form.orgCode)
|
|
|
+ console.log(this.form.orgCode)
|
|
|
+ this.form.orgName = org.orgName
|
|
|
+ }
|
|
|
let catchForm = this.form
|
|
|
if(catchForm.id === null || catchForm.id === undefined || catchForm.id === "") {
|
|
|
save(catchForm).then(res => {
|