You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.9 KiB
JavaScript
58 lines
1.9 KiB
JavaScript
Ext.namespace('Shipping');
|
|
|
|
Shipping.MsChFeeAudit = function (records, newStatus, waitMsg) {
|
|
var jsondata = ConvertRecordsToJsonAll(records);
|
|
|
|
Ext.Msg.wait(waitMsg);
|
|
Ext.Ajax.request({
|
|
waitMsg: waitMsg,
|
|
url: '/MvcShipping/MsChFee/Audit',
|
|
scope: this,
|
|
params: {
|
|
newStatus: newStatus,
|
|
list: jsondata
|
|
},
|
|
callback: function (options, success, response) {
|
|
if (success) {
|
|
Ext.MessageBox.hide();
|
|
var jsonresult = Ext.JSON.decode(response.responseText);
|
|
if (jsonresult.Success) {
|
|
var newStatusRef = jsonresult.Data;
|
|
|
|
for (var i = 0; i < records.length; i++) {
|
|
var record = records[i];
|
|
record.set('FeeStatus', newStatus);
|
|
record.set('FeeStatus_Ref', newStatusRef);
|
|
|
|
record.commit();
|
|
}
|
|
} else {
|
|
Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });
|
|
}
|
|
} else {
|
|
Ext.Msg.show({ title: '请重试',
|
|
msg: '服务器响应出错',
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
});
|
|
}
|
|
}
|
|
});
|
|
},
|
|
|
|
Shipping.CheckChFeeDelete = function (records) {
|
|
for (var i = 0; i < records.length; i++) {
|
|
var rec = records[i];
|
|
var feeStatus = rec.data.FeeStatus;
|
|
var canDelete = feeStatus == 1 || feeStatus == 6;
|
|
if (canDelete == false) {
|
|
Ext.Msg.show({ title: '提示',
|
|
msg: '只能删除费用状态为[录入状态]和[驳回提交]的费用,请重新选择',
|
|
icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK
|
|
});
|
|
|
|
return false;
|
|
}
|
|
}
|
|
|
|
return true;
|
|
} |