Browse Source

Merge remote-tracking branch 'origin/master'

LuChongMei 10 months ago
parent
commit
7b9170d229

+ 31 - 3
jp-console/jeeplus-modules/gw/src/main/java/com/jeeplus/circulation2/controller/GwCirculationCard2Controller.java

@@ -221,12 +221,40 @@ public class GwCirculationCard2Controller {
 
 		}
 
-
-
-
         return ResponseEntity.ok ( "保存公文流转成功" );
 	}
 
+	/**
+	 * 中止公文流转
+	 */
+	@ApiLog("中止公文流转")
+	@ApiOperation(value = "中止公文流转")
+	@PostMapping("abort")
+	public  ResponseEntity <String> abort(String id,String abort_reason) {
+
+		GwCirculationCard2DTO aa=gwCirculationCard2Wrapper.toDTO ( gwCirculationCard2Service.getById ( id ) );
+		aa.setState("2");
+		aa.setAbortReason(abort_reason);
+		gwCirculationCard2Service.saveOrUpdate (gwCirculationCard2Wrapper.toEntity (aa));
+
+		//流程中止  剩余流程which状态改成5中止
+		gwFlowService.suspendState(id);
+		//默认一条待办
+		GwFlowDTO gwFlowDTO=new GwFlowDTO();
+		gwFlowDTO.setGwId(id);
+		gwFlowDTO.setState("0");
+		UserDTO userDTO=UserUtils.getCurrentUserDTO();
+		gwFlowDTO.setCreateBy(userDTO);
+		gwFlowDTO.setUpdateBy(userDTO);
+		gwFlowDTO.setCreateTruename(userDTO.getName());
+		gwFlowDTO.setNextTruename(userDTO.getName());
+		gwFlowDTO.setNextUser(userDTO.getId());
+		gwFlowDTO.setWhich("5");
+		gwFlowService.saveOrUpdate (gwFlowWrapper.toEntity (gwFlowDTO));
+
+		return ResponseEntity.ok ( "中止公文流转成功" );
+	}
+
 
 	/**
 	 * 删除公文流转

+ 16 - 11
jp-console/jeeplus-modules/gw/src/main/java/com/jeeplus/circulation2/domain/GwCirculationCard2.java

@@ -20,57 +20,62 @@ public class GwCirculationCard2 extends BaseEntity {
 
 	private static final long serialVersionUID = 1L;
 
-			
+
 	/**
      * 年度
      */
 	private String yearNum;
-			
+
 	/**
      * 卡号
      */
 	private String cardNum;
-			
+
 	/**
      * 来文机关
      */
 	private String sendingAgency;
-			
+
 	/**
      * 来文字号
      */
 	private String docFontSize;
-			
+
 	/**
      * 文件来源
      */
 	private String fileSource;
-			
+
 	/**
      * 成文时间
      */
 	private Date writtenTime;
-			
+
 	/**
      * 收文时间
      */
 	private Date receivingTime;
-			
+
 	/**
      * 内容摘要
      */
 	private String contentSummary;
-			
+
 	/**
      * 来文附件
      */
 	private String attachedDocumentId;
-			
+
 	/**
      * 备注
      */
 	private String remark;
-			
+
+	/**
+	 * 中止原因
+	 */
+	private String abortReason;
+
 	/**
      * 状态
      */

+ 6 - 0
jp-console/jeeplus-modules/gw/src/main/java/com/jeeplus/circulation2/service/dto/GwCirculationCard2DTO.java

@@ -98,6 +98,12 @@ public class GwCirculationCard2DTO extends BaseDTO {
 	@ExcelProperty("备注")
 	private String remark;
 
+	/**
+	 * 中止原因
+	 */
+	@ExcelProperty("中止原因")
+	private String abortReason;
+
 	/**
      * 状态
      */

+ 1 - 0
jp-console/jeeplus-modules/gw/src/main/java/com/jeeplus/gwflow/mapper/GwFlowMapper.java

@@ -18,4 +18,5 @@ public interface GwFlowMapper extends BaseMapper<GwFlow> {
 
     List<GwFlowDTO> getByGwId(String Gwid);
     int isEnd(String Gwid);
+    int suspendState(String Gwid);
 }

+ 6 - 0
jp-console/jeeplus-modules/gw/src/main/java/com/jeeplus/gwflow/mapper/xml/GwFlowMapper.xml

@@ -30,4 +30,10 @@
     <select id="isEnd" resultType="Integer">
         SELECT COUNT(id) FROM gw_flow WHERE gw_id =#{Gwid} and state=1
     </select>
+
+    <update id="suspendState" >
+        UPDATE gw_flow
+        SET state = 2
+        WHERE gw_id =#{Gwid} and state=1
+    </update>
 </mapper>

+ 4 - 0
jp-console/jeeplus-modules/gw/src/main/java/com/jeeplus/gwflow/service/GwFlowService.java

@@ -29,4 +29,8 @@ public class GwFlowService extends ServiceImpl<GwFlowMapper, GwFlow> {
         return baseMapper.isEnd(Gwid);
     }
 
+    public int suspendState(String Gwid){
+        return baseMapper.suspendState(Gwid);
+    }
+
 }

