audit.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <template>
  2. <div class="box">
  3. <el-drawer
  4. :visible.sync="dialogVisible"
  5. :title="isSHOW ? '骑手入驻审核' : '骑手详情'"
  6. :direction="direction"
  7. @close="close"
  8. size="1000px"
  9. >
  10. <div v-if="dialogVisible">
  11. <div class="detailHead bdbtmSolid">
  12. <div class="acea-row row-between headerBox">
  13. <div class="full">
  14. <div class="order_icon"><span class="iconfont icon-shanghuliebiao"></span></div>
  15. <div class="text">
  16. <div class="title">骑手</div>
  17. <span class="mr20">{{ dataForm.name }}</span>
  18. </div>
  19. </div>
  20. <div v-if="isSHOW">
  21. <el-button
  22. v-debounceClick="
  23. () => {
  24. onSubmit(3);
  25. }
  26. "
  27. style="margin-left: 0"
  28. >{{ loadingBtn ? '提交中 ...' : '审核拒绝' }}</el-button>
  29. <el-button
  30. type="primary"
  31. v-debounceClick="
  32. () => {
  33. onSubmit(2);
  34. }
  35. "
  36. >{{ loadingBtn ? '提交中 ...' : '审核通过' }}</el-button>
  37. </div>
  38. </div>
  39. </div>
  40. <div class="detailSection padBox">
  41. <div class="title">骑手详情</div>
  42. <ul class="list">
  43. <li class="item">
  44. <div class="tips">骑手账号:</div>
  45. <div class="value">{{ dataForm.phone }}</div>
  46. </li>
  47. <li class="item">
  48. <div class="tips">骑手身份:</div>
  49. <div class="value">
  50. <el-tag
  51. size="small"
  52. type="info"
  53. v-for="(item, index) in dataForm.jobScope.split(',')"
  54. :key="index"
  55. class="mr5"
  56. >{{ item === '0' ? '骑手' : '快递员' }}</el-tag>
  57. </div>
  58. </li>
  59. <li
  60. v-show="dataForm.password"
  61. class="item"
  62. >
  63. <div class="tips">登录密码:</div>
  64. <div class="value">{{ dataForm.password }}</div>
  65. </li>
  66. <li class="item">
  67. <div class="tips">骑手姓名:</div>
  68. <div class="value">{{ dataForm.name }}</div>
  69. </li>
  70. <li class="item">
  71. <div class="tips">骑手手机号:</div>
  72. <div class="value">{{ dataForm.phone | filterEmpty }}</div>
  73. </li>
  74. <li class="item">
  75. <div class="tips">手续费(%):</div>
  76. <div class="value">{{ dataForm.handlingFee }}</div>
  77. </li>
  78. </ul>
  79. <div class="ivu-mt-16 acea-row">
  80. <div class="tips">备注:</div>
  81. <div class="value">{{ dataForm.remark || '无' }}</div>
  82. </div>
  83. <div class="ivu-mt-16 acea-row">
  84. <div class="tips">资质图片:</div>
  85. <div class="acea-row">
  86. <div
  87. v-for="(item, index) in dataForm.qualificationPictureData"
  88. :key="index"
  89. class="pictrue"
  90. >
  91. <el-image
  92. :src="item"
  93. :preview-src-list="dataForm.qualificationPictureData"
  94. > </el-image>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <!-- <div class="demo-drawer__footer">-->
  100. <!-- <div v-if="isSHOW" class="from-foot-btn drawer_fix">-->
  101. <!-- <div class="acea-row justify-content">-->
  102. <!-- <el-button-->
  103. <!-- v-debounceClick="-->
  104. <!-- () => {-->
  105. <!-- onSubmit(3);-->
  106. <!-- }-->
  107. <!-- "-->
  108. <!-- style="margin-left: 0"-->
  109. <!-- >{{ loadingBtn ? '提交中 ...' : '审核拒绝' }}</el-button-->
  110. <!-- >-->
  111. <!-- <el-button-->
  112. <!-- type="primary"-->
  113. <!-- v-debounceClick="-->
  114. <!-- () => {-->
  115. <!-- onSubmit(2);-->
  116. <!-- }-->
  117. <!-- "-->
  118. <!-- >{{ loadingBtn ? '提交中 ...' : '审核通过' }}</el-button-->
  119. <!-- >-->
  120. <!-- </div>-->
  121. <!-- </div>-->
  122. <!-- </div>-->
  123. </div>
  124. </el-drawer>
  125. </div>
  126. </template>
  127. <script>
  128. // +---------------------------------------------------------------------
  129. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  130. // +---------------------------------------------------------------------
  131. // | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
  132. // +---------------------------------------------------------------------
  133. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  134. // +---------------------------------------------------------------------
  135. // | Author: CRMEB Team <admin@crmeb.com>
  136. // +---------------------------------------------------------------------
  137. import { merApplyAuditApi } from '@/api/rider';
  138. import { mapGetters } from 'vuex';
  139. import { filterEmpty } from '@/filters';
  140. export default {
  141. name: 'audit',
  142. data () {
  143. return {
  144. merImg: require('@/assets/imgs/dianpu.png'),
  145. dialogVisible: false,
  146. direction: 'rtl',
  147. isDisabled: true,
  148. rules: {
  149. auditStatus: [{ required: true, message: '请选择审核状态', trigger: 'change' }],
  150. denialReason: [{ required: true, message: '请填写拒绝原因', trigger: 'blur' }],
  151. },
  152. ruleForm: {
  153. denialReason: '',
  154. auditStatus: 2,
  155. id: '',
  156. },
  157. loadingBtn: false,
  158. };
  159. },
  160. props: {
  161. merData: {
  162. type: Object,
  163. default: () => null,
  164. },
  165. isSHOW: {
  166. type: String,
  167. default: () => '',
  168. },
  169. },
  170. computed: {
  171. ...mapGetters(['merchantClassify', 'merchantType']),
  172. },
  173. watch: {
  174. merData: {
  175. handler: function (val) {
  176. if (val.qualificationPicture) val.qualificationPictureData = JSON.parse(val.qualificationPicture);
  177. this.dataForm = { ...val };
  178. },
  179. deep: true,
  180. },
  181. },
  182. methods: {
  183. filterEmpty,
  184. close () {
  185. this.dialogVisible = false;
  186. this.ruleForm = {
  187. denialReason: '',
  188. auditStatus: 2,
  189. };
  190. },
  191. //审核拒绝
  192. cancelForm () {
  193. this.$modalPrompt('textarea', '拒绝原因').then((V) => {
  194. this.ruleForm.denialReason = V;
  195. this.submit();
  196. });
  197. },
  198. // 审核提交
  199. onSubmit (type) {
  200. this.ruleForm.auditStatus = type;
  201. if (type === 2) {
  202. this.$modalSure('审核通过该骑手吗?').then(() => {
  203. this.submit();
  204. });
  205. } else {
  206. this.cancelForm();
  207. }
  208. },
  209. submit () {
  210. this.loadingBtn = true;
  211. this.ruleForm.id = this.dataForm.id;
  212. merApplyAuditApi(this.ruleForm)
  213. .then((res) => {
  214. this.$message.success('操作成功');
  215. this.dialogVisible = false;
  216. this.$emit('subSuccess');
  217. this.loadingBtn = false;
  218. })
  219. .catch((res) => {
  220. this.loadingBtn = false;
  221. });
  222. },
  223. },
  224. };
  225. </script>
  226. <style scoped lang="scss">
  227. .demo-drawer__content {
  228. padding-bottom: 86px;
  229. }
  230. .box {
  231. ::v-deep.el-drawer__header {
  232. margin-bottom: 0 !important;
  233. font-size: 20px;
  234. }
  235. }
  236. .demo-drawer__content {
  237. min-height: 600px;
  238. }
  239. .widths {
  240. width: 169px;
  241. display: inline-block;
  242. color: #606266;
  243. }
  244. .langcent {
  245. display: inline-block;
  246. color: #606266;
  247. width: 100%;
  248. }
  249. .lang {
  250. width: 100%;
  251. ::v-deep.el-form-item__content {
  252. width: 79%;
  253. }
  254. }
  255. .divBox {
  256. ::v-deep .el-input__inner:hover,
  257. ::v-deep.el-input > input,
  258. ::v-deep.el-textarea > textarea {
  259. border: none;
  260. padding: 0;
  261. }
  262. ::v-deep.el-card__body {
  263. padding: 5px;
  264. }
  265. ::v-deep .el-input.is-disabled .el-input__inner {
  266. background: none;
  267. cursor: none;
  268. color: #606266;
  269. }
  270. }
  271. ::v-deep .el-image {
  272. width: 60px;
  273. height: 60px;
  274. }
  275. .item {
  276. align-items: center;
  277. }
  278. </style>