From cfc5e6fa347eadeddd94a2a2e0d8dafccb4e452b Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期二, 20 七月 2021 23:28:47 +0800
Subject: [PATCH] 1
---
WebTM/views/车间管理/工序进站接收单/Cj_StationInBill.html | 589 ++++++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 468 insertions(+), 121 deletions(-)
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html"
index 6480589..8dd55c1 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html"
@@ -55,7 +55,7 @@
<div class="layui-row">
<label class="layui-form-label" style="width: 85px;"><span style="color:red;">*</span>鏉″舰鐮�</label>
<div class="layui-input-block" style="margin-left: 120px;width:46%;">
- <input type="text" name="" id="" lay-verify="required" placeholder="璇烽敭鍏ュ悗鍥炶溅" autocomplete="off" class="layui-input">
+ <input type="text" name="HBarCode" id="HBarCode" lay-verify="required" placeholder="璇烽敭鍏ュ悗鍥炶溅" autocomplete="off" class="layui-input">
</div>
</div>
</div>
@@ -65,20 +65,20 @@
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">娴佽浆鍗�</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;" readonly>
+ <input type="text" class="layui-input" name="HProcExchBillNo" id="HProcExchBillNo" style="background-color:#efefef4d;" readonly>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">鍗曟嵁鍙�</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;" readonly>
- <input type="hidden" name="" id="">
+ <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" name="HInterID" id="HInterID">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">娴佹按鍙�</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="" id="">
+ <input type="text" class="layui-input" name="HProcNo" id="HProcNo">
</div>
</div>
</div>
@@ -86,19 +86,23 @@
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">娴佽浆鍗℃暟閲�</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;" readonly>
+ <input type="text" class="layui-input" name="HPlanQty" id="HPlanQty" style="background-color:#efefef4d;" readonly>
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">褰撳墠宸ュ簭</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;" readonly>
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">褰撳墠宸ュ簭</label>
+ <div class="layui-input-block" style="margin-left: 77px;">
+ <input type="text" class="layui-input" name="HProcName" id="HProcName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <input type="hidden" name="HProcID" id="HProcID" value="0">
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchProc" id="btnSearchProc" style="padding: 0 10px;float: left;margin-right: 3px;background-color:gainsboro;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i>
+ </button>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">瑙勬牸鍨嬪彿</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="" id="">
+ <input type="text" class="layui-input" name="HMaterModel" id="HMaterModel" style="background-color:#efefef4d;" readonly>
</div>
</div>
</div>
@@ -106,27 +110,23 @@
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;padding: 9px 18px;">宸ヤ綔涓績</label>
<div class="layui-input-block" style="margin-left: 77px;">
- <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;width: 61%;display: inline-block;" readonly>
- <input type="hidden" name="" id="" value="0">
+ <input type="text" class="layui-input" name="HCenterName" id="HCenterName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchProc" id="btnSearchProc" style="padding: 0 10px;float: left;margin-right: 3px;background-color:gainsboro;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i>
</button>
+ <input type="hidden" name="HCenterID" id="HCenterID" value="0">
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鎺ユ敹鏁伴噺</label>
- <div class="layui-input-block" style="margin-left: 77px;">
- <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;width: 61%;display: inline-block;" readonly>
- <input type="hidden" name="" id="">
- <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchSup" id="btnSearchSup" style="padding: 0 10px;float: left;margin-right: 3px;background-color:gainsboro;">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i>
- </button>
+ <label class="layui-form-label" style="width: 85px;">鎺ユ敹鏁伴噺</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HQty" id="HQty" value="0">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;padding: 9px 18px;">浜у搧浠g爜</label>
<div class="layui-input-block" style="margin-left: 77px;">
- <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;width: 61%;display: inline-block;" readonly>
+ <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchMater" id="btnSearchMater" style="padding: 0 10px;float: left;margin-right: 3px;background-color:gainsboro;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="color:black;"></i>
</button>
@@ -136,22 +136,25 @@
<div class="layui-row">
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鎺ユ敹浜�</label>
- <div class="layui-input-block" style="margin-left: 104px;">
- <input type="text" class="layui-input" name="" id="" value="16" style="background-color:#efefef4d;width: 80%;display: inline-block;" readonly>
- <span>%</span>
+ <div class="layui-input-block" style="margin-left: 77px;">
+ <input type="text" class="layui-input" name="HEmpName" id="HEmpName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="HEmployeeID-BT" id="HEmployeeID-BT" style="padding: 0 10px;float: left;margin-right: 3px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
+ <input type="hidden" value="0" name="HEmpID" id="HEmpID">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">浜у搧鍚嶇О</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="" id="" style="background-color:#efefef4d;" readonly>
- <input type="hidden" name="" id="">
+ <input type="text" class="layui-input" name="HMaterName" id="HMaterName" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" name="HMaterID" id="HMaterID">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">璁㈠崟璺熻釜鍙�</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="" id="">
+ <input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO" style="background-color:#efefef4d;" readonly>
</div>
</div>
</div>
@@ -159,19 +162,24 @@
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">杩涚珯鏃堕棿</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="" id="" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly>
+ <input type="text" class="layui-input" name="HStationInTime" id="HStationInTime" style="background-color:#efefef4d;" readonly>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">浠诲姟鍗�</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="" id="" value="0">
+ <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" name="HICMOInterID" id="HICMOInterID">
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">鐢熶骇鐝粍</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="" id="">
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐢熶骇鐝粍</label>
+ <div class="layui-input-block" style="margin-left: 77px;">
+ <input type="text" class="layui-input" name="HGroupName" id="HGroupName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="ProductionTeam-BT" id="ProductionTeam-BT" style="padding: 0 10px;float: left;margin-right: 3px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
+ <input type="hidden" value="0" name="HGroupID" id="HGroupID">
</div>
</div>
</div>
@@ -179,13 +187,17 @@
<div class="layui-inline">
<label class="layui-form-label" style="width: 85px;">浠诲姟鍗曟暟閲�</label>
<div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="" id="" onmouseover="this.title=this.value" style="background-color:#efefef4d;" readonly>
+ <input type="text" class="layui-input" name="HICMOQty" id="HICMOQty" style="background-color:#efefef4d;" readonly>
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">鐢熶骇璧勬簮</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="" id="">
+ <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">鐢熶骇璧勬簮</label>
+ <div class="layui-input-block" style="margin-left: 77px;">
+ <input type="text" class="layui-input" name="HSourceName" id="HSourceName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="ProductionResources-BT" id="ProductionResources-BT" style="padding: 0 10px;float: left;margin-right: 3px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
+ <input type="hidden" value="0" name="HSourceID" id="HSourceID">
</div>
</div>
</div>
@@ -198,14 +210,47 @@
</div>
</div>
</div>
+ <div class="title">鍏朵粬淇℃伅</div>
+ <div class="layui-form-item" style="padding-top: 10px;">
+ <div class="layui-row">
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鎺ユ敹浠舵暟</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HPieceQty" id="HPieceQty" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="title">闄勪欢淇℃伅</div>
+ <div class="layui-form-item" style="padding-top: 10px;">
+ <div class="layui-upload">
+ <button type="button" class="layui-btn" id="testList">閫夋嫨鏂囦欢</button><input class="layui-upload-file" type="file" accept="" name="file" multiple="">
+ <div class="layui-upload-list">
+ <table class="layui-table">
+ <thead>
+ <tr>
+ <th>鏂囦欢鍚�</th>
+ <th>澶у皬</th>
+ <th>鐘舵��</th>
+ <th>鎿嶄綔</th>
+ </tr>
+ </thead>
+ <tbody id="ProImgByList">
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
<div class="layer-footer" style="text-align: center;">
<button type="button" lay-submit="" class="buttom_box_little" lay-filter="Saver">鎻愪氦</button>
<button type="button" class="buttom_box_little" lay-filter="Cancel" id="Cancel">閫�鍑�</button>
</div>
<!--闅愯棌瀛楁-->
- <input type="hidden" name="lngBillKey" id="lngBillKey">
- <input type="hidden" name="lngBillSubKey" id="lngBillSubKey">
+ <input type="hidden" name="lngICMOEntryID" id="lngICMOEntryID">
+ <input type="hidden" name="lngBillKey" id="lngBillKey" value="0">
+ <input type="hidden" name="lngBillSubKey" id="lngBillSubKey" value="0">
<input type="hidden" name="HMaker" id="HMaker"><!--鍒跺崟浜�-->
+ <input type="hidden" name="eventType" id="eventType" value="Add">
</form>
</div>
</div>
@@ -216,33 +261,210 @@
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index' //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+ }).use(['index', 'form', 'laydate', 'table', 'element', 'upload'], function () {
var $ = layui.$
, admin = layui.admin
, layer = layui.layer
, table = layui.table
, form = layui.form
+ , upload = layui.upload
, element = layui.element;
//杩涘叆椤甸潰榛樿鍏夋爣鍦ㄦ潯褰㈢爜涓�
$("#HBarCode").focus();
+ /*鍥哄畾浠g爜锛屾瘡寮犲崟鎹兘瑕乥egin*/
+ /* 1.鏃犳簮鍗曟柊澧�
+ * 2.鏈夋簮鍗曟柊澧�
+ * 3.缂栬緫
+ * 4.娴忚
+ * 5.鍙樻洿
+ */
+ //鑾峰彇鍙傛暟
+ function getUrlVars() {
+ var vars = [], hash;
+ var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+ for (var i = 0; i < hashes.length; i++) {
+ hash = hashes[i].split('=');
+ vars.push(hash[0]);
+ vars[hash[0]] = hash[1];
+ }
+ return vars;
+ }
+ var params = getUrlVars();
+ if (typeof (params[params[0]]) == "undefined") {
+ var OperationType = 1;//鎿嶄綔绫诲瀷
+ } else {
+ var OperationType = params[params[0]];//鎿嶄綔绫诲瀷
+ var linterid = params[params[1]];//婧愬崟id
+ var HBillNo = params[params[2]]; //鑾峰彇鍗曟嵁鍙�
+ }
+ /*鍥哄畾浠g爜锛屾瘡寮犲崟鎹兘瑕乥egin*/
+ //鍒ゆ柇鏄惁鏂板
+ if (OperationType == 1) {
+ $("#HInterID").val("");
+ $("#HBillNo").val("");
+ //鑾峰彇鏈�澶у崟鎹彿
+ $.ajax({
+ url: GetWEBURL() + "/Web/GetMAXNum",
+ type: "GET",
+ data: { "HBillType": '3790' },
+ success: function (d) {
+ //console.log(d.data);
+ $("#HInterID").val(d.data[0].HInterID);
+ $("#HBillNo").val(d.data[0].HBillNo);
+ PicUpload();
+ }
+ });
+ }
+ else if(OperationType == 3){
+ $("#eventType").val("Modify");
+ RoadBillMain(linterid);
+ //RoadBillSub(linterid);
+ }
+
+ function RoadBillMain(linterid)//鍔犺浇琛ㄥご
+ {
+ var index = layer.load();
+ $.ajax({
+ url: GetWEBURL() + "/Cj_StationInBill/GetStationInBill",
+ type: "GET",
+ data: { "HInterID": linterid },
+ success: function (result) {
+ var data = result.data[0];
+ txtHBarCode_KeyDown(data.HBarCode);
+ txtHProcNo_KeyDown(data.HBarCode, data.HProcNo);
+ form.val("formData", { //HGroupName
+ "HInterID": data.HInterID,
+ "HBillNo": data.HBillNo,
+ "HBarCode": data.HBarCode,
+ "HProcNo": data.HProcNo,
+ "HQty": data.HQty,
+ "HGroupID": data.HGroupID,
+ "HGroupName": data.HGroupName,
+ "HSourceID": data.HSourceID,
+ "HSourceName": data.HSourceName,
+ "HEmpID": data.HEmpID,
+ "HEmpName": data.HEmpName,
+ "HRemark": data.HRemark
+ });
+ PicUpload();
+ layer.close(index);
+ }
+ , error: function () {
+ layer.close(index);
+ layer.msg("鎺ュ彛璇锋眰澶辫触");
+ }
+ })
+ }
+
+ //鏂囦欢涓婁紶
+ function PicUpload() {
+ //澶氬浘鐗囦笂浼�
+ //澶氭枃浠跺垪琛ㄧず渚�
+ var ProImgByList = $('#ProImgByList')
+ , uploadListIns = upload.render({
+ elem: '#testList'
+ , url: GetWEBURL() + "/Cj_StationOutBill/UploadFile1"
+ , accept: 'file'
+ , multiple: true
+ , auto: false
+ //, bindAction: '#testListAction' //鎸夋壄缁戝畾
+ , data: { "HBillNo": $("#HBillNo").val(), "HRemark": $("#HRemark").val(), "HUserName": sessionStorage["HUserName"] }
+ , choose: function (obj) {
+ var files = this.files = obj.pushFile(); //灏嗘瘡娆¢�夋嫨鐨勬枃浠惰拷鍔犲埌鏂囦欢闃熷垪
+ //璇诲彇鏈湴鏂囦欢
+ obj.preview(function (index, file, result) {
+ var tr = $(['<tr id="upload-' + index + '">'
+ , '<td>' + file.name + '</td>'
+ , '<td>' + (file.size / 1014).toFixed(1) + 'kb</td>'
+ , '<td>绛夊緟涓婁紶</td>'
+ , '<td>'
+ , '<button class="layui-btn layui-btn-xs demo-reload ">涓婁紶</button>'
+ , '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">鍒犻櫎</button>'
+ , '</td>'
+ , '</tr>'].join(''));
+
+ //鍗曚釜閲嶄紶
+ tr.find('.demo-reload').on('click', function () {
+ obj.upload(index, file);
+ return false;
+ });
+
+ //鍒犻櫎
+ tr.find('.demo-delete').on('click', function () {
+ delete files[index]; //鍒犻櫎瀵瑰簲鐨勬枃浠�
+ tr.remove();
+ uploadListIns.config.elem.next()[0].value = ''; //娓呯┖ input file 鍊硷紝浠ュ厤鍒犻櫎鍚庡嚭鐜板悓鍚嶆枃浠朵笉鍙��
+ });
+
+ ProImgByList.append(tr);
+ });
+ }
+ , done: function (res, index, upload) {
+ if (res.code == 1) { //涓婁紶鎴愬姛
+ var tr = ProImgByList.find('tr#upload-' + index)
+ , tds = tr.children();
+ tds.eq(2).html('<span style="color: #5FB878;">涓婁紶鎴愬姛</span>');
+ tds.eq(3).html(''); //娓呯┖鎿嶄綔
+ //tds.eq(3).find('.demo-reload').addClass('layui-hide'); //闅愯棌涓婁紶
+ return delete this.files[index]; //鍒犻櫎鏂囦欢闃熷垪宸茬粡涓婁紶鎴愬姛鐨勬枃浠�
+ }
+ this.error(index, upload);
+ }
+ , error: function (index, upload) {
+ var tr = ProImgByList.find('tr#upload-' + index)
+ , tds = tr.children();
+ tds.eq(2).html('<span style="color: #FF5722;">涓婁紶澶辫触[妫�鏌ユ枃浠跺悕鍙婃枃浠舵牸寮廬</span>');
+ tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //鏄剧ず涓婁紶
+ }
+ });
+ }
+
+ //鑾峰彇缂栬緫鏃�,宸蹭笂浼犵殑鏂囦欢鍒楄〃
+ if (HBillNo != null || HBillNo != undefined) {
+ var ProImgByList = $('#ProImgByList')
+ $.ajax({
+ url: GetWEBURL() + '/Cj_StationOutBill/Filelist',
+ type: "GET",
+ data: { "HBillNo": HBillNo },
+ success: function (data1) {
+ if (data1.count == 1) {
+ var index = 0;
+ for (var i = 0; i < data1.data.length; i++) {
+ var tr = $(['<tr id="upload-' + i + '">'
+ , '<td style="display:none">' + data1.data[i].HItemID + '</td>'
+ , '<td style="display:none">' + data1.data[i].HSourceBillNo + '</td>'
+ , '<td>' + data1.data[i].HFileName + '</td>'
+ , '<td>' + (data1.data[i].HFileSize / 1014).toFixed(1) + 'kb</td>'
+ , '<td style="color: #5FB878;">涓婁紶鎴愬姛</td>'
+ , '<td style="display:none">' + data1.data[i].url + '</td>'
+ , '<td>'
+ , '<button class="layui-btn layui-btn-xs demo-dowload" type="button" id="deltefile" onclick="javascript:dowload(this)"><i class="layui-icon layui-icon-download-circle layuiadmin-button-btn"></i>涓嬭浇</button>'
+ , '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete" type="button" id="deltefile" onclick="javascript:toManager(this)"><i class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>鍒犻櫎</button>'
+ , '</td>'
+ , '</tr>'].join(''));
+
+ $('#ProImgByList').append(tr);
+ }
+ } else {
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+
+ }
+
+ //娴佽浆鍗℃槸鍚︽壂鎻忔爣璁�
+ var HProcExchBillNoFlag = false;
//鍒濆鍩烘湰淇℃伅璧嬪��
- $("#HStationOutTime").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));
- $("#HEmpID").val(sessionStorage["Czybm"]);
- $("#HEmp").val(sessionStorage["HUserName"]);
+ $("#HStationInTime").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));
+ //$("#HEmpID").val(sessionStorage["Czybm"]);
+ //$("#HEmp").val(sessionStorage["HUserName"]);
$("#HMaker").val(sessionStorage["HUserName"]);
- //鑾峰彇鏈�澶у崟鎹彿
- $.ajax({
- url: GetWEBURL() + "/Web/GetMAXNum",
- type: "GET",
- data: { "HBillType": '3791' },
- success: function (d) {
- //console.log(d.data);
- $("#HInterID").val(d.data[0].HInterID);
- $("#HBillNo").val(d.data[0].HBillNo);
- }
- });
+
//鏉″舰鐮佸洖杞︽柟娉�
$('#HBarCode').on('keydown', function (event) {
@@ -252,57 +474,95 @@
layer.msg("鏉″舰鐮佷笉鑳戒负绌猴紒")
return;
}
- var index = layer.load();
- $.ajax({
- url: GetWEBURL() + "/Cj_StationEntrustInBill/txtHBarCode_KeyDown",
- type: "GET",
- data: { "HBarCode": HBarCode },
- success: function (result) {
- if (result.count == 1) {
- var data = result.data[0];
- form.val("formData", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
- "HICMOBillNo": data.浠诲姟鍗曞彿,
- "HICMOInterID": data.hicmointerid,
- "HMaterID": data.HMaterID,
- "HMaterName": data.浜у搧,
- "HMaterNumber": data.浜у搧浠g爜,
- "HMaterModel": data.瑙勬牸鍨嬪彿,
- "HQty": 0,
- "HPieceQty": data.鐢熶骇鏁伴噺,
- "HPlanQty": data.鐢熶骇鏁伴噺,
- "lngBillSubKey": data.HSubID,
- "lngBillKey": data.HMainID,
- "HProcExchBillNo": data.鍗曟嵁鍙�,
- "HICMOQty": data.浠诲姟鍗曟暟閲�,
- "HOrderProcNO": data.璁㈠崟璺熻釜鍙�,
- "HStationInTime": Format(new Date(), "yyyy-MM-dd hh:mm:ss"),
- "HMoney": 0,
- //"HProcID": data.HProcID,
- //"HProcNo": data.宸ュ簭鍙�,
- //"HProcName": data.宸ュ簭,
- "HSupID": data.HSupID,
- "HSup": data.渚涘簲鍟�,
- "HSourceID": data.HSourceID,
- "HSource": data.鐢熶骇璧勬簮,
- "HGroupID": data.HGroupID,
- "HGroup": data.鐝粍,
- "HDeptID": sessionStorage["HDeptID"],
- "HDept": sessionStorage["HDept"]
- });
- layer.close(index);
- }
- else {
- layer.close(index);
- layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- }
- },
- error: function (err) {
- layer.close(index);
- layer.msg("鎺ュ彛璇锋眰澶辫触锛�" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- }
- });
+ txtHBarCode_KeyDown(HBarCode);
}
});
+
+ function txtHBarCode_KeyDown(HBarCode) {
+ var index = layer.load();
+ $.ajax({
+ url: GetWEBURL() + "/Cj_StationEntrustInBill/txtHBarCode_KeyDown",
+ type: "GET",
+ data: { "HBarCode": HBarCode },
+ success: function (result) {
+ if (result.count == 1) {
+ var data = result.data[0];
+ form.val("formData", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+ "HICMOInterID": data.hicmointerid,
+ "lngICMOEntryID": data.lngICMOEntryID,
+ "HICMOBillNo": data.浠诲姟鍗曞彿,
+ "HMaterID": data.HMaterID,
+ "HMaterName": data.浜у搧,
+ "HMaterNumber": data.浜у搧浠g爜,
+ "HMaterModel": data.瑙勬牸鍨嬪彿,
+ "HPieceQty": data.娴佽浆鍗℃暟閲�,
+ "HPlanQty": data.娴佽浆鍗℃暟閲�,
+ "HProcExchBillNo": data.鍗曟嵁鍙�,
+ "HICMOQty": data.浠诲姟鍗曟暟閲�,
+ "lngBillKey": data.hmainid,
+ "HOrderProcNO": data.璁㈠崟璺熻釜鍙�
+ });
+ $("#HBarCode").attr("readonly", "readonly");//鏉″舰鐮佸彧璇�
+ $("#HBarCode").css("background-color", "#efefef4d");
+ HProcExchBillNoFlag = true;
+ layer.close(index);
+ }
+ else {
+ layer.close(index);
+ layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ },
+ error: function (err) {
+ layer.close(index);
+ layer.msg("鎺ュ彛璇锋眰澶辫触锛�" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ });
+ }
+
+ //娴佹按鍙凤紙宸ュ簭鍙凤級鍥炶溅鏂规硶
+ $('#HProcNo').on('keydown', function (event) {
+ var sProcNo = $('#HProcNo').val();
+ var sBillNo = $('#HBarCode').val();
+ if (event.keyCode == 13) {
+ if (!HProcExchBillNoFlag) {
+ layer.msg("娴佽浆鍗℃病鏈夋壂鎻忥紝鎴栬�呮病鏈夋寜鍥炶溅閿紝璇锋壂鎻忔祦杞崱鎴栬�呭湪娴佽浆鍗℃枃鏈涓寜鍥炶溅閿紒");
+ return;
+ }
+ txtHProcNo_KeyDown(sBillNo, sProcNo);
+ }
+ });
+
+ function txtHProcNo_KeyDown(sBillNo, sProcNo) {
+ var index = layer.load();
+ $.ajax({
+ url: GetWEBURL() + "/Cj_StationInBill/txtHProcNo_KeyDown",
+ type: "GET",
+ data: { "sBillNo": sBillNo, "sProcNo": sProcNo },
+ success: function (result) {
+ if (result.count == 1) {
+ var data = result.data[0];
+ form.val("formData", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+ "lngBillSubKey": data.hsubid,
+ "HProcName": data.宸ュ簭,
+ "HProcID": data.HProcID,
+ "HCenterName": data.宸ヤ綔涓績,
+ "HCenterID": data.HCenterID
+ });
+ $("#HProcNo").attr("readonly", "readonly");
+ $("#HProcNo").css("background-color", "#efefef4d");
+ layer.close(index);
+ }
+ else {
+ layer.close(index);
+ layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ },
+ error: function (err) {
+ layer.close(index);
+ layer.msg("鎺ュ彛璇锋眰澶辫触锛�" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ });
+ }
//閫�鍑�-鍏抽棴椤甸潰鏂规硶
$('#Cancel').on('click', function () {
@@ -314,11 +574,15 @@
//鎻愪氦
form.on('submit(Saver)', function (data) {//鎻愪氦
//var tableData = data.field;
+ if ($("#lngBillSubKey").val() == 0) {
+ layer.msg("娴佹按鍙锋病鏈夐�夋嫨锛佽杈撳叆娴佹按鍙峰悗鍥炶溅锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return;
+ }
var oMain = data.field;
var index = layer.load();
$.ajax({
type: "POST",
- url: GetWEBURL() + "/Cj_StationEntrustOutBill/AddBill",
+ url: GetWEBURL() + "/Cj_StationInBill/AddBill",
//url:"http://localhost:12761/Cj_StationEntrustOutBill/AddBill",
async: true,
data: { "oMain": oMain },
@@ -348,21 +612,51 @@
});
});
- //閫夋嫨宸ュ簭
- form.on('submit(btnSearchProc)', function () {
- layer.msg('绂佹閫夋嫨');
- //layer.open({
- // type: 2
- // , area: ['100%', '100%']
- // , title: '浠撳簱鍒楄〃'
- // , shade: 0.6 //閬僵閫忔槑搴�
- // , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
- // , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- // , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_ProcList.html?Type=HWHID']
- // , resize: false
- // , cancel: function () {
- // }
- //})
+ //閫夋嫨鐢熶骇鐝粍寮圭獥
+ form.on('submit(ProductionTeam-BT)', function () {//閫夋嫨鐢熶骇鐝粍
+ layer.open({
+ type: 2
+ , area: ['80%', '80%']
+ , title: '鏈珯宸ュ簭'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../Baseset/鍩虹璧勬枡/Gy_GetProductionTeamList.html', 'yes']
+ , resize: false
+ , cancel: function (index, layero) {
+ }
+ })
+ });
+
+ //閫夋嫨鐢熶骇璧勬簮寮圭獥
+ form.on('submit(ProductionResources-BT)', function () {//鐢熶骇璧勬簮
+ layer.open({
+ type: 2
+ , area: ['80%', '80%']
+ , title: '鐢熶骇璧勬簮'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ //, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../Baseset/鍩虹璧勬枡/Gy_GetProductionResourcesList.html', 'yes']
+ , resize: false
+ , cancel: function (index, layero) {
+ }
+ })
+ });
+ //閫夋嫨鎺ユ敹浜�
+ form.on('submit(HEmployeeID-BT)', function () {
+ layer.open({
+ type: 2
+ , area: ['80%', '80%']
+ , title: '鑱屽憳鍒楄〃'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HWorker', 'yes']
+ , resize: false
+ , cancel: function (index, layero) {
+ }
+ })
});
//閫夋嫨渚涘簲鍟�
@@ -378,10 +672,63 @@
//浠ヤ笂涓簂ayui妯″潡
});
- //杩斿洖宸ュ簭
- function GetHProcValue(obj) {
- $("#HProcName").val(obj[0].HName);
- $("#HProcID").val(obj[0].HItemID);
+ //鍒犻櫎鏂囦欢
+ function toManager(r) {
+ //寰楀埌褰撳墠鎵�鍦ㄨ
+ var rows = r.parentNode.parentNode.rowIndex;
+ //寰楀埌鎵�鍦ㄨ鐨勭涓�鍒楃殑鍐呭:涓婚敭ID
+ var HItemID = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(0)").html();
+ //寰楀埌鎵�鍦ㄨ鐨勭浜屽垪鐨勫唴瀹�:鍗曟嵁鍙�
+ var HSourceBillNo = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(1)").html();
+ //寰楀埌鎵�鍦ㄨ鐨勭涓夊垪鐨勫唴瀹�:鏂囦欢鍚嶇О
+ var HFileName = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(2)").html();
+ layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+
+ //鍒犻櫎宸蹭笂浼犳枃浠�
+ $.ajax({
+ url: GetWEBURL() + '/Cj_StationOutBill/DeleteFilelist',
+ type: "GET",
+ data: { "HItemID": HItemID, "HSourceBillNo": HSourceBillNo, "HFileName": HFileName },
+ success: function (data1) {
+ if (data1.count == 1) {
+ layer.alert(data1.Message, { icon: 1 });
+ $("#ProImgByList tr").eq((rows - 1)).remove();
+ }
+ else {
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ })
+ }
+
+ //涓嬭浇鏂囦欢
+ function dowload(r) {
+ //寰楀埌褰撳墠鎵�鍦ㄨ
+ var rows = r.parentNode.parentNode.rowIndex;
+ //寰楀埌鎵�鍦ㄨ鐨勭浜斿垪鐨勫唴瀹�:鏂囦欢鍦板潃
+ var url = $("#ProImgByList tr:eq(" + (rows - 1) + ") td:eq(5)").html();
+ /*window.location.href = url;*/
+ window.open(url)
+ }
+
+ //杩斿洖鐢熶骇鐝粍
+ function GetProductionTeamValue(obj) {
+ $("#HGroupName").val(obj[0].鐝粍);
+ $("#HGroupID").val(obj[0].HItemID);
+ }
+
+ //杩斿洖鐢熶骇璧勬簮
+ function GetProductionResourcesValue(obj) {
+ $("#HSourceName").val(obj[0].鐢熶骇璧勬簮);
+ $("#HSourceID").val(obj[0].HItemID);
+ }
+ //杩斿洖鎿嶄綔鍛�
+ function GetHWorkerValue(obj) {
+ $("#HEmpName").val(obj[0].HName);
+ $("#HEmpID").val(obj[0].HItemID);
}
</script>
--
Gitblit v1.9.1