|
|
@ -1,36 +1,41 @@ |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<div v-show="viewState === 1"> |
|
|
|
<div class="tab-header webtop"> |
|
|
|
<div>合格证台账</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" @click="handleCreate()">新增</el-button> |
|
|
|
<el-button type="primary" size="small" @click="handleUpdate()">修改</el-button> |
|
|
|
<el-button type="danger" size="small" @click="handleDelete()">删除</el-button> |
|
|
|
<!-- <el-button type="primary" size="small" @click="handleDaoRu()">导入</el-button> --> |
|
|
|
<el-button type="success" size="small" @click="handleDaoChu()">导出</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<button-bar view-title="合格证台账" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
|
|
|
<div class="searchcon"> |
|
|
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|
|
|
<div v-show="isSearchShow" class="search"> |
|
|
|
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
|
|
|
<el-form-item label="合格证编号"> |
|
|
|
<el-input v-model="listQuery.certificationNo" placeholder="请输入合格证编号" clearable class="filter-item"/> |
|
|
|
<el-input v-model="listQuery.params.certificationNo" placeholder="请输入合格证编号" clearable |
|
|
|
class="filter-item"/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="发证日期"> |
|
|
|
<el-date-picker v-model="listQuery.certificateDate" type="date" class="addinputw" format="yyyy-MM-dd" |
|
|
|
value-format="yyyy-MM-dd" placeholder="选择日期时间"/> |
|
|
|
<el-date-picker |
|
|
|
v-model="listQuery.params.certificateStartDate " |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
<span style="padding: 0 8px">至</span> |
|
|
|
<el-date-picker |
|
|
|
v-model="listQuery.params.certificateEndDate" |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="合格证情况"> |
|
|
|
<el-select v-model="listQuery.certificateSituation" class="addinputw" clearable placeholder="请选择合格证情况" |
|
|
|
<el-form-item label="合格证状态"> |
|
|
|
<el-select v-model="listQuery.params.certificateState" class="addinputw" clearable placeholder="请选择合格证状态" |
|
|
|
style="width: 200px;"> |
|
|
|
<el-option v-for="item in Situation" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-button type="primary" @click="handleFilter">查询</el-button> |
|
|
|
</el-form> |
|
|
|
<div class="btn" style="text-align: center;"> |
|
|
|
<el-button type="primary" @click="handleFilter">查询</el-button> |
|
|
|
<el-button type="primary" @click="handleReset">重置</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="listtop"> |
|
|
@ -53,9 +58,9 @@ |
|
|
|
<span>{{ scope.row.certificateDate }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="合格证情况" align="center"> |
|
|
|
<el-table-column label="合格证状态" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.certificateSituationValue }}</span> |
|
|
|
<span>{{ scope.row.certificateStateValue }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="到证日期" align="center"> |
|
|
@ -116,101 +121,131 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
import { |
|
|
|
pagerList, |
|
|
|
deleteBySids, |
|
|
|
basefinbankExportExcel |
|
|
|
} from '@/api/cheliang/basevehiclecertificate' |
|
|
|
import { typeValues } from '@/api/cheliang/dictcommons' |
|
|
|
// import { getFileType, parseDate, parseTime, ConvertMenuState } from "@/utils"; |
|
|
|
// import { findButtonByUserId } from '@/api/sys/permission' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import hegezhengtaizhangAdd from './hegezhengtaizhangAdd' |
|
|
|
import hegezhengInfo from './hegezhengInfo' |
|
|
|
import cheliangtaizhangInfo from '@/views/cheliang/cheliangtaizhang/cheliangtaizhangInfo' |
|
|
|
import CheliangtaizhangInfo from '@/views/cheliang/cheliangtaizhang/cheliangtaizhangInfo' |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
import { basefinbankExportExcel, deleteBySids, pagerList } from '@/api/cheliang/basevehiclecertificate' |
|
|
|
import { typeValues } from '@/api/cheliang/dictcommons' |
|
|
|
// import { getFileType, parseDate, parseTime, ConvertMenuState } from "@/utils"; |
|
|
|
// import { findButtonByUserId } from '@/api/sys/permission' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import hegezhengtaizhangAdd from './hegezhengtaizhangAdd' |
|
|
|
import hegezhengInfo from './hegezhengInfo' |
|
|
|
import CheliangtaizhangInfo from '@/views/cheliang/cheliangtaizhang/cheliangtaizhangInfo' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'Pinpaiguanli', |
|
|
|
components: { |
|
|
|
CheliangtaizhangInfo, |
|
|
|
Pagination, |
|
|
|
pageye, |
|
|
|
hegezhengtaizhangAdd, |
|
|
|
hegezhengInfo |
|
|
|
}, |
|
|
|
// directives: { |
|
|
|
// drag: { |
|
|
|
// // 指令的定义 |
|
|
|
// bind: function(el) { |
|
|
|
// const odiv = el // 获取当前元素 |
|
|
|
// el.onmousedown = (e) => { |
|
|
|
// // 算出鼠标相对元素的位置 |
|
|
|
// const disX = e.clientX - odiv.offsetLeft |
|
|
|
// const disY = e.clientY - odiv.offsetTop |
|
|
|
// let left = '' |
|
|
|
// let top = '' |
|
|
|
// document.onmousemove = (e) => { |
|
|
|
// // 用鼠标的位置减去鼠标相对元素的位置,得到元素的位置 |
|
|
|
// left = e.clientX - disX |
|
|
|
// top = e.clientY - disY |
|
|
|
// // 绑定元素位置到positionX和positionY上面 |
|
|
|
// // 移动当前元素 |
|
|
|
// odiv.style.left = left + 'px' |
|
|
|
// odiv.style.top = top + 'px' |
|
|
|
// } |
|
|
|
// document.onmouseup = (e) => { |
|
|
|
// document.onmousemove = null |
|
|
|
// document.onmouseup = null |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// // 注册一个局部的自定义指令 v-focus |
|
|
|
// focus: { |
|
|
|
// // 指令的定义 |
|
|
|
// inserted: function(el) { |
|
|
|
// // 聚焦元素 |
|
|
|
// el.querySelector('input').focus() |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
viewState: 1, |
|
|
|
isSearchShow: false, |
|
|
|
searchxianshitit: '显示查询条件', |
|
|
|
imgs: [], |
|
|
|
// --按钮菜单------- |
|
|
|
menuState: { |
|
|
|
add: false, // 添加 |
|
|
|
edit: false, // 编辑 |
|
|
|
delete: false, // 删除 |
|
|
|
view: false, // 查看 |
|
|
|
audit: false, // 审核 |
|
|
|
input: false, // 导入 |
|
|
|
output: false, // 导出 |
|
|
|
upload: false, // 同步 |
|
|
|
release: false // 下发 |
|
|
|
export default { |
|
|
|
name: 'Pinpaiguanli', |
|
|
|
components: { |
|
|
|
CheliangtaizhangInfo, |
|
|
|
Pagination, |
|
|
|
pageye, |
|
|
|
hegezhengtaizhangAdd, |
|
|
|
hegezhengInfo, |
|
|
|
ButtonBar |
|
|
|
}, |
|
|
|
// directives: { |
|
|
|
// drag: { |
|
|
|
// // 指令的定义 |
|
|
|
// bind: function(el) { |
|
|
|
// const odiv = el // 获取当前元素 |
|
|
|
// el.onmousedown = (e) => { |
|
|
|
// // 算出鼠标相对元素的位置 |
|
|
|
// const disX = e.clientX - odiv.offsetLeft |
|
|
|
// const disY = e.clientY - odiv.offsetTop |
|
|
|
// let left = '' |
|
|
|
// let top = '' |
|
|
|
// document.onmousemove = (e) => { |
|
|
|
// // 用鼠标的位置减去鼠标相对元素的位置,得到元素的位置 |
|
|
|
// left = e.clientX - disX |
|
|
|
// top = e.clientY - disY |
|
|
|
// // 绑定元素位置到positionX和positionY上面 |
|
|
|
// // 移动当前元素 |
|
|
|
// odiv.style.left = left + 'px' |
|
|
|
// odiv.style.top = top + 'px' |
|
|
|
// } |
|
|
|
// document.onmouseup = (e) => { |
|
|
|
// document.onmousemove = null |
|
|
|
// document.onmouseup = null |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// // 注册一个局部的自定义指令 v-focus |
|
|
|
// focus: { |
|
|
|
// // 指令的定义 |
|
|
|
// inserted: function(el) { |
|
|
|
// // 聚焦元素 |
|
|
|
// el.querySelector('input').focus() |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
viewState: 1, |
|
|
|
isSearchShow: false, |
|
|
|
searchxianshitit: '显示查询条件', |
|
|
|
imgs: [], |
|
|
|
// --按钮菜单------- |
|
|
|
btndisabled: false, |
|
|
|
btnList: [ |
|
|
|
{ |
|
|
|
type: 'primary', |
|
|
|
size: 'small', |
|
|
|
icon: 'el-icon-plus', |
|
|
|
btnKey: 'toAdd', |
|
|
|
btnLabel: '新增' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'primary', |
|
|
|
size: 'small', |
|
|
|
icon: 'el-icon-edit', |
|
|
|
btnKey: 'toEdit', |
|
|
|
btnLabel: '编辑' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'danger', |
|
|
|
size: 'small', |
|
|
|
icon: 'el-icon-delete', |
|
|
|
btnKey: 'doDel', |
|
|
|
btnLabel: '删除' |
|
|
|
}, |
|
|
|
// 查询 ----------- |
|
|
|
tableKey: 0, |
|
|
|
// list: null, |
|
|
|
list: [], |
|
|
|
sids: [], |
|
|
|
total: 1, |
|
|
|
FormLoading: false, |
|
|
|
listLoading: false, |
|
|
|
listQuery: { |
|
|
|
certificationNo: '', |
|
|
|
certificateDateL: '', |
|
|
|
certificateSituation: '', |
|
|
|
current: 1, |
|
|
|
size: 20 |
|
|
|
{ |
|
|
|
type: 'success', |
|
|
|
size: 'small', |
|
|
|
icon: '', |
|
|
|
btnKey: 'doExport', |
|
|
|
btnLabel: '导出' |
|
|
|
} |
|
|
|
], |
|
|
|
menuState: { |
|
|
|
add: false, // 添加 |
|
|
|
edit: false, // 编辑 |
|
|
|
delete: false, // 删除 |
|
|
|
view: false, // 查看 |
|
|
|
audit: false, // 审核 |
|
|
|
input: false, // 导入 |
|
|
|
output: false, // 导出 |
|
|
|
upload: false, // 同步 |
|
|
|
release: false // 下发 |
|
|
|
}, |
|
|
|
// 查询 ----------- |
|
|
|
tableKey: 0, |
|
|
|
// list: null, |
|
|
|
list: [], |
|
|
|
sids: [], |
|
|
|
total: 1, |
|
|
|
FormLoading: false, |
|
|
|
listLoading: false, |
|
|
|
listQuery: { |
|
|
|
params: { |
|
|
|
certificateStartDate: '', |
|
|
|
certificateEndDate: '', |
|
|
|
certificateState: '', |
|
|
|
certificationNo: '' |
|
|
|
}, |
|
|
|
certificateSituation: 'certificateSituation', |
|
|
|
current: 1, |
|
|
|
size: 20 |
|
|
|
}, |
|
|
|
Situation: [], |
|
|
|
selectDate: undefined, |
|
|
|
temp: {}, // 添加和修改 |
|
|
@ -242,76 +277,90 @@ |
|
|
|
} |
|
|
|
// ------------------------------------ |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapGetters([ |
|
|
|
'id', |
|
|
|
'roles', |
|
|
|
'rolesIds', |
|
|
|
'departmentId', |
|
|
|
'departmentCode' |
|
|
|
]) |
|
|
|
}, |
|
|
|
created() { |
|
|
|
// 初始化变量 |
|
|
|
this.init() |
|
|
|
// 加载列表 |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$refs['btnbar'].setButtonList(this.btnList) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 搜索条件效果 |
|
|
|
clicksearchShow() { |
|
|
|
this.isSearchShow = !this.isSearchShow |
|
|
|
if (this.isSearchShow) { |
|
|
|
this.searchxianshitit = '隐藏查询条件' |
|
|
|
} else { |
|
|
|
this.searchxianshitit = '显示查询条件' |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapGetters([ |
|
|
|
'id', |
|
|
|
'roles', |
|
|
|
'rolesIds', |
|
|
|
'departmentId', |
|
|
|
'departmentCode' |
|
|
|
]) |
|
|
|
init() { |
|
|
|
// 根据当前用户. 加载当前页面的按钮权限 |
|
|
|
// findButtonByUserId(this.$route.path).then(response => { |
|
|
|
// if ( |
|
|
|
// response.code === 20000 && |
|
|
|
// response.data && |
|
|
|
// response.data.length > 0 |
|
|
|
// ) { |
|
|
|
// this.menuState = ConvertMenuState(response.data) // 处理各按钮显示状态 |
|
|
|
// } |
|
|
|
// }) |
|
|
|
this.setDate() |
|
|
|
}, |
|
|
|
created() { |
|
|
|
// 初始化变量 |
|
|
|
this.init() |
|
|
|
// 加载列表 |
|
|
|
this.getList() |
|
|
|
btnHandle(btnKey) { |
|
|
|
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
|
|
|
switch (btnKey) { |
|
|
|
case 'toAdd': |
|
|
|
this.toAdd() |
|
|
|
break |
|
|
|
case 'toEdit': |
|
|
|
this.toEdit() |
|
|
|
break |
|
|
|
case 'doDel': |
|
|
|
this.doDel() |
|
|
|
break |
|
|
|
case 'doExport': |
|
|
|
this.doExport() |
|
|
|
break |
|
|
|
default: |
|
|
|
break |
|
|
|
} |
|
|
|
}, |
|
|
|
// 序号 |
|
|
|
indexMethod(index) { |
|
|
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|
|
|
var pageindex = index + 1 + pagestart |
|
|
|
return pageindex |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 搜索条件效果 |
|
|
|
clicksearchShow() { |
|
|
|
this.isSearchShow = !this.isSearchShow |
|
|
|
if (this.isSearchShow) { |
|
|
|
this.searchxianshitit = '隐藏查询条件' |
|
|
|
} else { |
|
|
|
this.searchxianshitit = '显示查询条件' |
|
|
|
resetState() { |
|
|
|
this.viewState = 1 |
|
|
|
}, |
|
|
|
setDate() { |
|
|
|
typeValues({ |
|
|
|
type: 'certificateState' |
|
|
|
}).then((res) => { |
|
|
|
console.log(res) |
|
|
|
if (res.code === '200') { |
|
|
|
this.Situation = res.data |
|
|
|
} |
|
|
|
}, |
|
|
|
init() { |
|
|
|
// 根据当前用户. 加载当前页面的按钮权限 |
|
|
|
// findButtonByUserId(this.$route.path).then(response => { |
|
|
|
// if ( |
|
|
|
// response.code === 20000 && |
|
|
|
// response.data && |
|
|
|
// response.data.length > 0 |
|
|
|
// ) { |
|
|
|
// this.menuState = ConvertMenuState(response.data) // 处理各按钮显示状态 |
|
|
|
// } |
|
|
|
// }) |
|
|
|
this.setDate() |
|
|
|
}, |
|
|
|
// 序号 |
|
|
|
indexMethod(index) { |
|
|
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|
|
|
var pageindex = index + 1 + pagestart |
|
|
|
return pageindex |
|
|
|
}, |
|
|
|
resetState() { |
|
|
|
this.viewState = 1 |
|
|
|
}, |
|
|
|
setDate() { |
|
|
|
typeValues({ |
|
|
|
type: this.certificateSituation |
|
|
|
}).then((res) => { |
|
|
|
console.log(res) |
|
|
|
if (res.code === '200') { |
|
|
|
this.Situation = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 查询列表信息 |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 查询列表信息 |
|
|
|
getList() { |
|
|
|
this.listLoading = true |
|
|
|
pagerList({ |
|
|
|
current: this.listQuery.current, |
|
|
|
size: this.listQuery.size, |
|
|
|
params: { |
|
|
|
certificationNo: this.listQuery.certificationNo, |
|
|
|
certificateDateL: this.listQuery.certificateDateL, |
|
|
|
certificateSituation: this.listQuery.certificateSituation |
|
|
|
} |
|
|
|
}).then((response) => { |
|
|
|
pagerList(this.listQuery).then((response) => { |
|
|
|
console.log('列表查询结果:', response) |
|
|
|
this.listLoading = false |
|
|
|
if ( |
|
|
@ -327,74 +376,87 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 查询按钮 |
|
|
|
handleFilter() { |
|
|
|
this.listQuery.current = 1 |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
|
|
|
|
// ----------------------------------方法-------------------- |
|
|
|
// 添加前数据初始化 |
|
|
|
resetTemp() { |
|
|
|
this.temp = { |
|
|
|
jc: '', // false string |
|
|
|
organizationId: '', // false string |
|
|
|
qc: '', // false string |
|
|
|
remark: '', // false |
|
|
|
string: '', // |
|
|
|
state: '' // 状态 |
|
|
|
} |
|
|
|
}, |
|
|
|
handleSelectionChange(row) { |
|
|
|
const aa = [] |
|
|
|
row.forEach((element) => { |
|
|
|
aa.push(element.sid) |
|
|
|
}) |
|
|
|
this.sids = aa |
|
|
|
}, |
|
|
|
// 打开添加 |
|
|
|
handleCreate() { |
|
|
|
this.viewState = 2 |
|
|
|
// this.dialogStatus = 'add' |
|
|
|
this.$refs['divadd'].showAdd() |
|
|
|
// this.$router.push({ |
|
|
|
// path: '/cheliang/hegezhengtaizhangAdd/0' |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 打开 |
|
|
|
cheLiangXiangXi(row) { |
|
|
|
console.log('0222221133', row) |
|
|
|
this.viewState = 5 |
|
|
|
this.$refs['chelianginfo'].showInfo(row.vehicleSid) |
|
|
|
// 查询按钮 |
|
|
|
handleFilter() { |
|
|
|
this.listQuery.current = 1 |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
// 重置 |
|
|
|
handleReset() { |
|
|
|
this.listQuery = { |
|
|
|
params: { |
|
|
|
certificateStartDate: '', |
|
|
|
certificateEndDate: '', |
|
|
|
certificateState: '', |
|
|
|
certificationNo: '' |
|
|
|
}, |
|
|
|
current: 1, |
|
|
|
size: 20 |
|
|
|
} |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
// ----------------------------------方法-------------------- |
|
|
|
// 添加前数据初始化 |
|
|
|
resetTemp() { |
|
|
|
this.temp = { |
|
|
|
jc: '', // false string |
|
|
|
organizationId: '', // false string |
|
|
|
qc: '', // false string |
|
|
|
remark: '', // false |
|
|
|
string: '', // |
|
|
|
state: '' // 状态 |
|
|
|
} |
|
|
|
}, |
|
|
|
handleSelectionChange(row) { |
|
|
|
const aa = [] |
|
|
|
row.forEach((element) => { |
|
|
|
aa.push(element.sid) |
|
|
|
}) |
|
|
|
this.sids = aa |
|
|
|
}, |
|
|
|
// 打开添加 |
|
|
|
toAdd() { |
|
|
|
this.viewState = 2 |
|
|
|
// this.dialogStatus = 'add' |
|
|
|
this.$refs['divadd'].showAdd() |
|
|
|
// this.$router.push({ |
|
|
|
// path: '/cheliang/hegezhengtaizhangAdd/0' |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 打开 |
|
|
|
cheLiangXiangXi(row) { |
|
|
|
console.log('0222221133', row) |
|
|
|
this.viewState = 5 |
|
|
|
this.$refs['chelianginfo'].showInfo(row.vehicleSid) |
|
|
|
// this.$router.push({ |
|
|
|
// path: '/cheliang/cheliangtaizhangInfo', |
|
|
|
// query: { |
|
|
|
// sid: row.vehicleSid |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 打开修改 |
|
|
|
toEdit() { |
|
|
|
if (this.sids.length === 1) { |
|
|
|
this.dialogStatus = 'update' |
|
|
|
this.viewState = 3 |
|
|
|
const sid = this.sids[0] |
|
|
|
const row = this.row |
|
|
|
this.$refs['divadd'].showEdit(sid, row) |
|
|
|
// this.$router.push({ |
|
|
|
// path: '/cheliang/cheliangtaizhangInfo', |
|
|
|
// query: { |
|
|
|
// sid: row.vehicleSid |
|
|
|
// } |
|
|
|
// path: `/cheliang/hegezhengtaizhangAdd/${this.sids[0]}` |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 打开修改 |
|
|
|
handleUpdate() { |
|
|
|
if (this.sids.length === 1) { |
|
|
|
this.dialogStatus = 'update' |
|
|
|
this.viewState = 3 |
|
|
|
const sid = this.sids[0] |
|
|
|
const row = this.row |
|
|
|
this.$refs['divadd'].showEdit(sid,row) |
|
|
|
// this.$router.push({ |
|
|
|
// path: `/cheliang/hegezhengtaizhangAdd/${this.sids[0]}` |
|
|
|
// }) |
|
|
|
} else if (this.sids.length > 1) { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '不能选中多个合格证台账修改!!', |
|
|
|
type: 'info', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '没有选择合格证台账!!', |
|
|
|
} else if (this.sids.length > 1) { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '不能选中多个合格证台账修改!!', |
|
|
|
type: 'info', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '没有选择合格证台账!!', |
|
|
|
type: 'error', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
@ -414,60 +476,70 @@ |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 根据本行ID删除数据 |
|
|
|
handleDelete() { |
|
|
|
if (this.sids.length > 0) { |
|
|
|
deleteBySids(this.sids).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '删除成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
// 根据本行ID删除数据 |
|
|
|
doDel() { |
|
|
|
const _this = this |
|
|
|
if (this.sids.length > 0) { |
|
|
|
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|
|
|
this.$confirm(tip, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
const loading = this.$loading({ |
|
|
|
lock: true, |
|
|
|
text: 'Loading', |
|
|
|
spinner: 'el-icon-loading', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
deleteBySids(this.sids) |
|
|
|
.then(resp => { |
|
|
|
loading.close() |
|
|
|
_this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|
|
|
_this.getList() |
|
|
|
}) |
|
|
|
this.getList() |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '失败', |
|
|
|
message: response.msg, |
|
|
|
type: 'error' |
|
|
|
.catch(e => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '没有选择合格证台账!!', |
|
|
|
type: 'error', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
}, |
|
|
|
// 导出 |
|
|
|
handleDaoChu() { |
|
|
|
basefinbankExportExcel(this.sids).then((res) => { |
|
|
|
const blob = new Blob([res], { |
|
|
|
type: 'application/vnd.ms-excel' |
|
|
|
}) |
|
|
|
const objectUrl = URL.createObjectURL(blob) |
|
|
|
window.location.href = objectUrl |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '导出成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
.catch(() => { |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '没有选择合格证台账!!', |
|
|
|
type: 'error', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleLock(row) { |
|
|
|
console.log('789789789', row) |
|
|
|
this.imgs = row.certificatePhoto |
|
|
|
console.log(this.imgs, 'wowoeieiurir') |
|
|
|
this.dialogFormVisible = true |
|
|
|
this.dialogTitle = '查看' |
|
|
|
return |
|
|
|
} |
|
|
|
}, |
|
|
|
// 导出 |
|
|
|
doExport() { |
|
|
|
basefinbankExportExcel(this.sids).then((res) => { |
|
|
|
const blob = new Blob([res], { |
|
|
|
type: 'application/vnd.ms-excel' |
|
|
|
}) |
|
|
|
const objectUrl = URL.createObjectURL(blob) |
|
|
|
window.location.href = objectUrl |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '导出成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleLock(row) { |
|
|
|
console.log('789789789', row) |
|
|
|
this.imgs = row.certificatePhoto |
|
|
|
console.log(this.imgs, 'wowoeieiurir') |
|
|
|
this.dialogFormVisible = true |
|
|
|
this.dialogTitle = '查看' |
|
|
|
// this.$refs.editform.initForm(row) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
@ -493,4 +565,19 @@ |
|
|
|
.searchli { |
|
|
|
padding: 5px 100px; |
|
|
|
} |
|
|
|
|
|
|
|
.btn { |
|
|
|
padding: 15px 0 15px 0; |
|
|
|
border: 1px solid #e0e3eb; |
|
|
|
} |
|
|
|
|
|
|
|
.tab-header { |
|
|
|
background-color: #edf1f7; |
|
|
|
padding: 8px 20px; |
|
|
|
margin-bottom: 0 !important; |
|
|
|
} |
|
|
|
|
|
|
|
.tab-header /deep/ .el-form-item { |
|
|
|
margin-bottom: 10px; |
|
|
|
} |
|
|
|
</style> |
|
|
|