join.vue 14 KB

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