Commit 66d09fbe by 朱继来

Merge branch 'zjl_erp_address_20210622' into development

parents 2df325b4 9975570c
...@@ -643,6 +643,46 @@ ...@@ -643,6 +643,46 @@
} }
$('form').on('submit', function(){ $('form').on('submit', function(){
var shipping_type = $('.shipping_type').val();
var consignee = $('.consignee').val();
var mobile = $('.mobile').val();
var s_province = $('.s_province').val();
var s_city = $('.s_city').val();
var s_county = $('.s_county').val();
var address = $('.address').val();
if (!consignee) {
layer.tips('收货人不能为空', $('.consignee'));
return false;
}
if (!mobile) {
layer.tips('联系电话不能为空', $('.mobile'));
return false;
}
if (shipping_type == 1) { // 快递
if (s_province == 0) {
layer.tips('省不能为空', $('.s_province'));
return false;
}
if (s_city == 0) {
layer.tips('市不能为空', $('.s_city'));
return false;
}
if (s_county == 0) {
layer.tips('区不能为空', $('.s_county'));
return false;
}
}
if (!address) {
layer.tips('详细地址不能为空', $('.address'));
return false;
}
$(this).ajaxSubmit({ $(this).ajaxSubmit({
data: {order_id: order_id}, data: {order_id: order_id},
dataType:'json', dataType:'json',
......
...@@ -38,12 +38,12 @@ ...@@ -38,12 +38,12 @@
<tr> <tr>
<th width="10%">收货人</th> <th width="10%">收货人</th>
<td><input type="text" name="consignee" value="{{$detail['consignee']}}"></td> <td><input type="text" name="consignee" class="consignee" value="{{$detail['consignee']}}"></td>
</tr> </tr>
<tr> <tr>
<th width="10%">联系电话</th> <th width="10%">联系电话</th>
<td><input type="text" name="mobile" value="{{$detail['mobile']}}"></td> <td><input type="text" name="mobile" class="mobile" value="{{$detail['mobile']}}"></td>
</tr> </tr>
<tr class="address-info"> <tr class="address-info">
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</tr> </tr>
<tr> <tr>
<th width="10%">详细地址</th> <th width="10%">详细地址</th>
<td><textarea class="form-control" name="address" placeholder="请输入详细地址">{{$detail['address']}}</textarea></td> <td><textarea class="form-control address" name="address" placeholder="请输入详细地址">{{$detail['address']}}</textarea></td>
</tr> </tr>
<tr> <tr>
<td colspan="2"><input type="submit" value="保存" class="btn btn-success"></td> <td colspan="2"><input type="submit" value="保存" class="btn btn-success"></td>
......
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 sign in to comment