浏览代码

财务-bug修改

wangqiang 2 年之前
父节点
当前提交
598950f878

+ 2 - 1
src/views/modules/cw/projectRecords/ProjectRecordsTaskForm.vue

@@ -126,7 +126,7 @@
                   </el-form-item>
                 </el-col>
                 <el-col :span="12">
-                  <el-form-item label="项目金额" prop="projectMoney"
+                  <el-form-item label="项目金额(元)" prop="projectMoney"
                                 :rules="[
                    ]">
                     <el-input-number
@@ -250,6 +250,7 @@
             </el-form>
         <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
           <el-tab-pane label="被服务单位" name="client">
+            <span slot="label"><span style="color: red;border-top: 20px">*</span> 被服务单位</span>
             <el-row :gutter="15">
               <el-button type="info" style="margin-bottom: 15px" size="mini" :disabled="formReadOnly" @click="openWorkClient">
                 新增被服务单位

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

@@ -38,7 +38,7 @@
           :tree-config="{transform: true, rowField: 'id', parentField: 'parentId'}"
           :checkbox-config="{}">
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
-          <vxe-column type="checkbox" width="40" ></vxe-column>
+          <vxe-column type="radio" width="40" ></vxe-column>
           <vxe-column title="报销内容名称" field="name" align="left" tree-node></vxe-column>
           <vxe-column width="100" title="序号" field="sort"></vxe-column>
         </vxe-table>
@@ -89,12 +89,12 @@
       // 表单提交
       getProgramForType () {
         let rows
-        if (this.commonJS.isEmpty(this.$refs.typeTable.getCheckboxRecords()) || this.$refs.typeTable.getCheckboxRecords().length > 1) {
+        if (this.commonJS.isEmpty(this.$refs.typeTable.getRadioRecord())) {
           this.$message.error('请选择一条数据')
           return
         }
-        rows = this.$refs.typeTable.getCheckboxRecords()
-        if (rows[0].level !== '3' && rows[0].id !== '3') {
+        rows = this.$refs.typeTable.getRadioRecord()
+        if (rows.level !== '3') {
           this.$message.error('请选择子集数据')
           return
         }

+ 1 - 1
src/views/modules/cw/reimbursementApproval/info/InfoList.vue

@@ -58,7 +58,7 @@
                   label: 'name',         // 显示名称
                   children: 'children'    // 子级字段名
                 }"
-          url="/reimbursementApproval/type/treeData?type=12"
+          url="/reimbursementApproval/type/treeData1?type=12"
           :value="searchForm.remiType"
           :clearable="true"
           :accordion="true"

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

@@ -85,6 +85,7 @@
               <el-input v-model="scope.row.projectName" @focus="openProgramPageForm(scope.$rowIndex, scope.row)"></el-input>
             </template>
           </vxe-table-column>
+
 <!--          <vxe-table-column field="reportNumber" title="报告号" :edit-render="{}">-->
 <!--            <template v-slot:edit="scope">-->
 <!--              <el-input :disabled="true" v-model="scope.row.reportNumber" ></el-input>-->
@@ -646,8 +647,8 @@
         this.$refs.cwReimbursementTypePullForm.init()
       },
       getProgramForType (rows) {
-        this.inputForm.detailInfos[this.indexRow].typeId = rows[0].id
-        this.inputForm.detailInfos[this.indexRow].typeName = rows[0].name
+        this.inputForm.detailInfos[this.indexRow].typeId = rows.id
+        this.inputForm.detailInfos[this.indexRow].typeName = rows.name
         this.indexRow = ''
         this.$forceUpdate()
       },

+ 32 - 16
src/views/modules/cw/reportManagement/ReportManagementForm.vue

@@ -127,7 +127,9 @@
                 <el-form-item label="审计收费(元)" prop="auditFees"
                               :rules="[
                    ]">
