Selaa lähdekoodia

产品标贴位置配置

ztl 2 vuotta sitten
vanhempi
commit
a488c8250a

+ 2 - 2
wwwroot/Web.config

@@ -6,9 +6,9 @@
 <configuration>
 	<connectionStrings>
 		<!--三水正式服务器-->
-		<!--<add name="ConnectionString" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.18.32.116)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=dkmes)));User Id=hgiboss;Password=dongke" providerName="Oracle.ManagedDataAccess.Client"/>-->
+		<add name="ConnectionString" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.18.32.116)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=dkmes)));User Id=hgiboss;Password=dongke" providerName="Oracle.ManagedDataAccess.Client"/>
 		<!--三水测试服务器-->
-		<add name="ConnectionString" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.18.32.31)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=dkmes)));User Id=dkmes;Password=dongke" providerName="Oracle.ManagedDataAccess.Client"/>
+		<!--<add name="ConnectionString" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.18.32.31)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=dkmes)));User Id=dkmes;Password=dongke" providerName="Oracle.ManagedDataAccess.Client"/>-->
 		<!--<add name="ConnectionString" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.18.32.30)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=hgmestest)));User Id=hgiboss;Password=dk" providerName="Oracle.ManagedDataAccess.Client"/>-->
 	</connectionStrings>
 	<appSettings>

+ 53 - 0
wwwroot/mes/mst/GoodStickerLocation/getOrganization.ashx

