Bläddra i källkod

月报,公告

sangwenwei 1 år sedan
förälder
incheckning
40dff571fb

+ 8 - 0
src/api/jy/NotifyService.js

@@ -133,4 +133,12 @@ export default class NotifyService {
 		});
 	}
 
+	refreshComments (id) {
+		return request({
+			url:prefix+ '/jy/notify/refreshComments',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
 }

+ 34 - 28
src/views/dashboard/widgets/components/MyFlowCopyList.vue

@@ -70,11 +70,13 @@
 		>
 		</vxe-pager>
 	</el-card>
+	<MonthlyForm ref="monthlyForm" @refreshList="refreshList"></MonthlyForm>
 </template>
 
 <script>
 import flowCopyService from "@/api/flowable/flowCopyService";
 import taskService from "@/api/flowable/taskService";
+import MonthlyForm from '@/views/jy/monthly/MonthlyForm'
 import pick from "lodash.pick";
 export default {
 	title: "抄送事项",
@@ -85,7 +87,7 @@ export default {
 		h: 15,
 	},
 	components: {
-
+		MonthlyForm
 	},
 	data() {
 		return {
@@ -150,34 +152,38 @@ export default {
 		},
 		// 查看
 		detail(row) {
-			taskService
-				.getTaskDef({
-					procInsId: row.procInsId,
-					procDefId: row.procDefId,
-				})
-				.then((data) => {
-					this.$router.push({
-						path: "/flowable/task/TaskFormDetail",
-						query: {
-							readOnly: true,
-							title: row.procInsName,
-							formTitle: row.procInsName,
-							...pick(
-								data,
-								"formType",
-								"formUrl",
-								"procDefKey",
-								"taskDefKey",
-								"procInsId",
-								"procDefId",
-								"taskId",
-								"status",
-								"title",
-								"businessId"
-							),
-						},
+			if (row.procInsName.includes("月报")){
+				this.$refs.monthlyForm.init('view',row.procInsId)
+			}else {
+				taskService
+					.getTaskDef({
+						procInsId: row.procInsId,
+						procDefId: row.procDefId,
+					})
+					.then((data) => {
+						this.$router.push({
+							path: "/flowable/task/TaskFormDetail",
+							query: {
+								readOnly: true,
+								title: row.procInsName,
+								formTitle: row.procInsName,
+								...pick(
+									data,
+									"formType",
+									"formUrl",
+									"procDefKey",
+									"taskDefKey",
+									"procInsId",
+									"procDefId",
+									"taskId",
+									"status",
+									"title",
+									"businessId"
+								),
+							},
+						});
 					});
-				});
+			}
 		},
 		resetSearch() {
 			this.$refs.searchForm.resetFields();

+ 9 - 9
src/views/dashboard/widgets/components/MyNotifyList.vue

@@ -25,15 +25,15 @@
 				</template>
 			</el-table-column>
 			<el-table-column label="类型" prop="type" min-width="200px">
-				<template #default="scope">
-					{{
-						$dictUtils.getDictLabel(
-							"oa_notify_type",
-							scope.row.type,
-							"-"
-						)
-					}}
-				</template>
+<!--				<template #default="scope">-->
+<!--					{{-->
+<!--						$dictUtils.getDictLabel(-->
+<!--							"oa_notify_type",-->
+<!--							scope.row.type,-->
+<!--							"-"-->
+<!--						)-->
+<!--					}}-->
+<!--				</template>-->
 			</el-table-column>
 <!--			<el-table-column-->
 <!--				show-overflow-tooltip-->

+ 38 - 28
src/views/flowable/extension/FlowCopyList.vue

@@ -161,6 +161,7 @@
 			ref="userSelect2"
 			@doSubmit="selectUser">
 		</user-select2>
+		<MonthlyForm ref="monthlyForm" @refreshList="refreshList"></MonthlyForm>
 	</div>
 </template>
 
@@ -170,6 +171,9 @@ import pick from "lodash.pick";
 import taskService from "@/api/flowable/taskService";
 import flowCopyService from "@/api/flowable/flowCopyService";
 import UserSelect2 from '@/components/userSelect2/UserSelectDialog';
+import MonthlyForm from '@/views/jy/monthly/MonthlyForm'
+
+
 export default {
 	data() {
 		return {
@@ -192,7 +196,8 @@ export default {
 		};
 	},
 	components: {
-		UserSelect2
+		UserSelect2,
+		MonthlyForm
 	},
 	mounted() {
 		this.$nextTick(() => {
@@ -248,34 +253,39 @@ export default {
 			});
 		},
 		detail(row) {
-			taskService
-				.getTaskDef({
-					procInsId: row.procInsId,
-					procDefId: row.procDefId,
-				})
-				.then((data) => {
-					this.$router.push({
-						path: "/flowable/task/TaskFormDetail",
-						query: {
-							readOnly: true,
-							title: row.procInsName,
-							formTitle: row.procInsName,
-							...pick(
-								data,
-								"formType",
-								"formUrl",
-								"procDefKey",
-								"taskDefKey",
-								"procInsId",
-								"procDefId",
-								"taskId",
-								"status",
-								"title",
-								"businessId"
-							),
-						},
+			if (row.procInsName.includes("月报")){
+				this.$refs.monthlyForm.init('view',row.procInsId)
+			}else {
+				taskService
+					.getTaskDef({
+						procInsId: row.procInsId,
+						procDefId: row.procDefId,
+					})
+					.then((data) => {
+						this.$router.push({
+							path: "/flowable/task/TaskFormDetail",
+							query: {
+								readOnly: true,
+								title: row.procInsName,
+								formTitle: row.procInsName,
+								...pick(
+									data,
+									"formType",
+									"formUrl",
+									"procDefKey",
+									"taskDefKey",
+									"procInsId",
+									"procDefId",
+									"taskId",
+									"status",
+									"title",
+									"businessId"
+								),
+							},
+						});
 					});
-				});
+			}
+
 		},
 		// 删除
 		del(id) {

+ 8 - 2
src/views/jy/monthly/MonthlyForm.vue

@@ -107,8 +107,9 @@
 			  <el-button type="primary" @click="doSubmit()" v-if="method !== 'view'" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
 			</span>
 			</template>
-			<ProjectDia  ref="projectDia" @refreshDataList="refreshList"></ProjectDia>
 		</el-dialog>
+		<ProjectDia  ref="projectDia" @refreshDataList="refreshList"></ProjectDia>
+
 	</div>
 </template>
 
@@ -118,6 +119,7 @@
 	import { ElDatePicker } from 'element-plus';
 	import UpLoadComponent from '@/views/common/UpLoadComponent'
 	import ProjectDia from '@/views/jy/project/ProjectDia'
+	import ProjectInfoService from "@/api/jy/ProjectInfoService";
 	export default {
 		props: {
 			businessId: {
@@ -157,8 +159,10 @@
 			}
 		},
 		MonthlyService:null,
+		ProjectInfoService:null,
 		created () {
 			this.monthlyService=new MonthlyService()
+			this.projectInfoService=new ProjectInfoService()
 		},
 		mounted () {
 		},
@@ -323,7 +327,9 @@
 
 			viewProject (row) {
 				console.log("项目行信息:", row)
-				this.$refs.projectDia.init('view', row.projectId,row.auditId1, row.auditId2, row.auditId3,row.sealId,row.outInstanceId,row.reportsSubmitId,row.archiveId,row.eiaId)
+				this.projectInfoService.findById(row.projectId).then((data)=>{
+					this.$refs.projectDia.init('view', data.id,data.auditId1, data.auditId2, data.auditId3,data.sealId,data.outInstanceId,data.reportsSubmitId,data.archiveId,data.eiaId)
+				})
 			},
 
 

+ 32 - 3
src/views/jy/monthly/MonthlyList.vue

@@ -98,8 +98,8 @@
 								<el-button text type="primary" size="small" v-if="hasPermission('admin:del') && isJyAdmin" @click="del(scope.row.id)">删除</el-button>
 							</div>
 							<div v-else>
-								<el-button  size="small" text type="primary" v-if="hasPermission('monthly:edit') &&scope.row.createById === $store.state.user.id"  @click="edit(scope.row)">修改</el-button>
-								<el-button text type="primary" size="small" v-if="hasPermission('monthly:del') &&scope.row.createById === $store.state.user.id"  @click="del(scope.row.id)">删除</el-button>
+								<el-button  size="small" text type="primary" v-if="hasPermission('monthly:edit') &&scope.row.createById === $store.state.user.id && !scope.row.isDisabled"  @click="edit(scope.row)">修改</el-button>
+								<el-button text type="primary" size="small" v-if="hasPermission('monthly:del') &&scope.row.createById === $store.state.user.id && !scope.row.isDisabled"  @click="del(scope.row.id)">删除</el-button>
 							</div>
 						</template>
 					</vxe-column>
@@ -186,7 +186,7 @@
 			user () {
 				this.createName = this.$store.state.user.name
 				return this.$store.state.user
-			}
+			},
 		},
 		mounted () {
 			this.$nextTick(() => {
@@ -243,6 +243,7 @@
 					this.dataList = data.records
 					this.tablePage.total = data.total
 					this.tableKey = Math.random()
+					this.updateDisplayedList();
 					this.loading = false
 				})
 				this.checkIsAdmin()
@@ -254,6 +255,34 @@
 					}
 				})
 			},
+			updateDisplayedList() {
+				this.dataList = this.itemsWithDisabledButtons();
+			},
+			itemsWithDisabledButtons() {
+				const today = new Date();
+				const currentMonth = new Date(today.getFullYear(), today.getMonth(), 1); // 本月第一天
+				const currentMonthEnd = new Date(today.getFullYear(), today.getMonth() + 1, 0); // 本月最后一天
+				const isAfter25th = today.getDate() > 25; // 当前日期是否在本月25号之后
+
+				return this.dataList.map(item => {
+					let formattedMonthDate = item.monthDate.replace(/年|月/g, '') // 替换'年'和'月'为'-'
+						.padStart(6, '0'); // 确保是8位数字,前面用0填充
+
+					const monthDate = new Date(formattedMonthDate.slice(0, 4) + '-' + formattedMonthDate.slice(4, 6) + '-' + '01'); // 解析为Date对象,并设置为该月的第一天
+
+					// 判断是否需要禁用按钮
+					const isDisabled = (
+						monthDate < currentMonth // 在本月之前
+						|| (monthDate.getFullYear() === currentMonth.getFullYear() && monthDate.getMonth() === currentMonth.getMonth() && isAfter25th) // 本月但当前日期在25号之后
+					);
+
+					return {
+						...item,
+						isDisabled,
+					};
+				});
+			},
+
 			//判断当前登陆人是否是admin
 			checkIsJyAdmin(){
 				userService.checkIsJyAdmin().then((data)=>{

+ 11 - 14
src/views/jy/notify/MyNotifyList.vue

@@ -16,15 +16,16 @@
           </el-select>
         </el-form-item>
         <el-form-item label="类型" prop="type">
-          <el-select size="default" v-model="searchForm.type" placeholder="类型" clearable>
-            <el-option
-              v-for="item in $dictUtils.getDictList('oa_notify_type')"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value">
-            </el-option>
-          </el-select>
-        </el-form-item>
+<!--          <el-select size="default" v-model="searchForm.type" placeholder="类型" clearable>-->
+<!--            <el-option-->
+<!--              v-for="item in $dictUtils.getDictList('oa_notify_type')"-->
+<!--              :key="item.value"-->
+<!--              :label="item.label"-->
+<!--              :value="item.value">-->
+<!--            </el-option>-->
+<!--          </el-select>-->
+			<el-input size="default" v-model="searchForm.type" placeholder="类型" clearable></el-input>
+		</el-form-item>
         <el-form-item label="发布者" prop="createName">
           <UserSelect :limit='1' :userName="searchForm.createName" @getValue='(value, label) => {searchForm.createName = label}'></UserSelect>
         </el-form-item>
@@ -91,11 +92,7 @@
                  <el-link  type="primary" :underline="false" @click="view(scope.row.id)">{{scope.row.title}}</el-link>
               </template>
             </vxe-column>
-            <vxe-column min-width="180px" title="类型" field="type" align="center">
-                <template #default="scope">
-                  {{ $dictUtils.getDictLabel("oa_notify_type", scope.row.type, '-') }}
-                </template>
-            </vxe-column>
+            <vxe-column min-width="180px" title="类型" field="type" align="center"></vxe-column>
 
             <vxe-column min-width="180px" title="查阅状态" field="status" align="center">
               <template #default="scope">

+ 24 - 12
src/views/jy/notify/NotifyForm.vue

@@ -35,14 +35,15 @@
 								  :rules="[
                   {required: true, message:'类型不能为空', trigger:'blur'}
                  ]">
-						<el-select size="medium" v-model="inputForm.type" placeholder="请选择"  style="width: 100%;">
-							<el-option
-								v-for="item in $dictUtils.getDictList('oa_notify_type')"
-								:key="item.value"
-								:label="item.label"
-								:value="item.value">
-							</el-option>
-						</el-select>
+<!--						<el-select size="medium" v-model="inputForm.type" placeholder="请选择"  style="width: 100%;">-->
+<!--							<el-option-->
+<!--								v-for="item in $dictUtils.getDictList('oa_notify_type')"-->
+<!--								:key="item.value"-->
+<!--								:label="item.label"-->
+<!--								:value="item.value">-->
+<!--							</el-option>-->
+<!--						</el-select>-->
+						<el-input size="medium" v-model="inputForm.type" placeholder="请填写类型"     ></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="12">
@@ -674,9 +675,17 @@
         }
         this.loading = true
         this.notifyService.addComment(param).then((data) => {
-          this.init(this.method, this.inputForm.id)
-          this.$message.success(data)
-          this.loading = false
+        	//刷新评论列表
+			this.notifyService.refreshComments(this.inputForm.id).then((da) =>{
+				console.log('da',da)
+				this.inputForm.comments = da
+				this.inputForm.comment = ''
+				this.lookMore=true
+				this.initLength=3
+				this.$message.success(data)
+				this.loading = false
+			})
+
         })
       },
       cleanComment () {
@@ -684,7 +693,10 @@
       },
       delComment (id) {
         this.notifyService.delComment(id).then(() => {
-          this.init(this.method, this.inputForm.id)
+			//刷新评论列表
+			this.notifyService.refreshComments(this.inputForm.id).then((da) =>{
+				this.inputForm.comments = da
+			})
         })
       },
       changeEditor (cont) {

+ 11 - 14
src/views/jy/notify/NotifyList.vue

@@ -6,15 +6,16 @@
                 <el-input  size="default"  v-model="searchForm.title" placeholder="标题" clearable></el-input>
 		     </el-form-item>
         <el-form-item label="类型" prop="type">
-          <el-select   size="default" v-model="searchForm.type" placeholder="类型" clearable>
-            <el-option
-              v-for="item in $dictUtils.getDictList('oa_notify_type')"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value">
-            </el-option>
-          </el-select>
-        </el-form-item>
+<!--          <el-select   size="default" v-model="searchForm.type" placeholder="类型" clearable>-->
+<!--            <el-option-->
+<!--              v-for="item in $dictUtils.getDictList('oa_notify_type')"-->
+<!--              :key="item.value"-->
+<!--              :label="item.label"-->
+<!--              :value="item.value">-->
+<!--            </el-option>-->
+<!--          </el-select>-->
+			<el-input  size="default"  v-model="searchForm.type" placeholder="类型" clearable></el-input>
+		</el-form-item>
         <el-form-item label="发布者" prop="createById">
 			<UserSelect :limit='1' v-model="searchForm.createById" @update:modelValue='(value, label) => {searchForm.createById = value}'></UserSelect>
         </el-form-item>
@@ -89,11 +90,7 @@
 <!--                <span >{{scope.row.title}}</span>-->
               </template>
             </vxe-column>
-            <vxe-column min-width="100px" title="类型" field="type" align="center" >
-                <template #default="scope">
-                  {{ $dictUtils.getDictLabel("oa_notify_type", scope.row.type, '-') }}
-                </template>
-            </vxe-column>
+            <vxe-column min-width="100px" title="类型" field="type" align="center" ></vxe-column>
             <vxe-column min-width="100px" title="查阅状态" field="readNum" align="center" >
                <template #default="scope">
                  <span v-if="scope.row.status === '5'">

+ 22 - 14
src/views/jy/notify/NotifyTaskForm.vue

@@ -20,21 +20,29 @@
 <!--&lt;!&ndash;              </el-select>&ndash;&gt;-->
 <!--            </el-form-item>-->
 <!--          </el-col>-->
-          <el-col :span="12">
-            <el-form-item label="类型" prop="type"
-                          :rules="[
+<!--          <el-col :span="12">-->
+<!--            <el-form-item label="类型" prop="type"-->
+<!--                          :rules="[-->
+<!--                  {required: true, message:'类型不能为空', trigger:'blur'}-->
+<!--                 ]">-->
+<!--              <el-select size="medium" v-model="inputForm.type" placeholder="请选择"  style="width: 100%;">-->
+<!--                <el-option-->
+<!--                  v-for="item in $dictUtils.getDictList('oa_notify_type')"-->
+<!--                  :key="item.value"-->
+<!--                  :label="item.label"-->
+<!--                  :value="item.value">-->
+<!--                </el-option>-->
+<!--              </el-select>-->
+<!--            </el-form-item>-->
+<!--          </el-col>-->
+			<el-col :span="12">
+				<el-form-item label="类型" prop="type"
+							  :rules="[
                   {required: true, message:'类型不能为空', trigger:'blur'}
                  ]">
-              <el-select size="medium" v-model="inputForm.type" placeholder="请选择"  style="width: 100%;">
-                <el-option
-                  v-for="item in $dictUtils.getDictList('oa_notify_type')"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
+					<el-input size="medium" v-model="inputForm.type" placeholder="请填写类型"     ></el-input>
+				</el-form-item>
+			</el-col>
           <el-col :span="12">
             <el-form-item label="标题" prop="title"
                           :rules="[
@@ -434,7 +442,7 @@
 			console.log("进入方法是")
 			await this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((da)=>{
 				if (this.commonJS.isNotEmpty(da)) {
-					if (da === '总经理审核') {
+					if (da === '办公室审核') {
 						this.inputForm.status = '5'
 					}else{
 						this.inputForm.status = '2'

+ 1 - 1
src/views/jy/project/ReportsInstanceForm.vue

@@ -77,7 +77,7 @@
 								  :rules="[
 							 {required: true, message:'用印类型不能为空', trigger:'blur'}
 							]">
-						<el-cascader :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'"   style="width: 100%" v-model="inputForm.types" :options="typeData" @change="handleChange" placeholder="请选择"  clearable />
+						<el-cascader :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'"   style="width: 100%" v-model="inputForm.types" :options="typeData" placeholder="请选择"  clearable />
 					</el-form-item>
 				</el-col>
 				<el-col :span="12">