Browse Source

报销调整代码提交

huangguoce 2 weeks ago
parent
commit
9a2004267f
30 changed files with 40872 additions and 3601 deletions
  1. 17 0
      src/api/flowable/taskService.js
  2. 43 22
      src/utils/validateXG.js
  3. 1029 899
      src/views/ccpm/reimbursement/info/InfoList.vue
  4. 1824 0
      src/views/ccpm/reimbursement/info/NewInfoUpdateForm.vue
  5. 1818 0
      src/views/ccpm/reimbursement/info/NewReimbursementFileSupplementForm.vue
  6. 2059 0
      src/views/ccpm/reimbursement/info/NewReimbursementForm.vue
  7. 1040 0
      src/views/common/NewDigitalInvoiceUploadComponent.vue
  8. 507 0
      src/views/common/NewUpLoadComponent.vue
  9. 2599 0
      src/views/common/reimbursement/ReimbursementComponent.vue
  10. 912 805
      src/views/consultancy/reimbursement/info/InfoList.vue
  11. 595 0
      src/views/consultancy/reimbursement/info/NewInfoForm.vue
  12. 1833 0
      src/views/consultancy/reimbursement/info/NewInfoUpdateForm.vue
  13. 1793 0
      src/views/consultancy/reimbursement/info/NewReimbursementFileSupplementForm.vue
  14. 1966 0
      src/views/consultancy/reimbursement/info/NewReimbursementForm.vue
  15. 1026 912
      src/views/cw/reimbursementApproval/info/InfoList.vue
  16. 528 0
      src/views/cw/reimbursementApproval/info/NewInfoForm.vue
  17. 2079 0
      src/views/cw/reimbursementApproval/info/NewInfoUpdateForm.vue
  18. 1976 0
      src/views/cw/reimbursementApproval/info/NewReimbursementFileSupplementForm.vue
  19. 3045 0
      src/views/cw/reimbursementApproval/info/NewReimbursementForm.vue
  20. 144 1
      src/views/dashboard/widgets/components/TodoList.vue
  21. 173 1
      src/views/home/components/TodoList2.vue
  22. 1041 946
      src/views/reimbursement/info/InfoList.vue
  23. 1927 0
      src/views/reimbursement/info/NewInfoUpdateForm.vue
  24. 1874 0
      src/views/reimbursement/info/NewReimbursementFileSupplementForm.vue
  25. 2617 0
      src/views/reimbursement/info/NewReimbursementForm.vue
  26. 114 15
      src/views/zs/reimbursement/info/InfoList.vue
  27. 472 0
      src/views/zs/reimbursement/info/NewInfoForm.vue
  28. 1862 0
      src/views/zs/reimbursement/info/NewInfoUpdateForm.vue
  29. 1790 0
      src/views/zs/reimbursement/info/NewReimbursementFileSupplementForm.vue
  30. 2169 0
      src/views/zs/reimbursement/info/NewReimbursementForm.vue

+ 17 - 0
src/api/flowable/taskService.js

@@ -163,4 +163,21 @@ export default {
 			params: { procInsId: procInsId },
 		});
 	},
+
+	//根据procInsId获取发起审批时间,只限于报销流程
+	getApprovalTimeByProcInsId(procInsId) {
+		return request({
+			url: prefix + "/flowable/task/getApprovalTimeByProcInsId",
+			method: "get",
+			params: { procInsId: procInsId },
+		});
+	},
+	//根据procInsId获取创建时间,只限于文件补充流程
+	getCreateTimeByProcInsId(procInsId) {
+		return request({
+			url: prefix + "/flowable/task/getCreateTimeByProcInsId",
+			method: "get",
+			params: { procInsId: procInsId },
+		});
+	},
 };

+ 43 - 22
src/utils/validateXG.js

@@ -1,11 +1,14 @@
+import dayjs from "dayjs";
+
 /**
  * 移动电话号码验证
  * @param str
  * @returns {boolean}
  */
-export function isMobile (str) {
-  const mobile = /^(((13[0-9]{1})|(15[0-9]{1})|(16[0-9]{1})|(18[0-9]{1})|(17[0-9]{1})|(19[0-9]{1}))+\d{8})$/
-  return mobile.test(str)
+export function isMobile(str) {
+	const mobile =
+		/^(((13[0-9]{1})|(15[0-9]{1})|(16[0-9]{1})|(18[0-9]{1})|(17[0-9]{1})|(19[0-9]{1}))+\d{8})$/;
+	return mobile.test(str);
 }
 
 /**
@@ -13,9 +16,9 @@ export function isMobile (str) {
  * @param str
  * @returns {boolean}
  */
-export function isPhone (str) {
-  const phone = /(^(\d{3,4}-)?\d{6,8}$)|(^(\d{3,4}-)?\d{6,8}(-\d{1,5})?$)/
-  return phone.test(str)
+export function isPhone(str) {
+	const phone = /(^(\d{3,4}-)?\d{6,8}$)|(^(\d{3,4}-)?\d{6,8}(-\d{1,5})?$)/;
+	return phone.test(str);
 }
 
 /**
@@ -24,8 +27,8 @@ export function isPhone (str) {
  * @returns {boolean}
  */
 export function isPhoneOrMobile(str) {
-	const phoneRegex = /^(\d{3,4}-)?\d{6,8}$/;  // 座机
-	const mobileRegex = /^1[3-9]\d{9}$/;        // 手机号(最新号段)
+	const phoneRegex = /^(\d{3,4}-)?\d{6,8}$/; // 座机
+	const mobileRegex = /^1[3-9]\d{9}$/; // 手机号(最新号段)
 
 	return phoneRegex.test(str) || mobileRegex.test(str);
 }
@@ -36,10 +39,10 @@ export function isPhoneOrMobile(str) {
  * @param str
  * @returns {boolean}
  */
-export function isBankNumber (str) {
-  // const bankNumber = /^([1-9]{1})(\d{15}|\d{18})$/
-  const bankNumber = /^[0-9 ]{0,25}$/
-  return bankNumber.test(str)
+export function isBankNumber(str) {
+	// const bankNumber = /^([1-9]{1})(\d{15}|\d{18})$/
+	const bankNumber = /^[0-9 ]{0,25}$/;
+	return bankNumber.test(str);
 }
 
 /**
@@ -48,9 +51,9 @@ export function isBankNumber (str) {
  * @param str
  * @returns {boolean}
  */
-export function isLinkMobile (str) {
-  const linkMobile = /^[0-9]\d{19}$/
-  return linkMobile.test(str)
+export function isLinkMobile(str) {
+	const linkMobile = /^[0-9]\d{19}$/;
+	return linkMobile.test(str);
 }
 
 /**
@@ -59,9 +62,9 @@ export function isLinkMobile (str) {
  * @param str
  * @returns {boolean}
  */
-export function isBankNum (str) {
-  const bankNumber = /^([1-9]{1})(\d{11}|\d{15}|\d{16}|\d{17}|\d{18})$/
-  return bankNumber.test(str)
+export function isBankNum(str) {
+	const bankNumber = /^([1-9]{1})(\d{11}|\d{15}|\d{16}|\d{17}|\d{18})$/;
+	return bankNumber.test(str);
 }
 
 /**
@@ -69,9 +72,27 @@ export function isBankNum (str) {
  * @param str
  * @returns {boolean}
  */
-export function isEmail (str) {
-  const email = /^((https|http|ftp|rtsp|mms)?:\/\/)?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+\/?)$/
-  return email.test(str)
+export function isEmail(str) {
+	const email =
+		/^((https|http|ftp|rtsp|mms)?:\/\/)?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+\/?)$/;
+	return email.test(str);
 }
 
-export default {isMobile, isPhone, isBankNumber, isLinkMobile, isBankNum, isPhoneOrMobile, isEmail}
+export function compareDate(date1Str, date2Str) {
+	const d1 = dayjs(date1Str);
+	const d2 = dayjs(date2Str);
+
+	if (d1.isBefore(d2, "day")) return "before";
+	if (d1.isAfter(d2, "day")) return "after";
+	return "same";
+}
+export default {
+	compareDate,
+	isMobile,
+	isPhone,
+	isBankNumber,
+	isLinkMobile,
+	isBankNum,
+	isPhoneOrMobile,
+	isEmail,
+};

File diff suppressed because it is too large
+ 1029 - 899
src/views/ccpm/reimbursement/info/InfoList.vue


File diff suppressed because it is too large
+ 1824 - 0
src/views/ccpm/reimbursement/info/NewInfoUpdateForm.vue


File diff suppressed because it is too large
+ 1818 - 0
src/views/ccpm/reimbursement/info/NewReimbursementFileSupplementForm.vue


File diff suppressed because it is too large
+ 2059 - 0
src/views/ccpm/reimbursement/info/NewReimbursementForm.vue


File diff suppressed because it is too large
+ 1040 - 0
src/views/common/NewDigitalInvoiceUploadComponent.vue


+ 507 - 0
src/views/common/NewUpLoadComponent.vue

@@ -0,0 +1,507 @@
+<!--文件上传组件-->
+<template>
+  <div :key="uploadKey">
+    <!-- <el-divider v-if="showDivider" content-position="left"><i class="el-icon-document"></i> {{ dividerName
+    }}</el-divider> -->
+    <el-upload ref="upload" style="display: inline-block;" :show-header="'status'" action="" :limit="999"
+      :http-request="httpRequest" multiple :on-exceed="(files, fileList) => {
+        $message.warning(`当前限制选择 999 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
+      }" :show-file-list="false" :on-change="changes" :on-progress="uploadVideoProcess" :file-list="fileList">
+      <template v-if="auth === 'view' && uploadFlag === false" #tip>
+        <el-button v-show="false" :loading="loading" type="primary" size="default" :disabled="true"> 点击上传 </el-button>
+      </template>
+      <template v-else #trigger>
+        <el-button v-show="false" class="upload-btn" :loading="loading" type="primary" size="default"> 点击上传 </el-button>
+      </template>
+    </el-upload>
+
+    <div style="height: calc(100% - 80px);margin-top: -20px">
+      <!-- 进度条 -->
+      <el-progress style="margin-left: 5em" v-if="progressFlag" :percentage="loadProgress"></el-progress>
+      <el-table ref="uploadTable" v-loading="loading" :key="tableKey" :data="dataListNew">
+        <el-table-column type="seq" width="40"></el-table-column>
+        <el-table-column label="文件名称" prop="name" align="center">
+          <template #default="scope">
+            <div v-if="ifName(scope.row) === true">
+              <el-image style="width: 30px; height: 30px;padding-top: 4px;" :src="scope.row.lsUrl"
+                :preview-src-list="[scope.row.lsUrl]" :preview-teleported="true"></el-image>
+            </div>
+            <div v-else>
+              <el-link type="primary" :underline="false" @click="showFile(scope.row)">{{ scope.row.name }}</el-link>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="创建人" prop="createBy.name" align="center"></el-table-column>
+        <el-table-column label="创建时间" prop="createTime" align="center"></el-table-column>
+        <el-table-column label="文件大小" prop="size" align="center">
+          <template #default="scope">
+            {{ getSize(scope.row.size) }}
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" width="200px" fixed="right" align="center">
+          <template #default="scope">
+            <el-form inline :disabled="false" style="display: inline-block;">
+              <el-button style="margin-right: 12px;" text type="primary" key="01" icon="el-icon-download" size="small"
+                @click="toHref(scope.row)">下载</el-button>
+            </el-form>
+            <el-button text type="primary" key="02" icon="el-icon-delete" size="small"
+              @click="deleteById(scope.row, scope.$index, fileList)"
+              :disabled="auth === 'view' && delFlag === false && createBy !== scope.row.createBy.name">删除</el-button>
+
+            <!--            <el-button v-if="createBy===scope.row.createBy.name" type="text"  icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false">删除2</el-button>-->
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!--    <el-image-viewer v-if="showViewer" :on-close="closeViewer" :url-list="[url]" :zIndex=9999></el-image-viewer>-->
+  </div>
+</template>
+
+<script>
+// eslint-disable-next-line no-unused-vars
+import OSSSerivce, {
+  httpRequest,
+  // eslint-disable-next-line no-unused-vars
+  handleRemove,
+  fileName,
+  // eslint-disable-next-line no-unused-vars
+  beforeAvatarUpload,
+  // eslint-disable-next-line no-unused-vars
+  openWindowOnUrl,
+  // eslint-disable-next-line no-unused-vars
+  toHref
+} from '@/api/sys/OSSService'
+// import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
+import moment from 'moment'
+import AttachmentLib from './AttachmentLib.vue'
+export default {
+  data() {
+    return {
+      uploadKey: '',
+      progressFlag: false,
+      loadProgress: 0,
+      fileList: [],
+      dataList: [],
+      dataListNew: [],
+      url: '',
+      showViewer: false,
+      ossService: null,
+      auth: '',
+      directory: 'public',
+      maxValue: 300,
+      tableKey: '',
+      fileLoading: true,
+      dividerName: '',
+      uploadFlag: false,
+      delFlag: false,
+      createBy: '',
+      showDivider: true,
+      loading: false,
+      dataListLength: '',
+      uniqueId: ""
+    }
+  },
+  watch: {
+  },
+  created() {
+    this.ossService = new OSSSerivce()
+  },
+  components: {
+    AttachmentLib
+    // ElImageViewer
+  },
+  mounted() {
+    window.onPreview = this.onPreview
+  },
+  methods: {
+    /**
+     * dividerName: 组件中divider的名称赋值
+     * showDivider: ‘附件‘Divider是否展示
+     *     注:值为空时,默认值为true
+     *    showDivider=false时 ‘附件‘Divider隐藏
+     **/
+    setDividerName(dividerName, showDivider) {
+      if (this.commonJS.isNotEmpty(dividerName)) {
+        this.dividerName = dividerName
+      }
+      if (this.commonJS.isNotEmpty(showDivider)) {
+        if (showDivider === false) {
+          this.showDivider = false
+        } else {
+          this.showDivider = true
+        }
+      } else {
+        this.showDivider = true
+      }
+    },
+    /**
+     * 文件上传组件初始化
+     * @param auth
+     *    auth的值为"view"时,不可上传/编辑文件
+     *    auth为其他值时,可上传/编辑文件
+     * @param fileList  要显示到文件上传列表中的文件。
+     *    注:文件必须要有url属性并且文件的url属性值必须是在oss中的路径值
+     *    例:'/attachment-file/xxx/xxx/2022/9/08/xxx.jpg'
+     * @param directory  要存放到oss的哪个文件夹下。
+     *    注:值为空时,默认存放到"public"文件夹
+     * @param maxValue  上传文件允许的最大值,单位:MB
+     *    注:值为空时,默认值为300MB
+     * @param dividerName  组件中divider的名称
+     *    注:值为空时,默认值为‘附件’
+     * @param uploadFlag  ‘上传文件’按钮是否禁用
+     *    注:值为空时,默认值为false
+     *    auth=view&&uploadFlag=false时 ‘上传文件’按钮禁用
+     * @param delFlag  ‘删除’按钮是否禁用
+     *    注:值为空时,默认值为false
+     *    auth=view&&delFlag=false时 ‘删除’按钮禁用
+     * @param showDivider  ‘附件‘Divider是否展示
+     *    注:值为空时,默认值为true
+     *    showDivider=false时 ‘附件‘Divider隐藏
+     */
+    async newUpload(auth, fileList, directory, maxValue, dividerName, uploadFlag, delFlag, showDivider, uniqueId) {
+      await this.fileLoadingFalse()
+      if (this.commonJS.isEmpty(fileList)) {
+        this.fileLoading = true
+      } else {
+        this.dataListLength = fileList.length
+      }
+      if (this.commonJS.isEmpty(dividerName)) {
+        this.dividerName = '附件'
+      } else {
+        this.dividerName = dividerName
+      }
+      if (directory !== undefined && directory !== null && directory !== '' && directory !== {}) {
+        this.directory = directory
+      } else {
+        this.directory = 'public'
+      }
+      if (maxValue !== undefined && maxValue !== null && maxValue !== '' && maxValue !== 0) {
+        this.maxValue = maxValue
+      } else {
+        this.maxValue = 300
+      }
+      this.auth = auth
+      if (this.commonJS.isEmpty(uploadFlag)) {
+        this.uploadFlag = false
+      } else {
+        if (uploadFlag !== true && uploadFlag !== false) {
+          this.uploadFlag = false
+        } else {
+          this.uploadFlag = uploadFlag
+        }
+      }
+      if (this.commonJS.isEmpty(delFlag)) {
+        this.delFlag = false
+      } else {
+        if (delFlag !== true && delFlag !== false) {
+          this.delFlag = false
+          this.createBy = delFlag
+        } else {
+          this.delFlag = delFlag
+        }
+      }
+
+      if (this.commonJS.isNotEmpty(uniqueId)) {
+        this.uniqueId = uniqueId
+      }
+
+
+
+      for await (let item of fileList) {
+        console.log(item);
+
+        if (item.remarks == uniqueId) {
+          if (item.url && item.url !== null && item.url !== undefined && item.url !== "") {
+            await this.ossService.getFileSizeByUrl(item.url).then((data) => {
+              item.lsUrl = data.url
+              item.size = data.size
+              this.dataList.push(item)
+              this.dataListNew.push(item)
+              this.fileList.push(item)
+              if (this.dataListNew.length === fileList.length) {
+                this.fileLoading = true
+              }
+            })
+          } else {
+            this.dataList.push(item)
+            this.dataListNew.push(item)
+            this.fileList.push(item)
+            this.fileLoading = true
+          }
+        }
+      }
+      // this.dataList = JSON.parse(JSON.stringify(fileList))
+      // this.dataListNew = JSON.parse(JSON.stringify(fileList))
+      if (this.commonJS.isEmpty(showDivider)) {
+        this.showDivider = true
+      } else {
+        if (showDivider === false) {
+          this.showDivider = false
+        } else {
+          this.showDivider = true
+        }
+      }
+    },
+    addMyAttachment(row) {
+      this.$confirm(`确定收藏到个人资料库?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        let inputForm = {
+          classification: "",
+          fileDescription: "",
+          workAttachments: []
+        }
+        inputForm.workAttachments.push(row)
+        this.ossService.downloadAndUploadToMyCollect({
+          url: row.lsUrl,
+          fileName: row.name,
+          dir: this.directory,
+          workCollectAccessoryDTO: {
+            ...inputForm
+          }
+        }).then(res => {
+          this.$message.success(`操作成功`);
+        })
+      });
+
+    },
+    async httpRequest(file) {
+      await httpRequest(file, fileName(file), this.directory, this.maxValue)
+    },
+    handleOnDownToOss(row, url) {
+      let flag = false
+      this.fileList.forEach(item => {
+        if (row.fileName == item.name) {
+          flag = true
+        }
+      })
+      console.log(this.fileList);
+
+      if (flag) {
+        this.$message.error(`${row.fileName}已存在,无法重复上传`);
+        return
+      }
+      this.ossService.getFileSizeByUrl(url).then((data) => {
+        let file = {
+          lsUrl: data.url,
+          size: data.size,
+          createBy: {
+            id: this.$store.state.user.id,
+            name: this.$store.state.user.name,
+          },
+          createTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
+          name: row.fileName,
+          percentage: 100,
+          status: "success",
+          url: url
+        }
+        this.dataList.push(file)
+        this.dataListNew.push(file)
+        this.fileList.push(file)
+      })
+    },
+    uploadVideoProcess(event, file, fileList) {
+      this.progressFlag = true // 显示进度条
+      this.loadProgress = parseInt(event.percent) // 动态获取文件上传进度
+      if (this.loadProgress >= 100) {
+        this.loadProgress = 100
+        setTimeout(() => {
+          this.progressFlag = false
+        }, 1000) // 一秒后关闭进度条
+      }
+    },
+    getSize(value) {
+      if (this.commonJS.isEmpty(value)) {
+        return '0 B'
+      } else {
+        let val = parseInt(value)
+        if (this.commonJS.isEmpty(val)) {
+          return '0 B'
+        }
+        if (isNaN(val)) {
+          return '0 B'
+        }
+        if (val === 0) {
+          return '0 B'
+        }
+        let k = 1024
+        let sizes = ['B', 'KB', 'MB', 'GB', 'PB', 'TB', 'EB', 'ZB', 'YB']
+        let i = Math.floor(Math.log(val) / Math.log(k))
+        let result = val / Math.pow(k, i);
+        let kb = parseFloat(result.toPrecision(3));
+        return kb + '' + sizes[i]
+      }
+    },
+    async changes(file, fileList) {
+      // if (file.status !== 'ready') {
+      //   return
+      // }
+
+
+      if (file.status !== 'ready') {
+        let fileListNamesList = []
+        this.fileList.forEach(fileItem => {
+          fileListNamesList.push(fileItem.name)
+        })
+
+        if (fileListNamesList.indexOf(file.name) != -1) {
+          console.log(fileListNamesList);
+
+          this.$message.error(`${file.name}已存在,无法重复上传`)
+          return
+        } else {
+
+          if (!beforeAvatarUpload(file, fileList, this.maxValue)) {
+            this.$message.error('文件大小不能超过 ' + this.maxValue + ' MB!')
+            return
+          }
+          // this.dataListNew = []
+          // this.dataList.forEach((item) => {
+          //   this.dataListNew.push(item)
+          // })
+          var fileListNames = []
+          for (let fileItem of this.fileList) {
+            fileListNames.push(fileItem.name)
+          }
+          // for (let item of fileList) {
+
+
+          let item1 = JSON.parse(JSON.stringify(file))
+          // if (fileListNames.length === 0 || fileListNames.indexOf(item1.name) === -1) {
+          this.fileList.push(item1)
+          // }
+          item1.createTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+          item1.createBy = {
+            id: '',
+            name: ''
+          }
+          item1.createBy.id = this.$store.state.user.id
+          item1.createBy.name = this.$store.state.user.name
+          item1.remarks = this.uniqueId
+          this.dataListNew.push(item1)
+          this.dataList.push(item1)
+
+          // }
+          for (let item of this.dataListNew) {
+            if (item.raw !== undefined && item.raw !== null && item.raw !== {}) {
+              item.url = item.raw.url
+              if (item.raw.url !== undefined && item.raw.url !== null && item.raw.url !== {}) {
+                this.ossService.getTemporaryUrl(item.raw.url).then((data) => {
+                  item.lsUrl = data
+                })
+              }
+            }
+          }
+          this.$emit("handleUploadSuccess", JSON.parse(JSON.stringify(this.dataListNew)), this.uniqueId)
+        }
+      }
+
+    },
+    showFile(row) {
+      console.log('row', row)
+      openWindowOnUrl(row)
+    },
+    onPreview(url) {
+      this.url = url
+      this.showViewer = true
+    },
+    // 关闭查看器
+    closeViewer() {
+      this.url = ''
+      this.showViewer = false
+    },
+    toHref(row) {
+      toHref(row)
+    },
+    async deleteById(row, index, fileList) {
+      // this.$refs.upload.handleRemove(this.dataListNew[index])
+      await this.dataListNew.splice(index, 1)
+      await this.dataList.splice(index, 1)
+      if (this.commonJS.isNotEmpty(row.id)) {
+        this.ossService.deleteMsgById(row.id)
+      }
+      var newFileList = [];
+      for (var i = 0; i < fileList.length; i++) {
+        if (fileList[i].name !== row.name) {
+          newFileList.push(fileList[i])
+        }
+      }
+      this.fileList = newFileList;
+      this.$emit("handleUploadSuccess", JSON.parse(JSON.stringify(this.dataListNew)), this.uniqueId)
+    },
+    /**
+     * 关闭dialog时使用  清除el-upload中上传的文件
+     */
+    clearUpload() {
+      this.$refs.upload.clearFiles()
+      this.dataList = []
+      this.dataListNew = []
+      this.fileList = []
+      this.createBy = ''
+    },
+    /**
+     * 获取当前文件列表中的文件数据
+     */
+    getDataList() {
+
+      return this.dataListNew
+    },
+    /**
+     * 判断进度条是否结束,附件是否加载完成
+     * @returns {boolean}
+     */
+    checkProgress() {
+      if (this.progressFlag === true) {
+        this.$message.warning('请等待附件上传完成再进行操作')
+        return true
+      }
+      if (this.fileLoading === false) {
+        this.$message.warning('请等待附件加载完成再进行操作')
+        if (this.dataListLength === this.dataListNew.length) {
+          this.fileLoading = true
+        }
+        return true
+      }
+
+      const invalidFile = this.dataListNew.find(file => !file.url); // 找到第一个 URL 为空的文件
+      if (invalidFile) {
+        this.$message.warning(`${invalidFile.name}的URL为空,请检查后重新上传`)
+        return true; // 只要有一个 url 为空,直接 return
+      }
+
+      return false
+    },
+    ifName(row) {
+      if (this.commonJS.isEmpty(row.name)) {
+        row.name = '---'
+        return false
+      }
+      let suffix = row.name.substring(row.name.lastIndexOf('.') + 1)
+      if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
+        return true
+      } else {
+        return false
+      }
+    },
+    fileLoadingFalse() {
+      this.fileLoading = false
+    },
+    // 开启/关闭页面的加载中状态
+    changeLoading(loading) {
+      if (this.commonJS.isNotEmpty(loading)) {
+        this.loading = loading
+      } else {
+        this.loading = false
+      }
+    }
+  }
+}
+</script>
+<style>
+.el-divider__text {
+  font-size: 16px;
+  font-weight: bold;
+}
+</style>

