|
|
@@ -1,7 +1,28 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<templateTable :formList="formList" :searchData.sync="searchData" :tableConfig="tableConfig" :data="tableData"
|
|
|
- @getList="getList" :btnGroup="btnGroup" @handleSearchList="handleSearchList" :pagination="page">
|
|
|
+ @selectionChange="selectionChange"
|
|
|
+ @getList="getList" :btnGroup="btnGroup" @handleSearchList="handleSearchList" :pagination="page">
|
|
|
+ <template slot="批量结算">
|
|
|
+ <el-upload
|
|
|
+ style="display: inline-block"
|
|
|
+ action="#"
|
|
|
+ :show-file-list="false"
|
|
|
+ class="upload-demo"
|
|
|
+ :limit="1"
|
|
|
+ :auto-upload="false"
|
|
|
+ :on-change="drivingupload"
|
|
|
+ ref="upload1"
|
|
|
+ accept=".png, .jpg, .jpeg"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ :disabled="selectionList.length == 0"
|
|
|
+ >批量修改</el-button
|
|
|
+ >
|
|
|
+ </el-upload>
|
|
|
+ </template>
|
|
|
</templateTable>
|
|
|
<el-dialog title="编辑" width="60%" :visible.sync="dialogVisibleadd">
|
|
|
<templateForm ref="templateForm" :ruleForm="ruleForm" :formData="formData" :inline="false" :rules="rules"
|
|
|
@@ -22,6 +43,7 @@ export default {
|
|
|
components: { templateTable, templateForm },
|
|
|
data() {
|
|
|
return {
|
|
|
+ selectionList:[],
|
|
|
formData: {},
|
|
|
dialogVisible: false,
|
|
|
dialogVisibleadd: false,
|
|
|
@@ -42,6 +64,10 @@ export default {
|
|
|
{
|
|
|
name: '导出',
|
|
|
click: () => this.export()
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '批量结算',
|
|
|
+ slot: true,
|
|
|
}
|
|
|
],
|
|
|
formList: [
|
|
|
@@ -156,6 +182,21 @@ export default {
|
|
|
label: "渠道名称",
|
|
|
type: "text"
|
|
|
},
|
|
|
+ {
|
|
|
+ prop: "settleStatus",
|
|
|
+ label: "结算状态",
|
|
|
+ type: "statMap",
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ label: '未结算',
|
|
|
+ value: '0'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '已结算',
|
|
|
+ value: '1'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
{
|
|
|
prop: "leaderName",
|
|
|
label: "维护人员",
|
|
|
@@ -331,6 +372,7 @@ export default {
|
|
|
loading: true,
|
|
|
isPaginationShow: true,
|
|
|
operationWidth: 300,
|
|
|
+ isCheckBox: true,
|
|
|
optBtns: [
|
|
|
{
|
|
|
type: "primary",
|
|
|
@@ -339,16 +381,16 @@ export default {
|
|
|
return this.handleTableUpload(row);
|
|
|
},
|
|
|
},
|
|
|
- {
|
|
|
- type: "primary",
|
|
|
- label: "审核通过",
|
|
|
- hide: (row) => {
|
|
|
- return !row.status
|
|
|
- },
|
|
|
- click: (row, index) => {
|
|
|
- return this.handleTableAudit(row);
|
|
|
- },
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // type: "primary",
|
|
|
+ // label: "审核通过",
|
|
|
+ // hide: (row) => {
|
|
|
+ // return !row.status
|
|
|
+ // },
|
|
|
+ // click: (row, index) => {
|
|
|
+ // return this.handleTableAudit(row);
|
|
|
+ // },
|
|
|
+ // },
|
|
|
{
|
|
|
type: "primary",
|
|
|
label: "删除",
|
|
|
@@ -367,6 +409,38 @@ export default {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ selectionChange(val, ref) {
|
|
|
+ this.selectionList = val;
|
|
|
+ },
|
|
|
+ drivingupload(file, fileList) {
|
|
|
+ this.$refs.upload1.clearFiles();
|
|
|
+ const params = new FormData(); // 声明formData数据类型
|
|
|
+ params.append("multipartFile", file.raw);
|
|
|
+ params.append("type", "image");
|
|
|
+ this.$api.letter.uploadFile(params).then((res) => {
|
|
|
+ if (res.code == "200") {
|
|
|
+ this.$api.sys
|
|
|
+ .sysChannelCostSettle({
|
|
|
+ voucherNumber: res.data.id,
|
|
|
+ ids: this.selectionList.map((val) => val.id),
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg || "保存成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.getList();
|
|
|
+ this.selectionList = [];
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
jqCostsProportionFun(val) {
|
|
|
this.formData.jqJtPremium = (Number(val) * Number(this.formData.jqPremium)).toFixed(2)
|
|
|
},
|
|
|
@@ -406,6 +480,9 @@ export default {
|
|
|
this.$message.error(res.msg);
|
|
|
}
|
|
|
});
|
|
|
+ },
|
|
|
+ batch(){
|
|
|
+
|
|
|
},
|
|
|
// 查询
|
|
|
handleSearchList(data) {
|