|
@@ -2,7 +2,7 @@
|
|
|
<view class="detail-page white-wrap">
|
|
|
<view>
|
|
|
<!-- 基础信息 -->
|
|
|
- <view class="section white-wrap base-info-wrap">
|
|
|
+ <view class="section white-wrap base-info-wrap" v-if="detail">
|
|
|
<image :src="statusImg" mode="aspectFill" class="status-img"></image>
|
|
|
<view class="title">
|
|
|
<text>{{detail.CompanyName}}</text>
|
|
@@ -20,7 +20,7 @@
|
|
|
</view>
|
|
|
<view>
|
|
|
<text class="lable">合同期限:</text>
|
|
|
- <text >{{detail.StartDateStr+'~'+detail.EndDateStr | formatTime}}({{detail.StartDateStr|formateYear(detail.EndDateStr)}})</text>
|
|
|
+ <text>{{detail.StartDate|formatDate}}~{{detail.EndDate | formatDate}}({{detail.StartDate|formateYear(detail.EndDate)}})</text>
|
|
|
</view>
|
|
|
<view>
|
|
|
<text class="lable">合同金额:</text>
|
|
@@ -153,8 +153,19 @@
|
|
|
steps
|
|
|
},
|
|
|
filters:{
|
|
|
+ formatDate(e){
|
|
|
+ if(e==='0001-01-01T00:00:00Z'){
|
|
|
+ return ''
|
|
|
+ }else{
|
|
|
+ return e.split('T')[0].replace(/-/g,'.')
|
|
|
+ }
|
|
|
+ },
|
|
|
formatTime(e){
|
|
|
- return e.replace(/-/g,'.')
|
|
|
+ if(e==='0001-01-01T00:00:00Z'){
|
|
|
+ return ''
|
|
|
+ }else{
|
|
|
+ return e.replace(/T/g,' ').replace(/\+08:00/g,' ').replace(/-/g,'.')
|
|
|
+ }
|
|
|
},
|
|
|
formateYear(start,end){
|
|
|
let starttime = new Date(start);
|
|
@@ -167,12 +178,12 @@
|
|
|
computed:{
|
|
|
// 处理变更说明
|
|
|
changeDesc(){
|
|
|
- return this.detail.ModifyContent&&this.detail.ModifyContent.split('<br/>').filter(item=> item)
|
|
|
+ return this.detail&&this.detail.ModifyContent.split('<br/>').filter(item=> item)
|
|
|
},
|
|
|
//回签附件
|
|
|
checkBackFiles(){
|
|
|
const reg = /\.(pdf)|$/;
|
|
|
- return this.detail.CheckBackFileUrl&&this.detail.CheckBackFileUrl.split("#").map((item) => {
|
|
|
+ return this.detail&&this.detail.CheckBackFileUrl.split("#").map((item) => {
|
|
|
if (reg.test(item)) {
|
|
|
return {
|
|
|
type: "pdf",
|
|
@@ -191,7 +202,7 @@
|
|
|
// 合同附件
|
|
|
constractFiles(){
|
|
|
const reg = /\.(pdf)|\.doc|\.docx$/;
|
|
|
- return this.detail.FileUrl&&this.detail.FileUrl.split("#").map((item) => {
|
|
|
+ return this.detail&&this.detail.FileUrl.split("#").map((item) => {
|
|
|
if (reg.test(item)) {
|
|
|
return {
|
|
|
type: "pdf",
|
|
@@ -209,6 +220,7 @@
|
|
|
},
|
|
|
// 状态图标
|
|
|
statusImg(){
|
|
|
+ if(!this.detail) return
|
|
|
if(this.detail.Status==='已审批'){
|
|
|
return require('../static/pass-icon.png')
|
|
|
}else if(this.detail.Status==='已签回'){
|
|
@@ -229,7 +241,7 @@
|
|
|
ContractApprovalId: null,//审批单id
|
|
|
ContractApprovalRecordId:null,//审批流程单id
|
|
|
ContractId:null,//合同id
|
|
|
- detail:{},
|
|
|
+ detail:null,
|
|
|
flowNodeList:null,
|
|
|
opt:{},
|
|
|
show:false,
|