zhengkaixin 2 yıl önce
ebeveyn
işleme
1b62781b85

+ 2 - 2
.env.development

@@ -4,7 +4,7 @@ OUT_PUT_NAME=dev
 VUE_APP_LOCAL_STORAGE_PREFIX=dev
 
 #项目缓存抬头
-VUE_APP_LOCAL_PREFIX_MAIN=ga_file_xpgj_
+VUE_APP_LOCAL_PREFIX_MAIN=luan_oa_xpgj_
 
 #VUE_APP_BACKEND_URL=https://ykt-test.xiaoxinda.com/gaoa-server/
 #VUE_APP_BACKEND_URL=http://localhost:8086/gaoa-server/
@@ -14,7 +14,7 @@ VUE_APP_BACKEND_URL51=https://51team.xiaoxinda.com/charging-parking/
 VUE_APP_MIRROR_BACKEND_URL=https://mirror.xiaoxinda.com/xpgjapi/
 
 #小鹏管家微信appid
-VUE_APP_WXAPPID=wx7e70eb62a8459869
+VUE_APP_WXAPPID=wx6862db3daf9e71ad
 VUE_APP_ALIAPPID=2019032063568906
 VUE_APP_AUTH=
 VUE_APP_VERSION=2.0.5

+ 3 - 2
.env.production

@@ -4,14 +4,15 @@ OUT_PUT_NAME=prod
 VUE_APP_LOCAL_STORAGE_PREFIX=prod
 
 #项目缓存抬头
-VUE_APP_LOCAL_PREFIX_MAIN=ga_file_xpgj_
+VUE_APP_LOCAL_PREFIX_MAIN=luan_oa_xpgj_
+
 VUE_APP_BACKEND_URL=http://47.98.231.198:8081/gaoa-server
 ##VUE_APP_BACKEND_URL=http://47.98.231.198:8081/jp-housekeeper-server
 VUE_APP_BACKEND_URL51=https://51team.xiaoxinda.com/charging-parking/
 VUE_APP_MIRROR_BACKEND_URL=https://mirror.xiaoxinda.com/xpgjapi/
 
 #小鹏管家微信appid
-VUE_APP_WXAPPID=wx7e70eb62a8459869
+VUE_APP_WXAPPID=wx6862db3daf9e71ad
 VUE_APP_ALIAPPID=2019032063568906
 VUE_APP_AUTH=
 VUE_APP_VERSION=2.0.5

+ 3 - 2
.env.test

@@ -4,7 +4,8 @@ OUT_PUT_NAME=test
 VUE_APP_LOCAL_STORAGE_PREFIX=test
 
 #项目缓存抬头
-VUE_APP_LOCAL_PREFIX_MAIN=ga_file_xpgj_
+VUE_APP_LOCAL_PREFIX_MAIN=luan_oa_xpgj_
+
 VUE_APP_BACKEND_URL=http://47.98.231.198:8081/gaoa-server
 
 VUE_APP_BACKEND_URL51=https://51team.xiaoxinda.com/charging-parking/
@@ -12,7 +13,7 @@ VUE_APP_BACKEND_URL51=https://51team.xiaoxinda.com/charging-parking/
 VUE_APP_MIRROR_BACKEND_URL=https://ykt-test.xiaoxinda.com/jp-housekeeper-server/
 
 #小鹏管家微信appid
-VUE_APP_WXAPPID=wx7e70eb62a8459869
+VUE_APP_WXAPPID=wx6862db3daf9e71ad
 VUE_APP_ALIAPPID=2019032063568906
 VUE_APP_AUTH=
 VUE_APP_VERSION=2.0.5

+ 24 - 3
src/commin.js

@@ -7,6 +7,10 @@
 		getWeixinRedirectURI,
 		isWeiXin
 	} from '@/utils'
