فهرست منبع

报销类型修改

wangqiang 2 سال پیش
والد
کامیت
85ad318584

+ 2 - 0
src/views/modules/cw/reimbursementApproval/info/CwReimbursementTypePullForm.vue

@@ -86,6 +86,7 @@
     },
     methods: {
       init (like, deptName) {
+        console.log('进来了')
         console.log('like', like)
         if (like === '1') {
           this.like = '1'
@@ -93,6 +94,7 @@
           this.like = ''
         }
         this.officeId = deptName
+        console.log('this.officeId', this.officeId)
         this.visible = true
         this.list()
       },

+ 21 - 6
src/views/modules/materialManagement/collect/PurchasePageForm.vue

@@ -69,8 +69,9 @@
 
 <script>
   import InputNumber from '@/views/modules/sys/workContract/InputNumber.vue'
-  import CollectService from '@/api/materialManagement/CollectService'
+  // import CollectService from '@/api/materialManagement/CollectService'
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  import WareHouseService from '@/api/materialManagement/WareHouseService'
   export default {
     data () {
       return {
@@ -91,9 +92,11 @@
         typeTest: ''
       }
     },
-    collectService: null,
+    // collectService: null,
+    wareHouseService: null,
     created () {
-      this.collectService = new CollectService()
+      // this.collectService = new CollectService()
+      this.wareHouseService = new WareHouseService()
     },
     components: {
       SelectUserTree,
@@ -103,7 +106,7 @@
       init (collectType) {
         this.visible = true
         this.typeTest = collectType
-        this.list(collectType)
+        this.list()
       },
       // 表单提交
       getProject () {
@@ -115,19 +118,31 @@
         this.close()
         this.$emit('getProject', row)
       },
-      list (collectType) {
+      list () {
         this.loading = true
         // this.searchForm.createId = this.$store.state.user.id
         // this.searchForm.status = '5'
         this.searchForm.wareHouseType = this.typeTest
-        this.collectService.wareHouseList({
+        // this.collectService.wareHouseList({
+        //   'current': this.tablePage.currentPage,
+        //   'size': this.tablePage.pageSize,
+        //   'orders': this.tablePage.orders,
+        //   ...this.searchForm
+        // }).then(({data}) => {
+        //   this.dataList = data.records
+        //   this.tablePage.total = data.total
+        //   this.loading = false
+        // })
+        this.wareHouseService.wareHouseSummaryList({
           'current': this.tablePage.currentPage,
           'size': this.tablePage.pageSize,
           'orders': this.tablePage.orders,
           ...this.searchForm
         }).then(({data}) => {
+          console.log('data', data)
           this.dataList = data.records
           this.tablePage.total = data.total
+          this.tableKey = Math.random()
           this.loading = false
         })
       },

+ 22 - 11
src/views/modules/reimbursement/info/ReimbursementForm.vue

@@ -77,7 +77,7 @@
           </vxe-table-column>
           <vxe-table-column field="typeName" title="报销类型" :edit-render="{}" :rules="[{required: true, message:'请选择报销类型', trigger:'blur'}]">
             <template v-slot:edit="scope">
-              <el-input v-model="scope.row.typeName" @focus="typePullForm(scope.$rowIndex)"></el-input>
+              <el-input v-model="scope.row.typeName" @focus="typePullForm(scope.$rowIndex, scope.row.deptId)"></el-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="projectName" title="报销项目" :edit-render="{}" :rules="[{required: true, message:'请选择报销项目', trigger:'blur'}]">
@@ -371,16 +371,27 @@
       // 新增
       async insertEvent (type) {
         if (type === 'detail') {
-          await this.$refs.detailTable.insert().then((data) => {
-            data.userName = this.name
-            data.deptName = this.officeName
-            this.inputForm.detailInfos.push(data)
-          })
+          let d = {
+            userName: JSON.parse(localStorage.getItem('user')).name,
+            deptName: JSON.parse(localStorage.getItem('user')).officeDTO.name,
+            userId: JSON.parse(localStorage.getItem('user')).id,
+            deptId: JSON.parse(localStorage.getItem('user')).officeDTO.id
+          }
+          if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
+            this.inputForm.detailInfos = []
+          }
+          this.$refs.detailTable.insertAt(d)
+          this.inputForm.detailInfos.push(d)
+          this.detailKey = Math.random()
         }
         if (type === 'amount') {
-          await this.$refs.amountTable.insert().then((data) => {
-            this.inputForm.amountInfos.push(data)
-          })
+          let d = {}
+          if (this.commonJS.isEmpty(this.inputForm.amountInfos)) {
+            this.inputForm.amountInfos = []
+          }
+          this.$refs.amountTable.insertAt(d)
+          this.inputForm.amountInfos.push(d)
+          this.amountKey = Math.random()
         }
       },
       // 暂存
@@ -650,9 +661,9 @@
         this.$forceUpdate()
       },
       // 报销类型下拉弹窗
-      typePullForm (rowIndex) {
+      typePullForm (rowIndex, deptName) {
         this.indexRow = rowIndex
-        this.$refs.reimbursementTypePullForm.init()
+        this.$refs.reimbursementTypePullForm.init('', deptName)
       },
       getProgramForType (rows) {
         this.inputForm.detailInfos[this.indexRow].typeId = rows.id

+ 16 - 6
src/views/modules/zs/reimbursement/info/CwReimbursementTypePullForm.vue

@@ -54,7 +54,8 @@
 
 <script>
   // import ReimbursementTypeService from '@/api/sys/ReimbursementTypeService'
-  import ReimbursementTypeService from '@/api/zs/reimbursement/ReimbursementTypeService'
+  // import ReimbursementTypeService from '@/api/zs/reimbursement/ReimbursementTypeService'
+  import ReimbursementApprovalTypeService from '@/api/cw/reimbursementApproval/ReimbursementApprovalTypeService'
   export default {
     data () {
       return {
@@ -72,25 +73,29 @@
         method: '',
         visible: false,
         loading: false,
-        like: ''
+        like: '',
+        officeId: ''
       }
     },
     // reimbursementTypeService: null,
-    reimbursementTypeService: null,
+    // reimbursementTypeService: null,
+    reimbursementApprovalTypeService: null,
     created () {
       // this.reimbursementTypeService = new ReimbursementTypeService()
-      this.reimbursementTypeService = new ReimbursementTypeService()
+      // this.reimbursementTypeService = new ReimbursementTypeService()
+      this.reimbursementApprovalTypeService = new ReimbursementApprovalTypeService()
     },
     components: {
     },
     methods: {
-      init (like) {
+      init (like, deptName) {
         console.log('like', like)
         if (like === '1') {
           this.like = '1'
         } else {
           this.like = ''
         }
+        this.officeId = deptName
         this.visible = true
         this.list()
       },
@@ -114,10 +119,15 @@
       list () {
         this.loading = true
         this.searchForm.like = this.like
-        this.reimbursementTypeService.bxList({...this.searchForm}).then(({data}) => {
+        this.searchForm.officeId = this.officeId
+        this.reimbursementApprovalTypeService.bxList({...this.searchForm}).then(({data}) => {
           this.dataList = data
           this.loading = false
         })
+        // this.reimbursementTypeService.bxList({...this.searchForm}).then(({data}) => {
+        //   this.dataList = data
+        //   this.loading = false
+        // })
         // this.reimbursementTypeService.list({...this.searchForm}).then(({data}) => {
         //   this.dataList = data
         //   this.loading = false

+ 15 - 15
src/views/modules/zs/reimbursement/info/ReimbursementForm.vue

@@ -140,7 +140,7 @@
             </vxe-table-column>
             <vxe-table-column field="typeName" title="报销类别" :edit-render="{}" :rules="[{required: true, message:'请选择报销类别', trigger:'blur'}]">
               <template v-slot:edit="scope">
-                <el-input v-model="scope.row.typeName" @focus="typePullForm(scope.$rowIndex)"></el-input>
+                <el-input v-model="scope.row.typeName" @focus="typePullForm(scope.$rowIndex, scope.row.deptId)"></el-input>
               </template>
             </vxe-table-column>
             <vxe-table-column field="projectName" title="报销项目" :edit-render="{}" :rules="[{required: true, message:'请选择报销项目', trigger:'blur'}]">
@@ -218,7 +218,7 @@
             </vxe-table-column>
             <vxe-table-column field="typeName" title="报销类别" :edit-render="{}" :rules="[{required: true, message:'请选择报销类别', trigger:'blur'}]">
               <template v-slot:edit="scope">
-                <el-input v-model="scope.row.typeName" @focus="typePullForm2(scope.$rowIndex)"></el-input>
+                <el-input v-model="scope.row.typeName" @focus="typePullForm2(scope.$rowIndex, scope.row.deptId)"></el-input>
               </template>
             </vxe-table-column>
             <vxe-table-column field="contractName" title="报销合同" :edit-render="{}" :rules="[{required: true, message:'请选择报销合同', trigger:'blur'}]">
@@ -296,7 +296,7 @@
             </vxe-table-column>
             <vxe-table-column field="typeName" title="报销类别" :edit-render="{}" :rules="[{required: true, message:'请选择报销类别', trigger:'blur'}]">
               <template v-slot:edit="scope">
-                <el-input v-model="scope.row.typeName" @focus="typePullForm3(scope.$rowIndex)"></el-input>
+                <el-input v-model="scope.row.typeName" @focus="typePullForm3(scope.$rowIndex, scope.row.deptId)"></el-input>
               </template>
             </vxe-table-column>
             <vxe-table-column field="projectName" title="报销项目" :edit-render="{}" :rules="[{required: true, message:'请选择报销项目', trigger:'blur'}]">
@@ -374,7 +374,7 @@
             </vxe-table-column>
             <vxe-table-column field="typeName" title="报销类别" :edit-render="{}" :rules="[{required: true, message:'请选择报销类别', trigger:'blur'}]">
               <template v-slot:edit="scope">
-                <el-input v-model="scope.row.typeName" @focus="typePullForm4(scope.$rowIndex)"></el-input>
+                <el-input v-model="scope.row.typeName" @focus="typePullForm4(scope.$rowIndex, scope.row.deptId)"></el-input>
               </template>
             </vxe-table-column>
             <vxe-table-column field="projectName" title="报销详情" :edit-render="{}" :rules="[{required: true, message:'请填写报销详情', trigger:'blur'}]">
@@ -452,7 +452,7 @@
             </vxe-table-column>
             <vxe-table-column field="typeName" title="报销类别" :edit-render="{}" :rules="[{required: true, message:'请选择报销类别', trigger:'blur'}]">
               <template v-slot:edit="scope">
-                <el-input v-model="scope.row.typeName" @focus="typePullForm5(scope.$rowIndex)"></el-input>
+                <el-input v-model="scope.row.typeName" @focus="typePullForm5(scope.$rowIndex, scope.row.deptId)"></el-input>
               </template>
             </vxe-table-column>
             <vxe-table-column field="projectName" title="报销项目" :edit-render="{}" :rules="[{required: true, message:'请选择报销项目', trigger:'blur'}]">
@@ -1247,30 +1247,30 @@
         this.$forceUpdate()
       },
       // 报销类型下拉弹窗
-      typePullForm (rowIndex) {
+      typePullForm (rowIndex, deptName) {
         this.indexRow = rowIndex
         // this.$refs.reimbursementTypePullForm.init()
-        this.$refs.cwReimbursementTypePullForm.init('1')
+        this.$refs.cwReimbursementTypePullForm.init('1', deptName)
       },
-      typePullForm2 (rowIndex) {
+      typePullForm2 (rowIndex, deptName) {
         this.indexRow = rowIndex
         // this.$refs.reimbursementTypePullForm.init()
-        this.$refs.cwReimbursementTypePullForm2.init('2')
+        this.$refs.cwReimbursementTypePullForm2.init('2', deptName)
       },
-      typePullForm3 (rowIndex) {
+      typePullForm3 (rowIndex, deptName) {
         this.indexRow = rowIndex
         // this.$refs.reimbursementTypePullForm.init()
-        this.$refs.cwReimbursementTypePullForm3.init('1')
+        this.$refs.cwReimbursementTypePullForm3.init('1', deptName)
       },
-      typePullForm4 (rowIndex) {
+      typePullForm4 (rowIndex, deptName) {
         this.indexRow = rowIndex
         // this.$refs.reimbursementTypePullForm.init()
-        this.$refs.cwReimbursementTypePullForm4.init('2')
+        this.$refs.cwReimbursementTypePullForm4.init('2', deptName)
       },
-      typePullForm5 (rowIndex) {
+      typePullForm5 (rowIndex, deptName) {
         this.indexRow = rowIndex
         // this.$refs.reimbursementTypePullForm.init()
-        this.$refs.cwReimbursementTypePullForm5.init('2')
+        this.$refs.cwReimbursementTypePullForm5.init('2', deptName)
       },
       // 报销内容详情
       getProgramForType (rows) {