Browse Source

feat:[档案管理][供试品档案]

lkf
HanLong 2 months ago
parent
commit
9d2304f04e
12 changed files with 586 additions and 941 deletions
  1. +1
    -0
      src/api/business/gsp/gsp.js
  2. +74
    -0
      src/api/business/gsp/gspArchive.js
  3. +74
    -0
      src/api/business/gsp/gspFfjlArchive.js
  4. +74
    -0
      src/api/business/gsp/gspRkjlArchive.js
  5. +9
    -0
      src/lang/en/business/resource/gsp.js
  6. +9
    -0
      src/lang/zh/business/resource/gsp.js
  7. +101
    -288
      src/views/business/archive/gsp/comps/ffjlList.vue
  8. +100
    -366
      src/views/business/archive/gsp/comps/gspList.vue
  9. +105
    -270
      src/views/business/archive/gsp/comps/rkjlList.vue
  10. +11
    -6
      src/views/business/resource/gsp/comps/ffjlList.vue
  11. +25
    -10
      src/views/business/resource/gsp/comps/gsp/Ff.vue
  12. +3
    -1
      src/views/business/resource/gsp/comps/gsp/Gh.vue

+ 1
- 0
src/api/business/gsp/gsp.js View File

@ -9,6 +9,7 @@ export function list(query) {
})
}
// 试验物资列表
export function studyList(query) {
return request({

+ 74
- 0
src/api/business/gsp/gspArchive.js View File

@ -0,0 +1,74 @@
import request from '@/utils/request'
// 档案列表
export function list(query) {
return request({
url: '/system/business/gspArchive/list',
method: 'get',
params: query
})
}
// 同意归档
export function tygd(data) {
return request({
url: '/system/business/gspArchive/gd/agree',
method: 'post',
data: data
})
}
// 拒绝归档
export function jjgd(data) {
return request({
url: '/system/business/gspArchive/gd/refuse',
method: 'post',
data: data
})
}
// 同意解档
export function tyjd(data) {
return request({
url: '/system/business/gspArchive/jd/agree',
method: 'post',
data: data
})
}
// 拒绝解档
export function jjjd(data) {
return request({
url: '/system/business/gspArchive/jd/agree',
method: 'post',
data: data
})
}
// 同意借阅
export function tyjy(data) {
return request({
url: '/system/business/gspArchive/jy/agree',
method: 'post',
data: data
})
}
// 拒绝借阅
export function jjjy(data) {
return request({
url: '/system/business/gspArchive/jy/refuse',
method: 'post',
data: data
})
}
// 确认归还
export function qrgh(data) {
return request({
url: '/system/business/gspArchive/gh',
method: 'post',
data: data
})
}

+ 74
- 0
src/api/business/gsp/gspFfjlArchive.js View File

@ -0,0 +1,74 @@
import request from '@/utils/request'
// 档案列表
export function list(query) {
return request({
url: '/system/business/gspRkjlArchive/list',
method: 'get',
params: query
})
}
// 同意归档
export function tygd(data) {
return request({
url: '/system/business/gspRkjlArchive/gd/agree',
method: 'post',
data: data
})
}
// 拒绝归档
export function jjgd(data) {
return request({
url: '/system/business/gspRkjlArchive/gd/refuse',
method: 'post',
data: data
})
}
// 同意解档
export function tyjd(data) {
return request({
url: '/system/business/gspRkjlArchive/jd/agree',
method: 'post',
data: data
})
}
// 拒绝解档
export function jjjd(data) {
return request({
url: '/system/business/gspRkjlArchive/jd/agree',
method: 'post',
data: data
})
}
// 同意借阅
export function tyjy(data) {
return request({
url: '/system/business/gspRkjlArchive/jy/agree',
method: 'post',
data: data
})
}
// 拒绝借阅
export function jjjy(data) {
return request({
url: '/system/business/gspRkjlArchive/jy/refuse',
method: 'post',
data: data
})
}
// 确认归还
export function qrgh(data) {
return request({
url: '/system/business/gspRkjlArchive/gh',
method: 'post',
data: data
})
}

+ 74
- 0
src/api/business/gsp/gspRkjlArchive.js View File

@ -0,0 +1,74 @@
import request from '@/utils/request'
// 档案列表
export function list(query) {
return request({
url: '/system/business/gspRkjlArchive/list',
method: 'get',
params: query
})
}
// 同意归档
export function tygd(data) {
return request({
url: '/system/business/gspRkjlArchive/gd/agree',
method: 'post',
data: data
})
}
// 拒绝归档
export function jjgd(data) {
return request({
url: '/system/business/gspRkjlArchive/gd/refuse',
method: 'post',
data: data
})
}
// 同意解档
export function tyjd(data) {
return request({
url: '/system/business/gspRkjlArchive/jd/agree',
method: 'post',
data: data
})
}
// 拒绝解档
export function jjjd(data) {
return request({
url: '/system/business/gspRkjlArchive/jd/agree',
method: 'post',
data: data
})
}
// 同意借阅
export function tyjy(data) {
return request({
url: '/system/business/gspRkjlArchive/jy/agree',
method: 'post',
data: data
})
}
// 拒绝借阅
export function jjjy(data) {
return request({
url: '/system/business/gspRkjlArchive/jy/refuse',
method: 'post',
data: data
})
}
// 确认归还
export function qrgh(data) {
return request({
url: '/system/business/gspRkjlArchive/gh',
method: 'post',
data: data
})
}

+ 9
- 0
src/lang/en/business/resource/gsp.js View File

@ -111,6 +111,8 @@ export default {
ffjlxq: '发放回收记录详情',
dr: 'Import',
gd: '归档',
sqr: 'Manager',
gdsqsj: 'Archive Application Date',
bjgsp: 'Edit',
xzgsp: 'Add',
@ -130,4 +132,11 @@ export default {
jsgsprkjl: '解锁供试品入库记录',
sdgsprkjl: '锁定供试品入库记录',
xzgsprkjl: '新增供试品入库记录',
tygd:'Approve Archiving',
jjgd:'Reject Archiving',
tyjd:'Approve De-archiving',
jjjd:'Reject De-archiving',
tyjy:'Approve Check-out',
jjjy:'Reject Check-out',
qrgh:'Confirm Check-in',
}

+ 9
- 0
src/lang/zh/business/resource/gsp.js View File

@ -115,6 +115,8 @@ export default {
ffjlxq: '发放回收记录详情',
dr: '导入',
gd: '归档',
sqr: '申请人',
gdsqsj: '归档申请时间',
bjgsp: '编辑供试品',
xzgsp: '新增供试品',
@ -134,5 +136,12 @@ export default {
jsgsprkjl: '解锁供试品入库记录',
sdgsprkjl: '锁定供试品入库记录',
xzgsprkjl: '新增供试品入库记录',
tygd:'同意归档',
jjgd:'拒绝归档',
tyjd:'同意解档',
jjjd:'拒绝解档',
tyjy:'同意借阅',
jjjy:'拒绝借阅',
qrgh:'确认归还',
}

+ 101
- 288
src/views/business/archive/gsp/comps/ffjlList.vue View File

@ -41,18 +41,6 @@
<el-option :label="$t('page.business.resource.resource.jyzt.jyz')" :value="5" />
</el-select>
</el-form-item>
<!-- 出库日期 -->
<el-form-item :label="$t('page.business.resource.mjy.cksj') + ':'">
<el-date-picker v-model="daterangeCk" class="chat-histogram-daterange" type="daterange"
range-separator="-" :start-placeholder="$t('form.startDate')" :end-placeholder="$t('form.endDate')"
value-format="yyyy-MM-dd" @change="handleQuery" style="width: 250px;" />
</el-form-item>
<!-- 入库日期 -->
<el-form-item :label="$t('page.business.resource.mjy.rksj') + ':'">
<el-date-picker v-model="daterangeRk" class="chat-histogram-daterange" type="daterange"
range-separator="-" :start-placeholder="$t('form.startDate')" :end-placeholder="$t('form.endDate')"
value-format="yyyy-MM-dd" @change="handleQuery" style="width: 250px;" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('form.search') }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('form.reset') }}</el-button>
@ -60,29 +48,8 @@
</el-col>
</el-row>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- 批量归档 -->
<el-button type="primary" :disabled="multiple" @click="handlePlgd"
v-hasPermi="['business:resource:gsp:ffjlgd']">{{
$t('page.business.resource.mjy.plgd') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 批量锁定 -->
<el-button type="primary" :disabled="multiple" @click="handlePlsd"
v-hasPermi="['business:resource:gsp:ffjlsd']">{{
$t('page.business.resource.mjy.plsd') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 导出 -->
<el-button type="primary" @click="exportExcel"
v-hasPermi="['business:resource:gsp:ffjldc']">{{
$t('form.export') }}</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" fixed="left" width="55" align="center" :selectable="checkSelectable" />
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('page.business.resource.gsp.mc')" align="left" prop="mc"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.bh')" align="center" prop="bh"
@ -103,20 +70,7 @@
{{ scope.row.rkl }} {{ scope.row.rkldw }}
</template>
</el-table-column>
<el-table-column :label="$t('page.business.resource.gsp.syl')" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.syl }} {{ scope.row.syldw }}
</template>
</el-table-column>
<el-table-column :label="$t('page.business.resource.gsp.lqr1')" align="center" prop="lqr1Mc"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.lqr2')" align="center" prop="lqr2Mc"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.kgy1')" align="center" prop="jsr1Mc"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.kgy2')" align="center" prop="jsr2Mc"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.zcg')" align="center" prop="zcgMc"
<el-table-column :label="$t('page.business.resource.gsp.dasqr')" align="center" prop="dasqrMc" width="150px"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.jlzt')" align="center" width="100px" fixed="right">
<template slot-scope="scope">
@ -134,74 +88,73 @@
<span v-if="scope.row.jyzt == 5">{{ $t('page.business.resource.resource.jyzt.jyz') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('page.business.resource.gsp.gdsqsj')" align="center" prop="gdsqsj" width="150px"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('form.operate')" fixed="right" align="center"
class-name="small-padding fixed-width" width="250px">
<template slot-scope="scope">
<!-- 加签 -->
<el-button v-if="scope.row.jlzt == 1" type="text" v-hasPermi="['business:resource:gsp:ffjljq']"
@click="handleJq(scope.row)">{{
$t('page.business.resource.gsp.jiaqian') }}</el-button>
<!-- 待归档 -->
<template v-if="scope.row.zjzt == 7">
<!-- 同意归档 -->
<el-button type="text"
@click="handleSign(scope.row, 'page.business.resource.gsp.tygd', false, 'tygd')">{{
$t('page.business.resource.gsp.tygd') }}</el-button>
<!-- 拒绝归档 -->
<el-button type="text"
@click="handleSign(scope.row, 'page.business.resource.gsp.jjgd', false, 'jjgd', true, true)">{{
$t('page.business.resource.gsp.jjgd') }}</el-button>
</template>
<!-- 待解档 -->
<template v-if="scope.row.zjzt == 11">
<!-- 同意解档 -->
<el-button type="text"
@click="handleSign(scope.row, 'page.business.resource.gsp.tyjd', false, 'tyjd')">{{
$t('page.business.resource.gsp.tyjd') }}</el-button>
<!-- 拒绝解档 -->
<el-button type="text"
@click="handleSign(scope.row, 'page.business.resource.gsp.jjjd', false, 'jjjd', true, true)">{{
$t('page.business.resource.gsp.jjjd') }}</el-button>
</template>
<!-- 归档 && 待借阅 -->
<template v-if="scope.row.zjzt == 9 && scope.row.jyzt == 3">
<!-- 同意借阅 -->
<el-button type="text"
@click="handleSign(scope.row, 'page.business.resource.gsp.tyjy', true, 'tyjy')">{{
$t('page.business.resource.gsp.tyjy') }}</el-button>
<!-- 拒绝借阅 -->
<el-button type="text"
@click="handleSign(scope.row, 'page.business.resource.gsp.jjjy', true, 'jjjy', true, true)">{{
$t('page.business.resource.gsp.jjjy') }}</el-button>
</template>
<!-- 归档 && 借阅中 -->
<template v-if="scope.row.zjzt == 9 && scope.row.jyzt == 5">
<!-- 确认归还 -->
<el-button type="text"
@click="handleSign(scope.row, 'page.business.resource.gsp.qrgh', false, 'qrgh')">{{
$t('page.business.resource.gsp.qrgh') }}</el-button>
</template>
<!-- 详情 -->
<el-button v-if="scope.row.jlzt == 1 || scope.row.jlzt == 3 || scope.row.jlzt == 7" type="text"
v-hasPermi="['business:resource:gsp:ffjlxq']" @click="handleXq(scope.row)">{{
$t('page.business.resource.gsp.detail') }}</el-button>
<!-- 锁定 -->
<el-button type="text" v-if="scope.row.jlzt == 1" @click="handleSd(scope.row)"
v-hasPermi="['business:resource:gsp:ffjlsd']">{{
$t('page.business.resource.gsp.lock') }}</el-button>
<!-- 解锁 -->
<el-button type="text" v-if="scope.row.jlzt == 3" @click="handleJs(scope.row)"
v-hasPermi="['business:resource:gsp:ffjljs']">{{
$t('page.business.resource.gsp.unlock') }}</el-button>
<!-- 归档 -->
<el-button type="text" v-if="scope.row.jlzt == 3" @click="handleGd(scope.row)"
v-hasPermi="['business:resource:gsp:ffjlgd']">{{
$t('page.business.resource.gsp.guidang') }}</el-button>
<!-- 解档 -->
<el-button type="text" v-if="scope.row.jlzt == 7" @click="handleJd(scope.row)"
v-hasPermi="['business:resource:gsp:ffjljd']">{{
$t('page.business.resource.gsp.jiedang') }}</el-button>
<!-- 借阅 -->
<el-button type="text" v-if="scope.row.jlzt == 7 && scope.row.jyzt == 1" @click="handleJy(scope.row)"
v-hasPermi="['business:resource:gsp:ffjljy']">{{
$t('page.business.resource.gsp.jieyue') }}</el-button>
<el-button type="text" @click="handleXq(scope.row)">{{
$t('page.business.resource.gsp.detail') }}</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" />
</div>
<!-- 锁定 -->
<Sd key="Sd" ref="Sd" @callback="handleQuery" />
<!-- 解锁 -->
<Js key="Js" ref="Js" @callback="handleQuery" />
<!-- 归档 -->
<Gd key="Gd" ref="Gd" @callback="handleQuery" />
<!-- 解档 -->
<Jd key="Jd" ref="Jd" @callback="handleQuery" />
<!-- 借阅 -->
<Jy key="Jy" ref="Jy" @callback="handleQuery" />
<!-- 借阅 -->
<Xq key="Xq" v-show="showDetail" ref="Xq" @callback="closeXq" />
<!-- 加签 -->
<Jq key="Jq" ref="Jq" @callback="handleQuery" />
</div>
</div>
</template>
<script>
import { list } from "@/api/business/gsp/gspFfjl"
import Sd from "./ffjl/Sd";
import Jy from "./ffjl/Jy";
import Js from "./ffjl/Js";
import Gd from "./ffjl/Gd";
import Jd from "./ffjl/Jd";
import { list, tygd, jjgd, tyjd, jjjd, tyjy, jjjy, qrgh } from "@/api/business/gsp/gspFfjlArchive"
import Xq from "./ffjl/Xq";
import Jq from "./ffjl/Jq";
import { deepClone } from "@/utils/index";
export default {
name: "FfjlList",
components: { Sd, Js, Gd, Jd, Jy, Xq, Jq },
components: { Xq },
data() {
return {
daterangeCk: [],
@ -234,164 +187,58 @@ export default {
this.getList()
},
methods: {
//
exportExcel() {
let that = this
that.$modal.loading()
let params = deepClone(this.queryParams)
params.pageSize = 999999
list(params).then(response => {
var tabelStr =
'<table border="1" class="html-tabel">' +
'<tr style="background:#eee;">' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.mc') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.bh') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.md') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.zytj') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.cksj') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.rksj') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.ckl') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.rkl') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.syl') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.lqr1') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.lqr2') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.kgy1') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.kgy2') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.zcg') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.jlzt') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.jyzt') + '</th>' +
' </tr>'
let _datastr = ''
_.forEach(response.rows, function (value) {
let jlzt = ''
switch (value.jlzt) {
case 1:
jlzt = that.$t('page.business.resource.resource.jlzt.wsd')
break
case 3:
jlzt = that.$t('page.business.resource.resource.jlzt.ysd')
break
case 5:
jlzt = that.$t('page.business.resource.resource.jlzt.dgd')
break
case 7:
jlzt = that.$t('page.business.resource.resource.jlzt.gd')
break
case 9:
jlzt = that.$t('page.business.resource.resource.jlzt.djd')
break
default: jlzt = ''
}
let jyzt = ''
switch (value.jyzt) {
case 1:
jyzt = that.$t('page.business.resource.resource.jyzt.wjy')
break
case 3:
jyzt = that.$t('page.business.resource.resource.jyzt.djy')
break
case 5:
jyzt = that.$t('page.business.resource.resource.jyzt.jyz')
break
default: jyzt = ''
}
_datastr =
_datastr +
'<tr style="text-align: center;">' +
' <td>' +
value.mc +
'</td>' +
' <td>' +
'&nbsp;' + value.bh +
'</td>' +
' <td>' +
value.mdMc +
'</td>' +
' <td>' +
value.ffzytj +
'</td>' +
' <td>' +
value.ffrq +
'</td>' +
' <td>' +
value.ghrq +
'</td>' +
' <td>' +
value.ckl + value.ckldw +
'</td>' +
' <td>' +
value.rkl + value.rkldw +
'</td>' +
' <td>' +
value.syl + value.syldw +
'</td>' +
' <td>' +
value.lqr1Mc +
'</td>' +
' <td>' +
value.lqr2Mc +
'</td>' +
' <td>' +
value.jsr1Mc +
'</td>' +
' <td>' +
value.jsr2Mc +
'</td>' +
' <td>' +
value.zcgMc +
'</td>' +
' <td>' +
jlzt +
'</td>' +
' <td>' +
jyzt +
'</td>' +
'</tr>'
})
tabelStr = tabelStr + _datastr + ' <table>'
// Worksheet
var worksheet = that.$t('page.business.resource.gsp.ffhsjl')
var uri = 'data:application/vnd.ms-excel;base64,'
// HTML
var exportTemplate = `<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet>
<x:Name>${worksheet}</x:Name>
<x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>
</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]-->
</head>
<body>
${tabelStr}
</body>
</html>`
var a = document.createElement('a')
a.download = worksheet + '.xls'
a.href = uri + window.btoa(unescape(encodeURIComponent(exportTemplate)))
a.click()
that.$modal.closeLoading()
}).finally(() => {
that.$modal.closeLoading()
})
},
//
handleJq(row) {
this.$refs.Jq.show(row)
},
//
handleSd(row) {
this.$refs.Sd.show(row)
},
//
handleJs(row) {
this.$refs.Js.show(row)
},
//
handlePlgd() {
this.$refs.Gd.showBatch(this.selectList)
handleSign(row, qmyy, showDate, type, isReson, reasonRequired) {
this.form.id = row.id
let title = this.$t(qmyy)
this.type = type
this.$refs.refSign.show(title, title, showDate, (type == 'jjjy' || type == 'tyjy') ? [row.jyksrq, row.jyjsrq] : [], isReson, reasonRequired)
},
//
handlePlsd() {
this.$refs.Sd.showBatch(this.selectList)
doSign(val) {
let params = _.merge({}, this.form, val)
this.$modal.loading()
if (this.type == 'tygd') {
tygd(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'jjgd') {
jjgd(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'tyjd') {
tyjd(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'jjjd') {
jjjd(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'tyjy') {
tyjy(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'jjjy') {
jjjy(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'qrgh') {
qrgh(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
}
},
closeXq() {
this.showDetail = false
@ -404,38 +251,10 @@ export default {
this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row)
},
//
handleGd(row) {
this.$refs.Gd.show(row)
},
//
handleJy(row) {
this.$refs.Jy.show(row)
},
//
handleJd(row) {
this.$refs.Jd.show(row)
},
//
checkSelectable(row) {
return true;
},
//
getList() {
if (this.daterangeCk != null && this.daterangeCk.length > 0) {
this.queryParams.startDateCk = this.daterangeCk[0]
this.queryParams.endDateCk = moment().add(this.daterangeCk[1], 'days').format('YYYY-MM-DD');
} else {
this.queryParams.startDateCk = ''
this.queryParams.endDateCk = ''
}
if (this.daterangeRk != null && this.daterangeRk.length > 0) {
this.queryParams.startDateRk = this.daterangeRk[0]
this.queryParams.endDateRk = moment().add(this.daterangeRk[1], 'days').format('YYYY-MM-DD');
} else {
this.queryParams.startDateRk = ''
this.queryParams.endDateRk = ''
}
this.loading = true
list(this.queryParams).then(response => {
this.list = response.rows
@ -453,12 +272,6 @@ export default {
this.resetForm("queryForm")
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.single = selection.length !== 1
this.multiple = !selection.length
this.selectList = selection
}
}
}
</script>

+ 100
- 366
src/views/business/archive/gsp/comps/gspList.vue View File

@ -9,9 +9,9 @@
<el-input v-model="queryParams.mc" clearable @change="handleQuery"
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
<!-- 编号 -->
<el-form-item :label="$t('page.business.resource.gsp.bh') + ':'" prop="bh">
<el-input v-model="queryParams.bh" clearable @change="handleQuery"
<!-- 规格 -->
<el-form-item :label="$t('page.business.resource.gsp.gg') + ':'" prop="gg">
<el-input v-model="queryParams.gg" clearable @change="handleQuery"
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
<!-- 批号 -->
@ -32,71 +32,19 @@
<el-form-item :label="$t('page.business.resource.gsp.zjzt') + ':'" prop="zjzt">
<el-select v-model="queryParams.zjzt" :placeholder="$t('form.placeholderSelect')" clearable
@change="handleQuery">
<el-option :label="$t('page.business.resource.zjzt.rk')" :value="1" />
<el-option :label="$t('page.business.resource.zjzt.yff')" :value="3" />
<el-option :label="$t('page.business.resource.zjzt.ysd')" :value="5" />
<el-option :label="$t('page.business.resource.zjzt.dgd')" :value="7" />
<el-option :label="$t('page.business.resource.zjzt.gd')" :value="9" />
<el-option :label="$t('page.business.resource.zjzt.djd')" :value="11" />
</el-select>
</el-form-item>
<!-- 失效日期 -->
<el-form-item :label="$t('page.business.resource.gsp.yxq') + ':'">
<el-date-picker v-model="daterange" class="chat-histogram-daterange" type="daterange" range-separator="-"
:start-placeholder="$t('form.startDate')" :end-placeholder="$t('form.endDate')" value-format="yyyy-MM-dd"
@change="handleQuery" style="width: 250px;" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('form.search') }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('form.reset') }}</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- 更新物资库 -->
<el-button type="primary" @click="handlePlff" v-hasPermi="['business:resource:gsp:gxwzk']">{{
$t('page.business.resource.gsp.gxwzk') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 新增 -->
<el-button type="primary" @click="handleXz" v-hasPermi="['business:resource:gsp:xz']">{{
$t('form.add') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 批量发放 -->
<el-button type="primary" :disabled="multiple" @click="handlePlff" v-hasPermi="['business:resource:gsp:ff']">{{
$t('page.business.resource.gsp.plff') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 批量处置 -->
<el-button type="primary" :disabled="multiple" @click="handlePlcz" v-hasPermi="['business:resource:gsp:cz']">{{
$t('page.business.resource.gsp.plcz') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 钥匙发放 -->
<el-button type="primary" :disabled="multiple" @click="handleYsff" v-hasPermi="['business:resource:gsp:ff']">{{
$t('page.business.resource.gsp.ysff') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 批量锁定 -->
<el-button type="primary" :disabled="multiple" @click="handlePlsd" v-hasPermi="['business:resource:gsp:ysff']">{{
$t('page.business.resource.gsp.plsd') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 批量归档 -->
<el-button type="primary" :disabled="multiple" @click="handlePlgd" v-hasPermi="['business:resource:gsp:gd']">{{
$t('page.business.resource.gsp.plgd') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 导出 -->
<el-button type="primary" @click="exportExcel" v-hasPermi="['business:resource:gsp:dc']">{{
$t('form.export') }}</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" fixed="left" width="55" align="center" :selectable="checkSelectable" />
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('page.business.resource.gsp.mc')" align="left" prop="mc"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.bh')" align="center" prop="bh"
@ -112,9 +60,7 @@
</template>
</el-table-column>
<el-table-column :label="$t('page.business.resource.gsp.ph')" align="center" prop="ph" width="150px" />
<el-table-column :label="$t('page.business.resource.gsp.jsrq')" align="center" prop="jsrq" width="150px" />
<el-table-column :label="$t('page.business.resource.gsp.cctj')" align="center" prop="cctj" width="130px" />
<el-table-column :label="$t('page.business.resource.gsp.sqr')" align="center" prop="dasqrMc" width="150px" />
<el-table-column :label="$t('page.business.resource.gsp.zjzt')" align="center" width="100px" fixed="right">
<template slot-scope="scope">
<span v-if="scope.row.zjzt == 1">{{ $t('page.business.resource.resource.zjzt.rk') }}</span>
@ -132,64 +78,47 @@
<span v-if="scope.row.jyzt == 5">{{ $t('page.business.resource.resource.jyzt.jyz') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('page.business.resource.gsp.gdsqsj')" align="center" prop="gdsqsj"
width="150px" />
<el-table-column :label="$t('form.operate')" fixed="right" align="center"
class-name="small-padding fixed-width" width="250px">
<template slot-scope="scope">
<template
v-if="scope.row.zjzt == 1 || scope.row.zjzt == 3 || scope.row.zjzt == 5 || (scope.row.zjzt == 9 && scope.row.jyzt == 5)">
<!-- 详情 -->
<el-button type="text" @click="handleXq(scope.row)" v-hasPermi="['business:resource:gsp:xq']">{{
$t('page.business.resource.gsp.detail') }}</el-button>
</template>
<template v-if="scope.row.zjzt == 1">
<!-- 发放 -->
<el-button type="text" @click="handleFf(scope.row)" v-hasPermi="['business:resource:gsp:ff']">{{
$t('page.business.resource.gsp.fafang') }}</el-button>
<!-- 处置 -->
<el-button type="text" @click="handleCz(scope.row)" v-hasPermi="['business:resource:gsp:cz']">{{
$t('page.business.resource.gsp.cz') }}</el-button>
<!-- 编辑 -->
<el-button v-if="scope.row.bjzt == 1 && scope.row.zjzt == 1" type="text" @click="handleBj(scope.row)"
v-hasPermi="['business:resource:gsp:bj']">{{
$t('form.edit') }}</el-button>
<!-- 修改库存 -->
<el-button v-if="scope.row.kcbjzt == 1" type="text" @click="handleXgkc(scope.row)" v-hasPermi="['business:resource:gsp:xgkc']" >{{
$t('page.business.resource.gsp.xgkc') }}</el-button>
<!-- 锁定 -->
<el-button type="text" @click="handleSd(scope.row)" v-hasPermi="['business:resource:gsp:sd']">{{
$t('page.business.resource.gsp.lock') }}</el-button>
</template>
<template v-if="scope.row.bjzt == 3 && (scope.row.zjzt == 1 || scope.row.zjzt == 3)">
<!-- 审核编辑 -->
<el-button type="text" @click="handleShbj(scope.row)" v-hasPermi="['business:resource:gsp:shbj']" >{{
$t('page.business.resource.gsp.shbj') }}</el-button>
<!-- 待归档 -->
<template v-if="scope.row.zjzt == 7">
<!-- 同意归档 -->
<el-button type="text" @click="handleSign(scope.row, 'page.business.resource.gsp.tygd', false, 'tygd')">{{
$t('page.business.resource.gsp.tygd') }}</el-button>
<!-- 拒绝归档 -->
<el-button type="text" @click="handleSign(scope.row, 'page.business.resource.gsp.jjgd', false, 'jjgd',true,true)">{{
$t('page.business.resource.gsp.jjgd') }}</el-button>
</template>
<template v-if="scope.row.kcbjzt == 3 && (scope.row.zjzt == 1 || scope.row.zjzt == 3)">
<!-- 审核修改库存 -->
<el-button type="text" @click="handleShxgkc(scope.row)" v-hasPermi="['business:resource:gsp:xgkc']">{{
$t('page.business.resource.gsp.shxgkc') }}</el-button>
<!-- 待解档 -->
<template v-if="scope.row.zjzt == 11">
<!-- 同意解档 -->
<el-button type="text" @click="handleSign(scope.row, 'page.business.resource.gsp.tyjd', false, 'tyjd')">{{
$t('page.business.resource.gsp.tyjd') }}</el-button>
<!-- 拒绝解档 -->
<el-button type="text" @click="handleSign(scope.row, 'page.business.resource.gsp.jjjd', false, 'jjjd',true,true)">{{
$t('page.business.resource.gsp.jjjd') }}</el-button>
</template>
<template v-if="scope.row.zjzt == 5">
<!-- 解锁 -->
<el-button type="text" @click="handleJs(scope.row)" v-hasPermi="['business:resource:gsp:js']">{{
$t('page.business.resource.gsp.unlock') }}</el-button>
<!-- 归档 -->
<el-button type="text" @click="handleGd(scope.row)" v-hasPermi="['business:resource:gsp:gd']">{{
$t('page.business.resource.gsp.guidang') }}</el-button>
<!-- 归档 && 待借阅 -->
<template v-if="scope.row.zjzt == 9 && scope.row.jyzt == 3">
<!-- 同意借阅 -->
<el-button type="text" @click="handleSign(scope.row, 'page.business.resource.gsp.tyjy', true, 'tyjy')">{{
$t('page.business.resource.gsp.tyjy') }}</el-button>
<!-- 拒绝借阅 -->
<el-button type="text" @click="handleSign(scope.row, 'page.business.resource.gsp.jjjy', true, 'jjjy',true,true)">{{
$t('page.business.resource.gsp.jjjy') }}</el-button>
</template>
<template v-if="scope.row.zjzt == 3">
<!-- 归还 -->
<el-button type="text" @click="handleGh(scope.row)" v-hasPermi="['business:resource:gsp:gh']">{{
$t('page.business.resource.gsp.guihuan') }}</el-button>
</template>
<template v-if="scope.row.zjzt == 9 && scope.row.jyzt == 1">
<!-- 解档 -->
<el-button type="text" @click="handleJd(scope.row)" v-hasPermi="['business:resource:gsp:jd']">{{
$t('page.business.resource.gsp.jiedang') }}</el-button>
<!-- 借阅 -->
<el-button type="text" @click="handleJy(scope.row)" v-hasPermi="['business:resource:gsp:jy']">{{
$t('page.business.resource.gsp.jieyue') }}</el-button>
<!-- 归档 && 借阅中 -->
<template v-if="scope.row.zjzt == 9 && scope.row.jyzt == 5">
<!-- 确认归还 -->
<el-button type="text" @click="handleSign(scope.row, 'page.business.resource.gsp.qrgh', false, 'qrgh')">{{
$t('page.business.resource.gsp.qrgh') }}</el-button>
</template>
<!-- 详情 -->
<el-button type="text" @click="handleXq(scope.row)">{{
$t('page.business.resource.gsp.detail') }}</el-button>
</template>
</el-table-column>
</el-table>
@ -197,64 +126,25 @@
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
<!-- 新增 -->
<Xz key="Xz" ref="Xz" @callback="handleQuery" />
<!-- 锁定 -->
<Sd key="Sd" ref="Sd" @callback="handleQuery" />
<!-- 解锁 -->
<Js key="Js" ref="Js" @callback="handleQuery" />
<!-- 归档 -->
<Gd key="Gd" ref="Gd" @callback="handleQuery" />
<!-- 解档 -->
<Jd key="Jd" ref="Jd" @callback="handleQuery" />
<!-- 编辑 -->
<Bj key="Bj" ref="Bj" @callback="handleQuery" />
<!-- 审核编辑 -->
<Shbj key="Shbj" ref="Shbj" @callback="handleQuery" />
<!-- 修改库存 -->
<Xgkc key="Xgkc" ref="Xgkc" @callback="handleQuery" />
<!-- 审核修改库存 -->
<Shxgkc key="Shxgkc" ref="Shxgkc" @callback="handleQuery" />
<!-- 借阅 -->
<Jy key="Jy" ref="Jy" @callback="handleQuery" />
<!-- 归还 -->
<Gh key="Gh" ref="Gh" @callback="handleQuery" />
<!-- 发放 -->
<Ff key="Ff" ref="Ff" @callback="handleQuery" />
<!-- 处置 -->
<Cz key="Cz" ref="Cz" @callback="handleQuery" />
<!-- 批量处置 -->
<CzBatch key="CzBatch" ref="CzBatch" @callback="handleQuery" />
<!-- 钥匙发放 -->
<Ysff key="Ysff" ref="Ysff" @callback="handleQuery" />
<!-- 详情 -->
<Xq v-show="showDetail" key="Xq" ref="Xq" @callback="closeXq" />
<!-- 签名 -->
<Sign ref="refSign" @callback="doSign" />
</div>
</div>
</template>
<script>
import { list } from "@/api/business/gsp/gsp"
import Sd from "./gsp/Sd";
import Js from "./gsp/Js";
import Gd from "./gsp/Gd";
import Jd from "./gsp/Jd";
import { list, tygd, jjgd, tyjd, jjjd, tyjy, jjjy, qrgh } from "@/api/business/gsp/gspArchive"
import Xq from "./gsp/Xq";
import Bj from "./gsp/Bj";
import Xz from "./gsp/Xz";
import Shbj from "./gsp/Shbj";
import Xgkc from "./gsp/Xgkc";
import Shxgkc from "./gsp/Shxgkc";
import Jy from "./gsp/Jy";
import Gh from "./gsp/Gh";
import Ff from "./gsp/Ff";
import Cz from "./gsp/Cz";
import CzBatch from "./gsp/CzBatch";
import Ysff from "./gsp/Ysff";
import { deepClone } from "@/utils/index";
export default {
name: "GspList",
components: { Xz, Sd, Js, Gd, Xq, Jd, Bj, Shbj, Xgkc, Shxgkc, Jy, Gh, Cz, CzBatch, Ff, Ysff },
components: { Xq },
data() {
return {
daterange: [],
@ -283,174 +173,58 @@ export default {
this.getList()
},
methods: {
//
exportExcel() {
let that = this
that.$modal.loading()
let params = deepClone(this.queryParams)
params.pageSize = 999999
list(params).then(response => {
var tabelStr =
'<table border="1" class="html-tabel">' +
'<tr style="background:#eee;">' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.mc') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.bh') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.gg') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.kcl') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.ph') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.jsrq') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.cctj') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.zjzt') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.jyzt') + '</th>' +
' </tr>'
let _datastr = ''
_.forEach(response.rows, function (value) {
let zjzt = ''
switch (value.zjzt) {
case 1:
zjzt = that.$t('page.business.resource.resource.zjzt.rk')
break
case 2:
zjzt = that.$t('page.business.resource.resource.zjzt.wrk')
break
case 3:
zjzt = that.$t('page.business.resource.resource.zjzt.yff')
break
case 5:
zjzt = that.$t('page.business.resource.resource.zjzt.ysd')
break
case 7:
zjzt = that.$t('page.business.resource.resource.zjzt.dgd')
break
case 9:
zjzt = that.$t('page.business.resource.resource.zjzt.gd')
break
case 11:
zjzt = that.$t('page.business.resource.resource.zjzt.djd')
break
default: zjzt = ''
}
let jyzt = ''
switch (value.jyzt) {
case 1:
jyzt = that.$t('page.business.resource.resource.jyzt.wjy')
break
case 3:
jyzt = that.$t('page.business.resource.resource.jyzt.djy')
break
case 5:
jyzt = that.$t('page.business.resource.resource.jyzt.jyz')
break
default: jyzt = ''
}
_datastr =
_datastr +
'<tr style="text-align: center;">' +
' <td>' +
value.mc +
'</td>' +
' <td>' +
'&nbsp;'+value.bh +
'</td>' +
' <td>' +
value.gg + value.ggdw +
'</td>' +
' <td>' +
value.kc + value.kcdw +
'</td>' +
' <td>' +
value.ph +
'</td>' +
' <td>' +
value.jsrq +
'</td>' +
' <td>' +
value.cctj +
'</td>' +
' <td>' +
zjzt +
'</td>' +
' <td>' +
jyzt +
'</td>' +
'</tr>'
})
tabelStr = tabelStr + _datastr + ' <table>'
// Worksheet
var worksheet = that.$t('page.business.resource.gsp.gspgl')
var uri = 'data:application/vnd.ms-excel;base64,'
// HTML
var exportTemplate = `<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet>
<x:Name>${worksheet}</x:Name>
<x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>
</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]-->
</head>
<body>
${tabelStr}
</body>
</html>`
var a = document.createElement('a')
a.download = worksheet + '.xls'
a.href = uri + window.btoa(unescape(encodeURIComponent(exportTemplate)))
a.click()
that.$modal.closeLoading()
}).finally(() => {
that.$modal.closeLoading()
})
},
//
handleXz() {
this.$refs.Xz.show()
},
//
handleYsff() {
this.$refs.Ysff.showBatch(this.selectList)
},
//
handlePlff() {
this.$refs.Ff.showBatch(this.selectList)
},
//
handleFf(row) {
this.$refs.Ff.show(row)
},
//
handleCz(row) {
this.$refs.Cz.show(row)
},
//
handlePlcz() {
this.$refs.CzBatch.showBatch(this.selectList)
},
//
handleBj(row) {
this.$refs.Bj.show(row)
},
//
handleShbj(row) {
this.$refs.Shbj.show(row)
},
//
handleXgkc(row) {
this.$refs.Xgkc.show(row)
handleSign(row, qmyy, showDate, type, isReson, reasonRequired) {
this.form.id = row.id
let title = this.$t(qmyy)
this.type = type
this.$refs.refSign.show(title, title, showDate, (type == 'jjjy' || type == 'tyjy') ? [row.jyksrq, row.jyjsrq] : [], isReson, reasonRequired)
},
//
handleShxgkc(row) {
this.$refs.Shxgkc.show(row)
},
//
handleJy(row) {
this.$refs.Jy.show(row)
},
//
handleGh(row) {
this.$refs.Gh.show(row)
},
//
checkSelectable(row) {
return true;
doSign(val) {
let params = _.merge({}, this.form, val)
this.$modal.loading()
if (this.type == 'tygd') {
tygd(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'jjgd') {
jjgd(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'tyjd') {
tyjd(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'jjjd') {
jjjd(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'tyjy') {
tyjy(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'jjjy') {
jjjy(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'qrgh') {
qrgh(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
}
},
closeXq() {
this.showDetail = false
@ -463,43 +237,9 @@ export default {
this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row)
},
//
handlePljs() {
this.$refs.Js.showBatch(this.selectList)
},
//
handleJs(row) {
this.$refs.Js.show(row)
},
//
handlePlgd() {
this.$refs.Gd.showBatch(this.selectList)
},
//
handleGd(row) {
this.$refs.Gd.show(row)
},
//
handleJd(row) {
this.$refs.Jd.show(row)
},
//
handlePlsd() {
this.$refs.Sd.showBatch(this.selectList)
},
//
handleSd(row) {
this.$refs.Sd.show(row)
},
//
getList() {
if (this.daterange != null && this.daterange.length > 0) {
this.queryParams.startDate = this.daterange[0] + ' 00:00:00'
this.queryParams.endDate = this.daterange[1] + ' 23:59:59'
} else {
this.queryParams.startDate = ''
this.queryParams.endDate = ''
}
this.loading = true
list(this.queryParams).then(response => {
this.list = response.rows
@ -517,12 +257,6 @@ export default {
this.dateRange = []
this.resetForm("queryForm")
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.single = selection.length !== 1
this.multiple = !selection.length
this.selectList = selection
}
}
}

+ 105
- 270
src/views/business/archive/gsp/comps/rkjlList.vue View File

@ -25,8 +25,6 @@
<el-form-item :label="$t('page.business.resource.gsp.jlzt') + ':'">
<el-select v-model="queryParams.jlzt" :placeholder="$t('form.placeholderSelect')" clearable
@change="handleQuery">
<el-option :label="$t('page.business.resource.resource.jlzt.wsd')" :value="1" />
<el-option :label="$t('page.business.resource.resource.jlzt.ysd')" :value="3" />
<el-option :label="$t('page.business.resource.resource.jlzt.dgd')" :value="5" />
<el-option :label="$t('page.business.resource.resource.jlzt.gd')" :value="7" />
<el-option :label="$t('page.business.resource.resource.jlzt.djd')" :value="9" />
@ -41,12 +39,6 @@
<el-option :label="$t('page.business.resource.resource.jyzt.jyz')" :value="5" />
</el-select>
</el-form-item>
<!-- 入库日期 -->
<el-form-item :label="$t('page.business.resource.mjy.rksj') + ':'">
<el-date-picker v-model="daterangeRk" class="chat-histogram-daterange" type="daterange"
range-separator="-" :start-placeholder="$t('form.startDate')" :end-placeholder="$t('form.endDate')"
value-format="yyyy-MM-dd" @change="handleQuery" style="width: 250px;" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('form.search') }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('form.reset') }}</el-button>
@ -54,39 +46,8 @@
</el-col>
</el-row>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- 新增 -->
<el-button type="primary" @click="handleXz" v-hasPermi="['business:resource:gsp:rkxz']">{{
$t('form.add') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 导入 -->
<el-button type="primary" @click="handleXz" v-hasPermi="['business:resource:gsp:rkdr']">{{
$t('page.business.resource.gsp.dr') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 批量归档 -->
<el-button type="primary" :disabled="multiple" @click="handlePlgd"
v-hasPermi="['business:resource:gsp:rkgd']">{{
$t('page.business.resource.gsp.plgd') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 批量锁定 -->
<el-button type="primary" :disabled="multiple" @click="handlePlsd"
v-hasPermi="['business:resource:gsp:rksd']">{{
$t('page.business.resource.gsp.plsd') }}</el-button>
</el-col>
<el-col :span="1.5">
<!-- 导出 -->
<el-button type="primary" @click="exportExcel"
v-hasPermi="['business:resource:gsp:rkdc']">{{
$t('form.export') }}</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" fixed="left" width="55" align="center" :selectable="checkSelectable" />
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('page.business.resource.gsp.mc')" align="left" prop="mc"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.ph')" align="center" prop="ph"
@ -96,16 +57,9 @@
{{ scope.row.gg }} {{ scope.row.ggdw }}
</template>
</el-table-column>
<el-table-column :label="$t('page.business.resource.gsp.rksj')" align="center" prop="rksj" width="150px"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.rkl')" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.rkl }} {{ scope.row.rkdw }}
</template>
</el-table-column>
<el-table-column :label="$t('page.business.resource.gsp.cctj')" align="center" prop="cctj" />
<el-table-column :label="$t('page.business.resource.gsp.zysx')" align="center" prop="zysx"
<el-table-column :label="$t('page.business.resource.gsp.dasqr')" align="center" prop="dasqrMc" width="150px"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.jlzt')" align="center" width="100px" fixed="right">
<template slot-scope="scope">
<span v-if="scope.row.jlzt == 1">{{ $t('page.business.resource.resource.jlzt.wsd') }}</span>
@ -122,77 +76,78 @@
<span v-if="scope.row.jyzt == 5">{{ $t('page.business.resource.resource.jyzt.jyz') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('page.business.resource.gsp.gdsqsj')" align="center" prop="gdsqsj" width="150px"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('form.operate')" fixed="right" align="center"
class-name="small-padding fixed-width" width="250px">
<template slot-scope="scope">
<!-- 编辑 -->
<el-button v-if="scope.row.jlzt == 1" type="text" @click="handleBj(scope.row)"
v-hasPermi="['business:resource:gsp:rkbj']">{{
$t('form.edit') }}</el-button>
<!-- 待归档 -->
<template v-if="scope.row.zjzt == 7">
<!-- 同意归档 -->
<el-button type="text"
@click="handleSign(scope.row, 'page.business.resource.gsp.tygd', false, 'tygd')">{{
$t('page.business.resource.gsp.tygd') }}</el-button>
<!-- 拒绝归档 -->
<el-button type="text"
@click="handleSign(scope.row, 'page.business.resource.gsp.jjgd', false, 'jjgd', true, true)">{{
$t('page.business.resource.gsp.jjgd') }}</el-button>
</template>
<!-- 待解档 -->
<template v-if="scope.row.zjzt == 11">
<!-- 同意解档 -->
<el-button type="text"
@click="handleSign(scope.row, 'page.business.resource.gsp.tyjd', false, 'tyjd')">{{
$t('page.business.resource.gsp.tyjd') }}</el-button>
<!-- 拒绝解档 -->
<el-button type="text"
@click="handleSign(scope.row, 'page.business.resource.gsp.jjjd', false, 'jjjd', true, true)">{{
$t('page.business.resource.gsp.jjjd') }}</el-button>
</template>
<!-- 归档 && 待借阅 -->
<template v-if="scope.row.zjzt == 9 && scope.row.jyzt == 3">
<!-- 同意借阅 -->
<el-button type="text"
@click="handleSign(scope.row, 'page.business.resource.gsp.tyjy', true, 'tyjy')">{{
$t('page.business.resource.gsp.tyjy') }}</el-button>
<!-- 拒绝借阅 -->
<el-button type="text"
@click="handleSign(scope.row, 'page.business.resource.gsp.jjjy', true, 'jjjy', true, true)">{{
$t('page.business.resource.gsp.jjjy') }}</el-button>
</template>
<!-- 归档 && 借阅中 -->
<template v-if="scope.row.zjzt == 9 && scope.row.jyzt == 5">
<!-- 确认归还 -->
<el-button type="text"
@click="handleSign(scope.row, 'page.business.resource.gsp.qrgh', false, 'qrgh')">{{
$t('page.business.resource.gsp.qrgh') }}</el-button>
</template>
<!-- 详情 -->
<el-button v-if="scope.row.jlzt == 1 || scope.row.jlzt == 3 || scope.row.jlzt == 7" type="text"
@click="handleXq(scope.row)" v-hasPermi="['business:resource:gsp:rkxq']">{{
$t('page.business.resource.gsp.detail') }}</el-button>
<!-- 锁定 -->
<el-button type="text" v-if="scope.row.jlzt == 1" @click="handleSd(scope.row)"
v-hasPermi="['business:resource:gsp:rksd']">{{
$t('page.business.resource.gsp.lock') }}</el-button>
<!-- 解锁 -->
<el-button type="text" v-if="scope.row.jlzt == 3" @click="handleJs(scope.row)"
v-hasPermi="['business:resource:gsp:rkjs']">{{
$t('page.business.resource.gsp.unlock') }}</el-button>
<!-- 归档 -->
<el-button type="text" v-if="scope.row.jlzt == 3" @click="handleGd(scope.row)"
v-hasPermi="['business:resource:gsp:rkgd']">{{
$t('page.business.resource.gsp.guidang') }}</el-button>
<!-- 解档 -->
<el-button type="text" v-if="scope.row.jlzt == 7" @click="handleJd(scope.row)"
v-hasPermi="['business:resource:gsp:rkjd']">{{
$t('page.business.resource.gsp.jiedang') }}</el-button>
<!-- 借阅 -->
<el-button type="text" v-if="scope.row.jlzt == 7 && scope.row.jyzt == 1" @click="handleJy(scope.row)"
v-hasPermi="['business:resource:gsp:rkjy']">{{
$t('page.business.resource.gsp.jieyue') }}</el-button>
<el-button type="text" @click="handleXq(scope.row)">{{
$t('page.business.resource.gsp.detail') }}</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" />
</div>
<!-- 锁定 -->
<Sd key="Sd" ref="Sd" @callback="handleQuery" />
<!-- 解锁 -->
<Js key="Js" ref="Js" @callback="handleQuery" />
<!-- 归档 -->
<Gd key="Gd" ref="Gd" @callback="handleQuery" />
<!-- 解档 -->
<Jd key="Jd" ref="Jd" @callback="handleQuery" />
<!-- 借阅 -->
<Jy key="Jy" ref="Jy" @callback="handleQuery" />
<!-- 借阅 -->
<Xq key="Xq" v-show="showDetail" ref="Xq" @callback="closeXq" />
<!-- 编辑 -->
<Bj key="Bj" ref="Bj" @callback="handleQuery" />
<!-- 新增 -->
<Xz key="Xz" ref="Xz" @callback="handleQuery" />
<!-- 签名 -->
<Sign ref="refSign" @callback="doSign" />
</div>
</div>
</template>
<script>
import { list } from "@/api/business/gsp/gspRkjl"
import Sd from "./rkjl/Sd";
import Jy from "./rkjl/Jy";
import Js from "./rkjl/Js";
import Gd from "./rkjl/Gd";
import Jd from "./rkjl/Jd";
import { list, tygd, jjgd, tyjd, jjjd, tyjy, jjjy, qrgh } from "@/api/business/gsp/gspRkjlArchive"
import Xq from "./rkjl/Xq";
import Xz from "./rkjl/Xz";
import Bj from "./rkjl/Bj";
import { deepClone } from "@/utils/index";
export default {
name: "FfjlList",
components: { Sd, Js, Gd, Jd, Jy, Xq, Xz, Bj },
components: { Xq },
data() {
return {
daterangeCk: [],
@ -225,142 +180,58 @@ export default {
this.getList()
},
methods: {
//
exportExcel() {
let that = this
that.$modal.loading()
let params = deepClone(this.queryParams)
params.pageSize = 999999
list(params).then(response => {
var tabelStr =
'<table border="1" class="html-tabel">' +
'<tr style="background:#eee;">' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.mc') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.ph') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.gg') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.rksj') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.kcl') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.cctj') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.zysx') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.jlzt') + '</th>' +
'<th style="text-align: center;">' + this.$t('page.business.resource.gsp.jyzt') + '</th>' +
' </tr>'
let _datastr = ''
_.forEach(response.rows, function (value) {
let jlzt = ''
switch (value.jlzt) {
case 1:
jlzt = that.$t('page.business.resource.resource.jlzt.wsd')
break
case 3:
jlzt = that.$t('page.business.resource.resource.jlzt.ysd')
break
case 5:
jlzt = that.$t('page.business.resource.resource.jlzt.dgd')
break
case 7:
jlzt = that.$t('page.business.resource.resource.jlzt.gd')
break
case 9:
jlzt = that.$t('page.business.resource.resource.jlzt.djd')
break
default: jlzt = ''
}
let jyzt = ''
switch (value.jyzt) {
case 1:
jyzt = that.$t('page.business.resource.resource.jyzt.wjy')
break
case 3:
jyzt = that.$t('page.business.resource.resource.jyzt.djy')
break
case 5:
jyzt = that.$t('page.business.resource.resource.jyzt.jyz')
break
default: jyzt = ''
}
_datastr =
_datastr +
'<tr style="text-align: center;">' +
' <td>' +
value.mc +
'</td>' +
' <td>' +
'&nbsp;' + value.ph +
'</td>' +
' <td>' +
value.gg + value.ggdw +
'</td>' +
' <td>' +
value.rksj +
'</td>' +
' <td>' +
value.rkl + value.rkdw +
'</td>' +
' <td>' +
value.cctj +
'</td>' +
' <td>' +
value.zysx +
'</td>' +
' <td>' +
jlzt +
'</td>' +
' <td>' +
jyzt +
'</td>' +
'</tr>'
})
tabelStr = tabelStr + _datastr + ' <table>'
// Worksheet
var worksheet = that.$t('page.business.resource.gsp.gsprkjl')
var uri = 'data:application/vnd.ms-excel;base64,'
// HTML
var exportTemplate = `<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet>
<x:Name>${worksheet}</x:Name>
<x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>
</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]-->
</head>
<body>
${tabelStr}
</body>
</html>`
var a = document.createElement('a')
a.download = worksheet + '.xls'
a.href = uri + window.btoa(unescape(encodeURIComponent(exportTemplate)))
a.click()
that.$modal.closeLoading()
}).finally(() => {
that.$modal.closeLoading()
})
},
handleBj(row) {
this.$refs.Bj.show(row)
},
handleXz() {
this.$refs.Xz.show()
},
//
handleJq(row) {
this.$refs.Jq.show(row)
},
//
handleSd(row) {
this.$refs.Sd.show(row)
handleSign(row, qmyy, showDate, type, isReson, reasonRequired) {
this.form.id = row.id
let title = this.$t(qmyy)
this.type = type
this.$refs.refSign.show(title, title, showDate, (type == 'jjjy' || type == 'tyjy') ? [row.jyksrq, row.jyjsrq] : [], isReson, reasonRequired)
},
//
handleJs(row) {
this.$refs.Js.show(row)
},
//
handlePlgd() {
this.$refs.Gd.showBatch(this.selectList)
},
//
handlePlsd() {
this.$refs.Sd.showBatch(this.selectList)
doSign(val) {
let params = _.merge({}, this.form, val)
this.$modal.loading()
if (this.type == 'tygd') {
tygd(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'jjgd') {
jjgd(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'tyjd') {
tyjd(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'jjjd') {
jjjd(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'tyjy') {
tyjy(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'jjjy') {
jjjy(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
} else if (this.type == 'qrgh') {
qrgh(params).then(response => {
this.handleQuery()
}).finally(() => {
this.$modal.closeLoading()
})
}
},
closeXq() {
this.showDetail = false
@ -373,38 +244,8 @@ export default {
this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row)
},
//
handleGd(row) {
this.$refs.Gd.show(row)
},
//
handleJy(row) {
this.$refs.Jy.show(row)
},
//
handleJd(row) {
this.$refs.Jd.show(row)
},
//
checkSelectable(row) {
return true;
},
//
getList() {
if (this.daterangeCk != null && this.daterangeCk.length > 0) {
this.queryParams.startDateCk = this.daterangeCk[0]
this.queryParams.endDateCk = moment().add(this.daterangeCk[1], 'days').format('YYYY-MM-DD');
} else {
this.queryParams.startDateCk = ''
this.queryParams.endDateCk = ''
}
if (this.daterangeRk != null && this.daterangeRk.length > 0) {
this.queryParams.startDateRk = this.daterangeRk[0]
this.queryParams.endDateRk = moment().add(this.daterangeRk[1], 'days').format('YYYY-MM-DD');
} else {
this.queryParams.startDateRk = ''
this.queryParams.endDateRk = ''
}
this.loading = true
list(this.queryParams).then(response => {
this.list = response.rows
@ -422,12 +263,6 @@ export default {
this.resetForm("queryForm")
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.single = selection.length !== 1
this.multiple = !selection.length
this.selectList = selection
}
}
}
</script>

+ 11
- 6
src/views/business/resource/gsp/comps/ffjlList.vue View File

@ -75,9 +75,8 @@
</el-col>
<el-col :span="1.5">
<!-- 导出 -->
<el-button type="primary" @click="exportExcel"
v-hasPermi="['business:resource:gsp:ffjldc']">{{
$t('form.export') }}</el-button>
<el-button type="primary" @click="exportExcel" v-hasPermi="['business:resource:gsp:ffjldc']">{{
$t('form.export') }}</el-button>
</el-col>
</el-row>
@ -87,8 +86,14 @@
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.bh')" align="center" prop="bh"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.md')" align="center" prop="mdMc"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.md')" align="center" width="100px"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.mdOther && scope.row.mdOther != '' && scope.row.mdMcs && scope.row.mdMcs != ''">{{
scope.row.mdMcs }},{{ scope.row.mdOther }}</span>
<span v-else>{{ scope.row.mdMcs }}{{ scope.row.mdOther }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('page.business.resource.gsp.zytj')" align="center" prop="ffzytj"
:show-overflow-tooltip="true" />
<el-table-column :label="$t('page.business.resource.gsp.cksj')" align="center" prop="ffrq" width="150px" />
@ -305,7 +310,7 @@ export default {
'&nbsp;' + value.bh +
'</td>' +
' <td>' +
value.mdMc +
(value.mdMcs&&value.mdMcs!=''&&value.mdOther&&value.mdOther!=''? (value.mdMcs +","+value.mdOther) :(value.mdMcs +value.mdOther))+
'</td>' +
' <td>' +
value.ffzytj +

+ 25
- 10
src/views/business/resource/gsp/comps/gsp/Ff.vue View File

@ -22,8 +22,8 @@
<el-table-column :label="$t('page.business.resource.gsp.yxq')" align="center" prop="yxq"
width="150px" />
<el-table-column :label="$t('page.business.resource.gsp.jsrq')" align="center" prop="jsrq"
width="130px" />
<el-table-column :label="$t('page.business.resource.gsp.ckjz')" align="center">
width="150px" />
<el-table-column :label="$t('page.business.resource.gsp.ckjz')" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.kc }}{{ scope.row.kcdw }}
</template>
@ -38,8 +38,8 @@
</el-table-column>
<el-table-column :label="$t('page.business.resource.mjy.md')" align="center" width="250px">
<template slot-scope="scope">
<el-input type="text" v-model="scope.row.xmId" maxlength="50"
:placeholder="$t('form.placeholderInput')" />
<SelectStudy v-model="scope.row.mdIds" :selectkey="scope.row.id + ''"
@change="selectStudyChangeBatch" />
</template>
</el-table-column>
<el-table-column :label="$t('form.remark')" align="center" width="250px">
@ -127,8 +127,7 @@
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gsp.md')" prop="mdIds">
<el-input type="text" v-model="form.mdIds" maxlength="20" :placeholder="$t('form.placeholderInput')">
</el-input>
<SelectStudy v-model="form.mdIds" @change="selectStudyChange" />
</el-form-item>
</el-col>
</el-row>
@ -217,10 +216,10 @@ import { ff, plff } from "@/api/business/gsp/gsp"
import { mapGetters } from 'vuex'
import SelectList from "./SelectList";
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser';
import SelectStudy from '@/views/business/comps/select/SelectStudy';
export default {
name: "Ff",
components: { SelectList, SelectDeptUser },
components: { SelectList, SelectDeptUser, SelectStudy },
data() {
return {
isBatch: false,
@ -232,7 +231,6 @@ export default {
mdIds: [{
required: true,
message: ' ',
trigger: 'blur'
}],
ffr1mm: [{
required: true,
@ -252,7 +250,6 @@ export default {
lqr1Id: [{
required: true,
message: ' ',
trigger: 'blur'
}],
xmId: [{
required: true,
@ -297,6 +294,22 @@ export default {
created() {
},
methods: {
selectStudyChange(val) {
console.log(val)
this.form.mdMcs = val.name
this.form.mdOther = val.mdOther
},
selectStudyChangeBatch(val) {
let that = this
if (val && val.id && val.id !== '') {
const _index = _.findIndex(that.selectList, function (o) { return o.id + '' === val.key })
if (_index > -1) {
that.selectList[_index].mdMcs = val.name
that.selectList[_index].mdOther = val.mdOther
}
}
},
userSelectLqr1(val) {
this.form.lqr1Id = val.id;
this.form.lqr1Mc = val.name;
@ -352,6 +365,8 @@ export default {
ckmzdw: null,
zytj: null,
mdIds: null,
mdMcs: null,
mdOther: null,
ckmz: null,
lqr1Id: null,
lqr1Mc: null,

+ 3
- 1
src/views/business/resource/gsp/comps/gsp/Gh.vue View File

@ -60,7 +60,9 @@
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.business.resource.gsp.md')">
<el-input type="text" v-model="form.md" maxlength="50" disabled />
<el-input type="text" v-if="form.mdOther != '' && form.mdMcs != ''" :value="form.mdMcs + ',' + form.mdOther"
disabled />
<el-input type="text" v-else :value="form.mdMcs + form.mdOther" disabled />
</el-form-item>
</el-col>
<el-col :span="12">

Loading…
Cancel
Save