-                  <el-input v-model="inputForm.auditFees" placeholder="请填写审计收费(元)" clearable></el-input>
+                  <el-input v-model="inputForm.auditFees" placeholder="请填写审计收费(元)" clearable
+                            @keyup.native="inputForm.auditFees = twoDecimalPlaces(inputForm.auditFees)"
+                  ></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
@@ -893,21 +895,6 @@
         }
         waitForEach().then(() => {
           list.forEach(item => {
-            // eslint-disable-next-line no-unused-vars
-            // let d = {
-            //   servedUnitName: item.name, // 被服务单位名称
-            //   // reportNumber: this.inputForm.projectNumber + '-0' + (this.inputForm.cwProjectInfoList.length + 1), // 报告流水号
-            //   issueReport: '是',
-            //   sealType: '未盖章',
-            //   id: this.uuid,
-            //   servedUnitId: item.id
-            // }
-            // console.log('新增行数据填入')
-            // console.log('item', item)
-            // console.log('d', d)
-            // this.$refs.clientTable.insertAt(d)
-            // this.inputForm.cwProjectInfoList.push(d)
-            // console.log('this.inputForm.cwProjectInfoList', this.inputForm.cwProjectInfoList)
             this.inputForm.servedUnitName = item.name
             this.inputForm.servedUnitId = item.id
             this.inputForm.sealType = '未盖章'
@@ -926,6 +913,35 @@
       },
       openContract () {
         this.$refs.workContractChooseCom.init()
+      },
+      // 两位小数数字验证
+      twoDecimalPlaces (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line eqeqeq
+        if (str.indexOf('.') != -1) {
+          var str_ = str.substr(str.indexOf('.') + 1)
+          // eslint-disable-next-line eqeqeq
+          if (str_.indexOf('.') != -1) {
+            str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+          }
+          if (str_.length > 2) {
+            this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
+            return (str = '')
+          }
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+        return str
       }
     }
   }

+ 16 - 4
src/views/modules/cw/reportManagement/ReportManagementList.vue

@@ -37,6 +37,12 @@
           :accordion="true"
           @getValue="(value) => {searchForm.createBy=value}"/>
       </el-form-item>
+      <el-form-item label="报告文号" prop="reportNo">
+        <el-input size="small" v-model="searchForm.reportNo" placeholder="请输入报告文号" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="审计收费(元)" prop="contractAmounts">
+        <InputNumber :disabled="false" :precision="num" v-model="searchForm.contractAmounts"></InputNumber>
+      </el-form-item>
       <el-form-item label="创建时间" prop="contractDates">
         <el-date-picker
           placement="bottom-start"
@@ -98,6 +104,7 @@
           </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"></vxe-column>
           <vxe-column min-width="160" align="center" title="报告所属部门" field="departmentName"></vxe-column>
           <vxe-column min-width="160" align="center" title="项目经理" field="projectMasterName"></vxe-column>
 <!--          <vxe-column min-width="160" align="center" title="报告主办人" field="reportSponsor"></vxe-column>-->
@@ -157,6 +164,7 @@
 </template>
 
 <script>
+  import InputNumber from '@/views/modules/cw/workContract/InputNumber.vue'
   import WorkClientService from '@/api/cw/workClientInfo/WorkClientService'
   import ProjectReportService from '@/api/cw/reportManagement/ProjectReportService'
   import TaskService from '@/api/flowable/TaskService'
@@ -168,7 +176,10 @@
   export default {
     data () {
       return {
+        num: 0,
         searchForm: {
+          contractAmounts: [],
+          reportNo: '',
           projectNumber: '',
           projectName: '',
           projectMasterId: '',
@@ -208,7 +219,8 @@
     },
     components: {
       ReportManagementForm,
-      SelectUserTree
+      SelectUserTree,
+      InputNumber
     },
     computed: {
       userName () {
@@ -495,8 +507,8 @@
         this.taskService.getTaskDef({ procDefId: this.processDefinitionSId,
           businessId: row.sid1,
           businessTable: 'cw_project_report_signature'}).then((data) => {
-            console.log('row', row)
-            console.log('rowid', row.sid1)
+            // console.log('row', row)
+            // console.log('rowid', row.sid1)
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
@@ -656,7 +668,7 @@
           this.$utils.downloadExcel(res.data, options.filename + '.xls')
         }).catch(function (err) {
           if (err.response) {
-            console.log(err.response)
+            // console.log(err.response)
           }
         })
       }

+ 75 - 29
src/views/modules/cw/reportManagement/ReportManagementTaskForm.vue

@@ -121,7 +121,9 @@
             <el-form-item label="审计收费(元)" prop="auditFees"
                           :rules="[
                    ]">
-              <el-input v-model="inputForm.auditFees" placeholder="请填写审计收费(元)" clearable></el-input>
+              <el-input v-model="inputForm.auditFees" placeholder="请填写审计收费(元)" clearable
+                        @keyup.native="inputForm.auditFees = twoDecimalPlaces(inputForm.auditFees)"
+              ></el-input>
             </el-form-item>
           </el-col>
 
@@ -198,7 +200,7 @@
           </el-col>
           <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status !== 'audit'"
                    label-width="135px" @submit.native.prevent>
-            <el-col :span="12">
+            <el-col v-if="inputForm.status !== '2'" :span="12">
               <el-form-item label="意见类型" prop="opinionType"
                             :rules="[
                      ]">
@@ -212,6 +214,21 @@
                 </el-select>
               </el-form-item>
             </el-col>
+            <el-col v-if="inputForm.status === '2'" :span="12">
+              <el-form-item label="意见类型" prop="opinionType"
+                            :rules="[
+                              {required: true, message:'意见类型不能为空', trigger:'blur'}
+                     ]">
+                <el-select v-model="inputForm.opinionType" placeholder="请选择意见类型" style="width:100%;">
+                  <el-option
+                    v-for="item in $dictUtils.getDictList('cw_opinion_type')"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
           </el-form>
           <el-col :span="12">
             <el-form-item label="盖章状态" prop="sealType"
@@ -230,8 +247,8 @@
 <!--            新增行-->
 <!--          </el-button>-->
 <!--        </el-tab-pane>-->
-        <el-tab-pane label="件" name="archiveFile">
-          <!--        件-->
+        <el-tab-pane label="签章文件" name="archiveFile">
+          <!--        签章文件-->
           <UpLoadComponent ref="archiveFile"></UpLoadComponent>
         </el-tab-pane>
 
@@ -326,7 +343,7 @@
     computed: {
       bus: {
         get () {
-          this.$refs.archiveFile.setDividerName('件', false)
+          this.$refs.archiveFile.setDividerName('签章文件', false)
           // this.$refs.uploadComponent.setDividerName('附件', false)
           return this.businessId
         },
@@ -598,32 +615,32 @@
             if (this.commonJS.isEmpty(this.inputForm.createDate)) {
               this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
             }
-            // console.log('进来了')
-            // console.log('this.inputForm.cwProjectInfoList', this.inputForm.cwProjectInfoList)
-            // if (this.commonJS.isEmpty(this.inputForm.reportType)) {
-            //   this.$message.error('报告类型不能为空')
-            //   this.loading = false
-            //   throw new Error('报告类型不能为空')
-            // }
             this.$refs.archiveFile.getDataList().then((data) => {
               this.inputForm.cwFileInfoList = data
-            })
-            // let _this = this
-            // _this.inputForm.cwFileInfoList.forEach(info => {
-            //   if (this.commonJS.isEmpty(info.fileType)) {
-            //     throw new Error('文件类型不能为空')
-            //   }
-            //   if (this.commonJS.isEmpty(info.sealType)) {
-            //     throw new Error('盖章类型不能为空')
-            //   }
-            // })
-            this.projectReportService.saveForm(this.inputForm).then(({data}) => {
-              // console.log('businessTable', data.businessTable)
-              // console.log('businessId', data.businessId)
-              callback(data.businessTable, data.businessId, this.inputForm)
-              this.loading = false
-            }).catch(() => {
-              this.loading = false
+              if (this.commonJS.isNotEmpty(this.inputForm.cwFileInfoList)) {
+                let _this = this
+                _this.inputForm.cwFileInfoList.forEach((item, index) => {
+                  if (_this.commonJS.isEmpty(item.fileType)) {
+                    _this.$message.error('签章文件中,第' + (index + 1) + '条数据的“文件类型”未填写')
+                    _this.loading = false
+                    _this.inputForm.status = ''
+                    throw new Error('签章文件中,第' + (index + 1) + '条数据的“文件类型”未填写')
+                  } else if (_this.commonJS.isEmpty(item.sealType)) {
+                    _this.$message.error('签章文件中,第' + (index + 1) + '条数据的“盖章类型”未填写')
+                    _this.loading = false
+                    _this.inputForm.status = ''
+                    throw new Error('签章文件中,第' + (index + 1) + '条数据的“盖章类型”未填写')
+                  }
+                })
+                this.projectReportService.saveForm(this.inputForm).then(({data}) => {
+                  // console.log('businessTable', data.businessTable)
+                  // console.log('businessId', data.businessId)
+                  callback(data.businessTable, data.businessId, this.inputForm)
+                  this.loading = false
+                }).catch(() => {
+                  this.loading = false
+                })
+              }
             })
           }
         })
@@ -753,6 +770,35 @@
             this.tableKeyClient = Math.random()
           })
         })
