修改
This commit is contained in:
parent
08e9be79f6
commit
c2a7707b2f
44
src/api/system/classifyItem.js
Normal file
44
src/api/system/classifyItem.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询护理机构和护理项目分类信息列表
|
||||||
|
export function listInfo(query) {
|
||||||
|
return request({
|
||||||
|
url: '/classifyItem/info/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询护理机构和护理项目分类信息详细
|
||||||
|
export function getInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/classifyItem/info/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增护理机构和护理项目分类信息
|
||||||
|
export function addInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/classifyItem/info/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改护理机构和护理项目分类信息
|
||||||
|
export function updateInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/classifyItem/info/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除护理机构和护理项目分类信息
|
||||||
|
export function delInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/classifyItem/info/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -73,7 +73,8 @@ export default {
|
|||||||
],
|
],
|
||||||
// goodAttributeDetailsLists:[],
|
// goodAttributeDetailsLists:[],
|
||||||
goodDetailsLists: [],
|
goodDetailsLists: [],
|
||||||
ids: 9999999,
|
idd: 9999999,
|
||||||
|
ids: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
shangjia: {
|
shangjia: {
|
||||||
id: null,
|
id: null,
|
||||||
@ -201,28 +202,28 @@ export default {
|
|||||||
// if (this.goodDetailsLists.length == 5) {
|
// if (this.goodDetailsLists.length == 5) {
|
||||||
// this.$message.error("最多只能5条");
|
// this.$message.error("最多只能5条");
|
||||||
// } else {
|
// } else {
|
||||||
this.ids++;
|
this.idd++;
|
||||||
var obj = {
|
var obj = {
|
||||||
attributePitureUrl: "",
|
attributePitureUrl: "",
|
||||||
goodsPrice: "",
|
goodsPrice: "",
|
||||||
goodsStock: "",
|
goodsStock: "",
|
||||||
attributeDetailsSort: null,
|
attributeDetailsSort: null,
|
||||||
ids: this.ids,
|
idd: this.idd,
|
||||||
};
|
};
|
||||||
this.goodDetailsLists.push(obj);
|
this.goodDetailsLists.push(obj);
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
delgoodAttributeDetail(item) {
|
delgoodAttributeDetail(item) {
|
||||||
if (item.ids && !item.attributeDetailsId) {
|
if (item.idd && !item.attributeDetailsId) {
|
||||||
if (this.goodDetailsLists.length == 1) {
|
if (this.goodDetailsLists.length == 1) {
|
||||||
this.$message.error("最后一条不可删除");
|
this.$message.error("最后一条不可删除");
|
||||||
} else {
|
} else {
|
||||||
this.goodDetailsLists = this.goodDetailsLists.filter(
|
this.goodDetailsLists = this.goodDetailsLists.filter(
|
||||||
(e) => e.ids != item.ids
|
(e) => e.idd != item.idd
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else if (!item.ids && item.attributeDetailsId) {
|
} else if (!item.idd && item.attributeDetailsId) {
|
||||||
if (this.goodDetailsLists.length == 1) {
|
if (this.goodDetailsLists.length == 1) {
|
||||||
this.$message.error("最后一条不可删除");
|
this.$message.error("最后一条不可删除");
|
||||||
} else {
|
} else {
|
||||||
@ -322,7 +323,7 @@ export default {
|
|||||||
goodsPrice: "",
|
goodsPrice: "",
|
||||||
goodsStock: "",
|
goodsStock: "",
|
||||||
attributeDetailsSort: null,
|
attributeDetailsSort: null,
|
||||||
ids: 9999999,
|
idd: 9999999,
|
||||||
}, ];
|
}, ];
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -363,7 +364,7 @@ export default {
|
|||||||
goodsPrice: "",
|
goodsPrice: "",
|
||||||
goodsStock: "",
|
goodsStock: "",
|
||||||
sort: null,
|
sort: null,
|
||||||
ids: 9999999,
|
idd: 9999999,
|
||||||
}, ];
|
}, ];
|
||||||
this.open = true;
|
this.open = true;
|
||||||
},
|
},
|
||||||
@ -464,13 +465,13 @@ export default {
|
|||||||
},
|
},
|
||||||
attributePitureitem(item) {
|
attributePitureitem(item) {
|
||||||
let items = JSON.parse(item);
|
let items = JSON.parse(item);
|
||||||
if (items.ids && !items.id) {
|
if (items.idd && !items.id) {
|
||||||
this.goodDetailsLists.forEach((e) => {
|
this.goodDetailsLists.forEach((e) => {
|
||||||
if (e.ids == items.ids) {
|
if (e.idd == items.idd) {
|
||||||
e.attributePitureUrl = items.attributePitureUrl;
|
e.attributePitureUrl = items.attributePitureUrl;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (!items.ids && items.attributeDetailsId) {
|
} else if (!items.idd && items.attributeDetailsId) {
|
||||||
this.goodDetailsLists.forEach((e) => {
|
this.goodDetailsLists.forEach((e) => {
|
||||||
if (e.attributeDetailsId == items.attributeDetailsId) {
|
if (e.attributeDetailsId == items.attributeDetailsId) {
|
||||||
e.attributePitureUrl = items.attributePitureUrl;
|
e.attributePitureUrl = items.attributePitureUrl;
|
||||||
|
|||||||
578
src/views/system/classifyItem/index.vue
Normal file
578
src/views/system/classifyItem/index.vue
Normal file
@ -0,0 +1,578 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item label="分类编码" prop="classifyCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.classifyCode"
|
||||||
|
placeholder="请输入分类编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分类名称" prop="classifyName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.classifyName"
|
||||||
|
placeholder="请输入分类名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="分类类型" prop="classifyType">
|
||||||
|
<el-select v-model="queryParams.classifyType" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="分类排序" prop="classifySort">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.classifySort"
|
||||||
|
placeholder="请输入分类排序"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</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
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['classify:info:add']"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['classify:info:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['classify:info:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['classify:info:export']"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</el-col> -->
|
||||||
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="infoList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="分类编码" align="center" prop="classifyCode" />
|
||||||
|
<el-table-column label="分类名称" align="center" prop="classifyName" />
|
||||||
|
<!-- <el-table-column label="分类类型" align="center" prop="classifyType">
|
||||||
|
<template slot-scope="scope"
|
||||||
|
>{{ scope.row.classifyType == "NURSE_AGNECY" ? "护理机构分类" : "" }}
|
||||||
|
{{ scope.row.classifyType == "NURSE_ITEM" ? "护理项目分类" : "" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column label="分类排序" align="center" prop="classifySort" />
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['classify:info:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['classify:info:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加护理项目分类信息对话框 -->
|
||||||
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="open"
|
||||||
|
width="1000px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="80px"
|
||||||
|
:inline="true"
|
||||||
|
:before-close="cancel"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-for="(item, index) in form.nurseClassifyInfoList"
|
||||||
|
:key="index"
|
||||||
|
style="margin-bottom: 30px"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
label="分类名称"
|
||||||
|
:rules="rules.nurseClassifyInfoList.classifyName"
|
||||||
|
:prop="`nurseClassifyInfoList.${index}.classifyName`"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
style="width: 200px"
|
||||||
|
v-model="item.classifyName"
|
||||||
|
placeholder="请输入分类名称"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="分类排序"
|
||||||
|
:rules="rules.nurseClassifyInfoList.classifySort"
|
||||||
|
:prop="`nurseClassifyInfoList.${index}.classifySort`"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
style="width: 200px"
|
||||||
|
v-model="item.classifySort"
|
||||||
|
placeholder="请输入分类排序"
|
||||||
|
oninput="value=value.replace(/[^\d]/g,'')"
|
||||||
|
maxLength="10"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="分类图标"
|
||||||
|
:rules="rules.nurseClassifyInfoList.classifyPictureUrl"
|
||||||
|
:prop="`nurseClassifyInfoList.${index}.classifyPictureUrl`"
|
||||||
|
>
|
||||||
|
<stationAcatar
|
||||||
|
style="margin-top: -25px"
|
||||||
|
@imgUrl="imgclassifyPictureUrl"
|
||||||
|
@item="imgclassifyPictureitem"
|
||||||
|
:img="item.classifyPictureUrl"
|
||||||
|
:type="'nurseItemClassifyUrl'"
|
||||||
|
:item="item"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-circle-plus-outline"
|
||||||
|
style="margin-top: 2px; margin-left: 50px"
|
||||||
|
v-if="index == 0"
|
||||||
|
@click="addnurseClassifyitem"
|
||||||
|
></el-button>
|
||||||
|
<!-- circle -->
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
plain
|
||||||
|
style="margin-top: 2px; margin-left: 50px"
|
||||||
|
v-if="index != 0"
|
||||||
|
@click="delnurseClassifyitem(index)"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 修改护理项目分类信息对话框 -->
|
||||||
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="editopen"
|
||||||
|
width="500px"
|
||||||
|
append-to-body
|
||||||
|
:before-close="cancel"
|
||||||
|
>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="分类名称" prop="classifyName">
|
||||||
|
<el-input v-model="form.classifyName" placeholder="请输入分类名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分类图标" prop="classifyPictureUrl">
|
||||||
|
<stationAcatar
|
||||||
|
@imgUrl="imgclassifyPictureUrl"
|
||||||
|
@item="imgclassifyPictureitem"
|
||||||
|
:img="form.classifyPictureUrl"
|
||||||
|
:type="'nurseItemClassifyUrl'"
|
||||||
|
:item="form"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分类排序" prop="classifySort">
|
||||||
|
<el-input
|
||||||
|
v-model="form.classifySort"
|
||||||
|
placeholder="请输入分类排序"
|
||||||
|
oninput="value=value.replace(/[^\d]/g,'')"
|
||||||
|
maxLength="10"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import stationAcatar from "../stationAvatar/index.vue";
|
||||||
|
import {
|
||||||
|
listInfo,
|
||||||
|
getInfo,
|
||||||
|
delInfo,
|
||||||
|
addInfo,
|
||||||
|
updateInfo,
|
||||||
|
} from "@/api/system/classifyItem.js";
|
||||||
|
import { updatePicture } from "@/api/system/station";
|
||||||
|
export default {
|
||||||
|
name: "classify",
|
||||||
|
components: { stationAcatar },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 护理机构和护理项目分类信息表格数据
|
||||||
|
infoList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
editopen: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
parentId: null,
|
||||||
|
classifyCode: null,
|
||||||
|
classifyName: null,
|
||||||
|
classifyLevel: null,
|
||||||
|
classifyType: null,
|
||||||
|
classifyPictureUrl: null,
|
||||||
|
classifySort: null,
|
||||||
|
},
|
||||||
|
//分类所属类型
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
value: "NURSE_AGNECY",
|
||||||
|
label: "护理机构分类",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "NURSE_ITEM",
|
||||||
|
label: "护理项目分类",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// 表单参数
|
||||||
|
form: {
|
||||||
|
nurseClassifyInfoList: [],
|
||||||
|
},
|
||||||
|
idd: 0,
|
||||||
|
classifyPictureUrl: null,
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
nurseClassifyInfoList: {
|
||||||
|
classifyName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入分类名称",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
classifyPictureUrl: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择分类图标",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
classifySort: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入分类排序",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
classifyName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入分类名称",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
classifyPictureUrl: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择分类图标",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
classifySort: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入分类排序",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//添加时删除item
|
||||||
|
delnurseClassifyitem(index) {
|
||||||
|
this.form.nurseClassifyInfoList.splice(index, 1);
|
||||||
|
},
|
||||||
|
//添加时新增item
|
||||||
|
addnurseClassifyitem() {
|
||||||
|
this.idd++;
|
||||||
|
var obj = {
|
||||||
|
classifyName: "",
|
||||||
|
classifyPictureUrl: "",
|
||||||
|
classifySort: "",
|
||||||
|
idd: this.idd,
|
||||||
|
};
|
||||||
|
if (this.form.nurseClassifyInfoList.length == 5) {
|
||||||
|
this.$message.error("最多批量添加5条");
|
||||||
|
} else {
|
||||||
|
this.form.nurseClassifyInfoList.push(obj);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//接收图片
|
||||||
|
imgclassifyPictureUrl(e) {},
|
||||||
|
//接收图片所属的item
|
||||||
|
imgclassifyPictureitem(item) {
|
||||||
|
let items = JSON.parse(item);
|
||||||
|
if (items.idd && !items.id) {
|
||||||
|
this.form.nurseClassifyInfoList.forEach((e) => {
|
||||||
|
if (e.idd == items.idd) {
|
||||||
|
e.classifyPictureUrl = items.classifyPictureUrl;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (!items.idd && items.id) {
|
||||||
|
this.form.classifyPictureUrl = items.classifyPictureUrl;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 查询护理机构和护理项目分类信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listInfo(this.queryParams).then((response) => {
|
||||||
|
this.infoList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
if (this.editopen) {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
if (this.form.classifyPictureUrl != this.classifyPictureUrl) {
|
||||||
|
obj.pictureUrlList.push(this.classifyPictureUrl);
|
||||||
|
}
|
||||||
|
updatePicture(obj).then((res) => {
|
||||||
|
this.editopen = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (this.open) {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
if (this.form.nurseClassifyInfoList) {
|
||||||
|
this.form.nurseClassifyInfoList.forEach((e) => {
|
||||||
|
obj.pictureUrlList.push(e.classifyPictureUrl);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
updatePicture(obj).then((res) => {
|
||||||
|
this.open = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
parentId: null,
|
||||||
|
classifyCode: null,
|
||||||
|
classifyName: null,
|
||||||
|
classifyLevel: null,
|
||||||
|
classifyType: null,
|
||||||
|
classifyPictureUrl: null,
|
||||||
|
classifySort: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map((item) => item.id);
|
||||||
|
this.single = selection.length !== 1;
|
||||||
|
this.multiple = !selection.length;
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.form = {
|
||||||
|
nurseClassifyInfoList: [
|
||||||
|
{
|
||||||
|
classifyName: "",
|
||||||
|
classifyPictureUrl: "",
|
||||||
|
classifySort: "",
|
||||||
|
idd: this.idd,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加护理项目分类信息";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids;
|
||||||
|
getInfo(id).then((response) => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.classifyPictureUrl = response.data.classifyPictureUrl;
|
||||||
|
this.editopen = true;
|
||||||
|
this.title = "修改护理项目分类信息";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
console.log(this.form);
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateInfo(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
if (this.form.classifyPictureUrl != this.classifyPictureUrl) {
|
||||||
|
var obj = { pictureUrlList: [] };
|
||||||
|
obj.pictureUrlList.push(this.classifyPictureUrl);
|
||||||
|
updatePicture(obj).then((res) => {});
|
||||||
|
}
|
||||||
|
this.editopen = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addInfo(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
console.log(row);
|
||||||
|
this.$modal
|
||||||
|
.confirm("是否确认删除?")
|
||||||
|
.then(function () {
|
||||||
|
return delInfo(ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download(
|
||||||
|
"classify/info/export",
|
||||||
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`info_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@ -69,7 +69,7 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
goodDetailsLists: [],
|
goodDetailsLists: [],
|
||||||
ids: 9999999,
|
idd: 9999999,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
shangjia: {
|
shangjia: {
|
||||||
id: null,
|
id: null,
|
||||||
@ -180,28 +180,28 @@ export default {
|
|||||||
if (this.goodDetailsLists.length == 5) {
|
if (this.goodDetailsLists.length == 5) {
|
||||||
this.$message.error("最多只能5条");
|
this.$message.error("最多只能5条");
|
||||||
} else {
|
} else {
|
||||||
this.ids++;
|
this.idd++;
|
||||||
var obj = {
|
var obj = {
|
||||||
attributePitureUrl: "",
|
attributePitureUrl: "",
|
||||||
goodsPrice: "",
|
goodsPrice: "",
|
||||||
goodsStock: "",
|
goodsStock: "",
|
||||||
sort: "",
|
sort: "",
|
||||||
ids: this.ids,
|
idd: this.idd,
|
||||||
};
|
};
|
||||||
this.goodDetailsLists.push(obj);
|
this.goodDetailsLists.push(obj);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
delgoodAttributeDetail(item) {
|
delgoodAttributeDetail(item) {
|
||||||
if (item.ids && !item.attributeDetailsId) {
|
if (item.idd && !item.attributeDetailsId) {
|
||||||
if (this.goodDetailsLists.length == 1) {
|
if (this.goodDetailsLists.length == 1) {
|
||||||
this.$message.error("最后一条不可删除");
|
this.$message.error("最后一条不可删除");
|
||||||
} else {
|
} else {
|
||||||
this.goodDetailsLists = this.goodDetailsLists.filter(
|
this.goodDetailsLists = this.goodDetailsLists.filter(
|
||||||
(e) => e.ids != item.ids
|
(e) => e.idd != item.idd
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else if (!item.ids && item.attributeDetailsId) {
|
} else if (!item.idd && item.attributeDetailsId) {
|
||||||
if (this.goodDetailsLists.length == 1) {
|
if (this.goodDetailsLists.length == 1) {
|
||||||
this.$message.error("最后一条不可删除");
|
this.$message.error("最后一条不可删除");
|
||||||
} else {
|
} else {
|
||||||
@ -293,7 +293,7 @@ export default {
|
|||||||
goodsPrice: "",
|
goodsPrice: "",
|
||||||
goodsStock: "",
|
goodsStock: "",
|
||||||
sort: "",
|
sort: "",
|
||||||
ids: 9999999,
|
idd: 9999999,
|
||||||
}, ];
|
}, ];
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -329,7 +329,7 @@ export default {
|
|||||||
goodsPrice: "",
|
goodsPrice: "",
|
||||||
goodsStock: "",
|
goodsStock: "",
|
||||||
sort: "",
|
sort: "",
|
||||||
ids: 9999999,
|
idd: 9999999,
|
||||||
}, ];
|
}, ];
|
||||||
this.open = true;
|
this.open = true;
|
||||||
},
|
},
|
||||||
@ -390,7 +390,6 @@ export default {
|
|||||||
var obj = { pictureUrlList: [] };
|
var obj = { pictureUrlList: [] };
|
||||||
obj.pictureUrlList.push(row.goodsPictureUrl);
|
obj.pictureUrlList.push(row.goodsPictureUrl);
|
||||||
updatePicture(obj).then((res) => {});
|
updatePicture(obj).then((res) => {});
|
||||||
|
|
||||||
delGoodsInfo(row.goodsInfoId).then((res) => {
|
delGoodsInfo(row.goodsInfoId).then((res) => {
|
||||||
this.$message.success("删除成功");
|
this.$message.success("删除成功");
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -404,13 +403,13 @@ export default {
|
|||||||
attributePitureUrl(imgUrl) {},
|
attributePitureUrl(imgUrl) {},
|
||||||
attributePitureitem(item) {
|
attributePitureitem(item) {
|
||||||
let items = JSON.parse(item);
|
let items = JSON.parse(item);
|
||||||
if (items.ids && !items.id) {
|
if (items.idd && !items.id) {
|
||||||
this.goodDetailsLists.forEach((e) => {
|
this.goodDetailsLists.forEach((e) => {
|
||||||
if (e.ids == items.ids) {
|
if (e.idd == items.idd) {
|
||||||
e.attributePitureUrl = items.attributePitureUrl;
|
e.attributePitureUrl = items.attributePitureUrl;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (!items.ids && items.attributeDetailsId) {
|
} else if (!items.idd && items.attributeDetailsId) {
|
||||||
this.goodDetailsLists.forEach((e) => {
|
this.goodDetailsLists.forEach((e) => {
|
||||||
if (e.attributeDetailsId == items.attributeDetailsId) {
|
if (e.attributeDetailsId == items.attributeDetailsId) {
|
||||||
e.attributePitureUrl = items.attributePitureUrl;
|
e.attributePitureUrl = items.attributePitureUrl;
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-form-item label="护理类型编码" prop="nurseTypeCode">
|
<el-form-item label="护理类型编码" prop="nurseTypeCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.nurseTypeCode"
|
v-model="queryParams.nurseTypeCode"
|
||||||
@ -111,16 +110,8 @@
|
|||||||
prop="nurseTypeName"
|
prop="nurseTypeName"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||||
label="创建时间"
|
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||||
align="center"
|
|
||||||
prop="createTime"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="创建人"
|
|
||||||
align="center"
|
|
||||||
prop="createBy"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
align="center"
|
align="center"
|
||||||
@ -156,59 +147,66 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改护理类型信息对话框 -->
|
<!-- 添加或修改护理类型信息对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open2" width="450px" append-to-body>
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="open2"
|
||||||
|
width="450px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in form.nurseTypeList"
|
v-for="(item, index) in form.nurseTypeList"
|
||||||
:key="index"
|
:key="index"
|
||||||
style="margin-top:10px"
|
style="margin-top: 10px"
|
||||||
>
|
>
|
||||||
<el-form-item label="护理类型名称"
|
<el-form-item
|
||||||
:rules="rules.nurseTypeList.nurseTypeName"
|
label="护理类型名称"
|
||||||
:prop="`nurseTypeList.${index}.nurseTypeName`">
|
:rules="rules.nurseTypeList.nurseTypeName"
|
||||||
|
:prop="`nurseTypeList.${index}.nurseTypeName`"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="item.nurseTypeName"
|
v-model="item.nurseTypeName"
|
||||||
placeholder="请输入护理类型名称"
|
placeholder="请输入护理类型名称"
|
||||||
maxlength="50"
|
maxlength="50"
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
circle
|
circle
|
||||||
plain
|
plain
|
||||||
icon="el-icon-circle-plus-outline"
|
icon="el-icon-circle-plus-outline"
|
||||||
@click="adddisease"
|
@click="adddisease"
|
||||||
v-if="index == 0"
|
v-if="index == 0"
|
||||||
style="margin-top: 2px;margin-left: 10px;"
|
style="margin-top: 2px; margin-left: 10px"
|
||||||
></el-button>
|
></el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
circle
|
circle
|
||||||
plain
|
plain
|
||||||
@click="deldisease(index)"
|
@click="deldisease(index)"
|
||||||
style="margin-top: 2px;margin-left: 10px;"
|
style="margin-top: 2px; margin-left: 10px"
|
||||||
v-if="index != 0"
|
v-if="index != 0"
|
||||||
></el-button>
|
></el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 修改疾病信息字典对话框 -->
|
<!-- 修改疾病信息字典对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||||
<el-form-item label="护理类型名称" prop="nurseTypeName">
|
<el-form-item label="护理类型名称" prop="nurseTypeName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.nurseTypeName"
|
v-model="form.nurseTypeName"
|
||||||
placeholder="请输入护理类型名称"
|
placeholder="请输入护理类型名称"
|
||||||
maxlength="50"
|
maxlength="50"
|
||||||
style="width: 250px"
|
style="width: 250px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -216,7 +214,6 @@
|
|||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -243,7 +240,6 @@ export default {
|
|||||||
multiple: true,
|
multiple: true,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
|
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 护理类型信息表格数据
|
// 护理类型信息表格数据
|
||||||
@ -260,7 +256,6 @@ export default {
|
|||||||
userId: null,
|
userId: null,
|
||||||
nurseTypeCode: null,
|
nurseTypeCode: null,
|
||||||
nurseTypeName: null,
|
nurseTypeName: null,
|
||||||
|
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@ -276,12 +271,12 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
nurseTypeName: [
|
nurseTypeName: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入护理类型名称",
|
message: "请输入护理类型名称",
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -289,8 +284,8 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//删除deldisease
|
//删除deldisease
|
||||||
deldisease(index) {
|
deldisease(index) {
|
||||||
this.form.nurseTypeList.splice(index, 1);
|
this.form.nurseTypeList.splice(index, 1);
|
||||||
},
|
},
|
||||||
adddisease() {
|
adddisease() {
|
||||||
@ -322,11 +317,11 @@ export default {
|
|||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
nurseTypeList:[
|
nurseTypeList: [
|
||||||
{
|
{
|
||||||
nurseTypeName:"",
|
nurseTypeName: "",
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -364,8 +359,8 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
if(this.form==null){
|
if (this.form == null) {
|
||||||
this.form.nurseTypeName = this.form.nurseTypeList[0].nurseTypeName
|
this.form.nurseTypeName = this.form.nurseTypeList[0].nurseTypeName;
|
||||||
}
|
}
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -389,7 +384,7 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认删除护理类型信息的数据项?')
|
.confirm("是否确认删除护理类型信息的数据项?")
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return delNurseType(ids);
|
return delNurseType(ids);
|
||||||
})
|
})
|
||||||
|
|||||||
@ -81,7 +81,7 @@ export default {
|
|||||||
looknurseStationLabel: [{
|
looknurseStationLabel: [{
|
||||||
labelDescription: "",
|
labelDescription: "",
|
||||||
sort: "",
|
sort: "",
|
||||||
ids: 1,
|
idd: 1,
|
||||||
}, ],
|
}, ],
|
||||||
// 护理站信息表格数据
|
// 护理站信息表格数据
|
||||||
stationList: [{
|
stationList: [{
|
||||||
@ -103,7 +103,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
ids: 1,
|
idd: 1,
|
||||||
provincelist: [],
|
provincelist: [],
|
||||||
arealist: [],
|
arealist: [],
|
||||||
citylist: [],
|
citylist: [],
|
||||||
@ -177,7 +177,7 @@ export default {
|
|||||||
this.looknurseStationLabel = [{
|
this.looknurseStationLabel = [{
|
||||||
labelDescription: "",
|
labelDescription: "",
|
||||||
sort: "",
|
sort: "",
|
||||||
ids: 1,
|
idd: 1,
|
||||||
}, ];
|
}, ];
|
||||||
} else {
|
} else {
|
||||||
this.looknurseStationLabel.splice(index, 1);
|
this.looknurseStationLabel.splice(index, 1);
|
||||||
@ -189,11 +189,11 @@ export default {
|
|||||||
if (this.looknurseStationLabel.length == 5) {
|
if (this.looknurseStationLabel.length == 5) {
|
||||||
this.$message.error("最多只能5条");
|
this.$message.error("最多只能5条");
|
||||||
} else {
|
} else {
|
||||||
this.ids++;
|
this.idd++;
|
||||||
var obj = {
|
var obj = {
|
||||||
labelDescription: "",
|
labelDescription: "",
|
||||||
sort: "",
|
sort: "",
|
||||||
ids: this.ids,
|
idd: this.idd,
|
||||||
};
|
};
|
||||||
this.looknurseStationLabel.push(obj);
|
this.looknurseStationLabel.push(obj);
|
||||||
}
|
}
|
||||||
@ -338,7 +338,7 @@ export default {
|
|||||||
this.looknurseStationLabel = [{
|
this.looknurseStationLabel = [{
|
||||||
labelDescription: "",
|
labelDescription: "",
|
||||||
sort: "",
|
sort: "",
|
||||||
ids: 1,
|
idd: 1,
|
||||||
}, ];
|
}, ];
|
||||||
this.title = "添加护理站信息";
|
this.title = "添加护理站信息";
|
||||||
},
|
},
|
||||||
|
|||||||
@ -227,6 +227,10 @@ export default {
|
|||||||
this.items.attributePitureUrl = response.imgUrl;
|
this.items.attributePitureUrl = response.imgUrl;
|
||||||
this.$emit("item", JSON.stringify(this.items));
|
this.$emit("item", JSON.stringify(this.items));
|
||||||
}
|
}
|
||||||
|
if (this.types == "nurseItemClassifyUrl") {
|
||||||
|
this.items.classifyPictureUrl = response.imgUrl;
|
||||||
|
this.$emit("item", JSON.stringify(this.items));
|
||||||
|
}
|
||||||
this.openimg = false;
|
this.openimg = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -235,7 +239,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 实时预览
|
// 实时预览
|
||||||
realTime(data) {
|
realTime(data) {
|
||||||
console.log(data);
|
|
||||||
this.previews = data;
|
this.previews = data;
|
||||||
},
|
},
|
||||||
// 关闭窗口
|
// 关闭窗口
|
||||||
|
|||||||
@ -100,7 +100,7 @@ export default {
|
|||||||
nurseStationName: "请选择所属护理站",
|
nurseStationName: "请选择所属护理站",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ids: 1,
|
idd: 1,
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
"nurseStationItem.nurseItemName": [
|
"nurseStationItem.nurseItemName": [
|
||||||
@ -119,7 +119,7 @@ export default {
|
|||||||
required: true,
|
required: true,
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
message: "请选择项目头像",
|
message: "请选择项目头像",
|
||||||
},],
|
}, ],
|
||||||
nurseStationId: [
|
nurseStationId: [
|
||||||
{ required: true, trigger: "blur", message: "请选择所属护理站" },
|
{ required: true, trigger: "blur", message: "请选择所属护理站" },
|
||||||
],
|
],
|
||||||
@ -138,7 +138,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
imgs(item) {
|
imgs(item) {
|
||||||
this.imgsurl.pictureUrlList.push(item);
|
this.imgsurl.pictureUrlList.push(item);
|
||||||
},
|
},
|
||||||
imgUrl(imgUrl) {
|
imgUrl(imgUrl) {
|
||||||
|
|
||||||
this.form.nurseStationItem.itemPictureUrl = imgUrl;
|
this.form.nurseStationItem.itemPictureUrl = imgUrl;
|
||||||
@ -295,12 +295,12 @@ export default {
|
|||||||
obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl);
|
obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl);
|
||||||
}
|
}
|
||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => { });
|
updatePicture(obj).then((res) => {});
|
||||||
}
|
}
|
||||||
if (this.imgsurl.pictureUrlList.length > 0) {
|
if (this.imgsurl.pictureUrlList.length > 0) {
|
||||||
updatePicture(this.imgsurl).then((res) => {});
|
updatePicture(this.imgsurl).then((res) => {});
|
||||||
}
|
}
|
||||||
this.imgsurl={pictureUrlList:[]};
|
this.imgsurl = { pictureUrlList: [] };
|
||||||
|
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
@ -310,25 +310,25 @@ export default {
|
|||||||
if (this.form.nurseStationItemPrices.length == 5) {
|
if (this.form.nurseStationItemPrices.length == 5) {
|
||||||
this.$message.error("最多只能5条");
|
this.$message.error("最多只能5条");
|
||||||
} else {
|
} else {
|
||||||
this.ids++;
|
this.idd++;
|
||||||
var obj = {
|
var obj = {
|
||||||
serveDurationUnit: "",
|
serveDurationUnit: "",
|
||||||
price: "",
|
price: "",
|
||||||
description: "",
|
description: "",
|
||||||
ids: this.ids,
|
idd: this.idd,
|
||||||
};
|
};
|
||||||
this.form.nurseStationItemPrices.push(obj);
|
this.form.nurseStationItemPrices.push(obj);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
delnurseStationItemPrices(item) {
|
delnurseStationItemPrices(item) {
|
||||||
if (item.ids && !item.nurseItemPriceId) {
|
if (item.idd && !item.nurseItemPriceId) {
|
||||||
if (this.form.nurseStationItemPrices.length == 1) {
|
if (this.form.nurseStationItemPrices.length == 1) {
|
||||||
this.$message.error("最后一条不可删除");
|
this.$message.error("最后一条不可删除");
|
||||||
} else {
|
} else {
|
||||||
this.form.nurseStationItemPrices =
|
this.form.nurseStationItemPrices =
|
||||||
this.form.nurseStationItemPrices.filter((e) => e.ids != item.ids);
|
this.form.nurseStationItemPrices.filter((e) => e.idd != item.idd);
|
||||||
}
|
}
|
||||||
} else if (!item.ids && item.nurseItemPriceId) {
|
} else if (!item.idd && item.nurseItemPriceId) {
|
||||||
if (this.form.nurseStationItemPrices.length == 1) {
|
if (this.form.nurseStationItemPrices.length == 1) {
|
||||||
this.$message.error("最后一条不可删除");
|
this.$message.error("最后一条不可删除");
|
||||||
} else {
|
} else {
|
||||||
@ -363,8 +363,8 @@ export default {
|
|||||||
serveDurationUnit: null,
|
serveDurationUnit: null,
|
||||||
price: null,
|
price: null,
|
||||||
description: null,
|
description: null,
|
||||||
ids: this.ids,
|
idd: this.idd,
|
||||||
},],
|
}, ],
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -429,7 +429,7 @@ export default {
|
|||||||
serveDurationUnit: "",
|
serveDurationUnit: "",
|
||||||
price: "",
|
price: "",
|
||||||
description: "",
|
description: "",
|
||||||
ids: this.ids,
|
idd: this.idd,
|
||||||
};
|
};
|
||||||
this.form.nurseStationItemPrices.push(obj);
|
this.form.nurseStationItemPrices.push(obj);
|
||||||
} else if (this.form.nurseStationItemPrices.length == 0) {
|
} else if (this.form.nurseStationItemPrices.length == 0) {
|
||||||
@ -437,7 +437,7 @@ export default {
|
|||||||
serveDurationUnit: "",
|
serveDurationUnit: "",
|
||||||
price: "",
|
price: "",
|
||||||
description: "",
|
description: "",
|
||||||
ids: this.ids,
|
idd: this.idd,
|
||||||
};
|
};
|
||||||
this.form.nurseStationItemPrices.push(obj);
|
this.form.nurseStationItemPrices.push(obj);
|
||||||
} else if (this.form.nurseStationItemPrices == null) {
|
} else if (this.form.nurseStationItemPrices == null) {
|
||||||
@ -445,7 +445,7 @@ export default {
|
|||||||
serveDurationUnit: "",
|
serveDurationUnit: "",
|
||||||
price: "",
|
price: "",
|
||||||
description: "",
|
description: "",
|
||||||
ids: this.ids,
|
idd: this.idd,
|
||||||
};
|
};
|
||||||
this.form.nurseStationItemPrices.push(obj);
|
this.form.nurseStationItemPrices.push(obj);
|
||||||
}
|
}
|
||||||
@ -471,13 +471,13 @@ export default {
|
|||||||
obj.pictureUrlList.push(this.imgone);
|
obj.pictureUrlList.push(this.imgone);
|
||||||
}
|
}
|
||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => { });
|
updatePicture(obj).then((res) => {});
|
||||||
}
|
}
|
||||||
this.imgsurl={pictureUrlList:[]};
|
this.imgsurl = { pictureUrlList: [] };
|
||||||
this.form.nurseStationItemPrices.forEach(e => {
|
this.form.nurseStationItemPrices.forEach(e => {
|
||||||
e.price = Number(e.price)
|
e.price = Number(e.price)
|
||||||
})
|
})
|
||||||
this.form.nurseStationItem.advanceAppointDuration=0
|
this.form.nurseStationItem.advanceAppointDuration = 0
|
||||||
updateNurseItem(this.form).then((response) => {
|
updateNurseItem(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -487,7 +487,7 @@ export default {
|
|||||||
this.form.nurseStationItemPrices.forEach(e => {
|
this.form.nurseStationItemPrices.forEach(e => {
|
||||||
e.price = Number(e.price)
|
e.price = Number(e.price)
|
||||||
})
|
})
|
||||||
this.form.nurseStationItem.advanceAppointDuration=0
|
this.form.nurseStationItem.advanceAppointDuration = 0
|
||||||
addNurseItem(this.form).then((response) => {
|
addNurseItem(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
@ -504,16 +504,16 @@ export default {
|
|||||||
var that = this;
|
var that = this;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认删除此护理站护理项目?")
|
.confirm("是否确认删除此护理站护理项目?")
|
||||||
.then(function () {
|
.then(function() {
|
||||||
delNurseItem(ids).then(res => {
|
delNurseItem(ids).then(res => {
|
||||||
var obj = { pictureUrlList: [] };
|
var obj = { pictureUrlList: [] };
|
||||||
obj.pictureUrlList.push(row.itemPictureUrl);
|
obj.pictureUrlList.push(row.itemPictureUrl);
|
||||||
updatePicture(obj).then((res) => { });
|
updatePicture(obj).then((res) => {});
|
||||||
that.getList();
|
that.getList();
|
||||||
that.$modal.msgSuccess("删除成功");
|
that.$modal.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => { });
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导入按钮操作 */
|
/** 导入按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user