join.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. <!-- eslint-disable vue/valid-v-model -->
  2. <template>
  3. <div class="p-fz" v-show="inited">
  4. <div class="defbb p-spac">企业认证 [ <span class="label-color" :class="{ 'green-color': isAuth }">{{ authText }}</span>
  5. ]
  6. </div>
  7. <div v-if="isAuth" class="flex pl-spac pr-spac defbb">
  8. <div :class="{ 'flex1': module.carrierAuthInfo.readOnly }">
  9. <div class="chunk1 p-fz">
  10. <div><span>公司名称:</span>{{ carrierAuthInfo.orgName }}</div>
  11. <div class=" "><span>统一社会信用代码:</span>{{ carrierAuthInfo.taxpayer }}</div>
  12. </div>
  13. <div class="label-color p-spac defbb">公司营业执照</div>
  14. <div class="p-spac">
  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><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" />
  47. <template v-if="module.carrierRoadInfo.show">
  48. <div class="defbb p-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" 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 p-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 p-spac">
  104. 资金管理设置
  105. </div>
  106. <div class="p-spac defbb">
  107. <div class="flex">
  108. <div class="flex1">物流充值交易模式:{{ $convert.getTypeStr('tradeType', tradeType) }}</div>
  109. <div class="flex1 mb-spacd2">其他付款启用状态:[ <span class="gray-color" :class="{ 'green-color': otherPay === 1 }">{{
  110. $convert.getTypeStr('otherPay',otherPay) }}</span> ]</div>
  111. </div>
  112. <div>
  113. 物流充值工具:{{ $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="p-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="p-spac" v-if="module.status">
  127. <div class="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. args: {},
  153. /** 启用状态 0-启用,1-停用 */
  154. status: 0,
  155. /** 交易模式(1经销模式;2直销模式,默认经销模式1) */
  156. tradeType: 1,
  157. /** 其他付款状态(挂靠车):默认0关闭,1开启 */
  158. otherPay: 0,
  159. /** 物流是否允许公对公充值:0-不允许 1-允许 */
  160. p2pEnable: 0,
  161. /** 绑定手机号信息 */
  162. bindPhone: '',
  163. /** 企业认证信息 */
  164. carrierAuthInfo: {
  165. /** 营业执照路径 */
  166. businessLicense: '',
  167. /** 认证状态:1=未完成 2=已认证 */
  168. channelAuthStatus: 1,
  169. /** 法人身份证反面照片路径 */
  170. idCardBack: '',
  171. /** 法人身份证正面照片路径 */
  172. idCardFront: '',
  173. /** 法人证件号(身份证号) */
  174. idCardNo: '',
  175. /** 法人姓名 */
  176. legalperson: '',
  177. /** 公司名称 */
  178. orgName: '',
  179. /** 统一社会信用代码(纳税人识别号) */
  180. taxpayer: ''
  181. },
  182. /** 资质审核:道路运输许可证信息 */
  183. carrierRoadInfo: {
  184. /** 审核驳回理由 */
  185. reason: '',
  186. /** 审核记录 */
  187. records: '',
  188. /** 道路运输许可证路径 */
  189. roadTransport: '',
  190. /** 道路运输经营许可证认证状态: 0=未发起(默认)1=待认证 2=已认证 3=已驳回 */
  191. roadTransportStatus: 0
  192. },
  193. /** 开票补充信息 */
  194. carrierFpInfo: {
  195. /** 开票信息:购方地址 */
  196. fpAddress: '',
  197. /** 开票信息:购方开户银行 */
  198. fpBank: '',
  199. /** 开票信息:购方银行账号 */
  200. fpBankAccount: '',
  201. /** 开票信息:购方电话 */
  202. fpPhone: '',
  203. /** 1未保存过,2已保存过 */
  204. fpStatus: 1
  205. },
  206. /** 提现公户信息 */
  207. carrierBankInfo: {
  208. /** 提现公户账号 */
  209. account: '',
  210. /** 开户银行 */
  211. bank: '',
  212. /** 开户行支行 */
  213. bankName: '',
  214. /** 1未上报,2已上报 */
  215. bankStatus: 1,
  216. /** 支行行号 */
  217. unionBank: ''
  218. },
  219. /** 合同签约信息 */
  220. carrierContractInfo: {
  221. /** 签约完成时间 */
  222. contractDate: '',
  223. /** 签约状态 1=未签约 2=已签约 */
  224. contractStatus: 1
  225. },
  226. /** 转账授权 */
  227. carrierBalanceInfo: {
  228. /** undefined */
  229. balanceDate: '',
  230. /** 转账授权:1未授权 2已授权 */
  231. balanceStatus: 1
  232. },
  233. /** 提现授权 */
  234. carrierWithdrawInfo: {
  235. /** 转账授权签约时间 */
  236. withdrawDate: '',
  237. /** 提现授权:1未授权 2已授权 */
  238. withdrawStatus: 1
  239. },
  240. carrierRoadInfoImg: [
  241. {
  242. get path() { return _this.$tools.getFullFileUrl(_this.carrierRoadInfo.roadTransport) },
  243. defaultPath: require('@/assets/images/main/license@2x.png'),
  244. text: '上传道路运输经营许可证'
  245. }
  246. ],
  247. rules: {
  248. roadTransport: {
  249. required: true,
  250. message: '请上传道路运输经营许可证',
  251. trigger: 'blur'
  252. }
  253. }
  254. }
  255. },
  256. components: { UploadImg, auth, invoice, authorize, review, bankInfo },
  257. props: {
  258. orgId: {
  259. type: String,
  260. default: ''
  261. },
  262. /** 模块信息 */
  263. module: {
  264. type: Object,
  265. default: () => ({
  266. carrierAuthInfo: {
  267. readOnly: false
  268. },
  269. carrierRoadInfo: {
  270. show: false,
  271. readOnly: false
  272. },
  273. carrierFpInfo: {
  274. show: false,
  275. readOnly: false
  276. },
  277. /** 资金管理设置 */
  278. fundManagement: false,
  279. /** 平台账号授权 */
  280. authorize: {
  281. show: false,
  282. readOnly: false
  283. },
  284. review: false
  285. })
  286. }
  287. },
  288. computed: {
  289. showBankInfo() {
  290. return this.module.carrierBankInfo.show && this.tradeType === 1
  291. },
  292. /** 合同已签约 */
  293. contracted() {
  294. return this.carrierContractInfo.contractStatus === 2
  295. },
  296. inited() {
  297. return (this.safeOrgId && this.$reqState(this.$interfaces.user.get_carrier_info).sus) || !this.safeOrgId
  298. },
  299. safeOrgId() {
  300. return this.$props.orgId ||
  301. this.args.orgId
  302. },
  303. // 已认证
  304. isAuth() {
  305. return this.carrierAuthInfo.channelAuthStatus === 2
  306. },
  307. authText() {
  308. return this.isAuth ? '已认证' : '未完成'
  309. },
  310. // 未发起
  311. unStart() {
  312. return this.carrierRoadInfo.roadTransportStatus === 0
  313. },
  314. // 待审核
  315. reViewing() {
  316. return this.carrierRoadInfo.roadTransportStatus === 1
  317. },
  318. // 被驳回
  319. isReject() {
  320. return this.carrierRoadInfo.roadTransportStatus === 3
  321. },
  322. // 已审核
  323. isreView() {
  324. return this.carrierRoadInfo.roadTransportStatus === 2
  325. },
  326. operateState() {
  327. return ['未发起', '待审核', '已过审', '已驳回'][this.carrierRoadInfo.roadTransportStatus]
  328. },
  329. // 营运许可证为查看状态
  330. carrierRoadInfoView() {
  331. return this.module.carrierRoadInfo.readOnly || this.reViewing || this.isreView
  332. },
  333. reviewBtnText() {
  334. return this.isReject ? '重新发起审核' : '发起审核'
  335. }
  336. },
  337. created() {
  338. this.getCarrierInfo()
  339. },
  340. methods: {
  341. submitStatus() {
  342. this.$http(this.$interfaces.user.edit_status, { orgId: this.safeOrgId, status: this.status }).then(() => {
  343. this.$emit('statusFeedback', 1)
  344. })
  345. },
  346. init(args) {
  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. getCarrierInfo() {
  360. if (this.safeOrgId) {
  361. 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. },
  377. uploadOrgPic(path) {
  378. this.carrierRoadInfo.roadTransport = path
  379. // this.carrierRoadInfo.roadTransport = process.env.VUE_APP_FILE_URL + 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>