Commit 3f28eccd authored by godwithdh's avatar godwithdh

status

parent f6ab81bf
...@@ -134,11 +134,11 @@ ...@@ -134,11 +134,11 @@
</div> </div>
<div class="list"> <div class="list">
<div class="tip">9. 出行明细</div> <div class="tip">9. 出行明细</div>
<textarea :placeholder="readOnly ? '' : '请输入'" :disabled="status==2" autoHeight="true" v-model="value.sHaveBeenDetail"/> <textarea :placeholder="status==2 ? '' : '请输入'" :disabled="status==2" autoHeight="true" v-model="value.sHaveBeenDetail"/>
</div> </div>
<div class="list"> <div class="list">
<div class="tip">10. 其他情况</div> <div class="tip">10. 其他情况</div>
<textarea :placeholder="readOnly ? '' : '请输入'" :disabled="status==2" autoHeight="true" v-model="value.sRemark"/> <textarea :placeholder="status==2 ? '' : '请输入'" :disabled="status==2" autoHeight="true" v-model="value.sRemark"/>
</div> </div>
<button @click="upData" v-if="status!=2">{{!status?'提交':'修改'}}</button> <button @click="upData" v-if="status!=2">{{!status?'提交':'修改'}}</button>
</div> </div>
...@@ -177,7 +177,6 @@ export default { ...@@ -177,7 +177,6 @@ export default {
iStatus:1, iStatus:1,
}, },
status:0,//0 新增,1 修改,2 只读 status:0,//0 新增,1 修改,2 只读
readOnly:false,//是否只读
} }
}, },
computed:{ computed:{
...@@ -186,14 +185,8 @@ export default { ...@@ -186,14 +185,8 @@ export default {
}) })
}, },
async activated(){ async activated(){
this.status = this.$route.query.readOnly == 'true' ? 2 : 0; this.status = parseInt(this.$route.query.readOnly)||0
if(this.$route.query.readOnly == 'true'){
this.status=2
var date=new Date(Number(this.$route.query.dDate))
if(util.dateFormat(date,"yyyy-MM-dd")==util.dateFormat(new Date(),"yyyy-MM-dd")){
this.status=1
}
}
this.value.sCreateAppid=this.$route.params.openId this.value.sCreateAppid=this.$route.params.openId
if(this.status>0){ if(this.status>0){
await this.getHealthDate(); await this.getHealthDate();
......
...@@ -537,7 +537,7 @@ export default { ...@@ -537,7 +537,7 @@ export default {
this.$router.push({name:'healthCardStatisticsList',params:{type:type}}); this.$router.push({name:'healthCardStatisticsList',params:{type:type}});
}, },
routerToPunchClockDetail(item){ routerToPunchClockDetail(item){
this.$router.push({name:'punchClockDetail',params:{id:'1',address:'1',openId:item.sCreateAppid},query:{readOnly:'true',dDate:new Date(Util.dateFormat(this.hdr.dDate,'yyyy-MM-dd')).getTime()}}) this.$router.push({name:'punchClockDetail',params:{id:'1',address:'1',openId:item.sCreateAppid},query:{readOnly:'2',dDate:new Date(Util.dateFormat(this.hdr.dDate,'yyyy-MM-dd')).getTime()}})
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment