Browse Source

管理费用

caojunjie 2 years ago
parent
commit
7873c1489c
2 changed files with 48 additions and 45 deletions
  1. 46 43
      src/views/costManagement/index.vue
  2. 2 2
      vue.config.js

+ 46 - 43
src/views/costManagement/index.vue

@@ -203,11 +203,11 @@
         </table>
         <table class="table table-striped table-bordered" align="center" valign="center">
           <tr>
-            <td class="column" style="width: 15%;border: none">提交人:{{formList.presenterName}}</td>
+            <td class="column" style="width: 15%;border: none">提交人:{{ formList.presenterName }}</td>
             <td class="column" colspan="2" style="text-align: left;border: none;width: 18%"></td>
-            <td class="column" style="width: 15%;border: none">财务经理:{{formList.firstLevelReviewerName}}</td>
+            <td class="column" style="width: 15%;border: none">财务经理:{{ formList.firstLevelReviewerName }}</td>
             <td class="column" colspan="2" style="text-align: left;border: none;width: 18%"></td>
-            <td class="column" style="width: 15%;border: none">总经理:{{formList.secondaryReviewerName}}</td>
+            <td class="column" style="width: 15%;border: none">总经理:{{ formList.secondaryReviewerName }}</td>
             <td class="column" colspan="2" style="text-align: left;border: none;width: 18%"></td>
           </tr>
         </table>
@@ -254,7 +254,7 @@ export default {
   },
   data() {
     return {
-      reverse:'报销单',
+      reverse: '报销单',
       before: '',
       lander: '',
       operator: '',
@@ -297,7 +297,7 @@ export default {
         itemPersonnel: [],
         createById: [],
         itemDepartment: [],
-        itemBelongsProjectId:[]
+        itemBelongsProjectId: []
       },
       tEnclosure: [],
       contentList: [],
@@ -365,28 +365,28 @@ export default {
           onabort: ''
         },
         {
-          surface: "9",
-          label: "applicantName",
-          name: "申请人",
+          surface: '9',
+          label: 'applicantName',
+          name: '申请人',
           checked: 0,
           width: 200,
-          operation: 1,
+          operation: 1
         },
         {
-          surface: "10",
-          label: "fStatusName",
-          name: "状态",
+          surface: '10',
+          label: 'fStatusName',
+          name: '状态',
           checked: 0,
           width: 200,
-          operation: 1,
+          operation: 1
         },
         {
-          surface: "11",
-          label: "fReviewDate",
-          name: "审核日期",
+          surface: '11',
+          label: 'fReviewDate',
+          name: '审核日期',
           checked: 0,
           width: 200,
-          operation: 1,
+          operation: 1
         },
         {
           surface: '12',
@@ -1112,13 +1112,13 @@ export default {
               })
             }
             let item = this.contentOption.find(item => {
-              return item.name == "户头";
-            });
-            if (!item){
+              return item.name == '户头'
+            })
+            if (!item) {
               this.contentOption = [...this.contentOption, ...dataTwo]
             }
             this.inDex = this.contentOption.length
-          }else {
+          } else {
             for (let item in this.contentOption) {
               for (let li in this.pushList) {
                 if (this.contentOption[item].label === this.pushList[li].label) {
@@ -1152,7 +1152,7 @@ export default {
             }
           })
           let operator = this.$refs.avatar.form.createBy
-          if (this.$refs.avatar.form.fStatus > 0 && (this.lander === operator || this.lander === "admin")) {
+          if (this.$refs.avatar.form.fStatus > 0 && (this.lander === operator || this.lander === 'admin')) {
             this.contentButton.push({
               type: 'danger',
               size: 'mini',
@@ -1403,9 +1403,9 @@ export default {
       if (name === 'expenseType') {
         if (id == 0) {
           let item = this.contentOption.find(item => {
-            return item.name == "户头";
-          });
-          if (!item){
+            return item.name == '户头'
+          })
+          if (!item) {
             this.contentOption = [...this.contentOption, ...this.pushList]
           }
           this.inDex = this.contentOption.length
@@ -1513,28 +1513,31 @@ export default {
           this.$refs.avatar.submitForm('submit')
           break
         case '打印':
-          console.log(this.listData.fFeeid, this.contentList)
-          for (let item in this.contentList) {
-            for (let li in this.listData.fFeeid) {
-              if (this.contentList[item].fFeeid == this.listData.fFeeid[li].value) {
-                this.contentList[item].feeName = this.listData.fFeeid[li].label
+          if (this.$refs.avatar.fStatus >= 3) {
+            for (let item in this.contentList) {
+              for (let li in this.listData.fFeeid) {
+                if (this.contentList[item].fFeeid == this.listData.fFeeid[li].value) {
+                  this.contentList[item].feeName = this.listData.fFeeid[li].label
+                }
               }
-            }
-            for (let i in this.listData.fFeeunitid) {
-              if (this.contentList[item].fFeeunitid == this.listData.fFeeunitid[i].value) {
-                this.contentList[item].fFeeunitName = this.listData.fFeeunitid[i].label
+              for (let i in this.listData.fFeeunitid) {
+                if (this.contentList[item].fFeeunitid == this.listData.fFeeunitid[i].value) {
+                  this.contentList[item].fFeeunitName = this.listData.fFeeunitid[i].label
+                }
               }
             }
-          }
-          if (!this.$refs.avatar.form.fId) {
-            this.$message.error('未保存,不允许打印')
-          } else if (this.$refs.avatar.form.fBillstatus >= 4) {
-            this.formList = this.$refs.avatar.form
-            this.dialogVisible = true
+            if (!this.$refs.avatar.form.fId) {
+              this.$message.error('未保存,不允许打印')
+            } else if (this.$refs.avatar.form.fBillstatus >= 4) {
+              this.formList = this.$refs.avatar.form
+              this.dialogVisible = true
+            } else {
+              this.formList = this.$refs.avatar.form
+              console.log(this.$refs.avatar.form.fBillstatus)
+              this.submitAndSave(1)
+            }
           } else {
-            this.formList = this.$refs.avatar.form
-            console.log(this.$refs.avatar.form.fBillstatus)
-            this.submitAndSave(1)
+            this.$message.warning('未审核或未通过审核')
           }
           break
         case '修改':

+ 2 - 2
vue.config.js

@@ -34,9 +34,9 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://192.168.0.106:9020`,
+        // target: `http://192.168.0.106:9020`,
         // target: `http://162.14.112.182:9020/`,
-        // target: `https://ap.tubaosoft.com/prod-api/`,
+        target: `https://ap.tubaosoft.com/prod-api/`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''