| | |
| | | if (1 == tcx){ |
| | | var tcxPercent = $("#tcxPercent").val(); |
| | | if ("" == tcxPercent){ |
| | | Feng.info("同城小件物流比例抽成不能为空!"); |
| | | Feng.info("市内小件物流比例抽成不能为空!"); |
| | | return; |
| | | }else if (!regDouble.test(tcxPercent)) { |
| | | Feng.info("同城小件物流比例抽成格式不正确!"); |
| | | Feng.info("市内小件物流比例抽成格式不正确!"); |
| | | return; |
| | | } |
| | | }else if (2 == tcx){ |
| | | var tcxMoney = $("#tcxMoney").val(); |
| | | if ("" == tcxMoney){ |
| | | Feng.info("同城小件物流固定金额抽成不能为空!"); |
| | | Feng.info("市内小件物流固定金额抽成不能为空!"); |
| | | return; |
| | | }else if (!regDouble.test(tcxMoney)) { |
| | | Feng.info("同城小件物流固定金额抽成格式不正确!"); |
| | | Feng.info("市内小件物流固定金额抽成格式不正确!"); |
| | | return; |
| | | } |
| | | } |
| | |
| | | if (1 == tcx){ |
| | | var tcxPercent = $("#tcxPercent").val(); |
| | | if ("" == tcxPercent){ |
| | | Feng.info("同城小件物流比例抽成不能为空!"); |
| | | Feng.info("市内小件物流比例抽成不能为空!"); |
| | | return; |
| | | }else if (!regDouble.test(tcxPercent)) { |
| | | Feng.info("同城小件物流比例抽成格式不正确!"); |
| | | Feng.info("市内小件物流比例抽成格式不正确!"); |
| | | return; |
| | | } |
| | | }else if (2 == tcx){ |
| | | var tcxMoney = $("#tcxMoney").val(); |
| | | if ("" == tcxMoney){ |
| | | Feng.info("同城小件物流固定金额抽成不能为空!"); |
| | | Feng.info("市内小件物流固定金额抽成不能为空!"); |
| | | return; |
| | | }else if (!regDouble.test(tcxMoney)) { |
| | | Feng.info("同城小件物流固定金额抽成格式不正确!"); |
| | | Feng.info("市内小件物流固定金额抽成格式不正确!"); |
| | | return; |
| | | } |
| | | } |
| | |
| | | $(".timeClass").each(function () { |
| | | subArr.push({ |
| | | recordId:$(this).find("input[name*='recordId']").val(), |
| | | provinceCode:$(this).find("input[name*='provinceCode']").val(), |
| | | cityCode:$(this).find("input[name*='cityCode']").val(), |
| | | areaCode:$(this).find("input[name*='areaCode']").val(), |
| | | cityId:$(this).find("input[name*='cityId']").val(), |
| | | }) |
| | | }); |
| | | if(subArr.length <= 0){ |
| | |
| | | //添加区域 |
| | | TCompanyInfoDlg.addScope = function () { |
| | | var province = $("#province").val(); |
| | | var city = $("#city").val(); |
| | | var area = $("#area").val(); |
| | | if ("" == province){ |
| | | Feng.info("请选择区域"); |
| | | Feng.info("请选择城市"); |
| | | return; |
| | | } |
| | | var subArr=[]; |
| | | $(".timeClass").each(function () { |
| | | subArr.push({ |
| | | recordId:$(this).find("input[name*='recordId']").val(), |
| | | provinceCode:$(this).find("input[name*='provinceCode']").val(), |
| | | cityCode:$(this).find("input[name*='cityCode']").val(), |
| | | areaCode:$(this).find("input[name*='areaCode']").val(), |
| | | cityId:$(this).find("input[name*='cityId']").val() |
| | | }) |
| | | }); |
| | | for(var i=0;i<subArr.length;i++){ |
| | | var provinceCode = subArr[i].provinceCode; |
| | | var cityCode = subArr[i].cityCode; |
| | | var areaCode = subArr[i].areaCode; |
| | | if (province == provinceCode && city == cityCode && area == areaCode) { |
| | | Feng.info("区域已存在,请重新选择"); |
| | | var provinceCode = subArr[i].cityId; |
| | | if (province == provinceCode) { |
| | | Feng.info("城市已存在,请重新选择"); |
| | | return; |
| | | } |
| | | } |
| | | var provinceValue = $("#province option:selected").text(); |
| | | var cityValue = ""; |
| | | if (city != ""){ |
| | | cityValue = $("#city option:selected").text(); |
| | | } |
| | | var areaValue = ""; |
| | | if (area != ""){ |
| | | areaValue = $("#area option:selected").text(); |
| | | } |
| | | |
| | | var str = '<tr class="timeClass">' + |
| | | '<td><input type="hidden" id="recordId" name="recordId" value="0">' + |
| | | '<input type="hidden" id="provinceCode" name="provinceCode" value="'+province+'">' + |
| | | '<input type="hidden" id="cityCode" name="cityCode" value="'+city+'">' + |
| | | '<input type="hidden" id="areaCode" name="areaCode" value="'+area+'">'+provinceValue+cityValue+areaValue+'</td>' + |
| | | '<td><input type="hidden" id="recordId" name="recordId" value="">' + |
| | | '<input type="hidden" id="cityId" name="cityId" value="' + province + '">'+provinceValue+'</td>' + |
| | | '<td><button onclick="deleteSub(this)">移除</button></td></tr>'; |
| | | $("#conn").append(str); |
| | | } |