confirmed-returns.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  1. <template>
  2. <basic-container>
  3. <avue-crud :option="option"
  4. :table-loading="loading"
  5. :data="data"
  6. :page.sync="page"
  7. :permission="permissionList"
  8. :before-open="beforeOpen"
  9. v-model="form"
  10. ref="crud"
  11. @row-update="rowUpdate"
  12. @row-save="rowSave"
  13. @row-del="rowDel"
  14. @search-change="searchChange"
  15. @search-reset="searchReset"
  16. @selection-change="selectionChange"
  17. @current-change="currentChange"
  18. @size-change="sizeChange"
  19. @refresh-change="refreshChange"
  20. @on-load="onLoad">
  21. <template slot="menuLeft">
  22. <el-button type="danger"
  23. size="small"
  24. icon="el-icon-delete"
  25. plain
  26. :disabled="delBatchBtn"
  27. v-if="permission.returns_delete"
  28. @click="handleDelete">刪 除
  29. </el-button>
  30. <el-button type="primary"
  31. size="small"
  32. icon="el-icon-upload"
  33. plain
  34. v-if="permission.returns_upload"
  35. @click="handleUpload">上 傳
  36. </el-button>
  37. <el-button type="success"
  38. size="small"
  39. icon="el-icon-setting"
  40. plain
  41. v-if="permission.returns_setting"
  42. @click="handleSetting">設置發佈人
  43. </el-button>
  44. <el-button type="primary"
  45. size="small"
  46. icon="el-icon-download"
  47. plain
  48. v-if="permission.returns_download"
  49. @click="handleDownload">下載
  50. </el-button>
  51. <el-button type="primary" size="small" :disabled="issueBatchBtn" v-if="permission.returns_issue" @click="issueBatch">批量發佈</el-button>
  52. <el-button type="primary" size="small" :disabled="approveBatchBtn" v-if="permission.returns_approve" @click="approveBatch"><i class="el-icon-check"></i>批量審批</el-button>
  53. </template>
  54. <template slot="menu" slot-scope="{row, index}">
  55. <el-button size="small" class="el-button--text" v-if="permission.returns_view" @click="$refs.crud.rowView(row, index)"><i class="el-icon-view"></i> 查 看</el-button>
  56. <el-button size="small" class="el-button--text" v-if="permission.returns_edit && row.process <= 2" @click="$refs.crud.rowEdit(row, index)"><i class="el-icon-edit"></i> 編 輯</el-button>
  57. <el-button size="small" class="el-button--text" v-if="permission.returns_delete && row.process <= 2" @click="$refs.crud.rowDel(row, index)"><i class="el-icon-delete"></i> 刪 除</el-button>
  58. <el-button size="small" class="el-button--text" v-if="permission.returns_issue && row.process == 2 && row.personNo == userInfo.user_ehr" @click="form = row,issueVisible = true">去發佈</el-button>
  59. <el-button size="small" class="el-button--text" v-if="permission.returns_approve && row.process == 3" @click="approve(row, index)"><i class="el-icon-check"></i> 確 認</el-button>
  60. </template>
  61. <template slot="process" slot-scope="{row, index}">
  62. <el-tag size="small " type="primary" plain v-if="row.process == 2">待發佈</el-tag>
  63. <el-tag size="small " type="warning" plain v-if="row.process == 3">待確認</el-tag>
  64. <el-tag size="small " type="success" plain v-if="row.process == 4">已確認</el-tag>
  65. </template>
  66. <template slot="personNo" slot-scope="{row}">
  67. <span v-if="row.process != 4">{{row.personName + '-' + row.personNo}}</span>
  68. </template>
  69. </avue-crud>
  70. <el-dialog title="文件上傳"
  71. append-to-body
  72. :visible.sync="attachBox"
  73. width="555px">
  74. <avue-form ref="form" :option="attachOption" v-model="attachForm" :upload-after="uploadAfter">
  75. </avue-form>
  76. </el-dialog>
  77. <el-dialog title="信息分解"
  78. append-to-body
  79. :visible.sync="temVisible"
  80. :fullscreen="true"
  81. :close-on-press-escape="false"
  82. @close="attachBox = false,onLoad(page)"
  83. >
  84. <returns-comfire :data="data2"></returns-comfire>
  85. </el-dialog>
  86. <el-dialog title="批量審核"
  87. append-to-body
  88. :visible.sync="approveBatchVisible"
  89. width="70%">
  90. <returns-approve-batch :data="this.selectionList" @close="approveBatchVisible = false, onLoad(page)"></returns-approve-batch>
  91. </el-dialog>
  92. <el-dialog title="信息確認"
  93. append-to-body
  94. :visible.sync="approveVisible"
  95. width="70%">
  96. <returns-approve :form="approveForm" @close="approveVisible = false, onLoad(page)"></returns-approve>
  97. </el-dialog>
  98. <el-dialog :append-to-body="true" :modal-append-to-body="false" :visible.sync="settingVisible" title="設置發佈人">
  99. <flow-settings :id="personId" :ehr="personNo" :name="personName" :callback="settingCallback" @close="settingVisible = false"></flow-settings>
  100. </el-dialog>
  101. <el-dialog :append-to-body="true" :modal-append-to-body="false" :visible.sync="issueVisible">
  102. <returns-issue :form="form" @close="issueVisible = false, onLoad(page)"></returns-issue>
  103. </el-dialog>
  104. </basic-container>
  105. </template>
  106. <script>
  107. import {getList, getDetail, add, update, remove, returnsSubmit, settingSave, getSetting, issue, getDownloadList} from "@/api/bank/returns";
  108. import {mapGetters} from "vuex";
  109. import {dateFormat} from "../../util/date";
  110. import ReturnsComfire from "../../components/common/returns-comfire";
  111. import ReturnsApprove from "../../components/common/returns-approve";
  112. import FlowSettings from "../../components/common/flow-settings";
  113. import ReturnsIssue from "../../components/common/returns-issue";
  114. import {getDeptTree, getTree} from "@/api/system/dept";
  115. import {getStandardByCode} from "@/api/bank/handoverstandard";
  116. import ReturnsApproveBatch from "../../components/common/returns-approve-batch";
  117. import {getDictValue} from "../../api/system/dict";
  118. export default {
  119. name: "confirmed-returns",
  120. components: {ReturnsApproveBatch, ReturnsIssue, FlowSettings, ReturnsApprove, ReturnsComfire},
  121. data() {
  122. return {
  123. personId: null,
  124. personNo: null,
  125. personName: null,
  126. settingVisible: false,
  127. issueVisible: false,
  128. delBatchBtn: true,
  129. issueBatchBtn: true,
  130. approveBatchBtn: false,
  131. form: {},
  132. approveForm: {},
  133. query: {},
  134. loading: true,
  135. temVisible: false,
  136. approveVisible: false,
  137. approveBatchVisible: false,
  138. page: {
  139. pageSize: 10,
  140. currentPage: 1,
  141. total: 0
  142. },
  143. selectionList: [],
  144. option: {
  145. addTitle: '新增【新開戶退件登記表】',
  146. editTitle: '編輯【新開戶退件登記表】',
  147. viewTitle: '查看【新開戶退件登記表】',
  148. height:'auto',
  149. calcHeight: 30,
  150. tip: false,
  151. searchShow: true,
  152. searchMenuSpan: 6,
  153. border: true,
  154. index: true,
  155. viewBtn: false,
  156. editBtn: false,
  157. addBtn: false,
  158. delBtn: false,
  159. selection: true,
  160. dialogClickModal: false,
  161. column: [
  162. {
  163. label: "業務類型",
  164. prop: "isPublic",
  165. type: "select",
  166. search: true,
  167. searchSpan: 4,
  168. dataType: "string",
  169. dicUrl: `/api/blade-system/dict/dictionary?code=business_type`,
  170. props: {
  171. label: "dictValue",
  172. value: "dictKey"
  173. },
  174. dicFormatter: (res) => {
  175. res.data.forEach(item => {item.disabled = item.isSealed == 1;})
  176. return res.data;
  177. },
  178. rules: [{
  179. required: true,
  180. message: "請輸入業務類型",
  181. trigger: "blur"
  182. }]
  183. },
  184. {
  185. label: "銀行號",
  186. prop: "bankNo",
  187. search: true,
  188. searchSpan: 4,
  189. rules: [{
  190. required: true,
  191. message: "請輸入銀行號",
  192. trigger: "blur"
  193. }]
  194. },
  195. {
  196. label: "機構號",
  197. prop: "orgNo",
  198. rules: [{
  199. required: true,
  200. message: "請輸入機構號",
  201. trigger: "blur"
  202. }]
  203. },
  204. {
  205. label: "區域/支行",
  206. prop: "orgNos",
  207. hide: true,
  208. display: false,
  209. searchMultiple: true,
  210. search: true,
  211. type: "tree",
  212. dicData: [],
  213. props: {
  214. label: "title",
  215. value: "key"
  216. },
  217. checkStrictly: true,
  218. rules: [{
  219. required: true,
  220. message: "請輸入機構號",
  221. trigger: "blur"
  222. }]
  223. },
  224. /*{
  225. label: "序號",
  226. prop: "serialNo",
  227. rules: [{
  228. required: true,
  229. message: "請輸入序號",
  230. trigger: "blur"
  231. }]
  232. },*/
  233. {
  234. label: "支行",
  235. prop: "subBank",
  236. rules: [{
  237. required: true,
  238. message: "請輸入支行",
  239. trigger: "blur"
  240. }]
  241. },
  242. {
  243. label: "支行機構號",
  244. prop: "subOrgNo",
  245. rules: [{
  246. required: true,
  247. message: "請輸入支行機構號",
  248. trigger: "blur"
  249. }]
  250. },
  251. {
  252. label: "客戶名稱",
  253. prop: "customerName",
  254. rules: [{
  255. required: true,
  256. message: "請輸入客戶名稱",
  257. trigger: "blur"
  258. }]
  259. },
  260. {
  261. label: "狀態",
  262. prop: "status",
  263. type: "select",
  264. dataType: "string",
  265. dicUrl: `/api/blade-system/dict/dictionary?code=returns_status`,
  266. props: {
  267. label: "dictValue",
  268. value: "dictKey"
  269. },
  270. dicFormatter: (res) => {
  271. res.data.forEach(item => {item.disabled = item.isSealed == 1;})
  272. return res.data;
  273. },
  274. rules: [{
  275. required: true,
  276. message: "請輸入狀態",
  277. trigger: "blur"
  278. }]
  279. },
  280. {
  281. label: "退件原因",
  282. prop: "reason",
  283. rules: [{
  284. required: true,
  285. message: "請輸入退件原因",
  286. trigger: "blur"
  287. }]
  288. },
  289. {
  290. label: "備註",
  291. prop: "remark",
  292. rules: [{
  293. required: false,
  294. message: "請輸入備註",
  295. trigger: "blur"
  296. }]
  297. },
  298. {
  299. label: "條碼",
  300. prop: "barCode",
  301. rules: [{
  302. required: false,
  303. message: "請輸入條碼",
  304. trigger: "blur"
  305. }]
  306. },
  307. {
  308. label: "接辦行經辦",
  309. prop: "handlingBank",
  310. search: true,
  311. searchSpan: 4,
  312. rules: [{
  313. required: true,
  314. message: "請輸入接辦行經辦",
  315. trigger: "blur"
  316. }]
  317. },
  318. {
  319. label: "接辦行覆核",
  320. prop: "handlingBankReview",
  321. search: true,
  322. searchSpan: 4,
  323. rules: [{
  324. required: false,
  325. message: "請輸入接辦行覆核",
  326. trigger: "blur"
  327. }]
  328. },
  329. {
  330. label: "處理日期",
  331. prop: "handlingDate",
  332. type: "date",
  333. format: "yyyy-MM-dd",
  334. valueFormat: "yyyy-MM-dd",
  335. rules: [{
  336. required: true,
  337. message: "請輸入處理日期",
  338. trigger: "blur"
  339. }]
  340. },
  341. {
  342. label: "退件日期",
  343. prop: "handlingDateRange",
  344. type: "date",
  345. format: "yyyy-MM-dd",
  346. valueFormat: "yyyy-MM-dd",
  347. searchRange:true,
  348. hide: true,
  349. addDisplay: false,
  350. editDisplay: false,
  351. viewDisplay: false,
  352. search: true,
  353. rules: [{
  354. required: true,
  355. message: "請輸入交接日期",
  356. trigger: "blur"
  357. }]
  358. },
  359. {
  360. label: "經辦",
  361. prop: "handler",
  362. rules: [{
  363. required: true,
  364. message: "請輸入經辦",
  365. trigger: "blur"
  366. }]
  367. },
  368. {
  369. label: "跟進情況",
  370. prop: "handlingStatus",
  371. type: "select",
  372. dataType: "string",
  373. dicUrl: `/api/blade-system/dict/dictionary?code=processing_status`,
  374. props: {
  375. label: "dictValue",
  376. value: "dictKey"
  377. },
  378. dicFormatter: (res) => {
  379. res.data.forEach(item => {item.disabled = item.isSealed == 1;})
  380. return res.data;
  381. },
  382. rules: [{
  383. required: false,
  384. message: "請輸入跟進情況",
  385. trigger: "blur"
  386. }]
  387. },
  388. {
  389. label: "支行備註",
  390. prop: "bankRemark",
  391. viewDisplay: false,
  392. editDisplay: false,
  393. // hide: true,
  394. rules: [{
  395. required: false,
  396. message: "請輸入支行備註",
  397. trigger: "blur"
  398. }]
  399. },
  400. {
  401. label: "支行確認人員工號",
  402. prop: "bankConfirmNo",
  403. viewDisplay: false,
  404. editDisplay: false,
  405. // hide: true,
  406. rules: [{
  407. required: true,
  408. message: "請輸入支行確認人員工號",
  409. trigger: "blur"
  410. }]
  411. },
  412. {
  413. label: "支行確認人姓名",
  414. prop: "bankConfirmName",
  415. viewDisplay: false,
  416. editDisplay: false,
  417. // hide: true,
  418. rules: [{
  419. required: true,
  420. message: "請輸入支行確認人姓名",
  421. trigger: "blur"
  422. }]
  423. },
  424. {
  425. label: "確認日期",
  426. prop: "bankConfirmTime",
  427. type: "datetime",
  428. format: "yyyy-MM-dd HH:mm:ss",
  429. valueFormat: "yyyy-MM-dd HH:mm:ss",
  430. viewDisplay: false,
  431. editDisplay: false,
  432. // hide: true,
  433. rules: [{
  434. required: true,
  435. message: "請輸入確認日期",
  436. trigger: "blur"
  437. }]
  438. },
  439. /*{
  440. label: "待辦人",
  441. prop: 'personNo'
  442. },*/
  443. {
  444. label: "進度",
  445. prop: "process",
  446. viewDisplay: false,
  447. editDisplay: false,
  448. rules: [{
  449. required: true,
  450. message: "請輸入節點",
  451. trigger: "blur"
  452. }]
  453. },
  454. ]
  455. },
  456. data: [],
  457. data2: [],
  458. temForm: {},
  459. attachForm: {},
  460. attachBox: false,
  461. attachOption: {
  462. submitBtn: false,
  463. emptyBtn: false,
  464. column: [
  465. {
  466. label: '文件上傳',
  467. prop: 'attachFile',
  468. type: 'upload',
  469. drag: true,
  470. loadText: '文件上傳中,請稍等',
  471. span: 24,
  472. propsHttp: {
  473. res: 'data'
  474. },
  475. action: "/api/bank/returns/readExcel"
  476. }
  477. ]
  478. }
  479. };
  480. },
  481. computed: {
  482. ...mapGetters(["permission"]),
  483. ...mapGetters(["userInfo"]),
  484. permissionList() {
  485. return {
  486. addBtn: this.vaildData(this.permission.returns_add, false),
  487. viewBtn: this.vaildData(this.permission.returns_view, false),
  488. delBtn: this.vaildData(this.permission.returns_delete, false),
  489. editBtn: this.vaildData(this.permission.returns_edit, false)
  490. };
  491. },
  492. ids() {
  493. let ids = [];
  494. this.selectionList.forEach(ele => {
  495. ids.push(ele.id);
  496. });
  497. return ids.join(",");
  498. }
  499. },
  500. mounted() {
  501. getDeptTree().then(res => {
  502. const column = this.findObject(this.option.column, "orgNos");
  503. let treeData = getTree(res.data.data, this.userInfo.dept_id);
  504. column.dicData = treeData;
  505. });
  506. getStandardByCode("returns").then(res => {
  507. const data = res.data.data;
  508. if (data){
  509. this.option.addTitle = data.content;
  510. this.option.editTitle = data.content;
  511. this.option.viewTitle = data.content;
  512. }
  513. });
  514. },
  515. methods: {
  516. settingCallback(row){
  517. this.form.personId = row.personId;
  518. this.form.personNo = row.personNo;
  519. this.form.personName = row.personName;
  520. settingSave(this.form).then(() => {
  521. this.onLoad(this.page);
  522. this.$message({
  523. type: "success",
  524. message: "操作成功!"
  525. });
  526. }, error => {
  527. window.console.log('error');
  528. });
  529. },
  530. handleDownload(){
  531. if (this.selectionList.length === 0) {
  532. let tip = "確定下載篩選的" + this.page.total + "條數據嗎?"
  533. this.$confirm(tip, {
  534. confirmButtonText: "確定",
  535. cancelButtonText: "取消",
  536. type: "warning"
  537. })
  538. .then(() => {
  539. getDownloadList(this.query).then(res => {
  540. let data = res.data.data;
  541. if (data && data.length > 0){
  542. data.forEach(item => {
  543. item.status = item.returnStatus;
  544. });
  545. }
  546. this.downLoadData(data, true)
  547. });
  548. })
  549. }else{
  550. this.downLoadData(this.selectionList, false)
  551. }
  552. },
  553. downLoadData(data, isAll){
  554. let columns = this.deepClone(this.option.column);
  555. for (let i = 0; i < columns.length; i++) {
  556. let item = columns[i];
  557. if (item.hide || item.prop == 'process'){
  558. columns.splice(i, 1);
  559. i--;
  560. }
  561. if (!isAll && (item.type == 'select' || item.type == 'tree')){
  562. item.prop = '$' + item.prop;
  563. }
  564. }
  565. this.$Export.excel({
  566. title: "新開戶退件登記表" || new Date().getTime(),
  567. columns: columns,
  568. data: data
  569. });
  570. },
  571. handleSetting(){
  572. getSetting().then((res) => {
  573. let data = res.data.data;
  574. if (!!data){
  575. this.personId = data.personId;
  576. this.personNo = data.personNo;
  577. this.personName = data.personName;
  578. }
  579. });
  580. this.settingVisible = true;
  581. },
  582. issueBatch(){
  583. let _this = this;
  584. this.$confirm("確定將選擇數據發佈?", {
  585. confirmButtonText: "確定",
  586. cancelButtonText: "取消",
  587. type: "warning"
  588. })
  589. .then(() => {
  590. for (let i = 0; i < this.selectionList.length; i++) {
  591. let row = this.selectionList[i];
  592. issue(row).then(() => {})
  593. }
  594. this.$confirm("批量發佈成功!",{
  595. type: "success",
  596. showCancelButton: false,
  597. showClose: false,
  598. }).then(() => {
  599. _this.onLoad(this.page)
  600. })
  601. })
  602. },
  603. approveBatch(){
  604. this.$refs.crud.toggleSelection();
  605. let toApproveArr = [];
  606. for (let i = 0; i < this.data.length; i++) {
  607. let item = this.data[i];
  608. if (item.process == 3){
  609. toApproveArr.push(item)
  610. }
  611. }
  612. if (toApproveArr.length == 0){
  613. this.$message.warning("當前頁沒有符合條件的記錄!")
  614. return;
  615. }
  616. this.$refs.crud.toggleSelection(toApproveArr);
  617. this.approveBatchVisible = true;
  618. },
  619. approve(row, index){
  620. this.approveVisible = true;
  621. this.approveForm = row;
  622. },
  623. infoFormat(row){
  624. row.isPublic = row.isPublic == '對公' ? 1 : 0;
  625. let arr = row.subBank.split(' ');
  626. row.subOrgNo = arr[0];
  627. row.subBank = arr[1];
  628. if (row.status == '退件'){
  629. row.status = '1';
  630. }else if (row.status == 'HOLD'){
  631. row.status = '2';
  632. }else if (row.status == '完成'){
  633. row.status = '3';
  634. }
  635. /*let userInfoStr = localStorage.getItem("saber-userInfo");
  636. let userInfo = JSON.parse(userInfoStr);
  637. row.bankConfirmNo = userInfo.content.user_ehr;
  638. row.bankConfirmName = userInfo.content.user_name;
  639. row.bankConfirmTime = dateFormat(new Date(), "yyyy-MM-dd HH:mm:ss");*/
  640. return row;
  641. },
  642. uploadAfter(res, done, loading, column){
  643. if (res && res.length > 0){
  644. for (let i = 0; i < res.length; i++) {
  645. let row = res[i];
  646. row = this.infoFormat(row);
  647. }
  648. this.data2 = res;
  649. }
  650. this.temVisible = true;
  651. loading = false;
  652. done();
  653. },
  654. handleUpload(){
  655. this.attachBox = true;
  656. },
  657. rowSave(row, done, loading) {
  658. add(row).then(() => {
  659. this.onLoad(this.page);
  660. this.$message({
  661. type: "success",
  662. message: "操作成功!"
  663. });
  664. done();
  665. }, error => {
  666. loading();
  667. window.console.log(error);
  668. });
  669. },
  670. rowUpdate(row, index, done, loading) {
  671. update(row).then(() => {
  672. this.onLoad(this.page);
  673. this.$message({
  674. type: "success",
  675. message: "操作成功!"
  676. });
  677. done();
  678. }, error => {
  679. loading();
  680. console.log(error);
  681. });
  682. },
  683. rowDel(row) {
  684. this.$confirm("確定將選擇數據刪除?", {
  685. confirmButtonText: "確定",
  686. cancelButtonText: "取消",
  687. type: "warning"
  688. })
  689. .then(() => {
  690. return remove(row.id);
  691. })
  692. .then(() => {
  693. this.onLoad(this.page);
  694. this.$message({
  695. type: "success",
  696. message: "操作成功!"
  697. });
  698. });
  699. },
  700. handleDelete() {
  701. if (this.selectionList.length === 0) {
  702. this.$message.warning("請選擇至少一條數據");
  703. return;
  704. }
  705. this.$confirm("確定將選擇數據刪除?", {
  706. confirmButtonText: "確定",
  707. cancelButtonText: "取消",
  708. type: "warning"
  709. })
  710. .then(() => {
  711. return remove(this.ids);
  712. })
  713. .then(() => {
  714. this.onLoad(this.page);
  715. this.$message({
  716. type: "success",
  717. message: "操作成功!"
  718. });
  719. this.$refs.crud.toggleSelection();
  720. });
  721. },
  722. beforeOpen(done, type) {
  723. if (["edit", "view"].includes(type)) {
  724. /*getDetail(this.form.id).then(res => {
  725. this.form = res.data.data;
  726. });*/
  727. if (type == "view"){
  728. this.findObject(this.option.column, "bankRemark").viewDisplay = this.form.process == 4;
  729. this.findObject(this.option.column, "bankConfirmNo").viewDisplay = this.form.process == 4;
  730. this.findObject(this.option.column, "bankConfirmName").viewDisplay = this.form.process == 4;
  731. this.findObject(this.option.column, "bankConfirmTime").viewDisplay = this.form.process == 4;
  732. }
  733. }
  734. done();
  735. },
  736. searchReset() {
  737. this.query = {};
  738. this.onLoad(this.page);
  739. },
  740. searchChange(params, done) {
  741. if (params.handlingDateRange){
  742. params.handlingDate_begin = params.handlingDateRange[0], params.handlingDate_end = params.handlingDateRange[1];
  743. params.handlingDateRange = null;
  744. }
  745. if (params.orgNos){
  746. params.orgNostr = params.orgNos.join();
  747. params.orgNos = '';
  748. }
  749. this.query = params;
  750. this.page.currentPage = 1;
  751. this.onLoad(this.page, params);
  752. done();
  753. },
  754. selectionChange(list) {
  755. this.selectionList = list;
  756. if (list && list.length > 0){
  757. let issueFlag = true, approveFlag = true, delFlag = true;
  758. for (let i = 0; i < list.length; i++) {
  759. let item = list[i];
  760. delFlag = delFlag && item.process <= 2;
  761. issueFlag = issueFlag && item.process == 2 && item.personNo == this.userInfo.user_ehr;
  762. approveFlag = approveFlag && item.process == 3;
  763. }
  764. this.delBatchBtn = !delFlag;
  765. this.issueBatchBtn = !issueFlag;
  766. // this.approveBatchBtn = !approveFlag;
  767. }else{
  768. this.delBatchBtn = true;
  769. this.issueBatchBtn = true;
  770. // this.approveBatchBtn = true;
  771. }
  772. },
  773. selectionClear() {
  774. this.selectionList = [];
  775. this.$refs.crud.toggleSelection();
  776. },
  777. currentChange(currentPage){
  778. this.page.currentPage = currentPage;
  779. },
  780. sizeChange(pageSize){
  781. this.page.pageSize = pageSize;
  782. },
  783. refreshChange() {
  784. this.onLoad(this.page, this.query);
  785. },
  786. onLoad(page, params = {}) {
  787. this.loading = true;
  788. params.process = 4; //確認
  789. params.personId = this.userInfo.user_id;
  790. getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
  791. const data = res.data.data;
  792. this.page.total = data.total;
  793. this.data = data.records;
  794. this.loading = false;
  795. this.selectionClear();
  796. });
  797. }
  798. }
  799. };
  800. </script>
  801. <style>
  802. </style>