File diff suppressed because it is too large
+ 2599 - 0
src/views/common/reimbursement/ReimbursementComponent.vue


File diff suppressed because it is too large
+ 912 - 805
src/views/consultancy/reimbursement/info/InfoList.vue


+ 595 - 0
src/views/consultancy/reimbursement/info/NewInfoForm.vue

@@ -0,0 +1,595 @@
+<template>
+  <div>
+    <el-dialog :title="title" :close-on-click-modal="false" draggable width="1200px" @close="close"
+      @keyup.enter.native="doSubmit" v-model="visible">
+      <el-form size="large" :model="inputForm" ref="inputForm" v-loading="loading"
+        :class="method === 'view' ? 'readonly' : ''" :disabled="method === 'view'" label-width="100px"
+        @submit.native.prevent>
+
+        <el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item hidden label="报销项" prop="reimbursementType"
+              :disabled="status === 'audit' || status === 'taskFormDetail'" :rules="[
+                { required: true, message: '报销项不能为空', trigger: 'blur' }
+              ]">
+              <el-radio v-model="inputForm.reimbursementType"
+                v-for="item in $dictUtils.getDictList('reimbursement_type')" :label="item.value"
+                style="margin-right: 20px">
+                {{ item.label }}</el-radio>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="26">
+          <el-col :span="12">
+            <el-form-item label="经办人" prop="userName">
+              <el-input v-model="inputForm.userName" :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="报销编号" prop="no">
+              <el-input v-model="inputForm.no" :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="所属部门" prop="departmentName">
+              <el-input v-model="inputForm.departmentName" :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="报销日期" prop="reimDate">
+              <el-date-picker v-model="inputForm.reimDate" type="date" value-format="YYYY-MM-DD" style="width: 100%"
+                placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="报销类型" prop="sourceType">
+              <el-select v-model="inputForm.sourceType" placeholder="请选择报销类型" style="width:100%;">
+                <el-option v-for="item in $dictUtils.getDictList('cw_reimbursement_source_type')" :key="item.value"
+                  :label="item.label" :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item v-if="hasPermission('consultancy:user:payment')" label="是否付款" prop="paymentStatus">
+              <el-input v-if="inputForm.paymentStatus === '1'" :disabled="true" v-model='payment'
+                class="bold-red"></el-input>
+              <el-input v-else v-model='payment' :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" v-if="inputForm.sourceType === '5'">
+            <el-form-item label="采购编号" prop="purchaseNo" :rules="[{ required: true, message: '采购编号不能为空', trigger: 'blur' },
+            { required: true, message: '采购编号不能为空', trigger: 'change' }]">
+              <el-input size="medium" :readonly="true" @focus="openPurForm()" v-model="inputForm.purchaseNo"
+                placeholder="请选择采购编号">
+                <el-button slot="append" icon="el-icon-search" @click="openPurForm()"></el-button>
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注" prop="remarks">
+              <el-input v-model="inputForm.remarks" type="textarea" :rows="5" maxlength="500" placeholder="请输入简介"
+                show-word-limit>
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <div v-if="inputForm.sourceType === '5'">
+          <el-divider content-position="left"><i class="el-icon-document"></i>
+            采购详情
+          </el-divider>
+          <el-row :gutter="15">
+            <vxe-table border show-footer show-overflow :footer-method="footerMethod555" ref="preTable"
+              class="vxe-table-element" :data="inputForm.preList" style="margin-left: 5em" highlight-current-row>
+              <vxe-table-column field="purchaser" title="采购人" :edit-render="{}" show-overflow="title"
+                :rules="[{ required: true, message: '请选择采购人', trigger: 'blur' }]"></vxe-table-column>
+              <vxe-table-column field="procurementOffice" title="采购部门" :edit-render="{}"
+                show-overflow="title"></vxe-table-column>
+              <vxe-table-column field="procurementType" title="采购类型" :edit-render="{}" show-overflow="title"
+                :rules="[{ required: true, message: '请选择采购类型', trigger: 'blur' }]"></vxe-table-column>
+              <vxe-table-column field="tradeName" title="商品名称" :edit-render="{}" show-overflow="title"
+                :rules="[{ required: true, message: '请填写商品名称', trigger: 'blur' }]"></vxe-table-column>
+              <vxe-table-column field="tradePrice" title="商品单价(元)" :edit-render="{}" show-overflow="title"
+                :rules="[{ required: true, message: '请输入商品单价', trigger: 'blur' }]"></vxe-table-column>
+              <vxe-table-column field="tradeNumber" title="商品数量" :edit-render="{}"
+                show-overflow="title"></vxe-table-column>
+              <vxe-table-column field="priceSum" title="商品总价" :edit-render="{}"
+                show-overflow="title"></vxe-table-column>
+              <vxe-table-column field="company" title="单位" :edit-render="{}" show-overflow="title"></vxe-table-column>
+              <vxe-table-column field="remarks" title="备注" :edit-render="{}" show-overflow="title"></vxe-table-column>
+              <vxe-table-column title="操作">
+                <template #default="scope">
+                  <el-button size="mini" type="primary" :disabled="false"
+                    @click="seeFileInfo(scope.$rowIndex)">文件详情</el-button>
+                </template>
+              </vxe-table-column>
+            </vxe-table>
+          </el-row>
+        </div>
+
+
+        <ReimbursementComponent ref="reimbursementComponent">
+        </ReimbursementComponent>
+
+
+
+        <!--		  <div v-if="inputForm.reimbursementType === '1'">-->
+        <!--			  <el-divider content-position="left">电子发票信息-->
+        <!--				  &lt;!&ndash;<el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || status === 'audit' || status === 'taskFormDetail' " size="default" @click="insertEvent('invoiceReimbursement')" plain>-->
+        <!--					  新增-->
+        <!--				  </el-button>&ndash;&gt;-->
+        <!--			  </el-divider>-->
+        <!--			  <el-row  :gutter="15" >-->
+        <!--				  <el-col :span="24">-->
+        <!--					  <vxe-table-->
+        <!--						  border-->
+        <!--						  show-footer-->
+        <!--						  show-overflow-->
+        <!--						  ref="invoiceReimbursementTable"-->
+        <!--						  :footer-method="footerMethod1111"-->
+        <!--						  class="vxe-table-element"-->
+        <!--						  :data="inputForm.invoiceReimbursements"-->
+        <!--						  style="margin-left: 5em"-->
+        <!--						  @cell-click=""-->
+        <!--						  :key="invoiceReimbursementKey"-->
+        <!--						  @edit-closed=""-->
+        <!--						  highlight-current-row-->
+        <!--						  :edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"-->
+        <!--						  :edit-rules="invoiceReimbursementRules"-->
+        <!--					  >-->
+        <!--						  <vxe-table-column  field="invoiceType" title="发票类型" show-overflow="title" :edit-render="{name: '$select', options: $dictUtils.getDictList('invoice_reimbursement_type')}">-->
+        <!--							  <template v-slot:edit="scope">-->
+        <!--								  <vxe-select :disabled="true" v-model="scope.row.invoiceType" placeholder="请选择发票类型" clearable style="width: 100%;" transfer>-->
+        <!--									  <vxe-option-->
+        <!--										  v-for="item in $dictUtils.getDictList('invoice_reimbursement_type')"-->
+        <!--										  :key="item.value"-->
+        <!--										  :label="item.label"-->
+        <!--										  :value="item.value">-->
+        <!--									  </vxe-option>-->
+        <!--								  </vxe-select>-->
+        <!--							  </template>-->
+        <!--						  </vxe-table-column>-->
+        <!--						  <vxe-table-column field="invoiceProjectName" title="发票项目名" :edit-render="{}" show-overflow="title">-->
+        <!--							  <template #edit="scope">-->
+        <!--								  <el-input maxlength="50" readonly="true" v-model="scope.row.invoiceProjectName" ></el-input>-->
+        <!--							  </template>-->
+        <!--						  </vxe-table-column>-->
+        <!--						  <vxe-table-column field="number" title="发票号" :edit-render="{}" show-overflow="title">-->
+        <!--							  <template #edit="scope">-->
+        <!--								  <el-input oninput ="value=value.replace(/\D|^/g,'')" readonly="true" maxlength="30" @change="isExict(scope.row)" v-model="scope.row.number" ></el-input>-->
+        <!--							  </template>-->
+        <!--						  </vxe-table-column>-->
+        <!--						  <vxe-table-column field="invoiceDate" title="开票日期" :edit-render="{}" show-overflow="title">-->
+        <!--							  <template v-slot:edit="scope">-->
+        <!--								  <vxe-input v-model="scope.row.invoiceDate" readonly="true" type="datetime" transfer placeholder="请选择日期"></vxe-input>-->
+        <!--							  </template>-->
+        <!--						  </vxe-table-column>-->
+        <!--						  <vxe-table-column field="invoiceUnit" title="开票单位" :edit-render="{}" show-overflow="title">-->
+        <!--							  <template #edit="scope">-->
+        <!--								  <el-input maxlength="50" readonly="true" v-model="scope.row.invoiceUnit" ></el-input>-->
+        <!--							  </template>-->
+        <!--						  </vxe-table-column>-->
+        <!--						  <vxe-table-column field="buyerName" title="购买方名称" :edit-render="{}" show-overflow="title">-->
+        <!--							  <template #edit="scope">-->
+        <!--								  <el-input maxlength="50" readonly="true" v-model="scope.row.buyerName" ></el-input>-->
+        <!--							  </template>-->
+        <!--						  </vxe-table-column>-->
+        <!--						  <vxe-table-column field="amount" title="金额" :edit-render="{}" show-overflow="title">-->
+        <!--							  <template #edit="scope">-->
+        <!--								  <el-input maxlength="15" readonly="true" v-model="scope.row.amount" @input="scope.row.amount = twoDecimalPlaces(scope.row.amount)" @change="countAmount(scope.row)"></el-input>-->
+        <!--							  </template>-->
+        <!--						  </vxe-table-column>-->
+        <!--						  <vxe-table-column field="taxAmount" title="税额" :edit-render="{}" show-overflow="title">-->
+        <!--							  <template #edit="scope">-->
+        <!--								  <el-input maxlength="15" readonly="true" v-model="scope.row.taxAmount" @input="scope.row.taxAmount = twoDecimalPlaces(scope.row.taxAmount)" @change="countAmount(scope.row)"></el-input>-->
+        <!--							  </template>-->
+        <!--						  </vxe-table-column>-->
+        <!--						  <vxe-table-column field="count" title="价税合计" :edit-render="{}" show-overflow="title">-->
+        <!--							  <template #edit="scope">-->
+        <!--								  <el-input disabled="true" v-model="scope.row.count" ></el-input>-->
+        <!--							  </template>-->
+        <!--						  </vxe-table-column>-->
+        <!--						  <vxe-table-column field="remarks" title="备注" :edit-render="{}" show-overflow="title">-->
+        <!--							  <template #edit="scope">-->
+        <!--								  <el-input maxlength="250" v-model="scope.row.remarks" ></el-input>-->
+        <!--							  </template>-->
+        <!--						  </vxe-table-column>-->
+        <!--						  &lt;!&ndash;<vxe-table-column title="操作" width="100">-->
+        <!--							  <template #default="scope">-->
+        <!--								  <el-button size="default" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'invoiceReimbursement')">删除</el-button>-->
+        <!--							  </template>-->
+        <!--						  </vxe-table-column>&ndash;&gt;-->
+        <!--					  </vxe-table>-->
+        <!--				  </el-col>-->
+        <!--			  </el-row>-->
+        <!--		  </div>-->
+
+      </el-form>
+      <!-- 附件 -->
+      <!-- <InvoiceReimbursementUpLoadComponent ref="invoiceReimbursementUpLoadComponent"
+        v-show="'1' === this.inputForm.reimbursementType"></InvoiceReimbursementUpLoadComponent>
+      <UpLoadComponent ref="uploadComponent"></UpLoadComponent> -->
+      <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+          <el-button size="small" type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check"
+            v-noMoreClick>确定</el-button>
+        </span>
+      </template>
+
+      <!--      <MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>-->
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+// import ReimbursementService from '@/api/sys/ReimbursementService'
+import ReimbursementService from '@/api/consultancy/reimbursement/ReimbursementService'
+import UpLoadComponent from '@/views/common/UpLoadComponent'
+import InvoiceReimbursementUpLoadComponent from '@/views/common/NewDigitalInvoiceUploadComponent'
+import XEUtils from 'xe-utils'
+// import MaterialManagementService from '@/api/materialManagement/MaterialManagementService'
+// import MaterialManagementDialog from '../../../materialManagement/file/MaterialManagementDialog'
+import ReimbursementComponent from '@/views/common/reimbursement/ReimbursementComponent.vue'
+export default {
+  data() {
+    return {
+      title: '',
+      method: '',
+      visible: false,
+      loading: false,
+      inputForm: {
+        reimbursementType: '0',
+        userName: '',
+        no: '',
+        department: '',
+        reimDate: '',
+        remarks: '',
+        detailInfos: [],
+        detailInfoContracts: [],
+        detailInfoReports: [],
+        detailInfoOthers: [],
+        detailInfoProcured: [],
+        amountInfos: [],
+        invoiceReimbursements: [],
+        invoiceReimbursementFiles: [], // 电子发票附件信息
+        files: [], // 附件信息
+        sourceType: '',
+        preList: [],
+        purchaseNo: '',
+        tradeTotalPrice: '',
+        purchaseId: '',
+        procDefId: '',
+        procDefKey: '',
+        formTitle: '',
+        departmentName: '',
+        paymentStatus: ''
+      },
+      payment: ''
+    }
+  },
+  // reimbursementService: null,
+  reimbursementService: null,
+  // materialManagementService: null,
+  created() {
+    // this.reimbursementService = new ReimbursementService()
+    this.reimbursementService = new ReimbursementService()
+    // this.materialManagementService = new MaterialManagementService()
+  },
+  components: {
+    ReimbursementComponent,
+    InvoiceReimbursementUpLoadComponent,
+    UpLoadComponent,
+    // MaterialManagementDialog
+  },
+  methods: {
+    getUpload() {
+    },
+    initReimbursementComponent() {
+      this.$refs.reimbursementComponent.initComponent("reimbursement", "consultancy", "南京兴光培训咨询有限公司", this.inputForm, this.isConfirm, this.status)
+    },
+    init(method, id) {
+      this.method = method
+      this.inputForm = {
+        reimbursementType: '0',
+        userName: '',
+        no: '',
+        department: '',
+        reimDate: '',
+        remarks: '',
+        detailInfos: [],
+        amountInfos: [],
+        invoiceReimbursements: [],
+        invoiceReimbursementFiles: [], // 电子发票附件信息
+        files: [], // 附件信息
+        detailInfoContracts: [],
+        detailInfoReports: [],
+        detailInfoOthers: [],
+        detailInfoProcured: [],
+        sourceType: '',
+        preList: [],
+        purchaseNo: '',
+        tradeTotalPrice: '',
+        purchaseId: '',
+        departmentName: '',
+        paymentStatus: ''
+      }
+      if (method === 'add') {
+        this.title = `新建报销`
+      } else if (method === 'edit') {
+        this.inputForm.id = id
+        this.title = '报销修改'
+      } else if (method === 'view') {
+        this.inputForm.id = id
+        this.title = '报销详情'
+      } else if (method === 'addChild') {
+        this.title = '添加下级结构'
+        this.inputForm.parentId = id
+      }
+      this.visible = true
+      this.loading = false
+      this.$nextTick(() => {
+        if (method === 'edit' || method === 'view') { // 修改或者查看
+          this.loading = true
+          this.$refs.inputForm.resetFields()
+          this.reimbursementService.findById(this.inputForm.id).then((data) => {
+            this.inputForm = this.recover(this.inputForm, data)
+            this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+            this.$refs.uploadComponent.clearUpload()
+            // this.$refs.invoiceReimbursementUpLoadComponent.clearUpload()
+            if (this.status === 'audit' || this.status === 'taskFormDetail') {
+              method = 'view'
+            }
+            if (this.commonJS.isEmpty(this.inputForm.department)) {
+              this.inputForm.department = this.$store.state.user.office.id
+              this.inputForm.departmentName = this.$store.state.user.office.name
+            }
+            if (this.commonJS.isEmpty(this.inputForm.userId)) {
+              this.inputForm.userId = this.$store.state.user.id
+            }
+            if (this.commonJS.isEmpty(this.inputForm.userName)) {
+              this.inputForm.userName = this.$store.state.user.name
+            }
+            if (this.commonJS.isEmpty(this.inputForm.reimDate)) {
+              this.inputForm.reimDate = new Date()
+            }
+            if (this.commonJS.isEmpty(this.inputForm.invoiceReimbursementFiles)) {
+              this.inputForm.invoiceReimbursementFiles = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.files)) {
+              this.inputForm.files = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.reimbursementType)) {
+              this.inputForm.reimbursementType = '0'
+            }
+            if (this.commonJS.isNotEmpty(this.inputForm.paymentStatus) && this.inputForm.paymentStatus === '1') {
+              this.payment = '已付款'
+            } else {
+              this.payment = '未付款'
+            }
+            // this.$refs.invoiceReimbursementUpLoadComponent.newUpload(method, this.inputForm.invoiceReimbursementFiles, 'reimbursement', 300, '数电发票信息', null, null, null, '南京兴光培训咨询有限公司')
+            this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+            this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+            if (this.commonJS.isNotEmpty(this.inputForm.purchaseId)) {
+              this.startPur(this.inputForm.purchaseId)
+            }
+            this.initReimbursementComponent()
+            this.loading = false
+          })
+          // this.reimbursementService.findById(this.inputForm.id).then(({data}) => {
+          //   this.inputForm = this.recover(this.inputForm, data)
+          //   this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+          //   this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+          //   this.loading = false
+          // })
+        }
+      })
+    },
+    footerMethod({ columns, data }) {
+      const footerData = [
+        columns.map((column, columnIndex) => {
+          if (columnIndex === 0) {
+            return '总报销费用'
+          }
+          if (['number'].includes(column.property)) {
+            // eslint-disable-next-line no-undef
+            return XEUtils.sum(data, column.property)
+          }
+          return null
+        })
+      ]
+      return footerData
+    },
+    // 表单提交
+    doSubmit() {
+      this.getReimbursementData()
+      this.$refs['inputForm'].validate((valid) => {
+        if (valid) {
+          this.loading = true
+          if (this.$refs.uploadComponent.checkProgress()) {
+            this.loading = false
+            return
+          }
+          if (this.commonJS.isEmpty(this.inputForm.files)) {
+            this.inputForm.files = []
+          }
+          this.inputForm.files = this.$refs.uploadComponent.getDataList()
+          this.reimbursementApprovalTypeService.save(this.inputForm).then((data) => {
+            this.close()
+            this.$message.success(data)
+            this.$emit('refreshDataList')
+            this.loading = false
+          }).catch(() => {
+            this.loading = false
+          })
+        }
+      })
+    },
+    close() {
+      this.$refs.inputForm.resetFields()
+      this.inputForm.detailInfos = []
+      this.inputForm.detailInfoContracts = []
+      this.inputForm.detailInfoReports = []
+      this.inputForm.detailInfoOthers = []
+      this.inputForm.detailInfoProcured = []
+      this.inputForm.purchaseNo = ''
+      this.inputForm.preList = ''
+      this.inputForm.purchaseId = ''
+      this.inputForm.amountInfos = []
+      this.$refs.uploadComponent.clearUpload()
+      this.visible = false
+    },
+    // 删除
+    removeEvent(row, rowIndex, type) {
+      if (type === 'detail') {
+        this.$refs.detailTable.remove(row)
+        this.inputForm.detailInfos.splice(rowIndex, 1)
+      }
+      if (type === 'amount') {
+        this.$refs.amountTable.remove(row)
+        this.inputForm.amountInfos.splice(rowIndex, 1)
+      }
+    },
+    // 新增
+    async insertEvent(type) {
+      if (type === 'detail') {
+        await this.$refs.detailTable.insert().then((data) => {
+          this.inputForm.detailInfos.push(data)
+        })
+      }
+      if (type === 'amount') {
+        await this.$refs.amountTable.insert().then((data) => {
+          this.inputForm.amountInfos.push(data)
+        })
+      }
+    },
+    startPur(id) {
+      this.materialManagementService.findById(id).then((data) => {
+        this.inputForm.preList = data.detailInfos
+        this.inputForm.purchaseNo = data.purchaseNo
+        let i = this.inputForm.preList.length
+        for (let j = 0; j < i; j++) {
+          if (this.commonJS.isNotEmpty(this.inputForm.preList[j].tradePrice)) {
+            if (this.commonJS.isNotEmpty(this.inputForm.preList[j].tradeNumber)) {
+              this.inputForm.preList[j].priceSum = this.inputForm.preList[j].tradePrice * this.inputForm.preList[j].tradeNumber
+            }
+          }
+        }
+      })
+      this.$forceUpdate()
+    },
+    getPurChoose(row) {
+      this.inputForm.purchaseId = row.id
+      this.startPur(row.id)
+    },
+    footerMethod555({ columns, data }) {
+      const footerData = [
+        columns.map((column, columnIndex) => {
+          if (columnIndex === 0) {
+            return '商品总价'
+          }
+          if (['priceSum'].includes(column.property)) {
+            // eslint-disable-next-line no-undef
+            this.inputForm.tradeTotalPrice = XEUtils.sum(data, column.property)
+            return XEUtils.sum(data, column.property)
+          }
+          return null
+        })
+      ]
+      return footerData
+    },
+    seeFileInfo(index) {
+      if (this.commonJS.isEmpty(this.inputForm.preList[index].fileInfoLost)) {
+        this.inputForm.preList[index].fileInfoLost = []
+      }
+      this.$refs.materialManagementDialog.newUpload('view', this.inputForm.preList[index].fileInfoLost, null, null, null, null, null, false, index)
+    },
+    footerMethod1111({ columns, data }) {
+      const footerData = [
+        columns.map((column, columnIndex) => {
+          if (columnIndex === 0) {
+            return '汇总'
+          }
+          if (['amount'].includes(column.property)) {
+            // eslint-disable-next-line no-undef
+            return XEUtils.sum(data, column.property)
+          }
+          if (['taxAmount'].includes(column.property)) {
+            // eslint-disable-next-line no-undef
+            return XEUtils.sum(data, column.property)
+          }
+          if (['count'].includes(column.property)) {
+            // eslint-disable-next-line no-undef
+            return XEUtils.sum(data, column.property)
+          }
+          return null
+        })
+      ]
+      return footerData
+    },
+    handleExpand({ expanded, column, columnIndex, row, rowIndex }) {
+      if (this.commonJS.isEmpty(row.reimbursementType)) {
+        this.$message.error("请选择报销类型")
+        return false
+      }
+
+      if (expanded == true) {
+        setTimeout(() => {
+          if (row.reimbursementType == 1) {
+            this.$refs[row.uniqueId + "Upload"].clearUpload()
+            let files = JSON.parse(JSON.stringify(this.inputForm.invoiceReimbursementFiles))
+            this.$refs[row.uniqueId + "Upload"].newUpload(this.method, files, 'reimbursement', 300, '数电发票信息', null, null, null, '南京兴光培训咨询有限公司', row.uniqueId)
+            this.$refs[row.uniqueId + "Upload"].isConfirm = this.isConfirm
+          }
+          if (row.reimbursementType == 0) {
+            this.$refs[row.uniqueId + "UploadFiles"].clearUpload()
+            let files = JSON.parse(JSON.stringify(this.inputForm.files))
+            this.$refs[row.uniqueId + "UploadFiles"].newUpload(this.method, files, 'reimbursement', null, null, null, null, null, row.uniqueId)
+          }
+        }, 100)
+      }
+      else {
+        if (row.reimbursementType == 1) {
+          let files = this.$refs[row.uniqueId + "Upload"].getDataList()
+          this.inputForm.invoiceReimbursementFiles = this.inputForm.invoiceReimbursementFiles.filter(item => {
+            return item.remarks != row.uniqueId
+          })
+          this.inputForm.invoiceReimbursementFiles.push(...files)
+          this.$refs[row.uniqueId + "Upload"].clearUpload()
+        }
+        if (row.reimbursementType == 0) {
+          let files = this.$refs[row.uniqueId + "UploadFiles"].getDataList()
+          this.inputForm.files = this.inputForm.files.filter(item => {
+            return item.remarks != row.uniqueId
+          })
+          this.inputForm.files.push(...files)
+          this.$refs[row.uniqueId + "UploadFiles"].clearUpload()
+        }
+      }
+      return true
+    },
+    getReimbursementData() {
+      this.$nextTick(() => {
+        let inputForm = this.$refs.reimbursementComponent.handleGetData()
+        this.inputForm.detailInfos = inputForm.detailInfos
+        this.inputForm.detailInfoContracts = inputForm.detailInfoContracts
+        this.inputForm.detailInfoReports = inputForm.detailInfoReports
+        this.inputForm.detailInfoProject = inputForm.detailInfoProject
+        this.inputForm.detailInfoOthers = inputForm.detailInfoOthers
+        this.inputForm.detailInfoProcured = inputForm.detailInfoProcured
+        this.inputForm.invoiceReimbursementFiles = inputForm.invoiceReimbursementFiles
+      });
+    }
+  }
+}
+</script>
+<style scoped>
+.bold-red>>>.el-input__inner {
+  -webkit-text-fill-color: #ff0000 !important;
+  font-weight: bolder;
+  text-align: left;
+}
+</style>

