Browse Source

保存报销详情修改

user5 3 years ago
parent
commit
efbfe40cb8

+ 2 - 2
.env.production

@@ -2,9 +2,9 @@
 ENV = 'production'
 
 #Jeeplus快速开发平台/后台地址
-VUE_APP_SERVER_URL = 'http://3081089em4.wicp.vip:36186/jeeplus-vue'
+VUE_APP_SERVER_URL = 'http://8.136.148.180:80/jeeplus-vue'
 
 #单点登录设置
 VUE_APP_SSO_LOGIN  = 'false'
 VUE_APP_CAS_SERVER = 'https://www.cainiao.com:8443/cas'
-VUE_APP_CLIENT_HOST = 'http://localhost:3000'
+VUE_APP_CLIENT_HOST = 'http://localhost:80'

+ 2 - 2
src/api/reimbursementSys/accountant/user/reimbursementUserService.js

@@ -40,11 +40,11 @@ export default class reimbursementSys {
     })
   }
 
-  findListByUserId (id) {
+  findListByUserId (params) {
     return request({
       url: `/accountant/reimbursementUser/findListByUserId`,
       method: 'get',
-      params: {id: id}
+      params: params
     })
   }
 

+ 2 - 2
src/api/reimbursementSys/user/reimbursementUserService.js

@@ -40,11 +40,11 @@ export default class reimbursementSys {
     })
   }
 
-  findListByUserId (id) {
+  findListByUserId (params) {
     return request({
       url: `/reimbursementUser/findListByUserId`,
       method: 'get',
-      params: {id: id}
+      params: params
     })
   }
 

+ 1 - 2
src/views/modules/reimbursementSys/accountant/reimbursementBusinessForm.vue

@@ -17,7 +17,7 @@
                   label: 'name',         // 显示名称
                   children: 'children'    // 子级字段名
                 }"
-              :url="`/sys/user/treeUserData?type=2`"
+              :url="`/sys/user/treeUserDataByOfficeName?type=2&officeName=兴光会计`"
               :value="inputForm.userId"
               :clearable="true"
               :accordion="true"
@@ -187,7 +187,6 @@
         return str
       },
       checkReimbursementAmount: function (num) {
-        console.log(num)
         let str = num.toString()
         var len1 = str.substr(0, 1)
         var len2 = str.substr(1, 1)

+ 1 - 2
src/views/modules/reimbursementSys/accountant/reimbursementIsNoTicketForm.vue

@@ -17,7 +17,7 @@
                   label: 'name',         // 显示名称
                   children: 'children'    // 子级字段名
                 }"
-              :url="`/sys/user/treeUserData?type=2`"
+              :url="`/sys/user/treeUserDataByOfficeName?type=2&officeName=兴光会计`"
               :value="inputForm.userId"
               :clearable="true"
               :accordion="true"
@@ -173,7 +173,6 @@
         return str
       },
       checkReimbursementAmount: function (num) {
-        console.log(num)
         let str = num.toString()
         var len1 = str.substr(0, 1)
         var len2 = str.substr(1, 1)

+ 1 - 3
src/views/modules/reimbursementSys/accountant/reimbursementIsNoTicketList.vue

@@ -12,7 +12,7 @@
                   label: 'name',         // 显示名称
                   children: 'children'    // 子级字段名
                 }"
-          :url="`/sys/user/treeUserData?type=2`"
+          :url="`/sys/user/treeUserDataByOfficeName?type=2&officeName=兴光会计`"
           :value="searchForm.userId"
           :clearable="true"
           :accordion="true"
