3 changed files with 1265 additions and 210 deletions
@ -0,0 +1,741 @@ |
|||
<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.data.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="['build:gzzyzh: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="['build:gzzyzh: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="['build:gzzyzh:remove']" |
|||
>删除</el-button |
|||
> |
|||
</el-col> |
|||
<!-- <el-col :span="1.5"> |
|||
<el-button |
|||
type="warning" |
|||
icon="el-icon-download" |
|||
size="mini" |
|||
@click="handleExport" |
|||
v-hasPermi="['build:gzzyzh: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="yearMonthDate" |
|||
min-width="120" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<span>{{ parseTime(scope.row.yearMonthDate, "{y}-{m}") }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
<!-- <el-table-column |
|||
label="当月转入专用账户金额(万元)" |
|||
align="center" |
|||
prop="monthAmountTransferred" |
|||
min-width="210" |
|||
/> --> |
|||
<el-table-column |
|||
label="收入金额(万元)" |
|||
align="center" |
|||
prop="incomeAmount" |
|||
min-width="150" |
|||
/> |
|||
<el-table-column |
|||
label="收入时间" |
|||
align="center" |
|||
prop="incomeDate" |
|||
min-width="120" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<span>{{ parseTime(scope.row.incomeDate, "{y}-{m}-{d}") }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
label="支出金额(万元)" |
|||
align="center" |
|||
prop="transferAmount" |
|||
min-width="150" |
|||
/> |
|||
<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="proofTransfer" |
|||
min-width="120" |
|||
/> |
|||
|
|||
<el-table-column |
|||
label="账户余额(万元)" |
|||
align="center" |
|||
prop="balance" |
|||
min-width="150" |
|||
/> |
|||
<el-table-column |
|||
label="三方协议" |
|||
align="center" |
|||
prop="attachment" |
|||
min-width="120" |
|||
> |
|||
<template slot="header"> |
|||
三方协议 |
|||
<el-tooltip |
|||
class="item" |
|||
effect="dark" |
|||
content="施工单位、建设单位、开户银行签订资金管理三方协议" |
|||
placement="top" |
|||
> |
|||
<i class="el-icon-info"></i> |
|||
</el-tooltip> |
|||
</template> |
|||
<template slot-scope="scope"> |
|||
<div |
|||
v-for="(item, index) in JSON.parse( |
|||
scope.row.attachment ? scope.row.attachment : JSON.stringify({}) |
|||
)" |
|||
: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="['build:gzzyzh:edit']" |
|||
>修改</el-button |
|||
> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-delete" |
|||
@click="handleDelete(scope.row)" |
|||
v-hasPermi="['build:gzzyzh: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="yearMonthDate"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 100%" |
|||
v-model="form.yearMonthDate" |
|||
type="month" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择人工费拨付日期" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<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="incomeAmount"> |
|||
<el-input v-model="form.incomeAmount" placeholder="请输入收入金额"> |
|||
<template slot="append">万元</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="收入时间" prop="incomeDate"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 100%" |
|||
v-model="form.incomeDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择收入时间" |
|||
> |
|||
</el-date-picker> |
|||
</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="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="proofTransfer"> |
|||
<el-input v-model="form.proofTransfer" placeholder="请输入转账凭证" /> |
|||
</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-item prop="attachment"> |
|||
<template slot="label"> |
|||
<span>三方协议</span> |
|||
<el-tooltip |
|||
class="item" |
|||
effect="dark" |
|||
content="施工单位、建设单位、开户银行签订资金管理三方协议" |
|||
placement="top" |
|||
> |
|||
<i class="el-icon-info"></i> |
|||
</el-tooltip> |
|||
</template> |
|||
<myUpload :fileList="fileList" /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<!-- <template> |
|||
<el-popconfirm |
|||
title="保存后,不可修改,请核对好数据" |
|||
@confirm="submitForm" |
|||
> |
|||
<el-button |
|||
slot="reference" |
|||
type="primary" |
|||
style="margin-right: 10px" |
|||
>确 定</el-button |
|||
> |
|||
</el-popconfirm> |
|||
</template> --> |
|||
<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, |
|||
incomeDate: null, |
|||
incomeAmount: null, |
|||
attachment: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sortBy: "desc", |
|||
}, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: { |
|||
dedicatedAccounts: [ |
|||
{ |
|||
required: true, |
|||
message: "请输入专用账户", |
|||
trigger: "blur", |
|||
}, |
|||
{ 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", |
|||
}, |
|||
], |
|||
incomeAmount: [ |
|||
{ |
|||
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", |
|||
}, |
|||
], |
|||
}, |
|||
fileList: [], |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
computed: { |
|||
amountList() { |
|||
const { incomeAmount, transferAmount } = this.form; |
|||
return { |
|||
incomeAmount, |
|||
transferAmount, |
|||
}; |
|||
}, |
|||
}, |
|||
watch: { |
|||
amountList: function (n, o) { |
|||
if (this.form.incomeAmount || this.form.transferAmount) { |
|||
this.form.balance = n.incomeAmount - 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, |
|||
incomeDate: null, |
|||
incomeAmount: 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, |
|||
dedicatedAccounts: null, |
|||
accountsTime: null, |
|||
bank: null, |
|||
monthAmountTransferred: null, |
|||
proofTransfer: null, |
|||
transferTime: null, |
|||
transferAmount: null, |
|||
balance: null, |
|||
incomeDate: null, |
|||
incomeAmount: 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; |
|||
getGzbzj(id).then((response) => { |
|||
this.form = response.data; |
|||
if (this.form.attchment) { |
|||
this.fileList = JSON.parse(this.form.attachment); |
|||
} |
|||
this.open = true; |
|||
this.title = "修改农民工工资专用账户"; |
|||
}); |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.form.attachment = |
|||
this.fileList.length > 0 ? JSON.stringify(this.fileList) : null; |
|||
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> |
File diff suppressed because it is too large
Loading…
Reference in new issue