3
0
Fork 0

feat(business): 办理业务添加分公司是所属省份

This commit is contained in:
woody 2025-06-23 13:27:35 +08:00
parent c83cb955d2
commit a1ea001b62
4 changed files with 357 additions and 351 deletions

View File

@ -248,3 +248,9 @@ export function approvalStatus(params) {
})
}
export function getCompanyAreaList() {
return request({
url: '/system/api/area/get-area-by-parentId?parentId=0',
method: 'get'
})
}

View File

@ -2,51 +2,51 @@
<div class="page1">
<topBar
v-if="topList.length > 0"
:topList="topList"
:top-list="topList"
:moren="moren"
></topBar>
/>
<div class="thetopbox">
<el-form ref="form" :model="queryParams" label-width="100px">
<el-row>
<el-col :span="4">
<el-form-item :label="'会员编号'" prop="memberCode">
<el-input clearable v-model="queryParams.memberCode"></el-input>
<el-input v-model="queryParams.memberCode" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="'会员姓名'" prop="name">
<el-input clearable v-model="queryParams.memberName"></el-input>
<el-input v-model="queryParams.memberName" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="'结算等级'" prop="pkRegisterGrade">
<el-select
v-model="queryParams.pkRegisterGrade"
clearable
:placeholder="'请选择'"
v-model="queryParams.pkRegisterGrade"
>
<el-option
v-for="item in gradeRangList"
:key="item.pkId"
:label="item.gradeName"
:value="item.pkId"
></el-option>
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="'真实奖衔'" prop="pkAwards">
<el-select
v-model="queryParams.pkAwards"
clearable
:placeholder="'请选择'"
v-model="queryParams.pkAwards"
>
<el-option
v-for="item in awardsList"
:key="item.pkId"
:label="item.awardsName"
:value="item.pkId"
></el-option>
/>
</el-select>
<!-- <el-input clearable v-model="queryParams.pkAwards"></el-input> -->
</el-form-item>
@ -54,32 +54,32 @@
<el-col :span="4">
<el-form-item :label="'隶属体系'" prop="vertexId">
<el-select
v-model="queryParams.vertexId"
clearable
:placeholder="'请选择'"
v-model="queryParams.vertexId"
>
<el-option
v-for="item in vertexList"
:key="item.pkId"
:label="item.vertexName"
:value="item.pkId"
></el-option>
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="'隶属团队'" prop="teamId">
<el-select
v-model="queryParams.teamId"
clearable
:placeholder="'请选择'"
v-model="queryParams.teamId"
>
<el-option
v-for="item in memberTeamList"
:key="item.pkId"
:label="item.teamName"
:value="item.pkId"
></el-option>
/>
</el-select>
</el-form-item>
</el-col>
@ -87,43 +87,42 @@
<el-row>
<el-col :span="4">
<el-form-item :label="'变更次数'" prop="code">
<el-input clearable v-model="queryParams.editNumber"></el-input>
<el-input v-model="queryParams.editNumber" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="'联系方式'" prop="code">
<el-input clearable v-model="queryParams.phone"></el-input>
<el-input v-model="queryParams.phone" clearable />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="'服务中心编号'" prop="centerMemberCode">
<el-input
clearable
v-model="queryParams.centerMemberCode"
></el-input>
clearable
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :label="'服务中心姓名'" prop="centerMemberName">
<el-input
clearable
v-model="queryParams.centerMemberName"
></el-input>
clearable
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="'创建日期'" prop="code">
<el-date-picker
v-model="queryParams.time1"
@change="changeTime1"
type="datetimerange"
range-separator="——"
:start-placeholder="'开始日期'"
:end-placeholder="'结束日期'"
value-format="yyyy-MM-dd HH:mm:ss"
:unlink-panels="true"
>
</el-date-picker>
@change="changeTime1"
/>
</el-form-item>
</el-col>
</el-row>
@ -133,7 +132,6 @@
<el-col :span="8">
<el-form-item :label="'支付日期'" prop="code">
<el-date-picker
@change="changeTime2"
v-model="queryParams.time2"
type="datetimerange"
range-separator="——"
@ -141,8 +139,8 @@
:end-placeholder="'结束日期'"
value-format="yyyy-MM-dd HH:mm:ss"
:unlink-panels="true"
>
</el-date-picker>
@change="changeTime2"
/>
</el-form-item>
</el-col>
</el-row>
@ -152,15 +150,14 @@
<el-col :span="4">
<div class="searchbox">
<el-button class="searchbtn" @click="getBusinessList">
{{ '搜索' }}</el-button
>
{{ '搜索' }}</el-button>
<el-button @click="reChongzhi"> {{ '重置' }}</el-button>
</div>
</el-col>
<div class="openClose" @click="changeActive">
<i
:class="isActive ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
></i>
/>
<div>{{ isActive ? '点击收起' : '点击展开' }}</div>
</div>
</el-row>
@ -169,16 +166,14 @@
<div class="maintop">
<div class="mainbtn">
<el-button
size="small"
@click="handleImport"
class="thebtn1"
v-hasButtons="['BasicBusinessImport']"
size="small"
class="thebtn1"
@click="handleImport"
>
{{ '导入' }}</el-button
>
{{ '导入' }}</el-button>
<el-button size="small" class="thebtn2" @click="importTemplate">
{{ '下载模板' }}</el-button
>
{{ '下载模板' }}</el-button>
</div>
</div>
<div class="main">
@ -191,20 +186,19 @@
:row-class-name="tableRowClassName"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column type="selection" width="55" />
<el-table-column
align="center"
prop="memberCode"
:label="'会员编号'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="newMemberName"
:label="'变更会员姓名'"
>
<template slot-scope="scope">
<el-input v-model="scope.row.newMemberName"></el-input>
<el-input v-model="scope.row.newMemberName" />
</template>
</el-table-column>
<el-table-column
@ -214,115 +208,107 @@
:label="'变更联系方式'"
>
<template slot-scope="scope">
<el-input clearable v-model="scope.row.newPhone"></el-input>
<el-input v-model="scope.row.newPhone" clearable />
</template>
</el-table-column>
<el-table-column
min-width="130px"
min-width="210px"
align="center"
prop="endValidityDate"
:label="$t('奖衔有效期')"
prop="areaId"
label="分公司所属省份"
>
<template slot-scope="scope">
<el-date-picker
v-model="scope.row.endValidityDate"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
clearable
<!-- 155 -->
<el-select
v-model="scope.row.areaId"
placeholder="请选择分公司所属省份"
style="width: 200px;"
:disabled="!areaIdCanSelect"
>
</el-date-picker>
<el-option
v-for="area in areaList"
:key="area.pkId"
:label="area.name"
:value="area.pkId"
/>
</el-select>
</template>
</el-table-column>
<el-table-column
align="center"
prop="memberName"
:label="'会员姓名'"
>
</el-table-column>
<el-table-column align="center" prop="phone" :label="'联系方式'">
</el-table-column>
/>
<el-table-column align="center" prop="phone" :label="'联系方式'" />
<el-table-column
align="center"
prop="pkRegisterGradeVal"
:label="'结算等级'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="pkAwardsVal"
:label="'真实奖衔'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="vertexName"
:label="'隶属体系'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="teamName"
:label="'隶属团队'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="centerMemberCode"
:label="'服务中心编号'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="centerMemberName"
:label="'服务中心姓名'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="creationTime"
:label="'创建日期'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="payTime"
:label="'支付日期'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="editNumber"
:label="'变更次数'"
>
</el-table-column>
/>
</el-table>
</div>
</div>
<div class="main">
<div
class="main_content"
v-for="(item, index) in handleBusinessList"
:key="index"
class="main_content"
>
<el-form ref="form" :model="form" label-width="130px">
<!-- <el-checkbox-group v-model="item.wowList">
<el-checkbox> -->
<el-form-item :label="item.editTypeName">
<!-- 单选 -->
<el-form ref="form" style="width: 100%;" :model="form" label-width="130px">
<el-form-item :label="item.editTypeName">
<el-checkbox-group
v-if="item.buttonType == 1"
:max="1"
v-model="item.businessValueList"
:max="1"
>
<el-checkbox
v-for="aitem in item.enumEntityList"
:key="aitem.value"
:label="aitem.value"
>{{ aitem.label }}</el-checkbox
>
>{{ aitem.label }}</el-checkbox>
</el-checkbox-group>
<!-- 多选 -->
@ -334,23 +320,20 @@
v-for="aitem in item.enumEntityList"
:key="aitem.value"
:label="aitem.value"
>{{ aitem.label }}</el-checkbox
>
>{{ aitem.label }}</el-checkbox>
</el-checkbox-group>
<!-- 输入框 -->
<el-input
v-if="item.buttonType == 3"
v-model="item.businessValueList[0]"
type="number"
style="width: 150px"
v-model="item.businessValueList[0]"
>
<i slot="suffix">%</i>
</el-input>
</el-form-item>
<!-- </el-checkbox>
</el-checkbox-group> -->
</el-form>
</div>
</div>
@ -358,13 +341,12 @@
<div style="margin: 0 auto">
<el-button class="thebtn"> {{ '取消' }}</el-button>
<el-button
v-hasButtons="['BasicBusinessConfirm']"
type="primary"
class="thebtn"
@click="saveDate"
v-hasButtons="['BasicBusinessConfirm']"
>
{{ '确认' }}</el-button
>
{{ '确认' }}</el-button>
</div>
</div>
<el-dialog
@ -386,24 +368,20 @@
align="center"
prop="memberCode"
:label="'会员编号'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="errorMsg"
:label="'报错信息'"
>
</el-table-column>
/>
</el-table>
</div>
<div class="footer" style="text-align: center">
<div style="margin: 0 auto">
<el-button class="thebtn" @click="errorShow = false">
{{ '取消' }}</el-button
>
{{ '取消' }}</el-button>
<el-button type="primary" class="thebtn" @click="errorShow = false">
{{ '确认' }}</el-button
>
{{ '确认' }}</el-button>
</div>
</div>
</el-dialog>
@ -428,17 +406,16 @@
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<i class="el-icon-upload" />
<div class="el-upload__text">
{{ '将文件拖到此处,或' }}
<em>{{ '点击上传' }}</em>
</div>
<div class="el-upload__tip" slot="tip">
<div slot="tip" class="el-upload__tip">
<el-link type="info" style="font-size: 12px" @click="importTemplate">
{{ '下载模板' }}</el-link
>
{{ '下载模板' }}</el-link>
</div>
<div class="el-upload__tip" style="color: red" slot="tip">
<div slot="tip" class="el-upload__tip" style="color: red">
{{ '提示仅允许导入“xls”或“xlsx”格式文件' }}
</div>
</el-upload>
@ -455,35 +432,36 @@
</template>
<script>
import topBar from "@/components/topBar/checked";
import { getToken } from "@/utils/auth";
import { getRouters } from "@/api/settle";
import topBar from '@/components/topBar/checked'
import { getToken } from '@/utils/auth'
import { getRouters } from '@/api/settle'
import {
getHandleBusinessEnum,
getBusinessList,
businessCheck,
} from "@/api/business";
import { getAwardsListChiose, getgradeRanglist } from "@/api/level";
import { getvertexValue, getmemberTeamList } from "@/api/financialCase";
getCompanyAreaList
} from '@/api/business'
import { getAwardsListChiose, getgradeRanglist } from '@/api/level'
import { getvertexValue, getmemberTeamList } from '@/api/financialCase'
export default {
name: "Jcyw",
name: 'Jcyw',
components: {
topBar,
topBar
},
data() {
return {
moren: "jcyw",
moren: 'jcyw',
topList: [
{
name: '基础业务',
path: "jcyw",
url: "BasicBusiness",
path: 'jcyw',
url: 'BasicBusiness'
},
{
name: '订单业务',
path: "ddyw",
url: "OrderBusiness",
},
path: 'ddyw',
url: 'OrderBusiness'
}
// {
// name: "",
// path: "shyw",
@ -496,26 +474,28 @@ export default {
multipleSelection: [],
wowList: [],
queryParams: {
memberCode: "",
memberName: "",
pkAwards: "",
vertexId: "",
teamId: "",
editNumber: "",
phone: "",
centerMemberCode: "",
centerMemberName: "",
startDate: "",
endDate: "",
startDatePay: "",
endDatePay: "",
memberCode: '',
memberName: '',
pkAwards: '',
vertexId: '',
teamId: '',
editNumber: '',
phone: '',
centerMemberCode: '',
centerMemberName: '',
startDate: '',
endDate: '',
startDatePay: '',
endDatePay: '',
time1: [],
time2: [],
time2: []
},
tableData: [],
//
isActive: false,
form: {},
form: {
areaId: ''
},
handleBusinessList: [],
errorShow: false,
errorData: [],
@ -527,24 +507,31 @@ export default {
//
open: false,
//
title: "",
title: '',
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: "Bearer " + getToken() },
headers: { Authorization: 'Bearer ' + getToken() },
//
url:
process.env.VUE_APP_BASE_API +
"/member/manage/handle-business/importData",
'/member/manage/handle-business/importData'
},
};
areaList: []
}
},
computed: {
areaIdCanSelect() {
return this.handleBusinessList.find(item => item.editTypeKey == 'change_settlement_grade')?.businessValueList?.[0] == 155
}
},
created() {
this.getBusinessList();
this.getHandleBusinessEnum();
this.getUserRoute();
this.getBusinessList()
this.getHandleBusinessEnum()
this.getUserRoute()
this.getCompanyAreaList()
},
methods: {
//
@ -553,168 +540,190 @@ export default {
res.data.forEach((item) => {
this.topList.forEach((items) => {
if (item.routeName == items.url) {
this.$set(items, "changed", true);
this.$set(items, 'changed', true)
}
});
});
});
})
})
})
},
getCompanyAreaList() {
getCompanyAreaList().then((res) => {
this.areaList = res.data || []
console.log(this.areaList, 'this.areaList')
})
},
checkRadio(value) {},
//
//
importTemplate() {
this.download(
"/member/manage/handle-business/download-template",
'/member/manage/handle-business/download-template',
{},
`${'基础业务办理'}-${new Date().getTime()}.xlsx`
);
)
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = '基础业务';
this.upload.open = true;
this.upload.title = '基础业务'
this.upload.open = true
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
this.upload.isUploading = true
},
//
handleFileSuccess(response, file, fileList) {
var fileName = response.fileName;
if (fileName != undefined && fileName != "") {
var fileName = response.fileName
if (fileName != undefined && fileName != '') {
}
if (response.code == 200) {
this.tableData = response.data;
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.tableData = response.data
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
this.$alert(response.msg, '导入结果', {
dangerouslyUseHTMLString: true,
});
dangerouslyUseHTMLString: true
})
} else if (response.code == 504) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
var errorMsg = response.data.map((item) => item.memberCode).join(",");
var errorMsg = response.data.map((item) => item.memberCode).join(',')
this.$alert(errorMsg + response.msg, '导入结果', {
dangerouslyUseHTMLString: true,
});
dangerouslyUseHTMLString: true
})
} else {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
this.$alert(response.msg, '导入结果', {
dangerouslyUseHTMLString: true,
});
dangerouslyUseHTMLString: true
})
}
},
//
handleExceed() {
this.upload.isUploading = false;
this.msgInfo('仅可上传一个文件哦');
this.upload.isUploading = false
this.msgInfo('仅可上传一个文件哦')
},
//
submitFileForm() {
this.$refs.upload.submit();
this.$refs.upload.submit()
},
//
//
saveDate() {
// console.log("🌈", this.handleBusinessList);
if (this.multipleSelection.length > 0) {
const settlementGrade = this.handleBusinessList.find(item => item.editTypeKey == 'change_settlement_grade')
if (settlementGrade.businessValueList?.[0] == 155) {
const needSelection = this.multipleSelection.filter(item => !item.areaId)
if (needSelection.length > 0) {
this.$message({
message: '请选择分公司所属省份',
type: 'warning'
})
return
}
} else {
this.multipleSelection.forEach(item => {
item.areaId = ''
})
}
businessCheck({
businessMemberList: this.multipleSelection,
handleBusinessList: this.handleBusinessList,
handleBusinessList: this.handleBusinessList
}).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
type: 'success'
})
this.$router.push({
path: "/information/business/shyw",
path: '/information/business/shyw',
query: {
data: JSON.stringify(res.data),
handleBusinessList: JSON.stringify(this.handleBusinessList),
},
});
handleBusinessList: JSON.stringify(this.handleBusinessList)
}
})
} else if (res.code == 504 && res.data) {
this.errorShow = true;
this.errorData = res.data;
this.errorShow = true
this.errorData = res.data
}
});
})
} else {
this.$message({
message: '至少选择一条数据',
type: "warning",
});
type: 'warning'
})
}
},
changeTime1(val) {
this.queryParams.startDate = val[0];
this.queryParams.endDate = val[1];
this.queryParams.startDate = val[0]
this.queryParams.endDate = val[1]
},
changeTime2(val) {
this.queryParams.startDatePay = val[0];
this.queryParams.endDatePay = val[1];
this.queryParams.startDatePay = val[0]
this.queryParams.endDatePay = val[1]
},
getBusinessList() {
getBusinessList(this.queryParams).then((res) => {
this.tableData = res.rows;
});
this.tableData = res.rows
})
},
getHandleBusinessEnum() {
//
//
getHandleBusinessEnum().then((res) => {
res.data.forEach((ele) => {
ele.businessValueList = [];
ele.wowList = [];
});
this.handleBusinessList = res.data;
});
ele.businessValueList = []
ele.wowList = []
})
this.handleBusinessList = res.data
})
getgradeRanglist().then((res) => {
this.gradeRangList = res.data;
});
this.gradeRangList = res.data
})
getAwardsListChiose().then((res) => {
this.awardsList = res.rows;
});
this.awardsList = res.rows
})
getmemberTeamList().then((res) => {
this.memberTeamList = res.rows;
});
this.memberTeamList = res.rows
})
getvertexValue().then((res) => {
this.vertexList = res.data;
});
this.vertexList = res.data
})
},
//
changeActive() {
this.isActive = !this.isActive;
this.isActive = !this.isActive
},
//
//
reChongzhi() {
this.queryParams = {
memberCode: "",
memberName: "",
memberCode: '',
memberName: '',
time1: [],
time2: [],
};
this.getBusinessList();
time2: []
}
this.getBusinessList()
},
handleSelectionChange(val) {
this.multipleSelection = val;
this.multipleSelection = val
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
return "warning-row";
return 'warning-row'
} else if (rowIndex % 2 == 0) {
return "success-row";
return 'success-row'
}
return "";
},
},
};
return ''
}
}
}
</script>
<style lang="scss" scoped>

