task_details.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. <template>
  2. <view class="total-page page-env-20 page-box">
  3. <Nav :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="/static/img/task-details/top-bg.png" mode="aspectFill"></image>
  7. <view class="detail-content">
  8. <view class="row-c m-l10 m-t16 m-b20 text-color-fff">
  9. <image class="wh-45 r-circle" src="/static/img/task-details/head.png" mode="aspectFill">
  10. </image>
  11. <text class="size-28 m-lr16">{{business.name}}</text>
  12. <view class="size-24 row-c sys-bg-007038 r-100 p-lr16 p-tb6">
  13. <text>{{business.sex===1?'男':'女'}}</text>
  14. <view class="detail-line m-lr10"></view>
  15. <text>{{business.age}}岁</text>
  16. </view>
  17. <view class="row-c size-24 sys-bg-007038 r-100 p-lr16 p-tb6 m-l20">
  18. <image class="wh-20" src="/static/img/task-details/phone-two.png" mode="aspectFill">
  19. </image>
  20. <text>{{business.phone}}</text>
  21. </view>
  22. <image class="wh-60 animate__animated animate__zoomIn"
  23. style="position: absolute;right: 20rpx;" src="/static/img/task-details/icon-one.png"
  24. mode="aspectFill">
  25. </image>
  26. </view>
  27. <view class="row-justify-sb center buttom-titke sys-bg-BFD2CC text-color-12 size-24">
  28. <text class="size-28 text-color-E21 sys-weight-600">{{applyFor.quota}}万</text>
  29. <text>{{business.status_name}}</text>
  30. <text>{{applyFor.use_date}}用款</text>
  31. <view class="row-c">
  32. <image class="wh-25 m-r10" src="/static/img/task-details/usrr.png" mode=""></image>
  33. <text>{{business.creation_name}}</text>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <TaskTab :current="current" @onChange="onChange"></TaskTab>
  39. </view>
  40. </Nav>
  41. <view class="details_body sys-list-background-color task-tabs-width"
  42. :class=" current === 3 || current === 4?'page-env-20':'page-env-160'"
  43. :style="{top:`${$tools.topHeight()+fixedHeight}px`}">
  44. <view class="m-lr20 m-t20">
  45. <z-swiper style="width: 95vw;" v-model="list" :options="options" v-if="current === 1">
  46. <z-swiper-item>
  47. <Identity :business="business" :linkman="linkman"></Identity>
  48. </z-swiper-item>
  49. <z-swiper-item>
  50. <Apply :apply-for="applyFor"></Apply>
  51. </z-swiper-item>
  52. <z-swiper-item>
  53. <ThirdParty :tripartite="tripartite"></ThirdParty>
  54. </z-swiper-item>
  55. </z-swiper>
  56. <view class="" v-if="current === 2">
  57. <z-swiper v-model="lists" :options="options">
  58. <z-swiper-item>
  59. <Property :property-list="propertyList"></Property>
  60. </z-swiper-item>
  61. </z-swiper>
  62. </view>
  63. </view>
  64. <Record v-show="current === 3" ref="recordObj" :business-id="businessId"></Record>
  65. <Steps v-show="current === 4" :business-id="businessId"></Steps>
  66. </view>
  67. <view v-if="isExecute>0 && business.status<4">
  68. <EnButton :text="'领取'" v-if="isExecute===3" @onSubmit="takeTask"></EnButton>
  69. <EnButton :text="'完成'" v-else-if="isExecute===5" @onSubmit="endTask"></EnButton>
  70. </view>
  71. <!-- <EnButton :text="'冲销'" v-if="current === 1"></EnButton>-->
  72. <EnButton is_both :leftText="'交接'" :rightText="'操作'" @onSubmit="setTaskOperate(1)" @onLeftSubmit="openExecute"></EnButton>
  73. <uni-popup ref="executePopup" type="bottom">
  74. <EnSelect title="请选择任务接收人" :local-data="executeData" ref="system" v-model="executeId" @setAffirm="setNewExecute"></EnSelect>
  75. </uni-popup>
  76. </view>
  77. </template>
  78. <script>
  79. import TaskTab from "@/common/task/task_tab.vue"
  80. // 身份信息
  81. import Identity from "./module/identity.vue"
  82. // 申请信息
  83. import Apply from "./module/apply.vue"
  84. // 第三方信息
  85. import ThirdParty from "./module/third_party.vue"
  86. // 资产信息
  87. import Property from "./module/property.vue"
  88. // 审核进度
  89. import Steps from "./module/steps.vue"
  90. // 跟进记录
  91. import Record from "./module/record.vue"
  92. import tools from "@/service/tools";
  93. import {
  94. endTask,
  95. getExecuteList,
  96. getStageList,
  97. getTaskDetail, setExecute, takeTask
  98. } from "@/api/task";
  99. import EnSelect from "@/components/en-utils/en-select/en-select.vue";
  100. export default {
  101. components: {
  102. EnSelect,
  103. TaskTab,
  104. Identity,
  105. ThirdParty,
  106. Apply,
  107. Property,
  108. Record,
  109. Steps
  110. },
  111. data() {
  112. return {
  113. current: 1,
  114. fixedHeight: 200,
  115. options: {
  116. autoHeight: true,
  117. centeredSlides: true,
  118. },
  119. list: [1, 2, 3],
  120. lists: [1, 2],
  121. businessId: '',
  122. product: {
  123. product_name: '',
  124. product_types: [],
  125. type_data: []
  126. },
  127. business: {
  128. status: 1,
  129. phone: '',
  130. identity_one: '',
  131. identity_two: '',
  132. marriage_img: [],
  133. credit_img: [],
  134. }, //基本信息
  135. propertyList: [], //资产信息
  136. applyFor: {}, //申请信息
  137. credit: {}, //征信信息
  138. postLoan: {}, //贷后信息
  139. tripartite: [], //第三方信息
  140. linkman: [], //联系人信息
  141. stageData: {
  142. stageName: '',
  143. userName: ""
  144. },
  145. isAjax: false,
  146. isExecute: 0,
  147. msgList: [],
  148. executeData: [],
  149. showExecute: false,
  150. auditType: 0,
  151. previewList: [],
  152. imgKey: 0,
  153. imgList: [],
  154. replyId: "",
  155. stageList: [],
  156. businessStageList: [],
  157. businessFile: {
  158. fileList: [],
  159. imgList: [],
  160. videoList: [],
  161. },
  162. videoUrl: '',
  163. executeId:''
  164. }
  165. },
  166. onLoad(data) {
  167. if (data.taskId !== undefined) {
  168. this.businessId = data.taskId
  169. this.getTaskDetail()
  170. } else {
  171. tools.leftClick()
  172. }
  173. },
  174. methods: {
  175. endTask() {
  176. uni.showModal({
  177. title: '提示',
  178. content: '是否完成当前任务?',
  179. success: (res) => {
  180. console.log(res)
  181. if (res.confirm) {
  182. endTask({
  183. 'id': this.business.id
  184. }).then((res) => {
  185. if (res.code === 1) {
  186. this.business.status = 4;
  187. this.isExecute = 0;
  188. tools.success(res.msg)
  189. uni.$emit('newReceiving')
  190. } else {
  191. tools.error(res.msg)
  192. }
  193. })
  194. }
  195. }
  196. });
  197. },
  198. takeTask() {
  199. if (this.isAjax) {
  200. // return;
  201. }
  202. this.isAjax = true;
  203. takeTask({
  204. 'id': this.business.id
  205. }).then((res) => {
  206. if (res.code === 1) {
  207. tools.success('领取成功')
  208. uni.$emit('newReceiving')
  209. this.getTaskDetail()
  210. } else {
  211. this.isAjax = false;
  212. tools.error(res.msg)
  213. }
  214. })
  215. },
  216. setNewExecute(type) {
  217. if(type){
  218. //设置新执行人
  219. if(this.executeId<=0){
  220. tools.error('请选择执行人')
  221. return
  222. }
  223. setExecute({
  224. 'business_id': this.businessId,
  225. 'user_id': this.executeId
  226. }).then((res) => {
  227. if (res.code === 1) {
  228. tools.success(res.msg)
  229. uni.$emit('newReceiving')
  230. this.getTaskDetail()
  231. } else {
  232. tools.error(res.msg)
  233. }
  234. })
  235. }
  236. this.$refs.executePopup.close('bottom')
  237. },
  238. openExecute() {
  239. this.executeData = [];
  240. getExecuteList({
  241. 'business_id': this.businessId
  242. }).then((res) => {
  243. if (res.code === 1) {
  244. this.executeData=res.data
  245. this.$refs.executePopup.open('bottom')
  246. }
  247. })
  248. },
  249. setTaskOperate(type){
  250. uni.navigateTo({
  251. 'url':'/page_task/task_operate/task_operate?businessId='+this.businessId+'&type='+type
  252. })
  253. },
  254. async getTaskDetail() {
  255. const res = await getTaskDetail({
  256. id: this.businessId
  257. })
  258. if (res.code === 1) {
  259. this.product = res.data.product
  260. this.business = res.data.business
  261. this.propertyList = res.data.propertyList
  262. this.applyFor = res.data.applyFor
  263. this.tripartite = res.data.tripartite
  264. this.linkman = res.data.linkman
  265. this.credit = res.data.credit
  266. this.postLoan = res.data.postLoan
  267. this.stageData = res.data.stageData
  268. this.isExecute = res.data.isExecute
  269. this.businessFile = res.data.businessFile
  270. this.$refs.recordObj.startData()
  271. } else {
  272. tools.leftClick()
  273. }
  274. },
  275. onChange(current) {
  276. this.current = current
  277. },
  278. onSubmit() {
  279. uni.navigateTo({
  280. url: "/page_task/task_operate/task_operate"
  281. })
  282. }
  283. }
  284. }
  285. </script>
  286. <style lang="scss" scoped>
  287. .details_body {
  288. width: 100%;
  289. position: absolute;
  290. }
  291. .detail-bg {
  292. position: relative;
  293. }
  294. .detail-img {
  295. width: calc(100%);
  296. height: 220rpx;
  297. }
  298. .detail-content {
  299. position: absolute;
  300. top: 10rpx;
  301. left: 20rpx;
  302. .top-titke {
  303. height: 75rpx;
  304. line-height: 75rpx;
  305. // background: red;
  306. }
  307. .detail-line {
  308. width: 2rpx;
  309. height: 24rpx;
  310. background-color: #FFFFFF;
  311. }
  312. .buttom-titke {
  313. flex: 1;
  314. margin-top: 40rpx;
  315. height: 90rpx;
  316. width: 635rpx;
  317. line-height: 90rpx;
  318. border-radius: 20rpx;
  319. padding: 0 20rpx;
  320. }
  321. }
  322. .swiper-wrapper {
  323. z-index: 0 !important;
  324. }
  325. </style>