Browse Source

Merge remote-tracking branch 'origin/mergeBranch' into mergeBranch

qymljy 2 years ago
parent
commit
8b10c6c496

+ 1 - 4
src/HDrpManagement/AccountMoney/modules/detail.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-button size="mini" type="text" @click="editBtn">详 情</el-button>
-    <el-dialog title="新 增" :visible.sync="dialogFormVisible" width="60%">
+    <el-dialog title="新 增" :visible.sync="dialogFormVisible" width="80%">
       <div slot="title" style="font-size: 15px">
         资金流水账
       </div>
@@ -26,9 +26,6 @@
         <template v-slot:tbOpreation="scope">
         </template>
       </basicLayout>
-      <div class="dialog-footer">
-        <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
-      </div>
     </el-dialog>
     
   </div>

+ 4 - 5
src/HDrpManagement/projectChange/modules/modules/stageTask/components/Editor.vue

@@ -40,12 +40,11 @@ export default {
   watch:{
   },
   methods: {
-    deleteSuccess () {
-
+    deleteSuccess (data) {
+      console.log(data);
+      this.$emit('deleteSuccess',data)
     },
     async queryAttments (data) {
-      console.log(data);
-      
       let param = {
         "classname": "system.attachment.Attachment",
         "method": "createFileLink",
@@ -57,7 +56,7 @@ export default {
         }
       }
       let res = await this.$api.requested(param)   
-      this.$emit('onSuccess',res.data.data[0])   
+      this.$emit('onSuccess',res.data[0])   
     }
   },
 };

+ 0 - 223
src/HDrpManagement/projectChange/modules/modules/stageTask/components/edit.vue

@@ -1,223 +0,0 @@
-<template>
-  <div>
-    <div class="bottom">
-      <div class="file-box">
-        <file-item :isDownLoad="false" :isDelete="true" :itemStyle="itemDrawerStyle" :fileData="upload_panl.attinfos"
-          @deleteSuccess="deleteSuccess"></file-item>
-      </div>
-      <upload slot="upload" :folderid="folderid"
-        :bindData="{ ownertable: idname.slice(0, idname.length - 2), ownerid: data[idname], usetype: '' }"
-        @onSuccess="queryAttments"></upload>
-    </div>
-  </div>
-
-</template>
-
-<script>
-import FileItem from '@/components/file-block/index'
-import upload from '@/components/upload/hw_obs_upload.vue'
-export default {
-  props:['data'],
-  name: 'SubmiteditItemInfo',
-  data() {
-    return {
-      isFileInfoPanlShow: false,
-      itemDrawerStyle: {
-        img: {
-          width: 53,
-          height: 64
-        },
-        title: 16,
-        descript: 12
-      },
-    };
-  },
-  components: {
-    FileItem,
-    upload
-  },
-  computed: {
-  },
-  watch: {
-   
-  },
-  methods: {
-    actionSubmit() {
-      
-    },
-   
-    async save() {
-      //新增
-      if (this.param.content.content == '' && this.detailData.istextrequired == 1) {
-        return this.$notify({
-          title: '提示',
-          message: '请编辑内容',
-          type: 'warning'
-        })
-      }
-      if (this.upload_panl.attinfos.length == 0 && this.detailData.isattrequired == 1) {
-        return this.$notify({
-          title: '提示',
-          message: '请上传附件',
-          type: 'warning'
-        })
-      }
-      this.param.content.sat_submiteditmodelid =  this.upload_panl.sat_submiteditmodelid
-      this.param.content.sat_submiteditid = this.editData ? this.editData.sat_submiteditid : this.upload_panl.sat_submiteditid
-
-      if (this.editData) {
-        let res = await this.$api.requested(this.param).then(res => {
-          this.tool.showMessage(res, async () => {
-            this.upload_panl = ''
-            this.param.content.content = ''
-            this.param = {
-              "classname": "saletool.submitedit.submitedit",
-              "method": "insertorupdate",
-              "content": {
-                "sat_submiteditmodelid": "",
-                "content": "",
-                "sat_submiteditid": "0"
-              }
-            }
-            this.$api.requested({
-              "classname": "saletool.submitedit.submitedit",
-              "method": "sub_submitdetailed",
-              "content": {
-                "onceonly": this.$route.query.type == 'more' ? 1 : 0,
-                "sat_submiteditmodelid": res.data.sat_submiteditmodelid,
-                "sat_submiteditid": res.data.sat_submiteditid
-              }
-            }).then(res => {
-              if (res.code == 1) {
-                this.$parent.getDetailData()
-                this.isFileInfoPanlShow = false
-                if (this.$route.query.type != 'more') {
-                  this.disabled = true
-                  window.sessionStorage.setItem('history', 1)
-                }
-              }
-            })
-          })
-        })
-      } else {
-        let res = await this.$api.requested(this.param)
-        this.upload_panl.status = '发布'
-        this.tool.showMessage(res, async () => {
-          //提交提报明细
-          let param2 = {
-            "classname": "saletool.submitedit.submitedit",
-            "method": "sub_submitdetailed",
-            "content": {
-              "onceonly": this.$route.query.type == 'more' ? 1 : 0,
-              "sat_submiteditmodelid": this.detailData.sat_submiteditmodelid,
-              "sat_submiteditid": this.upload_panl.sat_submiteditid
-            }
-          }
-          let res = await this.$api.requested(param2)
-          if (res.code != 1) return console.log('错误');
-          this.upload_panl.status = '发布'
-          this.upload_panl.attinfos = null
-          this.param = {
-            "classname": "saletool.submitedit.submitedit",
-            "method": "insertorupdate",
-            "content": {
-              "sat_submiteditmodelid": "",
-              "content": "",
-              "sat_submiteditid": "0"
-            }
-          }
-          if (this.$route.query.type != 'more') {
-            this.disabled = true
-            window.sessionStorage.setItem('history', 1)
-          }
-          this.isFileInfoPanlShow = false
-          this.$parent.getDetailData()
-        })
-      }
-    },
-    async onSuccess(id) {
-      this.fileId = id
-      let param = {
-        "classname": "system.attachment.Attachment",
-        "method": "createFileLink",
-        "content": {
-          "ownertable": "sat_submitedit",
-          "ownerid": this.editData ? this.editData.sat_submiteditid : this.upload_panl.sat_submiteditid,
-          "usetype": "default",
-          "attachmentids": [
-            id
-          ]
-        }
-      }
-      let res = await this.$api.requested(param)
-      this.tool.showMessage(res, () => {
-        this.upload_panl.attinfos = this.fileType.fileList(this.upload_panl.attinfos.concat(res.data[0]))
-      })
-    },
-    deleteSuccess(data) {
-      this.editData ? this.editData.attinfos.splice(data, 1) : this.upload_panl.attinfos.splice(data, 1)
-    }
-  },
-};
-</script>
-
-<style scoped>
-* {
-  box-sizing: border-box;
-}
-
-/deep/ .el-drawer__header {
-  margin-bottom: 0;
-}
-
-/deep/ .el-drawer {
-  width: 546px !important;
-}
-
-.el-drawer__body .btn1 {
-  margin: 20px 0 20px 20px;
-  width: 88px;
-  height: 36px;
-  background: #fa8c16;
-}
-
-.el-drawer__body .content {
-  border-bottom: 10px solid #fafafa;
-  padding: 0 0 20px 20px;
-}
-
-.el-drawer__body .content p:first-child {
-  font-size: 16px;
-  font-weight: bold;
-  color: #333333;
-  margin-bottom: 20px;
-}
-
-.el-drawer .file-box p {
-  margin: 20px 0 20px 0;
-  font-size: 16px;
-  font-weight: bold;
-  color: #333333;
-  margin-bottom: 20px;
-}
-
-.el-drawer .file-box .file {
-  display: flex;
-  flex-wrap: wrap;
-}
-
-.upload {
-  display: flex;
-  margin-top: 20px;
-}
-
-/deep/.upload .el-button {
-  width: 100%;
-  border: 1px solid #3874f6;
-  color: #3874f6;
-}
-
-.bottom {
-  padding: 0 20px;
-}
-</style>

+ 50 - 18
src/HDrpManagement/projectChange/modules/modules/stageTask/index.vue

@@ -16,7 +16,7 @@
     </el-steps>
     <el-card class="box-card">
       <div slot="header" class="clearfix">
-        <span>阶段任务</span>
+        <span style="font-weight:bold">阶段任务</span>
         <el-button 
           style="border:1px solid #3874F6;color:#3874F6" 
           :disabled="currentData.active != 0" 
@@ -27,12 +27,20 @@
       <div class="task" v-for="(item,index) in currentData.work" :key="index">
         <div class="task-header">
           <span class="task-header-title">任务{{index+1}}</span>
-          <span class="task-header-status">未开始</span>
+          <span class="task-header-status" v-if="item.finished" style="color:#3874F6">已完成</span>
+          <span class="task-header-status" style="color:#52C41A" v-else-if="item.isfollow">跟进中</span>
+          <span class="task-header-status" v-else>未开始</span>
         </div>
         <div class="content">
-          <p>任务名称:{{item.workname}}</p>
-          <p>任务分值:{{item.score}}</p>
-          <p>任务描述:{{item.remarks}}</p>
+          <el-descriptions :column="2">
+            <el-descriptions-item label="任务名称">{{ item.workname ? item.workname:'' }}</el-descriptions-item>
+            <el-descriptions-item label="任务分值">{{ item.score ? item.score:'' }}</el-descriptions-item>
+            <el-descriptions-item label="任务描述">{{ item.remarks ? item.remarks:'' }}</el-descriptions-item>
+            <el-descriptions-item label="用户提交内容">{{ item.notes ? item.notes:'' }}</el-descriptions-item>
+          </el-descriptions>
+          <div class="file">
+            <file-item :isDownLoad="true" :isDelete="false" :itemStyle="itemDrawerStyle" :fileData="fileType.fileList(item.attinfos)"></file-item>
+          </div>
         </div>
         <div class="task-footer">
           <div class="btn">
@@ -60,14 +68,15 @@
         </div>
       </div>
       <div class="container">
-        <el-descriptions title="任务信息">
+        <el-descriptions title="任务信息" :column="1">
           <el-descriptions-item label="任务名称">{{ editData.workname }}</el-descriptions-item>
           <el-descriptions-item label="任务分值">{{ editData.score }}</el-descriptions-item>
           <el-descriptions-item label="任务描述">{{ editData.remarks }}</el-descriptions-item>
         </el-descriptions>
-        <el-descriptions title="完成描述" />
+        <el-divider></el-divider>
+        <el-descriptions title="提交内容" />
         <el-input type="textarea" v-model="param.content.notes" placeholder="请填写完成的具体情况"></el-input>
-        <Editor :data="editData" @onSuccess="upLoad"/>
+        <Editor :data="editData" @deleteSuccess="deleteSuccess" @onSuccess="upLoad"/>
       </div>
     </el-drawer>
   </div>
@@ -75,8 +84,10 @@
 
 <script>
 import Editor from './components/Editor'
+import { log } from '@antv/g2plot/lib/utils';
+import FileItem from '@/components/file-block/index'
 export default {
-  components:{Editor},
+  components:{Editor,FileItem},
   props:['rowData'],
   name: '',
   data() {
@@ -92,7 +103,17 @@ export default {
             "sa_project_stageworkid": "",
             "notes":""
         }
-      }
+      },
+      itemDrawerStyle: {
+        itemWidth:300,
+        margin:10,
+        img: {
+          width: 40,
+          height: 40
+        },
+        title: 12,
+        descript: 10
+      },
     };
   },
   computed:{
@@ -120,8 +141,12 @@ export default {
     this.getStageList(true)
   },
   methods: {
-    upLoad () {
-      
+    deleteSuccess (data) {
+      let num = this.editData.attinfos.find( item => item.attachmentid == data.attachmentid)
+      this.editData.attinfos.splice(this.editData.attinfos.indexOf(num),1)
+    },
+    upLoad (data) {
+      this.editData.attinfos.push(data)
     },
     editBtn (data) {
       this.dialogFormVisible = true
@@ -147,12 +172,14 @@ export default {
       })
       this.stageList = res.data
       /* 如果已有阶段 默认id释放 */
-      if(this.calcIndex) this.clickCurrent = null
-      if (no) {
+      if(this.calcIndex) {
+        this.clickCurrent = null
+        this.currentData = this.stageList[this.calcIndex]
+        console.log(this.currentData);
+        
+      } else {
         this.currentData = this.stageList[0]
       }
-      console.log(this.stageList);
-      
     },
     /* 单击阶段 */
     stageClick (val,item) {
@@ -218,9 +245,9 @@ export default {
     transform: skew(-20deg);
     padding: 5px 10px;
     background: #EEEEEE;
+    color: #000000;
   }
   .item .content span:first-child {
-    color: #000000;
     transform: skew(20deg);
   }
   .item .content span:last-child {
@@ -230,7 +257,6 @@ export default {
     border-radius: 30%;
     color: #000000;
     transform: skew(20deg);
-
   }
   .enterStatus {
     background: #3874F6 !important;
@@ -269,6 +295,9 @@ export default {
   .box-card .task:last-child {
     border-bottom: none;
   }
+  .box-card .task:first-child {
+    border-top: 15px solid #F5F5F5;
+  }
   .box-card .task .task-header {
     display: flex;
     justify-content: space-between;
@@ -287,4 +316,7 @@ export default {
   .box-card .task .task-footer .btn {
     margin:0 10px 10px 0;
   }
+  .box-card .task .content p {
+    margin-bottom: 10px;
+  }
 </style>