chenlei 6 miesięcy temu
rodzic
commit
91040cdd68
3 zmienionych plików z 10 dodań i 10 usunięć
  1. 1 0
      pc/wcarrier/comp/auth.vue
  2. 2 2
      pc/wcarrier/comp/invoice.vue
  3. 7 8
      pc/wcarrier/join.vue

+ 1 - 0
pc/wcarrier/comp/auth.vue

@@ -137,6 +137,7 @@ export default {
             this.value.channelAuthStatus = 2
             this.$http(this.$interfaces.user.refresh_carrier_token).then(res => {
               this.$store.commit('updateIdentity', res)
+              this.$emit('authSuccess')
             })
           }).catch(() => {
             // 即使认证失败也刷新一下token,身份信息可能有更新

+ 2 - 2
pc/wcarrier/comp/invoice.vue

@@ -79,10 +79,10 @@ export default {
       return this.value.fpStatus === 2
     },
     isReadOnly() {
-      return (this.readOnly || !this.isEdit)
+      return !this.disabledFinal && (!this.isEdit)
     },
     emptyArgs() {
-      return { open: !this.disabledFinal && this.isReadOnly, text: '[ 暂无内容 ]' }
+      return { open: this.isReadOnly, text: '[ 暂无内容 ]' }
     }
   },
   watch: {

+ 7 - 8
pc/wcarrier/join.vue

@@ -44,7 +44,7 @@
         </div>
       </div>
     </div>
-    <auth v-else v-model="carrierAuthInfo" />
+    <auth v-else v-model="carrierAuthInfo" @authSuccess="getCarrierInfo()"/>
     <template v-if="module.carrierRoadInfo.show">
       <div class="defbb pt-spac pb-spac mt-spac">
         资质审核 [
@@ -155,11 +155,12 @@ export default {
   data() {
     const _this = this
     return {
+      inited: false,
       args: {},
       /** 启用状态 0-启用,1-停用 */
       status: 0,
       /** 交易模式(1经销模式;2直销模式,默认经销模式1) */
-      tradeType: 1,
+      tradeType: -1,
       /** 其他付款状态(挂靠车):默认0关闭,1开启 */
       otherPay: 0,
       /** 物流是否允许公对公充值:0-不允许 1-允许 */
@@ -299,9 +300,6 @@ export default {
     contracted() {
       return this.carrierContractInfo.contractStatus === 2
     },
-    inited() {
-      return (this.safeOrgId && this.$reqState(this.$interfaces.user.get_carrier_info).sus) || !this.safeOrgId
-    },
     safeOrgId() {
       return this.$props.orgId ||
         this.args.orgId
@@ -349,7 +347,7 @@ export default {
         this.$emit('statusFeedback', 1)
       })
     },
-    init(args) {
+    async init(args) {
       this.args = args
       this.getCarrierInfo()
     },
@@ -362,9 +360,9 @@ export default {
     reviewFeedback(type) {
       this.$emit('reviewFeedback', type)
     },
-    getCarrierInfo() {
+    async getCarrierInfo() {
       if (this.safeOrgId) {
-        this.$http(this.$interfaces.user.get_carrier_info, { orgId: this.safeOrgId }).then(res => {
+        await this.$http(this.$interfaces.user.get_carrier_info, { orgId: this.safeOrgId }).then(res => {
           this.bindPhone = res.bindPhone
           this.status = res.org.status
           this.tradeType = res.org.tradeType
@@ -380,6 +378,7 @@ export default {
           this.carrierWithdrawInfo = res.carrierWithdrawInfo
         })
       }
+      this.inited = true
     },
 
     uploadOrgPic(path) {