You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.7 KiB
74 lines
2.7 KiB
'use strict';
|
|
var fnPageInit = function () {
|
|
var sLang = g_ul.GetLang(),
|
|
canDo = new CanDo({
|
|
sortField: 'CreateDate',
|
|
sortOrder: 'desc',
|
|
/**
|
|
* 當前程式所有ID名稱集合
|
|
*/
|
|
idKeys: ['OrgID', 'QSID','LangID'],
|
|
/**
|
|
* Grid欄位設置(可以是 function)
|
|
*/
|
|
gridFields: [
|
|
{
|
|
name: "RowIndex", title: 'common.RowNumber', type: "text", width: 50, align: "center", sorting: false
|
|
},
|
|
{
|
|
name: "ServiceItemName", title: 'ServiceQSMaintain_Upd.QuotationType', type: "text", width: 100, align: "left"
|
|
},
|
|
{
|
|
name: "QuotationName", title: 'ServiceQSMaintain_Upd.QuotationName', type: "text", align: "left", width: 150
|
|
},
|
|
{
|
|
name: "CreateDate", title: 'common.CreateDate', width: 90, align: 'left', itemTemplate: function (val, item) {
|
|
return newDate(val);
|
|
}
|
|
}
|
|
,
|
|
|
|
{
|
|
name: "Effective", title: 'common.Status', type: "text", width: 50, align: "left", itemTemplate: function (val, item) {
|
|
return val === 'Y' ? i18next.t('common.Effective') : i18next.t('common.Invalid');// ╠common.Effective⇒有效╣ ╠common.Invalid⇒無效╣
|
|
}
|
|
}
|
|
],
|
|
/**
|
|
* 頁面初始化
|
|
* @param {Object} pargs CanDo 對象
|
|
*/
|
|
pageInit: function (pargs) {
|
|
|
|
var ss = canDo;
|
|
$.whenArray([
|
|
fnSetArgDrop([{
|
|
ArgClassID: 'LanCountry',
|
|
Select: $('#LangID'),
|
|
ShowId: true,
|
|
DefultVal: 'zh-TW',
|
|
OnChange: function (date) {
|
|
$('#Toolbar_Qry').trigger('click');
|
|
},
|
|
CallBack: function (data) {
|
|
//$('#Toolbar_Qry').trigger('click');
|
|
}
|
|
}]),
|
|
|
|
fnSetArgDrop([{
|
|
ArgClassID: 'ServiceItem',
|
|
Level: 1,
|
|
Select: $('#QuotationType'),
|
|
ShowId: true
|
|
}]),
|
|
|
|
|
|
]).done(function () {
|
|
pargs._reSetQueryPm();
|
|
pargs._initGrid();
|
|
});
|
|
}
|
|
});
|
|
};
|
|
|
|
require(['base', 'select2', 'jsgrid', 'cando'], fnPageInit);
|