index.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. <template>
  2. <div class="app-container">
  3. <div style="background-color: #fff;padding: 20px; border-radius: 5px;" class="instabf">
  4. <el-form class="jugesfrss sousde" :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="108px">
  5. <el-row>
  6. <el-col :span="24">
  7. <p class='jivbf'> <img src="../../../assets/images/icon_htgl_cxtj.png" alt="" style="width:15px;height: 15px;">查询条件</p>
  8. </el-col>
  9. <el-col :span="8">
  10. <el-form-item label="贷款申请编号" prop="loanApplicationNumber">
  11. <el-input
  12. v-model="queryParams.loanApplicationNumber"
  13. placeholder="请输入贷款申请编号"
  14. clearable
  15. @keyup.enter.native="handleQuery"
  16. />
  17. </el-form-item>
  18. </el-col>
  19. <el-col :span="8">
  20. <el-form-item label="提醒标题" prop="remindTitle">
  21. <el-input
  22. v-model="queryParams.remindTitle"
  23. placeholder="请输入提醒标题"
  24. clearable
  25. @keyup.enter.native="handleQuery"
  26. />
  27. </el-form-item>
  28. </el-col>
  29. <el-col :span="8">
  30. <el-form-item label="提醒类型" prop="remindType">
  31. <el-select v-model="queryParams.remindType" placeholder="请选择提醒类型" clearable>
  32. <el-option
  33. v-for="dict in dict.type.remind_type"
  34. :key="dict.value"
  35. :label="dict.label"
  36. :value="dict.value"
  37. />
  38. </el-select>
  39. </el-form-item>
  40. </el-col>
  41. <!-- <el-col :span="8">
  42. <el-form-item label="是否已读" prop="isRead">
  43. <el-select v-model="queryParams.isRead" placeholder="请选择是否已读s" clearable>
  44. <el-option
  45. v-for="dict in dict.type.is_read"
  46. :key="dict.value"
  47. :label="dict.label"
  48. :value="dict.value"
  49. />
  50. </el-select>
  51. </el-form-item>
  52. </el-col> -->
  53. <el-col :span="8">
  54. <el-form-item class="qiuchu">
  55. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  56. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  57. </el-form-item>
  58. </el-col>
  59. </el-row>
  60. </el-form>
  61. <div class="ntgs">
  62. <p class='jivb'><span>待办信息</span></p>
  63. <el-row :gutter="10" class="mb8">
  64. <el-col :span="1.5">
  65. <el-button
  66. type="primary"
  67. plain
  68. icon="el-icon-plus"
  69. size="mini"
  70. @click="handleAdd"
  71. v-hasPermi="['system:remind:add']"
  72. >新增</el-button>
  73. </el-col>
  74. <el-col :span="1.5">
  75. <el-button
  76. type="danger"
  77. plain
  78. icon="el-icon-delete"
  79. size="mini"
  80. :disabled="multiple"
  81. @click="handleDelete"
  82. v-hasPermi="['system:remind:remove']"
  83. >删除</el-button>
  84. </el-col>
  85. <el-col :span="1.5">
  86. <el-button
  87. type="warning"
  88. plain
  89. icon="el-icon-download"
  90. size="mini"
  91. @click="handleExport"
  92. v-hasPermi="['system:remind:export']"
  93. >导出</el-button>
  94. </el-col>
  95. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  96. </el-row>
  97. <el-table v-loading="loading" :data="remindList" @selection-change="handleSelectionChange">
  98. <el-table-column type="selection" width="55" align="center" />
  99. <el-table-column label="贷款申请编号" align="center" prop="loanApplicationNumber" />
  100. <el-table-column label="提醒标题" align="center" prop="remindTitle" />
  101. <el-table-column label="提醒类型" align="center" prop="remindType">
  102. <template slot-scope="scope">
  103. <dict-tag :options="dict.type.remind_type" :value="scope.row.remindType"/>
  104. </template>
  105. </el-table-column>
  106. <el-table-column label="提醒内容" align="center" prop="remindContent" />
  107. <el-table-column label="提醒时间" align="center" prop="remindTime" width="180">
  108. <template slot-scope="scope">
  109. <span>{{scope.row.remindTime}}</span>
  110. </template>
  111. </el-table-column>
  112. <!-- <el-table-column label="已读过的用户ID" align="center" prop="readUserId" /> -->
  113. <!-- <el-table-column label="是否已读" align="center" prop="isRead">
  114. <template slot-scope="scope">
  115. <dict-tag :options="dict.type.is_read" :value="scope.row.isRead"/>
  116. </template>
  117. </el-table-column> -->
  118. <el-table-column label="备注" align="center" prop="remark" />
  119. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  120. <template slot-scope="scope">
  121. <!-- <el-button
  122. size="mini"
  123. type="text"
  124. icon="el-icon-edit"
  125. @click="handleUpdate(scope.row)"
  126. v-hasPermi="['system:remind:edit']"
  127. >修改</el-button> -->
  128. <el-button
  129. size="mini"
  130. type="text"
  131. icon="el-icon-edit"
  132. v-if="scope.row.remindType != 13 &&scope.row.remindType != 12 "
  133. @click="handleUpdatech(scope.row)"
  134. >查看详情</el-button>
  135. <el-button
  136. size="mini"
  137. type="text"
  138. icon="el-icon-edit"
  139. v-if="scope.row.remindType == 12"
  140. @click="handleUpdatechxq(scope.row)"
  141. >查看详情</el-button>
  142. <el-button
  143. size="mini"
  144. type="text"
  145. icon="el-icon-edit"
  146. v-if="scope.row.remindType == 13"
  147. @click="handleUpdatechxqbao(scope.row)"
  148. >查看详情</el-button>
  149. <el-button
  150. size="mini"
  151. type="text"
  152. icon="el-icon-delete"
  153. @click="handleDelete(scope.row)"
  154. v-hasPermi="['system:remind:remove']"
  155. >删除</el-button>
  156. </template>
  157. </el-table-column>
  158. </el-table>
  159. <pagination
  160. v-show="total>0"
  161. :total="total"
  162. :page.sync="queryParams.pageNum"
  163. :limit.sync="queryParams.pageSize"
  164. @pagination="getList"
  165. />
  166. </div>
  167. </div>
  168. <!-- 添加或修改待办提醒对话框 -->
  169. <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
  170. <el-form ref="form" :model="form" :rules="rules" label-width="100px">
  171. <el-row>
  172. <el-col :span="12">
  173. <el-form-item label="贷款申请编号" prop="loanApplicationNumber">
  174. <el-input v-model="form.loanApplicationNumber" placeholder="请输入贷款申请编号" />
  175. </el-form-item>
  176. </el-col>
  177. <el-col :span="12">
  178. <el-form-item label="提醒标题" prop="remindTitle">
  179. <el-input v-model="form.remindTitle" placeholder="请输入提醒标题" />
  180. </el-form-item>
  181. </el-col>
  182. <el-col :span="12">
  183. <el-form-item label="提醒类型" prop="remindType">
  184. <el-select v-model="form.remindType" placeholder="请选择提醒类型">
  185. <el-option
  186. v-for="dict in dict.type.remind_type"
  187. :key="dict.value"
  188. :label="dict.label"
  189. :value="dict.value"
  190. ></el-option>
  191. </el-select>
  192. </el-form-item>
  193. </el-col>
  194. <el-col :span="12">
  195. <el-form-item label="提醒时间" prop="remindTime">
  196. <el-date-picker clearable
  197. v-model="form.remindTime"
  198. type="date"
  199. value-format="yyyy-MM-dd"
  200. placeholder="请选择提醒时间">
  201. </el-date-picker>
  202. </el-form-item>
  203. </el-col>
  204. <el-col :span="24">
  205. <el-form-item label="提醒内容">
  206. <editor v-model="form.remindContent" :min-height="192"/>
  207. </el-form-item>
  208. </el-col>
  209. <el-col :span="24">
  210. <el-form-item label="备注" prop="remark">
  211. <el-input v-model="form.remark" placeholder="请输入备注" />
  212. </el-form-item>
  213. </el-col>
  214. </el-row>
  215. </el-form>
  216. <div slot="footer" class="dialog-footer">
  217. <el-button type="primary" @click="submitForm">确 定</el-button>
  218. <el-button @click="cancel">取 消</el-button>
  219. </div>
  220. </el-dialog>
  221. </div>
  222. </template>
  223. <script>
  224. import { listRemind, getRemind, delRemind, addRemind, updateRemind } from "@/api/dabgs/remind";
  225. export default {
  226. name: "Remind",
  227. dicts: ['remind_type', 'is_read'],
  228. data() {
  229. return {
  230. // 遮罩层
  231. loading: true,
  232. // 选中数组
  233. ids: [],
  234. // 非单个禁用
  235. single: true,
  236. // 非多个禁用
  237. multiple: true,
  238. // 显示搜索条件
  239. showSearch: true,
  240. // 总条数
  241. total: 0,
  242. // 待办提醒表格数据
  243. remindList: [],
  244. // 弹出层标题
  245. title: "",
  246. // 是否显示弹出层
  247. open: false,
  248. // 查询参数
  249. queryParams: {
  250. pageNum: 1,
  251. pageSize: 10,
  252. loanApplicationId: null,
  253. loanApplicationNumber: null,
  254. remindTitle: null,
  255. remindType: null,
  256. remindContent: null,
  257. remindTime: null,
  258. readUserId: null,
  259. isRead: null,
  260. status: null,
  261. },
  262. // 表单参数
  263. form: {},
  264. // 表单校验
  265. rules: {
  266. loanApplicationId: [
  267. { required: true, message: "贷款申请id不能为空", trigger: "blur" }
  268. ],
  269. loanApplicationNumber: [
  270. { required: true, message: "贷款申请编号不能为空", trigger: "blur" }
  271. ],
  272. remindTitle: [
  273. { required: true, message: "提醒标题不能为空", trigger: "blur" }
  274. ],
  275. remindType: [
  276. { required: true, message: "提醒类型不能为空", trigger: "change" }
  277. ],
  278. readUserId: [
  279. { required: true, message: "已读过的用户ID不能为空", trigger: "blur" }
  280. ],
  281. }
  282. };
  283. },
  284. created() {
  285. this.getList();
  286. },
  287. methods: {
  288. /** 查询待办提醒列表 */
  289. getList() {
  290. this.loading = true;
  291. this.queryParams.userId = this.$store.state.user.id
  292. listRemind(this.queryParams).then(response => {
  293. this.remindList = response.rows;
  294. this.total = response.total;
  295. this.loading = false;
  296. });
  297. },
  298. // 取消按钮
  299. cancel() {
  300. this.open = false;
  301. this.reset();
  302. },
  303. handleUpdatech(row){
  304. const loanApplicationId = row.loanApplicationId || this.ids
  305. this.$router.push({
  306. path: '/shenbaoxinx/bjq',
  307. query: {
  308. 'id':loanApplicationId,
  309. 'isxz':2,
  310. 'bh':row.loanApplicationNumber
  311. }
  312. })
  313. },
  314. handleUpdatechxq(row){
  315. const loanApplicationId = row.loanApplicationId || this.ids
  316. this.$router.push({
  317. path: '/bjqsh',
  318. query: {
  319. 'id':loanApplicationId,
  320. 'isxz':2,
  321. 'bh':row.loanApplicationNumber,
  322. 'issh':true
  323. }
  324. })
  325. },
  326. handleUpdatechxqbao(row){
  327. const loanApplicationId = row.loanApplicationId || this.ids
  328. this.$router.push({
  329. path: '/shenbaoxinx/bjqbao',
  330. query: {
  331. 'id':loanApplicationId,
  332. 'isxz':2,
  333. 'bh':row.loanApplicationNumber
  334. }
  335. })
  336. },
  337. // 表单重置
  338. reset() {
  339. this.form = {
  340. remindId: null,
  341. loanApplicationId: null,
  342. loanApplicationNumber: null,
  343. remindTitle: null,
  344. remindType: null,
  345. remindContent: null,
  346. remindTime: null,
  347. readUserId: null,
  348. isRead: null,
  349. status: null,
  350. createBy: null,
  351. createTime: null,
  352. updateBy: null,
  353. updateTime: null,
  354. remark: null
  355. };
  356. this.resetForm("form");
  357. },
  358. /** 搜索按钮操作 */
  359. handleQuery() {
  360. this.queryParams.pageNum = 1;
  361. this.getList();
  362. },
  363. /** 重置按钮操作 */
  364. resetQuery() {
  365. this.resetForm("queryForm");
  366. this.handleQuery();
  367. },
  368. // 多选框选中数据
  369. handleSelectionChange(selection) {
  370. this.ids = selection.map(item => item.remindId)
  371. this.single = selection.length!==1
  372. this.multiple = !selection.length
  373. },
  374. /** 新增按钮操作 */
  375. handleAdd() {
  376. this.reset();
  377. this.open = true;
  378. this.title = "添加待办提醒";
  379. },
  380. /** 修改按钮操作 */
  381. handleUpdate(row) {
  382. this.reset();
  383. const remindId = row.remindId || this.ids
  384. getRemind(remindId).then(response => {
  385. this.form = response.data;
  386. this.open = true;
  387. this.title = "修改待办提醒";
  388. });
  389. },
  390. /** 提交按钮 */
  391. submitForm() {
  392. this.$refs["form"].validate(valid => {
  393. if (valid) {
  394. if (this.form.remindId != null) {
  395. updateRemind(this.form).then(response => {
  396. this.$modal.msgSuccess("修改成功");
  397. this.open = false;
  398. this.getList();
  399. });
  400. } else {
  401. addRemind(this.form).then(response => {
  402. this.$modal.msgSuccess("新增成功");
  403. this.open = false;
  404. this.getList();
  405. });
  406. }
  407. }
  408. });
  409. },
  410. /** 删除按钮操作 */
  411. handleDelete(row) {
  412. const remindIds = row.remindId || this.ids;
  413. this.$modal.confirm('是否确认删除待办提醒编号为"' + remindIds + '"的数据项?').then(function() {
  414. return delRemind(remindIds);
  415. }).then(() => {
  416. this.getList();
  417. this.$modal.msgSuccess("删除成功");
  418. }).catch(() => {});
  419. },
  420. /** 导出按钮操作 */
  421. handleExport() {
  422. this.download('system/remind/export', {
  423. ...this.queryParams
  424. }, `remind_${new Date().getTime()}.xlsx`)
  425. }
  426. }
  427. };
  428. </script>
  429. <style lang="scss">
  430. .instabf{
  431. .el-table .el-table__fixed-header-wrapper th{
  432. background-color:#F1F9FD;
  433. }
  434. .el-table .el-table__header-wrapper th{
  435. background-color:#F1F9FD;
  436. }
  437. }
  438. .sousde{
  439. .el-form-item--small.el-form-item{
  440. border: 1px solid #E6E6E6;
  441. }
  442. .el-input--small .el-input__inner{
  443. border: 0;
  444. }
  445. .qiuchu{
  446. border:0 !important;
  447. }
  448. }
  449. .nhgrls{
  450. .el-dialog__body{
  451. padding: 0;
  452. }
  453. }
  454. .hyr{
  455. span{
  456. text-decoration:underline;
  457. }
  458. }
  459. </style>
  460. <style scoped lang="scss">
  461. .iuer{
  462. display: flex;
  463. justify-content: space-between;
  464. align-items: center;
  465. .ite{
  466. display: flex;
  467. justify-content: space-between;
  468. align-items: center;
  469. p{
  470. cursor:pointer;
  471. margin: 0;
  472. font-size: 15px;
  473. font-family: PingFang SC;
  474. font-weight: 500;
  475. color:#666666;
  476. padding: 4px 12px;
  477. background: #Fff;
  478. border-radius: 4px;
  479. margin-right: 20px;
  480. position: relative;
  481. }
  482. .actt{
  483. background: #fff;
  484. // border-bottom: 3px solid #5974E0;
  485. // border-radius: 0;
  486. // border-bottom-right-radius: 4px;
  487. color: #5974E0;
  488. }
  489. .actt{
  490. &::after {
  491. content: "";
  492. width: 40%;
  493. height: 5px;
  494. border-radius: 3px;
  495. transform: translate(-50%);
  496. background-color: #5974E0;
  497. position: absolute;
  498. left: 50%;
  499. bottom:-3px;
  500. }
  501. }
  502. }
  503. }
  504. .lqw{
  505. padding: 0 10px;
  506. margin: 0;
  507. margin-bottom: 20px;
  508. }
  509. .nhgel{
  510. height: 170px;
  511. background-color: #313b61;
  512. width: 100%;
  513. position: absolute;
  514. top:0;
  515. left:0;
  516. z-index: 0;
  517. }
  518. .app-container{
  519. background-color: #f3f4f6;
  520. padding-top: 10px;
  521. // height: 100vh;
  522. }
  523. .ksf{
  524. img{
  525. width:100%;
  526. height: 100%;
  527. }
  528. }
  529. .jivbf{
  530. display: flex;
  531. align-items: center;
  532. line-height: 26px;
  533. font-size: 15px;
  534. font-family: PingFang SC;
  535. font-weight: bold;
  536. color: #333;
  537. margin-top: 0;
  538. margin-bottom: 20px;
  539. img{
  540. margin-right: 10px;
  541. }
  542. }
  543. .jivb{
  544. display: flex;
  545. align-items: center;
  546. line-height: 26px;
  547. font-size: 15px;
  548. font-family: PingFang SC;
  549. font-weight: bold;
  550. color: #00A9F0;
  551. margin-top: 0;
  552. margin-bottom: 20px;
  553. border-bottom: 2px solid #E6E6E6;
  554. img{
  555. margin-right: 10px;
  556. }
  557. span{
  558. border-bottom: 2px solid #00A9F0;
  559. margin-bottom: -2px;
  560. }
  561. // border-left: 8px solid #04BFA1;
  562. }
  563. </style>