Commit 8ba5a876 authored by 郑秀明's avatar 郑秀明

分期合同签署bug 修改

parent b481d6df
...@@ -105,6 +105,18 @@ ...@@ -105,6 +105,18 @@
}, },
// 缴纳定金提交 // 缴纳定金提交
handleSubmit(){ handleSubmit(){
const data = this.getData();
const checkData = this.checkData(data);
console.log(checkData,'checkData');
if(checkData > 0){
uni.showToast({
title: '请填写签署合同信息',
duration: 2000,
icon: 'none'
});
return;
}
if(!this.is_agree){ if(!this.is_agree){
uni.showToast({ uni.showToast({
title: '请阅读并同意采购分期合同', title: '请阅读并同意采购分期合同',
...@@ -113,7 +125,6 @@ ...@@ -113,7 +125,6 @@
}); });
return; return;
} }
const data = this.getData();
// 临时存储合同信息 // 临时存储合同信息
// uni.setStorageSync('temporary', JSON.stringify(data)); // uni.setStorageSync('temporary', JSON.stringify(data));
const install = uni.getStorageSync('installment'); const install = uni.getStorageSync('installment');
...@@ -203,6 +214,18 @@ ...@@ -203,6 +214,18 @@
data[key] = this.list[i].value; data[key] = this.list[i].value;
} }
return data; return data;
},
// 判断合同字段是否都已填写
checkData(data){
if(data){
let num = 0;
for(let d in data){
if(!data[d]){
num++;
}
}
return num;
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment