소스 검색

移动端代码调整

wangqiang 1 년 전
부모
커밋
11cf079c01

+ 11 - 1
api/AppPath.js

@@ -1,8 +1,18 @@
 export const SYS_PATH = "/system-server/app";
+export const SYS_PATH2 = "/system-server";
 export const AUTH_PATH = "/auth-server/app";
 export const DEVTOOLS_PATH = "/devtools-server/app";
-export const FLOW_PATH = "/flowable-server/app";
+export const FLOW_PATH = "/flowable-server";
 export const FILE_PATH = "/file-server/app";
 export const UREPORT_PATH = "/ureport-server/app";
 export const WPS_PATH = "/wps-server/app";
 export const TEST_PATH = "/test-server/app";
+//人力资源
+export const REGISTER_PATH = "/human-server";
+export const PUBLIC_MODULES_PATH = "/public-modules-server";
+//中审
+export const CENTRECAREFUL_PATH = "/centrecareful-server";
+export const ASSESS_PATH = "/assess-server";
+
+//嘉溢
+export const BUSINESS_PATH = "/business-server";

+ 51 - 0
api/calendar/myCalendarService.js

@@ -0,0 +1,51 @@
+import request from "../../common/request"
+import { SYS_PATH2 as prefix } from "@/api/AppPath";
+
+export default {
+	save: function (inputForm) {
+		return request({
+			url: prefix + "/myCalendar/save",
+			method: "post",
+			data: inputForm,
+		});
+	},
+
+	delete: function (id) {
+		return request({
+			url: prefix + "/myCalendar/del",
+			method: "delete",
+			params: { id: id },
+		});
+	},
+
+	queryById: function (id) {
+		return request({
+			url: prefix + "/myCalendar/queryById",
+			method: "get",
+			params: { id: id },
+		});
+	},
+
+	drag: function (params) {
+		return request({
+			url: prefix + "/myCalendar/drag",
+			method: "put",
+			params: params,
+		});
+	},
+
+	resize: function (params) {
+		return request({
+			url: prefix + "/myCalendar/resize",
+			method: "put",
+			params: params,
+		});
+	},
+
+	list: function () {
+		return request({
+			url: prefix + "/myCalendar/findList",
+			method: "get",
+		});
+	},
+};

+ 12 - 0
api/common/CommonApi.js

@@ -0,0 +1,12 @@
+import request from "../../common/request"
+import { FLOW_PATH as prefix } from "@/api/AppPath";
+
+export default class CommonApi {
+  getTaskNameByProcInsId (procInsId) {
+    return request({
+      url: prefix + `/commonApi/getTaskNameByProcInsId`,
+      method: 'get',
+      params: {procInsId: procInsId}
+    })
+  }
+}

+ 8 - 0
api/file/fileService.js

@@ -14,6 +14,14 @@ export default {
     })
   },
 
+  downloadUrl: function (params) {
+    return request({
+      url: prefix + '/file/downloadUrl',
+      method: 'get',
+      params: params
+    })
+  },
+
   uploadFile: function (filePath, config = {}) {
 	return upload(prefix + '/file/uploadFile?uploadPath=userdir',filePath)      
   },

+ 70 - 0
api/jy/HolidayService.js

@@ -0,0 +1,70 @@
+import request from "../../common/request"
+import { BUSINESS_PATH as prefix } from "@/api/AppPath";
+
+export default {
+	list: function (param) {
+		return request({
+			url: prefix +'/holiday/findList',
+			method: 'get',
+			params: param
+		})
+	},
+
+	saveForm: function (inputForm) {
+		return request({
+			url: prefix + `/holiday/saveForm`,
+			method: 'post',
+			data: inputForm
+		})
+	},
+
+	queryById: function (id) {
+		return request({
+			url: prefix +'/holiday/findById',
+			method: 'get',
+			params: {id: id}
+		})
+	},
+
+	updateStatusById: function(data) {
+		return request({
+			url: prefix + "/holiday/updateStatusById",
+			method: "post",
+			data: data,
+		})
+	},
+	delete: function (ids) {
+		return request({
+			url: prefix+"/holiday/delete",
+			method: 'delete',
+			params: {id: ids}
+		})
+	},
+
+
+	adminEditForm: function(param){
+		return request({
+			url: prefix + "/holiday/adminEditForm",
+			method: "post",
+			data: param,
+		})
+	},
+
+	checkType: function (inputForm) {
+		return request({
+			url: prefix + `/holiday/checkType`,
+			method: 'post',
+			data: inputForm
+		})
+	},
+
+	exportFile: function(params) {
+		return request({
+			url: prefix + "/holiday/export",
+			method: "get",
+			params: params,
+			responseType: "blob",
+		});
+	}
+
+}

+ 110 - 0
api/materialManagement/CollectService.js

@@ -0,0 +1,110 @@
+import request from "../../common/request"
+import { PUBLIC_MODULES_PATH as prefix } from "@/api/AppPath";
+
+export default {
+  updateStatusById: function (param) {
+    return request({
+      url: prefix + '/material/collect/updateStatusById',
+      method: 'post',
+      data: param
+    })
+  },
+  remove: function (id) {
+    return request({
+      url: prefix + '/material/collect/remove',
+      method: 'get',
+      params: {id: id}
+    })
+  },
+  save: function (param) {
+    return request({
+      url: prefix + '/material/collect/save',
+      method: 'post',
+      data: param
+    })
+  },
+  findById: function (id) {
+    return request({
+      url: prefix + '/material/collect/findById',
+      method: 'get',
+      params: {id: id}
+    })
+  },
+  list: function (param) {
+    return request({
+      url: prefix + '/material/collect/list',
+      method: 'get',
+      params: param
+    })
+  },
+  wareHouseList: function (params) {
+    return request({
+      url: prefix + '/material/collect/wareHouseList',
+      method: 'get',
+      params: params
+    })
+  },
+  createReturnData: function (param) {
+    return request({
+      url: prefix + '/material/collect/createReturnData',
+      method: 'post',
+      data: param
+    })
+  },
+  saveReturn: function (param) {
+    return request({
+      url: prefix + '/material/collect/saveReturn',
+      method: 'post',
+      data: param
+    })
+  },
+  saveReturnAgree: function (param) {
+    return request({
+      url: prefix + '/material/collect/saveReturnAgree',
+      method: 'post',
+      data: param
+    })
+  },
+  updateStatusByIdReturn: function (param) {
+    return request({
+      url: prefix + '/material/collect/updateStatusByIdReturn',
+      method: 'post',
+      data: param
+    })
+  },
+  findByReturnId: function (id) {
+    return request({
+      url: prefix + '/material/collect/findByReturnId',
+      method: 'get',
+      params: {returnId: id}
+    })
+  },
+  returnRequest: function (param) {
+    return request({
+      url: prefix + '/material/collect/returnRequest',
+      method: 'post',
+      data: param
+    })
+  },
+  findHiById: function (id) {
+    return request({
+      url: prefix + '/material/collect/findHiById',
+      method: 'get',
+      params: {collectId: id}
+    })
+  },
+  findHiByHiId: function (id) {
+    return request({
+      url: prefix + '/material/collect/findHiByHiId',
+      method: 'get',
+      params: {id: id}
+    })
+  },
+  findLastHiByid: function (id) {
+    return request({
+      url: prefix + '/material/collect/findLastHiByid',
+      method: 'get',
+      params: {collectId: id}
+    })
+  }
+}

+ 47 - 0
api/materialManagement/MaterialTypeService.js

