lizhenhao 2 years ago
parent
commit
658b58d71a

+ 74 - 0
src/api/finance/invoice/FinanceInvoiceService.js

@@ -0,0 +1,74 @@
+import request from '@/utils/httpRequest'
+
+export default class FinanceInvoiceService {
+  list (params) {
+    return request({
+      url: '/finance/invoice/list',
+      method: 'get',
+      params: params
+    })
+  }
+  queryById (id) {
+    return request({
+      url: '/finance/invoice/queryById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  queryByNumber (number, id) {
+    return request({
+      url: '/finance/invoice/queryByNumber',
+      method: 'get',
+      params: {number: number, id: id}
+    })
+  }
+  save (inputForm) {
+    return request({
+      url: `/finance/invoice/save`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+  delete (ids) {
+    return request({
+      url: '/finance/invoice/delete',
+      method: 'delete',
+      params: {ids: ids}
+    })
+  }
+  updateStatusById (data) {
+    return request({
+      url: '/finance/invoice/updateStatusById',
+      method: 'post',
+      data: data
+    })
+  }
+  isReceivables (data) {
+    return request({
+      url: '/finance/invoice/isReceivables',
+      method: 'post',
+      data: data
+    })
+  }
+  saveForm (inputForm) {
+    return request({
+      url: `/finance/invoice/saveForm`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+  saveFormInvalid (inputForm) {
+    return request({
+      url: `/finance/invoice/saveFormInvalid`,
+      method: 'post',
+      data: inputForm
+    })
+  }
+  queryIdByInvalidId (id) {
+    return request({
+      url: '/finance/invoice/queryIdByInvalidId',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+}

+ 13 - 3
src/views/common/UpLoadComponent.vue

@@ -85,7 +85,8 @@
         auth: '',
         directory: 'public',
         maxValue: 300,
-        tableKey: ''
+        tableKey: '',
+        fileLoading: false
       }
     },
     watch: {
@@ -114,6 +115,7 @@
        *    注:值为空时,默认值为300MB
        */
       async newUpload (auth, fileList, directory, maxValue) {
+        await this.fileLoadingFalse()
         if (directory !== undefined && directory !== null && directory !== '' && directory !== {}) {
           this.directory = directory
         } else {
@@ -133,6 +135,7 @@
             this.dataListNew.push(item)
           })
         }
+        this.fileLoading = true
         // this.dataList = JSON.parse(JSON.stringify(fileList))
         // this.dataListNew = JSON.parse(JSON.stringify(fileList))
       },
@@ -237,12 +240,16 @@
         return this.dataListNew
       },
       /**
-       * 判断进度条是否结束
+       * 判断进度条是否结束,附件是否加载完成
        * @returns {boolean}
        */
       checkProgress () {
         if (this.progressFlag === true) {
-          this.$message.warning('请等待文件上传完成再进行提交')
+          this.$message.warning('请等待附件上传完成再进行操作')
+          return true
+        }
+        if (this.fileLoading === false) {
+          this.$message.warning('请等待附件加载完成再进行操作')
           return true
         }
         return false
@@ -258,6 +265,9 @@
         } else {
           return false
         }
+      },
+      fileLoadingFalse () {
+        this.fileLoading = false
       }
     }
   }

File diff suppressed because it is too large
+ 1034 - 0
src/views/modules/finance/invoice/InvoiceForm.vue


File diff suppressed because it is too large
+ 1154 - 0
src/views/modules/finance/invoice/InvoiceFormTask.vue


File diff suppressed because it is too large
+ 1164 - 0
src/views/modules/finance/invoice/InvoiceFormTaskInvalid.vue


+ 562 - 0
src/views/modules/finance/invoice/InvoiceList.vue

@@ -0,0 +1,562 @@
+<template>
+  <div class="page">
+    <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+      <!-- 搜索框-->
+      <el-row :gutter="0">
+        <el-form-item prop="number" label="发票号">
+          <el-input size="small" v-model="searchForm.number" placeholder="请输入发票号" clearable></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+          <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+        </el-form-item>
+      </el-row>
+      <el-row :gutter="0">
+        <el-form-item prop="accountBegin" label="开票总金额">
+          <el-input-number
+            size="small"
+            v-model="searchForm.accountBegin"
+            controls-position="right"
+            :controls="false"
+            style="width:100%;"
+            :precision="2"
+            placeholder="请填写开票总金额"
+            :step="0.01"
+            :min="0"
+            clearable>
+          </el-input-number>
+        </el-form-item>
+        <el-form-item prop="accountEnd" label="-">
+          <el-input-number
+            size="small"
+            v-model="searchForm.accountEnd"
+            controls-position="right"
+            :controls="false"
+            style="width:100%;"
+            :precision="2"
+            placeholder="请填写开票总金额"
+            :step="0.01"
+            :min="0"
+            clearable>
+          </el-input-number>
+        </el-form-item>
+      </el-row>
+      <el-row :gutter="0">
+        <el-form-item prop="billingDateList" label="开票日期">
+          <el-date-picker
+            size="small"
+            v-model="searchForm.billingDateList"
+            type="daterange"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            style="width: 100%  "
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            placement="bottom-start"
+            clearabl>
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item prop="remittanceDateList" label="收款日期">
+          <el-date-picker
+            size="small"
+            v-model="searchForm.remittanceDateList"
+            type="daterange"
+            value-format="yyyy-MM-dd"
+            range-separator="至"
+            style="width: 100%  "
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            placement="bottom-start"
+            clearable>
+          </el-date-picker>
+        </el-form-item>
+      </el-row>
+    </el-form>
+    <div class="bg-white top" style="">
+      <vxe-toolbar :refresh="{query: refreshList}" custom>
+        <template #buttons>
+          <el-button v-if="hasPermission('finance:invoice:add')" type="primary" size="small" icon="el-icon-plus" @click="start()">新建</el-button>
+<!--          <el-button v-if="hasPermission('finance:invoice:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.invoiceTable && $refs.invoiceTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
+        </template>
+      </vxe-toolbar>
+      <div style="height: calc(100% - 80px)">
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          size="small"
+          ref="invoiceTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="40"></vxe-column>
+          <vxe-column type="checkbox" width="40" ></vxe-column>
+          <vxe-column width="150" title="项目名称"align="center" field="programName"></vxe-column>
+          <vxe-column width="150" title="发票申请编号"align="center" field="no">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" @click="view(false, scope.row.id)">{{scope.row.no}}</el-link>
+            </template>
+          </vxe-column>
+          <vxe-column width="150" title="发票号"align="center" field="number"></vxe-column>
+          <vxe-column width="150" title="实际开票单位"align="center" field="billingWorkplaceReal"></vxe-column>
+          <vxe-column width="150" title="开票总金额(元)"align="center" field="account"></vxe-column>
+          <vxe-column width="150" title="开票金额(元)"align="center" field="accountDetail"></vxe-column>
+          <vxe-column width="120" title="开票内容"align="center" field="billingContent">
+            <template slot-scope="scope">
+              {{$dictUtils.getDictLabel('invoice_billing_content', scope.row.billingContent, '-')}}
+            </template>
+          </vxe-column>
+          <vxe-column width="100" title="收款类型"align="center" field="receivablesType">
+            <template slot-scope="scope">
+              {{$dictUtils.getDictLabel('invoice_receivables_type', scope.row.receivablesType, '-')}}
+            </template>
+          </vxe-column>
+          <vxe-column width="100" title="发票类型"align="center" field="type">
+            <template slot-scope="scope">
+              {{$dictUtils.getDictLabel('invoice_type', scope.row.type, '-')}}
+            </template>
+          </vxe-column>
+          <vxe-column width="120" title="开票日期"align="center" field="billingDate"></vxe-column>
+          <vxe-column width="120" title="收款日期"align="center" field="receivablesDate"></vxe-column>
+          <vxe-column width="110" fixed="right"align="center" title="是否收款" field="receivablesStatus">
+            <template slot-scope="scope">
+              {{scope.row.receivablesStatus === '1'?'已收款':'未收款'}}
+            </template>
+          </vxe-column>
+          <vxe-column width="110" fixed="right"align="center" title="是否作废" field="invalidStatus">
+            <template slot-scope="scope">
+              {{scope.row.invalidStatus === '1'?'已作废':'未作废'}}
+            </template>
+          </vxe-column>
+          <vxe-column  width="110px" fixed="right"align="center" title="状态" field="status" >
+            <template slot-scope="scope">
+              <el-button  type="text" @click="invoiceDetail(scope.row)" :type="$dictUtils.getDictLabel('invoice_status_info', scope.row.status, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("invoice_status", scope.row.status, '-')}} </el-button>
+            </template>
+          </vxe-column>
+          <vxe-column width="220" title="操作"  fixed="right" align="center">
+            <template  slot-scope="scope">
+              <el-button v-if="hasPermission('finance:invoice:edit')&&scope.row.status === '1'||scope.row.status === '3'||scope.row.status === '4'" type="text" icon="el-icon-edit" size="small" @click="invoicePush(scope.row)">修改</el-button>
+              <el-button v-if="hasPermission('finance:invoice:edit')&&scope.row.status === '2'" type="text"  icon="el-icon-delete" size="small" @click="invoiceReback(scope.row)">撤回</el-button>
+              <el-button v-if="hasPermission('finance:invoice:edit')&&scope.row.status === '5'&&scope.row.receivablesStatus !== '1'" type="text"  icon="el-icon-finished" size="small" @click="view(true, scope.row.id)">收款</el-button>
+              <el-button v-if="hasPermission('finance:invoice:edit')&&scope.row.status === '5'&&scope.row.receivablesStatus !== '1'" type="text"  icon="el-icon-document-checked" size="small" @click="isReceivables(scope.row)">确认收款</el-button>
+              <el-button v-if="hasPermission('finance:invoice:edit')&&scope.row.status === '5'||scope.row.status === '7'||scope.row.status === '8'" type="text" icon="el-icon-document-delete" size="small" @click="invoiceInvalidPush(scope.row)">作废</el-button>
+              <el-button v-if="hasPermission('finance:invoice:edit')&&scope.row.status === '6'" type="text" icon="el-icon-document-delete" size="small" @click="invoiceInvalidReBack(scope.row)">作废撤回</el-button>
+              <el-button v-if="hasPermission('finance:invoice:edit')&&scope.row.status === '1'||scope.row.status === '3'||scope.row.status === '4'" type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
+            </template>
+          </vxe-column>
+        </vxe-table>
+        <vxe-pager
+          background
+          size="small"
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+    </div>
+    <InvoiceForm  ref="invoiceForm" @refreshDataList="refreshList"></InvoiceForm>
+  </div>
+</template>
+
+<script>
+  import FinanceInvoiceService from '@/api/finance/invoice/FinanceInvoiceService'
+  import InvoiceForm from './InvoiceForm'
+  import pick from 'lodash.pick'
+  import TaskService from '@/api/flowable/TaskService'
+  import ProcessService from '@/api/flowable/ProcessService'
+  import UserService from '@/api/sys/UserService'
+  export default {
+    data () {
+      return {
+        searchForm: {
+          number: '',
+          accountBegin: undefined,
+          accountEnd: undefined,
+          billingDateList: [],
+          billingDateBegin: '',
+          billingDateEnd: '',
+          remittanceDateList: [],
+          remittanceDateBegin: '',
+          remittanceDateEnd: '',
+          programName: '',
+          programId: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false,
+        processDefinitionId: '',
+        procDefKey: '',
+        processDefinitionInvalidId: '',
+        procDefInvalidKey: ''
+      }
+    },
+    financeInvoiceService: null,
+    taskService: null,
+    processService: null,
+    userService: null,
+    computed: {
+      userName () {
+        return JSON.parse(localStorage.getItem('user')).name
+      }
+    },
+    created () {
+      this.financeInvoiceService = new FinanceInvoiceService()
+      this.taskService = new TaskService()
+      this.processService = new ProcessService()
+      this.userService = new UserService()
+    },
+    components: {
+      InvoiceForm
+    },
+    mounted () {
+      this.refreshList()
+    },
+    activated () {
+      this.refreshList()
+    },
+    methods: {
+      // 新增
+      add () {
+        this.$refs.invoiceForm.init('add', '')
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.invoiceTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$refs.invoiceForm.init('edit', id)
+      },
+      // 查看 flag为true时,弹窗为收款,其他值为查看发票详情
+      view (flag, id) {
+        this.$refs.invoiceForm.init(flag, id)
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        if (!this.commonJS.isEmpty(this.searchForm.billingDateList)) {
+          if (!this.commonJS.isEmpty(this.searchForm.billingDateList[0]) && !this.commonJS.isEmpty(this.searchForm.billingDateList[1])) {
+            this.searchForm.billingDateBegin = this.searchForm.billingDateList[0]
+            this.searchForm.billingDateEnd = this.searchForm.billingDateList[1]
+          }
+        }
+        if (!this.commonJS.isEmpty(this.searchForm.remittanceDateList)) {
+          if (!this.commonJS.isEmpty(this.searchForm.remittanceDateList[0]) && !this.commonJS.isEmpty(this.searchForm.remittanceDateList[1])) {
+            this.searchForm.remittanceDateBegin = this.moment(this.searchForm.remittanceDateList[0]).format('YYYY-MM-DD')
+            this.searchForm.remittanceDateEnd = this.moment(this.searchForm.remittanceDateList[1]).format('YYYY-MM-DD')
+          }
+        }
+        this.financeInvoiceService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.dataList.forEach(item => {
+            item.account = parseFloat(item.account).toFixed(2)
+            if (!this.commonJS.isEmpty(item.financeInvoiceBaseDTOList)) {
+              let pName = ''
+              item.financeInvoiceBaseDTOList.forEach((program, index) => {
+                if ((index + 1) !== item.financeInvoiceBaseDTOList.length) {
+                  pName = pName + program.programName + ','
+                } else {
+                  pName = pName + program.programName
+                }
+              })
+              item.programName = pName
+            } else {
+              item.programName = ''
+            }
+            if (!this.commonJS.isEmpty(item.financeInvoiceDetailDTOList)) {
+              item.accountDetail = 0
+              let num = ''
+              item.financeInvoiceDetailDTOList.forEach((detail, index) => {
+                if (!this.commonJS.isEmpty(detail.account)) {
+                  item.accountDetail = parseFloat(parseFloat(item.accountDetail) + parseFloat(detail.account)).toFixed(2)
+                }
+                if ((index + 1) !== item.financeInvoiceDetailDTOList.length) {
+                  num = num + detail.number + ','
+                } else {
+                  num = num + detail.number
+                }
+              })
+              item.number = num
+            } else {
+              item.number = ''
+              item.accountDetail = ''
+            }
+          })
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+        this.processService.getByName('发票申请').then(({data}) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionId = data.id
+            this.procDefKey = data.key
+          }
+        })
+        this.processService.getByName('发票作废').then(({data}) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionInvalidId = data.id
+            this.procDefInvalidKey = data.key
+          }
+        })
+      },
+      // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      // 删除
+      del (id) {
+        let ids = id || this.$refs.invoiceTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.financeInvoiceService.delete(ids).then(({data}) => {
+            this.$message.success(data)
+            this.refreshList()
+            this.loading = false
+          })
+        })
+      },
+      resetSearch () {
+        this.searchForm.billingDateList = []
+        this.searchForm.remittanceDateList = []
+        this.searchForm.billingDateBegin = ''
+        this.searchForm.billingDateEnd = ''
+        this.searchForm.remittanceDateBegin = ''
+        this.searchForm.remittanceDateEnd = ''
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      },
+      start () {
+        // 读取流程表单
+        let tabTitle = `发起流程【发票申请】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [发票申请]`
+        this.taskService.getTaskDef({ procDefId: this.processDefinitionId,
+          status: 'startAndHold'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                procDefId: this.processDefinitionId,
+                procDefKey: this.procDefKey,
+                status: 'startAndHold',
+                title: tabTitle,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessId: 'false',
+                isShow: false,
+                routePath: '/finance/invoice/InvoiceList'
+              }
+            })
+          })
+      },
+      // 发起发票申请审批
+      invoicePush (row) {
+        // 读取流程表单
+        let title = `发起流程【发票申请】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[发票申请]`
+        let status = 'startAndHold'
+        if (row.status === '3' || row.status === '4') {
+          status = 'startAndClose'
+        }
+        this.taskService.getTaskDef({ procDefId: this.processDefinitionId,
+          businessId: row.id,
+          businessTable: 'finance_invoice'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                procDefId: this.processDefinitionId,
+                procDefKey: this.procDefKey,
+                title: title,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'finance_invoice',
+                businessId: row.id,
+                isShow: 'false',
+                status: status,
+                routePath: '/finance/invoice/InvoiceList'
+              }
+            })
+          })
+      },
+      // 发起发票作废审批
+      invoiceInvalidPush (row) {
+        // 读取流程表单
+        let title = `发起流程【发票作废】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[发票作废]`
+        let status = 'startAndHold'
+        if (row.status === '8' || row.status === '7') {
+          status = 'startAndClose'
+        }
+        this.taskService.getTaskDef({ procDefId: this.processDefinitionInvalidId,
+          businessId: row.financeInvoiceInvalidDTO.id,
+          businessTable: 'finance_invoice_invalid'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                procDefId: this.processDefinitionInvalidId,
+                procDefKey: this.procDefInvalidKey,
+                title: title,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'finance_invoice_invalid',
+                businessId: row.financeInvoiceInvalidDTO.id,
+                isShow: 'false',
+                status: status,
+                routePath: '/finance/invoice/InvoiceList'
+              }
+            })
+          })
+      },
+      // 查看发票申请审批流程结果
+      invoiceDetail (row) {
+        if (row.status !== '0' && row.status !== '1') {
+          if (row.status === '6' || row.status === '7' || row.status === '8' || row.status === '9') {
+            this.invoiceInvalidDetail(row)
+          } else {
+            this.taskService.getTaskDef({
+              procInsId: row.procInsId,
+              procDefId: this.processDefinitionId
+            }).then(({data}) => {
+              this.$router.push({
+                path: '/flowable/task/TaskFormDetail',
+                query: {
+                  isShow: 'false',
+                  readOnly: true,
+                  title: '发票申请' + '流程详情',
+                  formTitle: '发票申请' + '流程详情',
+                  businessId: row.id,
+                  status: 'reback',
+                  ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+                }
+              })
+            })
+          }
+        }
+      },
+      // 查看发票作废审批流程结果
+      invoiceInvalidDetail (row) {
+        this.taskService.getTaskDef({
+          procInsId: row.financeInvoiceInvalidDTO.procInsId,
+          procDefId: this.processDefinitionInvalidId
+        }).then(({data}) => {
+          this.$router.push({
+            path: '/flowable/task/TaskFormDetail',
+            query: {
+              isShow: 'false',
+              readOnly: true,
+              title: '发票作废' + '流程详情',
+              formTitle: '发票作废' + '流程详情',
+              businessId: row.financeInvoiceInvalidDTO.id,
+              status: 'reback',
+              ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+            }
+          })
+        })
+      },
+      // 撤回发票申请审批
+      invoiceReback (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await this.financeInvoiceService.queryById(row.id).then(({data}) => {
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.err = true
+            }
+          })
+          if (this.err === true) {
+            this.err = ''
+            this.refreshList()
+          } else {
+            this.processService.revokeProcIns(row.procInsId).then(async ({data}) => {
+              let form = {status: '3', id: row.id}
+              await this.financeInvoiceService.updateStatusById(form)
+              this.$message.success(data)
+              this.refreshList()
+            })
+          }
+        })
+      },
+      invoiceInvalidReBack (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await this.financeInvoiceService.queryById(row.id).then(({data}) => {
+            if (data.status !== '6') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.err = true
+            }
+          })
+          if (this.err === true) {
+            this.err = ''
+            this.refreshList()
+          } else {
+            this.processService.revokeProcIns(row.financeInvoiceInvalidDTO.procInsId).then(async ({data}) => {
+              let form = {status: '5', id: row.id}
+              await this.financeInvoiceService.updateStatusById(form)
+              this.$message.success(data)
+              this.refreshList()
+            })
+          }
+        })
+      },
+      isReceivables (row) {
+        this.$confirm(`确定要确认收款吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let param = {id: row.id, receivablesStatus: '1', receivablesDate: this.moment(new Date()).format('YYYY-MM-DD')}
+          this.financeInvoiceService.isReceivables(param).then(({data}) => {
+            this.$message.success(data)
+            this.refreshList()
+          })
+        })
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-input-number .el-input__inner {
+    text-align: left;
+  }
+</style>

+ 20 - 12
src/views/modules/flowable/task/TaskForm.vue

@@ -4,7 +4,7 @@
 
   <el-tabs type="border-card" v-model="taskSelectedTab">
     <el-tab-pane label="表单信息" name="form-first">
-      <component id="printForm" :status="status" :formReadOnly="formReadOnly" v-if="formType === '2'" :class="formReadOnly?'readonly':''"  ref="form" :businessId="businessId" :is="form"></component>
+      <component id="printForm" :status="status" :formReadOnly="formReadOnly" v-if="formType === '2'" :class="formReadOnly?'readonly':''" ref="form" :businessId="businessId" :is="form"></component>
 
       <PreviewForm  id="printForm"   v-if="formType !== '2'"  :processDefinitionId="procDefId" :edit="true" :taskFormData="taskFormData" ref="form"/>
     </el-tab-pane>
@@ -176,6 +176,11 @@
           processDefId: this.procDefKey,
           taskDefId: this.taskDefKey
         }).then(({data}) => {
+          data.flowButtonList.forEach(item => {
+            if (item.code === '_flow_reject') {
+              this.status = 'audit'
+            }
+          })
           this.buttons = data.flowButtonList
         })
       }
@@ -241,8 +246,13 @@
         } else {
           this.isShow = this.$route.query.isShow
         }
-        console.log('isShow', this.isShow)
-        console.log('contractTitle', this.contractTitle)
+        this.$nextTick(() => {
+          try {
+            this.$refs.form.getKeyWatch(Math.random().toString())
+          } catch (e) {
+            console.log(e)
+          }
+        })
       },
       cc (procInsId) {
         if (this.isCC && this.auditForm.userIds) {
@@ -318,13 +328,12 @@
         }
       },
       // 同意
-      agree (vars) {
+      async agree (vars) {
         if (this.formType === '2' && this.formUrl !== '/sys/workContract/WorkContractFileForm') {
           this.commit(vars) // 同意
           this.$refs.form.updateStatusById('agree')
         }
         if (this.formType === '2' && this.formUrl === '/sys/workContract/WorkContractFileForm') {
-          console.log('1111', this.status)
           this.$refs.form.filedNoIsEmpty((item) => {
             if (item !== 'false') {
               this.commit(vars) // 同意
@@ -339,7 +348,10 @@
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
-        }).then(() => {
+        }).then(async () => {
+          if (this.formType === '2') {
+            await this.$refs.form.updateStatusById('reject')
+          }
           this.taskService.backNodes(this.taskId).then(({data}) => {
             let backNodes = data
             if (backNodes.length > 0) {
@@ -348,9 +360,6 @@
             }
           })
         })
-        if (this.formType === '2') {
-          this.$refs.form.updateStatusById('reject')
-        }
       },
       // 撤回
       reback () {
@@ -358,10 +367,10 @@
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
-        }).then(() => {
+        }).then(async () => {
+          await this.$refs.form.updateStatusById('reback')
           this.taskService.backNodes(this.taskId).then(({data}) => {
             let backNodes = data
-            this.$refs.form.updateStatusById('reback')
             this.changeBusiness()
             this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
             this.$router.push(this.$route.query.routePath)
@@ -462,7 +471,6 @@
       // 自定义按钮提交
       commit (vars) {
         var num = this.$route.query.num
-        console.log(num)
         if (this.formType === '2') { // 外置表单
           this.$refs.form.agreeForm((businessTable, businessId, inputForm) => {
             vars = {...vars, ...inputForm}

+ 8 - 1
src/views/modules/flowable/task/TaskFormDetail.vue

@@ -117,6 +117,13 @@ const _import = require('@/router/import-' + process.env.NODE_ENV)
         this.businessId = this.$route.query.businessId
         this.procInsId = this.$route.query.procInsId
         this.formReadOnly = true
+        this.$nextTick(() => {
+          try {
+            this.$refs.form.getKeyWatch(Math.random().toString())
+          } catch (e) {
+            console.log(e)
+          }
+        })
       }
     },
     data () {
@@ -149,4 +156,4 @@ const _import = require('@/router/import-' + process.env.NODE_ENV)
     top: 1px;
     right: 1px;
 }
-</style>
+</style>

+ 0 - 3
src/views/modules/program/registered/ProjectList.vue

@@ -306,7 +306,6 @@
               }
             })
           })
-        this.reload()
       },
       // 发起项目登记审批
       registeredPush (row) {
@@ -337,7 +336,6 @@
               }
             })
           })
-        this.reload()
       },
       // 查看项目登记审批流程结果
       registeredDetail (row) {
@@ -372,7 +370,6 @@
             this.programProjectListInfoService.updateStatusById(form)
             this.$message.success(data)
             this.refreshList()
-            this.reload()
           })
         })
       },

+ 1 - 0
src/views/modules/program/registered/RegisItemForm.vue

@@ -982,6 +982,7 @@
           this.$refs.inputForm.resetFields()
           this.loading = true
           this.programProjectListInfoService.queryById(this.inputForm.id).then(({data}) => {
+            this.$refs.uploadComponent.clearUpload()
             this.inputForm = this.recover(this.inputForm, data)
             this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
             if (!this.commonJS.isEmpty(this.inputForm.workBeginDate) && !this.commonJS.isEmpty(this.inputForm.workEndDate)) {