|
@@ -1,7 +1,7 @@
|
|
|
/**
|
|
|
* 初始化销售渠道
|
|
|
*/
|
|
|
-getCompany();
|
|
|
+/*getCompany();*/
|
|
|
/**
|
|
|
*TDS 城市加载
|
|
|
*问题回复选择
|
|
@@ -211,17 +211,17 @@ var phoneReg2 = /(^[0-9]{3,4}\-[0-9]{3,8}$)|(^[0-9]{3,8}$)|(^\([0-9]{3,4}\)[0-9]
|
|
|
/*=============================== 页面加载完成启动事件 -- start -- =============================== */
|
|
|
$(function (){
|
|
|
/*监听销售公司选择事件*/
|
|
|
- $("#selectCompany").change(function (){
|
|
|
+ /*$("#selectCompany").change(function (){
|
|
|
var companyId = $(this).val();
|
|
|
$("#companyId").val(companyId);
|
|
|
- setStore(companyId,$("#selectStore")); //获取店铺
|
|
|
+ setStore(companyId); //获取店铺
|
|
|
})
|
|
|
|
|
|
- /*监听店铺选择事件*/
|
|
|
+ /!*监听店铺选择事件*!/
|
|
|
$("#selectStore").change(function (){
|
|
|
var storeId = $(this).val();
|
|
|
$("#storeId").val(storeId);
|
|
|
- })
|
|
|
+ })*/
|
|
|
})
|
|
|
/*===============================页面加载完成启动事件 -- end -- =============================== */
|
|
|
|
|
@@ -378,7 +378,7 @@ function initProduceType(){
|
|
|
var typeCompany = parseInt($("input:radio[name='typeId']:checked").attr("typeCompany"));
|
|
|
$("#selectCompany").val(typeCompany);
|
|
|
$("#companyId").val(typeCompany);
|
|
|
- setStore(typeCompany,$("#selectStore")); //获取店铺
|
|
|
+ setStore(typeCompany,typeId); //获取店铺
|
|
|
var isOrder = 1;
|
|
|
var isShowTDS = 2;//是否展示tds 1是 2否
|
|
|
switch (typeId){ //1:Soodo电动牙刷 6:WaterO净水机 7:Aiberle净水机 9 :YULIA净水机
|
|
@@ -397,11 +397,11 @@ function initProduceType(){
|
|
|
isOrder = 1;
|
|
|
isShowTDS = 1;
|
|
|
break;
|
|
|
- case 16:
|
|
|
+ case 16://诺米克净水机
|
|
|
isOrder = 1;
|
|
|
isShowTDS = 1;
|
|
|
break;
|
|
|
- case 17:
|
|
|
+ case 17://花作净水机
|
|
|
isOrder = 1;
|
|
|
isShowTDS = 1;
|
|
|
break;
|
|
@@ -973,7 +973,7 @@ function setSelectOrder(orderId){
|
|
|
$("#companyId").val(companyId);
|
|
|
$("#storeId").val(storeId);
|
|
|
$("#ids").val(orderId);
|
|
|
- getCompany();
|
|
|
+ /*getCompany();*/
|
|
|
layer.close(index);
|
|
|
},
|
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
@@ -1270,10 +1270,8 @@ function TDSLinkage(node,maxNumber,minNumber){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * 获取销售公司
|
|
|
- */
|
|
|
-function getCompany(companyId){
|
|
|
+/*获取销售公司*/
|
|
|
+/*function getCompany(companyId){
|
|
|
var currentlyCompanyId = $("#companyId").val();
|
|
|
if(currentlyCompanyId != null && currentlyCompanyId != ""){
|
|
|
companyId = currentlyCompanyId;
|
|
@@ -1302,14 +1300,11 @@ function getCompany(companyId){
|
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
}
|
|
|
});
|
|
|
-}
|
|
|
+}*/
|
|
|
|
|
|
-/**
|
|
|
- * 展示店铺
|
|
|
- */
|
|
|
-function setStore(companyId,node){
|
|
|
|
|
|
- var html = '<option value="">店铺</option>';
|
|
|
+/*获取销售店铺*/
|
|
|
+function setStore(companyId,typeId){
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
data: {
|
|
@@ -1317,19 +1312,29 @@ function setStore(companyId,node){
|
|
|
},
|
|
|
url: url_path + "/admin/customer/select_storeInfo",
|
|
|
success: function(data){
|
|
|
- var id;
|
|
|
+ $("#datalist_1").empty(); //清空下拉框
|
|
|
if (data.returnCode == 200) {
|
|
|
for(var i=0;i<data.returnMsg.storeInfoList.length;i++){
|
|
|
var storeInfo = data.returnMsg.storeInfoList[i];
|
|
|
- html += '<option value="'+ storeInfo.storeId +'">'+ storeInfo.storeName +'</option>';
|
|
|
- }
|
|
|
- }else{
|
|
|
- html = '';
|
|
|
- }
|
|
|
- $(node).html(html);
|
|
|
- var currentlyStoreId = $("#storeId").val();
|
|
|
- if(currentlyStoreId != null && currentlyStoreId != ""){
|
|
|
- $("#selectStore option[value='" + currentlyStoreId + "']").attr("selected","true");
|
|
|
+
|
|
|
+ if(typeId == 16) {
|
|
|
+ if (storeInfo.storeId == 73) {
|
|
|
+ $("#store_1").val(storeInfo.storeName);
|
|
|
+ $("#storeId").val(storeInfo.storeId);
|
|
|
+ }
|
|
|
+ }else if(typeId == 17) {
|
|
|
+ if (storeInfo.storeId == 75) {
|
|
|
+ $("#store_1").val(storeInfo.storeName);
|
|
|
+ $("#storeId").val(storeInfo.storeId);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(i == 0){
|
|
|
+ $("#store_1").val(storeInfo.storeName);
|
|
|
+ $("#storeId").val(storeInfo.storeId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#datalist_1").append("<option data-id='"+storeInfo.storeId+"' value='"+ storeInfo.storeName +"'>"+ storeInfo.storeName +"</option>");
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
@@ -1337,6 +1342,7 @@ function setStore(companyId,node){
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 控制展示订单
|
|
|
* 1:需要有订单 2:不需要有订单
|