@@ -0,0 +1,47 @@
+import request from "../../common/request"
+import { PUBLIC_MODULES_PATH as prefix } from "@/api/AppPath";
+
+export default class MaterialTypeService {
+  list (param) {
+    return request({
+      url: prefix + '/material/materialType/list',
+      method: 'get',
+      params: param
+    })
+  }
+  bxList (param) {
+    return request({
+      url: prefix + '/material/materialType/bxList',
+      method: 'get',
+      params: param
+    })
+  }
+  cgList (param) {
+    return request({
+      url: prefix + '/material/materialType/cgList',
+      method: 'get',
+      params: param
+    })
+  }
+  save (param) {
+    return request({
+      url: prefix + '/material/materialType/save',
+      method: 'post',
+      data: param
+    })
+  }
+  findById (id) {
+    return request({
+      url: prefix + '/material/materialType/findById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  remove (id) {
+    return request({
+      url: prefix + '/material/materialType/deleteById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+}

+ 153 - 0
api/materialManagement/WareHouseService.js

@@ -0,0 +1,153 @@
+import request from "../../common/request"
+import { PUBLIC_MODULES_PATH as prefix } from "@/api/AppPath";
+
+export default class WareHouseService {
+	list(params) {
+		return request({
+			url: prefix + "/material/management/wareHouse/list",
+			method: "get",
+			params: params,
+		});
+	}
+	reimbursementList(params) {
+		return request({
+			url: prefix + "/material/management/wareHouse/reimbursementList",
+			method: "get",
+			params: params,
+		});
+	}
+	wareHouseList(param) {
+		return request({
+			url: prefix + "/material/management/wareHouse/wareHouseList",
+			method: "get",
+			params: param,
+		});
+	}
+	wareHouseHistoryList(param) {
+		return request({
+			url: prefix + "/material/management/wareHouse/wareHouseHistoryList",
+			method: "get",
+			params: param,
+		});
+	}
+	collectHistoryList(param) {
+		return request({
+			url: prefix + "/material/management/wareHouse/collectHistoryList",
+			method: "get",
+			params: param,
+		});
+	}
+	wareHouseSummaryList(param) {
+		return request({
+			url: prefix + "/material/management/wareHouse/wareHouseSummaryList",
+			method: "get",
+			params: param,
+		});
+	}
+	wareHouseSummaryList2(param) {
+		return request({
+			url: prefix + "/material/management/wareHouse/wareHouseSummaryList2",
+			method: "get",
+			params: param,
+		});
+	}
+	save(param) {
+		return request({
+			url: prefix + "/material/management/wareHouse/save",
+			method: "post",
+			data: param,
+		});
+	}
+	findById(id, status) {
+		return request({
+			url: prefix + "/material/management/wareHouse/findById",
+			method: "get",
+			params: { id: id, status: status },
+		});
+	}
+	remove(id) {
+		return request({
+			url: prefix + "/material/management/wareHouse/remove",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	findRequestId(purchaseNo) {
+		return request({
+			url: prefix + "/material/management/wareHouse/findRequestId",
+			method: "get",
+			params: { purchaseNo: purchaseNo },
+		});
+	}
+	updateStatusById(data) {
+		return request({
+			url: prefix + "/material/management/wareHouse/updateStatusById",
+			method: "post",
+			data: data,
+		});
+	}
+	backSourceData(id) {
+		return request({
+			url: prefix + "/material/management/wareHouse/backSourceData",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	findHiById(id) {
+		return request({
+			url: prefix + "/material/management/wareHouse/findHiById",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	findHiByHiId(id) {
+		return request({
+			url: prefix + "/material/management/wareHouse/findHiByHiId",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	findLastHiByid(id) {
+		return request({
+			url: prefix + "/material/management/wareHouse/findLastHiByid",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	updateWarnFlagByTradeNameAndType(tradeName, wareHouseType) {
+		return request({
+			url: prefix + `/material/management/wareHouse/updateWarnFlagByTradeNameAndType`,
+			method: "post",
+			data: { tradeName: tradeName, wareHouseType: wareHouseType },
+		});
+	}
+	updateWarnNumByTradeNameAndType(tradeName, wareHouseType, warnNum) {
+		return request({
+			url: prefix + `/material/management/wareHouse/updateWarnNumByTradeNameAndType`,
+			method: "post",
+			data: {
+				tradeName: tradeName,
+				wareHouseType: wareHouseType,
+				warnNum: warnNum,
+			},
+		});
+	}
+	saveTradeName(oldTradeName, tradeName, type) {
+		return request({
+			url: prefix + `/material/management/wareHouse/saveTradeName`,
+			method: "post",
+			data: {
+				oldTradeName: oldTradeName,
+				tradeName: tradeName,
+				wareHouseType: type,
+			},
+		});
+	}
+	findTradeByTypeId(typeId) {
+		return request({
+			url: prefix + "/material/management/wareHouse/findTradeByTypeId",
+			method: "get",
+			params: { typeId: typeId },
+		});
+	}
+}

+ 15 - 0
api/sys/userService.js

@@ -20,6 +20,21 @@ export default {
 		});
 	},
 
+	savePwdByPhone: function (inputForm) {
+		return request({
+			url: prefix + "/sys/user/savePwdByPhone",
+			method: "post",
+			params: inputForm,
+		});
+	},
+
+	is:function() {
+		return request({
+			url: prefix + "/sys/user/isAdmin",
+			method: "get",
+		});
+	},
+
 	queryById: function (id) {
 		return request({
 			url: prefix + "/sys/user/queryById",

+ 3 - 1
common/request.js

@@ -45,7 +45,9 @@ export function request(body){
 		data = null
 
 	}
-	
+
+	header.domain = window.location.origin + 'ydddl';
+
 	let promise = new Promise((resolve,reject)=>{
 		uni.request({
 			url: BASE_URL + url,

+ 124 - 0
components/ba-tree-picker/README.md

@@ -0,0 +1,124 @@
+## 树形层级选择器
+### 简介
+为统一样式而生,树形层级选择器,picker弹窗形式的,样式和比例参照uniapp的picker和uni-data-picker组件
+* 支持单选、多选、父级选择,当然也支持单层选择
+* 支持Object对象属性自定义映射
+* 支持显示全部选中、部分选中、未选中三种状态
+* 支持快速自定义简单样式(分割线、按钮、标题、对齐等),深入样式可复写css
+
+### 使用方法
+在 `script` 中引入组件
+``` javascript
+	import baTreePicker from "@/components/ba-tree-picker/ba-tree-picker.vue"
+	export default {
+		components: {
+			baTreePicker
+		}
+```
+在 `template` 中使用组件
+``` javascript
+	<ba-tree-picker ref="treePicker" :multiple='false' @select-change="selectChange" title="选择城市"
+		:localdata="listData" valueKey="value" textKey="label" childrenKey="children" />
+```
+在 `script` 中定义打开方法,和选择监听
+``` javascript
+		methods: {
+			// 显示选择器
+			showPicker() {
+				this.$refs.treePicker._show();
+			},
+			//监听选择(ids为数组)
+			selectChange(ids, names) {
+				console.log(ids, names)
+			}
+		}
+```
+在 `template` 中调用打开
+``` javascript
+	<view @click="showPicker">调用选择器</view>
+```
+
+### 属性
+|属性名|类型|默认值|说明|
+|:-|:-:|:--:|-:|
+|localdata|Array|[]|源数据,目前支持tree结构,后续会考虑支持扁平化结构|
+|valueKey|String|id|指定 Object 中 key 的值作为节点数据id|
+|textKey|String|name|指定 Object 中 key 的值作为节点显示内容|
+|childrenKey|String|children|指定 Object 中 key 的值作为节点子集|
+|multiple|Boolean|false|是否多选,默认单选|
+|selectParent|Boolean|true|是否可以选父级,默认可以|
+|title|String| |标题|
+|titleColor|String||标题颜色|
+|confirmColor|String|#0055ff|确定按钮颜色|
+|cancelColor|String|#757575|取消按钮颜色|
+|switchColor|String|#666|节点切换图标颜色|
+|border|Boolean|false|是否有分割线,默认无|
+
+
+
+###  数据格式
+
+注意:必须有id、name(id可通过valueKey来配置为其它键值,如value)字段,且唯一
+
+``` json
+[
+    {
+        id: 1,
+        name: '公司1',
+        children: [{
+            id: 11,
+            name: '研发部',
+            children: [{
+                id: 111,
+                name: '张三',
+                
+            },{
+                id: 112,
+                name: '李四',
+                
+            }]
+        },{
+            id: 12,
+            name: '综合部',
+            
+        } ]
+    },
+    {
+        id: 2,
+        name: '公司2',
+        children: [{
+            id: 21,
+            name: '研发部',
+            
+        },{
+            id: 22,
+            name: '综合部',
+            
+        },{
+            id: 23,
+            name: '财务部',
+            
+        }, ]
+    },
+    {
+        id: 3,
+        name: '公司3'
+    },
+    {
+        id: 4,
+        name: '公司4',
+        children: [{
+            id: 41,
+            name: '研发部',
+            
+        }]
+    }
+]
+```
+</details>
+
+### 方法
+|方法名|参数|默认值|说明|
+|:-|:-:|:--:|-:|
+|_show()| | |显示选择器|
+|_hide()| | |隐藏选择器|

+ 627 - 0
components/ba-tree-picker/ba-tree-picker.vue

@@ -0,0 +1,627 @@
+<!-- 树形层级选择器-->
+<!-- 1、支持单选、多选 -->
+<template>
+	<view>
+		<view class="tree-cover" :class="{'show':showDialog}" @tap="_cancel"></view>
+		<view class="tree-dialog" :class="{'show':showDialog}">
+			<view class="tree-bar">
+				<view class="tree-bar-cancel" :style="{'color':cancelColor}" hover-class="hover-c" @tap="_cancel">取消
+				</view>
+				<view class="tree-bar-title" :style="{'color':titleColor}">{{title}}</view>
+				<view class="tree-bar-confirm" :style="{'color':confirmColor}" hover-class="hover-c" @tap="_confirm">
+					{{multiple?'确定':''}}
+				</view>
+			</view>
+			<view class="tree-view">
+				<scroll-view class="tree-list" :scroll-y="true">
+					<block v-for="(item, index) in treeList" :key="index">
+						<view class="tree-item" :style="[{
+							paddingLeft: item.level*30 + 'rpx'
+						}]" :class="{
+							itemBorder: border === true,
+							show: item.isShow
+						}">
+							<view class="item-label">
+								<view class="item-icon uni-inline-item" @tap.stop="_onItemSwitch(item, index)">
+									<view v-if="!item.isLastLevel&&item.isShowChild" class="switch-on"
+										:style="{'border-left-color':switchColor}">
+									</view>
+									<view v-else-if="!item.isLastLevel&&!item.isShowChild" class="switch-off"
+										:style="{'border-top-color':switchColor}">
+									</view>
+									<view v-else class="item-last-dot" :style="{'border-top-color':switchColor}">
+									</view>
+								</view>
+								<view class="uni-flex-item uni-inline-item" @tap.stop="_onItemSelect(item, index)">
+									<view class="item-name"> {{item.name}}</view>
+									<view class="item-check" v-if="item.isLastLevel">
+										<view class="item-check-yes" v-if="item.checkStatus===1"
+											:class="{'radio':!multiple}" :style="{'border-color':confirmColor}">
+											<view class="item-check-yes-part"
+												:style="{'background-color':confirmColor}">
+											</view>
+										</view>
+										<view class="item-check-yes" v-else-if="item.checkStatus===2"
+											:class="{'radio':!multiple}" :style="{'border-color':confirmColor}">
+											<view class="item-check-yes-all" :style="{'background-color':confirmColor}">
+											</view>
+										</view>
+										<view class="item-check-no" v-else :class="{'radio':!multiple}"
+											:style="{'border-color':confirmColor}"></view>
+									</view>
+								</view>
+							</view>
+
+						</view>
+					</block>
+				</scroll-view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		emits: ['select-change'],
+		name: "ba-tree-picker",
+		props: {
+			valueKey: {
+				type: String,
+				default: 'id'
+			},
+			textKey: {
+				type: String,
+				default: 'name'
+			},
+			childrenKey: {
+				type: String,
+				default: 'children'
+			},
+			localdata: {
+				type: Array,
+				default: function() {
+					return []
+				}
+			},
+			localTreeList: { //在已经格式化好的数据
+				type: Array,
+				default: function() {
+					return []
+				}
+			},
+			selectedData: {
+				type: Array,
+				default: function() {
+					return []
+				}
+			},
+			title: {
+				type: String,
+				default: ''
+			},
+			multiple: { // 是否可以多选
+				type: Boolean,
+				default: true
+			},
+			selectParent: { //是否可以选父级
+				type: Boolean,
+				default: true
+			},
+			confirmColor: { // 确定按钮颜色
+				type: String,
+				default: '' // #0055ff
+			},
+			cancelColor: { // 取消按钮颜色
+				type: String,
+				default: '' // #757575
+			},
+			titleColor: { // 标题颜色
+				type: String,
+				default: '' //
+			},
+			switchColor: { // 节点切换图标颜色
+				type: String,
+				default: '' // #666
+			},
+			border: { // 是否有分割线
+				type: Boolean,
+				default: false
+			},
+		},
+		data() {
+			return {
+				showDialog: false,
+				index: '',
+				office: '',
+				treeList: []
+			}
+		},
+		computed: {},
+		methods: {
+			_show(index,office) {
+				this.index = index
+				this.office = office
+				this.showDialog = true
+			},
+			_hide() {
+				this.showDialog = false
+			},
+			_cancel() {
+				this._hide()
+				this.$emit("cancel", '');
+			},
+			_confirm() { //多选
+				let selectedList = []; //如果子集全部选中,只返回父级 id
+				let selectedNames;
+				let currentLevel = -1;
+				this.treeList.forEach((item, index) => {
+					if (currentLevel >= 0 && item.level > currentLevel) {
+
+					} else {
+						if (item.checkStatus === 2) {
+							currentLevel = item.level;
+							selectedList.push(item.id);
+							selectedNames = selectedNames ? selectedNames + ' / ' + item.name : item.name;
+						} else {
+							currentLevel = -1;
+						}
+					}
+				})
+				this._hide()
+				this.$emit("select-change", selectedList, selectedNames, this.index,this.office);
+			},
+			//格式化原数据(原数据为tree结构)
+			_formatTreeData(list = [], level = 0, parentItem, isShowChild = true) {
+				let nextIndex = 0;
+				let parentId = -1;
+				let initCheckStatus = 0;
+				if (parentItem) {
+					nextIndex = this.treeList.findIndex(item => item.id === parentItem.id) + 1;
+					parentId = parentItem.id;
+					if (!this.multiple) { //单选
+						initCheckStatus = 0;
+					} else
+						initCheckStatus = parentItem.checkStatus == 2 ? 2 : 0;
+				}
+				list.forEach(item => {
+					let isLastLevel = true;
+					if (item && item.children) {
+						let children = item.children;
+						if (Array.isArray(children) && children.length > 0) {
+							isLastLevel = false;
+						}
+					}
+
+					let itemT = {
+						id: item.id,
+						name: item.name,
+						level,
+						isLastLevel,
+						isShow: isShowChild,
+						isShowChild: false,
+						checkStatus: initCheckStatus,
+						orCheckStatus: 0,
+						parentId,
+						children: item.children,
+						childCount: item.children ? item.children.length : 0,
+						childCheckCount: 0,
+						childCheckPCount: 0
+					};
+
+					if (this.selectedData.indexOf(itemT.id) >= 0) {
+						itemT.checkStatus = 2;
+						itemT.orCheckStatus = 2;
+						itemT.childCheckCount = itemT.children ? itemT.children.length : 0;
+						this._onItemParentSelect(itemT, nextIndex);
+					}
+
+					this.treeList.splice(nextIndex, 0, itemT);
+					nextIndex++;
+				})
+				// console.log('this.treeList', this.treeList);
+			},
+			// 节点打开、关闭切换
+			_onItemSwitch(item, index) {
+				if (item.isLastLevel === true) {
+					return;
+				}
+				item.isShowChild = !item.isShowChild;
+				if (item.children) {
+					this._formatTreeData(item.children, item.level + 1, item);
+					item.children = undefined;
+				} else {
+					this._onItemChildSwitch(item, index);
+				}
+			},
+			_onItemChildSwitch(item, index) {
+				//console.log('_onItemChildSwitch')
+				const firstChildIndex = index + 1;
+				if (firstChildIndex > 0)
+					for (var i = firstChildIndex; i < this.treeList.length; i++) {
+						let itemChild = this.treeList[i];
+						if (itemChild.level > item.level) {
+							if (item.isShowChild) {
+								if (itemChild.parentId === item.id) {
+									itemChild.isShow = item.isShowChild;
+									if (!itemChild.isShow) {
+										itemChild.isShowChild = false;
+									}
+								}
+							} else {
+								itemChild.isShow = item.isShowChild;
+								itemChild.isShowChild = false;
+							}
+						} else {
+							return;
+						}
+					}
+			},
+			// 节点选中、取消选中
+			_onItemSelect(item, index) {
+				if (item.isLastLevel) {
+					if (!this.multiple) {
+						// 单选逻辑
+						item.checkStatus = item.checkStatus === 0 ? 2 : 0;
+
+						this.treeList.forEach((v, i) => {
+							if (i !== index) {
+								this.treeList[i].checkStatus = 0;
+							} else {
+								this.treeList[i].checkStatus = 2;
+							}
+						});
+
+						let selectedList = [item.id];
+						let selectedNames = item.name;
+						this._hide();
+						this.$emit("select-change", selectedList, selectedNames, this.index, this.office);
+					} else {
+						// 多选逻辑
+						let oldCheckStatus = item.checkStatus;
+						switch (oldCheckStatus) {
+							case 0:
+								item.checkStatus = 2;
+								item.childCheckCount = item.childCount;
+								item.childCheckPCount = 0;
+								break;
+							case 1:
+							case 2:
+								item.checkStatus = 0;
+								item.childCheckCount = 0;
+								item.childCheckPCount = 0;
+								break;
+							default:
+								break;
+						}
+						// 处理子节点选择
+						this._onItemChildSelect(item, index);
+						// 处理父节点选择状态变化
+						this._onItemParentSelect(item, index, oldCheckStatus);
+					}
+				}
+			},
+			_onItemChildSelect(item, index) {
+				//console.log('_onItemChildSelect')
+				let allChildCount = 0;
+				if (item.childCount && item.childCount > 0) {
+					index++;
+					while (index < this.treeList.length && this.treeList[index].level > item.level) {
+						let itemChild = this.treeList[index];
+						itemChild.checkStatus = item.checkStatus;
+						if (itemChild.checkStatus == 2) {
+							itemChild.childCheckCount = itemChild.childCount;
+							itemChild.childCheckPCount = 0;
+						} else if (itemChild.checkStatus == 0) {
+							itemChild.childCheckCount = 0;
+							itemChild.childCheckPCount = 0;
+						}
+						// console.log('>>>>index:', index, 'item:', itemChild.name, '  status:', itemChild
+						// 	.checkStatus)
+						index++;
+					}
+				}
+			},
+			_onItemParentSelect(item, index, oldCheckStatus) {
+				//console.log('_onItemParentSelect')
+				const parentIndex = this.treeList.findIndex(itemP => itemP.id == item.parentId);
+				//console.log('parentIndex:' + parentIndex)
+				if (parentIndex >= 0) {
+					let itemParent = this.treeList[parentIndex];
+					let count = itemParent.childCheckCount;
+					let oldCheckStatusParent = itemParent.checkStatus;
+
+					if (oldCheckStatus == 1) {
+						itemParent.childCheckPCount -= 1;
+					} else if (oldCheckStatus == 2) {
+						itemParent.childCheckCount -= 1;
+					}
+					if (item.checkStatus == 1) {
+						itemParent.childCheckPCount += 1;
+					} else if (item.checkStatus == 2) {
+						itemParent.childCheckCount += 1;
+					}
+
+					if (itemParent.childCheckCount <= 0 && itemParent.childCheckPCount <= 0) {
+						itemParent.childCheckCount = 0;
+						itemParent.childCheckPCount = 0;
+						itemParent.checkStatus = 0;
+					} else if (itemParent.childCheckCount >= itemParent.childCount) {
+						itemParent.childCheckCount = itemParent.childCount;
+						itemParent.childCheckPCount = 0;
+						itemParent.checkStatus = 2;
+					} else {
+						itemParent.checkStatus = 1;
+					}
+					//console.log('itemParent:', itemParent)
+					this._onItemParentSelect(itemParent, parentIndex, oldCheckStatusParent);
+				}
+			},
+			// 重置数据
+			_reTreeList() {
+				this.treeList.forEach((v, i) => {
+					this.treeList[i].checkStatus = v.orCheckStatus
+				})
+			},
+			_initTree() {
+				this.treeList = [];
+				this._formatTreeData(this.localdata);
+			}
+		},
+		watch: {
+			localdata() {
+				this._initTree();
+			},
+			localTreeList() {
+				this.treeList = this.localTreeList;
+			}
+		},
+		mounted() {
+			this._initTree();
+		}
+	}
+</script>
+
+<style scoped>
+
+	.uni-flex-item {
+		display: flex; /* 使用 Flex 布局 */
+		align-items: center; /* 垂直居中 */
+	}
+
+	.tree-cover {
+		position: fixed;
+		top: 0rpx;
+		right: 0rpx;
+		bottom: 0rpx;
+		left: 0rpx;
+		z-index: 100;
+		background-color: rgba(0, 0, 0, .4);
+		opacity: 0;
+		transition: all 0.3s ease;
+		visibility: hidden;
+	}
+
+	.tree-cover.show {
+		visibility: visible;
+		opacity: 1;
+	}
+
+	.tree-dialog {
+		position: fixed;
+		top: 0rpx;
+		right: 0rpx;
+		bottom: 0rpx;
+		left: 0rpx;
+		background-color: #fff;
+		border-top-left-radius: 10px;
+		border-top-right-radius: 10px;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		z-index: 102;
+		top: 20%;
+		transition: all 0.3s ease;
+		transform: translateY(100%);
+	}
+
+	.tree-dialog.show {
+		transform: translateY(0);
+	}
+
+	.tree-bar {
+		/* background-color: #fff; */
+		height: 90rpx;
+		padding-left: 25rpx;
+		padding-right: 25rpx;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		box-sizing: border-box;
+		border-bottom-width: 1rpx !important;
+		border-bottom-style: solid;
+		border-bottom-color: #f5f5f5;
+		font-size: 32rpx;
+		color: #757575;
+		line-height: 1;
+	}
+
+	.tree-bar-confirm {
+		color: #0055ff;
+		padding: 15rpx;
+	}
+
+	.tree-bar-title {}
+
+	.tree-bar-cancel {
+		color: #757575;
+		padding: 15rpx;
+	}
+
+	.tree-view {
+		flex: 1;
+		padding: 20rpx;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		overflow: hidden;
+		height: 100%;
+	}
+
+	.tree-list {
+		flex: 1;
+		height: 100%;
+		overflow: hidden;
+	}
+
+	.tree-item {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		line-height: 1;
+		height: 0;
+		opacity: 0;
+		transition: 0.2s;
+		overflow: hidden;
+	}
+
+	.tree-item.show {
+		height: 90rpx;
+		opacity: 1;
+	}
+
+	.tree-item.showchild:before {
+		transform: rotate(90deg);
+	}
+
+	.tree-item.last:before {
+		opacity: 0;
+	}
+
+	.switch-on {
+		width: 0;
+		height: 0;
+		border-left: 10rpx solid transparent;
+		border-right: 10rpx solid transparent;
+		border-top: 15rpx solid #666;
+	}
+
+	.switch-off {
+		width: 0;
+		height: 0;
+		border-bottom: 10rpx solid transparent;
+		border-top: 10rpx solid transparent;
+		border-left: 15rpx solid #666;
+	}
+
+	.item-last-dot {
+		position: absolute;
+		width: 10rpx;
+		height: 10rpx;
+		border-radius: 100%;
+		background: #666;
+		display: none;
+	}
+
+	.item-icon {
+		width: 26rpx;
+		height: 26rpx;
+		margin-right: 8rpx;
+		padding-right: 20rpx;
+		padding-left: 20rpx;
+	}
+
+	.item-label {
+		flex: 1;
+		display: flex;
+		align-items: center;
+		height: auto;
+		line-height: 1.4;
+	}
+
+	.item-name {
+		flex: 1;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		width: 450rpx;
+	}
+
+	.item-check {
+		margin-right: 8px; /* 适当的左边距 */
+		order: -1;
+		/*width: 40px;*/
+		/*height: 40px;*/
+		/*display: flex;*/
+		/*justify-content: center;*/
+		/*align-items: center;*/
+	}
+
+	.item-check-yes,
+	.item-check-no {
+		width: 20px;
+		height: 20px;
+		border-top-left-radius: 20%;
+		border-top-right-radius: 20%;
+		border-bottom-right-radius: 20%;
+		border-bottom-left-radius: 20%;
+		border-top-width: 1rpx;
+		border-left-width: 1rpx;
+		border-bottom-width: 1rpx;
+		border-right-width: 1rpx;
+		border-style: solid;
+		border-color: #0055ff;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		box-sizing: border-box;
+	}
+
+	.item-check-yes-part {
+		width: 12px;
+		height: 12px;
+		border-top-left-radius: 20%;
+		border-top-right-radius: 20%;
+		border-bottom-right-radius: 20%;
+		border-bottom-left-radius: 20%;
+		background-color: #0055ff;
+	}
+
+	.item-check-yes-all {
+		margin-bottom: 5px;
+		border: 2px solid #007aff;
+		border-left: 0;
+		border-top: 0;
+		height: 12px;
+		width: 6px;
+		transform-origin: center;
+		/* #ifndef APP-NVUE */
+		transition: all 0.3s;
+		/* #endif */
+		transform: rotate(45deg);
+	}
+
+	.item-check .radio {
+		border-top-left-radius: 50%;
+		border-top-right-radius: 50%;
+		border-bottom-right-radius: 50%;
+		border-bottom-left-radius: 50%;
+	}
+
+	.item-check .radio .item-check-yes-b {
+		border-top-left-radius: 50%;
+		border-top-right-radius: 50%;
+		border-bottom-right-radius: 50%;
+		border-bottom-left-radius: 50%;
+	}
+
+	.hover-c {
+		opacity: 0.6;
+	}
+
+	.itemBorder {
+		border-bottom: 1px solid #e5e5e5;
+	}
+
+</style>

+ 3 - 0
main.js

@@ -13,6 +13,8 @@ import '@/common/filter'
 import uView from '@/uni_modules/uview-ui'
 import mixin from './common/mixin'
 
+import ElementUI from 'element-ui'
+import 'element-ui/lib/theme-chalk/index.css'
 
 Vue.component('cu-custom',cuCustom)
 Vue.config.productionTip = false
@@ -32,6 +34,7 @@ Vue.component('ly-tree', LyTree)
 
 App.mpType = 'app'
 Vue.use(uView)
+Vue.use(ElementUI)
 
 // #ifdef MP
 // 引入uView对小程序分享的mixin封装

+ 8 - 2
package.json

@@ -4,14 +4,20 @@
   "description": "<p style=\"text-align: center;\"><img src=\"https://image.weilanwl.com/uni/UniAppReadme.jpg\" alt=\"ColorUI简介\"></img></p>",
   "main": "main.js",
   "dependencies": {
+    "ali-oss": "^6.18.1",
+    "element-ui": "^2.15.14",
     "lodash": "^4.17.20",
     "lodash.pick": "^4.4.0",
     "moment": "^2.27.0",
     "prettier": "^1.12.1",
     "qs": "^6.9.4",
-    "uview-ui": "^2.0.36"
+    "uview-ui": "^2.0.36",
+    "vxe-table": "^4.5.12"
+  },
+  "devDependencies": {
+    "browserslist": "^4.21.11",
+    "caniuse-lite": "^1.0.30001539"
   },
-  "devDependencies": {},
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1"
   },

+ 20 - 3
pages.json

@@ -2,13 +2,13 @@
 	"pages": [
 		//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 		{
-			"path": "pages/index/index",
+			"path": "pages/login/login",
 			"style": {
 				"navigationStyle": "custom" // 隐藏系统导航栏
 			}
 		},
 		{
-			"path": "pages/login/login",
+			"path": "pages/index/index",
 			"style": {
 				"navigationStyle": "custom" // 隐藏系统导航栏
 			}
@@ -96,7 +96,24 @@
             "style" : {
 				"navigationBarTitleText": "我发起的"
 			}
-        }
+        },
+		{
+			"path" : "pages/materialManagement/collect/UserPullForm",
+			"style" : {
+				"navigationBarTitleText": "领用人"
+			}
+		},
+		{
+			"path" : "pages/calendar/MyCalendar",
+			"style" : {
+				"navigationBarTitleText": "我的日程"
+			}
+		},{
+			"path" : "pages/calendar/MyCalendarForm",
+			"style" : {
+				"navigationBarTitleText": "日程内容"
+			}
+		}
         ,{
             "path" : "pages/workbench/task/TodoList",
             "style" : {

+ 20 - 0
pages/addressbook/addressbook.vue

@@ -25,6 +25,10 @@
 							<u-avatar shape="square" size="35" icon="account-fill" fontSize="26" randomBgColor></u-avatar>
 							<!-- <view class="cu-avatar round " :style="'background-image:url('+(user.photo?user.photo:'/h5/static/user/flat-avatar.png')+');'"></view> -->
 							<text class="list__item__user-name">{{user.name}}</text>
+							<!-- 部门名称 -->
+							<text class="list__item__additional-info">{{ user.officeDTO.name }}</text>
+							<!-- 电话号码信息 -->
+							<text class="list__item__phone-number">{{ user.mobile }}</text>
 						</view>
 						<u-line></u-line>
 					</view>
@@ -126,4 +130,20 @@
 			margin: 15px 0;
 		}
 	}
+
+	.list__item__additional-info {
+		position: relative;
+		top: 10px; /* Adjust as needed */
+		left: 15px; /* Adjust as needed */
+		font-size: 12px; /* Adjust the font size as needed */
+		color: #999; /* Adjust the color as needed */
+	}
+
+	.list__item__phone-number {
+		position: relative;
+		top: 10px; /* Adjust as needed */
+		margin-left: 20px; /* 根据需要调整间距 */
+		font-size: 12px; /* 根据需要调整字体大小 */
+		color: #999; /* 根据需要调整颜色 */
+	}
 </style>

+ 12 - 4
pages/apps/apps.vue

@@ -5,7 +5,15 @@
 		</cu-custom>
 		<scroll-view scroll-y class="page my-app">
 			<view class="grid col-2 padding-sm">
-				<view class="padding-sm">
+				<view >
+					<navigator hover-class="none" url="/pages/calendar/MyCalendar" >
+						<view class="padding radius text-center shadow-blur bg-white">
+							<text class="lg font-size-35 text-blue cuIcon-calendar"></text>
+							<view class="margin-top-sm text-Abc">我的日程</view>
+						</view>
+					</navigator>
+				</view>
+				<!--<view class="padding-sm">
 					<navigator hover-class="none" url="/pages/apps/notification/notification" >
 						<view class="padding radius text-center shadow-blur bg-blue">
 							<view class="cuIcon-notice text-white circle-button font-size-35"></view>
@@ -20,9 +28,9 @@
 							<view class="margin-top-sm text-Abc">站内信</view>
 						</view>
 					</navigator>
-				</view>
+				</view>-->
 			</view>
-			<view class="grid col-3 padding-sm" style="margin-top: -7px;">
+			<!--<view class="grid col-3 padding-sm" style="margin-top: -7px;">
 				<view class="padding-sm">
 					<navigator hover-class="none" url="/pages/example/components" >
 						<view class="padding radius text-center shadow-blur bg-white">
@@ -88,7 +96,7 @@
 					</navigator>
 				</view>
 
-			</view>
+			</view>-->
 			<u-gap height="80" bgColor="#fff"></u-gap>
 		</scroll-view>
 

+ 57 - 0
pages/apps/notification/notificationDetail.vue

@@ -14,10 +14,19 @@
 		<view class="padding bg-white">
 			<u-parse :content="notication.content"></u-parse>
 		</view>
+		<u-cell-group :border="false">
+			<u-cell :border="false">
+				<u--text slot="title" :text="`附件`"></u--text>
+			</u-cell>
+			<u-cell v-for="(file, index) in fileArray" :key="index" :border="false">
+				<u--text slot="title" type="info" :text="getFileName(file)" @click="downloadFile(file)"></u--text>
+			</u-cell>
+		</u-cell-group>
 	</view>
 </template>
 
 <script>
+	import fileService from "@/api/file/fileService"
 	import notifyService from "@/api/notify/notifyService";
 	export default {
 		data() {
@@ -31,10 +40,58 @@
 				}
 			}
 		},
+		computed: {
+			fileArray() {
+				// 拆分字符串,以逗号为分隔符
+				return this.notication.files.split(',');
+			}
+		},
 		onLoad (option) {
 			notifyService.query({isSelf:true, id:option.id}).then((data)=>{
 				this.notication = data
 			});
+		},
+		methods: {
+			getFileName(file) {
+				// 通过字符串处理方法提取出文件名部分
+				const nameIndex = file.indexOf('name=');
+				if (nameIndex !== -1) {
+					return decodeURIComponent(file.slice(nameIndex + 5)); // +5 是为了跳过 'name=' 部分
+				}
+				return file;
+			},
+			downloadFile(file) {
+				if (file) {
+
+					const paramsString = file.split('?')[1];
+					const paramsArray = paramsString.split('&');
+
+					let uploadPath = '';
+					let name = '';
+
+					// 遍历参数数组并提取参数值
+					paramsArray.forEach(param => {
+						const [key, value] = param.split('=');
+						if (key === 'uploadPath') {
+							uploadPath = value;
+						} else if (key === 'name') {
+							name = value;
+						}
+					});
+
+					// 使用 uni.downloadFile 下载文件
+					fileService.downloadUrl({
+						uploadPath: uploadPath,
+						name: name,
+					}).then((data) => {
+						// console.log('data', data)
+						// window.open(data, '_blank'); // 在新标签页或新窗口打开文件
+						// 在新窗口打开下载链接
+						window.location.href = data;
+					})
+
+				}
+			}
 		}
 	}
 </script>

+ 103 - 0
pages/calendar/MyCalendar.vue

@@ -0,0 +1,103 @@
+<template>
+	<view class="page">
+		<cu-custom :backUrl="'/pages/index/index'" :isBack="true" bgColor="bg-gradual-blue" >
+			<block slot="content">我的日程</block>
+		</cu-custom>
+		<el-calendar class="page">
+			<template v-slot:dateCell="{ data }">
+				<view
+						@click.stop="selectHandler(data)"
+						class="cell"
+						:class="{ 'is-selected': data.isSelected }"
+				>
+					{{ data.day.split("-").slice(1).join("-") }} <br /><br />
+<!--					<div v-for="(event, index) in calendarEvents" :key="index" style="text-align: center;margin-top: -15px; overflow: hidden; white-space: nowrap;">-->
+<!--						<el-tag-->
+<!--								style="text-overflow: ellipsis; overflow: hidden; white-space: nowrap;"-->
+<!--								@click.stop="handleEventClick(event)"-->
+<!--								v-if="data.day === event.startDate.substring(0, 10)"-->
+<!--						>-->
+<!--							{{ event.title }}-->
+<!--						</el-tag>-->
+<!--					</div>-->
+					<div style="text-align: center; margin-top: -15px;overflow: hidden; white-space: nowrap;">
+						<el-tag
+								v-for="(event, index) in calendarEvents"
+								:key="index"
+								:style="{ 'text-overflow': 'ellipsis', 'overflow': 'hidden', 'white-space': 'nowrap' }"
+								@click.stop="handleEventClick(event)"
+								v-if="data.day === event.startDate.substring(0, 10)"
+						>
+							{{ event.title }}
+						</el-tag>
+					</div>
+				</view>
+			</template>
+		</el-calendar>
+	</view>
+</template>
+<script>
+import myCalendarService from "@/api/calendar/myCalendarService";
+export default {
+	data() {
+		return {
+			showForm: false,
+			calendarDates: [], // 你的日期数据
+			startDate: new Date(),
+			endDate: new Date(),
+			calendarEvents: [],
+		};
+	},
+	components: {
+	},
+	activated() {
+		this.refreshList();
+	},
+	methods: {
+		// 选择月份
+		selectHandler(data) {
+			this.startDate = data.day;
+			this.endDate = data.day;
+			// 使用 $nextTick 确保组件已经准备好
+			// this.$nextTick(() => {
+			// 	this.$refs.myCalendarForm.init(
+			// 			"add",
+			// 			"",
+			// 			this.startDate,
+			// 			this.endDate
+			// 	);
+			// });
+			uni.navigateTo({
+				url: '/pages/calendar/MyCalendarForm?method=' + 'add' + '&startDate=' + this.startDate + '&endDate=' + this.endDate // DialogPage 对应的页面路径
+			});
+		},
+		handleEventClick(info) {
+			uni.navigateTo({
+				url: '/pages/calendar/MyCalendarForm?id=' + info.id + '&method=' + 'edit' // DialogPage 对应的页面路径
+			});
+		},
+		refreshList() {
+			myCalendarService.list().then((data) => {
+				this.calendarEvents = data;
+			});
+		},
+		formatStartDate(date) {
+			const formattedDate = new Date(date);
+			const year = formattedDate.getFullYear();
+			const month = String(formattedDate.getMonth() + 1).padStart(2, '0');
+			const day = String(formattedDate.getDate()).padStart(2, '0');
+			const hours = String(formattedDate.getHours()).padStart(2, '0');
+			const minutes = String(formattedDate.getMinutes()).padStart(2, '0');
+			const seconds = String(formattedDate.getSeconds()).padStart(2, '0');
+
+			return `${year}-${month}-${day}`;
+		},
+
+	},
+};
+</script>
+<style>
+.is-selected {
+	color: #1989fa;
+}
+</style>

+ 151 - 0
pages/calendar/MyCalendarForm.vue

@@ -0,0 +1,151 @@
+<template>
+	<view>
+		<cu-custom :backUrl="'/pages/calendar/MyCalendar'" :isBack="true" bgColor="bg-gradual-blue" >
+			<block slot="content">日程内容</block>
+		</cu-custom>
+		<u--form :model="inputForm" labelWidth="100px" class="u-form" labelPosition="left" :rules="rules" ref="inputForm">
+			<u-form-item label="日程内容" borderBottom prop="title" :required="true">
+				<u--textarea v-model="inputForm.title" placeholder="请输入日程内容" border="none" style="border: 1px solid #ccc;"></u--textarea>
+			</u-form-item>
+			<u-form-item style="margin-top: 20px; text-align: center;" v-if="this.method === 'edit'">
+				<el-button type="danger" @click="del" style="width: 100%;">
+					<span style="margin: 0 auto;">删除</span>
+				</el-button>
+			</u-form-item>
+			<u-form-item style="margin-top: 20px; text-align: center;">
+				<el-button type="primary" @click="saveForm" style="width: 100%;">
+					<span style="margin: 0 auto;">提交</span>
+				</el-button>
+			</u-form-item>
+		</u--form>
+	</view>
+</template>
+
+<script>
+	import myCalendarService from "@/api/calendar/myCalendarService";
+	import {mapState, mapMutations, mapActions} from 'vuex'
+	export default {
+		data() {
+			return {
+				title: "",
+				method: "",
+				visible: false,
+				loading: false,
+				inputForm: {
+					id: "",
+					title: "",
+					startDate: "",
+					endDate: "",
+					userId: '',
+				},
+				rules: {
+					'title': [
+						{
+							required: true,
+							message: '日程内容不能为空',
+							trigger: ['blur', 'change']
+						}],
+				}
+			};
+		},
+		computed: mapState({
+			userInfo: (state) => state.user.userInfo,
+			avatar: (state) => state.user.avatar
+		}),
+		onLoad(options) {
+			// 从 URL 参数中获取传递过来的index
+			this.method = options.method;
+			this.inputForm.id = options.id;
+			this.inputForm.startDate = options.startDate;
+			this.inputForm.endDate = options.endDate;
+			this.init(this.method,this.inputForm.id,this.inputForm.startDate,this.inputForm.endDate)
+		},
+		methods: {
+			init(method, id, startDate, endDate) {
+				this.method = method;
+				this.inputForm.id = id;
+				if (method === "add") {
+					this.title = `新建日程`;
+				} else if (method === "edit") {
+					this.title = "修改日程";
+				} else if (method === "view") {
+					this.title = "查看日程";
+				}
+				this.visible = true;
+				this.loading = false;
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields();
+					if (method === "edit" || method === "view") {
+						// 修改或者查看
+						this.loading = true;
+						myCalendarService
+								.queryById(this.inputForm.id)
+								.then((data) => {
+									this.inputForm = this.recover(this.inputForm, data);
+									this.loading = false;
+								});
+					} else {
+						this.inputForm.startDate = this.formatStartDate(startDate)
+						this.inputForm.endDate = this.formatStartDate(endDate)
+					}
+				});
+			},
+			del() {
+				uni.showLoading()
+				myCalendarService
+						.delete(this.inputForm.id)
+						.then((data) => {
+							// 接口调用成功,隐藏加载动画
+							uni.hideLoading();
+							uni.showToast({
+								title: data,
+								icon: "none",
+								duration:2000
+							})
+							uni.navigateTo({
+								url: '/pages/calendar/MyCalendar' // DialogPage 对应的页面路径
+							});
+						})
+						.catch(() => {
+							this.loading = false;
+						});
+			},
+			// 表单提交
+			saveForm() {
+				this.inputForm.userId = this.userInfo.id
+				this.$refs.inputForm.validate().then(res => {
+					uni.showLoading()
+					myCalendarService
+							.save(this.inputForm)
+							.then((data) => {
+								// 接口调用成功,隐藏加载动画
+								uni.hideLoading();
+								uni.showToast({
+									title: data,
+									icon: "none",
+									duration:2000
+								})
+								uni.navigateTo({
+									url: '/pages/calendar/MyCalendar' // DialogPage 对应的页面路径
+								});
+							})
+							.catch(() => {
+								this.loading = false;
+							});
+				}).catch((e)=>{
+				})
+			},
+			formatStartDate(date) {
+				const formattedDate = new Date(date);
+				const year = formattedDate.getFullYear();
+				const month = String(formattedDate.getMonth() + 1).padStart(2, '0');
+				const day = String(formattedDate.getDate()).padStart(2, '0');
+				const hours = String(formattedDate.getHours()).padStart(2, '0');
+				const minutes = String(formattedDate.getMinutes()).padStart(2, '0');
+				const seconds = String(formattedDate.getSeconds()).padStart(2, '0');
+
+				return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+			},
+		},
+	};
+</script>

+ 21 - 2
pages/index/index.vue

@@ -15,7 +15,7 @@
 			<view class="action" @click="NavChange" data-cur="message">
 				<view :class="PageCur=='message'?'text-blue':'text-gray'">
 					<text class="lg" :class="PageCur=='message'?'cuIcon-messagefill':'cuIcon-message'">
-						<text class='cu-tag badge'>0</text>
+						<text class='cu-tag badge'> {{messageCount}}</text>
 					</text>
 					<text>消息</text>
 				</view>
@@ -44,6 +44,7 @@
 </template>
 
 <script>
+	import notifyService from "@/api/notify/notifyService";
 	import addressbook from '@/pages/addressbook/addressbook.vue'
 	import person from '@/pages/user/person/person.vue'
 	import message from '@/pages/message/message.vue'
@@ -59,13 +60,31 @@
 		},
 		data() {
 			return {
-				PageCur: 'workbench'
+				PageCur: 'workbench',
+				messageCount: 0 // 初始化消息数量为 0
 			}
 		},
 		methods: {
 			NavChange: function(e) {
 				this.PageCur = e.currentTarget.dataset.cur
+			},
+			fetchMessageCount() {
+				notifyService.list({
+					current: 0,
+					size: -1,
+					isSelf: true,
+					orders: [{ column: "a.create_time", asc: false }],
+				}).then((data)=>{
+					console.log('data', data.records.length)
+					this.messageCount = data.records.length; // 更新消息数量
+				}).catch((error) => {
+					console.error('获取消息数量失败:', error);
+				});
 			}
+		},
+		created() {
+			// 在组件被创建后立即调用 fetchMessageCount 方法
+			this.fetchMessageCount();
 		}
 	}
 </script>

+ 644 - 0
pages/jy/holiday/HolidayForm.vue

@@ -0,0 +1,644 @@
+<template>
+	<view>
+		<cu-custom :backUrl="'/pages/index/index'" :isBack="true" bgColor="bg-gradual-blue" >
+			<block slot="content">请假申请</block>
+		</cu-custom>
+		<u--form :model="inputForm" labelWidth="100px" class="u-form" labelPosition="left" :rules="rules" ref="inputForm" v-if="!nodeFlag">
+			<u-form-item label="请假人" borderBottom prop="createName">
+				<u--input placeholder='请填写请假人'  v-model="inputForm.createName" disabled></u--input>
+			</u-form-item>
+			<u-form-item label="请假部门" borderBottom prop="officeName">
+				<u--input placeholder='请填写请假部门'  v-model="inputForm.officeName" disabled></u--input>
+			</u-form-item>
+			<u-form-item label="请假类型" borderBottom prop="type" >
+				<jp-picker v-model="inputForm.type" rangeKey="label" rangeValue="value" :range="[
+						        { label: '年假', value: '1' },
+						        { label: '事假', value: '2' },
+						        { label: '病假', value: '3' },
+						        { label: '调休假', value: '4' },
+						        { label: '婚假', value: '5' },
+						        { label: '产假', value: '6' },
+						        { label: '陪产假', value: '7' },
+						        { label: '其他', value: '8' },
+						    ]"></jp-picker>
+			</u-form-item>
+			<u-form-item label="开始时间" borderBottom prop="startDay" :required="true">
+				<el-date-picker
+						v-model="inputForm.startDay"
+						type="date"
+						placeholder="请选择开始时间"
+						style="width:100%"
+						size="default"
+						placement="bottom-start"
+						@change="checkTime"
+						clearable>
+				</el-date-picker>
+				<el-select v-model="inputForm.beginTime" style="width: 50%" placeholder="请选择开始时间" @change="checkTime">
+					<el-option value="上午" label="上午"></el-option>
+					<el-option value="下午" label="下午"></el-option>
+				</el-select>
+			</u-form-item>
+			<u-form-item label="结束时间" borderBottom prop="endDay" :required="true">
+				<el-date-picker
+						v-model="inputForm.endDay"
+						type="date"
+						placeholder="请选择日期"
+						style="width:100%"
+						size="default"
+						placement="bottom-start"
+						@change="checkTime"
+						clearable>
+				</el-date-picker>
+				<el-select v-model="inputForm.endTime" style="width: 50%" placeholder="请选择结束时间" @change="checkTime">
+					<el-option value="上午" label="上午"></el-option>
+					<el-option value="下午" label="下午"></el-option>
+				</el-select>
+			</u-form-item>
+			<u-form-item label="请假天数" borderBottom prop="days" :required="true">
+				<u--input placeholder='请填写请假天数'  v-model="inputForm.days" disabled></u--input>
+			</u-form-item>
+			<u-form-item label="请假原因" borderBottom prop="reason">
+				<u--textarea  placeholder='请输入请假原因' :rows="5" :maxlength="500" v-model="inputForm.reason" ></u--textarea>
+			</u-form-item>
+
+			<u-form-item label="附件">
+				<el-upload
+						class="upload-demo"
+						:action="`http://localhost:2800/api/public-modules-server/oss/file/webUpload/upload`"
+						:on-remove="(file, fileList) => handleRemove(file, fileList, '','')"
+						:file-list="inputForm.files"
+						:on-success="(response, file, fileList) => handleUploadSuccess(response, file, fileList,'','')"
+						:limit="3">
+					<el-button size="small" type="primary">点击上传</el-button>
+					<div slot="tip" class="el-upload__tip">只能上传不超过 3 个文件</div>
+				</el-upload>
+			</u-form-item>
+		</u--form>
+		<u--form :model="inputForm" labelWidth="100px" class="u-form" labelPosition="left" :rules="rules" ref="inputForm" v-else-if="nodeFlag">
+			<u-form-item label="请假人" borderBottom prop="createName">
+				<u--input placeholder='请填写请假人'  v-model="inputForm.createName" disabled></u--input>
+			</u-form-item>
+			<u-form-item label="请假部门" borderBottom prop="officeName">
+				<u--input placeholder='请填写请假部门'  v-model="inputForm.officeName" disabled></u--input>
+			</u-form-item>
+			<u-form-item label="请假类型" borderBottom prop="type" >
+				<jp-picker v-model="inputForm.type" rangeKey="label" rangeValue="value" disabled :range="[
+						        { label: '年假', value: '1' },
+						        { label: '事假', value: '2' },
+						        { label: '病假', value: '3' },
+						        { label: '调休假', value: '4' },
+						        { label: '婚假', value: '5' },
+						        { label: '产假', value: '6' },
+						        { label: '陪产假', value: '7' },
+						        { label: '其他', value: '8' },
+						    ]"></jp-picker>
+			</u-form-item>
+			<u-form-item label="开始时间" borderBottom prop="startDay" :required="true">
+				<el-date-picker
+						v-model="inputForm.startDay"
+						type="date"
+						placeholder="请选择开始时间"
+						style="width:100%"
+						size="default"
+						placement="bottom-start"
+						@change="checkTime"
+						:disabled="true"
+						clearable>
+				</el-date-picker>
+				<el-select v-model="inputForm.beginTime" style="width: 50%" disabled placeholder="请选择开始时间" @change="checkTime">
+					<el-option value="上午" label="上午"></el-option>
+					<el-option value="下午" label="下午"></el-option>
+				</el-select>
+			</u-form-item>
+			<u-form-item label="结束时间" borderBottom prop="endDay" :required="true">
+				<el-date-picker
+						:disabled="true"
+						v-model="inputForm.endDay"
+						type="date"
+						placeholder="请选择日期"
+						style="width:100%"
+						size="default"
+						placement="bottom-start"
+						@change="checkTime"
+						clearable>
+				</el-date-picker>
+				<el-select v-model="inputForm.endTime" style="width: 50%" disabled placeholder="请选择结束时间" @change="checkTime">
+					<el-option value="上午" label="上午"></el-option>
+					<el-option value="下午" label="下午"></el-option>
+				</el-select>
+			</u-form-item>
+			<u-form-item label="请假天数" borderBottom prop="days" :required="true">
+				<u--input placeholder='请填写请假天数'  v-model="inputForm.days" disabled></u--input>
+			</u-form-item>
+			<u-form-item label="请假原因" borderBottom prop="reason">
+				<u--textarea  placeholder='请输入请假原因' :rows="5" :maxlength="500" v-model="inputForm.reason" disabled></u--textarea>
+			</u-form-item>
+
+			<u-form-item label="附件">
+				<el-upload
+						:disabled="true"
+						class="upload-demo"
+						:action="`http://localhost:2800/api/public-modules-server/oss/file/webUpload/upload`"
+						:on-remove="(file, fileList) => handleRemove(file, fileList, '','')"
+						:file-list="inputForm.files"
+						:on-success="(response, file, fileList) => handleUploadSuccess(response, file, fileList,'','')"
+						:limit="3">
+					<el-button size="small" :disabled="true" type="primary">点击上传</el-button>
+					<div slot="tip" class="el-upload__tip">只能上传不超过 3 个文件</div>
+				</el-upload>
+			</u-form-item>
+		</u--form>
+	</view>
+</template>
+
+<script>
+	import holidayService from '@/api/jy/HolidayService'
+	import CommonApi from '@/api/common/CommonApi'
+	import {mapState, mapMutations, mapActions} from 'vuex'
+	export default {
+		components: {
+		},
+		computed: mapState({
+			userInfo: (state) => state.user.userInfo,
+			avatar: (state) => state.user.avatar
+		}),
+		data () {
+			return {
+				nodeFlag: false,
+				loading: false,
+				listData: [],
+				fileList3: [],
+				goodsListData: [],
+				materialList: [],
+				searchForm: {
+					wareHouseType: '',
+				},
+				inputForm: {
+					createName:'',
+					officeName:'',
+					id: '',
+					startDay:"",
+					beginTime:'',
+					reason: '',
+					endDay:"",
+					endTime:'',
+					type:'',
+					files: [], // 附件信息
+					procInsId: '',
+					days:'',
+				},
+				rules: {
+					'type': [
+						{
+							required: true,
+							message: '请假类型不能为空',
+							trigger: ['blur', 'change']
+						}
+					],
+					'startDay': [
+						{
+							required: true,
+							message: '开始时间不能为空',
+							trigger: ['blur', 'change']
+						}
+					],
+					'endDay': [
+						{
+							required: true,
+							message: '结束时间不能为空',
+							trigger: ['blur', 'change']
+						}
+					]
+				}
+			}
+		},
+		commonApi: null,
+		// 页面加载时执行
+		created() {
+			this.commonApi = new CommonApi()
+			this.inputForm.createName = this.userInfo.name
+			this.inputForm.officeName = this.userInfo.officeDTO.name
+		},
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			}
+		},
+		watch: {
+			'businessId': {
+				handler (newVal) {
+					if (this.businessId) {
+						this.init(this.businessId)
+					} else {
+						this.$nextTick(() => {
+							// this.$refs.inputForm.reset()
+						})
+					}
+				},
+				immediate: true,
+				deep: false
+			}
+		},
+		methods: {
+			init (id) {
+				this.nodeFlag = true
+				this.inputForm.id = id
+				if (id) {
+					holidayService.queryById(id).then((data) => {
+
+						this.commonApi.getTaskNameByProcInsId(data.procInsId).then((data) => {
+							if (this.isNotEmpty(data)) {
+								if (data === '调整重新发起' || this.isEmpty(data)) {
+									this.nodeFlag = false
+								} else {
+									this.nodeFlag = true
+								}
+							}
+						})
+						this.inputForm = this.recover(this.inputForm, data)
+
+					})
+				}
+			},
+			formatDate(date) {
+				const dateNew = new Date(date); // 将日期字符串转换为 Date 对象
+				const year = dateNew.getFullYear();
+				const month = (dateNew.getMonth() + 1).toString().padStart(2, '0');
+				const day = dateNew.getDate().toString().padStart(2, '0');
+				return `${year}-${month}-${day}`;
+			},
+			isEmpty(value) {
+				let result = false;
+				if (value == null || value == undefined) {
+					result = true;
+				}
+				if (typeof value == 'string' && (value.replace(/\s+/g, "") == "" || value == "")) {
+					result = true;
+				}
+				if (typeof value == "object" && value instanceof Array && value.length === 0) {
+					result = true;
+				}
+				return result;
+			},
+			isNotEmpty (value) {
+				return !this.isEmpty(value)
+			},
+			/**
+			 * 判断是否为空
+			 */
+			isNull(val) {
+				if (val instanceof Array) {
+					if (val.length === 0) return true;
+				} else if (val instanceof Object) {
+					if (JSON.stringify(val) === "{}") return true;
+				} else {
+					if (
+							val === "null" ||
+							val == null ||
+							val === "undefined" ||
+							val === undefined ||
+							val === ""
+					)
+						return true;
+					return false;
+				}
+				return false;
+			},
+			formatDateNew(date) {
+				const year = date.getFullYear();
+				const month = (date.getMonth() + 1).toString().padStart(2, '0');
+				const day = date.getDate().toString().padStart(2, '0');
+				const hours = date.getHours().toString().padStart(2, '0');
+				const minutes = date.getMinutes().toString().padStart(2, '0');
+				const seconds = date.getSeconds().toString().padStart(2, '0');
+
+				return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+			},
+			handleUploadSuccess (res, file, fileList, index, type) {
+
+				// 将 fileList 转换为你期望的格式
+				const formattedFiles = fileList.map(fileItem => {
+					return {
+						name: fileItem.name,
+						size: fileItem.size,
+						url: '/' + fileItem.response.url,
+						createBy: this.userInfo,
+						by: this.userInfo.id,
+						createTime: this.formatDateNew(new Date())
+					};
+				});
+				this.inputForm.files = formattedFiles
+
+				// 强制更新视图
+				this.$forceUpdate();
+			},
+			handleRemove(file, fileList, index, type) {
+				// 处理移除文件逻辑
+				// file 是移除的文件
+				// fileList 是当前文件列表
+				const formattedFiles = fileList.map(fileItem => {
+					return {
+						name: fileItem.name,
+						size: fileItem.size,
+						url: '/' + fileItem.response.url,
+						createBy: this.userInfo,
+						by: this.userInfo.id,
+						createTime: this.formatDateNew(new Date())
+					};
+				});
+				this.inputForm.files = formattedFiles
+
+
+				// 如果你想要更新文件列表,可以在这里更新 inputForm.fileInfoLost
+				// this.inputForm.fileInfoLost = fileList;
+			},
+			saveForm(callback) {
+				// 所有验证通过,执行保存操作
+
+				if (this.isNotEmpty(this.inputForm.startDay)) {
+					this.inputForm.startDay = this.formatDate(this.inputForm.startDay);
+				}
+				if (this.isNotEmpty(this.inputForm.endDay)) {
+					this.inputForm.endDay = this.formatDate(this.inputForm.endDay);
+				}
+
+				return new Promise((resolve, reject) => {
+
+					let errors = [];
+
+					if (this.isEmpty(this.inputForm.startDay) || this.isEmpty(this.inputForm.beginTime)){
+						errors.push('请选择开始时间');
+					}
+					if (this.isEmpty(this.inputForm.endDay) || this.isEmpty(this.inputForm.endTime)){
+						errors.push('请选择结束时间');
+					}
+					if (this.isEmpty(this.inputForm.type)){
+						errors.push('请选择请假类型');
+					}
+
+					if (this.inputForm.type === '1'){
+						if (this.isNotEmpty(this.inputForm.startDay) && this.isNotEmpty(this.inputForm.beginTime)
+							&& this.isNotEmpty(this.inputForm.endDay) && this.isNotEmpty(this.inputForm.endTime)) {
+							holidayService.checkType(this.inputForm).then((data)=>{
+								let day=data.split(",")
+								if (!day[0].includes(this.inputForm.days)){
+									errors.push(data);
+								}
+							})
+						}
+
+					}
+
+					if (errors.length > 0) {
+						// 存在错误,显示提示信息
+						errors.forEach(error => {
+							uni.showToast({
+								title: error,
+								icon: 'none',
+								duration: 1500
+							});
+						});
+						reject('Form validation failed');
+					} else {
+						this.$refs.inputForm.validate().then(res => {
+							this.inputForm.status = '2'
+							this.inputForm.userId = this.userInfo.id
+							holidayService.saveForm(this.inputForm).then((data) => {
+								this.inputForm.id = data.businessId
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.$refs.inputForm.resetFields()
+								this.loading = false
+							}).catch(() => {
+								this.$refs.inputForm.resetFields()
+							}).catch((e) => {
+
+							})
+						})
+					}
+				});
+
+				// this.$refs.inputForm.validate().then(() => {
+				// 	uni.showLoading();
+				// 	this.inputForm.status = '2';
+				// 	this.holidayService.saveForm(this.inputForm).then(data => {
+				// 		callback(data.businessTable, data.businessId,this.inputForm);
+				// 	}).catch(error => {
+				// 	});
+				// }).catch(() => {
+				// });
+			},
+
+			// 修改状态
+			async updateStatusById (type, callback) {
+				if (type === 'reject' || type === 'reback') {
+					holidayService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							if (type === 'reject') {
+								// 驳回
+								this.inputForm.status = '4'
+							}
+							if (type === 'reback') {
+								// 撤回
+								this.inputForm.status = '3'
+							}
+							if (type === 'reject' || type === 'reback') {
+								let param = {status: this.inputForm.status, id: this.inputForm.id}
+								holidayService.updateStatusById(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					holidayService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.id}
+							holidayService.updateStatusById(param).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+			},
+			reapplyForm (callback) {
+				this.loading = true
+				holidayService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.startFormTrue(callback)
+					}
+				})
+			},
+			// 送审
+			async startFormTrue (callback) {
+
+				if (this.isNotEmpty(this.inputForm.startDay)) {
+					this.inputForm.startDay = this.formatDate(this.inputForm.startDay);
+				}
+				if (this.isNotEmpty(this.inputForm.endDay)) {
+					this.inputForm.endDay = this.formatDate(this.inputForm.endDay);
+				}
+
+				return new Promise((resolve, reject) => {
+
+					let errors = [];
+
+					if (this.isEmpty(this.inputForm.startDay) || this.isEmpty(this.inputForm.beginTime)){
+						errors.push('请选择开始时间');
+					}
+					if (this.isEmpty(this.inputForm.endDay) || this.isEmpty(this.inputForm.endTime)){
+						errors.push('请选择结束时间');
+					}
+					if (this.isEmpty(this.inputForm.type)){
+						errors.push('请选择请假类型');
+					}
+
+					if (this.inputForm.type === '1'){
+						holidayService.checkType(this.inputForm).then((data)=>{
+							let day=data.split(",")
+							if (!day[0].includes(this.inputForm.days)){
+								errors.push(data);
+							}
+						})
+					}
+
+					if (errors.length > 0) {
+						// 存在错误,显示提示信息
+						errors.forEach(error => {
+							uni.showToast({
+								title: error,
+								icon: 'none',
+								duration: 2000
+							});
+						});
+						reject('Form validation failed');
+					} else {
+						this.$refs.inputForm.validate().then(res => {
+							this.inputForm.status = '2'
+							holidayService.saveForm(this.inputForm).then((data) => {
+								console.log('data', data)
+								this.inputForm.id = data.businessId
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.$refs.inputForm.resetFields()
+								this.loading = false
+							}).catch(() => {
+								this.$refs.inputForm.resetFields()
+							}).catch((e) => {
+
+							})
+						})
+					}
+				});
+			},
+			// 通过
+			async agreeForm (callback) {
+				console.log('this.inputForm', this.inputForm)
+				this.$refs.inputForm.validate().then(res => {
+					if (this.inputForm.days >1) {
+						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+							if (this.isNotEmpty(data)) {
+								if (data === '总经理审核') {
+									this.inputForm.status = '5'
+								}
+							}
+							this.inputForm.status = '2'
+							holidayService.saveForm(this.inputForm).then((data) => {
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.$refs.inputForm.resetFields()
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+								this.$refs.inputForm.resetFields()
+							})
+						})
+					} else {
+						this.inputForm.status = '5'
+						holidayService.saveForm(this.inputForm).then((data) => {
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.loading = false
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				})
+			},
+			checkType(){
+				if (this.inputForm.type === '1'){
+					holidayService.checkType(this.inputForm).then((data)=>{
+						console.log('data',data)
+						uni.showToast({
+							title: data,
+							icon: "none",
+							duration:2000
+						})
+					})
+				}
+			},
+			checkTime(){
+				let differenceInDays =''
+				let date1=new Date(this.inputForm.startDay)
+				let date2=new Date(this.inputForm.endDay)
+				if ((date2<date1) || (date2 === date1 && this.inputForm.beginTime === '下午' && this.inputForm.endTime === '上午')){
+					uni.showToast({
+						title: '开始时间不能小于结束时间',
+						icon: "none",
+						duration:2000
+					})
+					this.inputForm.startDay = ''
+					this.inputForm.endDay = ''
+					this.inputForm.beginTime = ''
+					this.inputForm.endTime = ''
+				}
+				differenceInDays= Math.floor((date2 - date1) / (1000 * 60 * 60 * 24));
+				console.log('differenceInDays',differenceInDays)
+				if (differenceInDays === 0 || differenceInDays > 1){
+					if ((this.inputForm.beginTime === '上午' && this.inputForm.endTime === '下午') ||(this.inputForm.beginTime === '下午' && this.inputForm.endTime === '上午') ){
+						differenceInDays=differenceInDays+1
+					}else if ((this.inputForm.beginTime === '上午' && this.inputForm.endTime === '上午') ||(this.inputForm.beginTime === '下午' && this.inputForm.endTime === '下午')){
+						differenceInDays=differenceInDays+0.5
+					}
+				}else if (differenceInDays ===1){
+					if ((this.inputForm.beginTime === '上午' && this.inputForm.endTime === '下午') ){
+						differenceInDays=differenceInDays+1
+					}else if ((this.inputForm.beginTime === '上午' && this.inputForm.endTime === '上午') ||(this.inputForm.beginTime === '下午' && this.inputForm.endTime === '下午')){
+						differenceInDays=differenceInDays+0.5
+					}else if (this.inputForm.beginTime === '下午' && this.inputForm.endTime === '上午'){
+						differenceInDays
+					}
+				}
+				if (this.isNotEmpty(this.inputForm.beginTime) && this.isNotEmpty(this.inputForm.endTime)){
+					this.inputForm.days = differenceInDays
+					this.checkType()
+				}
+
+			}
+		}
+	}
+</script>
+
+<style>
+	.cu-form-group .title {
+		min-width: calc(4em + 40px);
+	}
+</style>

+ 2 - 2
pages/login/login.vue

@@ -45,8 +45,8 @@
 			return {
 				captchaImg: '',
 				inputForm: {
-					'username': 'admin',
-					'password': 'admin',
+					'username': '',
+					'password': '',
 					'code': '',
 					'uuid': ''
 				},

+ 723 - 0
pages/materialManagement/collect/CollectForm.vue

@@ -0,0 +1,723 @@
+<template>
+    <view>
+        <cu-custom :backUrl="'/pages/index/index'" :isBack="true" bgColor="bg-gradual-blue" >
+            <block slot="content">领用申请</block>
+        </cu-custom>
+        <u--form :model="inputForm" labelWidth="100px" class="u-form" labelPosition="left" :rules="rules" ref="inputForm" v-if="!nodeFlag">
+            <u-form-item label="领用编号" borderBottom prop="collectNo">
+                <u--input placeholder='自动生成'  v-model="inputForm.collectNo" disabled></u--input>
+            </u-form-item>
+            <u-form-item label="经办人" borderBottom prop="handledBy">
+                <u--input placeholder=''  v-model="inputForm.handledBy" disabled></u--input>
+            </u-form-item>
+            <u-form-item label="经办人部门" borderBottom prop="handledByOfficeName">
+                <u--input placeholder=''  v-model="inputForm.handledByOfficeName" disabled></u--input>
+            </u-form-item>
+            <u-form-item label="领用时间" borderBottom prop="collectDate" :required="true">
+                <el-date-picker
+                        v-model="inputForm.collectDate"
+                        type="date"
+                        placeholder="请选择领用时间"
+                        style="width:100%"
+                        size="default"
+                        placement="bottom-start"
+                        clearable>
+                </el-date-picker>
+            </u-form-item>
+            <u-form-item label="备注" borderBottom prop="remarks">
+                <u--textarea  placeholder='请填写备注信息' :rows="5" :maxlength="500" v-model="inputForm.remarks" ></u--textarea>
+            </u-form-item>
+
+
+            <el-row  :gutter="15" :key="index_experience" v-for="(item,index_experience) in this.inputForm.detailInfos">
+                <el-col :span="24">
+                    <el-form-item label="" >
+                        <el-divider content-position="left"> 领用详情 {{index_experience + 1}}</el-divider>
+                    </el-form-item>
+                </el-col>
+
+                <el-col :span="24">
+                    <u-form-item label="领用人" :prop="'detailInfos[' + index_experience + '].recipientAgent'" :required="true"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].recipientAgent" placeholder="请选择领用人" @focus="openUserPullForm(index_experience)" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="领用人部门" :prop="'detailInfos[' + index_experience + '].recipientOffice'"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].recipientOffice" placeholder="" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="领用类型" :prop="'detailInfos[' + index_experience + '].collectType'" :required="true"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].collectType" placeholder="请选择领用类型" @focus="showPicker(index_experience)" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="物品名称" :prop="'detailInfos[' + index_experience + '].goodsName'" :required="true"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].goodsName" placeholder="请选择物品名称" @focus="showGoods(index_experience)" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="领用数量" :prop="'detailInfos[' + index_experience + '].collectNumber'" :required="true"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].collectNumber" placeholder="请选择领用数量" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="库存数量" :prop="'detailInfos[' + index_experience + '].surplusNumber'"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].surplusNumber" :disabled="true" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="单位" :prop="'detailInfos[' + index_experience + '].company'"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].company"  placeholder="请输入单位" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="备注" :prop="'detailInfos[' + index_experience + '].remarks'"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].remarks"  placeholder="请输入备注" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="文件上传">
+                        <el-upload
+                                class="upload-demo"
+                                :action="`http://localhost:2800/api/public-modules-server/oss/file/webUpload/upload`"
+                                :on-remove="(file, fileList) => handleRemove(file, fileList, index_experience,'detail')"
+                                :file-list="fileList3[index_experience]"
+                                :on-success="(response, file, fileList) => handleUploadSuccess(response, file, fileList,index_experience,'detail')"
+                                :limit="3">
+                            <el-button size="small" type="primary">点击上传</el-button>
+                            <div slot="tip" class="el-upload__tip">只能上传不超过 3 个文件</div>
+                        </el-upload>
+                    </u-form-item>
+                </el-col>
+
+                <el-col :span="24" style="text-align: center">
+                    <u-form-item label="" >
+                        <el-button style="width: 100%" type="danger" @click="removeRow(index_experience)" plain>删除领用详情 {{index_experience + 1}}</el-button>
+                    </u-form-item>
+                </el-col>
+            </el-row>
+            <u-form-item label="" >
+                <el-button style="width: 100%" type="primary" @click="addRow()" plain>新增领用详情</el-button>
+            </u-form-item>
+
+            <u-form-item label="附件">
+                <el-upload
+                        class="upload-demo"
+                        :action="`http://localhost:2800/api/public-modules-server/oss/file/webUpload/upload`"
+                        :on-remove="(file, fileList) => handleRemove(file, fileList, '','')"
+                        :file-list="inputForm.files"
+                        :on-success="(response, file, fileList) => handleUploadSuccess(response, file, fileList,'','')"
+                        :limit="3">
+                    <el-button size="small" type="primary">点击上传</el-button>
+                    <div slot="tip" class="el-upload__tip">只能上传不超过 3 个文件</div>
+                </el-upload>
+            </u-form-item>
+        </u--form>
+        <u--form :model="inputForm" labelWidth="100px" class="u-form" labelPosition="left" :rules="rules" ref="inputForm" v-else-if="nodeFlag">
+            <u-form-item label="领用编号" borderBottom prop="collectNo">
+                <u--input placeholder='自动生成'  v-model="inputForm.collectNo" :disabled="true"></u--input>
+            </u-form-item>
+            <u-form-item label="经办人" borderBottom prop="handledBy">
+                <u--input placeholder=''  v-model="inputForm.handledBy" :disabled="true"></u--input>
+            </u-form-item>
+            <u-form-item label="经办人部门" borderBottom prop="handledByOfficeName">
+                <u--input placeholder=''  v-model="inputForm.handledByOfficeName" :disabled="true"></u--input>
+            </u-form-item>
+            <u-form-item label="领用时间" borderBottom prop="collectDate" :required="true">
+                <el-date-picker
+                        :disabled="true"
+                        v-model="inputForm.collectDate"
+                        type="date"
+                        placeholder="请选择领用时间"
+                        style="width:100%"
+                        size="default"
+                        placement="bottom-start"
+                        clearable>
+                </el-date-picker>
+            </u-form-item>
+            <u-form-item label="备注" borderBottom prop="remarks">
+                <u--textarea  placeholder='请填写备注信息' :rows="5" :maxlength="500" v-model="inputForm.remarks" :disabled="true"></u--textarea>
+            </u-form-item>
+
+
+            <el-row  :gutter="15" :key="index_experience" v-for="(item,index_experience) in this.inputForm.detailInfos" >
+                <el-col :span="24">
+                    <el-form-item label="" >
+                        <el-divider content-position="left"> 领用详情 {{index_experience + 1}}</el-divider>
+                    </el-form-item>
+                </el-col>
+
+                <el-col :span="24">
+                    <u-form-item label="领用人" :prop="'detailInfos[' + index_experience + '].recipientAgent'" :required="true"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].recipientAgent" :disabled="true" placeholder="请选择领用人" @focus="openUserPullForm(index_experience)" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="领用人部门" :prop="'detailInfos[' + index_experience + '].recipientOffice'"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].recipientOffice" :disabled="true" placeholder="" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="领用类型" :prop="'detailInfos[' + index_experience + '].collectType'" :required="true"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].collectType" :disabled="true" placeholder="请选择领用类型" @focus="showPicker(index_experience)" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="物品名称" :prop="'detailInfos[' + index_experience + '].goodsName'" :required="true"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].goodsName" :disabled="true" placeholder="请选择物品名称" @focus="showGoods(index_experience)" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="领用数量" :prop="'detailInfos[' + index_experience + '].collectNumber'" :required="true"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].collectNumber" :disabled="true" placeholder="请选择领用数量" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="库存数量" :prop="'detailInfos[' + index_experience + '].surplusNumber'"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].surplusNumber" :disabled="true" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="单位" :prop="'detailInfos[' + index_experience + '].company'"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].company" :disabled="true" placeholder="请输入单位" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="备注" :prop="'detailInfos[' + index_experience + '].remarks'"
+                                 :rules="[
+				     ]">
+                        <el-input v-model="inputForm.detailInfos[index_experience].remarks" :disabled="true" placeholder="请输入备注" clearable></el-input>
+                    </u-form-item>
+                    <u-form-item label="文件上传">
+                        <el-upload
+                                class="upload-demo"
+                                :action="`http://localhost:2800/api/public-modules-server/oss/file/webUpload/upload`"
+                                :on-remove="(file, fileList) => handleRemove(file, fileList, index_experience,'detail')"
+                                :file-list="fileList3[index_experience]"
+                                :on-success="(response, file, fileList) => handleUploadSuccess(response, file, fileList,index_experience,'detail')"
+                                :limit="3">
+                            <el-button size="small" :disabled="true" type="primary">点击上传</el-button>
+                            <div slot="tip" class="el-upload__tip">只能上传不超过 3 个文件</div>
+                        </el-upload>
+                    </u-form-item>
+                </el-col>
+
+                <el-col :span="24" style="text-align: center">
+                    <u-form-item label="" >
+                        <el-button style="width: 100%" type="danger" @click="removeRow(index_experience)" disabled plain>删除领用详情 {{index_experience + 1}}</el-button>
+                    </u-form-item>
+                </el-col>
+            </el-row>
+            <u-form-item label="" >
+                <el-button style="width: 100%" type="primary" @click="addRow()" disabled plain>新增领用详情</el-button>
+            </u-form-item>
+
+            <u-form-item label="附件">
+                <el-upload
+                        :disabled="true"
+                        class="upload-demo"
+                        :action="`http://localhost:2800/api/public-modules-server/oss/file/webUpload/upload`"
+                        :on-remove="(file, fileList) => handleRemove(file, fileList, '','')"
+                        :file-list="inputForm.files"
+                        :on-success="(response, file, fileList) => handleUploadSuccess(response, file, fileList,'','')"
+                        :limit="3">
+                    <el-button size="small" :disabled="true" type="primary">点击上传</el-button>
+                    <div slot="tip" class="el-upload__tip">只能上传不超过 3 个文件</div>
+                </el-upload>
+            </u-form-item>
+        </u--form>
+        <ba-tree-picker ref="treePicker" :multiple='false' @select-change="selectChange" title="类型选择"
+                        :localdata="listData" valueKey="value" textKey="label" childrenKey="children" />
+        <goods-info-picker ref="goodsPicker" :multiple='false' @select-goods-change="selectGoodsChange" title="物品名称"
+                        :localdata="goodsListData" valueKey="value" textKey="label" childrenKey="children" />
+    </view>
+</template>
+
+<script>
+    import goodsInfoPicker from './GoodsInfoPicker'
+    import MaterialTypeService from '@/api/materialManagement/MaterialTypeService'
+    import WareHouseService from '@/api/materialManagement/WareHouseService'
+    import collectService from '@/api/materialManagement/CollectService'
+    import CommonApi from '@/api/common/CommonApi'
+    import baTreePicker from "@/components/ba-tree-picker/ba-tree-picker.vue"
+    import {mapState, mapMutations, mapActions} from 'vuex'
+    export default {
+        components: {
+            baTreePicker,
+            goodsInfoPicker
+        },
+        computed: mapState({
+            userInfo: (state) => state.user.userInfo,
+            avatar: (state) => state.user.avatar
+        }),
+        data () {
+            return {
+                nodeFlag: false,
+                loading: false,
+                listData: [],
+                fileList3: [],
+                goodsListData: [],
+                materialList: [],
+                searchForm: {
+                    wareHouseType: '',
+                },
+                inputForm: {
+                    collectNo: '',
+                    handledBy: '',
+                    handledById: '',
+                    handledByOffice: '',
+                    handledByOfficeName: '',
+                    remarks: '',
+                    detailInfos: [],
+                    files: [], // 附件信息
+                    procInsId: ''
+                },
+                rules: {
+                    'collectDate': [
+                        {
+                            required: true,
+                            message: '领用时间不能为空',
+                            trigger: ['blur', 'change']
+                        }
+                    ],
+                }
+            }
+        },
+        materialTypeService: null,
+        wareHouseService: null,
+        commonApi: null,
+        // 页面加载时执行
+        created() {
+            this.commonApi = new CommonApi()
+            this.materialTypeService = new MaterialTypeService()
+            this.wareHouseService = new WareHouseService()
+            this.materialTypeService.cgList().then((data)=>{
+                this.materialList = data
+            }).catch((e)=>{
+                throw e
+            })
+
+            this.inputForm.handledBy = this.userInfo.name
+            this.inputForm.handledById = this.userInfo.id
+            this.inputForm.handledByOffice = this.userInfo.officeDTO.id
+            this.inputForm.handledByOfficeName = this.userInfo.officeDTO.name
+
+            // 监听事件
+            uni.$on('eventName', (data) => {
+                // 在这里处理传递过来的数据
+                //循环遍历领用详情,估计index将用户id与用户名称放入到领用人里面
+                this.inputForm.detailInfos.forEach((detail,index) => {
+                    if (index === parseInt(data.index)) {
+                        detail.recipientAgent = data.name
+                        detail.recipientAgentId = data.id
+                        detail.recipientOffice = data.officeDTO.name
+                    }
+                })
+            });
+        },
+        props: {
+            businessId: {
+                type: String,
+                default: ''
+            },
+            formReadOnly: {
+                type: Boolean,
+                default: false
+            }
+        },
+        watch: {
+            'businessId': {
+                handler (newVal) {
+                    if (this.businessId) {
+                        this.init(this.businessId)
+                    } else {
+                        this.$nextTick(() => {
+                            // this.$refs.inputForm.reset()
+                        })
+                    }
+                },
+                immediate: true,
+                deep: false
+            }
+        },
+        methods: {
+            // 显示选择器
+            showPicker(index) {
+                this.$refs.treePicker._show(index);
+            },
+            showGoods(index) {
+
+                this.searchForm.wareHouseType = this.inputForm.detailInfos[index].collectTypeId
+                this.wareHouseService.wareHouseSummaryList({
+                    'current': 0,
+                    'size': -1,
+                    'orders': [],
+                    ...this.searchForm
+                }).then((data) => {
+                    this.goodsListData = data.records
+                })
+
+                this.$refs.goodsPicker._show(index);
+            },
+            //监听选择
+            selectChange(ids, names, index) {
+                // this.inputForm.detailInfos.forEach((detail,inde) => {
+                //     if (inde === parseInt(index)) {
+                //         detail.collectType = names
+                //         detail.collectTypeId = ids[0]
+                //     }
+                // })
+                this.$set(this.inputForm.detailInfos, index, {
+                    ...this.inputForm.detailInfos[index],
+                    collectType: names,
+                    collectTypeId: ids[0]
+                });
+
+            },
+            //监听选择
+            selectGoodsChange(ids, names, index,tradeNumber) {
+                // this.inputForm.detailInfos.forEach((detail,inde) => {
+                //     if (inde === parseInt(index)) {
+                //         detail.goodsName = names
+                //         detail.tradeNumber = tradeNumber
+                //     }
+                // })
+                this.$set(this.inputForm.detailInfos, index, {
+                    ...this.inputForm.detailInfos[index],
+                    goodsName: names,
+                    surplusNumber: tradeNumber
+                });
+            },
+            init (id) {
+                this.nodeFlag = true
+                this.inputForm.id = id
+                if (id) {
+                    collectService.findById(id).then((data) => {
+
+                        this.commonApi.getTaskNameByProcInsId(data.procInsId).then((data) => {
+                            if (this.isNotEmpty(data)) {
+                                if (data === '重新发起申请' || this.isEmpty(data)) {
+                                    this.nodeFlag = false
+                                } else {
+                                    this.nodeFlag = true
+                                }
+                            }
+                        })
+                        this.inputForm = this.recover(this.inputForm, data)
+                        this.inputForm.collectDate = new Date(data.collectDate);
+
+                        this.inputForm.detailInfos.forEach( (item,index) => {
+                            if (this.isNotEmpty(item.fileInfoLost)) {
+                                this.fileList3[index] = []
+                                item.fileInfoLost.forEach( (item,index2) => {
+                                    this.fileList3[index].push(item)
+                                })
+
+                            }
+
+                        })
+                    })
+                }
+            },
+            buildTree(nodes, parentId = '0') {
+                const tree = [];
+                for (const node of nodes) {
+                    if (node.parentId === parentId) {
+                        const children = this.buildTree(nodes, node.id);
+                        if (children.length) {
+                            node.children = children;
+                        }
+                        tree.push(node);
+                    }
+                }
+                return tree;
+            },
+            formatDate(date) {
+                const dateNew = new Date(date); // 将日期字符串转换为 Date 对象
+                const year = dateNew.getFullYear();
+                const month = (dateNew.getMonth() + 1).toString().padStart(2, '0');
+                const day = dateNew.getDate().toString().padStart(2, '0');
+                return `${year}-${month}-${day}`;
+            },
+            isEmpty(value) {
+                let result = false;
+                if (value == null || value == undefined) {
+                    result = true;
+                }
+                if (typeof value == 'string' && (value.replace(/\s+/g, "") == "" || value == "")) {
+                    result = true;
+                }
+                if (typeof value == "object" && value instanceof Array && value.length === 0) {
+                    result = true;
+                }
+                return result;
+            },
+            isNotEmpty (value) {
+                return !this.isEmpty(value)
+            },
+            /**
+             * 判断是否为空
+             */
+            isNull(val) {
+                if (val instanceof Array) {
+                    if (val.length === 0) return true;
+                } else if (val instanceof Object) {
+                    if (JSON.stringify(val) === "{}") return true;
+                } else {
+                    if (
+                        val === "null" ||
+                        val == null ||
+                        val === "undefined" ||
+                        val === undefined ||
+                        val === ""
+                    )
+                        return true;
+                    return false;
+                }
+                return false;
+            },
+            addRow() {
+                // 点击新增按钮时,向表格中添加一行空数据
+                this.inputForm.detailInfos.push({ recipientAgent: this.userInfo.name,
+                    recipientAgentId: this.userInfo.id, recipientOffice: this.userInfo.officeDTO.name });
+                let valueData = this.materialList;
+                // 将扁平数据转换为树形结构
+                const result = this.buildTree(valueData);
+                this.listData = result
+
+            },
+            removeRow(index) {
+                // 点击删除按钮时,从表格中移除指定行
+                // this.tableData.splice(index, 1);
+                this.inputForm.detailInfos.splice(index, 1);
+            },
+            formatDateNew(date) {
+                const year = date.getFullYear();
+                const month = (date.getMonth() + 1).toString().padStart(2, '0');
+                const day = date.getDate().toString().padStart(2, '0');
+                const hours = date.getHours().toString().padStart(2, '0');
+                const minutes = date.getMinutes().toString().padStart(2, '0');
+                const seconds = date.getSeconds().toString().padStart(2, '0');
+
+                return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+            },
+            // 领用人下拉弹窗
+            openUserPullForm(index) {
+                // 点击 "领用人" 输入框时打开userPullForm页面,传入index用于区分不同的行
+                uni.navigateTo({
+                    url: '/pages/materialManagement/collect/UserPullForm?index=' + index // userPullForm页面的路径
+                });
+            },
+            handleUploadSuccess (res, file, fileList, index, type) {
+
+                // 将 fileList 转换为你期望的格式
+                const formattedFiles = fileList.map(fileItem => {
+                    return {
+                        name: fileItem.name,
+                        size: fileItem.size,
+                        url: '/' + fileItem.response.url,
+                        createBy: this.userInfo,
+                        by: this.userInfo.id,
+                        createTime: this.formatDateNew(new Date())
+                    };
+                });
+                if (type === 'detail') {
+                    // 将格式化后的数据设置到 detailInfos 的 fileInfoLost 属性中
+                    this.inputForm.detailInfos[index].fileInfoLost = formattedFiles;
+                } else {
+                    this.inputForm.files = formattedFiles
+                }
+
+                // 强制更新视图
+                this.$forceUpdate();
+            },
+            handleRemove(file, fileList, index, type) {
+                // 处理移除文件逻辑
+                // file 是移除的文件
+                // fileList 是当前文件列表
+                const formattedFiles = fileList.map(fileItem => {
+                    return {
+                        name: fileItem.name,
+                        size: fileItem.size,
+                        url: '/' + fileItem.response.url,
+                        createBy: this.userInfo,
+                        by: this.userInfo.id,
+                        createTime: this.formatDateNew(new Date())
+                    };
+                });
+                if (type === 'detail') {
+
+                    this.inputForm.detailInfos[index].fileInfoLost = formattedFiles;
+                } else {
+                    this.inputForm.files = formattedFiles
+                }
+
+
+                // 如果你想要更新文件列表,可以在这里更新 inputForm.fileInfoLost
+                // this.inputForm.fileInfoLost = fileList;
+            },
+            saveForm(callback) {
+                return new Promise((resolve, reject) => {
+                    // 表单规则验证
+                    // ...
+
+                    let errors = [];
+
+                    if (this.isNotEmpty(this.inputForm.collectDate)) {
+                        this.inputForm.collectDate = this.formatDate(this.inputForm.collectDate);
+                    }
+
+                    if (this.isEmpty(this.inputForm.detailInfos)) {
+                        errors.push('至少填写一条领用详情信息');
+                    } else {
+                        let i = this.inputForm.detailInfos.length;
+                        for (let j = 0; j < i; j++) {
+                            let k = j + 1;
+                            if (this.isEmpty(this.inputForm.detailInfos[j].recipientAgent)) {
+                                errors.push('领用详情第' + k + '行请选择领用人');
+                            } else if (this.isEmpty(this.inputForm.detailInfos[j].collectType)) {
+                                errors.push('领用详情第' + k + '行请选择领用类型');
+                            } else if (this.isEmpty(this.inputForm.detailInfos[j].goodsName)) {
+                                errors.push('领用详情第' + k + '行请选择物品名称');
+                            } else if (this.isEmpty(this.inputForm.detailInfos[j].collectNumber)) {
+                                errors.push('领用详情第' + k + '行请输入领用数量');
+                            }
+                        }
+                    }
+
+                    if (errors.length > 0) {
+                        // 存在错误,显示提示信息
+                        errors.forEach(error => {
+                            uni.showToast({
+                                title: error,
+                                icon: 'none',
+                                duration: 2000
+                            });
+                        });
+                        // reject('Form validation failed');
+                    } else {
+                        // 所有验证通过,执行保存操作
+                        this.$refs.inputForm.validate().then(() => {
+                            uni.showLoading();
+                            this.inputForm.status = '2';
+                            collectService.save(this.inputForm).then(data => {
+                                callback(data.businessTable, data.businessId,this.inputForm);
+                                resolve('Form saved successfully');
+                            }).catch(error => {
+                                // reject('Save operation failed');
+                            });
+                        }).catch(() => {
+                            // reject('Form validation failed');
+                        });
+                    }
+                });
+            },
+
+            // 修改状态
+            async updateStatusById (type, callback) {
+                if (type === 'reject' || type === 'reback') {
+                    collectService.findById(this.inputForm.id).then((data) => {
+                        if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+                            this.loading = false
+                            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                            throw new Error()
+                        } else {
+                            if (type === 'reject') {
+                                // 驳回
+                                this.inputForm.status = '4'
+                            }
+                            if (type === 'reback') {
+                                // 撤回
+                                this.inputForm.status = '3'
+                            }
+                            if (type === 'reject' || type === 'reback') {
+                                let param = {status: this.inputForm.status, id: this.inputForm.id}
+                                collectService.updateStatusById(param).then(() => {
+                                    this.loading = false
+                                    callback()
+                                })
+                            }
+                        }
+                    })
+                } else if (type === 'hold') {
+                    collectService.findById(this.inputForm.id).then((data) => {
+                        if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+                            this.loading = false
+                            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                            throw new Error()
+                        } else {
+                            // 终止
+                            let param = {status: '1', id: this.inputForm.id}
+                            collectService.updateStatusById(param).then(() => {
+                                this.loading = false
+                                callback()
+                            })
+                        }
+                    })
+                }
+            },
+            reapplyForm (callback) {
+                this.loading = true
+                collectService.findById(this.inputForm.id).then((data) => {
+                    if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+                        this.loading = false
+                        this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                        throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                    } else {
+                        this.startFormTrue(callback)
+                    }
+                })
+            },
+            // 送审
+            async startFormTrue (callback) {
+                if (this.isNotEmpty(this.inputForm.collectDate)) {
+                    this.inputForm.collectDate = this.formatDate(this.inputForm.collectDate);
+                }
+                this.$refs.inputForm.validate().then(res => {
+                    this.inputForm.status = '2'
+                    collectService.save(this.inputForm).then((data) => {
+                        this.inputForm.id = data.businessId
+                        callback(data.businessTable, data.businessId, this.inputForm)
+                        this.$refs.inputForm.resetFields()
+                        this.loading = false
+                    }).catch(() => {
+                        this.$refs.inputForm.resetFields()
+                    }).catch((e) => {
+
+                    })
+                })
+            },
+            // 通过
+            async agreeForm (callback) {
+                if (this.isNotEmpty(this.inputForm.collectDate)) {
+                    this.inputForm.collectDate = this.formatDate(this.inputForm.collectDate);
+                }
+                console.log('this.inputForm', this.inputForm)
+                this.$refs.inputForm.validate().then(res => {
+                    this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data) => {
+                        if (this.isNotEmpty(data)) {
+                            if (data === '仓库管理员审核') {
+                                this.inputForm.status = '5'
+                            }
+                        }
+                        collectService.save(this.inputForm).then((data) => {
+                            callback(data.businessTable, data.businessId, this.inputForm)
+                            this.$refs.inputForm.resetFields()
+                            this.loading = false
+                        }).catch(() => {
+                            this.loading = false
+                            this.$refs.inputForm.resetFields()
+                        })
+                    })
+                })
+            },
+        }
+    }
+</script>
+
+<style>
+    .cu-form-group .title {
+        min-width: calc(4em + 40px);
+    }
+</style>

