Browse Source

报告作废归档、评估项目收费标准调整

user5 2 years ago
parent
commit
0e8506c0ed

+ 1 - 1
.env.development

@@ -10,4 +10,4 @@ VUE_APP_SERVER_URL = 'http://localhost:8084'
 #单点登录设置
 VUE_APP_SSO_LOGIN  = 'false'
 VUE_APP_CAS_SERVER = 'https://www.cainiao.com:8443/cas'
-VUE_APP_CLIENT_LOGIN = 'http://localhost:3000/#/casLogin'
+VUE_APP_CLIENT_LOGIN = 'http://localhost:3000/#/casLogin'

+ 9 - 0
src/api/cw/reportCancellApplyArchived/ReportCancellApplyArchivedService.js

@@ -36,4 +36,13 @@ export default class ReportCancellApplyArchivedService {
       params: {id: id}
     })
   }
+
+  exportExcel (params) {
+    return request({
+      url: '/cwProjectReportArchivedCancell/export',
+      method: 'get',
+      params: params,
+      responseType: 'blob'
+    })
+  }
 }

+ 14 - 5
src/views/modules/cw/invoice/InvoiceFormTask.vue

@@ -248,8 +248,7 @@
                         {required: true, message:'发票金额不能为空', trigger:'blur'}
                ]">
             <el-input
-              @blur="fixedAccount"
-              oninput ="value=value.match(/\d+\.?\d{0,2}/,'')"
+              @input="fixedAccount"
               placeholder="请填写发票金额"
               maxlength="15"
               v-model="inputForm.account"
@@ -1500,11 +1499,21 @@
       },
       // 格式化 发票金额  保留两位小数
       fixedAccount () {
-        if (this.commonJS.isNotEmpty(this.inputForm.account)) {
-          this.inputForm.account = parseFloat(this.inputForm.account).toFixed(2)
-        } else {
+        if (isNaN(this.inputForm.account) && !/^-$/.test(this.inputForm.account)) {
           this.inputForm.account = ''
         }
+        if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(this.inputForm.account)) {
+          this.inputForm.account = this.inputForm.account.replace(/\.\d{2,}$/, this.inputForm.account.substr(this.inputForm.account.indexOf('.'), 3))
+        }
+        // 禁止录入整数部分两位以上,但首位为0
+        var regStrs = [
+          ['^(\\-)?0(\\d+)$', '$1']
+        ]
+        for (var i = 0; i < regStrs.length; i++) {
+          var reg = new RegExp(regStrs[i][0])
+          var result = this.inputForm.account.replace(reg, regStrs[i][1])
+          this.inputForm.account = result
+        }
       }
     }
   }

+ 14 - 5
src/views/modules/cw/invoice/InvoiceUpdateForm.vue

@@ -257,8 +257,7 @@
                         {required: true, message:'发票金额不能为空', trigger:'blur'}
                ]">
             <el-input
-              @blur="fixedAccount"
-              oninput ="value=value.match(/\d+\.?\d{0,2}/,'')"
+              @input="fixedAccount"
               placeholder="请填写发票金额"
               maxlength="15"
               v-model="inputForm.account"
@@ -1571,11 +1570,21 @@
       },
       // 格式化 发票金额  保留两位小数
       fixedAccount () {
-        if (this.commonJS.isNotEmpty(this.inputForm.account)) {
-          this.inputForm.account = parseFloat(this.inputForm.account).toFixed(2)
-        } else {
+        if (isNaN(this.inputForm.account) && !/^-$/.test(this.inputForm.account)) {
           this.inputForm.account = ''
         }
+        if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(this.inputForm.account)) {
+          this.inputForm.account = this.inputForm.account.replace(/\.\d{2,}$/, this.inputForm.account.substr(this.inputForm.account.indexOf('.'), 3))
+        }
+        // 禁止录入整数部分两位以上,但首位为0
+        var regStrs = [
+          ['^(\\-)?0(\\d+)$', '$1']
+        ]
+        for (var i = 0; i < regStrs.length; i++) {
+          var reg = new RegExp(regStrs[i][0])
+          var result = this.inputForm.account.replace(reg, regStrs[i][1])
+          this.inputForm.account = result
+        }
       }
     }
   }

+ 61 - 5
src/views/modules/cw/reportCancellApplyArchived/ReportCancellApplyArchivedList.vue

@@ -44,6 +44,17 @@
         </el-date-picker>
       </el-form-item>
 
+      <el-form-item label="作废归档状态" prop="status">
+        <el-select size="small" v-model="searchForm.applyFileType" placeholder="请选择报告作废归档状态" style="width:100%;"clearable>
+          <el-option
+            v-for="item in $dictUtils.getDictList('filed_type')"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </el-form-item>
+
       <el-form-item>
         <el-button type="default" @click="showHide" size="small" :icon="showHideIcon">{{showHideName}}</el-button>
         <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
