更新功能
This commit is contained in:
parent
fb8fbb6d83
commit
e64511c428
@ -105,7 +105,6 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
uni.$on('companyInfo', (e) => {
|
uni.$on('companyInfo', (e) => {
|
||||||
this.company = e;
|
this.company = e;
|
||||||
console.log(this.company);
|
|
||||||
this.initLoad();
|
this.initLoad();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -273,7 +273,7 @@
|
|||||||
"path": "companySign/companySign",
|
"path": "companySign/companySign",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "签约公司详情",
|
"navigationBarTitleText": "签约公司详情",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarBackgroundColor": "#0122C7",
|
"navigationBarBackgroundColor": "#0122C7",
|
||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
}
|
}
|
||||||
|
@ -2,14 +2,16 @@
|
|||||||
<view class="">
|
<view class="">
|
||||||
<company :id="id" type="company"></company>
|
<company :id="id" type="company"></company>
|
||||||
<view class="need_contract" v-if="!company.contract||!company.contract.status||!company.company.is_contract">
|
<view class="need_contract" v-if="!company.contract||!company.contract.status||!company.company.is_contract">
|
||||||
<view class="title">电子合同</view>
|
<!-- <view class="title">电子合同</view> -->
|
||||||
<picker v-if="company.contract&&company.contract.check_status==0||!company.contract"
|
<picker v-if="company.contract&&company.contract.check_status==0||!company.contract"
|
||||||
:range="contractTypeList" range-key="name" @change="changeType">
|
:range="contractTypeList" range-key="name" @change="changeType">
|
||||||
<u-button class="btns">
|
<button class="btns" style="width: 694rpx; margin: 0 auto;border-radius: 54rpx;overflow: hidden;background-color: #0122c7;color: #fff;">
|
||||||
<u-icon name="../../static/img/company/HT.png" size="20" style="margin-right: 10rpx;"></u-icon>
|
<u-icon name="../../static/img/company/HT.png" size="20" style="margin-right: 10rpx;"></u-icon>
|
||||||
发起合同
|
发起合同
|
||||||
</u-button>
|
</button>
|
||||||
<!-- <mybtn text="生成合同" position="false"></mybtn> -->
|
<!-- <view style="width: 694rpx; margin: 0 auto;border-radius: 54rpx;overflow: hidden;">
|
||||||
|
<mybtn text="生成合同" :position="false"><u-icon name="../../static/img/company/HT.png" size="20" style="margin-right: 10rpx;"></u-icon></mybtn>
|
||||||
|
</view> -->
|
||||||
</picker>
|
</picker>
|
||||||
<view v-if="company.contract&&company.contract.check_status==1">
|
<view v-if="company.contract&&company.contract.check_status==1">
|
||||||
<button class="btn tips_center">合同已生成,请等待审核</button>
|
<button class="btn tips_center">合同已生成,请等待审核</button>
|
||||||
@ -34,7 +36,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<u-line color="#999999FF" style="margin: 31rpx 0;"></u-line>
|
<u-line color="#999999FF" style="margin: 31rpx 0;"></u-line>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<button class="send_btn" @click="addContract">发送合同</button>
|
<button class="send_btn" @click="clickContract(2)">发送合同</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="company.contract&&company.contract.check_status==3" class="card">
|
<view v-if="company.contract&&company.contract.check_status==3" class="card">
|
||||||
@ -61,6 +63,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<u-modal :show="modelShow" title="提醒" :content="modelType==1?'请检查信息无误后再生成合同':'请检查合同无误后再发送'" closeOnClickOverlay showCancelButton cancel-text="我再看看" confirm-text="确认无误" close="modelShow=false" @cancel="modelShow=false" @confirm="modelType==1?createContract():addContract();modelShow=false"></u-modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -90,7 +93,10 @@
|
|||||||
typeShow: false,
|
typeShow: false,
|
||||||
timer: null, // 计时器
|
timer: null, // 计时器
|
||||||
timerCount: 0, //倒计时
|
timerCount: 0, //倒计时
|
||||||
contractTypeList: []
|
contractTypeList: [],
|
||||||
|
modelShow: false,
|
||||||
|
modelType: 1,
|
||||||
|
nowContractType: -1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@ -122,11 +128,13 @@
|
|||||||
},
|
},
|
||||||
changeType(e) {
|
changeType(e) {
|
||||||
// console.log(this.contractTypeList[e.detail.value]);
|
// console.log(this.contractTypeList[e.detail.value]);
|
||||||
this.createContract({
|
this.nowContractType = e.detail.value;
|
||||||
party_b: this.id,
|
this.clickContract(1);
|
||||||
contract_type: this.contractTypeList[e.detail.value].id,
|
// this.createContract({
|
||||||
type: 1 //1-公司,2-个人
|
// party_b: this.id,
|
||||||
})
|
// contract_type: this.contractTypeList[e.detail.value].id,
|
||||||
|
// type: 1 //1-公司,2-个人
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
// 查看合同
|
// 查看合同
|
||||||
naviToContract(file) {
|
naviToContract(file) {
|
||||||
@ -144,41 +152,39 @@
|
|||||||
})
|
})
|
||||||
this.contractTypeList = res.data;
|
this.contractTypeList = res.data;
|
||||||
},
|
},
|
||||||
|
clickContract(e){
|
||||||
|
this.modelType = e;
|
||||||
|
this.modelShow = true;
|
||||||
|
},
|
||||||
// 生成合同
|
// 生成合同
|
||||||
async createContract(data) {
|
async createContract(data) {
|
||||||
uni.showModal({
|
|
||||||
content: '请检查信息无误后再生成合同',
|
|
||||||
confirmText: '确认无误',
|
|
||||||
cancelText: '我再看看',
|
|
||||||
confirmColor: '#3175f9',
|
|
||||||
success: async (e) => {
|
|
||||||
if (e.confirm) {
|
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '合同生成中',
|
title: '合同生成中',
|
||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
let res = await initiateContract({
|
let res = await initiateContract({
|
||||||
party_b: data.party_b,
|
party_b: this.id,
|
||||||
contract_type: data.contract_type,
|
contract_type: this.contractTypeList[this.nowContractType].id,
|
||||||
type: data.type
|
type: 1
|
||||||
})
|
})
|
||||||
this.initCompany();
|
this.initCompany();
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
Toast(res.msg || '合同已生成');
|
Toast(res.msg || '合同已生成');
|
||||||
this.navTo('/subpkg/submit/submit?type=' + 1);
|
this.navTo('/subpkg/submit/submit?type=' + 1);
|
||||||
}
|
// uni.showModal({
|
||||||
}
|
// content: '请检查信息无误后再生成合同',
|
||||||
})
|
// confirmText: '确认无误',
|
||||||
|
// cancelText: '我再看看',
|
||||||
|
// confirmColor: '#3175f9',
|
||||||
|
// success: async (e) => {
|
||||||
|
// if (e.confirm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
// 发送合同
|
// 发送合同
|
||||||
async addContract(data) {
|
async addContract(data) {
|
||||||
uni.showModal({
|
|
||||||
content: '请检查合同无误后再发送',
|
|
||||||
confirmText: '确认无误',
|
|
||||||
cancelText: '我再看看',
|
|
||||||
confirmColor: '#3175f9',
|
|
||||||
success: async (e) => {
|
|
||||||
if (e.confirm) {
|
|
||||||
try {
|
try {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '合同发送中',
|
title: '合同发送中',
|
||||||
@ -196,9 +202,17 @@
|
|||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
Toast(e.msg || '合同发送失败');
|
Toast(e.msg || '合同发送失败');
|
||||||
}
|
}
|
||||||
}
|
// uni.showModal({
|
||||||
}
|
// content: '请检查合同无误后再发送',
|
||||||
})
|
// confirmText: '确认无误',
|
||||||
|
// cancelText: '我再看看',
|
||||||
|
// confirmColor: '#3175f9',
|
||||||
|
// success: async (e) => {
|
||||||
|
// if (e.confirm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
// 发送短信
|
// 发送短信
|
||||||
async getPostsms() {
|
async getPostsms() {
|
||||||
@ -239,7 +253,9 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
|
this.initCompany().then(()=>{
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user