Эх сурвалжийг харах

Merge branch 'master' of http://120.55.44.4:10080/xujunjie/BomApp

xujunjie 2 жил өмнө
parent
commit
14baa743fe
51 өөрчлөгдсөн 700 нэмэгдсэн , 168 устгасан
  1. 3 1
      App.vue
  2. 1 0
      components/search-drawer/search-drawer.vue
  3. 7 1
      manifest.json
  4. 33 17
      pages.json
  5. 247 0
      pages/audit/OA/detail.vue
  6. 24 0
      pages/audit/OA/excelDetail.vue
  7. 133 0
      pages/audit/OA/list.vue
  8. 15 0
      pages/audit/README.md
  9. 62 25
      pages/audit/detail.vue
  10. 14 6
      pages/audit/list.vue
  11. 36 0
      pages/index/buttonConfig.js
  12. 95 93
      pages/index/index.vue
  13. 3 2
      pages/login/login.vue
  14. 6 0
      services/bom.js
  15. 15 0
      services/oa.js
  16. 6 0
      services/user.js
  17. 0 0
      unpackage/dist/build/.automator/h5/.automator.json
  18. BIN
      unpackage/dist/build/BomApp.zip
  19. 0 2
      unpackage/dist/build/h5/index.html
  20. BIN
      unpackage/dist/build/h5/static/bg.png
  21. BIN
      unpackage/dist/build/h5/static/c1.png
  22. BIN
      unpackage/dist/build/h5/static/c2.png
  23. BIN
      unpackage/dist/build/h5/static/c3.png
  24. BIN
      unpackage/dist/build/h5/static/c4.png
  25. BIN
      unpackage/dist/build/h5/static/c5.png
  26. BIN
      unpackage/dist/build/h5/static/c6.png
  27. BIN
      unpackage/dist/build/h5/static/c7.png
  28. BIN
      unpackage/dist/build/h5/static/c8.png
  29. BIN
      unpackage/dist/build/h5/static/c9.png
  30. BIN
      unpackage/dist/build/h5/static/cuihai-combox/arrow_down.png
  31. 0 20
      unpackage/dist/build/h5/static/customicons.css
  32. BIN
      unpackage/dist/build/h5/static/customicons.ttf
  33. BIN
      unpackage/dist/build/h5/static/drawer-bar.png
  34. BIN
      unpackage/dist/build/h5/static/fonts/dataMeter.ttf
  35. BIN
      unpackage/dist/build/h5/static/fonts/uniicons.b6d3756e.ttf
  36. BIN
      unpackage/dist/build/h5/static/icon-arr.png
  37. BIN
      unpackage/dist/build/h5/static/img/bg.2e726df4.png
  38. BIN
      unpackage/dist/build/h5/static/img/logo.f90e7931.png
  39. 0 0
      unpackage/dist/build/h5/static/index.63b34199.css
  40. BIN
      unpackage/dist/build/h5/static/index/bg.png
  41. 0 0
      unpackage/dist/build/h5/static/js/chunk-vendors.6ccae6ed.js
  42. 0 0
      unpackage/dist/build/h5/static/js/index.6bc733b2.js
  43. 0 0
      unpackage/dist/build/h5/static/js/pages-audit-detail.1662419f.js
  44. 0 0
      unpackage/dist/build/h5/static/js/pages-audit-detail~pages-index-index.18357c6e.js
  45. 0 1
      unpackage/dist/build/h5/static/js/pages-audit-excelDetail.367f37e0.js
  46. 0 0
      unpackage/dist/build/h5/static/js/pages-audit-list.70b94e95.js
  47. 0 0
      unpackage/dist/build/h5/static/js/pages-index-index.7a8c5c42.js
  48. 0 0
      unpackage/dist/build/h5/static/js/pages-login-login.3bea74a2.js
  49. BIN
      unpackage/dist/build/h5/static/login.png
  50. BIN
      unpackage/dist/build/h5/static/logo.png
  51. BIN
      unpackage/dist/build/h5/static/uni.png

+ 3 - 1
App.vue

