| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- function selectMultiple(obj) {
- var maindeptId = "";
- var maindeptId_ = obj.val(); //坐席
- if(maindeptId_ != null) {
- $(maindeptId_).each(function(i, n) {
- var obj2 = '';
- obj2 = n + ",";
- maindeptId += obj2;
- })
- maindeptId = maindeptId.substring(0, maindeptId.length - 1)
- } else {
- maindeptId = ""
- }
- return maindeptId
- }
- function selectCommon(obj){
- params = Object.assign(obj.params,{
- token: $.cookie("token"),
- })
- $.getJSON(
- huayi.config.callcenter_url + obj.apiUrl,params ,
- function(data) {
- console.log(data.rows)
- if(data.rows.length>0) {
- var content = data.rows;
- $(content).each(function(i, n) {
- $(
- "<option value='" +
- n[obj.selectValue] +
- "'>" +
- n[obj.selectName] +
- "</option>"
- ).appendTo($("#"+obj.id));
- });
- $("#"+obj.id).selectpicker({
- noneSelectedText: "请选择业务员", //默认显示内容
- });
- $("#"+obj.id).selectpicker("refresh");
- }
- }
- );
- }
|