| | |
| | | <view class="licence" v-if="imageUrls.length"> |
| | | <box-title title="手持身份证" class="box-title"></box-title> |
| | | <view class="flex-wrap"> |
| | | <view v-for="(i,k) in imageUrls" :key="k" class="ml-20 mt-20"> |
| | | <view v-for="(i,k) in imageUrls" :key="k" class="ml-20 mt-20" @click="previewImg(i,imageUrls)"> |
| | | <u-image :src="i" width="80" height="80"></u-image> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="planegraph" v-if="goodsImageUrls.length"> |
| | | <box-title title="物品照片" class="box-title"></box-title> |
| | | <view class="flex-wrap"> |
| | | <view v-for="(i,k) in goodsImageUrls" :key="k" class="ml-20 mt-20"> |
| | | <view v-for="(i,k) in goodsImageUrls" :key="k" class="ml-20 mt-20" |
| | | @click="previewImg(i,goodsImageUrls)"> |
| | | <u-image :src="i" width="80" height="80"></u-image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="examine"> |
| | | <box-title title="审核信息" class="box-title"></box-title> |
| | | <view class="info"> |
| | | <u-form labelWidth="70" :model="form" ref="form" class="form"> |
| | | <u-form-item label="审核状态" @click="isPickerShow = true" class="form-item" :border-bottom="true"> |
| | | <u--input v-model="form.confirmFlag" disabled disabledColor="#ffffff" |
| | | placeholder="请选择审核状态" :border="false"></u--input> |
| | | <u-icon slot="right" name="arrow-right"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="备注" class="form-item" v-if="selectStatus == 3"> |
| | | <u--input type="textarea" v-model="remark"></u--input> |
| | | </u-form-item> |
| | | </u-form> |
| | | <view class="row flex j-c-s-b a-i-c"> |
| | | <text>审核状态</text> |
| | | <text class="row-right">{{form.confirmFlag}}</text> |
| | | </view> |
| | | <view class="row flex j-c-s-b a-i-c" v-if="remark"> |
| | | <text class="f-28">审核状态</text> |
| | | <text class="row-right">{{remark}}</text> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | <view class="bottom-btn" v-if="(roleType == 1 && status == 1) || (roleType == 2 && status == 2)"> |
| | | <u-button type="primary" @click="submit">提交审核</u-button> |
| | | </view> |
| | | <u-picker :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" ref="uPicker" |
| | | :columns="columns" keyName="name" @cancel="isPickerShow = false" @confirm="handleConfirm"></u-picker> |
| | | |
| | | <footer-btn v-if="roleType ==2 && status == 3" text="重新编辑" @click="navToEdit"></footer-btn> |
| | | |
| | | |
| | | <audit-action :dataItem="info" @handle="submit" v-if="roleType == 1 && status == 1"></audit-action> |
| | | |
| | | <u-picker :defaultIndex="defaultIndex" :closeOnClickOverlay="true" @close="isPickerShow = false" |
| | | :show="isPickerShow" ref="uPicker" :columns="columns" keyName="name" @cancel="isPickerShow = false" |
| | | @confirm="handleConfirm"></u-picker> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import boxTitle from '@/components/boxTitle/index.vue' |
| | | import boxTitle from "@/subPackage/workbench/components/boxTitle/index.vue" |
| | | import lineItem from '../components/lineItem.vue' |
| | | import { |
| | | getLabelReportingDetail, |
| | | setLabelReporting |
| | | } from '@/api/reporting/reporting' |
| | | |
| | | import auditAction from '../components/actionBtn.vue' |
| | | |
| | | export default { |
| | | components: { |
| | | boxTitle, |
| | | lineItem |
| | | lineItem, |
| | | auditAction |
| | | }, |
| | | data() { |
| | | return { |
| | | info: { |
| | | type: 1, |
| | | status: 1, |
| | | }, |
| | | basicData: [{ |
| | | label: '对象电话', |
| | | name: "transactionObjectTel", |
| | | label: '物品名称', |
| | | name: "transactionObject", |
| | | value: '未完善' |
| | | }, |
| | | { |
| | | label: '交易人姓名', |
| | | name: "owner", |
| | | value: '未完善' |
| | | }, |
| | | { |
| | | label: '交易人电话', |
| | | name: "phoneNumber", |
| | | value: '未完善' |
| | | }, |
| | | { |
| | | label: '交易人身份证', |
| | | name: "idCard", |
| | | value: '未完善' |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | label: '交易位置', |
| | | name: 'location', |
| | | name: 'localtion', |
| | | value: '未完善' |
| | | }, |
| | | { |
| | | label: '交易过程', |
| | | name: 'transactionProcess', |
| | | value: '未完善' |
| | | }, |
| | | { |
| | | label: '时间', |
| | | name: 'createTime', |
| | | value: '未完善' |
| | | } |
| | | ], |
| | |
| | | ], |
| | | currentId: '', |
| | | currentData: {}, |
| | | taskId: "", |
| | | imageUrls: [], |
| | | goodsImageUrls: [], |
| | | selectStatus: 2, |
| | | remark: "", |
| | | roleType: "", |
| | | status: 1, |
| | | id: "", |
| | | imageUrls:[], |
| | | goodsImageUrls:[], |
| | | selectStatus: "", |
| | | remark: "" |
| | | defaultIndex: 0 |
| | | |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | this.id = option.id; |
| | | this.getDetailInfo(option.id); |
| | | this.taskId = option.id; |
| | | let roleName = uni.getStorageSync("activeRole").roleName |
| | | if (roleName == "居民") { |
| | | this.roleType = 2; |
| | | } else { |
| | | this.roleType = 1 |
| | | } |
| | | }, |
| | | |
| | | |
| | | onShow() { |
| | | this.getDetailInfo(); |
| | | }, |
| | | |
| | | |
| | | methods: { |
| | | getDetailInfo(id) { |
| | | getLabelReportingDetail({ |
| | | taskId: id |
| | | }).then(res => { |
| | | console.log(res); |
| | | let data = res.data; |
| | | this.basicData.forEach(item => { |
| | | item.value = data[item.name] |
| | | }) |
| | | this.imageUrls = this.setImages(data.imageUrls); |
| | | this.goodsImageUrls = this.setImages(data.goodsImageUrls); |
| | | }) |
| | | |
| | | showPicker() { |
| | | if (this.roleType == 2) { |
| | | this.isPickerShow = true; |
| | | }; |
| | | }, |
| | | setImages(str) { |
| | | if (str) { |
| | | return str.split(",") |
| | | } else { |
| | | return [] |
| | | |
| | | |
| | | getIndex(type) { |
| | | let list = this.columns[0]; |
| | | for (let i = 0, ii = list.length; i < ii; i++) { |
| | | if (type == list[i].status) { |
| | | this.$set(this.form, "confirmFlag", list[i].name) |
| | | this.defaultIndex = [i] |
| | | } |
| | | } |
| | | }, |
| | | |
| | | getDetailInfo() { |
| | | getLabelReportingDetail({ |
| | | taskId: this.taskId |
| | | }).then(res => { |
| | | console.log(res); |
| | | let data = res.data; |
| | | if (this.roleType == 2) { |
| | | uni.setNavigationBarTitle({ |
| | | title: `${data.labelName}详情` |
| | | }) |
| | | } |
| | | this.id = data.id; |
| | | this.status = data.confirmFlag; |
| | | this.remark = data.confirmNotion; |
| | | this.getIndex(data.confirmFlag) |
| | | this.basicData.forEach(item => { |
| | | item.value = data[item.name] || "未完善" |
| | | }) |
| | | this.info.labelName = data.labelName |
| | | this.info.transactionObject = data.transactionObject |
| | | this.info.id = this.taskId |
| | | this.info.status = data.confirmFlag |
| | | this.info.houseCode = data.houseCode |
| | | console.log("********0", this.info) |
| | | this.imageUrls = this.$setImageUrl(data.imageUrls); |
| | | this.goodsImageUrls = this.$setImageUrl(data.goodsImageUrls) |
| | | }) |
| | | }, |
| | | |
| | | previewImg(current, urls) { |
| | | uni.previewImage({ |
| | | current, |
| | | urls |
| | | }) |
| | | }, |
| | | |
| | | handleConfirm(e) { |
| | | this.defaultIndex = e.indexs; |
| | | this.form.confirmFlag = e.value[0].name; |
| | | this.selectStatus = e.value[0].status; |
| | | this.isPickerShow = false |
| | | }, |
| | | submit() { |
| | | submit(val) { |
| | | let data = { |
| | | id: this.id, |
| | | status: this.selectStatus, |
| | | remark: this.remark |
| | | taskId: this.taskId, |
| | | // status: this.selectStatus, |
| | | status: val.type, |
| | | // remark: this.remark |
| | | confirmNotion: val.remark |
| | | } |
| | | if (this.selectStatus == 3 && !this.remark) { |
| | | uni.showToast({ |
| | | title: "请输入拒绝原因", |
| | | icon: "none" |
| | | }) |
| | | return; |
| | | } |
| | | setLabelReporting(data).then(res=>{ |
| | | // if (this.selectStatus == 3 && !this.remark) { |
| | | // uni.showToast({ |
| | | // title: "请输入拒绝原因", |
| | | // icon: "none" |
| | | // }) |
| | | // return; |
| | | // } |
| | | setLabelReporting(data).then(res => { |
| | | if (res.code !== 200) { |
| | | uni.showToast({ |
| | | title: '更新失败', |
| | | icon: 'error' |
| | | }) |
| | | return |
| | | } else { |
| | | uni.showToast({ |
| | | title: '操作成功', |
| | | }) |
| | | this.reLoadPrePage(); |
| | | } |
| | | uni.navigateBack() |
| | | }) |
| | | }, |
| | | |
| | | //刷新上一页数据后返回 |
| | | reLoadPrePage() { |
| | | let pages = getCurrentPages(); |
| | | let prePage = pages[pages.length - 2]; |
| | | prePage.$vm.currentPage = 1; |
| | | prePage.$vm.list = []; |
| | | prePage.$vm.getList(); |
| | | uni.navigateBack(); |
| | | }, |
| | | |
| | | navToEdit() { |
| | | uni.navigateTo({ |
| | | url: `/subPackage/label/form?id=${this.taskId}` |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .container { |
| | | padding:0 20rpx 130rpx; |
| | | padding: 0 20rpx 130rpx; |
| | | |
| | | .box-title { |
| | | margin-bottom: 15rpx; |
| | | } |
| | | |
| | | .info { |
| | | .title { |
| | | font-size: 30rpx; |
| | | padding-left: 10rpx; |
| | | } |
| | | |
| | | .images-box { |
| | | padding: 20rpx; |
| | | min-height: 100rpx; |
| | | background-color: #fff; |
| | | } |
| | | } |
| | | |
| | | .form { |
| | | background-color: #fff; |
| | | |
| | | .form-item { |
| | | padding: 0 20rpx; |
| | | |
| | |
| | | /deep/ .uni-input-placeholder { |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .row { |
| | | padding: 20rpx 10rpx; |
| | | font-size: 30rpx; |
| | | border-bottom: 1px solid #eff1f3; |
| | | |
| | | .row-right { |
| | | color: #969799; |
| | | } |
| | | } |
| | | </style> |