Merge remote-tracking branch 'origin/ch' into sdl_20220916_护理站人员功能

This commit is contained in:
闫晓茹 2022-09-28 14:25:30 +08:00
commit 717ef57880
4 changed files with 135 additions and 11 deletions

View File

@ -48,7 +48,7 @@ export function addNurseItem(data) {
export function updateNurseItem(data) {
return request({
url: '/system/stationItem/edit',
method: 'put',
method: 'post',
data: data
})
}

View File

@ -972,6 +972,7 @@ export default {
});
},
handleQuery() {
this.loading = true;
this.queryParams.pageNum = 1;
this.liststationinfo();
},
@ -1034,6 +1035,7 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.loading = true;
const id = row.id || this.ids;
getStation(id)
.then((response) => {
@ -1093,6 +1095,7 @@ export default {
// });
});
this.open = true;
this.loading = false;
});
},
/** 提交按钮 */

View File

@ -228,7 +228,17 @@
>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="所属护理站" prop="nurseStationId">
<el-button style="width: 370px; text-align: left; height: 36px">
<el-button
style="width: 360px; text-align: left; height: 36px; color: #c0c4cc"
@click="open3 = true"
v-if="form.nurseStationName == '请选择所属护理站'"
>
{{ form.nurseStationName }}
</el-button>
<el-button
style="width: 360px; text-align: left; height: 36px"
@click="open3 = true"
>
{{ form.nurseStationName }}
</el-button>
</el-form-item>
@ -246,19 +256,19 @@
maxlength="10"
/>
</el-form-item>
<el-form-item label="耗材包价格" prop="consumablePrice">
<el-form-item label="耗材包价格" prop=" ">
<el-input
v-model="form.consumablePrice"
placeholder="请输入耗材包价格"
type="number"
min="0"
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>10){value=value.slice(0,10)}"
min="0"
/>
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input
v-model="form.sort"
placeholder="请输入排序"
placeholder="不可输入小数点"
type="number"
min="0"
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+0)} if(value.length>10){value=value.slice(0,10)}"
@ -431,11 +441,104 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- // -->
<!-- xg// -->
<el-dialog
width="1150px"
title="选择所属项目"
title="选择所属护理站"
:visible.sync="open3"
append-to-body
:before-close="cancel2"
>
<el-form
:model="nurseStationqueryParams"
ref="queryForm"
size="small"
:inline="true"
label-width="90px"
>
<el-form-item label="护理站名称">
<el-input
style="width: 180px"
v-model="nurseStationqueryParams.nurseStationName"
placeholder="请输入项目名称"
clearable
@keyup.enter.native="handleQuery2"
/>
</el-form-item>
<el-form-item label="护理站编号">
<el-input
style="width: 180px"
v-model="nurseStationqueryParams.nurseStationCode"
placeholder="请输入护理站编号"
clearable
@keyup.enter.native="handleQuery2"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery2"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="nurseStationlist2"
@cell-dblclick="clicknurseStation2"
>
<el-table-column width="60" align="center" label="请选择">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
circle
@click="clicknurseStation2(scope.row)"
v-if="form.nurseStationId == scope.row.id"
></el-button>
<el-button
style="width: 15px; height: 15px"
@click="clicknurseStation2(scope.row)"
circle
v-else
></el-button>
</template>
</el-table-column>
<el-table-column
label="护理站名称"
align="center"
prop="nurseStationName"
/>
<el-table-column
label="护理站编号"
align="center"
prop="nurseStationCode"
/>
<el-table-column label="护理站经度" align="center" prop="longitude" />
<el-table-column label="护理站纬度" align="center" prop="latitude" />
<el-table-column label="联系电话" align="center" prop="phone" />
<el-table-column label="护理站地址" align="center" prop="address" />
<el-table-column label="负责人" align="center" prop="dutyPerson" />
<el-table-column label="负责人电话" align="center" prop="dutyPhone" />
</el-table>
<pagination
v-show="total2 > 0"
:total="total2"
:page.sync="nurseStationqueryParams.pageNum"
:limit.sync="nurseStationqueryParams.pageSize"
@pagination="listinfo"
/>
</el-dialog>
<!-- add// -->
<el-dialog
width="1150px"
title="选择所属护理站"
:visible.sync="open2"
append-to-body
:before-close="cancel2"
@ -530,7 +633,6 @@
@pagination="listinfo"
/>
</el-dialog>
<!-- // -->
<el-dialog
:title="upload.title"
@ -623,6 +725,7 @@ export default {
//
open: false,
open2: false,
open3: false,
xgopen: false,
index: "",
//
@ -665,6 +768,13 @@ export default {
form: {},
//
rules: {
nurseStationId: [
{
required: true,
message: "请选择所属护理站",
trigger: "blur",
},
],
consumableDetail: [
{
required: true,
@ -793,7 +903,14 @@ export default {
this.index = index;
this.open2 = true;
},
//
clicknurseStation2(item) {
this.form.nurseStationId = item.id;
this.form.nurseStationName = item.nurseStationName;
this.open3 = false;
this.reset2();
},
clicknurseStation(item) {
console.log(item);
console.log(this.index);
@ -818,6 +935,7 @@ export default {
},
cancel2() {
this.open2 = false;
this.open3 = false;
this.reset2();
list(this.nurseStationqueryParams).then((res) => {
console.log(res);
@ -875,14 +993,15 @@ export default {
});
},
handleQuery() {
this.loading = true;
this.queryParams.pageNum = 1;
this.listStationConsumableinfo();
},
//
listinfo() {
list(this.nurseStationqueryParams).then((res) => {
console.log(res);
this.nurseStationlist2 = res.rows;
console.log(this.nurseStationlist2);
this.total2 = res.total;
});
},
@ -937,12 +1056,14 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
this.loading = true;
this.reset();
const id = row.id || this.ids;
getStationConsumable(id).then((response) => {
this.form = response.data;
this.xgopen = true;
this.title = "修改护理站耗材信息";
this.loading = false;
});
},
/** 提交按钮 */

View File

@ -1185,7 +1185,7 @@ export default {
this.$refs["form"].validate((valid) => {
console.log(valid);
if (valid) {
if (this.form.id != null) {
if (this.form.nurseStationItem.id != null) {
updateNurseItem(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;