|
|
@@ -80,7 +80,18 @@
|
|
|
<form id="工位窗体" class="pt-5 pb-5 rounded shadow-sm bg-white position-absolute" style="width:350px;top:50%;margin-top:-815px;left:50%;margin-left:-175px;">
|
|
|
<h5 class="text-center">请您确认工位</h5>
|
|
|
<div class="form-row pt-3 pl-5">
|
|
|
+ <div class="form-group col-12">
|
|
|
+ <label class="sr-only" for="登录类型">登录类型</label>
|
|
|
+ <div class="input-group mb-2 ">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <div class="input-group-text" style="width:40px;"><i class="fa fa-cog " aria-hidden="true"></i></div>
|
|
|
+ </div>
|
|
|
+ <select id="barcodeStaing" class="custom-select" style="margin-right:80px; text-align: center"onchange="ChangeSelect()">
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div id="工位模板" style="display:none">
|
|
|
+
|
|
|
<label class="checkbox-inline pt-2" style="width:260px;border-bottom:1px solid lightgray">
|
|
|
<input type="radio" name="工位选择" value="{ID}"> {NAME}
|
|
|
</label>
|
|
|
@@ -89,13 +100,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-row col-12 justify-content-center">
|
|
|
- <button onclick="workButton_onClick()" type="button" class="btn btn-danger" style="width:100px;">确定</button>
|
|
|
- <button type="reset" class="btn btn-secondary" style="width:100px;">重置</button>
|
|
|
+ <button onclick="workButton_onClick()" type="button" class="btn btn-danger" style="width: 100px; margin-top: 10px;">确定</button>
|
|
|
+ <button type="reset" class="btn btn-secondary" style="width: 100px; margin-top: 10px;">重置</button>
|
|
|
</div>
|
|
|
</form>
|
|
|
<!--打卡窗体-->
|
|
|
<form id="打卡窗体" class="pt-5 pb-5 rounded shadow-sm bg-white position-absolute" style="width:350px;top:50%;margin-top:-815px;left:50%;margin-left:-175px;">
|
|
|
<h5 class="text-center">请您确认当前工号员工</h5>
|
|
|
+
|
|
|
<div class="form-row pt-3 pl-5">
|
|
|
<div id="工号员工模板" style="display:none">
|
|
|
<div class="row pt-1">
|
|
|
@@ -230,9 +242,12 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
//打卡数据读取
|
|
|
function doRegLoad() {
|
|
|
|
|
|
+
|
|
|
//先行加载模板工种选项
|
|
|
$.get('api/GetUserJobs.ashx?UserCode=' + $('#用户').val(), function (data) {
|
|
|
var json = JSON.parse(data);
|
|
|
@@ -241,10 +256,8 @@
|
|
|
$('#工号员工模板 select').append('<option value="' + json["rows"][i]["JOBSID"] + '">' + json["rows"][i]["JOBSNAME"] + '</option>');
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
//加载打卡员工数据
|
|
|
$('#工号员工').loadHtml('api/GetWorkStationUser.ashx?UserCode=' + $('#用户').val() + '&WorkstationId=' + $('#工位').getRadioVal(), '#工号员工模板', function (data) {
|
|
|
- console.log(data);
|
|
|
$.get('api/GetClassesUser.ashx?UserCode=' + $('#用户').val(), function (data) {
|
|
|
var json = JSON.parse(data);
|
|
|
if (json['success'] == true) {
|
|
|
@@ -260,8 +273,6 @@
|
|
|
});
|
|
|
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
//打卡数据保存 登录类型 1:打卡并登录工位 0:只打卡不登录工位
|
|
|
@@ -338,26 +349,40 @@
|
|
|
// $('#工位').get(0).selectedIndex = 1;
|
|
|
// workStation = data["rows"];
|
|
|
//});
|
|
|
-
|
|
|
- $('#工位').loadHtml('api/GetWorkStation.ashx?UserCode=' + $('#用户').val() , '#工位模板', function (data) {
|
|
|
- console.log(data);
|
|
|
- workStation = data["rows"];
|
|
|
-
|
|
|
- //读取工位IP设置工位默认值
|
|
|
- $.get('api/GetWorkStationDefault.ashx', function (data) {
|
|
|
- var json = JSON.parse(data);
|
|
|
- if (json["success"] == true) {
|
|
|
- if (json["rows"].length > 0) {
|
|
|
- console.log(json["rows"][0]["PCCODE"]);
|
|
|
- $('#工位').setRadioVal(json["rows"][0]["ID"]);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- });
|
|
|
+ $.get('api/GetProcedure.ashx?UserCode=' + $('#用户').val(), function (data) {
|
|
|
+ var json = JSON.parse(data);
|
|
|
+ if (json["success"] == true) {
|
|
|
+ $("#barcodeStaing").empty();
|
|
|
+ $("#barcodeStaing").append("<option value='0'>---请选择工序---</option>");
|
|
|
+ for (var i = 0; i < json.rows.length; i++) {
|
|
|
+ $("#barcodeStaing").append("<option value='" + json['rows'][i]['PROCEDUREID'] + "'>" + json['rows'][i]['PROCEDURENAME'] + "</option>");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function ChangeSelect() {
|
|
|
+ var procedure = document.getElementById("barcodeStaing");
|
|
|
+ var index = procedure.selectedIndex;
|
|
|
+ var myprocedure = procedure.options[index].value;
|
|
|
+ $('#工位').loadHtml('api/GetWorkStation.ashx?UserCode=' + $('#用户').val() + '&PROCEDUREID=' + myprocedure, '#工位模板', function (data) {
|
|
|
+ workStation = data["rows"];
|
|
|
+
|
|
|
+ //读取工位IP设置工位默认值
|
|
|
+ $.get('api/GetWorkStationDefault.ashx', function (data) {
|
|
|
+ var json = JSON.parse(data);
|
|
|
+ if (json["success"] == true) {
|
|
|
+ if (json["rows"].length > 0) {
|
|
|
+ console.log(json["rows"][0]["PCCODE"]);
|
|
|
+ $('#工位').setRadioVal(json["rows"][0]["ID"]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ });
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
//工位数据保存
|
|
|
function doWorkSave() {
|
|
|
|