浏览代码

物资-临期提醒

huangguoce 1 天之前
父节点
当前提交
5823f30e93

+ 7 - 1
src/api/psi/WareHouseService.js

@@ -84,7 +84,13 @@ export default class WareHouseService {
 			params: param,
 		});
 	}
-
+	getAllData(param) {
+		return request({
+			url: prefix + "/psi/management/wareHouse/getAllData",
+			method: "get",
+			params: param,
+		});
+	}
 	save(param) {
 		return request({
 			url: prefix + "/psi/management/wareHouse/save",

+ 12 - 2
src/views/dashboard/widgets/components/MyNoticePageList.vue

@@ -53,6 +53,7 @@
 	</el-card>
 	<WareHouseHistoryPopup ref="wareHouseHistoryPopup"></WareHouseHistoryPopup>
 	<PsiWareHouseHistoryPopup ref="wareHouseHistoryPopup2"></PsiWareHouseHistoryPopup>
+	<PurchasePageFormCurrent ref="purchasePageFormCurrent"></PurchasePageFormCurrent>
 	<RegisterPopup ref="registerPopup"></RegisterPopup>
 	<KeyCardPopup ref="keyCardPopup"></KeyCardPopup>
 	<DepartPopup ref="departPopup"></DepartPopup>
@@ -65,7 +66,8 @@
 
 <script>
 import WareHouseHistoryPopup from '@/views/materialManagement/wareHouseSummary/WareHouseHistoryPopup'
-import PsiWareHouseHistoryPopup from '@/views/psiManagement/wareHouseSummary/WareHouseHistoryPopup.vue'
+import PsiWareHouseHistoryPopup from '@/views/psiManagement/loss/PurchasePageFormPopup.vue'
+import PurchasePageFormCurrent from '@/views/psiManagement/loss/PurchasePageFormCurrent.vue'
 import RegisterPopup from '@/views/human/practice/register/RegisterPopup'
 import KeyCardPopup from '@/views/human/enrollment/registration/KeyCardPopup'
 import DepartPopup from '@/views/human/depart/handover/DepartPopup'
@@ -88,6 +90,7 @@ export default {
 	components: {
 		WareHouseHistoryPopup,
 		PsiWareHouseHistoryPopup,
+		PurchasePageFormCurrent,
 		RegisterPopup,
 		KeyCardPopup,
 		DepartPopup,
@@ -150,8 +153,15 @@ export default {
 				}
 				noticeService.stockUpdate(this.inputForm)
 				this.resetSearch()
-			} else if (row.taskName === '进销存库存提醒') {
+			} else if (row.taskName === '物资库存提醒') {
 				// console.log('测试进来了')
+				this.$refs.purchasePageFormCurrent.init(row.defId)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			} else if (row.taskName === '物资临期提醒') {
 				this.$refs.wareHouseHistoryPopup2.init(row.defId)
 				this.inputForm = {
 					id: row.id

+ 315 - 300
src/views/flowable/task/NoticePageList.vue

@@ -1,132 +1,126 @@
 <template>
-  <div class="page">
+	<div class="page">
 
-    <el-form :inline="true"  class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
-      <el-form-item label="标题" prop="title">
-        <el-input v-model="searchForm.title"></el-input>
-      </el-form-item>
-      <el-form-item label="流程名称" prop="taskName">
-        <el-input v-model="searchForm.taskName"></el-input>
-      </el-form-item>
-      <el-form-item>
-        <el-button  type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
-        <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
-      </el-form-item>
-    </el-form>
+		<el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm"
+			@keyup.enter.native="refreshList()" @submit.native.prevent>
+			<el-form-item label="标题" prop="title">
+				<el-input v-model="searchForm.title"></el-input>
+			</el-form-item>
+			<el-form-item label="流程名称" prop="taskName">
+				<el-input v-model="searchForm.taskName"></el-input>
+			</el-form-item>
+			<el-form-item>
+				<el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+				<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+			</el-form-item>
+		</el-form>
 
-      <div class="jp-table top" style="">
-        <vxe-toolbar :refresh="{query: refreshList}" custom>
-          <template #buttons>
-            <el-button type="primary" @click="readAll()">全部标记已读</el-button>
-            <el-button :disabled="$refs.todoTable && $refs.todoTable.getCheckboxRecords().length === 0" type="warning" @click="portionRead()">标记为已读</el-button>
-          </template>
-        </vxe-toolbar>
-		  <el-tabs v-model="type" type="card" @tab-click="handleClick">
-			  <el-tab-pane :key="index" v-for="(item,index) in typeList" :label="item.value" :name="item.value" :value="item.id"></el-tab-pane>
-		  </el-tabs>
+		<div class="jp-table top" style="">
+			<vxe-toolbar :refresh="{ query: refreshList }" custom>
+				<template #buttons>
+					<el-button type="primary" @click="readAll()">全部标记已读</el-button>
+					<el-button :disabled="$refs.todoTable && $refs.todoTable.getCheckboxRecords().length === 0"
+						type="warning" @click="portionRead()">标记为已读</el-button>
+				</template>
+			</vxe-toolbar>
+			<el-tabs v-model="type" type="card" @tab-click="handleClick">
+				<el-tab-pane :key="index" v-for="(item, index) in typeList" :label="item.value" :name="item.value"
+					:value="item.id"></el-tab-pane>
+			</el-tabs>
 
-        <div class="table-container">
-            <vxe-table
-              border="inner"
-              auto-resize
-              resizable
-              height="auto"
-              :loading="loading"
-              ref="todoTable"
-              show-header-overflow
-              show-overflow
-              highlight-hover-row
-              :data="dataList"
-              :checkbox-config="{}">
-              <vxe-column type="seq" width="60" title="序号"></vxe-column>
-              <vxe-column type="checkbox"  width="60px"></vxe-column>
-              <vxe-column  title="实例标题" field="title" >
-                <template #default="scope">
-					<el-link type="primary" :underline="false" @click="todo(scope.row)">
-						<span v-if="scope.row.repetitionCount > 0 && scope.row.type === '未读'" >
-							<span style="color: red; font-weight: bold;">【{{ scope.row.repetitionCount }}】</span>{{ scope.row.title }}
-						</span>
-						<span v-else>
-							{{ scope.row.title }}
-						</span>
-					</el-link>
-                </template>
-              </vxe-column>
-              <vxe-column  title="流程名称" field="taskName" > </vxe-column>
-              <vxe-column  title="流程发起人" field="createUser" ></vxe-column>
-              <vxe-column
-                field="createTime"
-                title="创建时间">
-              </vxe-column>
-              <vxe-column  title="读取状态" field="type" ></vxe-column>
-            </vxe-table>
-			<vxe-pager
-				background
-				:current-page="tablePage.currentPage"
-				:page-size="tablePage.pageSize"
-				:total="tablePage.total"
-				:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
-				:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
-				@page-change="currentChangeHandle">
-			</vxe-pager>
-        </div>
-      </div>
-    <WareHouseHistoryPopup ref="wareHouseHistoryPopup"></WareHouseHistoryPopup>
-	  <RegisterPopup ref="registerPopup"></RegisterPopup>
-	  <KeyCardPopup ref="keyCardPopup"></KeyCardPopup>
-	  <DepartPopup ref="departPopup"></DepartPopup>
-	  <DepartProvePopup ref="departProvePopup"></DepartProvePopup>
-	  <ProjectRecordsForm ref="projectRecordsForm"></ProjectRecordsForm>
-	  <CwInvoiceForm  ref="cwInvoiceForm"></CwInvoiceForm>
-	  <InvoiceForm  ref="invoiceForm" ></InvoiceForm>
-  </div>
+			<div class="table-container">
+				<vxe-table border="inner" auto-resize resizable height="auto" :loading="loading" ref="todoTable"
+					show-header-overflow show-overflow highlight-hover-row :data="dataList" :checkbox-config="{}">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column type="checkbox" width="60px"></vxe-column>
+					<vxe-column title="实例标题" field="title">
+						<template #default="scope">
+							<el-link type="primary" :underline="false" @click="todo(scope.row)">
+								<span v-if="scope.row.repetitionCount > 0 && scope.row.type === '未读'">
+									<span style="color: red; font-weight: bold;">【{{ scope.row.repetitionCount
+									}}】</span>{{ scope.row.title }}
+								</span>
+								<span v-else>
+									{{ scope.row.title }}
+								</span>
+							</el-link>
+						</template>
+					</vxe-column>
+					<vxe-column title="流程名称" field="taskName"> </vxe-column>
+					<vxe-column title="流程发起人" field="createUser"></vxe-column>
+					<vxe-column field="createTime" title="创建时间">
+					</vxe-column>
+					<vxe-column title="读取状态" field="type"></vxe-column>
+				</vxe-table>
+				<vxe-pager background :current-page="tablePage.currentPage" :page-size="tablePage.pageSize"
+					:total="tablePage.total" :page-sizes="[10, 20, 100, 1000, { label: '全量数据', value: 1000000 }]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+			</div>
+		</div>
+		<WareHouseHistoryPopup ref="wareHouseHistoryPopup"></WareHouseHistoryPopup>
+		<PsiWareHouseHistoryPopup ref="wareHouseHistoryPopup2"></PsiWareHouseHistoryPopup>
+		<PurchasePageFormCurrent ref="purchasePageFormCurrent"></PurchasePageFormCurrent>
+		<RegisterPopup ref="registerPopup"></RegisterPopup>
+		<KeyCardPopup ref="keyCardPopup"></KeyCardPopup>
+		<DepartPopup ref="departPopup"></DepartPopup>
+		<DepartProvePopup ref="departProvePopup"></DepartProvePopup>
+		<ProjectRecordsForm ref="projectRecordsForm"></ProjectRecordsForm>
+		<CwInvoiceForm ref="cwInvoiceForm"></CwInvoiceForm>
+		<InvoiceForm ref="invoiceForm"></InvoiceForm>
+	</div>
 </template>
 
 <script>
-  import WareHouseHistoryPopup from '@/views/materialManagement/wareHouseSummary/WareHouseHistoryPopup'
-  import RegisterPopup from '@/views/human/practice/register/RegisterPopup'
-  import taskService from '@/api/flowable/taskService'
-  import noticeService from '@/api/flowable/noticeService'
-  import KeyCardPopup from '@/views/human/enrollment/registration/KeyCardPopup'
-  import DepartPopup from '@/views/human/depart/handover/DepartPopup'
-  import DepartProvePopup from '@/views/human/depart/handover/DepartProvePopup'
-  import ProjectRecordsForm from "@/views/cw/projectRecords/ProjectRecordsForm";
-  import CwInvoiceForm from '@/views/cw/invoice/InvoiceForm'
-  import InvoiceForm from '@/views/finance/invoice/InvoiceForm'
+import WareHouseHistoryPopup from '@/views/materialManagement/wareHouseSummary/WareHouseHistoryPopup'
+import PsiWareHouseHistoryPopup from '@/views/psiManagement/loss/PurchasePageFormPopup.vue'
+import PurchasePageFormCurrent from '@/views/psiManagement/loss/PurchasePageFormCurrent.vue'
+import RegisterPopup from '@/views/human/practice/register/RegisterPopup'
+import taskService from '@/api/flowable/taskService'
+import noticeService from '@/api/flowable/noticeService'
+import KeyCardPopup from '@/views/human/enrollment/registration/KeyCardPopup'
+import DepartPopup from '@/views/human/depart/handover/DepartPopup'
+import DepartProvePopup from '@/views/human/depart/handover/DepartProvePopup'
+import ProjectRecordsForm from "@/views/cw/projectRecords/ProjectRecordsForm";
+import CwInvoiceForm from '@/views/cw/invoice/InvoiceForm'
+import InvoiceForm from '@/views/finance/invoice/InvoiceForm'
 
-  import pick from 'lodash.pick'
-  export default {
-    data () {
-      return {
-        dataList: [],
-        typeList: [],
-        searchForm: {
-          title: '',
-          taskName: ''
-        },
-        tablePage: {
-          total: 0,
-          currentPage: 1,
-          pageSize: 10,
-          orders: []
-        },
-        loading: false,
-        visible: false,
-        currentTask: null,
-        processInstanceId: ''
-      }
-    },
-    created () {
-      this.typeList = [
-        {id: '0', value: '未读'},
-        {id: '1', value: '已读'}
-      ]
-    },
-    activated () {
-      this.refreshList()
-    },
-    components: {
-      WareHouseHistoryPopup,
+import pick from 'lodash.pick'
+export default {
+	data() {
+		return {
+			dataList: [],
+			typeList: [],
+			searchForm: {
+				title: '',
+				taskName: ''
+			},
+			tablePage: {
+				total: 0,
+				currentPage: 1,
+				pageSize: 10,
+				orders: []
+			},
+			loading: false,
+			visible: false,
+			currentTask: null,
+			processInstanceId: ''
+		}
+	},
+	created() {
+		this.typeList = [
+			{ id: '0', value: '未读' },
+			{ id: '1', value: '已读' }
+		]
+	},
+	activated() {
+		this.refreshList()
+	},
+	components: {
+		WareHouseHistoryPopup,
+		PsiWareHouseHistoryPopup,
+		PurchasePageFormCurrent,
 		RegisterPopup,
 		KeyCardPopup,
 		DepartPopup,
@@ -134,191 +128,212 @@
 		ProjectRecordsForm,
 		CwInvoiceForm,
 		InvoiceForm,
-    },
-    methods: {
-      // 获取数据列表
-      refreshList () {
-        this.loading = true
-        if (this.commonJS.isEmpty(this.searchForm.type)) {
-          this.searchForm.type = '0'
-        }
-        noticeService.list({
-          'current': this.tablePage.currentPage,
-          'size': this.tablePage.pageSize,
-          'orders': this.tablePage.orders,
-          ...this.searchForm
-        }).then((data) => {
-        	console.log('data',data.records)
-          this.dataList = data.records
-          this.tablePage.total = data.total
-          this.loading = false
-        })
-      },
-      // 当前页
-      currentChangeHandle ({ currentPage, pageSize }) {
-        this.tablePage.currentPage = currentPage
-        this.tablePage.pageSize = pageSize
-        this.refreshList()
-      },
-      todo (row) {
-        // console.log('row', row)
-		  if (row.taskName === '评估发票超期收款') {
-			  // console.log('测试进来了')
-			  console.log('id',row.defId)
-			  this.$refs.invoiceForm.init(false,row.defId)
-			  this.inputForm = {
-				  id: row.id
-			  }
-			  noticeService.stockUpdate(this.inputForm)
-			  this.resetSearch()
-		  }else if (row.taskName === '超期收款发票') {
-			  // console.log('测试进来了')
-			  console.log('id',row.defId)
-			  this.$refs.cwInvoiceForm.init(false,row.defId)
-			  this.inputForm = {
-				  id: row.id
-			  }
-			  noticeService.stockUpdate(this.inputForm)
-			  this.resetSearch()
-		  }else if (row.taskName === '库存提醒') {
-          // console.log('测试进来了')
-          this.$refs.wareHouseHistoryPopup.init(row.defId)
-          this.inputForm = {
-            id: row.id
-          }
-          noticeService.stockUpdate(this.inputForm)
-          this.resetSearch()
-        }else if (row.taskName === '实习日志超时提醒') {
-			this.$refs.registerPopup.init(row.defId)
-			this.inputForm = {
-				id: row.id
+	},
+	methods: {
+		// 获取数据列表
+		refreshList() {
+			this.loading = true
+			if (this.commonJS.isEmpty(this.searchForm.type)) {
+				this.searchForm.type = '0'
 			}
-			noticeService.stockUpdate(this.inputForm)
-			this.resetSearch()
-		}else if (row.taskName === '门卡领取提醒') {
-			this.$refs.keyCardPopup.init()
-			this.inputForm = {
-				id: row.id
-			}
-			noticeService.stockUpdate(this.inputForm)
-			this.resetSearch()
-		}else if (row.taskName.includes('离职提醒')) {
-			this.$refs.departPopup.init(row.taskName)
-			this.inputForm = {
-				id: row.id
-			}
-			noticeService.stockUpdate(this.inputForm)
-			this.resetSearch()
-		}else if (row.taskName.includes('请点击下载离职证明')) {
-			this.$refs.departProvePopup.init(row.taskName,row.defId)
-			this.inputForm = {
-				id: row.id
-			}
-			noticeService.stockUpdate(this.inputForm)
-			this.resetSearch()
-		}else if (row.taskName === '预开票项目未关联') {
-			this.$refs.projectRecordsForm.init('view',row.defId)
-			this.inputForm = {
-				id: row.id
+			noticeService.list({
+				'current': this.tablePage.currentPage,
+				'size': this.tablePage.pageSize,
+				'orders': this.tablePage.orders,
+				...this.searchForm
+			}).then((data) => {
+				console.log('data', data.records)
+				this.dataList = data.records
+				this.tablePage.total = data.total
+				this.loading = false
+			})
+		},
+		// 当前页
+		currentChangeHandle({ currentPage, pageSize }) {
+			this.tablePage.currentPage = currentPage
+			this.tablePage.pageSize = pageSize
+			this.refreshList()
+		},
+		todo(row) {
+			// console.log('row', row)
+			if (row.taskName === '评估发票超期收款') {
+				// console.log('测试进来了')
+				console.log('id', row.defId)
+				this.$refs.invoiceForm.init(false, row.defId)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			} else if (row.taskName === '超期收款发票') {
+				// console.log('测试进来了')
+				console.log('id', row.defId)
+				this.$refs.cwInvoiceForm.init(false, row.defId)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			} else if (row.taskName === '库存提醒') {
+				// console.log('测试进来了')
+				this.$refs.wareHouseHistoryPopup.init(row.defId)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			} else if (row.taskName === '物资库存提醒') {
+				// console.log('测试进来了')
+				this.$refs.purchasePageFormCurrent.init(row.defId)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			} else if (row.taskName === '物资临期提醒') {
+
+				this.$refs.wareHouseHistoryPopup2.init(row.defId)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			} else if (row.taskName === '实习日志超时提醒') {
+				this.$refs.registerPopup.init(row.defId)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			} else if (row.taskName === '门卡领取提醒') {
+				this.$refs.keyCardPopup.init()
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			} else if (row.taskName.includes('离职提醒')) {
+				this.$refs.departPopup.init(row.taskName)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			} else if (row.taskName.includes('请点击下载离职证明')) {
+				this.$refs.departProvePopup.init(row.taskName, row.defId)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			} else if (row.taskName === '预开票项目未关联') {
+				this.$refs.projectRecordsForm.init('view', row.defId)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			} else {
+				this.inputForm = {
+					taskId: '',
+					noticeId: '',
+					taskName: ''
+				}
+				taskService.getTaskDef({
+					procInsId: row.taskId,
+					procDefId: row.defId
+				}).then((data) => {
+					this.inputForm.taskId = row.taskId
+					this.inputForm.noticeId = row.noticeName
+					this.inputForm.taskName = row.taskName
+					noticeService.update(this.inputForm)
+					this.$router.push({
+						path: '/flowable/task/TaskFormDetail',
+						query: {
+							isShow: false,
+							formReadOnly: true,
+							formTitle: `${row.title}`,
+							num: 2,
+							title: `审批【${row.taskName || ''}】`,
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId')
+						}
+					})
+				})
 			}
-			noticeService.stockUpdate(this.inputForm)
-			this.resetSearch()
-		}else {
-          this.inputForm = {
-            taskId: '',
-            noticeId: '',
-		    taskName: ''
-          }
-          taskService.getTaskDef({
-            procInsId: row.taskId,
-            procDefId: row.defId
-          }).then((data) => {
-            this.inputForm.taskId = row.taskId
-            this.inputForm.noticeId = row.noticeName
-            this.inputForm.taskName = row.taskName
-            noticeService.update(this.inputForm)
-            this.$router.push({
-              path: '/flowable/task/TaskFormDetail',
-              query: {
-                isShow: false,
-                formReadOnly: true,
-                formTitle: `${row.title}`,
-                num: 2,
-                title: `审批【${row.taskName || ''}】`,
-                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId')
-              }
-            })
-          })
-        }
-      },
-      resetSearch () {
-        this.$refs.searchForm.resetFields()
-        this.refreshList()
-      },
-      handleClick (tab) {
-        const val = tab.index
-        this.searchForm.type = val
-        this.refreshList()
-      },
+		},
+		resetSearch() {
+			this.$refs.searchForm.resetFields()
+			this.refreshList()
+		},
+		handleClick(tab) {
+			const val = tab.index
+			this.searchForm.type = val
+			this.refreshList()
+		},
 
-      // 全部已读
-      readAll () {
-        this.$confirm(`确定将全部信息标记为已读吗?`, '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          this.loading = true
-          noticeService.readAll().then((data) => {
-            this.loading = false
-            this.$message({
-              message: data,
-              type: 'success',
-              duration: 1500
-            })
-            this.refreshList()
-          })
-        })
-      },
+		// 全部已读
+		readAll() {
+			this.$confirm(`确定将全部信息标记为已读吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				this.loading = true
+				noticeService.readAll().then((data) => {
+					this.loading = false
+					this.$message({
+						message: data,
+						type: 'success',
+						duration: 1500
+					})
+					this.refreshList()
+				})
+			})
+		},
 
-      // 部分已读
-      portionRead (id) {
-        let ids = id || this.$refs.todoTable.getCheckboxRecords().map(item => {
-          return item.id
-        }).join(',')
-        this.$confirm(`确定将选定信息标记为已读吗?`, '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          this.loading = true
-          noticeService.portionRead(ids).then((data) => {
-            this.loading = false
-            this.$message({
-              message: data,
-              type: 'success',
-              duration: 1500
-            })
-            this.refreshList()
-          })
-        })
-      }
-    }
-  }
+		// 部分已读
+		portionRead(id) {
+			let ids = id || this.$refs.todoTable.getCheckboxRecords().map(item => {
+				return item.id
+			}).join(',')
+			this.$confirm(`确定将选定信息标记为已读吗?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning'
+			}).then(() => {
+				this.loading = true
+				noticeService.portionRead(ids).then((data) => {
+					this.loading = false
+					this.$message({
+						message: data,
+						type: 'success',
+						duration: 1500
+					})
+					this.refreshList()
+				})
+			})
+		}
+	}
+}
 </script>
 <style scoped>
-	.table-container {
-		height: calc(85% - 90px); /* 调整容器高度,确保分页显示正常 */
-		display: flex; /* 使用 flex 布局 */
-		flex-direction: column; /* 垂直方向布局 */
-	}
+.table-container {
+	height: calc(85% - 90px);
+	/* 调整容器高度,确保分页显示正常 */
+	display: flex;
+	/* 使用 flex 布局 */
+	flex-direction: column;
+	/* 垂直方向布局 */
+}
 
-	/* 可根据需要调整表格和分页的样式 */
-	.vxe-table {
-		flex: 1; /* 表格自动填充容器剩余空间 */
-	}
+/* 可根据需要调整表格和分页的样式 */
+.vxe-table {
+	flex: 1;
+	/* 表格自动填充容器剩余空间 */
+}
 
-	.vxe-pager {
-		margin-top: 10px; /* 调整分页组件的上边距 */
-	}
+.vxe-pager {
+	margin-top: 10px;
+	/* 调整分页组件的上边距 */
+}
 </style>

+ 23 - 0
src/views/home/components/MyNoticePageList2.vue

@@ -37,6 +37,8 @@
 		</div>
 	</el-card>
 	<WareHouseHistoryPopup ref="wareHouseHistoryPopup"></WareHouseHistoryPopup>
+	<PsiWareHouseHistoryPopup ref="wareHouseHistoryPopup2"></PsiWareHouseHistoryPopup>
+	<PurchasePageFormCurrent ref="purchasePageFormCurrent"></PurchasePageFormCurrent>
 	<RegisterPopup ref="registerPopup"></RegisterPopup>
 	<KeyCardPopup ref="keyCardPopup"></KeyCardPopup>
 	<DepartPopup ref="departPopup"></DepartPopup>
@@ -45,6 +47,9 @@
 
 <script>
 import WareHouseHistoryPopup from '@/views/materialManagement/wareHouseSummary/WareHouseHistoryPopup'
+import PsiWareHouseHistoryPopup from '@/views/psiManagement/loss/PurchasePageFormPopup.vue'
+import PurchasePageFormCurrent from '@/views/psiManagement/loss/PurchasePageFormCurrent.vue'
+
 import RegisterPopup from '@/views/human/practice/register/RegisterPopup'
 import KeyCardPopup from '@/views/human/enrollment/registration/KeyCardPopup'
 import DepartPopup from '@/views/human/depart/handover/DepartPopup'
@@ -63,6 +68,8 @@ export default {
 	// },
 	components: {
 		WareHouseHistoryPopup,
+		PsiWareHouseHistoryPopup,
+		PurchasePageFormCurrent,
 		RegisterPopup,
 		KeyCardPopup,
 		DepartPopup,
@@ -120,6 +127,22 @@ export default {
 				}
 				noticeService.stockUpdate(this.inputForm)
 				this.resetSearch()
+			} else if (row.taskName === '物资库存提醒') {
+				// console.log('测试进来了')
+				this.$refs.purchasePageFormCurrent.init(row.defId)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
+			} else if (row.taskName === '物资临期提醒') {
+				// console.log('测试进来了')
+				this.$refs.wareHouseHistoryPopup2.init(row.defId)
+				this.inputForm = {
+					id: row.id
+				}
+				noticeService.stockUpdate(this.inputForm)
+				this.resetSearch()
 			} else if (row.taskName === '实习日志超时提醒') {
 				this.$refs.registerPopup.init(row.defId)
 				this.inputForm = {

+ 7 - 0
src/views/psiManagement/collect/CollectForm.vue

@@ -662,6 +662,13 @@ export default {
 								this.loading = false
 								return
 							}
+
+							if (parseFloat(this.inputForm.detailInfos[j].collectNumber) > parseFloat(this.inputForm.detailInfos[j].surplusNumber) * parseFloat(this.inputForm.detailInfos[j].spec)) {
+								this.$message.error('领用详情第' + k + '行领用数量不能大于库存数量')
+								this.loading = false
+								return
+							}
+
 						}
 					}
 					this.inputForm.files = this.$refs.uploadComponent.getDataList()

+ 149 - 0
src/views/psiManagement/loss/PurchasePageFormCurrent.vue

@@ -0,0 +1,149 @@
+<template>
+	<div>
+		<el-dialog title="物资库存" :close-on-click-modal="false" draggable width="1100px" height="500px" @close="close"
+			append-to-body v-model="visible">
+			<div style="height: calc(100% - 80px);">
+				<el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+					<!-- 搜索框-->
+					<el-form-item label="商品名称" prop="tradeName">
+						<el-input v-model="searchForm.tradeName" placeholder="请输入商品名称" clearable></el-input>
+					</el-form-item>
+
+					<el-form-item>
+						<el-button type="primary" @click="list()" icon="el-icon-search">查询</el-button>
+						<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+					</el-form-item>
+				</el-form>
+
+				<vxe-table border="inner" auto-resize resizable height="400px" :loading="loading" ref="projectTable"
+					show-header-overflow show-overflow highlight-hover-row :menu-config="{}" :print-config="{}"
+					:sort-config="{ remote: true }" :data="dataList" :row-config="{ isCurrent: true }"
+					:radio-config="{ trigger: 'row' }">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column type="radio" width="60px"></vxe-column>
+					<vxe-column min-width="230" align="center" title="商品名称" field="tradeName"></vxe-column>
+					<vxe-column min-width="230" align="center" title="库存量" field="tradeNumber"></vxe-column>
+
+				</vxe-table>
+				<vxe-pager background :current-page="tablePage.currentPage" :page-size="tablePage.pageSize"
+					:total="tablePage.total" :page-sizes="[10, 20, 100, 1000, { label: '全量数据', value: 1000000 }]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+			</div>
+			<template #footer>
+				<span class="dialog-footer">
+					<el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+					<el-button type="primary" v-if="method != 'view'" @click="getProject()" icon="el-icon-circle-check"
+						v-noMoreClick>确定</el-button>
+				</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+// import CollectService from '@/api/materialManagement/CollectService'
+import WareHouseService from '@/api/psi/WareHouseService'
+import Template from '../../../assets/icons/template.vue'
+export default {
+	data() {
+		return {
+			title: '',
+			method: '',
+			visible: false,
+			loading: false,
+			tablePage: {
+				total: 0,
+				currentPage: 1,
+				pageSize: 10,
+				orders: []
+			},
+			dataList: [],
+			searchForm: {
+				wareHouseType: '',
+				tradeName: ''
+			},
+			typeTest: ''
+		}
+	},
+	// collectService: null,
+	wareHouseService: null,
+	created() {
+		// this.collectService = new CollectService()
+		this.wareHouseService = new WareHouseService()
+	},
+	components: {
+		Template
+	},
+	methods: {
+		init(collectType) {
+			this.visible = true
+			this.typeTest = collectType
+			this.list()
+		},
+		// 表单提交
+		getProject() {
+			let row = this.$refs.projectTable.getRadioRecord()
+			if (this.commonJS.isEmpty(row)) {
+				this.$message.error('请选择一条数据')
+				return
+			}
+			if (row.tradeNumber == "0") {
+				this.$message.error('暂无库存,请选择其他商品')
+				return
+			}
+			this.close()
+			this.$emit('getProject', row)
+		},
+		list() {
+			this.loading = true
+			// this.searchForm.createId = this.$store.state.user.id
+			// this.searchForm.status = '5'
+			this.searchForm.wareHouseType = this.typeTest
+			// this.collectService.wareHouseList({
+			//   'current': this.tablePage.currentPage,
+			//   'size': this.tablePage.pageSize,
+			//   'orders': this.tablePage.orders,
+			//   ...this.searchForm
+			// }).then((data) => {
+			//   this.dataList = data.records
+			//   this.tablePage.total = data.total
+			//   this.loading = false
+			// })
+			this.wareHouseService.getByProduceDateAndNameGroup({
+				'current': this.tablePage.currentPage,
+				'size': this.tablePage.pageSize,
+				'orders': this.tablePage.orders,
+				...this.searchForm
+			}).then((data) => {
+				this.dataList = data.records
+				this.tablePage.total = data.total
+				this.tableKey = Math.random()
+				this.loading = false
+			})
+		},
+		// 当前页
+		currentChangeHandle({ currentPage, pageSize }) {
+			this.tablePage.currentPage = currentPage
+			this.tablePage.pageSize = pageSize
+			this.list()
+		},
+		resetSearch() {
+			this.$refs.searchForm.resetFields()
+			this.list()
+		},
+		close() {
+			this.$refs.searchForm.resetFields()
+			this.visible = false
+			this.typeTest = ''
+		}
+	}
+}
+</script>
+<style scoped>
+/deep/ .el-dialog__body {
+	padding-top: 0px;
+	padding-bottom: 15px;
+}
+</style>

+ 144 - 0
src/views/psiManagement/loss/PurchasePageFormPopup.vue

@@ -0,0 +1,144 @@
+<template>
+	<div>
+		<el-dialog title="物资库存" :close-on-click-modal="false" draggable width="1100px" height="500px" @close="close"
+			append-to-body v-model="visible">
+			<div style="height: calc(100% - 80px);">
+				<el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+					<!-- 搜索框-->
+					<el-form-item label="商品名称" prop="tradeName">
+						<el-input v-model="searchForm.tradeName" placeholder="请输入商品名称" clearable></el-input>
+					</el-form-item>
+
+					<el-form-item>
+						<el-button type="primary" @click="list()" icon="el-icon-search">查询</el-button>
+						<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+					</el-form-item>
+				</el-form>
+
+				<vxe-table border="inner" auto-resize resizable height="400px" :loading="loading" ref="projectTable"
+					show-header-overflow show-overflow highlight-hover-row :menu-config="{}" :print-config="{}"
+					:sort-config="{ remote: true }" :data="dataList" :row-config="{ isCurrent: true }"
+					:radio-config="{ trigger: 'row' }">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<!-- <vxe-column type="radio" width="60px"></vxe-column> -->
+					<vxe-column align="center" title="商品名称" field="tradeName"></vxe-column>
+					<vxe-column align="center" title="生产日期" field="produceDate"></vxe-column>
+					<vxe-column align="center" title="保质期" field="shelfLife">
+						<template #default="scope">
+							<span>{{ scope.row.shelfLife }}{{ scope.row.shelfLifeUnit }}</span>
+						</template>
+					</vxe-column>
+					<vxe-column align="center" title="库存量" field="currentInventory"></vxe-column>
+					<!--          <vxe-column min-width="230" align="center" title="商品数量" field="tradeNumber"></vxe-column>-->
+					<vxe-column align="center" title="过期日期" field="expiryDate"></vxe-column>
+
+				</vxe-table>
+				<vxe-pager background :current-page="tablePage.currentPage" :page-size="tablePage.pageSize"
+					:total="tablePage.total" :page-sizes="[10, 20, 100, 1000, { label: '全量数据', value: 1000000 }]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+			</div>
+			<template #footer>
+				<span class="dialog-footer">
+					<el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+					<el-button type="primary" v-if="method != 'view'" @click="getProject()" icon="el-icon-circle-check"
+						v-noMoreClick>确定</el-button>
+				</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+// import CollectService from '@/api/materialManagement/CollectService'
+import WareHouseService from '@/api/psi/WareHouseService'
+import Template from '../../../assets/icons/template.vue'
+export default {
+	data() {
+		return {
+			title: '',
+			method: '',
+			visible: false,
+			loading: false,
+			tablePage: {
+				total: 0,
+				currentPage: 1,
+				pageSize: 10,
+				orders: []
+			},
+			dataList: [],
+			searchForm: {
+				wareHouseType: '',
+				tradeName: ''
+			},
+			typeTest: ''
+		}
+	},
+	// collectService: null,
+	wareHouseService: null,
+	created() {
+		// this.collectService = new CollectService()
+		this.wareHouseService = new WareHouseService()
+	},
+	components: {
+		Template
+	},
+	methods: {
+		init(collectType) {
+			this.visible = true
+			this.typeTest = collectType
+			this.list()
+		},
+		// 表单提交
+		getProject() {
+			let row = this.$refs.projectTable.getRadioRecord()
+			if (this.commonJS.isEmpty(row)) {
+				this.$message.error('请选择一条数据')
+				return
+			}
+			if (row.tradeNumber == "0") {
+				this.$message.error('暂无库存,请选择其他商品')
+				return
+			}
+			this.close()
+			this.$emit('getProject', row)
+		},
+		list() {
+			this.loading = true
+			this.wareHouseService.getAllData({
+				'current': this.tablePage.currentPage,
+				'size': this.tablePage.pageSize,
+				'orders': this.tablePage.orders,
+				...this.searchForm
+			}).then((data) => {
+				this.dataList = data.records
+				this.tablePage.total = data.total
+				this.tableKey = Math.random()
+				this.loading = false
+			})
+		},
+		// 当前页
+		currentChangeHandle({ currentPage, pageSize }) {
+			this.tablePage.currentPage = currentPage
+			this.tablePage.pageSize = pageSize
+			this.list()
+		},
+		resetSearch() {
+			this.$refs.searchForm.resetFields()
+			this.list()
+		},
+		close() {
+			this.$refs.searchForm.resetFields()
+			this.visible = false
+			this.typeTest = ''
+		}
+	}
+}
+</script>
+<style scoped>
+/deep/ .el-dialog__body {
+	padding-top: 0px;
+	padding-bottom: 15px;
+}
+</style>