@@ -51,14 +62,13 @@
       </el-form-item>
     </el-form>
     <div class="bg-white top" style="">
-      <vxe-toolbar :refresh="{query: refreshList}" custom>
+      <vxe-toolbar :refresh="{query: refreshList}" export custom>
 <!--        <template #buttons>-->
 <!--          <el-button v-if="hasPermission('cw_work_client:info:add')" type="primary" size="small" icon="el-icon-plus" @click="start()">新建</el-button>-->
 <!--        </template>-->
       </vxe-toolbar>
       <div style="height: calc(100% - 90px)">
         <vxe-table
-          :key="tableKey"
           border="inner"
           auto-resize
           resizable
@@ -69,6 +79,15 @@
           show-header-overflow
           show-overflow
           highlight-hover-row
+          :print-config="{}"
+          :export-config="{
+                    remote: true,
+                    filename: `报告作废归档信息${moment(new Date()).format('YYYY-MM-DD')}`,
+                    sheetName: '报告作废归档信息',
+                    exportMethod: exportMethod,
+                    types: ['xlsx'],
+                    modes: ['current', 'selected', 'all']
+                  }"
           :menu-config="{}"
           @sort-change="sortChangeHandle"
           :sort-config="{remote:true}"
@@ -84,6 +103,13 @@
           </vxe-column>
           <vxe-column min-width="160" align="center" title="项目编号" field="projectNumber"></vxe-column>
           <vxe-column min-width="160" align="center" title="项目名称" field="projectName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="报告文号" field="reportNo">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('cwProjectReport:list')&&commonJS.isNotEmpty(scope.row.reportId)" @click="viewReport(scope.row.reportId)">{{scope.row.reportNo}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('cwProjectReport:list')&&commonJS.isNotEmpty(scope.row.reportId)"  @click="viewReport(scope.row.reportId)">{{scope.row.reportNo}}</el-link>
+              <span v-else>{{scope.row.reportNo}}</span>
+            </template>
+          </vxe-column>
           <vxe-column min-width="160" align="center" title="报告所属部门" field="departmentName"></vxe-column>
           <vxe-column min-width="160" align="center" title="项目经理1" field="projectMasterName"></vxe-column>
           <vxe-column min-width="160" align="center" title="项目经理2" field="projectMaster2Name"></vxe-column>
@@ -140,7 +166,7 @@
         </vxe-pager>
       </div>
     </div>
-<!--    <ReportManagementForm ref="reportManagementForm"></ReportManagementForm>-->
+    <ReportManagementForm ref="reportManagementForm"></ReportManagementForm>
     <ReportCancellApplyForm ref="reportCancellApplyForm"></ReportCancellApplyForm>
   </div>
 </template>
@@ -152,7 +178,7 @@
   import ReportCancellApplyArchivedService from '@/api/cw/reportCancellApplyArchived/ReportCancellApplyArchivedService'
   import TaskService from '@/api/flowable/TaskService'
   import ProcessService from '@/api/flowable/ProcessService'
-  // import ReportManagementForm from '../reportManagement/ReportManagementForm'
+  import ReportManagementForm from '../reportManagement/ReportManagementForm'
   import ReportCancellApplyForm from './ReportCancellApplyArchivedForm'
   // eslint-disable-next-line no-unused-vars
   import pick from 'lodash.pick'
@@ -208,7 +234,7 @@
       this.userService = new UserService()
     },
     components: {
-      // ReportManagementForm
+      ReportManagementForm,
       ReportCancellApplyForm,
       SelectUserTree,
       UserSelect
@@ -258,6 +284,11 @@
         // this.$refs.reportManagementForm.init('view', id)
         this.$refs.reportCancellApplyForm.init('view', id)
       },
+      // 根据报告id查看报告详情
+      viewReport (id) {
+        this.$refs.reportManagementForm.init('view', id)
+        // this.$refs.reportCancellApplyForm.init('view', id)
+      },
       // 查询当前用户是否是管理员用户
       checkIsAdmin () {
         this.userService.is().then(({data}) => {
@@ -639,6 +670,31 @@
           }
         }
         return false
+      },
+      // 自定义服务端导出
+      exportMethod ({ options }) {
+        // 传给服务端的参数
+        const params = {
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm,
+          filename: options.filename,
+          sheetName: options.sheetName,
+          isHeader: options.isHeader,
+          original: options.original,
+          mode: options.mode,
+          selectIds: options.mode === 'selected' ? options.data.map(item => item.id) : [],
+          exportFields: options.columns.map(column => column.property)
+        }
+        return this.reportCancellApplyArchivedService.exportExcel(params).then((res) => {
+          // 将二进制流文件写入excel表,以下为重要步骤
+          this.$utils.downloadExcel(res.data, options.filename)
+        }).catch(function (err) {
+          if (err.response) {
+            // console.log(err.response)
+          }
+        })
       }
     }
   }

