chenlei 7 ay önce
ebeveyn
işleme
13c477b2f4

+ 65 - 39
pc/wcarrier/comp/auth.vue

@@ -1,28 +1,28 @@
 <template>
   <div class="p-spac">
-    <el-form class="defbb" ref="enterprise" :model="enterprise" :rules="rules" size="mini">
+    <el-form class="defbb" ref="enterprise" :model="value" :rules="rules" size="mini">
       <div class="flex">
         <div class="flex1 mr-spac">
-          <el-form-item prop="card">
+          <el-form-item prop="businessLicense">
             <div class="required ml-spac">公司营业执照</div>
             <upload-img
-              :fileList="lisenceArray"
+              :fileList="lisenceFile"
               :big="true"
               @uploadOrgPic="uploadOrgPic"
             ></upload-img>
           </el-form-item>
-          <el-form-item label="统一社会信用代码:" prop="no" label-width="160px">
-            <el-input v-model="enterprise.no"></el-input>
+          <el-form-item label="统一社会信用代码:" prop="taxpayer" label-width="140px">
+            <el-input v-model="value.taxpayer" placeholder="上传营业执照照片,自动识别"></el-input>
           </el-form-item>
-          <el-form-item label="公司名称:" prop="name" label-width="160px" class="m-b-0">
-            <el-input v-model="enterprise.no"></el-input>
+          <el-form-item label="公司名称:" prop="orgName" label-width="140px" class="m-b-0">
+            <el-input v-model="value.orgName" placeholder="上传营业执照照片,自动识别"></el-input>
           </el-form-item>
         </div>
         <div class="flex1 relative">
           <div>法人证件类型:身份证</div>
           <div class="flex">
-            <div>
-              <el-form-item prop="card">
+            <div class="mr-spac">
+              <el-form-item prop="idCardFront">
                 <div class="required ml-spac">法人身份证人像面</div>
                 <upload-img
                   :fileList="idcard1"
@@ -31,8 +31,8 @@
               </el-form-item>
             </div>
             <div>
-              <el-form-item prop="card">
-                <div class="required ml-spac">法人身份证人像面</div>
+              <el-form-item prop="idCardBack">
+                <div class="required ml-spac">法人身份证国徽面</div>
                 <upload-img
                   :fileList="idcard2"
                   @uploadOrgPic="uploadOrgPic"
@@ -40,13 +40,15 @@
               </el-form-item>
             </div>
           </div>
-          <el-form-item label="统一社会信用代码:" prop="no" label-width="160px">
-            <el-input v-model="enterprise.no"></el-input>
+          <el-form-item label="法人证件号:" prop="idCardNo" label-width="100px">
+            <el-input v-model="value.idCardNo" placeholder="上传法人证件照片,自动识别"></el-input>
           </el-form-item>
-          <el-form-item label="公司名称:" prop="name" label-width="160px">
-            <el-input v-model="enterprise.no"></el-input>
+          <el-form-item label="法人姓名:" prop="legalperson" label-width="100px">
+            <el-input v-model="value.legalperson" placeholder="上传法人证件照片,自动识别"></el-input>
           </el-form-item>
-          <el-button type="primary" size="medium" class="auth-btn" @click="submitForm()">发起认证</el-button>
+          <div class="text-right">
+            <el-button type="primary" size="medium" class="auth-btn" @click="submitForm()" :loading="$reqState($interfaces.pay.carrier_open_account).ing">发起认证</el-button>
+          </div>
         </div>
       </div>
       <el-form-item> </el-form-item>