File diff suppressed because it is too large
+ 1833 - 0
src/views/consultancy/reimbursement/info/NewInfoUpdateForm.vue


File diff suppressed because it is too large
+ 1793 - 0
src/views/consultancy/reimbursement/info/NewReimbursementFileSupplementForm.vue


File diff suppressed because it is too large
+ 1966 - 0
src/views/consultancy/reimbursement/info/NewReimbursementForm.vue


File diff suppressed because it is too large
+ 1026 - 912
src/views/cw/reimbursementApproval/info/InfoList.vue


+ 528 - 0
src/views/cw/reimbursementApproval/info/NewInfoForm.vue

@@ -0,0 +1,528 @@
+<template>
+	<div>
+		<el-dialog :title="title" :close-on-click-modal="false" draggable width="1200px" @close="close" append-to-body
+			@keyup.enter.native="doSubmit" v-model="visible">
+			<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method === 'view' ? 'readonly' : ''"
+				:disabled="method === 'view'" label-width="100px" @submit.native.prevent>
+
+				<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+				<el-row>
+					<el-col :span="12">
+						<el-form-item hidden label="报销项" prop="reimbursementType"
+							:disabled="status === 'audit' || status === 'taskFormDetail'" :rules="[
+								{ required: true, message: '报销项不能为空', trigger: 'blur' }
+							]">
+							<el-radio v-model="inputForm.reimbursementType"
+								v-for="item in $dictUtils.getDictList('reimbursement_type')" :label="item.value"
+								style="margin-right: 20px">
+								{{ item.label }}</el-radio>
+						</el-form-item>
+					</el-col>
+				</el-row>
+				<el-row :gutter="26">
+					<el-col :span="12">
+						<el-form-item label="经办人" prop="userName">
+							<el-input v-model="inputForm.userName" :disabled="true"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="报销编号" prop="no">
+							<el-input v-model="inputForm.no" :disabled="true"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="所属部门" prop="departmentName">
+							<el-input v-model="inputForm.departmentName" :disabled="true"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="报销日期" prop="reimDate">
+							<el-date-picker v-model="inputForm.reimDate" type="date" value-format="yyyy-MM-dd"
+								style="width: 100%" placeholder="选择日期">
+							</el-date-picker>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="报销类型" prop="sourceType">
+							<el-select v-model="inputForm.sourceType" placeholder="请选择报销类型" style="width:100%;">
+								<el-option v-for="item in $dictUtils.getDictList('cw_reimbursement_source_type')"
+									:key="item.value" :label="item.label" :value="item.value">
+								</el-option>
+							</el-select>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item v-if="hasPermission('cw:user:payment')" label="是否付款" prop="paymentStatus">
+							<el-input v-if="inputForm.paymentStatus === '1'" :disabled="true" v-model='payment'
+								class="bold-red"></el-input>
+							<el-input v-else v-model='payment' :disabled="true"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12" v-if="inputForm.sourceType === '5'">
+						<el-form-item label="采购编号" prop="purchaseNo" :rules="[{ required: true, message: '采购编号不能为空', trigger: 'blur' },
+						{ required: true, message: '采购编号不能为空', trigger: 'change' }]">
+							<el-input :readonly="true" @focus="openPurForm()" v-model="inputForm.purchaseNo"
+								placeholder="请选择采购编号">
+								<el-button slot="append" icon="el-icon-search" @click="openPurForm()"></el-button>
+							</el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="24">
+						<el-form-item label="备注" prop="remarks">
+							<el-input v-model="inputForm.remarks" type="textarea" :rows="5" maxlength="500"
+								placeholder="请输入简介" show-word-limit>
+							</el-input>
+						</el-form-item>
+					</el-col>
+				</el-row>
+				<ReimbursementComponent ref="reimbursementComponent">
+				</ReimbursementComponent>
+				<div v-if="inputForm.reimbursementType === '0'">
+					<el-divider content-position="left"><i class="el-icon-document"></i>
+						专用发票信息
+						<el-button style="margin-left: 20px" type="primary" size="small" :disabled="method === 'view'"
+							@click="insertEvent('amount')" plain>
+							新增
+						</el-button>
+					</el-divider>
+					<el-row :gutter="15">
+						<el-col :span="24">
+							<vxe-table border show-overflow ref="amountTable" class="vxe-table-element"
+								:data="inputForm.amountInfos" style="margin-left: 5em" keep-source highlight-current-row
+								:edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, autoClear: true }">
+								<vxe-table-column field="code" title="发票代码" :edit-render="{}" show-overflow="title">
+									<template #default="scope">
+										<el-input v-model="scope.row.code"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="number" title="发票号" :edit-render="{}" show-overflow="title">
+									<template #default="scope">
+										<el-input v-model="scope.row.number"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="amount" title="金额" :edit-render="{}" show-overflow="title">
+									<template #default="scope">
+										<el-input v-model="scope.row.amount"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="taxAmount" title="税额" :edit-render="{}" show-overflow="title">
+									<template #default="scope">
+										<el-input v-model="scope.row.taxAmount"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column field="count" title="价税合计" :edit-render="{}" show-overflow="title">
+									<template #default="scope">
+										<el-input v-model="scope.row.count"></el-input>
+									</template>
+								</vxe-table-column>
+								<vxe-table-column title="操作" width="100">
+									<template #default="scope">
+										<el-button type="danger"
+											@click="removeEvent(scope.row, scope.$rowIndex, 'amount')">删除</el-button>
+									</template>
+								</vxe-table-column>
+							</vxe-table>
+						</el-col>
+					</el-row>
+				</div>
+
+
+			</el-form>
+			<!-- 附件 -->
+			<!-- <InvoiceReimbursementUpLoadComponent ref="invoiceReimbursementUpLoadComponent"
+				v-show="'1' === this.inputForm.reimbursementType"></InvoiceReimbursementUpLoadComponent>
+			<UpLoadComponent ref="uploadComponent"></UpLoadComponent> -->
+			<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+			<template #footer>
+				<span class="dialog-footer">
+					<el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+					<el-button type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check"
+						v-noMoreClick>确定</el-button>
+				</span>
+			</template>
+			<!--      <MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>-->
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+import ReimbursementApprovalService from '@/api/cw/reimbursementApproval/ReimbursementApprovalService'
+import UpLoadComponent from '@/views/common/UpLoadComponent'
+import InvoiceReimbursementUpLoadComponent from '@/views/common/NewDigitalInvoiceUploadComponent'
+import XEUtils from 'xe-utils'
+import ReimbursementComponent from '@/views/common/reimbursement/ReimbursementComponent.vue'
+// import MaterialManagementService from '@/api/materialManagement/MaterialManagementService'
+// import MaterialManagementDialog from '../../../materialManagement/file/MaterialManagementDialog'
+export default {
+	data() {
+		return {
+			title: '',
+			method: '',
+			visible: false,
+			loading: false,
+			humanKeyProcured: '',
+			inputForm: {
+				reimbursementType: '0',
+				userName: '',
+				no: '',
+				department: '',
+				reimDate: '',
+				remarks: '',
+				detailInfos: [],
+				detailInfoContracts: [],
+				detailInfoReports: [],
+				detailInfoOthers: [],
+				detailInfoProcured: [],
+				humanInfoProcured: [],
+				invoiceReimbursements: [],
+				invoiceReimbursementFiles: [], // 电子发票附件信息
+				amountInfos: [],
+				files: [], // 附件信息
+				sourceType: '',
+				preList: [],
+				purchaseNo: '',
+				tradeTotalPrice: '',
+				purchaseId: '',
+				procDefId: '',
+				procDefKey: '',
+				formTitle: '',
+				departmentName: '',
+				paymentStatus: ''
+			},
+			payment: ''
+		}
+	},
+	reimbursementApprovalService: null,
+	// materialManagementService: null,
+	created() {
+		this.reimbursementApprovalService = new ReimbursementApprovalService()
+		// this.materialManagementService = new MaterialManagementService()
+	},
+	components: {
+		InvoiceReimbursementUpLoadComponent,
+		UpLoadComponent,
+		ReimbursementComponent,
+		// MaterialManagementDialog
+	},
+	methods: {
+		initReimbursementComponent() {
+			this.$refs.reimbursementComponent.initComponent("reimbursement", "cw", "江苏兴光会计师事务所有限责任公司", this.inputForm, this.isConfirm, this.status)
+		},
+		init(method, id) {
+			this.method = method
+			this.inputForm = {
+				reimbursementType: '0',
+				userName: '',
+				no: '',
+				department: '',
+				reimDate: '',
+				remarks: '',
+				detailInfos: [],
+				amountInfos: [],
+				invoiceReimbursements: [],
+				invoiceReimbursementFiles: [], // 电子发票附件信息
+				files: [], // 附件信息
+				detailInfoContracts: [],
+				detailInfoReports: [],
+				detailInfoOthers: [],
+				detailInfoProcured: [],
+				humanInfoProcured: [],
+				sourceType: '',
+				preList: [],
+				purchaseNo: '',
+				tradeTotalPrice: '',
+				purchaseId: '',
+				departmentName: '',
+				paymentStatus: ''
+			}
+			if (method === 'add') {
+				this.title = `新建报销`
+			} else if (method === 'edit') {
+				this.inputForm.id = id
+				this.title = '报销修改'
+			} else if (method === 'view') {
+				this.inputForm.id = id
+				this.title = '报销详情'
+			} else if (method === 'addChild') {
+				this.title = '添加下级结构'
+				this.inputForm.parentId = id
+			}
+			this.visible = true
+			this.loading = false
+			this.$nextTick(() => {
+				if (method === 'edit' || method === 'view') { // 修改或者查看
+					this.loading = true
+					this.$refs.inputForm.resetFields()
+					this.reimbursementApprovalService.findById(this.inputForm.id).then((data) => {
+						console.log('data', data)
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						this.$refs.uploadComponent.clearUpload()
+						// this.$refs.invoiceReimbursementUpLoadComponent.clearUpload()
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							method = 'view'
+						}
+						if (this.commonJS.isEmpty(this.inputForm.department)) {
+							this.inputForm.department = this.$store.state.user.office.id
+							this.inputForm.departmentName = this.$store.state.user.office.name
+						}
+						if (this.commonJS.isEmpty(this.inputForm.userId)) {
+							this.inputForm.userId = this.$store.state.user.id
+						}
+						if (this.commonJS.isEmpty(this.inputForm.userName)) {
+							this.inputForm.userName = this.$store.state.user.name
+						}
+						if (this.commonJS.isEmpty(this.inputForm.reimDate)) {
+							this.inputForm.reimDate = new Date()
+						}
+						if (this.commonJS.isEmpty(this.inputForm.invoiceReimbursementFiles)) {
+							this.inputForm.invoiceReimbursementFiles = []
+						}
+						if (this.commonJS.isEmpty(this.inputForm.files)) {
+							this.inputForm.files = []
+						}
+						if (this.commonJS.isEmpty(this.inputForm.reimbursementType)) {
+							this.inputForm.reimbursementType = '0'
+						}
+						if (this.commonJS.isNotEmpty(this.inputForm.paymentStatus) && this.inputForm.paymentStatus === '1') {
+							this.payment = '已付款'
+						} else {
+							this.payment = '未付款'
+						}
+						// this.$refs.invoiceReimbursementUpLoadComponent.newUpload(method, this.inputForm.invoiceReimbursementFiles, 'reimbursement', 300, '数电发票信息', null, null, null, '江苏兴光会计师事务所有限责任公司')
+						this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+						if (this.commonJS.isNotEmpty(this.inputForm.purchaseId)) {
+							this.startPur(this.inputForm.purchaseId)
+						}
+						this.loading = false
+						this.initReimbursementComponent()
+					})
+				}
+			})
+		},
+		footerMethod({ columns, data }) {
+			const footerData = [
+				columns.map((column, columnIndex) => {
+					if (columnIndex === 0) {
+						return '总报销费用'
+					}
+					if (['number'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					return null
+				})
+			]
+			return footerData
+		},
+		// 表单提交
+		doSubmit() {
+			this.getReimbursementData()
+			this.$refs['inputForm'].validate((valid) => {
+				if (valid) {
+					this.loading = true
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					if (this.commonJS.isEmpty(this.inputForm.files)) {
+						this.inputForm.files = []
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					this.reimbursementApprovalTypeService.save(this.inputForm).then((data) => {
+						this.close()
+						this.$message.success(data)
+						this.$emit('refreshDataList')
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+				}
+			})
+		},
+		close() {
+			this.$refs.inputForm.resetFields()
+			this.inputForm.detailInfos = []
+			this.inputForm.detailInfoContracts = []
+			this.inputForm.detailInfoReports = []
+			this.inputForm.detailInfoOthers = []
+			this.inputForm.detailInfoProcured = []
+			humanInfoProcured: [],
+				this.inputForm.purchaseNo = ''
+			this.inputForm.preList = ''
+			this.inputForm.purchaseId = ''
+			this.inputForm.amountInfos = []
+			this.$refs.uploadComponent.clearUpload()
+			this.visible = false
+		},
+		// 删除
+		removeEvent(row, rowIndex, type) {
+			this.handleTableInfo(this.inputForm.sourceType)
+			if (row.reimbursementType == 1) {
+				this.inputForm.invoiceReimbursementFiles = this.inputForm.invoiceReimbursementFiles.filter(item => item.remarks != row.uniqueId)
+			}
+			if (row.reimbursementType == 0) {
+				this.inputForm.files = this.inputForm.files.filter(item => item.remarks != row.uniqueId)
+			}
+
+			if (type === 'detail') {
+				this.$refs.detailTable.remove(row)
+				this.inputForm.detailInfos.splice(rowIndex, 1)
+			}
+			if (type === 'amount') {
+				this.$refs.amountTable.remove(row)
+				this.inputForm.amountInfos.splice(rowIndex, 1)
+			}
+		},
+		generateRandomId() {
+			let id = '';
+			for (let i = 0; i < 16; i++) {
+				id += Math.floor(Math.random() * 10); // 生成 0-9 的随机数
+			}
+			return id;
+		},
+		// 新增
+		async insertEvent(type) {
+			if (type === 'detail') {
+				await this.$refs.detailTable.insert().then((data) => {
+					data.uniqueId = this.generateRandomId();
+					this.inputForm.detailInfos.push(data)
+				})
+			}
+			if (type === 'amount') {
+				await this.$refs.amountTable.insert().then((data) => {
+					data.uniqueId = this.generateRandomId();
+					this.inputForm.amountInfos.push(data)
+				})
+			}
+		},
+		startPur(id) {
+			// this.materialManagementService.findById(id).then((data) => {
+			//   this.inputForm.preList = data.detailInfos
+			//   this.inputForm.purchaseNo = data.purchaseNo
+			//   let i = this.inputForm.preList.length
+			//   for (let j = 0; j < i; j++) {
+			//     if (this.commonJS.isNotEmpty(this.inputForm.preList[j].tradePrice)) {
+			//       if (this.commonJS.isNotEmpty(this.inputForm.preList[j].tradeNumber)) {
+			//         this.inputForm.preList[j].priceSum = this.inputForm.preList[j].tradePrice * this.inputForm.preList[j].tradeNumber
+			//       }
+			//     }
+			//   }
+			// })
+			this.$forceUpdate()
+		},
+		getPurChoose(row) {
+			this.inputForm.purchaseId = row.id
+			this.startPur(row.id)
+		},
+		footerMethod555({ columns, data }) {
+			const footerData = [
+				columns.map((column, columnIndex) => {
+					if (columnIndex === 0) {
+						return '商品总价'
+					}
+					if (['priceSum'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						this.inputForm.tradeTotalPrice = XEUtils.sum(data, column.property)
+						return XEUtils.sum(data, column.property)
+					}
+					return null
+				})
+			]
+			return footerData
+		},
+		seeFileInfo(index) {
+			if (this.commonJS.isEmpty(this.inputForm.preList[index].fileInfoLost)) {
+				this.inputForm.preList[index].fileInfoLost = []
+			}
+			// this.$refs.materialManagementDialog.newUpload('view', this.inputForm.preList[index].fileInfoLost, null, null, null, null, null, false, index)
+		},
+		footerMethod1111({ columns, data }) {
+			const footerData = [
+				columns.map((column, columnIndex) => {
+					if (columnIndex === 0) {
+						return '汇总'
+					}
+					if (['amount'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					if (['taxAmount'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					if (['count'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						return XEUtils.sum(data, column.property)
+					}
+					return null
+				})
+			]
+			return footerData
+		},
+		handleExpand({ expanded, column, columnIndex, row, rowIndex }) {
+			if (this.commonJS.isEmpty(row.reimbursementType)) {
+				this.$message.error("请选择报销类型")
+				return false
+			}
+
+			if (expanded == true) {
+				setTimeout(() => {
+					if (row.reimbursementType == 1) {
+						this.$refs[row.uniqueId + "Upload"].clearUpload()
+						let files = JSON.parse(JSON.stringify(this.inputForm.invoiceReimbursementFiles))
+						this.$refs[row.uniqueId + "Upload"].newUpload(this.method, files, 'reimbursement', 300, '数电发票信息', null, null, null, '江苏兴光会计师事务所有限责任公司', row.uniqueId)
+						this.$refs[row.uniqueId + "Upload"].isConfirm = this.isConfirm
+					}
+					if (row.reimbursementType == 0) {
+						this.$refs[row.uniqueId + "UploadFiles"].clearUpload()
+						let files = JSON.parse(JSON.stringify(this.inputForm.files))
+						this.$refs[row.uniqueId + "UploadFiles"].newUpload(this.method, files, 'reimbursement', null, null, null, null, null, row.uniqueId)
+					}
+				}, 100)
+			}
+			else {
+				if (row.reimbursementType == 1) {
+					let files = this.$refs[row.uniqueId + "Upload"].getDataList()
+					this.inputForm.invoiceReimbursementFiles = this.inputForm.invoiceReimbursementFiles.filter(item => {
+						return item.remarks != row.uniqueId
+					})
+					this.inputForm.invoiceReimbursementFiles.push(...files)
+					this.$refs[row.uniqueId + "Upload"].clearUpload()
+				}
+				if (row.reimbursementType == 0) {
+					let files = this.$refs[row.uniqueId + "UploadFiles"].getDataList()
+					this.inputForm.files = this.inputForm.files.filter(item => {
+						return item.remarks != row.uniqueId
+					})
+					this.inputForm.files.push(...files)
+					this.$refs[row.uniqueId + "UploadFiles"].clearUpload()
+				}
+			}
+
+			return true
+
+		},
+		getReimbursementData() {
+			this.$nextTick(() => {
+				let inputForm = this.$refs.reimbursementComponent.handleGetData()
+				this.inputForm.detailInfos = inputForm.detailInfos
+				this.inputForm.detailInfoContracts = inputForm.detailInfoContracts
+				this.inputForm.detailInfoReports = inputForm.detailInfoReports
+				this.inputForm.detailInfoProject = inputForm.detailInfoProject
+				this.inputForm.detailInfoOthers = inputForm.detailInfoOthers
+				this.inputForm.detailInfoProcured = inputForm.detailInfoProcured
+				this.inputForm.invoiceReimbursementFiles = inputForm.invoiceReimbursementFiles
+			});
+		}
+	}
+}
+</script>
+<style scoped>
+.bold-red>>>.el-input__inner {
+	-webkit-text-fill-color: #ff0000 !important;
+	font-weight: bolder;
+	text-align: left;
+}
+</style>

File diff suppressed because it is too large
+ 2079 - 0
src/views/cw/reimbursementApproval/info/NewInfoUpdateForm.vue


File diff suppressed because it is too large
+ 1976 - 0
src/views/cw/reimbursementApproval/info/NewReimbursementFileSupplementForm.vue


File diff suppressed because it is too large
+ 3045 - 0
src/views/cw/reimbursementApproval/info/NewReimbursementForm.vue


+ 144 - 1
src/views/dashboard/widgets/components/TodoList.vue

@@ -243,7 +243,31 @@ export default {
 					procDefKey: row.task.processDefKey,
 					status: row.status,
 				})
-				.then((data) => {
+				.then(async (data) => {
+					// 如果是需要处理的流程
+					if (this.isReimbursementProcess(data.procDefKey)) {
+						// 根据流程名称获取对应的表单地址
+						let urlObj = this.isReimbursementUrl(row.processDefinitionName)
+						if (urlObj) {
+							let approvalTime = null
+							// 判断是否为文件补充流程和报销流程
+							if (urlObj.type && urlObj.type === 'file') {
+								approvalTime = await taskService.getCreateTimeByProcInsId(row.task.processInstanceId)
+							} else {
+								approvalTime = await taskService.getApprovalTimeByProcInsId(row.task.processInstanceId)
+
+							}
+							if (approvalTime) {
+								// 根据发起审批的时间判断是否为新版本报销页面
+								let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
+								const compareResult = this.validateXG.compareDate(approvalTime, newStartDate);
+								const newVersionFlag = compareResult == 'same' || compareResult == 'after';
+								if (newVersionFlag) {
+									data.formUrl = urlObj.url
+								}
+							}
+						}
+					}
 					var cs = "cs"
 					this.$router.push({
 						path: "/flowable/task/TaskForm",
@@ -272,6 +296,125 @@ export default {
 					});
 				});
 		},
+		isReimbursementProcess(procDefKey) {
+			const reimbursementProcesses = [
+				"Process_1669271524486",
+				"Process_1669271524487",
+				"Process_1704851888818",
+				"Process_1705370333755",
+				"Process_1705389994103",
+				"Process_1705390592348",
+				"Process_1673924346231",
+				"Process_1673924346232",
+				"Process_1705391439287",
+				"Process_1705391725816",
+				"Process_1665383385070",
+				"Process_1665383385071",
+				"Process_1705454007925",
+				"Process_1705454863808",
+				"Process_1706170102059",
+				"Process_1706175399469",
+				"Process_1706176397312",
+				"Process_1706176937876",
+				"Process_1706671221048",
+				"Process_1706679472488",
+				"Process_1706680073642",
+				"Process_1706680331785",
+				"Process_1706680660857",
+				"Process_1709102298565",
+				"Process_1709104787957",
+				"Process_1711418224962",
+				"Process_1722305645394",
+				"Process_1722412442950",
+				"Process_1722416114655",
+				"Process_1722404901733",
+				"Process_1722389642543"
+			];
+			return reimbursementProcesses.includes(procDefKey);
+		},
+		isReimbursementUrl(name) {
+			// 会计-文件补充
+			let cwFile = ["会计-报销文件补充"]
+			//项目-报销文件补充
+			let ccpmFile = ["项目-报销文件补充"]
+			//咨询-报销文件补充
+			let zxFile = ["咨询-报销文件补充"]
+			//中审-文件补充
+			let zsFile = ["中审-报销文件补充"]
+			//评估-文件补充
+			let pgFile = ["评估-报销文件补充"]
+			// 会计
+			let cw = ["会计-所长报销", "会计-所长报销-电子发票", "会计-总经办报销", "盛所会计-报销申请", "会计-报销审批", "会计-报销审批-电子发票"]
+			// 中审
+			let zs = ["中审-所长报销", "中审-所长报销-电子发票", "中审-总经办报销", "中审-报销审批", "中审-报销审批-电子发票"]
+			// 评估
+			let pg = ["评估-总经办报销", "评估-所长报销", "评估-所长报销-电子发票", "评估-报销申请", "评估-报销审批-电子发票"]
+			// 项目
+			let ccpm = ["物资-项目报销", "项目-总经办报销", "项目-报销审批", "项目-报销审批-电子发票", "盛所项目-报销申请",]
+			// 咨询
+			let zx = ["咨询-总经办报销", "咨询-所长报销", "咨询-所长报销-电子发票", "咨询-报销审批", "咨询-报销审批-电子发票"]
+			if (cw.includes(name)) {
+				return {
+					url: '/cw/reimbursementApproval/info/NewReimbursementForm',
+					type: 'reimbursement'
+				}
+			}
+			if (zs.includes(name)) {
+				return {
+					url: '/zs/reimbursement/info/NewReimbursementForm',
+					type: 'reimbursement'
+				}
+			}
+			if (pg.includes(name)) {
+				return {
+					url: '/reimbursement/info/NewReimbursementForm',
+					type: 'reimbursement'
+				}
+			}
+			if (ccpm.includes(name)) {
+				return {
+					url: '/ccpm/reimbursement/info/NewReimbursementForm',
+					type: 'reimbursement'
+				}
+			}
+			if (zx.includes(name)) {
+				return {
+					url: '/consultancy/reimbursement/info/NewReimbursementForm',
+					type: 'reimbursement'
+				}
+			}
+			if (cwFile.includes(name)) {
+				return {
+					url: "/cw/reimbursementApproval/info/NewReimbursementFileSupplementForm",
+					type: 'file'
+				}
+			}
+			if (ccpmFile.includes(name)) {
+				return {
+					url: "/ccpm/reimbursement/info/NewReimbursementFileSupplementForm",
+					type: 'file'
+				}
+			}
+			if (zxFile.includes(name)) {
+				return {
+					url: "/consultancy/reimbursement/info/NewReimbursementFileSupplementForm",
+					type: 'file'
+				}
+			}
+			if (zsFile.includes(name)) {
+				return {
+					url: "/zs/reimbursement/info/NewReimbursementFileSupplementForm",
+					type: 'file'
+				}
+			}
+			if (pgFile.includes(name)) {
+				return {
+					url: "/reimbursement/info/NewReimbursementFileSupplementForm",
+					type: 'file'
+				}
+			}
+			return null;
+		},
 		toPendingList() {
 			// this.$router.push('./PendingList')
 			this.$router.push({

+ 173 - 1
src/views/home/components/TodoList2.vue

@@ -57,6 +57,7 @@
 import pick from "lodash.pick";
 import UserSelect from "@/components/userSelect/UserSelectDialog";
 import taskService from "@/api/flowable/taskService";
+import formService from "@/api/flowable/formService";
 import userService from "@/api/sys/UserService";
 import UpdatePassword from "@/views/layout/UpdatePassword2.vue";
 export default {
@@ -170,7 +171,32 @@ export default {
 					procDefKey: row.task.processDefKey,
 					status: row.status,
 				})
-				.then((data) => {
+				.then(async (data) => {
+					// 如果是需要处理的流程
+					if (this.isReimbursementProcess(data.procDefKey)) {
+						// 根据流程名称获取对应的表单地址
+						let urlObj = this.isReimbursementUrl(row.processDefinitionName)
+						if (urlObj) {
+							let approvalTime = null
+							// 判断是否为文件补充流程和报销流程
+							if (urlObj.type && urlObj.type === 'file') {
+								approvalTime = await taskService.getCreateTimeByProcInsId(row.task.processInstanceId)
+							} else {
+								approvalTime = await taskService.getApprovalTimeByProcInsId(row.task.processInstanceId)
+
+							}
+							if (approvalTime) {
+								// 根据发起审批的时间判断是否为新版本报销页面
+								let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
+								const compareResult = this.validateXG.compareDate(approvalTime, newStartDate);
+								const newVersionFlag = compareResult == 'same' || compareResult == 'after';
+								if (newVersionFlag) {
+									data.formUrl = urlObj.url
+								}
+							}
+						}
+					}
+					// 读取流程表单
 					var cs = "cs2"
 					this.$router.push({
 						path: "/flowable/task/TaskForm",
@@ -199,6 +225,152 @@ export default {
 					});
 				});
 		},
+		// 判断是否为报销流程
+		// Process_1669271524486 会计-报销审批
+		// Process_1669271524487 会计-报销审批-电子发票
+		// Process_1704851888818 会计-所长报销1
+		// Process_1705370333755 会计-所长报销-电子发票1
+		// Process_1705389994103 中审-所长报销1
+		// Process_1705390592348 中审-所长报销-电子发票1
+		// Process_1673924346231 中审-报销审批1
+		// Process_1673924346232 中审-报销审批-电子发票1
+		// Process_1705391439287 评估-所长报销1
+		// Process_1705391725816 评估-所长报销-电子发票1
+		// Process_1665383385070 评估-报销申请1
+		// Process_1665383385071 评估-报销申请-电子发票1
+		// Process_1705454007925 项目-报销审批1
+		// Process_1705454863808 项目-报销审批-电子发票1
+		// Process_1706170102059 会计-总经办报销1
+		// Process_1706175399469 评估-总经办报销1
+		// Process_1706176397312 中审-总经办报销1
+		// Process_1706176937876 项目-总经办报销1
+		// Process_1706671221048 咨询-报销审批1
+		// Process_1706679472488 咨询-报销审批-电子发票1
+		// Process_1706680073642 咨询-总经办报销1
+		// Process_1706680331785 咨询-所长报销1
+		// Process_1706680660857 咨询-所长报销-电子发票1
+		// Process_1709102298565 盛所会计-报销申请1
+		// Process_1709104787957 盛所项目-报销申请1
+		// Process_1711418224962 物资-项目报销1
+		isReimbursementProcess(procDefKey) {
+			const reimbursementProcesses = [
+				"Process_1669271524486",
+				"Process_1669271524487",
+				"Process_1704851888818",
+				"Process_1705370333755",
+				"Process_1705389994103",
+				"Process_1705390592348",
+				"Process_1673924346231",
+				"Process_1673924346232",
+				"Process_1705391439287",
+				"Process_1705391725816",
+				"Process_1665383385070",
+				"Process_1665383385071",
+				"Process_1705454007925",
+				"Process_1705454863808",
+				"Process_1706170102059",
+				"Process_1706175399469",
+				"Process_1706176397312",
+				"Process_1706176937876",
+				"Process_1706671221048",
+				"Process_1706679472488",
+				"Process_1706680073642",
+				"Process_1706680331785",
+				"Process_1706680660857",
+				"Process_1709102298565",
+				"Process_1709104787957",
+				"Process_1711418224962",
+				"Process_1722305645394",
+				"Process_1722412442950",
+				"Process_1722416114655",
+				"Process_1722404901733",
+				"Process_1722389642543"
+			];
+			return reimbursementProcesses.includes(procDefKey);
+		},
+		isReimbursementUrl(name) {
+			// 会计-文件补充
+			let cwFile = ["会计-报销文件补充"]
+			//项目-报销文件补充
+			let ccpmFile = ["项目-报销文件补充"]
+			//咨询-报销文件补充
+			let zxFile = ["咨询-报销文件补充"]
+			//中审-文件补充
+			let zsFile = ["中审-报销文件补充"]
+			//评估-文件补充
+			let pgFile = ["评估-报销文件补充"]
+			// 会计
+			let cw = ["会计-所长报销", "会计-所长报销-电子发票", "会计-总经办报销", "盛所会计-报销申请", "会计-报销审批", "会计-报销审批-电子发票"]
+			// 中审
+			let zs = ["中审-所长报销", "中审-所长报销-电子发票", "中审-总经办报销", "中审-报销审批", "中审-报销审批-电子发票"]
+			// 评估
+			let pg = ["评估-总经办报销", "评估-所长报销", "评估-所长报销-电子发票", "评估-报销申请", "评估-报销审批-电子发票"]
+			// 项目
+			let ccpm = ["物资-项目报销", "项目-总经办报销", "项目-报销审批", "项目-报销审批-电子发票", "盛所项目-报销申请",]
+			// 咨询
+			let zx = ["咨询-总经办报销", "咨询-所长报销", "咨询-所长报销-电子发票", "咨询-报销审批", "咨询-报销审批-电子发票"]
+			if (cw.includes(name)) {
+				return {
+					url: '/cw/reimbursementApproval/info/NewReimbursementForm',
+					type: 'reimbursement'
+				}
+			}
+			if (zs.includes(name)) {
+				return {
+					url: '/zs/reimbursement/info/NewReimbursementForm',
+					type: 'reimbursement'
+				}
+			}
+			if (pg.includes(name)) {
+				return {
+					url: '/reimbursement/info/NewReimbursementForm',
+					type: 'reimbursement'
+				}
+			}
+			if (ccpm.includes(name)) {
+				return {
+					url: '/ccpm/reimbursement/info/NewReimbursementForm',
+					type: 'reimbursement'
+				}
+			}
+			if (zx.includes(name)) {
+				return {
+					url: '/consultancy/reimbursement/info/NewReimbursementForm',
+					type: 'reimbursement'
+				}
+			}
+			if (cwFile.includes(name)) {
+				return {
+					url: "/cw/reimbursementApproval/info/NewReimbursementFileSupplementForm",
+					type: 'file'
+				}
+			}
+			if (ccpmFile.includes(name)) {
+				return {
+					url: "/ccpm/reimbursement/info/NewReimbursementFileSupplementForm",
+					type: 'file'
+				}
+			}
+			if (zxFile.includes(name)) {
+				return {
+					url: "/consultancy/reimbursement/info/NewReimbursementFileSupplementForm",
+					type: 'file'
+				}
+			}
+			if (zsFile.includes(name)) {
+				return {
+					url: "/zs/reimbursement/info/NewReimbursementFileSupplementForm",
+					type: 'file'
+				}
+			}
+			if (pgFile.includes(name)) {
+				return {
+					url: "/reimbursement/info/NewReimbursementFileSupplementForm",
+					type: 'file'
+				}
+			}
+			return null;
+		},
 		toPendingList() {
 			// this.$router.push('./PendingList')
 			this.$router.push({

File diff suppressed because it is too large
+ 1041 - 946
src/views/reimbursement/info/InfoList.vue


File diff suppressed because it is too large
+ 1927 - 0
src/views/reimbursement/info/NewInfoUpdateForm.vue


File diff suppressed because it is too large
+ 1874 - 0
src/views/reimbursement/info/NewReimbursementFileSupplementForm.vue


File diff suppressed because it is too large
+ 2617 - 0
src/views/reimbursement/info/NewReimbursementForm.vue


+ 114 - 15
src/views/zs/reimbursement/info/InfoList.vue

@@ -75,8 +75,8 @@
 					value: 'id',             // ID字段名
 					label: 'name',         // 显示名称
 					children: 'children'    // 子级字段名
-				}" url="/public-modules-server/reimbursementApproval/type/treeData1?type=last"
-					:value="searchForm.remiType" :clearable="true" size="default" :accordion="true"
+				}" url="/public-modules-server/reimbursementApproval/type/treeData1?type=last" :value="searchForm.remiType"
+					:clearable="true" size="default" :accordion="true"
 					@getValue="(value, label) => { searchForm.remiType = label }" />
 			</el-form-item>
 			<el-form-item v-if="showHideItem" label="报销金额" prop="amounts">
@@ -134,10 +134,10 @@
 					<vxe-column width="130" title="报销编号" field="no" align="center">
 						<template #default="scope">
 							<el-link type="primary" :underline="false" v-if="hasPermission('zsReimbursement:info:view')"
-								@click="view(scope.row.id)">{{ scope.row.no }}</el-link>
+								@click="view(scope.row)">{{ scope.row.no }}</el-link>
 							<el-link type="primary" :underline="false"
-								v-else-if="hasPermission('zsReimbursement:info:view')"
-								@click="view(scope.row.id)">{{ scope.row.no }}</el-link>
+								v-else-if="hasPermission('zsReimbursement:info:view')" @click="view(scope.row)">{{
+									scope.row.no }}</el-link>
 							<span v-else>{{ scope.row.no }}</span>
 						</template>
 					</vxe-column>
@@ -158,11 +158,11 @@
 							<el-link type="primary" :underline="false"
 								v-if="hasPermission('cw:reimbursement:info:view') && scope.row.projectId != undefined"
 								@click="viewProject(scope.row.projectId)">{{ scope.row.sourceType === '2' ? '' :
-									scope.row.projectName}}</el-link>
+									scope.row.projectName }}</el-link>
 							<el-link type="primary" :underline="false"
 								v-else-if="hasPermission('cw:reimbursement:info:view') && scope.row.projectId != undefined"
 								@click="viewProject(scope.row.projectId)">{{ scope.row.sourceType === '2' ? '' :
-									scope.row.projectName}}</el-link>
+									scope.row.projectName }}</el-link>
 							<span v-else>{{ scope.row.sourceType === '2' ? '' : scope.row.projectName }}</span>
 						</template>
 					</vxe-column>
@@ -171,7 +171,7 @@
 							<el-link type="primary" :underline="false"
 								v-if="hasPermission('cw:reimbursement:info:view') && scope.row.projectId != undefined"
 								@click="viewContract(scope.row.projectId)">{{ scope.row.sourceType === '2' ?
-									scope.row.projectName : ''}}</el-link>
+									scope.row.projectName : '' }}</el-link>
 							<span v-else>{{ scope.row.sourceType === '2' ? scope.row.projectName : '' }}</span>
 						</template>
 					</vxe-column>
@@ -187,12 +187,17 @@
 					<vxe-column width="100" title="报销人" field="name" align="center"></vxe-column>
 					<vxe-column width="100" title="报销部门" field="deptName" align="center"></vxe-column>
 					<vxe-column width="100" title="报销日期" field="approvalTime" align="center"></vxe-column>
-					<vxe-column width="120" title="报销金额(元)" field="number" fixed="right" align="center"></vxe-column>
+					<vxe-column width="120" title="报销金额(元)" field="number" fixed="right" align="center">
+						<template #default="scope">
+							<span v-if="isNewVersion(scope.row)">{{ scope.row.numberCount }}</span>
+							<span v-else>{{ scope.row.number }}</span>
+						</template>
+					</vxe-column>
 					<vxe-column width="100" title="状态" fixed="right" align="center" field="type">
 						<template #default="scope">
 							<el-button @click="detail(scope.row)"
-								:type="$dictUtils.getDictLabel('status_info', scope.row.type, '')"
-								effect="dark">{{ $dictUtils.getDictLabel("status", scope.row.type, '未开始') }} </el-button>
+								:type="$dictUtils.getDictLabel('status_info', scope.row.type, '')" effect="dark">{{
+									$dictUtils.getDictLabel("status", scope.row.type, '未开始') }} </el-button>
 						</template>
 					</vxe-column>
 					<vxe-column v-if="hasPermission('zs:user:payment')" min-width="100" title="付款状态" fixed="right"
@@ -201,7 +206,7 @@
 							<el-button
 								:type="$dictUtils.getDictLabel('payment_status_info', scope.row.paymentStatus, '')"
 								effect="dark">{{ $dictUtils.getDictLabel("payment_status", scope.row.paymentStatus,
-								'未审批')}} </el-button>
+									'未审批') }} </el-button>
 						</template>
 					</vxe-column>
 					<vxe-column width="100" title="文件补充状态" fixed="right" align="center" field="fileStatus">
@@ -262,7 +267,10 @@
 				<!--        <ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>-->
 				<ProjectChooseForm ref="projectChooseForm" @getProgram="getProgram"></ProjectChooseForm>
 				<InfoForm ref="infoForm" @refreshDataList="refreshList"></InfoForm>
+				<NewInfoForm ref="newInfoForm" @refreshDataList="refreshList"></NewInfoForm>
 				<InfoUpdateForm ref="infoUpdateForm" @refreshDataList="refreshList"></InfoUpdateForm>
+				<NewInfoUpdateForm ref="newInfoUpdateForm" @refreshDataList="refreshList"></NewInfoUpdateForm>
+
 				<!--        <ProjectForm ref="projectForm" @refreshDataList="refreshList"></ProjectForm>-->
 				<ProjectRecordsForm ref="projectRecordsForm" @refreshDataList="refreshList"></ProjectRecordsForm>
 				<ProjectListForm ref="projectListForm"></ProjectListForm>
@@ -283,6 +291,9 @@ import SelectTree from '@/components/treeSelect/treeSelect.vue'
 import ProjectChooseForm from '../projectInfo/ProjectChooseForm'
 import ProjectListForm from '@/views/cw/reimbursementApproval/info/ProgramForm'
 import InfoForm from './InfoForm'
+import NewInfoForm from './NewInfoForm'
+
+
 import taskService from '@/api/flowable/taskService'
 import processService from '@/api/flowable/processService'
 import pick from 'lodash.pick'
@@ -290,11 +301,16 @@ import ProjectRecordsForm from '@/views/cw/projectRecords/ProjectRecordsForm'
 import ContractNameForm from '@/views/cw/workContract/ContractNameForm'
 import userService from '@/api/sys/UserService'
 import InfoUpdateForm from "./InfoUpdateForm";
+import NewInfoUpdateForm from "./NewInfoUpdateForm";
+
 import UserSelect1 from '@/views/utils/UserTreeSelect'
 import UserSelect2 from '@/views/utils/UserTreeSelect'
+import dayjs from 'dayjs';
 export default {
 	data() {
 		return {
+			formUrlFile: "/zs/reimbursement/info/NewReimbursementFileSupplementForm",
+			formUrl: '/zs/reimbursement/info/NewReimbursementForm',
 			showHideItem: false,
 			showHideIcon: 'el-icon-arrow-down',
 			showHideName: '展示',
@@ -362,12 +378,14 @@ export default {
 		// ProgramPageForm,
 		ProjectChooseForm,
 		InfoForm,
+		NewInfoForm,
 		// ProjectForm,
 		ProjectRecordsForm,
 		ProjectListForm,
 		UserSelect,
 		ContractNameForm,
 		InfoUpdateForm,
+		NewInfoUpdateForm,
 		UserSelect1,
 		UserSelect2,
 	},
@@ -395,6 +413,15 @@ export default {
 		}
 	},
 	methods: {
+		// 判断时间
+		isNewVersion(row) {
+			let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
+			let newVersionFlag = this.validateXG.compareDate(row.approvalTime, newStartDate) == 'same' || this.validateXG.compareDate(row.approvalTime, newStartDate) == 'after'
+			if (newVersionFlag) {
+				return true
+			}
+			return false
+		},
 		showHide() {
 			if (this.showHideItem === false) {
 				this.showHideItem = true
@@ -411,6 +438,9 @@ export default {
 		},
 		// 新增
 		add() {
+			let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
+			let today = dayjs().format('YYYY-MM-DD');
+			let newVersionFlag = this.validateXG.compareDate(today, newStartDate) == 'same' || this.validateXG.compareDate(today, newStartDate) == 'after'
 			// 读取流程表单
 			let tabTitle = `发起流程【中审-报销审批】`
 			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [中审-报销审批]`
@@ -420,6 +450,10 @@ export default {
 					procDefId: this.processDefinitionIdSzbx,
 					status: 'startAndHold'
 				}).then((data) => {
+					// 根据时间判断formUrl
+					if (newVersionFlag) {
+						data.formUrl = this.formUrl
+					}
 					this.$router.push({
 						path: '/flowable/task/TaskForm',
 						query: {
@@ -442,6 +476,10 @@ export default {
 					procDefId: this.processDefinitionIdZjb,
 					status: 'startAndHold'
 				}).then((data) => {
+					// 根据时间判断formUrl
+					if (newVersionFlag) {
+						data.formUrl = this.formUrl
+					}
 					this.$router.push({
 						path: '/flowable/task/TaskForm',
 						query: {
@@ -464,6 +502,10 @@ export default {
 					procDefId: this.processDefinitionId,
 					status: 'startAndHold'
 				}).then((data) => {
+					// 根据时间判断formUrl
+					if (newVersionFlag) {
+						data.formUrl = this.formUrl
+					}
 					this.$router.push({
 						path: '/flowable/task/TaskForm',
 						query: {
@@ -486,6 +528,9 @@ export default {
 		},
 		// 修改
 		edit(row) {
+			let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
+			let newVersionFlag = this.validateXG.compareDate(row.approvalTime, newStartDate) == 'same' || this.validateXG.compareDate(row.approvalTime, newStartDate) == 'after'
+			// 读取流程表单
 			// 暂存修改
 			let status = ''
 			if (row.type === '1') {
@@ -507,6 +552,9 @@ export default {
 					businessTable: 'zs_reimbursement_info',
 					status: status
 				}).then((data) => {
+					if (newVersionFlag) {
+						data.formUrl = this.formUrl
+					}
 					this.$router.push({
 						path: '/flowable/task/TaskForm',
 						query: {
@@ -532,6 +580,9 @@ export default {
 					businessTable: 'zs_reimbursement_info',
 					status: status
 				}).then((data) => {
+					if (newVersionFlag) {
+						data.formUrl = this.formUrl
+					}
 					this.$router.push({
 						path: '/flowable/task/TaskForm',
 						query: {
@@ -557,6 +608,9 @@ export default {
 					businessTable: 'zs_reimbursement_info',
 					status: status
 				}).then((data) => {
+					if (newVersionFlag) {
+						data.formUrl = this.formUrl
+					}
 					this.$router.push({
 						path: '/flowable/task/TaskForm',
 						query: {
@@ -579,10 +633,15 @@ export default {
 
 		},
 		todo(row) {
+			let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
+			let newVersionFlag = this.validateXG.compareDate(row.approvalTime, newStartDate) == 'same' || this.validateXG.compareDate(row.approvalTime, newStartDate) == 'after'
 			let cUser = false
 			taskService.getTaskDefInfo({
 				taskId: row.taskId
 			}).then((data) => {
+				if (newVersionFlag) {
+					data.formUrl = this.formUrl
+				}
 				console.log(data)
 				this.$router.push({
 					path: '/flowable/task/TaskForm',
@@ -614,12 +673,24 @@ export default {
 			})
 		},
 		// 查看
-		view(id) {
-			this.$refs.infoForm.init('view', id)
+		view(row) {
+			let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
+			let newVersionFlag = this.validateXG.compareDate(row.approvalTime, newStartDate) == 'same' || this.validateXG.compareDate(row.approvalTime, newStartDate) == 'after'
+			if (newVersionFlag) {
+				this.$refs.newInfoForm.init('view', row.id)
+			} else {
+				this.$refs.infoForm.init('view', row.id)
+			}
 		},
 		//修改
 		editForm(row) {
-			this.$refs.infoUpdateForm.init('edit', row.id)
+			let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
+			let newVersionFlag = this.validateXG.compareDate(row.approvalTime, newStartDate) == 'same' || this.validateXG.compareDate(row.approvalTime, newStartDate) == 'after'
+			if (newVersionFlag) {
+				this.$refs.newInfoUpdateForm.init('edit', row.id)
+			} else {
+				this.$refs.infoUpdateForm.init('edit', row.id)
+			}
 		},
 		// 查看报销项目
 		viewProject(id) {
@@ -767,10 +838,15 @@ export default {
 					}
 				}
 
+				let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
+				let newVersionFlag = this.validateXG.compareDate(row.approvalTime, newStartDate) == 'same' || this.validateXG.compareDate(row.approvalTime, newStartDate) == 'after'
 				taskService.getTaskDef({
 					procInsId: row.procInsId,
 					procDefId: this.procDefId
 				}).then((data) => {
+					if (newVersionFlag) {
+						data.formUrl = this.formUrl
+					}
 					this.$router.push({
 						path: '/flowable/task/TaskFormDetail',
 						query: {
@@ -937,6 +1013,8 @@ export default {
 		},
 		//文件补充
 		addFile(row) {
+			let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
+			let newVersionFlag = this.validateXG.compareDate(row.approvalTime, newStartDate) == 'same' || this.validateXG.compareDate(row.approvalTime, newStartDate) == 'after'
 			// 读取流程表单
 			let tabTitle = `发起流程【中审-报销文件补充】`
 			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [中审-报销文件补充]`
@@ -944,6 +1022,9 @@ export default {
 				procDefId: this.processDefinitionIdFile,
 				status: 'startAndClose'
 			}).then((data) => {
+				if (newVersionFlag) {
+					data.formUrl = this.formUrlFile
+				}
 				this.$router.push({
 					path: '/flowable/task/TaskForm',
 					query: {
@@ -976,10 +1057,16 @@ export default {
 		},
 		//文件补充  重新调整
 		todoFile(row) {
+			let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
+			let newVersionFlag = this.validateXG.compareDate(row.approvalTime, newStartDate) == 'same' || this.validateXG.compareDate(row.approvalTime, newStartDate) == 'after'
+
 			let cUser = false
 			taskService.getTaskDefInfo({
 				taskId: row.taskIdFile
 			}).then((data) => {
+				if (newVersionFlag) {
+					data.formUrl = this.formUrlFile
+				}
 				this.$router.push({
 					path: '/flowable/task/TaskForm',
 					query: {
@@ -1019,10 +1106,16 @@ export default {
 		},
 		//文件补充流程详情
 		detailFile(row) {
+			let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
+			let newVersionFlag = this.validateXG.compareDate(row.approvalTime, newStartDate) == 'same' || this.validateXG.compareDate(row.approvalTime, newStartDate) == 'after'
+
 			taskService.getTaskDef({
 				procInsId: row.procInsIdFile,
 				procDefId: this.processDefinitionIdFile
 			}).then((data) => {
+				if (newVersionFlag) {
+					data.formUrl = this.formUrlFile
+				}
 				this.$router.push({
 					path: '/flowable/task/TaskFormDetail',
 					query: {
@@ -1054,6 +1147,9 @@ export default {
 		},
 		//文件补充 修改
 		editFile(row) {
+			let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
+			let newVersionFlag = this.validateXG.compareDate(row.approvalTime, newStartDate) == 'same' || this.validateXG.compareDate(row.approvalTime, newStartDate) == 'after'
+
 			status = 'startAndClose'
 			let tabTitle = `发起流程【中审-报销文件补充】`
 			let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [中审-报销文件补充]`
@@ -1064,6 +1160,9 @@ export default {
 				businessTable: 'zs_reimbursement_file_supplement',
 				status: status
 			}).then((data) => {
+				if (newVersionFlag) {
+					data.formUrl = this.formUrlFile
+				}
 				this.$router.push({
 					path: '/flowable/task/TaskForm',
 					query: {

+ 472 - 0
src/views/zs/reimbursement/info/NewInfoForm.vue

@@ -0,0 +1,472 @@
+<template>
+  <div>
+    <el-dialog :title="title" :close-on-click-modal="false" draggable width="1200px" @close="close"
+      @keyup.enter.native="doSubmit" v-model="visible">
+      <el-form size="large" :model="inputForm" ref="inputForm" v-loading="loading"
+        :class="method === 'view' ? 'readonly' : ''" :disabled="method === 'view'" label-width="100px"
+        @submit.native.prevent>
+
+        <el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item hidden label="报销项" prop="reimbursementType"
+              :disabled="status === 'audit' || status === 'taskFormDetail'" :rules="[
+                { required: true, message: '报销项不能为空', trigger: 'blur' }
+              ]">
+              <el-radio v-model="inputForm.reimbursementType"
+                v-for="item in $dictUtils.getDictList('zs_reimbursement_source_type')" :label="item.value"
+                style="margin-right: 20px">
+                {{ item.label }}</el-radio>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="26">
+          <el-col :span="12">
+            <el-form-item label="经办人" prop="userName">
+              <el-input v-model="inputForm.userName" :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="报销编号" prop="no">
+              <el-input v-model="inputForm.no" :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="所属部门" prop="departmentName">
+              <el-input v-model="inputForm.departmentName" :disabled="true"></el-input>
+
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="报销日期" prop="reimDate">
+              <el-date-picker v-model="inputForm.reimDate" type="date" value-format="YYYY-MM-DD" style="width: 100%"
+                placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="报销类型" prop="sourceType">
+              <el-select v-model="inputForm.sourceType" placeholder="请选择报销类型" style="width:100%;">
+                <el-option v-for="item in $dictUtils.getDictList('zs_cw_reimbursement_source_type')" :key="item.value"
+                  :label="item.label" :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item v-if="hasPermission('zs:user:payment')" label="是否付款" prop="paymentStatus">
+              <el-input v-if="inputForm.paymentStatus === '1'" :disabled="true" v-model='payment'
+                class="bold-red"></el-input>
+              <el-input v-else v-model='payment' :disabled="true"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" v-if="inputForm.sourceType === '5'">
+            <el-form-item label="采购编号" prop="purchaseNo" :rules="[{ required: true, message: '采购编号不能为空', trigger: 'blur' },
+            { required: true, message: '采购编号不能为空', trigger: 'change' }]">
+              <el-input size="medium" :readonly="true" @focus="openPurForm()" v-model="inputForm.purchaseNo"
+                placeholder="请选择采购编号">
+                <el-button slot="append" icon="el-icon-search" @click="openPurForm()"></el-button>
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注" prop="remarks">
+              <el-input v-model="inputForm.remarks" type="textarea" :rows="5" maxlength="500" placeholder="请输入简介"
+                show-word-limit>
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <ReimbursementComponent ref="reimbursementComponent">
+        </ReimbursementComponent>
+        <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+
+      </el-form>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+          <el-button size="small" type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check"
+            v-noMoreClick>确定</el-button>
+        </span>
+      </template>
+
+      <!--      <MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>-->
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+// import ReimbursementService from '@/api/sys/ReimbursementService'
+import ReimbursementService from '@/api/zs/reimbursement/ReimbursementService'
+import UpLoadComponent from '@/views/common/UpLoadComponent'
+import InvoiceReimbursementUpLoadComponent from '@/views/common/NewDigitalInvoiceUploadComponent'
+import XEUtils from 'xe-utils'
+import ReimbursementComponent from '@/views/common/reimbursement/ReimbursementComponent.vue'
+// import MaterialManagementService from '@/api/materialManagement/MaterialManagementService'
+// import MaterialManagementDialog from '../../../materialManagement/file/MaterialManagementDialog'
+export default {
+  data() {
+    return {
+      title: '',
+      method: '',
+      visible: false,
+      loading: false,
+      inputForm: {
+        reimbursementType: '0',
+        userName: '',
+        no: '',
+        department: '',
+        reimDate: '',
+        remarks: '',
+        detailInfos: [],
+        detailInfoContracts: [],
+        detailInfoReports: [],
+        detailInfoOthers: [],
+        detailInfoProject: [],
+        detailInfoProcured: [],
+        amountInfos: [],
+        invoiceReimbursements: [],
+        invoiceReimbursementFiles: [], // 电子发票附件信息
+        files: [], // 附件信息
+        sourceType: '',
+        preList: [],
+        purchaseNo: '',
+        tradeTotalPrice: '',
+        purchaseId: '',
+        procDefId: '',
+        procDefKey: '',
+        formTitle: '',
+        departmentName: '',
+        paymentStatus: ''
+      },
+      payment: ''
+    }
+  },
+  // reimbursementService: null,
+  reimbursementService: null,
+  // materialManagementService: null,
+  created() {
+    // this.reimbursementService = new ReimbursementService()
+    this.reimbursementService = new ReimbursementService()
+    // this.materialManagementService = new MaterialManagementService()
+  },
+  components: {
+    InvoiceReimbursementUpLoadComponent,
+    UpLoadComponent,
+    ReimbursementComponent,
+
+    // MaterialManagementDialog
+  },
+  methods: {
+    getUpload() {
+    },
+    initReimbursementComponent() {
+      this.$refs.reimbursementComponent.initComponent("reimbursement", "zs", "中审众环会计师事务所(特殊普通合伙)江苏分所", this.inputForm, this.isConfirm, this.status)
+    },
+    init(method, id) {
+      this.method = method
+      this.inputForm = {
+        reimbursementType: '0',
+        userName: '',
+        no: '',
+        department: '',
+        reimDate: '',
+        remarks: '',
+        detailInfos: [],
+        amountInfos: [],
+        invoiceReimbursements: [],
+        invoiceReimbursementFiles: [], // 电子发票附件信息
+        files: [], // 附件信息
+        detailInfoContracts: [],
+        detailInfoReports: [],
+        detailInfoOthers: [],
+        detailInfoProject: [],
+        detailInfoProcured: [],
+        sourceType: '',
+        preList: [],
+        purchaseNo: '',
+        tradeTotalPrice: '',
+        purchaseId: '',
+        departmentName: '',
+        paymentStatus: ''
+      }
+      if (method === 'add') {
+        this.title = `新建报销`
+      } else if (method === 'edit') {
+        this.inputForm.id = id
+        this.title = '报销修改'
+      } else if (method === 'view') {
+        this.inputForm.id = id
+        this.title = '报销详情'
+      } else if (method === 'addChild') {
+        this.title = '添加下级结构'
+        this.inputForm.parentId = id
+      }
+      this.visible = true
+      this.loading = false
+      this.$nextTick(() => {
+        if (method === 'edit' || method === 'view') { // 修改或者查看
+          this.loading = true
+          this.$refs.inputForm.resetFields()
+          this.reimbursementService.findById(this.inputForm.id).then((data) => {
+            this.inputForm = this.recover(this.inputForm, data)
+            this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+            this.$refs.uploadComponent.clearUpload()
+            // this.$refs.invoiceReimbursementUpLoadComponent.clearUpload()
+            if (this.status === 'audit' || this.status === 'taskFormDetail') {
+              method = 'view'
+            }
+            if (this.commonJS.isEmpty(this.inputForm.department)) {
+              this.inputForm.department = this.$store.state.user.office.id
+              this.inputForm.departmentName = this.$store.state.user.office.name
+            }
+            if (this.commonJS.isEmpty(this.inputForm.userId)) {
+              this.inputForm.userId = this.$store.state.user.id
+            }
+            if (this.commonJS.isEmpty(this.inputForm.userName)) {
+              this.inputForm.userName = this.$store.state.user.name
+            }
+            if (this.commonJS.isEmpty(this.inputForm.reimDate)) {
+              this.inputForm.reimDate = new Date()
+            }
+            if (this.commonJS.isEmpty(this.inputForm.invoiceReimbursementFiles)) {
+              this.inputForm.invoiceReimbursementFiles = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.files)) {
+              this.inputForm.files = []
+            }
+            if (this.commonJS.isEmpty(this.inputForm.reimbursementType)) {
+              this.inputForm.reimbursementType = '0'
+            }
+            if (this.commonJS.isNotEmpty(this.inputForm.paymentStatus) && this.inputForm.paymentStatus === '1') {
+              this.payment = '已付款'
+            } else {
+              this.payment = '未付款'
+            }
+            // this.$refs.invoiceReimbursementUpLoadComponent.newUpload(method, this.inputForm.invoiceReimbursementFiles, 'reimbursement', 300, '数电发票信息', null, null, null, '中审众环会计师事务所(特殊普通合伙)江苏分所')
+            this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+            this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+            if (this.commonJS.isNotEmpty(this.inputForm.purchaseId)) {
+              this.startPur(this.inputForm.purchaseId)
+            }
+            this.$refs.reimbursementComponent.inputForm = this.inputForm
+            this.initReimbursementComponent()
+            this.loading = false
+          })
+          // this.reimbursementService.findById(this.inputForm.id).then(({data}) => {
+          //   this.inputForm = this.recover(this.inputForm, data)
+          // this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+          //   this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
+          //   this.loading = false
+          // })
+        }
+      })
+    },
+    footerMethod({ columns, data }) {
+      const footerData = [
+        columns.map((column, columnIndex) => {
+          if (columnIndex === 0) {
+            return '总报销费用'
+          }
+          if (['number'].includes(column.property)) {
+            // eslint-disable-next-line no-undef
+            return XEUtils.sum(data, column.property)
+          }
+          return null
+        })
+      ]
+      return footerData
+    },
+    // 表单提交
+    doSubmit() {
+      this.getReimbursementData()
+      this.$refs['inputForm'].validate((valid) => {
+        if (valid) {
+          this.loading = true
+          if (this.$refs.uploadComponent.checkProgress()) {
+            this.loading = false
+            return
+          }
+          if (this.commonJS.isEmpty(this.inputForm.files)) {
+            this.inputForm.files = []
+          }
+          this.inputForm.files = this.$refs.uploadComponent.getDataList()
+          this.reimbursementApprovalTypeService.save(this.inputForm).then((data) => {
+            this.close()
+            this.$message.success(data)
+            this.$emit('refreshDataList')
+            this.loading = false
+          }).catch(() => {
+            this.loading = false
+          })
+        }
+      })
+    },
+    close() {
+      this.$refs.inputForm.resetFields()
+      this.inputForm.detailInfos = []
+      this.inputForm.detailInfoContracts = []
+      this.inputForm.detailInfoReports = []
+      this.inputForm.detailInfoOthers = []
+      this.inputForm.detailInfoProject = []
+      this.inputForm.detailInfoProcured = []
+      this.inputForm.purchaseNo = ''
+      this.inputForm.preList = ''
+      this.inputForm.purchaseId = ''
+      this.inputForm.amountInfos = []
+      this.$refs.uploadComponent.clearUpload()
+      this.visible = false
+    },
+    // 删除
+    removeEvent(row, rowIndex, type) {
+      if (type === 'detail') {
+        this.$refs.detailTable.remove(row)
+        this.inputForm.detailInfos.splice(rowIndex, 1)
+      }
+      if (type === 'amount') {
+        this.$refs.amountTable.remove(row)
+        this.inputForm.amountInfos.splice(rowIndex, 1)
+      }
+    },
+    // 新增
+    async insertEvent(type) {
+      if (type === 'detail') {
+        await this.$refs.detailTable.insert().then((data) => {
+          this.inputForm.detailInfos.push(data)
+        })
+      }
+      if (type === 'amount') {
+        await this.$refs.amountTable.insert().then((data) => {
+          this.inputForm.amountInfos.push(data)
+        })
+      }
+    },
+    startPur(id) {
+      this.materialManagementService.findById(id).then((data) => {
+        this.inputForm.preList = data.detailInfos
+        this.inputForm.purchaseNo = data.purchaseNo
+        let i = this.inputForm.preList.length
+        for (let j = 0; j < i; j++) {
+          if (this.commonJS.isNotEmpty(this.inputForm.preList[j].tradePrice)) {
+            if (this.commonJS.isNotEmpty(this.inputForm.preList[j].tradeNumber)) {
+              this.inputForm.preList[j].priceSum = this.inputForm.preList[j].tradePrice * this.inputForm.preList[j].tradeNumber
+            }
+          }
+        }
+      })
+      this.$forceUpdate()
+    },
+    getPurChoose(row) {
+      this.inputForm.purchaseId = row.id
+      this.startPur(row.id)
+    },
+    footerMethod555({ columns, data }) {
+      const footerData = [
+        columns.map((column, columnIndex) => {
+          if (columnIndex === 0) {
+            return '商品总价'
+          }
+          if (['priceSum'].includes(column.property)) {
+            // eslint-disable-next-line no-undef
+            this.inputForm.tradeTotalPrice = XEUtils.sum(data, column.property)
+            return XEUtils.sum(data, column.property)
+          }
+          return null
+        })
+      ]
+      return footerData
+    },
+    seeFileInfo(index) {
+      if (this.commonJS.isEmpty(this.inputForm.preList[index].fileInfoLost)) {
+        this.inputForm.preList[index].fileInfoLost = []
+      }
+      this.$refs.materialManagementDialog.newUpload('view', this.inputForm.preList[index].fileInfoLost, null, null, null, null, null, false, index)
+    },
+    footerMethod1111({ columns, data }) {
+      const footerData = [
+        columns.map((column, columnIndex) => {
+          if (columnIndex === 0) {
+            return '汇总'
+          }
+          if (['amount'].includes(column.property)) {
+            // eslint-disable-next-line no-undef
+            return XEUtils.sum(data, column.property)
+          }
+          if (['taxAmount'].includes(column.property)) {
+            // eslint-disable-next-line no-undef
+            return XEUtils.sum(data, column.property)
+          }
+          if (['count'].includes(column.property)) {
+            // eslint-disable-next-line no-undef
+            return XEUtils.sum(data, column.property)
+          }
+          return null
+        })
+      ]
+      return footerData
+    },
+    handleExpand({ expanded, column, columnIndex, row, rowIndex }) {
+      if (this.commonJS.isEmpty(row.reimbursementType)) {
+        this.$message.error("请选择报销类型")
+        return false
+      }
+
+      if (expanded == true) {
+        setTimeout(() => {
+          if (row.reimbursementType == 1) {
+            this.$refs[row.uniqueId + "Upload"].clearUpload()
+            let files = JSON.parse(JSON.stringify(this.inputForm.invoiceReimbursementFiles))
+            this.$refs[row.uniqueId + "Upload"].newUpload(this.method, files, 'reimbursement', 300, '数电发票信息', null, null, null, '中审众环会计师事务所(特殊普通合伙)江苏分所', row.uniqueId)
+            this.$refs[row.uniqueId + "Upload"].isConfirm = this.isConfirm
+          }
+          if (row.reimbursementType == 0) {
+            this.$refs[row.uniqueId + "UploadFiles"].clearUpload()
+            let files = JSON.parse(JSON.stringify(this.inputForm.files))
+            this.$refs[row.uniqueId + "UploadFiles"].newUpload(this.method, files, 'reimbursement', null, null, null, null, null, row.uniqueId)
+          }
+        }, 100)
+      }
+      else {
+        if (row.reimbursementType == 1) {
+          let files = this.$refs[row.uniqueId + "Upload"].getDataList()
+          this.inputForm.invoiceReimbursementFiles = this.inputForm.invoiceReimbursementFiles.filter(item => {
+            return item.remarks != row.uniqueId
+          })
+          this.inputForm.invoiceReimbursementFiles.push(...files)
+          this.$refs[row.uniqueId + "Upload"].clearUpload()
+        }
+        if (row.reimbursementType == 0) {
+          let files = this.$refs[row.uniqueId + "UploadFiles"].getDataList()
+          this.inputForm.files = this.inputForm.files.filter(item => {
+            return item.remarks != row.uniqueId
+          })
+          this.inputForm.files.push(...files)
+          this.$refs[row.uniqueId + "UploadFiles"].clearUpload()
+        }
+      }
+
+      return true
+
+    },
+    getReimbursementData() {
+      this.$nextTick(() => {
+        let inputForm = this.$refs.reimbursementComponent.handleGetData()
+        this.inputForm.detailInfos = inputForm.detailInfos
+        this.inputForm.detailInfoContracts = inputForm.detailInfoContracts
+        this.inputForm.detailInfoReports = inputForm.detailInfoReports
+        this.inputForm.detailInfoProject = inputForm.detailInfoProject
+        this.inputForm.detailInfoOthers = inputForm.detailInfoOthers
+        this.inputForm.detailInfoProcured = inputForm.detailInfoProcured
+        this.inputForm.invoiceReimbursementFiles = inputForm.invoiceReimbursementFiles
+      });
+    }
+  }
+}
+</script>
+<style scoped>
+.bold-red>>>.el-input__inner {
+  -webkit-text-fill-color: #ff0000 !important;
+  font-weight: bolder;
+  text-align: left;
+}
+</style>

File diff suppressed because it is too large
+ 1862 - 0
src/views/zs/reimbursement/info/NewInfoUpdateForm.vue


File diff suppressed because it is too large
+ 1790 - 0
src/views/zs/reimbursement/info/NewReimbursementFileSupplementForm.vue


File diff suppressed because it is too large
+ 2169 - 0
src/views/zs/reimbursement/info/NewReimbursementForm.vue