瀏覽代碼

Merge remote-tracking branch 'origin/master'

lizhenhao 2 年之前
父節點
當前提交
ad1c218604

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

@@ -173,7 +173,7 @@
             this.$message.error('请填写开票详情')
             return
           }
-          rows = [{name: this.detail}]
+          rows = [{projectName: this.detail}]
         }
         this.close()
         this.$emit('getProgram', rows)
@@ -191,16 +191,6 @@
           this.tablePage.total = data.total
           this.loading = false
         })
-        // this.reimbursementApprovalService.projectList({
-        //   '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
-        // })
       },
       // 当前页
       currentChangeHandle ({currentPage, pageSize}) {

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

@@ -23,8 +23,8 @@
       <el-form-item label="经办人" prop="handled">
         <UserSelect :limit='1' :userName="searchForm.handled" @getValue='(value, label) => {searchForm.handled = label}'></UserSelect>
       </el-form-item>
-      <el-form-item label="报销人" prop="remiBy">
-        <UserSelect :limit='1' :userName="searchForm.remiBy" @getValue='(value, label) => {searchForm.remiBy = label}'></UserSelect>
+      <el-form-item label="报销人" prop="reimBy">
+        <UserSelect :limit='1' :userName="searchForm.reimBy" @getValue='(value, label) => {searchForm.reimBy = label}'></UserSelect>
       </el-form-item>
       <el-form-item label="报销状态" prop="type">
         <el-select v-model="searchForm.type" placeholder="请选择" style="width:100%;">
@@ -182,7 +182,7 @@
           project: '',
           dates: [],
           handled: '',
-          remiBy: '',
+          reimBy: '',
           type: [],
           department: '',
           remiType: '',

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

@@ -63,7 +63,7 @@
           @cell-click=""
           @edit-closed=""
           highlight-current-row
-          :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon:'_'}"
+          :edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
           :edit-rules="validRules"
         >
           <vxe-table-column field="userName" title="报销人" :edit-render="{}" :rules="[{required: true, message:'请选择报销人', trigger:'blur'}]">
@@ -82,14 +82,13 @@
             </template>
           </vxe-table-column>
           <vxe-table-column field="projectName" title="报销项目" :edit-render="{}" :rules="[{required: true, message:'请选择报销项目', trigger:'blur'}]">
-            <span slot="label"><span style="color: red;border-top: 20px">*</span> 报销项目</span>
             <template v-slot:edit="scope">
               <el-input v-model="scope.row.projectName" @focus="openProgramPageForm(scope.$rowIndex, scope.row)"></el-input>
             </template>
           </vxe-table-column>
-          <vxe-table-column field="reportNo" title="报告号" :edit-render="{}">
+          <vxe-table-column field="reportNumber" title="报告号" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-input v-model="scope.row.reportNo" @focus="openReportNoPageForm(scope.$rowIndex, scope.row)"></el-input>
+              <el-input :readonly="true" v-model="scope.row.reportNumber" @focus="openReportNoPageForm(scope.$rowIndex, scope.row)"></el-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="number" title="费用(元)" :edit-render="{}" :rules="[{required: true, message:'请输入费用', trigger:'blur'}]">
@@ -216,8 +215,11 @@
           projectName: [
             {required: true, message: '报销项目不能为空'}
           ],
-          reportNo: [
+          reportNumber: [
             {required: true, message: '报告号不能为空'}
+          ],
+          number: [
+            {required: true, message: '费用(元)不能为空'}
           ]
         },
         title: '',
@@ -623,12 +625,20 @@
       },
       // 选择报告号
       openReportNoPageForm (rowIndex, row) {
-        let i = this.inputForm.detailInfos.length
-        for (let j = 0; j < i; j++) {
-          if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].projectName)) {
-            this.$refs.reportNoChooseRadio.init(this.inputForm.detailInfos[j].projectName)
-          }
+        if (this.commonJS.isEmpty(row.projectName)) {
+          this.$message.error('请选择报销项目')
+          return
         }
+        this.indexRow = rowIndex
+        console.log('this.indexRow', this.indexRow)
+        // let i = this.inputForm.detailInfos.length
+        this.$refs.reportNoChooseRadio.init(this.inputForm.detailInfos[rowIndex].projectName)
+        // for (let j = this.indexRow; j < i; j++) {
+        //   if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].projectName)) {
+        //     console.log('this.inputForm.detailInfos[j].projectName', this.inputForm.detailInfos[j].projectName)
+        //     this.$refs.reportNoChooseRadio.init(this.inputForm.detailInfos[j].projectName)
+        //   }
+        // }
       },
       openProgramPageForm (rowIndex, row) {
         if (this.commonJS.isEmpty(row.typeName)) {
@@ -655,7 +665,7 @@
         this.inputForm.detailInfos[this.indexRow].projectId = rows[0].id
         this.inputForm.detailInfos[this.indexRow].projectName = rows[0].projectName
         this.inputForm.detailInfos[this.indexRow].reportNumber = rows[0].reportNumber
-        // this.indexRow = ''
+        this.indexRow = ''
         this.$forceUpdate()
       },
       // 报销类型下拉弹窗
@@ -664,10 +674,11 @@
         // this.$refs.reimbursementTypePullForm.init()
         this.$refs.cwReimbursementTypePullForm.init()
       },
