task_detailsa.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. <template>
  2. <view class="total-page page-env-20 page-box">
  3. <Nav :back="isReturn!==1" :title="'任务详情'" :genre="2" :fixedHeight="fixedHeight">
  4. <view class="task-tabs m-b20" :style=" {top:`${$tools.topHeight()}px`}">
  5. <view class="detail-bg m-lr20 m-b10 m-t10">
  6. <image class="detail-img" src="/page_task/static/img/task-details/top-bg.png" mode="aspectFill">
  7. </image>
  8. <view class="detail-content">
  9. <view class="row-c m-l10 m-t16 m-b20 text-color-fff">
  10. <image class="wh-45 r-circle" src="https://img10.360buyimg.com/imgw/s288x1000_jfs/t1/307262/4/9992/255939/684f9a78Fbddd6f3f/e07bf46597371d37.jpg"
  11. mode="aspectFill">
  12. </image>
  13. <text class="size-28 m-lr16 m-t6">大连市甘井子区宜居园81号2单元1层1号房屋</text>
  14. <view class="row-c size-24 sys-bg-007038 r-100 p-lr16 p-tb6 m-l20" >
  15. <text>住宅</text>
  16. </view>
  17. <image class="wh-60 animate__animated animate__fadeInDownBig"
  18. style="position: absolute;right: 20rpx;"
  19. :src="'/page_task/static/img/task-details/icon-1.png'"
  20. mode="aspectFill">
  21. </image>
  22. </view>
  23. <view class="row-justify-sb center buttom-titke sys-bg-BFD2CC text-color-12 size-24">
  24. <text class="size-28 text-color-E21 sys-weight-600">{{applyFor.quota}}万</text>
  25. <text>{{business.stageName}}</text>
  26. <text>{{applyFor.use_date}}用款</text>
  27. <view class="row-c">
  28. <image class="wh-25 m-r10" src="/page_task/static/img/task-details/usrr.png" mode="">
  29. </image>
  30. <text>{{business.creation_name}}</text>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. <TaskTab :current="current" @onChange="onChange"></TaskTab>
  36. </view>
  37. </Nav>
  38. <view class="sys-list-background-color task-tabs-width "
  39. :style="{top:`${$tools.topHeight()+fixedHeight}px`}">
  40. <view class="m-t20 swiper-box">
  41. <z-swiper ref="zSwiper" v-model="basicType" :options="options" v-if="current === 1" @slideChange="onSwiper">
  42. <z-swiper-item v-for="itemType in basicType">
  43. <view class="swiper-item-box page-env-160" v-if="itemType==='1'">
  44. <Identity ref="identity" class="identity swiper-item" :height="`${maxHeight-60}px`" :business="business"
  45. :linkman="linkman" :client-key="clientKey" @onShowImg="onShowImg" :linkman-key="linkmanKey">
  46. </Identity>
  47. </view>
  48. <view class="swiper-item-box page-env-160" v-else-if="itemType==='3'">
  49. <Apply class="apply swiper-item" :height="`${maxHeight-60}px`" :apply-for="applyFor"
  50. :applies-key="appliesKey" @onShowImg="onShowImg">
  51. </Apply>
  52. </view>
  53. <view class="swiper-item-box page-env-160" v-else-if="itemType==='4'">
  54. <ThirdParty class="third_party swiper-item" :height="`${maxHeight-60}px`" :tripartite="tripartite"
  55. :tripartite-key="tripartiteKey" @onShowImg="onShowImg">
  56. </ThirdParty>
  57. </view>
  58. </z-swiper-item>
  59. </z-swiper>
  60. <view class="" v-if="current === 2">
  61. <z-swiper v-model="restType" :options="options" @slideChange="onCreditSwiper">
  62. <z-swiper-item v-for="itemType in restType">
  63. <view class="swiper-item-box page-env-160" v-if="itemType==='2'">
  64. <Property class="property swiper-item" :height="`${creditHeight-60}px`" :property-list="propertyList"
  65. :property-key="propertyKey" @onShowImg="onShowImg">
  66. </Property>
  67. </view>
  68. <view class="swiper-item-box page-env-160" v-else-if="itemType==='6'">
  69. <credit-list class="credit_list swiper-item" :height="`${creditHeight-60}px`" :credit-data="credit"
  70. :credit-key="creditKey" @onShowImg="onShowImg"></credit-list>
  71. </view>
  72. </z-swiper-item>
  73. </z-swiper>
  74. </view>
  75. </view>
  76. <Record v-show="current === 3" ref="recordObj" :business-id="businessId" @onShowImg="onShowImg"></Record>
  77. <Steps ref="stepsObj" v-show="current === 4" :business-id="businessId"></Steps>
  78. </view>
  79. <view v-if="isExecute>0 && business.status<4">
  80. <EnButton v-if="isExecute===3" :text="'领取'" @onSubmit="takeTask"></EnButton>
  81. <EnButton v-else-if="isExecute===2" :is_both="1" :leftText="'作废'" :rightText="'反馈'"
  82. @onLeftSubmit="cancellation" @onSubmit="setTaskOperate(3)"></EnButton>
  83. <EnButton v-else-if="isExecute===4" :is_both="2" :leftText="'作废'" :rightText="'反馈'" centre-text="交接"
  84. @onLeftSubmit="cancellation" @onCentreSubmit="openExecute" @onSubmit="setTaskOperate(3)"></EnButton>
  85. <EnButton v-else-if="isExecute===5" :text="'完成'" @onSubmit="endTask"></EnButton>
  86. <EnButton v-else-if="isExecute===6" :is_both="1" :leftText="'拒绝'" :rightText="'同意'"
  87. @onLeftSubmit="auditTask(2)" @onSubmit="auditTask(1)"></EnButton>
  88. <EnButton v-else-if="isExecute===7" text="编辑" @onSubmit="editTask()"></EnButton>
  89. <EnButton v-else-if="isExecute===8" text="完善贷后" @onSubmit="setPostLoan()"></EnButton>
  90. <EnButton :is_both="1" :leftText="'交接'" :rightText="'操作'" v-else @onLeftSubmit="openExecute"
  91. @onSubmit="setTaskOperate(1)"></EnButton>
  92. </view>
  93. <!-- <EnButton :text="'冲销'" v-if="current === 1"></EnButton>-->
  94. <!-- <EnButton is_both :leftText="'交接'" :rightText="'操作'" @onSubmit="setTaskOperate(1)" @onLeftSubmit="openExecute"></EnButton>-->
  95. <uni-popup ref="executePopup" type="bottom">
  96. <EnSelect title="请选择任务接收人" :local-data="executeData" ref="system" v-model="executeId"
  97. @setAffirm="setNewExecute" @close="closeExecutePopup"></EnSelect>
  98. </uni-popup>
  99. </view>
  100. </template>
  101. <script>
  102. import TaskTab from "@/common/task/task_tab.vue"
  103. // 身份信息
  104. import Identity from "./module/identity.vue"
  105. // 申请信息
  106. import Apply from "./module/apply.vue"
  107. // 第三方信息
  108. import ThirdParty from "./module/third_party.vue"
  109. // 资产信息
  110. import Property from "./module/property.vue"
  111. // 审核进度
  112. import Steps from "./module/steps.vue"
  113. // 跟进记录
  114. import Record from "./module/record.vue"
  115. import tools from "@/service/tools";
  116. import {
  117. cancellation,
  118. endTask,
  119. getExecuteList,
  120. getStageList,
  121. getTaskDetail,
  122. setExecute,
  123. takeTask
  124. } from "@/api/task";
  125. import EnSelect from "@/components/en-utils/en-select/en-select.vue";
  126. import CreditList from "@/page_task/credit/credit.vue";
  127. import {type} from "@/uni_modules/uni-forms/components/uni-forms/utils";
  128. export default {
  129. components: {
  130. CreditList,
  131. EnSelect,
  132. TaskTab,
  133. Identity,
  134. ThirdParty,
  135. Apply,
  136. Property,
  137. Record,
  138. Steps
  139. },
  140. data() {
  141. return {
  142. current: 1,
  143. fixedHeight: 200,
  144. options: {
  145. // autoHeight: true,
  146. slidesPerView: 1.1,
  147. centeredSlides: true,
  148. spaceBetween: 10,
  149. effect: 'cards'
  150. },
  151. list: [1, 2, 3],
  152. lists: [1, 2],
  153. businessId: '',
  154. product: {
  155. product_name: '',
  156. product_types: [],
  157. type_data: []
  158. },
  159. business: {
  160. id: 0,
  161. status: 0,
  162. phone: '',
  163. identity_one: '',
  164. identity_two: '',
  165. marriage_img: [],
  166. credit_img: [],
  167. }, //基本信息
  168. propertyList: [], //资产信息
  169. applyFor: {}, //申请信息
  170. credit: {}, //征信信息
  171. postLoan: {}, //贷后信息
  172. tripartite: [], //第三方信息
  173. linkman: [], //联系人信息
  174. stageData: {
  175. stageName: '',
  176. userName: ""
  177. },
  178. isAjax: false,
  179. isExecute: 0,
  180. msgList: [],
  181. executeData: [],
  182. showExecute: false,
  183. auditType: 0,
  184. previewList: [],
  185. imgKey: 0,
  186. imgList: [],
  187. replyId: "",
  188. stageList: [],
  189. businessStageList: [],
  190. businessFile: {
  191. fileList: [],
  192. imgList: [],
  193. videoList: [],
  194. },
  195. videoUrl: '',
  196. executeId: '',
  197. clientKey: [],
  198. propertyKey: [],
  199. appliesKey: [],
  200. tripartiteKey: [],
  201. linkmanKey: [],
  202. creditKey: [],
  203. identityHeight: 0,
  204. thirdPartHeight: 0,
  205. applyHeight: 0,
  206. propertyHeight: 0,
  207. creditListHeight: 0,
  208. maxHeight: '100%',
  209. creditHeight: '100%',
  210. basicType: ['1'],
  211. restType: ['2'],
  212. isReturn: 0
  213. }
  214. },
  215. onLoad(data) {
  216. console.log('-----------aaaaa-----------')
  217. },
  218. mounted() {
  219. },
  220. methods: {
  221. makingCall(phone) {
  222. tools.makingCall(phone)
  223. },
  224. onShowImg(item) {
  225. console.log(this.businessFile.imgList)
  226. let imgIndex = this.businessFile.imgList.indexOf(item)
  227. if (imgIndex < 0) {
  228. this.businessFile.imgList.push(item)
  229. imgIndex = this.businessFile.imgList.length - 1
  230. }
  231. console.log(this.businessFile.imgList)
  232. // 预览图片
  233. uni.previewImage({
  234. current: imgIndex,
  235. urls: this.businessFile.imgList,
  236. });
  237. },
  238. auditTask(auditType) {
  239. },
  240. setPostLoan() {
  241. },
  242. editTask() {
  243. },
  244. cancellation() {
  245. },
  246. endTask() {
  247. },
  248. takeTask() {
  249. },
  250. closeExecutePopup() {
  251. },
  252. setNewExecute(type) {
  253. if (type) {
  254. //设置新执行人
  255. if (this.executeId <= 0) {
  256. tools.error('请选择执行人')
  257. return
  258. }
  259. setExecute({
  260. 'business_id': this.businessId,
  261. 'user_id': this.executeId
  262. }).then((res) => {
  263. if (res.code === 1) {
  264. tools.success(res.msg)
  265. uni.$emit('newReceiving')
  266. this.getTaskDetail()
  267. } else {
  268. tools.error(res.msg)
  269. }
  270. })
  271. }
  272. this.$refs.executePopup.close('bottom')
  273. },
  274. openExecute() {
  275. },
  276. setTaskOperate(type) {
  277. },
  278. async getTaskDetail() {
  279. },
  280. // 获取详情高度Swiper
  281. getDetailsHeight() {
  282. this.maxHeight = '100%'
  283. this.$nextTick(() => {
  284. const query = uni.createSelectorQuery().in(this);
  285. setTimeout(() => {
  286. query.select('.identity').boundingClientRect(data => {
  287. if (data) {
  288. this.maxHeight = data.height
  289. console.log(this.maxHeight);
  290. uni.pageScrollTo({
  291. scrollTop: 0,
  292. duration: 300
  293. });
  294. }
  295. }).exec();
  296. }, 200)
  297. })
  298. },
  299. // 获取详情高度Swiper
  300. onSwiper(swiper, index) {
  301. this.maxHeight = '100%'
  302. const query = uni.createSelectorQuery().in(this);
  303. this.$nextTick(() => {
  304. setTimeout(() => {
  305. if (index == 0) {
  306. query.select('.identity').boundingClientRect(data => {
  307. if (data) {
  308. this.maxHeight = data.height
  309. }
  310. }).exec();
  311. }
  312. if (index == 1) {
  313. query.select('.apply').boundingClientRect(data => {
  314. if (data) {
  315. this.maxHeight = data.height
  316. }
  317. }).exec();
  318. }
  319. if (index == 2) {
  320. query.select('.third_party').boundingClientRect(data => {
  321. if (data) {
  322. this.maxHeight = data.height
  323. }
  324. }).exec();
  325. }
  326. uni.pageScrollTo({
  327. scrollTop: 0,
  328. duration: 300
  329. });
  330. }, 200)
  331. })
  332. },
  333. // 征信高度Swiper
  334. onCreditHeight() {
  335. },
  336. // 征信高度Swiper
  337. onCreditSwiper(swiper, index) {
  338. },
  339. onChange(current) {
  340. if (current == 1) {
  341. this.getDetailsHeight()
  342. }
  343. if (current == 2) {
  344. this.onCreditHeight()
  345. }
  346. this.current = current
  347. uni.pageScrollTo({
  348. scrollTop: 0,
  349. duration: 300
  350. });
  351. },
  352. onSubmit() {
  353. }
  354. }
  355. }
  356. </script>
  357. <style lang="scss" scoped>
  358. .swiper-box {
  359. overflow: hidden;
  360. .swiper-item {
  361. transition: .5s ease;
  362. }
  363. .swiper-item-box {
  364. min-height: calc(100vh - 630rpx - 160rpx - env(safe-area-inset-bottom));
  365. }
  366. }
  367. .details_body {
  368. width: 100%;
  369. position: absolute;
  370. }
  371. .detail-bg {
  372. position: relative;
  373. }
  374. .detail-img {
  375. width: calc(100%);
  376. height: 220rpx;
  377. }
  378. .detail-content {
  379. position: absolute;
  380. top: 10rpx;
  381. left: 20rpx;
  382. .top-titke {
  383. height: 75rpx;
  384. line-height: 75rpx;
  385. // background: red;
  386. }
  387. .detail-line {
  388. width: 2rpx;
  389. height: 24rpx;
  390. background-color: #FFFFFF;
  391. }
  392. .buttom-titke {
  393. flex: 1;
  394. margin-top: 40rpx;
  395. height: 90rpx;
  396. width: 635rpx;
  397. line-height: 90rpx;
  398. border-radius: 20rpx;
  399. padding: 0 20rpx;
  400. }
  401. }
  402. .swiper-wrapper {
  403. z-index: 0 !important;
  404. }
  405. .video-box {
  406. height: 70vh;
  407. width: 100vw;
  408. .myVideo {
  409. height: 70vh;
  410. width: 100vw;
  411. }
  412. }
  413. </style>