|
@@ -1,12 +1,6 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-form
|
|
|
- :model="queryParams"
|
|
|
- ref="queryForm"
|
|
|
- inline
|
|
|
- v-show="showSearch"
|
|
|
- label-width="auto"
|
|
|
- >
|
|
|
+ <el-form :model="queryParams" ref="queryForm" inline v-show="showSearch" label-width="auto">
|
|
|
<el-form-item prop="printName">
|
|
|
<el-input
|
|
|
v-model="queryParams.printName"
|
|
@@ -16,6 +10,15 @@
|
|
|
@input="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item prop="printfileName">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.printfileName"
|
|
|
+ placeholder="请输入打印人名称"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ @input="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item prop="printCode">
|
|
|
<el-input
|
|
|
v-model="queryParams.printCode"
|
|
@@ -42,7 +45,7 @@
|
|
|
</el-form-item>
|
|
|
<!-- <el-button type="primary" size="btn" @click="handleQuery"
|
|
|
>搜索</el-button
|
|
|
- > -->
|
|
|
+ >-->
|
|
|
<el-button size="btr" @click="resetQuery">重置</el-button>
|
|
|
</el-form>
|
|
|
|
|
@@ -64,8 +67,7 @@
|
|
|
@click="handleUpdate"
|
|
|
style="width: 76px; height: 36px"
|
|
|
v-hasPermi="['PrintsLog:printlog:add']"
|
|
|
- >归还</el-button
|
|
|
- >
|
|
|
+ >归还</el-button>
|
|
|
</el-col>
|
|
|
<!-- <el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -86,13 +88,12 @@
|
|
|
:loading="exportLoading"
|
|
|
@click="handleExport"
|
|
|
v-hasPermi="['PrintsLog:printlog:export']"
|
|
|
- >导出</el-button
|
|
|
- >
|
|
|
+ >导出</el-button>
|
|
|
</el-col>
|
|
|
<!-- <right-toolbar
|
|
|
:showSearch.sync="showSearch"
|
|
|
@queryTable="getList"
|
|
|
- ></right-toolbar> -->
|
|
|
+ ></right-toolbar>-->
|
|
|
</el-row>
|
|
|
|
|
|
<el-table
|
|
@@ -117,18 +118,11 @@
|
|
|
-webkit-box-orient: vertical;
|
|
|
white-space: normal;
|
|
|
"
|
|
|
- >
|
|
|
- {{ scope.row.printName }}
|
|
|
- </div>
|
|
|
+ >{{ scope.row.printName }}</div>
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="单位"
|
|
|
- align="center"
|
|
|
- prop="unitId"
|
|
|
- :formatter="unitFn"
|
|
|
- />
|
|
|
+ <el-table-column label="单位" align="center" prop="unitId" :formatter="unitFn" />
|
|
|
<el-table-column label="打印份数" align="center" prop="printNumber" />
|
|
|
<!-- <el-table-column
|
|
|
label="是否需要归还(0否1是)"
|
|
@@ -143,18 +137,8 @@
|
|
|
</el-table-column>-->
|
|
|
<!-- <el-table-column label="归还状态" align="center" prop="statusG" /> -->
|
|
|
<el-table-column label="文件打印人" align="center" prop="printfileName" />
|
|
|
- <el-table-column
|
|
|
- label="密级"
|
|
|
- align="center"
|
|
|
- prop="levelM"
|
|
|
- :formatter="Alfred"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="打印时间"
|
|
|
- align="center"
|
|
|
- prop="printTime"
|
|
|
- width="180"
|
|
|
- >
|
|
|
+ <el-table-column label="密级" align="center" prop="levelM" :formatter="Alfred" />
|
|
|
+ <el-table-column label="打印时间" align="center" prop="printTime" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.printTime, "{y}-{m}-{d}") }}</span>
|
|
|
</template>
|
|
@@ -162,12 +146,8 @@
|
|
|
<el-table-column label="归还状态" align="center" prop="statusG">
|
|
|
<template slot-scope="scope">
|
|
|
<!-- <dict-tag :options="dict.type.sys_statusG" :value="scope.row.statusG" /> -->
|
|
|
- <div style="color: #00ff00" v-if="scope.row.statusG == '1'">
|
|
|
- 已归还
|
|
|
- </div>
|
|
|
- <div style="color: #90da90" v-if="scope.row.statusG == '0'">
|
|
|
- 未归还
|
|
|
- </div>
|
|
|
+ <div style="color: #00ff00" v-if="scope.row.statusG == '1'">已归还</div>
|
|
|
+ <div style="color: #90da90" v-if="scope.row.statusG == '0'">未归还</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="归还份数" align="center" prop="returnNumber">
|
|
@@ -175,37 +155,26 @@
|
|
|
<span>{{ scope.row.returnNumber ? scope.row.returnNumber : 0 }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="归还时间"
|
|
|
- align="center"
|
|
|
- prop="returnTime"
|
|
|
- width="180"
|
|
|
- >
|
|
|
+ <el-table-column label="归还时间" align="center" prop="returnTime" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.returnTime, "{y}-{m}-{d}") }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="操作"
|
|
|
- align="center"
|
|
|
- class-name="small-padding fixed-width"
|
|
|
- >
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="btk"
|
|
|
type="text"
|
|
|
@click="handlesee(scope.row)"
|
|
|
v-hasPermi="['PrintsLog:printlog:query']"
|
|
|
- >查看</el-button
|
|
|
- >
|
|
|
+ >查看</el-button>
|
|
|
<!-- <el-button size="mini" type="text" v-if="scope.row.statusG==1||scope.row.statusG==2">已归还</el-button> -->
|
|
|
<el-button
|
|
|
size="btd"
|
|
|
type="text"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['PrintsLog:printlog:remove']"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ >删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -226,23 +195,13 @@
|
|
|
append-to-body
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
- <el-form
|
|
|
- ref="form"
|
|
|
- :model="form"
|
|
|
- :inline="true"
|
|
|
- :rules="rules"
|
|
|
- label-width="120px"
|
|
|
- >
|
|
|
+ <el-form ref="form" :model="form" :inline="true" :rules="rules" label-width="120px">
|
|
|
<!-- <el-form-item label="打印id" prop="printId">
|
|
|
<el-input v-model="form.printId" placeholder="请输入打印id" />
|
|
|
</el-form-item>-->
|
|
|
<div class="jiben">打印编码</div>
|
|
|
<el-form-item label="打印编码" prop="printCode">
|
|
|
- <el-input
|
|
|
- v-model="form.printCode"
|
|
|
- @input="printCodeblur"
|
|
|
- placeholder="请输入打印编码"
|
|
|
- />
|
|
|
+ <el-input v-model="form.printCode" @input="printCodeblur" placeholder="请输入打印编码" />
|
|
|
<!-- <el-select v-model="form.printCode" filterable @change="printCodechange" clearable placeholder="请选择打印编码">
|
|
|
<el-option
|
|
|
v-for="dict in printlogList"
|
|
@@ -266,7 +225,7 @@
|
|
|
"
|
|
|
>
|
|
|
未归还份数 <span>{{ form.num }}</span>
|
|
|
- </div> -->
|
|
|
+ </div>-->
|
|
|
<el-form-item label="打印文件名称" prop="printName">
|
|
|
<el-input v-model="form.printName" placeholder="请输入打印文件名称" />
|
|
|
</el-form-item>
|
|
@@ -296,26 +255,17 @@
|
|
|
<el-input v-model="form.isReturn" placeholder="请输入是否需要归还(0否1是)" />
|
|
|
</el-form-item>-->
|
|
|
<el-form-item label="归还份数" prop="returnNumber">
|
|
|
- <el-input
|
|
|
- v-model="form.returnNumber"
|
|
|
- @blur="returnNumberblur"
|
|
|
- placeholder="请输入归还份数"
|
|
|
- />
|
|
|
+ <el-input v-model="form.returnNumber" @blur="returnNumberblur" placeholder="请输入归还份数" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="未归还份数" prop="">
|
|
|
- <el-input v-model="form.num" placeholder="" disabled />
|
|
|
+ <el-form-item label="未归还份数" prop>
|
|
|
+ <el-input v-model="form.num" placeholder disabled />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="文件打印人" prop="printfileName">
|
|
|
- <el-input
|
|
|
- v-model="form.printfileName"
|
|
|
- placeholder="请输入文件打印人"
|
|
|
- />
|
|
|
+ <el-input v-model="form.printfileName" placeholder="请输入文件打印人" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm" v-if="flg != 1"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="submitForm" v-if="flg != 1">确 定</el-button>
|
|
|
<el-button @click="cancel" size="btn">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -329,21 +279,9 @@
|
|
|
:close-on-click-modal="false"
|
|
|
@close="remoer"
|
|
|
>
|
|
|
- <el-form
|
|
|
- ref="form"
|
|
|
- :model="form3"
|
|
|
- inline
|
|
|
- :rules="rules"
|
|
|
- label-width="120px"
|
|
|
- >
|
|
|
- <el-form-item label="" prop="unitIds" style="margin-right: 500px">
|
|
|
- <el-select
|
|
|
- multiple
|
|
|
- filterable
|
|
|
- v-model="form3.unitIds"
|
|
|
- id="execute"
|
|
|
- placeholder="请选择单位"
|
|
|
- >
|
|
|
+ <el-form ref="form" :model="form3" inline :rules="rules" label-width="120px">
|
|
|
+ <el-form-item label prop="unitIds" style="margin-right: 500px">
|
|
|
+ <el-select multiple filterable v-model="form3.unitIds" id="execute" placeholder="请选择单位">
|
|
|
<el-option
|
|
|
v-for="(item, i) in danWeisList"
|
|
|
:label="item.deptName"
|
|
@@ -357,14 +295,10 @@
|
|
|
:options="deptOptions"
|
|
|
placeholder="请选择单位"
|
|
|
@select="selectPeos"
|
|
|
- /> -->
|
|
|
+ />-->
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="levelM">
|
|
|
- <el-select
|
|
|
- v-model="form3.levelM"
|
|
|
- clearable
|
|
|
- placeholder="请选择级别"
|
|
|
- >
|
|
|
+ <el-select v-model="form3.levelM" clearable placeholder="请选择级别">
|
|
|
<el-option
|
|
|
v-for="dict in levelMs"
|
|
|
:key="dict.dictValue"
|
|
@@ -379,8 +313,7 @@
|
|
|
type="date"
|
|
|
placeholder="选择开始时间"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ ></el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-date-picker
|
|
@@ -388,8 +321,7 @@
|
|
|
type="date"
|
|
|
placeholder="选择结束时间"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
+ ></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -408,7 +340,7 @@ import {
|
|
|
addPrintlog,
|
|
|
updatePrintlog,
|
|
|
exportPrintlog,
|
|
|
- listPeople,
|
|
|
+ listPeople
|
|
|
} from "@/api/PrintsLog/printlog";
|
|
|
// 导入树形结构
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
@@ -422,7 +354,7 @@ export default {
|
|
|
name: "Printlog",
|
|
|
dicts: ["sys_statusG"],
|
|
|
components: {
|
|
|
- Treeselect,
|
|
|
+ Treeselect
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -462,15 +394,15 @@ export default {
|
|
|
primaryPath: null,
|
|
|
presentPath: null,
|
|
|
startt: null,
|
|
|
- endt: null,
|
|
|
+ endt: null
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
returnNumber: [
|
|
|
- { required: true, message: "归还份数不能为空", trigger: "blur" },
|
|
|
- ],
|
|
|
+ { required: true, message: "归还份数不能为空", trigger: "blur" }
|
|
|
+ ]
|
|
|
},
|
|
|
statusGlist: [],
|
|
|
rylist: [],
|
|
@@ -487,18 +419,18 @@ export default {
|
|
|
user: {},
|
|
|
deptId: null,
|
|
|
yongHu: "",
|
|
|
- form3:{}
|
|
|
+ form3: {}
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
//检查类型
|
|
|
- this.getDicts("sys_statusG").then((response) => {
|
|
|
+ this.getDicts("sys_statusG").then(response => {
|
|
|
this.statusGlist = response.data;
|
|
|
});
|
|
|
this.getBuMeng();
|
|
|
//级别
|
|
|
- this.getDicts("level").then((response) => {
|
|
|
+ this.getDicts("level").then(response => {
|
|
|
this.levelMs = response.data;
|
|
|
});
|
|
|
this.getUser();
|
|
@@ -513,7 +445,7 @@ export default {
|
|
|
},
|
|
|
unitFn(row) {
|
|
|
var name = "";
|
|
|
- this.danWeisList.map((item) => {
|
|
|
+ this.danWeisList.map(item => {
|
|
|
if (item.deptId == row.unitId) {
|
|
|
name = item.deptName;
|
|
|
}
|
|
@@ -522,7 +454,7 @@ export default {
|
|
|
},
|
|
|
// 获取登录信息
|
|
|
getUser() {
|
|
|
- getUserProfile().then((response) => {
|
|
|
+ getUserProfile().then(response => {
|
|
|
this.user = response.data;
|
|
|
this.deptId = response.data.deptId;
|
|
|
this.yongHu = response.data.nickName;
|
|
@@ -531,13 +463,13 @@ export default {
|
|
|
},
|
|
|
//获取所有单位
|
|
|
danWeis() {
|
|
|
- listDept().then((res) => {
|
|
|
+ listDept().then(res => {
|
|
|
this.danWeisList = res.data;
|
|
|
});
|
|
|
},
|
|
|
Alfred(row) {
|
|
|
var name = "";
|
|
|
- this.levelMs.map((item) => {
|
|
|
+ this.levelMs.map(item => {
|
|
|
if (item.dictValue == row.levelM) {
|
|
|
name = item.dictLabel;
|
|
|
}
|
|
@@ -546,7 +478,7 @@ export default {
|
|
|
},
|
|
|
// 获取部门列表
|
|
|
getBuMeng() {
|
|
|
- getDept().then((res) => {
|
|
|
+ getDept().then(res => {
|
|
|
this.deptOptions = res.data;
|
|
|
});
|
|
|
},
|
|
@@ -555,7 +487,7 @@ export default {
|
|
|
},
|
|
|
//获取人员
|
|
|
getrylist() {
|
|
|
- listPeople().then((res) => {
|
|
|
+ listPeople().then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.rylist = res.rows;
|
|
|
}
|
|
@@ -564,7 +496,7 @@ export default {
|
|
|
/** 查询集中文印记录列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listPrintlog(this.queryParams).then((response) => {
|
|
|
+ listPrintlog(this.queryParams).then(response => {
|
|
|
this.printlogList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
@@ -598,7 +530,7 @@ export default {
|
|
|
printCode: null,
|
|
|
primaryPath: null,
|
|
|
presentPath: null,
|
|
|
- unitName: null,
|
|
|
+ unitName: null
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
@@ -614,7 +546,7 @@ 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;
|
|
|
},
|
|
@@ -627,7 +559,7 @@ export default {
|
|
|
},
|
|
|
/** 查看按钮操作 */
|
|
|
handlesee(row) {
|
|
|
- getPrintlog(row.id).then((res) => {
|
|
|
+ getPrintlog(row.id).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.form = res.data;
|
|
|
if (this.form.printNumber) {
|
|
@@ -691,7 +623,7 @@ export default {
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- this.$refs["form"].validate((valid) => {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
this.form.returnNumber =
|
|
|
Number(this.form.returnNumber) + Number(this.returnNumber);
|
|
@@ -699,13 +631,13 @@ export default {
|
|
|
this.form.statusG = 1;
|
|
|
}
|
|
|
if (this.form.id != null) {
|
|
|
- updatePrintlog(this.form).then((response) => {
|
|
|
+ updatePrintlog(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
- addPrintlog(this.form).then((response) => {
|
|
|
+ addPrintlog(this.form).then(response => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -719,7 +651,7 @@ export default {
|
|
|
const ids = row.id || this.ids;
|
|
|
this.$modal
|
|
|
.confirm("是否删除该记录?")
|
|
|
- .then(function () {
|
|
|
+ .then(function() {
|
|
|
return delPrintlog(ids);
|
|
|
})
|
|
|
.then(() => {
|
|
@@ -746,39 +678,38 @@ export default {
|
|
|
},
|
|
|
// 导出操作
|
|
|
submitForms() {
|
|
|
- if(this.form3.startt||this.form3.endt){
|
|
|
- const queryParamss = this.form3;
|
|
|
- this.$modal
|
|
|
- .confirm("是否确认导出集中文印记录数据项?")
|
|
|
- .then(() => {
|
|
|
- this.exportLoading = true;
|
|
|
- if(this.form3.unitIds==null){
|
|
|
- this.form3.unitIds=[]
|
|
|
- }
|
|
|
- if (this.form3.unitIds.length>0) {
|
|
|
- this.form3.unitIds = this.form3.unitIds.join(",");
|
|
|
- }
|
|
|
- return exportPrintlog(queryParamss);
|
|
|
- })
|
|
|
- .then((response) => {
|
|
|
- this.$download.name(response.msg);
|
|
|
- this.exportLoading = false;
|
|
|
- this.cancels();
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- });
|
|
|
- }else{
|
|
|
- this.$message.error('开始时间或结束时间不能为空')
|
|
|
- this.form3.unitIds=[]
|
|
|
- this.form3.levelM = null;
|
|
|
- this.form3.startt = null;
|
|
|
- this.form3.endt = null;
|
|
|
- }
|
|
|
+ if (this.form3.startt || this.form3.endt) {
|
|
|
+ const queryParamss = this.form3;
|
|
|
+ this.$modal
|
|
|
+ .confirm("是否确认导出集中文印记录数据项?")
|
|
|
+ .then(() => {
|
|
|
+ this.exportLoading = true;
|
|
|
+ if (this.form3.unitIds == null) {
|
|
|
+ this.form3.unitIds = [];
|
|
|
+ }
|
|
|
+ if (this.form3.unitIds.length > 0) {
|
|
|
+ this.form3.unitIds = this.form3.unitIds.join(",");
|
|
|
+ }
|
|
|
+ return exportPrintlog(queryParamss);
|
|
|
+ })
|
|
|
+ .then(response => {
|
|
|
+ this.$download.name(response.msg);
|
|
|
+ this.exportLoading = false;
|
|
|
+ this.cancels();
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ } else {
|
|
|
+ this.$message.error("开始时间或结束时间不能为空");
|
|
|
+ this.form3.unitIds = [];
|
|
|
+ this.form3.levelM = null;
|
|
|
+ this.form3.startt = null;
|
|
|
+ this.form3.endt = null;
|
|
|
+ }
|
|
|
},
|
|
|
//打印编号
|
|
|
printCodeblur() {
|
|
|
if (this.form.printCode) {
|
|
|
- listPrintlog({ printCode: this.form.printCode }).then((response) => {
|
|
|
+ listPrintlog({ printCode: this.form.printCode }).then(response => {
|
|
|
if (response.rows[0]) {
|
|
|
this.form = response.rows[0];
|
|
|
if (this.form.returnNumber) {
|
|
@@ -798,8 +729,8 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|