@@ -29,7 +29,9 @@ export default {
   display: flex;
   flex-direction: column;
   background: url("./static/index/bg.png") no-repeat center;
-  background-size: 100% 100%;
+  background-size: cover;
+	background-attachment: fixed;
+	
   .content {
     flex: 1 1 auto;
     margin: 0 30rpx;

+ 1 - 0
components/search-drawer/search-drawer.vue

@@ -55,6 +55,7 @@ export default {
   z-index: 999;
   background: url("@/static/drawer-bar.png") no-repeat center;
   background-size: cover;
+	background-attachment: fixed;
 }
 .drawer {
   .title {

+ 7 - 1
manifest.json

@@ -58,7 +58,13 @@
     "h5" : {
         "devServer" : {
             "https" : false,
-            "port" : ""
+            "port" : "",
+            "proxy" : {
+                "/api" : {
+                    "target" : "http://47.96.12.136:8896", // 后端接口的基础地址
+                    "changeOrigin" : true // 支持跨域
+                }
+            }
         },
         "router" : {
             "base" : ""

+ 33 - 17
pages.json

@@ -1,42 +1,58 @@
 {
 	"pages": [{
 			"path": "pages/index/index"
-		}, {
-			"path": "pages/audit/list"
 		},
 		{
 			"path": "pages/login/login",
 			"style": {
 				"navigationBarBackgroundColor": "#7399DB"
 			}
-		}, {
+		},
+		{
+			"path": "pages/audit/list"
+		},
+		{
 			"path": "pages/audit/detail",
 			"style": {
 				"navigationBarTitleText": "",
 				"enablePullDownRefresh": false
 			}
-
-		}, {
+		},
+		{
 			"path": "pages/audit/excelDetail",
 			"style": {
 				"navigationBarTitleText": "",
 				"enablePullDownRefresh": false
 			}
-
+		},
+		{
+			"path": "pages/audit/OA/list"
+		},
+		{
+			"path": "pages/audit/OA/detail",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/audit/OA/excelDetail",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/preview/preview",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
 		}
-	    ,{
-            "path" : "pages/preview/preview",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-    ],
+	],
 	"globalStyle": {
 		"app-plus": {
 			"titleNView": false
 		}
 	}
-}
+}

+ 247 - 0
pages/audit/OA/detail.vue

@@ -0,0 +1,247 @@
+<template>
+	<view class="page-detail">
+		<view class="page-center">
+			<uni-section title="清单名称" type="line" style="margin-top: 0;" />
+			<text style="padding-left: 20rpx;">{{detail.name}}</text>
+
+			<!-- 表单数据 -->
+			<template v-if="formList.length > 0">
+				<uni-section title="表单数据" type="line" />
+				<uni-forms class="form" label-align="right" :labelWidth="100">
+					<uni-forms-item v-for="item in formList" :label="item.name" name="email">
+						<view class="content">{{item.value.join(",")}}</view>
+					</uni-forms-item>
+				</uni-forms>
+			</template>
+
+			<!-- 附件信息 -->
+			<template v-if="attachments.length > 0">
+				<uni-section title="附件信息" type="line" />
+				<view class="attachment" v-for="item in attachments" :key="item.id">
+					<!-- {{item.name}} -->
+					<previewFile :src="item.url" :name="item.name" />
+				</view>
+			</template>
+
+			<!-- 审批信息 -->
+			<uni-section title="审批信息" type="line" />
+			<uni-steps :options="auditList" :active="currentStep" direction="column" />
+
+			<!-- 清单详情 -->
+			<!-- 	<uni-section title="清单详情" type="line" />
+			<view class="excel-detail" @click="toExcelDetail">查看详情</view> -->
+
+			<!-- 审批按钮 -->
+			<view class="btns" v-if="isAuditor">
+				<button type="primary" @click="showAuditModal" style="width: 200rpx; height: 45px;">通过</button>
+				<button type="warn" @click="showRejectModal" style="width: 200rpx; height: 45px;">拒绝</button>
+			</view>
+		</view>
+
+
+		<!-- 审核通过弹窗 -->
+		<uni-popup ref="popup" type="dialog">
+			<uni-popup-dialog mode="input" placeholder="请输入审批意见" :duration="2000" :before-close="true" @close="auditClose"
+				@confirm="auditConfirm" />
+		</uni-popup>
+
+		<!-- 审批拒绝弹窗 -->
+		<uni-popup ref="rejectPopup" type="dialog">
+			<uni-popup-dialog mode="input" placeholder="请输入拒绝原因" :duration="2000" :before-close="true" @close="rejectClose"
+				@confirm="rejectConfirm"></uni-popup-dialog>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import {
+		gerCurrentUser
+	} from "@/services/user.js"
+
+	import previewFile from "@/components/preview-file/preview-file.vue"
+	import {
+		audit,
+		getOAAuditDetail
+	} from "../../../services/oa";
+
+	export default {
+		components: {
+			previewFile
+		},
+		data() {
+			return {
+				id: "",
+				detail: {},
+				attachments:[],
+				auditList: [],
+				currentStep: 0,
+				isAuditor: true,
+				query: {},
+				excelFileList: []
+			};
+		},
+		onLoad(query) {
+			if (!uni.getStorageSync('token')) {
+				uni.setStorageSync("token", query['JWT-TOKEN']);
+			}
+			this.id = query.id
+			this.query = query
+			this.checkDeviceType()
+			this.init()
+		},
+		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() {
+				var currentUser = await gerCurrentUser();
+				if (!currentUser) {
+					return
+				}
+				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)
+				this.detail = detail
+				this.attachments = detail.Files
+				this.getAuditList(detail.OaAuditList, detail.AuditorInfo)
+			},
+
+
+			getAuditList(list, currentAuditor) {
+				// 填充审核人列表
+				if (list && list.length) {
+					this.auditList = list.map((item, index) => {
+						if (currentAuditor.ID === item.auditor) {
+							this.currentStep = index
+						}
+						return {
+							title: item.seq_name,
+							desc: `审核人:${item.AuditorUser.CName || '-'}`
+						}
+					})
+				}
+			},
+
+			// 显示通过审批弹窗
+			async showAuditModal() {
+				this.$refs.popup.open();
+			},
+
+			// 通过审批
+			async auditConfirm(audit_comment) {
+				await audit({
+					id: this.id,
+					status: 1,
+					desc: audit_comment
+				})
+				uni.showToast({
+					title: "操作成功"
+				})
+				this.auditClose()
+			},
+
+			auditClose() {
+				this.$refs.popup.close();
+			},
+
+			// 显示拒绝审批弹窗
+			showRejectModal() {
+				this.$refs.rejectPopup.open()
+			},
+
+			async rejectConfirm(audit_comment) {
+				await audit({
+					id: this.id,
+					status: 2,
+					desc: audit_comment
+				})
+				uni.showToast({
+					title: "操作成功"
+				})
+
+				this.rejectClose()
+			},
+
+			rejectClose() {
+				this.$refs.rejectPopup.close();
+			},
+
+			toExcelDetail() {
+				uni.navigateTo({
+					url: `./excelDetail?templateNodeId=${this.templateNodeId}&versionId=${this.versionId}`
+				})
+			}
+		},
+		computed: {
+			formList() {
+				const form = this.detail?.form
+				if (!form) {
+					return []
+				}
+				try {
+					const formDatas = JSON.parse(form)
+					if (formDatas && formDatas.length) {
+						return formDatas.filter(item=>item.type!=='DIYTable')
+					}
+					return []
+				} catch {
+					return []
+				}
+			},
+			
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	.page-detail {
+		min-height: 100vh;
+		padding: 20rpx 30rpx 40rpx;
+		background: url("~@/static/index/bg.png") no-repeat center;
+		background-size: cover;
+		background-attachment: fixed;
+
+		.page-center {
+			padding: 30rpx;
+			padding-top: 0;
+			background-color: #fff;
+		}
+	}
+
+	.btns {
+		display: flex;
+		margin-top: 40rpx;
+	}
+
+	.excel-detail {
+		color: #2f42ca;
+		text-decoration: underline;
+		padding-left: 20rpx;
+	}
+
+	.form {
+		width: 90%;
+		margin: 0 auto;
+
+		.content {
+			line-height: 44rpx;
+			padding: 14rpx;
+			word-break: break-all;
+		}
+	}
+
+	.attachment {
+		padding-left: 20rpx;
+		margin-bottom: 20rpx;
+	}
+</style>

+ 24 - 0
pages/audit/OA/excelDetail.vue

@@ -0,0 +1,24 @@
+<template>
+	<web-view :src="url"></web-view>
+</template>
+
+<script>
+	import {
+		host
+	} from "@/services/constants.js"
+
+	const token = uni.getStorageSync('token')
+	export default {
+		data() {
+			return {
+				url: '',
+			}
+		},
+		onLoad(options) {
+			this.url = `http://120.55.44.4:8896/#/mobile/detail/${options.templateNodeId}/${options.versionId}?JWT-TOKEN=${token}`
+		},
+	}
+</script>
+
+<style>
+</style>

+ 133 - 0
pages/audit/OA/list.vue

@@ -0,0 +1,133 @@
+<template>
+	<view class="page-detail">
+		<view class="page-center">
+			<uni-section title="待审批列表" type="line" style="margin-top: 0;" />
+			<uni-card v-for="item in list" :title="item.name || '无标题'" @click="toDetail(item)" >
+				<view class="item">
+					<view class="label">发起时间</view>
+					<view class="value">{{formateDate(item.create_time)}}</view>
+				</view>
+				<view class="item">
+					<view class="label">发起人</view>
+					<view class="value">{{item.AuthorInfo && item.AuthorInfo.CName}}</view>
+				</view>
+				<button size="mini" type="default" class="detailBtn" @click="toDetail(item)">查看详情</button>
+				<!-- <view class="row">
+					<view class="item">
+						<view class="label">分类</view>
+						<view class="value">{{'classify[item.classify_id]' || '未知分类'}}</view>
+					</view>
+					<view class="item">
+						<view class="label">提交人</view>
+						<view class="value">{{'item.AuthorInfo && item.AuthorInfo.CName'}}</view>
+					</view>
+				</view> -->
+			</uni-card>
+			<view style="text-align: center;" v-if="list.length == 0">暂无审批项</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getOAAuditList
+	} from "@/services/oa.js"
+
+	export default {
+		data() {
+			return {
+				list: [],
+				pagination: {
+					current: 1,
+					pageSize: 10,
+					total: 0,
+				}
+			}
+		},
+		onLoad(query) {
+
+		},
+		mounted() {
+			this.init()
+		},
+		onShow() {
+			this.queryList()
+		},
+		methods: {
+			async init() {},
+			async queryList() {
+				var {
+					list,
+					pagination
+				} = await getOAAuditList()
+				this.list = list;
+				this.pagination = pagination;
+			},
+			formateDate(date) {
+				const origin = new Date(date);
+				const datePart = origin.getFullYear() + "-" + (origin.getMonth() + 1) + "-" + origin.getDate();
+				const timePart = origin.getHours() + ":" + origin.getMinutes() + ":" + origin.getSeconds();
+				return datePart + " " + timePart;
+			},
+			toDetail(item) {
+				uni.navigateTo({
+					url: `./detail?id=${item.id}`
+				})
+			}
+		},
+	}
+</script>
+
+<style lang="less" scoped>
+	.page-detail {
+		min-height: 100vh;
+		padding: 15px;
+		background: url("~@/static/index/bg.png") no-repeat center;
+		background-size: cover;
+		background-attachment: fixed;
+
+		.page-center {
+			padding: 20rpx;
+			padding-top: 0;
+			border-radius: 5px;
+			background-color: #fff;
+		}
+	}
+
+	.item {
+		margin-bottom: 14px;
+
+		.label {
+			font-weight: bold;
+			font-size: 16px;
+			margin-bottom: 5px;
+		}
+
+		.value {
+			font-size: 14;
+		}
+	}
+
+	.row {
+		display: flex;
+
+		.item {
+			width: 50%;
+			display: flex;
+			align-items: center;
+
+			.label {
+				margin-right: 12px;
+				margin-bottom: 0;
+			}
+		}
+	}
+
+	.detailBtn {
+		position: absolute;
+		bottom: 20px;
+		right: 20px;
+		background-color: #2979ff;
+		color: #fff;
+	}
+</style>

+ 15 - 0
pages/audit/README.md

@@ -0,0 +1,15 @@
+# 2023-08 因为需要向前兼容做如下变更
+
+## audit目录
+
+- detail.vue
+- excelDetail.vue
+- list.vue
+这三个文件是BOM的审批相关页面
+
+### OA文件夹
+
+- detail.vue
+- excelDetail.vue
+- list.vue
+  这三个文件是OA的审批相关页面

+ 62 - 25
pages/audit/detail.vue

@@ -12,7 +12,6 @@
 						<view class="content">{{item.value.join(",")}}</view>
 					</uni-forms-item>
 				</uni-forms>
-
 			</template>
 
 			<!-- 附件信息 -->
@@ -26,7 +25,7 @@
 
 			<!-- 审批信息 -->
 			<uni-section title="审批信息" type="line"></uni-section>
-			<uni-steps :options="flow.list.FlowNodes" :active="flow.active" direction="column"></uni-steps>
+			<uni-steps :options="flow.list.FlowNodes" :active="flow.current" direction="column"></uni-steps>
 
 			<!-- 清单详情 -->
 			<uni-section title="清单详情" type="line"></uni-section>
@@ -47,8 +46,8 @@
 
 		<!-- 审批拒绝弹窗 -->
 		<uni-popup ref="rejectPopup" type="dialog">
-			<uni-popup-dialog mode="input" placeholder="请输入拒绝原因" :duration="2000" :before-close="true"
-				@close="rejectClose" @confirm="rejectConfirm"></uni-popup-dialog>
+			<uni-popup-dialog mode="input" placeholder="请输入拒绝原因" :duration="2000" :before-close="true" @close="rejectClose"
+				@confirm="rejectConfirm"></uni-popup-dialog>
 		</uni-popup>
 	</view>
 </template>
@@ -59,7 +58,11 @@
 		queryAttachment,
 		queryAuditList,
 		approve,
+		queryVersionDetail,
 	} from "@/services/bom.js"
+	import {
+		gerCurrentUser
+	} from "@/services/user.js"
 	import previewFile from "@/components/preview-file/preview-file.vue"
 
 	export default {
@@ -70,7 +73,7 @@
 			return {
 				projectId: 580,
 				templateNodeId: 0,
-				versionId: 0,
+				id: 0,
 				version: {},
 				excelFileList: [],
 				auditMessage: '',
@@ -84,29 +87,46 @@
 					},
 				},
 				isAuditor: false,
+				isMobile: true,
 				options: {}
 			};
 		},
 		onLoad(options) {
 			this.templateNodeId = options.templateNodeId
-			this.versionId = options.versionId
 			this.projectId = Number(options.projectId)
-			if(!uni.getStorageSync('token')){
+			this.id = options.excel_id
+			if (!uni.getStorageSync('token')) {
 				uni.setStorageSync("token", options['JWT-TOKEN']);
 			}
 			this.options = options
+			this.checkDeviceType()
 			this.init()
 		},
 		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() {
-				var {
-					data: {
-						excel_version_tree: versionList
-					}
-				} = await queryVersionsList({
-					template_node_id: this.templateNodeId
-				});
-				var version = versionList.find(v => v.id == this.versionId);
+				var currentUser = await gerCurrentUser();
+				if (!currentUser) {
+					return
+				}
+				uni.setStorageSync("user", currentUser);
+
+				var version = await queryVersionDetail({
+					userID: currentUser.ID,
+					excelID: this.id
+				})
+				if (!this.isMobile) {
+					// 如果是在电脑上打开,转到PC端的页面去
+					window.location.href =
+						`http://120.55.44.4:8896/#/bom/home/detail/${version.project_id}/${version.template_id}?excel_id=${this.id}&JWT-TOKEN=${this.query['JWT-TOKEN']}`
+				}
+
 				if (version.flow_id) {
 					this.getFlow(version)
 				}
@@ -128,13 +148,15 @@
 							name,
 						};
 					})
