From 408b576b8aa155c9f7c8b919be3cd82be52a1da8 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期二, 25 十一月 2025 08:52:44 +0800
Subject: [PATCH] 1.标准代码更新(2025-11-25)
---
H5/Js/IPQC_XJ/Add.js | 132 ++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 126 insertions(+), 6 deletions(-)
diff --git a/H5/Js/IPQC_XJ/Add.js b/H5/Js/IPQC_XJ/Add.js
index 5351162..6bc3747 100644
--- a/H5/Js/IPQC_XJ/Add.js
+++ b/H5/Js/IPQC_XJ/Add.js
@@ -1,4 +1,4 @@
-锘縱ar vm = new Vue({
+var vm = new Vue({
el: '#app',
data: function () {
return {
@@ -24,6 +24,7 @@
mocode: "",
boardStyle: ""
},
+ jyGw:"",//妫�楠屽伐浣�
isShowTable: false,
tableData: [],//杩斿洖鐨勬楠岄」鐩�
jymxData: [],//灞曠ず鐨勬楠岄」鐩�
@@ -40,6 +41,8 @@
okValue: '',//OK-鏁伴噺
ngValue: '',//NG-鏁伴噺
showDialog: false,//涓嶈壇琛ㄨ堪杈撳叆妗�
+ checkItemDesc: '',//妫�楠岄」鐩弿杩�
+ showCheckItemDescDialog: false,//妫�楠岄」鐩弿杩拌緭鍏ユ
selectKey: "",//鏌ヨ鍏抽敭瀛�
actions: [],//鍒楄〃鐨勫��
daashow: false,//宸ュ崟鍒楄〃灞曠ず
@@ -51,7 +54,24 @@
}
},
mounted() {
- var that = this;
+ let that = this;
+ //璇诲彇鎵爜beg 2025-7-25
+ window.msgFromUniapp = function (arg) {
+ //alert(arg.txtName);
+ //alert("鎵爜鐨勭粨鏋�:" + arg.msg);
+ //alert("宸ヤ綅鐮�:" + that.jyGw);
+ if (arg.txtName === "GW") {
+ that.jyGw = arg.msg;
+ that.selIpqcItemsByGw();
+ }
+ else if (arg.txtName === "DAA") {
+ that.formData.lotNo = arg.msg;
+ that.createByWomdaa();
+ }
+
+
+ }
+ //璇诲彇鎵爜end
this.userInfo = {
loginGuid: this.GetLoginInfor().loginGuid,
loginAccount: this.GetLoginInfor().loginAccount,
@@ -59,7 +79,16 @@
this.formData.id = this.Request("id"),
this.formData.releaseNo = this.Request("releaseNo");
this.formData.lotNo = this.Request("lotNo");
+
+ ////璇诲彇鎵爜beg 2025-7-25
+ //let that = this;
+ //window.msgFromUniapp = function (arg) {
+ // alert("鎵爜鐨勭粨鏋�:" + arg.msg);
+ //}
+ ////璇诲彇鎵爜end
+
this.init();
+
},
methods: {
// 杈撳叆杩囨护
@@ -90,6 +119,11 @@
input = "NG-1";
this.addJyzIpqc(input);
}
+ },
+ handleQualifiedCancel() {
+ var input = "";
+ input = "/";
+ this.addJyzIpqc(input);
},
togglePopup(index) {
// 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
@@ -193,6 +227,7 @@
},
addJyzIpqc(input) {
+
var that = this;
var guid1 = that.formData.guid;//涓昏〃id
var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
@@ -203,8 +238,12 @@
inP1: input,//鎴栬��0k-19,鎴栬�卬g-19,鎴栧疄闄呮楠屽��
}, true, 1).then(function (res1) {
if (res1.rtnCode > 0) {
- that.$notify({
- type: 'success', message: res1.rtnMsg
+ //that.$notify({
+ // type: 'success', message: res1.rtnMsg
+ //});
+ that.$toast.success({
+ duration: 1000, // 鎸佺画灞曠ず toast
+ message: '鎿嶄綔鎴愬姛',
});
that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
//that.handleTabClick();//鍒锋柊妫�楠屾槑缁嗛潰鏉�
@@ -257,7 +296,7 @@
//妫�楠屾槑缁嗗埛鏂�
refreshJYItem() {
const that = this;
- return that.AxiosHttp("post", 'LLJ/getJYItem', {
+ return that.AxiosHttp("post", 'Ipqc/getJYItem', {
releaseNo: that.formData.releaseNo
}, false).then(res1 => {
const tableData = res1.data.tbBillList || [];
@@ -285,7 +324,7 @@
that.formData = data;
that.remarks = that.formData.fnGDesc;
that.lineId = data.lineId;
- that.AxiosHttp("post", 'LLJ/getJYItem', {
+ that.AxiosHttp("post", 'Ipqc/getJYItem', {
//id: that.formData.guid,
releaseNo: that.formData.releaseNo
}, false).then(function (res1) {
@@ -371,6 +410,30 @@
},
updateRemarks(guid) {
this.showDialog= true
+ },
+ updateCheckItemDesc(guid) {
+ this.showCheckItemDescDialog = true
+ },
+ checkItemDescConfirm() {
+ const that = this;
+ that.isLoading = true;
+ var guid = that.jymxData.guid;
+ that.AxiosHttp("post", 'Ipqc/updateCheckItemDesc', {
+ gid: guid,
+ CheckItemDesc: that.checkItemDesc
+ }, true, 0).then(res1 => {
+ if (res1.status == 0) {
+ that.$notify({ type: 'success', message: '杈撳叆鎴愬姛' });
+ that.showCheckItemDescDialog = false;
+ that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
+ } else {
+ that.$toast.fail(res1.rtnMsg);
+ }
+ that.isLoading = false;
+ }).catch(error => {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.isLoading = false;
+ });
},
deleteDetail13(guid12) {
const that = this;
@@ -534,5 +597,62 @@
that.init();//鍒锋柊妫�楠岄」鐩�
})
},
+ //妫�楠岄」鐩壂鎻忓伐浣嶅彲鍋氭楠�
+ selIpqcItemsByGw() {
+ //alert("寮�濮嬪伐浣�");
+ const that = this;
+ var guid1 = that.formData.guid;//涓昏〃id
+ return that.AxiosHttp("post", 'Ipqc/selIpqcItemsByGw', {
+ inOrderGuid1: guid1,
+ userAccount: that.userInfo.loginAccount,
+ gw: that.jyGw
+ }, false).then(res => {
+ var json = res;
+ if (json.status == 0) {
+ that.init();//鍒锋柊
+ }
+ else {
+ that.$toast.fail(json.message);
+ that.$playSound('error');
+ that.jyGw = "";
+ }
+ that.isLoading = false;
+
+
+ }).catch(error => {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ console.error('Refresh error:', error);
+ });
+ },
+
+ //鎵弿宸ヤ綅
+ scanOnH5GW() {
+ let sendData = {
+ Type: 'Scan',
+ txtName: 'GW',
+ Barcode: '',
+ Detail: '',
+ Ip: '',
+ Port: '',
+ }
+ uni.webView.postMessage({
+ data: JSON.stringify(sendData)
+ })
+ },
+
+ //鎵弿宸ュ崟
+ scanOnH5DAA() {
+ let sendData = {
+ Type: 'Scan',
+ txtName: 'DAA',
+ Barcode: '',
+ Detail: '',
+ Ip: '',
+ Port: '',
+ }
+ uni.webView.postMessage({
+ data: JSON.stringify(sendData)
+ })
+ },
}
})
\ No newline at end of file
--
Gitblit v1.9.3