Browse Source

优化了一些样式

Lljy-ai 4 years ago
parent
commit
967e41302a
1 changed files with 12 additions and 22 deletions
  1. 12 22
      fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

+ 12 - 22
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -94,11 +94,9 @@
         </div>
         <!-- 按钮 -->
         <div class="pu_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 v-if="this.addForm.totalAmount <= 0">总成本 {{this.addForm.totalAmount}} 元</span>
           <span v-else>总成本 ¥{{this.addForm.totalAmount | numberToCurrency}} 元</span>
-          <!-- <span class="pu_bu_t" @click="submits"> <i class="el-icon-circle-check"></i> 提交</span> -->
         </div>
 
         <!-- 表格 -->
@@ -244,9 +242,15 @@
           <el-form :model="ParticularsList" label-width="80px">
             <el-form-item label="填报人">
               <el-input v-model="ParticularsList.ownerName" :disabled="flg"></el-input>
+              <!-- <el-select v-model="ParticularsList.ownerId" placeholder="请选择填报人" style="width: 150px" :disabled="flg">
+                <span v-for="(item, index) in users" :key="index">
+                  <el-option :label="item.name" :value="item.id"></el-option>
+                </span>
+              </el-select> -->
             </el-form-item>
             <el-form-item label="填报日期">
-              <el-input v-model="ParticularsList.createDate" :disabled="flg"></el-input>
+              <!-- <el-input v-model="ParticularsList.createDate" :disabled="flg"></el-input> -->
+              <el-date-picker type="date" :disabled="flg" placeholder="选择日期" v-model="ParticularsList.createDate" value-format="yyyy-MM-dd" style="width: 200px;"></el-date-picker>
             </el-form-item>
             <el-form-item label="发票张数">
               <el-input v-enter-number v-model="ParticularsList.ticketNum" :disabled="flg"></el-input>
@@ -424,8 +428,11 @@ export default {
       this.dialog = true,
       this.flg = false,
       delete val.invoiceList
-      console.log(val, '将要传过去的数据');
       this.getParticulars(val.id)
+      // this.getUsers() // 获取人员信息
+      // console.log(this.ParticularsList.ownerName, '看看打印的');
+      // console.log(this.users, '看看打印的');
+      // var k = this.users.filter(p => p.id == this.ParticularsList.ownerName)
     },
     staffs() { // 控制员工费用报表
       this.displayTable = false;
@@ -436,8 +443,6 @@ export default {
     },
     present(){
       this.dialog = false
-      // delete this.ParticularsList.invoiceList
-      console.log(this.ParticularsList, '传过去的数据');
       this.adds();
     },
 
@@ -445,7 +450,6 @@ export default {
       // happenDate
       this.ParticularsList.items = JSON.stringify(this.ParticularsList.invoiceList)//这里要传发票列表的json转string
       delete this.ParticularsList.invoiceList
-      console.log(this.ParticularsList, '998');
         this.http.post('/expense-sheet/add', this.ParticularsList,
         res => {
             if (res.code == "ok") {
@@ -479,7 +483,6 @@ export default {
         res => {
             if (res.code == "ok") {
                 this.users = res.data.records;
-                console.log(this.users, '得到的数据');
             } else {
                 this.$message({
                 message: res.msg,
@@ -512,7 +515,6 @@ export default {
         res => {
             if (res.code == "ok") {
                 this.projectList = res.data;
-                console.log(this.projectList, '打印过来的');
             } else {
                 this.$message({
                     message: res.msg,
@@ -556,7 +558,6 @@ export default {
     },
     //删除单据
     deletes(id) {
-      console.log(id);
       this.http.post('/expense-sheet/delete', {id: id},
         res => {
             if (res.code == "ok") {
@@ -583,7 +584,6 @@ export default {
     add() {
       // happenDate
       this.addForm.items = JSON.stringify(this.invoiceList)//这里要传发票列表的json转string
-      console.log(this.addForm, '传过去的数据');
         this.http.post('/expense-sheet/add', this.addForm,
         res => {
             if (res.code == "ok") {
@@ -613,7 +613,6 @@ export default {
         res => {
             if (res.code == "ok") {
                 this.addForm.code = res.data;
-                console.log(this.addForm.code, '获取到的单据编码');
             } else {
                 this.$message({
                 message: res.msg,
@@ -641,8 +640,7 @@ export default {
                 }
                 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);
+                console.log(res.data, '查看当前状态');
             } else {
                 this.$message({
                 message: res.msg,
@@ -704,7 +702,6 @@ export default {
       this.isOK = false
     },
     ssl(index) {
-      console.log(index);
       this.z = index
       this.addForm.type = index
       this.ins = index
@@ -721,7 +718,6 @@ export default {
         this.$refs.staff.style.width = '95%'
         this.$refs.xiaomian.style.width = '100%'
         this.$refs.headHe.style.paddingLeft = '20px'
-        // this.$refs.headSpan.style.marginLeft = '81.7%'
       } else {
         this.$refs.sidebars.style.display = 'block'
         this.$refs.sid.style.left = '430px'
@@ -731,7 +727,6 @@ export default {
         this.$refs.staff.style.width = '81%'
         this.$refs.xiaomian.style.width = '85%'
         this.$refs.headHe.style.paddingLeft = '220px'
-        // this.$refs.headSpan.style.marginLeft = '58%'
       }
     },
     // 费用金额失去焦点时触发
@@ -739,16 +734,11 @@ export default {
       this.addForm.totalAmount = this.invoiceList.reduce((prev, next) => {
         return prev + next.amount;
       }, 0)
-      console.log(k);
     },
     kan(){
-      console.log(123); // amount
-      console.log(this.ParticularsList.invoiceList);
-      console.log(this.ParticularsList.totalAmount);
       this.ParticularsList.totalAmount = this.ParticularsList.invoiceList.reduce((prev, next) => {
         return prev + next.amount
       }, 0)
-      console.log(this.ParticularsList.totalAmount);
     }
   },
 };