|
|
@@ -38,6 +38,7 @@
|
|
|
<div class="form-row">
|
|
|
<div class="form-group col-4 mb-1">
|
|
|
<label for="生产工号">生产工号</label>
|
|
|
+ <label ID="提示" style="color: red; float: right; display: none;">请注意研发产品!</label>
|
|
|
<input readonly type="text" class="form-control border-secondary" id="生产工号" placeholder="请输入" required>
|
|
|
</div>
|
|
|
<div class="form-group col-4 mb-1" style="">
|
|
|
@@ -46,7 +47,7 @@
|
|
|
</div>
|
|
|
<div style="margin-left:-15%">
|
|
|
<div id="softkeyboard"></div>
|
|
|
- <label ID="金蝶代码" style="color: red; display: none;float:right;">注意产品釉料、商标是否正确!</label>
|
|
|
+ <label ID="金蝶代码" style="color: red; display: none;float:right;">注意产品釉料、商标是否正确!</label>
|
|
|
</div>
|
|
|
<div class="form-group col-4 align-self-end mb-1" style="margin-left:67%;margin-top:-10%">
|
|
|
<button onclick="loadProduct()" id="产品查询" type="button" class="btn btn-info btn-block">产品查询</button>
|
|
|
@@ -286,7 +287,7 @@
|
|
|
<script src="/Plugins/sweetalert/sweetalert.min.js"></script>
|
|
|
<script src="/Plugins/xrequest/xrequest.min.js"></script>
|
|
|
<script src="../Common/xuwell.js"></script>
|
|
|
- <script>
|
|
|
+ <script>
|
|
|
var cliclkcount = 0;
|
|
|
//xuwei 2020-04-21
|
|
|
//计件标记变量 1新建 2改判 3冷补后
|
|
|
@@ -749,6 +750,10 @@
|
|
|
});
|
|
|
//2020-07-02 重新加载生产工号 并验证登录状态
|
|
|
loadData();
|
|
|
+ //关闭左边提示请注意研发产品!
|
|
|
+ //var label = document.getElementById('提示');
|
|
|
+ //label.style.display = 'none';
|
|
|
+ $('#提示').css('display', 'none');
|
|
|
var barcode = document.getElementById("barcodeStaing");
|
|
|
//获取选中下拉框选项的索引
|
|
|
var index = barcode.selectedIndex;
|
|
|
@@ -768,14 +773,15 @@
|
|
|
procedureId = request('id');
|
|
|
//如果是重烧 把重烧ID 给 procedureId
|
|
|
if (json['success'] == true) procedureId = json['rows'];
|
|
|
-
|
|
|
+
|
|
|
//加载产品信息
|
|
|
$.get('api/GetCheckBarCode_WCF.ashx', { 'procedureid': procedureId, 'barcode': $('#产品条码').val() }, function (data) {
|
|
|
var json = JSON.parse(data);
|
|
|
+
|
|
|
if (json['success'] == true) {
|
|
|
//打印条码
|
|
|
if (printBarcode) $('#barcodeImg').attr('src', 'print/barcodeimg.ashx?barcode=' + $('#产品条码').val());
|
|
|
-
|
|
|
+
|
|
|
if (json['rows'][0]['out_errMsg'] == '') {
|
|
|
//读取产品信息
|
|
|
$('#产品商标').val('商标:' + json['rows'][0]["out_logoName"]);
|
|
|
@@ -784,76 +790,81 @@
|
|
|
$('#产品名称').val('名称:' + json['rows'][0]["out_goodsName"]);
|
|
|
$('#重烧').val('重烧:' + json['rows'][0]["out_isReFire"]);
|
|
|
$('#干补').val('干补:' + json['rows'][0]["out_specialRepairFlag"]);
|
|
|
- swal.close();
|
|
|
+ swal.close();
|
|
|
+ let str = json['rows'][0]["out_goodsCode"] != null ? json['rows'][0]["out_goodsCode"]:"";
|
|
|
+ let str2 = json['rows'][0]["out_mouldCode"] != null ? json['rows'][0]["out_mouldCode"] : "";
|
|
|
+ if (str.includes('中试') && str2.includes('YF')) {
|
|
|
+ //label.style.display = 'none';
|
|
|
+ $('#提示').css('display', 'block');
|
|
|
+ }
|
|
|
+ //加载完成工序 判断 是 新建 还是 编辑
|
|
|
+ $.get('api/GetCompleteProcedureIDPDA_WCF.ashx', { 'barcode': $('#产品条码').val() }, function (data) {
|
|
|
+ var json = JSON.parse(data);
|
|
|
+ if (json["success"] == true) {
|
|
|
+ if (mybarcode == "---请选择---") {
|
|
|
+ completeProcedure = json["rows"];
|
|
|
+ if (procedureId == completeProcedure[0]["COMPLETEPROCEDUREID"]) {
|
|
|
+ checkFlag = "2";
|
|
|
+ action = "update";
|
|
|
+ loadUpdateData(0);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ //2020-03-23 修正 回收后 再次成检 改判操作 找到正确的成检ID
|
|
|
+ $.get('api/GetProductionDataCheckID_WCF.ashx', { 'barcode': $('#产品条码').val() }, function (data) {
|
|
|
|
|
|
+ if (data == '{"success":true,"message":"操作成功!","rows":}') {
|
|
|
+ data = '{"success":true,"message":"操作成功!","rows":[]}';
|
|
|
+ }
|
|
|
+ var json = JSON.parse(data);
|
|
|
+ if (json["success"] == true) {
|
|
|
|
|
|
- //加载完成工序 判断 是 新建 还是 编辑
|
|
|
- $.get('api/GetCompleteProcedureIDPDA_WCF.ashx', { 'barcode': $('#产品条码').val() }, function (data) {
|
|
|
- var json = JSON.parse(data);
|
|
|
- if (json["success"] == true) {
|
|
|
- if (mybarcode == "---请选择---") {
|
|
|
- completeProcedure = json["rows"];
|
|
|
- if (procedureId == completeProcedure[0]["COMPLETEPROCEDUREID"]) {
|
|
|
- checkFlag = "2";
|
|
|
- action = "update";
|
|
|
- loadUpdateData(0);
|
|
|
- }
|
|
|
- else {
|
|
|
- //2020-03-23 修正 回收后 再次成检 改判操作 找到正确的成检ID
|
|
|
- $.get('api/GetProductionDataCheckID_WCF.ashx', { 'barcode': $('#产品条码').val() }, function (data) {
|
|
|
-
|
|
|
- if (data == '{"success":true,"message":"操作成功!","rows":}') {
|
|
|
- data = '{"success":true,"message":"操作成功!","rows":[]}';
|
|
|
- }
|
|
|
-
|
|
|
- var json = JSON.parse(data);
|
|
|
- if (json["success"] == true) {
|
|
|
-
|
|
|
- //2020-04-23 xuwei 修正
|
|
|
- if (json["rows"].length == 0) {
|
|
|
- //为空行时是新建
|
|
|
- checkFlag = "1";
|
|
|
- action = "insert";
|
|
|
- loadInsertData();
|
|
|
- }
|
|
|
- else {
|
|
|
- if (json["rows"][0]["PROCEDUREID"] == procedureId) {
|
|
|
- //工序相等时是更新
|
|
|
- checkFlag = "3";
|
|
|
- action = "update";
|
|
|
- loadUpdateData(json["rows"][0]["PRODUCTIONDATAID"]);
|
|
|
+ //2020-04-23 xuwei 修正
|
|
|
+ if (json["rows"].length == 0) {
|
|
|
+ //为空行时是新建
|
|
|
+ checkFlag = "1";
|
|
|
+ action = "insert";
|
|
|
+ loadInsertData();
|
|
|
}
|
|
|
else {
|
|
|
- //工序不等时不可到达
|
|
|
- resetGoodsGrade(false);
|
|
|
- swal({
|
|
|
- title: "产品查询",
|
|
|
- text: "该工序不可到达!请确认质量登记工序!",
|
|
|
- icon: "error",
|
|
|
- button: "确定"
|
|
|
- }).then(function () {
|
|
|
- $('#产品条码').val('');
|
|
|
- $('#产品条码').focus();
|
|
|
- });
|
|
|
+ if (json["rows"][0]["PROCEDUREID"] == procedureId) {
|
|
|
+ //工序相等时是更新
|
|
|
+ checkFlag = "3";
|
|
|
+ action = "update";
|
|
|
+ loadUpdateData(json["rows"][0]["PRODUCTIONDATAID"]);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ //工序不等时不可到达
|
|
|
+ resetGoodsGrade(false);
|
|
|
+ swal({
|
|
|
+ title: "产品查询",
|
|
|
+ text: "该工序不可到达!请确认质量登记工序!",
|
|
|
+ icon: "error",
|
|
|
+ button: "确定"
|
|
|
+ }).then(function () {
|
|
|
+ $('#产品条码').val('');
|
|
|
+ $('#产品条码').focus();
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
+ //if (json["rows"][0]["PRODUCTIONDATAID"] != 0) {
|
|
|
+ // checkFlag = "3";
|
|
|
+ // action = "update";
|
|
|
+ // loadUpdateData(json["rows"][0]["PRODUCTIONDATAID"]);
|
|
|
+ //}
|
|
|
+ //else {
|
|
|
+ // checkFlag = "1";
|
|
|
+ // action = "insert";
|
|
|
+ // loadInsertData();
|
|
|
+ //}
|
|
|
}
|
|
|
- //if (json["rows"][0]["PRODUCTIONDATAID"] != 0) {
|
|
|
- // checkFlag = "3";
|
|
|
- // action = "update";
|
|
|
- // loadUpdateData(json["rows"][0]["PRODUCTIONDATAID"]);
|
|
|
- //}
|
|
|
- //else {
|
|
|
- // checkFlag = "1";
|
|
|
- // action = "insert";
|
|
|
- // loadInsertData();
|
|
|
- //}
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
else {
|
|
|
resetGoodsGrade(false);
|
|
|
swal({
|
|
|
@@ -880,25 +891,26 @@
|
|
|
}
|
|
|
if (mybarcode != document.getElementById("产品条码").value) {
|
|
|
//产品缺陷列表清空
|
|
|
- ClearProductDefectList();
|
|
|
+ ClearProductDefectList();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
- });
|
|
|
+ });
|
|
|
+
|
|
|
//查询金蝶代码
|
|
|
var barcode = document.getElementById("产品条码").value;
|
|
|
$.post('api/GetKingdeeCode.ashx', { 'BarCode': barcode }, function (data) {
|
|
|
var json = JSON.parse(data);
|
|
|
if (json['success'] == true && json['rows'] == "1") {
|
|
|
- $('#金蝶代码').css('display', 'none');
|
|
|
+ $('#金蝶代码').css('display', 'none');
|
|
|
}
|
|
|
else {
|
|
|
$('#金蝶代码').css('display', 'block');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
+
|
|
|
//加载插入数据
|
|
|
function loadInsertData() {
|
|
|
|