@@ -0,0 +1,53 @@
+<%@ WebHandler Language="C#" Class="getOrganization" %>
+
+using System;
+using System.Web;
+using System.Web.SessionState;
+using System.Data;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using Curtain.DataAccess;
+using DK.XuWei.WebMes;
+
+public class getOrganization : IHttpHandler, IReadOnlySessionState
+{
+    public void ProcessRequest(HttpContext context)
+    {
+        context.Response.ContentType = "text/plain";
+        using(IDataAccess conn = DataAccess.Create())
+        {
+            DataTable dt = conn.ExecuteDatatable(@"
+                SELECT 
+                    ORGANIZATIONID AS id,
+                    ORGANIZATIONCODE AS code,
+                    ORGANIZATIONNAME AS text,
+                    '' AS url
+                FROM 
+                    TP_MST_ORGANIZATION
+                WHERE 
+                    VALUEFLAG = '1'
+                ORDER BY 
+                    ORGANIZATIONCODE
+            ");
+            string rootId = dt.Rows[0]["id"].ToString();
+            string rootCode = dt.Rows[0]["code"].ToString();
+            string rootText = dt.Rows[0]["text"].ToString();
+            string children = Easyui.TableToEasyUITree(dt, rootCode, 3);
+            string jsonStr = "[{\"id\":\"" + rootId + "\",\"text\":\"" + rootText + "\"" + children + "}]";
+            context.Response.Write(jsonStr);
+        }
+
+    }
+
+    public bool IsReusable
+    {
+        get
+        {
+            return false;
+        }
+    }
+
+}

+ 47 - 0
wwwroot/mes/mst/GoodStickerLocation/getUser.ashx

@@ -0,0 +1,47 @@
+<%@ WebHandler Language="C#" Class="getUser" %>
+
+using System;
+using System.Web;
+using System.Web.SessionState;
+using System.Data;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using Curtain.DataAccess;
+using DK.XuWei.WebMes;
+
+public class getUser : IHttpHandler, IReadOnlySessionState
+{
+    public void ProcessRequest(HttpContext context)
+    {
+        context.Response.ContentType = "text/plain";
+        using(IDataAccess conn = DataAccess.Create())
+        {
+            DataTable dt = conn.ExecuteDatatable(@"
+                SELECT 
+                    USERID AS ID,
+                    USERCODE AS CODE,
+                    USERNAME AS NAME
+                FROM 
+                    TP_MST_USER
+                WHERE 
+                    VALUEFLAG = '1'
+                ORDER BY 
+                    USERCODE
+            ");
+            context.Response.Write(dt.ToJson());
+        }
+
+    }
+
+    public bool IsReusable
+    {
+        get
+        {
+            return false;
+        }
+    }
+
+}

+ 46 - 0
wwwroot/mes/mst/GoodStickerLocation/getWorkstation.ashx

@@ -0,0 +1,46 @@
+<%@ WebHandler Language="C#" Class="getWorkstation" %>
+
+using System;
+using System.Web;
+using System.Web.SessionState;
+using System.Data;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using Curtain.DataAccess;
+using DK.XuWei.WebMes;
+
+public class getWorkstation : IHttpHandler, IReadOnlySessionState
+{
+    public void ProcessRequest(HttpContext context)
+    {
+        context.Response.ContentType = "text/plain";
+        using(IDataAccess conn = DataAccess.Create())
+        {
+            DataTable dt = conn.ExecuteDatatable(@"
+                SELECT 
+                    WORKSTATIONID AS ID,
+                    WORKSTATIONNAME AS NAME
+                FROM 
+                    TP_MST_WORKSTATION
+                WHERE 
+                    VALUEFLAG = '1'
+                ORDER BY 
+                    DISPLAYNO
+            ");
+            context.Response.Write(dt.ToJson());
+        }
+
+    }
+
+    public bool IsReusable
+    {
+        get
+        {
+            return false;
+        }
+    }
+
+}

+ 437 - 0
wwwroot/mes/mst/GoodStickerLocation/goodstickerlocation.ashx

@@ -0,0 +1,437 @@
+<%@ WebHandler Language="C#" Class="workstationuser" %>
+
+using System;
+using System.Web;
+using System.Web.SessionState;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Data;
+using Curtain.DataAccess;
+using DK.XuWei.WebMes;
+
+/// <summary>
+/// TP_MST_WORKSTATIONUSER
+/// xuwei create 2020-05-25
+/// </summary>
+public class workstationuser : IHttpHandler, IRequiresSessionState
+{
+    public void ProcessRequest(HttpContext context)
+    {
+        context.Response.ContentType = "text/plain";
+
+        if (mes.LoginCheck() && context.Request["m"] is object)
+        {
+            Button b = new Button();
+            if (mes.RightCheck("系统管理"))
+            {
+                b.btnIndex = true;
+                b.btnInsert = true;
+                b.btnInsertBatch = true;
+                b.btnCopy = true;
+                b.btnUpdate = true;
+                b.btnDelete = true;
+                b.btnCancel = true;
+                b.btnSearch = true;
+                b.btnDetail = true;
+                b.btnCheckbox = true;
+                b.btnExport = false;
+                b.btnReload = true;
+            };
+            switch (context.Request["m"].ToString().ToLower())
+            {
+                case "b":
+                    {
+                        //按钮
+                        context.Response.Write(new JsonResult(b).ToJson());
+                        break;
+                    }
+                case "a":
+                    {
+                        //添加
+                        if (b.btnDetail && context.Request["id"] != null && context.Request["id"].ToString() != "")
+                            context.Response.Write(detail());
+                        else
+                        {
+                            xRecord r = new xRecord();
+                            context.Response.Write(new JsonResult(r).ToJson());
+                        }
+                        break;
+                    }
+                case "s":
+                    {
+                        //搜索
+                        if (b.btnIndex)
+                            context.Response.Write(search(context.Request.Form));
+                        else
+                            context.Response.Write(new JsonResult(JsonStatus.rightError).ToJson());
+                        break;
+                    }
+                case "t":
+                    {
+                        //详细
+                        if (b.btnDetail)
+                            context.Response.Write(detail());
+                        else
+                            context.Response.Write(new JsonResult(JsonStatus.rightError).ToJson());
+                        break;
+                    }
+                case "i":
+                    {
+                        //插入
+                        if (b.btnInsert)
+                            context.Response.Write(insert(context.Request.Form));
+                        else
+                            context.Response.Write(new JsonResult(JsonStatus.rightError).ToJson());
+                        break;
+                    }
+                case "u":
+                    {
+                        //修改
+                        if (b.btnUpdate)
+                            context.Response.Write(update(context.Request.Form));
+                        else
+                            context.Response.Write(new JsonResult(JsonStatus.rightError).ToJson());
+                        break;
+                    }
+                case "d":
+                    {
+                        //删除
+                        if (b.btnDelete)
+                            context.Response.Write(delete());
+                        else
+                            context.Response.Write(new JsonResult(JsonStatus.rightError).ToJson());
+                        break;
+                    }
+                case "e":
+                    {
+                        //导出
+                        if (b.btnExport)
+                        {
+                            context.Response.Write(export());
+                        }
+                        else
+                        {
+                            context.Response.Write(new JsonResult(JsonStatus.rightError).ToJson());
+                        }
+                        break;
+                    }
+                default:
+                    {
+                        break;
+                    }
+            }
+        }
+        else
+        {
+            context.Response.Write(new JsonResult(JsonStatus.loginError).ToJson());
+        }
+    }
+
+    /// <summary>
+    /// TP_MST_WORKSTATIONUSER 查询
+    /// </summary>
+    /// <returns>json</returns>
+    private string search(NameValueCollection form)
+    {
+        using (IDataAccess conn = DataAccess.Create())
+        {
+            int page = HttpContext.Current.Request["page"] is object ? Convert.ToInt32(HttpContext.Current.Request["page"]) : 1;
+            int rows = HttpContext.Current.Request["rows"] is object ? Convert.ToInt32(HttpContext.Current.Request["rows"]) : 10;
+            string sort = HttpContext.Current.Request["sort"] is object ? HttpContext.Current.Request["sort"] : "";
+            string order = HttpContext.Current.Request["order"] is object ? HttpContext.Current.Request["order"] : "";
+
+            string sqlStr = @"
+                SELECT
+                    GOODSCODE,
+	                BIAOTIENAME,
+	                BIAOTIEPOSITION 
+                FROM
+	                TP_PM_GOODSBT 
+                WHERE
+	                VALUEFLAG = '1' 
+	                AND ACCOUNTID = @ACCOUNTID@
+            ";
+            List<CDAParameter> sqlPara = new List<CDAParameter>();
+            sqlPara.Add(new CDAParameter("ACCOUNTID", HttpContext.Current.Session["accountId"]));
+
+            if (!string.IsNullOrEmpty(form["GOODS"]))
+            {
+                sqlStr += " AND instr(','||@GOODS@||',',','||GOODSID||',')>0 ";
+                sqlPara.Add(new CDAParameter("GOODS", form["GOODS"]));
+            }
+             if(!string.IsNullOrEmpty(form["NAME"]))
+            {
+                sqlStr += " AND INSTR( BIAOTIENAME, @NAME@ ) > 0 ";
+                sqlPara.Add(new CDAParameter("NAME", form["NAME"].ToString()));
+            }
+            if(!string.IsNullOrEmpty(form["POSITION"]))
+            {
+                sqlStr += " AND INSTR( BIAOTIEPOSITION, @POSITION@ ) > 0 ";
+                sqlPara.Add(new CDAParameter("POSITION", form["POSITION"].ToString()));
+            }
+            if (sort != "")
+            {
+                sqlStr += " ORDER BY " + sort + " " + order;
+            }
+            int total = 0;
+            DataTable dt = conn.SelectPages(page, rows, out total, sqlStr, sqlPara.ToArray());
+            return new JsonResult(dt) { total = total }.ToJson();
+        }
+    }
+
+    /// <summary>
+    /// 详细 TP_MST_WORKSTATIONUSER
+    /// </summary>
+    /// <returns>json</returns>
+    private string detail()
+    {
+        using (IDataAccess conn = DataAccess.Create())
+        {
+            DataTable dt = conn.ExecuteDatatable(@"
+                SELECT 
+                    m.WORKSTATIONUSERID AS SID,
+                    m.WORKSTATIONUSERID,
+                    m.WORKSTATIONID,
+                    w.WORKSTATIONNAME,
+                    m.USERID,
+                    m.USERCODE,
+                    w.UJOBSID,
+                    j.JOBSNAME,
+                    m.REMARKS,
+                    m.ORGANIZATIONID,
+                    o.ORGANIZATIONNAME,
+                    m.VALUEFLAG,
+                    m.ACCOUNTID,
+                    m.CREATEUSERID,
+                    m.CREATETIME,
+                    m.UPDATEUSERID,
+                    m.UPDATETIME
+                FROM
+                    TP_MST_WORKSTATIONUSER m
+                    LEFT JOIN TP_MST_WORKSTATION w ON w.WORKSTATIONID = m.WORKSTATIONID
+                    LEFT JOIN TP_MST_ORGANIZATION o ON o.ORGANIZATIONID = m.ORGANIZATIONID
+                    LEFT JOIN TP_MST_JOBS j ON j.JOBSID = w.UJOBSID
+                WHERE 
+                    m.VALUEFLAG = '1'
+                    AND m.ACCOUNTID = @ACCOUNTID@
+                    AND m.WORKSTATIONUSERID = @WORKSTATIONUSERID@
+                ",
+                new CDAParameter("ACCOUNTID", HttpContext.Current.Session["accountId"]),
+                new CDAParameter("WORKSTATIONUSERID", HttpContext.Current.Request["id"])
+            );
+            return new JsonResult(dt).ToJson();
+        }
+    }
+
+    /// <summary>
+    /// 插入 TP_MST_WORKSTATIONUSER
+    /// </summary>
+    /// <returns>json</returns>
+    private string insert(NameValueCollection form)
+    {
+        using (IDataAccess conn = DataAccess.Create())
+        {
+            //判断是否存在
+            string count = conn.ExecuteScalar(@"
+              SELECT
+              count(*)
+            FROM
+              TP_PM_GOODSBT 
+            WHERE
+              VALUEFLAG = '1'
+	            AND GOODSID = @GOODSID@
+	            AND BIAOTIENAME = @BIAOTIENAME@
+	            AND BIAOTIEPOSITION = @BIAOTIEPOSITION@
+            "
+            , new CDAParameter("GOODSID", form["GOODS"]),
+            new CDAParameter("BIAOTIENAME", form["NAME"]),
+            new CDAParameter("BIAOTIEPOSITION", form["POSITION"])
+            ).ToString();
+            try
+            {
+                if (count == "0")
+                {
+                int result = 0;
+                result = conn.ExecuteNonQuery(@"
+               	INSERT INTO TP_PM_GOODSBT (
+                    GOODSID,
+                    GOODSCODE,
+                    BIAOTIENAME,
+                    BIAOTIEPOSITION,
+                    ACCOUNTID,
+                    VALUEFLAG,
+                    CREATEUSERID,
+					UPDATEUSERID) 
+                 SELECT @GOODSID@,GOODSCODE,@BIAOTIENAME@,@BIAOTIEPOSITION@,@ACCOUNTID@,1,@CREATEUSERID@,@UPDATEUSERID@ FROM TP_MST_GOODS WHERE GOODSID = @GOODSID@",
+                //new CDAParameter("WORKSTATIONUSERID",primaryKey),
+                new CDAParameter("GOODSID", form["GOODS"]),
+                new CDAParameter("BIAOTIENAME", form["NAME"]),
+                new CDAParameter("BIAOTIEPOSITION", form["POSITION"]),
+                new CDAParameter("ACCOUNTID", HttpContext.Current.Session["accountId"]),
+                new CDAParameter("CREATEUSERID", HttpContext.Current.Session["userId"]),
+                new CDAParameter("UPDATEUSERID", HttpContext.Current.Session["userId"])
+            );
+                if (result <= 0) {
+                    conn.Transaction.Rollback();
+                    return new JsonResult(JsonStatus.error).ToJson();
+                }
+            }
+            }
+            catch (Exception)
+            {
+                conn.Transaction.Rollback();
+                return new JsonResult(JsonStatus.error).ToJson();
+            }
+
+            return new JsonResult(JsonStatus.success).ToJson();
+        }
+    }
+
+    /// <summary>
+    /// 更新 TP_MST_WORKSTATIONUSER
+    /// </summary>
+    /// <returns>json</returns>
+    private string update(NameValueCollection form)
+    {
+        using (IDataAccess conn = DataAccess.Create())
+        {
+            #region 校验重复
+            // ADD BY fubin 2020/6/16
+            object isExists = conn.ExecuteScalar(
+                @"SELECT 1
+					FROM TP_MST_WORKSTATIONUSER WSU
+				   WHERE WSU.VALUEFLAG = 1
+					 AND WSU.USERID = @USERID@
+					 AND WSU.WORKSTATIONID = @WORKSTATIONID@
+					 AND WSU.WORKSTATIONUSERID <> @WORKSTATIONUSERID@",
+                new CDAParameter("USERID", form["USERID"]),
+                new CDAParameter("WORKSTATIONID", form["WORKSTATIONID"]),
+                new CDAParameter("WORKSTATIONUSERID", form["WORKSTATIONUSERID"])
+            );
+            if (isExists != null)
+            {
+                return new JsonResult(JsonStatus.otherError) { message="当前工号工位已绑定"}.ToJson();
+            }
+            #endregion
+
+            //读取别用户ID
+            string userCode = conn.ExecuteScalar(@"
+                SELECT 
+                    USERCODE 
+                FROM 
+                    TP_MST_USER 
+                WHERE 
+                    USERID = @USERID@
+            "
+            , new CDAParameter("USERID", form["USERID"])
+            ).ToString();
+
+            //读取用户所属部门
+            string organizationId = conn.ExecuteScalar(@"
+                SELECT 
+                    o.ORGANIZATIONID 
+                FROM 
+                    TP_MST_ORGANIZATION o 
+                    LEFT JOIN TP_MST_USER u ON o.ORGANIZATIONID = u.ORGANIZATIONID
+                WHERE 
+                    u.USERID = @USERID@
+            "
+            , new CDAParameter("USERID", form["USERID"])
+            ).ToString();
+
+            int result = conn.ExecuteNonQuery(@"
+                UPDATE TP_MST_WORKSTATIONUSER 
+                SET
+                    WORKSTATIONID = @WORKSTATIONID@,
+                    USERID = @USERID@,
+                    USERCODE = @USERCODE@,
+                    REMARKS = @REMARKS@,
+                    ORGANIZATIONID = @ORGANIZATIONID@,
+                    UPDATEUSERID = @UPDATEUSERID@,
+                    UPDATETIME = sysdate
+                WHERE 
+                    WORKSTATIONUSERID = @WORKSTATIONUSERID@
+                ",
+                new CDAParameter("WORKSTATIONID", form["WORKSTATIONID"]),
+                new CDAParameter("USERID", form["USERID"]),
+                new CDAParameter("USERCODE", userCode),
+                new CDAParameter("REMARKS", form["REMARKS"]),
+                new CDAParameter("ORGANIZATIONID", organizationId),
+                new CDAParameter("UPDATEUSERID", HttpContext.Current.Session["userId"]),
+                new CDAParameter("WORKSTATIONUSERID", HttpContext.Current.Request["id"])
+            );
+            return new JsonResult(JsonStatus.success).ToJson();
+        }
+    }
+
+    /// <summary>
+    /// 删除 TP_MST_WORKSTATIONUSER
+    /// </summary>
+    /// <returns>json</returns>
+    private string delete()
+    {
+        using (IDataAccess conn = DataAccess.Create())
+        {
+            if (HttpContext.Current.Request["id"] is object)
+            {
+                int result = conn.ExecuteNonQuery(@"
+                    DELETE 
+                        TP_MST_WORKSTATIONUSER 
+                    WHERE 
+                        INSTR(',' || @WORKSTATIONUSERID@ || ',' , ',' || WORKSTATIONUSERID || ',') > 0 
+                    ",
+                    new CDAParameter("WORKSTATIONUSERID", HttpContext.Current.Request["id"])
+                );
+                return new JsonResult(JsonStatus.success).ToJson();
+            }
+            else
+            {
+                return new JsonResult(JsonStatus.otherError).ToJson();
+            }
+        }
+    }
+
+    /// <summary>
+    /// 导出 TP_MST_WORKSTATIONUSER
+    /// </summary>
+    /// <returns>json</returns>
+    private string export()
+    {
+        return search(new NameValueCollection());
+    }
+
+    private class Button
+    {
+        public bool btnIndex = false;
+        public bool btnInsert = false;
+        public bool btnInsertBatch = false;
+        public bool btnCopy = false;
+        public bool btnUpdate = false;
+        public bool btnDelete = false;
+        public bool btnCancel = false;
+        public bool btnSearch = false;
+        public bool btnDetail = false;
+        public bool btnCheckbox = false;
+        public bool btnExport = false;
+        public bool btnReload = false;
+    }
+
+    private class xRecord
+    {
+        public string sid { get; set; }
+        public string WORKSTATIONID { get; set; }
+        public string USERID { get; set; }
+        public string USERCODE { get; set; }
+        public string REMARKS { get; set; }
+        public string ORGANIZATIONID { get; set; }
+    }
+
+    public bool IsReusable
+    {
+        get
+        {
+            return false;
+        }
+    }
+
+}

+ 81 - 0
wwwroot/mes/mst/GoodStickerLocation/goodstickerlocation_add.html

@@ -0,0 +1,81 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <meta name="keywords" content="dongke,mes,ibossmes">
+    <meta name="description" content="制造企业生产过程执行管理系统">
+    <meta name="author" content="xuwei">
+    <title>东科软件</title>
+    <script src="/plugins/xeasyui/xeasyui.min.js"></script>
+</head>
+<body class="easyui-layout">
+    <!--
+        <input class="easyui-combobox w-input" id="叶子" name="叶子" data-options="prompt:'',tipPosition:'top',url:'/mes/list.ashx?m=truefalse',method:'get',valueField:'text',textField:'text',panelHeight:'200px',editable:'true'" style="width:100%;height:32px;">
+        <input class="easyui-filebox" id="图片" name="图片" data-options="prompt:'',tipPosition:'top',buttonText:'选择图片',buttonAlign:'right',accept:'image/*',onChange:$.imagePreview" style="width:100%;height:32px;" >
+    -->
+    <div data-options="region:'center',plain:true,border:false">
+        <form id="ff" method="post" class="w-form">
+            <div class="w-div">
+                <div class="w-fieldbar" onclick="$('#more1').toggle()" style="cursor:pointer;"></div>
+            </div>
+            <!--<div id="more1" style="display:block;">
+                <div class="w-div">
+                    <div class="w-fieldname">工位用户配置ID:</div>
+                    <div class="w-field"><input disabled class="easyui-textbox" id="WORKSTATIONUSERID" name="WORKSTATIONUSERID" data-options="required:false,prompt:'',tipPosition:'top'" style="width:100%;height:32px;"></div>
+                </div>-->
+                <!--<div class="w-div">
+                    <div class="w-fieldname">工号:</div>
+                    <div class="w-field"><input class="easyui-combobox w-input" id="USERCODE" name="USERCODE" data-options="required:true,prompt:'',tipPosition:'top',url:'getUser.ashx',method:'get',valueField:'CODE',textField:'CODE',panelHeight:'200px',editable:true" style="width:100%;height:32px;"></div>
+                </div>-->
+            <!--</div>-->
+            <div class="w-div">
+                <div class="w-fieldbar" onclick="$('#more2').toggle()" style="cursor:pointer;"></div>
+            </div>
+            <div id="more2" style="display:block;">
+                <div class="w-div">
+                    <div class="w-fieldname">产品编码:</div>
+                    <input class="easyui-combobox" id="GOODS" name="GOODS" data-options="required:false,prompt:'',tipPosition:'top',url:'../../rpt/rpt.ashx?m=getGoods&select=1',method:'get',valueField:'GOODSID',textField:'GOODSCODE',panelHeight:'300px',editable:true" style="width:100%;height:32px;">
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">名称:</div>
+                    <div class="w-field"><input class="easyui-textbox" id="NAME" name="NAME" data-options="required:false,prompt:'',tipPosition:'top'" style="width:100%;height:32px;"></div>
+                </div>
+                <!--<div class="w-div">
+                    <div class="w-fieldname">工号所属部门:</div>
+                    <div class="w-field"><input class="easyui-combotree" id="ORGANIZATIONID" name="ORGANIZATIONID" data-options="required:true,prompt:'',tipPosition:'top',url:'getOrganization.ashx',method:'get',panelHeight:'200px',editable:false" style="width:100%;height:32px;"></div>
+                </div>-->
+                <div class="w-div">
+                    <div class="w-fieldname">位置:</div>
+                    <div class="w-field"><input class="easyui-textbox" id="POSITION" name="POSITION" data-options="required:false,prompt:'',tipPosition:'top'" style="width:100%;height:32px;"></div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <div data-options="region:'south',border:false" class="w-bar">
+        <a href="javascript:void(0)" id="tbSave" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="submitForm()">保存</a>
+        <a href="javascript:void(0)" id="tbClose" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="cancelForm()">关闭</a>
+    </div>
+
+    <script type="text/javascript">
+
+        $(function () {
+            $('#ff').formLoad({
+                url: 'goodstickerlocation.ashx?m=a'
+            });
+            $('#more1').toggle();
+        });
+
+        function submitForm() {
+            $.dialog.save({
+                formid: 'ff',
+                url: 'goodstickerlocation.ashx?m=i'
+            });
+        }
+
+        function cancelForm() {
+            $.dialog.close();
+        }
+
+    </script>
+</body>
+</html>

+ 102 - 0
wwwroot/mes/mst/GoodStickerLocation/goodstickerlocation_edit.html

@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <meta name="keywords" content="dongke,mes,ibossmes">
+    <meta name="description" content="制造企业生产过程执行管理系统">
+    <meta name="author" content="xuwei">
+    <title>东科软件</title>
+    <script src="/plugins/xeasyui/xeasyui.min.js"></script>
+</head>
+<body class="easyui-layout">
+    <!--
+        <input class="easyui-combobox w-input" id="叶子" name="叶子" data-options="prompt:'',tipPosition:'top',url:'/mes/list.ashx?m=truefalse',method:'get',valueField:'text',textField:'text',panelHeight:'200px',editable:'true'" style="width:100%;height:32px;">
+        <input class="easyui-filebox" id="图片" name="图片" data-options="prompt:'',tipPosition:'top',buttonText:'选择图片',buttonAlign:'right',accept:'image/*',onChange:$.imagePreview" style="width:100%;height:32px;" >
+    -->
+    <div data-options="region:'center',plain:true,border:false">
+        <form id="ff" method="post" class="w-form">
+            <div class="w-div">
+                <div class="w-fieldbar" onclick="$('#more1').toggle()" style="cursor:pointer;"></div>
+            </div>
+            <div id="more1" style="display:block;">
+                <div class="w-div">
+                    <div class="w-fieldname">工位用户配置ID:</div>
+                    <div class="w-field"><div id="WORKSTATIONUSERID" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">有效标识:</div>
+                    <div class="w-field"><div id="VALUEFLAG" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">账套ID:</div>
+                    <div class="w-field"><div id="ACCOUNTID" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">创建工号ID:</div>
+                    <div class="w-field"><div id="CREATEUSERID" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">创建时间:</div>
+                    <div class="w-field"><div id="CREATETIME" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">更新工号ID:</div>
+                    <div class="w-field"><div id="UPDATEUSERID" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">更新时间:</div>
+                    <div class="w-field"><div id="UPDATETIME" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+            </div>
+            <div class="w-div">
+                <div class="w-fieldbar" onclick="$('#more2').toggle()" style="cursor:pointer;"></div>
+            </div>
+			<div id="more2" style="display:block;">
+				<!-- ADD 增加隐藏ID BY FUBIN 2020-6-16-->
+				<input class="text" id="WORKSTATIONUSERID" name="WORKSTATIONUSERID" hidden="hidden">
+				<div class="w-div">
+					<div class="w-fieldname">工位:</div>
+					<div class="w-field"><input class="easyui-combobox w-input" id="WORKSTATIONID" name="WORKSTATIONID" data-options="required:true,prompt:'',tipPosition:'top',url:'getWorkstation.ashx',method:'get',valueField:'ID',textField:'NAME',panelHeight:'200px',editable:true" style="width:100%;height:32px;"></div>
+				</div>
+				<div class="w-div">
+					<div class="w-fieldname">工号ID:</div>
+					<div class="w-field"><input class="easyui-combobox w-input" id="USERID" name="USERID" data-options="required:true,prompt:'',tipPosition:'top',url:'getUser.ashx',method:'get',valueField:'ID',textField:'CODE',panelHeight:'200px',editable:true" style="width:100%;height:32px;"></div>
+				</div>
+				<!--<div class="w-div">
+		<div class="w-fieldname">工号所属部门:</div>
+		<div class="w-field"><input class="easyui-combotree" id="ORGANIZATIONID" name="ORGANIZATIONID" data-options="required:true,prompt:'',tipPosition:'top',url:'getOrganization.ashx',method:'get',panelHeight:'200px',editable:false" style="width:100%;height:32px;"></div>
+	</div>-->
+				<div class="w-div">
+					<div class="w-fieldname">备注:</div>
+					<div class="w-field"><input class="easyui-textbox" id="REMARKS" name="REMARKS" data-options="required:false,prompt:'',tipPosition:'top'" style="width:100%;height:32px;"></div>
+				</div>
+			</div>
+        </form>
+    </div>
+    <div data-options="region:'south',border:false" class="w-bar">
+        <a href="javascript:void(0)" id="tbSave" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="submitForm()">保存</a>
+        <a href="javascript:void(0)" id="tbClose" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="cancelForm()">关闭</a>
+    </div>
+    <script type="text/javascript">
+
+        $(function () {
+            $('#ff').formLoad({
+                url: 'workstationuser.ashx?m=t'
+            });
+            $('#more1').toggle();
+        });
+
+        function submitForm() {
+            $.dialog.save({
+                formid: 'ff',
+                url: 'workstationuser.ashx?m=u&id=' + request('id')
+            });
+        }
+
+        function cancelForm() {
+            $.dialog.close();
+        }
+
+    </script>
+</body>
+</html>

+ 158 - 0
wwwroot/mes/mst/GoodStickerLocation/goodstickerlocation_index.html

@@ -0,0 +1,158 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <meta name="keywords" content="dongke,mes,ibossmes">
+    <meta name="description" content="制造企业生产过程执行管理系统">
+    <meta name="author" content="xuwei">
+    <title>东科软件</title>
+    <script src="/plugins/xeasyui/xeasyui.min.js"></script>
+    <link href="/plugins/xeasyui/toolbar.min.css" rel="stylesheet" />
+</head>
+<body>
+    <!--工具条-->
+    <div id="tb" class="i-toolbar">
+        <a href="javascript:void(0)" style="display:none" id="btnInsert" title="添加" class="easyui-linkbutton" iconcls="icon-add" plain="true" onclick="tbAdd()">添加</a>
+        <!--<a href="javascript:void(0)" style="display:none" id="btnUpdate" title="编辑" class="easyui-linkbutton" iconcls="icon-edit" plain="true" onclick="tbEdit()">修改</a>-->
+        <!--<a href="javascript:void(0)" style="display:none" id="btnDelete" title="删除" class="easyui-linkbutton" iconcls="icon-remove" plain="true" onclick="tbDelete()">删除</a>-->
+        <!--<a href="javascript:void(0)" style="display:none" id="btnDetail" title="详细" class="easyui-linkbutton" iconcls="icon-detail" plain="true" onclick="tbDetail()">详细</a>-->
+        <!--<a href="javascript:void(0)" style="display:none" id="btnCheckbox" title="显示复选框" class="easyui-linkbutton" iconcls="icon-ok" plain="true" toggle="true" onclick="tbCheck()">复选</a>-->
+        <a href="javascript:void(0)" style="display:none" id="btnSearch" title="搜索" class="easyui-linkbutton" iconcls="icon-search" plain="true" toggle="true" onclick="tbSearch()">搜索</a>
+        <a href="javascript:void(0)" style="display:none" id="btnExport" title="导出" class="easyui-linkbutton" iconcls="icon-excel" plain="true" onclick="tbExport()">导出</a>
+        <!--<a href="javascript:void(0)" id="btnColumn" class="easyui-menubutton" data-options="menu:'#btnColumnMenu',iconCls:'icon-undo'">列显示</a>
+        <div id="btnColumnMenu" style="width:150px;"></div>-->
+        <a href="javascript:void(0)" id="btnReload" title="刷新" class="easyui-linkbutton" iconcls="icon-reload" plain="true" onclick="tbReload()">刷新</a>
+        <div id="tbSearchDiv" style="display:none;padding:10px;">
+            <form id="ff">
+                <div>
+                    产品编码:
+                    <input class="easyui-combobox" id="GOODS" name="GOODS" data-options="required:false,prompt:'',tipPosition:'top',url:'../../rpt/rpt.ashx?m=getGoods&select=1',method:'get',valueField:'GOODSID',textField:'GOODSCODE',panelHeight:'300px',editable:true,multiple:true" style="width:325px;height:32px;">
+                    标贴名称:
+                    <input class="easyui-textbox" id="NAME" name="NAME" data-options="required:false,prompt:'',tipPosition:'top'" style="width:80px;height:32px;">
+                    标贴位置:
+                    <input class="easyui-textbox" id="POSITION" name="POSITION" data-options="required:false,prompt:'',tipPosition:'top'" style="width:80px;height:32px;">
+                    <a href="javascript:void(0)" id="btnSearchSubmit" title="清空" class="easyui-linkbutton" plain="false" onclick="$('#ff').form('clear')">清空</a>
+                    <a href="javascript:void(0)" id="btnSearchSubmit" title="搜索" class="easyui-linkbutton" plain="false" onclick="tbSearchSubmit()">搜索</a>
+                </div>
+            </form>
+        </div>
+    </div>
+    <!--表格-->
+    <table id="dg" data-options="toolbar: '#tb',onDblClickRow: dgDblclickrow,showFooter:false">
+        <thead>
+            <tr>
+                <th data-options="field:'SID',title:'SID',width:220,align:'left',checkbox:true,hidden:true">SID</th>
+                <th data-options="field:'ROWNO',title:'序号',align:'left',sortable:true"></th>
+                <th data-options="field:'GOODSCODE',title:'产品',align:'left',sortable:true"></th>
+                <th data-options="field:'BIAOTIENAME',title:'名称',align:'left',sortable:true"></th>
+                <th data-options="field:'BIAOTIEPOSITION',title:'位置',align:'left',sortable:true"></th>
+            </tr>
+        </thead>
+    </table>
+    <script type="text/javascript">
+
+        //加载完成
+        $(function () {
+            //加载按钮
+            $('#tb').buttonLoad({
+                url:'goodstickerlocation.ashx?m=b'
+            });
+            //加载表格数据
+            tbSearchSubmit();
+
+            //$('#USERCODE').textbox('textbox').bind('keyup', function (e) {
+            //    this.value = this.value.toUpperCase();
+            //});
+        });
+
+        //添加按钮
+        function tbAdd() {
+            $('#dg').datagridDialog({
+                title: '添加数据',
+                width: 640,
+                height: 480,
+                url: 'goodstickerlocation_add.html'
+            });
+        }
+
+        //修改按钮
+        function tbEdit() {
+            $('#dg').datagridDialog({
+                title: '修改数据',
+                width: 640,
+                height: 480,
+                url: 'goodstickerlocation_edit.html',
+                requireSelect: true
+            });
+        }
+
+        //删除按钮
+        function tbDelete() {
+            $('#dg').datagridPost({
+                title:'删除操作',
+                url: 'goodstickerlocation.ashx?m=d',
+                onValidate: function (r) { return true; }
+            });
+        }
+
+        //详细按钮
+        //function tbDetail() {
+        //    $('#dg').datagridDialog({
+        //        title: '详细数据',
+        //        width: 640,
+        //        height: 480,
+        //        url: 'workstationuser_detail.html',
+        //        requireSelect: true
+        //    });
+        //}
+
+        //复选按钮
+        function tbCheck() {
+            $('#dg').datagridCheckbox({
+                buttonid: 'btnCheckbox',
+                valuefield: 'SID'
+            });
+        }
+
+        //搜索按钮
+        function tbSearch() {
+            $('#tbSearchDiv').toggle();
+            $('#dg').datagrid('resize');
+        }
+
+        //搜索提交
+        function tbSearchSubmit() {
+            $('#dg').datagridLoad({
+                title: '产品标贴位置配置',
+                idField: 'SID',
+                queryParams: $('#ff').serializeJson(),
+                url: 'goodstickerlocation.ashx?m=s',
+                columnMenu: '#btnColumnMenu',
+                columnMoving: false
+            });
+        }
+
+        //导出
+        function tbExport() {
+            $('#dg').datagridExport({
+                fileName: '导出数据(TP_PM_GOODSBT).xls',
+                workSheet: '导出数据(TP_PM_GOODSBT)'
+            });
+        }
+
+        //刷新
+        function tbReload() {
+            tbSearchSubmit();
+        }
+
+        //表格双击
+        function dgDblclickrow(rowIndex, rowData) {
+            tbDetail();
+        }
+
+        function formatterTrueFalse(value, row, index) { return value == 'True' ? '是' : '否'; }
+        function stylerTrueFalse(value, row, index) { return value == 'True' ? 'color:black' : 'color:red'; }
+
+    </script>
+</body>
+</html>

+ 120 - 0
wwwroot/mes/mst/GoodStickerLocation/workstationuser_detail.html

@@ -0,0 +1,120 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <meta name="keywords" content="dongke,mes,ibossmes">
+    <meta name="description" content="制造企业生产过程执行管理系统">
+    <meta name="author" content="xuwei">
+    <title>东科软件</title>
+    <script src="/plugins/xeasyui/xeasyui.min.js"></script>
+</head>
+<body class="easyui-layout">
+    <div data-options="region:'center',plain:true,border:false">
+        <form id="ff" method="post" class="w-form">
+            <div class="w-div">
+                <div class="w-fieldbar" onclick="$('#more1').toggle()" style="cursor:pointer;"></div>
+            </div>
+            <div id="more1" style="display:block;">
+                <div class="w-div">
+                    <div class="w-fieldname">工位用户配置ID:</div>
+                    <div class="w-field"><div id="WORKSTATIONUSERID" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">有效标识:</div>
+                    <div class="w-field"><div id="VALUEFLAG" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">账套ID:</div>
+                    <div class="w-field"><div id="ACCOUNTID" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">创建工号ID:</div>
+                    <div class="w-field"><div id="CREATEUSERID" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">创建时间:</div>
+                    <div class="w-field"><div id="CREATETIME" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">更新工号ID:</div>
+                    <div class="w-field"><div id="UPDATEUSERID" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">更新时间:</div>
+                    <div class="w-field"><div id="UPDATETIME" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+            </div>
+            <div class="w-div">
+                <div class="w-fieldbar" onclick="$('#more2').toggle()" style="cursor:pointer;"></div>
+            </div>
+            <div id="more2" style="display:block;">
+                <div class="w-div">
+                    <div class="w-fieldname">工位:</div>
+                    <div class="w-field"><div id="WORKSTATIONNAME" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">工号ID:</div>
+                    <div class="w-field"><div id="USERID" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">工种:</div>
+                    <div class="w-field"><div id="JOBSNAME" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">工号:</div>
+                    <div class="w-field"><div id="USERCODE" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">工号所属部门:</div>
+                    <div class="w-field"><div id="ORGANIZATIONNAME" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+                <div class="w-div">
+                    <div class="w-fieldname">备注:</div>
+                    <div class="w-field"><div id="REMARKS" data-field="true" class="w-fieldvalue"></div></div>
+                </div>
+            </div>
+        </form>
+    </div>
+    <div id="tb" data-options="region:'south',border:false" class="w-bar">
+        <a href="javascript:void(0)" style="display:none" id="btnCopy" class="easyui-linkbutton" data-options="iconCls:'icon-add'" onclick="copyForm()">复制</a>
+        <a href="javascript:void(0)" style="display:none" id="btnUpdate" class="easyui-linkbutton" data-options="iconCls:'icon-edit'" onclick="editForm()">修改</a>
+        <a href="javascript:void(0)" style="display:none" id="btnDelete" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" onclick="deleteForm()">删除</a>
+        <a href="javascript:void(0)" id="tbClose" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="cancelForm()">关闭</a>
+    </div>
+    <script type="text/javascript">
+
+        $(function () {
+            $('#tb').buttonLoad({
+                url:'workstationuser.ashx?m=b'
+            });
+            $('#ff').formLoad({
+                url: 'workstationuser.ashx?m=t'
+            });
+            $('#more1').toggle();
+        });
+
+        function copyForm() {
+            $.dialog.go({
+                url: 'workstationuser_add.html?id=' + request('id')
+            });
+        }
+
+        function editForm() {
+            $.dialog.go({
+                url: 'workstationuser_edit.html?id=' + request('id')
+            });
+        }
+
+        function deleteForm() {
+            $.dialog.delete({
+                url: 'workstationuser.ashx?m=d&id=' + request('id')
+            });
+        }
+
+        function cancelForm() {
+            $.dialog.close();
+        }
+
+    </script>
+</body>
+</html>