| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429 |
- <template>
- <view class="total-page page-env-20 page-box">
- <Nav :title="'任务详情'" :genre="2" :fixedHeight="fixedHeight">
- <view class="task-tabs m-b20" :style=" {top:`${$tools.topHeight()}px`}">
- <view class="detail-bg m-lr20 m-b10 m-t10">
- <image class="detail-img" src="/page_task/static/img/task-details/top-bg.png" mode="aspectFill"></image>
- <view class="detail-content">
- <view class="row-c m-l10 m-t16 m-b20 text-color-fff">
- <image class="wh-45 r-circle" src="/static/img/task-details/head.png" mode="aspectFill">
- </image>
- <text class="size-28 m-lr16">{{business.name}}</text>
- <view class="size-24 row-c sys-bg-007038 r-100 p-lr16 p-tb6">
- <text>{{business.sex===1?'男':'女'}}</text>
- <view class="detail-line m-lr10"></view>
- <text>{{business.age}}岁</text>
- </view>
- <view class="row-c size-24 sys-bg-007038 r-100 p-lr16 p-tb6 m-l20">
- <image class="wh-20" src="/page_task/static/img/task-details/phone-two.png" mode="aspectFill">
- </image>
- <text>{{business.phone}}</text>
- </view>
- <image class="wh-60 animate__animated animate__fadeInDownBig" v-if="business.status>0"
- style="position: absolute;right: 20rpx;" :src="'/page_task/static/img/task-details/icon-'+business.status+'.png'"
- mode="aspectFill">
- </image>
- </view>
- <view class="row-justify-sb center buttom-titke sys-bg-BFD2CC text-color-12 size-24">
- <text class="size-28 text-color-E21 sys-weight-600">{{applyFor.quota}}万</text>
- <text>{{business.status_name}}</text>
- <text>{{applyFor.use_date}}用款</text>
- <view class="row-c">
- <image class="wh-25 m-r10" src="/page_task/static/img/task-details/usrr.png" mode=""></image>
- <text>{{business.creation_name}}</text>
- </view>
- </view>
- </view>
- </view>
- <TaskTab :current="current" @onChange="onChange"></TaskTab>
- </view>
- </Nav>
- <view class="details_body sys-list-background-color task-tabs-width"
- :class=" current === 3 || current === 4?'page-env-20':'page-env-160'"
- :style="{top:`${$tools.topHeight()+fixedHeight}px`}">
- <view class="m-lr20 m-t20">
- <z-swiper style="width: 95vw;" v-model="list" :options="options" v-if="current === 1">
- <z-swiper-item>
- <Identity :business="business" :linkman="linkman" :client-key="clientKey" :linkman-key="linkmanKey"></Identity>
- </z-swiper-item>
- <z-swiper-item v-show="product.product_types.indexOf('3')>=0">
- <Apply :apply-for="applyFor" :applies-key="appliesKey"></Apply>
- </z-swiper-item>
- <z-swiper-item v-show="product.product_types.indexOf('4')>=0">
- <ThirdParty :tripartite="tripartite" :tripartite-key="tripartiteKey"></ThirdParty>
- </z-swiper-item>
- </z-swiper>
- <view class="" v-if="current === 2">
- <z-swiper v-model="lists" :options="options">
- <z-swiper-item>
- <Property :property-list="propertyList" :property-key="propertyKey"></Property>
- </z-swiper-item>
- </z-swiper>
- </view>
- </view>
- <Record v-show="current === 3" ref="recordObj" :business-id="businessId"></Record>
- <Steps v-show="current === 4" :business-id="businessId"></Steps>
- </view>
- <view v-if="isExecute>0 && business.status<4">
- <EnButton :text="'领取'" v-if="isExecute===3" @onSubmit="takeTask"></EnButton>
- <EnButton :text="'完成'" v-else-if="isExecute===5" @onSubmit="endTask"></EnButton>
- <EnButton is_both :leftText="'作废'" :rightText="'反馈'" centre-text="交接" v-else-if="isExecute===4" @onLeftSubmit="cancellation" @onCentreSubmit="openExecute" @onSubmit="setTaskOperate(1)"></EnButton>
- <EnButton is_both :leftText="'作废'" :rightText="'反馈'" v-else-if="isExecute===2" @onLeftSubmit="cancellation" @onSubmit="setTaskOperate(1)"></EnButton>
- <EnButton v-else-if="isExecute===7" text="编辑" @onSubmit="editTask()"></EnButton>
- <EnButton v-else-if="isExecute===8" text="完善贷后" @onSubmit="setPostLoan()"></EnButton>
- <EnButton is_both :leftText="'交接'" :rightText="'同意'" centre-text="拒绝" v-else-if="isExecute===6" @onLeftSubmit="openExecute" @onCentreSubmit="auditTask(2)" @onSubmit="auditTask(1)"></EnButton>
- <EnButton is_both :leftText="'作废'" :rightText="'反馈'" v-else @onLeftSubmit="openExecute" @onSubmit="setTaskOperate(1)"></EnButton>
- </view>
- <!-- <EnButton :text="'冲销'" v-if="current === 1"></EnButton>-->
- <!-- <EnButton is_both :leftText="'交接'" :rightText="'操作'" @onSubmit="setTaskOperate(1)" @onLeftSubmit="openExecute"></EnButton>-->
- <uni-popup ref="executePopup" type="bottom">
- <EnSelect title="请选择任务接收人" :local-data="executeData" ref="system" v-model="executeId" @setAffirm="setNewExecute"></EnSelect>
- </uni-popup>
- </view>
- </template>
- <script>
- import TaskTab from "@/common/task/task_tab.vue"
- // 身份信息
- import Identity from "./module/identity.vue"
- // 申请信息
- import Apply from "./module/apply.vue"
- // 第三方信息
- import ThirdParty from "./module/third_party.vue"
- // 资产信息
- import Property from "./module/property.vue"
- // 审核进度
- import Steps from "./module/steps.vue"
- // 跟进记录
- import Record from "./module/record.vue"
- import tools from "@/service/tools";
- import {
- cancellation,
- endTask,
- getExecuteList,
- getStageList,
- getTaskDetail, setExecute, takeTask
- } from "@/api/task";
- import EnSelect from "@/components/en-utils/en-select/en-select.vue";
- export default {
- components: {
- EnSelect,
- TaskTab,
- Identity,
- ThirdParty,
- Apply,
- Property,
- Record,
- Steps
- },
- data() {
- return {
- current: 1,
- fixedHeight: 200,
- options: {
- autoHeight: true,
- centeredSlides: true,
- },
- list: [1, 2, 3],
- lists: [1, 2],
- businessId: '',
- product: {
- product_name: '',
- product_types: [],
- type_data: []
- },
- business: {
- status: 0,
- phone: '',
- identity_one: '',
- identity_two: '',
- marriage_img: [],
- credit_img: [],
- }, //基本信息
- propertyList: [], //资产信息
- applyFor: {}, //申请信息
- credit: {}, //征信信息
- postLoan: {}, //贷后信息
- tripartite: [], //第三方信息
- linkman: [], //联系人信息
- stageData: {
- stageName: '',
- userName: ""
- },
- isAjax: false,
- isExecute: 0,
- msgList: [],
- executeData: [],
- showExecute: false,
- auditType: 0,
- previewList: [],
- imgKey: 0,
- imgList: [],
- replyId: "",
- stageList: [],
- businessStageList: [],
- businessFile: {
- fileList: [],
- imgList: [],
- videoList: [],
- },
- videoUrl: '',
- executeId:'',
- clientKey: [],
- propertyKey: [],
- appliesKey: [],
- tripartiteKey: [],
- linkmanKey: [],
- creditKey: [],
- }
- },
- onLoad(data) {
- console.log(data)
- if (data.taskId !== undefined) {
- this.businessId = data.taskId
- this.getTaskDetail()
- uni.$on('newTaskList',()=>{
- this.getTaskDetail()
- })
- } else {
- tools.leftClick()
- }
- },
- methods: {
- auditTask(auditType) {
- // this.$refs.popup.open("bottom");
- // this.auditType = auditType
- // this.$refs.taskSetObj.startAuditType(auditType);
- uni.navigateTo({
- url: '/page_task/task_operate/task_operate?businessId='+ this.business.id+'&type=2&auditType='+auditType
- });
- },
- setPostLoan(){
- uni.navigateTo({
- url: '/pages-task/task-info/task-loan?id=' + this.business.id
- });
- },
- editTask() {
- // uni.reLaunch({
- // url: '/pages/add-client/add-client?businessId=' + this.business.id
- // })
- uni.reLaunch({
- url: '/pages-task/add-client/new-add?businessId=' + this.business.id
- })
- },
- cancellation() {
- uni.showModal({
- title: '提示',
- content: '是否作废当前任务?',
- success: (res) => {
- console.log(res)
- if (res.confirm) {
- cancellation({
- 'id': this.business.id
- }).then((res) => {
- if (res.code === 1) {
- this.business.status = 5;
- this.isExecute = 0;
- tools.success(res.msg)
- uni.$emit('newReceiving')
- } else {
- tools.error(res.msg)
- }
- })
- }
- }
- });
- },
- endTask() {
- uni.showModal({
- title: '提示',
- content: '是否完成当前任务?',
- success: (res) => {
- console.log(res)
- if (res.confirm) {
- endTask({
- 'id': this.business.id
- }).then((res) => {
- if (res.code === 1) {
- this.business.status = 4;
- this.isExecute = 0;
- tools.success(res.msg)
- uni.$emit('newReceiving')
- } else {
- tools.error(res.msg)
- }
- })
- }
- }
- });
- },
- takeTask() {
- if (this.isAjax) {
- // return;
- }
- this.isAjax = true;
- takeTask({
- 'id': this.business.id
- }).then((res) => {
- if (res.code === 1) {
- tools.success('领取成功')
- uni.$emit('newReceiving')
- this.getTaskDetail()
- } else {
- this.isAjax = false;
- tools.error(res.msg)
- }
- })
- },
- setNewExecute(type) {
- if(type){
- //设置新执行人
- if(this.executeId<=0){
- tools.error('请选择执行人')
- return
- }
- setExecute({
- 'business_id': this.businessId,
- 'user_id': this.executeId
- }).then((res) => {
- if (res.code === 1) {
- tools.success(res.msg)
- uni.$emit('newReceiving')
- this.getTaskDetail()
- } else {
- tools.error(res.msg)
- }
- })
- }
- this.$refs.executePopup.close('bottom')
- },
- openExecute() {
- this.executeData = [];
- getExecuteList({
- 'business_id': this.businessId
- }).then((res) => {
- if (res.code === 1) {
- this.executeData=res.data
- this.$refs.executePopup.open('bottom')
- }
- })
- },
- setTaskOperate(type){
- uni.navigateTo({
- 'url':'/page_task/task_operate/task_operate?businessId='+this.businessId+'&type='+type
- })
- },
- async getTaskDetail() {
- const res = await getTaskDetail({
- id: this.businessId
- })
- if (res.code === 1) {
- this.product = res.data.product
- this.business = res.data.business
- this.propertyList = res.data.propertyList
- this.applyFor = res.data.applyFor
- this.tripartite = res.data.tripartite
- this.linkman = res.data.linkman
- this.credit = res.data.credit
- this.postLoan = res.data.postLoan
- this.stageData = res.data.stageData
- this.isExecute = res.data.isExecute
- this.businessFile = res.data.businessFile
- this.$refs.recordObj.startData()
- this.setShowKey()
- } else {
- tools.leftClick()
- }
- },
- setShowKey(){
- this.product.type_data.forEach(item=>{
- switch (item.type) {
- case '1':
- this.clientKey=item.type_keys
- break;
- case '2':
- this.propertyKey=item.type_keys
- break;
- case '3':
- this.appliesKey=item.type_keys
- break;
- case '4':
- this.tripartiteKey=item.type_keys
- break;
- case '5':
- this.linkmanKey=item.type_keys
- break;
- case '6':
- this.creditKey=item.type_keys
- break;
- }
- })
- },
- onChange(current) {
- this.current = current
- },
- onSubmit() {
- uni.navigateTo({
- url: "/page_task/task_operate/task_operate"
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .details_body {
- width: 100%;
- position: absolute;
- }
- .detail-bg {
- position: relative;
- }
- .detail-img {
- width: calc(100%);
- height: 220rpx;
- }
- .detail-content {
- position: absolute;
- top: 10rpx;
- left: 20rpx;
- .top-titke {
- height: 75rpx;
- line-height: 75rpx;
- // background: red;
- }
- .detail-line {
- width: 2rpx;
- height: 24rpx;
- background-color: #FFFFFF;
- }
- .buttom-titke {
- flex: 1;
- margin-top: 40rpx;
- height: 90rpx;
- width: 635rpx;
- line-height: 90rpx;
- border-radius: 20rpx;
- padding: 0 20rpx;
- }
- }
- .swiper-wrapper {
- z-index: 0 !important;
- }
- </style>
|