{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\views\\MajorReformProjects\\QuaObj\\QuaObjUpdate.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\MajorReformProjects\\QuaObj\\QuaObjUpdate.vue","mtime":1744767657573},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport pagination from '@/components/pagination'\r\nimport { TableMixin } from '@/mixins/tableMixin'\r\nimport apiList from '@/api/MajorReformProjects/QuaObj'\r\nimport publicApi from '@/api/publicApi'\r\nimport QuaObjDialog from './components/QuaObjDialog.vue'\r\nconst portal = window.context.portal\r\nexport default {\r\n name: 'QuaObjUpdate',\r\n components: {\r\n pagination,\r\n QuaObjDialog\r\n },\r\n mixins: [TableMixin],\r\n data() {\r\n return {\r\n markLoading: false,\r\n searchForm: {\r\n projectName: '',\r\n projectField: '',\r\n projectRunway: '',\r\n leader: '',\r\n projectCategory: ''\r\n }, // 顶部搜索对象\r\n tableMaxHeight: 400,\r\n tableLoading: false,\r\n params: {\r\n pageBean: {\r\n page: 1,\r\n pageSize: 20,\r\n showTotal: true\r\n },\r\n querys: []\r\n },\r\n tableData: [],\r\n multipleSelection: [],\r\n deleteIds: '' // 是否选中列表解锁删除按钮\r\n }\r\n },\r\n\r\n created() {\r\n this.getDataList(this.params)\r\n },\r\n methods: {\r\n reload() {\r\n this.getDataList(this.params)\r\n },\r\n // 撤回\r\n revokeReviewQua(row) {\r\n this.$confirm('确认执行撤销操作吗?', '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'error'\r\n }).then(() => {\r\n this.markLoading = true\r\n let data = {\r\n flowType: row.flowType,\r\n id: row.id,\r\n status: 0,\r\n approvalResults: 2\r\n }\r\n apiList.verify(data, res => {\r\n if (res.state) {\r\n this.$message.success('撤销操作成功')\r\n this.handleSearch()\r\n } else {\r\n this.$message.success('撤销操作失败')\r\n }\r\n this.markLoading = false\r\n })\r\n })\r\n },\r\n // 分页查询数据\r\n getDataList(data) {\r\n this.tableLoading = true\r\n apiList.queryPageFillList(data, 'false', res => {\r\n if (res) {\r\n this.tableData = res.rows\r\n this.params.pageBean = {\r\n page: res.page || 1,\r\n pageSize: res.pageSize || 20,\r\n total: res.total\r\n }\r\n }\r\n this.tableLoading = false\r\n })\r\n },\r\n // 顶部搜索\r\n handleSearch(page) {\r\n let { projectName, projectField, projectRunway, leader, projectCategory } = this.searchForm\r\n let data = [\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n property: 'projectName',\r\n relation: 'AND',\r\n value: projectName\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n property: 'projectField',\r\n relation: 'AND',\r\n value: projectField\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n property: 'projectRunway',\r\n relation: 'AND',\r\n value: projectRunway\r\n },\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n property: 'leader',\r\n relation: 'AND',\r\n value: leader\r\n },\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n property: 'project_Category_',\r\n relation: 'AND',\r\n value: projectCategory\r\n },\r\n ]\r\n this.params.querys = data\r\n if (page) {\r\n this.params.pageBean.page = page\r\n }\r\n this.getDataList(this.params)\r\n },\r\n // 待更新\r\n handleDefault(item) {\r\n this.$refs.QuaObjDialog.openForm(item, '待更新', 0, 'save')\r\n },\r\n // 上报\r\n handleSubmit(item) {\r\n this.$confirm('确认上报吗?', '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'error'\r\n }).then(() => {\r\n this.markLoading = true\r\n apiList.commit(item.id, res => {\r\n if (res.state) {\r\n this.$message.success('上报成功')\r\n this.getDataList(this.params)\r\n } else {\r\n this.$message.warning(res.message)\r\n }\r\n this.markLoading = false\r\n })\r\n })\r\n },\r\n // 编辑\r\n handleEdit(item) {\r\n this.$refs.QuaObjDialog.openForm(item, '编辑', 3, 'save')\r\n },\r\n // 更新\r\n handleUpdate(item) {\r\n // 获取当前时间\r\n publicApi.getNowDate(res => {\r\n if (res) {\r\n let serverTime = Date.parse(res)\r\n let arr = res.split(' ')\r\n let dateArr = arr[0].split('-')\r\n let year = dateArr[0]\r\n let month = dateArr[1]\r\n let date = ''\r\n // if (month === '05' || month == '10') {\r\n if (month % 2 !== 0 || month == 9 || month == 12) {\r\n let time = `${year}-${month}-15 18:00:00`\r\n if (serverTime <= Date.parse(time)) {\r\n let newMonth = month < 2 ? 12 : month - 1\r\n if (newMonth < 10) {\r\n newMonth = '0' + newMonth\r\n }\r\n date = (newMonth === 12 ? year - 1 : year) + '-' + newMonth\r\n } else {\r\n date = year + '-' + month\r\n }\r\n } else {\r\n let time = `${year}-${month}-10 18:00:00`\r\n if (serverTime <= Date.parse(time)) {\r\n let newMonth = month < 2 ? 12 : month - 1\r\n if (newMonth < 10) {\r\n newMonth = '0' + newMonth\r\n }\r\n date = year + '-' + newMonth\r\n } else {\r\n date = year + '-' + month\r\n }\r\n }\r\n let data = {\r\n fillDate: date + '-01',\r\n projectId: item.projectId\r\n }\r\n apiList.isMonthApprove(data, res => {\r\n if (res) {\r\n this.$refs.QuaObjDialog.openForm(item, '更新', 3, 'save')\r\n } else {\r\n this.$confirm(`${date}月数据已审核通过,请勿重复更新。`, '提示', {\r\n cancelButtonText: '关闭',\r\n showConfirmButton: false,\r\n type: 'error'\r\n }).then(() => {\r\n\r\n })\r\n }\r\n })\r\n }\r\n })\r\n\r\n\r\n },\r\n // 详情\r\n handleDetils(item) {\r\n let type\r\n if (item.status) {\r\n type = 3\r\n } else {\r\n type = 0\r\n }\r\n this.$refs.QuaObjDialog.openForm(item, '详情', type, 'read')\r\n },\r\n handleSelectionChange(currentData) {\r\n if (currentData.length === 0) return (this.deleteIds = '')\r\n let ids = []\r\n currentData.forEach(item => {\r\n ids.push(item.id)\r\n })\r\n this.deleteIds = ids.join(',')\r\n },\r\n handleCurrentChange(page) {\r\n this.params.pageBean = { ...this.params.pageBean, page }\r\n this.getDataList(this.params)\r\n },\r\n handleSizeChange(pageSize) {\r\n this.params.pageBean = { ...this.params.pageBean, pageSize }\r\n this.getDataList(this.params)\r\n }\r\n }\r\n}\r\n",null]}