Commit 36da0a2b authored by 谢子梦's avatar 谢子梦

Merge branch 'feat/employer' of...

Merge branch 'feat/employer' of https://codeup.aliyun.com/6784f01a4f65522d261afd5d/hr-xinruitong/hr-xinruitong-ui into feat/employer
parents 3d2a010e 6ad6ec91
...@@ -18,6 +18,14 @@ export function taskBatchTable(query) { ...@@ -18,6 +18,14 @@ export function taskBatchTable(query) {
}) })
} }
// 废弃批次任务
export function repealTaskBatch(batchId) {
return request({
url: '/business/taskBatch/repeal/' + batchId,
method: 'post',
})
}
// 查询发包任务-发包批次所有列表 // 查询发包任务-发包批次所有列表
export function listAllTaskBatch(query) { export function listAllTaskBatch(query) {
return request({ return request({
......
...@@ -11,7 +11,11 @@ ...@@ -11,7 +11,11 @@
</el-form-item> </el-form-item>
<el-form-item label="支付状态" prop="batchStatus"> <el-form-item label="支付状态" prop="batchStatus">
<el-select v-model="queryParams.batchStatus" placeholder="请选择支付状态" @change="handleQuery" clearable> <el-select v-model="queryParams.batchStatus" placeholder="请选择支付状态" @change="handleQuery" clearable>
<el-option v-for="dict in dict.type.pay_status" :key="dict.value" :label="dict.label" :value="dict.value" /> <el-option v-for="dict in dict.type.pay_status"
v-if="dict.raw.remark !== 'noSearch'"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -21,15 +25,6 @@ ...@@ -21,15 +25,6 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <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="['business:taskBatch:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
...@@ -107,11 +102,10 @@ ...@@ -107,11 +102,10 @@
size="mini" type="text" icon="el-icon-circle-close" size="mini" type="text" icon="el-icon-circle-close"
@click="repeal(scope.row)">订单作废</el-button> @click="repeal(scope.row)">订单作废</el-button>
<el-button size="mini" type="text" icon="el-icon-s-order" <el-button size="mini" type="text" icon="el-icon-s-order"
v-if="scope.row.batchStatus && (scope.row.batchStatus === 3 || scope.row.batchStatus === 4 || scope.row.batchStatus === 5)"
@click="viewDetail(scope.row)">查看明细</el-button> @click="viewDetail(scope.row)">查看明细</el-button>
<el-button v-if="scope.row.batchStatus && (scope.row.batchStatus === 4 || scope.row.batchStatus === 5)" <!-- <el-button v-if="scope.row.batchStatus && (scope.row.batchStatus === 4 || scope.row.batchStatus === 5)"-->
size="mini" type="text" icon="el-icon-s-promotion" <!-- size="mini" type="text" icon="el-icon-s-promotion"-->
@click="doRepay(scope.row)">失败补发</el-button> <!-- @click="doRepay(scope.row)">失败补发</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -128,7 +122,7 @@ ...@@ -128,7 +122,7 @@
</template> </template>
<script> <script>
import {taskBatchTable} from "@/api/business/taskBatch"; import {repealTaskBatch, taskBatchTable} from "@/api/business/taskBatch";
import {doPay, repealOrder} from "@/api/business/payOrder"; import {doPay, repealOrder} from "@/api/business/payOrder";
export default { export default {
...@@ -167,32 +161,6 @@ export default { ...@@ -167,32 +161,6 @@ export default {
staffCount: null, staffCount: null,
deptId: null, deptId: null,
}, },
// 表单参数
form: {},
// 表单校验
rules: {
id: [
{ required: true, message: "主键ID不能为空", trigger: "blur" }
],
onlineTaskId: [
{ required: true, message: "发包任务ID不能为空", trigger: "blur" }
],
batchName: [
{ required: true, message: "批次名称不能为空", trigger: "blur" }
],
totalAmount: [
{ required: true, message: "总金额不能为空", trigger: "blur" }
],
taxMoney: [
{ required: true, message: "税费不能为空", trigger: "blur" }
],
staffCount: [
{ required: true, message: "员工数量不能为空", trigger: "blur" }
],
deptId: [
{ required: true, message: "所属部门不能为空", trigger: "blur" }
],
}
}; };
}, },
created() { created() {
...@@ -213,19 +181,6 @@ export default { ...@@ -213,19 +181,6 @@ export default {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
// 表单重置
reset() {
this.form = {
id: null,
onlineTaskId: null,
batchName: null,
totalAmount: null,
taxMoney: null,
staffCount: null,
deptId: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
...@@ -236,16 +191,6 @@ export default { ...@@ -236,16 +191,6 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
},
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('business/taskBatch/export', { this.download('business/taskBatch/export', {
...@@ -254,7 +199,8 @@ export default { ...@@ -254,7 +199,8 @@ export default {
}, },
doPay(row) { doPay(row) {
if (row && row.payId) { if (row && row.payId) {
this.$confirm('确定对该任务[' + row.batchNo + ":" + row.batchName + ']进行支付操作?', '提示', { const batchName = row.taskName + ' -- ' + row.batchName
this.$confirm('确定对该任务[' + row.batchNo + ":" + batchName + ']进行支付操作?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
...@@ -269,12 +215,13 @@ export default { ...@@ -269,12 +215,13 @@ export default {
} }
}, },
repeal(row) { repeal(row) {
this.$confirm('确定废弃该任务[' + row.batchNo + ":" + row.batchPayName + ']?', '提示', { const batchName = row.taskName + ' -- ' + row.batchName
this.$confirm('确定废弃该任务[' + row.batchNo + ":" + batchName + ']?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
repealOrder(row.payId).then(resp => { repealTaskBatch(row.id).then(resp => {
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess("操作成功");
this.getList() this.getList()
}) })
...@@ -291,7 +238,9 @@ export default { ...@@ -291,7 +238,9 @@ export default {
} }
}, },
viewDetail(row) { viewDetail(row) {
this.$router.push({ path: "/business/payDetails", query: { orderId: row.payId, batchNo: row.batchNo } }); const batchName = row.taskName + ' -- ' + row.batchName
// this.$router.push({ path: "/business/payDetails", query: { orderId: row.payId, batchNo: row.batchNo } });
this.$router.push({ path: "/transfer/batchStaff", query: { batchId: row.id, batchName: batchName } });
}, },
goSettlement(row) { goSettlement(row) {
this.$router.push({ path: "/transfer/payBatchSettlement", query: { id: row.id } }); this.$router.push({ path: "/transfer/payBatchSettlement", query: { id: row.id } });
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px"> <el-page-header @back="handleClose" :content="pageHeader.pageName" />
<el-form-item label="发包任务ID" prop="onlineTaskId"> <el-descriptions title="" style="margin-top: 15px" :column="6">
<el-input <el-descriptions-item label="批次编号">{{ pageHeader.batchNo }}</el-descriptions-item>
v-model="queryParams.onlineTaskId" <el-descriptions-item label="批次状态" :span="5">
placeholder="请输入发包任务ID" <dict-tag
clearable style="margin-top: -4px"
@keyup.enter.native="handleQuery" :options="dict.type.pay_status" :value="pageHeader.batchStatus" />
/> </el-descriptions-item>
</el-form-item> </el-descriptions>
<el-form-item label="发包批次名id" prop="onlineTaskBatchId">
<el-input
v-model="queryParams.onlineTaskBatchId"
placeholder="请输入发包批次名id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="员工姓名" prop="staffName">
<el-input
v-model="queryParams.staffName"
placeholder="请输入员工姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="员工身份证号" prop="staffIdNo">
<el-input
v-model="queryParams.staffIdNo"
placeholder="请输入员工身份证号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="员工手机号码" prop="staffMobile">
<el-input
v-model="queryParams.staffMobile"
placeholder="请输入员工手机号码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="员工收款账号" prop="staffAccNo">
<el-input
v-model="queryParams.staffAccNo"
placeholder="请输入员工收款账号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="交易金额" prop="salaryAmount">
<el-input
v-model="queryParams.salaryAmount"
placeholder="请输入交易金额"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="请输入备注"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属部门" prop="deptId">
<el-input
v-model="queryParams.deptId"
placeholder="请输入所属部门"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" 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>
<h3>零工信息列表</h3>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="11">
<el-button <div style="display: flex;align-items: center;justify-content: space-between;gap: 10px;">
type="primary" <el-input v-model="queryParams.staffName" size="mini" @change="handleQuery" placeholder="输入姓名搜索" />
icon="el-icon-plus" <el-select v-model="queryParams.payStatus" placeholder="请选择支付状态" @change="handleQuery" clearable>
size="mini" <el-option v-for="dict in dict.type.pay_status"
@click="handleAdd" v-if="dict.raw.remark !== 'noSearch'"
v-hasPermi="['business:taskStaff:add']" :key="dict.value"
>新增</el-button> :label="dict.label"
</el-col> :value="dict.value" />
<el-col :span="1.5"> </el-select>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
type="success" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
icon="el-icon-edit" </div>
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['business:taskStaff: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="['business:taskStaff:remove']"
>删除</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1" :offset="12">
<el-button <div style="display: flex;align-items: center;justify-content: flex-end;gap:4px;">
type="warning" <el-button type="warning" size="mini" icon="el-icon-download" @click="handleExport">导出</el-button>
icon="el-icon-download" </div>
size="mini"
@click="handleExport"
v-hasPermi="['business:taskStaff:export']"
>导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="taskStaffList">
<el-table v-loading="loading" :data="taskStaffList" @selection-change="handleSelectionChange"> <el-table-column label="员工姓名" align="center" prop="staffName" fixed="left"/>
<el-table-column type="selection" width="55" align="center" /> <el-table-column label="身份证号" align="center" prop="staffIdNo" />
<el-table-column label="主键ID" align="center" prop="id" /> <el-table-column label="手机号码" align="center" prop="staffMobile" />
<el-table-column label="发包任务ID" align="center" prop="onlineTaskId" /> <el-table-column label="收款账号" align="center" prop="staffAccNo">
<el-table-column label="发包批次名id" align="center" prop="onlineTaskBatchId" /> <template slot-scope="scope">
<el-table-column label="员工姓名" align="center" prop="staffName" /> {{ scope.row.staffAccNo }}
<el-table-column label="员工身份证号" align="center" prop="staffIdNo" /> <dict-tag :options="dict.type.payee_acc_type" :value="scope.row.staffAccType" />
<el-table-column label="员工手机号码" align="center" prop="staffMobile" /> </template>
<el-table-column label="员工收款账号" align="center" prop="staffAccNo" /> </el-table-column>
<el-table-column label="收款账号类型:1-银行卡;2-支付宝" align="center" prop="staffAccType" />
<el-table-column label="交易金额" align="center" prop="salaryAmount" /> <el-table-column label="交易金额" align="center" prop="salaryAmount" />
<el-table-column label="结算状态" align="center" prop="payStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.pay_status" :value="scope.row.payStatus" />
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="所属部门" align="center" prop="deptId" /> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-view"
@click="handleUpdate(scope.row)" v-if="scope.row.payStatus && (3 === scope.row.payStatus || 4 === scope.row.payStatus)"
@click="viewBizDetail(scope.row)"
v-hasPermi="['business:taskStaff:edit']" v-hasPermi="['business:taskStaff:edit']"
>修改</el-button> >查看详情</el-button>
<el-button <el-button v-if="scope.row.payStatus && 3 === scope.row.payStatus"
size="mini" size="mini" type="text"
type="text" icon="el-icon-s-check"
icon="el-icon-delete" @click="voucherView(scope.row)"
@click="handleDelete(scope.row)" >查看凭证</el-button>
v-hasPermi="['business:taskStaff:remove']" <!-- <el-button v-if="pageHeader.batchNo && scope.row.batchPayNo !== pageHeader.batchNo"-->
>删除</el-button> <!-- size="mini" type="text"-->
<!-- icon="el-icon-c-scale-to-original"-->
<!-- @click="viewHistory(scope.row.id)"-->
<!-- >支付历史</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -162,52 +81,113 @@ ...@@ -162,52 +81,113 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改发包批次详情对话框 --> <el-drawer
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> title="交易详情"
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> :visible.sync="drawer"
<el-form-item label="发包任务ID" prop="onlineTaskId"> :with-header="false"
<el-input v-model="form.onlineTaskId" placeholder="请输入发包任务ID" /> size="50%">
</el-form-item> <div style="padding: 20px">
<el-form-item label="发包批次名id" prop="onlineTaskBatchId"> <el-descriptions class="margin-top" title="交易明细" :column="2" border size="medium"
<el-input v-model="form.onlineTaskBatchId" placeholder="请输入发包批次名id" /> labelClassName="descriptionsItemLabel">
</el-form-item> <el-descriptions-item label="收款人"> {{ biz.staffName }} </el-descriptions-item>
<el-form-item label="员工姓名" prop="staffName"> <el-descriptions-item label="收款账户"> {{ biz.staffAccNo }} </el-descriptions-item>
<el-input v-model="form.staffName" placeholder="请输入员工姓名" /> <el-descriptions-item label="流水编号"> {{ biz.bizPayNo }} </el-descriptions-item>
</el-form-item> <el-descriptions-item label="交易状态">
<el-form-item label="员工身份证号" prop="staffIdNo"> <dict-tag :options="dict.type.pay_status" :value="biz.payStatus" />
<el-input v-model="form.staffIdNo" placeholder="请输入员工身份证号" /> </el-descriptions-item>
</el-form-item> <el-descriptions-item label="交易金额"> {{ biz.salaryAmount }} </el-descriptions-item>
<el-form-item label="员工手机号码" prop="staffMobile"> <el-descriptions-item label="交易时间"> {{ biz.transTime }} </el-descriptions-item>
<el-input v-model="form.staffMobile" placeholder="请输入员工手机号码" /> <el-descriptions-item :span="2" label="备注"> {{ biz.remark }}</el-descriptions-item>
</el-form-item> <el-descriptions-item :span="2" label="失败原因" v-if="4 === biz.payStatus">
<el-form-item label="员工收款账号" prop="staffAccNo"> {{ biz.failReason }}
<el-input v-model="form.staffAccNo" placeholder="请输入员工收款账号" /> </el-descriptions-item>
</el-form-item> </el-descriptions>
<el-form-item label="交易金额" prop="salaryAmount"> <el-button @click="drawer = false" style="float: right; margin-top: 20px">关 闭</el-button>
<el-input v-model="form.salaryAmount" placeholder="请输入交易金额" /> </div>
</el-form-item> </el-drawer>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" /> <el-dialog title="支付历史" :visible.sync="history.panel" width="80%" append-to-body class="dialogIp">
</el-form-item> <el-table :data="history.rows">
<el-form-item label="所属部门" prop="deptId"> <el-table-column label="明细流水号" align="center" prop="bizNo" />
<el-input v-model="form.deptId" placeholder="请输入所属部门" /> <el-table-column label="支付类型" align="center" prop="payTitle" />
</el-form-item> <el-table-column label="收款账户" align="center">
</el-form> <el-table-column label="户名" align="center" prop="payeeAccName" />
<el-table-column label="账户" align="center" prop="payeeAccNo" />
<el-table-column label="类型" align="center" prop="payeeAccType" >
<template slot-scope="scope">
<el-row>
<el-col :span="12">
<dict-tag :options="dict.type.payee_acc_type" :value="scope.row.payeeAccType"/>
</el-col>
<el-col :span="12">
<el-tag v-if="scope.row.isPrivateAcc && scope.row.isPrivateAcc === 1">对私账户</el-tag>
<el-tag v-if="scope.row.isPrivateAcc && scope.row.isPrivateAcc === 2">对公账户</el-tag>
</el-col>
</el-row>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="交易金额" align="center" prop="amount" />
<el-table-column label="手续费" align="center" prop="transFee" />
<el-table-column label="支付状态" align="center" prop="payStatus" >
<template slot-scope="scope">
<dict-tag :options="dict.type.pay_status" :value="scope.row.payStatus" />
</template>
</el-table-column>
<el-table-column label="交易完成时间" align="center" prop="transactionTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.transactionTime) }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="payRemark" />
</el-table>
<div style="text-align: right; margin-top: 10px">
<el-pagination id="viewHistory"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:page-sizes="[10, 20, 30, 40]"
:page-size="history.queryParams.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="history.total">
</el-pagination>
</div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button @click="history.panel = false">关 闭</el-button>
<el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listTaskStaff, getTaskStaff, delTaskStaff, addTaskStaff, updateTaskStaff } from "@/api/business/taskStaff"; import { listTaskStaff } from "@/api/business/taskStaff";
import {getTaskBatch} from "@/api/business/taskBatch";
import {detailVoucherView, getDetailHistory} from "@/api/business/payOrder";
export default { export default {
name: "TaskStaff", name: "TaskStaff",
dicts: ['pay_status', 'pay_type_title', 'payee_acc_type'],
data() { data() {
return { return {
history: {
rows: [],
total: 0,
panel: false,
queryParams: {
pageNum: 0,
pageSize: 10,
payDetailId: 0,
}
},
biz: {
payStatus: 0
},
drawer: false,
pageHeader: {
pageName: '',
batchNo: '',
batchStatus: ''
},
// 根路径 // 根路径
baseURL: process.env.VUE_APP_BASE_API, baseURL: process.env.VUE_APP_BASE_API,
// 遮罩层 // 遮罩层
...@@ -237,56 +217,35 @@ export default { ...@@ -237,56 +217,35 @@ export default {
staffName: null, staffName: null,
staffIdNo: null, staffIdNo: null,
staffMobile: null, staffMobile: null,
staffAccNo: null, payStatus: null
staffAccType: null,
salaryAmount: null,
remark: null,
deptId: null,
}, },
// 表单参数
form: {},
// 表单校验
rules: {
id: [
{ required: true, message: "主键ID不能为空", trigger: "blur" }
],
onlineTaskId: [
{ required: true, message: "发包任务ID不能为空", trigger: "blur" }
],
onlineTaskBatchId: [
{ required: true, message: "发包批次名id不能为空", trigger: "blur" }
],
staffName: [
{ required: true, message: "员工姓名不能为空", trigger: "blur" }
],
staffIdNo: [
{ required: true, message: "员工身份证号不能为空", trigger: "blur" }
],
staffMobile: [
{ required: true, message: "员工手机号码不能为空", trigger: "blur" }
],
staffAccNo: [
{ required: true, message: "员工收款账号不能为空", trigger: "blur" }
],
staffAccType: [
{ required: true, message: "收款账号类型:1-银行卡;2-支付宝不能为空", trigger: "change" }
],
salaryAmount: [
{ required: true, message: "交易金额不能为空", trigger: "blur" }
],
remark: [
{ required: true, message: "备注不能为空", trigger: "blur" }
],
deptId: [
{ required: true, message: "所属部门不能为空", trigger: "blur" }
],
}
}; };
}, },
watch: {
$route(route) {
this.queryParams.onlineTaskBatchId = this.$route.query.batchId
this.pageHeader.pageName = this.$route.query.batchName
this.getList();
this.initPageHeader();
}
},
created() { created() {
this.queryParams.onlineTaskBatchId = this.$route.query.batchId
this.pageHeader.pageName = this.$route.query.batchName
this.getList(); this.getList();
this.initPageHeader();
}, },
methods: { methods: {
handleClose() {
const obj = { path: "/transfer/taskBatch" };
this.$tab.closeOpenPage(obj);
},
initPageHeader() {
getTaskBatch(this.queryParams.onlineTaskBatchId).then(resp => {
this.pageHeader.batchStatus = resp.data['batchStatus']
this.pageHeader.batchNo = resp.data['batchNo']
})
},
/** 查询发包批次详情列表 */ /** 查询发包批次详情列表 */
getList() { getList() {
this.loading = true; this.loading = true;
...@@ -296,28 +255,6 @@ export default { ...@@ -296,28 +255,6 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
onlineTaskId: null,
onlineTaskBatchId: null,
staffName: null,
staffIdNo: null,
staffMobile: null,
staffAccNo: null,
staffAccType: null,
salaryAmount: null,
remark: null,
deptId: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
...@@ -328,64 +265,43 @@ export default { ...@@ -328,64 +265,43 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); 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
getTaskStaff(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) {
updateTaskStaff(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addTaskStaff(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除发包批次详情编号为"' + ids + '"的数据项?').then(function() {
return delTaskStaff(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('business/taskStaff/export', { this.download('business/taskStaff/export', {
...this.queryParams ...this.queryParams
}, `taskStaff_${new Date().getTime()}.xlsx`) }, `taskStaff_${new Date().getTime()}.xlsx`)
},
viewBizDetail(row) {
this.biz = row;
this.drawer = true
},
viewHistory(detailId) {
if (detailId) {
this.history.queryParams.payDetailId = detailId
}
getDetailHistory(this.history.queryParams).then(resp => {
if (200 === resp.code) {
this.history.rows = resp.rows
this.history.total = resp.total
this.history.panel = true
} }
})
},
voucherView(row) {
this.$modal.loading("正在处理...")
detailVoucherView(row.payDetailId).then(resp => {
if (200 === resp.code) {
window.open(resp.data)
}
}).finally(() => {
this.$modal.closeLoading()
})
},
} }
}; };
</script> </script>
<style>
.descriptionsItemLabel{
width: 100px;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment