Lljy-ai 4 лет назад
Родитель
Сommit
befabb66ba

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

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

+ 0 - 19
fhKeeper/formulahousekeeper/timesheet/src/Amount .js

@@ -1,19 +0,0 @@
-/* 数字金额逢三加, 比如 123,464.23 */
-export function numberToCurrency(value) {
-    if (!value) return '0.00'
-    // 将数值截取,保留两位小数
-    value = value.toFixed(2)
-    // 获取整数部分
-    const intPart = Math.trunc(value)
-    // 整数部分处理,增加,
-    const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
-    // 预定义小数部分
-    let floatPart = '.00'
-    // 将数值截取为小数部分和整数部分
-    const valueArray = value.toString().split('.')
-    if (valueArray.length === 2) { // 有小数部分
-      floatPart = valueArray[1].toString() // 取得小数部分
-      return intPartFormat + '.' + floatPart
-    }
-    return intPartFormat + floatPart
-  }

+ 14 - 0
fhKeeper/formulahousekeeper/timesheet/src/routes.js

@@ -35,6 +35,9 @@ import timetype from './views/settings/timetype.vue';
 import finance from './views/project/finance';
 import Market from './views/market/list';
 import PdfView from './views/pdf/pdfview';
+
+// 费用报销
+// import expense from './views/expense/expense'
 Vue.use(Router)
 
 export const fixedRouter = [
@@ -153,6 +156,17 @@ export const manageRouter = [
         ]
     },
     
+    // // 费用报销模块
+    // {
+    //     path: '/',
+    //     component: Home,
+    //     name: '费用报销',
+    //     iconCls: 'iconfont firerock-iconcaiwu',
+    //     leaf: true,
+    //     children: [
+    //         { path: '/expense', component: expense, name: '费用报销' }
+    //     ]
+    // },
 
     //项目管理
     {

+ 23 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -0,0 +1,23 @@
+<template>
+  <div class="layout-container">
+      费用报销模块
+  </div>
+</template>
+
+<script>
+export default {
+  name: "",
+  components: {},
+  props: {},
+  data() {
+    return {};
+  },
+  computed: {},
+  watch: {},
+  created() {},
+  mounted() {},
+  methods: {},
+};
+</script>
+<style scoped>
+</style>

+ 0 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/project/earning.vue

@@ -437,8 +437,4 @@
 </script>
 
 <style scoped>
-    .cell{
-        padding-left: 0 !important;
-        text-align: center !important;
-    }
 </style>

+ 1 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -429,10 +429,9 @@
                 var find = false;
                 this.participator = [];
                 this.addForm.userId.forEach(u=>{
-                    var findUser = this.users.filter(au=>au.id == u)[0];
+                    var findUser = this.users.filter(au=>au.id == u)[0];    
                     this.participator.push(findUser);
                 })
-                
             },
             getUsers() {
                 this.http.post(this.port.manage.list, {

+ 122 - 45
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -144,7 +144,7 @@
                                             </div>
                                             <div style="margin: 10px 0px;color:#666;" @click="timess(element.endDate)">
                                                 <span v-if="element.endDate >= times || element.taskStatus == 1"><i v-if="element.endDate != null" class="el-icon-date">&nbsp;&nbsp;{{element.endDate}}</i></span>
-                                                <span v-else class="element_span"><em v-if="element.endDate != null" style="display: inline-block;padding:3px 5px"><i v-if="element.endDate != null" class="el-icon-date">&nbsp;&nbsp;{{element.endDate}}  截止</i></em></span>
+                                                <span v-else><em v-if="element.endDate != null" style="display: inline-block;padding:3px 5px"><i v-if="element.endDate != null" class="el-icon-date"><span  class="element_span"> &nbsp;&nbsp;{{element.endDate}} 截止</span></i></em></span>
                                                 <i :class="taskTypeIcon[element.taskType]" :style="'float:right;color:'+taskTypeColor[element.taskType]+';margin-right:8px;'" ></i>
                                             </div>
                                             <!--子任务 -->
@@ -292,61 +292,64 @@
                         border="0"
                         :autosize="{ minRows: 2, maxRows: 6}"
                         placeholder="请输入详细进展描述"
-                        v-model="text2"
+                        v-model.trim="text2"
                         style="margin:10px 0 0 0">
                         </el-input>
 
-                        <h4 style="font-weight: normal;">提醒谁查看:0</h4>
+                        <h4 style="font-weight: normal;">提醒谁查看:{{checkLists.length}}</h4>
 
                         <i class="el-icon-circle-plus pron_i" style="font-size: 28px;color: #409EFF;" @click="addI(0)"></i>
 
                         <div class="remind" ref="addRem" style="display: none">
-                            <el-checkbox-group v-model="checkList">
-                                <p><el-checkbox label="小名"></el-checkbox></p>
-                                <p><el-checkbox label="小红"></el-checkbox></p>
-                                <p><el-checkbox label="小紫"></el-checkbox></p>
-                                <p><el-checkbox label="小蓝"></el-checkbox></p>
-                                <p><el-checkbox label="小绿"></el-checkbox></p>
-                                <p><el-checkbox label="小黄"></el-checkbox></p>
+                            <el-checkbox-group v-model="checkboxGrounp" v-for="item in users" :key="item.id">
+                                <p><el-checkbox :label="item.name" @change="kkk(item)"></el-checkbox></p>
                             </el-checkbox-group>
                         </div>
+                        <div class="ssp" @click="sss"></div>
                         <!-- </el-form> -->
                         <div class="pro_btn">
                             <el-button size="mini" @click="shutPro">取消</el-button>
-                            <el-button size="mini" type="primary" @click="subMission">发布</el-button>
+                            <el-button size="mini" type="primary" @click="addTaskProgress">发布</el-button>
                         </div>
 
                     </div>
 
                     <!-- 任务进展列表 -->
-                    <div class="elCard">
-                        <i class="el-icon-success" style="color: #5ECE67;"></i>
-                        <span>状态正常</span>
+                    <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>
-                                        <i class="el-icon-delete"></i>删除列表</el-dropdown-item>
+                                        <span @click="deleteTaskProgress(item.id)"><i class="el-icon-delete"></i>删除列表</span></el-dropdown-item>
                                 </el-dropdown-menu>
                         </el-dropdown>
-                        <div class="elCard_qu">屈经理更新于7小时前</div>
-                        <p style="padding-left: 20px;">文本框输入的内容</p>
-                        <!-- <el-button type="text" @click="open" style="text-align: center;color:#dddddd;">查看完整状态</el-button> -->
-                        <!-- <p style="text-align: center;">查看完整状态</p> -->
-                        <el-button type="text" @click="innerVisibless = true">查看完整状态</el-button>
+                        <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 class="nones" v-if="ProgressList.length <= 0">
+                        暂无数据    
                     </div>
 
                     <!-- 任务进展完整状态 -->
-                    <el-dialog title="提示" :visible.sync="innerVisibless" width="500px">
+                    <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>
                          <el-divider></el-divider>
 
                          <!--  -->
-                            <div class="block">
+                            <div class="block" style="height: 200px;">
                                 <el-timeline style="padding:20px 0 0 0;">
                                     <el-timeline-item
                                     v-for="(activity, index) in activities"
@@ -359,6 +362,12 @@
                                     {{activity.content}}
                                     </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>
@@ -725,37 +734,38 @@
                 textContent: true, // 控制提交 
                 times: null,
                 text2: '',
-                // cityOptions : ['渣渣灰', '小小', '嘿嘿', '嘀嘀','版本', '更新', '快速', '欧克'],
-                // checkedCities: []
-                checkList: ['小红'],
                 innerVisibless: false, // 任务展示弹出层
                 activities: [{
-                    content: '支持使用图标',
-                    timestamp: '2018-04-12 20:46',
+                    content: '状态正常',
+                    timestamp: '7小时前',
                     size: 'large',
                     type: 'primary',
-                    icon: 'el-icon-more'
-                    }, {
-                    content: '支持自定义颜色',
-                    timestamp: '2018-04-03 20:46',
-                    color: '#0bbd87'
+                    icon: 'el-icon-circle-check',
+                    color: '#409EFF'
                     }, {
-                    content: '支持自定义尺寸',
-                    timestamp: '2018-04-03 20:46',
-                    size: 'large'
-                    }, {
-                    content: '默认样式的节点',
-                    timestamp: '2018-04-03 20:46'
-                }]
+                    content: '进展逾期',
+                    timestamp: '八小时前',
+                    color: '#F87872'
+                    }],
+                ProgressList: [],
+                checkboxGrounp: [], // 选中人的数据
+                checkLists: [], // 选中人数据的ID
+                taskIid: null
             };
+            
         },
         methods: {
             //删除任务进展
-            deleteTaskProgress() {
-                this.http.post('/task-progress/deleteProgress', {id:1},
+            deleteTaskProgress(id) {
+                console.log(id, '删除传过来的数据');
+                this.http.post('/task-progress/deleteProgress', {id: id},
                     res => {
                         if (res.code == "ok") {
-                            
+                            this.getTaskProgressList(this.taskIid)
+                            this.$message({
+                                message: '删除成功',
+                                type: "success"
+                            });
                         } else {
                             this.$message({
                                 message: res.msg,
@@ -767,11 +777,35 @@
             },
             //创建任务进展
             addTaskProgress() {
-                var param = {taskId:0,status:0,content:'输入进展内容',participatorIds:'1,2,3,4,5'};
+                if (this.text2.length <= 0) {
+                    return this.$message({
+                                message: '请输入内容',
+                                type: "error"
+                            });
+                }
+                console.log(this.taskIid, 'idididi');
+                // var param = {taskId:0,status:0,content:'输入进展内容',participatorIds:'1,2,3,4,5'};
+                // console.log(this.checkLists.toString(), '看看打印的是什么');
+                var param = {
+                    taskId: this.taskIid,
+                    status: this.radio,
+                    content: this.text2,
+                    participatorIds: this.checkLists.toString()
+                };
+                console.log(param, '发布过去的数据');
                 this.http.post('/task-progress/addProgress', param,
                     res => {
                         if (res.code == "ok") {
-                            
+                            this.shutPro()
+                            this.getTaskProgressList(this.taskIid)
+                            this.$message({
+                                message: '发布成功',
+                                type: "success"
+                            });
+                            this.checkboxGrounp = [],
+                            this.checkLists = [],
+                            this.text2 = '',
+                            this.radio = 0
                         } else {
                             this.$message({
                                 message: res.msg,
@@ -783,10 +817,13 @@
             },
             //获取任务进展列表
             getTaskProgressList(taskId) {
+                console.log(taskId);
+                this.taskIid = taskId
                 this.http.post('/task-progress/list', {taskId: taskId},
                     res => {
                         if (res.code == "ok") {
-                            var list = res.data;
+                            this.ProgressList = res.data;
+                            console.log(this.ProgressList, '获取过来的任务进展列表数据');
                         } else {
                             this.$message({
                                 message: res.msg,
@@ -796,6 +833,16 @@
                     }
                 );
             },
+            kkk(el){
+                var k = this.checkLists.indexOf(el.id)
+                if (k == -1) {
+                    this.checkLists.push(el.id)
+                } else {
+                    this.checkLists.splice(k, 1)
+                }
+                // this.checkLists.push(el.id)
+                // console.log(this.checkLists);
+            },
             showExportDialog() {
                 this.exportDialog = true;
             },
@@ -1206,6 +1253,8 @@
                 this.addLoading = false;
                 this.title = "编辑任务";
                 this.getTaskDetail(task.id);
+                this.getTaskProgressList(task.id); // 获取任务进展列表 
+                this.users(); // 获取名单数据
                 this.gain(task); // 获取评论列表
             },  
             // 获取评论列表
@@ -1276,6 +1325,7 @@
                 res => {
                     if (res.code == "ok") {
                         this.addForm = res.data;
+                        console.log(this.addForm, 'getTaskDetail');
                         this.addForm.createDate = null;
                         this.addForm.indate = null;
                         this.addLoading = false;
@@ -1692,6 +1742,7 @@
                 res => {
                     if (res.code == "ok") {
                         this.users = res.data.records;
+                        console.log(this.users, '得到的数据');
                     } else {
                         this.$message({
                         message: res.msg,
@@ -2133,6 +2184,10 @@
     background: #e62412;
     color: #fff;
     border-radius: 5px;
+    padding: 3px;
+    /* text-align: center; */
+    font-size: 12px;
+    margin-left: 5px;
 }
 
 .pro_btn{
@@ -2305,6 +2360,7 @@
     box-sizing: border-box;
     padding: 15px;
     position: relative;
+    margin-bottom: 20px;
 }
 .remind {
     width: 95px;
@@ -2361,4 +2417,25 @@
     float: right;
     color: #1B9AEE;
 }
+.ssp {
+    position: absolute;
+    right: 140px;
+    top: 95px;
+    width: 66%;
+    height: 80%;
+}
+.examine {
+    width: 100%;
+    text-align: center;
+}
+.nones {
+    width: 100%;
+    height: 50px;
+    text-align: center;
+    color: #909399;
+    line-height: 50px;
+    border-top: 1px solid #EBEEF5;
+    border-bottom: 1px solid #EBEEF5;
+    font-size: 16px;
+}
 </style>