123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806 |
- <template>
- <div class="app-container">
- <el-form
- :model="queryParams"
- ref="queryForm"
- :inline="true"
- v-show="showSearch"
- label-width="auto"
- >
- <!-- <el-form-item label="打印id" prop="printId">
- <el-input
- v-model="queryParams.printId"
- placeholder="请输入打印id"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>-->
- <el-form-item prop="printName">
- <el-input
- v-model="queryParams.printName"
- placeholder="请输入打印文件名称"
- clearable
- size="small"
- @input="handleQuery"
- />
- </el-form-item>
- <!-- <el-form-item label="打印份数" prop="printNumber">
- <el-input
- v-model="queryParams.printNumber"
- placeholder="请输入打印份数"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="是否需要归还(0否1是)" prop="isReturn">
- <el-input
- v-model="queryParams.isReturn"
- placeholder="请输入是否需要归还(0否1是)"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="文件打印人" prop="printfileName">
- <el-input
- v-model="queryParams.printfileName"
- placeholder="请输入文件打印人"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="打印时间" prop="printTime">
- <el-date-picker clearable size="small"
- v-model="queryParams.printTime"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="选择打印时间">
- </el-date-picker>
- </el-form-item>-->
- <el-form-item prop="statusG">
- <el-select
- v-model="queryParams.statusG"
- clearable
- placeholder="请选择归还状态"
- @change="handleQuery"
- >
- <el-option
- v-for="dict in statusGlist"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <!-- <el-form-item label="归还份数" prop="returnNumber">
- <el-input
- v-model="queryParams.returnNumber"
- placeholder="请输入归还份数"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>-->
- <!-- <el-form-item label="原文件路径" prop="primaryPath">
- <el-input
- v-model="queryParams.primaryPath"
- placeholder="请输入原文件路径"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="现文件路径" prop="presentPath">
- <el-input
- v-model="queryParams.presentPath"
- placeholder="请输入现文件路径"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>-->
- <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>
- <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="['PrintsLog:printlog:add']"
- >新增</el-button
- >
- </el-col>-->
- <el-col :span="1.5">
- <el-button
- type="primary"
- @click="handleUpdate"
- style="width: 76px; height: 36px"
- >归还</el-button
- >
- </el-col>
- <!-- <el-col :span="1.5">
- <el-button
- type="danger"
- icon="el-icon-delete"
- size="mini"
- :disabled="multiple"
- @click="handleDelete"
- v-hasPermi="['PrintsLog:printlog:remove']"
- >删除</el-button>
- </el-col>-->
- <!-- <el-col :span="1.5">
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- size="mini"
- :loading="exportLoading"
- @click="handleExport"
- v-hasPermi="['PrintsLog:printlog:export']"
- >导出</el-button>
- </el-col>-->
- <!-- <right-toolbar
- :showSearch.sync="showSearch"
- @queryTable="getList"
- ></right-toolbar> -->
- </el-row>
- <el-table
- v-loading="loading"
- :header-cell-style="{ background: '#003C69', color: 'white' }"
- :data="printlogList"
- @selection-change="handleSelectionChange"
- >
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column label="序号" align="center" type="index" />
- <!-- <el-table-column label="现文件路径" align="center" prop="id" />
- <el-table-column label="打印id" align="center" prop="printId" />-->
- <el-table-column label="打印文件名称" align="center" prop="printName" />
- <el-table-column label="打印份数" align="center" prop="printNumber" />
- <!-- <el-table-column
- label="是否需要归还(0否1是)"
- align="center"
- prop="isReturn"
- />-->
- <!-- <el-table-column label="是否需要归还" align="center" prop="isReturn">
- <template slot-scope="scope">
- <div v-if="scope.row.isReturn == 0">无需归还</div>
- <div v-if="scope.row.isReturn == 1">归还</div>
- </template>
- </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="printTime"
- width="180"
- >
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.printTime, "{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
- <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 == '0'">
- 未归还
- </div>
- <div style="color: #90da90" v-if="scope.row.statusG == '1'">
- 已归还
- </div>
- </template>
- </el-table-column>
- <el-table-column label="归还份数" align="center" prop="returnNumber">
- <template slot-scope="scope">
- <span>{{ scope.row.returnNumber ? scope.row.returnNumber : 0 }}</span>
- </template>
- </el-table-column>
- <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" prop="printCode" />
- <el-table-column label="原文件路径" align="center" prop="primaryPath" />
- <el-table-column label="现文件路径" align="center" prop="presentPath" />-->
- <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)"
- >查看</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>-->
- </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="1030px"
- append-to-body
- :close-on-click-modal="false"
- >
- <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"
- @blur="printCodeblur"
- placeholder="请输入打印编码"
- />
- <!-- <el-select v-model="form.printCode" filterable @change="printCodechange" clearable placeholder="请选择打印编码">
- <el-option
- v-for="dict in printlogList"
- :key="dict.printId"
- :label="dict.printCode"
- :value="dict"
- ></el-option>
- </el-select>-->
- <!-- <el-input v-model="form.printCode" placeholder="请输入打印编码" /> -->
- </el-form-item>
- <div class="jiben">基本信息</div>
- <!-- <el-form-item label="单位名称" prop="unitName">
- <el-input v-model="form.unitName" placeholder="请输入单位名称" />
- </el-form-item>-->
- <el-form-item label="打印文件名称" prop="printName">
- <el-input v-model="form.printName" placeholder="请输入打印文件名称" />
- </el-form-item>
- <!-- <el-form-item label="打印份数" prop="printNumber">
- <el-input v-model="form.printNumber" type="Number" placeholder="请输入打印份数" />
- </el-form-item>
- <el-form-item label="是否需要归还" prop="isReturn">
- <el-radio-group v-model="form.isReturn" size="mini" style="width:200px;">
- <el-radio label="1">归还</el-radio>
- <el-radio label="0">无需归还</el-radio>
- </el-radio-group>
- </el-form-item>-->
- <!-- <el-form-item label="归还状态" prop="statusG">
- <el-select v-model="form.statusG" clearable placeholder="请选择归还状态">
- <el-option
- v-for="dict in statusGlist"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="parseInt(dict.dictValue)"
- ></el-option>
- </el-select>
- </el-form-item>-->
- <!-- <el-form-item label="归还状态(1 已归还 0未归还)" prop="statusG">
- <el-input v-model="form.statusG" placeholder="请输入归还状态(1 已归还 0未归还)" />
- </el-form-item>-->
- <!-- <el-form-item label="是否需要归还(0否1是)" prop="isReturn">
- <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-form-item>
- <el-form-item label="文件打印人" prop="printfileName">
- <el-input
- v-model="form.printfileName"
- placeholder="请输入文件打印人"
- />
- <!-- <el-select v-model="form.printfileName" filterable clearable placeholder="请选择文件打印人">
- <el-option v-for="item in rylist" :key="item.id" :label="item.name" :value="item.id"></el-option>
- </el-select>-->
- </el-form-item>
- <!-- <el-form-item label="备注说明" prop="prize">
- <el-input v-model="form.prize" type="textarea" placeholder />
- </el-form-item>-->
- <!-- <el-form-item label="文件打印人" prop="printfileName">
- <el-input v-model="form.printfileName" placeholder="请输入文件打印人" />
- </el-form-item>-->
- <!-- <el-form-item label="打印时间" prop="printTime">
- <el-date-picker
- clearable
- size="small"
- v-model="form.printTime"
- type="date"
- value-format="yyyy-MM-dd"
- placeholder="选择打印时间"
- ></el-date-picker>
- </el-form-item>
- <el-form-item label="归还份数" prop="returnNumber">
- <el-input v-model="form.returnNumber" placeholder="请输入归还份数" />
- </el-form-item>
- <el-form-item label="原文件路径" prop="primaryPath">
- <el-input v-model="form.primaryPath" placeholder="请输入原文件路径" />
- </el-form-item>
- <el-form-item label="现文件路径" prop="presentPath">
- <el-input v-model="form.presentPath" 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 @click="cancel">取 消</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- listPrintlog,
- getPrintlog,
- delPrintlog,
- addPrintlog,
- updatePrintlog,
- exportPrintlog,
- listPeople,
- } from "@/api/PrintsLog/printlog";
- export default {
- name: "Printlog",
- dicts: ["sys_statusG"],
- data() {
- return {
- // 遮罩层
- loading: true,
- // 导出遮罩层
- exportLoading: false,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 集中文印记录表格数据
- printlogList: [],
- // 弹出层标题
- title: "",
- // 是否显示弹出层
- open: false,
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- printId: null,
- printName: null,
- printNumber: null,
- isReturn: null,
- printfileName: null,
- printTime: null,
- statusG: null,
- returnNumber: null,
- printCode: null,
- primaryPath: null,
- presentPath: null,
- },
- // 表单参数
- form: {},
- // 表单校验
- rules: {
- returnNumber: [
- { required: true, message: "归还份数不能为空", trigger: "blur" },
- ],
- },
- statusGlist: [],
- rylist: [],
- returnNumber: null,
- flg: null,
- };
- },
- created() {
- this.getList();
- //检查类型
- this.getDicts("sys_statusG").then((response) => {
- this.statusGlist = response.data;
- });
- },
- methods: {
- //获取人员
- getrylist() {
- listPeople().then((res) => {
- if (res.code == 200) {
- this.rylist = res.rows;
- }
- });
- },
- /** 查询集中文印记录列表 */
- getList() {
- this.loading = true;
- listPrintlog(this.queryParams).then((response) => {
- this.printlogList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.reset();
- this.flg = null;
- },
- // 表单重置
- reset() {
- this.form = {
- id: null,
- printId: null,
- printName: null,
- printNumber: null,
- isReturn: null,
- printfileName: null,
- printTime: null,
- statusG: null,
- returnNumber: null,
- printCode: null,
- primaryPath: null,
- presentPath: null,
- unitName: 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.reset();
- this.open = true;
- this.title = "添加集中文印记录";
- this.getrylist();
- },
- /** 查看按钮操作 */
- handlesee(row) {
- getPrintlog(row.id).then((res) => {
- if (res.code == 200) {
- this.form = res.data;
- if (res.data.returnNumber) {
- this.form.returnNumber = res.data.returnNumber;
- } else {
- this.form.returnNumber = 0;
- }
- this.title = "归还记录";
- this.open = true;
- this.flg = 1;
- }
- });
- },
- /** 修改按钮操作 */
- handleUpdate() {
- this.reset();
- this.title = "归还记录";
- this.open = true;
- // const id = row.id || this.ids;
- // getPrintlog(id).then(response => {
- // if (!response.data.returnNumber) {
- // this.returnNumber = 0;
- // } else {
- // this.returnNumber = response.data.returnNumber;
- // }
- // this.form = response.data;
- // this.form.isReturn = this.form.isReturn + "";
- // this.open = true;
- // // if(this.form.returnNumber==this.form.printNumber){
- // // this.form.statusG = 1;
- // // }else{
- // // this.form.statusG=this.form.statusG;
- // // }
- // this.form.returnNumber = response.data.printNumber;
- // this.title = "修改集中文印记录";
- // });
- },
- returnNumberblur() {
- if (
- Number(this.form.returnNumber) + Number(this.returnNumber) >
- Number(this.form.printNumber)
- ) {
- this.$modal.msgSuccess(
- `应归还${Number(this.form.printNumber) - Number(this.returnNumber)}份`
- );
- this.form.returnNumber = null;
- }
- },
- /** 提交按钮 */
- submitForm() {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- this.form.returnNumber =
- Number(this.form.returnNumber) + Number(this.returnNumber);
- if (this.form.returnNumber == this.form.printNumber) {
- this.form.statusG = 1;
- }
- if (this.form.id != null) {
- updatePrintlog(this.form).then((response) => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- });
- } else {
- addPrintlog(this.form).then((response) => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.getList();
- });
- }
- }
- });
- },
- /** 删除按钮操作 */
- handleDelete(row) {
- const ids = row.id || this.ids;
- this.$modal
- .confirm("是否删除该记录?")
- .then(function () {
- return delPrintlog(ids);
- })
- .then(() => {
- this.getList();
- this.$modal.msgSuccess("删除成功");
- })
- .catch(() => {});
- },
- /** 导出按钮操作 */
- handleExport() {
- const queryParams = this.queryParams;
- this.$modal
- .confirm("是否确认导出所有集中文印记录数据项?")
- .then(() => {
- this.exportLoading = true;
- return exportPrintlog(queryParams);
- })
- .then((response) => {
- this.$download.name(response.msg);
- this.exportLoading = false;
- })
- .catch(() => {});
- },
- //打印编号
- printCodeblur() {
- if (this.form.printCode) {
- listPrintlog({ printCode: this.form.printCode }).then((response) => {
- this.form = response.rows[0];
- if (this.form.returnNumber) {
- this.form.returnNumber = this.form.returnNumber;
- } else {
- this.form.returnNumber = 0;
- }
- });
- }
- },
- },
- };
- </script>
- <style scoped>
- ::v-deep .el-dialog {
- background-color: #004d86;
- }
- ::v-deep .el-dialog__header {
- border-bottom: 1px solid #718a9d;
- }
- ::v-deep .el-dialog__title {
- color: #fff;
- font: 18px;
- }
- ::v-deep .el-dialog__headerbtn .el-dialog__close {
- color: #fff;
- }
- .el-form-item ::v-deep .el-input__inner {
- width: 200px;
- height: 36px;
- background: transparent;
- color: #fff;
- border: 1px solid #fff !important;
- }
- ::v-deep .el-date-editor.el-input {
- width: 200px;
- height: 36px;
- }
- .pictureUploading-img img {
- width: 60px;
- height: 210px;
- margin-right: 10px;
- }
- ::v-deep .el-upload--picture-card {
- height: 210px;
- width: 170px;
- line-height: 210px;
- background-image: url("../../../assets/images/头像.png");
- background-repeat: no-repeat;
- background-size: 100% 100%;
- }
- ::v-deep .el-upload--picture-card .el-icon-plus {
- display: none;
- }
- .el-upload--picture-card /deep/ .el-upload--picture-card i {
- font-size: 48px;
- }
- ::v-deep .el-upload__tip {
- display: none;
- }
- ::v-deep .el-textarea__inner {
- width: 200px;
- height: 64px;
- }
- .jiben span {
- width: 25px;
- height: 25px;
- display: inline-block;
- background-color: #1c86e1;
- line-height: 25px;
- text-align: center;
- font-size: 16px;
- cursor: pointer;
- /* margin-left: 851px; */
- position: absolute;
- right: 20px;
- }
- .el-select-dropdown__item:hover {
- color: #111;
- }
- .el-select-dropdown__item {
- color: #111;
- }
- .el-tree {
- background-color: #00365f;
- color: #fff;
- }
- ::v-deep .el-tree-node__content:hover {
- color: #1c86e1;
- }
- ::v-deep .el-upload-list--picture-card .el-upload-list__item {
- height: 210px;
- width: 170px;
- }
- .dadui {
- height: 40px;
- background: #003156;
- /* border-bottom: 1px solid #718A9D ; */
- background-image: url(../../../images/矩形底部边框.png);
- background-repeat: no-repeat;
- background-position: 0px 39px;
- font-size: 16px;
- color: #1d96ff;
- }
- .dadui img {
- margin: 10px 10px 0px 10px;
- }
- .data {
- height: 40px;
- background: #003156;
- margin-bottom: 12px;
- color: #fff;
- display: flex;
- font-size: 13px;
- line-height: 25px;
- position: relative;
- }
- .el-tree {
- padding: 10px;
- background: #003156;
- color: #fff;
- }
- .data p {
- position: absolute;
- top: -5px;
- left: 15px;
- }
- .data .a1 {
- width: 128px;
- height: 26px;
- background: rgba(23, 74, 112, 0.4);
- border-radius: 13px;
- position: absolute;
- top: 7px;
- left: 60px;
- }
- ::v-deep .data .el-date-editor.el-input {
- width: 100%;
- border: none;
- }
- ::v-deep .data .el-input__inner {
- width: 100% !important;
- border: none;
- }
- ::v-deep .data .el-input--medium .el-input__icon {
- line-height: 36px;
- position: absolute;
- right: -223px;
- top: 2px;
- }
- ::v-deep .data .el-input__inner {
- background-color: transparent;
- color: #fff;
- text-align: center;
- margin-top: 2px;
- }
- ::v-deep .data .el-input__suffix {
- position: absolute;
- right: 281px;
- }
- ::v-deep
- .el-tree--highlight-current
- .el-tree-node.is-current
- > .el-tree-node__content {
- color: #00365f !important;
- /* background-color: #003156 !important; */
- }
- /* 调整输入框提示文字颜色 */
- ::v-deep .vue-treeselect__placeholder {
- color: #bdbdbd4f !important;
- }
- ::v-deep input::-webkit-input-placeholder {
- color: #bdbdbd4f !important;
- }
- ::v-deep input:-moz-placeholder {
- color: #bdbdbd4f !important;
- }
- /* 文本域提示文字颜色 */
- ::v-deep ::-webkit-input-placeholder {
- color: #bdbdbd4f !important;
- }
- </style>
|