@@ -61,52 +63,81 @@ export default {
   name: 'auth',
   data() {
     return {
-      lisenceArray: [
+      lisenceFile: [
         {
-          path: '',
+          fileIndex: 0,
+          path: this.value.businessLicense,
           defaultPath: require('@/assets/images/main/license@2x.png'),
           text: '上传营业执照'
         }
       ],
       idcard1: [
         {
-          path: '',
+          fileIndex: 1,
+          path: this.value.idCardFront,
           defaultPath: require('@/assets/images/main/idcardfont-bg@2x.png'),
           text: '上传法人身份证人像面'
         }
       ],
       idcard2: [
         {
-          path: '',
+          fileIndex: 2,
+          path: this.value.idCardBack,
           defaultPath: require('@/assets/images/main/idcardback-bg@2x.png'),
           text: '上传法人身份证国徽面'
         }
       ],
-      enterprise: {
-        card: '',
-        no: ''
-      },
       rules: {
-        card: { required: true, message: '请输入活动名称', trigger: 'blur' },
-        name: { required: true, message: '请输入活动名称', trigger: 'blur' },
-        no: [
-          { required: true, message: '请输入活动名称', trigger: 'blur' },
-          { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
-        ]
+        businessLicense: { required: true, message: '请上传公司营业执照', trigger: 'blur' },
+        idCardFront: { required: true, message: '请上传法人身份证人像面', trigger: 'blur' },
+        idCardBack: { required: true, message: '请上传法人身份证国徽面', trigger: 'blur' },
+        orgName: { required: true, message: '请输入公司名称', trigger: 'blur' },
+        taxpayer: { required: true, message: '请输入统一社会信用代码', trigger: 'blur' },
+        idCardNo: { required: true, message: '请输入法人证件号', trigger: 'blur' },
+        legalperson: { required: true, message: '请输入法人姓名', trigger: 'blur' }
       }
     }
   },
+  props: {
+    value: {
+      type: Object,
+      default: () => ({})
+    }
+  },
   components: { UploadImg },
   methods: {
-    uploadOrgPic() {
-      console.log('上传成功', arguments)
+    uploadOrgPic(path, fileIndex) {
+      if (fileIndex === 0) {
+        this.value.businessLicense = path
+      } else if (fileIndex === 1) {
+        this.value.idCardFront = path
+      } else if (fileIndex === 2) {
+        this.value.idCardBack = path
+      }
+      if (fileIndex === 2) {
+        return
+      }
+      this.$http(this.$interfaces.message.orc, { imgUrl: path, picType: fileIndex === 0 ? 1 : 2 }).then(res => {
+        if (fileIndex === 0) {
+          this.value.orgName = res.companyName
+          this.value.taxpayer = res.creditCode
+          // 保存时使用
+          this.value.address = res.businessAddress
+        } else if (fileIndex === 1) {
+          this.value.idCardNo = res.idNumber
+          this.value.legalperson = res.name
+        }
+      })
     },
     submitForm() {
       this.$refs.enterprise.validate((valid) => {
         if (valid) {
-          alert('submit!')
+          const params = { ...this.value }
+          delete params.channelAuthStatus
+          this.$http(this.$interfaces.pay.carrier_open_account, params).then(res => {
+            this.value.channelAuthStatus = 2
+          })
         } else {
-          console.log('error submit!!')
           return false
         }
       })
@@ -115,10 +146,5 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
-.auth-btn {
-  position: absolute;
-  right: 0;
-  bottom: 0;
-}
 
 </style>

+ 66 - 27
pc/wcarrier/comp/authorize.vue

@@ -2,7 +2,7 @@
   <div>
     <div class="defbb p-spac">
       平台账户授权 [
-      <span class="gray-color" :class="{ 'green-color': true }">{{
+      <span class="gray-color" :class="{ 'green-color': progress }">{{
         stateText
       }}</span>
       ]<span class="ml-spac p-wcolor" v-if="waring"> [ 提醒:请先绑定“授权手机号”!]</span>
@@ -11,7 +11,7 @@
       <div class="center justify-between p-spacd2 defbb">
         <div>授权手机号</div>
         <div>
-          <span class="mr-spac">{{ bindPhone }}</span>
+          <span class="mr-spac">{{ value }}</span>
           <el-button type="text" @click="saveTel()">{{
             bindPhoneText
           }}</el-button>
@@ -24,17 +24,17 @@
           :class="{ 'gray-color': !isBindPhone}"
           @click="authEvent(0)"
         >
-          去授权
+          {{balanceAuthed?'已授权':'去授权'}}
         </div>
       </div>
-      <div class="center justify-between p-spacd2 defbb">
+      <div class="center justify-between p-spacd2 defbb" v-if="isDealer">
         <div>提现授权</div>
         <div
           class="pointer p-color"
           :class="{ 'gray-color': !isBindPhone }"
           @click="authEvent(1)"
         >
-          去授权
+          {{withdrawAuthed?'已授权':'去授权'}}
         </div>
       </div>
     </div>
@@ -167,19 +167,60 @@ export default {
     }
   },
   props: {
-    orgInfo: {
+    tradeType: {
+      type: Number
+    },
+    value: {
+      type: String,
+      default: ''
+    },
+    carrierBalanceInfo: {
       type: Object,
-      default: function() {
-        return {}
-      }
+      default: () => ({})
+    },
+    carrierWithdrawInfo: {
+      type: Object,
+      default: () => ({})
     }
   },
   computed: {
+    /** 经销 */
+    isDealer() {
+      return this.$props.tradeType === 1
+    },
+    balanceAuthed() {
+      return this.carrierBalanceInfo.balanceStatus === 2
+    },
+    withdrawAuthed() {
+      return this.carrierWithdrawInfo.withdrawStatus === 2
+    },
+    progress() {
+      let count = 0
+      if (this.balanceAuthed) {
+        count++
+      }
+      if (this.withdrawAuthed) {
+        count++
+      }
+      return count
+    },
     stateText() {
-      return '未完成'
+      let rv = '未完成'
+      if (this.isDealer) {
+        if (this.progress === 2) {
+          rv = '已授权'
+        } else {
+          rv = `${this.progress}/2`
+        }
+      } else {
+        if (this.carrierBalanceInfo.balanceStatus === 2) {
+          rv = '已授权'
+        }
+      }
+      return rv
     },
     isBindPhone() {
-      return !!this.bindPhone
+      return !!this.$props.value
     },
     bindPhoneText() {
       return this.isBindPhone ? '修改' : '绑定'
@@ -189,15 +230,19 @@ export default {
     }
   },
   created() {
-    this.formStepOne.tel = this.bindPhone
+    this.formStepOne.tel = this.$props.value
   },
   methods: {
     authEvent(type) {
-      this.authClicked = true
+      if (!this.isBindPhone) {
+        this.authClicked = true
+        return
+      }
+      // 转账授权
       if (type === 0) {
-        if (this.orgInfo.contractNo) {
+        // 已授权
+        if (this.carrierBalanceInfo.balanceStatus === 2) {
           const params = {
-            bizUserId: this.orgInfo.bizUserId,
             jumpUrl: window.location.href,
             source: 2
           }
@@ -208,8 +253,6 @@ export default {
           })
         } else {
           const params = {
-            bizUserId: this.orgInfo.bizUserId,
-            orgId: this.orgInfo.orgId,
             source: 2,
             backUrl: window.location.href,
             jumpUrl: location.href
@@ -222,13 +265,13 @@ export default {
           })
         }
       }
+      // 提现授权
       if (type === 1) {
-        if (this.orgInfo.protocolNo) {
+        // 已授权
+        if (this.carrierWithdrawInfo.withdrawStatus === 2) {
           this.$router.push('accountSetting/balanceProtocol')
         } else {
           const params = {
-            bizUserId: this.orgInfo.bizUserId,
-            orgId: this.orgInfo.orgId,
             source: 2,
             backUrl: window.location.href,
             jumpUrl: location.href
@@ -246,13 +289,12 @@ export default {
       this.$refs.formBindTel.validate((valid) => {
         if (valid) {
           const params = {
-            bizUserId: this.bizUserId,
             verificationCode: this.formBindTel.code,
             phone: this.formBindTel.tel
           }
           $bindPhone(params).then((res) => {
             this.$message.success(res.message)
-            this.bindPhone = this.formBindTel.tel
+            this.$props.value = this.formBindTel.tel
             this.formStepOne.tel = this.formBindTel.tel
             this.bindTelDialogVisible = false
           })
@@ -305,7 +347,6 @@ export default {
       }
       const params = {
         phone: tel,
-        bizUserId: this.bizUserId,
         verificationCodeType
       }
       $sendVerificationCode(params)
@@ -337,7 +378,6 @@ export default {
             const code = this.formStepOne.code
             const params = {
               phone: this.formStepOne.tel,
-              bizUserId: this.bizUserId,
               verificationCode: code
             }
             $unbindPhone(params).then((res) => {
@@ -345,7 +385,7 @@ export default {
                 this.stepActive = 2
                 this.footerBtnText = '确认修改'
                 this.$message.success(res.message)
-                this.bindPhone = ''
+                this.$props.value = ''
                 if (this.timer) {
                   clearInterval(this.timer)
                   this.codeBtn.text = '获取验证码'
@@ -364,7 +404,6 @@ export default {
           if (valid) {
             const params = {
               phone: this.formStepTwo.newTel,
-              bizUserId: this.bizUserId,
               verificationCode: this.formStepTwo.code
             }
             $bindPhone(params).then((res) => {
@@ -374,7 +413,7 @@ export default {
                 this.formStepTwo.tel = ''
                 this.formStepTwo.code = ''
                 this.$message.success(res.message)
-                this.bindPhone = this.formStepTwo.newTel
+                this.$props.value = this.formStepTwo.newTel
                 this.telDialogVisible = false
               } else {
                 this.$message.error(res.message)

+ 68 - 30
pc/wcarrier/comp/invoice.vue

@@ -3,8 +3,7 @@
     <div class="gray-color s-fz">[ 说明:用于发票补充展示 ]</div>
     <el-form
       ref="form"
-      :model="formData"
-      :rules="rules"
+      :model="value"
       size="mini"
       label-width="110px"
       label-position="left"
@@ -12,22 +11,30 @@
       class="p-spac pb-spacd4"
     >
       <div class="flex">
-        <el-form-item prop="addr" label="购方地址:" label-width="85px" class="mr-spac">
-          <el-input v-model="formData.addr" v-empty="emptyArgs"></el-input>
+        <el-form-item prop="fpAddress" label="购方地址:" label-width="85px" class="mr-spac">
+          <el-input v-model="value.fpAddress" placeholder="请输入" v-empty="emptyArgs"></el-input>
         </el-form-item>
-        <el-form-item prop="bank" label="购方开户银行:">
-          <el-input v-model="formData.bank" v-empty="emptyArgs"></el-input>
+        <el-form-item prop="fpBank" label="购方开户银行:">
+          <el-select v-model="value.fpBank" filterable placeholder="请选择" v-empty="emptyArgs">
+                <el-option
+                  v-for="(item, index) in banks"
+                  :key="index"
+                  :label="item.bankName"
+                  :value="item.bankNo">
+                </el-option>
+              </el-select>
+          <!-- <el-input v-model="value.fpBank" v-empty="emptyArgs"></el-input> -->
         </el-form-item>
       </div>
       <div class="flex">
-        <el-form-item prop="addr" label="购方电话:" label-width="85px" class="mr-spac">
-          <el-input v-model="formData.addr" v-empty="emptyArgs"></el-input>
+        <el-form-item prop="fpPhone" label="购方电话:" label-width="85px" class="mr-spac">
+          <el-input v-model="value.fpPhone" placeholder="请输入" v-empty="emptyArgs"></el-input>
         </el-form-item>
-        <el-form-item prop="bank" label="购方银行账号:">
-          <el-input v-model="formData.bank" v-empty="emptyArgs"></el-input>
+        <el-form-item prop="fpBankAccount" label="购方银行账号:">
+          <el-input v-model="value.fpBankAccount"  placeholder="请输入" v-empty="emptyArgs"></el-input>
         </el-form-item>
-        <div class="ml-spac pt-spac" v-if="!$props.disabled">
-            <template v-if="isReadOnly">
+        <div class="ml-spac pt-spac" v-if="showOpers">
+            <template v-if="!isEdit">
                 <el-button type="text" @click="isEdit=true">修改</el-button>
             </template>
             <template v-else>
@@ -48,64 +55,95 @@ export default {
   name: 'invoice',
   data() {
     return {
-      formData: {
-        addr: '',
-        bank: '66'
-      },
-      rules: {
-
-      },
+      banks: [],
       isEdit: false
     }
   },
   props: {
+    value: {
+      type: Object,
+      default: () => ({})
+    },
     readOnly: {
       type: Boolean,
-      default: false
+      default: null
     },
     disabled: {
       type: Boolean,
-      default: false
+      default: null
     }
   },
   computed: {
+    showOpers() {
+      const rv = false
+      // 设置了disabled
+      if (this.$props.disabled != null) {
+        return !this.$props.disabled
+      }
+      // 设置了readOnly
+      if (this.$props.readOnly != null) {
+        return !this.isReadOnly
+      }
+      return rv
+    },
+    saved() {
+      return this.value.fpStatus === 2
+    },
     isReadOnly() {
-      return this.readOnly || !this.isEdit
+      return (this.readOnly || !this.isEdit)
     },
     emptyArgs() {
       return { open: this.isReadOnly, text: '[ 暂无内容 ]' }
     }
   },
   watch: {
-    isEdit(val) {
-      if (val) {
-        staticData.formDataRaw = { ...this.formData }
+    value() {
+      staticData.formDataRaw = { ...this.value }
+    },
+    isEdit: {
+      handler(val) {
+        if (val) {
+          staticData.formDataRaw = { ...this.value }
+        }
       }
     }
   },
   created() {
-    this.isEdit = !Object.keys(this.formData).some(key => this.formData[key])
+    this.$http(this.$interfaces.user.list_by_keywords, { keywords: '' }).then(res => {
+      this.banks = res
+    })
+    this.isEdit = !this.saved
   },
   methods: {
     save() {
-      this.isEdit = false
+      this.$http(this.$interfaces.user.carrier_fp_save, this.value).then(res => {
+        this.isEdit = false
+      })
     },
     cancel() {
-      this.formData = staticData.formDataRaw
+      Object.keys(this.value).forEach(key => {
+        this.value[key] = staticData.formDataRaw[key]
+      })
       this.isEdit = false
     }
   }
 }
 </script>
 <style lang="scss" scoped>
-.el-input {
+.el-input,.el-select {
   width: 300px;
 }
+.el-select--mini {
+  font-size: 12px;
+}
 .el-form-item--mini.el-form-item {
     margin-bottom: 6px;
 }
 .read-only {
-    ::v-deep input {
+    ::v-deep .el-input__suffix {
+      display: none;
+    }
+    .el-input,.el-select,::v-deep input {
         padding: 0;
         border:0;
         pointer-events: none;

+ 172 - 62
pc/wcarrier/join.vue

@@ -1,20 +1,21 @@
+<!-- eslint-disable vue/valid-v-model -->
+
 <template>
   <div class="p-spac p-fz">
-    <div class="defbb p-spac">企业认证 [ 未完成 ]</div>
+    <div class="defbb p-spac">企业认证 [ <span class="gray-color" :class="{ 'green-color': isAuth }">{{ authText }}</span> ]</div>
     <div v-if="isAuth" class="s-fz flex">
       <div class="flex1 defbb p-spac p-t-0">
         <div class="chunk1">
-          <div><span>公司名称:</span>{{ info.orgName }}</div>
-          <div class=" "><span>统一社会信用代码:</span>{{ info.code }}</div>
+          <div><span>公司名称:</span>{{ carrierAuthInfo.orgName }}</div>
+          <div class=" "><span>统一社会信用代码:</span>{{ carrierAuthInfo.taxpayer }}</div>
         </div>
         <div class="gray-color defbb p-spac">公司营业执照</div>
         <div class="p-spac">
           <el-image
             class="big-img"
-            src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
-            :preview-src-list="[
-              'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
-            ]"
+            fit="cover"
+            :src="$tools.getFullFileUrl(carrierAuthInfo.businessLicense)"
+            :preview-src-list="[$tools.getFullFileUrl(carrierAuthInfo.businessLicense)]"
           >
           </el-image>
         </div>
@@ -22,38 +23,46 @@
       <div class="flex1 defbb p-spac p-t-0">
         <div class="chunk1">
           <div class="abs-rt"><span>证件类型:</span>身份证</div>
-          <div><span>法人姓名:</span>{{ info.orgName }}</div>
-          <div><span>证件号:</span>{{ info.code }}</div>
+          <div><span>法人姓名:</span>{{ carrierAuthInfo.legalperson }}</div>
+          <div><span>证件号:</span>{{ carrierAuthInfo.idCardNo }}</div>
         </div>
         <div class="flex">
           <div class="mr-spac">
             <div class="gray-color defbb p-spac">法人身份证人像面</div>
             <div class="p-spac">
-              <img
-                src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
-                class="small-img"
-              />
+          <el-image
+            class="small-img"
+            fit="cover"
+            :src="$tools.getFullFileUrl(carrierAuthInfo.idCardFront)"
+            :preview-src-list="[$tools.getFullFileUrl(carrierAuthInfo.idCardFront)]"
+          >
+          </el-image>
             </div>
           </div>
           <div>
             <div class="gray-color defbb p-spac">法人身份证人像面</div>
             <div class="p-spac">
-              <img
-                src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
-                class="small-img"
-              />
+          <el-image
+            class="small-img"
+            fit="cover"
+            :src="$tools.getFullFileUrl(carrierAuthInfo.idCardBack)"
+            :preview-src-list="[$tools.getFullFileUrl(carrierAuthInfo.idCardBack)]"
+          >
+          </el-image>
             </div>
           </div>
         </div>
       </div>
     </div>
-    <auth v-else />
+    <auth v-else v-model="carrierAuthInfo"/>
     <div class="defbb p-spac">
       资质审核 [
-      <span class="gray-color" :class="{ 'green-color': true }">{{
+      <span class="gray-color" :class="{ 'green-color': isreView }">{{
         operateState
       }}</span>
       ]
+          <el-button type="text"  v-if="reViewing" @click="getCarrierInfo()" :loading="$reqState($interfaces.user.get_carrier_info).ing">刷新</el-button>
+
       <span class="ml-spac p-wcolor" v-if="!isAuth">
         [ 提醒:请先完成“企业认证”!]</span
       >
@@ -63,27 +72,30 @@
         <div
           class="gray-color"
           :class="
-            operateLiceView ? 'defbb pb-spac' : 'required ml-spac mb-spac'
+            carrierRoadInfoView ? 'defbb pb-spac' : 'required ml-spac mb-spac'
           "
         >
           道路运输经营许可证
         </div>
-        <div class="p-spac" v-if="operateLiceView">
-          <img
-            src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
+        <div class="p-spac" v-if="carrierRoadInfoView">
+          <el-image
             class="big-img"
-          />
+            fit="cover"
+            :src="$tools.getFullFileUrl(carrierRoadInfo.roadTransport)"
+            :preview-src-list="[$tools.getFullFileUrl(carrierRoadInfo.roadTransport)]"
+          >
+          </el-image>
         </div>
         <el-form
           v-else
-          ref="operateLice"
-          :model="operateLice"
+          ref="carrierRoadInfo"
+          :model="carrierRoadInfo"
           :rules="rules"
           size="mini"
         >
-          <el-form-item prop="card">
+          <el-form-item prop="roadTransport">
             <upload-img
-              :fileList="operateLiceImg"
+              :fileList="carrierRoadInfoImg"
               :big="true"
               :disabled="!isAuth"
               @uploadOrgPic="uploadOrgPic"
@@ -93,15 +105,15 @@
       </div>
       <div
         class="flex-column justify-between flex-items-start ml-spac pb-spac"
-        v-if="!operateLiceView"
+        v-if="!carrierRoadInfoView"
       >
-        <div v-if="isReject">
+        <div v-if="isAuth&&isReject">
           驳回理由:
-          <div>驳回理由驳回理由驳回理由驳回理由</div>
+          <div>{{carrierRoadInfo.reason}}</div>
         </div>
         <div v-else></div>
         <el-button
-          v-if="isAuth"
+          v-if="isAuth&&(unStart||isReject)"
           type="primary"
           size="medium"
           class="auth-btn"
@@ -115,8 +127,8 @@
         >[ 提醒:请先完成“资质审核”!]</span
       >
     </div>
-    <invoice :disabled="!isreView" :readOnly="false" class="p-spacd2 p-b-0" />
-    <authorize :orgInfo="orgInfo" v-if="isreView" />
+    <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" />
   </div>
 </template>
 <script>
@@ -125,26 +137,101 @@ import UploadImg from '@/components/uploadImg'
 import auth from './comp/auth.vue'
 import invoice from './comp/invoice.vue'
 import authorize from './comp/authorize.vue'
-import { getOrgInfo } from '@/utils/tools'
 
 export default {
   name: 'join',
   data() {
     return {
-      orgInfo: {},
-      info: {
-        orgName: '水电费'
+      /** 交易模式(1经销模式;2直销模式,默认经销模式1) */
+      tradeType: 1,
+      /** 绑定手机号信息 */
+      bindPhone: '',
+      /** 企业认证信息 */
+      carrierAuthInfo: {
+        /** 营业执照路径 */
+        businessLicense: '',
+        /** 认证状态:1=未完成 2=已认证 */
+        channelAuthStatus: 1,
+        /** 法人身份证反面照片路径 */
+        idCardBack: '',
+        /** 法人身份证正面照片路径 */
+        idCardFront: '',
+        /** 法人证件号(身份证号) */
+        idCardNo: '',
+        /** 法人姓名 */
+        legalperson: '',
+        /** 公司名称 */
+        orgName: '',
+        /** 统一社会信用代码(纳税人识别号) */
+        taxpayer: ''
+      },
+      /** 资质审核:道路运输许可证信息 */
+      carrierRoadInfo: {
+        /** 审核驳回理由 */
+        reason: '',
+        /** 审核记录 */
+        records: '',
+        /** 道路运输许可证路径 */
+        roadTransport: '',
+        /** 道路运输经营许可证认证状态: 0=未发起(默认)1=待认证 2=已认证 3=已驳回 */
+        roadTransportStatus: 0
+      },
+      /** 开票补充信息 */
+      carrierFpInfo: {
+        /** 开票信息:购方地址 */
+        fpAddress: '',
+        /** 开票信息:购方开户银行 */
+        fpBank: '',
+        /** 开票信息:购方银行账号 */
+        fpBankAccount: '',
+        /** 开票信息:购方电话 */
+        fpPhone: '',
+        /** 1未保存过,2已保存过 */
+        fpStatus: 1
+      },
+      /** 提现公户信息 */
+      carrierBankInfo: {
+        /** 提现公户账号 */
+        account: '',
+        /** 开户银行 */
+        bank: '',
+        /** 开户行支行 */
+        bankName: '',
+        /** 1未上报,2已上报 */
+        bankStatus: 1,
+        /** 支行行号 */
+        unionBank: ''
       },
-      operateLiceImg: [
+      /** 合同签约信息 */
+      carrierContractInfo: {
+        /** 签约完成时间 */
+        contractDate: '',
+        /** 签约状态 1=未签约 2=已签约 */
+        contractStatus: 1
+      },
+      /** 转账授权 */
+      carrierBalanceInfo: {
+        /** undefined */
+        balanceDate: '',
+        /** 转账授权:1未授权 2已授权 */
+        balanceStatus: 1
+      },
+      /** 提现授权 */
+      carrierWithdrawInfo: {
+        /** 转账授权签约时间 */
+        withdrawDate: '',
+        /** 提现授权:1未授权 2已授权 */
+        withdrawStatus: 1
+      },
+      carrierRoadInfoImg: [
         {
           path: '',
           defaultPath: require('@/assets/images/main/license@2x.png'),
           text: '上传道路运输经营许可证'
         }
       ],
-      operateLice: {},
       rules: {
-        card: {
+        roadTransport: {
           required: true,
           message: '请上传道路运输经营许可证',
           trigger: 'blur'
@@ -161,47 +248,70 @@ export default {
 
     // 已认证
     isAuth() {
-      return false
+      return this.carrierAuthInfo.channelAuthStatus === 2
+    },
+    authText() {
+      return this.isAuth ? '已认证' : '未完成'
+    },
+    // 未发起
+    unStart() {
+      return this.carrierRoadInfo.roadTransportStatus === 0
+    },
+    // 待审核
+    reViewing() {
+      return this.carrierRoadInfo.roadTransportStatus === 1
+    },
+    // 被驳回
+    isReject() {
+      return this.carrierRoadInfo.roadTransportStatus === 3
     },
     // 已审核
     isreView() {
-      return true
+      return this.carrierRoadInfo.roadTransportStatus === 2
     },
     operateState() {
-      return '未发起'
+      return ['未发起', '待审核', '已认证', '已驳回'][this.carrierRoadInfo.roadTransportStatus]
     },
     // 营运许可证为查看状态
-    operateLiceView() {
-      return this.isreView
-    },
-    // 被驳回
-    isReject() {
-      return true
+    carrierRoadInfoView() {
+      return this.reViewing || this.isreView
     },
     reviewBtnText() {
       return this.isReject ? '重新发起审核' : '发起审核'
     }
   },
   created() {
-    this.userOrgFind()
+    this.getCarrierInfo()
+    // this.userOrgFind()
   },
   methods: {
-    userOrgFind() {
-      getOrgInfo(this.orgId, 'info').then(res => {
-        this.orgInfo = res
-      })
+    getCarrierInfo() {
+      if (this.orgId) {
+        this.$http(this.$interfaces.user.get_carrier_info, { orgId: this.orgId }).then(res => {
+          this.tradeType = res.org.tradeType
+          this.carrierAuthInfo = res.carrierAuthInfo
+          this.carrierBalanceInfo = res.carrierBalanceInfo
+          this.carrierBankInfo = res.carrierBankInfo
+          this.carrierContractInfo = res.carrierContractInfo
+          this.carrierFpInfo = res.carrierFpInfo
+          this.carrierRoadInfo = res.carrierRoadInfo
+          this.carrierWithdrawInfo = res.carrierWithdrawInfo
+        })
+      }
     },
 
-    uploadOrgPic() {
-      console.log('上传成功', arguments)
+    uploadOrgPic(path) {
+      this.carrierRoadInfo.roadTransport = path
+      // this.carrierRoadInfo.roadTransport = process.env.VUE_APP_FILE_URL + path
     },
     submitForm() {
-      this.$refs.operateLice.validate((valid) => {
+      this.$refs.carrierRoadInfo.validate((valid) => {
         if (valid) {
-          alert('submit!')
-        } else {
-          console.log('error submit!!')
-          return false
+          this.$http(this.$interfaces.user.road_transport_up, {
+            picPath: this.carrierRoadInfo.roadTransport
+          }).then(res => {
+            this.carrierRoadInfo.roadTransportStatus = 1
+          })
         }
       })
     }