+ 616 - 0
pages/materialManagement/collect/GoodsInfoPicker.vue

@@ -0,0 +1,616 @@
+<!-- 树形层级选择器-->
+<!-- 1、支持单选、多选 -->
+<template>
+    <view>
+        <view class="tree-cover" :class="{'show':showDialog}" @tap="_cancel"></view>
+        <view class="tree-dialog" :class="{'show':showDialog}">
+            <view class="tree-bar">
+                <view class="tree-bar-cancel" :style="{'color':cancelColor}" hover-class="hover-c" @tap="_cancel">取消
+                </view>
+                <view class="tree-bar-title" :style="{'color':titleColor}">{{title}}</view>
+                <view class="tree-bar-confirm" :style="{'color':confirmColor}" hover-class="hover-c" @tap="_confirm">
+                    {{multiple?'确定':''}}
+                </view>
+            </view>
+            <view>
+                <scroll-view class="single-level-list" :scroll-y="true" style="height: 400rpx;">
+                    <view class="single-level-item" v-for="(item, index) in treeList" :key="index">
+                        <view class="item-label">
+
+                            <view class="uni-flex-item uni-inline-item" @tap.stop="_onItemSelect(item, index)">
+                                <view class="item-name">{{ item.tradeName }}</view>
+                                <view class="item-check">
+                                    <!-- 这里放置单选的勾选标记 -->
+                                    <view class="item-check-yes" v-if="item.checkStatus===1"
+                                          :class="{'radio':!multiple}" :style="{'border-color':confirmColor}">
+                                        <view class="item-check-yes-part"
+                                              :style="{'background-color':confirmColor}">
+                                        </view>
+                                    </view>
+                                    <view class="item-check-yes" v-else-if="item.checkStatus===2"
+                                          :class="{'radio':!multiple}" :style="{'border-color':confirmColor}">
+                                        <view class="item-check-yes-all" :style="{'background-color':confirmColor}">
+                                        </view>
+                                    </view>
+                                    <view class="item-check-no" v-else :class="{'radio':!multiple}"
+                                          :style="{'border-color':confirmColor}"></view>
+                                </view>
+                            </view>
+                        </view>
+                    </view>
+                </scroll-view>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+    export default {
+        emits: ['select-goods-change'],
+        name: "ba-tree-picker",
+        props: {
+            valueKey: {
+                type: String,
+                default: 'id'
+            },
+            textKey: {
+                type: String,
+                default: 'name'
+            },
+            childrenKey: {
+                type: String,
+                default: 'children'
+            },
+            localdata: {
+                type: Array,
+                default: function() {
+                    return []
+                }
+            },
+            localTreeList: { //在已经格式化好的数据
+                type: Array,
+                default: function() {
+                    return []
+                }
+            },
+            selectedData: {
+                type: Array,
+                default: function() {
+                    return []
+                }
+            },
+            title: {
+                type: String,
+                default: ''
+            },
+            multiple: { // 是否可以多选
+                type: Boolean,
+                default: true
+            },
+            selectParent: { //是否可以选父级
+                type: Boolean,
+                default: true
+            },
+            confirmColor: { // 确定按钮颜色
+                type: String,
+                default: '' // #0055ff
+            },
+            cancelColor: { // 取消按钮颜色
+                type: String,
+                default: '' // #757575
+            },
+            titleColor: { // 标题颜色
+                type: String,
+                default: '' //
+            },
+            switchColor: { // 节点切换图标颜色
+                type: String,
+                default: '' // #666
+            },
+            border: { // 是否有分割线
+                type: Boolean,
+                default: false
+            },
+        },
+        data() {
+            return {
+                showDialog: false,
+                index: '',
+                treeList: [],
+            }
+        },
+        computed: {},
+        methods: {
+            _show(index) {
+                this.index = index
+                this.showDialog = true
+            },
+            _hide() {
+                this.showDialog = false
+            },
+            _cancel() {
+                this._hide()
+                this.$emit("cancel", '');
+            },
+            _confirm() { //多选
+                let selectedList = []; //如果子集全部选中,只返回父级 id
+                let selectedNames;
+                let tradeNumber;
+                let currentLevel = -1;
+                this.treeList.forEach((item, index) => {
+                    if (currentLevel >= 0 && item.level > currentLevel) {
+
+                    } else {
+                        if (item.checkStatus === 2) {
+                            currentLevel = item.level;
+                            selectedList.push(item.id);
+                            selectedNames = selectedNames ? selectedNames + ' / ' + item.name : item.name;
+                            tradeNumber = item.tradeNumber
+                        } else {
+                            currentLevel = -1;
+                        }
+                    }
+                })
+                this._hide()
+                this.$emit("select-goods-change", selectedList, selectedNames, this.index, tradeNumber);
+            },
+            //格式化原数据(原数据为tree结构)
+            /*_formatTreeData(list = [], level = 0, parentItem, isShowChild = true) {
+                let nextIndex = 0;
+                let parentId = -1;
+                let initCheckStatus = 0;
+                if (parentItem) {
+                    nextIndex = this.treeList.findIndex(item => item.id === parentItem.id) + 1;
+                    parentId = parentItem.id;
+                    if (!this.multiple) { //单选
+                        initCheckStatus = 0;
+                    } else
+                        initCheckStatus = parentItem.checkStatus == 2 ? 2 : 0;
+                }
+                list.forEach(item => {
+                    let isLastLevel = true;
+                    if (item && item.children) {
+                        let children = item.children;
+                        if (Array.isArray(children) && children.length > 0) {
+                            isLastLevel = false;
+                        }
+                    }
+
+                    let itemT = {
+                        id: item.id,
+                        name: item.name,
+                        level,
+                        isLastLevel,
+                        isShow: isShowChild,
+                        isShowChild: false,
+                        checkStatus: initCheckStatus,
+                        orCheckStatus: 0,
+                        parentId,
+                        children: item.children,
+                        childCount: item.children ? item.children.length : 0,
+                        childCheckCount: 0,
+                        childCheckPCount: 0
+                    };
+
+                    if (this.selectedData.indexOf(itemT.id) >= 0) {
+                        itemT.checkStatus = 2;
+                        itemT.orCheckStatus = 2;
+                        itemT.childCheckCount = itemT.children ? itemT.children.length : 0;
+                        this._onItemParentSelect(itemT, nextIndex);
+                    }
+
+                    this.treeList.splice(nextIndex, 0, itemT);
+                    nextIndex++;
+                })
+                // console.log('this.treeList', this.treeList);
+            },*/
+            // 节点打开、关闭切换
+            /*_onItemSwitch(item, index) {
+                if (item.isLastLevel === true) {
+                    return;
+                }
+                item.isShowChild = !item.isShowChild;
+                if (item.children) {
+                    this._formatTreeData(item.children, item.level + 1, item);
+                    item.children = undefined;
+                } else {
+                    this._onItemChildSwitch(item, index);
+                }
+            },*/
+            /*_onItemChildSwitch(item, index) {
+                //console.log('_onItemChildSwitch')
+                const firstChildIndex = index + 1;
+                if (firstChildIndex > 0)
+                    for (var i = firstChildIndex; i < this.treeList.length; i++) {
+                        let itemChild = this.treeList[i];
+                        if (itemChild.level > item.level) {
+                            if (item.isShowChild) {
+                                if (itemChild.parentId === item.id) {
+                                    itemChild.isShow = item.isShowChild;
+                                    if (!itemChild.isShow) {
+                                        itemChild.isShowChild = false;
+                                    }
+                                }
+                            } else {
+                                itemChild.isShow = item.isShowChild;
+                                itemChild.isShowChild = false;
+                            }
+                        } else {
+                            return;
+                        }
+                    }
+            },*/
+            // 节点选中、取消选中
+            _onItemSelect(item, index) {
+                //console.log('_onItemSelect')
+                //console.log(item)
+                if (!this.multiple) { //单选
+                    item.checkStatus = item.checkStatus == 0 ? 2 : 0;
+
+                    this.treeList.forEach((v, i) => {
+                        if (i != index) {
+                            this.treeList[i].checkStatus = 0
+                        } else {
+                            this.treeList[i].checkStatus = 2
+                        }
+                    })
+
+                    let selectedList = [];
+                    let selectedNames;
+                    let tradeNumber;
+                    selectedList.push(item.id);
+                    selectedNames = item.tradeName;
+                    tradeNumber = item.tradeNumber;
+                    this._hide()
+                    this.$emit("select-goods-change", selectedList, selectedNames, this.index,tradeNumber);
+                    return
+                }
+
+                let oldCheckStatus = item.checkStatus;
+                switch (oldCheckStatus) {
+                    case 0:
+                        item.checkStatus = 2;
+                        item.childCheckCount = item.childCount;
+                        item.childCheckPCount = 0;
+                        break;
+                    case 1:
+                    case 2:
+                        item.checkStatus = 0;
+                        item.childCheckCount = 0;
+                        item.childCheckPCount = 0;
+                        break;
+                    default:
+                        break;
+                }
+                //子节点 全部选中
+                /*this._onItemChildSelect(item, index);
+                //父节点 选中状态变化
+                this._onItemParentSelect(item, index, oldCheckStatus);*/
+            },
+            /*_onItemChildSelect(item, index) {
+                //console.log('_onItemChildSelect')
+                let allChildCount = 0;
+                if (item.childCount && item.childCount > 0) {
+                    index++;
+                    while (index < this.treeList.length && this.treeList[index].level > item.level) {
+                        let itemChild = this.treeList[index];
+                        itemChild.checkStatus = item.checkStatus;
+                        if (itemChild.checkStatus == 2) {
+                            itemChild.childCheckCount = itemChild.childCount;
+                            itemChild.childCheckPCount = 0;
+                        } else if (itemChild.checkStatus == 0) {
+                            itemChild.childCheckCount = 0;
+                            itemChild.childCheckPCount = 0;
+                        }
+                        // console.log('>>>>index:', index, 'item:', itemChild.name, '  status:', itemChild
+                        // 	.checkStatus)
+                        index++;
+                    }
+                }
+            },
+            _onItemParentSelect(item, index, oldCheckStatus) {
+                //console.log('_onItemParentSelect')
+                const parentIndex = this.treeList.findIndex(itemP => itemP.id == item.parentId);
+                //console.log('parentIndex:' + parentIndex)
+                if (parentIndex >= 0) {
+                    let itemParent = this.treeList[parentIndex];
+                    let count = itemParent.childCheckCount;
+                    let oldCheckStatusParent = itemParent.checkStatus;
+
+                    if (oldCheckStatus == 1) {
+                        itemParent.childCheckPCount -= 1;
+                    } else if (oldCheckStatus == 2) {
+                        itemParent.childCheckCount -= 1;
+                    }
+                    if (item.checkStatus == 1) {
+                        itemParent.childCheckPCount += 1;
+                    } else if (item.checkStatus == 2) {
+                        itemParent.childCheckCount += 1;
+                    }
+
+                    if (itemParent.childCheckCount <= 0 && itemParent.childCheckPCount <= 0) {
+                        itemParent.childCheckCount = 0;
+                        itemParent.childCheckPCount = 0;
+                        itemParent.checkStatus = 0;
+                    } else if (itemParent.childCheckCount >= itemParent.childCount) {
+                        itemParent.childCheckCount = itemParent.childCount;
+                        itemParent.childCheckPCount = 0;
+                        itemParent.checkStatus = 2;
+                    } else {
+                        itemParent.checkStatus = 1;
+                    }
+                    //console.log('itemParent:', itemParent)
+                    this._onItemParentSelect(itemParent, parentIndex, oldCheckStatusParent);
+                }
+            },*/
+            // 重置数据
+            _reTreeList() {
+                this.treeList.forEach((v, i) => {
+                    this.treeList[i].checkStatus = v.orCheckStatus
+                })
+            },
+            _initTree() {
+                this.treeList = this.localdata
+                // this._formatTreeData(this.localdata);
+            }
+        },
+        watch: {
+            localdata() {
+                this._initTree();
+            },
+            localTreeList() {
+                this.treeList = this.localTreeList;
+            }
+        },
+        mounted() {
+            this._initTree();
+        }
+    }
+</script>
+
+<style scoped>
+
+    .uni-flex-item {
+        display: flex; /* 使用 Flex 布局 */
+        align-items: center; /* 垂直居中 */
+    }
+
+    .tree-cover {
+        position: fixed;
+        top: 0rpx;
+        right: 0rpx;
+        bottom: 0rpx;
+        left: 0rpx;
+        z-index: 100;
+        background-color: rgba(0, 0, 0, .4);
+        opacity: 0;
+        transition: all 0.3s ease;
+        visibility: hidden;
+    }
+
+    .tree-cover.show {
+        visibility: visible;
+        opacity: 1;
+    }
+
+    .tree-dialog {
+        position: fixed;
+        top: 0rpx;
+        right: 0rpx;
+        bottom: 0rpx;
+        left: 0rpx;
+        background-color: #fff;
+        border-top-left-radius: 10px;
+        border-top-right-radius: 10px;
+        /* #ifndef APP-NVUE */
+        display: flex;
+        /* #endif */
+        flex-direction: column;
+        z-index: 102;
+        top: 20%;
+        transition: all 0.3s ease;
+        transform: translateY(100%);
+    }
+
+    .tree-dialog.show {
+        transform: translateY(0);
+    }
+
+    .tree-bar {
+        /* background-color: #fff; */
+        height: 90rpx;
+        padding-left: 25rpx;
+        padding-right: 25rpx;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        box-sizing: border-box;
+        border-bottom-width: 1rpx !important;
+        border-bottom-style: solid;
+        border-bottom-color: #f5f5f5;
+        font-size: 32rpx;
+        color: #757575;
+        line-height: 1;
+    }
+
+    .tree-bar-confirm {
+        color: #0055ff;
+        padding: 15rpx;
+    }
+
+    .tree-bar-title {}
+
+    .tree-bar-cancel {
+        color: #757575;
+        padding: 15rpx;
+    }
+
+    .tree-view {
+        flex: 1;
+        padding: 20rpx;
+        /* #ifndef APP-NVUE */
+        display: flex;
+        /* #endif */
+        flex-direction: column;
+        overflow: hidden;
+        height: 100%;
+    }
+
+    .tree-list {
+        flex: 1;
+        height: 100%;
+        overflow: hidden;
+    }
+
+    .tree-item {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        line-height: 1;
+        height: 0;
+        opacity: 0;
+        transition: 0.2s;
+        overflow: hidden;
+    }
+
+    .tree-item.show {
+        height: 90rpx;
+        opacity: 1;
+    }
+
+    .tree-item.showchild:before {
+        transform: rotate(90deg);
+    }
+
+    .tree-item.last:before {
+        opacity: 0;
+    }
+
+    .switch-on {
+        width: 0;
+        height: 0;
+        border-left: 10rpx solid transparent;
+        border-right: 10rpx solid transparent;
+        border-top: 15rpx solid #666;
+    }
+
+    .switch-off {
+        width: 0;
+        height: 0;
+        border-bottom: 10rpx solid transparent;
+        border-top: 10rpx solid transparent;
+        border-left: 15rpx solid #666;
+    }
+
+    .item-last-dot {
+        position: absolute;
+        width: 10rpx;
+        height: 10rpx;
+        border-radius: 100%;
+        background: #666;
+        display: none;
+    }
+
+    .item-icon {
+        width: 26rpx;
+        height: 26rpx;
+        margin-right: 8rpx;
+        padding-right: 20rpx;
+        padding-left: 20rpx;
+    }
+
+    .item-label {
+        flex: 1;
+        display: flex;
+        align-items: center;
+        height: auto;
+        line-height: 1.4;
+    }
+
+    .item-name {
+        flex: 1;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        width: 450rpx;
+    }
+
+    .item-check {
+        margin-right: 8px; /* 适当的左边距 */
+        order: -1;
+        /*width: 40px;*/
+        /*height: 40px;*/
+        /*display: flex;*/
+        /*justify-content: center;*/
+        /*align-items: center;*/
+    }
+
+    .item-check-yes,
+    .item-check-no {
+        margin-left: 12px; /* 增加单选按钮与左侧的间距 */
+        width: 20px;
+        height: 20px;
+        border-top-left-radius: 20%;
+        border-top-right-radius: 20%;
+        border-bottom-right-radius: 20%;
+        border-bottom-left-radius: 20%;
+        border-top-width: 1rpx;
+        border-left-width: 1rpx;
+        border-bottom-width: 1rpx;
+        border-right-width: 1rpx;
+        border-style: solid;
+        border-color: #0055ff;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        box-sizing: border-box;
+    }
+
+    .item-check-yes-part {
+        width: 12px;
+        height: 12px;
+        border-top-left-radius: 20%;
+        border-top-right-radius: 20%;
+        border-bottom-right-radius: 20%;
+        border-bottom-left-radius: 20%;
+        background-color: #0055ff;
+    }
+
+    .item-check-yes-all {
+        margin-left: 12px; /* 增加单选按钮与左侧的间距 */
+        margin-bottom: 5px;
+        border: 2px solid #007aff;
+        border-left: 0;
+        border-top: 0;
+        height: 12px;
+        width: 6px;
+        transform-origin: center;
+        /* #ifndef APP-NVUE */
+        transition: all 0.3s;
+        /* #endif */
+        transform: rotate(45deg);
+    }
+
+    .item-check .radio {
+        border-top-left-radius: 50%;
+        border-top-right-radius: 50%;
+        border-bottom-right-radius: 50%;
+        border-bottom-left-radius: 50%;
+    }
+
+    .item-check .radio .item-check-yes-b {
+        border-top-left-radius: 50%;
+        border-top-right-radius: 50%;
+        border-bottom-right-radius: 50%;
+        border-bottom-left-radius: 50%;
+    }
+
+    .hover-c {
+        opacity: 0.6;
+    }
+
+    .itemBorder {
+        border-bottom: 1px solid #e5e5e5;
+    }
+
+</style>

