接口调用
This commit is contained in:
parent
260c671c6a
commit
e7e7820d50
|
|
@ -90,16 +90,30 @@ export const apiGetCompanyInfoById = (id: any) => {
|
|||
return post(strUrl,params)
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
POST
|
||||
//=============================================企业业务开通管理
|
||||
// business/open/exportExcel
|
||||
export const apiBusinessOpenExportExcel = (params: any) => {
|
||||
let strUrl = `business/open/exportExcel`
|
||||
return get(strUrl,{})
|
||||
}
|
||||
// 新增业务开通请求
|
||||
export const apiBusinessOpenInsert = (params: any) => {
|
||||
let strUrl = `/business/open/insert`
|
||||
return post(strUrl,params)
|
||||
}
|
||||
// 根据条件查询企业业务开通信息列表
|
||||
export const apiBusinessOpenselectList = (params: any) => {
|
||||
let strUrl = `/business/open/selectList`
|
||||
return post(strUrl,params)
|
||||
}
|
||||
// 企业业务开通数据修改
|
||||
export const apiBusinessUpdateBusiness = (params: any) => {
|
||||
let strUrl = `/business/open/updateBusiness`
|
||||
return post(strUrl,params)
|
||||
}
|
||||
|
||||
|
||||
|
||||
POST
|
||||
|
||||
企业信息变更 */
|
||||
|
||||
|
||||
|
|
@ -117,3 +117,37 @@ export function formatDate(timestamp: any) {
|
|||
}
|
||||
return '刚刚'
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export const getNewDay = (dateTemp: any, days: any) => {
|
||||
console.log("dateTemp",dateTemp,days)
|
||||
if(!dateTemp ){
|
||||
return ""
|
||||
}
|
||||
dateTemp = dateTemp.split(".");
|
||||
//转换为MM-DD-YYYY格式
|
||||
let nDate: any = new Date(dateTemp[1] + "-" + dateTemp[2] + "-" + dateTemp[0]);
|
||||
let millSeconds: any = Math.abs(nDate) - days * 24 * 60 * 60 * 1000;
|
||||
let rDate: any = new Date(millSeconds);
|
||||
let year: any = rDate.getFullYear();
|
||||
let month: any = rDate.getMonth() + 1;
|
||||
if (month < 10) month = "0" + month;
|
||||
let date = rDate.getDate();
|
||||
if (date < 10) date = "0" + date;
|
||||
return year + "." + month + "." + date;
|
||||
|
||||
}
|
||||
|
||||
export const getdatatime = () => { //默认显示今天
|
||||
//this.queryInfos.sheetDate= new Date();
|
||||
const currentDate = new Date()
|
||||
const year = currentDate.getFullYear();
|
||||
const month = currentDate.getMonth();
|
||||
const date = currentDate.getDate();
|
||||
const end = (new Date(year, month, date, 0, 0, 0)).getTime(); // 2021-12-24 00:00:00
|
||||
const start = end - (3600 * 1000 * 24 * 30)
|
||||
return [start,end]
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="btn_end" v-if="subType == 'edit'">
|
||||
<div class="btn_end" v-if="subType == 'edit'">
|
||||
<el-button type="primary" size="small" @click.prevent="auditFn()">
|
||||
审批
|
||||
</el-button>
|
||||
|
|
@ -113,9 +113,10 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { apiGetCompanyInfoById, apiupdateCompanyInfo } from "http/api/enterprise"
|
||||
import { apiGetCompanyInfoById, apiupdateCompanyInfo, apiBusinessUpdateBusiness } from "http/api/enterprise"
|
||||
import { ElMessage } from "element-plus";
|
||||
import { ElMessageBoxOpert } from 'utils/elementCom'
|
||||
const router = useRouter()
|
||||
const emits = defineEmits(['send'])
|
||||
const route = useRoute()
|
||||
const addShow = ref(false)
|
||||
|
|
@ -127,7 +128,7 @@ let subType: any = ref("show")
|
|||
|
||||
let type: any = "settleIn"
|
||||
let queryId: any = ""
|
||||
|
||||
let coId: any = ""
|
||||
const show = (val: any) => {
|
||||
title.value = val.title
|
||||
addShow.value = true
|
||||
|
|
@ -157,10 +158,25 @@ const handleAudit = (auditType: any) => { // settleIn 企业入驻审核
|
|||
type: 'success',
|
||||
message: "审批成功"
|
||||
})
|
||||
|
||||
router.go(-1)
|
||||
})
|
||||
} else if (type == 'open') {
|
||||
|
||||
let params = {
|
||||
|
||||
id: queryId,
|
||||
status: auditType//1通过,2 驳回
|
||||
|
||||
|
||||
}
|
||||
apiBusinessUpdateBusiness(params).then((res: any) => {
|
||||
console.log("res-apiBusinessUpdateBusiness", res)
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: "审批成功"
|
||||
})
|
||||
router.go(-1)
|
||||
})
|
||||
} else if (type == 'info') {
|
||||
|
||||
} else if (type == 'settleIn') {
|
||||
|
|
@ -173,12 +189,15 @@ const handleAudit = (auditType: any) => { // settleIn 企业入驻审核
|
|||
|
||||
const rejectCallBack = async (row: any, value: any) => {
|
||||
console.log('editCallBack', row, value)
|
||||
|
||||
|
||||
|
||||
if (type == 'settleIn') {
|
||||
let params = {
|
||||
bmCompanyInfo: {
|
||||
companyId: queryId,
|
||||
status: "2",//1通过,2 驳回
|
||||
auditRemark:value.value
|
||||
auditRemark: value.value
|
||||
}
|
||||
}
|
||||
apiupdateCompanyInfo(params).then((res: any) => {
|
||||
|
|
@ -187,9 +206,26 @@ const rejectCallBack = async (row: any, value: any) => {
|
|||
type: 'success',
|
||||
message: "驳回成功"
|
||||
})
|
||||
router.go(-1)
|
||||
|
||||
})
|
||||
}
|
||||
} else if (type == 'open') {
|
||||
let params = {
|
||||
|
||||
id: queryId,
|
||||
status: "2",//1通过,2 驳回
|
||||
auditRemark: value.value
|
||||
|
||||
}
|
||||
apiBusinessUpdateBusiness(params).then((res: any) => {
|
||||
console.log("res-apiBusinessUpdateBusiness", res)
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: "审批成功"
|
||||
})
|
||||
router.go(-1)
|
||||
})
|
||||
}
|
||||
// let params = {
|
||||
// rejectReason: value.value,
|
||||
// orderId: detailsInfo.orderId
|
||||
|
|
@ -204,25 +240,25 @@ const rejectCallBack = async (row: any, value: any) => {
|
|||
}
|
||||
|
||||
const rejectFn = () => {
|
||||
|
||||
|
||||
ElMessageBoxOpert(
|
||||
'驳回原因',
|
||||
'填写驳回原因',
|
||||
'确定',
|
||||
'取消',
|
||||
(val: any) => {
|
||||
if (!val) {
|
||||
return '请填写类型模板'
|
||||
}
|
||||
},
|
||||
'请填写类型模板',
|
||||
rejectCallBack,
|
||||
"row",
|
||||
'textarea',
|
||||
'dangerC'
|
||||
)
|
||||
|
||||
|
||||
ElMessageBoxOpert(
|
||||
'驳回原因',
|
||||
'填写驳回原因',
|
||||
'确定',
|
||||
'取消',
|
||||
(val: any) => {
|
||||
if (!val) {
|
||||
return '请填写类型模板'
|
||||
}
|
||||
},
|
||||
'请填写类型模板',
|
||||
rejectCallBack,
|
||||
"row",
|
||||
'textarea',
|
||||
'dangerC'
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
const auditFn = () => {
|
||||
|
|
@ -231,7 +267,10 @@ const auditFn = () => {
|
|||
}
|
||||
|
||||
const initDetails = async () => {
|
||||
const id = route.query.id || "1"
|
||||
let id = route.query.id || "1"
|
||||
if (type == "open") {
|
||||
id = coId
|
||||
}
|
||||
const res: any = await apiGetCompanyInfoById(id)
|
||||
console.log("apiGetCompanyInfoById", res)
|
||||
detailsInfo.info = res.data.bmCompanyInfo
|
||||
|
|
@ -254,7 +293,7 @@ const initTypeInfo = () => {
|
|||
queryId = route.query.id || "1"
|
||||
type = route.query.type || 'settleIn'
|
||||
subType.value = route.query.subType || "show"//edit
|
||||
|
||||
coId = route.query.coId
|
||||
|
||||
// settleIn 企业入驻审核
|
||||
// open 企业业务开通审核
|
||||
|
|
|
|||
|
|
@ -2,17 +2,17 @@
|
|||
<el-card shadow="always" class="search_header_top_row1">
|
||||
|
||||
<el-form :inline="true" :model="filterForm" class="demo-form-inline">
|
||||
<el-form-item label="关键字">
|
||||
<!-- <el-form-item label="关键字">
|
||||
<el-input v-model="filterForm.keyword" placeholder="请输入关键字" clearable />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="企业名称">
|
||||
<el-input v-model="filterForm.compnayName" placeholder="请输入企业名称" clearable />
|
||||
<el-input v-model="filterForm.companyName" placeholder="请输入企业名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="统一社会信用代码">
|
||||
<el-input v-model="filterForm.code" placeholder="请输入统一社会信用代码" clearable />
|
||||
<el-input v-model="filterForm.creditCode" placeholder="请输入统一社会信用代码" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名">
|
||||
<el-input v-model="filterForm.name" placeholder="请输入用户名" clearable />
|
||||
<el-input v-model="filterForm.userName" placeholder="请输入用户名" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请日期范围">
|
||||
<el-date-picker v-model="filterForm.dataRange" type="daterange" range-separator="To" start-placeholder="Start date"
|
||||
|
|
@ -30,12 +30,12 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
const emits = defineEmits(['search','reset','export'])
|
||||
|
||||
const filterForm = reactive({
|
||||
import {getdatatime} from "utils/time"
|
||||
const filterForm:any = reactive({
|
||||
keyword: '',
|
||||
compnayName:'',
|
||||
name:'',
|
||||
code:'',
|
||||
companyName:'',
|
||||
userName:'',
|
||||
creditCode:'',
|
||||
dataRange:''
|
||||
})
|
||||
|
||||
|
|
@ -51,7 +51,9 @@ const exportFn =()=>{
|
|||
emits('export')
|
||||
}
|
||||
|
||||
|
||||
onMounted(()=>{
|
||||
filterForm.dataRange = getdatatime()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
|
|||
|
|
@ -6,31 +6,31 @@
|
|||
:max-height="'calc(100vh - 72px - 48px - 65px - 12px - 60px - 88px)'"
|
||||
:height="'calc(100vh - 72px - 48px - 65px - 12px - 60px - 88px)'">
|
||||
<el-table-column type="index" width="72" label="序号" />
|
||||
<el-table-column prop="v_company" label="企业名称" min-width="150" />
|
||||
<el-table-column prop="v_businessType" label="开通业务类型" min-width="150" />
|
||||
<el-table-column prop="companyName" label="企业名称" min-width="150" />
|
||||
<el-table-column prop="businessType" label="开通业务类型" min-width="150" />
|
||||
|
||||
<el-table-column prop="v_username" label="用户名" min-width="220">
|
||||
<el-table-column prop="nickName" label="用户名" min-width="220">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column prop="v_account" label="用户账号" min-width="220">
|
||||
<el-table-column prop="userName" label="用户账号" min-width="220">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column prop="v_code" label="统一社会信用代码" min-width="220">
|
||||
<el-table-column prop="creditCode" label="统一社会信用代码" min-width="220">
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="v_applyTime" label="申请时间" min-width="220">
|
||||
<el-table-column prop="time" label="申请时间" min-width="220">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" min-width="220">
|
||||
<template #default="scope">
|
||||
<div class="todo_status_c" v-if="scope.row.v_status == '1'">
|
||||
<div class="todo_status_c" v-if="scope.row.status == '0'">
|
||||
待审批
|
||||
</div>
|
||||
<div class="pass_status_c" v-else-if="scope.row.v_status == '2'">
|
||||
<div class="pass_status_c" v-else-if="scope.row.status == '1'">
|
||||
已通过
|
||||
</div>
|
||||
<div class="reject_status_c" v-else-if="scope.row.v_status == '3'">
|
||||
<div class="reject_status_c" v-else-if="scope.row.status == '2'">
|
||||
已驳回
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -38,15 +38,18 @@
|
|||
<el-table-column label="操作" align="center" width="160">
|
||||
|
||||
<template #default="scope">
|
||||
<el-button type="primary" size="small" @click.prevent="editRowFn(scope.row)">
|
||||
<el-button type="primary" size="small" @click.prevent="editRowFn(scope.row)" v-if="scope.row.status == '0'">
|
||||
审批
|
||||
</el-button>
|
||||
<el-button type="plain" size="small" @click.prevent="showRowFn(scope.row)">
|
||||
查看
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="paination_out">
|
||||
<Pagination :currentPage="paginationInfo.currentPage" :pageSize="paginationInfo.pageSize" @sendPage="getPageFn">
|
||||
<Pagination :pageNum="paginationInfo.pageNum" :pageSize="paginationInfo.pageSize" @sendPage="getPageFn">
|
||||
</Pagination>
|
||||
</div>
|
||||
</el-card>
|
||||
|
|
@ -56,75 +59,40 @@
|
|||
import headerTop from "./com/headerTop.vue"
|
||||
import addCom from "./com/addCom.vue"
|
||||
import { ElConfirmBeforeOpert } from "utils/elementCom"
|
||||
import {apiBusinessOpenselectList} from "http/api/enterprise"
|
||||
const router = useRouter()
|
||||
const addComRef = ref()
|
||||
const paginationInfo = reactive({
|
||||
currentPage: 1,
|
||||
pageNum: 1,
|
||||
pageSize: 15
|
||||
})
|
||||
const tableData = [
|
||||
{
|
||||
v_id: '1',
|
||||
v_company: '2016-05-03',
|
||||
v_businessType: 'Tom',
|
||||
v_username: 'California',
|
||||
v_account: 'Los Angeles',
|
||||
v_code: 'No. 189, Grove St, Los Angeles',
|
||||
v_applyTime: 'CA 90036',
|
||||
v_status: '1',
|
||||
},
|
||||
{
|
||||
v_id: '2',
|
||||
v_company: '2016-05-03',
|
||||
v_businessType: 'Tom',
|
||||
v_username: 'California',
|
||||
v_account: 'Los Angeles',
|
||||
v_code: 'No. 189, Grove St, Los Angeles',
|
||||
v_applyTime: 'CA 90036',
|
||||
v_status: '1',
|
||||
},
|
||||
{
|
||||
v_id: '3',
|
||||
v_company: '2016-05-03',
|
||||
v_businessType: 'Tom',
|
||||
v_username: 'California',
|
||||
v_account: 'Los Angeles',
|
||||
v_code: 'No. 189, Grove St, Los Angeles',
|
||||
v_applyTime: 'CA 90036',
|
||||
v_status: '1',
|
||||
},
|
||||
{
|
||||
v_id: '4',
|
||||
v_company: '2016-05-03',
|
||||
v_businessType: 'Tom',
|
||||
v_username: 'California',
|
||||
v_account: 'Los Angeles',
|
||||
v_code: 'No. 189, Grove St, Los Angeles',
|
||||
v_applyTime: 'CA 90036',
|
||||
v_status: '1',
|
||||
|
||||
},
|
||||
{
|
||||
v_id: '5',
|
||||
v_company: '2016-05-03',
|
||||
v_businessType: 'Tom',
|
||||
v_username: 'California',
|
||||
v_account: 'Los Angeles',
|
||||
v_code: 'No. 189, Grove St, Los Angeles',
|
||||
v_applyTime: 'CA 90036',
|
||||
v_status: '1',
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
let total = ref(0)
|
||||
let tableListInfo = reactive({
|
||||
list: tableData
|
||||
list: []
|
||||
})
|
||||
|
||||
let searchParams: any = {}
|
||||
|
||||
const editRowFn = (row: any) => {
|
||||
router.push({
|
||||
name:'entryAuditDetails'
|
||||
name:'entryAuditDetails',
|
||||
query:{
|
||||
type:'open',
|
||||
subType:'edit',
|
||||
id:row.id,
|
||||
coId:row.coId
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
const showRowFn = (row: any) => {
|
||||
router.push({
|
||||
name:'entryAuditDetails',
|
||||
query:{
|
||||
type:'open',
|
||||
subType:'show',
|
||||
id:row.id,
|
||||
coId:row.coId
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
|
@ -159,14 +127,25 @@ const exportFn = () => {
|
|||
|
||||
}
|
||||
const getPageFn = (val: any) => {
|
||||
paginationInfo.currentPage = val.currentPage
|
||||
paginationInfo.pageNum = val.pageNum
|
||||
paginationInfo.pageSize = val.pageSize
|
||||
initTableList()
|
||||
}
|
||||
|
||||
const initTableList = () => {
|
||||
|
||||
const initTableList =async () => {
|
||||
const params = {
|
||||
...searchParams,
|
||||
...paginationInfo
|
||||
}
|
||||
const res: any = await apiBusinessOpenselectList(params)
|
||||
console.log("apiGetCompanyInfoSelectList", res)
|
||||
tableListInfo.list = res.rows
|
||||
// tableListInfo.list =
|
||||
total.value = res.total
|
||||
}
|
||||
onMounted(() => {
|
||||
initTableList()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,13 +12,13 @@
|
|||
<el-input v-model="filterForm.userName" placeholder="请输入用户名" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="发布时间">
|
||||
<el-date-picker v-model="filterForm.dataRange" type="daterange" range-separator="To" start-placeholder="Start date"
|
||||
end-placeholder="End date" />
|
||||
<el-date-picker v-model="filterForm.dataRange" type="daterange" range-separator="To"
|
||||
start-placeholder="Start date" end-placeholder="End date" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="serachFn">查询</el-button>
|
||||
<el-button type="plain" @click="resetFn">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-button type="primary" @click="exportFn">导出</el-button>
|
||||
|
|
@ -27,14 +27,17 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const emits = defineEmits(['search','reset','export'])
|
||||
|
||||
const filterForm = reactive({
|
||||
const emits = defineEmits(['search', 'reset', 'export'])
|
||||
import {getdatatime} from "utils/time"
|
||||
const filterForm:any = reactive({
|
||||
keyword: '',
|
||||
companyName:'',
|
||||
creditCode:'',
|
||||
dataRange:'',
|
||||
userName:''
|
||||
companyName: '',
|
||||
creditCode: '',
|
||||
dataRange: [
|
||||
|
||||
|
||||
],
|
||||
userName: ''
|
||||
})
|
||||
/*
|
||||
"beginTime": "string",
|
||||
|
|
@ -51,17 +54,20 @@ const filterForm = reactive({
|
|||
|
||||
*/
|
||||
const serachFn = () => {
|
||||
emits('search',filterForm)
|
||||
emits('search', filterForm)
|
||||
}
|
||||
|
||||
const resetFn=()=>{
|
||||
const resetFn = () => {
|
||||
emits('reset')
|
||||
}
|
||||
|
||||
const exportFn =()=>{
|
||||
const exportFn = () => {
|
||||
emits('export')
|
||||
}
|
||||
|
||||
|
||||
onMounted(()=>{
|
||||
filterForm.dataRange = getdatatime()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
<el-button type="primary" size="small" @click.prevent="auditFn(scope.row)">
|
||||
审批
|
||||
</el-button>
|
||||
<el-button type="success" size="small" @click.prevent="showRowFn(scope.row)">
|
||||
<el-button type="plain" size="small" @click.prevent="showRowFn(scope.row)">
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
const emits = defineEmits(['search', 'reset', 'export', 'add'])
|
||||
|
||||
const isEnableList = reactive({
|
||||
list: [{
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue