7 changed files with 1452 additions and 5 deletions
@ -0,0 +1,53 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询工程款支付担保列表
|
||||
|
export function listGckzfdb(query) { |
||||
|
return request({ |
||||
|
url: '/system/gckzfdb/list', |
||||
|
method: 'post', |
||||
|
data: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 查询工程款支付担保详细
|
||||
|
export function getGckzfdb(id) { |
||||
|
return request({ |
||||
|
url: '/system/gckzfdb/' + id, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增工程款支付担保
|
||||
|
export function addGckzfdb(data) { |
||||
|
return request({ |
||||
|
url: '/system/gckzfdb', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改工程款支付担保
|
||||
|
export function updateGckzfdb(data) { |
||||
|
return request({ |
||||
|
url: '/system/gckzfdb', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除工程款支付担保
|
||||
|
export function delGckzfdb(id) { |
||||
|
return request({ |
||||
|
url: '/system/gckzfdb/' + id, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 导出工程款支付担保
|
||||
|
export function exportGckzfdb(query) { |
||||
|
return request({ |
||||
|
url: '/system/gckzfdb/export', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询工资保证金列表
|
||||
|
export function listGzbzj(query) { |
||||
|
return request({ |
||||
|
url: '/system/gzbzj/list', |
||||
|
method: 'post', |
||||
|
data: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 查询工资保证金详细
|
||||
|
export function getGzbzj(id) { |
||||
|
return request({ |
||||
|
url: '/system/gzbzj/' + id, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增工资保证金
|
||||
|
export function addGzbzj(data) { |
||||
|
return request({ |
||||
|
url: '/system/gzbzj', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改工资保证金
|
||||
|
export function updateGzbzj(data) { |
||||
|
return request({ |
||||
|
url: '/system/gzbzj', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除工资保证金
|
||||
|
export function delGzbzj(id) { |
||||
|
return request({ |
||||
|
url: '/system/gzbzj/' + id, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 导出工资保证金
|
||||
|
export function exportGzbzj(query) { |
||||
|
return request({ |
||||
|
url: '/system/gzbzj/export', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
@ -0,0 +1,628 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form |
||||
|
:model="queryParams" |
||||
|
ref="queryForm" |
||||
|
:inline="true" |
||||
|
v-show="showSearch" |
||||
|
> |
||||
|
<el-form-item label="单位名称" prop="enterpriseName"> |
||||
|
<el-input |
||||
|
v-model="queryParams.data.enterpriseName" |
||||
|
placeholder="请输入单位名称" |
||||
|
clearable |
||||
|
size="small" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
slot="append" |
||||
|
icon="el-icon-search" |
||||
|
size="small" |
||||
|
@click="handleQuery" |
||||
|
></el-button> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="提供方式" prop="provideWay"> |
||||
|
<el-select |
||||
|
v-model="queryParams.data.provideWay" |
||||
|
placeholder="请选择提供方式" |
||||
|
clearable |
||||
|
size="small" |
||||
|
@change="handleQuery" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="dict in provideWayOptions" |
||||
|
:key="dict.dictValue" |
||||
|
:label="dict.dictLabel" |
||||
|
:value="dict.dictValue" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item> |
||||
|
<!-- <el-button |
||||
|
type="cyan" |
||||
|
icon="el-icon-search" |
||||
|
size="mini" |
||||
|
@click="handleQuery" |
||||
|
>搜索</el-button |
||||
|
> --> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
||||
|
>重置</el-button |
||||
|
> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['system:gckzfdb:add']" |
||||
|
>新增</el-button |
||||
|
> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['system:gckzfdb:edit']" |
||||
|
>修改</el-button |
||||
|
> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['system:gckzfdb:remove']" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</el-col> |
||||
|
<!-- <el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['system:gckzfdb:export']" |
||||
|
>导出</el-button |
||||
|
> |
||||
|
</el-col> --> |
||||
|
<right-toolbar |
||||
|
:showSearch.sync="showSearch" |
||||
|
@queryTable="getList" |
||||
|
></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table |
||||
|
v-loading="loading" |
||||
|
:data="gckzfdbList" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" width="55" align="center" fixed /> |
||||
|
<el-table-column |
||||
|
label="序号" |
||||
|
type="index" |
||||
|
width="50" |
||||
|
align="center" |
||||
|
fixed |
||||
|
/> |
||||
|
|
||||
|
<el-table-column |
||||
|
label="单位名称" |
||||
|
align="center" |
||||
|
prop="enterpriseName" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="社会信用社代码" |
||||
|
align="center" |
||||
|
prop="socialCreditCode" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="担保开始日期" |
||||
|
align="center" |
||||
|
prop="guaranteeStartTime" |
||||
|
min-width="120" |
||||
|
> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ |
||||
|
parseTime(scope.row.guaranteeStartTime, "{y}-{m}-{d}") |
||||
|
}}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
label="担保结束日期" |
||||
|
align="center" |
||||
|
prop="guaranteeEndTime" |
||||
|
min-width="120" |
||||
|
> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ |
||||
|
parseTime(scope.row.guaranteeEndTime, "{y}-{m}-{d}") |
||||
|
}}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
label="是否提供" |
||||
|
align="center" |
||||
|
prop="isProvide" |
||||
|
:formatter="isProvideFormat" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="提供时间" |
||||
|
align="center" |
||||
|
prop="provideTime" |
||||
|
min-width="120" |
||||
|
> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.provideTime, "{y}-{m}-{d}") }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
label="提供额度" |
||||
|
align="center" |
||||
|
prop="provideQuota" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="提供方式" |
||||
|
align="center" |
||||
|
prop="provideWay" |
||||
|
:formatter="provideWayFormat" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="附件" |
||||
|
align="center" |
||||
|
prop="attachment" |
||||
|
min-width="120" |
||||
|
> |
||||
|
<template slot-scope="scope" v-if="scope.row.attachment"> |
||||
|
<div |
||||
|
v-for="(item, index) in JSON.parse(scope.row.attachment)" |
||||
|
:key="item + index" |
||||
|
> |
||||
|
<i class="el-icon-document"></i> |
||||
|
{{ item.name }} |
||||
|
<i |
||||
|
class="el-icon-download" |
||||
|
@click="$myDownLoadFile(item)" |
||||
|
style="cursor: pointer" |
||||
|
></i> |
||||
|
</div> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
label="操作" |
||||
|
align="center" |
||||
|
class-name="small-padding fixed-width" |
||||
|
width="180" |
||||
|
fixed="right" |
||||
|
> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['system:gckzfdb:edit']" |
||||
|
>修改</el-button |
||||
|
> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['system:gckzfdb:remove']" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total > 0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改工程款支付担保对话框 --> |
||||
|
<el-dialog |
||||
|
:title="title" |
||||
|
:visible.sync="open" |
||||
|
width="1200px" |
||||
|
append-to-body |
||||
|
:close-on-click-modal="false" |
||||
|
> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px"> |
||||
|
<el-form-item label="单位名称" prop="enterpriseName"> |
||||
|
<el-input |
||||
|
v-model="form.enterpriseName" |
||||
|
placeholder="请输入单位名称" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="社会信用社代码" prop="socialCreditCode"> |
||||
|
<el-input |
||||
|
v-model="form.socialCreditCode" |
||||
|
placeholder="请输入社会信用社代码" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="担保开始日期" prop="guaranteeStartTime"> |
||||
|
<el-date-picker |
||||
|
clearable |
||||
|
size="small" |
||||
|
style="width: 100%" |
||||
|
v-model="form.guaranteeStartTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择担保开始日期" |
||||
|
> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="担保结束日期" prop="guaranteeEndTime"> |
||||
|
<el-date-picker |
||||
|
clearable |
||||
|
size="small" |
||||
|
style="width: 100%" |
||||
|
v-model="form.guaranteeEndTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择担保结束日期" |
||||
|
> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否提供" prop="isProvide"> |
||||
|
<el-select |
||||
|
v-model="form.isProvide" |
||||
|
placeholder="是否提供" |
||||
|
style="width: 100%" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="dict in isProvideOptions" |
||||
|
:key="dict.dictValue" |
||||
|
:label="dict.dictLabel" |
||||
|
:value="dict.dictValue" |
||||
|
></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="提供时间" prop="provideTime"> |
||||
|
<el-date-picker |
||||
|
clearable |
||||
|
size="small" |
||||
|
style="width: 100%" |
||||
|
v-model="form.provideTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择提供时间" |
||||
|
> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="提供额度" prop="provideQuota"> |
||||
|
<el-input v-model="form.provideQuota" placeholder="请输入提供额度" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="提供方式" prop="provideWay"> |
||||
|
<el-select |
||||
|
v-model="form.provideWay" |
||||
|
placeholder="请选择提供方式" |
||||
|
style="width: 100%" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="dict in provideWayOptions" |
||||
|
:key="dict.dictValue" |
||||
|
:label="dict.dictLabel" |
||||
|
:value="dict.dictValue" |
||||
|
></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="附件" prop="attachment"> |
||||
|
<!-- <el-input v-model="form.attachment" placeholder="请输入附件" /> --> |
||||
|
<MyUpload :fileList="fileList" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
listGckzfdb, |
||||
|
getGckzfdb, |
||||
|
delGckzfdb, |
||||
|
addGckzfdb, |
||||
|
updateGckzfdb, |
||||
|
exportGckzfdb, |
||||
|
} from "@/api/build/gckzfdb"; |
||||
|
|
||||
|
export default { |
||||
|
name: "Gckzfdb", |
||||
|
props: ["proNo", "proCode"], |
||||
|
|
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 工程款支付担保表格数据 |
||||
|
gckzfdbList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 是否提供字典 |
||||
|
isProvideOptions: [], |
||||
|
// 提供方式字典 |
||||
|
provideWayOptions: [], |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
ids: null, |
||||
|
data: { |
||||
|
updateTime: null, |
||||
|
updateUid: null, |
||||
|
createTime: null, |
||||
|
createUid: null, |
||||
|
proNo: null, |
||||
|
projectCode: null, |
||||
|
remark: null, |
||||
|
enterpriseName: null, |
||||
|
socialCreditCode: null, |
||||
|
guaranteeStartTime: null, |
||||
|
guaranteeEndTime: null, |
||||
|
isProvide: null, |
||||
|
provideTime: null, |
||||
|
provideQuota: null, |
||||
|
provideWay: null, |
||||
|
attachment: null, |
||||
|
}, |
||||
|
// 排序方式 |
||||
|
params: { |
||||
|
// 按哪个字段排序 |
||||
|
orderBy: "create_time", |
||||
|
// desc降序,升序asc |
||||
|
sortBy: "desc", |
||||
|
}, |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: {}, |
||||
|
fileList: [], |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList(); |
||||
|
this.getDicts("whether").then((response) => { |
||||
|
this.isProvideOptions = response.data; |
||||
|
}); |
||||
|
this.getDicts("provision_mode").then((response) => { |
||||
|
this.provideWayOptions = response.data; |
||||
|
}); |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询工程款支付担保列表 */ |
||||
|
getList() { |
||||
|
this.loading = true; |
||||
|
this.queryParams.data.proNo = this.proNo; |
||||
|
this.queryParams.data.proCode = this.proCode; |
||||
|
listGckzfdb(this.queryParams).then((response) => { |
||||
|
this.gckzfdbList = response.records; |
||||
|
this.total = response.total; |
||||
|
this.loading = false; |
||||
|
}); |
||||
|
}, |
||||
|
// 是否提供字典翻译 |
||||
|
isProvideFormat(row, column) { |
||||
|
return this.selectDictLabel(this.isProvideOptions, row.isProvide); |
||||
|
}, |
||||
|
// 提供方式字典翻译 |
||||
|
provideWayFormat(row, column) { |
||||
|
return this.selectDictLabel(this.provideWayOptions, row.provideWay); |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false; |
||||
|
this.reset(); |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
id: null, |
||||
|
updateTime: null, |
||||
|
updateUid: null, |
||||
|
createTime: null, |
||||
|
createUid: null, |
||||
|
proNo: null, |
||||
|
projectCode: null, |
||||
|
remark: null, |
||||
|
enterpriseName: null, |
||||
|
socialCreditCode: null, |
||||
|
guaranteeStartTime: null, |
||||
|
guaranteeEndTime: null, |
||||
|
isProvide: null, |
||||
|
provideTime: null, |
||||
|
provideQuota: null, |
||||
|
provideWay: null, |
||||
|
attachment: null, |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
// 查询表单重置 |
||||
|
resetQueryForm() { |
||||
|
this.queryParams = { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
data: { |
||||
|
id: null, |
||||
|
updateTime: null, |
||||
|
updateUid: null, |
||||
|
createTime: null, |
||||
|
createUid: null, |
||||
|
proNo: null, |
||||
|
projectCode: null, |
||||
|
remark: null, |
||||
|
enterpriseName: null, |
||||
|
socialCreditCode: null, |
||||
|
guaranteeStartTime: null, |
||||
|
guaranteeEndTime: null, |
||||
|
isProvide: null, |
||||
|
provideTime: null, |
||||
|
provideQuota: null, |
||||
|
provideWay: null, |
||||
|
attachment: null, |
||||
|
}, |
||||
|
// 排序方式 |
||||
|
params: { |
||||
|
// 按哪个字段排序 |
||||
|
orderBy: "create_time", |
||||
|
// desc降序,升序asc |
||||
|
sortBy: "desc", |
||||
|
}, |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetQueryForm(); |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map((item) => item.id); |
||||
|
this.single = selection.length !== 1; |
||||
|
this.multiple = !selection.length; |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset(); |
||||
|
this.open = true; |
||||
|
this.title = "添加工程款支付担保"; |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset(); |
||||
|
const id = row.id || this.ids; |
||||
|
getGckzfdb(id).then((response) => { |
||||
|
this.form = response.data; |
||||
|
if (this.form.attachment) { |
||||
|
this.fileList = JSON.parse(this.form.attachment); |
||||
|
} |
||||
|
this.open = true; |
||||
|
this.title = "修改工程款支付担保"; |
||||
|
}); |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate((valid) => { |
||||
|
if (valid) { |
||||
|
if (this.fileList.length) { |
||||
|
this.form.attachment = JSON.stringify(this.fileList); |
||||
|
} |
||||
|
if (this.form.id != null) { |
||||
|
updateGckzfdb(this.form).then((response) => { |
||||
|
if (response.code === 200) { |
||||
|
this.msgSuccess("修改成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
} |
||||
|
}); |
||||
|
} else { |
||||
|
this.form.proNo = this.proNo; |
||||
|
this.form.proCode = this.proCode; |
||||
|
addGckzfdb(this.form).then((response) => { |
||||
|
if (response.code === 200) { |
||||
|
this.msgSuccess("新增成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const ids = row.id || this.ids; |
||||
|
if (ids) { |
||||
|
this.$confirm("是否删除选中的数据?", "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(function () { |
||||
|
return delGckzfdb(ids); |
||||
|
}) |
||||
|
.then(() => { |
||||
|
this.getList(); |
||||
|
this.msgSuccess("删除成功"); |
||||
|
}) |
||||
|
.catch(function () {}); |
||||
|
} else { |
||||
|
this.$message.warning("请选择要删除的数据!!"); |
||||
|
} |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
const queryParams = this.queryParams; |
||||
|
let message = "是否确认导出所有的数据项?"; |
||||
|
if (this.ids) { |
||||
|
message = "是否确认导出选中的数据项?"; |
||||
|
queryParams.ids = this.ids; |
||||
|
} |
||||
|
this.$confirm(message, "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(function () { |
||||
|
return exportGckzfdb(queryParams); |
||||
|
}) |
||||
|
.then((response) => { |
||||
|
this.downloadFile(response, true, response.msg); |
||||
|
// this.download(response.msg); |
||||
|
}) |
||||
|
.catch(function () {}); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
@import "@/assets/css/dialog.scss"; |
||||
|
//::v-deep { |
||||
|
// .el-dialog { |
||||
|
// margin-top: 10vh !important; |
||||
|
// } |
||||
|
//} |
||||
|
</style> |
@ -0,0 +1,586 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form |
||||
|
:model="queryParams" |
||||
|
ref="queryForm" |
||||
|
:inline="true" |
||||
|
v-show="showSearch" |
||||
|
> |
||||
|
<el-form-item label="专用账号" prop="dedicatedAccounts"> |
||||
|
<el-input |
||||
|
v-model="queryParams.data.dedicatedAccounts" |
||||
|
placeholder="请输入专用账号" |
||||
|
clearable |
||||
|
size="small" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
slot="append" |
||||
|
icon="el-icon-search" |
||||
|
size="small" |
||||
|
@click="handleQuery" |
||||
|
></el-button> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="账户开设时间" prop="accountsTime"> |
||||
|
<el-date-picker |
||||
|
clearable |
||||
|
size="small" |
||||
|
style="width: 200px" |
||||
|
v-model="queryParams.accountsTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择账户开设时间" |
||||
|
@change="handleQuery" |
||||
|
> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<!-- <el-button |
||||
|
type="cyan" |
||||
|
icon="el-icon-search" |
||||
|
size="mini" |
||||
|
@click="handleQuery" |
||||
|
>搜索</el-button |
||||
|
> --> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
||||
|
>重置</el-button |
||||
|
> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['system:gzbzj:add']" |
||||
|
>新增</el-button |
||||
|
> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['system:gzbzj:edit']" |
||||
|
>修改</el-button |
||||
|
> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['system:gzbzj:remove']" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</el-col> |
||||
|
<!-- <el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['system:gzbzj:export']" |
||||
|
>导出</el-button |
||||
|
> |
||||
|
</el-col> --> |
||||
|
<right-toolbar |
||||
|
:showSearch.sync="showSearch" |
||||
|
@queryTable="getList" |
||||
|
></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table |
||||
|
v-loading="loading" |
||||
|
:data="gzbzjList" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection" width="55" align="center" fixed /> |
||||
|
<el-table-column |
||||
|
label="序号" |
||||
|
type="index" |
||||
|
width="50" |
||||
|
align="center" |
||||
|
fixed |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="专用账号" |
||||
|
align="center" |
||||
|
prop="dedicatedAccounts" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="账户开设时间" |
||||
|
align="center" |
||||
|
prop="accountsTime" |
||||
|
min-width="120" |
||||
|
> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.accountsTime, "{y}-{m}-{d}") }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
label="开户行" |
||||
|
align="center" |
||||
|
prop="bank" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="当月转入专用账户金额(万元)" |
||||
|
align="center" |
||||
|
prop="monthAmountTransferred" |
||||
|
min-width="210" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="拨付金额(万元)" |
||||
|
align="center" |
||||
|
prop="transferAmount" |
||||
|
min-width="150" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="转账凭证" |
||||
|
align="center" |
||||
|
prop="proofTransfer" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="拨付时间" |
||||
|
align="center" |
||||
|
prop="transferTime" |
||||
|
min-width="120" |
||||
|
> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.transferTime, "{y}-{m}-{d}") }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column |
||||
|
label="余额(万元)" |
||||
|
align="center" |
||||
|
prop="balance" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="操作" |
||||
|
align="center" |
||||
|
class-name="small-padding fixed-width" |
||||
|
width="180" |
||||
|
fixed="right" |
||||
|
> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['system:gzbzj:edit']" |
||||
|
>修改</el-button |
||||
|
> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['system:gzbzj:remove']" |
||||
|
>删除</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total > 0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改工资保证金对话框 --> |
||||
|
<el-dialog |
||||
|
:title="title" |
||||
|
:visible.sync="open" |
||||
|
width="1200px" |
||||
|
append-to-body |
||||
|
:close-on-click-modal="false" |
||||
|
> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="180px"> |
||||
|
<el-form-item label="专用账号" prop="dedicatedAccounts"> |
||||
|
<el-input |
||||
|
v-model="form.dedicatedAccounts" |
||||
|
placeholder="请输入专用账号" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="账户开设时间" prop="accountsTime"> |
||||
|
<el-date-picker |
||||
|
clearable |
||||
|
size="small" |
||||
|
style="width: 100%" |
||||
|
v-model="form.accountsTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择账户开设时间" |
||||
|
> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="开户行" prop="bank"> |
||||
|
<el-input v-model="form.bank" placeholder="请输入开户行" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
label="当月转入专用账户金额" |
||||
|
prop="monthAmountTransferred" |
||||
|
> |
||||
|
<el-input |
||||
|
v-model="form.monthAmountTransferred" |
||||
|
placeholder="请输入当月转入专用账户金额" |
||||
|
> |
||||
|
<template slot="append">万元</template> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="拨付金额" prop="transferAmount"> |
||||
|
<el-input v-model="form.transferAmount" placeholder="请输入拨付金额"> |
||||
|
<template slot="append">万元</template> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="转账凭证" prop="proofTransfer"> |
||||
|
<el-input v-model="form.proofTransfer" placeholder="请输入转账凭证" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="拨付时间" prop="transferTime"> |
||||
|
<el-date-picker |
||||
|
clearable |
||||
|
size="small" |
||||
|
style="width: 100%" |
||||
|
v-model="form.transferTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择拨付时间" |
||||
|
> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="余额" prop="balance"> |
||||
|
<el-input v-model="form.balance" placeholder="请输入余额" readonly> |
||||
|
<template slot="append">万元</template> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
listGzbzj, |
||||
|
getGzbzj, |
||||
|
delGzbzj, |
||||
|
addGzbzj, |
||||
|
updateGzbzj, |
||||
|
exportGzbzj, |
||||
|
} from "@/api/build/gzbzj"; |
||||
|
|
||||
|
export default { |
||||
|
name: "Gzbzj", |
||||
|
props: ["proNo", "proCode"], |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 工资保证金表格数据 |
||||
|
gzbzjList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
ids: null, |
||||
|
data: { |
||||
|
updateTime: null, |
||||
|
updateUid: null, |
||||
|
createTime: null, |
||||
|
createUid: null, |
||||
|
proNo: null, |
||||
|
projectCode: null, |
||||
|
remark: null, |
||||
|
dedicatedAccounts: null, |
||||
|
accountsTime: null, |
||||
|
bank: null, |
||||
|
monthAmountTransferred: null, |
||||
|
proofTransfer: null, |
||||
|
transferTime: null, |
||||
|
transferAmount: null, |
||||
|
balance: null, |
||||
|
}, |
||||
|
// 排序方式 |
||||
|
params: { |
||||
|
// 按哪个字段排序 |
||||
|
orderBy: "create_time", |
||||
|
// desc降序,升序asc |
||||
|
sortBy: "desc", |
||||
|
}, |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
dedicatedAccounts: [ |
||||
|
{ max: 250, message: "字符长度最大为250", trigger: "blur" }, |
||||
|
], |
||||
|
bank: [{ max: 250, message: "字符长度最大为250", trigger: "blur" }], |
||||
|
monthAmountTransferred: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: "请输入当月转入专用账户金额", |
||||
|
trigger: "blur", |
||||
|
}, |
||||
|
{ |
||||
|
pattern: |
||||
|
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/, |
||||
|
message: "请输入数字,整数7位,可保留两位小数", |
||||
|
trigger: "blur", |
||||
|
}, |
||||
|
], |
||||
|
transferAmount: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: "请输入拨付金额", |
||||
|
trigger: "blur", |
||||
|
}, |
||||
|
{ |
||||
|
pattern: |
||||
|
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/, |
||||
|
message: "请输入数字,整数7位,可保留两位小数", |
||||
|
trigger: "blur", |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList(); |
||||
|
}, |
||||
|
computed: { |
||||
|
amountList() { |
||||
|
const { monthAmountTransferred, transferAmount } = this.form; |
||||
|
return { |
||||
|
monthAmountTransferred, |
||||
|
transferAmount, |
||||
|
}; |
||||
|
}, |
||||
|
}, |
||||
|
watch: { |
||||
|
amountList: function (n, o) { |
||||
|
if (this.form.monthAmountTransferred || this.form.transferAmount) { |
||||
|
this.form.balance = n.monthAmountTransferred - n.transferAmount; |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询工资保证金列表 */ |
||||
|
getList() { |
||||
|
this.loading = true; |
||||
|
this.queryParams.data.proNo = this.proNo; |
||||
|
this.queryParams.data.proCode = this.proCode; |
||||
|
listGzbzj(this.queryParams).then((response) => { |
||||
|
this.gzbzjList = response.records; |
||||
|
this.total = response.total; |
||||
|
this.loading = false; |
||||
|
}); |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false; |
||||
|
this.reset(); |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
id: null, |
||||
|
updateTime: null, |
||||
|
updateUid: null, |
||||
|
createTime: null, |
||||
|
createUid: null, |
||||
|
proNo: null, |
||||
|
projectCode: null, |
||||
|
remark: null, |
||||
|
dedicatedAccounts: null, |
||||
|
accountsTime: null, |
||||
|
bank: null, |
||||
|
monthAmountTransferred: null, |
||||
|
proofTransfer: null, |
||||
|
transferTime: null, |
||||
|
transferAmount: null, |
||||
|
balance: null, |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
// 查询表单重置 |
||||
|
resetQueryForm() { |
||||
|
this.queryParams = { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
data: { |
||||
|
id: null, |
||||
|
updateTime: null, |
||||
|
updateUid: null, |
||||
|
createTime: null, |
||||
|
createUid: null, |
||||
|
proNo: null, |
||||
|
projectCode: null, |
||||
|
remark: null, |
||||
|
dedicatedAccounts: null, |
||||
|
accountsTime: null, |
||||
|
bank: null, |
||||
|
monthAmountTransferred: null, |
||||
|
proofTransfer: null, |
||||
|
transferTime: null, |
||||
|
transferAmount: null, |
||||
|
balance: null, |
||||
|
}, |
||||
|
// 排序方式 |
||||
|
params: { |
||||
|
// 按哪个字段排序 |
||||
|
orderBy: "create_time", |
||||
|
// desc降序,升序asc |
||||
|
sortBy: "desc", |
||||
|
}, |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetQueryForm(); |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map((item) => item.id); |
||||
|
this.single = selection.length !== 1; |
||||
|
this.multiple = !selection.length; |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset(); |
||||
|
this.open = true; |
||||
|
this.title = "添加工资保证金"; |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset(); |
||||
|
const id = row.id || this.ids; |
||||
|
getGzbzj(id).then((response) => { |
||||
|
this.form = response.data; |
||||
|
this.open = true; |
||||
|
this.title = "修改工资保证金"; |
||||
|
}); |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate((valid) => { |
||||
|
if (valid) { |
||||
|
if (this.form.id != null) { |
||||
|
updateGzbzj(this.form).then((response) => { |
||||
|
if (response.code === 200) { |
||||
|
this.msgSuccess("修改成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
} |
||||
|
}); |
||||
|
} else { |
||||
|
this.form.proNo = this.proNo; |
||||
|
this.form.proCode = this.proCode; |
||||
|
addGzbzj(this.form).then((response) => { |
||||
|
if (response.code === 200) { |
||||
|
this.msgSuccess("新增成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const ids = row.id || this.ids; |
||||
|
if (ids) { |
||||
|
this.$confirm("是否删除选中的数据?", "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(function () { |
||||
|
return delGzbzj(ids); |
||||
|
}) |
||||
|
.then(() => { |
||||
|
this.getList(); |
||||
|
this.msgSuccess("删除成功"); |
||||
|
}) |
||||
|
.catch(function () {}); |
||||
|
} else { |
||||
|
this.$message.warning("请选择要删除的数据!!"); |
||||
|
} |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
const queryParams = this.queryParams; |
||||
|
let message = "是否确认导出所有的数据项?"; |
||||
|
if (this.ids) { |
||||
|
message = "是否确认导出选中的数据项?"; |
||||
|
queryParams.ids = this.ids; |
||||
|
} |
||||
|
this.$confirm(message, "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
}) |
||||
|
.then(function () { |
||||
|
return exportGzbzj(queryParams); |
||||
|
}) |
||||
|
.then((response) => { |
||||
|
this.downloadFile(response, true, response.msg); |
||||
|
// this.download(response.msg); |
||||
|
}) |
||||
|
.catch(function () {}); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
@import "@/assets/css/dialog.scss"; |
||||
|
//::v-deep { |
||||
|
// .el-dialog { |
||||
|
// margin-top: 10vh !important; |
||||
|
// } |
||||
|
//} |
||||
|
</style> |
Loading…
Reference in new issue