Browse Source

项目详情页面调整

songxy 1 year ago
parent
commit
74b185b46a

+ 3 - 4
client/src/router/modules/remaining.ts

@@ -161,10 +161,9 @@ const remainingRouter: AppRouteRecordRaw[] = [
         }
       },
       {
-        path: 'subContractAndOutsourcing',
-        component: () =>
-          import('@/views/OaSystem/marketCenter/subContractAndOutsourcing/applyIndex.vue'),
-        name: 'subContractAndOutsourcing',
+        path: 'contractSubOut',
+        component: () => import('@/views/OaSystem/marketCenter/contractSubOut/applyIndex.vue'),
+        name: 'contractSubOut',
         meta: {
           title: '分/外包查询'
         }

+ 2 - 2
client/src/service/contract.ts

@@ -122,7 +122,7 @@ export const getContractSharingList = async (contractId: ContractId) => {
 export const startSubcontractApply = async (projectId: string) => {
   return await request.get(
     {
-      url: '/subcontract-apply/process',
+      url: '/contract-apply/sub/process',
       params: { projectId }
     },
     '/business'
@@ -136,7 +136,7 @@ export const startSubcontractApply = async (projectId: string) => {
 export const startOutsourcingApply = async (projectId: string) => {
   return await request.get(
     {
-      url: '/outsourcing-apply/process',
+      url: '/contract-apply/out/process',
       params: { projectId }
     },
     '/business'

+ 131 - 0
client/src/views/OaSystem/marketCenter/contractSubOut/applyIndex.vue

@@ -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>

+ 0 - 0
client/src/views/OaSystem/marketCenter/subContractAndOutsourcing/signIndex.vue → client/src/views/OaSystem/marketCenter/contractSubOut/signIndex.vue


+ 0 - 139
client/src/views/OaSystem/marketCenter/subContractAndOutsourcing/applyIndex.vue

@@ -1,139 +0,0 @@
-<template>
-  <div class="_ProjectCenterBook">
-    <div class="searchBox">
-      <div class="form">
-        <span class="formSpan">合同类别:</span>
-        <el-select width="160px" v-model="contractType" class="m-2" placeholder="请选择行业">
-          <el-option
-            v-for="item in contractTypes"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          />
-        </el-select>
-      </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>
-        </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'
-          }"
-        >
-          <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 prop="applyDate" label="责任部门" />
-          <el-table-column prop="subAmount" label="分/外包合同额" />
-          <el-table-column prop="subShareWay" label="供应商" />
-          <el-table-column prop="applyWorker" label="申请人" />
-          <el-table-column prop="applyDate" label="申请时间" />
-          <el-table-column label="操作" fixed="right" width="80">
-            <template #default="scope">
-              <div class="operateBtn" @click="operateClick(scope.row)">
-                <span>查看流程</span>
-              </div>
-              <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="15"
-          background
-          layout="total, prev, pager, next, jumper"
-          :total="totalPage"
-          @current-change="handleCurrentChange"
-        />
-      </div>
-    </div>
-  </div>
-</template>
-<script setup lang="ts">
-import { PageParam } from '@/interface/common'
-import request from '@/config/axios'
-import { useMutation } from '@tanstack/vue-query'
-import { reactive } from 'vue'
-
-/**
- * 分包合同和外包合同列表
- *   **/
-defineOptions({ name: 'SubContractAndOutsourcing' })
-interface SearchFormInterface extends PageParam {
-  projectName: string
-}
-const queryParams = ref<SearchFormInterface>({
-  pageNo: 1,
-  pageSize: 10,
-  projectName: ''
-})
-const tableData = ref<any>()
-const totalPage = ref<number>(0)
-const contractType = ref<number>(0)
-const contractTypes = reactive([
-  {
-    label: '全部',
-    value: 0
-  },
-  {
-    label: '分包合同',
-    value: 1
-  },
-  {
-    label: '外包合同',
-    value: 2
-  }
-])
-
-const querySubContractAndOutsourcingByPage = async () => {
-  const subContractUrl: string = '/subcontract-apply/page'
-  const outsourcingUrl: string = '/outsource-apply/page'
-  return await request.post(
-    {
-      url: contractType.value === 1 ? subContractUrl : outsourcingUrl,
-      data: queryParams.value
-    },
-    '/business'
-  )
-}
-const { mutate: querySubContractAndOutsourcingMutate } = useMutation(
-  querySubContractAndOutsourcingByPage,
-  {
-    onSuccess: (data) => {
-      tableData.value = data?.records
-      totalPage.value = data?.total
-    }
-  }
-)
-
-querySubContractAndOutsourcingMutate()
-
-const handleCurrentChange = (val: number) => {
-  queryParams.value.pageNo = val
-  querySubContractAndOutsourcingMutate()
-}
-const searchHandle = () => {
-  queryParams.value.pageNo = 1
-  querySubContractAndOutsourcingMutate()
-}
-const operateClick = (item) => {}
-</script>

+ 1 - 1
client/src/views/OaSystem/oaLayout/content.scss

@@ -108,7 +108,7 @@
     .pageBox {
       position: absolute;
       right: 20px;
-      bottom: 10px;
+      bottom: 0px;
       text-align: right;
     }
   }

+ 1 - 1
client/src/views/OaSystem/projectCenter/projectDetail/components/xmht/index.vue

@@ -370,7 +370,7 @@
                   <el-radio :label="0">否</el-radio>
                 </el-radio-group>
               </td>
-              <td class="th">分包质量把控人:</td>
+              <td class="th">质量把控人:</td>
               <td>
                 <el-input v-model="childContractDetail.qualityControllerName" :disabled="!editor" />
               </td>

+ 3 - 1
client/src/views/OaSystem/projectCenter/projectDetail/projectDetail.vue

@@ -5,7 +5,9 @@
         <div>
           <h2>
             {{ projectDetail?.['xmmc'] ?? '' }}
-            <span class="subTitle">({{ projectDetail?.['xmbh'] ?? '' }})</span>
+            <span class="subTitle" v-show="projectDetail?.['xmbh']"
+              >({{ projectDetail?.['xmbh'] ?? '' }})</span
+            >
             <span class="statu" v-if="projectDetail?.['xmzt'] === 0">立项申请中</span>
             <span class="statu" v-else-if="projectDetail?.['xmzt'] === 1">进行中</span>
             <span class="statu" v-else-if="projectDetail?.['xmzt'] === 2">已结项</span>