|
@@ -118,35 +118,35 @@
|
|
|
<view class="form_group" @click="select('1')">
|
|
|
<view class="lable">需求审核-产品经理或主管人员</view>
|
|
|
<view class="tag">
|
|
|
- <text class="span">{{ item.WTXQSH }}</text>
|
|
|
+ <text class="span">{{ item.WTXQSH_NAME }}</text>
|
|
|
<text class="icon more"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="form_group" @click="select('2')">
|
|
|
<view class="lable">试验审核-试验对接人</view>
|
|
|
<view class="tag">
|
|
|
- <text class="span">{{ item.WTSYSH }}</text>
|
|
|
+ <text class="span">{{ item.WTSYSH_NAME }}</text>
|
|
|
<text class="icon more"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="form_group" @click="select('3')">
|
|
|
<view class="lable">需求批准-本部门领导</view>
|
|
|
<view class="tag">
|
|
|
- <text class="span">{{ item.WTXQPZ }}</text>
|
|
|
+ <text class="span">{{ item.WTXQPZ_NAME }}</text>
|
|
|
<text class="icon more"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="form_group" @click="select('4')">
|
|
|
<view class="lable">试验批准</view>
|
|
|
<view class="tag">
|
|
|
- <text class="span">{{ item.WTSYPZ }}</text>
|
|
|
+ <text class="span">{{ item.WTSYPZ_NAME }}</text>
|
|
|
<text class="icon more"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="form_group" @click="select('5')">
|
|
|
<view class="lable">任务分派-任务分派人</view>
|
|
|
<view class="tag">
|
|
|
- <text class="span">{{ item.WTRWFP }}</text>
|
|
|
+ <text class="span">{{ item.WTRWFP_NAME }}</text>
|
|
|
<text class="icon more"></text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -244,6 +244,7 @@ export default {
|
|
|
items: {}
|
|
|
}
|
|
|
},
|
|
|
+ users: [],
|
|
|
array1: ['类型1', '类型2', '类型3', '类型4'], //实验类型1
|
|
|
array2: ['类型2', '类型12', '类型13', '类型14'], //实验类型2
|
|
|
show: false,
|
|
@@ -272,7 +273,7 @@ export default {
|
|
|
subDocuments: [],
|
|
|
templateForm: '',
|
|
|
versions: '0'
|
|
|
- },
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
onLoad(e) {
|
|
@@ -304,6 +305,7 @@ export default {
|
|
|
} else if (res.ste == 5) {
|
|
|
this.item.WTRWFP = res.items.__IzBqxyYJhOYJntHpmEv.value;
|
|
|
}
|
|
|
+ this.convert();
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
@@ -337,20 +339,20 @@ export default {
|
|
|
success: res => {
|
|
|
this.item = res.data.data.items;
|
|
|
this.p = res.data.data;
|
|
|
-
|
|
|
- console.log('res.data:' + JSON.stringify(res.data));
|
|
|
-
|
|
|
+ this.getUsers();
|
|
|
+
|
|
|
//保存数据
|
|
|
this.btitem.id = res.data.data.id;
|
|
|
this.btitem.formId = res.data.data.formid;
|
|
|
this.btitem.versions = res.data.data.versions;
|
|
|
- this.btitem.parentId = "";
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- this.item.unstructured = JSON.parse(this.item.unstructured);
|
|
|
+ this.btitem.parentId = '';
|
|
|
+
|
|
|
+ if (this.item.unstructured) {
|
|
|
+ this.item.unstructured = JSON.parse(this.item.unstructured);
|
|
|
+ } else {
|
|
|
+ this.item.unstructured = [];
|
|
|
+ }
|
|
|
if (this.p.lastFlowOperation == undefined || this.p.auditorList.includes(this.getUser().id)) {
|
|
|
-
|
|
|
this.btnshow = true;
|
|
|
}
|
|
|
|
|
@@ -399,9 +401,8 @@ export default {
|
|
|
this.btitem.id = res.data.data.id;
|
|
|
this.btitem.formId = res.data.data.formid;
|
|
|
this.btitem.versions = res.data.data.versions;
|
|
|
- this.btitem.parentId = "";
|
|
|
-
|
|
|
-
|
|
|
+ this.btitem.parentId = '';
|
|
|
+
|
|
|
console.log('this.p1:' + JSON.stringify(this.p));
|
|
|
//this.current=res.data.data.items.report_type;
|
|
|
if (this.item.report_type == '正式报告') {
|
|
@@ -435,6 +436,36 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ //获取全部用户用于显示名字
|
|
|
+ getUsers() {
|
|
|
+ this.http.request({
|
|
|
+ url: this.http.urls.user_list,
|
|
|
+ success: res => {
|
|
|
+ this.users = res.data.data;
|
|
|
+ this.convert();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ convert() {
|
|
|
+ this.users.forEach(item => {
|
|
|
+ if (this.item.WTXQSH == item.ID) {
|
|
|
+ this.item.WTXQSH_NAME = item.NAME;
|
|
|
+ }
|
|
|
+ if (this.item.WTSYSH == item.ID) {
|
|
|
+ this.item.WTSYSH_NAME = item.NAME;
|
|
|
+ }
|
|
|
+ if (this.item.WTXQPZ == item.ID) {
|
|
|
+ this.item.WTXQPZ_NAME = item.NAME;
|
|
|
+ }
|
|
|
+ if (this.item.WTSYPZ == item.ID) {
|
|
|
+ this.item.WTSYPZ_NAME = item.NAME;
|
|
|
+ }
|
|
|
+ if (this.item.WTRWFP == item.ID) {
|
|
|
+ this.item.WTRWFP_NAME = item.NAME;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
//选择结果形式
|
|
|
change(e) {
|
|
|
this.current = e;
|
|
@@ -524,23 +555,20 @@ export default {
|
|
|
},
|
|
|
//保存
|
|
|
validate() {
|
|
|
-
|
|
|
- this.btitem.items = this.item;
|
|
|
+ this.btitem.items = this.item;
|
|
|
this.http.request({
|
|
|
- url: this.http.urls.validate +'/'+this.btitem.id+
|
|
|
- '/withoutValid?' +
|
|
|
- this.btitem.parentId,
|
|
|
+ url: this.http.urls.validate + '/' + this.btitem.id + '/withoutValid?' + this.btitem.parentId,
|
|
|
data: this.btitem,
|
|
|
method: 'PUT',
|
|
|
success: res => {
|
|
|
console.log('validate1:' + JSON.stringify(res));
|
|
|
-
|
|
|
- if(res.data.errcode==0){
|
|
|
+
|
|
|
+ if (res.data.errcode == 0) {
|
|
|
uni.$emit('index');
|
|
|
uni.redirectTo({
|
|
|
url: '/pages/index/index'
|
|
|
});
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: res.data.data.errmsg,
|
|
@@ -551,10 +579,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
});
|
|
|
},
|