|
@@ -19,7 +19,7 @@
|
|
|
<el-form-item>
|
|
|
<!-- <el-button type="primary" size="btn" @click="handleQuery"
|
|
|
>搜索</el-button
|
|
|
- > -->
|
|
|
+ >-->
|
|
|
<el-button size="btr" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -33,8 +33,7 @@
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
v-hasPermi="['medicalhealth:antiepidemicputout:add']"
|
|
|
- >新增</el-button
|
|
|
- >
|
|
|
+ >新增</el-button>
|
|
|
</el-col>
|
|
|
<!-- <el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -47,8 +46,8 @@
|
|
|
v-hasPermi="['medicalhealth:antiepidemicputout:edit']"
|
|
|
>修改</el-button
|
|
|
>
|
|
|
- </el-col> -->
|
|
|
- <el-col :span="1.5">
|
|
|
+ </el-col>-->
|
|
|
+ <!-- <el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="danger"
|
|
|
plain
|
|
@@ -57,9 +56,8 @@
|
|
|
:disabled="multiple"
|
|
|
@click="handleDelete"
|
|
|
v-hasPermi="['medicalhealth:antiepidemicputout:remove']"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
- </el-col>
|
|
|
+ >删除</el-button>
|
|
|
+ </el-col>-->
|
|
|
<!-- <el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="warning"
|
|
@@ -71,11 +69,11 @@
|
|
|
v-hasPermi="['medicalhealth:antiepidemicputout:export']"
|
|
|
>导出</el-button
|
|
|
>
|
|
|
- </el-col> -->
|
|
|
+ </el-col>-->
|
|
|
<!-- <right-toolbar
|
|
|
:showSearch.sync="showSearch"
|
|
|
@queryTable="getList"
|
|
|
- ></right-toolbar> -->
|
|
|
+ ></right-toolbar>-->
|
|
|
</el-row>
|
|
|
|
|
|
<el-table
|
|
@@ -87,31 +85,25 @@
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="序号" align="center">
|
|
|
<template scope="scope">
|
|
|
- <span>{{
|
|
|
+ <span>
|
|
|
+ {{
|
|
|
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
|
|
|
- }}</span>
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="防疫品名称" align="center" prop="durgName" />
|
|
|
<el-table-column label="单位" align="center" prop="unitName" />
|
|
|
<el-table-column label="库房" align="center" prop="storeHouse">
|
|
|
<template slot-scope="scope">
|
|
|
- <dict-tag
|
|
|
- :options="dict.type.storage_room"
|
|
|
- :value="scope.row.storeHouse"
|
|
|
- />
|
|
|
+ <dict-tag :options="dict.type.storage_room" :value="scope.row.storeHouse" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="品牌" align="center" prop="durgBrand" />
|
|
|
<el-table-column label="规格" align="center" prop="specifications" />
|
|
|
<el-table-column label="发放数量" align="center" prop="putOut" />
|
|
|
<el-table-column label="所在位置" align="center" prop="place" />
|
|
|
- <el-table-column
|
|
|
- label="发放时间"
|
|
|
- align="center"
|
|
|
- prop="putTime"
|
|
|
- width="180"
|
|
|
- >
|
|
|
+ <el-table-column label="发放时间" align="center" prop="putTime" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.putTime, "{y}-{m}-{d}") }}</span>
|
|
|
</template>
|
|
@@ -144,7 +136,7 @@
|
|
|
<el-table-column label="使用人" align="center" prop="storeHouse" />
|
|
|
<el-table-column label="领用人姓名" align="center" prop="peopleName" />
|
|
|
<el-table-column label="领用人单位" align="center" prop="unitName" />
|
|
|
- <el-table-column label="发放单位名称" align="center" prop="unitName1" /> -->
|
|
|
+ <el-table-column label="发放单位名称" align="center" prop="unitName1" />-->
|
|
|
<!-- <el-table-column
|
|
|
label="操作"
|
|
|
align="center"
|
|
@@ -168,7 +160,7 @@
|
|
|
>删除</el-button
|
|
|
>
|
|
|
</template>
|
|
|
- </el-table-column> -->
|
|
|
+ </el-table-column>-->
|
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
@@ -187,35 +179,31 @@
|
|
|
append-to-body
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
- <el-form
|
|
|
- ref="form"
|
|
|
- :model="form"
|
|
|
- :rules="rules"
|
|
|
- label-width="80px"
|
|
|
- inline
|
|
|
- >
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px" inline>
|
|
|
+ <el-form-item label="防疫品编码" prop="putNumber">
|
|
|
+ <el-input v-model="form.putNumber" @blur="fangYiPing" placeholder="请输入入库编号" />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="防疫品名称" prop="durgArchivesId">
|
|
|
- <el-select
|
|
|
- v-model="form.durgName"
|
|
|
- placeholder="请选择防疫品名称"
|
|
|
- filterable
|
|
|
- >
|
|
|
+ <el-input v-model="form.durgName" placeholder="请输入防疫品名称" />
|
|
|
+ <!-- <el-select v-model="form.durgName" placeholder="请选择防疫品名称" filterable>
|
|
|
<el-option
|
|
|
v-for="(item, i) in fangYi"
|
|
|
:key="i"
|
|
|
:value="item.durgName"
|
|
|
:label="item.name"
|
|
|
@click.native="fangYiPingXuan(item)"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ ></el-option>
|
|
|
+ </el-select>-->
|
|
|
</el-form-item>
|
|
|
<el-form-item label="发放数量" prop="putOut">
|
|
|
- <el-input
|
|
|
+ <el-input-number
|
|
|
v-model="form.putOut"
|
|
|
+ controls-position="right"
|
|
|
+ :min="0"
|
|
|
placeholder="请输入发放数量"
|
|
|
@blur="shuLiang"
|
|
|
- />
|
|
|
+ ></el-input-number>
|
|
|
+ <!-- <el-input v-model="form.putOut" placeholder="请输入发放数量" @blur="shuLiang" /> -->
|
|
|
</el-form-item>
|
|
|
<el-form-item label="所在位置" prop="place">
|
|
|
<el-input v-model="form.place" placeholder="请输入所在位置" />
|
|
@@ -228,13 +216,12 @@
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
placeholder="选择使用时间"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ ></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="领用单位" prop="unitId">
|
|
|
<!-- <el-select v-model="form.unitId" placeholder="请选择领用单位">
|
|
|
<el-option label="请选择字典生成" value="" />
|
|
|
- </el-select> -->
|
|
|
+ </el-select>-->
|
|
|
<treeselect
|
|
|
v-model="form.unitId"
|
|
|
:options="deptOptions"
|
|
@@ -245,7 +232,7 @@
|
|
|
<el-form-item label="使用人" prop="peopleId">
|
|
|
<!-- <el-select v-model="form.unitId1" placeholder="">
|
|
|
<el-option label="请选择字典生成" value="" />
|
|
|
- </el-select> -->
|
|
|
+ </el-select>-->
|
|
|
<el-select v-model="form.peopleId" placeholder="请选择使用人">
|
|
|
<el-option
|
|
|
v-for="(item, i) in renYuan"
|
|
@@ -253,17 +240,12 @@
|
|
|
:label="item.name"
|
|
|
:value="item.id"
|
|
|
@click.native="compere(item.name)"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<div class="jiben">备注</div>
|
|
|
<el-form-item 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="peopleId">
|
|
|
<el-input v-model="form.peopleId" placeholder="请输入领用人" />
|
|
@@ -276,11 +258,11 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="规格" prop="specifications">
|
|
|
<el-input v-model="form.specifications" placeholder="请输入规格" />
|
|
|
- </el-form-item> -->
|
|
|
+ </el-form-item>-->
|
|
|
<!-- <el-form-item label="备注" prop="remark">
|
|
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
|
|
</el-form-item>
|
|
|
-
|
|
|
+
|
|
|
<el-form-item label="使用人" prop="storeHouse">
|
|
|
<el-input v-model="form.storeHouse" placeholder="请输入使用人" />
|
|
|
</el-form-item>
|
|
@@ -292,7 +274,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="发放单位名称" prop="unitName1">
|
|
|
<el-input v-model="form.unitName1" placeholder="请输入发放单位名称" />
|
|
|
- </el-form-item> -->
|
|
|
+ </el-form-item>-->
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
@@ -309,11 +291,13 @@ import {
|
|
|
delAntiepidemicputout,
|
|
|
addAntiepidemicputout,
|
|
|
updateAntiepidemicputout,
|
|
|
- exportAntiepidemicputout,
|
|
|
+ exportAntiepidemicputout
|
|
|
} from "@/api/medicalhealth/antiepidemicputout";
|
|
|
import { exportAntiepidemiFangYiChuKu } from "@/api/medicalhealth/antiepidemicputin";
|
|
|
import { getZhuChiRen } from "@/api/grassrootsregistration/bdglmeeting";
|
|
|
import { getDept } from "@/api/medicalhealth/bdgldurgarchives";
|
|
|
+
|
|
|
+import { exportAntiepidemiFangYi } from "@/api/medicalhealth/antiepidemicputin";
|
|
|
// 导入树形结构
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
@@ -322,7 +306,7 @@ export default {
|
|
|
name: "Antiepidemicputout",
|
|
|
dicts: ["storage_room"],
|
|
|
components: {
|
|
|
- Treeselect,
|
|
|
+ Treeselect
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -365,12 +349,16 @@ export default {
|
|
|
storeHouse: null,
|
|
|
peopleName: null,
|
|
|
unitName: null,
|
|
|
- unitName1: null,
|
|
|
+ unitName1: null
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
- rules: {},
|
|
|
+ rules: {
|
|
|
+ putNumber: [
|
|
|
+ { required: true, message: "防疫品编码不能为空", trigger: "blur" }
|
|
|
+ ]
|
|
|
+ },
|
|
|
// 防疫品名称
|
|
|
fangYi: [],
|
|
|
// 树形单位
|
|
@@ -378,7 +366,7 @@ export default {
|
|
|
// 人员
|
|
|
renYuan: [],
|
|
|
// 药品数
|
|
|
- yaoPingShu: "",
|
|
|
+ yaoPingShu: ""
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -388,7 +376,8 @@ export default {
|
|
|
// 数量的判断
|
|
|
shuLiang() {
|
|
|
if (this.form.putOut > this.yaoPingShu) {
|
|
|
- return this.$modal.msgWarning(`库存数量为${this.yaoPingShu}`);
|
|
|
+ this.form.putOut = 0;
|
|
|
+ return this.$modal.msgWarning(`未过期库存数量为${this.yaoPingShu}`);
|
|
|
}
|
|
|
},
|
|
|
// 人员点击触发
|
|
@@ -397,7 +386,7 @@ export default {
|
|
|
},
|
|
|
// 获取人员
|
|
|
getZhuChi(id) {
|
|
|
- getZhuChiRen(id).then((res) => {
|
|
|
+ getZhuChiRen(id).then(res => {
|
|
|
this.renYuan = res.data;
|
|
|
});
|
|
|
},
|
|
@@ -410,7 +399,7 @@ export default {
|
|
|
},
|
|
|
/** 查询部门下拉树结构 */
|
|
|
getTreeselect() {
|
|
|
- getDept().then((response) => {
|
|
|
+ getDept().then(response => {
|
|
|
this.deptOptions = response.data;
|
|
|
});
|
|
|
},
|
|
@@ -424,16 +413,39 @@ export default {
|
|
|
this.form.inId = data.id;
|
|
|
this.yaoPingShu = data.surplus;
|
|
|
},
|
|
|
+ // putNumberblur() {
|
|
|
+ // this.fangYiPing();
|
|
|
+ // },
|
|
|
// 查询防疫品名称列表
|
|
|
fangYiPing() {
|
|
|
- exportAntiepidemiFangYiChuKu().then((response) => {
|
|
|
- this.fangYi = response.data;
|
|
|
- });
|
|
|
+ // exportAntiepidemiFangYiChuKu({ barCode: this.form.putNumber }).then(
|
|
|
+ // response => {
|
|
|
+ // this.fangYi = response.data;
|
|
|
+ // }
|
|
|
+ // );
|
|
|
+ if (this.form.putNumber) {
|
|
|
+ exportAntiepidemiFangYi({ barCode: this.form.putNumber }).then(
|
|
|
+ response => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ if (response.data) {
|
|
|
+ this.$set(this.form, "durgName", response.data.durgName);
|
|
|
+ this.form.durgArchivesId = response.data.id;
|
|
|
+ this.yaoPingShu =
|
|
|
+ response.data.amount - response.data.overdueQuantity;
|
|
|
+ // this.form.putNumber = response.data.barCode;
|
|
|
+ } else {
|
|
|
+ this.$modal.msgSuccess("未有该防疫用品编码!");
|
|
|
+ this.reset();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
},
|
|
|
/** 查询防疫用品发放登记列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listAntiepidemicputout(this.queryParams).then((response) => {
|
|
|
+ listAntiepidemicputout(this.queryParams).then(response => {
|
|
|
this.antiepidemicputoutList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
@@ -464,7 +476,7 @@ export default {
|
|
|
storeHouse: null,
|
|
|
peopleName: null,
|
|
|
unitName: null,
|
|
|
- unitName1: null,
|
|
|
+ unitName1: null
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
@@ -480,13 +492,13 @@ export default {
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map((item) => item.id);
|
|
|
+ this.ids = selection.map(item => item.id);
|
|
|
this.single = selection.length !== 1;
|
|
|
this.multiple = !selection.length;
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
- this.fangYiPing();
|
|
|
+ // this.fangYiPing();
|
|
|
this.getTreeselect();
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
@@ -496,7 +508,7 @@ export default {
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
const id = row.id || this.ids;
|
|
|
- getAntiepidemicputout(id).then((response) => {
|
|
|
+ getAntiepidemicputout(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.title = "修改防疫用品发放登记";
|
|
@@ -504,10 +516,10 @@ export default {
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- this.$refs["form"].validate((valid) => {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
|
- updateAntiepidemicputout(this.form).then((response) => {
|
|
|
+ updateAntiepidemicputout(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -516,7 +528,7 @@ export default {
|
|
|
if (this.form.putOut > this.yaoPingShu) {
|
|
|
return;
|
|
|
}
|
|
|
- addAntiepidemicputout(this.form).then((response) => {
|
|
|
+ addAntiepidemicputout(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -530,7 +542,7 @@ export default {
|
|
|
const ids = row.id || this.ids;
|
|
|
this.$modal
|
|
|
.confirm("是否确认删除防疫用品发放登记的数据项?")
|
|
|
- .then(function () {
|
|
|
+ .then(function() {
|
|
|
return delAntiepidemicputout(ids);
|
|
|
})
|
|
|
.then(() => {
|
|
@@ -548,13 +560,13 @@ export default {
|
|
|
this.exportLoading = true;
|
|
|
return exportAntiepidemicputout(queryParams);
|
|
|
})
|
|
|
- .then((response) => {
|
|
|
+ .then(response => {
|
|
|
this.$download.name(response.msg);
|
|
|
this.exportLoading = false;
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|
|
@@ -710,4 +722,15 @@ export default {
|
|
|
::v-deep input:-moz-placeholder {
|
|
|
color: #bdbdbd4f !important;
|
|
|
}
|
|
|
-</style>
|
|
|
+::v-deep .el-input-number__increase {
|
|
|
+ background-color: transparent !important;
|
|
|
+ border: none;
|
|
|
+ color: #cccccc;
|
|
|
+ border-bottom: none !important;
|
|
|
+}
|
|
|
+::v-deep .el-input-number__decrease {
|
|
|
+ background-color: transparent !important;
|
|
|
+ border: none !important;
|
|
|
+ color: #cccccc;
|
|
|
+}
|
|
|
+</style>
|