Pārlūkot izejas kodu

财务-bug修改,tab页添加

wangqiang 2 gadi atpakaļ
vecāks
revīzija
76a20d7ad9

+ 78 - 1
src/views/modules/cw/reportManagement/ReportManagementForm.vue

@@ -242,7 +242,71 @@
                   </el-form>
                 </el-row>
               </el-tab-pane>
-
+              <el-tab-pane label="历史报告列表" name="contact">
+                <el-row  :gutter="15">
+                  <el-form :disabled="method==='view'">
+                    <vxe-table
+                      border
+                      :column-config="{resizable: true}"
+                      show-overflow
+                      show-footer
+                      :key="tableKeyContact"
+                      ref="contactTable"
+                      class="vxe-table-element"
+                      :data="inputForm.cwWorkClientContactDTOList"
+                      style=""
+                      @cell-click=""
+                      @edit-closed=""
+                      highlight-current-row
+                      :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false}"
+                    >
+                      <vxe-table-column type="seq" align="center" width="80" title="序号"></vxe-table-column>
+                      <vxe-table-column align="center" field="servedUnitName" title="被服务单位" :edit-render="{}">
+                        <template v-slot:edit="scope">
+                          <el-input v-model="scope.row.servedUnitName" placeholder="被服务单位" clearable></el-input>
+                        </template>
+                      </vxe-table-column>
+                      <vxe-table-column align="center" field="servedUnitName" title="被服务单位" :edit-render="{}">
+                        <template v-slot:edit="scope">
+                          <el-input v-model="scope.row.servedUnitName" placeholder="被服务单位" clearable></el-input>
+                        </template>
+                      </vxe-table-column>
+                      <vxe-table-column align="center" field="reportDate" title="报告日期" :edit-render="{}">
+                        <template v-slot:edit="scope">
+                          <el-input v-model="scope.row.reportDate" placeholder="报告日期" clearable></el-input>
+                        </template>
+                      </vxe-table-column>
+                      <vxe-table-column align="center" field="reportType" title="报告类型" :edit-render="{}">
+                        <template v-slot:edit="scope">
+                          <el-input v-model="scope.row.reportType" placeholder="报告类型" clearable></el-input>
+                        </template>
+                      </vxe-table-column>
+                      <vxe-table-column align="center" field="reportNo" title="报告文号" :edit-render="{}">
+                        <template v-slot:edit="scope">
+                          <el-input v-model="scope.row.reportNo" placeholder="报告文号" clearable></el-input>
+                        </template>
+                      </vxe-table-column>
+                      <vxe-table-column align="center" field="sealType" title="盖章状态" :edit-render="{}">
+                        <template v-slot:edit="scope">
+                          <el-input v-model="scope.row.sealType" placeholder="盖章状态" clearable></el-input>
+                        </template>
+                      </vxe-table-column>
+                      <vxe-table-column align="center" field="documentStatus" title="单据状态" :edit-render="{}">
+                        <template v-slot:edit="scope">
+                          <el-input v-model="scope.row.documentStatus" placeholder="单据状态" clearable></el-input>
+                        </template>
+                      </vxe-table-column>
+                      <vxe-table-column align="center" title="操作" width="300">
+                        <template v-slot="scope">
+                          <el-button size="mini" type="danger" :disabled="method === 'view'" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
+                          <el-button size="mini" type="primary" :disabled="method === 'view'" @click="sss(scope.$rowIndex)">上传附件</el-button>
+                          <el-button size="mini" :disabled="false" type="primary" @click="seeFileInfoTwo(scope.$rowIndex)">查看文件详情</el-button>
+                        </template>
+                      </vxe-table-column>
+                    </vxe-table>
+                  </el-form>
+                </el-row>
+              </el-tab-pane>
 
             </el-tabs>
           </el-col>
@@ -308,6 +372,7 @@
           signatureType: '',
           projectMasterName: '',
           cwProjectInfoList: [],
+          cwWorkClientContactDTOList: [],
           cwFileInfoList: [],
           projectInfoId: ''
         },
@@ -315,6 +380,7 @@
         activeName: 'newRow',
         tableKey: '',
         tableKeyClient: '1',
+        tableKeyContact: '2',
         visible: false
       }
     },
@@ -365,6 +431,15 @@
           this.inputForm.cwProjectInfoList[index].cwFileInfoList = []
         }
         this.$refs.upLoadComponentDialog.newUpload('view', this.inputForm.cwProjectInfoList[index].cwFileInfoList, null, null, null, null, null, false, index)
+        this.$refs.upLoadComponentDialog.newUpload('view', this.inputForm.cwWorkClientContactDTOList[index].cwFileInfoList, null, null, null, null, null, false, index)
+      },
+      seeFileInfoTwo (index) {
+        console.log('进来了')
+        if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList[index].cwFileInfoList)) {
+          this.inputForm.cwWorkClientContactDTOList[index].cwFileInfoList = []
+        }
+        // this.$refs.upLoadComponentDialog.newUpload('view', this.inputForm.cwProjectInfoList[index].cwFileInfoList, null, null, null, null, null, false, index)
+        this.$refs.upLoadComponentDialog.newUpload('view', this.inputForm.cwWorkClientContactDTOList[index].cwFileInfoList, null, null, null, null, null, false, index)
       },
       sss (index) {
         if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].cwFileInfoList)) {
@@ -378,6 +453,7 @@
           this.inputForm.cwProjectInfoList[index].cwFileInfoList = list
           this.inputForm.cwProjectInfoList[index].fileNumber = list.length
           this.tableKeyClient = Math.random()
+          this.tableKeyContact = Math.random()
           // console.log('this.inputForm.cwFileInfoList', this.inputForm.cwFileInfoList)
           // console.log('list.length', list.length)
           // console.log(list)
@@ -417,6 +493,7 @@
           signatureType: '',
           projectMasterName: '',
           cwProjectInfoList: [],
+          cwWorkClientContactDTOList: [],
           cwFileInfoList: [],
           projectInfoId: ''
         }

