|
|
@@ -0,0 +1,221 @@
|
|
|
+<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/View.master" AutoEventWireup="true" CodeFile="SupplierProductTime.aspx.cs" Inherits="EArc_SupplierProductTime" %>
|
|
|
+
|
|
|
+<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
|
|
|
+ <script type="text/javascript">
|
|
|
+ var exData = null;
|
|
|
+ var edit_id = "";
|
|
|
+ function addFn() {
|
|
|
+ edit_id = "";
|
|
|
+ mini.get("productId").setValue("");
|
|
|
+ mini.get("supplierId").setValue("");
|
|
|
+ $("#craft").val("");
|
|
|
+ mini.get("dayDeadLine").setValue("");
|
|
|
+ mini.get("deadLine").setValue("");
|
|
|
+ $("#sendTime").val("");
|
|
|
+ $("#quantity").val("");
|
|
|
+ mini.get("add_win").show();
|
|
|
+ }
|
|
|
+
|
|
|
+ function editFn(eid) {
|
|
|
+ edit_id = eid;
|
|
|
+ var rec = grid.getSelected();
|
|
|
+ mini.get("productId").setValue(rec.productId);
|
|
|
+ mini.get("supplierId").setValue(rec.supplierId);
|
|
|
+ $("#craft").val(rec.craft);
|
|
|
+ mini.get("dayDeadLine").setValue(rec.dayDeadLine);
|
|
|
+ mini.get("deadLine").setValue(rec.deadLine);
|
|
|
+ $("#sendTime").val(rec.sendDay);
|
|
|
+ $("#quantity").val(rec.quantity);
|
|
|
+ mini.get("add_win").show();
|
|
|
+ }
|
|
|
+
|
|
|
+ function saveFn() {
|
|
|
+ let params = {};
|
|
|
+ params.eid = edit_id;
|
|
|
+ params.productId = mini.get("productId").getValue();
|
|
|
+ if (params.productId == "") {
|
|
|
+ alert("产品不允许为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ params.productName = mini.get("productId").getText();
|
|
|
+ params.supplierId = mini.get("supplierId").getValue();
|
|
|
+ if (params.supplierId == "") {
|
|
|
+ alert("车间不允许为空");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ params.supplierName = mini.get("supplierId").getText();
|
|
|
+ params.craft = $("#craft").val();
|
|
|
+ params.dayDeadLine = mini.get("dayDeadLine").getFormattedValue();
|
|
|
+ params.deadLine = mini.get("deadLine").getFormattedValue();
|
|
|
+ if (isNaN(Number($("#sendTime").val()))) {
|
|
|
+ alert("请输入正确发货时间");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (isNaN(Number($("#quantity").val()))) {
|
|
|
+ alert("请输入正确数量");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ params.sendTime = Number($("#sendTime").val());
|
|
|
+ params.quantity = Number($("#quantity").val());
|
|
|
+ postAjax("saveSupplierProductTime", params, function (data) {
|
|
|
+ mini.get("add_win").hide();
|
|
|
+ resultShow(data, "grid.reload();");
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function delFn(eid) {
|
|
|
+ if (!confirm("确认删除?")) return;
|
|
|
+ postAjax("delSupplierProductTime", "eid=" + eid, function (data) {
|
|
|
+ resultShow(data, "grid.reload();");
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ function cancelFn() {
|
|
|
+ mini.get("add_win").hide();
|
|
|
+ }
|
|
|
+
|
|
|
+ function actionRenderer(e) {
|
|
|
+ var grid = e.sender;
|
|
|
+ var record = e.record;
|
|
|
+ var id = record.ID;
|
|
|
+ var rowIndex = e.rowIndex;
|
|
|
+ var html = "";
|
|
|
+ html += getGridBtn("edit", "修改", "editFn('" + id + "')");
|
|
|
+ html += getGridBtn("stop", "删除", "delFn('" + id + "')");
|
|
|
+ return html;
|
|
|
+ }
|
|
|
+
|
|
|
+ function conFn(e) {
|
|
|
+ //alert(e.value);
|
|
|
+ var v = e.value;
|
|
|
+ v = e.value.replace(/<br>/g, "");
|
|
|
+ v = v.replace(/<br>/g, "");
|
|
|
+ //v = e.value.replace(/§/g, "");
|
|
|
+ return v;
|
|
|
+ }
|
|
|
+
|
|
|
+ function stateFn(e) {
|
|
|
+ if (e.value == "1") return "启用";
|
|
|
+ return "<span style=\"color:#ff0000\">禁用</span>";
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ <style type="text/css">
|
|
|
+ .win_tb {
|
|
|
+ width: 96%;
|
|
|
+ margin-left: auto;
|
|
|
+ margin-right: auto;
|
|
|
+ margin-top: 10px;
|
|
|
+ background-color: #dedede;
|
|
|
+ }
|
|
|
+
|
|
|
+ .win_tb td {
|
|
|
+ height: 36px;
|
|
|
+ background-color: #fff;
|
|
|
+ font-size: 14px;
|
|
|
+ padding: 5px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .win_tb input[type=text] {
|
|
|
+ width: 90%;
|
|
|
+ height: 24px;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .win_tb input[type=checkbox] {
|
|
|
+ width: 18px;
|
|
|
+ height: 18px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .win_tb select {
|
|
|
+ font-size: 14px;
|
|
|
+ height: 30px;
|
|
|
+ padding: 0px 5px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .win_tb .td1 {
|
|
|
+ color: #666;
|
|
|
+ background-color: #F8F8F8;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .win_tb .td2 {
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</asp:Content>
|
|
|
+<asp:Content ID="Content2" ContentPlaceHolderID="btn" runat="Server">
|
|
|
+</asp:Content>
|
|
|
+<asp:Content ID="Content3" ContentPlaceHolderID="toolbar" runat="Server">
|
|
|
+</asp:Content>
|
|
|
+<asp:Content ID="Content4" ContentPlaceHolderID="content" runat="Server">
|
|
|
+ <div class="mini-fit">
|
|
|
+ <div id="m_grid" class="mini-datagrid" style="width: 100%; height: 100%;" showemptytext="true" emptytext="暂无记录" url="../handler/sync.ashx?t=get_supplier_product_time_list">
|
|
|
+ <div property="columns">
|
|
|
+ <div type="indexcolumn" width="20"></div>
|
|
|
+ <div field="productName" width="100" align="center" headeralign="center">产品类型</div>
|
|
|
+ <div field="supplierName" width="40" align="center" headeralign="center">车间</div>
|
|
|
+ <div field="craft" width="40" align="center" headeralign="center">工艺</div>
|
|
|
+
|
|
|
+ <div field="dayDeadLine" width="40" align="center" headeralign="center">当日发货截稿时间</div>
|
|
|
+ <div field="deadLine" width="40" align="center" headeralign="center">截稿时间</div>
|
|
|
+ <div field="sendDay" width="40" align="center" headeralign="center">发货时间</div>
|
|
|
+ <div field="quantity" width="40" align="center" headeralign="center">数量</div>
|
|
|
+ <div name="action" width="120" headeralign="center" align="center" renderer="actionRenderer" cellstyle="padding:0;">#</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div id="add_win" class="mini-window" title="发货信息" style="width: 750px; height: 450px; position: relative; display: none">
|
|
|
+ <table class="win_tb" border="0" cellpadding="0" cellspacing="1">
|
|
|
+ <tr>
|
|
|
+ <td class="td1" colspan="1">车间</td>
|
|
|
+ <td class="td2" colspan="3">
|
|
|
+ <input id="supplierId" class="mini-combobox" style="width: 90%;" textfield="name" valuefield="id" required="true" allowinput="true" valuefromselect="true" url="../handler/sync.ashx?t=get_sel_supplier" />
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="td1" colspan="1">产品</td>
|
|
|
+ <td class="td2" colspan="3">
|
|
|
+ <input id="productId" class="mini-combobox" multiselect="true" style="width: 90%;" textfield="name" valuefield="id" required="true" allowinput="true" valuefromselect="true" url="../handler/sync.ashx?t=get_sel_product" />
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <tr>
|
|
|
+ <td class="td1" colspan="1">工艺</td>
|
|
|
+ <td class="td2" colspan="3">
|
|
|
+ <input type="text" id="craft" />
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="td1" colspan="1">当日发货截稿时间</td>
|
|
|
+ <td class="td2" colspan="1">
|
|
|
+ <input id="dayDeadLine" class="mini-timespinner" format="H:mm" />
|
|
|
+
|
|
|
+ </td>
|
|
|
+ <td class="td1" colspan="1">数量</td>
|
|
|
+ <td class="td2" colspan="1">
|
|
|
+ <input type="text" id="quantity" />
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="td1" colspan="1">截稿时间</td>
|
|
|
+ <td class="td2" colspan="1">
|
|
|
+ <input id="deadLine" class="mini-timespinner" format="H:mm" />
|
|
|
+ </td>
|
|
|
+ <td class="td1" colspan="1">发货时间</td>
|
|
|
+ <td class="td2" colspan="1" style="display: flex; align-items: center;">
|
|
|
+ <input type="text" id="sendTime" /><span>(天)</span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td colspan="4">
|
|
|
+ <div class="win_btn" style="text-align: center;">
|
|
|
+ <a class="mini-button" iconcls="icon-ok" onclick="saveFn">保存</a>
|
|
|
+ <a class="mini-button" iconcls="icon-cancel" onclick="cancelFn">取消</a>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+</asp:Content>
|
|
|
+
|