懒羊羊
2023-11-14 4ad58b3dbd72e7ca266318f24a203210da5b24d7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
@layout("/common/_container.html",{js:["/assets/modular/pm/workOrder/workOrder.js"]}){
 
<div class="layui-body-header">
    <span class="layui-body-header-title">生产工单管理</span>
</div>
 
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                工单编号:
                            </div>
                            <div class="layui-inline">
                                <input id="workOrderCode" class="layui-input" type="text" placeholder="工单编号"/>
                            </div>
                            <div class="layui-inline">
                                订单编号:
                            </div>
                            <div class="layui-inline">
                                <input id="salesOrderCode" class="layui-input" type="text" placeholder="订单编号"/>
                            </div>
                            <div class="layui-inline">
                                产品编号:
                            </div>
                            <div class="layui-inline">
                                <input id="productCode" class="layui-input" type="text" placeholder="产品编号"/>
                            </div>
                            <div class="layui-inline">
                                产品名称:
                            </div>
                            <div class="layui-inline">
                                <input id="productName" class="layui-input" type="text" placeholder="产品名称"/>
                            </div>
                            <div class="layui-inline">
                                车间编码:
                            </div>
                            <div class="layui-inline">
                                <input id="workshopCode" class="layui-input" type="text" placeholder="车间编码"/>
                            </div>
                            <div class="layui-inline">
                                产线编码:
                            </div>
                            <div class="layui-inline">
                                <input id="lineCode" class="layui-input" type="text" placeholder="产线编码"/>
                            </div>
                            <div class="layui-inline">
                                状态:
                            </div>
                            <div class="layui-inline">
                                <input id="state" class="layui-input" type="text" placeholder="状态"/>
                            </div>
                            <div class="layui-inline">
                                <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>
                                <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>
                                <button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>导出</button>
                            </div>
                        </div>
                    </div>
                    <table class="layui-table" id="workOrderTable" lay-filter="workOrderTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>
 
<!--<script type="text/html" id="tableBar">-->
<!--    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>-->
<!--    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>-->
<!--</script>-->
<script type="text/html" id="tableBar">
    {{#  if(d.state == 1){ }}
    <button class="layui-btn layui-btn-primary layui-btn-xs" lay-event="start">开始</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="freeze" disabled="true">冻结</button>
    <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="close">关闭</button>
    <button class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</button>
    <button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</button>
    <button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="finish">完成</button>
    {{#  } else if(d.state == 2){ }}
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="start" disabled="true">开始</button>
    <button class="layui-btn layui-btn-warm layui-btn-xs" lay-event="freeze">冻结</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="close"  disabled="true">关闭</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="edit"  disabled="true">修改</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="delete"  disabled="true">删除</button>
    {{#  } else if(d.state == 3){ }}
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="start" disabled="true">开始</button>
    <button class="layui-btn layui-btn-warm layui-btn-xs" lay-event="freeze">冻结</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="close"  disabled="true">关闭</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="edit"  disabled="true">修改</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="delete"  disabled="true">删除</button>
    <button class="layui-btn layui-btn-danger layui-btn-xs" lay-event="finish">完成</button>
    {{#  } else if(d.state == 4){ }}
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="start" disabled="true">开始</button>
    <button class="layui-btn layui-btn-warm layui-btn-xs" lay-event="thaw">解冻</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="close" disabled="true">关闭</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="edit" disabled="true">修改</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="delete" disabled="true">删除</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="delete" disabled="true">完成</button>
    {{#  } else if(d.state == 5){ }}
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="start" disabled="true">开始</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="thaw" disabled="true">冻结</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="close" disabled="true">关闭</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="edit" disabled="true">修改</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="delete" disabled="true">删除</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="finish" disabled="true">已完成</button>
    {{#  } else if(d.state == 6){ }}
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="start" disabled="true">开始</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="thaw" disabled="true">冻结</button>
    <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="enable" >启用</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="edit" disabled="true">修改</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="delete" disabled="true">删除</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="finish" disabled="true">完成</button>
    {{#  } else { }}
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="start" disabled="true">开始</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="thaw" disabled="true">冻结</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="close" disabled="true">关闭</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="edit" disabled="true">修改</button>
    <button class="layui-btn layui-btn-disabled layui-btn-xs" lay-event="delete" disabled="true">删除</button>
    {{#  } }}
</script>
<script type="text/html" id="orderStatusTpl">
    {{#  if(d.state == 1){ }}
    <span style="color: #130c0e;">未开始</span>
    {{#  } else if(d.state == 2){ }}
    <span style="color: #130c0e;">已解冻</span>
    {{#  } else if(d.state == 3){ }}
    <span style="color: #00a2d4;">生产中</span>
    {{#  } else if(d.state == 4){ }}
    <span style="color: #f47920;">已冻结</span>
    {{#  } else if(d.state == 5){ }}
    <span style="color: #00B83F;">已完成</span>
    {{#  } else if(d.state == 6){ }}
    <span style="color: #8a8f97;">已关闭</span>
    {{#  } else { }}
    <span style="color: #8a8f97;">无</span>
    {{#  } }}
</script>
@}