|
@@ -12,20 +12,11 @@
|
|
|
|
|
|
/*===============================TDS 城市加载 -- start -- =============================== */
|
|
|
$(function(){
|
|
|
-
|
|
|
- // $("#province").ProvinceCity();
|
|
|
$('.skin-minimal input').iCheck({
|
|
|
checkboxClass: 'icheckbox-blue',
|
|
|
radioClass: 'iradio-blue',
|
|
|
increaseArea: '20%'
|
|
|
});
|
|
|
- // $("#arrcity").suggest(citys,{hot_list:commoncitys,dataContainer:'#arrcity_3word',onSelect:function(result){
|
|
|
- // console.log($(this)[0].value);
|
|
|
- // $("#city2").click()
|
|
|
- // },
|
|
|
- // attachObject:'#suggest'
|
|
|
- // });
|
|
|
- // $("#city2").suggest(citys,{hot_list:commoncitys,attachObject:"#suggest2"})
|
|
|
});
|
|
|
/*===============================TDS 城市加载 -- start -- =============================== */
|
|
|
|
|
@@ -174,6 +165,10 @@ var describeHandleDescText = UE.getEditor('describeHandleDescText', {
|
|
|
|
|
|
var isInitSendAddressSms = false;
|
|
|
|
|
|
+//产品类型id对应客诉问题分类id
|
|
|
+var productTypeArray = [[1,6],[6,1],[7,1],[9,1],[10,7],[11,8],[12,9],[13,1],[14,1],[15,10],[16,1],[17,1]];
|
|
|
+var customerTypeId=6; //因为产品类型初始化为上朵牙刷,所以初值为6
|
|
|
+
|
|
|
// sendAddressSms.ready(function() {
|
|
|
// sendAddressSms.setHeight(130); //固定高度
|
|
|
// });
|
|
@@ -210,18 +205,7 @@ 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 (){
|
|
|
- var companyId = $(this).val();
|
|
|
- $("#companyId").val(companyId);
|
|
|
- setStore(companyId); //获取店铺
|
|
|
- })
|
|
|
|
|
|
- /!*监听店铺选择事件*!/
|
|
|
- $("#selectStore").change(function (){
|
|
|
- var storeId = $(this).val();
|
|
|
- $("#storeId").val(storeId);
|
|
|
- })*/
|
|
|
})
|
|
|
/*===============================页面加载完成启动事件 -- end -- =============================== */
|
|
|
|
|
@@ -421,7 +405,17 @@ function initProduceType(){
|
|
|
}else{
|
|
|
$("#tdsId").hide();
|
|
|
}
|
|
|
- })
|
|
|
+
|
|
|
+ for(var i=0;i<productTypeArray.length;i++){
|
|
|
+ var array = productTypeArray[i];
|
|
|
+ if(typeId == array[0]){
|
|
|
+ customerTypeId = array[1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#complaintId").val(customerTypeId);
|
|
|
+ initComplaintSmallClassInfo(customerTypeId);
|
|
|
+
|
|
|
+ });
|
|
|
/*当前第一个默认选中上朵电动牙刷 isNeedSelectOrder = 2 默认不需要选择订单*/
|
|
|
// isNeedSelectOrder = 2 ;
|
|
|
// initProcessResult(allProcMethodIsBack,allProcMethodIsSend);
|
|
@@ -571,6 +565,11 @@ function initComplaintTypeInfo() {
|
|
|
html = '';
|
|
|
}
|
|
|
$("[name='complaintId']").html(html);
|
|
|
+
|
|
|
+ if(isEmpty(customerTypeId) ){
|
|
|
+ $("[name='complaintId']").val(customerTypeId);
|
|
|
+ }
|
|
|
+ initComplaintSmallClassInfo(customerTypeId);
|
|
|
},
|
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
}
|
|
@@ -1013,164 +1012,6 @@ function setAdress(addres){
|
|
|
}
|
|
|
ulcRelationAddress.setUlcByName(0,addresList[0],addresList[1],addresList[2]);
|
|
|
$("#sendAddress").val(addresList[3]);
|
|
|
-
|
|
|
-
|
|
|
- // var proId = setPro(getAddress(addresList[0],0),1);
|
|
|
- // var cityId = setCity(getAddress(addresList[1],1),proId,1);
|
|
|
- // setDistrict(getAddress(addresList[2],2),cityId,1);
|
|
|
- // var sendAddress = addresList[3];
|
|
|
- // if(addresList.length > 4){
|
|
|
- // for(var k = 4;k< addresList.length;k++){
|
|
|
- // sendAddress += addresList[k];
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
-}
|
|
|
-
|
|
|
-/***
|
|
|
- * 删除 “省”,“市”,“区”关键字
|
|
|
- * type : 0:省 2:市 3:区
|
|
|
- */
|
|
|
-function getAddress(addrss,type) {
|
|
|
- var abbreviation = "";
|
|
|
- if(addrss == ""){
|
|
|
- abbreviation = "";
|
|
|
- }else{
|
|
|
- switch(type)
|
|
|
- {
|
|
|
- case 0:
|
|
|
- //var proReg = new RegExp("省","g");
|
|
|
- //abbreviation = addrss.replace(proReg,"");
|
|
|
- abbreviation = addrss.substring(0,2);
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- var cityReg = new RegExp("市","g");
|
|
|
- abbreviation = addrss.replace(cityReg,"");
|
|
|
-
|
|
|
- cityReg = new RegExp("区","g");
|
|
|
- abbreviation = addrss.replace(cityReg,"");
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- var districtReg = new RegExp("区","g");
|
|
|
- abbreviation = addrss.replace(districtReg,"");
|
|
|
-
|
|
|
- districtReg = new RegExp("市","g");
|
|
|
- abbreviation = abbreviation.replace(districtReg,"");
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- return abbreviation
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * 设置省
|
|
|
- * type 1:搜索订单赋值 2:只查询全部,默认第一个
|
|
|
- */
|
|
|
-function setPro(provinceName,type) {
|
|
|
- var proId = '';
|
|
|
- var province = listProvince();
|
|
|
- var selectPro = new Array();
|
|
|
- if(type == 1){
|
|
|
- selectPro = listProvince("",provinceName);
|
|
|
- }
|
|
|
- if(province!=null){
|
|
|
- var provinceHtml = ''
|
|
|
- provinceHtml += '<option value="">请选择省份</option>';
|
|
|
- for(var i=0;i<province.length;i++){
|
|
|
- provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
|
|
|
- }
|
|
|
-
|
|
|
- $("#province").html(provinceHtml);
|
|
|
-
|
|
|
- if(selectPro != null && selectPro.length > 0 ){
|
|
|
- proId = selectPro[0].provinceId;
|
|
|
- }else{
|
|
|
- proId = province[0].provinceId;
|
|
|
- }
|
|
|
- $("#province option[value='" + proId + "']").attr("selected","true");
|
|
|
- }
|
|
|
- return proId;
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * 设置市
|
|
|
- * type 1:搜索订单赋值 2:只查询全部,默认第一个
|
|
|
- */
|
|
|
-function setCity(cityName,proId,type) {
|
|
|
- var cityId = '';
|
|
|
- var city = listCity(proId,"");
|
|
|
- var selectCity = new Array();
|
|
|
- if(type == 1){
|
|
|
- selectCity = listCity(proId,cityName);
|
|
|
- }
|
|
|
-
|
|
|
- if(city!=null){
|
|
|
- var cityHtml = ''
|
|
|
- for(var i=0;i<city.length;i++){
|
|
|
- cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
|
|
|
- }
|
|
|
- $("#city").html(cityHtml);
|
|
|
- if(selectCity != null && selectCity.length > 0 ){
|
|
|
- cityId = selectCity[0].cityId;
|
|
|
- }else{
|
|
|
- cityId = city[0].cityId;
|
|
|
- }
|
|
|
- $("#city option[value='" + cityId + "']").attr("selected","true");
|
|
|
- }
|
|
|
- return cityId;
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * 设置区
|
|
|
- * type 1:搜索订单赋值 2:只查询全部,默认第一个
|
|
|
- */
|
|
|
-function setDistrict(districtName,cityId,type) {
|
|
|
- var district = listDistrict(cityId,"");
|
|
|
- var selectDistrict = new Array();
|
|
|
- if(type == 1){
|
|
|
- selectDistrict = listDistrict(cityId,districtName);
|
|
|
- }
|
|
|
- if(district!=null){
|
|
|
- var districtHtml = ''
|
|
|
- for(var i=0;i<district.length;i++){
|
|
|
- districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
|
|
|
- }
|
|
|
- var disId = "";
|
|
|
- $("#district").html(districtHtml);
|
|
|
- if(selectDistrict != null && selectDistrict.length > 0 ){
|
|
|
- disId = selectDistrict[0].districtId;
|
|
|
- }else{
|
|
|
- disId = district[0].districtId;
|
|
|
- }
|
|
|
- $("#district option[value='" + disId + "']").attr("selected","true");
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-/* TDS收集设置区 */
|
|
|
-var TDSCity = '';
|
|
|
-function linkageSetDistrict(){
|
|
|
- var arrcity_3word = $("#arrcity_3word").val();
|
|
|
- var cityName = '北京';
|
|
|
- for(var i = 0;i<citys.length;i++){
|
|
|
- for(var j=0;j<citys[i].length;j++){
|
|
|
- if(j == 0 && arrcity_3word == citys[i][j]){
|
|
|
- cityName = citys[i][1];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- TDSCity = cityName;
|
|
|
- var selectCity = listCity(null,cityName);
|
|
|
- var cityId = selectCity[0].cityId;
|
|
|
- var selectDistrict = listDistrict(cityId,"");
|
|
|
- var html = '';
|
|
|
- for(var i=0;i<selectDistrict.length;i++){
|
|
|
- html += '<option value="'+ selectDistrict[i].districtId +'">'+ selectDistrict[i].district +'</option>';
|
|
|
- }
|
|
|
- $("#TDSArea").html(html);
|
|
|
- $("#TDSArea").find("option").eq(0).prop("selected",true);
|
|
|
- setTDSCollect();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1276,39 +1117,6 @@ function TDSLinkage(node,maxNumber,minNumber){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/*获取销售公司*/
|
|
|
-/*function getCompany(companyId){
|
|
|
- var currentlyCompanyId = $("#companyId").val();
|
|
|
- if(currentlyCompanyId != null && currentlyCompanyId != ""){
|
|
|
- companyId = currentlyCompanyId;
|
|
|
- }
|
|
|
- $.ajax({
|
|
|
- type: "get",
|
|
|
- data: {
|
|
|
- },
|
|
|
- url: url_path + "/admin/customer/select_company",
|
|
|
- success: function(data){
|
|
|
- if (data.returnCode == 200) {
|
|
|
- var html = '<option value="">销售公司</option>';
|
|
|
- for(var i=0;i<data.returnMsg.companyInfoList.length;i++){
|
|
|
- var company = data.returnMsg.companyInfoList[i];
|
|
|
- html += '<option value="'+ company.companyId +'">'+ company.companyName +'</option>';
|
|
|
- }
|
|
|
- $("#selectCompany").html(html);
|
|
|
-
|
|
|
- if(typeof(companyId) != "undefined"){
|
|
|
- $("#selectCompany option[value='" + companyId + "']").attr("selected","true");
|
|
|
- setStore(companyId,$("#selectStore")); //获取店铺
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
- }
|
|
|
- });
|
|
|
-}*/
|
|
|
-
|
|
|
-
|
|
|
/*获取销售店铺*/
|
|
|
function setStore(companyId,storeId){
|
|
|
$.ajax({
|
|
@@ -1352,26 +1160,6 @@ function opentionSelectOrder(){
|
|
|
// opentionSelectOrderDiv();
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * 展示订单
|
|
|
- */
|
|
|
-// function opentionSelectOrderDiv(){
|
|
|
-// if(isNeedSelectOrder == 2 || (allProcMethodIsBack == 2 && allProcMethodIsSend == 2) ){ //不展示
|
|
|
-// $(".orderHead").hide();
|
|
|
-// $(".renewedProduct").hide();
|
|
|
-// $(".updateProduct").hide();
|
|
|
-// }else{ //展示
|
|
|
-// $(".orderHead").show();
|
|
|
-// if(allProcMethodIsBack == 1){
|
|
|
-// $(".renewedProduct").show();
|
|
|
-// $(".updateProduct").show();
|
|
|
-// }else{
|
|
|
-// $(".renewedProduct").hide();
|
|
|
-// $(".updateProduct").hide();
|
|
|
-// }
|
|
|
-// }
|
|
|
-// };
|
|
|
-
|
|
|
/*===============================客诉提交 -- start -- =============================== */
|
|
|
$(function(){
|
|
|
$("#form-customer-add").Validform({
|