From f3b6e9ba2e4274b3821551bd1bdfafb40f0e0e26 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期三, 05 十一月 2025 14:23:29 +0800
Subject: [PATCH] 调整 首检检验单 检验值模板 模块
---
pages/ZLGL/shoujianjianyan/form.vue | 185 ++++++++++++++++++++++++-------------
pages/ZLGL/shoujianjianyan/table.vue | 2
components/ZLGL/InspectValueTemplate.vue | 85 ++++++++++++++---
3 files changed, 191 insertions(+), 81 deletions(-)
diff --git a/components/ZLGL/InspectValueTemplate.vue b/components/ZLGL/InspectValueTemplate.vue
index 22cb0d4..61b6fd0 100644
--- a/components/ZLGL/InspectValueTemplate.vue
+++ b/components/ZLGL/InspectValueTemplate.vue
@@ -66,37 +66,43 @@
<view class="form-item">
<view class="left">妫�楠屽��</view>
<view class="right">
- <input type="text" v-model="checkData.HInSpectVal" />
+ <input type="number" v-model="checkData.HInSpectVal" />
</view>
</view>
<view class="form-item">
<view class="left">鐩爣鍊�</view>
<view class="right ">
- <input type="text" v-model="checkData.HTargetVal" />
+ <input type="number" v-model="checkData.HTargetVal" @blur="CalculateLimitOffset(1)" />
</view>
</view>
<view class="form-item">
<view class="left">涓婇檺鍊�</view>
- <view class="right disabled">
- <input type="text" v-model="checkData.HUpLimit" disabled />
+ <view class="right" :class="[AnalysisMethodStatus == 1?'disabled':'']">
+ <input type="number" v-model="checkData.HUpLimit" :disabled="AnalysisMethodStatus == 1" @blur="CalculateLimitOffset(2)" />
</view>
</view>
<view class="form-item">
<view class="left">涓嬮檺鍊�</view>
- <view class="right disabled">
- <input type="text" v-model="checkData.HDownLimit" disabled />
+ <view class="right" :class="[AnalysisMethodStatus == 1?'disabled':'']">
+ <input type="number" v-model="checkData.HDownLimit" :disabled="AnalysisMethodStatus == 1" @blur="CalculateLimitOffset(3)" />
</view>
</view>
<view class="form-item">
<view class="left">涓婂亸宸�</view>
- <view class="right disabled">
- <input type="text" v-model="checkData.HUpOffset" disabled />
+ <view class="right" :class="[
+ (AnalysisMethodStatus == 1 || AnalysisMethodStatus == 3)?'disabled':''
+ ]">
+ <input type="number" v-model="checkData.HUpOffset"
+ :disabled="AnalysisMethodStatus == 1 || AnalysisMethodStatus == 3" @blur="CalculateLimitOffset(4)" />
</view>
</view>
<view class="form-item">
<view class="left">涓嬪亸宸�</view>
- <view class="right disabled">
- <input type="text" v-model="checkData.HDownOffset" disabled />
+ <view class="right" :class="[
+ (AnalysisMethodStatus == 1 || AnalysisMethodStatus == 3)?'disabled':''
+ ]">
+ <input type="number" v-model="checkData.HDownOffset"
+ :disabled="AnalysisMethodStatus == 1 || AnalysisMethodStatus == 3" @blur="CalculateLimitOffset(5)" />
</view>
</view>
<view style="width: 100%;border-bottom: 1px solid #e3e3e3;"></view>
@@ -120,8 +126,7 @@
{{ item.HInSpectResult == 1?"鍚堟牸":"涓嶅悎鏍�" }}
</view>
<view>
- <switch style="width: 3em; transform:scale(0.7);"
- :checked="item.HInSpectResult == 1"
+ <switch style="width: 3em; transform:scale(0.7);" :checked="item.HInSpectResult == 1"
@change="HInSpectResultChange(index, $event)" />
</view>
</view>
@@ -130,9 +135,9 @@
v-model="item.HInSpectValueB_Text"
@update:modelValue="HInSpectValueBChange(index, $event)"></uni-combox>
<input v-else-if="checkData.HAnalysisMethod == 2" type="number" v-model="item.HInSpectValue"
- @blur="InSpectValueChange(item,index)" @confirm="InSpectValueChange(item,index)" />
+ @blur="InSpectValueChange(item,index)" @confirm="InSpectValueChange(item,index)" @focus="item.HInSpectValue = ''" />
<input v-else type="number" v-model="item.HInSpectValueT"
- @blue="InSpectValueTChange(item, index)" @confirm="InSpectValueTChange(item, index)" />
+ @blue="InSpectValueTChange(item, index)" @confirm="InSpectValueTChange(item, index)" @focus="item.HInSpectValueT = ''"/>
</view>
</view>
</view>
@@ -157,7 +162,14 @@
HResult2: '',
HStatus: true,
HCompareSymbol: "=", // 榛樿涓�=鍙�
- HUnitName: ''
+ HUnitName: '',
+ HAnalysisMethod: 0,
+ HTargetVal: 0,
+ HUpOffset: 0,
+ HDownOffset: 0,
+ HUpLimit: 0,
+ HDownLimit: 0,
+ HSampleUnRightQty: 0
},
InSpectValues: [],
InitInSpectValNameList: [],
@@ -188,6 +200,7 @@
} = this.bindData
Object.assign(this.checkData, data, JSON.parse(JSON.stringify(this.bindData)))
this.checkData.HStatus = this.checkData.HStatus ? true : false
+ this.checkData.HResult2 = this.checkData.HResult == 1 ? '鍚堟牸' : '涓嶅悎鏍�'
// 鍒ゆ柇鏄惁鏈夌紦瀛樻暟鎹垨鑰呯紦瀛樻暟鎹槸鍚︿笌鏍锋湰鏁颁竴鑷�
if (!list || list.length != this.checkData.HSampleQty) {
for (let index = 0; index < this.checkData.HSampleQty; index++) {
@@ -221,12 +234,52 @@
}
}
},
+ computed: {
+ AnalysisMethodStatus: {
+ get() {
+ console.log('this.checkData.HAnalysisMethod: ', this.checkData.HAnalysisMethod);
+ if (this.checkData.HAnalysisMethod == 1) {
+ return 1
+ } else if (this.checkData.HAnalysisMethod == 2) {
+ return 2
+ }
+ return 3
+ }
+ }
+ },
beforeDestroy() {
// 娉ㄩ攢鍓嶏紝鎻愪氦鏁版嵁鐨勬楠屽��
this.set_SaveValue()
this.$emit("syncCheckData", this.checkData)
},
methods: {
+ CalculateLimitOffset(mode) { // 閲嶆柊璁$畻涓婇檺鍊肩殑鍋忓樊鍊�
+ switch (mode) {
+ // 鐩爣鍊煎彉鏇�
+ case 1:
+ this.checkData.HUpOffset = 0
+ this.checkData.HUpLimit = this.checkData.HTargetVal
+ this.checkData.HDownOffset = 0
+ this.checkData.HDownLimit = this.checkData.HTargetVal
+ break;
+ // 涓婇檺鍊煎彉鏇�
+ case 2:
+ this.checkData.HUpOffset = eval(`${this.checkData.HUpLimit}-${this.checkData.HTargetVal}`)
+ break;
+ // 涓嬮檺鍊煎彉鏇�
+ case 3:
+ this.checkData.HDownOffset = eval(`${this.checkData.HDownLimit}-${this.checkData.HTargetVal}`)
+ break;
+ // 涓婂亸宸�煎彉鏇�
+ case 4:
+ this.checkData.HUpLimit = eval(`${this.checkData.HUpOffset}-${this.checkData.HTargetVal}`)
+ break;
+ // 涓嬪亸宸�煎彉鏇�
+ case 5:
+ this.checkData.HDownLimit = eval(`${this.checkData.HDownOffset}-${this.checkData.HTargetVal}`)
+ break;
+ }
+ },
// 鍏朵粬鍒嗘瀽 妫�楠屽�煎彉鍖栨椂鍒ゆ柇
InSpectValueTChange(item, index) {
console.log('item,: ', item);
@@ -371,6 +424,7 @@
count
} = res.data
if (count == 1) {
+ console.log('InspectValuesData: ', data);
// 褰撳墠 妫�楠屽�奸〉绛句腑 淇濆瓨鐨勬暟鎹釜鏁板拰鏁版嵁搴撲腑鐨勪釜鏁板ぇ 鎴栬�呯浉绛夛紝鍙栨暟鎹簱涓殑鏁版嵁锛屽鐨勮ˉ绌�
if (this.InSpectValues.length >= data.length) {
let InSpectValuesNew = this.InSpectValues.slice(data.length, this.InSpectValues.length)
@@ -464,6 +518,7 @@
if (this.checkData.HStatus) { // true 涓� 妫�楠屽悎鏍硷紝 false涓烘楠� 涓嶅悎鏍�
if (unPassNum > unRightQty) {
this.checkData.HResult2 = '涓嶅悎鏍�'
+
} else {
this.checkData.HResult2 = '鍚堟牸'
}
diff --git a/pages/ZLGL/shoujianjianyan/form.vue b/pages/ZLGL/shoujianjianyan/form.vue
index f41aea2..5a12bf7 100644
--- a/pages/ZLGL/shoujianjianyan/form.vue
+++ b/pages/ZLGL/shoujianjianyan/form.vue
@@ -28,18 +28,18 @@
</view>
<view class="form-item">
<view class="left">婧愬崟绫诲瀷</view>
- <view class="right" style="position: relative">
- <picker mode="selector" :range="HSourceBillTypeNameList"
+ <view class="right" style="position: relative" :class="!hasSourceBill?'':'disabled'">
+ <picker mode="selector" :range="HSourceBillTypeNameList" :disabled="hasSourceBill"
@change="HSourceBillTypeNameChange">
- <input type="text" placeholder="璇疯緭鍏ユ垨鎵弿婧愬崟鍙�" v-model="HSourceBillType" />
+ <input type="text" placeholder="璇烽�夋嫨婧愬崟绫诲瀷" v-model="HSourceBillType" />
<view class="picker-overlay"></view>
</picker>
</view>
</view>
<view class="form-item">
<view class="left">婧愬崟鍗曞彿</view>
- <view class="right">
- <input type="text" placeholder="璇疯緭鍏ユ垨鎵弿婧愬崟鍙�" v-model="hform.HSourceBillNo"
+ <view class="right" :class="!hasSourceBill?'':'disabled'">
+ <input type="text" :disabled="hasSourceBill" placeholder="璇疯緭鍏ユ垨鎵弿婧愬崟鍙�" v-model="hform.HSourceBillNo"
@confirm="getSourceBillInfo(hform.HSourceBillNo)" />
</view>
<view class="icon-wrapper-big">
@@ -177,61 +177,61 @@
<view class="form-item">
<view class="left">鍒跺崟浜�</view>
<view class="right disabled">
- <input type="text" value="" disabled />
+ <input type="text" :value="hform.HMaker" disabled />
</view>
</view>
<view class="form-item">
<view class="left">鍒跺崟鏃ユ湡</view>
<view class="right disabled">
- <input type="text" value="" disabled />
+ <input type="text" :value="hform.HMakeDate" disabled />
</view>
</view>
<view class="form-item">
<view class="left">瀹℃牳浜�</view>
<view class="right disabled">
- <input type="text" value="" disabled />
+ <input type="text" :value="hform.HChecker" disabled />
</view>
</view>
<view class="form-item">
<view class="left">瀹℃牳鏃ユ湡</view>
<view class="right disabled">
- <input type="text" value="" disabled />
+ <input type="text" :value="hform.HCheckDate" disabled />
</view>
</view>
<view class="form-item">
<view class="left">鍏抽棴浜�</view>
<view class="right disabled">
- <input type="text" value="" disabled />
+ <input type="text" :value="hform.HCloseMan" disabled />
</view>
</view>
<view class="form-item">
<view class="left">鍏抽棴鏃ユ湡</view>
<view class="right disabled">
- <input type="text" value="" disabled />
+ <input type="text" :value="hform.HCloseDate" disabled />
</view>
</view>
<view class="form-item">
<view class="left">淇敼浜�</view>
<view class="right disabled">
- <input type="text" value="" disabled />
+ <input type="text" :value="hform.HUpDater" disabled />
</view>
</view>
<view class="form-item">
<view class="left">淇敼鏃ユ湡</view>
<view class="right disabled">
- <input type="text" value="" disabled />
+ <input type="text" :value="hform.HUpDateDate" disabled />
</view>
</view>
<view class="form-item">
<view class="left">浣滃簾浜�</view>
<view class="right disabled">
- <input type="text" value="" disabled />
+ <input type="text" :value="hform.HDeleteMan" disabled />
</view>
</view>
<view class="form-item">
<view class="left">浣滃簾鏃ユ湡</view>
<view class="right disabled">
- <input type="text" value="" disabled />
+ <input type="text" :value="hform.HDeleteDate" disabled />
</view>
</view>
</view>
@@ -381,17 +381,20 @@
<text>鏍锋湰涓嶅悎鏍兼暟锛�</text>{{ SamplingItem.HSampleUnRightQty }}
</view>
<view class="detail editable">
- <text>鏍锋湰鐮村潖鏁帮細</text>{{ SamplingItem.HSampleDamageQty }}
+ <text>鏍锋湰鐮村潖鏁帮細</text>
+ <view class="sampleDestory">
+ <input type="number" v-model="SamplingItem.HSampleDamageQty" />
+ </view>
</view>
<view class="detail editable">
<text>妫�楠岀粨鏋滐細</text>
<view style="border-radius: 15%; padding: 0 10rpx" :class="
- SamplingItem.HInspectResultToSee == '鍚堟牸'
- ? 'pass-background'
- : SamplingItem.HInspectResultToSee == '涓嶅悎鏍�'
- ? 'unpass-background'
- : ''
- ">
+ SamplingItem.HInspectResultToSee == '鍚堟牸'
+ ? 'pass-background'
+ : SamplingItem.HInspectResultToSee == '涓嶅悎鏍�'
+ ? 'unpass-background'
+ : ''
+ ">
{{ SamplingItem.HInspectResultToSee }}
</view>
</view>
@@ -487,6 +490,9 @@
mainTabSelected: 1,
subTabSelected: 1,
+
+ // 婧愬崟鐘舵�佹帶鍒�
+ hasSourceBill: false,
// 鎺у埗褰撳墠鏄剧ず鐨勫脊绐楁ā鍧�
enablePopupModule: "",
@@ -595,11 +601,11 @@
HDeleteMan: "",
HUpDateDate: "",
HDeleteDate: "",
- HResult: "",
+ HResult: 1,
HAnalysisMethod: "",
HResDec: "",
- HStatus: "",
+ HStatus: 1,
HMainSourceBillType: "",
HMainSourceInterID: "0",
@@ -628,7 +634,7 @@
});
},
async getSourceBillInfo(HBarCode) {
- console.log('HBarCode: ',HBarCode);
+ console.log('HBarCode: ', HBarCode);
// 鏍规嵁鍗曟嵁绫诲瀷锛岃皟鐢ㄤ笉鍚岀殑涓嬫帹鍑芥暟
if (this.hform.HSourceBillType == 3790) {
// 宸ュ簭杩涚珯鎺ユ敹鍗曞垪琛ㄩ妫�
@@ -748,7 +754,7 @@
this.hform.HProcExchBillNo = data[0].娴佽浆鍗″彿;
this.hform.HProcExchInterID = data[0].HProcExchInterID;
this.hform.HProcExchEntryID = data[0].HProcExchEntryID || 0;
- this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲�;
+ this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
this.hform.HICMOBillNo = data[0].浠诲姟鍗�;
this.hform.HICMOInterID = data[0].HICMOInterID;
this.hform.HICMOQty = data[0].HICMOQty || 0;
@@ -759,11 +765,13 @@
this.hform.HMainSourceBillNo = data[0].鍗曟嵁鍙�;
this.hform.HMainSourceBillType = data[0].HBillType;
this.hform.HMainSourceInterID = data[0].HInterID;
- this.hform.HICMOEntryID = data[0].HICMOEntryID || 0;
+ this.hform.HICMOEntryID = data[0].HICMOEntryID || 1;
this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
this.hform.HProcName = data[0].褰撳墠宸ュ簭;
this.hform.HBatchNo = data[0].鎵瑰彿;
+
+ this.hasSourceBill = true
this.get_CheckItem();
} catch (err) {
CommonUtils.showTips({
@@ -799,7 +807,7 @@
this.hform.HProcExchBillNo = data[0].娴佽浆鍗″彿;
this.hform.HProcExchInterID = data[0].HProcExchInterID;
this.hform.HProcExchEntryID = data[0].HProcExchEntryID;
- this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲�;
+ this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
this.hform.HICMOBillNo = data[0].浠诲姟鍗�;
this.hform.HICMOInterID = data[0].HICMOInterID;
this.hform.HICMOQty = data[0].HICMOQty;
@@ -810,11 +818,11 @@
this.hform.HMainSourceBillNo = data[0].鍗曟嵁鍙�;
this.hform.HMainSourceBillType = data[0].HBillType;
this.hform.HMainSourceInterID = data[0].HInterID;
- this.hform.HICMOEntryID = data[0].HICMOEntryID;
+ this.hform.HICMOEntryID = data[0].HICMOEntryID || 1;
this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
this.hform.HProcName = data[0].褰撳墠宸ュ簭;
-
+ this.hasSourceBill = true
this.get_CheckItem();
} catch (err) {
CommonUtils.showTips({
@@ -850,7 +858,7 @@
HProcExchBillNo = data[0].娴佽浆鍗″彿;
HProcExchInterID = data[0].HProcExchInterID;
HProcExchEntryID = data[0].HProcExchEntryID;
- HProcExchQty = data[0].娴佽浆鍗℃暟閲�;
+ HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
HICMOBillNo = data[0].鐢熶骇璁㈠崟鍙�;
HICMOInterID = data[0].HICMOInterID;
HICMOQty = data[0].HICMOQty;
@@ -861,8 +869,8 @@
HMainSourceBillNo = data[0].鍗曟嵁鍙�;
HMainSourceBillType = data[0].HBillType;
HMainSourceInterID = data[0].HInterID;
- HICMOEntryID = data[0].HICMOEntryID;
-
+ HICMOEntryID = data[0].HICMOEntryID || 1;
+ this.hasSourceBill = true
this.get_CheckItem();
} catch (err) {
CommonUtils.showTips({
@@ -898,7 +906,7 @@
this.hform.HProcExchBillNo = data[0].娴佽浆鍗″彿;
this.hform.HProcExchInterID = data[0].HProcExchInterID;
this.hform.HProcExchEntryID = data[0].HProcExchEntryID;
- this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲�;
+ this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲� || 0;
this.hform.HICMOBillNo = data[0].浠诲姟鍗�;
this.hform.HICMOInterID = data[0].HICMOInterID;
this.hform.HICMOQty = data[0].HICMOQty;
@@ -909,11 +917,16 @@
this.hform.HMainSourceBillNo = data[0].鍗曟嵁鍙�;
this.hform.HMainSourceBillType = data[0].HBillType;
this.hform.HMainSourceInterID = data[0].HInterID;
- this.hform.HICMOEntryID = data[0].HICMOEntryID;
+ this.hform.HICMOEntryID = data[0].HICMOEntryID || 1;
this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
this.hform.HProcName = data[0].褰撳墠宸ュ簭;
-
+
+ for(let i =0; i<data.length;i++) {
+ this.addCheckItem(data[i])
+ }
+
+ this.hasSourceBill = true
this.get_CheckItem();
} catch (err) {
CommonUtils.showTips({
@@ -1179,7 +1192,7 @@
// 缁撹淇敼
HResultChange(id, e) {
console.log("e: ", e);
- this.checkItems[id]["HResult"] = e.detail.value ? 1 : 0;
+ this.checkItems[id]["HResult"] = e.detail.value ? 1 : 2;
this.HCheckLastResult();
},
@@ -1187,7 +1200,7 @@
HCheckLastResult() {
let unPassNum = 0;
for (var key in this.checkItems) {
- if (this.checkItems[key]["HResult"] == 0) {
+ if (!(this.checkItems[key]["HResult"] == 1)) {
unPassNum++;
}
}
@@ -1302,7 +1315,7 @@
let data = e["retVal"][key];
Object.assign(this.hform, {
HICMOInterID: data.hmainid,
- HICMOEntryID: data.HEntryID,
+ HICMOEntryID: data.HEntryID || 1,
HICMOBillNo: data.鍗曟嵁鍙�,
HMaterNumber: data.浜у搧浠g爜,
HMaterName: data.浜у搧鍚嶇О,
@@ -1491,6 +1504,13 @@
},
// 甯﹀嚭妫�楠岄」鐩�
async get_CheckItem() {
+ // 棣栧厛娓呯┖妫�楠岄」鐩� 鍜� 妫�楠屽��
+ this.checkItems = {}
+ for (let key in this.subTabs) {
+ if (key.substring(1) == "_") {
+ this.$delete(this.subTabs, key)
+ }
+ }
try {
let res = await CommonUtils.doRequest2Async({
url: "/Web/GetCheckItemByCheckProjectID",
@@ -1541,9 +1561,11 @@
HInspectionLevel: data[i].妫�楠屾按骞�,
HRejectQty: data[i].鎷掔粷鏁�,
HStrictness: data[i].涓ユ牸搴�,
- HSampleUnRightQty: "",
+ HSampleUnRightQty: 0,
HAQL: data[i].AQL,
HSamplingType: data[i].鎶芥牱绫诲瀷,
+ HCompareSymbol: data[i].姣旇緝绗�,
+ HTargetVal: data[i].鐩爣鍊� || 0,
};
this.addCheckItem(checkItem);
@@ -1592,12 +1614,20 @@
});
}
},
- // 妫�楠岄」鐩繑鍥炲��
+ // 妫�楠屽�艰繑鍥炲��
InspectValueComplete(e) {
console.log("e: ", e);
let key = e.num;
+ e.HStatus = e.HStatus ? 1 : 0
+ if(e.HResult2 == ''){
+ e.HResult2 = this.checkItems[key].HResult
+ }
Object.assign(this.checkItems[key], e);
this.checkItems[key].HInspectResultToSee = this.checkItems[key].HResult2;
+ this.checkItems[key].HResult = this.checkItems[key].HResult2 == '鍚堟牸' ? 1 : 2;
+
+ this.HCheckLastResult();
+
},
checkSubmitValidate() {
if (this.hform.HICMOQty == "" || this.hform.HICMOQty <= 0) {
@@ -1607,7 +1637,7 @@
return false;
}
- if (this.hform.HFirstCheckEmp) {
+ if (this.hform.HFirstCheckEmp == 0) {
CommonUtils.showTips({
message: "妫�楠屽憳鏈�夋嫨锛�",
});
@@ -1615,7 +1645,7 @@
}
for (let key in this.checkItems) {
- if (this.checkItems[key].HQCCheckItemID) {
+ if (!this.checkItems[key].HQCCheckItemID) {
CommonUtils.showTips({
message: `绗�${this.checkItems[key].num}琛屾楠岄」鐩笉鑳戒负绌�!`,
});
@@ -1654,7 +1684,7 @@
}
if (
this.checkItems[key].HSampleUnRightQty == "" ||
- this.checkItems[key].HSampleUnRightQty == null
+ this.checkItems[key].HSampleUnRightQty == 0
) {
this.checkItems[key].HSampleUnRightQty = 0;
}
@@ -1666,15 +1696,17 @@
return true;
},
async submit() {
- if (!this.checkSubmitValidate) {
+ if (!this.checkSubmitValidate()) {
return;
}
try {
+ console.log('this.$refs: ',this.$refs);
// 妫�鏌ユ槸鍚︽湁鏈垏鎹㈢殑妫�楠屽�兼ā鍧�(鏄惁鍖呭惈set_SaveValue鏂规硶),濡傛灉鏈夛紝鍒欒繍琛屼竴娆′繚瀛樻楠屽�肩殑鏂规硶锛屾牴鎹楠屽�兼槸鍚︿繚瀛樻垚鍔熷啀鎵ц涓嬩竴姝�
- if (typeof this.$refs.InspectValueModules != "undefined") {
+ if (typeof this.$refs.InspectValueModules != "undefined" && this.$refs.InspectValueModules.length > 0) {
// 鍔犺浇鏈夋楠屽�兼ā鍧�
await this.$refs.InspectValueModules[0].set_SaveValue();
this.InspectValues[0] = this.$refs.InspectValueModules[0].InSpectValues;
+ await this.InspectValueComplete(this.$refs.InspectValueModules[0].checkData)
}
let InspectValuesTrans = [];
let HInterID = this.hform.HInterID;
@@ -1682,25 +1714,21 @@
let HEntryID = key;
InspectValuesTrans.push(
- `${JSON.stringify(this.InspectValues[key])};${HInterID};${HEntryID}`
+ `${JSON.stringify(this.InspectValues[key])}`
);
}
let checkItemsArray = [];
for (var key in this.checkItems) {
- checkItemsArray.push(this.checkItems[key].data);
+ let checkItem = JSON.parse(JSON.stringify(this.checkItems[key]))
+ delete checkItem.data
+ checkItemsArray.push(checkItem);
}
-
+ console.log('checkItemsArray: ',checkItemsArray);
let sMainSub = `${JSON.stringify(this.hform)};${JSON.stringify(
checkItemsArray
)};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0]}`;
console.log("this.checkItems: ", this.checkItems);
- let msg = {
- sMainSub: sMainSub,
- sValues: InspectValuesTrans,
- };
-
- console.log("msg: ", msg);
let res = await CommonUtils.doRequest2Sync({
url: "/QC_FirstPieceCheckBill/set_SaveBill",
data: {
@@ -1784,16 +1812,16 @@
HICMOBillNo: data[0].浠诲姟鍗曞彿,
HICMOQty: data[0].浠诲姟鍗曟暟閲�,
HICMOInterID: data[0].HICMOInterID,
- HICMOEntryID: data[0].HICMOEntryID,
+ HICMOEntryID: data[0].HICMOEntryID || 1,
HMaterID: data[0].HMaterID,
HMaterName: data[0].鐗╂枡鍚嶇О,
HMaterNumber: data[0].鐗╂枡浠g爜,
HProcID: data[0].HProcID,
HProcName: data[0].HProcName,
- HProcExchQty: data[0].HProcExchQty,
+ HProcExchQty: data[0].HProcExchQty || 0,
HProcExchBillNo: data[0].HProcExchBillNo,
HProcExchInterID: data[0].HProcExchInterID,
- HProcExchEntryID: data[0].HProcExchEntryID,
+ HProcExchEntryID: data[0].HProcExchEntryID || 0,
HFirstCheckEmp: data[0].HFirstCheckEmp,
HFirstCheckEmpName: data[0].璐ㄦ鍛樺悕绉�,
HQCSchemeID: data[0].妫�楠屾柟妗圛D,
@@ -1817,7 +1845,7 @@
HInspectionLevel: data[0].妫�楠屾按骞�,
HRejectQty: data[0].鎷掔粷鏁�,
HStrictness: data[0].涓ユ牸搴�,
- HSampleUnRightQty: data[0].鏍锋湰涓嶅悎鏍兼暟,
+ HSampleUnRightQty: data[0].鏍锋湰涓嶅悎鏍兼暟 || 0,
HSampleUnRightQty2: data[0].鏍锋湰涓嶅悎鏍兼暟,
HAQL: data[0].AQL,
HUnitID: data[0].HUnitID,
@@ -1837,9 +1865,21 @@
HShiftsName: data[0].鐝鍚嶇О,
HErrTreatment: data[0].寮傚父涓存椂澶勭悊鏂规,
HBatchNo: data[0].鎵瑰彿,
- HLastResult: data[0].鍒ゅ畾缁撹 == "鍚堟牸" ? "true" : "false",
+ HLastResult: data[0].鍒ゅ畾缁撹 == "鍚堟牸" ? true : false,
HTakeSampleCheckBillID: data[0].HTakeSampleCheckBillID,
HTakeSampleCheckBillNo: data[0].HTakeSampleCheckBillNo,
+ HAnalysisMethod: function(){
+ if(data[0].HAnalysisMethod == 1) {
+ return '瀹氭�ф楠�'
+ }else if(data[0].HAnalysisMethod == 2) {
+ return '瀹氶噺妫�楠�'
+ }else {
+ return '鍏朵粬妫�楠�'
+ }
+ }(),
+
+
+
});
for (let i = 0; i < data.length; i++) {
@@ -1859,10 +1899,8 @@
HAvg: data[i].骞冲潎鍊�,
HRemark: data[i].琛ㄤ綋澶囨敞,
HAnalysisMethod: data[i].鍒嗘瀽鏂规硶 == "瀹氭�у垎鏋�" ?
- 1 :
- data[i].鍒嗘瀽鏂规硶 == "瀹氶噺鍒嗘瀽" ?
- 2 :
- 3,
+ 1 : data[i].鍒嗘瀽鏂规硶 == "瀹氶噺鍒嗘瀽" ?
+ 2 : 3,
HKeyInspect: data[i].閲嶇偣妫�鏌� == "鍚�" ? false : true,
HSampleSchemeID: data[i].HSampleSchemeID,
HUnitID: data[i].HUnitID,
@@ -1885,8 +1923,13 @@
HSamplingType: 0,
HSamplingType: data[i].鎶芥牱绫诲瀷,
HStrictness: data[i].涓ユ牸搴�,
+ HInspectResultToSee: data[i].妫�楠岀粨鏋�
});
+
}
+
+
+ this.hasSourceBill = true
} else {
CommonUtils.showTips({
title: "娓╅Θ鎻愮ず",
@@ -1907,8 +1950,10 @@
if (this.operationType == 1) {
await this.getMaxBillNo();
} else if (this.operationType == 2) {
+
+ } else if (this.operationType == 3) {
await this.RoadBillMain();
- } else if (this.operationType == 3) {}
+ }
await this.InitHSource();
await this.InitHWorkShift();
@@ -2124,6 +2169,16 @@
display: inline-flex;
flex-direction: row;
align-items: center;
+
+ text {
+ flex-shrink: 0;
+ }
+
+ .sampleDestory {
+ border: 1px solid #acacac;
+ border-radius: 10%;
+ padding: 0 12rpx;
+ }
}
}
}
diff --git a/pages/ZLGL/shoujianjianyan/table.vue b/pages/ZLGL/shoujianjianyan/table.vue
index badb27c..2ed7aa2 100644
--- a/pages/ZLGL/shoujianjianyan/table.vue
+++ b/pages/ZLGL/shoujianjianyan/table.vue
@@ -344,7 +344,7 @@
edit(item) {
console.log("editItem:", item)
uni.navigateTo({
- url: `/pages/ZLGL/shoujianjianyan/form?operationType=2&linterid=${item.hmainid}`
+ url: `/pages/ZLGL/shoujianjianyan/form?operationType=3&linterid=${item.hmainid}`
})
}
},
--
Gitblit v1.9.1