ReserveCompensateLogList_BZ.cshtml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. 
  2. @{
  3. Layout = null;
  4. }
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <meta name="viewport" content="width=device-width" />
  9. <title>ReserveCompensateLogList_BZ</title>
  10. <link href="~/easyui/themes/default/easyui.css" rel="stylesheet" />
  11. <link rel="stylesheet" type="text/css" href="~/easyui/themes/icon.css" />
  12. <link href="~/Content/css/bootstrap.min.css" rel="stylesheet" />
  13. <link href="~/Content/js/plugins/layer/skin/layer.css" rel="stylesheet" />
  14. <script src="~/Content/js/jquery.min.js"></script>
  15. <script src="~/Content/js/bootstrap.min.js"></script>
  16. <script src="~/easyui/jquery.easyui.min.js"></script>
  17. <script src="~/easyui/jquery.easyui.mobile.js"></script>
  18. <script src="~/easyui/locale/easyui-lang-zh_CN.js"></script>
  19. <script src="~/Content/js/plugins/layer/laydate/laydate.js"></script>
  20. <script src="~/Content/js/plugins/layer/layer.min.js"></script>
  21. <script src="~/js/Utils.js"></script>
  22. <link href="~/Content/css/Style/Markets.css" rel="stylesheet" />
  23. <script src="~/Content/js/js/MarketJs.js"></script>
  24. </head>
  25. <body >
  26. <section class="hidden">
  27. <input id="hid_Type" name="hid_Type" type="hidden" value="0"/>
  28. <input id="hidSetSearch_Type" name="hidSetSearch_Type" type="hidden" value="0"/>
  29. </section>
  30. <section style="height: 95vh; padding: 10px 20px;">
  31. <div class="row tbToolBar" id="tbToolBar">
  32. <div class="toolbar" id="CurdTool"><a href="#" class="easyui-linkbutton" iconCls="icon-application_view_detail" plain="true" onclick="btn_Detail();">查看详情</a>
  33. <span class="shuxian"></span>
  34. <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="btn_Add()">添加</a>
  35. @*<span class="shuxian"></span>
  36. <a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="btn_Edit()">修改</a>
  37. <span class="shuxian"></span>
  38. <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="btn_Del()">删除</a>*@
  39. </div>
  40. <div class="toolbar-search">
  41. <span>【请选择查询条件】</span>
  42. <input class="easyui-searchbox" data-options="prompt:'请输入查询条件...',menu:'#search',searcher:LoadTable" style="width: 300px; height: 25px;"/>
  43. <div id="search">
  44. <div data-options="name:'MarketSellerName'">经营户名</div>
  45. <div data-options="name:'Executor'">执行人</div>
  46. </div>
  47. </div>
  48. </div>
  49. <table id="dgTable" class="easyui-datagrid" style="height: 100%;"
  50. data-options="singleSelect: true,
  51. method: 'post',
  52. multiSort: false,
  53. toolbar: '#tbToolBar',
  54. fitColumns: true,
  55. @*rownumbers: true,*@
  56. remoteSort: false,
  57. @*loadFilter: pagerFilter,*@
  58. onDblClickRow: function () {
  59. btn_Edit();
  60. },
  61. pagination: true,
  62. pageSize: 50,
  63. pageList: [20, 50, 100]
  64. ">
  65. <thead>
  66. <tr>
  67. <th data-options="field:'ID',width:60">编号</th>
  68. <th data-options="field:'MarketSellerName',width:80">经营户名</th>
  69. <th data-options="field:'OccurValue',width:50">补足金额</th>
  70. <th data-options="field:'LogDate',width:80">补足时间</th>
  71. </tr>
  72. </thead>
  73. </table>
  74. </section>
  75. <section>
  76. <div id="winModal" class="easyui-window winModal" title="预备金补足录入维护" style="width: 450px; padding: 10px;"
  77. iconCls="icon-save" data-options="modal:true,closed:true">
  78. <div class="easyui-layout" data-options="fit:true" style="height: 99%">
  79. <div data-options="region:'center'" style="padding: 15px 25px 0;">
  80. <form id="form">
  81. @Html.Hidden("ID")
  82. <div class="panle-fluid">
  83. <div class="input-group">
  84. <label class="input-group-addon control-label" for="SellerID">经营户名</label>
  85. <select class="form-control input-group-addon" aria-disabled="true" name="SellerID" id="SellerID" type="text" value="" placeholder="选择经营户">
  86. <option value="">请选择...</option>
  87. @Html.Raw(ViewBag.SelMarketSellersInfo)
  88. </select>
  89. <span class="input-group-addon" onclick="SearchModal('#Seller')" style="cursor: pointer;">
  90. <img src="~/easyui/themes/icons/zoom.bmp" />
  91. </span>
  92. </div>
  93. <div class="input-group">
  94. <label class="input-group-addon control-label" for="OccurValue">预备金额</label>
  95. <input class="form-control input-group-addon" aria-disabled="true" name="OccurValue" id="OccurValue" type="text" value="" placeholder=""/>
  96. </div>
  97. <div class="input-group">
  98. <label class="input-group-addon control-label" for="Reason">补足说明</label>
  99. <input class="form-control input-group-addon" aria-disabled="true" name="Reason" id="Reason" type="text" value="" placeholder=""/>
  100. </div>
  101. <div class="input-group">
  102. <label class="input-group-addon control-label" for="LogDate">补足日期</label>
  103. <input class="form-control input-group-addon laydate-icon" aria-disabled="true" name="LogDate" id="LogDate" type="text" value="" placeholder=""/>
  104. </div>
  105. <div class="input-group">
  106. <label class="input-group-addon control-label" for="Executor">执行人</label>
  107. <input class="form-control input-group-addon" aria-disabled="true" name="Executor" id="Executor" type="text" value="" placeholder="" />
  108. </div>
  109. <div class="input-group">
  110. <label class="input-group-addon control-label" for="Remark">备注信息</label>
  111. <textarea class="form-control input-group-addon" aria-disabled="true" name="Remark" id="Remark" type="text" value="" placeholder=""></textarea>
  112. </div>
  113. </div>
  114. </form>
  115. </div>
  116. <div data-options="region:'south',border:false" style="text-align: right; height: 45px; padding: 13px 20px 0;">
  117. <a class="easyui-linkbutton" id="Save" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="Save()" style="width: 80px">确认</a>
  118. <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#winModal').window('close');" style="width: 80px">取消</a>
  119. </div>
  120. </div>
  121. </div>
  122. <div id="winModal_Detail" class="easyui-window winModal" title="预备金补足详情" style="width: 450px; padding: 10px;"
  123. iconCls="icon-save" data-options="modal:true,closed:true">
  124. <div class="easyui-layout" data-options="fit:true" style="height: 99%">
  125. <div data-options="region:'center'" style="padding: 15px 25px 0;">
  126. <form id="form_Detail">
  127. @Html.Hidden("ID")
  128. <div class="panle-fluid">
  129. <div class="input-group">
  130. <label class="input-group-addon control-label" for="SellerName_Detail">经营户名</label>
  131. <input class="form-control input-group-addon" aria-disabled="true" name="SellerName_Detail" id="SellerName_Detail" type="text" value="" placeholder="经营户名" />
  132. </div>
  133. <div class="input-group">
  134. <label class="input-group-addon control-label" for="OccurValue_Detail">预备金额</label>
  135. <input class="form-control input-group-addon" aria-disabled="true" name="OccurValue_Detail" id="OccurValue_Detail" type="text" value="" placeholder="" />
  136. </div>
  137. <div class="input-group">
  138. <label class="input-group-addon control-label" for="Reason_Detail">补足说明</label>
  139. <input class="form-control input-group-addon" aria-disabled="true" name="Reason_Detail" id="Reason_Detail" type="text" value="" placeholder="" />
  140. </div>
  141. <div class="input-group">
  142. <label class="input-group-addon control-label" for="LogDate_Detail">补足日期</label>
  143. <input class="form-control input-group-addon" aria-disabled="true" name="LogDate_Detail" id="LogDate_Detail" type="text" value="" placeholder="" />
  144. </div>
  145. <div class="input-group">
  146. <label class="input-group-addon control-label" for="Executor_Detail">执行人</label>
  147. <input class="form-control input-group-addon" aria-disabled="true" name="Executor_Detail" id="Executor_Detail" type="text" value="" placeholder="" />
  148. </div>
  149. <div class="input-group">
  150. <label class="input-group-addon control-label" for="Remark_Detail">备注信息</label>
  151. <textarea class="form-control input-group-addon" aria-disabled="true" name="Remark_Detail" id="Remark_Detail" type="text" value="" placeholder=""></textarea>
  152. </div>
  153. </div>
  154. </form>
  155. </div>
  156. <div data-options="region:'south',border:false" style="text-align: right; height: 45px; padding: 13px 20px 0;">
  157. <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#winModal_Detail').window('close');" style="width: 80px">取消</a>
  158. </div>
  159. </div>
  160. </div>
  161. <div id="winModal_Search" class="easyui-window winModal" title="" style="width: 750px; height: 600px; padding: 10px;"
  162. iconCls="icon-save" data-options="modal:true,closed:true">
  163. <div class="easyui-layout" data-options="fit:true" style="height: 99%">
  164. <div data-options="region:'center'" style="padding: 15px 5px 5px;">
  165. <div id="Search_Supplier">
  166. <div class="panle-half">
  167. <div class="input-group">
  168. <label class="input-group-addon control-label" for="dg_SearchHabitatID" style="min-width: 70px">省份</label>
  169. <select class="form-control input-group-addon" aria-disabled="true" name="dg_SearchHabitatID" id="dg_SearchHabitatID" type="text" value="" placeholder="选择省份">
  170. <option value="">全部</option>
  171. @Html.Raw(ViewBag.SelHabitatInfo)
  172. </select>
  173. </div>
  174. </div>
  175. <div class="panle-half">
  176. <div class="input-group">
  177. <label class="input-group-addon control-label" for="dg_SearchSupplierName" style="min-width: 70px">供货商</label>
  178. <input class="form-control input-group-addon" aria-disabled="true" name="dg_SearchSupplierName" id="dg_SearchSupplierName" type="text" value="" placeholder=""/>
  179. <span class="input-group-addon control-label" onclick="DgSearchLoadTable()">搜索</span>
  180. </div>
  181. </div>
  182. </div>
  183. <div id="Search_Seller" style="display: none">
  184. <div class="panle-third">
  185. <div class="input-group">
  186. <label class="input-group-addon control-label" for="dg_SearchRegionID" style="min-width: 70px">所属辖区</label>
  187. <select class="form-control input-group-addon" type="text" id="dg_SearchRegionID" name="dg_SearchRegionID" onchange="GetMarketSelStr();">
  188. <option value="">全部</option>
  189. @Html.Raw(ViewBag.SelRegionInfo)
  190. </select>
  191. </div>
  192. </div>
  193. <div class="panle-third">
  194. <div class="input-group">
  195. <label class="input-group-addon control-label" for="dg_SearchMarketId" style="min-width: 70px">所属市场</label>
  196. <select class="form-control input-group-addon" aria-disabled="true" name="dg_SearchMarketId" id="dg_SearchMarketId" type="text" value="" placeholder="选择所属市场">
  197. @*@Html.Raw(ViewBag.SelMarketInfo)*@
  198. </select>
  199. </div>
  200. </div>
  201. <div class="panle-third">
  202. <div class="input-group">
  203. <label class="input-group-addon control-label" for="dg_SearchSellerName" style="min-width: 70px">经营户名</label>
  204. <input class="form-control input-group-addon" aria-disabled="true" name="dg_SearchSellerName" id="dg_SearchSellerName" type="text" value="" placeholder=""/>
  205. <span class="input-group-addon control-label" onclick="DgSearchLoadTable()">搜索</span>
  206. </div>
  207. </div>
  208. </div>
  209. <div class="panle-fluid" style="margin-top: 10px;">
  210. <table id="dgTable_Search" class="easyui-datagrid" style="width: 98%; height: 420px;"
  211. data-options="singleSelect: true,
  212. method: 'post',
  213. multiSort: false,
  214. toolbar: '#tbToolBar_Attach',
  215. fitColumns: true,
  216. @*rownumbers: true,*@
  217. remoteSort: false,
  218. @*loadFilter: pagerFilter,*@
  219. onDblClickRow: function () {
  220. SetSearch();
  221. },
  222. pagination: true,
  223. pageSize: 10,
  224. pageList: [10,20, 50, 100]
  225. ">
  226. <thead>
  227. <tr>
  228. @*<th data-options="field:'FileTitle',width:100">附件标题</th>
  229. <th data-options="field:'FileExt',width:60,">扩展名</th>
  230. <th data-options="field:'TimeLastMod',width:90,">上传日期</th>*@
  231. </tr>
  232. </thead>
  233. </table>
  234. </div>
  235. </div>
  236. <div data-options="region:'south',border:false" style="text-align: right; height: 45px; padding: 13px 20px 0;">
  237. <a class="easyui-linkbutton" id="Save_SetSearch" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="SetSearch()" style="width: 80px">确认</a>
  238. <a class="easyui-linkbutton" id="Save_Search" data-options="iconCls:'icon-search'" href="javascript:void(0)" onclick="DgSearchLoadTable()" style="width: 80px">搜索</a>
  239. <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#winModal_Search').window('close');" style="width: 80px">取消</a>
  240. </div>
  241. </div>
  242. </div>
  243. </section>
  244. <script>
  245. function Save(type) {
  246. type = type || $("#hid_Type").val();
  247. //var violationsNo = (type === "Add" || type === "Edit") ? $("#ID").val() : $('#dgTable').datagrid('getSelections')[0].ID;
  248. $.ajax({
  249. url: "@Url.Action("ReserveCompensateLogOper", "MarketSystemMg")"+"/BZ",
  250. type: "post",
  251. dataType: "json",
  252. data: {
  253. Type: type,
  254. DataID: $("#ID").val(),
  255. SellerID: $("#SellerID").val(),
  256. OccurValue: $("#OccurValue").val(),
  257. LogDate: $("#LogDate").val(),
  258. Reason: $("#Reason").val(),
  259. Executor: $("#Executor").val(),
  260. Remark: $("#Remark").val()
  261. },
  262. success: function(data) {
  263. if (CheckAajxData(data) === false) return;
  264. var msg = data.ErrorInfo;
  265. if (data.Success === true) {
  266. LoadTable();
  267. $("#winModal").window("close");
  268. layer.alert(msg, { icon: 1, title: '提示信息' });
  269. } else {
  270. layer.alert(msg, { icon: 7, title: '提示信息' });
  271. }
  272. }
  273. });
  274. }
  275. //添加
  276. function btn_Add() {
  277. $("#hid_Type").val("Add");
  278. $("#winModal input").val("");
  279. $("#winModal select").val("");
  280. $("#winModal textarea").val("");
  281. $("#Save span.l-btn-text").html("添加");
  282. GetMarketSellerSelStr();
  283. ClearFile("#AttachFile");
  284. $("#winModal").window("open");
  285. }
  286. //修改
  287. function btn_Edit() {
  288. $("#hid_Type").val("Edit");
  289. $("#Save span.l-btn-text").html("修改");
  290. SetModalVal();
  291. }
  292. function btn_Detail() {
  293. var rows = $('#dgTable').datagrid('getSelections');
  294. if (rows.length === 1) {
  295. var row = rows[0];
  296. //console.log(row);
  297. $("#ID").val(row.ID);
  298. $("#MarketName_Detail").val(row.MarketName);
  299. $("#SellerName_Detail").val(row.MarketSellerName);
  300. $("#OccurValue_Detail").val(row.OccurValue);
  301. $("#LogDate_Detail").val(row.LogDate);
  302. $("#Reason_Detail").val(row.Reason);
  303. $("#Executor_Detail").val(row.Executor);
  304. $("#Remark_Detail").val(row.Remark);
  305. $("#winModal_Detail").window("open");
  306. } else {
  307. layer.alert('请选择一条记录进行设置', { icon: 7, title: '提示信息' });
  308. }
  309. }
  310. //modal赋值
  311. function SetModalVal() {
  312. var rows = $('#dgTable').datagrid('getSelections');
  313. if (rows.length === 1) {
  314. var row = rows[0];
  315. //console.log(row);
  316. $("#ID").val(row.ID);
  317. $("#SellerID").val(row.SellerID);
  318. $("#OccurValue").val(row.OccurValue);
  319. $("#LogDate").val(row.LogDate);
  320. $("#Reason").val(row.Reason);
  321. $("#Executor").val(row.Executor);
  322. $("#Remark").val(row.Remark);
  323. if ($("#hid_Type").val() === "Edit") {
  324. $("#winModal").window("open");
  325. }
  326. } else {
  327. layer.alert('请选择一条记录进行设置', { icon: 7, title: '提示信息' });
  328. }
  329. }
  330. function SearchModal(searchType) {
  331. if (searchType === "#Seller") {
  332. $('#winModal_Search').window({ "title": "搜索经营户名" });
  333. $("#hidSetSearch_Type").val("#SellerID");
  334. $("#Search_Supplier").hide();
  335. $("#Search_Seller").show();
  336. GetMarketSelStr();
  337. } else {
  338. $("#Search_Supplier").show();
  339. $("#hidSetSearch_Type").val("#OccurValue");
  340. $("#Search_Seller").hide();
  341. $('#winModal_Search').window({ "title": "搜索供货单位" });
  342. }
  343. DgSearchLoadTable();
  344. $('#winModal_Search').window('open');
  345. }
  346. function SetSearch(idStr) {
  347. idStr = idStr || $("#hidSetSearch_Type").val();
  348. var rows = $('#dgTable_Search').datagrid('getSelections');
  349. if (rows.length === 1) {
  350. var row = rows[0];
  351. console.log(row);
  352. if (idStr === "#SellerID") {
  353. $(idStr).val(row.SellerID);
  354. } else if (idStr === "#OccurValue") {
  355. $(idStr).val(row.OccurValue);
  356. }
  357. $('#winModal_Search').window('close');
  358. } else {
  359. layer.alert('请选择一条记录进行设置', { icon: 7, title: '提示信息' });
  360. }
  361. }
  362. //根据辖区获取市场下拉框的option
  363. function GetMarketSelStr() {
  364. $.ajax({
  365. url: "/GetResult/GetMarketSelStrResult",
  366. type: "post",
  367. dataType: "json",
  368. //data: { RegionID: $("input.textbox-value[name='SearchRegionID']").val() },
  369. async: false,
  370. data: { RegionID: $("#dg_SearchRegionID").val() },
  371. success: function(data) {
  372. //console.log(msg);
  373. if (CheckAajxData(data) === false) return;
  374. var rows = data.rows;
  375. var str1 = "<option value=\"";
  376. var str2 = "";
  377. for (var i = 0; i < rows.length; i++) {
  378. str1 += (str1 === "<option value=\"" ? "" : "@@|@@") + rows[i].MarketID;
  379. str2 += "<option value=\"" + rows[i].MarketID + "\">" + rows[i].Names + "</option>";
  380. }
  381. str1 += "\">全部</option>";
  382. $('#dg_SearchMarketId').empty().html(str1 + str2);
  383. }
  384. });
  385. }
  386. function DgSearchLoadTable(searchType) {
  387. searchType = searchType || $("#hidSetSearch_Type").val();
  388. if (searchType === "#SellerID") {
  389. var marketId = $("#dg_SearchMarketId").val(),
  390. sellerName = $("#dg_SearchSellerName").val();
  391. $('#dgTable_Search').datagrid({
  392. url: '@Url.Action("GetMarketSellerSelStrResult", "GetResult")' + '?MarketID=' + marketId + '&MarketSellerName=' + sellerName,
  393. columns: [
  394. [
  395. { field: 'MarketSellerName', title: '经营户名', width: 150, align: 'center' },
  396. { field: 'IdCard', title: '身份证', width: 180, align: 'center' },
  397. { field: 'EnterMarketDate', title: '入场时间', width: 180, align: 'center' },
  398. { field: 'Tel', title: '联系电话', width: 180, align: 'center' }
  399. ]
  400. ]
  401. });
  402. } else {
  403. var habitatId = $("#dg_SearchHabitatID").val(),
  404. supplierName = $("#dg_SearchSupplierName").val();
  405. $('#dgTable_Search').datagrid({
  406. url: '@Url.Action("SupplierSearchResult", "GetResult")' +
  407. '?HabitatID=' +
  408. habitatId +
  409. '&SupplierName=' +
  410. supplierName,
  411. columns: [
  412. [
  413. { field: 'Name', title: '名称', width: 150, align: 'center' },
  414. { field: 'Linkman', title: '联系人', width: 100, align: 'center' },
  415. { field: 'Tel', title: '电话', width: 100, align: 'center' },
  416. { field: 'Address', title: '地址', width: 130, align: 'center' }
  417. ]
  418. ]
  419. });
  420. }
  421. }
  422. //加载表格数据
  423. function LoadTable(value, item) {
  424. $('#dgTable').datagrid({
  425. url: '@Url.Action("ReserveCompensateLogResult", "GetResult")' + "/BZ" + '?PcVal=' + escape(value) + '&PcItem=' + item
  426. });
  427. }
  428. //根据市场获取经营户下拉框的option
  429. function GetMarketSellerSelStr() {
  430. $.ajax({
  431. url: "/GetResult/GetMarketSellerSelStrResult",
  432. type: "post",
  433. dataType: "json",
  434. async: false,
  435. data: { marketId: $("#MarketID").val() },
  436. success: function(data) {
  437. if (CheckAajxData(data) === false) return;
  438. var rows = data.rows;
  439. var str1 = "<option value=\"\">请选择...</option>";
  440. var str2 = "";
  441. for (var i = 0; i < rows.length; i++) {
  442. str2 += "<option value=\"" + rows[i].SellerID + "\">" + rows[i].Name + "</option>";
  443. }
  444. $('#MarketSellerID').empty().html(str1 + str2);
  445. }
  446. });
  447. }
  448. $(function() {
  449. //加载表格数据
  450. var value = $(".textbox.searchbox .textbox-value").val(), item = $(".textbox.searchbox .textbox-value").attr("name");
  451. LoadTable(value, item);
  452. //加载日历控件
  453. laydate({
  454. elem: '#LogDate',
  455. format: "YYYY-MM-DD",
  456. min: "1980-01-01",
  457. event: "focus"
  458. });
  459. });
  460. </script>
  461. </body>
  462. </html>