|
|
@ -9,9 +9,9 @@ |
|
|
<el-input v-model="queryParams.mc" clearable @change="handleQuery" |
|
|
<el-input v-model="queryParams.mc" clearable @change="handleQuery" |
|
|
:placeholder="$t('form.placeholderInput')" /> |
|
|
:placeholder="$t('form.placeholderInput')" /> |
|
|
</el-form-item> |
|
|
</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')" /> |
|
|
:placeholder="$t('form.placeholderInput')" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- 批号 --> |
|
|
<!-- 批号 --> |
|
|
@ -32,71 +32,19 @@ |
|
|
<el-form-item :label="$t('page.business.resource.gsp.zjzt') + ':'" prop="zjzt"> |
|
|
<el-form-item :label="$t('page.business.resource.gsp.zjzt') + ':'" prop="zjzt"> |
|
|
<el-select v-model="queryParams.zjzt" :placeholder="$t('form.placeholderSelect')" clearable |
|
|
<el-select v-model="queryParams.zjzt" :placeholder="$t('form.placeholderSelect')" clearable |
|
|
@change="handleQuery"> |
|
|
@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.dgd')" :value="7" /> |
|
|
<el-option :label="$t('page.business.resource.zjzt.gd')" :value="9" /> |
|
|
<el-option :label="$t('page.business.resource.zjzt.gd')" :value="9" /> |
|
|
<el-option :label="$t('page.business.resource.zjzt.djd')" :value="11" /> |
|
|
<el-option :label="$t('page.business.resource.zjzt.djd')" :value="11" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</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-form-item> |
|
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('form.search') }}</el-button> |
|
|
<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-button icon="el-icon-refresh" @click="resetQuery">{{ $t('form.reset') }}</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</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" |
|
|
<el-table-column :label="$t('page.business.resource.gsp.mc')" align="left" prop="mc" |
|
|
:show-overflow-tooltip="true" /> |
|
|
:show-overflow-tooltip="true" /> |
|
|
<el-table-column :label="$t('page.business.resource.gsp.bh')" align="center" prop="bh" |
|
|
<el-table-column :label="$t('page.business.resource.gsp.bh')" align="center" prop="bh" |
|
|
@ -112,9 +60,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</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.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"> |
|
|
<el-table-column :label="$t('page.business.resource.gsp.zjzt')" align="center" width="100px" fixed="right"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span v-if="scope.row.zjzt == 1">{{ $t('page.business.resource.resource.zjzt.rk') }}</span> |
|
|
<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> |
|
|
<span v-if="scope.row.jyzt == 5">{{ $t('page.business.resource.resource.jyzt.jyz') }}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</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" |
|
|
<el-table-column :label="$t('form.operate')" fixed="right" align="center" |
|
|
class-name="small-padding fixed-width" width="250px"> |
|
|
class-name="small-padding fixed-width" width="250px"> |
|
|
<template slot-scope="scope"> |
|
|
<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> |
|
|
<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> |
|
|
<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> |
|
|
<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> |
|
|
</template> |
|
|
|
|
|
<!-- 详情 --> |
|
|
|
|
|
<el-button type="text" @click="handleXq(scope.row)">{{ |
|
|
|
|
|
$t('page.business.resource.gsp.detail') }}</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
@ -197,64 +126,25 @@ |
|
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" |
|
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" |
|
|
:limit.sync="queryParams.pageSize" @pagination="getList" /> |
|
|
:limit.sync="queryParams.pageSize" @pagination="getList" /> |
|
|
</div> |
|
|
</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" /> |
|
|
<Xq v-show="showDetail" key="Xq" ref="Xq" @callback="closeXq" /> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 签名 --> |
|
|
|
|
|
<Sign ref="refSign" @callback="doSign" /> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<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 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"; |
|
|
import { deepClone } from "@/utils/index"; |
|
|
export default { |
|
|
export default { |
|
|
name: "GspList", |
|
|
name: "GspList", |
|
|
components: { Xz, Sd, Js, Gd, Xq, Jd, Bj, Shbj, Xgkc, Shxgkc, Jy, Gh, Cz, CzBatch, Ff, Ysff }, |
|
|
|
|
|
|
|
|
components: { Xq }, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
daterange: [], |
|
|
daterange: [], |
|
|
@ -283,174 +173,58 @@ export default { |
|
|
this.getList() |
|
|
this.getList() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
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>' + |
|
|
|
|
|
' '+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() { |
|
|
closeXq() { |
|
|
this.showDetail = false |
|
|
this.showDetail = false |
|
|
@ -463,43 +237,9 @@ export default { |
|
|
this.$emit('showDetail', this.showDetail) |
|
|
this.$emit('showDetail', this.showDetail) |
|
|
this.$refs.Xq.show(row) |
|
|
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() { |
|
|
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 |
|
|
this.loading = true |
|
|
list(this.queryParams).then(response => { |
|
|
list(this.queryParams).then(response => { |
|
|
this.list = response.rows |
|
|
this.list = response.rows |
|
|
@ -517,12 +257,6 @@ export default { |
|
|
this.dateRange = [] |
|
|
this.dateRange = [] |
|
|
this.resetForm("queryForm") |
|
|
this.resetForm("queryForm") |
|
|
this.handleQuery() |
|
|
this.handleQuery() |
|
|
}, |
|
|
|
|
|
//勾选回调 |
|
|
|
|
|
handleSelectionChange(selection) { |
|
|
|
|
|
this.single = selection.length !== 1 |
|
|
|
|
|
this.multiple = !selection.length |
|
|
|
|
|
this.selectList = selection |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|