Açıklama Yok

WorkOrderReduction.js 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. var id = helper.request.queryString("id");
  2. $(document).ready(function () {
  3. //保存
  4. $('.customerSubmit').click(function() {
  5. saveCustomer();
  6. });
  7. })
  8. //保存
  9. function saveCustomer() {
  10. $.ajax({
  11. type: "post",
  12. url: huayi.config.callcenter_url + "WorkOrder/Reduction",
  13. dataType: 'json',
  14. async: true,
  15. beforeSend: function() { //触发ajax请求开始时执行
  16. $('.customerSubmit').attr("disabled", true);
  17. $('.customerSubmit').text('确定中...');
  18. },
  19. data: {
  20. token: $.cookie("token"),
  21. id: id,
  22. RemissionRemarks: $('#cont').val(), //减免备注
  23. IsReduction: $('#customer_reduction').val(), // 是否减免
  24. },
  25. success: function(data) {
  26. if (data.state.toLowerCase() == 'success') {
  27. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  28. parent.layer.close(index); //再执行关闭
  29. parent.layer.msg("减免成功!");
  30. parent.initTable();
  31. } else {
  32. $('.customerSubmit').attr("disabled", false);
  33. $('.customerSubmit').text('确定');
  34. }
  35. }
  36. });
  37. }