| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- var id = helper.request.queryString("id");
- var type = helper.request.queryString("type")
- $(document).ready(function () {
- if (type === "1") {
- $(".reminderTitle").text("催单内容:")
- } else if (type === "2") {
- $(".reminderTitle").text("完善内容:")
- }
- //保存
- $('.customerSubmit').click(function() {
- saveCustomer();
- });
- })
- //保存
- function saveCustomer() {
- $.ajax({
- type: "post",
- url: huayi.config.callcenter_url + "WorkOrder/Reminder",
- dataType: 'json',
- async: true,
- beforeSend: function() { //触发ajax请求开始时执行
- $('.customerSubmit').attr("disabled", true);
- $('.customerSubmit').text('确定中...');
- },
- data: {
- token: $.cookie("token"),
- id: id,
- count: $('#cont').val(), //催单备注
- },
- success: function(data) {
- if (data.state.toLowerCase() == 'success') {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- parent.layer.msg("催单成功!");
- parent.$('#workorderlist').bootstrapTable('refresh');
- } else {
- $('.customerSubmit').attr("disabled", false);
- $('.customerSubmit').text('确定');
- }
- }
- });
- }
|