+      },
+      // 两位小数数字验证
+      twoDecimalPlaces (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line eqeqeq
+        if (str.indexOf('.') != -1) {
+          var str_ = str.substr(str.indexOf('.') + 1)
+          // eslint-disable-next-line eqeqeq
+          if (str_.indexOf('.') != -1) {
+            str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+          }
+          if (str_.length > 2) {
+            this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
+            return (str = '')
+          }
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+        return str
       }
     }
   }

+ 23 - 17
src/views/modules/cw/workClientInfo/WorkClientTaskForm.vue

@@ -98,6 +98,21 @@
                     </el-form-item>
                   </el-col>
                   <el-col :span="12">
+                    <el-form-item label="地址" prop="address"
+                                  :rules="[
+                                {required: true, message:'地址不能为空', trigger:'blur'}
+                   ]">
+                      <el-input v-model="inputForm.address" placeholder="地址" clearable></el-input>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="12">
+                    <el-form-item label="联系电话" prop="mobile"
+                                  :rules="[
+                   ]">
+                      <el-input v-model="inputForm.mobile" placeholder="联系电话" clearable></el-input>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="12">
                     <el-form-item label="是否有统一社会信用代码" prop="isUscCode"
                                   :rules="[
                                   {required: true, message:'请选择是否有统一社会信用代码', trigger:'blur'}