-					console.log(this.excelFileList)
+					// console.log(this.excelFileList)
 				}
 			},
+
 			// 显示通过审批弹窗
 			async showAuditModal() {
 				this.$refs.popup.open();
 			},
+
 			// 通过审批
 			async auditConfirm() {
 				let flow = this.flow;
@@ -158,16 +180,20 @@
 				})
 				this.$refs.popup.close();
 			},
+
 			// 显示拒绝审批弹窗
 			showRejectModal() {
 				this.$refs.rejectPopup.open()
 			},
+
 			auditClose() {
 				this.$refs.popup.close();
 			},
+
 			rejectClose() {
 				this.$refs.rejectPopup.close();
 			},
+
 			async rejectConfirm(audit_comment) {
 				const flow = this.flow
 				const flowNode = flow.currentNode;
@@ -226,23 +252,31 @@
 							this.isAuditor = true;
 						}
 					}
-					if(this.options['JWT-TOKEN']){
-						this.isAuditor = true;
-					}
 				}
 			},
+
 			toExcelDetail() {
 				uni.navigateTo({
-					url: `./excelDetail?templateNodeId=${this.templateNodeId}&versionId=${this.versionId}`
+					url: `./excelDetail?templateNodeId=${this.templateNodeId}&versionId=${this.version.version_id}`
 				})
 			}
 		},
 		computed: {
 			formList() {
-				if (!this.version.ding_schema) return []
+				if (!this.version.formStr) {
+					return []
+				}
 				try {
-					const ding_schema = JSON.parse(this.version.ding_schema);
-					return JSON.parse(ding_schema).formComponentValues || [];
+					const formStrArray = JSON.parse(this.version.formStr);
+					const formComponents = []
+					if (formStrArray && formStrArray.length) {
+						formStrArray.forEach(item => {
+							formComponents.push(JSON.parse(item))
+						})
+					}
+					const formComponent = formComponents.filter(item => item.template_node_id === this.version.template_node_id)
+					console.log(formComponent);
+					return formComponent[0].formComponentValues || [];
 				} catch (e) {
 					return []
 				}
@@ -256,6 +290,8 @@
 		min-height: 100vh;
 		padding: 20rpx 30rpx 40rpx;
 		background: url("~@/static/index/bg.png") no-repeat center;
+		background-size: cover;
+		background-attachment: fixed;
 
 		.page-center {
 			padding: 30rpx;
@@ -277,7 +313,8 @@
 
 	.form {
 		width: 90%;
-		margin: 0 auto;
+		margin: 0;
+		box-shadow: 0 0 1 3 rgba(0, 0, 0, 0.1);
 
 		.content {
 			line-height: 44rpx;
@@ -290,4 +327,4 @@
 		padding-left: 20rpx;
 		margin-bottom: 20rpx;
 	}
-</style>
+</style>

+ 14 - 6
pages/audit/list.vue

@@ -12,7 +12,6 @@
 					<view class="label">清单名称</view>
 					<view class="value">{{item.version_name}}.{{item.version_no}}</view>
 				</view>
-
 				<view class="row">
 					<view class="item">
 						<view class="label">分类</view>
@@ -41,7 +40,12 @@
 			return {
 				list: [],
 				classify: {},
-				project: {}
+				project: {},
+				pagination: {
+					current: 1,
+					pageSize: 10,
+					total: 0,
+				}
 			}
 		},
 		mounted() {
@@ -70,18 +74,20 @@
 				})
 				this.project = project;
 				this.classify = classify;
-
 			},
+
 			async queryList() {
 				let user = uni.getStorageSync("user");
 				var {
 					data: list
 				} = await queryAuthList(user.ID)
+				// console.log(list);
 				this.list = list;
 			},
+
 			toDetail(item) {
 				uni.navigateTo({
-					url: `./detail?templateNodeId=${item.TemplateNodeInfo.Id}&versionId=${item.id}&projectId=${item.project_id}`
+					url: `./detail?templateNodeId=${item.TemplateNodeInfo.Id}&excel_id=${item.id}&projectId=${item.project_id}`
 				})
 			}
 		},
