|
@@ -0,0 +1,131 @@
|
|
|
+<template>
|
|
|
+ <div class="oa-sys-list-view">
|
|
|
+ <div class="searchBox">
|
|
|
+ <div class="form">
|
|
|
+ <span class="formSpan">项目名称:</span>
|
|
|
+ <el-input v-model="queryParams.xmmc" placeholder="请输入项目名称" style="width: 210px" />
|
|
|
+ </div>
|
|
|
+ <div class="form">
|
|
|
+ <span class="formSpan">项目编号:</span>
|
|
|
+ <el-input v-model="queryParams.xmbh" placeholder="请输入项目名称" style="width: 160px" />
|
|
|
+ </div>
|
|
|
+ <div class="from">
|
|
|
+ <div class="btnBox">
|
|
|
+ <el-button type="primary" style="background: #3485ff" @click="searchHandle">
|
|
|
+ <img src="@/assets/imgs/OA/search.png" class="mr-8px" alt="" />
|
|
|
+ 查询</el-button
|
|
|
+ >
|
|
|
+ <el-button type="danger">
|
|
|
+ <img src="@/assets/imgs/OA/open.png" class="mr-8px" alt="" />
|
|
|
+ 发起签订</el-button
|
|
|
+ >
|
|
|
+ <el-button type="danger">
|
|
|
+ <img src="@/assets/imgs/OA/open.png" class="mr-8px" alt="" />
|
|
|
+ 发起用款</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="tableBox">
|
|
|
+ <div class="table" ref="tableRef">
|
|
|
+ <el-table
|
|
|
+ stripe
|
|
|
+ :data="tableData"
|
|
|
+ style="width: 100%; height: 100%"
|
|
|
+ :style="{ height: tableHeight + 'px' }"
|
|
|
+ :header-cell-style="{
|
|
|
+ background: '#E5F0FB',
|
|
|
+ color: '#233755',
|
|
|
+ height: '50px'
|
|
|
+ }"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="55" />
|
|
|
+ <el-table-column label="序号" width="60">
|
|
|
+ <template #default="scope">{{ scope.$index + 1 }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :show-overflow-tooltip="true" prop="xmmc" label="合同名称" />
|
|
|
+ <el-table-column :show-overflow-tooltip="true" prop="xmmc" label="项目名称" />
|
|
|
+ <el-table-column :show-overflow-tooltip="true" prop="xmmc" label="项目编号" />
|
|
|
+ <el-table-column prop="xmbh" label="责任部门" width="180" />
|
|
|
+ <el-table-column prop="contractAmount" label="分/外包合同额" width="160" />
|
|
|
+ <el-table-column prop="zrbm" label="供应商" width="160" />
|
|
|
+ <el-table-column prop="applyWorker" label="申请人" width="160" />
|
|
|
+ <el-table-column label="是否签合同" width="120">
|
|
|
+ <template #default="scope">{{ scope.row.isSign === 1 ? '是' : '否' }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" fixed="right" width="80">
|
|
|
+ <template #default="scope">
|
|
|
+ <div class="operateBtn" @click="operateClick(scope.row)">
|
|
|
+ <span>查看</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div class="pageBox">
|
|
|
+ <el-pagination
|
|
|
+ v-model:current-page="queryParams.pageNo"
|
|
|
+ :page-size="10"
|
|
|
+ background
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script setup lang="ts">
|
|
|
+import { useRouter } from 'vue-router'
|
|
|
+import request from '@/config/axios'
|
|
|
+
|
|
|
+defineOptions({ name: 'ProjectBook' })
|
|
|
+const router = useRouter()
|
|
|
+const tableRef: any = ref(null)
|
|
|
+const tableHeight: any = ref(0)
|
|
|
+
|
|
|
+interface PageParam {
|
|
|
+ pageNo: number
|
|
|
+ pageSize: number
|
|
|
+}
|
|
|
+interface QueryParams extends PageParam {}
|
|
|
+const queryParams = reactive<QueryParams>({
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 10
|
|
|
+})
|
|
|
+
|
|
|
+const tableData = ref<Array<any>>([])
|
|
|
+const total = ref<number>()
|
|
|
+const searchHandle: () => void = () => {
|
|
|
+ queryProjectListAjax()
|
|
|
+}
|
|
|
+const queryProjectListAjax = async (): Promise<void> => {
|
|
|
+ const urlApi = `/contract-apply/page`
|
|
|
+ const sendData = {
|
|
|
+ ...queryParams
|
|
|
+ }
|
|
|
+ const result = await request.post({ url: urlApi, data: sendData }, '/business')
|
|
|
+ tableData.value = result['records']
|
|
|
+ total.value = result['total']
|
|
|
+}
|
|
|
+queryProjectListAjax()
|
|
|
+
|
|
|
+const handleCurrentChange = (pageNo: number) => {
|
|
|
+ queryParams.pageNo = pageNo
|
|
|
+ queryProjectListAjax()
|
|
|
+}
|
|
|
+const handleSelectionChange = (arrs) => {
|
|
|
+ console.log('arrs---------------')
|
|
|
+ console.log(arrs)
|
|
|
+}
|
|
|
+const operateClick = (row: any) => {
|
|
|
+ router.push({
|
|
|
+ path: '/projectDetail',
|
|
|
+ query: { id: row.id }
|
|
|
+ })
|
|
|
+}
|
|
|
+onMounted(() => {
|
|
|
+ tableHeight.value = tableRef.value.clientHeight
|
|
|
+})
|
|
|
+</script>
|