Procházet zdrojové kódy

解决查看单据项目一样的问题,任务进展样式调整

Lljy-ai před 4 roky
rodič
revize
2968613ea3

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/config/index.js

@@ -1,8 +1,8 @@
 var path = require('path')
 
 
- var ip = '192.168.2.21'
-//  var ip = '47.100.37.243'
+//  var ip = '192.168.2.21'
+ var ip = '47.100.37.243'
 //  47.100.37.243
 // var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
 // for (var i in ifaces) {

+ 16 - 5
fhKeeper/formulahousekeeper/timesheet/src/routes.js

@@ -39,6 +39,9 @@ import PdfView from './views/pdf/pdfview';
 // 费用报销
 import expense from './views/expense/expense'
 
+// 权限管理
+// import jurisdiction from './views/jurisdiction/jurisdiction'
+
 Vue.use(Router)
 
 export const fixedRouter = [
@@ -165,13 +168,21 @@ export const manageRouter = [
         iconCls: 'iconfont firerock-iconcaiwu',
         leaf: true,
         children: [
-            { 
-                path: '/expense', 
-                component: expense, 
-                name: '费用报销', 
-            }
+            { path: '/expense', component: expense, name: '费用报销' }
         ]
     },
+    
+    // 权限管理
+    // {
+    //     path: '/',
+    //     component: Home,
+    //     name: '权限管理',
+    //     iconCls: 'iconfont firerock-iconsetting',
+    //     leaf: true,
+    //     children: [
+    //         { path: '/jurisdiction', component: jurisdiction, name: '权限管理' }
+    //     ]
+    // },
 
     //项目管理
     {

+ 68 - 27
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -47,11 +47,14 @@
     <!-- 内容主体区域 -->
   <div class="contents">
     <!-- 上面部分 -->
-      <div class="staff" ref="staff" style="margin-left: 200px" v-if="!displayTable">
+    <div ref="staff" style="margin: 20px 20px 0 220px; width: 69%" >
+      <div class="staff" v-if="!displayTable">
         <!-- 公共 -->
         <div class="public">
           <el-form :model="addForm" label-width="80px">
             <!-- <el-form :model="form" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> -->
+              <h3 style="margin: 0;padding: 25px 0 0 25px;color: #20A0FF;display: block">{{shuz[ins]}}</h3>
+              <span class="pu_bu_t" @click="submits"> <i class="el-icon-circle-check"></i> 提交</span>
             <!-- 填报人 -->
             <el-form-item label="填报人">
               <el-select v-model="addForm.ownerId" placeholder="请选择填报人" style="width: 150px">
@@ -89,7 +92,9 @@
         </div>
         <!-- 按钮 -->
         <div class="pu_button">
-          <el-button type="primary" @click="addxz">新增</el-button>
+          <!-- <el-button type="primary" @click="addxz">新增</el-button> -->
+          <span class="pu_bu_x" @click="addxz"> <i class="el-icon-circle-plus-outline"></i> 新增填报</span>
+          <!-- <span class="pu_bu_t" @click="submits"> <i class="el-icon-circle-check"></i> 提交</span> -->
         </div>
 
         <!-- 表格 -->
@@ -112,7 +117,7 @@
                 </el-date-picker>
               </template>
             </el-table-column>
-            <el-table-column label="发票种类" width="170px">
+            <el-table-column label="发票种类" width="175px">
               <template slot-scope="scope">
                 <el-select v-model="scope.row.invoiceType" placeholder="请选择费用类型" style="width: 150px;">
                   <el-option label="增值税专用发票" value="0"></el-option>
@@ -154,11 +159,13 @@
           </el-table>
         </div>
 
-        <el-button class="submits" type="warning" @click="submits">提交</el-button>
+        <!-- <el-button class="submits" type="warning" @click="submits">提交</el-button> -->
       </div>
-
-      <!-- 下面部分 -->
-      <div class="staff" ref="sta" style="margin-left: 200px" v-if="displayTable">
+    </div>
+  </div>
+  <!-- 下面部分 -->
+  <div class="xiamian" ref="xiaomian" style="width: 85%;float:right;background: #fff;position: relative;">
+      <div v-if="displayTable">
         <div style="padding:10px;">
           <div>
           <el-form label-width="80px" inline>
@@ -260,7 +267,7 @@
                   <el-select v-if="!flg" v-model="scope.row.projectId" placeholder="项目" style="width: 150px">
                     <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName" :value="item.id" @click="ok(item)"></el-option>
                   </el-select>
-                  <span v-else>{{projectIdName}}</span>
+                  <span v-else>{{projectIdName[scope.$index].projectName}}</span>
                 </template>
             </el-table-column>
             <el-table-column prop="happenDate" label="费用日期" width="172">
@@ -288,25 +295,25 @@
             <el-table-column prop="invoiceNo" label="发票号">
               <template slot-scope="scope">
                 <el-input v-if="!flg" v-model.number="scope.row.invoiceNo"></el-input>
-                <span v-else>{{scope.row.amount}}</span>
+                <span v-else>{{scope.row.invoiceNo}}</span>
               </template>
             </el-table-column>
             <el-table-column prop="taxPercent" label="税率%">
               <template slot-scope="scope">
                 <el-input v-if="!flg" v-model.number="scope.row.taxPercent"></el-input>
-                <span v-else>{{scope.row.amount}}</span>
+                <span v-else>{{scope.row.taxPercent}}</span>
               </template>
             </el-table-column>
             <el-table-column prop="taxValue" label="税额">
               <template slot-scope="scope">
                 <el-input v-if="!flg" v-model.number="scope.row.taxValue"></el-input>
-                <span v-else>{{scope.row.amount}}</span>
+                <span v-else>{{scope.row.taxValue}}</span>
               </template>
             </el-table-column>
             <el-table-column prop="remark" label="备注">
               <template slot-scope="scope">
                 <el-input v-if="!flg" v-model.number="scope.row.remark"></el-input>
-                <span v-else>{{scope.row.amount}}</span>
+                <span v-else>{{scope.row.remark}}</span>
               </template>
             </el-table-column>
           </el-table>
@@ -361,6 +368,8 @@ export default {
       ParticularsList: [],
       projectIdName: [], // 点击查看的项目名
       flg: false, // 是否禁用
+      shuz: ['一般费用填报', '差旅费用填报', '外包费用填报'],
+      ins: 0
     };
   },
   computed: {},
@@ -383,7 +392,7 @@ export default {
     // 单据查看
     downloadByA(val) {
       this.dialog = true
-      this.flg = true
+      this.flg = true;
       this.getParticulars(val.id)
     },
     // 单据编辑
@@ -600,9 +609,16 @@ export default {
     getParticulars(id) {
       this.http.post('/expense-sheet/getDetail', {id: id},
       res => {
-            if (res.code == "ok") {
+            if (res.code == "ok") {this
                 this.ParticularsList = res.data
-                this.projectIdName = this.projectList.filter(p => p.id == this.ParticularsList.invoiceList[0].projectId)[0].projectName
+                var s = []
+                for(var i = 0; i <= this.ParticularsList.invoiceList.length - 1; i++) {
+                  s.push(this.ParticularsList.invoiceList[i].projectId)
+                }
+                this.projectIdName =  this.projectList.filter( item => {return s.indexOf(item.id) !== -1})
+                // this.projectIdName = this.projectList.filter(p => p.id == this.ParticularsList.invoiceList[0].projectId)[0].projectName
+                console.log(this.projectIdName);
+                console.log(this.projectList);
             } else {
                 this.$message({
                 message: res.msg,
@@ -667,6 +683,7 @@ export default {
       console.log(index);
       this.z = index
       this.addForm.type = index
+      this.ins = index
     },
     
     // 点击侧边栏事件
@@ -676,17 +693,19 @@ export default {
         this.$refs.sid.style.left = '230px'
         this.$refs.side.style.left = '1px'
         this.$refs.sideI.className = 'el-icon-arrow-right'
-        this.$refs.staff.style.marginLeft = '0px'
-        this.$refs.sta.style.marginLeft = '0px'
+        this.$refs.staff.style.margin = '20px 20px 0 20px'
+        this.$refs.staff.style.width = '95%'
+        this.$refs.xiaomian.style.width = '100%'
       } else {
         this.$refs.sidebars.style.display = 'block'
         this.$refs.sid.style.left = '430px'
         this.$refs.side.style.left = '-19px'
         this.$refs.sideI.className = 'el-icon-arrow-left'
-        this.$refs.staff.style.marginLeft = '200px'
-        this.$refs.sta.style.marginLeft = '200px'
+        this.$refs.staff.style.margin = '20px 20px 0 220px'
+        this.$refs.staff.style.width = '69%'
+        this.$refs.xiaomian.style.width = '85%'
       }
-    }
+    },
   },
 };
 </script>
@@ -710,23 +729,44 @@ export default {
 }
 
 .public {
-  height: 185px;
+  height: 230px;
   border-bottom: 1px solid #ddd;
 }
 .public .el-form-item {
  display: inline-block;
 }
 .pu_button {
-  margin-top: 20px;
+  text-align: right;
   width: 100%;
-  height: 80px;
-  background: #F2F2F2;
-  padding: 20px 0 0 20px;
+  padding: 24px 30px;
   box-sizing: border-box;
 }
+.pu_bu_x .pu_bu_t {
+  display: inline-block;
+}
+.pu_bu_x {
+  margin-right: 20px;
+  color: #20A0F7;
+  cursor: pointer;
+}
+.pu_bu_t {
+  color: #20A0F7;
+  cursor: pointer;
+  display: block; 
+  float: right; 
+  position: 
+  relative; 
+  top: -20px; 
+  right: 63px;
+}
 .pu_table {
   margin-left: 10px;
-  margin-top: 10px;
+}
+.pu_bu_t:hover {
+  color: #7bbcff;
+}
+.pu_bu_x:hover {
+  color: #7bbcff;
 }
 
 /* 我的单据报销凭证 */
@@ -803,8 +843,9 @@ export default {
 /* 右边整体页面 */
 .contents {
   height: 100%;
-  padding: 30px;
+  /* padding: 30px; */
   background: #F7F7F7;
+  position: absolute;
 }
 
 .submits {

+ 21 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/jurisdiction/jurisdiction.vue

@@ -0,0 +1,21 @@
+<template>
+  <div>权限管理</div>
+</template>
+
+<script>
+export default {
+  name: "",
+  components: {},
+  props: {},
+  data() {
+    return {};
+  },
+  computed: {},
+  watch: {},
+  created() {},
+  mounted() {},
+  methods: {},
+};
+</script>
+<style scoped>
+</style>

+ 5 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/earning.vue

@@ -43,7 +43,11 @@
                                 {{scope.row.profitC}}%
                             </template>
                         </el-table-column>
-                        <el-table-column prop="contractAmount" label="项目金额" ></el-table-column>
+                        <el-table-column prop="contractAmount" label="项目金额" width="110" >
+                            <template slot-scope="scope">
+                               <span style="font-size: 10px">¥{{scope.row.contractAmount | numberToCurrency}}</span>
+                            </template>
+                        </el-table-column>
                         <el-table-column  label="基线成本" >
                             <el-table-column prop="baseMan" label="人员成本">
                                 <template slot-scope="scope">

+ 69 - 35
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -316,25 +316,27 @@
                     </div>
 
                     <!-- 任务进展列表 -->
-                    <div class="elCard" v-for="item in ProgressList" :key="item.id" style="margin-bottom: 10px;">
-                        <i class="el-icon-success" style="color: #43d14f;" v-if="item.status == 0"></i>
-                        <i class="el-icon-success" style="color: #fd7624;" v-else-if="item.status == 1"></i>
-                        <i class="el-icon-success" style="color: #fd4d47;" v-else></i>
-                        <span v-if="item.status == 0">状态正常</span>
-                        <span v-else-if="item.status == 1">状态正常</span>
-                        <span v-else>状态正常</span>
-                        <!-- <div class="elCard_qu">屈经理更新于7小时前</div> -->
-                        <el-dropdown trigger="click" style="float:right;cursor:pointer; float: right;">
-                                <i class="el-icon-more" ></i>
-                                <el-dropdown-menu slot="dropdown">
-                                    <!-- <el-dropdown-item divided @click.native="deleteStage(stage)"> -->
-                                    <el-dropdown-item divided>
-                                        <span @click="deleteTaskProgress(item.id)"><i class="el-icon-delete"></i>删除列表</span></el-dropdown-item>
-                                </el-dropdown-menu>
-                        </el-dropdown>
-                        <div class="elCard_qu">屈经理更新于{{item.indate | relativeTime}}</div>
-                        <p style="padding-left: 20px;">{{item.content}}</p>
-                        <div class="examine"><el-button type="text" @click="innerVisibless = true" style="color: #8F87A3;">查看历史记录</el-button></div>
+                    <div class="ddl" v-if="ProgressList.length > 0">
+                        <div class="elCard" v-for="item in ProgressList" :key="item.id" style="margin-bottom: 10px; height:" >
+                            <i class="el-icon-success" style="color: #43d14f;" v-if="item.status == 0"></i>
+                            <i class="el-icon-success" style="color: #fd7624;" v-else-if="item.status == 1"></i>
+                            <i class="el-icon-success" style="color: #fd4d47;" v-else></i>
+                            <span v-if="item.status == 0">状态正常</span>
+                            <span v-else-if="item.status == 1">状态正常</span>
+                            <span v-else>进展预期</span>
+
+                            <el-dropdown trigger="click" style="float:right;cursor:pointer; float: right;">
+                                    <i class="el-icon-more" ></i>
+                                    <el-dropdown-menu slot="dropdown">
+
+                                        <el-dropdown-item divided>
+                                            <span @click="deleteTaskProgress(item.id)"><i class="el-icon-delete"></i>删除列表</span></el-dropdown-item>
+                                    </el-dropdown-menu>
+                            </el-dropdown>
+                            <div class="elCard_qu">屈经理更新于{{item.indate | relativeTime}}</div>
+                            <p style="padding-left: 20px;">{{item.content}}</p>
+                            <div class="examine"><el-button type="text" @click="innerVisibless = true" style="color: #8F87A3;">查看历史记录</el-button></div>
+                        </div>
                     </div>
 
                     <!-- 任务列表没有数据的时候展示 -->
@@ -345,30 +347,31 @@
                     <!-- 任务进展完整状态 -->
                     <el-dialog title="提示" :visible.sync="innerVisibless" append-to-body width="500px">
                     <div class="integrity">
-                        <h3 style="font-weight: normal;display: inline-block;margin: 0 0 20px 0;">任务进展:2</h3>
-                        <span class="write"><i class="el-icon-circle-plus"></i>填写进展</span>
+                        <h3 style="font-weight: normal;display: inline-block;margin: 0 0 20px 0;">任务进展:{{ProgressList.length}}</h3>
+                        <!-- <span class="write"><i class="el-icon-circle-plus"></i>填写进展</span> -->
                          <el-divider></el-divider>
 
                          <!--  -->
                             <div class="block" style="height: 200px;">
                                 <el-timeline style="padding:20px 0 0 0;">
                                     <el-timeline-item
-                                    v-for="(activity, index) in activities"
-                                    :key="index"
-                                    :icon="activity.icon"
-                                    :type="activity.type"
-                                    :color="activity.color"
-                                    :size="activity.size"
-                                    :timestamp="activity.timestamp">
-                                    {{activity.content}}
+                                    v-for="(activity, index) in ProgressList"
+                                    :key="index">
+                                    <div class="tb">
+                                        <span v-if="activity.status == 0" style="color: #43D14F" class="icon"></span>
+                                        <span v-if="activity.status == 1" style="color: #FD7624" class="icon"></span>
+                                        <span v-if="activity.status == 2" style="color: red" class="icon"></span>
+                                        <div>
+                                            <span v-if="activity.status == 0" style="color: #43D14F">状态正常</span>
+                                            <span v-if="activity.status == 1" style="color: #FD7624">存在风险</span>
+                                            <span v-if="activity.status == 2" style="color: red">进展预期</span>
+                                            <span style="display: inline-block; float: right; color: #8C8C8C">{{activity.indate | relativeTime}}</span>
+                                        </div>
+                                        <p style="color: #8C8C8C">{{activity.content}}</p>
+                                        
+                                    </div>
                                     </el-timeline-item>
                                 </el-timeline>
-
-                                <!-- <el-steps direction="vertical" finish-status="success" :active="1" style="margin-bottom: 10px"  >
-                                    <el-step title="步骤 1"></el-step>
-                                    <el-step title="步骤 2"></el-step>
-                                    <el-step title="步骤 3" description="这是一段很长很长很长的描述性文字"></el-step>
-                                </el-steps> -->
                             </div>
                          <!--  -->
                     </div>
@@ -771,6 +774,7 @@
                     color: '#F87872'
                     }],
                 ProgressList: [],
+                progres: {},
                 checkboxGrounp: [], // 选中人的数据
                 checkLists: [], // 选中人数据的ID
                 taskIid: null
@@ -886,6 +890,8 @@
                     res => {
                         if (res.code == "ok") {
                             this.ProgressList = res.data;
+                            this.progres = res.data[0]
+                            console.log(this.addForm, '获取到的表单信息');
                             console.log(this.ProgressList, '获取过来的任务进展列表数据');
                         } else {
                             this.$message({
@@ -2506,4 +2512,32 @@
     border-bottom: 1px solid #EBEEF5;
     font-size: 16px;
 }
+
+.icon {
+    /* color: rgb(67, 209, 79); */
+    display: block;
+    width: 12px;
+    height: 12px;
+    background: #fff;
+    position: absolute;
+    top: 0;
+    left: -33px;
+    border-radius: 50%;
+    border: 4px solid;
+}
+
+/* ddl */
+.ddl {
+    height: 136px;
+    overflow: hidden;
+}
+.tb{
+    position: relative;
+}
+.dpl{
+    position: absolute;
+    font-size: 20px;
+    left: -32px;
+    top: 0px;
+}
 </style>