@@ -93,11 +99,13 @@
 		min-height: 100vh;
 		padding: 20rpx 20rpx 40rpx;
 		background: url("~@/static/index/bg.png") no-repeat center;
-		background-size: 100% 100%;
+		background-size: cover;
+		background-attachment: fixed;
 
 		.page-center {
 			padding: 20rpx;
 			padding-top: 0;
+			border-radius: 5px;
 			background-color: #fff;
 		}
 	}
@@ -130,4 +138,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 36 - 0
pages/index/buttonConfig.js

@@ -0,0 +1,36 @@
+export const buttons = [{
+		name: 'BOM审批',
+		show: true,
+		icon: 'list',
+		size: '50rpx',
+		url: '../audit/list',
+	},
+	{
+		name: 'OA审批',
+		show: true,
+		icon: 'calendar-filled',
+		size: "50rpx",
+		url: '../audit/OA/list'
+	},
+	{
+		name: '项目审核',
+		show: false,
+		icon: 'calendar-filled',
+		size: "50rpx",
+		url: '../audit/list'
+	},
+	{
+		name: '工时上报',
+		show: false,
+		icon: 'calendar-filled',
+		size: "50rpx",
+		url: '../audit/list'
+	},
+	{
+		name: '工时审批',
+		show: false,
+		icon: 'calendar-filled',
+		size: "50rpx",
+		url: '../audit/list'
+	},
+]

