generated from Leo_Ding/web-template
合同
This commit is contained in:
parent
42d7c2d0e1
commit
430830862a
18
src/apis/modules/contract.js
Normal file
18
src/apis/modules/contract.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* 合同接口
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
// 获取待审核列表
|
||||||
|
export const getPageList = (params) => request.basic.get('/api/v1/contractPendingList', params)
|
||||||
|
// 审核
|
||||||
|
export const review = (id) => request.basic.post(`/api/v1/contractPendingList/review`,params)
|
||||||
|
//合同详情
|
||||||
|
export const getInfo=(id)=>request.basic.get('/api/v1/contractPendingList/'+id)
|
||||||
|
// 审核失败列表
|
||||||
|
export const getFaildList = (params) => request.basic.get('/api/v1/rejectContractList', params)
|
||||||
|
// 待签章列表
|
||||||
|
export const getPendingList = (params) => request.basic.get('/api/v1/signatureList', params)
|
||||||
|
// 上传签章合同
|
||||||
|
export const pendingUpload = (params) => request.basic.post('/api/v1/uploadSignature', params)
|
||||||
|
// 已签章列表
|
||||||
|
export const getinvoiceSuccessList = (params) => request.basic.get('/api/v1/sealedtrueList', params)
|
||||||
@ -1,64 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<x-search-bar class="mb-8-2">
|
<x-search-bar class="mb-8-2">
|
||||||
<template #default="{ gutter, colSpan }">
|
<template #default="{ gutter, colSpan }">
|
||||||
<a-form
|
<a-form :model="searchFormData" layout="inline">
|
||||||
:label-col="{ style: { width: '100px' } }"
|
|
||||||
:model="searchFormData"
|
|
||||||
layout="inline">
|
|
||||||
<a-row :gutter="gutter">
|
<a-row :gutter="gutter">
|
||||||
<a-col v-bind="colSpan">
|
<a-col v-bind="colSpan">
|
||||||
<a-form-item name="title">
|
<a-form-item name="username" label="用户名">
|
||||||
<template #label>
|
<a-input v-model:value="searchFormData.username"></a-input>
|
||||||
规则名称
|
|
||||||
<a-tooltip title="规则名称是唯一的 key">
|
|
||||||
<question-circle-outlined class="ml-4-1 color-placeholder" />
|
|
||||||
</a-tooltip>
|
|
||||||
</template>
|
|
||||||
<a-input v-model:value="searchFormData.title"></a-input>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col v-bind="colSpan">
|
<a-col v-bind="colSpan">
|
||||||
<a-form-item label="描述">
|
<a-form-item label="手机号" title="phone">
|
||||||
<a-input></a-input>
|
<a-input v-model:value="searchFormData.phone"></a-input>
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<template v-if="searchBarExpand">
|
|
||||||
<a-col v-bind="colSpan">
|
|
||||||
<a-form-item label="服务调用次数">
|
|
||||||
<a-input></a-input>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col v-bind="colSpan">
|
<a-col v-bind="colSpan">
|
||||||
<a-form-item label="状态">
|
<a-form-item label="合同编号" title="contractId">
|
||||||
<a-select></a-select>
|
<a-input v-model:value="searchFormData.contractId"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col v-bind="colSpan">
|
<a-col class="align-right" v-bind="colSpan">
|
||||||
<a-form-item label="上次调度时间">
|
|
||||||
<a-date-picker placeholder=""></a-date-picker>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</template>
|
|
||||||
<a-col
|
|
||||||
class="align-right"
|
|
||||||
v-bind="colSpan">
|
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button>重置</a-button>
|
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
||||||
<a-button
|
<a-button ghost type="primary" @click="handleSearch">
|
||||||
ghost
|
|
||||||
type="primary"
|
|
||||||
@click="handleSearch">
|
|
||||||
搜索
|
搜索
|
||||||
</a-button>
|
</a-button>
|
||||||
<a @click="() => (searchBarExpand = !searchBarExpand)">
|
|
||||||
展开
|
|
||||||
<template v-if="searchBarExpand">
|
|
||||||
<up-outlined :style="{ fontSize: '12px' }"></up-outlined>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<down-outlined :style="{ fontSize: '12px' }"></down-outlined>
|
|
||||||
</template>
|
|
||||||
</a>
|
|
||||||
</a-space>
|
</a-space>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@ -66,101 +31,22 @@
|
|||||||
</template>
|
</template>
|
||||||
</x-search-bar>
|
</x-search-bar>
|
||||||
<a-card>
|
<a-card>
|
||||||
<x-action-bar class="mb-8-2">
|
<a-table :columns="columns" :data-source="listData" :loading="loading" bordered :pagination="paginationState"
|
||||||
<a-button
|
:size="size" row-key="id" @change="onTableChange">
|
||||||
type="primary"
|
|
||||||
@click="$refs.editDialogRef.handleCreate()">
|
|
||||||
<template #icon>
|
|
||||||
<plus-outlined></plus-outlined>
|
|
||||||
</template>
|
|
||||||
新建
|
|
||||||
</a-button>
|
|
||||||
<template #extra>
|
|
||||||
<a-space>
|
|
||||||
<a-tooltip title="刷新">
|
|
||||||
<a-button
|
|
||||||
type="text"
|
|
||||||
@click="handleSearch">
|
|
||||||
<template #icon>
|
|
||||||
<reload-outlined></reload-outlined>
|
|
||||||
</template>
|
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
<a-dropdown>
|
|
||||||
<a-tooltip title="密度">
|
|
||||||
<a-button type="text">
|
|
||||||
<template #icon>
|
|
||||||
<column-height-outlined></column-height-outlined>
|
|
||||||
</template>
|
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
<template #overlay>
|
|
||||||
<a-menu
|
|
||||||
:selectedKeys="[size]"
|
|
||||||
@click="handleSize">
|
|
||||||
<a-menu-item key="default">默认</a-menu-item>
|
|
||||||
<a-menu-item key="middle">中等</a-menu-item>
|
|
||||||
<a-menu-item key="small">紧凑</a-menu-item>
|
|
||||||
</a-menu>
|
|
||||||
</template>
|
|
||||||
</a-dropdown>
|
|
||||||
<a-tooltip title="设置">
|
|
||||||
<a-button type="text">
|
|
||||||
<template #icon>
|
|
||||||
<setting-outlined></setting-outlined>
|
|
||||||
</template>
|
|
||||||
</a-button>
|
|
||||||
</a-tooltip>
|
|
||||||
</a-space>
|
|
||||||
</template>
|
|
||||||
</x-action-bar>
|
|
||||||
<a-table
|
|
||||||
:columns="columns"
|
|
||||||
:data-source="listData"
|
|
||||||
:loading="loading"
|
|
||||||
:pagination="paginationState"
|
|
||||||
:size="size"
|
|
||||||
row-key="id"
|
|
||||||
@change="onTableChange">
|
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="'action' === column.key">
|
<template v-if="'action' === column.key">
|
||||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">编辑</x-action-button>
|
<x-action-button @click="handleReview(record)">审核</x-action-button>
|
||||||
<x-action-button @click="handleDelete(record)">删除</x-action-button>
|
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">详情</x-action-button>
|
||||||
<x-action-button>
|
|
||||||
<a-dropdown :trigger="['click']">
|
|
||||||
<more-outlined></more-outlined>
|
|
||||||
<template #overlay>
|
|
||||||
<a-menu>
|
|
||||||
<a-menu-item>菜单1</a-menu-item>
|
|
||||||
<a-menu-item>菜单2</a-menu-item>
|
|
||||||
<a-menu-item>菜单3</a-menu-item>
|
|
||||||
</a-menu>
|
|
||||||
</template>
|
|
||||||
</a-dropdown>
|
|
||||||
</x-action-button>
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
<edit-dialog ref="editDialogRef" @ok="onOk" />
|
||||||
<edit-dialog
|
|
||||||
ref="editDialogRef"
|
|
||||||
@ok="onOk" />
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { message, Modal } from 'ant-design-vue'
|
import { message, Modal } from 'ant-design-vue'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import {
|
|
||||||
ColumnHeightOutlined,
|
|
||||||
DownOutlined,
|
|
||||||
QuestionCircleOutlined,
|
|
||||||
ReloadOutlined,
|
|
||||||
SettingOutlined,
|
|
||||||
UpOutlined,
|
|
||||||
PlusOutlined,
|
|
||||||
MoreOutlined,
|
|
||||||
} from '@ant-design/icons-vue'
|
|
||||||
import apis from '@/apis'
|
import apis from '@/apis'
|
||||||
import { config } from '@/config'
|
import { config } from '@/config'
|
||||||
import { usePagination } from '@/hooks'
|
import { usePagination } from '@/hooks'
|
||||||
@ -171,47 +57,47 @@ defineOptions({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{ title: '区域ID', dataIndex: 'hostId' },
|
{ title: '用户名', dataIndex: 'username' },
|
||||||
{ title: '区域名称', dataIndex: 'hostName' },
|
{ title: '手机号', dataIndex: 'phone' },
|
||||||
{ title: '区域编码', dataIndex: 'regionId' },
|
{ title: '发票金额', dataIndex: 'invoiceAmount' },
|
||||||
{ title: '数据中心地址', dataIndex: 'cpu' },
|
{ title: '发票类型', dataIndex: 'invoiceType' },
|
||||||
{ title: '状态', dataIndex: 'memory' },
|
{ title: '状态', dataIndex: 'status' },
|
||||||
{ title: '部署主机数量(主机数量)', dataIndex: 'storage' },
|
{ title: '发票编号', dataIndex: 'invoiceNumber' },
|
||||||
{ title: '可用计算卡总数', dataIndex: 'ip' },
|
{ title: '开票日期', dataIndex: 'issueDate' },
|
||||||
{ title: '操作', key: 'action', width: 160 },
|
{ title: '开票方式', dataIndex: 'issueMethod' },
|
||||||
|
{ title: '备注', dataIndex: 'remarks' },
|
||||||
]
|
]
|
||||||
// const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =
|
const { listData, paginationState, loading, showLoading, hideLoading, resetPagination, searchFormData } =usePagination()
|
||||||
// usePagination()
|
|
||||||
const listData = ref([])
|
|
||||||
const editDialogRef = ref()
|
const editDialogRef = ref()
|
||||||
const searchBarExpand = ref(false)
|
const searchBarExpand = ref(false)
|
||||||
const size = ref('default')
|
const size = ref('default')
|
||||||
|
|
||||||
// getPageList()
|
getPageList()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取分页列表
|
* 获取分页列表
|
||||||
*/
|
*/
|
||||||
async function getPageList() {
|
async function getPageList() {
|
||||||
try {
|
try {
|
||||||
// showLoading()
|
showLoading()
|
||||||
// const { pageSize, current } = paginationState
|
const { pageSize, current } = paginationState
|
||||||
// const { code, data } = await apis.common
|
const { code, data } = await apis.invoice
|
||||||
// .getPageList({
|
.getDeliveriesFailedList({
|
||||||
// pageSize,
|
pageSize,
|
||||||
// current: current,
|
current: current,
|
||||||
// })
|
...searchFormData.value
|
||||||
// .catch(() => {
|
})
|
||||||
// throw new Error()
|
.catch(() => {
|
||||||
// })
|
throw new Error()
|
||||||
// hideLoading()
|
})
|
||||||
// if (config('http.code.success') === code) {
|
hideLoading()
|
||||||
// const { records, pagination } = data
|
if (config('http.code.success') === code) {
|
||||||
// listData.value = records
|
const { records, pagination } = data
|
||||||
// paginationState.total = pagination.total
|
listData.value = records
|
||||||
// }
|
paginationState.total = pagination.total
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// hideLoading()
|
hideLoading()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,8 +105,8 @@ async function getPageList() {
|
|||||||
* 搜索
|
* 搜索
|
||||||
*/
|
*/
|
||||||
function handleSearch() {
|
function handleSearch() {
|
||||||
// resetPagination()
|
resetPagination()
|
||||||
// getPageList()
|
getPageList()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -265,16 +151,24 @@ function handleSize({ key }) {
|
|||||||
* @param pageSize
|
* @param pageSize
|
||||||
*/
|
*/
|
||||||
function onTableChange({ current, pageSize }) {
|
function onTableChange({ current, pageSize }) {
|
||||||
// paginationState.current = current
|
paginationState.current = current
|
||||||
// paginationState.pageSize = pageSize
|
paginationState.pageSize = pageSize
|
||||||
// getPageList()
|
getPageList()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 完成
|
* 完成
|
||||||
*/
|
*/
|
||||||
function onOk() {
|
function onOk() {
|
||||||
// getPageList()
|
getPageList()
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 重置
|
||||||
|
*/
|
||||||
|
function handleResetSearch() {
|
||||||
|
searchFormData.value = {}
|
||||||
|
resetPagination()
|
||||||
|
getPageList()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user