reg-info.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. <template>
  2. <div v-loading="loading">
  3. <div class="white-box">
  4. <div class="filter-box">
  5. <filter-user :filter-types.sync="filterTypes" @select-value="handleFilterUser"></filter-user>
  6. </div>
  7. <el-table :data="tableData" stripe style="width: 100%;" @selection-change="handleSelectionChange"
  8. :height="tool.getTableHeight()">
  9. <el-table-column type="selection" width="55"></el-table-column>
  10. <el-table-column label="会员编号" width="150">
  11. <template slot-scope="scope">
  12. <el-tag size="small" class="no-border">{{scope.row.BASE_INFO.USER_NAME}}</el-tag>
  13. </template>
  14. </el-table-column>
  15. <el-table-column label="会员姓名" width="120">
  16. <template slot-scope="scope">
  17. <el-tag type="success" size="small" class="no-border">{{scope.row.BASE_INFO.REAL_NAME}}</el-tag>
  18. </template>
  19. </el-table-column>
  20. <el-table-column label="会员状态" width="110">
  21. <template slot-scope="scope">
  22. {{(scope.row.BASE_INFO.STATUS_NAME)}}
  23. </template>
  24. </el-table-column>
  25. <el-table-column label="会员级别">
  26. <template slot-scope="scope">
  27. {{scope.row.BASE_INFO.DEC_LV_NAME}}
  28. </template>
  29. </el-table-column>
  30. <el-table-column label="聘级">
  31. <template slot-scope="scope">
  32. {{scope.row.BASE_INFO.EMP_LV_NAME}}
  33. </template>
  34. </el-table-column>
  35. <el-table-column label="报单中心级别" width="110">
  36. <template slot-scope="scope">
  37. {{scope.row.BASE_INFO.DEC_ROLE_NAME}}
  38. </template>
  39. </el-table-column>
  40. <el-table-column label="体系名称" width="150">
  41. <template slot-scope="scope">
  42. {{scope.row.BASE_INFO.SYSTEM_NAME}}
  43. </template>
  44. </el-table-column>
  45. <el-table-column label="提现方式">
  46. <template slot-scope="scope">
  47. {{scope.row.BASE_INFO.IS_AUTO_WITHDRAW?'auto withdrawal':'manual withdrawal'}} <!-- 自动提现 手动提现 -->
  48. </template>
  49. </el-table-column>
  50. <el-table-column label="手机号码" width="110">
  51. <template slot-scope="scope">
  52. {{scope.row.BASE_INFO.MOBILE}}
  53. </template>
  54. </el-table-column>
  55. <el-table-column label="身份证号" width="170">
  56. <template slot-scope="scope">
  57. {{scope.row.BASE_INFO.ID_CARD}}
  58. </template>
  59. </el-table-column>
  60. <el-table-column label="备用手机号码" width="120">
  61. <template slot-scope="scope">
  62. {{scope.row.BASE_INFO.TEL}}
  63. </template>
  64. </el-table-column>
  65. <el-table-column label="证件号码" width="180">
  66. <template slot-scope="scope">
  67. {{scope.row.BASE_INFO.ID_CARD}}
  68. </template>
  69. </el-table-column>
  70. <el-table-column label="应注册类型" width="110">
  71. <template slot-scope="scope">
  72. <el-tag type="warning" size="small" class="no-border">
  73. {{scope.row.BASE_INFO.SHOULD_REG_TYPE?regTypes[scope.row.BASE_INFO.SHOULD_REG_TYPE].TYPE_NAME:''}}
  74. </el-tag>
  75. </template>
  76. </el-table-column>
  77. <el-table-column label="实时注册类型" width="110">
  78. <template slot-scope="scope">
  79. <el-tag type="warning" size="small" class="no-border">{{regTypes[scope.row.BASE_INFO.REG_TYPE].TYPE_NAME}}
  80. </el-tag>
  81. </template>
  82. </el-table-column>
  83. <el-table-column label="注册名称" width="160">
  84. <template slot-scope="scope">
  85. {{scope.row.BASE_INFO.REG_NAME}}
  86. </template>
  87. </el-table-column>
  88. <el-table-column label="统一社会信用代码" width="180">
  89. <template slot-scope="scope">
  90. {{scope.row.BASE_INFO.CREDIT_CODE}}
  91. </template>
  92. </el-table-column>
  93. <el-table-column label="经营场所" width="180">
  94. <template slot-scope="scope">
  95. {{scope.row.BASE_INFO.PREMISES}}
  96. </template>
  97. </el-table-column>
  98. <el-table-column label="法人/经营者" width="110">
  99. <template slot-scope="scope">
  100. {{scope.row.BASE_INFO.LEGAL_PERSON}}
  101. </template>
  102. </el-table-column>
  103. <el-table-column label="注册有效期" width="110">
  104. <template slot-scope="scope">
  105. {{scope.row.AUDIT_INFO?tool.formatDate(scope.row.AUDIT_INFO.REG_EXPIRES,false):''}}
  106. </template>
  107. </el-table-column>
  108. <el-table-column label="实名认证">
  109. <template slot-scope="scope">
  110. {{scope.row.BASE_INFO.VERIFIED==='1'?'是':'否'}}
  111. </template>
  112. </el-table-column>
  113. <el-table-column label="备注" width="150">
  114. <template slot-scope="scope">
  115. {{scope.row.AUDIT_INFO?scope.row.AUDIT_INFO.CREATE_REMARK:''}}
  116. </template>
  117. </el-table-column>
  118. <el-table-column label="创建时间" width="170">
  119. <template slot-scope="scope">
  120. {{tool.formatDate(scope.row.AUDIT_INFO?scope.row.AUDIT_INFO.CREATED_AT:'')}}
  121. </template>
  122. </el-table-column>
  123. <el-table-column label="创建期数" width="160">
  124. <template slot-scope="scope">
  125. {{scope.row.AUDIT_INFO?scope.row.AUDIT_INFO.CREATE_PERIOD:''}}
  126. </template>
  127. </el-table-column>
  128. <el-table-column label="创建人" width="150">
  129. <template slot-scope="scope">
  130. {{scope.row.AUDIT_INFO?scope.row.AUDIT_INFO.CREATE_ADMIN_NAME:''}}
  131. </template>
  132. </el-table-column>
  133. <el-table-column label="修改时间" width="170">
  134. <template slot-scope="scope">
  135. {{tool.formatDate(scope.row.AUDIT_INFO?scope.row.AUDIT_INFO.AUDITED_AT:'')}}
  136. </template>
  137. </el-table-column>
  138. <el-table-column label="修改期数" width="160">
  139. <template slot-scope="scope">
  140. {{scope.row.AUDIT_INFO?(scope.row.AUDIT_INFO.AUDIT_PERIOD==0?'':scope.row.AUDIT_INFO.AUDIT_PERIOD):''}}
  141. </template>
  142. </el-table-column>
  143. <el-table-column label="修改人" width="150">
  144. <template slot-scope="scope">
  145. {{scope.row.AUDIT_INFO?scope.row.AUDIT_INFO.AUDIT_ADMIN_NAME:''}}
  146. </template>
  147. </el-table-column>
  148. </el-table>
  149. <div class="white-box-footer">
  150. <el-button type="primary" size="small"
  151. v-show="permission.hasPermission(`user/reg-info-audit-add-opt`)&&permission.hasPermission(`user/reg-info-audit-add`)&&permission.hasPermission(`user/reg-info-edit`)"
  152. @click="handleStatus" icon="el-icon-edit">修改会员注册信息
  153. </el-button>
  154. <el-button type="primary" size="small" @click="handleAdd" icon="el-icon-plus"
  155. v-show="permission.hasPermission(`user/reg-info-audit-add-opt`)&&(permission.hasPermission(`user/reg-info-audit-add`)||(permission.hasPermission(`user/import-reg-info-to-excel-table`)&&permission.hasPermission(`user/import-reg-info`)))">
  156. 新建会员注册信息
  157. </el-button>
  158. <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
  159. </div>
  160. </div>
  161. <el-dialog title="修改注册信息" :visible.sync="dialogEditFormVisible">
  162. <el-form :model="form" label-width="150px" style="width:500px;" v-loading="dialogEditLoading">
  163. <el-form-item label="会员编号">
  164. <el-input v-model="form.baseInfo.USER_NAME" :disabled="true"></el-input>
  165. </el-form-item>
  166. <el-form-item label="会员姓名">
  167. <el-input v-model="form.baseInfo.REAL_NAME" :disabled="true"></el-input>
  168. </el-form-item>
  169. <el-form-item label="身份证号">
  170. <el-input v-model="form.baseInfo.ID_CARD" :disabled="true"></el-input>
  171. </el-form-item>
  172. <el-form-item label="注册类型">
  173. <el-select v-model="form.type" placeholder="请选择注册类型" @change="changeRegType">
  174. <el-option v-for="(item,key) in regTypes" :label="item.TYPE_NAME" :value="item.ID"
  175. :key="item.ID"></el-option>
  176. </el-select>
  177. </el-form-item>
  178. <el-form-item label="注册名称">
  179. <el-input v-model="form.regName"></el-input>
  180. </el-form-item>
  181. <el-form-item label="统一社会信用代码">
  182. <el-input v-model="form.creditCode"></el-input>
  183. </el-form-item>
  184. <el-form-item label="经营场所">
  185. <el-input v-model="form.premises"></el-input>
  186. </el-form-item>
  187. <el-form-item label="经营者/法人">
  188. <el-input v-model="form.legalPerson"></el-input>
  189. </el-form-item>
  190. <el-form-item label="注册有效期">
  191. <el-date-picker
  192. v-model="form.regExpires"
  193. type="date"
  194. placeholder="选择日期"
  195. value-format="yyyy-MM-dd"
  196. >
  197. </el-date-picker>
  198. </el-form-item>
  199. <el-form-item label="备注">
  200. <el-input v-model="form.createRemark"></el-input>
  201. </el-form-item>
  202. <div v-show="showCompanyBank">
  203. <div class="hr-tip"><span>公司银行信息</span></div>
  204. <el-form-item label="开户行">
  205. <el-select v-model="form.companyBank.openBank" placeholder="请选择开户行">
  206. <el-option v-for="(item,index) in allOpenBank" :key="index" :label="item.BANK_NAME"
  207. :value="item.BANK_CODE"></el-option>
  208. </el-select>
  209. </el-form-item>
  210. <el-form-item label="银行所在地区" prop="bankAreaSelected">
  211. <el-cascader
  212. size="large"
  213. :options="regionData"
  214. v-model="form.companyBank.bankAreaSelected">
  215. </el-cascader>
  216. </el-form-item>
  217. <el-form-item label="开户支行">
  218. <el-input v-model="form.companyBank.bankAddress"></el-input>
  219. </el-form-item>
  220. <el-form-item label="开户名">
  221. <el-input v-model="form.companyBank.openName"></el-input>
  222. </el-form-item>
  223. <el-form-item label="银行账号">
  224. <el-input v-model="form.companyBank.bankNo"></el-input>
  225. </el-form-item>
  226. </div>
  227. </el-form>
  228. <div slot="footer" class="dialog-footer">
  229. <el-button @click="dialogEditFormVisible = false">取 消</el-button>
  230. <el-button type="primary" @click.native="handleEdit">修 改</el-button>
  231. </div>
  232. </el-dialog>
  233. </div>
  234. </template>
  235. <script>
  236. import Vue from 'vue'
  237. import network from '@/utils/network'
  238. import tool from '@/utils/tool'
  239. import store from '@/utils/vuexStore'
  240. import FilterUser from '@/components/FilterUser'
  241. import baseInfo from '@/utils/baseInfo'
  242. import permission from '@/utils/permission'
  243. import Pagination from '@/components/Pagination'
  244. import filterHelper from '../../utils/filterHelper'
  245. export default {
  246. name: 'user_reg-info',
  247. components: {FilterUser,Pagination},
  248. mounted() {
  249. store.state.socket.onMessageCallback = this.onMessageCallback
  250. this.getData()
  251. },
  252. data() {
  253. return {
  254. allData: null,
  255. tableData: null,
  256. loading: true,
  257. dialogEditLoading: false,
  258. dialogAuditLoading: false,
  259. multipleSelection: [],
  260. currentPage: 1,
  261. totalPages: 1,
  262. totalCount: 1,
  263. pageSize: 20,
  264. tool: tool,
  265. permission: permission,
  266. filterTypes: {
  267. 'USER_NAME': {isUserTable: true, name: '会员编号'},
  268. 'REAL_NAME': {isUserTable: true, name: '会员姓名'},
  269. 'ID_CARD': {isUserTable: true, name: '身份证'},
  270. 'MOBILE': {isUserTable: true, name: '手机号'},
  271. 'createdAt': {isUserTable: false, name: '创建时间', other: 'date'},
  272. 'regType': {
  273. isUserTable: false,
  274. name: '注册类型',
  275. other: 'select',
  276. selectData: tool.filterSelectFormat(baseInfo.regTypes(), 'ID', 'TYPE_NAME')
  277. },
  278. },
  279. filterModel: {},
  280. dialogEditFormVisible: false,
  281. dialogAuditFormVisible: false,
  282. regTypes: baseInfo.regTypes(),
  283. baseDecLevels: baseInfo.decLevels(),
  284. baseEmpLevels: baseInfo.empLevels(),
  285. auditId: null,
  286. form: {
  287. id: null,
  288. baseInfo: {USER_NAME: null},
  289. userId: null,
  290. type: null,
  291. regName: null,
  292. creditCode: null,
  293. premises: null,
  294. legalPerson: null,
  295. regExpires: null,
  296. auditRemark: null,
  297. createRemark: null,
  298. auditStatus: null,
  299. companyBank: {
  300. openBank: null,
  301. bankAreaSelected: [],
  302. bankAddress: null,
  303. openName: null,
  304. bankNo: null,
  305. }
  306. },
  307. allOpenBank: null,
  308. regionData: store.state.regionInfo.regionData,
  309. showCompanyBank: false,
  310. }
  311. },
  312. methods: {
  313. changeRegType() {
  314. //暂写死
  315. if (this.form.type === '758BF69C25C3422AA7743936BC77EE64') {
  316. this.showCompanyBank = true
  317. } else {
  318. this.showCompanyBank = false
  319. }
  320. },
  321. handleSelectionChange(val) {
  322. this.multipleSelection = val
  323. },
  324. handleCurrentChange(page) {
  325. this.getData(page, this.pageSize)
  326. },
  327. handleSizeChange(pageSize) {
  328. this.getData(this.currentPage, pageSize)
  329. },
  330. handleStatus() {
  331. if (this.multipleSelection.length < 1) {
  332. this.$message({
  333. message: '请勾选要修改注册信息的会员',
  334. type: 'warning'
  335. })
  336. return
  337. } else if (this.multipleSelection.length > 1) {
  338. this.$message({
  339. message: '修改会员注册信息只能勾选1位会员',
  340. type: 'warning'
  341. })
  342. return
  343. }
  344. this.handleEditShow(this.multipleSelection[0])
  345. },
  346. handleAdd() {
  347. this.$router.push({path: `/user/reg-info-audit-add-opt`})
  348. },
  349. handleEditShow(row) {
  350. this.dialogEditLoading = true
  351. if (row.AUDIT_INFO) {
  352. this.auditId = row.AUDIT_INFO.ID
  353. } else {
  354. this.$router.push({path: `/user/reg-info-audit-add-opt/${row.BASE_INFO.USER_NAME}`})
  355. return false
  356. }
  357. this.dialogEditFormVisible = true
  358. let vueObj = this
  359. network.getData('user/reg-info-audit-get', {id: this.auditId}).then(response => {
  360. vueObj.dialogEditLoading = false
  361. vueObj.form = response.form
  362. vueObj.allOpenBank = response.allOpenBank
  363. vueObj.changeRegType()
  364. })
  365. },
  366. handleEdit() {
  367. this.dialogEditFormVisible = false
  368. this.$message({
  369. message: '正在修改数据',
  370. type: 'info'
  371. })
  372. let path = 'user/reg-info-edit'
  373. network.postData(path, this.form).then(response => {
  374. this.$message({
  375. message: response,
  376. type: 'success'
  377. })
  378. this.getData(this.currentPage, this.pageSize)
  379. }).catch(response => {
  380. })
  381. },
  382. handleFilterStatusClick(tab, event) {
  383. this.getData()
  384. },
  385. handleFilterUser(filterData) {
  386. filterHelper.handleFilterUser(this, filterData)
  387. },
  388. handleFilter() {
  389. this.getData()
  390. },
  391. getData(page, pageSize) {
  392. let filterData = this.filterModel
  393. let vueObj = this
  394. network.getPageData(this, 'user/reg-info', page, pageSize, filterData, function (response) {
  395. vueObj.allData = response
  396. })
  397. },
  398. onMessageCallback() {
  399. this.getData(this.currentPage, this.pageSize)
  400. },
  401. }
  402. }
  403. </script>
  404. <style scoped>
  405. .hr-tip {
  406. font-size: 12px;
  407. position: relative;
  408. text-align: center;
  409. height: 30px;
  410. line-height: 30px;
  411. color: #999;
  412. margin-bottom: 20px;
  413. }
  414. .hr-tip:before {
  415. content: '';
  416. display: block;
  417. position: absolute;
  418. left: 0;
  419. right: 0;
  420. top: 14px;
  421. border-bottom: 1px dashed #ddd;
  422. height: 1px;
  423. }
  424. .hr-tip span {
  425. display: inline-block;
  426. background: #fff;
  427. position: relative;
  428. padding: 0 10px;
  429. }
  430. </style>