+ 95 - 93
pages/index/index.vue

@@ -1,101 +1,103 @@
 <template>
-<view class="page">
-  <view class="content">
-    <view class="group">
-      <button class="button" v-if="true" @click="onHandleClick(0)">
-        <uni-icons type="list" size="35" />
-        <view>审批列表</view>
-      </button>
-      <!-- <button class="button" v-if="true" @click="onHandleClick(1)">
-        <uni-icons type="checkmarkempty" size="35" />
-        <view>项目审核</view>
-      </button>
-      <button class="button" v-if="true" @click="onHandleClick(2)">
-        <uni-icons type="calendar" size="35" />
-        <view>工时上报</view>
-      </button>
-      <button class="button" v-if="true" @click="onHandleClick(3)">
-        <uni-icons type="auth" size="35" />
-        <view>工时审批</view>
-      </button> -->
-    </view>
-  </view></view>
+	<view class="page">
+		<view class="content">
+			<view class="group">
+					<button v-for="(button, index) in buttons" class="button" @click="onHandleClick(button)">
+						<uni-icons :type="button.icon" :size="button.size" />
+						<view>{{button.name}}</view>
+					</button>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
-import { queryUser } from "@/services/index";
+	import {
+		queryUser
+	} from "@/services/index";
+	
+	import {buttons} from './buttonConfig.js'
 
