| | |
| | | layer.alert("请选择工单列表", { icon: 5 }); |
| | | return false; |
| | | } |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "汇报")) { |
| | | if (WorkStaus(HSourceID1, workcode, HSourceInterID, "斯莫尔汇报")) { |
| | | layer.alert("单据状态不满足汇报条件!", { icon: 5 }); |
| | | return false; |
| | | } |
| | |
| | | function WorkStaus(HSourceID1, workcode, HSourceInterID, btn) { |
| | | var flag = false; |
| | | var sWhere = ""; |
| | | sWhere = { |
| | | HSourceID: HSourceID1 |
| | | , HICMOBillNo: workcode |
| | | , HInterID: HSourceInterID |
| | | , type: btn |
| | | } |
| | | //switch (btn) { |
| | | // case "开工": |
| | | // sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('0','2')"; //是否有不为开工开工状态、停工状态 |
| | | // break; |
| | | // case "完工": |
| | | // sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')"; //是否有不为开工、完工状态 |
| | | // break; |
| | | // case "停工": |
| | | // sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1')"; //是否有不为停工挂起状态 |
| | | // break; |
| | | // case "汇报": |
| | | // sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')"; //是否有不为开工、停工挂起状态 |
| | | // break; |
| | | // case "报检申请": |
| | | switch (btn) { |
| | | case "开工": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('0','2')"; //是否有不为开工开工状态、停工状态 |
| | | break; |
| | | case "完工": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')"; //是否有不为开工、完工状态 |
| | | break; |
| | | case "停工": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1')"; //是否有不为停工挂起状态 |
| | | break; |
| | | case "汇报": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')"; //是否有不为开工、停工挂起状态 |
| | | break; |
| | | case "斯莫尔汇报": |
| | | sWhere = " where HSourceID='" + HSourceID1 + "' and HSourceBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')"; //是否有不为开工、停工挂起状态 |
| | | break; |
| | | case "报检申请": |
| | | |
| | | // break; |
| | | // default: |