Browse Source

提交项目委外页面

ljb 10 months ago
parent
commit
da14a9e3e4

+ 22 - 0
src/api/projectManage/projectList.js

@@ -2,6 +2,18 @@ import request from '@/router/axios';
 
 export const getList = (current, size, params) => {
   return request({
+    url: '/api/kd-scientific/xm/summary',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getAllProjectList = (current, size, params) => {
+  return request({
     url: '/api/kd-scientific/xm/list',
     method: 'get',
     params: {
@@ -12,6 +24,16 @@ export const getList = (current, size, params) => {
   })
 }
 
+export const getDetail = (params) => {
+  return request({
+    url: '/api/kd-scientific/xm/detail',
+    method: 'get',
+    params: {
+      ...params,
+    }
+  })
+}
+
 export const add = (row) => {
   return request({
     url: '/api/kd-scientific/xm/save',

+ 20 - 10
src/components/project-select/index.vue

@@ -17,7 +17,7 @@
 </template>
 
 <script>
-import { getList } from "@/api/projectManage/projectList";
+import { getAllProjectList, getDetail } from "@/api/projectManage/projectList";
 
 export default {
   name: 'ProjectSelect',
@@ -36,25 +36,35 @@ export default {
     this.getProjectList();
   },
   methods: {
-    findProjectObj(value) {
-      let proObj = this.projectList.find(item => item.id === value);
-      return proObj || {};
+    findProjectObj(id, callback) {
+      if (!id) {
+        return;
+      }
+      getDetail({ id }).then(({ data }) => {
+        let detailData = {};
+        if (data.success) {
+          detailData = data.data;
+        }
+        callback && callback(detailData);
+      })
     },
     getProjectList() {
-      getList(1, 99999, this.params).then(({ data }) => {
+      getAllProjectList(1, 99999, this.params).then(({ data }) => {
         if (data.success) {
           this.projectList = data.data.records;
           this.xmId = this.value;
 
-          let currPro = this.findProjectObj(this.value);
-          this.$emit('change', currPro);
+          this.findProjectObj(this.value, proData => {
+            this.$emit('change', proData);
+          });
         }
       })
     },
     handleProjectChange(val) {
-      let currPro = this.findProjectObj(this.value);
-      this.$emit('input', val);
-      this.$emit('change', currPro);
+      this.findProjectObj(val, proData => {
+        this.$emit('input', val);
+        this.$emit('change', proData);
+      });
     },
   }
 }

+ 7 - 2
src/option/projectManage/projectList.js

@@ -51,7 +51,7 @@ export default {
     },
     {
       label: '项目负责人',
-      prop: 'xmfzr',
+      prop: 'xmfzrxm',
       type: 'input',
       width: 100,
       align: 'center',
@@ -69,12 +69,17 @@ export default {
     },
     {
       label: '项目状态',
-      prop: 'xmzt',
+      prop: 'status',
       type: 'select',
       width: 90,
       align: 'center',
       search: true,
       showOverflowTooltip: true,
+      dicUrl: '/api/kd-system/dict-biz/dictionary?code=project_state',
+      props: {
+        label: 'dictValue',
+        value: 'dictKey',
+      },
     },
     {
       label: '项目报告进度',

+ 5 - 5
src/views/project-manage/components/accept-form.vue

@@ -76,23 +76,23 @@
     <avue-form v-model="formData" :option="option" style="margin-top: 30px; padding: 0;">
       <template slot="ysbgLabel">
         <label>验收报告</label>
-        <el-link type="primary" style="position: absolute; left: 220px;">下载模板</el-link>
+        <el-link type="primary" style="position: absolute; left: 220px; z-index: 1;">下载模板</el-link>
       </template>
       <template slot="jsbgLabel">
         <label>技术报告</label>
-        <el-link type="primary" style="position: absolute; left: 220px;">下载模板</el-link>
+        <el-link type="primary" style="position: absolute; left: 220px; z-index: 1;">下载模板</el-link>
       </template>
       <template slot="cgbgLabel">
         <label>成果报告</label>
-        <el-link type="primary" style="position: absolute; left: 220px;">下载模板</el-link>
+        <el-link type="primary" style="position: absolute; left: 220px; z-index: 1;">下载模板</el-link>
       </template>
       <template slot="xybgLabel">
         <label>效益报告</label>
-        <el-link type="primary" style="position: absolute; left: 220px;">下载模板</el-link>
+        <el-link type="primary" style="position: absolute; left: 220px; z-index: 1;">下载模板</el-link>
       </template>
       <template slot="yspwLabel">
         <label>验收批文</label>
-        <el-link type="primary" style="position: absolute; left: 220px;">下载模板</el-link>
+        <el-link type="primary" style="position: absolute; left: 220px; z-index: 1;">下载模板</el-link>
       </template>
     </avue-form>
     <p class="tip">注:可一次上传多个相关文件(文档、表格、图片等)。 支持格式:DOC, PDF, Excel, PNG, JPG, PPT 等。 请确保文件内容清晰有效。</p>

+ 0 - 1
src/views/project-manage/components/all-budget-table.vue

@@ -109,7 +109,6 @@ export default {
     },
   },
   mounted() {
-    console.log(this.projectId)
     this.currProjectId = this.projectId || '';
   },
   methods: {

+ 3 - 3
src/views/project-manage/components/apply-form.vue

@@ -142,15 +142,15 @@
     <avue-form v-model="formData" :option="option" style="margin-top: 30px; padding: 0;">
       <template slot="lxpwLabel">
         <label>立项批文</label>
-        <el-link type="primary" style="position: absolute; left: 220px;">下载模板</el-link>
+        <el-link type="primary" style="position: absolute; left: 220px; z-index: 1;">下载模板</el-link>
       </template>
       <template slot="lxbgLabel">
         <label>立项报告</label>
-        <el-link type="primary" style="position: absolute; left: 220px;">下载模板</el-link>
+        <el-link type="primary" style="position: absolute; left: 220px; z-index: 1;">下载模板</el-link>
       </template>
       <template slot="qtzlLabel">
         <label>其他资料</label>
-        <el-link type="primary" style="position: absolute; left: 220px;">下载模板</el-link>
+        <el-link type="primary" style="position: absolute; left: 220px; z-index: 1;">下载模板</el-link>
       </template>
     </avue-form>
     <p class="tip">注:可一次上传多个相关文件(文档、表格、图片等)。 支持格式:DOC, PDF, Excel, PNG, JPG, PPT 等。 请确保文件内容清晰有效。</p>

+ 5 - 5
src/views/project-manage/components/implement-form.vue

@@ -76,23 +76,23 @@
     <avue-form v-model="formData" :option="option" style="margin-top: 30px; padding: 0;">
       <template slot="jdbgLabel">
         <label>季度报告</label>
-        <el-link type="primary" style="position: absolute; left: 290px;">下载模板</el-link>
+        <el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
       </template>
       <template slot="zqbgLabel">
         <label>中期报告</label>
-        <el-link type="primary" style="position: absolute; left: 290px;">下载模板</el-link>
+        <el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
       </template>
       <template slot="ndbgLabel">
         <label>年度报告</label>
-        <el-link type="primary" style="position: absolute; left: 290px;">下载模板</el-link>
+        <el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
       </template>
       <template slot="lcbbgLabel">
         <label>里程碑报告</label>
-        <el-link type="primary" style="position: absolute; left: 290px;">下载模板</el-link>
+        <el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
       </template>
       <template slot="qtjdxzjbgLabel">
         <label>其他阶段性总结报告</label>
-        <el-link type="primary" style="position: absolute; left: 290px;">下载模板</el-link>
+        <el-link type="primary" style="position: absolute; left: 290px; z-index: 1;">下载模板</el-link>
       </template>
     </avue-form>
     <p class="tip">注:可一次上传多个相关文件(文档、表格、图片等)。 支持格式:DOC, PDF, Excel, PNG, JPG, PPT 等。 请确保文件内容清晰有效。</p>

+ 372 - 0
src/views/project-manage/components/outsourcing-doc.vue

@@ -0,0 +1,372 @@
+<template>
+  <div>
+    <div class="header-btn" style="width: 1200px; margin: 0 auto; text-align: right;">
+      <el-button type="primary">下载</el-button>
+      <el-button type="primary">打印</el-button>
+      <el-button type="primary" @click="handleAddClick">新增</el-button>
+    </div>
+    <div class="doc-page">
+      <h3 class="page-title" style="margin: 24px 0 20px;">委外项目管理</h3>
+      <table class="doc-table">
+        <tbody>
+          <tr>
+            <td class="doc-label">研发项目名称</td>
+            <td class="doc-input">
+              <project-select v-model="currProjectId"></project-select>
+            </td>
+            <td class="doc-label">研发项目编号</td>
+            <td class="doc-input">{{ selProject.xmsqdw }}</td>
+          </tr>
+          <tr>
+            <td colspan="4">
+              <table class="child-table">
+                <thead>
+                  <tr>
+                    <td width="10%">受托方全称</td>
+                    <td width="10%">受托方类型</td>
+                    <td width="10%">合同名称</td>
+                    <td width="10%">委外费用金额(万元)</td>
+                    <td width="8%">是否完成技术合同登记</td>
+                    <td width="8%">技术合同登记类型</td>
+                    <td width="8%">技术合同登记金额(万元)</td>
+                    <td width="31%">附件上传</td>
+                    <td width="5%">操作</td>
+                  </tr>
+                </thead>
+                <tbody>
+                  <tr v-for="(item, index) of  list" :key="index">
+                    <td v-for="key of colKey" :key="key">
+                      <template v-if="key == 'fileTypeList'">
+                        <div class="file-list">
+                          <div class="file-list-item" v-for="(file, fileIdx) of item[key]" :key="fileIdx">
+                            <div class="file-name">{{ file.label }}</div>
+                            <div class="file-url">{{ file.url }}</div>
+                          </div>
+                        </div>
+                      </template>
+                      <span v-else>{{ item[key] }}</span>
+                    </td>
+                    <td width="10%">
+                      <el-button type="text" @click="handleEditClick(item)">编辑</el-button>
+                      <el-button type="text" style="margin-left: 0;">删除</el-button>
+                    </td>
+                  </tr>
+                </tbody>
+              </table>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+
+      <p class="tip">注:可一次上传多个相关文件(文档、表格、图片等)。 支持格式:DOC, PDF, Excel, PNG, JPG, PPT 等。 请确保文件内容清晰有效。</p>
+
+      <el-drawer
+        :visible.sync="drawerVisible"
+        :title="drawerTitle"
+        modal-append-to-body
+        append-to-body
+        size="500px"
+        destroy-on-close
+      >
+        <avue-form v-model="form" :option="option">
+
+        </avue-form>
+      </el-drawer>
+    </div>
+  </div>
+</template>
+
+<script>
+import projectSelect from "@/components/project-select";
+
+export default {
+  props: {
+    projectId: [String, Number]
+  },
+  components: {
+    projectSelect
+  },
+  data() {
+    return {
+      list: [{
+        stfmc: '111',
+        stflx: '境内个人',
+        htmc: '333',
+        wwfyje: 20,
+        isDj: '是',
+        htlx: '技术开发合同',
+        htje: 20,
+        fileTypeList: [{
+          label: '技术合同协议',
+          url: 'aaa.doc'
+        }, {
+          label: '委外费用发票',
+          url: 'bbb.doc'
+        }, {
+          label: '技术合同登记证明',
+          url: 'ccc.doc'
+        }, {
+          label: '受托方交付成果',
+          url: 'ddd.doc'
+        }, {
+          label: '其他资料',
+          url: 'eee.doc'
+        }]
+      }],
+      colKey: ['stfmc', 'stflx', 'htmc', 'wwfyje', 'isDj', 'htlx', 'htje', 'fileTypeList'],
+
+      currProjectId: '',
+      selProject: {},
+
+      drawerTitle: '',
+      drawerVisible: false,
+      option:{
+        labelWidth: 170,
+        column:[
+          {
+            label: '受托方全称',
+            prop: 'stfqc',
+            span: 24,
+            rules: [{
+              required: true,
+              message: "请输入受头发全称",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: '受托方类型',
+            prop: 'stflx',
+            span: 24,
+            type: 'select',
+            dicUrl: '/api/kd-system/dict-biz/dictionary?code=trustee_type',
+            props: {
+              label: 'dictValue',
+              value: 'dictKey',
+            },
+            rules: [{
+              required: true,
+              message: "请选择受托方类型",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: '合同名称',
+            prop: 'htmc',
+            span: 24
+          },
+          {
+            label: '委外费用金额(万元)',
+            prop: 'htmc',
+            span: 24,
+            type: 'number',
+            min: 0,
+            precision: 2,
+          },
+          {
+            label: '是否完成技术合同登记',
+            prop: 'sfwcjshtdj',
+            span: 24,
+            type: 'select',
+            dicUrl: '/api/kd-system/dict-biz/dictionary?code=yes_or_no',
+            props: {
+              label: 'dictValue',
+              value: 'dictKey',
+            },
+            rules: [{
+              required: true,
+              message: "请选择",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: '技术合同类型',
+            prop: 'jshtlx',
+            span: 24,
+            type: 'select',
+            dicUrl: '/api/kd-system/dict-biz/dictionary?code=contract_registration_type',
+            props: {
+              label: 'dictValue',
+              value: 'dictKey',
+            },
+          },
+          {
+            label: '技术合同登记金额(万元)',
+            prop: 'htmc',
+            span: 24,
+            type: 'number',
+            min: 0,
+            precision: 2,
+          },
+          {
+            label: "技术合同协议",
+            prop: "jshtxy",
+            type: "upload",
+            multiple: true,
+            span: 24,
+            dataType: "object",
+            propsHttp: {
+              url: "link",
+              name: "originalName",
+              res: "data",
+            },
+            action: '/api/kd-resource/oss/endpoint/put-file',
+          },
+          
+          {
+            label: "委外费用发票",
+            prop: "wwfyfp",
+            type: "upload",
+            multiple: true,
+            span: 24,
+            dataType: "object",
+            propsHttp: {
+              url: "link",
+              name: "originalName",
+              res: "data",
+            },
+            action: '/api/kd-resource/oss/endpoint/put-file',
+          },
+          {
+            label: "技术合同登记证明",
+            prop: "jshtdjzm",
+            type: "upload",
+            multiple: true,
+            span: 24,
+            dataType: "object",
+            propsHttp: {
+              url: "link",
+              name: "originalName",
+              res: "data",
+            },
+            action: '/api/kd-resource/oss/endpoint/put-file',
+          },
+          {
+            label: "受托方交付成果",
+            prop: "stfjfcg",
+            type: "upload",
+            multiple: true,
+            span: 24,
+            dataType: "object",
+            propsHttp: {
+              url: "link",
+              name: "originalName",
+              res: "data",
+            },
+            action: '/api/kd-resource/oss/endpoint/put-file',
+          },
+          {
+            label: "其他资料",
+            prop: "qtzl",
+            type: "upload",
+            multiple: true,
+            span: 24,
+            dataType: "object",
+            propsHttp: {
+              url: "link",
+              name: "originalName",
+              res: "data",
+            },
+            action: '/api/kd-resource/oss/endpoint/put-file',
+          },
+        ]
+      },
+      form: {},
+
+    };
+  },
+  methods: {
+    handleAddClick() {
+      this.drawerVisible = true;
+      this.drawerTitle = '新增委外信息';
+    },
+    handleEditClick(data) {
+      this.drawerVisible = true;
+      this.form = { ...data };
+      this.drawerTitle = '编辑委外信息';
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.page-title {
+  text-align: center;
+  font-size: 24px;
+}
+
+.doc-page {
+  width: 1200px;
+  margin: 30px auto;
+}
+.doc-table {
+  width: 100%;
+  border: 1px solid #333;
+}
+.doc-label {
+  text-align: center;
+  padding: 6px;
+  color: #777;
+  font-size: 14px;
+  width: 15%;
+}
+.doc-input {
+  text-align: center;
+  color: #333;
+  width: 35%;
+}
+.doc-table tr td {
+  border: 1px solid #333;
+}
+
+
+.child-table tr {
+  td {
+    border: none;
+    border-right: 1px solid #333;
+    // padding: 6px;
+    padding: 0 6px;
+    text-align: center;
+    color: #666;
+    font-size: 14px; 
+    &:last-child {
+      border: none;
+    }
+  }
+}
+
+.child-table thead tr {
+  border-bottom: 1px solid #333;
+}
+
+.child-table tbody tr {
+  border-bottom: 1px solid #333;
+  &:last-child {
+    border-bottom: 0;
+  } 
+}
+
+.file-list {
+  &-item {
+    display: flex;
+    border-bottom: 1px solid #333;
+    line-height: 32px;
+    text-align: center;
+    .file-name {
+      width: 40%;
+      border-right: 1px solid #333;
+    }
+    .file-url {
+      width: 60%;
+    }
+    &:last-child {
+      border-bottom: 0;
+    }
+  }
+}
+
+.tip {
+  color: red;
+  margin-top: 12px;
+  font-size: 12px;
+}
+</style>

+ 7 - 2
src/views/project-manage/outsourcing.vue

@@ -1,9 +1,14 @@
 <template>
-  <div>委外项目</div>
+  <basic-container>
+    <outsourcing-doc></outsourcing-doc>
+  </basic-container>
 </template>
 
 <script>
+import outsourcingDoc from './components/outsourcing-doc.vue';
 export default {
-  
+  components: {
+    outsourcingDoc
+  }
 }
 </script>