|
@@ -8,7 +8,7 @@
|
|
|
<text class="icon code"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="form_group" v-if="op == '设备借用11'">
|
|
|
+ <view class="form_group" v-if="op == '设备借用11'">
|
|
|
<view class="lable">设备所属部门</view>
|
|
|
<view class="tag">
|
|
|
<view class="span">
|
|
@@ -19,15 +19,15 @@
|
|
|
<text class="icon more"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- <view class="form_group" v-if="op == '设备归还'">
|
|
|
+
|
|
|
+ <view class="form_group">
|
|
|
<view class="lable">归还者</view>
|
|
|
<view class="tag">
|
|
|
<input v-model="item.ghz" placeholder="归还者" />
|
|
|
<text class="icon more"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view class="form_group">
|
|
|
<view class="lable">手机号</view>
|
|
|
<view class="tag">
|
|
@@ -132,7 +132,7 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
-
|
|
|
+
|
|
|
bitem: {
|
|
|
applicationId: '__gAPYBW4YxB3UePM3lqO',
|
|
|
exparams: {},
|
|
@@ -200,7 +200,7 @@
|
|
|
tel: "",
|
|
|
remarks: ""
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
fieldId: "__0TQu1UrRbMZVX1UvtBL",
|
|
|
formId: "__w9J1gxcIWgXmNw6pE1F",
|
|
@@ -247,6 +247,7 @@
|
|
|
|
|
|
this.geteq.DEVID = this.code;
|
|
|
if (this.list.length == 0) {
|
|
|
+ console.log('getEq:1');
|
|
|
this.getEq();
|
|
|
} else {
|
|
|
this.list.forEach(item => {
|
|
@@ -264,8 +265,8 @@
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
-
|
|
|
- this.getEq();
|
|
|
+ console.log('getEq:2');
|
|
|
+ this.getEq();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -300,11 +301,11 @@
|
|
|
data: this.geteq,
|
|
|
method: 'POST',
|
|
|
success: res => {
|
|
|
- //console.log('res2:' + JSON.stringify(res));
|
|
|
+ console.log('res2:' + JSON.stringify(res.data.data.data));
|
|
|
if (res.data.errcode == 0) {
|
|
|
|
|
|
res.data.data.data.forEach(item => {
|
|
|
-
|
|
|
+
|
|
|
this.list.push(item);
|
|
|
});
|
|
|
}
|
|
@@ -312,13 +313,13 @@
|
|
|
});
|
|
|
},
|
|
|
empty() {
|
|
|
-
|
|
|
+
|
|
|
this.http.request({
|
|
|
url: this.http.urls.return_empty,
|
|
|
data: this.item,
|
|
|
|
|
|
success: res => {
|
|
|
- console.log('res2:' + JSON.stringify(res));
|
|
|
+ //console.log('res2:' + JSON.stringify(res));
|
|
|
this.item = res.data.data.items;
|
|
|
this.bitem.id = res.data.data.id;
|
|
|
this.bitem.formId = res.data.data.formid;
|
|
@@ -348,7 +349,7 @@
|
|
|
this.items.document.subDocuments = [];
|
|
|
this.items.document.templateForm = '';
|
|
|
this.items.document.versions = '0';
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -357,11 +358,11 @@
|
|
|
this.list.splice(this.list.indexOf(item), 1);
|
|
|
},
|
|
|
|
|
|
- tool_borrowing_empty() {
|
|
|
+ ghls_empty() {
|
|
|
this.list.forEach(item => {
|
|
|
|
|
|
- this.http.request({
|
|
|
- url: this.http.urls.tool_borrowing_empty,
|
|
|
+ this.http.request({
|
|
|
+ url: this.http.urls.ghls_empty,
|
|
|
data: this.item,
|
|
|
|
|
|
success: res => {
|
|
@@ -374,26 +375,27 @@
|
|
|
this.btitem.parentId = this.bitem.id;
|
|
|
//this.btitem.parent=this.bitem.id;
|
|
|
this.btitem.items = res.data.data.items;
|
|
|
+ this.btitem.items.DEVID = item.items.__O1qcaazksjAzDcrvJLk.value;//1
|
|
|
+ this.btitem.items.EQUNR = item.items.__Q0YnOcfMqiTpVsTiDEh.value; //1
|
|
|
+ this.btitem.items.EQKTX = item.items.__khn9SQnzgWNPt0aHldp.value; //1
|
|
|
+ this.btitem.items.TYPBZ = item.items.__fpUc5yOsHgSHeHPFHim.value; //1
|
|
|
+ this.btitem.items.CLFW = item.items.__soGLIaAxvM0O0NTVt1c.value; //1
|
|
|
+ this.btitem.items.NPLDA = item.items.__G47scKcbMDon7HgDiQ5.value; //1
|
|
|
+ this.btitem.items.SERGE = item.items.__3mveBfEF1si9RCAp9Sv.value; //1
|
|
|
+ this.btitem.items.HERST = item.items.__aPTYvYeakxz299A7Thk.value; //1
|
|
|
+ this.btitem.items.return_date = this.util.getDate('time'); //借用日期
|
|
|
+ this.btitem.items.returning_state = ""; //归还状态
|
|
|
+ this.btitem.items.TPLNR = item.items.__8BoEUIvmeOIjLiAwO9R.value; //1
|
|
|
+ this.btitem.items.INTNUM = item.items.__dRIZk7xLPVCO6rqJbs7.value; //1
|
|
|
+ this.btitem.items.NUMBER = item.items.__hImw4lGXCFmwyAx4fD8.value;//1
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- this.btitem.items.HERST = item.items.__SH6ZSHZMqHeGHDFLAaO.value; //
|
|
|
- this.btitem.items.TYPBZ = item.items.__drInpQcmkMf2iWseaRR.value; //
|
|
|
- this.btitem.items.EQKTX = item.items.__FwAgiHdxI4bCZaKNs4A.value; //
|
|
|
- this.btitem.items.FBL = item.items.__Tyyw12PleIHLPjjJWsV.value; //
|
|
|
- this.btitem.items.TPLNR = item.items.__a7cgJzxvCbcNNH0KjCn.value; //
|
|
|
- this.btitem.items.EQUNR = item.items.__b5UmDDfLaCJJdn5F4JF.value; //
|
|
|
- this.btitem.items.NUMBER = item.items.__2sfNVgOh5Bzq6lXRVuM.value;
|
|
|
- this.btitem.items.CLFW = item.items.__XcfZD8dzEQb5qURydpP.value; //
|
|
|
- this.btitem.items.borrowing_date = new Date(); //借用日期
|
|
|
- this.btitem.items.ZQDDJ = item.items.__Rhr5ihIebMolSIr8CKn.value; //
|
|
|
- this.btitem.items.ZDYXWC = item.items.__ARvSmuzLwNLg6TlB4tV.value; //
|
|
|
- this.btitem.items.STTXU = item.items.__SBtfwetYprHFQ5J2MAn.value; //
|
|
|
- this.btitem.items.SERGE = item.items.__qyobrAFN4PtseWXiY5A.value; //
|
|
|
- this.btitem.items.INTNUM = item.items.__BEViJOuGBdPWSxES5Z5.value; //
|
|
|
- this.btitem.items.NPLDA = item.items.__R8QpJNSHAVFaYwHnVCo.value; //
|
|
|
- //this.btitem.items.toolstate=0;//借用日期
|
|
|
-
|
|
|
-
|
|
|
- this.btitem.items.DEVID = item.items.__O1qcaazksjAzDcrvJLk.value;
|
|
|
console.log('this.btitem1:' + JSON.stringify(this.btitem));
|
|
|
this.validate();
|
|
|
|
|
@@ -416,20 +418,20 @@
|
|
|
method: 'POST',
|
|
|
success: res => {
|
|
|
console.log('validate1:' + JSON.stringify(res));
|
|
|
- this.updateparent(this.btitem.parentId,this.btitem.id);
|
|
|
+ this.updateparent(this.btitem.parentId, this.btitem.id);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- updateparent(parent,id) {
|
|
|
-
|
|
|
-
|
|
|
+ updateparent(parent, id) {
|
|
|
+
|
|
|
+
|
|
|
this.http.request({
|
|
|
- url: this.http.urls.ip2+'liug/app?parent='+parent+'&id='+id+'&table=tlk_tool_borrowing',
|
|
|
-
|
|
|
+ url: this.http.urls.ip2 + 'liug/app?parent=' + parent + '&id=' + id + '&table=tlk_ghlsb',
|
|
|
+
|
|
|
method: 'POST',
|
|
|
success: res => {
|
|
|
console.log('validate1:' + JSON.stringify(res));
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -467,20 +469,22 @@
|
|
|
//this.itemt.document.items.purpose="试验目的5656";
|
|
|
//this.itemt.document.items.title="标题5656";
|
|
|
|
|
|
- if (this.itemt.document.items.borrower == '' || this.itemt.document.items.borrower == null) {
|
|
|
+ if (this.itemt.document.items.ghz == '' || this.itemt.document.items.ghz == null) {
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
- content: '请填写借用人',
|
|
|
+ content: '请填写归还人',
|
|
|
showCancel: false,
|
|
|
success: res => {
|
|
|
if (res.confirm) {
|
|
|
//uni.navigateBack();
|
|
|
}
|
|
|
+ this.ghls_empty();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
+ /*
|
|
|
if (this.itemt.document.items.tel == '' || this.itemt.document.items.tel == null) {
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
@@ -496,7 +500,7 @@
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+*/
|
|
|
|
|
|
|
|
|
|
|
@@ -531,7 +535,7 @@
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- this.tool_borrowing_empty();
|
|
|
+
|
|
|
} else {
|
|
|
uni.showModal({
|
|
|
title: '提示',
|