+ 162 - 0
pages/materialManagement/collect/UserPullForm.vue

@@ -0,0 +1,162 @@
+<template>
+    <view>
+
+        <u-sticky>
+            <view  style="padding: 20upx; background-color: white;">
+                <u-search placeholder="输入搜索的关键词" :clearabled="true" :showAction="false" v-model="searchUserName"></u-search>
+            </view>
+        </u-sticky>
+
+        <view>
+            <u-index-list :indexList="indexList">
+                <template v-for="(item, index) in list">
+                    <!-- #ifdef APP-NVUE -->
+                    <u-index-anchor :text="list[index].letter" :key="index"></u-index-anchor>
+                    <!-- #endif -->
+                    <u-index-item :key="index">
+                        <!-- #ifndef APP-NVUE -->
+                        <u-index-anchor :text="list[index].letter"></u-index-anchor>
+                        <!-- #endif -->
+                        <view class="list" v-for="(user, index1) in list[index].data" :key="index1">
+                            <view class="list__item">
+                                <u-avatar shape="square" size="35" icon="account-fill" fontSize="26" randomBgColor></u-avatar>
+                                <!-- <view class="cu-avatar round " :style="'background-image:url('+(user.photo?user.photo:'/h5/static/user/flat-avatar.png')+');'"></view> -->
+                                <text class="list__item__user-name" @click="selectUser(user)">{{user.name}}</text>
+                                <!-- 新增的展示其他信息的元素 -->
+                                <text class="list__item__additional-info">{{ user.officeDTO.name }}</text>
+                                <!-- 新的电话号码信息 -->
+                                <text class="list__item__phone-number">{{ user.mobile }}</text>
+                            </view>
+                            <u-line></u-line>
+                        </view>
+                    </u-index-item>
+                </template>
+                <view style="font-size: 15px; color: gray; text-align: center; margin-top: 15px;">共{{total}}位好友</view>
+            </u-index-list>
+            <u-gap height="100" bgColor="#fff"></u-gap>
+        </view>
+    </view>
+</template>
+
+<script>
+    import userService from '@/api/sys/userService'
+    export default {
+        data() {
+            return {
+                indexList: [],
+                userList: [],
+                total: 0,
+                searchUserName: '',
+                index: ''
+            }
+        },
+        created() {
+            userService.list({current: 1, size: 10000}).then((data)=>{
+                this.userList = data.records
+                this.total = data.total
+            }).catch((e)=>{
+                throw e
+            })
+        },
+        onLoad(options) {
+            // 从 URL 参数中获取传递过来的index
+            this.index = options.index;
+        },
+        computed: {
+            list () {
+                let resultList = this.userList.filter((item)=>{
+                    if(item.name.indexOf(this.searchUserName) >= 0){
+                        return true
+                    }
+                })
+                return this.pySegSort(resultList)
+            }
+        },
+        methods: {
+            // 排序
+            pySegSort(arr) {
+                if(!String.prototype.localeCompare)
+                    return null;
+
+                var letters = "0abcdefghjklmnopqrstwxyz".split('');
+                var zh = "阿八嚓哒妸发旮哈讥咔垃痳拏噢妑七呥扨它穵夕丫帀".split('');
+
+                var segs = [];
+                var curr;
+                letters.forEach((item,i) => {
+                    curr = {letter: item, data:[]};
+                    arr.forEach((item2) => {
+                        if((!zh[i-1] || zh[i-1].localeCompare(item2.name) <= 0) && item2.name.localeCompare(zh[i]) == -1) {
+                            curr.data.push(item2);
+                        }
+                    });
+                    if(curr.data.length) {
+                        segs.push(curr);
+                        this.indexList.push(curr.letter)
+                        curr.data.sort((a,b)=>{
+                            return a.name.localeCompare(b.name);
+                        });
+                    }
+                });
+                return segs;
+            },
+            selectUser(user) {
+                // 当用户点击某个用户时触发的方法
+                // 这里可以处理所选用户的信息并将其传递回原页面
+                user.index = this.index
+                uni.navigateBack({
+                    delta: 1,
+                    success() {
+                        uni.$emit('eventName', user); // 通过事件向上一页传递数据
+                    }
+                });
+            }
+        }
+    }
+</script>
+
+<style lang="scss">
+    .list {
+
+        &__item {
+            @include flex;
+            padding: 6px 12px;
+            align-items: center;
+
+            &__avatar {
+                height: 35px;
+                width: 35px;
+                border-radius: 3px;
+            }
+
+            &__user-name {
+                font-size: 16px;
+                margin-left: 10px;
+                color: $u-main-color;
+            }
+        }
+
+        &__footer {
+            color: $u-tips-color;
+            font-size: 14px;
+            text-align: center;
+            margin: 15px 0;
+        }
+    }
+
+    .list__item__additional-info {
+        position: relative;
+        top: 10px; /* Adjust as needed */
+        left: 15px; /* Adjust as needed */
+        font-size: 12px; /* Adjust the font size as needed */
+        color: #999; /* Adjust the color as needed */
+    }
+
+    .list__item__phone-number {
+        position: relative;
+        top: 10px; /* Adjust as needed */
+        margin-left: 20px; /* 根据需要调整间距 */
+        font-size: 12px; /* 根据需要调整字体大小 */
+        color: #999; /* 根据需要调整颜色 */
+    }
+</style>