@@ -257,21 +272,6 @@
                         @getValue="(value) => {inputForm.officeId=value}"/>
                     </el-form-item>
                   </el-col>
-                  <el-col :span="12">
-                    <el-form-item label="地址" prop="address"
-                                  :rules="[
-                                {required: true, message:'地址不能为空', trigger:'blur'}
-                   ]">
-                      <el-input v-model="inputForm.address" placeholder="地址" clearable></el-input>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="12">
-                    <el-form-item label="联系电话" prop="mobile"
-                                  :rules="[
-                   ]">
-                      <el-input v-model="inputForm.mobile" placeholder="联系电话" clearable></el-input>
-                    </el-form-item>
-                  </el-col>
                   <el-col :span="24">
                     <el-form-item label="备注" prop="remarks"
                                   :rules="[
@@ -520,7 +520,8 @@
                 </el-row>
               </el-form>
             </el-tab-pane>
-            <el-tab-pane label="开票信息" name="billing">
+            <el-tab-pane  label="开票信息" name="billing">
+              <span slot="label"><span style="color: red;border-top: 20px">*</span> 开票信息</span>
               <el-row :gutter="15">
                 <el-button type="info" style="margin-bottom: 15px" size="mini" :disabled="formReadOnly" @click="insertEvent('billing')">
                   新增开票信息
@@ -599,6 +600,7 @@
               </el-row>
             </el-tab-pane>
             <el-tab-pane label="客户联系人" name="contact">