+ 18 - 8
src/views/modules/cw/workContract/ContractFileForm.vue

@@ -113,7 +113,7 @@
 
         <el-col :span="12">
           <el-form-item label="所属部门" prop="department"
-                        :rules="[{required: true, message: '所属部门', trigger: 'blur'}
+                        :rules="[
                  ]">
             <el-input maxlength="64" :disabled="true" v-model="inputForm.department" placeholder="请输入所属部门"></el-input>
           </el-form-item>
@@ -474,19 +474,29 @@
                 this.inputForm.contractProperList = data2.data.contractProperList
                 this.inputForm.contractInfoList = data2.data.contractInfoList
                 console.log('data2', data2)
-                this.contractInfoService.findById(data2.data.contractInfoId).then(data3 => {
+                this.contractInfoService.findById(data2.data.contractInfoId).then(async (data3) => {
                   data3.data.contractProperList = this.inputForm.contractProperList
                   data3.data.contractInfoList = this.inputForm.contractInfoList
                   if (data3.data.filedType === '2' || data3.data.filedType === '5') {
-                    this.$refs.uploadFile.clearUpload()
-                    this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
-                    this.$refs.archiveFile.newUpload('view', data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
+                    // this.$refs.uploadFile.clearUpload()
+                    // this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
+                    await this.$refs.archiveFile.newUpload('view', data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
+                    // console.log('this.$refs.getDataList', this.$refs.archiveFile.getDataList())
+                    console.log('this.$refs.uploadFile', this.commonJS.isNotEmpty(this.$refs.uploadFile.getDataList()))
                   } else {
-                    this.$refs.uploadFile.clearUpload()
-                    this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
+                    // this.$refs.uploadFile.clearUpload()
+                    // this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
                     this.$refs.archiveFile.newUpload(method, data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
                   }
-                  console.log('data3', data3)
+                  if ((data3.data.filedType === '2' || data3.data.filedType === '5') && this.commonJS.isEmpty(this.$refs.uploadFile.getDataList())) {
+                    await this.$refs.uploadFile.clearUpload()
+                    this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
+                  }
+
+                  // console.log('data3', data3)
+                  // console.log('this.inputForm', this.inputForm)
+                  // console.log('this.$refs.archiveFile', this.$refs.archiveFile.dataList)
+                  // console.log('this.$refs.uploadFile', this.$refs.uploadFile.dataList.length)
                   this.saveData(data3.data, method)
                   if (this.formReadOnly) {
                     method = 'view'

+ 9 - 7
src/views/modules/cw/workContract/ContractNameForm.vue

@@ -482,7 +482,7 @@
                 // console.log('data1.22222')
                 // console.log('data1.data.contractProperList', data1.data.contractProperList)
               this.$refs.uploadFile.clearUpload()
-              this.$refs.uploadFile.newUpload('view', data1.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
+              this.$refs.uploadFile.newUpload(method, data1.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
               this.contractFileService.findById(this.inputForm.id).then(data2 => {
                 this.inputForm.contractProperList = data2.data.contractProperList
                 this.inputForm.contractInfoList = data2.data.contractInfoList
@@ -491,12 +491,12 @@
                   data3.data.contractProperList = this.inputForm.contractProperList
                   data3.data.contractInfoList = this.inputForm.contractInfoList
                   if (data3.data.filedType === '2' || data3.data.filedType === '5') {
-                    this.$refs.uploadFile.clearUpload()
-                    this.$refs.uploadFile.newUpload(method, data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
-                    this.$refs.archiveFile.newUpload('view', data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
+                    // this.$refs.uploadFile.clearUpload()
+                    // this.$refs.uploadFile.newUpload(method, data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
+                    this.$refs.archiveFile.newUpload(method, data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
                   } else {
-                    this.$refs.uploadFile.clearUpload()
-                    this.$refs.uploadFile.newUpload(method, data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
+                    // this.$refs.uploadFile.clearUpload()
+                    // this.$refs.uploadFile.newUpload(method, data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
                     this.$refs.archiveFile.newUpload(method, data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
                   }
                   console.log('data3', data3)
@@ -529,8 +529,10 @@
           if (status === 'save') {
             this.loading = true
             this.inputForm.status = '5'
+            this.inputForm.filedType = '5'
             this.inputForm.contractProperList = this.$refs.uploadFile.getDataList()
-            console.log('this.inputForm', this.inputForm)
+            this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
+            // console.log('this.inputForm', this.inputForm)
             this.contractInfoService.save(this.inputForm).then(({data}) => {
               // callback(data.businessTable, data.businessId, this.inputForm)
               // this.$refs.inputForm.resetFields()