-export default {
-  data() {
-    return { user: {} };
-  },
-  onShow() {
-    this.getCurrentUser();
-  },
-  computed: {
-    permission() {
-      let permission = {};
-      this.user?.Permissions.forEach((item) => {
-        permission = {
-          ...permission,
-          ...item.Menus,
-        };
-      });
-      return permission;
-    },
-  },
-  methods: {
-    onHandleClick(index) {
-      switch (index) {
-        case 0:
-          uni.navigateTo({
-            url: "../audit/list",
-          });
-          break;
-        // case 1:
-        //   uni.navigateTo({
-        //     url: "../Project/list?auth=true",
-        //   });
-        //   break;
-        // case 2:
-        //   uni.navigateTo({
-        //     url: "../WorkingHours/index",
-        //   });
-        //   break;
-        // case 3:
-        //   uni.navigateTo({
-        //     url: "../WorkingHours/audit",
-        //   });
-        //   break;
-      }
-    },
-    async getCurrentUser() {
-      let res = {};
-      res = await queryUser();
-      this.user = res.data;
-    },
-  },
-};
+	export default {
+		data() {
+			return {
+				user: {},
+				buttons: buttons.filter(item=>item.show)
+			};
+		},
+		onShow() {
+			this.getCurrentUser();
+		},
+		computed: {
+			permission() {
+				let permission = {};
+				this.user?.Permissions.forEach((item) => {
+					permission = {
+						...permission,
+						...item.Menus,
+					};
+				});
+				return permission;
+			},
+		},
+		methods: {
+			onHandleClick(button) {
+				uni.navigateTo({
+					url: button.url,
+				})
+			},
+			async getCurrentUser() {
+				let res = {};
+				res = await queryUser();
+				this.user = res.data;
+			},
+		},
+	};
 </script>
 
 <style lang="less" scoped>
