insuranceFirst-transfer.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. <template>
  2. <div>
  3. <el-breadcrumb separator=">">
  4. <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
  5. <el-breadcrumb-item>
  6. <a href="#">系统管理</a>
  7. </el-breadcrumb-item>
  8. <el-breadcrumb-item>
  9. <a href="/businessInsuranceApplication">提交投保申请并转账</a>
  10. </el-breadcrumb-item>
  11. </el-breadcrumb>
  12. <el-divider></el-divider>
  13. <!--
  14. 要resetFields起作用,必须配置:model和prop
  15. -->
  16. <el-container>
  17. <el-aside width="70%">
  18. <leftTab></leftTab>
  19. </el-aside>
  20. <el-container>
  21. <el-main>
  22. <el-form ref="form" :model="formModel" :rules="ruleValidate" :label-width="'80px'">
  23. <table>
  24. <tr>
  25. <td>当前步骤</td>
  26. <td>{{insureData.statusN}}</td>
  27. </tr>
  28. <tr>
  29. <td colspan="2">
  30. <el-form-item label="处理类型" prop="processStatus">
  31. <el-select v-model="formModel.processStatus" placeholder="请选择" filterable>
  32. <el-option label="通过" value="正常"></el-option>
  33. <el-option label="退回" value="回退"></el-option>
  34. </el-select>
  35. </el-form-item>
  36. </td>
  37. </tr>
  38. <tr>
  39. <td colspan="2">
  40. <el-form-item label="应收保费">{{insureData.insuranceFee}}</el-form-item>
  41. </td>
  42. </tr>
  43. <tr>
  44. <td colspan="2">
  45. <el-form-item label="出账银行" prop="issuingBank">
  46. <el-input placeholder="请输入出账银行" v-model="formModel.issuingBank"></el-input>
  47. </el-form-item>
  48. </td>
  49. </tr>
  50. <tr>
  51. <td colspan="2">
  52. <el-form-item label="入账银行" prop="accountBank">
  53. <el-input placeholder="请输入入账银行" v-model="formModel.accountBank"></el-input>
  54. </el-form-item>
  55. </td>
  56. </tr>
  57. <tr>
  58. <td colspan="2">
  59. <el-form-item label="转账单号" prop="singlNumber">
  60. <el-input placeholder="请输入转账单号" v-model="formModel.singlNumber"></el-input>
  61. </el-form-item>
  62. </td>
  63. </tr>
  64. <!-- <tr>
  65. <td colspan="2">
  66. <el-form-item label="推广员账号" prop="issuingBank">
  67. <el-input placeholder="请输入推广员账号" v-model="formModel.issuingBank"></el-input>
  68. </el-form-item>
  69. </td>
  70. </tr>-->
  71. <tr>
  72. <td colspan="2">
  73. <el-form-item label="保险代理人" prop="agentId">
  74. <el-input placeholder="请输入保险代理人" v-model="formModel.agentId"></el-input>
  75. </el-form-item>
  76. </td>
  77. </tr>
  78. <tr>
  79. <td colspan="2">
  80. <el-form-item prop="opinion">
  81. <el-input
  82. type="textarea"
  83. :rows="8"
  84. placeholder="请输入处理意见"
  85. v-model="formModel.opinion"
  86. ></el-input>
  87. </el-form-item>
  88. </td>
  89. </tr>
  90. <tr>
  91. <td>下一步骤</td>
  92. <td>出单</td>
  93. </tr>
  94. <tr>
  95. <td>
  96. <el-button size="mini" type="success" @click="downloadFiles()">打包下载申请资料</el-button>
  97. </td>
  98. <td>
  99. <el-button size="mini" type="primary" @click="saveApproval()">提交</el-button>
  100. </td>
  101. </tr>
  102. </table>
  103. </el-form>
  104. </el-main>
  105. </el-container>
  106. </el-container>
  107. </div>
  108. </template>
  109. <script>
  110. import Constant from "@/constant";
  111. import insuranceApplicationApi from "@/api/business/insuranceApplication";
  112. import approvalApi from "@/api/business/approval";
  113. import leftTab from "./insuranceFirst-leftTab.vue";
  114. import NProgress from "nprogress"; // progress bar
  115. import "nprogress/nprogress.css"; // progress bar style
  116. export default {
  117. components: {
  118. leftTab: leftTab
  119. },
  120. data() {
  121. var self = this;
  122. return {
  123. queryModel: {
  124. id: ""
  125. },
  126. ruleValidate: {
  127. // issuingBank: [
  128. // {
  129. // required: true,
  130. // message: "请填写出账银行",
  131. // trigger: "blur"
  132. // }
  133. // ],
  134. // accountBank: [
  135. // {
  136. // required: true,
  137. // message: "请填写入账银行",
  138. // trigger: "blur"
  139. // }
  140. // ],
  141. // singlNumber: [
  142. // {
  143. // required: true,
  144. // message: "请填写转账单号",
  145. // trigger: "blur"
  146. // }
  147. // ],
  148. processStatus: [
  149. {
  150. required: true,
  151. message: "请选择处理类型",
  152. trigger: "blur"
  153. }
  154. ]
  155. },
  156. loading: false,
  157. memberData: [],
  158. pageIndex: 1,
  159. pageSize: 10,
  160. totalPages: 0,
  161. totalElements: 0,
  162. field: "",
  163. direction: "",
  164. pageSizeList: [10, 20, 30],
  165. multipleSelection: [],
  166. showModal: false,
  167. modalTitle: "",
  168. businessKey: "",
  169. id: "",
  170. definitionId: "",
  171. policyId: "",
  172. insureData: "",
  173. acceptData: [],
  174. formModel: {
  175. processStatus: "",
  176. opinion: "",
  177. accountBank: "",
  178. issuingBank: "",
  179. singlNumber: ""
  180. },
  181. recordData: [],
  182. pageIndexRecord: 1,
  183. pageSizeRecord: 10,
  184. totalPagesRecord: 0,
  185. totalElementsRecord: 0,
  186. filesData: [],
  187. insuranceAgentlist: ""
  188. };
  189. },
  190. methods: {
  191. insureDetail() {
  192. var self = this;
  193. (function() {
  194. if (self.id.length == 0) {
  195. self.$message.error("没有传递ID");
  196. } else {
  197. var formData = new FormData();
  198. formData.append("id", self.id);
  199. formData.append("no", "0");
  200. return insuranceApplicationApi.insureDetail(formData);
  201. }
  202. })()
  203. .then(response => {
  204. var jsonData = response.data;
  205. self.loading = false;
  206. if (jsonData.result) {
  207. self.insureData = jsonData.data;
  208. this.definitionId = self.insureData.definitionId;
  209. this.policyId = self.insureData.insurancePolicy.id;
  210. } else {
  211. self.$message.error(jsonData.message + "");
  212. }
  213. })
  214. .catch(error => {
  215. self.$message.error(error + "");
  216. });
  217. },
  218. saveApproval() {
  219. var self = this;
  220. this.$refs["form"].validate(valid => {
  221. if (valid) {
  222. var self = this;
  223. var formModel = this.formModel;
  224. (function() {
  225. var formData = new FormData();
  226. formData.append("applicationId", self.id);
  227. formData.append("policyId", self.policyId);
  228. formData.append("processStatus", self.formModel.processStatus);
  229. formData.append("opinion", self.formModel.opinion);
  230. formData.append("accountBank", self.formModel.accountBank);
  231. formData.append("issuingBank", self.formModel.issuingBank);
  232. formData.append("singlNumber", self.formModel.singlNumber);
  233. return approvalApi.transfer(formData);
  234. })().then(function(response) {
  235. var jsonData = response.data;
  236. if (jsonData.result) {
  237. self.$message({
  238. message: "保存成功!",
  239. type: "success"
  240. });
  241. self.$router.push("/business/insuranceFirst/list");
  242. } else {
  243. self.$message({
  244. message: jsonData.message + "",
  245. type: "warning"
  246. });
  247. self.$emit("close", false);
  248. }
  249. });
  250. } else {
  251. this.$emit("error");
  252. }
  253. });
  254. },
  255. downloadFiles() {
  256. approvalApi.downloadIdCardZip(this.policyId);
  257. }
  258. },
  259. async mounted() {
  260. var self = this;
  261. self.loading = true;
  262. self.id = this.$route.query.id;
  263. this.insureDetail();
  264. }
  265. };
  266. </script>
  267. <style lang="scss" scoped>
  268. .el-breadcrumb {
  269. margin: 10px;
  270. line-height: 20px;
  271. }
  272. .el-divider {
  273. margin: 5px 0;
  274. }
  275. .demo-form-inline {
  276. margin-left: 10px;
  277. text-align: left;
  278. }
  279. .button-group {
  280. margin-left: 10px;
  281. text-align: left;
  282. }
  283. .application-panel td,
  284. .accept-panel td {
  285. padding: 10px 0;
  286. font-size: 14px;
  287. border: 1px solid #efefef;
  288. }
  289. .el-tabs.el-tabs--card.el-tabs--top {
  290. padding: 20px;
  291. }
  292. .table-bak {
  293. background: #f6f6f6;
  294. }
  295. .el-tab-pane .title-von {
  296. text-align: left;
  297. padding: 10px 0;
  298. border-bottom: 1px solid #efefef;
  299. margin-bottom: 10px;
  300. }
  301. .el-tab-pane h4 {
  302. margin: 0;
  303. border-left: 2px solid red;
  304. padding-left: 10px;
  305. }
  306. .user-panel,
  307. .application-panel,
  308. .accept-panel {
  309. margin-bottom: 20px;
  310. }
  311. .el-pagination {
  312. padding: 10px 15px;
  313. }
  314. .accept-panel td p {
  315. font-weight: bold;
  316. margin: 0;
  317. }
  318. .application-panel table {
  319. width: 100%;
  320. }
  321. .el-container {
  322. border-left: 1px solid #efefef;
  323. }
  324. .el-form td {
  325. font-size: 14px;
  326. }
  327. </style>