|
@@ -6,7 +6,7 @@
|
|
|
|
|
|
<!-- 表单数据 -->
|
|
<!-- 表单数据 -->
|
|
<template v-if="formList.length > 0">
|
|
<template v-if="formList.length > 0">
|
|
- <uni-section title="表单数据" type="line"></uni-section>
|
|
|
|
|
|
+ <uni-section title="表单数据" type="line" />
|
|
<uni-forms class="form" label-align="right" :labelWidth="100">
|
|
<uni-forms class="form" label-align="right" :labelWidth="100">
|
|
<uni-forms-item v-for="item in formList" :label="item.name" name="email">
|
|
<uni-forms-item v-for="item in formList" :label="item.name" name="email">
|
|
<view class="content">{{item.value.join(",")}}</view>
|
|
<view class="content">{{item.value.join(",")}}</view>
|
|
@@ -15,25 +15,26 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<!-- 附件信息 -->
|
|
<!-- 附件信息 -->
|
|
- <template v-if="excelFileList.length > 0">
|
|
|
|
- <uni-section title="附件信息" type="line"></uni-section>
|
|
|
|
- <view class="attachment" v-for="item in excelFileList" :key="item.id">
|
|
|
|
|
|
+ <template v-if="attachments.length > 0">
|
|
|
|
+ <uni-section title="附件信息" type="line" />
|
|
|
|
+ <view class="attachment" v-for="item in attachments" :key="item.id">
|
|
<!-- {{item.name}} -->
|
|
<!-- {{item.name}} -->
|
|
<previewFile :src="item.url" :name="item.name" />
|
|
<previewFile :src="item.url" :name="item.name" />
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<!-- 审批信息 -->
|
|
<!-- 审批信息 -->
|
|
- <uni-section title="审批信息" type="line"></uni-section>
|
|
|
|
|
|
+ <uni-section title="审批信息" type="line" />
|
|
<uni-steps :options="auditList" :active="currentStep" direction="column" />
|
|
<uni-steps :options="auditList" :active="currentStep" direction="column" />
|
|
|
|
|
|
<!-- 清单详情 -->
|
|
<!-- 清单详情 -->
|
|
- <uni-section title="清单详情" type="line"></uni-section>
|
|
|
|
- <view class="excel-detail" @click="toExcelDetail">查看详情</view>
|
|
|
|
|
|
+ <!-- <uni-section title="清单详情" type="line" />
|
|
|
|
+ <view class="excel-detail" @click="toExcelDetail">查看详情</view> -->
|
|
|
|
+
|
|
<!-- 审批按钮 -->
|
|
<!-- 审批按钮 -->
|
|
<view class="btns" v-if="isAuditor">
|
|
<view class="btns" v-if="isAuditor">
|
|
- <button type="primary" @click="showAuditModal">通过</button>
|
|
|
|
- <button type="warn" @click="showRejectModal">拒绝</button>
|
|
|
|
|
|
+ <button type="primary" @click="showAuditModal" style="width: 200rpx; height: 45px;">通过</button>
|
|
|
|
+ <button type="warn" @click="showRejectModal" style="width: 200rpx; height: 45px;">拒绝</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -71,6 +72,7 @@
|
|
return {
|
|
return {
|
|
id: "",
|
|
id: "",
|
|
detail: {},
|
|
detail: {},
|
|
|
|
+ attachments:[],
|
|
auditList: [],
|
|
auditList: [],
|
|
currentStep: 0,
|
|
currentStep: 0,
|
|
isAuditor: true,
|
|
isAuditor: true,
|
|
@@ -84,23 +86,37 @@
|
|
}
|
|
}
|
|
this.id = query.id
|
|
this.id = query.id
|
|
this.query = query
|
|
this.query = query
|
|
|
|
+ this.checkDeviceType()
|
|
this.init()
|
|
this.init()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ checkDeviceType() {
|
|
|
|
+ const userAgent = navigator.userAgent.toLowerCase();
|
|
|
|
+ const mobileKeywords = ['android', 'iphone', 'ipad', 'ipod', 'mobile'];
|
|
|
|
+ this.isMobile = mobileKeywords.some(keyword => userAgent.includes(keyword));
|
|
|
|
+ return this.isMobile
|
|
|
|
+ },
|
|
|
|
+
|
|
async init() {
|
|
async init() {
|
|
var currentUser = await gerCurrentUser();
|
|
var currentUser = await gerCurrentUser();
|
|
if (!currentUser) {
|
|
if (!currentUser) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
uni.setStorageSync("user", currentUser);
|
|
uni.setStorageSync("user", currentUser);
|
|
|
|
+
|
|
|
|
+ // if (!this.isMobile) {
|
|
|
|
+ // // 如果是在电脑上打开,转到PC端的页面去
|
|
|
|
+ // window.location.href =
|
|
|
|
+ // `http://120.55.44.4:8896/#/bom/home/detail/${version.project_id}/${version.template_id}?version_id=${this.versionId}&JWT-TOKEN=${this.query['JWT-TOKEN']}`
|
|
|
|
+ // }
|
|
|
|
+
|
|
const detail = await getOAAuditDetail(this.id)
|
|
const detail = await getOAAuditDetail(this.id)
|
|
this.detail = detail
|
|
this.detail = detail
|
|
-
|
|
|
|
|
|
+ this.attachments = detail.Files
|
|
this.getAuditList(detail.OaAuditList, detail.AuditorInfo)
|
|
this.getAuditList(detail.OaAuditList, detail.AuditorInfo)
|
|
-
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+
|
|
getAuditList(list, currentAuditor) {
|
|
getAuditList(list, currentAuditor) {
|
|
// 填充审核人列表
|
|
// 填充审核人列表
|
|
if (list && list.length) {
|
|
if (list && list.length) {
|
|
@@ -172,18 +188,17 @@
|
|
if (!form) {
|
|
if (!form) {
|
|
return []
|
|
return []
|
|
}
|
|
}
|
|
- console.log(form);
|
|
|
|
try {
|
|
try {
|
|
const formDatas = JSON.parse(form)
|
|
const formDatas = JSON.parse(form)
|
|
- console.log(formDatas);
|
|
|
|
if (formDatas && formDatas.length) {
|
|
if (formDatas && formDatas.length) {
|
|
- return formDatas
|
|
|
|
|
|
+ return formDatas.filter(item=>item.type!=='DIYTable')
|
|
}
|
|
}
|
|
return []
|
|
return []
|
|
} catch {
|
|
} catch {
|
|
return []
|
|
return []
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|