-.content {
-  display: flex;
-  justify-content: center;
-}
-.group {
-  width: 90%;
-  padding: 5%;
-  display: flex;
-  justify-content: center;
-  flex-wrap: wrap;
-  background-color: #ffffff;
-  height: 800rpx;
-}
-.button {
-  width: 40%;
-  margin: 5%;
-  height: 280rpx;
-  font-size: 32rpx;
-}
-</style>
+	.content {
+		height: 100vh;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		margin: 0;
+		background: none;
+		
+	}
+
+	.group {
+		width: calc(100% - 30px);
+		height: calc(100% - 30px);
+		padding: 20px 10px;
+		border-radius: 5px;
+		background-color: #ffffff;
+		overflow-y: scroll;
+		// 每行两个,三行
+		display: grid;
+		grid-template-columns: repeat(2, 45%);
+		// grid-template-columns: 1fr 1fr;
+		grid-template-rows: repeat(4, 300rpx);
+		grid-row-gap: 10px;
+		grid-column-gap: 10px;
+		justify-content: space-evenly;
+		justify-items: center;
+		align-content: flex-start;
+		align-items: center;
+		
+	}
+
+	.button {
+		width: 100%;
+		margin: 10px 5px;
+		height: 250rpx;
+		font-size: 32rpx;
+		background-color: #edf1f7;
+		box-shadow: 0px 0px 3px 3px rgba(0, 0, 0, 0.1) ;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+	}
+
+	
+</style>

+ 3 - 2
pages/login/login.vue

