123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280 |
- <template>
- <div class="box">
- <el-drawer
- :visible.sync="dialogVisible"
- :title="isSHOW ? '骑手入驻审核' : '骑手详情'"
- :direction="direction"
- @close="close"
- size="1000px"
- >
- <div v-if="dialogVisible">
- <div class="detailHead bdbtmSolid">
- <div class="acea-row row-between headerBox">
- <div class="full">
- <div class="order_icon"><span class="iconfont icon-shanghuliebiao"></span></div>
- <div class="text">
- <div class="title">骑手</div>
- <span class="mr20">{{ dataForm.name }}</span>
- </div>
- </div>
- <div v-if="isSHOW">
- <el-button
- v-debounceClick="
- () => {
- onSubmit(3);
- }
- "
- style="margin-left: 0"
- >{{ loadingBtn ? '提交中 ...' : '审核拒绝' }}</el-button>
- <el-button
- type="primary"
- v-debounceClick="
- () => {
- onSubmit(2);
- }
- "
- >{{ loadingBtn ? '提交中 ...' : '审核通过' }}</el-button>
- </div>
- </div>
- </div>
- <div class="detailSection padBox">
- <div class="title">骑手详情</div>
- <ul class="list">
- <li class="item">
- <div class="tips">骑手账号:</div>
- <div class="value">{{ dataForm.phone }}</div>
- </li>
- <li class="item">
- <div class="tips">骑手身份:</div>
- <div class="value">
- <el-tag
- size="small"
- type="info"
- v-for="(item, index) in dataForm.jobScope.split(',')"
- :key="index"
- class="mr5"
- >{{ item === '0' ? '骑手' : '快递员' }}</el-tag>
- </div>
- </li>
- <li
- v-show="dataForm.password"
- class="item"
- >
- <div class="tips">登录密码:</div>
- <div class="value">{{ dataForm.password }}</div>
- </li>
- <li class="item">
- <div class="tips">骑手姓名:</div>
- <div class="value">{{ dataForm.name }}</div>
- </li>
- <li class="item">
- <div class="tips">骑手手机号:</div>
- <div class="value">{{ dataForm.phone | filterEmpty }}</div>
- </li>
- <li class="item">
- <div class="tips">手续费(%):</div>
- <div class="value">{{ dataForm.handlingFee }}</div>
- </li>
- </ul>
- <div class="ivu-mt-16 acea-row">
- <div class="tips">备注:</div>
- <div class="value">{{ dataForm.remark || '无' }}</div>
- </div>
- <div class="ivu-mt-16 acea-row">
- <div class="tips">资质图片:</div>
- <div class="acea-row">
- <div
- v-for="(item, index) in dataForm.qualificationPictureData"
- :key="index"
- class="pictrue"
- >
- <el-image
- :src="item"
- :preview-src-list="dataForm.qualificationPictureData"
- > </el-image>
- </div>
- </div>
- </div>
- </div>
- <!-- <div class="demo-drawer__footer">-->
- <!-- <div v-if="isSHOW" class="from-foot-btn drawer_fix">-->
- <!-- <div class="acea-row justify-content">-->
- <!-- <el-button-->
- <!-- v-debounceClick="-->
- <!-- () => {-->
- <!-- onSubmit(3);-->
- <!-- }-->
- <!-- "-->
- <!-- style="margin-left: 0"-->
- <!-- >{{ loadingBtn ? '提交中 ...' : '审核拒绝' }}</el-button-->
- <!-- >-->
- <!-- <el-button-->
- <!-- type="primary"-->
- <!-- v-debounceClick="-->
- <!-- () => {-->
- <!-- onSubmit(2);-->
- <!-- }-->
- <!-- "-->
- <!-- >{{ loadingBtn ? '提交中 ...' : '审核通过' }}</el-button-->
- <!-- >-->
- <!-- </div>-->
- <!-- </div>-->
- <!-- </div>-->
- </div>
- </el-drawer>
- </div>
- </template>
- <script>
- // +---------------------------------------------------------------------
- // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
- // +---------------------------------------------------------------------
- // | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
- // +---------------------------------------------------------------------
- // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
- // +---------------------------------------------------------------------
- // | Author: CRMEB Team <admin@crmeb.com>
- // +---------------------------------------------------------------------
- import { merApplyAuditApi } from '@/api/rider';
- import { mapGetters } from 'vuex';
- import { filterEmpty } from '@/filters';
- export default {
- name: 'audit',
- data () {
- return {
- merImg: require('@/assets/imgs/dianpu.png'),
- dialogVisible: false,
- direction: 'rtl',
- isDisabled: true,
- rules: {
- auditStatus: [{ required: true, message: '请选择审核状态', trigger: 'change' }],
- denialReason: [{ required: true, message: '请填写拒绝原因', trigger: 'blur' }],
- },
- ruleForm: {
- denialReason: '',
- auditStatus: 2,
- id: '',
- },
- loadingBtn: false,
- };
- },
- props: {
- merData: {
- type: Object,
- default: () => null,
- },
- isSHOW: {
- type: String,
- default: () => '',
- },
- },
- computed: {
- ...mapGetters(['merchantClassify', 'merchantType']),
- },
- watch: {
- merData: {
- handler: function (val) {
- if (val.qualificationPicture) val.qualificationPictureData = JSON.parse(val.qualificationPicture);
- this.dataForm = { ...val };
- },
- deep: true,
- },
- },
- methods: {
- filterEmpty,
- close () {
- this.dialogVisible = false;
- this.ruleForm = {
- denialReason: '',
- auditStatus: 2,
- };
- },
- //审核拒绝
- cancelForm () {
- this.$modalPrompt('textarea', '拒绝原因').then((V) => {
- this.ruleForm.denialReason = V;
- this.submit();
- });
- },
- // 审核提交
- onSubmit (type) {
- this.ruleForm.auditStatus = type;
- if (type === 2) {
- this.$modalSure('审核通过该骑手吗?').then(() => {
- this.submit();
- });
- } else {
- this.cancelForm();
- }
- },
- submit () {
- this.loadingBtn = true;
- this.ruleForm.id = this.dataForm.id;
- merApplyAuditApi(this.ruleForm)
- .then((res) => {
- this.$message.success('操作成功');
- this.dialogVisible = false;
- this.$emit('subSuccess');
- this.loadingBtn = false;
- })
- .catch((res) => {
- this.loadingBtn = false;
- });
- },
- },
- };
- </script>
- <style scoped lang="scss">
- .demo-drawer__content {
- padding-bottom: 86px;
- }
- .box {
- ::v-deep.el-drawer__header {
- margin-bottom: 0 !important;
- font-size: 20px;
- }
- }
- .demo-drawer__content {
- min-height: 600px;
- }
- .widths {
- width: 169px;
- display: inline-block;
- color: #606266;
- }
- .langcent {
- display: inline-block;
- color: #606266;
- width: 100%;
- }
- .lang {
- width: 100%;
- ::v-deep.el-form-item__content {
- width: 79%;
- }
- }
- .divBox {
- ::v-deep .el-input__inner:hover,
- ::v-deep.el-input > input,
- ::v-deep.el-textarea > textarea {
- border: none;
- padding: 0;
- }
- ::v-deep.el-card__body {
- padding: 5px;
- }
- ::v-deep .el-input.is-disabled .el-input__inner {
- background: none;
- cursor: none;
- color: #606266;
- }
- }
- ::v-deep .el-image {
- width: 60px;
- height: 60px;
- }
- .item {
- align-items: center;
- }
- </style>
|