提交 cb30ed8a9d4756e3df0f4878b7189137e7bf0c4d

作者 wangyu
1 个父辈 366ffb52

优化

@@ -175,6 +175,7 @@ Page({ @@ -175,6 +175,7 @@ Page({
175 handleAddition: function(data) { 175 handleAddition: function(data) {
176 var that = this 176 var that = this
177 var newdata = data.items 177 var newdata = data.items
  178 + var inputdisable = this.data.input_disable
178 this.setData({ 179 this.setData({
179 origindata: data 180 origindata: data
180 }) 181 })
@@ -202,7 +203,7 @@ Page({ @@ -202,7 +203,7 @@ Page({
202 // shareMethodData: shareMethod_Data 203 // shareMethodData: shareMethod_Data
203 // }) 204 // })
204 } else if (that.data.cur_status == "support_duty") { 205 } else if (that.data.cur_status == "support_duty") {
205 - 206 +
206 var supportlist = newdata[0].support_duties 207 var supportlist = newdata[0].support_duties
207 if (supportlist && supportlist.length > 0) { 208 if (supportlist && supportlist.length > 0) {
208 for (var i = 0; i < supportlist.length; i++) { 209 for (var i = 0; i < supportlist.length; i++) {
@@ -227,10 +228,12 @@ Page({ @@ -227,10 +228,12 @@ Page({
227 var shareMethod_Data = this.data.shareMethodData; 228 var shareMethod_Data = this.data.shareMethodData;
228 if (supportlist.length < 1 && cosupportlist.length<1){ 229 if (supportlist.length < 1 && cosupportlist.length<1){
229 btn_show = true 230 btn_show = true
  231 + inputdisable = false
230 issinglechild_Data.disabled = false; 232 issinglechild_Data.disabled = false;
231 shareMethod_Data.disabled = false; 233 shareMethod_Data.disabled = false;
232 }else{ 234 }else{
233 btn_show = false 235 btn_show = false
  236 + inputdisable = true
234 issinglechild_Data.disabled = true; 237 issinglechild_Data.disabled = true;
235 issinglechild_Data.selected = data.is_single == 'y' ? "是" : "否"; 238 issinglechild_Data.selected = data.is_single == 'y' ? "是" : "否";
236 239
@@ -322,7 +325,7 @@ Page({ @@ -322,7 +325,7 @@ Page({
322 } 325 }
323 this.setData({ 326 this.setData({
324 reduce_amount: data.month_deduction_amount ? data.month_deduction_amount : 0, 327 reduce_amount: data.month_deduction_amount ? data.month_deduction_amount : 0,
325 - input_disable: true, 328 + input_disable: inputdisable,
326 329
327 btn_show: btn_show, 330 btn_show: btn_show,
328 person_total_amount: data.person_total_amount ? data.person_total_amount : 0, 331 person_total_amount: data.person_total_amount ? data.person_total_amount : 0,
注册登录 后发表评论