+import {
+	getToken
+} from '@/utils/storage'
+	
 	import {
 		mapGetters,
 		mapMutations
@@ -47,7 +51,7 @@
 		data() {
 			return {
 				//testOpenid:"oHjCawmHqG44pqUW54iBlenaHYB8",//ys
-				testOpenid:"testzkx",//zkx
+				testOpenid:"oN5ep6Os2nExGLOW5k1cZHGwVFHE",//zkx
 				//testOpenid:"oHjCawsxTJkxixR74OVp7aCKahj8",//ylm
 				
 				//testOpenid:"oHjCawgwCGen5k1-hAsimdEX5lZo",//sz
@@ -87,7 +91,9 @@
 						const step1 = API_WeiXin.getDataByCode(code).then(response => {
 							//console.log(response)
 							this.set_openid(response.openid);
-							window.localStorage.setItem("xpgj_wx_user_info", JSON.stringify(response))
+							const prefix = process.env.VUE_APP_LOCAL_PREFIX_MAIN;
+							
+							window.localStorage.setItem(prefix+"xpgj_wx_user_info", JSON.stringify(response))
 							
 							//角色判定调用不同的信息获取详情
 							this.getDataByOpenId();
@@ -115,7 +121,22 @@
 			},
 			//角色判定调用不同的信息获取详情
 			getDataByOpenId() {
-				this.getUserInfoByOpenId();
+				const prefix = process.env.VUE_APP_LOCAL_PREFIX_MAIN;
+				
+				
+				 
+				var tdate=new Date( +new Date() + 8 * 3600 * 1000 ).toJSON().substr(0,15).replace("T"," ")
+				var 	token=getToken();
+
+				var token_tdate=window.localStorage.getItem(prefix+"token_tdate")
+				
+				if(token&&token_tdate&&token_tdate==tdate){
+					this.asynCallBack();
+				}else{
+					window.localStorage.setItem(prefix+"token_tdate",tdate)
+					this.getUserInfoByOpenId();
+				}
+				
 			},
 			//获取用户详情
 			getUserInfoByOpenId() {

+ 50 - 3
src/views-oa/Document/Form.vue

@@ -36,6 +36,19 @@
 				 rows="3" v-model="tjForm.docTitle" placeholder="请填写文件标题"></textarea>
 			</div>
 		</div>
+		<template v-if="tjForm.docType">
+			<div class="mui-content-padded" v-for="(item,i ) in  textList[tjForm.docType]"  :key="i">
+				
+				
+				<div class="mui-input-row">
+					<label><span class="colorfe616c">*</span>{{item.name}}</label>
+					<input type="text" v-model="tjForm[item.value]"  :placeholder="'请填写'+item.name">
+				</div>
+			</div>
+		</template>
+		
+		
+		 
 			<div class="mui-content-padded" style="padding-bottom:20px">
 				<h5>
 					<span class="colorfe616c">*</span>上传照片
@@ -106,7 +119,28 @@
 		},
 		data() {
 			return {
-				
+				textList:[
+					[],
+					[//工程合同会签申请单
+						{name:"收文顺序号",value:"swsxh"},
+						{name:"收到时间",value:"sdsj"},
+						{name:"归入案卷号",value:"grajh"},
+					],
+					[//内部
+						{name:"拟发文号",value:"nfwh"},
+						{name:"提报说明",value:"tbsm"},
+					],
+					[//外部
+						{name:"文件名称",value:"wjmc"},
+						
+						{name:"来文号",value:"lwh"},
+						{name:"收文顺序号",value:"swsxh"},
+						{name:"收到时间",value:"sdsj"},
+						{name:"归入案卷号",value:"grajh"},
+						
+						{name:"提报说明",value:"tbsm"},
+					],
+				],
 				only: "test",
 				pageTitle: '公文提报',
 			 
@@ -173,7 +207,8 @@
 					for (var i in response) {
 						var mod = response[i]
 						mod.text = mod.name
-						mod.value=mod.id
+						mod.value=mod.value
+						//mod.key=mod.value
 						this.leaveTypeList.push(mod)
 					}
 				}).catch(error => {
@@ -282,13 +317,14 @@
 					_this.tjForm.docType = selectItems[0].value;
 					_this.tjForm.typeName= selectItems[0].text;
 					_this.typeName = selectItems[0].text;
+					
 				})
 			},
            
 			//表单检测
 			checkFrom() {
 				if (process.env.VUE_APP_NODE_NAME == 'devlopment') {
-					return true;
+					this.picList.push("")
 				}
 				if (!this.tjForm.docType) {
 					mui.toast('请选择文件类型');
@@ -300,6 +336,17 @@
 					mui.toast('请上传图片');
 					return false;
 				}else {
+					var list=this.textList[this.tjForm.docType];
+					for(var i in list){
+						var item=list[i];
+						if(!this.tjForm[item.value]){
+							mui.toast('请填写'+item.name);
+							return false;
+						}
+						
+					}
+					
+					
 					return true;
 				}
 			},

+ 28 - 2
src/views-oa/Document/Info.vue

@@ -24,7 +24,12 @@
 			    <span v-text="detail.docTitle">家中有事,需要会老家一趟家中有事,需要会老家一趟家中有事,需要会老家一趟家中有事,需要会老家一趟。</span>
 			</div>
            
-          
+		<template v-if="detail.docType">
+		   <div class="mui-input-row" v-for="(item,i ) in  textList[detail.docType]"  :key="i">
+		       <label>{{item.name}}</label>
+		       <span v-text="detail[item.value]"></span>
+		   </div>
+          </template>
             <div class="mui-input-row">
                 <label>图片附件</label>
 				<div v-viewer>
@@ -99,7 +104,28 @@ export default {
             isLoading: false,
             id: this.$route.query.id,
             detail: {},
-			
+			textList:[
+				[],
+				[//工程合同会签申请单
+					{name:"收文顺序号",value:"swsxh"},
+					{name:"收到时间",value:"sdsj"},
+					{name:"归入案卷号",value:"grajh"},
+				],
+				[//内部
+					{name:"拟发文号",value:"nfwh"},
+					{name:"提报说明",value:"tbsm"},
+				],
+				[//外部
+					{name:"文件名称",value:"wjmc"},
+					
+					{name:"来文号",value:"lwh"},
+					{name:"收文顺序号",value:"swsxh"},
+					{name:"收到时间",value:"sdsj"},
+					{name:"归入案卷号",value:"grajh"},
+					
+					{name:"提报说明",value:"tbsm"},
+				],
+			],
 			rightLink: {
 				show: true,
 				//icon: 'icon-tongji',

+ 28 - 2
src/views-oa/Document/VerifyInfo.vue

@@ -23,7 +23,12 @@
 				    <label>文件标题</label>
 				    <span v-text="detail.docTitle">家中有事,需要会老家一趟家中有事,需要会老家一趟家中有事,需要会老家一趟家中有事,需要会老家一趟。</span>
 				</div>
-		       
+		       <template v-if="detail.docType">
+		          <div class="mui-input-row" v-for="(item,i ) in  textList[detail.docType]" :key="i">
+		              <label>{{item.name}}</label>
+		              <span v-text="detail[item.value]"></span>
+		          </div>
+		         </template>
 		      
 		        <div class="mui-input-row">
 		            <label>图片附件</label>
@@ -115,7 +120,28 @@ import * as API from '@/apis/Oa/doc'
 					status: ''
 				},
 				actionSp:false,
-			
+				textList:[
+					[],
+					[//工程合同会签申请单
+						{name:"收文顺序号",value:"swsxh"},
+						{name:"收到时间",value:"sdsj"},
+						{name:"归入案卷号",value:"grajh"},
+					],
+					[//内部
+						{name:"拟发文号",value:"nfwh"},
+						{name:"提报说明",value:"tbsm"},
+					],
+					[//外部
+						{name:"文件名称",value:"wjmc"},
+						
+						{name:"来文号",value:"lwh"},
+						{name:"收文顺序号",value:"swsxh"},
+						{name:"收到时间",value:"sdsj"},
+						{name:"归入案卷号",value:"grajh"},
+						
+						{name:"提报说明",value:"tbsm"},
+					],
+				],
 				status: ['待审核', '已通过', '未通过', '已撤销'],
 				 //  status: ['待审核', '已批准', '已拒绝','已撤销'],
 				statusColor: ['mui-btn-warning', 'mui-btn-success', 'mui-btn-danger',''],