+ 11 - 3
jp-ui/src/api/circulation2/gwCirculationCard2Service.js

@@ -9,6 +9,14 @@ export default {
 		});
 	},
 
+	abort: function (id,abort_reason) {
+		return request({
+			url: "/circulation2/gwCirculationCard2/abort",
+			method: "post",
+			params: { id: id,abort_reason:abort_reason },
+		});
+	},
+
 	delete: function (ids) {
 		return request({
 			url: "/circulation2/gwCirculationCard2/delete",
@@ -16,7 +24,7 @@ export default {
 			params: { ids: ids },
 		});
 	},
-	
+
 	getCardNum: function (id) {
 		return request({
 			url: "/circulation2/gwCirculationCard2/getCardNum",
@@ -31,8 +39,8 @@ export default {
 			params: { id: id },
 		});
 	},
-	
-	
+
+
 
 	list: function (params) {
 		return request({

+ 97 - 4
jp-ui/src/views/circulation2/GwCirculationCard2List.vue

@@ -64,7 +64,7 @@
 		  <vxe-toolbar ref="gwCirculationCard2Toolbar" :refresh="{query: refreshList}" import export print custom>
 		    <template #buttons>
 				<el-button v-if="hasPermission('circulation2:gwCirculationCard2:add')" type="primary"  icon="plus" @click="add()">新建</el-button>
-				<el-button v-if="hasPermission('circulation2:gwCirculationCard2:edit')" type="warning" icon="edit-filled" @click="edit()" v-show="$refs.gwCirculationCard2Table && $refs.gwCirculationCard2Table.getCheckboxRecords().length === 1" plain>修改</el-button>
+				<!-- <el-button v-if="hasPermission('circulation2:gwCirculationCard2:edit')" type="warning" icon="edit-filled" @click="edit()" v-show="$refs.gwCirculationCard2Table && $refs.gwCirculationCard2Table.getCheckboxRecords().length === 1" plain>修改</el-button> -->
 				<el-button v-if="hasPermission('circulation2:gwCirculationCard2:del')" type="danger"   icon="del-filled" @click="del()" v-show="$refs.gwCirculationCard2Table && $refs.gwCirculationCard2Table.getCheckboxRecords().length > 0" plain>删除</el-button>
 		    </template>
 		    <template #tools>
@@ -199,10 +199,11 @@
 		  width="200"
 		  title="操作">
 		  <template   #default="{ row }">
-		    <el-button v-if="hasPermission('circulation2:gwCirculationCard2:view')" type="primary" text icon="view-filled" @click="view(row.id)">查看</el-button>
+		    <el-button v-if="!daiban" type="primary" text icon="view-filled" @click="view(row.id)">查看</el-button>
 
 			<el-button v-if="daiban" type="primary" text icon="view-filled" @click="view2(row.id)">阅办</el-button>
 		    <!-- <el-button v-if="hasPermission('circulation2:gwCirculationCard2:edit')" type="primary" text icon="edit-filled" @click="edit(row.id)">修改</el-button> -->
+			<el-button v-if="row.state!=2&&this.role=='办公室管理员'"  type="danger"  text icon="switch-button" @click="abort(row.id)">中止</el-button>
 		    <el-button v-if="hasPermission('circulation2:gwCirculationCard2:del')"  type="danger"  text icon="del-filled" @click="del(row.id)">删除</el-button>
 		  </template>
 		</vxe-column>
@@ -224,7 +225,7 @@
 	<GwCirculationCard2Form2  ref="gwCirculationCard2Form2" @refreshDataList="refreshList"></GwCirculationCard2Form2>
 	<GwCirculationCard2FormYb  ref="GwCirculationCard2FormYb" @refreshDataList="refreshList"></GwCirculationCard2FormYb>
 	<!-- <fileInfo  ref="fileInfo" @refreshDataList="refreshList"></fileInfo> -->
-
+	<abordConfirm  ref="abordConfirm" @refreshDataList="refreshList"></abordConfirm>
   </div>
 </template>
 
@@ -232,6 +233,8 @@
   import GwCirculationCard2Form from './GwCirculationCard2Form'
   import GwCirculationCard2Form2 from './GwCirculationCard2Form2'
   import GwCirculationCard2FormYb from './GwCirculationCard2FormYb'
+  import abordConfirm from './abordConfirm.vue'
+  import { ElMessage, ElMessageBox } from 'element-plus'
 
 
   //import fileInfo from './fileInfo'
@@ -239,6 +242,7 @@
   export default {
     data () {
 		return {
+	      role:'',
 		  searchVisible: true,
 		  daiban:false,
 		  searchForm: {
@@ -265,7 +269,8 @@
     components: {
 		GwCirculationCard2Form,
 		GwCirculationCard2Form2,
-		GwCirculationCard2FormYb
+		GwCirculationCard2FormYb,
+		abordConfirm
     },
     created () {
     },
@@ -279,6 +284,9 @@
     },
     activated () {
 		this.refreshList()
+
+		let user = JSON.parse(window.localStorage.getItem('USER_INFO'))
+		this.role = user.roleNames
     },
     methods: {
 		// 获取数据列表
@@ -363,6 +371,91 @@
 		view2 (id) {
 		  this.$refs.GwCirculationCard2FormYb.init('edit', id)
 		},
+
+		//中止操作
+		abort(id){
+
+
+
+			ElMessageBox.prompt('确定中止所选项吗?', '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				inputPattern:
+				 /.+/,
+				inputErrorMessage: '请输入中止说明',
+			  })
+				.then(({ value }) => {
+
+
+				gwCirculationCard2Service.abort(id,value).then((data) => {
+				  this.$message.success(data)
+				  this.refreshList()
+				  this.loading = false
+				}).catch(() => {
+				  this.loading = false
+				})
+
+				 //  ElMessage({
+					// type: 'success',
+					// message: `Your email is:${value}`,
+				 //  })
+				})
+				.catch(() => {
+				  ElMessage({
+					type: '提示',
+					message: '已取消当前操作',
+				  })
+				})
+
+
+
+
+
+			// this.$confirm('确定中止所选项吗?', '提示', {
+			//   confirmButtonText: '确定',
+			//   cancelButtonText: '取消',
+			//   inputPattern: /.+/,
+			//   inputErrorMessage: '输入内容不能为空',
+			//   inputPlaceholder: '请输入中止说明',
+			//   inputType: 'text',
+			//   callback: (action, instance) => {
+			//     if (action === 'confirm') {
+			// 		this.loading = true
+
+			// 		console.log(`输入的内容是:${instance.inputValue}`);
+
+			// 		gwCirculationCard2Service.abort(id,instance.inputValue).then((data) => {
+			// 		  this.$message.success(data)
+			// 		  this.refreshList()
+			// 		  this.loading = false
+			// 		}).catch(() => {
+			// 		  this.loading = false
+			// 		})
+
+			//     }
+			//   }
+			// });
+
+
+			// this.$confirm(`确定中止所选项吗?`, '提示', {
+			//   confirmButtonText: '确定',
+			//   cancelButtonText: '取消',
+			//   inputPattern: /.+/,
+			//   inputErrorMessage: '输入内容不能为空',
+			//   inputPlaceholder: '请输入中止说明',
+			//   inputType: 'text',
+			//   type: 'warning'
+			// }).then(() => {
+			//   this.loading = true
+			//   gwCirculationCard2Service.delete(ids).then((data) => {
+			// 				this.$message.success(data)
+			// 				this.refreshList()
+			// 				this.loading = false
+			//   })
+			// })
+
+		},
+
 		// 删除
 		del (id) {
 		  let ids = id || this.$refs.gwCirculationCard2Table.getCheckboxRecords().map(item => {

+ 1 - 12
jp-ui/src/views/dashboard/index.vue

@@ -1,25 +1,14 @@
 <template>
 	<div v-if="pageLoading">
-		<el-main>
-			<el-card shadow="never">
-				<el-skeleton :rows="1"></el-skeleton>
-			</el-card>
-			<el-card shadow="never" style="margin-top: 15px">
-				<el-skeleton></el-skeleton>
-			</el-card>
-		</el-main>
+
 	</div>
-	<widgets @on-mounted="onMounted"></widgets>
 </template>
 
 <script>
-import { defineAsyncComponent } from "vue";
-const widgets = defineAsyncComponent(() => import("./widgets"));
 
 export default {
 	name: "dashboard",
 	components: {
-		widgets,
 	},
 	data() {
 		return {