浏览代码

报销类型部分代码调整

user5 2 年之前
父节点
当前提交
c730c06b11

+ 6 - 0
src/api/sys/OfficeService.js

@@ -47,4 +47,10 @@ export default class OfficeService {
       params: params
     })
   }
+  getSecondLevelData () {
+    return request({
+      url: '/sys/office/getSecondLevelData',
+      method: 'get'
+    })
+  }
 }

+ 1 - 0
src/utils/index.js

@@ -139,6 +139,7 @@ export function download (url, params) {
 }
 
 export function downloadExcel (data, filename) {
+  filename = filename + '.xls'
   var blob = new Blob([data], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'}) // application/vnd.openxmlformats-officedocument.spreadsheetml.sheet这里表示xlsx类型
   var downloadElement = document.createElement('a')
   var href = window.URL.createObjectURL(blob) // 创建下载的链接

+ 1 - 1
src/views/modules/cw/projectReportArchive/ProjectReportArchiveDetailList.vue

@@ -327,7 +327,7 @@
         }
         return this.projectReportArchiveDetailService.exportExcel(params).then((res) => {
           // 将二进制流文件写入excel表,以下为重要步骤
-          this.$utils.downloadExcel(res.data, options.filename + '.xls')
+          this.$utils.downloadExcel(res.data, options.filename)
         }).catch(function (err) {
           if (err.response) {
             console.log(err.response)

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

@@ -515,12 +515,12 @@
         >
           <vxe-table-column field="code" title="发票代码" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-input oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10" v-model="scope.row.code" ></el-input>
+              <el-input oninput ="value=value.replace(/\D|^/g,'')" maxlength="20" v-model="scope.row.code" ></el-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="number" title="发票号" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-input oninput ="value=value.replace(/\D|^0/g,'')" maxlength="8" @change="isExict(scope.row)" v-model="scope.row.number" ></el-input>
+              <el-input oninput ="value=value.replace(/\D|^/g,'')" maxlength="8" @change="isExict(scope.row)" v-model="scope.row.number" ></el-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="amount" title="金额" :edit-render="{}">

+ 21 - 15
src/views/modules/cw/reimbursementApproval/type/TypeForm.vue

@@ -12,20 +12,6 @@
                label-width="100px" @submit.native.prevent>
         <el-row  :gutter="15">
           <el-col :span="21">
-            <el-form-item label="业务类型" prop="businessType"
-                          :rules="[{required: true, message: '业务类型不能为空', trigger: 'blur'}
-                 ]">
-              <el-select :disabled="this.inputForm.businessType !== '' & method !== 'edit'" v-model="inputForm.businessType" placeholder="请选择业务类型" style="width:100%;">
-                <el-option
-                  v-for="item in $dictUtils.getDictList('business_type')"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="21">
             <el-form-item label="上级节点" prop="parentId">
               <SelectTree
                 ref="areaTree"
@@ -50,6 +36,18 @@
             </el-form-item>
           </el-col>
           <el-col :span="21">
+            <el-form-item label="关联部门" prop="officeIdList">
+              <el-select v-model="inputForm.officeIdList" style="width:100%" multiple placeholder="请选择">
+                <el-option
+                  v-for="item in officeList"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="21">
             <el-form-item label="序号" prop="no">
               <el-input v-model="inputForm.no" :disabled="true" show-word-limit></el-input>
             </el-form-item>
@@ -68,6 +66,7 @@
   // import ReimbursementTypeService from '@/api/sys/ReimbursementTypeService'
   import ReimbursementApprovalTypeService from '@/api/cw/reimbursementApproval/ReimbursementApprovalTypeService'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import OfficeService from '@/api/sys/OfficeService'
   export default {
     data () {
       return {
@@ -76,19 +75,23 @@
         method: '',
         visible: false,
         loading: false,
+        officeList: [],
         inputForm: {
           businessType: '',
           name: '',
           no: '',
-          parentId: ''
+          parentId: '',
+          officeIdList: []
         }
       }
     },
     // reimbursementTypeService: null,
     reimbursementApprovalTypeService: null,
+    OfficeService: null,
     created () {
       // this.reimbursementTypeService = new ReimbursementTypeService()
       this.reimbursementApprovalTypeService = new ReimbursementApprovalTypeService()
+      this.officeService = new OfficeService()
     },
     components: {
       SelectTree
@@ -132,6 +135,9 @@
             //   this.loading = false
             // })
           }
+          this.officeService.getSecondLevelData().then(({data}) => {
+            this.officeList = data
+          })
         })
       },
       // 表单提交

+ 1 - 1
src/views/modules/cw/reportManagement/ReportManagementList.vue

@@ -884,7 +884,7 @@
         }
         return this.projectReportService.exportExcel(params).then((res) => {
           // 将二进制流文件写入excel表,以下为重要步骤
-          this.$utils.downloadExcel(res.data, options.filename + '.xls')
+          this.$utils.downloadExcel(res.data, options.filename)
         }).catch(function (err) {
           if (err.response) {
             // console.log(err.response)

+ 1 - 1
src/views/modules/cw/reportManagement/ReportManagementSignatureForm.vue

@@ -789,7 +789,7 @@
             }
             if (this.commonJS.isNotEmpty(this.inputForm.signatureContractId) && this.status === 'audit' && this.commonJS.isNotEmpty(sFiles) && this.inputForm.signatureType !== '3') {
               // 签章按钮展示
-              this.$refs.archiveFile.newUpload(this.method, data.cwFileInfoList, 'cwWorkContract', null, null, null, null, false, 'audit')
+              this.$refs.archiveFile.newUpload(this.method, data.cwFileInfoList, 'cwReportSignature', null, null, null, null, false, 'audit')
             } else {
               // 签章按钮隐藏
               this.$refs.archiveFile.newUpload(this.method, data.cwFileInfoList, 'cwWorkContract', null, null, null, null, false)

+ 2 - 2
src/views/modules/reimbursement/info/ReimbursementForm.vue

@@ -139,12 +139,12 @@
         >
           <vxe-table-column field="code" title="发票代码" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-input oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10" v-model="scope.row.code" ></el-input>
+              <el-input oninput ="value=value.replace(/\D|^/g,'')" maxlength="20" v-model="scope.row.code" ></el-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="number" title="发票号" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-input oninput ="value=value.replace(/\D|^0/g,'')" maxlength="8" @change="isExict(scope.row)" v-model="scope.row.number" ></el-input>
+              <el-input oninput ="value=value.replace(/\D|^/g,'')" maxlength="8" @change="isExict(scope.row)" v-model="scope.row.number" ></el-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="amount" title="金额" :edit-render="{}">

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

@@ -515,12 +515,12 @@
         >
           <vxe-table-column field="code" title="发票代码" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-input oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10" v-model="scope.row.code" ></el-input>
+              <el-input oninput ="value=value.replace(/\D|^/g,'')" maxlength="20" v-model="scope.row.code" ></el-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="number" title="发票号" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-input oninput ="value=value.replace(/\D|^0/g,'')" maxlength="8" @change="isExict(scope.row)" v-model="scope.row.number" ></el-input>
+              <el-input oninput ="value=value.replace(/\D|^/g,'')" maxlength="8" @change="isExict(scope.row)" v-model="scope.row.number" ></el-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="amount" title="金额" :edit-render="{}">