|
|
|
@ -45,6 +45,7 @@
|
|
|
|
|
WindowLoadModel.Load();
|
|
|
|
|
ajaxInit(WindowLoadModel);
|
|
|
|
|
CreateDataGrid();
|
|
|
|
|
CreateDataGrid2();
|
|
|
|
|
ReadData();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -74,7 +75,7 @@
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "毛利";
|
|
|
|
|
col.CellTemplate = "<span>{Bind GrossProfit}</span>";
|
|
|
|
|
col.CellTemplate = "<a class='linka' onClick='showShopGrossProfitDialog({Bind GoodsId})'>{Bind GrossProfit}</a>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
@ -153,6 +154,32 @@
|
|
|
|
|
}
|
|
|
|
|
var PState = 0;
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
//#region 初始化DataGrid2
|
|
|
|
|
function CreateDataGrid2() {
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "店铺";
|
|
|
|
|
col.CellTemplate = "<span>{Bind ShopName}</span>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "毛利";
|
|
|
|
|
col.CellTemplate = "<span>{Bind GrossProfit}</span>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
|
|
datagrid2.SortExpression = "Id ";
|
|
|
|
|
datagrid2.ViewSortDirection = "desc";
|
|
|
|
|
datagrid2.IsFixHeader = false;
|
|
|
|
|
datagrid2.ShowIndexColumn = false;
|
|
|
|
|
datagrid2.AllowPaging = false;
|
|
|
|
|
datagrid2.AllowPaging2 = false;
|
|
|
|
|
datagrid2.ShowIndexColumn = true;
|
|
|
|
|
datagrid2.Width = "100%";
|
|
|
|
|
datagrid2.SelectMode = nblf.ui.SelectMode.None;
|
|
|
|
|
datagrid2.Init();
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
// 读取数据
|
|
|
|
|
//#region 读取数据
|
|
|
|
@ -161,6 +188,8 @@
|
|
|
|
|
PageSize: datagrid1.Get_PageSize(),
|
|
|
|
|
PageIndex: datagrid1.Get_PageIndex(),
|
|
|
|
|
GoodsCode: $('#txt_GoodsCode').val() || null,
|
|
|
|
|
Name: $('#txt_Name').val() || null,
|
|
|
|
|
IsNegative: $('#txt_IsNegative').is(':checked'),
|
|
|
|
|
}
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
$.ajax({
|
|
|
|
@ -176,10 +205,12 @@
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
//#region 读取数据
|
|
|
|
|
//#region 导出数据
|
|
|
|
|
function ExportData() {
|
|
|
|
|
var param = {
|
|
|
|
|
GoodsCode: $('#txt_GoodsCode').val() || null,
|
|
|
|
|
Name: $('#txt_Name').val() || null,
|
|
|
|
|
IsNegative: $('#txt_IsNegative').is(':checked'),
|
|
|
|
|
}
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
$.ajax({
|
|
|
|
@ -199,6 +230,32 @@
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
//#region 显示各店铺毛利
|
|
|
|
|
function showShopGrossProfitDialog(GoodsId) {
|
|
|
|
|
var param = { GoodsId }
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "../SysManageServiceNew.asmx/GetTemuShopGrossProfit",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
success: function (res) {
|
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
data = res.d
|
|
|
|
|
datagrid2.Set_RowCount(data.length);
|
|
|
|
|
datagrid2.DataBind(data);
|
|
|
|
|
$.fancybox({
|
|
|
|
|
'width': '40%',
|
|
|
|
|
'height': '',
|
|
|
|
|
'autoScale': false,
|
|
|
|
|
'transitionIn': 'elastic',
|
|
|
|
|
'transitionOut': 'elastic',
|
|
|
|
|
'href': '#mlDialog',
|
|
|
|
|
'onComplete': function () { }
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
@ -213,6 +270,11 @@
|
|
|
|
|
<td width="15%">
|
|
|
|
|
<input id="txt_GoodsCode" class="editTextbox" style="width: 150px;" type="text" />
|
|
|
|
|
</td>
|
|
|
|
|
<td class="f1" style="width: 10%;">运营人员:</td>
|
|
|
|
|
<td width="15%">
|
|
|
|
|
<input id="txt_Name" class="editTextbox" style="width: 150px;" type="text" />
|
|
|
|
|
</td>
|
|
|
|
|
<td class="f1" style="width: 10%;"><input id="txt_IsNegative" class="editTextbox" type="checkbox" />负毛利产品</td>
|
|
|
|
|
<td>
|
|
|
|
|
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" onclick="ReadData();" />  
|
|
|
|
|
<input id="btn_dc3" onclick="ExportData();" class="btnClass btnClassExcelTemplate" type="button" value="导出" />
|
|
|
|
@ -224,6 +286,11 @@
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<!-- 各店铺毛利 -->
|
|
|
|
|
<div id="mlDialog" title="各店铺毛利" style="display:none;width: 700px; height: 500px;">
|
|
|
|
|
<div id="DataGrid2" class="DataGridStyle"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|