documentCollectionApproval.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  1. <template>
  2. <fullscreen :fullscreen.sync="fullscreen" class="container" style="margin: 0;width: 100%;">
  3. <div class="container-box">
  4. <!-- <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList> -->
  5. <div>
  6. <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
  7. <!-- <div style="margin-top: 20px;float: right;" class="bigbtns">
  8. <el-button style="margin-left: 20px;" class="btn-check" size="medium" type="primary"
  9. @click="addNew()">新增模板
  10. </el-button>
  11. </div> -->
  12. </div>
  13. <div class="tabbox">
  14. <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
  15. tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
  16. <el-table-column prop="templateName" label="模板名称" align="center">
  17. </el-table-column>
  18. <el-table-column prop="reason" label="填报事由" align="center">
  19. </el-table-column>
  20. <el-table-column prop="precautions" label="填报注意事项" align="center">
  21. </el-table-column>
  22. <el-table-column prop="endTime" label="截至时间" align="center">
  23. </el-table-column>
  24. <el-table-column prop="createName" label="工单发起人" align="center">
  25. </el-table-column>
  26. <el-table-column prop="receiverName" label="接收人" align="center">
  27. <template slot-scope="scope">
  28. <span @click="toOneDialog(scope.row.id)" style="cursor:pointer;color: #007eff;">{{
  29. scope.row.receiverName
  30. }}</span>
  31. </template>
  32. </el-table-column>
  33. <el-table-column prop="processName" label="当前处理人" align="center">
  34. </el-table-column>
  35. <el-table-column prop="createTime" label="发起时间" align="center">
  36. </el-table-column>
  37. <el-table-column prop="status" label="状态" align="center">
  38. <template slot-scope="scope">
  39. <!-- -1.已撤销 0.待处理 1.部门人员审批 2.部门领导审批 3.退回修改 4.已完成 -->
  40. <span v-if="scope.row.status == -1">已撤销</span>
  41. <span v-if="scope.row.status == 0">待处理</span>
  42. <span v-if="scope.row.status == 1">部门人员审批</span>
  43. <span v-if="scope.row.status == 2">部门领导审批</span>
  44. <span v-if="scope.row.status == 3">退回修改</span>
  45. <span v-if="scope.row.status == 4">已完成</span>
  46. </template>
  47. </el-table-column>
  48. <el-table-column prop="superviseFlag" label="是否为督办" align="center">
  49. <template slot-scope="scope">
  50. <span v-if="scope.row.superviseFlag == 0">否</span>
  51. <span v-if="scope.row.superviseFlag == null">否</span>
  52. <span v-if="scope.row.superviseFlag == 1">是</span>
  53. </template>
  54. </el-table-column>
  55. <el-table-column label="操作" width="220px" align="center" fixed="right">
  56. <template slot-scope="scope">
  57. <el-button size="mini" @click="toView(scope.row)">查看</el-button>
  58. <el-button size="mini" @click="toChuli(scope.row)"
  59. v-if="scope.row.status != 4 && (loginNo == scope.row.processId)">处理</el-button>
  60. </template>
  61. </el-table-column>
  62. </el-table>
  63. <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
  64. :total="total">
  65. </el-pagination>
  66. </div>
  67. <el-dialog title="下发" :visible.sync="issuedAddStatus" width="40%" :destroy-on-close="true"
  68. :modal-append-to-body="false" :close-on-click-modal="false" :fullscreen="false">
  69. <el-form :model="issuedParam" ref="addInfoList">
  70. <div class="info-line">
  71. <el-form-item prop="testInfo">
  72. <span style="width: 6px;color: red">*</span><span>填报事由</span>
  73. <el-input v-model="issuedParam.editReason" placeholder="填报事由"></el-input>
  74. </el-form-item>
  75. </div>
  76. <div class="info-line">
  77. <el-form-item prop="testInfo">
  78. <span style="width: 6px;color: red">*</span><span>填报注意事项</span>
  79. <el-input v-model="issuedParam.editRemark" placeholder="填报注意事项"></el-input>
  80. </el-form-item>
  81. </div>
  82. <div class="info-line">
  83. <el-form-item prop="testInfo">
  84. <span style="width: 6px;color: red">*</span><span>截止时间</span>
  85. <el-date-picker type="date" placeholder="截止时间" v-model="issuedParam.endTime"
  86. :picker-options="pickerOptions" value-format="yyyy-MM-dd"></el-date-picker>
  87. </el-form-item>
  88. </div>
  89. </el-form>
  90. <div slot="footer" class="dialog-footer myfooter">
  91. <el-button @click="issuedAddStatus = false">取消</el-button>
  92. <el-button @click="processNewIssued()" type="primary">确定</el-button>
  93. </div>
  94. </el-dialog>
  95. <el-dialog :title="'回复详情'" :visible.sync="toOnevisible" width="50%" :destroy-on-close="true"
  96. :modal-append-to-body="false" :close-on-click-modal="false">
  97. <div style="height: 450px;">
  98. <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableDataDialog"
  99. tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loadingDialog">
  100. <el-table-column prop="receiveName" label="接收人" align="center">
  101. </el-table-column>
  102. <el-table-column prop="dept" label="接收人科室" align="center">
  103. </el-table-column>
  104. <el-table-column prop="arriveTime" label="到达时间" align="center">
  105. </el-table-column>
  106. <el-table-column prop="processTime" label="处理时间" align="center">
  107. </el-table-column>
  108. <el-table-column prop="selectionPath" label="选择路径" align="center">
  109. </el-table-column>
  110. <el-table-column prop="replyComments" label="回复意见" align="center">
  111. </el-table-column>
  112. </el-table>
  113. <el-pagination class="pageBox" @current-change="currchangeDialog" layout="prev, pager, next" background
  114. :total="totalDialog">
  115. </el-pagination>
  116. </div>
  117. <div slot="footer" style="text-align: right;padding-bottom: 20px">
  118. <el-button type="primary" @click="toOnevisible = false">确 定</el-button>
  119. </div>
  120. </el-dialog>
  121. </div>
  122. <myMessageNew :messTit='deleteTag' @closeMessage="processDelete" :centerDialogVisible="centerDialogVisible"
  123. v-if="centerDialogVisible" yes-btn-name="是" no-btn-name="否"></myMessageNew>
  124. </fullscreen>
  125. </template>
  126. <script>
  127. import mySearch from "./search.vue";
  128. import myUpload from "../../../components/upload";
  129. import toolList from "../../../components/toolList";
  130. import myMessageNew from "../../../components/myMessageNew.vue"
  131. export default {
  132. components: {
  133. myUpload,
  134. mySearch,
  135. toolList,
  136. myMessageNew
  137. },
  138. data() {
  139. return {
  140. tableData: [{}],
  141. total: 0,
  142. params: {},
  143. deleteTag: '',
  144. loginNo: '',
  145. centerDialogVisible: false,
  146. loading: false,
  147. issuedAddStatus: false,
  148. issuedParam: {},
  149. pickerOptions: {
  150. disabledDate(time) {
  151. return time.getTime() < Date.now();
  152. }
  153. },
  154. tooltit: '收入模板管理',
  155. searchList: [{
  156. type: 'input',
  157. tit: '模板名称',
  158. value: '',
  159. width: '22%',
  160. }, {
  161. type: 'date',
  162. tit: '截止时间',
  163. value: '',
  164. width: '22%',
  165. }, {
  166. type: 'sel',
  167. tit: '是否为督办',
  168. value: '',
  169. width: '22%',
  170. options: [
  171. {
  172. dataCode: "0",
  173. dataName: "否"
  174. },
  175. {
  176. dataCode: "1",
  177. dataName: "是"
  178. }
  179. ]
  180. },
  181. {
  182. type: 'sel',
  183. tit: '状态',
  184. value: '',
  185. width: '22%',
  186. options: [
  187. {
  188. dataName: "待处理",
  189. dataCode: "0",
  190. },
  191. {
  192. dataName: "部门人员审核",
  193. dataCode: "1",
  194. },
  195. {
  196. dataName: "部门领导审批",
  197. dataCode: "2",
  198. },
  199. {
  200. dataName: "已完成",
  201. dataCode: "4",
  202. },
  203. {
  204. dataName: "退回修改",
  205. dataCode: "3",
  206. },
  207. ]
  208. },],
  209. delTemplateId: '',
  210. fullscreen: false,
  211. toOnevisible: false,
  212. loadingDialog: false,
  213. totalDialog: 0,
  214. pageSize: 0,
  215. pageSizeDialog: 0,
  216. paramsDialog: {},
  217. tableDataDialog: [{}],
  218. }
  219. },
  220. methods: {
  221. checkDelete(row) {
  222. this.deleteTag = '确认删除吗?';
  223. this.centerDialogVisible = true;
  224. this.delTemplateId = row.id;
  225. },
  226. processDelete(v) {
  227. this.centerDialogVisible = false;
  228. var _this = this;
  229. if (v === 1) {
  230. this.$http({
  231. url: "/market/cIncomeExcelTemplate/deleteTemplate",
  232. method: "post",
  233. headers: {
  234. "Content-Type": "application/json",
  235. },
  236. data: { excelId: this.delTemplateId },
  237. }).then((res) => {
  238. if (res.data.result === 1) {
  239. _this.$message({
  240. message: '删除失败',
  241. type: 'error'
  242. });
  243. } else {
  244. _this.$message({
  245. message: '删除成功',
  246. type: 'success'
  247. });
  248. _this.getList({}, _this.pageSize);
  249. }
  250. });
  251. }
  252. },
  253. //搜索数据
  254. searchInfo(v) {
  255. this.params = {};
  256. v[0] ? this.params.templateName = v[0] : '';
  257. v[1] ? this.params.endTime = this.$formatDate(v[1], "YYYY-MM-DD") : '';
  258. v[2] ? this.params.superviseFlag = v[2] : '';
  259. v[3] ? this.params.status = v[3] : '';
  260. this.getList(this.params, this.pageSize);
  261. },
  262. //功能栏
  263. iconCli(v) {
  264. if (v === 1) {
  265. this.getList(this.params, this.pageSize);
  266. }
  267. if (v === 2) {
  268. this.fullscreen = !this.fullscreen
  269. }
  270. },
  271. // 分页
  272. currchange(v) {
  273. this.pageSize = v;
  274. this.getList(this.params, this.pageSize);
  275. },
  276. getList(v, n) {
  277. this.pageSize = n;
  278. this.loading = true;
  279. this.tableData = [];
  280. let _this = this;
  281. this.$http({
  282. url: "/market/Issued/queryPage",
  283. method: "post",
  284. headers: {
  285. "Content-Type": "application/json",
  286. "page": '{"pageNo":"' + n + '","pageSize":"10"}'
  287. },
  288. data: {
  289. ...v,
  290. },
  291. }).then(({ data: { totalRecord, data } }) => {
  292. this.tableData = data;
  293. this.total = totalRecord;
  294. this.loading = false;
  295. });
  296. },
  297. toOneDialog(o) {
  298. this.toOnevisible = true
  299. this.paramsDialog.issuedId = o
  300. this.getListDialog(this.paramsDialog, 1);
  301. },
  302. // 分页
  303. currchangeDialog(v) {
  304. this.pageSizeDialog = v;
  305. this.getListDialog(this.paramsDialog, this.pageSizeDialog);
  306. },
  307. getListDialog(v, n) {
  308. this.pageSizeDialog = n;
  309. this.loadingDialog = true;
  310. this.tableDataDialog = [];
  311. let _this = this;
  312. this.$http({
  313. url: "/market/FileOperateLog/queryPage",
  314. method: "post",
  315. headers: {
  316. "Content-Type": "application/json",
  317. "page": '{"pageNo":"' + n + '","pageSize":"10"}'
  318. },
  319. data: {
  320. ...v,
  321. },
  322. }).then(({ data: { totalRecord, data } }) => {
  323. this.tableDataDialog = data;
  324. this.totalDialog = totalRecord;
  325. this.loadingDialog = false;
  326. });
  327. },
  328. addNew() {
  329. var _this = this;
  330. _this.jumpinfop('/incomeExcelInfo', 1, '新增模板', "")
  331. },
  332. toEdit(row) {
  333. var _this = this;
  334. _this.jumpinfop('/incomeExcelInfo', 2, '修改模板', row.id);
  335. },
  336. toView(row) {
  337. var _this = this;
  338. _this.jumpinfop('/documentCollectionApprovalExcel', 5, '查看', row.id);
  339. },
  340. toChuli(row) {
  341. var _this = this;
  342. _this.jumpinfop('/documentCollectionApprovalExcel', 4, '处理', row.id, row.status);
  343. },
  344. addNewIssued(row) {
  345. this.issuedParam = {
  346. templateId: row.id,
  347. };
  348. this.issuedAddStatus = true;
  349. },
  350. processNewIssued() {
  351. if (!this.issuedParam.editReason) {
  352. this.$message({
  353. message: '填报事由不能为空',
  354. type: 'error'
  355. });
  356. return;
  357. }
  358. if (!this.issuedParam.editRemark) {
  359. this.$message({
  360. message: '填报注意事项不能为空',
  361. type: 'error'
  362. });
  363. return;
  364. }
  365. if (!this.issuedParam.endTime) {
  366. this.$message({
  367. message: '截止时间不能为空',
  368. type: 'error'
  369. });
  370. return;
  371. }
  372. if (this.issuedParam.editReason.length > 240) {
  373. this.$message({
  374. message: '填报事由长度不能大于240字',
  375. type: 'error'
  376. });
  377. return;
  378. }
  379. if (this.issuedParam.editRemark.length > 240) {
  380. this.$message({
  381. message: '填报注意事项长度不能大于240字',
  382. type: 'error'
  383. });
  384. return;
  385. }
  386. var _this = this;
  387. //执行下发
  388. this.$http({
  389. url: '/market/cIncomeExcelIssued/addNewIssued',
  390. method: "post",
  391. headers: {
  392. "Content-Type": "application/json",
  393. },
  394. data: this.issuedParam,
  395. }).then((res) => {
  396. this.loading = false;
  397. if (res.data.result === 1) {
  398. _this.$message({
  399. message: res.data.desc,
  400. type: 'error'
  401. });
  402. } else {
  403. _this.$message({
  404. message: '下发成功',
  405. type: 'success'
  406. });
  407. this.issuedAddStatus = false;
  408. this.getList({}, 1);
  409. }
  410. });
  411. },
  412. //跳转页面
  413. jumpinfop(p, v, n, id, status) {
  414. this.$router.push({
  415. path: p,
  416. query: {
  417. type: v,
  418. id: id,
  419. status: status,
  420. }
  421. });
  422. this.setabList(n, p + '?type=' + v + '&id=' + id);
  423. },
  424. //新建一个页面
  425. setabList(n, p) {
  426. let params = {
  427. children: "",
  428. name: n,
  429. rountPath: p,
  430. target: "_self",
  431. };
  432. for (let i = 0; i < this.$store.state.tabList.length; i++) {
  433. if (this.$store.state.tabList[i].name === params.name) {
  434. this.$store.state.tabList[i] = params;
  435. }
  436. }
  437. let set = new Set([...this.$store.state.tabList, params]);
  438. set.add(params);
  439. this.$store.commit("setDefaultActive", params.rountPath);
  440. this.$store.commit("setTabList", Array.from(set));
  441. },
  442. getUrlKey(name) {
  443. return (
  444. decodeURIComponent(
  445. (new RegExp("[?|&]" + name + "=" + "([^&;]+?)(&|#|;|$)").exec(
  446. location.href
  447. ) || [, ""])[1].replace(/\+/g, "%20")
  448. ) || null
  449. );
  450. },
  451. },
  452. mounted() {
  453. this.getList({
  454. id: this.getUrlKey("id"),//获取地址栏参数
  455. }, 1);
  456. this.loginNo = JSON.parse(window.sessionStorage.userInfo).loginNo
  457. },
  458. created() {
  459. }
  460. }
  461. </script>
  462. <style scoped lang="scss">
  463. .titbox {
  464. div {
  465. float: right;
  466. i {
  467. font-size: 22px;
  468. margin-left: 20px;
  469. cursor: pointer;
  470. }
  471. }
  472. }
  473. .tabbox {
  474. margin-top: 16px;
  475. }
  476. .pageBox {
  477. text-align: right;
  478. margin-top: 10px;
  479. }
  480. .info-line {
  481. width: 100%;
  482. display: block;
  483. padding-left: 20px;
  484. div {
  485. width: 90%;
  486. display: inline-block;
  487. }
  488. span {
  489. width: 100px;
  490. display: inline-block;
  491. text-align: left;
  492. i {
  493. color: red;
  494. display: inline-block;
  495. padding-right: 5px;
  496. }
  497. }
  498. .el-select,
  499. .el-input {
  500. width: calc(100% - 150px);
  501. }
  502. }
  503. .online {
  504. width: 100%;
  505. .el-select {
  506. width: calc(100% - 100px);
  507. }
  508. span {
  509. vertical-align: top;
  510. }
  511. .el-textarea {
  512. width: calc(100% - 100px);
  513. }
  514. }
  515. </style>