index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. <template>
  2. <div class="audit-project-manage">
  3. <!-- 页面标题 -->
  4. <h2>成本监审任务</h2>
  5. <!-- 搜索区域 -->
  6. <div class="search-container">
  7. <el-form :inline="true" :model="searchForm" class="demo-form-inline">
  8. <el-form-item label="年度:">
  9. <el-date-picker
  10. v-model="searchForm.projectYear"
  11. type="year"
  12. placeholder="选择年"
  13. format="yyyy"
  14. value-format="yyyy"
  15. ></el-date-picker>
  16. </el-form-item>
  17. <el-form-item label="监审项目名称:">
  18. <el-input
  19. v-model="searchForm.projectName"
  20. placeholder="请输入监审项目名称"
  21. clearable
  22. />
  23. </el-form-item>
  24. <!-- <el-form-item label="立项来源:">
  25. <el-select v-model="searchForm.projectSource" placeholder="请选择立项来源">
  26. <el-option label="年度计划内" value="1"></el-option>
  27. <el-option label="年度计划外" value="2"></el-option>
  28. </el-select>
  29. </el-form-item> -->
  30. <!-- <el-form-item label="监审形式:">
  31. <el-select
  32. v-model="searchForm.auditType"
  33. placeholder="请选择监审形式"
  34. style="width: 100%"
  35. clearable
  36. >
  37. <el-option
  38. v-for="item in dictData['auditType']"
  39. :key="item.key"
  40. :label="item.name"
  41. :value="item.key"
  42. ></el-option>
  43. </el-select> -->
  44. <!-- <el-input v-model="searchForm.auditType" placeholder="请输入监审形式" clearable /> -->
  45. <!-- </el-form-item> -->
  46. <!-- <el-form-item label="立项地区:">
  47. <el-input v-model="searchForm.areaName" placeholder="请输入立项地区" clearable />
  48. </el-form-item> -->
  49. <!-- <el-form-item label="监审主体:">
  50. <el-input v-model="searchForm.auditBody" placeholder="请输入监审主体" clearable />
  51. </el-form-item> -->
  52. <!-- <el-form-item label="状态:">
  53. <el-select v-model="searchForm.currentNode" placeholder="请选择状态">
  54. <el-option label="提交材料" value="tjcl"></el-option>
  55. <el-option label="材料初审" value="ccls"></el-option>
  56. <el-option label="实地审核" value="sdsh"></el-option>
  57. <el-option label="意见告知" value="yigz"></el-option>
  58. <el-option label="意见反馈" value="yjfk"></el-option>
  59. <el-option label="集体审议" value="jtsy"></el-option>
  60. <el-option label="出具报告" value="cjbg"></el-option>
  61. <el-option label="归档" value="gd"></el-option>
  62. </el-select>
  63. </el-form-item> -->
  64. <el-form-item>
  65. <el-button type="primary" @click="handleSearch">查询</el-button>
  66. </el-form-item>
  67. </el-form>
  68. </div>
  69. <!-- 数据表格 -->
  70. <el-table
  71. v-loading="loading"
  72. :data="projectList"
  73. border
  74. style="width: 100%"
  75. >
  76. <el-table-column
  77. prop="serialNumber"
  78. label="序号"
  79. width="60"
  80. align="center"
  81. >
  82. <template slot-scope="scope">
  83. <span>
  84. {{ scope.$index + 1 }}
  85. </span>
  86. </template>
  87. </el-table-column>
  88. <el-table-column
  89. prop="projectYear"
  90. label="立项年度"
  91. width="100"
  92. align="center"
  93. >
  94. <template slot-scope="scope">
  95. <span>{{ scope.row.projectYear }}年</span>
  96. </template>
  97. </el-table-column>
  98. <el-table-column
  99. prop="areaName"
  100. label="立项地区"
  101. width="100"
  102. align="center"
  103. />
  104. <el-table-column
  105. prop="projectName"
  106. label="成本监审项目名称"
  107. align="center"
  108. show-overflow-tooltip
  109. >
  110. <template slot-scope="scope">
  111. <a
  112. href="#"
  113. class="link-text"
  114. @click.prevent="handleMessage(scope.row)"
  115. >
  116. {{ scope.row.projectName }}
  117. </a>
  118. </template>
  119. </el-table-column>
  120. <el-table-column
  121. prop="auditPeriod"
  122. label="监审期间"
  123. align="center"
  124. show-overflow-tooltip
  125. />
  126. <el-table-column
  127. prop="sourceType"
  128. label="立项来源"
  129. align="center"
  130. show-overflow-tooltip
  131. >
  132. <template slot-scope="scope">
  133. {{ getDictName('projectProposal', scope.row.sourceType) }}
  134. </template>
  135. </el-table-column>
  136. <el-table-column
  137. prop="auditType"
  138. label="监审形式"
  139. width="120"
  140. align="center"
  141. >
  142. <template slot-scope="scope">
  143. {{ getDictName('auditType', scope.row.auditType) }}
  144. </template>
  145. </el-table-column>
  146. <el-table-column
  147. prop="orgName"
  148. label="监审主体"
  149. align="center"
  150. show-overflow-tooltip
  151. />
  152. <el-table-column
  153. prop="currentNodeName"
  154. label="状态"
  155. align="center"
  156. show-overflow-tooltip
  157. >
  158. <!-- <template slot-scope="scope">
  159. <div v-if="scope.row.currentNode === null && scope.row.currentNode === undefined && scope.row.currentNode === ''">
  160. <div v-if="scope.row.currentNode === 'tjcl'">提交材料</div>
  161. <div v-if="scope.row.currentNode === 'ccls'">材料初审</div>
  162. <div v-if="scope.row.currentNode === 'sdsh'">实地审核</div>
  163. <div v-if="scope.row.currentNode === 'yigz'">意见告知</div>
  164. <div v-if="scope.row.currentNode === 'yjfk'">意见反馈</div>
  165. <div v-if="scope.row.currentNode === 'jtsy'">集体审议</div>
  166. <div v-if="scope.row.currentNode === 'cjbg'">出具报告</div>
  167. <div v-if="scope.row.currentNode === 'gd'">归档</div>
  168. </div>
  169. <div v-else>
  170. <div>{{scope.row.currentNodeName}}</div>
  171. </div>
  172. </template> -->
  173. </el-table-column>
  174. <el-table-column label="操作" width="180" align="center">
  175. <template slot-scope="scope">
  176. <!-- 文字按钮样式 -->
  177. <el-button
  178. v-if="
  179. (scope.row.currentNode === 'clcs' ||
  180. scope.row.currentNode === 'tjcl') &&
  181. (scope.row.status === '100' || scope.row.status === '500')
  182. "
  183. size="mini"
  184. type="text"
  185. @click="handleEdit(scope.row)"
  186. >
  187. 填报任务
  188. </el-button>
  189. <el-button
  190. v-if="
  191. scope.row.currentNode === 'yjfk' && scope.row.status === '250'
  192. "
  193. size="mini"
  194. type="text"
  195. @click="handleEdit(scope.row)"
  196. >
  197. 意见反馈
  198. </el-button>
  199. <el-button size="mini" type="text" @click="handleMessage(scope.row)">
  200. 查看
  201. </el-button>
  202. <!-- <el-button
  203. size="mini"
  204. type="text"
  205. @click="handleEstablish(scope.row)"
  206. >
  207. 立项
  208. </el-button> -->
  209. </template>
  210. </el-table-column>
  211. </el-table>
  212. <!-- 分页 -->
  213. <div class="pagination-container">
  214. <el-pagination
  215. :current-page="currentPage"
  216. :page-sizes="[10, 20, 50, 100]"
  217. :page-size="pageSize"
  218. layout="total, sizes, prev, pager, next, jumper"
  219. :total="total"
  220. @size-change="handleSizeChange"
  221. @current-change="handleCurrentChange"
  222. ></el-pagination>
  223. </div>
  224. <taskInfo ref="taskInfo" />
  225. <!-- 填报任务侧边弹窗 -->
  226. <task-fill-in
  227. ref="taskFillIn"
  228. :visible.sync="taskFillInVisible"
  229. :task-info="currentTaskInfo"
  230. :view-mode="taskViewMode"
  231. @close="handleTaskFillInClose"
  232. @refresh="handleTaskFillInRefresh"
  233. />
  234. </div>
  235. </template>
  236. <script>
  237. import { Message, MessageBox } from 'element-ui'
  238. import { getTaskHandlingList } from '@/api/auditTaskProcessing'
  239. import { dictMixin } from '@/mixins/useDict'
  240. import taskInfo from '@/components/task/taskInfo.vue'
  241. import TaskFillIn from '@/views/EntDeclaration/auditTaskManagement/taskFillIn.vue'
  242. export default {
  243. name: 'AuditTaskProcessingView',
  244. components: {
  245. taskInfo,
  246. TaskFillIn,
  247. },
  248. mixins: [dictMixin],
  249. data() {
  250. return {
  251. dictData: {
  252. auditType: [], //监审形式
  253. projectProposal: [], //立项来源
  254. },
  255. loading: false,
  256. // 搜索表单
  257. searchForm: {
  258. pageNum: 1,
  259. pageSize: 10,
  260. projectYear: '',
  261. projectName: '',
  262. projectSource: '',
  263. auditForm: '',
  264. auditType: '',
  265. areaName: '',
  266. auditBody: '',
  267. currentNode: '',
  268. },
  269. // 项目列表
  270. projectList: [],
  271. // 分页信息
  272. currentPage: 1,
  273. pageSize: 10,
  274. total: 3,
  275. // 填报任务弹窗相关
  276. taskFillInVisible: false,
  277. currentTaskInfo: {},
  278. taskViewMode: false,
  279. }
  280. },
  281. mounted() {
  282. this.handleSearch()
  283. },
  284. methods: {
  285. // 处理搜索
  286. handleSearch() {
  287. this.currentPage = 1
  288. this.searchForm.pageNum = 1
  289. this.getTaskHandlingPage()
  290. },
  291. // 处理查看
  292. handleView(row) {
  293. // this.dialogTitle = '查看项目'
  294. // this.isView = true
  295. // this.currentProject = { ...row }
  296. // this.dialogVisible = true
  297. this.$router.push({
  298. path: '/dataManagement/EntDeclaration/auditTaskManagementProjectInfo',
  299. })
  300. },
  301. handleEstablishDialogClose() {},
  302. // 处理分页大小变化
  303. handleSizeChange(val) {
  304. this.pageSize = val
  305. this.searchForm.pageSize = val
  306. this.searchForm.pageNum = 1
  307. this.currentPage = 1
  308. this.getTaskHandlingPage()
  309. },
  310. // 处理当前页变化
  311. handleCurrentChange(val) {
  312. this.currentPage = val
  313. this.searchForm.pageNum = val
  314. this.getTaskHandlingPage()
  315. },
  316. // 填报任务
  317. handleEdit(row) {
  318. console.log('填报任务', row)
  319. this.currentTaskInfo = row || {}
  320. this.taskViewMode = false
  321. // 使用ref调用组件的open方法
  322. this.$nextTick(() => {
  323. if (this.$refs.taskFillIn) {
  324. this.$refs.taskFillIn.open(row, false)
  325. }
  326. })
  327. },
  328. // 填报任务弹窗关闭
  329. handleTaskFillInClose() {
  330. this.taskFillInVisible = false
  331. this.currentTaskInfo = {}
  332. },
  333. // 填报任务提交成功后刷新列表
  334. handleTaskFillInRefresh() {
  335. // 刷新列表数据
  336. this.getTaskHandlingPage()
  337. },
  338. // 查看
  339. handleMessage(row) {
  340. this.$refs.taskInfo.open(row)
  341. // console.log(row)
  342. // this.$router.push({
  343. // path: '/dataManagement/EntDeclaration/auditTaskManagementProjectInfo',
  344. // query: {
  345. // info: row,
  346. // viewMode: true, // 标识为查看模式
  347. // },
  348. // })
  349. },
  350. // 任务办理列表
  351. getTaskHandlingPage() {
  352. this.loading = true
  353. getTaskHandlingList(this.searchForm)
  354. .then((res) => {
  355. console.log('任务办理列表', res)
  356. this.projectList = res.value.records
  357. this.total = res.value.total
  358. this.loading = false
  359. })
  360. .catch((err) => {
  361. console.log(err)
  362. this.loading = false
  363. })
  364. },
  365. },
  366. }
  367. </script>
  368. <style scoped>
  369. .audit-project-manage {
  370. padding: 20px;
  371. }
  372. h2 {
  373. margin-bottom: 20px;
  374. font-size: 18px;
  375. color: #303133;
  376. }
  377. .search-container {
  378. margin-bottom: 20px;
  379. padding: 10px;
  380. background-color: #f5f7fa;
  381. border-radius: 4px;
  382. }
  383. .demo-form-inline {
  384. display: flex;
  385. align-items: center;
  386. flex-wrap: wrap;
  387. }
  388. .link-text {
  389. color: #409eff;
  390. cursor: pointer;
  391. }
  392. .pagination-container {
  393. margin-top: 20px;
  394. text-align: right;
  395. }
  396. /* 对话框样式 */
  397. .dialog-content h3 {
  398. margin-bottom: 20px;
  399. font-size: 16px;
  400. color: #303133;
  401. }
  402. </style>