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) {
})
}
// 废弃批次任务
export function repealTaskBatch(batchId) {
return request({
url: '/business/taskBatch/repeal/' + batchId,
method: 'post',
})
}
// 查询发包任务-发包批次所有列表
export function listAllTaskBatch(query) {
return request({
......
......@@ -11,7 +11,11 @@
</el-form-item>
<el-form-item label="支付状态" prop="batchStatus">
<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-form-item>
<el-form-item>
......@@ -21,15 +25,6 @@
</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="['business:taskBatch:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
......@@ -107,11 +102,10 @@
size="mini" type="text" icon="el-icon-circle-close"
@click="repeal(scope.row)">订单作废</el-button>
<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>
<el-button v-if="scope.row.batchStatus && (scope.row.batchStatus === 4 || scope.row.batchStatus === 5)"
size="mini" type="text" icon="el-icon-s-promotion"
@click="doRepay(scope.row)">失败补发</el-button>
<!-- <el-button v-if="scope.row.batchStatus && (scope.row.batchStatus === 4 || scope.row.batchStatus === 5)"-->
<!-- size="mini" type="text" icon="el-icon-s-promotion"-->
<!-- @click="doRepay(scope.row)">失败补发</el-button>-->
</template>
</el-table-column>
</el-table>
......@@ -128,7 +122,7 @@
</template>
<script>
import {taskBatchTable} from "@/api/business/taskBatch";
import {repealTaskBatch, taskBatchTable} from "@/api/business/taskBatch";
import {doPay, repealOrder} from "@/api/business/payOrder";
export default {
......@@ -167,32 +161,6 @@ export default {
staffCount: 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() {
......@@ -213,19 +181,6 @@ export default {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
onlineTaskId: null,
batchName: null,
totalAmount: null,
taxMoney: null,
staffCount: null,
deptId: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
......@@ -236,16 +191,6 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
},
/** 导出按钮操作 */
handleExport() {
this.download('business/taskBatch/export', {
......@@ -254,7 +199,8 @@ export default {
},
doPay(row) {
if (row && row.payId) {
this.$confirm('确定对该任务[' + row.batchNo + ":" + row.batchName + ']进行支付操作?', '提示', {
const batchName = row.taskName + ' -- ' + row.batchName
this.$confirm('确定对该任务[' + row.batchNo + ":" + batchName + ']进行支付操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
......@@ -269,12 +215,13 @@ export default {
}
},
repeal(row) {
this.$confirm('确定废弃该任务[' + row.batchNo + ":" + row.batchPayName + ']?', '提示', {
const batchName = row.taskName + ' -- ' + row.batchName
this.$confirm('确定废弃该任务[' + row.batchNo + ":" + batchName + ']?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
repealOrder(row.payId).then(resp => {
repealTaskBatch(row.id).then(resp => {
this.$modal.msgSuccess("操作成功");
this.getList()
})
......@@ -291,7 +238,9 @@ export default {
}
},
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) {
this.$router.push({ path: "/transfer/payBatchSettlement", query: { id: row.id } });
......
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