table.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <scTable ref="table" :apiObj="list.apiObj" :params="searchKey" @selectionChange="selectionChange" row-key="id">
  3. <el-table-column label="所属商家" prop="id" width="280" fixed="left">
  4. <template #default="scope">
  5. <div class="goods-img">
  6. <div class="name" v-if="scope.row.poi">
  7. <span>{{ scope.row.poi.poi_name }}</span>
  8. <span class="dec">{{ scope.row.poi.poi_address }}</span>
  9. </div>
  10. <div v-else>-</div>
  11. </div>
  12. </template>
  13. </el-table-column>
  14. <el-table-column prop="company_name" label="企业名称" width="220" />
  15. <el-table-column label="状态" prop="enable" width="120" align="center">
  16. <template #default="scope">
  17. <div class="status-success" v-if="scope.row.status==1"><sc-status-indicator type="success"></sc-status-indicator> 已完成</div>
  18. <div class="status-danger" v-if="scope.row.status==0"><sc-status-indicator type="danger"></sc-status-indicator> 待审核</div>
  19. <div v-if="scope.row.status==2">
  20. <el-popover :width="300" trigger="hover" placement="top-start" title="驳回原因">
  21. <template #reference>
  22. <div class="status-danger" v-if="scope.row.status==2"><sc-status-indicator type="danger"></sc-status-indicator> 审核驳回 <el-icon><el-icon-question-filled /></el-icon></div>
  23. </template>
  24. <div v-html="scope.row.remark"></div>
  25. </el-popover>
  26. </div>
  27. </template>
  28. </el-table-column>
  29. <el-table-column prop="company_number" label="统一社会信用码" width="220" />
  30. <el-table-column prop="city_name" label="所在省市区" width="220" />
  31. <el-table-column prop="legal_name" label="法人姓名" width="150" />
  32. <el-table-column prop="legal_mobile" label="法人手机号" width="150" />
  33. <el-table-column prop="bank_number" label="对公帐号" width="150" />
  34. <el-table-column prop="bank_code" label="开户行编码" width="120" />
  35. <el-table-column prop="create_at" label="进件时间" width="150" />
  36. <el-table-column label="操作" width="160" align="right" fixed="right">
  37. <template #default="scope">
  38. <el-button-group>
  39. <el-button type="success" text size="small" @click="submitYes(scope.row)" v-if="scope.row.status == 0">通过</el-button>
  40. <el-button type="warning" text size="small" @click="submitNo(scope.row)" v-if="scope.row.status == 0">驳回</el-button>
  41. </el-button-group>
  42. <el-button-group>
  43. <el-button size="small" text @click="table_view(scope.row)">查看详情</el-button>
  44. </el-button-group>
  45. </template>
  46. </el-table-column>
  47. </scTable>
  48. <formMain ref="formMain" @success="handleSuccess"></formMain>
  49. </template>
  50. <script>
  51. import formMain from './form'
  52. export default {
  53. components: {
  54. formMain
  55. },
  56. data(){
  57. return {
  58. list: {
  59. apiObj: this.$API.finance.openList
  60. },
  61. dataSelect:[],
  62. dataSelectFull:[],
  63. searchKey:{}
  64. }
  65. },
  66. methods: {
  67. async submitYes(){
  68. this.$confirm(`通过审核后,该商家无需再次提交,后续开户流程将由管理员进行补充完成,确定吗`, '提示', {
  69. type: 'warning'
  70. }).then(async ()=>{
  71. var resp = await this.$API.shop.del.post({"id":data.id});
  72. if (resp.code == 0) {
  73. return this.$message.error(resp.msg);
  74. }
  75. this.$message.success(resp.msg);
  76. this.$emit("success");
  77. }).catch(()=>{})
  78. },
  79. table_view(data){
  80. this.$nextTick(() => {
  81. this.$refs.formMain.open("edit").setData(data)
  82. })
  83. },
  84. table_auth(data){
  85. this.$nextTick(() => {
  86. this.$refs.comboMain.open("edit").setData(data)
  87. })
  88. },
  89. refresh(){
  90. this.$refs.table.refresh()
  91. },
  92. upData(data){
  93. this.$refs.table.upData(data)
  94. },
  95. handleSuccess(){
  96. this.$refs.table.refresh()
  97. },
  98. sortChange(event){
  99. if (event.order) {
  100. var data = {
  101. "field":event.prop,
  102. "order":event.order
  103. }
  104. this.$refs.table.upData(data)
  105. } else {
  106. this.$refs.table.reload(this.searchKey)
  107. }
  108. return ;
  109. },
  110. selectionChange(event){
  111. this.dataSelect = [];
  112. var arr = [];
  113. var arrCompany = [];
  114. event.forEach(function(val,index){
  115. arr[index] = val.id;
  116. arrCompany[index] = val;
  117. });
  118. this.dataSelectFull = arrCompany;
  119. this.dataSelect = arr;
  120. this.$emit("success",this.dataSelect);
  121. this.$emit("successFull",this.dataSelectFull);
  122. },
  123. table_passwd(row){
  124. this.$nextTick(() => {
  125. this.$refs.userPasswd.open("edit").setData(row)
  126. })
  127. }
  128. }
  129. }
  130. </script>
  131. <style>
  132. .goods-img{display: flex;gap: 5px;}
  133. .goods-img .name span{display: block;}
  134. .goods-img .name span.dec{color: #999;font-size: 12px;}
  135. .goods-price,.price{display: flex;align-items: center;gap: 5px;font-size: 14px;}
  136. .goods-price .del{text-decoration: line-through;}
  137. .goods-price span{background-color: #fff !important;
  138. border: 1px solid #d3d9e0 !important;
  139. border-radius: 4px;
  140. box-sizing: border-box;
  141. color: #6c737a !important;
  142. display: inline-flex;
  143. flex: none;
  144. font-size: 12px;
  145. line-height: 18px !important;
  146. padding: 1px 6px !important;text-decoration: none;}
  147. </style>