@@ -246,7 +246,6 @@
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          console.log(ids)
           this.loading = true
           this.reimbursementSys.deleteInvoice(ids).then(({data}) => {
             this.loading = false
@@ -318,7 +317,6 @@
         })
       },
       determination (e) {
-        console.log(e)
         for (let i = 0; i < this.selectCode.length; i++) {
           if (this.selectCode[i].id === e) {
             if (parseInt(this.selectCode[i].canReimbursementAmount) < parseInt(this.reimbursementAmount)) {

+ 0 - 1
src/views/modules/reimbursementSys/accountant/reimbursementList.vue

@@ -453,7 +453,6 @@ export default {
       })
     },
     selectBatchReimbursement (invoices) {
-      console.log(invoices)
       let invoiceNumbers = invoices.map(invoice => { return invoice.id }).join(',')
       this.loading = true
       this.reimbursementSys.addBatchReimbursement(invoiceNumbers).then(({data}) => {

+ 123 - 10
src/views/modules/reimbursementSys/accountant/user/reimbursementUserBusinessList.vue

@@ -1,5 +1,48 @@
 <template>
   <div class="el-scrollbar__wrap wrap-white padding-20">
+
+    <el-form size="small" :inline="true"  class="query-form" ref="searchForm" :model="searchForm"  @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <el-form-item
+        label="报销额度"
+        class="priceFormItem"
+        prop="income"
+      >
+        <el-input
+          v-model="searchForm.beginReimbursementQuota"
+          onkeyup="value=value.replace(/[^\d]/g,'')"
+          class="priceInput"
+          placeholder="起始金额"
+          style="width: 130px; margin-right: 10px"
+        />-<el-input
+        v-model="searchForm.endReimbursementQuota"
+        class="priceInput"
+        placeholder="结束金额"
+        onkeyup="value=value.replace(/[^\d]/g,'')"
+        style="width: 130px; margin-left: 10px"
+      />
+      </el-form-item>
+      <el-form-item label="报销时间" prop="makeTime">
+        <el-date-picker
+          v-model="searchDates"
+          type="daterange"
+          size="small"
+          align="right"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions">
+        </el-date-picker>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button  type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+        <el-button type="info" size="small" @click="goBack">返回</el-button>
+      </el-form-item>
+    </el-form>
+
     <div class="el-scrollbar__view">
       <el-row :gutter="20" v-loading="loading">
         <el-col :span="12">
@@ -20,9 +63,6 @@
               <span class="color: red">;  剩余报销天数:{{columnForm.surplusReimbursementDay}}</span>
             </div>
           </el-col>
-          <el-col :span="6" style="text-align:right">
-            <el-button type="info" size="small" @click="goBack">返回</el-button>
-          </el-col>
           <el-table
             :data="columnForm.columnList"
             style="width: 100%">
@@ -74,6 +114,15 @@
   export default {
     data () {
       return {
+        searchDates: '',
+        searchForm: {
+          year: '',
+          beginDate: '',
+          endDate: '',
+          beginReimbursementQuota: '',
+          endReimbursementQuota: '',
+          userId: ''
+        },
         title: '',
         method: '',
         count: '10',
@@ -82,11 +131,8 @@
         isIndeterminate: false,
         inputForm: {
           id: '',
-          dataSource: {
-            id: ''
-          },
           name: '',
-          sqlCmd: ''
+          userId: ''
         },
         columnForm: {
           reimbursementQuotaDay: '',  // 日报销额度
@@ -98,6 +144,45 @@
           surplusReimbursementAmount: '',  // 剩余报销额度
           remarks: '',  // 备注
           columnList: []
+        },
+
+        pickerOptions: {
+          shortcuts: [{
+            text: '最近一周',
+            onClick (picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+              picker.$emit('pick', [start, end])
+            }
+          }, {
+            text: '最近一个月',
+            onClick (picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+              picker.$emit('pick', [start, end])
+            }
+          }, {
+            text: '最近三个月',
+            onClick (picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+              picker.$emit('pick', [start, end])
+            }
+          }]
+        }
+      }
+    },
+    watch: {
+      searchDates () {
+        if (this.searchDates) {
+          this.searchForm.beginDate = this.searchDates[0]
+          this.searchForm.endDate = this.searchDates[1]
+        } else {
+          this.searchForm.beginDate = ''
+          this.searchForm.endDate = ''
         }
       }
     },
@@ -108,9 +193,10 @@
     activated () {
       this.$refs['inputForm'].resetFields()
       this.columnForm.columnList = []
-      this.inputForm.id = this.$route.query.id
-      if (this.inputForm.id) {
-        this.reimbursementUser.findListByUserId(this.inputForm.id).then(({data}) => {
+      this.searchForm.userId = this.$route.query.userId
+      console.log(this.searchForm.userId)
+      if (this.searchForm.userId) {
+        this.reimbursementUser.findListByUserId(this.searchForm).then(({data}) => {
           this.columnForm.columnList = data.list
           this.columnForm.reimbursementDay = data.reimbursementDay
           this.columnForm.alreadyReimbursementDay = data.alreadyReimbursementDay
@@ -126,6 +212,33 @@
       editor: require('vue2-ace-editor')
     },
     methods: {
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.reimbursementUser.findListByUserId({
+          ...this.searchForm
+        }).then(({data}) => {
+          this.columnForm.columnList = data.list
+          this.columnForm.reimbursementDay = data.reimbursementDay
+          this.columnForm.alreadyReimbursementDay = data.alreadyReimbursementDay
+          this.columnForm.surplusReimbursementDay = data.surplusReimbursementDay
+          this.columnForm.reimbursementQuota = data.reimbursementQuota
+          this.columnForm.alreadyReimbursementAmount = data.alreadyReimbursementAmount
+          this.columnForm.surplusReimbursementAmount = data.surplusReimbursementAmount
+          this.columnForm.reimbursementQuotaDay = data.reimbursementQuotaDay
+          this.loading = false
+        })
+      },
+      resetSearch () {
+        this.$refs.inputForm.resetFields()
+        // eslint-disable-next-line no-unused-expressions
+        this.searchForm.beginReimbursementQuota = ''
+        this.searchForm.endReimbursementQuota = ''
+        this.searchDates = ''
+        this.$nextTick(() => {
+          this.refreshList()
+        })
+      },
       goBack () {
         this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
         this.$router.push('/reimbursementSys/accountant/user/reimbursementUserList')

+ 1 - 1
src/views/modules/reimbursementSys/accountant/user/reimbursementUserForm.vue

@@ -17,7 +17,7 @@
                   label: 'name',         // 显示名称
                   children: 'children'    // 子级字段名
                 }"
-              :url="`/sys/user/treeUserData?type=2`"
+              :url="`/sys/user/treeUserDataByOfficeName?type=2&officeName=兴光会计`"
               :value="inputForm.userId"
               :clearable="true"
               :accordion="true"

+ 2 - 2
src/views/modules/reimbursementSys/accountant/user/reimbursementUserList.vue

@@ -11,7 +11,7 @@
                   label: 'name',         // 显示名称
                   children: 'children'    // 子级字段名
                 }"
-          :url="`/sys/user/treeUserData?type=2`"
+          :url="`/sys/user/treeUserDataByOfficeName?type=2&officeName=兴光会计`"
           :value="searchForm.userId"
           :clearable="true"
           :accordion="true"
@@ -209,7 +209,7 @@ export default {
     },
     // 查看业务报销详情
     viewBusinessInfo (id) {
-      this.$router.push({path: `/reimbursementSys/accountant/user/reimbursementUserBusinessList`, query: {id: id, title: '报销详情'}})
+      this.$router.push({path: `/reimbursementSys/accountant/user/reimbursementUserBusinessList`, query: {userId: id, title: '报销详情'}})
     },
     // 删除
     del (id) {

+ 1 - 2
src/views/modules/reimbursementSys/reimbursementBusinessForm.vue

@@ -17,7 +17,7 @@
                   label: 'name',         // 显示名称
                   children: 'children'    // 子级字段名
                 }"
-              :url="`/sys/user/treeUserData?type=2`"
+              :url="`/sys/user/treeUserDataByOfficeName?type=2&officeName=中审众环`"
               :value="inputForm.userId"
               :clearable="true"
               :accordion="true"
@@ -187,7 +187,6 @@
         return str
       },
       checkReimbursementAmount: function (num) {
-        console.log(num)
         let str = num.toString()
         var len1 = str.substr(0, 1)
         var len2 = str.substr(1, 1)

+ 142 - 12
src/views/modules/reimbursementSys/user/reimbursementUserBusinessList.vue

@@ -1,5 +1,60 @@
 <template>
   <div class="el-scrollbar__wrap wrap-white padding-20">
+
+    <el-form size="small" :inline="true"  class="query-form" ref="searchForm" :model="searchForm"  @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <el-form-item label="报销来源" prop="searchForm.reimbursementAddress">
+        <el-select v-model="searchForm.reimbursementAddress" clearable placeholder="请选择">
+          <el-option
+            v-for="item in reimbursementAddressList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </el-form-item>
+
+      <el-form-item
+        label="报销额度"
+        class="priceFormItem"
+        prop="income"
+      >
+        <el-input
+          v-model="searchForm.beginReimbursementQuota"
+          onkeyup="value=value.replace(/[^\d]/g,'')"
+          class="priceInput"
+          placeholder="起始金额"
+          style="width: 130px; margin-right: 10px"
+        />-<el-input
+        v-model="searchForm.endReimbursementQuota"
+        class="priceInput"
+        placeholder="结束金额"
+        onkeyup="value=value.replace(/[^\d]/g,'')"
+        style="width: 130px; margin-left: 10px"
+      />
+      </el-form-item>
+      <el-form-item label="报销时间" prop="makeTime">
+        <el-date-picker
+          v-model="searchDates"
+          type="daterange"
+          size="small"
+          align="right"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions">
+        </el-date-picker>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button  type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+        <el-button type="info" size="small" @click="goBack">返回</el-button>
+      </el-form-item>
+    </el-form>
+
+
     <div class="el-scrollbar__view">
       <el-row :gutter="20" v-loading="loading">
         <el-col :span="12">
@@ -20,9 +75,6 @@
               <span class="color: red">;  剩余报销天数:{{columnForm.surplusReimbursementDay}}</span>
             </div>
           </el-col>
-          <el-col :span="6" style="text-align:right">
-            <el-button type="info" size="small" @click="goBack">返回</el-button>
-          </el-col>
           <el-table
             :data="columnForm.columnList"
             style="width: 100%">
@@ -82,6 +134,17 @@
   export default {
     data () {
       return {
+        searchDates: '',
+        reimbursementAddressList: '',  // 报销来源列表
+        searchForm: {
+          year: '',
+          beginDate: '',
+          endDate: '',
+          beginReimbursementQuota: '',
+          endReimbursementQuota: '',
+          reimbursementAddress: '',  // 报销来源
+          userId: ''
+        },
         title: '',
         method: '',
         count: '10',
@@ -90,11 +153,8 @@
         isIndeterminate: false,
         inputForm: {
           id: '',
-          dataSource: {
-            id: ''
-          },
           name: '',
-          sqlCmd: ''
+          userId: ''
         },
         columnForm: {
           reimbursementQuotaDay: '',  // 日报销额度
@@ -104,7 +164,47 @@
           reimbursementQuota: '',  // 报销额度
           alreadyReimbursementAmount: '',  // 已报销额度
           surplusReimbursementAmount: '',  // 剩余报销额度
+          reimbursementAddress: '',  // 报销来源
           columnList: []
+        },
+
+        pickerOptions: {
+          shortcuts: [{
+            text: '最近一周',
+            onClick (picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+              picker.$emit('pick', [start, end])
+            }
+          }, {
+            text: '最近一个月',
+            onClick (picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
+              picker.$emit('pick', [start, end])
+            }
+          }, {
+            text: '最近三个月',
+            onClick (picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
+              picker.$emit('pick', [start, end])
+            }
+          }]
+        }
+      }
+    },
+    watch: {
+      searchDates () {
+        if (this.searchDates) {
+          this.searchForm.beginDate = this.searchDates[0]
+          this.searchForm.endDate = this.searchDates[1]
+        } else {
+          this.searchForm.beginDate = ''
+          this.searchForm.endDate = ''
         }
       }
     },
@@ -115,9 +215,9 @@
     activated () {
       this.$refs['inputForm'].resetFields()
       this.columnForm.columnList = []
-      this.inputForm.id = this.$route.query.id
-      if (this.inputForm.id) {
-        this.reimbursementUser.findListByUserId(this.inputForm.id).then(({data}) => {
+      this.searchForm.userId = this.$route.query.userId
+      if (this.searchForm.userId) {
+        this.reimbursementUser.findListByUserId(this.searchForm).then(({data}) => {
           this.columnForm.columnList = data.list
           this.columnForm.reimbursementDay = data.reimbursementDay
           this.columnForm.alreadyReimbursementDay = data.alreadyReimbursementDay
@@ -126,6 +226,7 @@
           this.columnForm.alreadyReimbursementAmount = data.alreadyReimbursementAmount
           this.columnForm.surplusReimbursementAmount = data.surplusReimbursementAmount
           this.columnForm.reimbursementQuotaDay = data.reimbursementQuotaDay
+          this.reimbursementAddressList = data.reimbursementAddressList
         })
       }
     },
@@ -133,6 +234,35 @@
       editor: require('vue2-ace-editor')
     },
     methods: {
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.reimbursementUser.findListByUserId({
+          ...this.searchForm
+        }).then(({data}) => {
+          this.columnForm.columnList = data.list
+          this.columnForm.reimbursementDay = data.reimbursementDay
+          this.columnForm.alreadyReimbursementDay = data.alreadyReimbursementDay
+          this.columnForm.surplusReimbursementDay = data.surplusReimbursementDay
+          this.columnForm.reimbursementQuota = data.reimbursementQuota
+          this.columnForm.alreadyReimbursementAmount = data.alreadyReimbursementAmount
+          this.columnForm.surplusReimbursementAmount = data.surplusReimbursementAmount
+          this.columnForm.reimbursementQuotaDay = data.reimbursementQuotaDay
+          this.reimbursementAddressList = data.reimbursementAddressList
+          this.loading = false
+        })
+      },
+      resetSearch () {
+        this.$refs.inputForm.resetFields()
+        // eslint-disable-next-line no-unused-expressions
+        this.searchForm.reimbursementAddress = ''
+        this.searchForm.beginReimbursementQuota = ''
+        this.searchForm.endReimbursementQuota = ''
+        this.searchDates = ''
+        this.$nextTick(() => {
+          this.refreshList()
+        })
+      },
       goBack () {
         this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
         this.$router.push('/reimbursementSys/user/reimbursementUserList')
@@ -140,10 +270,10 @@
       addressType (row, column) {
         // eslint-disable-next-line eqeqeq
         if (row.reimbursementAddress == 0) {
-          return ''
+          return '分所报销'
           // eslint-disable-next-line eqeqeq
         } else if (row.reimbursementAddress == 1) {
-          return '武汉'
+          return '总所报销'
         }
       }
     }

+ 2 - 2
src/views/modules/reimbursementSys/user/reimbursementUserList.vue

@@ -11,7 +11,7 @@
                   label: 'name',         // 显示名称
                   children: 'children'    // 子级字段名
                 }"
-          :url="`/sys/user/treeUserData?type=2`"
+          :url="`/sys/user/treeUserDataByOfficeName?type=2&officeName=中审众环`"
           :value="searchForm.userId"
           :clearable="true"
           :accordion="true"
@@ -183,7 +183,7 @@ export default {
     },
     // 查看业务报销详情
     viewBusinessInfo (id) {
-      this.$router.push({path: `/reimbursementSys/user/reimbursementUserBusinessList`, query: {id: id, title: '报销详情'}})
+      this.$router.push({path: `/reimbursementSys/user/reimbursementUserBusinessList`, query: {userId: id, title: '报销详情'}})
     },
     // 删除
     del (id) {

+ 1 - 2
src/views/modules/reimbursementSys/wuHanReimbursementBusinessForm.vue

@@ -17,7 +17,7 @@
                   label: 'name',         // 显示名称
                   children: 'children'    // 子级字段名
                 }"
-              :url="`/sys/user/treeUserData?type=2`"
+              :url="`/sys/user/treeUserDataByOfficeName?type=2&officeName=中审众环`"
               :value="inputForm.userId"
               :clearable="true"
               :accordion="true"
@@ -187,7 +187,6 @@
         return str
       },
       checkReimbursementAmount: function (num) {
-        console.log(num)
         let str = num.toString()
         var len1 = str.substr(0, 1)
         var len2 = str.substr(1, 1)