Bez popisu

SelectCategoryCode.js 828B

123456789101112131415161718192021222324252627282930
  1. getDicValueList($("#FistCategoryCode"),38); //工单来源
  2. $("#FistCategoryCode").change(function(){
  3. if ($("#FistCategoryCode").val()) {
  4. $("#SecondCategoryCode").show()
  5. getDicValueList($("#SecondCategoryCode"),$("#FistCategoryCode").val()); //工单来源
  6. }else{
  7. $("#SecondCategoryCode").hide()
  8. $("#SecondCategoryCode").va('')
  9. }
  10. })
  11. function getDicValueList(obj,id) {
  12. obj.empty();
  13. obj.append('<option selected="selected" value="">请选择</option>');
  14. $.getJSON(
  15. huayi.config.callcenter_url + "KeyValue/GetDicValueList", {
  16. token: $.cookie("token"),
  17. pid: id,
  18. },
  19. function(data) {
  20. if(data.state.toLowerCase() == "success") {
  21. var content = data.data;
  22. $(content).each(function(i, n) {
  23. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
  24. });
  25. }
  26. }
  27. );
  28. }