From 08a370a9e96e1e7772551b97c381be7d9fa61aa4 Mon Sep 17 00:00:00 2001
From: kyy <3283105747@qq.com>
Date: 星期五, 19 十二月 2025 17:53:57 +0800
Subject: [PATCH] 首检巡检检验方式更改
---
H5/IPQC_SJ/Add.aspx | 71 +
H5/Js/IPQC_SJ/Add.js | 1768 +++++++++++++++++++++++++++--------------------------
H5/IPQC_XJ/Add.aspx | 88 ++
H5/Js/IPQC_XJ/Add.js | 42 +
4 files changed, 1,070 insertions(+), 899 deletions(-)
diff --git a/H5/IPQC_SJ/Add.aspx b/H5/IPQC_SJ/Add.aspx
index 6603364..16022a9 100644
--- a/H5/IPQC_SJ/Add.aspx
+++ b/H5/IPQC_SJ/Add.aspx
@@ -30,6 +30,35 @@
font-size: 0.25rem;
border-radius: 4px;
}
+
+ /* 杈撳叆瀹瑰櫒鏍峰紡 */
+ .input-container {
+ flex: 1;
+ display: flex;
+ gap: 2px; /* 鎺у埗涓や釜杈撳叆缁勪箣闂寸殑闂磋窛 */
+ align-items: center;
+ background: #e3edf7;
+ }
+
+ .input-group {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ flex: 1; /* 浣夸袱涓緭鍏ョ粍鍧囧垎鍓╀綑绌洪棿 */
+ padding: 8px 12px;
+ }
+
+ .input-tag {
+ flex-shrink: 0;
+ }
+
+ .si-input-field {
+ flex: 1; /* 杈撳叆妗嗗崰鎹墿浣欑┖闂� */
+ width: 100%; /* 鎺у埗鏈�澶у搴� */
+ background: #f7f8fa;
+ border-radius: 4px;
+ }
+
.custom-label .van-cell__title {
@@ -515,23 +544,29 @@
<div class="si-input__left">
<span class="si-input__label">妫�楠屽�艰緭鍏�</span>
</div>
- <div class="si-status__right-btns"> <!-- 淇敼瀹瑰櫒绫诲悕 -->
- <van-button
- type="primary"
- size="small"
- class="status-btn"
- @click="handleQualified(true)"
- >
- 鍚堟牸
- </van-button>
- <van-button
- type="danger"
- size="small"
- class="status-btn"
- @click="handleQualified(false)"
- >
- 涓嶅悎鏍�
- </van-button>
+ <div class="input-container">
+ <div class="input-group">
+ <van-tag color="#4CAF50">OK</van-tag>
+ <van-field
+ v-model="okValue"
+ placeholder="璇疯緭鍏�"
+ :border="false"
+ class="si-input-field"
+ @input="handleNumberInput1"
+ @keyup.enter.native="getInputOK"
+ />
+ </div>
+ <div class="input-group">
+ <van-tag color="#F44336">NG</van-tag>
+ <van-field
+ v-model="ngValue"
+ placeholder="璇疯緭鍏�"
+ :border="false"
+ class="si-input-field"
+ @input="handleNumberInput2"
+ @keyup.enter.native="getInputNG"
+ />
+ </div>
</div>
</div>
</template>
@@ -721,3 +756,5 @@
+
+
diff --git a/H5/IPQC_XJ/Add.aspx b/H5/IPQC_XJ/Add.aspx
index 86cf8ec..c7306b2 100644
--- a/H5/IPQC_XJ/Add.aspx
+++ b/H5/IPQC_XJ/Add.aspx
@@ -30,6 +30,34 @@
font-size: 0.25rem;
border-radius: 4px;
}
+
+ /* 杈撳叆瀹瑰櫒鏍峰紡 */
+ .input-container {
+ flex: 1;
+ display: flex;
+ gap: 2px; /* 鎺у埗涓や釜杈撳叆缁勪箣闂寸殑闂磋窛 */
+ align-items: center;
+ background: #e3edf7;
+ }
+
+ .input-group {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ flex: 1; /* 浣夸袱涓緭鍏ョ粍鍧囧垎鍓╀綑绌洪棿 */
+ padding: 8px 12px;
+ }
+
+ .input-tag {
+ flex-shrink: 0;
+ }
+
+ .si-input-field {
+ flex: 1; /* 杈撳叆妗嗗崰鎹墿浣欑┖闂� */
+ width: 100%; /* 鎺у埗鏈�澶у搴� */
+ background: #f7f8fa;
+ border-radius: 4px;
+ }
</style>
</asp:Content>
@@ -257,23 +285,47 @@
<div class="si-input__left">
<span class="si-input__label">妫�楠屽�艰緭鍏�</span>
</div>
- <div class="si-status__right-btns"> <!-- 淇敼瀹瑰櫒绫诲悕 -->
- <van-button
- type="primary"
- size="small"
- class="status-btn"
- @click="handleQualified(true)"
- >
- 鍚堟牸
- </van-button>
- <van-button
- type="danger"
- size="small"
- class="status-btn"
- @click="handleQualified(false)"
- >
- 涓嶅悎鏍�
- </van-button>
+ <!-- 姘村钩鎺掑垪鐨勮緭鍏ュ鍣� -->
+ <div class="input-container">
+ <!-- OK杈撳叆缁� -->
+ <div class="input-group">
+ <van-tag
+ left
+ round
+ plain
+ type="success"
+ class="input-tag"
+ >OK</van-tag>
+ <van-field
+ :ref="'okValue_' + tabActive"
+ v-model="okValue"
+ class="si-input-field"
+ placeholder="杈撳叆OK鏁�"
+ :border="false"
+ @keyup.enter.native="getInputOK"
+ @input="handleNumberInput1"
+ />
+ </div>
+
+ <!-- NG杈撳叆缁� -->
+ <div class="input-group">
+ <van-tag
+ left
+ round
+ plain
+ type="danger"
+ class="input-tag"
+ >NG</van-tag>
+ <van-field
+ :ref="'ngValue_' + tabActive"
+ v-model="ngValue"
+ class="si-input-field"
+ placeholder="杈撳叆NG鏁�"
+ :border="false"
+ @keyup.enter.native="getInputNG"
+ @input="handleNumberInput2"
+ />
+ </div>
</div>
</div>
</template>
@@ -352,4 +404,4 @@
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
<script src="../Js/IPQC_XJ/Add.js?<%=11111111111 %>"></script>
-</asp:Content>
+</asp:Content>
\ No newline at end of file
diff --git a/H5/Js/IPQC_SJ/Add.js b/H5/Js/IPQC_SJ/Add.js
index cba4509..27a18a2 100644
--- a/H5/Js/IPQC_SJ/Add.js
+++ b/H5/Js/IPQC_SJ/Add.js
@@ -1,863 +1,905 @@
-锘縱ar vm = new Vue({
- el: '#app',
- data: function () {
- return {
- tableTbData: [], // "鍒剁儹鎬ц兘"鐢熸垚鐨勮〃鏍兼暟鎹�
- formTbData: { // 琛ㄥ崟鏁版嵁
- temperatureData: {} // 瀛樺偍鐨勫疄闄呮俯搴︺�佸疄闄呮祦閲忔暟鎹�
- },
- indexZrxx:0,//鍒剁儹鎬ц兘index
- headers: [],
- showZr: false,
- waterOptions: [
- { value: '100鈩�', text: '100鈩�' },
- { value: '99鈩�', text: '99鈩�' },
- { value: '90鈩�', text: '90鈩�' },
- { value: '85鈩�', text: '85鈩�' },
- { value: '80鈩�', text: '80鈩�' },
- { value: '75鈩�', text: '75鈩�' },
- { value: '65鈩�', text: '65鈩�' },
- { value: '60鈩�', text: '60鈩�' },
- { value: '55鈩�', text: '55鈩�' },
- { value: '45鈩�', text: '45鈩�' },
- { value: '42鈩�', text: '42鈩�' },
- { value: '甯告俯姘�', text: '甯告俯姘�' },
- { value: '鍐版按', text: '鍐版按' },
- { value: '70鈩�', text: '70鈩�' },
- { value: '50鈩�', text: '50鈩�' },
- { value: '寰喎', text: '寰喎' }
- ],//姘存俯閫夐」
- flowOptions: [
- { value: '50ml', text: '50ml' },
- { value: '100ml', text: '100ml' },
- { value: '120ml', text: '120ml' },
- { value: '150ml', text: '150ml' },
- { value: '160ml', text: '160ml' },
- { value: '200ml', text: '200ml' },
- { value: '250ml', text: '250ml' },
- { value: '260ml', text: '260ml' },
- { value: '300ml', text: '300ml' },
- { value: '350ml', text: '350ml' },
- { value: '360ml', text: '360ml' },
- { value: '450ml', text: '450ml' },
- { value: '500ml', text: '500ml' },
- { value: '550ml', text: '550ml' },
- { value: '600ml', text: '600ml' },
- { value: '750ml', text: '750ml' },
- { value: '999ml', text: '999ml' },
- { value: '涓�鍒嗛挓娴侀噺', text: '涓�鍒嗛挓娴侀噺' },
- { value: '涓夊垎閽熸祦閲�', text: '涓夊垎閽熸祦閲�' }
- ],//娴侀噺閫夐」
- selectedWater: [],// 宸查�夋按娓╁��
- selectedFlow: [], // 宸查�夋祦閲忓��
- isLoading: false,
- userInfo: {
- "loginGuid": '',
- "loginAccount": '',
- },
- formData: {
- id: "",
- releaseNo: "",
- createBy: "",
- createDate: "",
- lotNo: "",
- itemNo: "",
- billNo: "",
- fcovertQty: "",
- detailMem: "",
- taskNo: "",
- fcheckResu: "",
- boardModel: "",
- planQty: "",
- mocode: "",
- boardStyle: ""
- },
- isShowTable: false,
- tableData: [],//杩斿洖鐨勬楠岄」鐩�
- jymxData: [],//灞曠ず鐨勬楠岄」鐩�
- remarks:'',//涓嶅悎鏍兼弿杩�
- okNum:'',//鍚堟牸鏁�
- ngNum: '',//涓嶅悎鏍兼暟
- ttrre: false,
- show: false,//鏄庣粏闈㈡澘
- tableMxData: [],
- tabActive: 0,
- inputValue: '',//鐗瑰緛鍊艰緭鍏�
- resultValue: '',//妫�楠岀粨鏋滃綍鍏�
- showButton: false,//鍙充笂瑙掕彍鍗曡Е鍙�
- okValue: '',//OK-鏁伴噺
- ngValue: '',//NG-鏁伴噺
- showDialog: false,//涓嶈壇琛ㄨ堪杈撳叆妗�
- showDialogRzxx: false,//璁よ瘉淇℃伅杈撳叆妗�
- rzxxValue: '',//璁よ瘉淇℃伅杈撳叆鍊�
- //鍥剧墖涓婁紶妗�
- fileList: [
- //{
- // url: 'https://img01.yzcdn.cn/vant/leaf.jpg',
- // status: 'uploading',
- // message: '涓婁紶涓�...',
- //},
- //{
- // url: 'https://img01.yzcdn.cn/vant/tree.jpg',
- // status: 'failed',
- // message: '涓婁紶澶辫触',
- //},
- ],
-
- //鏃堕棿閫夋嫨鍙傛暟
- showScDatePicker: false,
- minDate: new Date(new Date().getFullYear() - 1, 0, 1), // 杩囧幓涓�骞�
- maxDate: new Date(new Date().getFullYear() + 1, 11, 31), // 鏈潵涓�骞�
- currentDate: new Date(),
- scDate: '', // 瀛樺偍鏍煎紡鍖栧悗鐨勬棩鏈�
-
- //璁よ瘉淇℃伅閫夋嫨
- showRzxx: false,
- actions: [],
- selectedRzxx: [], // 瀛樺偍澶氶�夊��
- rzxxOptions: [], // 璁よ瘉淇℃伅閫夐」
- }
- },
- mounted() {
- var that = this;
- this.userInfo = {
- loginGuid: this.GetLoginInfor().loginGuid,
- loginAccount: this.GetLoginInfor().loginAccount,
- };
- this.formData.id = this.Request("id"),
- this.formData.releaseNo = this.Request("releaseNo");
- this.formData.lotNo = this.Request("lotNo");
- this.init();
- },
- methods: {
- // 杈撳叆杩囨护
- handleNumberInput1(value) {
- // 鍘婚櫎闈炴暟瀛楀苟纭繚棣栦綅涓嶄负0锛堥櫎闈炴槸鍗曠嫭鐨�0锛�
- this.okValue = value.replace(/[^\d]/g, '') // 鍘婚櫎闈炴暟瀛楀瓧绗�
- .replace(/^0+(?!$)/, ''); // 鍘婚櫎寮�澶寸殑0锛岄櫎闈炴暣涓瓧绗︿覆鏄�0
- },
- handleNumberInput2(value) {
- // 鍘婚櫎闈炴暟瀛楀苟纭繚棣栦綅涓嶄负0锛堥櫎闈炴槸鍗曠嫭鐨�0锛�
- this.ngValue = value.replace(/[^\d]/g, '') // 鍘婚櫎闈炴暟瀛楀瓧绗�
- .replace(/^0+(?!$)/, ''); // 鍘婚櫎寮�澶寸殑0锛岄櫎闈炴暣涓瓧绗︿覆鏄�0
- },
- handleNumberInput3(value) {
- this.inputValue = value.replace(/[^\d.]/g, '') // 1. 鍘婚櫎闈炴暟瀛楀拰灏忔暟鐐�
- .replace(/(\..*)\./g, '$1') // 2. 绂佹澶氫釜灏忔暟鐐�
- .replace(/^\./g, '');
- },
-
-
- openZrPopup(index) {
- this.showZr = true;
- this.indexZrxx = this.tabActive;
- this.loadTableConfig();
- },
- closeZrPopup() {
- this.showZr = false;
- // this.selectedWater = []; // 鍏抽棴鏃舵竻绌洪�夋嫨
- // this.selectedFlow = []; // 鍏抽棴鏃舵竻绌洪�夋嫨
- },
- //閽堝娌℃湁涓婁笅闄愬�肩殑鏁版嵁锛屽彧闇�閫夋嫨鍚堟牸鎴栦笉鍚堟牸.鎸夐挳瑙﹀彂
- handleQualified(isQualified) {
- var input = "";
- if (isQualified) {
- // 鎵ц鍚堟牸鐩稿叧閫昏緫
- input = "OK-1";
- this.addJyzIpqc(input);
- } else {
- // 鎵ц涓嶅悎鏍肩浉鍏抽�昏緫
- input = "NG-1";
- this.addJyzIpqc(input);
- }
- },
- togglePopup(index) {
- // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
- var that = this;
- this.show = true;
- console.log(index);
- console.log(that.tableData[index].guid);
- var mxguid = that.tableData[index].guid;
- that.jymxData = that.tableData[index];
- that.tabActive = index;
- that.AxiosHttp("post", 'MesQaItemsDetect01Manager/GetModel12', {
- parentGuid : "",
- guid : mxguid ,
- }, true, 1).then(function (res1) {
- if (res1.rtnCode == 1) {
- that.tableMxData = res1.rtnData;
- that.$playSound('success');
-
- } else {
- that.$toast.fail(res1.rtnMsg);
- that.$playSound('error');
- }
- }).catch(function (error) {
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- console.log(error);
- });
- },
- getInputJYZ() {
- // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
- var that = this;
-
- if (!that.inputValue) {
- this.$toast.fail("妫�楠屽�间笉鑳戒负绌�");
- that.$playSound('error');
- that.isLoading = false;
- return;
- }
- that.addJyzIpqc(that.inputValue);
-
- },
-
- addJyzIpqc(input) {
- var that = this;
- var guid1 = that.formData.guid;//涓昏〃id
- var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
- that.isLoading = true;
- that.AxiosHttp("post", 'PqcManager/AddIpqcJyz', {
- inOrderGuid1: guid1,
- inOrderGuid5: mxguid,
- inP1: input,//鎴栬��0k-19,鎴栬�卬g-19,鎴栧疄闄呮楠屽��
- }, true, 1).then(function (res1) {
- if (res1.rtnCode > 0) {
- that.$notify({
- type: 'success', message: res1.rtnMsg
- });
- that.$playSound('success');
- that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
- //that.handleTabClick();//鍒锋柊妫�楠屾槑缁嗛潰鏉�
- //that.$refs.inputValue.focus();
- that.inputValue = null;
- } else {
- that.$toast.fail(res1.rtnMsg);
- that.$playSound('error');
- that.inputValue = null;
- }
- that.isLoading = false;
- }).catch(function (error) {
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- that.inputValue = null;
- that.isLoading = false;
- });
- },
-
- handleTabClick() {
- console.log(this.tabActive)
- this.togglePopup(this.tabActive);
- },
- //妫�楠屾槑缁嗗埛鏂�
- refreshJYItem() {
- const that = this;
- return that.AxiosHttp("post", 'Ipqc/getJYItem', {
- releaseNo: that.formData.releaseNo
- }, false).then(res1 => {
- const tableData = res1.data.tbBillList || [];
- that.tableData = tableData;
- that.handleTabClick();//鍒锋柊妫�楠屾槑缁嗛潰鏉�
- }).catch(error => {
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- console.error('Refresh error:', error);
- });
- },
-
- //涓婚〉闈㈠姞杞�
- init() {
- //alert(this.Request("id"));
- var that = this;
- that.showButton = false;
- that.AxiosHttp("post", 'Ipqc/getPageSj', {
- id: that.Request("id"),
- pageIndex: 1,
- limit: 1,
- }, false)
- .then(function (res) {
- let data = res.data.tbBillList[0];
- if (data) {
- that.formData = data;
- that.remarks = that.formData.fnGDesc;
- that.AxiosHttp("post", 'Ipqc/getJYItem', {
- //id: that.formData.guid,
- releaseNo: that.formData.releaseNo
- }, false).then(function (res1) {
- let tableData = res1.data.tbBillList
- //褰撳凡妫�楠屼釜鏁伴兘涓嶄负绌烘椂鎸夌収妫�娴嬬粨鏋勬帓搴�
- tableData.sort((a, b) => {
- if (a.result === '鏈畬鎴�' && b.result === '鍚堟牸') {
- return -1;
- } else if (a.result === '鍚堟牸' && b.result === '鏈畬鎴�') {
- return 1;
- } else {
- return 0;
- }
- });
- that.tableData = tableData;
- that.GetImageFileByGid();
- //if (that.tableData.length === 0) {
- // that.isShowTable = true;
- //}
- }).catch(function (error) {
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- console.log(error);
- });
- }
- })
- .catch(function (error) {
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- console.log(error);
- });
- },
- submit() {
- var that = this;
- that.ttrre = true;
- that.AxiosHttp("post", 'FqcManager/EditModelSubmit', {
- guid: that.formData.guid
- }, true, 1).then(function (res1) {
- if (res1.rtnData.outSum == 1) {
- that.$notify({ type: 'success', message: '鎻愪氦鎴愬姛' });
- that.$playSound('success');
- that.init();
- } else {
- that.$toast.fail(res1.rtnData.outMsg);
- that.$playSound('error');
- }
- that.ttrre = false
- }).catch(function (error) {
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- that.ttrre = false
- console.log(error);
- });
- },
- removeXJ() {
- const that = this;
- // 娣诲姞纭寮圭獥
- that.$dialog.confirm({
- message: '纭瑕侀噸鏂板姞杞芥楠岄」鐩悧锛�',
- confirmButtonText: '纭',
- cancelButtonText: '鍙栨秷'
- }).then(() => { // 纭鍥炶皟
- that.isLoading = true;
- that.AxiosHttp("post", 'MesQaItemsDetect01Manager/ReloadModel5', {
- guid: that.formData.guid
- }, true, 1).then(res1 => {
- if (res1.rtnCode == 1) {
- that.$notify({ type: 'success', message: '閲嶆柊鍔犺浇鎴愬姛' });
- that.$playSound('success');
- that.init();
- } else {
- that.$toast.fail(res1.rtnMsg);
- that.$playSound('error');
- }
- that.isLoading = false;
- }).catch(error => {
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- that.isLoading = false;
- });
-
- }).catch(() => { // 鍙栨秷鍥炶皟
- that.$toast('宸插彇娑堟搷浣�');
- });
- },
- GetBack1() {
- window.history.back();
- },
- onClickRight() {
-
- },
- updateRemarks(guid) {
- this.showDialog= true
- },
-
- // updateRzxx() {
- // this.showDialogRzxx = true
- // },
- //鍒犻櫎妫�楠屾槑缁嗚褰�
- deleteDetail13(guid12) {
- const that = this;
- var guid1 = that.formData.guid;//涓昏〃id
- var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
- // 娣诲姞纭寮圭獥
- that.$dialog.confirm({
- message: '纭瑕佸垹闄よ妫�楠屽�艰褰曞悧锛�',
- confirmButtonText: '纭',
- cancelButtonText: '鍙栨秷'
- }).then(() => { // 纭鍥炶皟
- that.isLoading = true;
- that.AxiosHttp("post", 'PqcManager/DeleteIpqcJyz', {
- inOrderGuid1: guid1,
- inOrderGuid5: mxguid,
- inOrderGuid12: guid12
- }, true, 1).then(res1 => {
- if (res1.rtnCode > 0) {
- that.$notify({
- type: 'success', message: res1.rtnMsg
- });
- that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
- } else {
- that.$toast.fail(res1.rtnMsg);
- }
- that.isLoading = false;
- }).catch(error => {
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- that.isLoading = false;
- });
-
- }).catch(() => { // 鍙栨秷鍥炶皟
- that.$toast('宸插彇娑堟搷浣�');
- that.isLoading = false;
- });
- },
- //鏇存柊璁よ瘉淇℃伅
- rzxxConfirm() {
- var that = this;
- var guid1 = that.formData.guid;//涓昏〃id
- var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
- that.isLoading = true;
- that.AxiosHttp("post", 'Ipqc/updateIpqcRzxx', {
- gid: guid1,
- pid: mxguid,
- inRzxxValue: that.rzxxValue,//杈撳叆鐨勮璇佷俊鎭�
- }, true, 0).then(function (res) {
- var json = res;
- if (json.status == 0) {
- that.$notify({ type: 'success', message: '杈撳叆鎴愬姛' });
- //that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
- }
- else {
- that.$toast.fail(json.message);
- }
- //that.$notify({ type: 'success', message: json.message });
- that.isLoading = false;
- }).catch(function (error) {
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- that.inRzxxValue = null;
- that.isLoading = false;
- });
- },
- // 淇敼鍘焤zxxConfirm鏂规硶
- updateRzxxToServer(selectedValues) {
- var that = this;
- that.AxiosHttp("post", 'Ipqc/updateIpqcRzxx', {
- gid: that.formData.guid,
- pid: that.tableData[that.tabActive].guid,
- inRzxxValue: that.jymxData.ipqcrzxx // 鏀逛负鏁扮粍鏍煎紡
- }).then(res => {
- var json = res;
- if (json.status == 0) {
- that.$notify({ type: 'success', message: '杈撳叆鎴愬姛' });
- //that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
- }
- else {
- that.$toast.fail(json.message);
- }
- //that.$notify({ type: 'success', message: json.message });
- that.isLoading = false;
- }).catch(function (error) {
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- that.inRzxxValue = null;
- that.isLoading = false;
- });
- },
- //鏇存柊涓嶅悎鏍艰〃杩�
- remarksConfirm() {
- const that = this;
- that.isLoading = true;
- var guid = that.formData.guid;
- that.AxiosHttp("post", 'Llj/updateRemarks', {
- gid: guid,
- Remarks: that.remarks
- }, true, 0).then(res1 => {
- if (res1.status == 0) {
- that.$notify({ type: 'success', message: '杈撳叆鎴愬姛' });
- that.init();//鍒锋柊妫�楠岄」鐩�
- } else {
- that.$toast.fail(res1.rtnMsg);
- }
- that.isLoading = false;
- }).catch(error => {
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- that.isLoading = false;
- });
- },
-
- async afterRead(file) {
- try {
- //alert(APIURL_IMAGE);
- // 1. 鏄剧ず涓婁紶涓姸鎬�
- file.status = 'uploading';
- file.message = '涓婁紶涓�...';
-
- // 2. 鍒涘缓 FormData锛堝叧閿細瀛楁鍚嶅繀椤诲拰鍚庣鍙傛暟鍚嶄竴鑷达級
- const formData = new FormData();
-
- // 3. 鏋勯�犳枃浠跺悕锛堟牴鎹悗绔姹傜敤 ~ 鍒嗗壊锛�
- // 鍋囪闇�瑕� parentGuid锛岃繖閲屼粠缁勪欢鏁版嵁鑾峰彇
- const parentGuid = this.formData.guid; // 鏍规嵁浣犵殑瀹為檯鏁版嵁婧愯皟鏁�
- const customFileName = `${parentGuid}~${file.file.name}`;
-
- // 4. 娣诲姞鏂囦欢锛堢浜屼釜鍙傛暟蹇呴』浣跨敤 new File 鍖呰锛�
- formData.append('file', new File([file.file], customFileName, {
- type: file.file.type
- }));
-
- // 5. 璋冪敤缁熶竴灏佽鐨� Axios 鏂规硶
- const res = await this.AxiosHttp(
- 'post',
- 'MesFile/UploadFile', // 鏍规嵁瀹為檯鎺ュ彛璺緞璋冩暣
- formData,
- true, // 鏄剧ず鍔犺浇鐘舵��
- 1 // 瓒呮椂鏃堕棿
- );
-
- // 6. 澶勭悊鍝嶅簲
- if (res.rtnCode === 1) {
- file.status = 'done';
- file.message = '涓婁紶鎴愬姛';
- file.urlPath = res.rtnData.urlPath; // 淇濆瓨杩斿洖鐨勬枃浠惰矾寰�
- file.id = res.rtnData.id; // 淇濆瓨杩斿洖鐨勬枃浠秈d
-
- // 鍙�夛細涓婁紶鎴愬姛鍚庡埛鏂版枃浠跺垪琛�
- // await this.loadFileList();
- } else {
- file.status = 'failed';
- file.message = res.rtnMsg || '涓婁紶澶辫触';
- this.$toast.fail(res.rtnMsg);
- }
-
- } catch (error) {
- // 7. 寮傚父澶勭悊
- file.status = 'failed';
- file.message = '涓婁紶寮傚父';
- this.$toast.fail('缃戠粶閿欒锛岃閲嶈瘯');
- console.error('涓婁紶閿欒:', error);
- } finally {
- // 8. 寮哄埗鏇存柊瑙嗗浘锛圴ant 3+ 鍙兘闇�瑕侊級
- this.$nextTick();
- }
- },
- //鑾峰彇鍥剧墖淇℃伅
- GetImageFileByGid() {
- const that = this;
- that.AxiosHttp("post", 'MesImage/getImage', {
- parentId: that.formData.guid,
- }, true, 0).then(res1 => {
- if (res1.status === 0) {
- // 鍏抽敭杞崲锛氬皢鍚庣鏁版嵁杞崲涓� van-uploader 闇�瑕佺殑鏍煎紡
- that.fileList = res1.data.tbBillList.map(item => ({
- url: `${APIURL_IMAGE}/${item.urlPath}`, // 鎷兼帴瀹屾暣璁块棶璺緞
- status: 'done', // 鏍囪涓哄凡涓婁紶鎴愬姛
- name: item.fileTitle, // 鍙�夋樉绀烘枃浠跺悕
- message: '宸蹭笂浼�', // 鍙�夌姸鎬佹枃瀛�
- // 淇濈暀鍘熷鏁版嵁锛堟寜闇�锛�
- id: item.guid
- }));
- } else {
- that.$toast.fail(res1.rtnMsg);
- }
- }).catch(error => {
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- });
- },
- handleDelete(file, { index }) {
- var that = this;
- that.$dialog.confirm({
- title: '纭鍒犻櫎',
- message: '纭畾瑕佸垹闄よ繖寮犲浘鐗囧悧锛�'
- }).then(() => {
- // 纭鍒犻櫎閫昏緫
- console.log(file);
- that.AxiosHttp("post", 'MesImage/deleteImage', {
- id: file.id,
- }, true, 0).then(res1 => {
- if (res1.status === 0) {
- that.$notify({ type: 'success', message: '鍒犻櫎鎴愬姛' });
-
- } else {
- that.$toast.fail(res1.rtnMsg);
-
- }
- that.init();//鍒锋柊妫�楠岄」鐩�
- }).catch(error => {
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- });
-
- }).catch(() => {
- // 鍙栨秷鎿嶄綔
- that.init();//鍒锋柊妫�楠岄」鐩�
- })
- },
- createTb() {
- // 娓呯┖鏃ф暟鎹�
- this.tableTbData = [];
- this.formTbData.temperatureData = {};
-
- // 鏍¢獙閫夋嫨
- if (this.selectedWater.length === 0 || this.selectedFlow.length === 0) {
- this.$toast.fail('璇峰厛閫夋嫨姘存俯鍜屾祦閲�');
- return;
- }
-
- // 鐢熸垚琛ㄥご
- // 淇敼headers鐢熸垚閫昏緫 鈫�
- const headers = [
- '璁惧畾娓╁害',
- '瀹為檯娓╁害锛堚剝锛�',
- ...this.selectedFlow.sort().map(f => `${f}`)
- ];
- this.headers = headers;
- console.log(this.headers);
- // 鐢熸垚琛屾暟鎹�
- this.tableTbData = this.selectedWater.sort((a,b) => a - b).map(water => {
- const row = {
- temperature: water === '甯告俯姘�' ? water : water,
- values: Object.fromEntries([
- ['temp', ''], // 鍥哄畾娓╁害瀛楁
- ...this.selectedFlow.map(flow => [flow, ''])
- ])
- };
-
- // 鍒濆鍖栬〃鍗曟暟鎹粨鏋�
- this.$set(this.formTbData.temperatureData, water, {});
- // 娣诲姞鍥哄畾瀛楁鈥濆疄闄呮俯搴︹�滃垵濮嬪寲
- this.$set(this.formTbData.temperatureData[water], 'temp', '');
- this.selectedFlow.forEach(flow => {
- this.$set(this.formTbData.temperatureData[water], flow, '');
- });
-
- return row;
- });
-
- // 鑷姩婊氬姩鍒拌〃鏍煎尯鍩�
- setTimeout(() => {
- const tableEl = document.getElementById('temperature-table');
- if (tableEl) tableEl.scrollIntoView({ behavior: 'smooth' });
- }, 100);
- console.log(this.formTbData);
- },
- // 鏂板淇濆瓨閰嶇疆鏂规硶
- saveTableConfig() {
- const that = this;
- that.isLoading = true;
-
- that.AxiosHttp("post", 'Ipqc/SaveTableConfig', {
- selectedWater: (that.selectedWater),
- selectedFlow: (that.selectedFlow),
- tableData: (that.formTbData.temperatureData),
- mxguid: that.tableData[that.indexZrxx].guid // 浣跨敤涓昏〃ID鍏宠仈
- }, true).then(res1 => {
- if (res1.status === 0) {
- that.$notify({ type: 'success', message: '閰嶇疆淇濆瓨鎴愬姛' });
- } else {
- that.$toast.fail(res1.rtnMsg);
- }
- that.isLoading = false;
- }).catch(error => {
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- that.isLoading = false;
- });
- },
- // 鏂板鍔犺浇閰嶇疆鏂规硶
- loadTableConfig() {
- const that = this;
- that.isLoading = true;
- var mxguid = that.tableData[that.indexZrxx].guid;
-
-
- that.AxiosHttp("post", 'Ipqc/GetTableConfig', {
- mxguid: mxguid,
- }, true).then(res1 => {
- if (res1.status === 0 && res1.data) {
- // 瑙f瀽瀛樺偍鐨勬暟鎹�
- that.selectedWater = JSON.parse(res1.data.selectedWater || '[]');
- that.selectedFlow = JSON.parse(res1.data.selectedFlow || '[]');
- that.formTbData.temperatureData = JSON.parse(res1.data.tableData || '{}');
-
- // 璋冪敤鏂扮殑娓叉煋鏂规硶
- this.renderExistingTable();
- }
- that.isLoading = false;
- }).catch(error => {
- that.isLoading = false;
- that.$toast.fail("鍔犺浇閰嶇疆澶辫触");
- });
- },
-
- // 鏂板娓叉煋宸叉湁鏁版嵁琛ㄦ牸鐨勬柟娉�
- renderExistingTable() {
- const that = this;
- console.log(that.formTbData.temperatureData);
- // 浠庣幇鏈夋暟鎹弽鍚戞帹瀵奸�夋嫨椤�
- const existingWaters = Object.keys(that.formTbData.temperatureData);
- const existingFlows = existingWaters.length > 0
- ? Object.keys(that.formTbData.temperatureData[existingWaters[0]])
- .filter(k => k !== 'temp')
- : [];
-
- // 鐢熸垚琛ㄥご锛堜繚鐣欏師濮媍reateTb鐨勬牸寮忥級
- that.headers = [
- '璁惧畾娓╁害',
- '瀹為檯娓╁害锛堚剝锛�',
- ...existingFlows.map(f => `${f}`)
- ];
-
- // 鐢熸垚琛屾暟鎹紙淇濈暀鍘熷缁撴瀯锛�
- that.tableTbData = existingWaters.map(water => {
- const values = that.formTbData.temperatureData[water];
- return {
- temperature: water,
- values: Object.fromEntries([
- ['temp', values.temp || ''],
- ...existingFlows.map(flow => [flow, values[flow] || ''])
- ])
- };
- });
- console.log(that.formTbData.temperatureData);
- // 淇濈暀鍘熷婊氬姩閫昏緫
- setTimeout(() => {
- const tableEl = document.getElementById('temperature-table');
- if (tableEl) tableEl.scrollIntoView({ behavior: 'smooth' });
- }, 100);
- console.log(that.formTbData.temperatureData);
- },
- //淇濆瓨鐢熶骇鏃ユ湡
- confirmScDate(value) {
- const date = new Date(value);
- this.scDate = `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`;
- //this.rzxxValue = this.scDate; // 鍚屾椂鏇存柊璁よ瘉淇℃伅瀛楁
- console.log(this.scDate);
-
- var that = this;
- var guid1 = that.formData.guid;//涓昏〃id
- var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
- that.isLoading = true;
- that.AxiosHttp("post", 'Ipqc/updateScDate', {
- gid: guid1,
- mxguid: mxguid,
- scDateValue: that.scDate,//杈撳叆鐨勮璇佷俊鎭�
- }, true, 0).then(function (res) {
- var json = res;
- if (json.status == 0) {
- that.$notify({ type: 'success', message: '杈撳叆鎴愬姛' });
- that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
- }
- else {
- that.$toast.fail(json.message);
- }
- //that.$notify({ type: 'success', message: json.message });
- that.isLoading = false;
- }).catch(function (error) {
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- that.inRzxxValue = null;
- that.isLoading = false;
- });
-
- this.showScDatePicker = false;
- },
-
- selectRzxx() {
- this.showRzxx = true;
- this.getRzxxList();
- },
- //鑾峰彇璁よ瘉淇℃伅鐩稿叧鍒楄〃
- getRzxxList() {
- var that = this;
- that.rzxxOptions = [];
- that.isLoading = true;
- var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
- that.AxiosHttp("post", 'Ipqc/GetRzxxList', {
- // 鏍规嵁瀹為檯鎺ュ彛闇�瑕佷紶閫掑弬鏁�
- mxguid: mxguid,
- }, false)
- .then(function (res) {
- if (res.status == 0) {
- // that.actions = res.data.tbBillList.map(item => {
- // return { name: item.defect_name } // 鏍规嵁瀹為檯鏁版嵁缁撴瀯璋冩暣
- // });
- that.rzxxOptions = res.data.tbBillList.map(item => ({
- value: item.defect_name, // 鍋囪guid鏄敮涓�鏍囪瘑绗�
- text: item.defect_name // 璁よ瘉淇℃伅鍚嶇О
- }));
- } else {
- that.$toast.fail(res.message);
- }
- that.isLoading = false;
- })
- .catch(function (error) {
- that.isLoading = false;
- that.$toast.fail("鑾峰彇璁よ瘉淇℃伅澶辫触");
- });
- },
- // 鏂板纭澶氶�夋柟娉�
- confirmMultiRzxx() {
- const selectedTexts = this.rzxxOptions
- .filter(item => this.selectedRzxx.includes(item.value))
- .map(item => item.text);
-
- // 淇敼杩欓噷锛氱敤鎹㈣绗︽浛浠i�楀彿鍒嗛殧
- this.jymxData.ipqcrzxx = selectedTexts.join('\n');
- this.showRzxx = false;
-
- // 鏇存柊澶氶�夊�煎埌鍚庣
- this.updateRzxxToServer(selectedTexts);
- },
-
- //閫夋嫨璁よ瘉淇℃伅
- onRzxxSelect(item) {
- this.showRzxx = false;
- this.rzxxValue = item.name;
- this.rzxxConfirm();
- //this.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
- // 濡傛灉闇�瑕佽幏鍙栬缁嗕俊鎭彲鍦ㄦ澶勮皟鐢ㄥ叾浠栨柟娉�
- },
- //鏇存柊璁よ瘉淇℃伅浣跨敤鏁伴噺
- updateRzxxNum(value, index) {
- // 娣诲姞闃叉姈鍒ゆ柇
- if (this.isLoading) {
- return;
- }
-
- const that = this;
- that.isLoading = true;
- that.AxiosHttp("post", 'Ipqc/saveIpqcrzxxNum', {
- guid: that.tableData[that.tabActive].guid,
- ipqcrzxxNum: value
- }, true, 0).then(res => {
- if (res.status == 0) {
- //that.$notify({ type: 'success', message: '鏁伴噺鏇存柊鎴愬姛' });
- //that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
- } else {
- that.$toast.fail(res.rtnMsg);
- }
- that.isLoading = false;
- }).catch(error => {
- that.isLoading = false;
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- });
- },
- //鏇存柊鏄惁鏈夋棤寮傚懗
- updateCpscs(value) {
- // 娣诲姞闃叉姈鍒ゆ柇
- if (this.isLoading) {
- return;
- }
- const that = this;
- that.isLoading = true;
- if (!value) return;
- that.AxiosHttp("post", 'Ipqc/saveIpqCpscs', {
- guid: that.tableData[that.tabActive].guid,
- ipqCpscs: value
- }, true, 0).then(res => {
- if (res.status == 0) {
- //that.refreshJYItem();
- } else {
- that.$toast.fail(res.rtnMsg);
- }
- that.isLoading = false;
- }).catch(error => {
- that.isLoading = false;
- that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
- });
- },
- }
-})
+var vm = new Vue({
+ el: '#app',
+ data: function () {
+ return {
+ tableTbData: [], // "鍒剁儹鎬ц兘"鐢熸垚鐨勮〃鏍兼暟鎹�
+ formTbData: { // 琛ㄥ崟鏁版嵁
+ temperatureData: {} // 瀛樺偍鐨勫疄闄呮俯搴︺�佸疄闄呮祦閲忔暟鎹�
+ },
+ indexZrxx:0,//鍒剁儹鎬ц兘index
+ headers: [],
+ showZr: false,
+ waterOptions: [
+ { value: '100鈩�', text: '100鈩�' },
+ { value: '99鈩�', text: '99鈩�' },
+ { value: '90鈩�', text: '90鈩�' },
+ { value: '85鈩�', text: '85鈩�' },
+ { value: '80鈩�', text: '80鈩�' },
+ { value: '75鈩�', text: '75鈩�' },
+ { value: '65鈩�', text: '65鈩�' },
+ { value: '60鈩�', text: '60鈩�' },
+ { value: '55鈩�', text: '55鈩�' },
+ { value: '45鈩�', text: '45鈩�' },
+ { value: '42鈩�', text: '42鈩�' },
+ { value: '甯告俯姘�', text: '甯告俯姘�' },
+ { value: '鍐版按', text: '鍐版按' },
+ { value: '70鈩�', text: '70鈩�' },
+ { value: '50鈩�', text: '50鈩�' },
+ { value: '寰喎', text: '寰喎' }
+ ],//姘存俯閫夐」
+ flowOptions: [
+ { value: '50ml', text: '50ml' },
+ { value: '100ml', text: '100ml' },
+ { value: '120ml', text: '120ml' },
+ { value: '150ml', text: '150ml' },
+ { value: '160ml', text: '160ml' },
+ { value: '200ml', text: '200ml' },
+ { value: '250ml', text: '250ml' },
+ { value: '260ml', text: '260ml' },
+ { value: '300ml', text: '300ml' },
+ { value: '350ml', text: '350ml' },
+ { value: '360ml', text: '360ml' },
+ { value: '450ml', text: '450ml' },
+ { value: '500ml', text: '500ml' },
+ { value: '550ml', text: '550ml' },
+ { value: '600ml', text: '600ml' },
+ { value: '750ml', text: '750ml' },
+ { value: '999ml', text: '999ml' },
+ { value: '涓�鍒嗛挓娴侀噺', text: '涓�鍒嗛挓娴侀噺' },
+ { value: '涓夊垎閽熸祦閲�', text: '涓夊垎閽熸祦閲�' }
+ ],//娴侀噺閫夐」
+ selectedWater: [],// 宸查�夋按娓╁��
+ selectedFlow: [], // 宸查�夋祦閲忓��
+ isLoading: false,
+ userInfo: {
+ "loginGuid": '',
+ "loginAccount": '',
+ },
+ formData: {
+ id: "",
+ releaseNo: "",
+ createBy: "",
+ createDate: "",
+ lotNo: "",
+ itemNo: "",
+ billNo: "",
+ fcovertQty: "",
+ detailMem: "",
+ taskNo: "",
+ fcheckResu: "",
+ boardModel: "",
+ planQty: "",
+ mocode: "",
+ boardStyle: ""
+ },
+ isShowTable: false,
+ tableData: [],//杩斿洖鐨勬楠岄」鐩�
+ jymxData: [],//灞曠ず鐨勬楠岄」鐩�
+ remarks:'',//涓嶅悎鏍兼弿杩�
+ okNum:'',//鍚堟牸鏁�
+ ngNum: '',//涓嶅悎鏍兼暟
+ ttrre: false,
+ show: false,//鏄庣粏闈㈡澘
+ tableMxData: [],
+ tabActive: 0,
+ inputValue: '',//鐗瑰緛鍊艰緭鍏�
+ resultValue: '',//妫�楠岀粨鏋滃綍鍏�
+ showButton: false,//鍙充笂瑙掕彍鍗曡Е鍙�
+ okValue: '',//OK-鏁伴噺
+ ngValue: '',//NG-鏁伴噺
+ showDialog: false,//涓嶈壇琛ㄨ堪杈撳叆妗�
+ showDialogRzxx: false,//璁よ瘉淇℃伅杈撳叆妗�
+ rzxxValue: '',//璁よ瘉淇℃伅杈撳叆鍊�
+ //鍥剧墖涓婁紶妗�
+ fileList: [
+ //{
+ // url: 'https://img01.yzcdn.cn/vant/leaf.jpg',
+ // status: 'uploading',
+ // message: '涓婁紶涓�...',
+ //},
+ //{
+ // url: 'https://img01.yzcdn.cn/vant/tree.jpg',
+ // status: 'failed',
+ // message: '涓婁紶澶辫触',
+ //},
+ ],
+
+ //鏃堕棿閫夋嫨鍙傛暟
+ showScDatePicker: false,
+ minDate: new Date(new Date().getFullYear() - 1, 0, 1), // 杩囧幓涓�骞�
+ maxDate: new Date(new Date().getFullYear() + 1, 11, 31), // 鏈潵涓�骞�
+ currentDate: new Date(),
+ scDate: '', // 瀛樺偍鏍煎紡鍖栧悗鐨勬棩鏈�
+
+ //璁よ瘉淇℃伅閫夋嫨
+ showRzxx: false,
+ actions: [],
+ selectedRzxx: [], // 瀛樺偍澶氶�夊��
+ rzxxOptions: [], // 璁よ瘉淇℃伅閫夐」
+ }
+ },
+ mounted() {
+ var that = this;
+ this.userInfo = {
+ loginGuid: this.GetLoginInfor().loginGuid,
+ loginAccount: this.GetLoginInfor().loginAccount,
+ };
+ this.formData.id = this.Request("id"),
+ this.formData.releaseNo = this.Request("releaseNo");
+ this.formData.lotNo = this.Request("lotNo");
+ this.init();
+ },
+ methods: {
+ // 杈撳叆杩囨护
+ handleNumberInput1(value) {
+ // 鍘婚櫎闈炴暟瀛楀苟纭繚棣栦綅涓嶄负0锛堥櫎闈炴槸鍗曠嫭鐨�0锛�
+ this.okValue = value.replace(/[^\d]/g, '') // 鍘婚櫎闈炴暟瀛楀瓧绗�
+ .replace(/^0+(?!$)/, ''); // 鍘婚櫎寮�澶寸殑0锛岄櫎闈炴暣涓瓧绗︿覆鏄�0
+ },
+ handleNumberInput2(value) {
+ // 鍘婚櫎闈炴暟瀛楀苟纭繚棣栦綅涓嶄负0锛堥櫎闈炴槸鍗曠嫭鐨�0锛�
+ this.ngValue = value.replace(/[^\d]/g, '') // 鍘婚櫎闈炴暟瀛楀瓧绗�
+ .replace(/^0+(?!$)/, ''); // 鍘婚櫎寮�澶寸殑0锛岄櫎闈炴暣涓瓧绗︿覆鏄�0
+ },
+ handleNumberInput3(value) {
+ this.inputValue = value.replace(/[^\d.]/g, '') // 1. 鍘婚櫎闈炴暟瀛楀拰灏忔暟鐐�
+ .replace(/(\..*)\./g, '$1') // 2. 绂佹澶氫釜灏忔暟鐐�
+ .replace(/^\./g, '');
+ },
+
+
+ openZrPopup(index) {
+ this.showZr = true;
+ this.indexZrxx = this.tabActive;
+ this.loadTableConfig();
+ },
+ closeZrPopup() {
+ this.showZr = false;
+ // this.selectedWater = []; // 鍏抽棴鏃舵竻绌洪�夋嫨
+ // this.selectedFlow = []; // 鍏抽棴鏃舵竻绌洪�夋嫨
+ },
+ //閽堝娌℃湁涓婁笅闄愬�肩殑鏁版嵁锛屽彧闇�閫夋嫨鍚堟牸鎴栦笉鍚堟牸.鎸夐挳瑙﹀彂
+ handleQualified(isQualified) {
+ var input = "";
+ if (isQualified) {
+ // 鎵ц鍚堟牸鐩稿叧閫昏緫
+ input = "OK-999999999";
+ this.addJyzIpqc(input);
+ } else {
+ // 鎵ц涓嶅悎鏍肩浉鍏抽�昏緫
+ input = "NG-1";
+ this.addJyzIpqc(input);
+ }
+ },
+ // OK鏁拌緭鍏ラ獙璇佸拰鎻愪氦
+ getInputOK() {
+ var that = this;
+ var jys = parseFloat(that.tableData[that.tabActive].checkQyt); //妫�楠岄」鐩殑妫�楠屾暟
+
+ if (!that.okValue) {
+ this.$toast.fail("OK鏁颁笉鑳戒负绌�");
+ that.isLoading = false;
+ return;
+ }
+
+ if (jys < parseFloat(that.okValue)) {
+ that.$toast.fail("褰曞叆鏁伴噺涓嶈兘澶т簬妫�楠屾暟锛�");
+ that.okValue = null;
+ return;
+ }
+ // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
+ var resultValue = "OK-" + this.okValue;
+ this.addJyzIpqc(resultValue);
+ that.okValue = null;
+ },
+ // NG鏁拌緭鍏ラ獙璇佸拰鎻愪氦
+ getInputNG() {
+ var that = this;
+ var jys = parseFloat(that.tableData[that.tabActive].checkQyt); //妫�楠岄」鐩殑妫�楠屾暟
+
+ if (!that.ngValue) {
+ this.$toast.fail("NG鏁颁笉鑳戒负绌�");
+ that.isLoading = false;
+ return;
+ }
+ if (jys < parseFloat(that.ngValue)) {
+ that.$toast.fail("褰曞叆鏁伴噺涓嶈兘澶т簬妫�楠屾暟锛�");
+ that.ngValue = null;
+ return;
+ }
+ // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
+ var resultValue = "NG-" + this.ngValue;
+ this.addJyzIpqc(resultValue);
+ that.ngValue = null;
+ },
+ togglePopup(index) {
+ // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
+ var that = this;
+ this.show = true;
+ console.log(index);
+ console.log(that.tableData[index].guid);
+ var mxguid = that.tableData[index].guid;
+ that.jymxData = that.tableData[index];
+ that.tabActive = index;
+ that.AxiosHttp("post", 'MesQaItemsDetect01Manager/GetModel12', {
+ parentGuid : "",
+ guid : mxguid ,
+ }, true, 1).then(function (res1) {
+ if (res1.rtnCode == 1) {
+ that.tableMxData = res1.rtnData;
+ that.$playSound('success');
+
+ } else {
+ that.$toast.fail(res1.rtnMsg);
+ that.$playSound('error');
+ }
+ }).catch(function (error) {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ console.log(error);
+ });
+ },
+ getInputJYZ() {
+ // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
+ var that = this;
+
+ if (!that.inputValue) {
+ this.$toast.fail("妫�楠屽�间笉鑳戒负绌�");
+ that.$playSound('error');
+ that.isLoading = false;
+ return;
+ }
+ that.addJyzIpqc(that.inputValue);
+
+ },
+
+ addJyzIpqc(input) {
+ var that = this;
+ var guid1 = that.formData.guid;//涓昏〃id
+ var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
+ that.isLoading = true;
+ that.AxiosHttp("post", 'PqcManager/AddIpqcJyz', {
+ inOrderGuid1: guid1,
+ inOrderGuid5: mxguid,
+ inP1: input,//鎴栬��0k-19,鎴栬�卬g-19,鎴栧疄闄呮楠屽��
+ }, true, 1).then(function (res1) {
+ if (res1.rtnCode > 0) {
+ that.$notify({
+ type: 'success', message: res1.rtnMsg
+ });
+ that.$playSound('success');
+ that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
+ //that.handleTabClick();//鍒锋柊妫�楠屾槑缁嗛潰鏉�
+ //that.$refs.inputValue.focus();
+ that.inputValue = null;
+ } else {
+ that.$toast.fail(res1.rtnMsg);
+ that.$playSound('error');
+ that.inputValue = null;
+ }
+ that.isLoading = false;
+ }).catch(function (error) {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.inputValue = null;
+ that.isLoading = false;
+ });
+ },
+
+ handleTabClick() {
+ console.log(this.tabActive)
+ this.togglePopup(this.tabActive);
+ },
+ //妫�楠屾槑缁嗗埛鏂�
+ refreshJYItem() {
+ const that = this;
+ return that.AxiosHttp("post", 'Ipqc/getJYItem', {
+ releaseNo: that.formData.releaseNo
+ }, false).then(res1 => {
+ const tableData = res1.data.tbBillList || [];
+ that.tableData = tableData;
+ that.handleTabClick();//鍒锋柊妫�楠屾槑缁嗛潰鏉�
+ }).catch(error => {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ console.error('Refresh error:', error);
+ });
+ },
+
+ //涓婚〉闈㈠姞杞�
+ init() {
+ //alert(this.Request("id"));
+ var that = this;
+ that.showButton = false;
+ that.AxiosHttp("post", 'Ipqc/getPageSj', {
+ id: that.Request("id"),
+ pageIndex: 1,
+ limit: 1,
+ }, false)
+ .then(function (res) {
+ let data = res.data.tbBillList[0];
+ if (data) {
+ that.formData = data;
+ that.remarks = that.formData.fnGDesc;
+ that.AxiosHttp("post", 'Ipqc/getJYItem', {
+ //id: that.formData.guid,
+ releaseNo: that.formData.releaseNo
+ }, false).then(function (res1) {
+ let tableData = res1.data.tbBillList
+ //褰撳凡妫�楠屼釜鏁伴兘涓嶄负绌烘椂鎸夌収妫�娴嬬粨鏋勬帓搴�
+ tableData.sort((a, b) => {
+ if (a.result === '鏈畬鎴�' && b.result === '鍚堟牸') {
+ return -1;
+ } else if (a.result === '鍚堟牸' && b.result === '鏈畬鎴�') {
+ return 1;
+ } else {
+ return 0;
+ }
+ });
+ that.tableData = tableData;
+ that.GetImageFileByGid();
+ //if (that.tableData.length === 0) {
+ // that.isShowTable = true;
+ //}
+ }).catch(function (error) {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ console.log(error);
+ });
+ }
+ })
+ .catch(function (error) {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ console.log(error);
+ });
+ },
+ submit() {
+ var that = this;
+ that.ttrre = true;
+ that.AxiosHttp("post", 'FqcManager/EditModelSubmit', {
+ guid: that.formData.guid
+ }, true, 1).then(function (res1) {
+ if (res1.rtnData.outSum == 1) {
+ that.$notify({ type: 'success', message: '鎻愪氦鎴愬姛' });
+ that.$playSound('success');
+ that.init();
+ } else {
+ that.$toast.fail(res1.rtnData.outMsg);
+ that.$playSound('error');
+ }
+ that.ttrre = false
+ }).catch(function (error) {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.ttrre = false
+ console.log(error);
+ });
+ },
+ removeXJ() {
+ const that = this;
+ // 娣诲姞纭寮圭獥
+ that.$dialog.confirm({
+ message: '纭瑕侀噸鏂板姞杞芥楠岄」鐩悧锛�',
+ confirmButtonText: '纭',
+ cancelButtonText: '鍙栨秷'
+ }).then(() => { // 纭鍥炶皟
+ that.isLoading = true;
+ that.AxiosHttp("post", 'MesQaItemsDetect01Manager/ReloadModel5', {
+ guid: that.formData.guid
+ }, true, 1).then(res1 => {
+ if (res1.rtnCode == 1) {
+ that.$notify({ type: 'success', message: '閲嶆柊鍔犺浇鎴愬姛' });
+ that.$playSound('success');
+ that.init();
+ } else {
+ that.$toast.fail(res1.rtnMsg);
+ that.$playSound('error');
+ }
+ that.isLoading = false;
+ }).catch(error => {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.isLoading = false;
+ });
+
+ }).catch(() => { // 鍙栨秷鍥炶皟
+ that.$toast('宸插彇娑堟搷浣�');
+ });
+ },
+ GetBack1() {
+ window.history.back();
+ },
+ onClickRight() {
+
+ },
+ updateRemarks(guid) {
+ this.showDialog= true
+ },
+
+ // updateRzxx() {
+ // this.showDialogRzxx = true
+ // },
+ //鍒犻櫎妫�楠屾槑缁嗚褰�
+ deleteDetail13(guid12) {
+ const that = this;
+ var guid1 = that.formData.guid;//涓昏〃id
+ var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
+ // 娣诲姞纭寮圭獥
+ that.$dialog.confirm({
+ message: '纭瑕佸垹闄よ妫�楠屽�艰褰曞悧锛�',
+ confirmButtonText: '纭',
+ cancelButtonText: '鍙栨秷'
+ }).then(() => { // 纭鍥炶皟
+ that.isLoading = true;
+ that.AxiosHttp("post", 'PqcManager/DeleteIpqcJyz', {
+ inOrderGuid1: guid1,
+ inOrderGuid5: mxguid,
+ inOrderGuid12: guid12
+ }, true, 1).then(res1 => {
+ if (res1.rtnCode > 0) {
+ that.$notify({
+ type: 'success', message: res1.rtnMsg
+ });
+ that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
+ } else {
+ that.$toast.fail(res1.rtnMsg);
+ }
+ that.isLoading = false;
+ }).catch(error => {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.isLoading = false;
+ });
+
+ }).catch(() => { // 鍙栨秷鍥炶皟
+ that.$toast('宸插彇娑堟搷浣�');
+ that.isLoading = false;
+ });
+ },
+ //鏇存柊璁よ瘉淇℃伅
+ rzxxConfirm() {
+ var that = this;
+ var guid1 = that.formData.guid;//涓昏〃id
+ var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
+ that.isLoading = true;
+ that.AxiosHttp("post", 'Ipqc/updateIpqcRzxx', {
+ gid: guid1,
+ pid: mxguid,
+ inRzxxValue: that.rzxxValue,//杈撳叆鐨勮璇佷俊鎭�
+ }, true, 0).then(function (res) {
+ var json = res;
+ if (json.status == 0) {
+ that.$notify({ type: 'success', message: '杈撳叆鎴愬姛' });
+ //that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
+ }
+ else {
+ that.$toast.fail(json.message);
+ }
+ //that.$notify({ type: 'success', message: json.message });
+ that.isLoading = false;
+ }).catch(function (error) {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.inRzxxValue = null;
+ that.isLoading = false;
+ });
+ },
+ // 淇敼鍘焤zxxConfirm鏂规硶
+ updateRzxxToServer(selectedValues) {
+ var that = this;
+ that.AxiosHttp("post", 'Ipqc/updateIpqcRzxx', {
+ gid: that.formData.guid,
+ pid: that.tableData[that.tabActive].guid,
+ inRzxxValue: that.jymxData.ipqcrzxx // 鏀逛负鏁扮粍鏍煎紡
+ }).then(res => {
+ var json = res;
+ if (json.status == 0) {
+ that.$notify({ type: 'success', message: '杈撳叆鎴愬姛' });
+ //that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
+ }
+ else {
+ that.$toast.fail(json.message);
+ }
+ //that.$notify({ type: 'success', message: json.message });
+ that.isLoading = false;
+ }).catch(function (error) {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.inRzxxValue = null;
+ that.isLoading = false;
+ });
+ },
+ //鏇存柊涓嶅悎鏍艰〃杩�
+ remarksConfirm() {
+ const that = this;
+ that.isLoading = true;
+ var guid = that.formData.guid;
+ that.AxiosHttp("post", 'Llj/updateRemarks', {
+ gid: guid,
+ Remarks: that.remarks
+ }, true, 0).then(res1 => {
+ if (res1.status == 0) {
+ that.$notify({ type: 'success', message: '杈撳叆鎴愬姛' });
+ that.init();//鍒锋柊妫�楠岄」鐩�
+ } else {
+ that.$toast.fail(res1.rtnMsg);
+ }
+ that.isLoading = false;
+ }).catch(error => {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.isLoading = false;
+ });
+ },
+
+ async afterRead(file) {
+ try {
+ //alert(APIURL_IMAGE);
+ // 1. 鏄剧ず涓婁紶涓姸鎬�
+ file.status = 'uploading';
+ file.message = '涓婁紶涓�...';
+
+ // 2. 鍒涘缓 FormData锛堝叧閿細瀛楁鍚嶅繀椤诲拰鍚庣鍙傛暟鍚嶄竴鑷达級
+ const formData = new FormData();
+
+ // 3. 鏋勯�犳枃浠跺悕锛堟牴鎹悗绔姹傜敤 ~ 鍒嗗壊锛�
+ // 鍋囪闇�瑕� parentGuid锛岃繖閲屼粠缁勪欢鏁版嵁鑾峰彇
+ const parentGuid = this.formData.guid; // 鏍规嵁浣犵殑瀹為檯鏁版嵁婧愯皟鏁�
+ const customFileName = `${parentGuid}~${file.file.name}`;
+
+ // 4. 娣诲姞鏂囦欢锛堢浜屼釜鍙傛暟蹇呴』浣跨敤 new File 鍖呰锛�
+ formData.append('file', new File([file.file], customFileName, {
+ type: file.file.type
+ }));
+
+ // 5. 璋冪敤缁熶竴灏佽鐨� Axios 鏂规硶
+ const res = await this.AxiosHttp(
+ 'post',
+ 'MesFile/UploadFile', // 鏍规嵁瀹為檯鎺ュ彛璺緞璋冩暣
+ formData,
+ true, // 鏄剧ず鍔犺浇鐘舵��
+ 1 // 瓒呮椂鏃堕棿
+ );
+
+ // 6. 澶勭悊鍝嶅簲
+ if (res.rtnCode === 1) {
+ file.status = 'done';
+ file.message = '涓婁紶鎴愬姛';
+ file.urlPath = res.rtnData.urlPath; // 淇濆瓨杩斿洖鐨勬枃浠惰矾寰�
+ file.id = res.rtnData.id; // 淇濆瓨杩斿洖鐨勬枃浠秈d
+
+ // 鍙�夛細涓婁紶鎴愬姛鍚庡埛鏂版枃浠跺垪琛�
+ // await this.loadFileList();
+ } else {
+ file.status = 'failed';
+ file.message = res.rtnMsg || '涓婁紶澶辫触';
+ this.$toast.fail(res.rtnMsg);
+ }
+
+ } catch (error) {
+ // 7. 寮傚父澶勭悊
+ file.status = 'failed';
+ file.message = '涓婁紶寮傚父';
+ this.$toast.fail('缃戠粶閿欒锛岃閲嶈瘯');
+ console.error('涓婁紶閿欒:', error);
+ } finally {
+ // 8. 寮哄埗鏇存柊瑙嗗浘锛圴ant 3+ 鍙兘闇�瑕侊級
+ this.$nextTick();
+ }
+ },
+ //鑾峰彇鍥剧墖淇℃伅
+ GetImageFileByGid() {
+ const that = this;
+ that.AxiosHttp("post", 'MesImage/getImage', {
+ parentId: that.formData.guid,
+ }, true, 0).then(res1 => {
+ if (res1.status === 0) {
+ // 鍏抽敭杞崲锛氬皢鍚庣鏁版嵁杞崲涓� van-uploader 闇�瑕佺殑鏍煎紡
+ that.fileList = res1.data.tbBillList.map(item => ({
+ url: `${APIURL_IMAGE}/${item.urlPath}`, // 鎷兼帴瀹屾暣璁块棶璺緞
+ status: 'done', // 鏍囪涓哄凡涓婁紶鎴愬姛
+ name: item.fileTitle, // 鍙�夋樉绀烘枃浠跺悕
+ message: '宸蹭笂浼�', // 鍙�夌姸鎬佹枃瀛�
+ // 淇濈暀鍘熷鏁版嵁锛堟寜闇�锛�
+ id: item.guid
+ }));
+ } else {
+ that.$toast.fail(res1.rtnMsg);
+ }
+ }).catch(error => {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ });
+ },
+ handleDelete(file, { index }) {
+ var that = this;
+ that.$dialog.confirm({
+ title: '纭鍒犻櫎',
+ message: '纭畾瑕佸垹闄よ繖寮犲浘鐗囧悧锛�'
+ }).then(() => {
+ // 纭鍒犻櫎閫昏緫
+ console.log(file);
+ that.AxiosHttp("post", 'MesImage/deleteImage', {
+ id: file.id,
+ }, true, 0).then(res1 => {
+ if (res1.status === 0) {
+ that.$notify({ type: 'success', message: '鍒犻櫎鎴愬姛' });
+
+ } else {
+ that.$toast.fail(res1.rtnMsg);
+
+ }
+ that.init();//鍒锋柊妫�楠岄」鐩�
+ }).catch(error => {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ });
+
+ }).catch(() => {
+ // 鍙栨秷鎿嶄綔
+ that.init();//鍒锋柊妫�楠岄」鐩�
+ })
+ },
+ createTb() {
+ // 娓呯┖鏃ф暟鎹�
+ this.tableTbData = [];
+ this.formTbData.temperatureData = {};
+
+ // 鏍¢獙閫夋嫨
+ if (this.selectedWater.length === 0 || this.selectedFlow.length === 0) {
+ this.$toast.fail('璇峰厛閫夋嫨姘存俯鍜屾祦閲�');
+ return;
+ }
+
+ // 鐢熸垚琛ㄥご
+ // 淇敼headers鐢熸垚閫昏緫 鈫�
+ const headers = [
+ '璁惧畾娓╁害',
+ '瀹為檯娓╁害锛堚剝锛�',
+ ...this.selectedFlow.sort().map(f => `${f}`)
+ ];
+ this.headers = headers;
+ console.log(this.headers);
+ // 鐢熸垚琛屾暟鎹�
+ this.tableTbData = this.selectedWater.sort((a,b) => a - b).map(water => {
+ const row = {
+ temperature: water === '甯告俯姘�' ? water : water,
+ values: Object.fromEntries([
+ ['temp', ''], // 鍥哄畾娓╁害瀛楁
+ ...this.selectedFlow.map(flow => [flow, ''])
+ ])
+ };
+
+ // 鍒濆鍖栬〃鍗曟暟鎹粨鏋�
+ this.$set(this.formTbData.temperatureData, water, {});
+ // 娣诲姞鍥哄畾瀛楁鈥濆疄闄呮俯搴︹�滃垵濮嬪寲
+ this.$set(this.formTbData.temperatureData[water], 'temp', '');
+ this.selectedFlow.forEach(flow => {
+ this.$set(this.formTbData.temperatureData[water], flow, '');
+ });
+
+ return row;
+ });
+
+ // 鑷姩婊氬姩鍒拌〃鏍煎尯鍩�
+ setTimeout(() => {
+ const tableEl = document.getElementById('temperature-table');
+ if (tableEl) tableEl.scrollIntoView({ behavior: 'smooth' });
+ }, 100);
+ console.log(this.formTbData);
+ },
+ // 鏂板淇濆瓨閰嶇疆鏂规硶
+ saveTableConfig() {
+ const that = this;
+ that.isLoading = true;
+
+ that.AxiosHttp("post", 'Ipqc/SaveTableConfig', {
+ selectedWater: (that.selectedWater),
+ selectedFlow: (that.selectedFlow),
+ tableData: (that.formTbData.temperatureData),
+ mxguid: that.tableData[that.indexZrxx].guid // 浣跨敤涓昏〃ID鍏宠仈
+ }, true).then(res1 => {
+ if (res1.status === 0) {
+ that.$notify({ type: 'success', message: '閰嶇疆淇濆瓨鎴愬姛' });
+ } else {
+ that.$toast.fail(res1.rtnMsg);
+ }
+ that.isLoading = false;
+ }).catch(error => {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.isLoading = false;
+ });
+ },
+ // 鏂板鍔犺浇閰嶇疆鏂规硶
+ loadTableConfig() {
+ const that = this;
+ that.isLoading = true;
+ var mxguid = that.tableData[that.indexZrxx].guid;
+
+
+ that.AxiosHttp("post", 'Ipqc/GetTableConfig', {
+ mxguid: mxguid,
+ }, true).then(res1 => {
+ if (res1.status === 0 && res1.data) {
+ // 瑙f瀽瀛樺偍鐨勬暟鎹�
+ that.selectedWater = JSON.parse(res1.data.selectedWater || '[]');
+ that.selectedFlow = JSON.parse(res1.data.selectedFlow || '[]');
+ that.formTbData.temperatureData = JSON.parse(res1.data.tableData || '{}');
+
+ // 璋冪敤鏂扮殑娓叉煋鏂规硶
+ this.renderExistingTable();
+ }
+ that.isLoading = false;
+ }).catch(error => {
+ that.isLoading = false;
+ that.$toast.fail("鍔犺浇閰嶇疆澶辫触");
+ });
+ },
+
+ // 鏂板娓叉煋宸叉湁鏁版嵁琛ㄦ牸鐨勬柟娉�
+ renderExistingTable() {
+ const that = this;
+ console.log(that.formTbData.temperatureData);
+ // 浠庣幇鏈夋暟鎹弽鍚戞帹瀵奸�夋嫨椤�
+ const existingWaters = Object.keys(that.formTbData.temperatureData);
+ const existingFlows = existingWaters.length > 0
+ ? Object.keys(that.formTbData.temperatureData[existingWaters[0]])
+ .filter(k => k !== 'temp')
+ : [];
+
+ // 鐢熸垚琛ㄥご锛堜繚鐣欏師濮媍reateTb鐨勬牸寮忥級
+ that.headers = [
+ '璁惧畾娓╁害',
+ '瀹為檯娓╁害锛堚剝锛�',
+ ...existingFlows.map(f => `${f}`)
+ ];
+
+ // 鐢熸垚琛屾暟鎹紙淇濈暀鍘熷缁撴瀯锛�
+ that.tableTbData = existingWaters.map(water => {
+ const values = that.formTbData.temperatureData[water];
+ return {
+ temperature: water,
+ values: Object.fromEntries([
+ ['temp', values.temp || ''],
+ ...existingFlows.map(flow => [flow, values[flow] || ''])
+ ])
+ };
+ });
+ console.log(that.formTbData.temperatureData);
+ // 淇濈暀鍘熷婊氬姩閫昏緫
+ setTimeout(() => {
+ const tableEl = document.getElementById('temperature-table');
+ if (tableEl) tableEl.scrollIntoView({ behavior: 'smooth' });
+ }, 100);
+ console.log(that.formTbData.temperatureData);
+ },
+ //淇濆瓨鐢熶骇鏃ユ湡
+ confirmScDate(value) {
+ const date = new Date(value);
+ this.scDate = `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`;
+ //this.rzxxValue = this.scDate; // 鍚屾椂鏇存柊璁よ瘉淇℃伅瀛楁
+ console.log(this.scDate);
+
+ var that = this;
+ var guid1 = that.formData.guid;//涓昏〃id
+ var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
+ that.isLoading = true;
+ that.AxiosHttp("post", 'Ipqc/updateScDate', {
+ gid: guid1,
+ mxguid: mxguid,
+ scDateValue: that.scDate,//杈撳叆鐨勮璇佷俊鎭�
+ }, true, 0).then(function (res) {
+ var json = res;
+ if (json.status == 0) {
+ that.$notify({ type: 'success', message: '杈撳叆鎴愬姛' });
+ that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
+ }
+ else {
+ that.$toast.fail(json.message);
+ }
+ //that.$notify({ type: 'success', message: json.message });
+ that.isLoading = false;
+ }).catch(function (error) {
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.inRzxxValue = null;
+ that.isLoading = false;
+ });
+
+ this.showScDatePicker = false;
+ },
+
+ selectRzxx() {
+ this.showRzxx = true;
+ this.getRzxxList();
+ },
+ //鑾峰彇璁よ瘉淇℃伅鐩稿叧鍒楄〃
+ getRzxxList() {
+ var that = this;
+ that.rzxxOptions = [];
+ that.isLoading = true;
+ var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid
+ that.AxiosHttp("post", 'Ipqc/GetRzxxList', {
+ // 鏍规嵁瀹為檯鎺ュ彛闇�瑕佷紶閫掑弬鏁�
+ mxguid: mxguid,
+ }, false)
+ .then(function (res) {
+ if (res.status == 0) {
+ // that.actions = res.data.tbBillList.map(item => {
+ // return { name: item.defect_name } // 鏍规嵁瀹為檯鏁版嵁缁撴瀯璋冩暣
+ // });
+ that.rzxxOptions = res.data.tbBillList.map(item => ({
+ value: item.defect_name, // 鍋囪guid鏄敮涓�鏍囪瘑绗�
+ text: item.defect_name // 璁よ瘉淇℃伅鍚嶇О
+ }));
+ } else {
+ that.$toast.fail(res.message);
+ }
+ that.isLoading = false;
+ })
+ .catch(function (error) {
+ that.isLoading = false;
+ that.$toast.fail("鑾峰彇璁よ瘉淇℃伅澶辫触");
+ });
+ },
+ // 鏂板纭澶氶�夋柟娉�
+ confirmMultiRzxx() {
+ const selectedTexts = this.rzxxOptions
+ .filter(item => this.selectedRzxx.includes(item.value))
+ .map(item => item.text);
+
+ // 淇敼杩欓噷锛氱敤鎹㈣绗︽浛浠i�楀彿鍒嗛殧
+ this.jymxData.ipqcrzxx = selectedTexts.join('\n');
+ this.showRzxx = false;
+
+ // 鏇存柊澶氶�夊�煎埌鍚庣
+ this.updateRzxxToServer(selectedTexts);
+ },
+
+ //閫夋嫨璁よ瘉淇℃伅
+ onRzxxSelect(item) {
+ this.showRzxx = false;
+ this.rzxxValue = item.name;
+ this.rzxxConfirm();
+ //this.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
+ // 濡傛灉闇�瑕佽幏鍙栬缁嗕俊鎭彲鍦ㄦ澶勮皟鐢ㄥ叾浠栨柟娉�
+ },
+ //鏇存柊璁よ瘉淇℃伅浣跨敤鏁伴噺
+ updateRzxxNum(value, index) {
+ // 娣诲姞闃叉姈鍒ゆ柇
+ if (this.isLoading) {
+ return;
+ }
+
+ const that = this;
+ that.isLoading = true;
+ that.AxiosHttp("post", 'Ipqc/saveIpqcrzxxNum', {
+ guid: that.tableData[that.tabActive].guid,
+ ipqcrzxxNum: value
+ }, true, 0).then(res => {
+ if (res.status == 0) {
+ //that.$notify({ type: 'success', message: '鏁伴噺鏇存柊鎴愬姛' });
+ //that.refreshJYItem();//鍒锋柊妫�楠岄」鐩�
+ } else {
+ that.$toast.fail(res.rtnMsg);
+ }
+ that.isLoading = false;
+ }).catch(error => {
+ that.isLoading = false;
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ });
+ },
+ //鏇存柊鏄惁鏈夋棤寮傚懗
+ updateCpscs(value) {
+ // 娣诲姞闃叉姈鍒ゆ柇
+ if (this.isLoading) {
+ return;
+ }
+ const that = this;
+ that.isLoading = true;
+ if (!value) return;
+ that.AxiosHttp("post", 'Ipqc/saveIpqCpscs', {
+ guid: that.tableData[that.tabActive].guid,
+ ipqCpscs: value
+ }, true, 0).then(res => {
+ if (res.status == 0) {
+ //that.refreshJYItem();
+ } else {
+ that.$toast.fail(res.rtnMsg);
+ }
+ that.isLoading = false;
+ }).catch(error => {
+ that.isLoading = false;
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ });
+ },
+ }
+})
+
\ No newline at end of file
diff --git a/H5/Js/IPQC_XJ/Add.js b/H5/Js/IPQC_XJ/Add.js
index 5351162..dc4da5e 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 {
@@ -192,6 +192,46 @@
},
+ getInputOK() {
+ var that = this;
+ var jys = parseFloat(that.tableData[that.tabActive].checkQyt); //妫�楠岄」鐩殑妫�楠屾暟
+
+ if (!that.okValue) {
+ this.$toast.fail("OK鏁颁笉鑳戒负绌�");
+ that.isLoading = false;
+ return;
+ }
+
+ if (jys < parseFloat(that.okValue)) {
+ that.$toast.fail("褰曞叆鏁伴噺涓嶈兘澶т簬妫�楠屾暟锛�");
+ that.okValue = null;
+ return;
+ }
+ // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
+ var resultValue = "OK-" + this.okValue;
+ this.addJyzIpqc(resultValue);
+ that.okValue = null;
+ },
+ getInputNG() {
+ var that = this;
+ var jys = parseFloat(that.tableData[that.tabActive].checkQyt); //妫�楠岄」鐩殑妫�楠屾暟
+
+ if (!that.ngValue) {
+ this.$toast.fail("NG鏁颁笉鑳戒负绌�");
+ that.isLoading = false;
+ return;
+ }
+ if (jys < parseFloat(that.ngValue)) {
+ that.$toast.fail("褰曞叆鏁伴噺涓嶈兘澶т簬妫�楠屾暟锛�");
+ that.ngValue = null;
+ return;
+ }
+ // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵��
+ var resultValue = "NG-" + this.ngValue;
+ this.addJyzIpqc(resultValue);
+ that.ngValue = null;
+ },
+
addJyzIpqc(input) {
var that = this;
var guid1 = that.formData.guid;//涓昏〃id
--
Gitblit v1.9.3