|
@@ -51,7 +51,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="approve">
|
|
|
+ <view class="approve" v-if="approverNum==1">
|
|
|
<view class="liuc">流程</view>
|
|
|
<view style="display: flex; justify-content: space-between;">
|
|
|
<view class="approveLeft">
|
|
@@ -107,6 +107,7 @@
|
|
|
pickerItem: '',
|
|
|
shopId:'',
|
|
|
Approver:'',
|
|
|
+ approverNum:'',
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
@@ -118,13 +119,24 @@
|
|
|
this.shopId = opt.shopId;
|
|
|
if (opt.type == 3) {
|
|
|
this.suggestList = this.$store.state.suggestList;
|
|
|
+ console.log(this.suggestList)
|
|
|
//this.addOp()
|
|
|
}
|
|
|
+ this.getIsReportApprover()
|
|
|
this.getTime();
|
|
|
this.getqueryCheckCategory();
|
|
|
this.getqueryApprover();
|
|
|
},
|
|
|
- methods: {
|
|
|
+ methods: {
|
|
|
+ //获取是否审批
|
|
|
+ getIsReportApprover(){
|
|
|
+ this.$http('accompany/superCheckSheet/approve/getIsReportApprover', {
|
|
|
+ shopId: this.shopId,
|
|
|
+
|
|
|
+ }, 'GET').then(res => {
|
|
|
+ this.approverNum=res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
//获取审批人
|
|
|
getqueryApprover() {
|
|
|
this.$http('accompany/superCheckSheet/approve/queryApprover', {
|
|
@@ -315,7 +327,7 @@
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
- if (!this.Approver.approverId) {
|
|
|
+ if (!this.Approver.approverId&&this.approverNum==1) {
|
|
|
uni.showToast({
|
|
|
title: '请联系管理员,设置审批人',
|
|
|
icon: 'none',
|
|
@@ -349,6 +361,9 @@
|
|
|
duration: 2000,
|
|
|
});
|
|
|
setTimeout(function() {
|
|
|
+ // if(that.approverNum==2){
|
|
|
+ // that.approveAgree()
|
|
|
+ // }
|
|
|
uni.navigateTo({
|
|
|
url: 'shopEvaStar?id=' + res.data + '&sheetID=' + that.sheetID +
|
|
|
'&shopName=' + that.shopName + '&Contactor=' + that.Contactor
|
|
@@ -364,6 +379,7 @@
|
|
|
}) */
|
|
|
}
|
|
|
}, 1000)
|
|
|
+
|
|
|
}
|
|
|
else {
|
|
|
uni.showToast({
|
|
@@ -375,10 +391,18 @@
|
|
|
|
|
|
})
|
|
|
},
|
|
|
+ approveAgree(){ // 自动审核
|
|
|
+ this.$http('accompany/superCheckSheet/approve/approveAgree', {
|
|
|
+ sheetId: this.sheetID,
|
|
|
+ approvalComment:'',
|
|
|
+ }, 'POST').then(res => {
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
getqueryCheckCategory() {
|
|
|
this.$http('accompany/SuperCheckSheet/queryCheckCategory', {
|
|
|
sheetID: this.sheetID,
|
|
|
-
|
|
|
+
|
|
|
}, 'GET').then(res => {
|
|
|
res.data.forEach(item => {
|
|
|
item.title = item.categoryName
|