+              <span slot="label"><span style="color: red;border-top: 20px">*</span> 客户联系人</span>
               <el-row :gutter="15">
                 <el-button type="info" style="margin-bottom: 15px" size="mini" :disabled="formReadOnly" @click="insertEvent('contact')">
                   新增客户联系人
@@ -1036,7 +1038,10 @@
         this.doSubmit('save', callback)
       },
       startForm (callback) {
-        if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
+        if (this.commonJS.isEmpty(this.inputForm.cwWorkClientBillingDTOList)) {
+          this.$message.error('“开票信息”中至少有一条数据')
+          throw new Error('“开票信息”中至少有一条数据')
+        } else if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
           this.$message.error('“客户联系人”信息中至少有一条数据')
           throw new Error('“客户联系人”信息中至少有一条数据')
         } else {
@@ -1247,6 +1252,7 @@
         await this.enterpriseSearchService.enterpriseTicketInfo(id).then((data) => {
           this.inputForm.name = data.data.ENTNAME
           this.inputForm.uscCode = data.data.UNCID
+          this.inputForm.address = data.data.OPLOC
         })
         this.visiblePop = false
       },

+ 4 - 5
src/views/modules/cw/workContract/ContractFileForm.vue

@@ -717,7 +717,10 @@
       },
       // 送审
       startForm (callback) {
-        if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadFile.checkProgress()) {
+        if (this.commonJS.isEmpty(this.inputForm.actualContractAmount)) {
+          this.$message.error('请填写合同实际金额')
+          throw new Error('请填写合同实际金额')
+        } else if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadFile.checkProgress()) {
           this.loading = false
           throw new Error()
         } else {
@@ -727,10 +730,6 @@
           this.inputForm.status = '5'
           this.inputForm.filedType = '2'
           this.inputForm.contractProperList = []
-          if (this.inputForm.actualContractAmount === '' || this.inputForm.actualContractAmount === undefined) {
-            this.loading = false
-            throw new Error('请填写合同实际金额')
-          }
           // if (this.inputForm.filedNo === '' || this.inputForm.filedNo === undefined) {
           //   this.loading = false
           //   this.$message.error('请填写案卷号')

+ 11 - 2
src/views/modules/cw/workContract/ContractRegistrationForm.vue

@@ -197,7 +197,9 @@
 
         <el-col :span="12">
           <el-form-item label="合同实际金额" prop="actualContractAmount">
-            <el-input maxlength="64" :disabled="true" v-model="inputForm.actualContractAmount" ></el-input>
+            <el-input maxlength="64" :disabled="true" v-model="inputForm.actualContractAmount"
+                      @keyup.native="inputForm.actualContractAmount = twoDecimalPlaces(inputForm.actualContractAmount)"
+            ></el-input>
           </el-form-item>
         </el-col>
 
@@ -231,6 +233,7 @@
           <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
         </el-tab-pane>
         <el-tab-pane label="参与签约方" name="contactParty">
+          <span slot="label"><span style="color: red;border-top: 20px">*</span> 参与签约方</span>
           <el-row :gutter="15">
             <el-button type="info" style="margin-bottom: 15px" size="mini" :disabled="formReadOnly" @click="openWorkClient">
               新增参与签约方
@@ -557,6 +560,9 @@
             if (this.inputForm.createId === undefined || this.inputForm.createId === '') {
               this.inputForm.createId = JSON.parse(localStorage.getItem('user')).id
             }
+            if (this.commonJS.isEmpty(this.inputForm.createDate)) {
+              this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+            }
             const f = []
             if (data.fees !== null && data.fees !== undefined && data.fees !== '') {
               data.fees.split(',').forEach(item => {
@@ -709,7 +715,10 @@
       },
       // 送审
       startForm (callback) {
-        if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadComponent.checkProgress()) {
+        if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
+          this.$message.error('“参与签约方”中至少有一条数据')
+          throw new Error('“参与签约方”中至少有一条数据')
+        } else if (this.$refs.archiveFile.checkProgress() || this.$refs.uploadComponent.checkProgress()) {
           this.loading = false
           throw new Error()
         } else {