+ 0 - 2
src/views/modules/cw/reportCancellApplyArchived/ReportCancellApplyArchivedTaskForm.vue

@@ -139,7 +139,6 @@
               <el-col  :span="12">
                 <el-form-item label="案卷号" prop="number"
                               :rules="[
-                                {required: true, message:'案卷号不能为空', trigger:'blur'}
                    ]">
                   <el-input :disabled="false" v-model="inputForm.number" placeholder="请填写案卷号" clearable></el-input>
                 </el-form-item>
@@ -147,7 +146,6 @@
               <el-col  :span="12">
                 <el-form-item label="确认案卷号" prop="isNumber"
                               :rules="[
-                                {required: true, message:'确认案卷号不能为空', trigger:'blur'}
                    ]">
                   <el-input :disabled="false" v-model="inputForm.isNumber" placeholder="请填写确认案卷号" clearable></el-input>
                 </el-form-item>

+ 14 - 5
src/views/modules/finance/invoice/InvoiceFormTask.vue

@@ -244,8 +244,7 @@
                         {required: true, message:'发票金额不能为空', trigger:'blur'}
                ]">
             <el-input
-              @blur="fixedAccount"
-              oninput ="value=value.match(/\d+\.?\d{0,2}/,'')"
+              @input="fixedAccount"
               placeholder="请填写发票金额"
               maxlength="15"
               v-model="inputForm.account"
@@ -1442,11 +1441,21 @@
       },
       // 格式化 发票金额  保留两位小数
       fixedAccount () {
-        if (this.commonJS.isNotEmpty(this.inputForm.account)) {
-          this.inputForm.account = parseFloat(this.inputForm.account).toFixed(2)
-        } else {
+        if (isNaN(this.inputForm.account) && !/^-$/.test(this.inputForm.account)) {
           this.inputForm.account = ''
         }
+        if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(this.inputForm.account)) {
+          this.inputForm.account = this.inputForm.account.replace(/\.\d{2,}$/, this.inputForm.account.substr(this.inputForm.account.indexOf('.'), 3))
+        }
+        // 禁止录入整数部分两位以上,但首位为0
+        var regStrs = [
+          ['^(\\-)?0(\\d+)$', '$1']
+        ]
+        for (var i = 0; i < regStrs.length; i++) {
+          var reg = new RegExp(regStrs[i][0])
+          var result = this.inputForm.account.replace(reg, regStrs[i][1])
+          this.inputForm.account = result
+        }
       }
     }
   }

+ 1 - 1
src/views/modules/materialManagement/info/MaterialTypePullForm.vue

@@ -99,7 +99,7 @@
           return
         }
         rows = this.$refs.typeTable.getRadioRecord()
-        if (rows.level !== '3') {
+        if (rows.children.length > 0) {
           this.$message.error('请选择子集数据')
           return
         }

+ 8 - 21
src/views/modules/sys/workContract/WorkContractForm.vue

@@ -121,7 +121,7 @@
         <el-col :span="24">
           <el-form-item label="收费标准" prop="contractFees">
             <el-checkbox-group v-model="inputForm.contractFees">
-              <el-checkbox @change="changeContractFee" v-for="item in $dictUtils.getDictList('contract_fee_pg')" :label="item.value">
+              <el-checkbox @change="changeContractFee(item.value,$dictUtils.getDictList('contract_fee_pg'))" v-for="item in $dictUtils.getDictList('contract_fee_pg')" :label="item.value">
                 {{item.label}}
               </el-checkbox>
             </el-checkbox-group>
@@ -602,31 +602,18 @@
       closePop () {
         this.visable = false
       },
-      changeContractFee () {
+      changeContractFee (val, items) {
         let fee = ''
         let fees = this.inputForm.contractFees
         if (fees.length > 0) {
           fees.forEach(i => {
-            if (i === '1') {
-              i = '苏会协[2010]52号'
-              fee = fee + ';' + i
-            }
-            if (i === '2') {
-              i = '苏政办发[2010]101号'
-              fee = fee + ';' + i
-            }
-            if (i === '3') {
-              i = '苏价费[2010]284号'
-              fee = fee + ';' + i
-            }
-            if (i === '4') {
-              i = '发改价格[2010]196号'
-              fee = fee + ';' + i
-            }
-            if (i === '5') {
-              i = '其他'
-              fee = fee + ';' + i
+            items.forEach(item => {
+              if (i === item.value) {
+                var label = item.label
+                fee = fee + ';' + label
+              }
             }
+            )
             this.inputForm.contractFee = fee.substring(1, fee.length)
           })
         } else {