+      // 报销内容详情
       getProgramForType (rows) {
         this.inputForm.detailInfos[this.indexRow].typeId = rows.id
         this.inputForm.detailInfos[this.indexRow].typeName = rows.name
-        // this.indexRow = ''
+        this.indexRow = ''
         this.$forceUpdate()
       },
       // 报销人下拉弹窗
@@ -676,17 +687,16 @@
         this.$refs.userPullForm.init()
       },
       getProgramForUser (rows) {
-        console.log('rows', rows)
         this.inputForm.detailInfos[this.indexRow].userId = rows[0].id
         this.inputForm.detailInfos[this.indexRow].userName = rows[0].name
         this.inputForm.detailInfos[this.indexRow].deptId = rows[0].parentId
         this.inputForm.detailInfos[this.indexRow].deptName = rows[0].officeName
-        // this.indexRow = ''
+        this.indexRow = ''
         this.$forceUpdate()
       },
       getWorkClientChoose2 (list) {
-        console.log('list', list)
-        this.inputForm.detailInfos[this.indexRow].reportNo = list.reportNo
+        this.inputForm.detailInfos[this.indexRow].reportNumber = list.reportNo
+        this.indexRow = ''
         this.$forceUpdate()
       }
     }

+ 6 - 44
src/views/modules/cw/reportManagement/ReportManagementTaskForm.vue

@@ -204,7 +204,7 @@
             <el-col :span="12">
               <el-form-item label="意见类型" prop="opinionType"
                             :rules="[
-                              {required: true, message:'意见类型不能为空', trigger:'change'}
+                              {required: true, message:'意见类型不能为空', trigger:'blur'}
                      ]">
                 <el-select v-model="inputForm.opinionType" placeholder="请选择意见类型" style="width:100%;">
                   <el-option
@@ -721,49 +721,11 @@
       openWorkClient () {
         this.$refs.reportServiceUnitForm.init(this.inputForm.projectId)
       },
-      getWorkClientChoose (list) {
-        // if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList)) {
-        //   this.inputForm.cwProjectInfoList = []
-        // }
-        // eslint-disable-next-line no-unused-vars
-        let _this = this
-        let _list = list
-        const waitForEach = function () {
-          return new Promise(function (resolve, reject) {
-            _list.forEach((item) => {
-              // _this.inputForm.cwProjectInfoList.forEach(client => {
-              //   if (item.id === client.servedUnitId) {
-              //     // _this.$message.error('已存在客户 “' + client.servedUnitName + '”,请重新选择')
-              //     // throw new Error('已存在客户 “' + client.servedUnitName + '”,请重新选择')
-              //   }
-              // })
-            })
-            resolve()
-          })
-        }
-        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 = '未盖章'
-            this.tableKeyClient = Math.random()
-          })
-        })
+      getWorkClientChoose (row) {
+        this.inputForm.servedUnitName = row.name
+        this.inputForm.servedUnitId = row.id
+        this.inputForm.sealType = '未盖章'
+        // this.tableKeyClient = Math.random()
       },
       // 两位小数数字验证
       twoDecimalPlaces (num) {

+ 6 - 21
src/views/modules/cw/reportManagement/ReportServiceUnitForm.vue

@@ -29,8 +29,7 @@
           :sort-config="{remote:true}"
           :data="dataList"
           :row-config="{isCurrent: true}"
-          :tree-config="{transform: true, rowField: 'id', parentField: 'oneUpCompany'}"
-          :checkbox-config="{trigger: 'row', checkStrictly: true}">
+          :radio-config="{trigger: 'row'}">
           <vxe-column type="seq" align="center" width="80" title="序号"></vxe-column>
           <vxe-column type="radio" width="40px"></vxe-column>
           <vxe-column width="" title="客户名称" align="center" field="name" tree-node></vxe-column>
@@ -100,27 +99,13 @@
       },
       // 表单提交
       getWorkClient () {
-        let rows = this.$refs.clientTable.getCheckboxRecords()
-        if (this.commonJS.isEmpty(rows)) {
+        let row = this.$refs.clientTable.getRadioRecord()
+        if (this.commonJS.isEmpty(row)) {
           this.$message.error('请至少选择一条数据')
-          return
+        } else {
+          this.close()
+          this.$emit('getWorkClientChoose', row)
         }
-        let list = []
-        if (!this.commonJS.isEmpty(rows)) {
-          rows.forEach(item => {
-            let p = {
-              id: item.id,
-              name: item.name,
-              no: item.no,
-              type: item.type,
-              industry: item.industry,
-              companyLevel: item.companyLevel
-            }
-            list.push(p)
-          })
-        }
-        this.close()
-        this.$emit('getWorkClientChoose', list)
       },
       list (id) {
         this.dataList = []