123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/StockIn/Edit";
- var ViewUrl = CMS_SystemConfig.VirtualDirectoryPath + "/StockIn/StockInDetailList";
- var AutoUrl = CMS_SystemConfig.VirtualDirectoryPath + "/StockIn/AutoNewStockIn";
- var mnu = "";
- //加载
- $(function () {
- mnu = $.SystemGeneral.getUrlParam("MNU");
- })
- function reload() {
- $("#dgStockInList").cmsXDataTable("load", $.getDataGridParams("dgStockInList"));
- }
- //获取选中的数据
- function validChoose() {
- var d = [];
- $.each($("#dgStockInList").cmsXDataTable("getSelections"), function (index) {
- d.push(this.StockInID);
- });
- return d;
- }
- //修改
- function ET06_05_01_StockIn_Update() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要修改的信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行修改。");
- return;
- }
- var redirectTo = url + "?stockInID=" + d + "&MNU=" + mnu;
- $.popupTopWindow("教材入库信息", redirectTo, 800, 550, null, null);
- }
- //导入
- function ET06_05_01_StockIn_Import() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/StockIn/Import?MNU=' + mnu;
- $.popupTopWindow('教材入库导入', redirectTo, 400, 300, null, null);
- }
- //导出
- function ET06_05_01_StockIn_Export() {
- $("#formQuery").submit();
- }
- //删除
- function ET06_05_01_StockIn_Delete()
- {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要删除的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StockIn/Delete', { stockInIDs: d }, function (data) {
- if (data == "删除成功。") {
- $.messager.alert("系统提示", data);
- $("#dgStockInList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- //教材入库(新增)
- function ET06_05_01_StockIn_Add()
- {
- var redirectTo = url + '?MNU=' + mnu + '&stockInType=1';
- $.popupTopWindow('教材入库', redirectTo, 800, 550, null, null);
- }
- //自动入库(根据采购计划自动入库)
- function ET06_05_01_StockIn_AutoAdd() {
- var redirectTo = AutoUrl + '?MNU=' + mnu;
- $.popupTopWindow('自动入库', redirectTo, 450, 300, null, null);
- }
- //自动入库确定
- function ET06_05_01_StockIn_AutoAdd_New(){
- var schoolyearIDStr = $("#SchoolyearDropdown").combobox("getValue");
- if (schoolyearIDStr == "-1") {
- $.messager.alert("系统提示", "请选择要自动入库的学年学期。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要对选择的学年学期的教材自动入库?", function (r) {
- if (r) {
- $(document.forms[0]).submit(); //提交表单
- }
- });
- }
- //教材入库明细
- function StockInDetailView(rowindex, rowdata) {
- var redirectTo = ViewUrl + "?stockInID=" + rowdata.StockInID + "&MNU=" + mnu;
- $.popupTopWindow("教材入库明细", redirectTo, 850, 480, null, null);
- }
- //提交数据、更新状态值
- function ET06_05_01_Submit() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要提交的信息。");
- return;
- }
- $.messager.confirm("系统提示", "您确定要提交选择的信息?", function (r) {
- if (r) {
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/StockIn/Submit', { stockInIDs: d }, function (data) {
- if (data == "提交入库成功。") {
- $.messager.alert("系统提示", data);
- $("#dgStockInList").cmsXDataTable('load');
- } else {
- $.messager.alert("系统提示", data);
- }
- });
- }
- });
- }
- function QueryCourseDropdownList()
- {
- reload();
- }
- function QuerySchoolYearDropdownList() {
- reload();
- }
- function QueryCollegeDropdownList() {
- reload();
- }
- function QueryPublishDropdownList()
- {
- reload();
- }
- function QueryEndStockInTimeList()
- {
- $("#EndStockInTime").val($dp.cal.getNewDateStr())
- reload();
- }
- function QueryStartStockInTimeList() {
- $("#StartStockInTime").val($dp.cal.getNewDateStr())
- reload();
- }
- function QueryLateDropdownList()
- {
- reload();
- }
|