|
@@ -1,7 +1,13 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
- <el-form-item label="防疫品名称" prop="durgName">
|
|
|
+ <el-form
|
|
|
+ :model="queryParams"
|
|
|
+ ref="queryForm"
|
|
|
+ :inline="true"
|
|
|
+ v-show="showSearch"
|
|
|
+ label-width="68px"
|
|
|
+ >
|
|
|
+ <el-form-item prop="durgName">
|
|
|
<el-input
|
|
|
v-model="queryParams.durgName"
|
|
|
placeholder="请输入防疫品名称"
|
|
@@ -10,7 +16,7 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="品牌" prop="durgBrand">
|
|
|
+ <!-- <el-form-item label="品牌" prop="durgBrand">
|
|
|
<el-input
|
|
|
v-model="queryParams.durgBrand"
|
|
|
placeholder="请输入品牌"
|
|
@@ -99,10 +105,18 @@
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
- </el-form-item>
|
|
|
+ </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-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>
|
|
|
|
|
@@ -115,7 +129,8 @@
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
v-hasPermi="['medicalhealth:antiepidemicarchives:add']"
|
|
|
- >新增</el-button>
|
|
|
+ >新增</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -126,7 +141,8 @@
|
|
|
:disabled="single"
|
|
|
@click="handleUpdate"
|
|
|
v-hasPermi="['medicalhealth:antiepidemicarchives:edit']"
|
|
|
- >修改</el-button>
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -137,7 +153,8 @@
|
|
|
:disabled="multiple"
|
|
|
@click="handleDelete"
|
|
|
v-hasPermi="['medicalhealth:antiepidemicarchives:remove']"
|
|
|
- >删除</el-button>
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -148,14 +165,23 @@
|
|
|
:loading="exportLoading"
|
|
|
@click="handleExport"
|
|
|
v-hasPermi="['medicalhealth:antiepidemicarchives:export']"
|
|
|
- >导出</el-button>
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ <right-toolbar
|
|
|
+ :showSearch.sync="showSearch"
|
|
|
+ @queryTable="getList"
|
|
|
+ ></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-table v-loading="loading" :data="antiepidemicarchivesList" @selection-change="handleSelectionChange">
|
|
|
+ <el-table
|
|
|
+ v-loading="loading"
|
|
|
+ :data="antiepidemicarchivesList"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ :header-cell-style="{ background: '#003C69', color: 'white' }"
|
|
|
+ >
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="主键ID" align="center" prop="id" />
|
|
|
+ <el-table-column label="序号" align="center" prop="id" />
|
|
|
<el-table-column label="防疫品名称" align="center" prop="durgName" />
|
|
|
<el-table-column label="品牌" align="center" prop="durgBrand" />
|
|
|
<el-table-column label="规格" align="center" prop="specifications" />
|
|
@@ -164,11 +190,19 @@
|
|
|
<el-table-column label="库存数量" align="center" prop="amount" />
|
|
|
<el-table-column label="入库数量" align="center" prop="putIn" />
|
|
|
<el-table-column label="出库数量" align="center" prop="putOut" />
|
|
|
- <el-table-column label="备注" align="center" prop="remarks" />
|
|
|
+ <!-- <el-table-column label="备注" align="center" prop="remarks" /> -->
|
|
|
<el-table-column label="录入人(创建人)" align="center" prop="adminId" />
|
|
|
- <el-table-column label="录入时间(创建时间)" align="center" prop="createtime" />
|
|
|
- <el-table-column label="修改时间" align="center" prop="updatetime" />
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <el-table-column
|
|
|
+ label="录入时间(创建时间)"
|
|
|
+ align="center"
|
|
|
+ prop="createtime"
|
|
|
+ />
|
|
|
+ <!-- <el-table-column label="修改时间" align="center" prop="updatetime" /> -->
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
@@ -176,20 +210,22 @@
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['medicalhealth:antiepidemicarchives:edit']"
|
|
|
- >修改</el-button>
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['medicalhealth:antiepidemicarchives:remove']"
|
|
|
- >删除</el-button>
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
-
|
|
|
+
|
|
|
<pagination
|
|
|
- v-show="total>0"
|
|
|
+ v-show="total > 0"
|
|
|
:total="total"
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
:limit.sync="queryParams.pageSize"
|
|
@@ -224,7 +260,11 @@
|
|
|
<el-input v-model="form.putOut" placeholder="请输入出库数量" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="备注" prop="remarks">
|
|
|
- <el-input v-model="form.remarks" type="textarea" placeholder="请输入内容" />
|
|
|
+ <el-input
|
|
|
+ v-model="form.remarks"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="录入人(创建人)" prop="adminId">
|
|
|
<el-input v-model="form.adminId" placeholder="请输入录入人(创建人)" />
|
|
@@ -239,7 +279,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listAntiepidemicarchives, getAntiepidemicarchives, delAntiepidemicarchives, addAntiepidemicarchives, updateAntiepidemicarchives, exportAntiepidemicarchives } from "@/api/medicalhealth/antiepidemicarchives";
|
|
|
+import {
|
|
|
+ listAntiepidemicarchives,
|
|
|
+ getAntiepidemicarchives,
|
|
|
+ delAntiepidemicarchives,
|
|
|
+ addAntiepidemicarchives,
|
|
|
+ updateAntiepidemicarchives,
|
|
|
+ exportAntiepidemicarchives,
|
|
|
+} from "@/api/medicalhealth/antiepidemicarchives";
|
|
|
|
|
|
export default {
|
|
|
name: "Antiepidemicarchives",
|
|
@@ -280,16 +327,20 @@ export default {
|
|
|
remarks: null,
|
|
|
adminId: null,
|
|
|
createtime: null,
|
|
|
- updatetime: null
|
|
|
+ updatetime: null,
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
adminId: [
|
|
|
- { required: true, message: "录入人(创建人)不能为空", trigger: "blur" }
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "录入人(创建人)不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
],
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -299,7 +350,7 @@ export default {
|
|
|
/** 查询防疫用品库存档案列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listAntiepidemicarchives(this.queryParams).then(response => {
|
|
|
+ listAntiepidemicarchives(this.queryParams).then((response) => {
|
|
|
this.antiepidemicarchivesList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
@@ -325,7 +376,7 @@ export default {
|
|
|
remarks: null,
|
|
|
adminId: null,
|
|
|
createtime: null,
|
|
|
- updatetime: null
|
|
|
+ updatetime: null,
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
@@ -341,9 +392,9 @@ export default {
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length!==1
|
|
|
- this.multiple = !selection.length
|
|
|
+ this.ids = selection.map((item) => item.id);
|
|
|
+ this.single = selection.length !== 1;
|
|
|
+ this.multiple = !selection.length;
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
@@ -354,8 +405,8 @@ export default {
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
- const id = row.id || this.ids
|
|
|
- getAntiepidemicarchives(id).then(response => {
|
|
|
+ const id = row.id || this.ids;
|
|
|
+ getAntiepidemicarchives(id).then((response) => {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.title = "修改防疫用品库存档案";
|
|
@@ -363,16 +414,16 @@ export default {
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
|
- updateAntiepidemicarchives(this.form).then(response => {
|
|
|
+ updateAntiepidemicarchives(this.form).then((response) => {
|
|
|
this.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
- addAntiepidemicarchives(this.form).then(response => {
|
|
|
+ addAntiepidemicarchives(this.form).then((response) => {
|
|
|
this.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -384,32 +435,42 @@ export default {
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
|
- this.$confirm('是否确认删除防疫用品库存档案编号为"' + ids + '"的数据项?', "警告", {
|
|
|
+ this.$confirm(
|
|
|
+ '是否确认删除防疫用品库存档案编号为"' + ids + '"的数据项?',
|
|
|
+ "警告",
|
|
|
+ {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(function () {
|
|
|
return delAntiepidemicarchives(ids);
|
|
|
- }).then(() => {
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
this.getList();
|
|
|
this.msgSuccess("删除成功");
|
|
|
- }).catch(() => {});
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
const queryParams = this.queryParams;
|
|
|
- this.$confirm('是否确认导出所有防疫用品库存档案数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
+ this.$confirm("是否确认导出所有防疫用品库存档案数据项?", "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
this.exportLoading = true;
|
|
|
return exportAntiepidemicarchives(queryParams);
|
|
|
- }).then(response => {
|
|
|
+ })
|
|
|
+ .then((response) => {
|
|
|
this.download(response.msg);
|
|
|
this.exportLoading = false;
|
|
|
- }).catch(() => {});
|
|
|
- }
|
|
|
- }
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|