join.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. <!-- eslint-disable vue/valid-v-model -->
  2. <template>
  3. <div class="p-fz" v-show="inited">
  4. <div class="defbb pt-spac pb-spac">企业认证 [ <span class="label-color" :class="{ 'green-color': isAuth }">{{ authText }}</span>
  5. ]
  6. </div>
  7. <div v-if="module.carrierAuthInfo.readOnly||isAuth" class="flex defbb">
  8. <div :class="{ 'flex1': module.carrierAuthInfo.readOnly }">
  9. <div class="chunk1 p-fz">
  10. <div><span>公司名称:</span>{{ carrierAuthInfo.orgName }}</div>
  11. <div class="flex-end"><span>统一社会信用代码:</span>{{ carrierAuthInfo.taxpayer }}</div>
  12. </div>
  13. <div class="label-color p-spac defbb">公司营业执照</div>
  14. <div class="p-spac center">
  15. <el-image class="big-img" fit="cover" :src="$tools.getFullFileUrl(carrierAuthInfo.businessLicense)"
  16. :preview-src-list="[$tools.getFullFileUrl(carrierAuthInfo.businessLicense)]">
  17. </el-image>
  18. </div>
  19. </div>
  20. <div class="ml-spacm4" :class="{ 'flex1': module.carrierAuthInfo.readOnly }">
  21. <div class="chunk1 p-fz">
  22. <div class="abs-rt"><span>证件类型:</span>身份证</div>
  23. <div><span>法人姓名:</span>{{ carrierAuthInfo.legalperson }}</div>
  24. <div class="flex-end"><span>证件号:</span>{{ carrierAuthInfo.idCardNo }}</div>
  25. </div>
  26. <div class="flex">
  27. <div class="mr-spac">
  28. <div class="label-color defbb p-spac">法人身份证人像面</div>
  29. <div class="p-spac">
  30. <el-image class="small-img" fit="cover" :src="$tools.getFullFileUrl(carrierAuthInfo.idCardFront)"
  31. :preview-src-list="[$tools.getFullFileUrl(carrierAuthInfo.idCardFront)]">
  32. </el-image>
  33. </div>
  34. </div>
  35. <div>
  36. <div class="label-color defbb p-spac">法人身份证国徽面</div>
  37. <div class="p-spac">
  38. <el-image class="small-img" fit="cover" :src="$tools.getFullFileUrl(carrierAuthInfo.idCardBack)"
  39. :preview-src-list="[$tools.getFullFileUrl(carrierAuthInfo.idCardBack)]">
  40. </el-image>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. <auth v-else v-model="carrierAuthInfo" @authSuccess="getCarrierInfo()"/>
  47. <template v-if="module.carrierRoadInfo.show">
  48. <div class="defbb pt-spac pb-spac mt-spac">
  49. 资质审核 [
  50. <span class="gray-color" :class="{ 'green-color': isreView, 'p-wcolor': reViewing }">{{
  51. operateState
  52. }}</span>
  53. ]
  54. <el-button type="text" v-if="!module.carrierRoadInfo.readOnly && reViewing" @click="getCarrierInfo()"
  55. :loading="$reqState($interfaces.user.get_carrier_info).ing">刷新</el-button>
  56. <span class="ml-spac p-wcolor" v-if="!isAuth">
  57. [ 提醒:请先完成“企业认证”!]</span>
  58. </div>
  59. <div class="p-spac p-b-0 flex defbb">
  60. <div :class="{ flex1: module.carrierRoadInfo.readOnly }">
  61. <div class="label-color" :class="carrierRoadInfoView ? 'defbb pb-spac' : 'required ml-spac mb-spac'
  62. ">
  63. 道路运输经营许可证
  64. </div>
  65. <div class="p-spac center" v-if="carrierRoadInfoView">
  66. <el-image class="big-img" fit="cover" :src="$tools.getFullFileUrl(carrierRoadInfo.roadTransport)"
  67. :preview-src-list="[$tools.getFullFileUrl(carrierRoadInfo.roadTransport)]">
  68. </el-image>
  69. </div>
  70. <el-form v-else ref="carrierRoadInfo" :model="carrierRoadInfo" :rules="rules" size="mini">
  71. <el-form-item prop="roadTransport">
  72. <upload-img :fileList="carrierRoadInfoImg" :big="true" :disabled="!isAuth"
  73. @uploadOrgPic="uploadOrgPic"></upload-img>
  74. </el-form-item>
  75. </el-form>
  76. </div>
  77. <div v-if="module.carrierRoadInfo.readOnly" class="flex1 ml-spacm4">
  78. <div class="defbb label-color pb-spac">审核记录</div>
  79. <div class="p-spacd2" v-for="(crir, i) in carrierRoadInfo.records" :key="i">
  80. {{ $tools.formatDate(crir.createDate) }} {{ crir.createrName }} {{ crir.action }}
  81. </div>
  82. </div>
  83. <div class="flex-column justify-between flex-items-start ml-spac pb-spac" v-else>
  84. <div v-if="isAuth && isReject">
  85. 驳回理由:
  86. <div>{{ carrierRoadInfo.reason }}</div>
  87. </div>
  88. <div v-else></div>
  89. <el-button v-if="isAuth && (unStart || isReject)" type="primary" size="medium" class="auth-btn"
  90. @click="transportUp()" :loading="$reqState($interfaces.user.road_transport_up).ing">{{ reviewBtnText
  91. }}</el-button>
  92. </div>
  93. </div>
  94. </template>
  95. <template v-if="$props.module.carrierFpInfo.show">
  96. <div class="defbb pt-spac pb-spac mt-spac">
  97. 开票补充信息<span class="ml-spac p-wcolor" v-if="!isreView">[ 提醒:请先完成“资质审核”!]</span>
  98. </div>
  99. <invoice :disabled="!isreView" :readOnly="module.carrierFpInfo.readOnly" v-model="carrierFpInfo"
  100. class="p-spacd2 p-b-0" />
  101. </template>
  102. <template v-if="$props.module.fundManagement">
  103. <div class="defbb pt-spac pb-spac mt-spac">
  104. 资金管理设置
  105. </div>
  106. <div class="p-spac defbb">
  107. <div class="flex">
  108. <div class="flex1"><span class="label-color">物流充值交易模式:</span>{{ $convert.getTypeStr('tradeType', tradeType) }}</div>
  109. <div class="flex1 mb-spacd2"><span class="label-color">其他付款启用状态:</span>[ <span class="gray-color" :class="{ 'green-color': otherPay === 1 }">{{
  110. $convert.getTypeStr('otherPay',otherPay) }}</span> ]</div>
  111. </div>
  112. <div>
  113. <span class="label-color">物流充值工具:</span>{{ $convert.getTypeStr('p2pEnable', p2pEnable) }}
  114. </div>
  115. </div>
  116. </template>
  117. <authorize v-model="bindPhone" :carrierBalanceInfo="carrierBalanceInfo" :carrierWithdrawInfo="carrierWithdrawInfo"
  118. :tradeType="tradeType" :readOnly="module.authorize.readOnly" v-if="$props.module.authorize.show && isreView" />
  119. <bankInfo v-model="carrierBankInfo" :readOnly="module.carrierBankInfo.readOnly" v-if="showBankInfo" />
  120. <review class="w50" :orgId="safeOrgId" v-if="$props.module.review" @feedback="reviewFeedback" />
  121. <div class="pt-spac pb-spac mt-spac" v-if="module.carrierContractInfo">
  122. 合同签约 [ <span class="gray-color"
  123. :class="{ 'green-color': contracted }">{{ $convert.getTypeStr('contractStatus', carrierContractInfo.contractStatus) }}</span>
  124. ]
  125. </div>
  126. <div class="defbt pt-spac pb-spac" v-if="module.status">
  127. <div class="mt-spac mb-spac">
  128. 启用状态:
  129. <el-radio class="ml-spac" v-model="status" :label="0">启用</el-radio>
  130. <el-radio v-model="status" :label="1">停用</el-radio>
  131. </div>
  132. <div class="mb-spac">
  133. <el-button type="primary" size="small" @click="submitStatus"
  134. :loading="$reqState($interfaces.user.edit_status).ing">确定</el-button>
  135. <el-button size="small" @click="$emit('statusFeedback', 0)">取消</el-button>
  136. </div>
  137. </div>
  138. </div>
  139. </template>
  140. <script>
  141. import UploadImg from 'submodule/components/pc/upload/uploadImg.vue'
  142. import auth from './comp/auth.vue'
  143. import invoice from './comp/invoice.vue'
  144. import authorize from './comp/authorize.vue'
  145. import bankInfo from './comp/bankInfo.vue'
  146. import review from './comp/review.vue'
  147. export default {
  148. name: 'join',
  149. data() {
  150. const _this = this
  151. return {
  152. inited: false,
  153. args: {},
  154. /** 启用状态 0-启用,1-停用 */
  155. status: 0,
  156. /** 交易模式(1经销模式;2直销模式,默认经销模式1) */
  157. tradeType: -1,
  158. /** 其他付款状态(挂靠车):默认0关闭,1开启 */
  159. otherPay: 0,
  160. /** 物流是否允许公对公充值:0-不允许 1-允许 */
  161. p2pEnable: 0,
  162. /** 绑定手机号信息 */
  163. bindPhone: '',
  164. /** 企业认证信息 */
  165. carrierAuthInfo: {
  166. /** 营业执照路径 */
  167. businessLicense: '',
  168. /** 认证状态:1=未完成 2=已认证 */
  169. channelAuthStatus: 1,
  170. /** 法人身份证反面照片路径 */
  171. idCardBack: '',
  172. /** 法人身份证正面照片路径 */
  173. idCardFront: '',
  174. /** 法人证件号(身份证号) */
  175. idCardNo: '',
  176. /** 法人姓名 */
  177. legalperson: '',
  178. /** 公司名称 */
  179. orgName: '',
  180. /** 统一社会信用代码(纳税人识别号) */
  181. taxpayer: ''
  182. },
  183. /** 资质审核:道路运输许可证信息 */
  184. carrierRoadInfo: {
  185. /** 审核驳回理由 */
  186. reason: '',
  187. /** 审核记录 */
  188. records: '',
  189. /** 道路运输许可证路径 */
  190. roadTransport: '',
  191. /** 道路运输经营许可证认证状态: 0=未发起(默认)1=待认证 2=已认证 3=已驳回 */
  192. roadTransportStatus: 0
  193. },
  194. /** 开票补充信息 */
  195. carrierFpInfo: {
  196. /** 开票信息:购方地址 */
  197. fpAddress: '',
  198. /** 开票信息:购方开户银行 */
  199. fpBank: '',
  200. /** 开票信息:购方银行账号 */
  201. fpBankAccount: '',
  202. /** 开票信息:购方电话 */
  203. fpPhone: '',
  204. /** 1未保存过,2已保存过 */
  205. fpStatus: 1
  206. },
  207. /** 提现公户信息 */
  208. carrierBankInfo: {
  209. /** 提现公户账号 */
  210. account: '',
  211. /** 开户银行 */
  212. bank: '',
  213. /** 开户行支行 */
  214. bankName: '',
  215. /** 1未上报,2已上报 */
  216. bankStatus: 1,
  217. /** 支行行号 */
  218. unionBank: ''
  219. },
  220. /** 合同签约信息 */
  221. carrierContractInfo: {
  222. /** 签约完成时间 */
  223. contractDate: '',
  224. /** 签约状态 1=未签约 2=已签约 */
  225. contractStatus: 1
  226. },
  227. /** 转账授权 */
  228. carrierBalanceInfo: {
  229. /** undefined */
  230. balanceDate: '',
  231. /** 转账授权:1未授权 2已授权 */
  232. balanceStatus: 1
  233. },
  234. /** 提现授权 */
  235. carrierWithdrawInfo: {
  236. /** 转账授权签约时间 */
  237. withdrawDate: '',
  238. /** 提现授权:1未授权 2已授权 */
  239. withdrawStatus: 1
  240. },
  241. carrierRoadInfoImg: [
  242. {
  243. get path() { return _this.$tools.getFullFileUrl(_this.carrierRoadInfo.roadTransport) },
  244. defaultPath: require('@/assets/images/main/license@2x.png'),
  245. text: '上传道路运输经营许可证'
  246. }
  247. ],
  248. rules: {
  249. roadTransport: {
  250. required: true,
  251. message: '请上传道路运输经营许可证',
  252. trigger: 'blur'
  253. }
  254. }
  255. }
  256. },
  257. components: { UploadImg, auth, invoice, authorize, review, bankInfo },
  258. props: {
  259. orgId: {
  260. type: String,
  261. default: ''
  262. },
  263. /** 模块信息 */
  264. module: {
  265. type: Object,
  266. default: () => ({
  267. carrierAuthInfo: {
  268. readOnly: false
  269. },
  270. carrierRoadInfo: {
  271. show: false,
  272. readOnly: false
  273. },
  274. carrierFpInfo: {
  275. show: false,
  276. readOnly: false
  277. },
  278. /** 资金管理设置 */
  279. fundManagement: false,
  280. /** 平台账号授权 */
  281. authorize: {
  282. show: false,
  283. readOnly: false
  284. },
  285. review: false
  286. })
  287. }
  288. },
  289. computed: {
  290. showBankInfo() {
  291. return this.module.carrierBankInfo.show && this.tradeType === 1
  292. },
  293. /** 合同已签约 */
  294. contracted() {
  295. return this.carrierContractInfo.contractStatus === 2
  296. },
  297. safeOrgId() {
  298. return this.$props.orgId ||
  299. this.args.orgId
  300. },
  301. // 已认证
  302. isAuth() {
  303. return this.carrierAuthInfo.channelAuthStatus === 2
  304. },
  305. authText() {
  306. return this.isAuth ? '已认证' : '未完成'
  307. },
  308. // 未发起
  309. unStart() {
  310. return this.carrierRoadInfo.roadTransportStatus === 0
  311. },
  312. // 待审核
  313. reViewing() {
  314. return this.carrierRoadInfo.roadTransportStatus === 1
  315. },
  316. // 被驳回
  317. isReject() {
  318. return this.carrierRoadInfo.roadTransportStatus === 3
  319. },
  320. // 已审核
  321. isreView() {
  322. return this.carrierRoadInfo.roadTransportStatus === 2
  323. },
  324. operateState() {
  325. return this.$convert.getTypeStr('roadTransportStatus', this.carrierRoadInfo.roadTransportStatus)
  326. },
  327. // 营运许可证为查看状态
  328. carrierRoadInfoView() {
  329. return this.module.carrierRoadInfo.readOnly || this.reViewing || this.isreView
  330. },
  331. reviewBtnText() {
  332. return this.isReject ? '重新发起审核' : '发起审核'
  333. }
  334. },
  335. created() {
  336. this.getCarrierInfo()
  337. },
  338. methods: {
  339. submitStatus() {
  340. this.$http(this.$interfaces.user.edit_status, { orgId: this.safeOrgId, status: this.status }).then(() => {
  341. this.$message.success('操作成功')
  342. this.$emit('statusFeedback', 1)
  343. })
  344. },
  345. async init(args) {
  346. this.inited = false
  347. this.args = args
  348. this.getCarrierInfo()
  349. },
  350. /**
  351. * qualificationReviewFeedback
  352. * @description: 资质审核反馈
  353. * @param {type} 2通过 3驳回 0 取消
  354. * @return: null
  355. */
  356. reviewFeedback(type) {
  357. this.$emit('reviewFeedback', type)
  358. },
  359. async getCarrierInfo() {
  360. if (this.safeOrgId) {
  361. await this.$http(this.$interfaces.user.get_carrier_info, { orgId: this.safeOrgId }).then(res => {
  362. this.bindPhone = res.bindPhone
  363. this.status = res.org.status
  364. this.tradeType = res.org.tradeType
  365. this.otherPay = res.org.otherPay
  366. this.p2pEnable = res.org.p2pEnable
  367. this.carrierAuthInfo = res.carrierAuthInfo
  368. this.carrierBalanceInfo = res.carrierBalanceInfo
  369. this.carrierBankInfo = res.carrierBankInfo
  370. this.carrierContractInfo = res.carrierContractInfo
  371. this.carrierFpInfo = res.carrierFpInfo
  372. this.carrierRoadInfo = res.carrierRoadInfo
  373. this.carrierWithdrawInfo = res.carrierWithdrawInfo
  374. })
  375. }
  376. this.inited = true
  377. },
  378. uploadOrgPic(path) {
  379. this.carrierRoadInfo.roadTransport = path
  380. },
  381. transportUp() {
  382. this.$refs.carrierRoadInfo.validate((valid) => {
  383. if (valid) {
  384. this.$http(this.$interfaces.user.road_transport_up, {
  385. picPath: this.carrierRoadInfo.roadTransport
  386. }).then(res => {
  387. this.carrierRoadInfo.roadTransportStatus = 1
  388. })
  389. }
  390. })
  391. }
  392. }
  393. }
  394. </script>
  395. <style lang="scss" scoped>
  396. @import "submodule/utils/style/variables.scss";
  397. .abs-rt {
  398. position: absolute;
  399. right: $p-spac;
  400. top: $p-spac;
  401. }
  402. .small-img {
  403. width: 216px;
  404. height: 140px;
  405. }
  406. .big-img {
  407. width: 340px;
  408. height: 220px;
  409. }
  410. </style>