View File

@ -2,9 +2,9 @@
<div class="page">
<topBar
v-if="topList.length > 0"
:topList="topList"
:top-list="topList"
:moren="moren"
></topBar>
/>
<div class="main">
<el-table
@ -20,19 +20,19 @@
prop="memberCode"
:label="'会员编号'"
width="200px"
></el-table-column>
/>
<el-table-column
align="center"
prop="memberName"
width="200px"
:label="'会员姓名'"
></el-table-column>
/>
<el-table-column
align="center"
prop="phone"
width="200px"
:label="'联系方式'"
></el-table-column>
/>
<el-table-column
align="center"
prop="endValidityDate"
@ -50,7 +50,7 @@
:label="'变更会员姓名'"
>
<template slot-scope="scope">
<el-input disabled v-model="scope.row.newMemberName"></el-input>
<el-input v-model="scope.row.newMemberName" disabled />
</template>
</el-table-column>
<el-table-column
@ -60,7 +60,7 @@
width="200px"
>
<template slot-scope="scope">
<el-input disabled v-model="scope.row.newPhone"></el-input>
<el-input v-model="scope.row.newPhone" disabled />
</template>
</el-table-column>
<el-table-column
@ -70,7 +70,7 @@
:label="'扣款币种'"
>
<template slot-scope="scope">
<el-input disabled v-model="scope.row.pkAccountKeyVal"></el-input>
<el-input v-model="scope.row.pkAccountKeyVal" disabled />
</template>
</el-table-column>
<el-table-column
@ -78,7 +78,7 @@
prop="singleAmount100"
label="单笔扣款金额(¥)"
width="200px"
></el-table-column>
/>
<el-table-column
fixed="right"
align="center"
@ -87,10 +87,10 @@
>
<template slot-scope="scope">
<el-button
@click="handleDelete(scope.row, scope.$index, tableData)"
type="text"
size="small"
style="color: #c73030"
@click="handleDelete(scope.row, scope.$index, tableData)"
>
{{ '删除' }}
</el-button>
@ -108,19 +108,19 @@
prop="memberCode"
label="会员编号"
width="200px"
></el-table-column>
/>
<el-table-column
align="center"
prop="businessTypeVal"
label="办理业务"
width="200px"
></el-table-column>
/>
<el-table-column
align="center"
prop="newValue"
label="变更业务"
width="200px"
></el-table-column>
/>
<el-table-column
align="center"
width="200px"
@ -128,7 +128,7 @@
:label="'扣款币种'"
>
<template slot-scope="scope">
<el-input disabled v-model="scope.row.pkAccountKeyVal"></el-input>
<el-input v-model="scope.row.pkAccountKeyVal" disabled />
</template>
</el-table-column>
<el-table-column
@ -138,7 +138,7 @@
label="单笔扣款金额(¥)"
>
<template slot-scope="scope">
<el-input disabled v-model="scope.row.cost"></el-input>
<el-input v-model="scope.row.cost" disabled />
</template>
</el-table-column>
@ -147,13 +147,13 @@
prop=""
label=""
width="200px"
></el-table-column>
/>
<el-table-column
align="center"
prop=""
label=""
width="200px"
></el-table-column>
/>
<el-table-column
fixed="right"
align="center"
@ -162,12 +162,12 @@
>
<template slot-scope="scope">
<el-button
@click="
handleDelete2(scope.row, scope.$index, handleBusinessList)
"
type="text"
size="small"
style="color: #c73030"
@click="
handleDelete2(scope.row, scope.$index, handleBusinessList)
"
>
{{ '删除' }}
</el-button>
@ -215,33 +215,28 @@
>{{ item.label }}</el-button> -->
<el-button class="thebtn0" @click="saveDate(0)">
{{ '取消' }}</el-button
>
{{ '取消' }}</el-button>
<el-button
v-hasButtons="['ReviewBusinessExemptSign']"
class="thebtn1"
@click="saveDate(1)"
>{{ '免签' }}</el-button
>
>{{ '免签' }}</el-button>
<el-button
v-hasButtons="['ReviewBusinessExemptPay']"
class="thebtn2"
@click="saveDate(2)"
>{{ '免付' }}</el-button
>
>{{ '免付' }}</el-button>
<el-button
v-hasButtons="['ReviewBusinessExemptAll']"
class="thebtn3"
@click="saveDate(3)"
>{{ '全免' }}</el-button
>
>{{ '全免' }}</el-button>
<el-button
v-hasButtons="['ReviewBusinessConfirm']"
class="thebtn4"
@click="saveDate(4)"
>
{{ '确认' }}</el-button
>
{{ '确认' }}</el-button>
</div>
</div>
<el-dialog
@ -263,24 +258,20 @@
align="center"
prop="memberCode"
:label="'会员编号'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="errorMsg"
:label="'报错信息'"
>
</el-table-column>
/>
</el-table>
</div>
<div class="footer" style="text-align: center">
<div style="margin: 0 auto">
<el-button class="thebtn" @click="errorShow = false">
{{ '取消' }}</el-button
>
{{ '取消' }}</el-button>
<el-button type="primary" class="thebtn" @click="errorShow = false">
{{ '确认' }}</el-button
>
{{ '确认' }}</el-button>
</div>
</div>
</el-dialog>
@ -288,37 +279,37 @@
</template>
<script>
import topBar from "@/components/topBar";
import topBar from '@/components/topBar'
import {
saveHandelBusiness,
getPubEnumsProcessTyepe,
balanceCheck,
} from "@/api/business.js";
balanceCheck
} from '@/api/business.js'
export default {
name: "Shyw",
name: 'Shyw',
components: {
topBar,
topBar
},
data() {
return {
moren: "shyw",
moren: 'shyw',
topList: [
{
name: '基础业务',
path: "jcyw",
path: 'jcyw'
},
{
name: '订单业务',
path: "ddyw",
path: 'ddyw'
},
{
name: "确认业务",
path: "shyw",
name: '确认业务',
path: 'shyw'
},
{
name: "在线签呈",
path: "zxqc",
},
name: '在线签呈',
path: 'zxqc'
}
],
tableData: [],
processTypeList: [],
@ -326,177 +317,177 @@ export default {
btvo: {},
errorData: [],
errorShow: false,
thedata: {},
};
thedata: {}
}
},
created() {
this.thedata = JSON.parse(this.$route.query.data);
console.log("🌈先1", this.thedata);
this.tableData = this.thedata.businessOldMemberList;
this.handleBusinessList = this.thedata.handleBusinessList;
this.getPubEnumsProcessTyepe();
this.btvo = this.thedata.btvo;
this.thedata = JSON.parse(this.$route.query.data)
console.log('🌈先1', this.thedata)
this.tableData = this.thedata.businessOldMemberList
this.handleBusinessList = this.thedata.handleBusinessList
this.getPubEnumsProcessTyepe()
this.btvo = this.thedata.btvo
},
methods: {
formatDate(date) {
if (!date) return "";
const d = new Date(date);
if (isNaN(d.getTime())) return "Invalid Date"; //
const year = d.getFullYear();
const month = String(d.getMonth() + 1).padStart(2, "0");
const day = String(d.getDate()).padStart(2, "0");
const hours = String(d.getHours()).padStart(2, "0");
const minutes = String(d.getMinutes()).padStart(2, "0");
const seconds = String(d.getSeconds()).padStart(2, "0");
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
if (!date) return ''
const d = new Date(date)
if (isNaN(d.getTime())) return 'Invalid Date' //
const year = d.getFullYear()
const month = String(d.getMonth() + 1).padStart(2, '0')
const day = String(d.getDate()).padStart(2, '0')
const hours = String(d.getHours()).padStart(2, '0')
const minutes = String(d.getMinutes()).padStart(2, '0')
const seconds = String(d.getSeconds()).padStart(2, '0')
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
},
//
//
handleDelete(row, index, rows) {
this.$confirm('是否删除').then((_) => {
const delList = [];
const delList = []
this.tableData.forEach((ele, eindex) => {
if (row.memberCode == ele.memberCode) {
delList.push(eindex);
delList.push(eindex)
}
});
rows.splice(index, delList.length);
})
rows.splice(index, delList.length)
this.handleBusinessList = this.handleBusinessList.filter(
(ele) => ele.memberCode !== row.memberCode
);
)
this.thedata.businessMemberList =
this.thedata.businessMemberList.filter(
(ele) => ele.memberCode !== row.memberCode
);
});
)
})
},
handleDelete2(row, index, rows) {
this.$confirm('是否删除').then((_) => {
const delList2 = [];
const delList3 = [];
const delList2 = []
const delList3 = []
this.handleBusinessList.forEach((ele, eindex) => {
if (row.pkId == ele.pkId) {
delList2.push(eindex);
delList2.push(eindex)
}
});
})
this.thedata.businessMemberList.forEach((ele, eindex) => {
if (row.pkId == ele.pkId) {
delList3.push(eindex);
delList3.push(eindex)
}
});
rows.splice(index, delList2.length);
this.thedata.businessMemberList.splice(index, delList3.length);
});
})
rows.splice(index, delList2.length)
this.thedata.businessMemberList.splice(index, delList3.length)
})
},
getPubEnumsProcessTyepe() {
getPubEnumsProcessTyepe().then((res) => {
this.processTypeList = res.data;
});
this.processTypeList = res.data
})
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
return "warning-row";
return 'warning-row'
} else if (rowIndex % 2 == 0) {
return "success-row";
return 'success-row'
}
return "";
return ''
},
handleSelectionChange(val) {
this.multipleSelection = val;
this.multipleSelection = val
},
saveDate(index) {
this.thedata.businessOldMemberList = this.tableData;
this.thedata.handleBusinessList = this.handleBusinessList;
this.thedata.businessOldMemberList = this.tableData
this.thedata.handleBusinessList = this.handleBusinessList
// console.log('🌈thedata',this.thedata)
if (this.tableData.length > 0 && this.handleBusinessList.length > 0) {
if (index == 0) {
this.$router.go(-1);
this.$router.go(-1)
} else if (index == 2 || index == 4) {
//
//
if (index == 2) {
this.$router.push({
path: "/information/business/zxqc",
path: '/information/business/zxqc',
query: {
data: JSON.stringify(this.thedata),
index: index,
},
});
index: index
}
})
} else if (index == 4) {
//
const thebusinessCostVOList = this.thedata.businessCostVOList;
//
const thebusinessCostVOList = this.thedata.businessCostVOList
balanceCheck({ businessCostVOList: thebusinessCostVOList }).then(
(res) => {
if (res.code == 200) {
this.$router.push({
path: "/information/business/zxqc",
path: '/information/business/zxqc',
query: {
data: JSON.stringify(this.thedata),
index: index,
},
});
index: index
}
})
} else if (res.code == 504 && res.data) {
this.errorShow = true;
this.errorData = res.data;
this.errorShow = true
this.errorData = res.data
}
}
);
)
}
} else if (index == 1 || index == 3) {
//
//
const thehandleBusinessList = this.thedata.handleBusinessList;
const thebusinessMemberList = this.thedata.businessMemberList;
const thebusinessCostVOList = this.thedata.businessCostVOList;
const thehandleBusinessList = this.thedata.handleBusinessList
const thebusinessMemberList = this.thedata.businessMemberList
const thebusinessCostVOList = this.thedata.businessCostVOList
if (index == 1) {
//
//
balanceCheck({ businessCostVOList: thebusinessCostVOList }).then(
(res) => {
if (res.code == 200) {
saveHandelBusiness({
processType: index,
handleBusinessList: thehandleBusinessList,
businessMemberList: thebusinessMemberList,
businessMemberList: thebusinessMemberList
}).then((res) => {
this.$message({
message: res.msg,
type: "success",
});
this.$router.go(-1);
});
type: 'success'
})
this.$router.go(-1)
})
} else if (res.code == 504 && res.data) {
this.errorShow = true;
this.errorData = res.data;
this.errorShow = true
this.errorData = res.data
}
}
);
)
} else if (index == 3) {
saveHandelBusiness({
processType: index,
handleBusinessList: thehandleBusinessList,
businessMemberList: thebusinessMemberList,
businessMemberList: thebusinessMemberList
}).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
this.$router.go(-1);
type: 'success'
})
this.$router.go(-1)
} else if (res.code == 504 && res.data) {
this.errorShow = true;
this.errorData = res.data;
this.errorShow = true
this.errorData = res.data
}
});
})
}
}
} else {
this.$message({
message: "业务不能为空",
type: "warning",
});
message: '业务不能为空',
type: 'warning'
})
}
},
},
};
}
}
}
</script>
<style lang="scss" scoped>

View File

@ -44,7 +44,7 @@ module.exports = {
},
proxy: {
'/prod-api': {
target: 'http://localhost:8080',
target: 'http://192.168.0.104:8080',
changeOrigin: true,
pathRewrite: { '^/prod-api': '' }
}