chenlei před 7 měsíci
rodič
revize
a44745698c
2 změnil soubory, kde provedl 113 přidání a 9 odebrání
  1. 82 0
      pc/wcarrier/comp/review.vue
  2. 31 9
      pc/wcarrier/join.vue

+ 82 - 0
pc/wcarrier/comp/review.vue

@@ -0,0 +1,82 @@
+<template>
+    <div>
+        <div class="defbb p-spac required">审核结果</div>
+        <div class="defbb p-spac">
+            <el-radio v-model="formData.audit" :label="2" class="green-color">审核通过</el-radio>
+            <el-radio v-model="formData.audit" :label="3" class="p-dcolor">审核驳回</el-radio>
+        </div>
+        <div class="flex p-spac" v-if="formData.audit === 3">
+            <span class="required">驳回理由:</span>
+            <el-input type="textarea" :rows="6" placeholder="请输入驳回理由" v-model="formData.reason" class="textarea ml-spac">
+                </el-input>
+
+        </div>
+        <template v-else>
+            <div class="defbb p-spac">初始化设置</div>
+            <div class="ml-spac">
+                <div class="pt-spac pl-spac">
+                    物流充值交易模式:
+                    <el-radio v-model="formData.tradeType" :label="1" class="ml-spac">大象直销</el-radio>
+                    <el-radio v-model="formData.tradeType" :label="2">大象经销</el-radio>
+                </div>
+                <div class="pt-spac pl-spacm3">
+                    物流充值工具 :<el-checkbox :value="true" disabled class="ml-spac">联通支付</el-checkbox>
+                </div>
+                <div class="defbb defbt mt-spac p-spac">
+                    其他付款启用状态:<el-radio v-model="formData.otherPay" :label="1" class="ml-spac">启用</el-radio>
+                    <el-radio v-model="formData.otherPay" :label="0">停用</el-radio>
+                </div>
+            </div>
+        </template>
+        <div class="p-spac">
+            <el-button type="primary" @click="submit" :disabled="!canSubmit">确定</el-button>
+            <el-button @click="cancel">取消</el-button>
+        </div>
+
+    </div>
+</template>
+<script>
+export default {
+  name: 'order',
+  data() {
+    return {
+      formData: {
+        /** 审核结果:2 审核通过,3 审核驳回 */
+        audit: -1,
+        /** 其他付款启用状态(挂靠车):0 关闭,1 开启 */
+        otherPay: 0,
+        /** 审核驳回理由 */
+        reason: '',
+        /** 交易模式:1 经销,2 直销 */
+        tradeType: 1
+      }
+    }
+  },
+  computed: {
+    canSubmit() {
+      return this.formData.audit === 2 || (this.formData.audit === 3 && this.formData.reason)
+    }
+  },
+  methods: {
+    submit() {
+      this.$http(this.$interfaces.user.carrier_open_account, this.formData).then(res => {
+        this.$emit('feedback', this.formData.audit)
+      })
+    },
+    cancel() {
+      this.$emit('feedback', 0)
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.green-color,
+.p-dcolor {
+    ::v-deep .el-radio__input.is-checked+.el-radio__label {
+        color: inherit;
+    }
+}
+.textarea {
+    width: 500px;
+}
+</style>

+ 31 - 9
pc/wcarrier/join.vue

@@ -122,21 +122,24 @@
         >
       </div>
     </div>
+    <template v-if="$props.module.carrierFpInfo">
     <div class="defbb p-spac">
       开票补充信息<span class="ml-spac p-wcolor" v-if="!isreView"
         >[ 提醒:请先完成“资质审核”!]</span
       >
     </div>
-    <invoice :disabled="!isreView" :readOnly="false" v-model="carrierFpInfo" class="p-spacd2 p-b-0" />
-    <authorize v-model="bindPhone" :carrierBalanceInfo="carrierBalanceInfo" :carrierWithdrawInfo="carrierWithdrawInfo" :tradeType="tradeType" v-if="isreView" />
+    <invoice :disabled="!isreView" :readOnly="false" v-model="carrierFpInfo" class="p-spacd2 p-b-0"/>
+    </template>
+    <authorize v-model="bindPhone" :carrierBalanceInfo="carrierBalanceInfo" :carrierWithdrawInfo="carrierWithdrawInfo" :tradeType="tradeType" v-if="$props.module.carrierWithdrawInfo&&isreView" />
+    <review :orgId="$props.orgId" v-if="$props.module.review" @feedback="reviewFeedback"/>
   </div>
 </template>
 <script>
-import { mapGetters } from 'vuex'
 import UploadImg from '@/components/uploadImg'
 import auth from './comp/auth.vue'
 import invoice from './comp/invoice.vue'
 import authorize from './comp/authorize.vue'
+import review from './comp/review.vue'
 
 export default {
   name: 'join',
@@ -239,12 +242,23 @@ export default {
       }
     }
   },
-  components: { UploadImg, auth, invoice, authorize },
+  components: { UploadImg, auth, invoice, authorize, review },
+  props: {
+    orgId: {
+      type: String,
+      default: ''
+    },
+    /** 模块信息 */
+    module: {
+      type: Object,
+      default: () => ({
+        carrierFpInfo: false,
+        carrierWithdrawInfo: false,
+        review: false
+      })
+    }
+  },
   computed: {
-    ...mapGetters({
-      orgId: 'woporg',
-      user: 'wopuser'
-    }),
 
     // 已认证
     isAuth() {
@@ -282,9 +296,17 @@ export default {
   },
   created() {
     this.getCarrierInfo()
-    // this.userOrgFind()
   },
   methods: {
+    /**
+     * qualificationReviewFeedback
+     * @description: 资质审核反馈
+     * @param {type} 2通过 3驳回 0 取消
+     * @return: null
+     */
+    reviewFeedback(type) {
+      this.$emit('reviewFeedback', type)
+    },
     getCarrierInfo() {
       if (this.orgId) {
         this.$http(this.$interfaces.user.get_carrier_info, { orgId: this.orgId }).then(res => {