+ 10 - 3
pages/user/person/person.vue

@@ -24,7 +24,7 @@
 		    title="岗位"
 			icon="account-fill"
 			:iconStyle="{color: '#0081ff'}"
-			:value="userInfo.post && userInfo.post.name"
+			:value="userInfo.postNames"
 		></u-cell>
 		<u-cell
 		    title="角色"
@@ -36,7 +36,7 @@
 		    title="联系电话"
 			icon="phone-fill"
 			:iconStyle="{color: '#0081ff'}"
-			:value="userInfo.phone"
+			:value="userInfo.mobile"
 		></u-cell>
 		<u-cell
 		    title="邮箱"
@@ -49,7 +49,7 @@
 			icon="edit-pen"
 		    isLink
 			:iconStyle="{color: '#e54d42'}"
-		    url="/pages/user/setting/password/password"
+			@click="goToPasswordPage"
 		></u-cell>
 	</u-cell-group>
 
@@ -83,6 +83,13 @@
           url: '/pages/user/setting/password/password'
         })
       },
+		goToPasswordPage() {
+			const params = { 'id': this.userInfo.id};
+			this.$router.push({
+				path: '/pages/user/setting/password/password',
+				query: params
+			});
+		},
 	 ChooseImage() {
 	 	uni.chooseImage({
 	 		count: 4, //默认9

+ 8 - 2
pages/user/setting/password/password.vue

@@ -26,7 +26,8 @@
 			inputForm: {
 				oldPassword: '',
 				newPassword: '',
-				confirmNewPassword: ''
+				confirmNewPassword: '',
+				userId: ''
 			},
 			rules: {
 				'oldPassword': [
@@ -63,13 +64,18 @@
 			}
 		}
 	},
+	  mounted() {
+		  const params = this.$route.query;
+		  this.inputForm.userId = params.id
+		  // 从 params 中读取传递过来的参数
+	  },
 
     methods:{
 		formSubmit: function(e) {
 			//定义表单规则
 			this.$refs.inputForm.validate().then(res => {
 				uni.showLoading()
-				userService.savePwd(this.inputForm).then((data) => {
+				userService.savePwdByPhone(this.inputForm).then((data) => {
 					uni.showToast({title:data, icon:"success"});
 					uni.clearStorage();
 					uni.reLaunch({

+ 235 - 111
pages/workbench/task/TaskForm.vue

@@ -12,7 +12,9 @@
 			<view class=" bg-white ">
 				
 				<TestActivitiLeaveForm  v-if="formUrl.endsWith('TestActivitiLeaveForm')" :formReadOnly="formReadOnly" :class="formReadOnly?'readonly':''"  ref="form" :businessId="businessId"></TestActivitiLeaveForm>
-				  <!-- <component :formReadOnly="formReadOnly" :class="formReadOnly?'readonly':''"  ref="form" :businessId="businessId" :is="form"></component> -->
+				<CollectForm  v-else-if="formUrl.endsWith('CollectForm')" :formReadOnly="formReadOnly" :class="formReadOnly?'readonly':''"  ref="form" :businessId="businessId"></CollectForm>
+				<HolidayForm  v-else-if="formUrl.endsWith('HolidayForm')" :formReadOnly="formReadOnly" :class="formReadOnly?'readonly':''"  ref="form" :businessId="businessId"></HolidayForm>
+				<!-- <component :formReadOnly="formReadOnly" :class="formReadOnly?'readonly':''"  ref="form" :businessId="businessId" :is="form"></component> -->
 				  <PreviewForm :formData="formData"  v-if="formType !== '2'"  :processDefinitionId="procDefId" :edit="true" ref="form"></PreviewForm>
 			</view>
 			<view class=" bg-white margin-top" v-if="!procInsId || taskId">
@@ -29,9 +31,9 @@
 					<u-form-item label="抄送给"  v-if="isCC">
 						<user-select  v-model="auditForm.userIds" ></user-select>
 					</u-form-item>
-					<u-form-item label="指定下一步处理者" borderBottom prop="isAssign">
-						<u-switch v-model="isAssign" ></u-switch>
-					</u-form-item>
+<!--					<u-form-item label="指定下一步处理者" borderBottom prop="isAssign">-->
+<!--						<u-switch v-model="isAssign" ></u-switch>-->
+<!--					</u-form-item>-->
 					<u-form-item label="指定" v-if="isAssign">
 						<user-select v-model="auditForm.assignee"  ></user-select>
 					</u-form-item>
@@ -89,6 +91,8 @@
 </template>
 
 <script>
+	import CollectForm from '@/pages/materialManagement/collect/CollectForm.vue'
+	import HolidayForm from '@/pages/jy/holiday/HolidayForm.vue'
 	import userSelect from '@/components/user-select/user-select.vue'
 	import userSelectDialog from '@/components/user-select/user-select-dialog.vue'
 	import PreviewForm from '../form/GenerateFlowableForm'
@@ -133,6 +137,10 @@
 				  // uniapp 不支持动态组件,所以通过名称匹配决定调用的表单组件
 				  if(this.formUrl.endsWith('TestActivitiLeaveForm')){ 
 					  this.form = TestActivitiLeaveForm
+				  }else if(this.formUrl.endsWith('CollectForm')){
+					  this.form = CollectForm
+				  }else if(this.formUrl.endsWith('HolidayForm')){
+					  this.form = HolidayForm
 				  }else{
 					  uni.showToast({ title: '没有关联流程表单!', icon: "none" });
 				  }
@@ -185,6 +193,8 @@
 			  })
 		},
 		components:{
+			CollectForm,
+			HolidayForm,
 		  userSelect,
 		  userSelectDialog,
 		  TestActivitiLeaveForm,
@@ -193,6 +203,7 @@
 		},
 		data() {
 			return {
+				days:'',
 				flow: null,
 				tabIndex: 0,
 				form: null,
@@ -337,14 +348,19 @@
 			// 启动流程
 			start (vars) {
 			  if (this.formType === '2') { // 外置表单启动
-				this.$refs.form.saveForm((businessTable, businessId) => {
+				this.$refs.form.saveForm((businessTable, businessId,inputForm) => {
+					if (inputForm.days){
+						this.days=inputForm.days
+					}
+					console.log('this.days', this.days)
 				  taskService.start({
 					procDefKey: this.procDefKey,
 					businessTable: businessTable,
 					businessId: businessId,
 					...vars,
 					title: this.title,
-					assignee: this.auditForm.assignee
+					assignee: this.auditForm.assignee,
+					days: this.days
 				  }).then((data) => {
 					  uni.showToast({ title: "启动成功", icon: "success" });
 					  uni.navigateTo({
@@ -368,29 +384,117 @@
 				})
 			  }
 			},
+			isEmpty(value) {
+				let result = false;
+				if (value == null || value == undefined) {
+					result = true;
+				}
+				if (typeof value == 'string' && (value.replace(/\s+/g, "") == "" || value == "")) {
+					result = true;
+				}
+				if (typeof value == "object" && value instanceof Array && value.length === 0) {
+					result = true;
+				}
+				return result;
+			},
 			// 同意
-			agree () {
-			  this.commit() // 同意
+			agree(vars) {
+				vars = {...vars, agree: true}
+				if (this.formType === '2') {
+					this.commit(vars)
+				}
+			},
+			// 重新申请
+			reapply (vars) {
+				console.log('进入了重新申请')
+				vars = {...vars, agree: true}
+				if (this.formType === '2') { // 外置表单
+					let param = {
+						num: this.$route.query.num,
+						taskId: this.taskId,
+						taskDefKey: this.taskDefKey,
+						procInsId: this.procInsId,
+						procDefId: this.procDefId,
+						vars: vars,
+						comment: this.auditForm,
+						assignee: this.auditForm.assignee,
+						cope: {
+							userIds: this.auditForm.userIds,
+							procDefId: this.procDefId,
+							procInsId: '',
+							procDefName: '',
+							procInsName: this.title,
+							taskName: ''
+						}
+					}
+					this.$refs.form.reapplyForm((businessTable, businessId, inputForm,recordType) => {
+						vars = {...vars, ...inputForm,recordType}
+						console.log('inputForm', inputForm)
+						if (inputForm.procDefId) {
+							param.procDefId = inputForm.procDefId
+						}
+						let assignee = this.auditForm.assignee
+						if (!this.isEmpty(inputForm.assignee)) {
+							assignee = inputForm.assignee
+						}
+						this.recordType=recordType
+
+
+						taskService.audit({
+							taskId: this.taskId,
+							taskDefKey: this.taskDefKey,
+							procInsId: this.procInsId,
+							procDefId: this.procDefId,
+							vars: vars,
+							comment: this.auditForm,
+							assignee: assignee,
+							recordType: this.recordType
+						}).then((data) => {
+							uni.showToast({ title: "审批成功", icon: "success" });
+							uni.navigateTo({
+								url: '/pages/workbench/task/TodoList'
+							})
+							this.cc(data)
+						})
+					}, param)
+				}
 			},
 			// 驳回
-			reject () {
+			reject (vars) {
 				uni.showModal({
-				    title: '提示',
-				    content: '确定驳回流程吗?',
-				    success: (res) => {
-				        if (res.confirm) {
+					title: '提示',
+					content: '确定驳回流程吗?',
+					success: (res) => {
+						if (res.confirm) {
+							vars = {...vars, agree: false}
 							uni.showLoading()
-							taskService.backNodes(this.taskId).then((data) => {
-				            	let backNodes = data
-				            	if (backNodes.length > 0) {
-				            	  let backTaskDefKey = backNodes[backNodes.length - 1].taskDefKey
-				            	  this.back(backTaskDefKey)
-				            	}
-				             })
-				        } else if (res.cancel) {
-				           uni.hideLoading()
-				        }
-				    }
+							this.$refs.form.updateStatusById('reject', (assignee) => {
+								// taskService.backNodes(this.taskId).then((data) => {
+								// 	let backNodes = data
+								// 	if (backNodes.length > 0) {
+								// 		let backTaskDefKey = backNodes[backNodes.length - 1].taskDefKey
+								// 		this.back(backTaskDefKey)
+								// 	}
+								// })
+								taskService.audit({
+									taskId: this.taskId,
+									taskDefKey: this.taskDefKey,
+									procInsId: this.procInsId,
+									procDefId: this.procDefId,
+									vars: vars,
+									comment: this.auditForm,
+									assignee: this.auditForm.assignee
+								}).then((data) => {
+									uni.showToast({ title: "审批成功", icon: "success" });
+									uni.navigateTo({
+										url: '/pages/workbench/task/TodoList'
+									})
+								})
+							})
+						} else if (res.cancel) {
+							uni.hideLoading()
+						}
+					}
 				});
 			},
 			// 驳回到任意节点
@@ -462,70 +566,84 @@
 			},
 			// 终止
 			stop () {
-				uni.showLoading()
+				// uni.showLoading()
 				uni.showModal({
-				    title: '提示',
-				    content: '确定终止流程吗?',
-				    success: (res) => {
-				        if (res.confirm) {
-							processService.stop(this.procInsId, this.auditForm.message).then((data) => {
-				              uni.showToast({ title: data, icon: "success" });
-				              uni.navigateTo({
-				              	url: '/pages/workbench/task/TodoList'
-				              })
-				            })
-				        } else if (res.cancel) {
-				           uni.hideLoading()
-				        }
-				    }
+					title: '提示',
+					content: '确定终止流程吗?',
+					success: (res) => {
+
+						// 将数据状态更改为暂存状态
+						this.$refs.form.updateStatusById('hold', () => {
+							if (res.confirm) {
+								processService.stop(this.procInsId, this.auditForm.message).then((data) => {
+									uni.showToast({ title: data, icon: "success" });
+									uni.navigateTo({
+										url: '/pages/workbench/task/TodoList'
+									})
+								})
+							} else if (res.cancel) {
+								uni.hideLoading()
+							}
+						})
+					}
 				});
 			},
 			// 打印
 			print () {
 	  
 			},
+			// 关闭
+			close () {
+				uni.navigateTo({
+					url: '/pages/workbench/task/TodoList'
+				})
+			},
 			// 自定义按钮提交
 			commit (vars) {
 				//定义表单规则
-				 var rule = [
-					{name:"message", checkType : "notnull", checkRule:"",  errorMsg:"审批意见不能为空!"}
-				 ];
-				 //进行表单检查
-				 var formData = this.auditForm;
-				 var checkRes = graceChecker.check(formData, rule);
-				 if(!checkRes){
-				  uni.showToast({ title: graceChecker.error, icon: "none" });
-				  return;
+				var rule = [
+					// {name:"message", checkType : "notnull", checkRule:"",  errorMsg:"审批意见不能为空!"}
+				];
+				//进行表单检查
+				var formData = this.auditForm;
+				var checkRes = graceChecker.check(formData, rule);
+				if(!checkRes){
+					uni.showToast({ title: graceChecker.error, icon: "none" });
+					return;
 				}
-				 if (this.formType === '2') { //外置表单审批
-					this.$refs.form.saveForm((businessTable, businessId) => {
-					  taskService.audit({
-						taskId: this.taskId,
-						taskDefKey: this.taskDefKey,
-						procInsId: this.procInsId,
-						procDefId: this.procDefId,
-						vars: vars,
-						comment: this.auditForm,
-						assignee: this.auditForm.assignee
-				  }).then((data) => {
-						uni.showToast({ title: "审批成功", icon: "success" });
+				if (this.formType === '2') { //外置表单审批
+					this.$refs.form.agreeForm((businessTable, businessId,inputForm) => {
+						if (inputForm.days) {
+							this.days = inputForm.days
+						}
+						taskService.audit({
+							taskId: this.taskId,
+							taskDefKey: this.taskDefKey,
+							procInsId: this.procInsId,
+							procDefId: this.procDefId,
+							vars: vars,
+							comment: this.auditForm,
+							assignee: this.auditForm.assignee,
+							days: this.days
+						}).then((data) => {
+							uni.showToast({ title: "审批成功", icon: "success" });
+							uni.navigateTo({
+								url: '/pages/workbench/task/TodoList'
+							})
+							this.cc(data)
+						})
+					})
+				} else { // 动态表单启动
+					this.$refs.form.submitTaskFormData(vars, this.procInsId, this.taskId, this.auditForm.assignee, this.auditForm, (data) => {
+						uni.showToast({ title: "启动成功", icon: "success" });
 						uni.navigateTo({
 							url: '/pages/workbench/task/TodoList'
 						})
-					  this.cc(data)
-				  })
-				})
-			 } else { // 动态表单启动
-				this.$refs.form.submitTaskFormData(vars, this.procInsId, this.taskId, this.auditForm.assignee, this.auditForm, (data) => {
-					uni.showToast({ title: "启动成功", icon: "success" });
-					uni.navigateTo({
-						url: '/pages/workbench/task/TodoList'
+						//抄送
+						this.cc(data)
 					})
-					//抄送
-					this.cc(data)
-				})
-			 }
-		},
+				}
+			},
 			submit (currentBtn, buttons) {
 			  let vars = {} // 存储流程变量
 	  
@@ -542,44 +660,50 @@
 			  vars.assignee = this.auditForm.assignee // 指定的下一步骤处理人
 			  this.auditForm.type = currentBtn.code // 提交类型
 			  this.auditForm.status = currentBtn.name // 按钮文字
-			  
-			  switch (currentBtn.code) {
-				case '_flow_start': // 自动流程
-				  this.start(vars)
-				  break
-				case '_flow_save': // 保存草稿
-				  this.save()
-				  break
-				case '_flow_agree': // 同意
-				  this.agree()
-				  break
-				case '_flow_reject': // 驳回
-				  this.reject()
-				  break
-				case '_flow_back': // 驳回到任意步骤
-				  this.turnBack()
-				  break
-				case '_flow_add_multi_instance': // 加签
-				  this.addMultiInstance()
-				  break
-				case '_flow_del_multi_instance': // 减签
-				  this.delMultiInstance()
-				  break
-				case '_flow_transfer': // 转办
-				  this.transfer()
-				  break
-				case '_flow_delegate':// 外派
-				  this.delegate()
-				  break
-				case '_flow_stop':// 终止
-				  this.stop()
-				  break
-				case '_flow_print':// 打印
-				  this.print()
-				  break
-				default:
-				  this.commit(vars) // 自定义按钮提交
-			  }
+
+				switch (currentBtn.code) {
+					case '_flow_start': // 自动流程
+						this.start(vars)
+						break
+					case '_flow_save': // 保存草稿
+						this.save()
+						break
+					case '_flow_agree': // 同意
+						this.agree()
+						break
+					case '_flow_reject': // 驳回
+						this.reject()
+						break
+					case '_flow_back': // 驳回到任意步骤
+						this.turnBack()
+						break
+					case '_flow_add_multi_instance': // 加签
+						this.addMultiInstance()
+						break
+					case '_flow_del_multi_instance': // 减签
+						this.delMultiInstance()
+						break
+					case '_flow_transfer': // 转办
+						this.transfer()
+						break
+					case '_flow_delegate':// 外派
+						this.delegate()
+						break
+					case '_flow_stop':// 终止
+						this.stop()
+						break
+					case '_flow_print':// 打印
+						this.print()
+						break
+					case '_flow_reapply':// 重新申请
+						this.reapply()
+						break
+					case '_flow_close':// 关闭
+						this.close()
+						break
+					default:
+						this.commit(vars) // 自定义按钮提交
+				}
 			}
 		}
 	}

+ 8 - 0
pages/workbench/task/TaskFormDetail.vue

@@ -53,6 +53,8 @@
 </template>
 
 <script>
+	import CollectForm from '@/pages/materialManagement/collect/CollectForm.vue'
+	import HolidayForm from '@/pages/jy/holiday/HolidayForm.vue'
 	import userSelect from '@/components/user-select/user-select.vue'
 	import PreviewForm from '../form/GenerateFlowableForm'
 	import TestActivitiLeaveForm from '@/pages/test/activiti/TestActivitiLeaveForm.vue'
@@ -85,6 +87,10 @@
 					// uniapp 不支持动态组件,所以通过名称匹配决定调用的表单组件
 					if(this.formUrl.endsWith('TestActivitiLeaveForm')){ 
 						this.form = TestActivitiLeaveForm
+					}else if(this.formUrl.endsWith('CollectForm')){
+						this.form = CollectForm
+					}else if(this.formUrl.endsWith('HolidayForm')){
+						this.form = HolidayForm
 					}else{
 						uni.showToast({ title: '没有关联流程表单!', icon: "none" });
 					}
@@ -120,6 +126,8 @@
 			  })
 		},
 		components:{
+			CollectForm,
+			HolidayForm,
 		  userSelect,
 		  TestActivitiLeaveForm,
 		  PreviewForm

+ 60 - 16
pages/workbench/workbench.vue

@@ -28,7 +28,23 @@
 				<text>抄送给我</text>
 			</view>
 		</view>
-		<scroll-view scroll-y class="page">
+		<scroll-view scroll-y class="page" v-if="isAdmin">
+			<template v-for="key in processMap.keys()">
+				<view class="cu-bar bg-white solid-bottom margin-top">
+					<view class="action">
+						<text class=" text-orange font-b">{{key}}</text>
+					</view>
+				</view>
+				<view class="cu-list grid col-4 no-border">
+					<view class="circle-button-box" @click="start(act)" v-for="(act, index) in processMap.get(key)" :key="index">
+						<view class="cuIcon-calendar bg-blue text-white circle-button font-size-35"></view>
+						<text class="ellipsis-description">{{act.name}}</text>
+					</view>
+				</view>
+			</template>
+			<u-gap height="80" bgColor="#fff"></u-gap>
+		</scroll-view>
+		<scroll-view scroll-y class="page" v-else>
 			<template v-for="key in processMap.keys()">
 				<view class="cu-bar bg-white solid-bottom margin-top">
 					<view class="action">
@@ -49,6 +65,7 @@
 </template>
 
 <script>
+	import userService from "@/api/sys/userService"
 	import moment from 'moment'
 	import {mapState, mapMutations, mapActions} from 'vuex'
 	import actCategoryService from "@/api/flowable/actCategoryService"
@@ -57,6 +74,7 @@
 	export default {
 		data() {
 			return {
+				isAdmin: false,
 				cardCur: 0,
 				dataList: [],
 				categoryList: [],
@@ -103,21 +121,40 @@
 			let res = await actCategoryService.treeData()
 			let data = await processService.list({current: 1, size: -1})
 			this.processMap = new Map()
-			res.forEach((item)=>{
-				this.processMap.set(item.name, [])
-			})
-			let list = data.records
-			list.forEach((item)=>{
-				if(this.processMap.has(item.category)){
-					let list = this.processMap.get(item.category)
-					list.push(item)
-				}else{
-					this.processMap.set(item.category, [item])
+
+			if (this.isAdmin) {
+				//如果是管理员 查看所有的流程图信息
+				res.forEach((item)=>{
+					this.processMap.set(item.name, [])
+				})
+				let list = data.records
+				list.forEach((item)=>{
+					if(this.processMap.has(item.category)){
+						let list = this.processMap.get(item.category)
+						list.push(item)
+					}else{
+						this.processMap.set(item.category, [item])
+					}
+				})
+
+				for(let [key,value] of this.processMap){
+					console.log(key,value);
 				}
-			})
-			
-			for(let [key,value] of this.processMap){
-			    console.log(key,value);
+			} else {
+				//非管理员用户  只能查看物资领用 与 请假流程信息
+				let list = data.records
+				list.forEach((item)=>{
+					if (item.category === '未设置') {
+						if (item.name === '物资管理-领用申请') {
+							this.processMap.set('物资管理', [item])
+						}
+						if (item.name === '嘉溢-请假申请') {
+							this.processMap.set('请假申请', [item])
+						}
+					}
+
+				})
+				console.log('this.processMap', this.processMap)
 			}
 			
 			
@@ -126,6 +163,7 @@
 			if(!this.username) {
 				this.refreshUserInfo()
 			}
+			this.checkIsAdmin()
 		},
 		methods: {
 			 ...mapActions(['refreshUserInfo']),
@@ -161,7 +199,13 @@
 					 url: '/pages/workbench/task/TaskForm?flow='+JSON.stringify(query)
 				  })
 				})
-		  }
+		  },
+			// 查询当前用户是否是管理员用户
+			checkIsAdmin () {
+				userService.is().then((data) => {
+					this.isAdmin = data
+				})
+			},
 		}
 	}
 </script>