@@ -83,7 +83,7 @@ export default {
       uni.setStorageSync("token", data.token);
       uni.setStorageSync("user", data.user);
       uni.reLaunch({
-        url: "../audit/list",
+        url: "../index/index",
       });
     },
     forget() {
@@ -129,7 +129,8 @@ export default {
   display: flex;
   flex-direction: column;
   background: url("~@/static/bg.png") no-repeat center;
-  background-size: 100% 100%;
+  background-size: cover;
+	background-attachment: fixed;
 }
 .logo {
   height: 220rpx;

+ 6 - 0
services/bom.js

@@ -36,4 +36,10 @@ export async function queryClassify() {
 // 查询全部项目
 export async function queryProjectList() {
   return request(`v2/approval/record?pageSize=99999`, 'GET');
+}
+
+// 查询单个Version
+export async function queryVersionDetail(params) {
+	const res =  await request(`v1/purchase/bom/get-audit-detail/${params.userID}?excel_id=${params.excelID}`, 'GET');
+	return res.data
 }

+ 15 - 0
services/oa.js

@@ -0,0 +1,15 @@
+import request from "./request"
+
+export async function getOAAuditList() {
+	const res = await request('v1/oa/audit/list?pageSize=99999', 'GET');
+	return res.data
+}
+
+export async function getOAAuditDetail(id) {
+	const res = await request(`v1/oa/audit/detail?id=${id}`, 'GET')
+	return res.data
+}
+
+export async function audit(data) {
+	return await request('v1/oa/audit/status', 'GET', data)
+}

+ 6 - 0
services/user.js

@@ -0,0 +1,6 @@
+import request from "./request"
+
+export async function gerCurrentUser() {
+  const res = await request(`v2/user/current-user`, 'GET');
+	return res.data
+}

+ 0 - 0
unpackage/dist/build/.automator/h5/.automator.json


BIN
unpackage/dist/build/BomApp.zip


+ 0 - 2
unpackage/dist/build/h5/index.html

@@ -1,2 +0,0 @@
-<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>人日系统</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
-            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.63b34199.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.6ccae6ed.js></script><script src=/static/js/index.6bc733b2.js></script></body></html>

BIN
unpackage/dist/build/h5/static/bg.png


BIN
unpackage/dist/build/h5/static/c1.png


BIN
unpackage/dist/build/h5/static/c2.png


BIN
unpackage/dist/build/h5/static/c3.png


BIN
unpackage/dist/build/h5/static/c4.png


BIN
unpackage/dist/build/h5/static/c5.png


BIN
unpackage/dist/build/h5/static/c6.png


BIN
unpackage/dist/build/h5/static/c7.png


BIN
unpackage/dist/build/h5/static/c8.png


BIN
unpackage/dist/build/h5/static/c9.png


BIN
unpackage/dist/build/h5/static/cuihai-combox/arrow_down.png


+ 0 - 20
unpackage/dist/build/h5/static/customicons.css

@@ -1,20 +0,0 @@
-@font-face {
-  font-family: "customicons"; /* Project id 2878519 */
-  src:url('/static/customicons.ttf') format('truetype');
-}
-
-.customicons {
-  font-family: "customicons" !important;
-}
-
-.youxi:before {
-  content: "\e60e";
-}
-
-.wenjian:before {
-  content: "\e60f";
-}
-
-.zhuanfa:before {
-  content: "\e610";
-}

BIN
unpackage/dist/build/h5/static/customicons.ttf


BIN
unpackage/dist/build/h5/static/drawer-bar.png


BIN
unpackage/dist/build/h5/static/fonts/dataMeter.ttf


BIN
unpackage/dist/build/h5/static/fonts/uniicons.b6d3756e.ttf


BIN
unpackage/dist/build/h5/static/icon-arr.png


BIN
unpackage/dist/build/h5/static/img/bg.2e726df4.png


BIN
unpackage/dist/build/h5/static/img/logo.f90e7931.png


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
unpackage/dist/build/h5/static/index.63b34199.css


BIN
unpackage/dist/build/h5/static/index/bg.png


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
unpackage/dist/build/h5/static/js/chunk-vendors.6ccae6ed.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
unpackage/dist/build/h5/static/js/index.6bc733b2.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-audit-detail.1662419f.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-audit-detail~pages-index-index.18357c6e.js


+ 0 - 1
unpackage/dist/build/h5/static/js/pages-audit-excelDetail.367f37e0.js

@@ -1 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-audit-excelDetail"],{"349a":function(t,n,e){"use strict";e.r(n);var a=e("dac7"),c=e.n(a);for(var u in a)["default"].indexOf(u)<0&&function(t){e.d(n,t,(function(){return a[t]}))}(u);n["default"]=c.a},dac7:function(t,n,e){"use strict";e("7a82"),Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,e("99af");var a=e("46c6"),c=uni.getStorageSync("token"),u={data:function(){return{url:""}},onLoad:function(t){this.url="".concat(a.host,"/#/mobile/detail/").concat(t.templateNodeId,"/").concat(t.versionId,"?JWT-TOKEN=").concat(c)}};n.default=u},e0dc:function(t,n,e){"use strict";e.r(n);var a=e("f012"),c=e("349a");for(var u in c)["default"].indexOf(u)<0&&function(t){e.d(n,t,(function(){return c[t]}))}(u);var i=e("f0c5"),r=Object(i["a"])(c["default"],a["b"],a["c"],!1,null,"6382d080",null,!1,a["a"],void 0);n["default"]=r.exports},f012:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"c",(function(){return c})),e.d(n,"a",(function(){}));var a=function(){var t=this.$createElement,n=this._self._c||t;return n("v-uni-web-view",{attrs:{src:this.url}})},c=[]}}]);

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-audit-list.70b94e95.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-index.7a8c5c42.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-login-login.3bea74a2.js


BIN
unpackage/dist/build/h5/static/login.png


BIN
unpackage/dist/build/h5/static/logo.png


BIN
unpackage/dist/build/h5/static/uni.png


Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно