|
@@ -199,9 +199,9 @@
|
|
|
<view class="icon select check" v-if="item.check"></view>
|
|
|
<view class="icon select" v-else></view>
|
|
|
<view class="title">{{ item.name }}</view>
|
|
|
- <view class="xze">
|
|
|
+ <view class="xze" v-if="stues=='任务分派'||stues=='报告编制'||stues=='报告审核'">
|
|
|
<view class="users omit">
|
|
|
- <text>基栋,滕工,周公,基栋,滕工,周公,基栋,滕工,周公,基栋,滕工,周公</text>
|
|
|
+ <text>{{tname}}</text>
|
|
|
</view>
|
|
|
<view class="icon" @click.stop="selectApprovers()"></view>
|
|
|
</view>
|
|
@@ -281,25 +281,43 @@ export default {
|
|
|
subDocuments: [],
|
|
|
templateForm: '',
|
|
|
versions: '0'
|
|
|
- }
|
|
|
+ },
|
|
|
+ stues:'',
|
|
|
+ secauser:{},
|
|
|
+ tname:''
|
|
|
};
|
|
|
},
|
|
|
onLoad(e) {
|
|
|
this.id = e.id;
|
|
|
//传过来的id
|
|
|
+ this.stues=e.sta;
|
|
|
this.state = e.ste;
|
|
|
if (e.ste == 1) {
|
|
|
- /* this.http.request({
|
|
|
- url: this.http.urls.xxxx + e.id,
|
|
|
- success: res => {
|
|
|
- this.item = res.data.data;
|
|
|
- }
|
|
|
- }); */
|
|
|
- this.getDocuments();
|
|
|
+ this.getDocuments();
|
|
|
} else if (e.ste == 2) {
|
|
|
this.empty();
|
|
|
}
|
|
|
//选中审批人员监听函数,其它类型的参考这个
|
|
|
+ uni.$on('selectu', res => {
|
|
|
+ console.log('selectu:' + JSON.stringify(res));
|
|
|
+ this.itemt.submitTo=[];
|
|
|
+ var su={isToPerson:true};
|
|
|
+ var u="";
|
|
|
+ this.tname='';
|
|
|
+ res.forEach(item => {
|
|
|
+ su.nodeid=item.nodeId;
|
|
|
+ u+=item.id+';';
|
|
|
+ this.tname+=item.name+',';
|
|
|
+ });
|
|
|
+ su.userids=u;
|
|
|
+ console.log('su:' + JSON.stringify(su));
|
|
|
+ this.itemt.submitTo.push(su);
|
|
|
+ console.log('su:' + JSON.stringify(this.itemt));
|
|
|
+
|
|
|
+ this.convert();
|
|
|
+ });
|
|
|
+
|
|
|
+ //选中审批人员监听函数,其它类型的参考这个
|
|
|
uni.$on('select', res => {
|
|
|
console.log('asd2:' + JSON.stringify(res));
|
|
|
if (res.ste == 1) {
|
|
@@ -338,6 +356,9 @@ export default {
|
|
|
e.check = true;
|
|
|
this.itemt.nextNodeIds = [];
|
|
|
this.itemt.nextNodeIds.push(e.id);
|
|
|
+ this.secauser=this.itemt;
|
|
|
+ this.secauser.nodeid=e.id;
|
|
|
+
|
|
|
this.$forceUpdate();
|
|
|
}, //详情
|
|
|
getDocuments() {
|
|
@@ -348,7 +369,7 @@ export default {
|
|
|
this.item = res.data.data.items;
|
|
|
this.p = res.data.data;
|
|
|
this.getUsers();
|
|
|
-
|
|
|
+console.log('this.p:' + JSON.stringify(res));
|
|
|
//保存数据
|
|
|
this.btitem.id = res.data.data.id;
|
|
|
this.btitem.formId = res.data.data.formid;
|
|
@@ -402,7 +423,7 @@ export default {
|
|
|
url: this.http.urls.empty,
|
|
|
data: this.item,
|
|
|
success: res => {
|
|
|
- console.log('res2:' + JSON.stringify(res));
|
|
|
+
|
|
|
this.item = res.data.data.items;
|
|
|
this.p = res.data.data;
|
|
|
//保存数据
|
|
@@ -491,8 +512,9 @@ export default {
|
|
|
},
|
|
|
//选择审批人员
|
|
|
selectApprovers(e) {
|
|
|
+
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages/index/selectApprovers?item=' + JSON.stringify(this.itemt)
|
|
|
+ url: '/pages/index/selectApprovers?item=' + JSON.stringify(this.secauser)
|
|
|
});
|
|
|
},
|
|
|
//选择文件上传
|
|
@@ -620,7 +642,7 @@ export default {
|
|
|
this.itemt.currentNodeId = res.data.data.currentNodeId;
|
|
|
this.itemt.attitude = '';
|
|
|
this.itemt.signature = '';
|
|
|
- this.itemt.submitTo = '';
|
|
|
+ this.itemt.submitTo = [];
|
|
|
this.itemt.circulatorInfo = '';
|
|
|
this.itemt.subFlowApproverInfo = '';
|
|
|
this.itemt.subFlowApproverInfoAll = '';
|
|
@@ -639,9 +661,26 @@ export default {
|
|
|
this.itemt.parentId = '';
|
|
|
this.itemt.subFlowApprover = [];
|
|
|
this.itemt.subSelects = [];
|
|
|
- this.itemt.submitTo = [];
|
|
|
+ //this.itemt.submitTo = [];
|
|
|
this.itemt.templateForm = '';
|
|
|
this.itemt.viewId = '';
|
|
|
+ if(this.stues=='任务分派'||this.stues=='报告编制'||this.stues=='报告审核'){
|
|
|
+ if(this.itemt.submitTo.length == 0){
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '请选择审批人',
|
|
|
+ showCancel: false,
|
|
|
+ success: res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ // uni.navigateBack();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
this.http.request({
|
|
|
url: this.http.urls.documents + this.id + '/workflows/submit',
|
|
|
data: this.itemt,
|
|
@@ -652,8 +691,7 @@ export default {
|
|
|
console.log('zx22:' + JSON.stringify(res));
|
|
|
this.show = false;
|
|
|
|
|
|
- this.title = res.data.data.name;
|
|
|
- this.nextNodes = res.data.data.nextNodes;
|
|
|
+
|
|
|
uni.$emit('index');
|
|
|
uni.redirectTo({
|
|
|
url: '/pages/index/index'
|
|
@@ -681,7 +719,7 @@ export default {
|
|
|
this.itemt.currentNodeId = res.data.data.currentNodeId;
|
|
|
this.itemt.attitude = '';
|
|
|
this.itemt.signature = '';
|
|
|
- this.itemt.submitTo = '';
|
|
|
+ //this.itemt.submitTo = [];
|
|
|
this.itemt.circulatorInfo = '';
|
|
|
this.itemt.subFlowApproverInfo = '';
|
|
|
this.itemt.subFlowApproverInfoAll = '';
|
|
@@ -699,7 +737,7 @@ export default {
|
|
|
this.itemt.parentId = '';
|
|
|
this.itemt.subFlowApprover = [];
|
|
|
this.itemt.subSelects = [];
|
|
|
- this.itemt.submitTo = [];
|
|
|
+ //this.itemt.submitTo = [];
|
|
|
this.itemt.templateForm = '';
|
|
|
this.itemt.viewId = '';
|
|
|
this.http.request({
|
|
@@ -712,8 +750,7 @@ export default {
|
|
|
console.log('zx22:' + JSON.stringify(res));
|
|
|
this.bshow = false;
|
|
|
|
|
|
- this.title = res.data.data.name;
|
|
|
- this.nextNodes = res.data.data.nextNodes;
|
|
|
+
|
|
|
uni.$emit('index');
|
|
|
uni.redirectTo({
|
|
|
url: '/pages/index/index'
|