ソースを参照

完善中止展示

LuChongMei 10 ヶ月 前
コミット
fb2683e1d3

+ 26 - 13
jp-mobile/api/circulation/gwCirculationCard2.js

@@ -1,51 +1,64 @@
 import request from "../../common/request";
 
 export default {
-	save: function (inputForm) {
+	save: function(inputForm) {
 		return request({
 			url: "/circulation2/gwCirculationCard2/save",
 			method: "post",
 			data: inputForm,
 		});
 	},
-
-	delete: function (ids) {
+	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",
 			method: "delete",
-			params: { ids: ids },
+			params: {
+				ids: ids
+			},
 		});
 	},
 
-	queryById: function (id) {
+	queryById: function(id) {
 		return request({
 			url: "/circulation2/gwCirculationCard2/queryById",
 			method: "get",
-			params: { id: id },
+			params: {
+				id: id
+			},
 		});
 	},
-	getCardNum: function (id) {
+	getCardNum: function(id) {
 		return request({
 			url: "/circulation2/gwCirculationCard2/getCardNum",
 			method: "get",
 		});
 	},
 
-	list: function (params) {
+	list: function(params) {
 		return request({
 			url: "/circulation2/gwCirculationCard2/list2",
 			method: "get",
 			params: params,
 		});
 	},
-	getStatistics: function (id) {
+	getStatistics: function(id) {
 		return request({
 			url: "/circulation2/gwCirculationCard2/getStatistics",
 			method: "get",
 		});
 	},
 
-	exportTemplate: function () {
+	exportTemplate: function() {
 		return request({
 			url: "/circulation2/gwCirculationCard2/import/template",
 			method: "get",
@@ -53,7 +66,7 @@ export default {
 		});
 	},
 
-	exportExcel: function (params) {
+	exportExcel: function(params) {
 		return request({
 			url: "/circulation2/gwCirculationCard2/export",
 			method: "get",
@@ -62,11 +75,11 @@ export default {
 		});
 	},
 
-	importExcel: function (data) {
+	importExcel: function(data) {
 		return request({
 			url: "/circulation2/gwCirculationCard2/import",
 			method: "post",
 			data: data,
 		});
 	},
-};
+};

+ 7 - 3
jp-mobile/pages/fileTransmit/fileInfo.vue

@@ -3,10 +3,12 @@
 		<fileCard :gwId="gwId"></fileCard>
 		<view class="info_main">
 			<u-steps :current="current" direction="column" inactiveColor="#36a7f3" activeColor="#5fdf50">
-				<u-steps-item title="发起" :desc="inputForm.createTruename +' - '+inputForm.createTime">
+				<u-steps-item :error="isSuspend" title="发起" :desc="inputForm.createTruename +' - '+inputForm.createTime">
 				</u-steps-item>
-				<u-steps-item v-for="item in downList"
-					:title="item.which=='0'?'办公室拟办':item.which=='1'?'领导审批':item.which=='2'?'承办情况':item.which=='3'?'承办转发':'已归档'"
+				<u-steps-item v-for="item in downList" :error="isSuspend"
+					:title="item.which=='0'?'办公室拟办':item.which=='1'?'领导审批':item.which=='2'?'承办情况':item.which=='3'?'承办转发':item.which == '4'
+                  ? '已归档'
+                  : '已中止'"
 					:desc="item.state==1?item.nextTruename :item.nextTruename +' - '+item.updateTime">
 				</u-steps-item>
 				<u-steps-item v-for="item in gwList"
@@ -34,6 +36,7 @@
 		},
 		data() {
 			return {
+				isSuspend: false,
 				gwId: '',
 				// 办公室信息
 				officeInfo: [],
@@ -55,6 +58,7 @@
 				this.allNum = data.length
 				this.inputForm = data[0]
 				data.forEach(item => {
+					if (item.which == "5") this.isSuspend = true;
 					if (item.state == 0) {
 						this.downList.push(item)
 					} else {

+ 46 - 8
jp-mobile/pages/fileTransmit/fileTransmitList.vue

@@ -18,15 +18,15 @@
 						</view>
 					</view>
 					<view slot="value">
-
+						<view>
+							<u-tag v-if="$auth.getUserInfo().roleNames=='办公室管理员'&&(type==1 || type==4)" text="点击中止"
+								type="warning" @click="suspend(item.id)">
+							</u-tag>
+						</view>
 						<view class="text-grey text-sm list_label margin-top">
 							{{item.createTime}}
 						</view>
-						<view class="value_tag">
-							<u-tag v-if="type==5" :text="item.state==1?'待办':item.state == 3?'归档':'已办'" plain
-								:type="item.state==1?'warning':item.state == 3?'primary':'success'">
-							</u-tag>
-						</view>
+
 					</view>
 					<view slot="label">
 						<view class="text-grey margin-top">
@@ -37,6 +37,7 @@
 			</u-cell-group>
 		</view>
 		<u-loadmore :status="status" />
+		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
@@ -48,7 +49,7 @@
 		onShow() {
 			// 先获取页面栈
 			let pages = getCurrentPages();
-			
+
 			// 当前页面的前一个页面
 			let prevPage = pages[pages.length - 1];
 			if (prevPage.options.type) {
@@ -116,6 +117,41 @@
 			}
 		},
 		methods: {
+			showToast(params) {
+				this.$refs.uToast.show({
+					...params,
+					complete() {
+						params.url && uni.redirectTo({
+							url: params.url
+						})
+					}
+				})
+			},
+			// 中止
+			suspend(id) {
+				uni.showModal({
+					title: '中止原因',
+					placeholderText: '输入中止原因',
+					editable: true,
+					success: function(res) {
+						if (res.confirm) {
+							gwCirculationCard2Service.abort(id, res.content).then((data) => {
+								uni.showToast({
+									title: "已中止",
+								})
+								that.status = 'loadmore'
+								that.dataList = [];
+								that.tablePage.currentPage = 0;
+								that.tablePage.pageSize = 10;
+								that.tablePage.pages = 0;
+								that.loadmore()
+							});
+						} else if (res.cancel) {
+							console.log('用户点击取消');
+						}
+					}
+				});
+			},
 			// 查看详情
 			toInfo(item) {
 				if (this.type == 3 || this.type == 5 || this.type == 4) {
@@ -213,6 +249,7 @@
 		border-radius: 10px;
 		margin: 15px 5px 0;
 	}
+
 	.value_tag {
 		width: 50%;
 		position: relative;
@@ -222,8 +259,9 @@
 		/* #ifdef APP-PLUS */
 		right: -50px;
 		/* #endif */
-		
+
 	}
+
 	.list_search_date {
 		margin: 8px 5px 0;
 	}

+ 429 - 312
jp-ui/src/views/circulation2/GwCirculationCard2FormYb.vue

@@ -2,117 +2,193 @@
   <v-dialog
     :title="title"
     :close-on-click-modal="false"
-	style="width:1100px;height: auto;max-height: 1000px ;margin-top: 85px;"
-    v-model="visible">
-
-
-		<div style="display: flex; flex-direction: row;">
-			<fileCard :gwId="inputForm.id" ref="filecard" v-if="visible"  style="width: 50%;" ></fileCard>
-
-			<div>
-
-
-				<div class="cll" :style="{height:heightpx  }"  >
-					<el-steps direction="vertical" :active="stepactive"  >
-					  <el-step v-for="item in assignWorkOrderRecordDTOList" :title="item.which=='0'?'办公室拟办':item.which=='1'?'领导审批':item.which=='2'?'承办情况':item.which=='3'?'承办转发':item.state=='0'?'已归档':'待归档'" :description="item.state==1?item.nextTruename :item.nextTruename +' - '+item.updateTime"/>
-					</el-steps>
-				</div>
-
-
-				<div style="display: flex; flex-direction:column;margin-left: 60px;margin-top:20px">
-
-
-					<view v-if="istransmit&&method=='edit'" class="titletab" >承办转发</view>
-					<view v-if="isoffice&&method=='edit'" class="titletab" >办公室拟办</view>
-					<view v-if="isleader&&method=='edit'" class="titletab" >领导批示</view>
-					<view v-if="isundertake&&method=='edit'" class="titletab" >承办科室</view>
-
-
-
-					<el-form v-if="istransmit&&method=='edit'" :model="auditForm" ref="auditForm" v-loading="loading" label-position="right" label-width="auto" style="max-width: 400px;margin-top: 40px;" >
-					  <el-row  :gutter="15">
-
-						<el-col :span="24">
-							<el-form-item label="转发领导" prop="nextLeadUser"
-								:rules="[
-								 ]">
-							  <el-select v-model="auditForm.nextLeadUser" placeholder="请选择"  style="width: 100%;">
-									   <el-option
-										 v-for="item in leaderList"
-										 :key="item.id"
-										 :label="item.name"
-										 :value="item.loginName">
-									   </el-option>
-							  </el-select>
-						   </el-form-item>
-						</el-col>
-						<el-col :span="24" v-if="!one">
-							<el-form-item label="科室承办" prop="nextDepUser"
-								:rules="[
-								 ]">
-								 <user-select-Ks
-									:limit="10"
-									v-model="auditForm.nextDepUser"
-								 ></user-select-Ks>
-
-						   </el-form-item>
-						</el-col>
-						<!-- <el-col :span="24" v-if="one"> -->
-						<el-col :span="24">
-							<el-form-item label="备注" prop="remark"
-								:rules="[
-								 ]">
-							  <el-input type="textarea" v-model="auditForm.remark" placeholder=""     ></el-input>
-						   </el-form-item>
-						</el-col>
-					  </el-row>
-					</el-form>
-
-					<el-form v-if="isoffice&&method=='edit'" :model="auditForm" ref="auditForm" v-loading="loading" label-position="right" label-width="auto" style="max-width: 400px;margin-top: 40px;">
-					  <el-row  :gutter="15">
-						<el-col :span="12">
-							<el-form-item label="办公室拟办" prop="content"
-								:rules="[
-								 ]">
-							  <el-input type="textarea" v-model="auditForm.content" placeholder=""    style="min-width: 300px;" ></el-input>
-						   </el-form-item>
-						</el-col>
-					  </el-row>
-					</el-form>
-
-					<el-form v-if="isleader&&method=='edit'" :model="auditForm" ref="auditForm" v-loading="loading" label-position="right" label-width="auto" style="max-width: 400px;margin-top: 40px;">
-					  <el-row  :gutter="15">
-						<el-col :span="12">
-							<el-form-item label="领导批示" prop="content"
-								:rules="[
-								 ]">
-							  <el-input type="textarea" v-model="auditForm.content" placeholder=""    style="min-width: 300px;" ></el-input>
-						   </el-form-item>
-						</el-col>
-					  </el-row>
-					</el-form>
-
-
-					<el-form v-if="isundertake&&method=='edit'" :model="auditForm" ref="auditForm" v-loading="loading" label-position="right" label-width="auto" style="max-width: 400px;margin-top: 40px;">
-					  <el-row  :gutter="15">
-						<el-col :span="12">
-							<el-form-item label="承办科室" prop="content"
-								:rules="[
-								 ]">
-							 <el-input type="textarea" v-model="auditForm.content" placeholder=""    style="min-width: 300px;" ></el-input>
-						   </el-form-item>
-						</el-col>
-					  </el-row>
-					</el-form>
-				</div>
-
-			</div>
-
-		</div>
-
-
-
-		<!-- <el-tabs v-model="assignWorkOrderTab" >
+    style="width: 1100px; height: auto; max-height: 1000px; margin-top: 85px"
+    v-model="visible"
+  >
+    <div style="display: flex; flex-direction: row">
+      <fileCard
+        :gwId="inputForm.id"
+        ref="filecard"
+        v-if="visible"
+        style="width: 50%"
+      ></fileCard>
+
+      <div>
+        <div class="cll" :style="{ height: heightpx }">
+          <el-steps
+            :finish-status="isSuspend ? 'error' : 'success'"
+            direction="vertical"
+            :active="stepactive"
+          >
+            <el-step
+              v-for="item in assignWorkOrderRecordDTOList"
+              :key="item"
+              :title="
+                item.which == '0'
+                  ? '办公室拟办'
+                  : item.which == '1'
+                  ? '领导审批'
+                  : item.which == '2'
+                  ? '承办情况'
+                  : item.which == '3'
+                  ? '承办转发'
+                  : item.which == '5'
+                  ? '已中止'
+                  : item.which == '4' && item.state == '0'
+                  ? '已归档'
+                  : '待归档'
+              "
+              :description="
+                item.state == 1
+                  ? item.nextTruename
+                  : item.nextTruename + ' - ' + item.updateTime
+              "
+            />
+          </el-steps>
+        </div>
+
+        <div
+          style="
+            display: flex;
+            flex-direction: column;
+            margin-left: 60px;
+            margin-top: 20px;
+          "
+        >
+          <view v-if="istransmit && method == 'edit'" class="titletab"
+            >承办转发</view
+          >
+          <view v-if="isoffice && method == 'edit'" class="titletab"
+            >办公室拟办</view
+          >
+          <view v-if="isleader && method == 'edit'" class="titletab"
+            >领导批示</view
+          >
+          <view v-if="isundertake && method == 'edit'" class="titletab"
+            >承办科室</view
+          >
+
+          <el-form
+            v-if="istransmit && method == 'edit'"
+            :model="auditForm"
+            ref="auditForm"
+            v-loading="loading"
+            label-position="right"
+            label-width="auto"
+            style="max-width: 400px; margin-top: 40px"
+          >
+            <el-row :gutter="15">
+              <el-col :span="24">
+                <el-form-item label="转发领导" prop="nextLeadUser" :rules="[]">
+                  <el-select
+                    v-model="auditForm.nextLeadUser"
+                    placeholder="请选择"
+                    style="width: 100%"
+                  >
+                    <el-option
+                      v-for="item in leaderList"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.loginName"
+                    >
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24" v-if="!one">
+                <el-form-item label="科室承办" prop="nextDepUser" :rules="[]">
+                  <user-select-Ks
+                    :limit="10"
+                    v-model="auditForm.nextDepUser"
+                  ></user-select-Ks>
+                </el-form-item>
+              </el-col>
+              <!-- <el-col :span="24" v-if="one"> -->
+              <el-col :span="24">
+                <el-form-item label="备注" prop="remark" :rules="[]">
+                  <el-input
+                    type="textarea"
+                    v-model="auditForm.remark"
+                    placeholder=""
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+
+          <el-form
+            v-if="isoffice && method == 'edit'"
+            :model="auditForm"
+            ref="auditForm"
+            v-loading="loading"
+            label-position="right"
+            label-width="auto"
+            style="max-width: 400px; margin-top: 40px"
+          >
+            <el-row :gutter="15">
+              <el-col :span="12">
+                <el-form-item label="办公室拟办" prop="content" :rules="[]">
+                  <el-input
+                    type="textarea"
+                    v-model="auditForm.content"
+                    placeholder=""
+                    style="min-width: 300px"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+
+          <el-form
+            v-if="isleader && method == 'edit'"
+            :model="auditForm"
+            ref="auditForm"
+            v-loading="loading"
+            label-position="right"
+            label-width="auto"
+            style="max-width: 400px; margin-top: 40px"
+          >
+            <el-row :gutter="15">
+              <el-col :span="12">
+                <el-form-item label="领导批示" prop="content" :rules="[]">
+                  <el-input
+                    type="textarea"
+                    v-model="auditForm.content"
+                    placeholder=""
+                    style="min-width: 300px"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+
+          <el-form
+            v-if="isundertake && method == 'edit'"
+            :model="auditForm"
+            ref="auditForm"
+            v-loading="loading"
+            label-position="right"
+            label-width="auto"
+            style="max-width: 400px; margin-top: 40px"
+          >
+            <el-row :gutter="15">
+              <el-col :span="12">
+                <el-form-item label="承办科室" prop="content" :rules="[]">
+                  <el-input
+                    type="textarea"
+                    v-model="auditForm.content"
+                    placeholder=""
+                    style="min-width: 300px"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </div>
+      </div>
+    </div>
+
+    <!-- <el-tabs v-model="assignWorkOrderTab" >
 		  <el-tab-pane label="流转记录">
 			<el-table  size="large"
 			  :data="assignWorkOrderRecordDTOList.filter(function(item){ return item.delFlag !== '1'})"
@@ -131,219 +207,260 @@
 		</el-tabs> -->
 
     <template #footer>
-        <span class="dialog-footer">
-          <el-button @click="visible = false" icon="circle-close">关闭</el-button>
-		  <el-button v-if="((isundertake||isleader||isoffice )&& !loading)&&method=='edit'" type="primary"  @click="doSubmit()" icon="circle-check" v-noMoreClick>确认签字</el-button>
-		  <el-button v-if="(!(isundertake||isleader||isoffice ) && !loading)&&method=='edit'" type="primary"  @click="doSubmit()" icon="circle-check" v-noMoreClick>提交</el-button>
-          <el-button  type="primary" v-if="isAll" @click="formSubmit()" icon="circle-check" v-noMoreClick>归档</el-button>
-        </span>
+      <span class="dialog-footer">
+        <el-button @click="visible = false" icon="circle-close">关闭</el-button>
+        <el-button
+          v-if="
+            (isundertake || isleader || isoffice) &&
+            !loading &&
+            method == 'edit'
+          "
+          type="primary"
+          @click="doSubmit()"
+          icon="circle-check"
+          v-noMoreClick
+          >确认签字</el-button
+        >
+        <el-button
+          v-if="
+            !(isundertake || isleader || isoffice) &&
+            !loading &&
+            method == 'edit'
+          "
+          type="primary"
+          @click="doSubmit()"
+          icon="circle-check"
+          v-noMoreClick
+          >提交</el-button
+        >
+        <el-button
+          type="primary"
+          v-if="isAll"
+          @click="formSubmit()"
+          icon="circle-check"
+          v-noMoreClick
+          >归档</el-button
+        >
+      </span>
     </template>
   </v-dialog>
 </template>
 
 <script>
-  import gwCirculationCard2Service from '@/api/circulation2/gwCirculationCard2Service'
-  import gwFlowService from '@/api/gwflow/gwFlowService'
-  import UserSelectKs from "@/components/userSelectKs/index.vue";
-  import userService from "@/api/sys/userService"
-  import fileCard from "./fileCard.vue"
-  export default {
-    data () {
-      return {
-		assignWorkOrderTab: '0',
-		isoffice: false,
-		isleader: false,
-		isundertake: false,
-		istransmit: false,
-		one: true,
-		isAll: false,
-		heightpx:'400px',
-		leaderList: [],
-		auditForm: {
-					id: '',
-					gwId: '',
-					content: '',
-					signfj: '',
-					createTruename: '',
-					nextTruename: '',
-					nextUser: '',
-					which: '0',
-					state: '0',
-
-					next: '',
-					nextLeadUser: '',
-					nextDepUser: '',
-					remark: '',
-				},
-
-        title: '',
-        method: '',
-        visible: false,
-        loading: false,
-		assignWorkOrderRecordDTOList:[],
-		stepactive:0,
-        inputForm: {
-          id: '',
-          yearNum: '',
-          cardNum: '',
-          sendingAgency: '',
-          docFontSize: '',
-          fileSource: '',
-          writtenTime: '',
-          receivingTime: '',
-          contentSummary: '',
-          attachedDocumentId: '',
-          remark: '',
-          state: ''
+import gwCirculationCard2Service from "@/api/circulation2/gwCirculationCard2Service";
+import gwFlowService from "@/api/gwflow/gwFlowService";
+import UserSelectKs from "@/components/userSelectKs/index.vue";
+import userService from "@/api/sys/userService";
+import fileCard from "./fileCard.vue";
+export default {
+  data() {
+    return {
+      isSuspend: false,
+      assignWorkOrderTab: "0",
+      isoffice: false,
+      isleader: false,
+      isundertake: false,
+      istransmit: false,
+      one: true,
+      isAll: false,
+      heightpx: "400px",
+      leaderList: [],
+      auditForm: {
+        id: "",
+        gwId: "",
+        content: "",
+        signfj: "",
+        createTruename: "",
+        nextTruename: "",
+        nextUser: "",
+        which: "0",
+        state: "0",
+
+        next: "",
+        nextLeadUser: "",
+        nextDepUser: "",
+        remark: "",
+      },
 
-        }
+      title: "",
+      method: "",
+      visible: false,
+      loading: false,
+      assignWorkOrderRecordDTOList: [],
+      stepactive: 0,
+      inputForm: {
+        id: "",
+        yearNum: "",
+        cardNum: "",
+        sendingAgency: "",
+        docFontSize: "",
+        fileSource: "",
+        writtenTime: "",
+        receivingTime: "",
+        contentSummary: "",
+        attachedDocumentId: "",
+        remark: "",
+        state: "",
+      },
+    };
+  },
+  components: {
+    UserSelectKs,
+    fileCard,
+  },
+  created() {},
+  methods: {
+    init(method, id) {
+      this.method = method;
+      this.inputForm.id = id;
+      if (method === "add") {
+        this.title = `新建盐都工信文件阅办卡`;
+      } else if (method === "edit") {
+        this.title = "文件阅办卡详情";
+      } else if (method === "view") {
+        this.title = "文件阅办卡详情";
       }
-    },
-    components: {
-		UserSelectKs,
-		fileCard,
-    },
-    created () {
-    },
-    methods: {
-      init (method, id) {
-        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
-            gwCirculationCard2Service.queryById(this.inputForm.id).then((data) => {
-              this.inputForm = this.recover(this.inputForm, data)
-              this.loading = false
-            })
-
-
-			gwFlowService.queryByGwId(this.inputForm.id).then(data => {
-				let down = data.filter(item => item.state == 0)
-				if (down.length != 1) this.one = false
-				if(this.one) {
-					this.roleId = "1770353074553331713"
-				}else {
-					this.roleId = "1773547256256622594"
-				}
-				userService.leaderList(this.roleId).then(data => {
-					this.leaderList = data
-					if(this.one) this.auditForm.nextLeadUser =data[0].loginName
-					if (!this.auditForm.content) this.auditForm.content = '已阅'
-				})
-
-				// let user = $auth.getUserInfo()
-				// let role = $auth.getUserInfo().roleNames
-
-				let user = JSON.parse(window.localStorage.getItem('USER_INFO'))
-				let role = user.roleNames
-
-				let gw = data.filter(item => {
-					return item.nextUser == user.id && item.state == 1
-				})
-
-				if (gw.length > 0) {
-					this.auditForm = gw[0]
-					if (gw[0].which == '4') this.isAll = true
-					if (!this.auditForm.content) this.auditForm.content = '已阅'
-				}
-				if (role == '办公室管理员') {
-					this.istransmit = true
-					if (gw.length == 0) {
-						let gw1 = data.filter(item => {
-							return item.which == 3
-						})
-						gw1.sort((a, b) => b.createTime.localeCompare(a.createTime) || b.createTime.localeCompare(a
-							.createTime));
-						this.auditForm = gw1[0]
-						// if (!this.auditForm.content) this.auditForm.content = '已阅'
-					}
-				}
-				if (role == '局领导' && gw.length > 0) this.isleader = true
-				if (role == '办公室主任' && gw.length > 0) this.isoffice = true
-				if (role == '分管领导' && gw.length > 0) this.isleader = true
-				if (role == '科室负责人' && gw.length > 0) this.isundertake = true
-
-
-
-				let a=data.length*60;
-				this.heightpx=a+"px";
-				this.assignWorkOrderRecordDTOList=data.reverse()
 
-
-				let stepactive1 = this.assignWorkOrderRecordDTOList.filter(item => {
-					return item.state == 0
-				})
-				this.stepactive=stepactive1.length
-			})
-
-          }
-        })
-      },
-      // 表单提交
-      doSubmit () {
-        let inputForm = {};
-        this.loading = true
-        if (this.istransmit) {
-        	this.auditForm.next = '1'
-        	if (!this.one) this.auditForm.which = '3'
+      this.visible = true;
+      this.loading = false;
+      this.isSuspend = false;
+      this.$nextTick(() => {
+        //this.$refs.inputForm.resetFields()
+        if (method === "edit" || method === "view") {
+          // 修改或者查看
+          this.loading = true;
+          gwCirculationCard2Service
+            .queryById(this.inputForm.id)
+            .then((data) => {
+              this.inputForm = this.recover(this.inputForm, data);
+              if (this.inputForm.state == "2") this.isSuspend = true;
+              this.loading = false;
+            });
+
+          gwFlowService.queryByGwId(this.inputForm.id).then((data) => {
+            let down = data.filter((item) => item.state == 0);
+            if (down.length != 1) this.one = false;
+            if (this.one) {
+              this.roleId = "1770353074553331713";
+            } else {
+              this.roleId = "1773547256256622594";
+            }
+            userService.leaderList(this.roleId).then((data) => {
+              this.leaderList = data;
+              if (this.one) this.auditForm.nextLeadUser = data[0].loginName;
+              if (!this.auditForm.content) this.auditForm.content = "已阅";
+            });
+
+            // let user = $auth.getUserInfo()
+            // let role = $auth.getUserInfo().roleNames
+
+            let user = JSON.parse(window.localStorage.getItem("USER_INFO"));
+            let role = user.roleNames;
+
+            let gw = data.filter((item) => {
+              return item.nextUser == user.id && item.state == 1;
+            });
+
+            if (gw.length > 0) {
+              this.auditForm = gw[0];
+              if (gw[0].which == "4") this.isAll = true;
+              if (!this.auditForm.content) this.auditForm.content = "已阅";
+            }
+            if (role == "办公室管理员") {
+              this.istransmit = true;
+              if (gw.length == 0) {
+                let gw1 = data.filter((item) => {
+                  return item.which == 3;
+                });
+                gw1.sort(
+                  (a, b) =>
+                    b.createTime.localeCompare(a.createTime) ||
+                    b.createTime.localeCompare(a.createTime)
+                );
+                this.auditForm = gw1[0];
+                // if (!this.auditForm.content) this.auditForm.content = '已阅'
+              }
+            }
+            if (role == "局领导" && gw.length > 0) this.isleader = true;
+            if (role == "办公室主任" && gw.length > 0) this.isoffice = true;
+            if (role == "分管领导" && gw.length > 0) this.isleader = true;
+            if (role == "科室负责人" && gw.length > 0) this.isundertake = true;
+
+            let a = data.length * 60;
+            this.heightpx = a + "px";
+            this.assignWorkOrderRecordDTOList = data.reverse();
+            let stepactive1 = this.assignWorkOrderRecordDTOList.filter(
+              (item) => {
+                return item.state == 0 || item.state == 2;
+              }
+            );
+            this.stepactive = stepactive1.length;
+          });
         }
-        this.auditForm.state = "0"
-        this.auditForm.gwId = this.inputForm.id
-        const date = this.moment().format('YYYY-MM-DD HH:mm:ss');
-        this.auditForm.updateTime = date
-        inputForm = this.auditForm
-
-        gwFlowService.save(inputForm).then((data)  => {
-        	this.visible = false
-        	this.$message.success(data)
-        	this.$emit('refreshDataList')
-        	this.loading = false
-        }).catch(() => {
-        	this.loading = false
+      });
+    },
+    // 表单提交
+    doSubmit() {
+      let inputForm = {};
+      this.loading = true;
+      if (this.istransmit) {
+        this.auditForm.next = "1";
+        if (!this.one) this.auditForm.which = "3";
+      }
+      this.auditForm.state = "0";
+      this.auditForm.gwId = this.inputForm.id;
+      const date = this.moment().format("YYYY-MM-DD HH:mm:ss");
+      this.auditForm.updateTime = date;
+      inputForm = this.auditForm;
+
+      gwFlowService
+        .save(inputForm)
+        .then((data) => {
+          this.visible = false;
+          this.$message.success(data);
+          this.$emit("refreshDataList");
+          this.loading = false;
         })
-      },
-
-	  //归档
-	  formSubmit() {
-        let inputForm = {};
-        this.loading = true
-        this.auditForm.next = '0'
-        this.auditForm.state = "0"
-        this.auditForm.gwId = this.inputForm.id
-        const date = this.moment().format('YYYY-MM-DD HH:mm:ss');
-        this.auditForm.updateTime = date
-        inputForm = this.auditForm
+        .catch(() => {
+          this.loading = false;
+        });
+    },
 
-        gwFlowService.save(inputForm).then((data)  => {
-        	this.visible = false
-        	this.$message.success(data)
-        	this.$emit('refreshDataList')
-        	this.loading = false
-        }).catch(() => {
-        	this.loading = false
+    //归档
+    formSubmit() {
+      let inputForm = {};
+      this.loading = true;
+      this.auditForm.next = "0";
+      this.auditForm.state = "0";
+      this.auditForm.gwId = this.inputForm.id;
+      const date = this.moment().format("YYYY-MM-DD HH:mm:ss");
+      this.auditForm.updateTime = date;
+      inputForm = this.auditForm;
+
+      gwFlowService
+        .save(inputForm)
+        .then((data) => {
+          this.visible = false;
+          this.$message.success(data);
+          this.$emit("refreshDataList");
+          this.loading = false;
         })
-      }
-
-    }
-  }
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+  },
+};
 </script>
 <style>
-	.titletab {
-		color:#36a7f3 ;border-bottom:1px solid #36a7f3; width: 90px;padding: 6px;
-	}
-	.cll{
-		width: 450px; margin-left: 50px;
-	}
+.titletab {
+  color: #36a7f3;
+  border-bottom: 1px solid #36a7f3;
+  width: 90px;
+  padding: 6px;
+}
+.cll {
+  width: 450px;
+  margin-left: 50px;
+}
 </style>