| | |
| | | if ($('#userType').val()==1){ |
| | | // 兑换方式 |
| | | let exchangeMethod = $(':radio[name="exchangeMethod"]:checked').val(); |
| | | if (exchangeMethod === '' || exchangeMethod === undefined || exchangeMethod === null){ |
| | | return Feng.error('兑换方式不能为空'); |
| | | |
| | | if (distributionMethod === '1') { |
| | | if (exchangeMethod === '' || exchangeMethod === undefined || exchangeMethod === null) { |
| | | return Feng.error('兑换方式不能为空'); |
| | | } |
| | | } |
| | | if (exchangeMethod === '1'){ |
| | | if (exchangeMethod === '1' ){ |
| | | if (requiredPoints === undefined || requiredPoints === '' || requiredPoints === null){ |
| | | return Feng.error('所需积分不能为空'); |
| | | } |
| | | } |
| | | if (exchangeMethod === '2'){ |
| | | if (exchangeMethod === '2' && distributionMethod === '1'){ |
| | | if (requiredPoints === undefined || requiredPoints === '' || requiredPoints === null){ |
| | | return Feng.error('所需积分不能为空'); |
| | | } |
| | |
| | | return Feng.error('所需现金不能为空'); |
| | | } |
| | | } |
| | | if (exchangeMethod === '3'){ |
| | | if (exchangeMethod === '3' && distributionMethod === '1'){ |
| | | if (requiredCash === undefined || requiredCash === '' || requiredCash === null){ |
| | | return Feng.error('所需现金不能为空'); |
| | | } |
| | |
| | | |
| | | |
| | | $(function () { |
| | | |
| | | |
| | | |
| | | getProvince(null); |
| | | radio1(); |
| | | var OBJradio = document.getElementsByName("prescription") |
| | |
| | | $('#app1').show(); |
| | | // 适用范围 |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | const distributionMethodOptions = document.getElementsByName('distributionMethod'); |
| | | |
| | | // 监听distributionMethod选项的变化 |
| | | for (let i = 0; i < distributionMethodOptions.length; i++) { |
| | | distributionMethodOptions[i].addEventListener('change', function() { |
| | | // 获取选中的distributionMethod值 |
| | | const selectedDistributionMethod = document.querySelector('input[name="distributionMethod"]:checked').value; |
| | | |
| | | // 判断选中的值是否不等于1 |
| | | if (selectedDistributionMethod !== '1') { |
| | | console.log("已经选择1") |
| | | // 隐藏exchangeType |
| | | document.getElementById('exchangeType').style.display = 'none'; |
| | | document.getElementById('needAmount').style.display = 'none'; |
| | | document.getElementById('needIntegral').style.display = 'none'; |
| | | } else { |
| | | // 显示exchangeType |
| | | document.getElementById('exchangeType').style.display = 'block'; |
| | | document.getElementById('needAmount').style.display = 'block'; |
| | | document.getElementById('needIntegral').style.display = 'block'; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | }); |