operation check

This commit is contained in:
caoqianming 2019-12-02 21:09:27 +08:00
parent c875911ae8
commit 5be66b318e
3 changed files with 32 additions and 5 deletions

View File

@ -10,6 +10,18 @@ Page({
zyqy:'',
chosespr:false
},
bindspr1change: function (e) {
this.setData({
spr1index: e.detail.value,
})
this.data.spr1s = this.data.spr1Array[e.detail.value].value
},
bindspr2change: function (e) {
this.setData({
spr2index: e.detail.value,
})
this.data.spr2s = this.data.spr2Array[e.detail.value].value
},
checkboxChangefxcs: function (e) {
var x = this.data.fxcslist;
var values = e.detail.value;
@ -258,13 +270,13 @@ Page({
'content-type': 'application/json', //
'Cookie': wx.getStorageSync("sessionid"),
},
method: 'GET',
method: 'POST',
data: {'sdbm':this.data.sdbm},
success: res => {
if (res.statusCode === 200) {
this.setData({
spr1Array:res.data.spr1Array,
spr2Array:res.data.spr2Array
spr1Array:res.data.data.spr1Array,
spr2Array:res.data.data.spr2Array
})
}
}
@ -287,6 +299,12 @@ Page({
that.Tap1('请输入作业内容!')
} else if (!that.data.fxcs) {
that.Tap1('请确认分析措施!')
} else if (that.data.chosespr==true) {
if(!that.data.spr1s||!that.data.spr2s){
that.Tap1('审批人未选择!')
}else{
this.upimg(0, this.data.zyimg.length);
}
}else {
this.upimg(0, this.data.zyimg.length);
}
@ -350,6 +368,12 @@ Page({
zyimg: this.data.zyimg,
sdbm:this.data.sdbm,
fxcs: this.data.fxcs,
chosespr:this.data.chosespr,
}
if(this.data.chosespr){
zydata.spr1s = this.data.spr1s
zydata.spr2s = this.data.spr2s
zydata.chosespr = this.data.chosespr
}
//console.log(gcdata.unsafe)
wx.showLoading({

View File

@ -154,7 +154,7 @@
</view>
<view class="weui-cell__bd">
<picker bindchange="bindspr1change" value="{{spr1index}}" range="{{spr1Array}}" range-key="text">
<view class="weui-select">{{spr1Array[spr1index].text}}</view>
<view class="weui-select" style="color:blue;font-weight:bold">{{spr1Array[spr1index].text}}</view>
</picker>
</view>
</view>
@ -164,7 +164,7 @@
</view>
<view class="weui-cell__bd">
<picker bindchange="bindspr2change" value="{{spr2index}}" range="{{spr2Array}}" range-key="text">
<view class="weui-select">{{spr2Array[spr2index].text}}</view>
<view class="weui-select" style="color:blue;font-weight:bold">{{spr2Array[spr2index].text}}</view>
</picker>
</view>
</view>

View File

@ -16,6 +16,9 @@ Page({
newbm__partname: e.detail.name,
newbm: e.detail.id,
})
if(prevPage.route.indexOf('operation')!=-1){
prevPage.getspr12array()
}
wx.request({
url: getApp().globalData.serverUrl + 'getuser?a=combobox&partid='+e.detail.id,
header: {