From 9a3ea87cd2f74d61eb0c1c25a3ab0dc505e1e182 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 04 十一月 2025 20:07:35 +0800
Subject: [PATCH] 首件检验单 完善
---
pages/ZLGL/shoujianjianyan/form.vue | 1867 ++++++++++++++++++++++++++++++++++-------------------
components/ZLGL/InspectValueTemplate.vue | 221 +++++
2 files changed, 1,385 insertions(+), 703 deletions(-)
diff --git a/components/ZLGL/InspectValueTemplate.vue b/components/ZLGL/InspectValueTemplate.vue
index 30089fb..22cb0d4 100644
--- a/components/ZLGL/InspectValueTemplate.vue
+++ b/components/ZLGL/InspectValueTemplate.vue
@@ -21,7 +21,7 @@
</view>
<view class="form-item">
<view class="left">妫�楠岀粨鏋�</view>
- <view class="right disabled">
+ <view class="right" :class="CheckResultClass">
<input type="text" v-model="checkData.HResult2" disabled />
</view>
</view>
@@ -45,7 +45,7 @@
{{ checkData.HStatus?"鍚堟牸":"涓嶅悎鏍�" }}
</view>
<view>
- <switch style="width: 2em; transform:scale(0.7);" :checked="checkData.HStatus?'checked':''"
+ <switch style="width: 2em; transform:scale(0.7);" :checked="checkData.HStatus"
@change="HStatusChange" />
</view>
</view>
@@ -53,25 +53,26 @@
<view class="form-item">
<view class="left">姣旇緝绗�</view>
<view class="right disabled">
- <input type="text" v-model="checkData.HResult2" disabled />
+ <uni-combox :candidates="HCompareSymbolList" v-model="checkData.HCompareSymbol"></uni-combox>
</view>
</view>
<view class="form-item">
<view class="left">鍗曚綅</view>
<view class="right disabled">
- <input type="text" v-model="checkData.HTargetVal" disabled />
+ <uni-combox :candidates="UnitNameList" v-model="checkData.HUnitName"></uni-combox>
+ <!-- <input type="text" v-model="checkData.HTargetVal" /> -->
</view>
</view>
<view class="form-item">
<view class="left">妫�楠屽��</view>
- <view class="right disabled">
- <input type="text" v-model="checkData.HInSpectVal" disabled />
+ <view class="right">
+ <input type="text" v-model="checkData.HInSpectVal" />
</view>
</view>
<view class="form-item">
<view class="left">鐩爣鍊�</view>
- <view class="right disabled">
- <input type="text" v-model="checkData.HTargetVal" disabled />
+ <view class="right ">
+ <input type="text" v-model="checkData.HTargetVal" />
</view>
</view>
<view class="form-item">
@@ -120,7 +121,7 @@
</view>
<view>
<switch style="width: 3em; transform:scale(0.7);"
- :checked="item.HInSpectResult == 1?'checked':''"
+ :checked="item.HInSpectResult == 1"
@change="HInSpectResultChange(index, $event)" />
</view>
</view>
@@ -128,8 +129,10 @@
<uni-combox v-if="checkData.HAnalysisMethod == 1" :candidates="InitInSpectValNameList"
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" />
- <input v-else type="number" v-model="item.HInSpectValueT" />
+ <input v-else-if="checkData.HAnalysisMethod == 2" type="number" v-model="item.HInSpectValue"
+ @blur="InSpectValueChange(item,index)" @confirm="InSpectValueChange(item,index)" />
+ <input v-else type="number" v-model="item.HInSpectValueT"
+ @blue="InSpectValueTChange(item, index)" @confirm="InSpectValueTChange(item, index)" />
</view>
</view>
</view>
@@ -153,10 +156,18 @@
HResDec: 2,
HResult2: '',
HStatus: true,
+ HCompareSymbol: "=", // 榛樿涓�=鍙�
+ HUnitName: ''
},
InSpectValues: [],
InitInSpectValNameList: [],
InitInSpectValList: [],
+ UnitNameList: [],
+ UnitList: [],
+
+ CheckResultClass: 'disable',
+
+ HCompareSymbolList: ["=", ">", ">=", "<", "<=", "<>", "between"]
};
},
props: {
@@ -175,7 +186,8 @@
data,
list
} = this.bindData
- this.checkData = Object.assign(data, JSON.parse(JSON.stringify(this.bindData)))
+ Object.assign(this.checkData, data, JSON.parse(JSON.stringify(this.bindData)))
+ this.checkData.HStatus = this.checkData.HStatus ? true : false
// 鍒ゆ柇鏄惁鏈夌紦瀛樻暟鎹垨鑰呯紦瀛樻暟鎹槸鍚︿笌鏍锋湰鏁颁竴鑷�
if (!list || list.length != this.checkData.HSampleQty) {
for (let index = 0; index < this.checkData.HSampleQty; index++) {
@@ -192,16 +204,125 @@
this.InSpectValues = list
}
this.InitInSpectVal()
+ this.InitUnit()
// 瀹炰緥鎸傝浇鍚庯紝鑾峰彇InterID 鍜� EntryID 瀵瑰簲鐨勬楠岄」鐩殑妫�楠屽��
this.getValueList()
this.$forceUpdate()
},
+ watch: {
+ "checkData.HResult2"(newVal, oldVal) {
+ if (newVal == '鍚堟牸') {
+ this.CheckResultClass = 'pass-background'
+ } else if (newVal == '涓嶅悎鏍�') {
+ this.CheckResultClass = 'unpass-background'
+ } else {
+ this.CheckResultClass = 'disabled'
+ }
+ }
+ },
beforeDestroy() {
- // 娉ㄩ攢鍓嶏紝鎻愪氦鏁版嵁鐨勬楠屽�硷紝 骞跺皢鏈�鍚庝竴娆℃彁浜ょ殑妫�楠屽�煎悓姝ヨ嚦鐖舵ā鍧�
+ // 娉ㄩ攢鍓嶏紝鎻愪氦鏁版嵁鐨勬楠屽��
this.set_SaveValue()
+ this.$emit("syncCheckData", this.checkData)
},
methods: {
+ // 鍏朵粬鍒嗘瀽 妫�楠屽�煎彉鍖栨椂鍒ゆ柇
+ InSpectValueTChange(item, index) {
+ console.log('item,: ', item);
+
+ this.HInSpectResultChange(index, {
+ detail: {
+ value: this.checkValuePass(item.HInSpectValueT)
+ }
+ })
+ },
+ // 瀹氶噺鍒嗘瀽 妫�楠屽�煎彉鍖栨椂鍒ゆ柇
+ InSpectValueChange(item, index) {
+ console.log('item,: ', item);
+
+ this.HInSpectResultChange(index, {
+ detail: {
+ value: this.checkValuePass(item.HInSpectValue)
+ }
+ })
+ },
+ checkValuePass(val) {
+ console.log('val: ', val);
+ console.log('this.checkData.HTargetVal: ', this.checkData.HTargetVal);
+ switch (this.checkData.HCompareSymbol) {
+ case '=':
+ if (val == this.checkData.HTargetVal) {
+ return true
+ };
+ break;
+ case '>':
+ if (val > this.checkData.HTargetVal) {
+ return true
+ };
+ break;
+ case '>=':
+ if (val >= this.checkData.HTargetVal) {
+ return true
+ };
+ break;
+ case '<':
+ if (val < this.checkData.HTargetVal) {
+ return true
+ };
+ break;
+ case '<=':
+ if (val <= this.checkData.HTargetVal) {
+ return true
+ };
+ break;
+ case '<>':
+ if (val != this.checkData.HTargetVal) {
+ return true
+ };
+ break;
+ case 'between':
+ if (val >= (this.checkData.HTargetVal - this.checkData.HDownLimit || 0) &&
+ val <= (this.checkData.HTargetVal + this.checkData.HUpLimit || 0)) {
+ return true
+ };
+ break;
+ default:
+ CommonUtils.showTips({
+ message: '璇烽�夋嫨姣旇緝绗�'
+ })
+ }
+ },
+ // 鍒濆鍖� 鍗曚綅
+ async InitUnit() {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Gy_Unit/list1',
+ data: {
+ sWhere: ` and 绂佺敤鏍囪 = '' and 瀹℃牳浜� != ''`,
+ user: getUserInfo()['Czymc'],
+ Organization: uni.getStorageSync("Organization")
+ }
+ })
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (!count) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鍒濆鍖栧崟浣嶉敊璇�: ${Message}`
+ })
+ } else {
+ this.UnitNameList = Array.from(data).map(e => e["璁¢噺鍗曚綅鍚嶇О"])
+ this.UnitList = data
+ }
+ },
+ // 鍗曚綅 淇敼 鐩戝惉
+ UnitChange(e) {
+
+ },
async set_SaveValue() {
console.log("InSpect Values: ", this.InSpectValues)
try {
@@ -250,17 +371,16 @@
count
} = res.data
if (count == 1) {
- // if (this.InSpectValues.length >= data.length) {
- // console.log('data: ',data);
-
-
- // console.log('this.InSpectValues: ',this.InSpectValues);
-
- // } else {
- // this.InSpectValues = data.slice(0, this.InSpectValues.length)
- // }
- this.InSpectValues = data
-
+ // 褰撳墠 妫�楠屽�奸〉绛句腑 淇濆瓨鐨勬暟鎹釜鏁板拰鏁版嵁搴撲腑鐨勪釜鏁板ぇ 鎴栬�呯浉绛夛紝鍙栨暟鎹簱涓殑鏁版嵁锛屽鐨勮ˉ绌�
+ if (this.InSpectValues.length >= data.length) {
+ let InSpectValuesNew = this.InSpectValues.slice(data.length, this.InSpectValues.length)
+ this.InSpectValues = [...data, ...InSpectValuesNew]
+ } else {
+ // 鎴彇褰撳墠淇濆瓨鐨勬暟鎹�
+ this.InSpectValues = data.slice(0, this.InSpectValues.length)
+ }
+ // this.InSpectValues = data
+
}
} catch (err) {
CommonUtils.showTips({
@@ -332,15 +452,37 @@
},
HInSpectResultChange(index, e) {
console.log('e: ', e.detail.value);
- this.InSpectValues[index].HInSpectResult = e.detail.value?1:2
+ this.InSpectValues[index].HInSpectResult = e.detail.value ? 1 : 2
+ this.CheckPassNum()
+
},
+ CheckPassNum() {
+ let unPassNum = this.InSpectValues.map(elem => elem.HInSpectResult).filter(elem => elem != 1).length
+
+ this.checkData.HSampleUnRightQty = unPassNum
+ let unRightQty = this.checkData.HAcceptQty
+ if (this.checkData.HStatus) { // true 涓� 妫�楠屽悎鏍硷紝 false涓烘楠� 涓嶅悎鏍�
+ if (unPassNum > unRightQty) {
+ this.checkData.HResult2 = '涓嶅悎鏍�'
+ } else {
+ this.checkData.HResult2 = '鍚堟牸'
+ }
+ } else {
+ if (this.InSpectValues.length - unPassNum > unRightQty) {
+ this.checkData.HResult2 = '涓嶅悎鏍�'
+ } else {
+ this.checkData.HResult2 = '鍚堟牸'
+ }
+ }
+
+ }
},
}
</script>
-<style lang="scss">
+<style lang="scss" scoped>
input {
height: inherit;
width: inherit;
@@ -382,6 +524,21 @@
display: flex;
flex-direction: row;
align-items: center;
+
+ .uni-combox {
+ padding: 0;
+ height: auto;
+
+ .uni-input-placeholder,
+ .uni-input-input {
+ font-size: 26rpx;
+ }
+ }
+
+ .uni-combox::v-deep input {
+ height: inherit;
+ font-size: 26rpx;
+ }
}
.disabled {
@@ -389,12 +546,24 @@
background-color: #e4e4e4;
}
+ .pass-background {
+ background-color: #CEE3F2;
+ border: none;
+ }
+
+ .unpass-background {
+ background-color: #F0D6E3;
+ border: none;
+ }
+
.none-border {
border: none;
}
}
}
+
+
.InSpect-value-list {
box-sizing: border-box;
display: flex;
diff --git a/pages/ZLGL/shoujianjianyan/form.vue b/pages/ZLGL/shoujianjianyan/form.vue
index a78defc..f41aea2 100644
--- a/pages/ZLGL/shoujianjianyan/form.vue
+++ b/pages/ZLGL/shoujianjianyan/form.vue
@@ -4,8 +4,8 @@
<view class="bill-main-area">
<!-- 涓昏〃椤电 -->
<view class="bill-main-tabs">
- <view :class="mainTabSelected == 1 ? 'selected':''" @tap="mainTabSelected = 1">鍩烘湰淇℃伅</view>
- <view :class="mainTabSelected == 2 ? 'selected':''" @tap="mainTabSelected = 2">鍒跺崟淇℃伅</view>
+ <view :class="mainTabSelected == 1 ? 'selected' : ''" @tap="mainTabSelected = 1">鍩烘湰淇℃伅</view>
+ <view :class="mainTabSelected == 2 ? 'selected' : ''" @tap="mainTabSelected = 2">鍒跺崟淇℃伅</view>
</view>
<!-- 涓昏〃鍐呭 -->
<view class="bill-main-contents">
@@ -22,8 +22,33 @@
<view class="left">鏃ユ湡</view>
<view class="right">
<uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HDate">
- <view>{{hform.HDate}}</view>
+ <view>{{ hform.HDate }}</view>
</uni-datetime-picker>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">婧愬崟绫诲瀷</view>
+ <view class="right" style="position: relative">
+ <picker mode="selector" :range="HSourceBillTypeNameList"
+ @change="HSourceBillTypeNameChange">
+ <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"
+ @confirm="getSourceBillInfo(hform.HSourceBillNo)" />
+ </view>
+ <view class="icon-wrapper-big">
+ <uni-icons class="right-icon" type="scan" style="
+ background-color: #3a78ff;
+ padding: 6rpx;
+ color: #fff;
+ border-radius: 100%;
+ " size="20" @click="toScanCode"></uni-icons>
</view>
</view>
<view class="form-item">
@@ -40,6 +65,11 @@
v-model="hform.HShiftsName" @update:modelValue="HWorkShiftChange"></uni-combox>
</view>
</view>
+ <!-- <view class="form-item">
+ <view class="left"></view>
+ <view class="right">
+ <input type="text"></view>
+ </view> -->
<view class="form-item">
<view class="left">浠诲姟鍗曞彿</view>
<view class="right disabled">
@@ -110,12 +140,12 @@
<view class="right none-border">
<radio-group @changer="checkResultChange">
<label>
- <radio value="0" :checked="judgeConclusion" /><text></text>
+ <radio value="0" :checked="hform.HLastResult" /><text></text>
鍚堟牸
</label>
- <view style="width: 20rpx;display: inline-block;"></view>
+ <view style="width: 20rpx; display: inline-block"></view>
<label>
- <radio value="1" :checked="!judgeConclusion" /><text></text>
+ <radio value="1" :checked="!hform.HLastResult" /><text></text>
涓嶅悎鏍�
</label>
</radio-group>
@@ -211,8 +241,8 @@
<view class="bill-sub-area">
<!-- 瀛愯〃椤电 -->
<view class="bill-sub-tabs">
- <view v-for="subTab in subTabs" :key="subTab.id" :class="subTab.id == subTabSelected ? 'selected':''"
- @tap="subTabSelected = subTab.id">{{subTab.name}}</view>
+ <view v-for="subTab in subTabs" :key="subTab.id" :class="subTab.id == subTabSelected ? 'selected' : ''"
+ @tap="subTabSelected = subTab.id">{{ subTab.name }}</view>
</view>
<!-- 瀛愯〃鍐呭 -->
<view class="bill-main-contents">
@@ -220,40 +250,38 @@
<view v-if="subTabSelected == 1">
<!-- 闇�閫氳繃鏄惧紡璋冪敤蹇界暐$event鍙傛暟 -->
<view class="buttons" @tap="addCheckItem()">
- <uni-icons type="plus" style="margin-right: 10rpx;" size="22"></uni-icons>鏂板
+ <uni-icons type="plus" style="margin-right: 10rpx" size="22"></uni-icons>鏂板
</view>
<view class="over" v-if="!checkItems || getObjLength(checkItems) == 0">鏆傛棤鏁版嵁</view>
<view class="list" v-else>
<uni-card v-for="checkItem in checkItems" :key="checkItem.num">
<view class="card-detail">
- <view class="detail">
- <text>搴忓彿锛�</text>{{checkItem.num}}
- </view>
+ <view class="detail"> <text>搴忓彿锛�</text>{{ checkItem.num }} </view>
<view class="detail editable">
- <view style="flex-shrink: 0;"><text>妫�楠岄」鐩細</text></view>
+ <view style="flex-shrink: 0"><text>妫�楠岄」鐩細</text></view>
<input type="text" :value="checkItem.HQCCheckItemName" disabled="" />
<view class="icon-wrapper"><uni-icons type="search" size="16"
@click="showSelectorModule(checkItem, 2)"></uni-icons></view>
</view>
<view class="detail editable">
- <view style="flex-shrink: 0;"><text>妫�楠屼华鍣細</text></view>
+ <view style="flex-shrink: 0"><text>妫�楠屼华鍣細</text></view>
<input type="text" :value="checkItem.HInspectInstruMentName" disabled="" />
<view class="icon-wrapper"><uni-icons type="search" size="16"
@click="showSelectorModule(checkItem, 3)"></uni-icons></view>
</view>
<view class="detail editable">
<view><text>缁撹锛�</text></view>
- <view style="width: 4em; ">
- {{ checkItem.HResult == 1?"鍚堟牸":"涓嶅悎鏍�" }}
+ <view style="width: 4em">
+ {{ checkItem.HResult == 1 ? "鍚堟牸" : "涓嶅悎鏍�" }}
</view>
<view>
- <switch style="width: 2em; transform:scale(0.7);"
+ <switch style="width: 2em; transform: scale(0.7)"
:checked="checkItem.HResult == 1"
@change="HResultChange(checkItem.num, $event)" />
</view>
</view>
- <view class="detail editable" style="position: relative;">
- <view style="flex-shrink: 0;"><text>鍒嗘瀽鏂规硶锛�</text></view>
+ <view class="detail editable" style="position: relative">
+ <view style="flex-shrink: 0"><text>鍒嗘瀽鏂规硶锛�</text></view>
<picker :range="arrayAnalysisMethod" range-key="name"
@change="HAnalysisMethodChange(checkItem.num, $event)">
<input disabled :value="getAnalysisMethodDisplay(checkItem.HAnalysisMethod)"
@@ -262,48 +290,48 @@
</picker>
</view>
<view class="detail editable">
- <view style="flex-shrink: 0;"><text>閲嶇偣妫�鏌ワ細</text></view>
+ <view style="flex-shrink: 0"><text>閲嶇偣妫�鏌ワ細</text></view>
<view>
- <switch type="checkbox" style="transform:scale(0.7);"
+ <switch type="checkbox" style="transform: scale(0.7)"
:checked="checkItem.HKeyInspect"
@change="HKeyInspectChange(checkItem, $event)" />
</view>
</view>
<view class="detail" v-if="checkItem.HQCStd">
- <text>妫�楠屾爣鍑嗭細</text>{{checkItem.HQCStd}}
+ <text>妫�楠屾爣鍑嗭細</text>{{ checkItem.HQCStd }}
</view>
<view class="detail" v-if="checkItem.HUnit">
- <text>鍗曚綅锛�</text>{{checkItem.HUnit}}
+ <text>鍗曚綅锛�</text>{{ checkItem.HUnit }}
</view>
<view class="detail" v-if="checkItem.HQCStd">
- <text>妫�楠屽�硷細</text>{{checkItem.HQCStd}}
+ <text>妫�楠屽�硷細</text>{{ checkItem.HQCStd }}
</view>
<view class="detail" v-if="checkItem.HQCNote">
- <text>妫�楠岃褰曪細</text>{{checkItem.HQCNote}}
+ <text>妫�楠岃褰曪細</text>{{ checkItem.HQCNote }}
</view>
<view class="detail" v-if="checkItem.HTargetVal">
- <text>鐩爣鍊硷細</text>{{checkItem.HTargetVal}}
+ <text>鐩爣鍊硷細</text>{{ checkItem.HTargetVal }}
</view>
<view class="detail" v-if="checkItem.HUpLimit">
- <text>涓婇檺鍊硷細</text>{{checkItem.HUpLimit}}
+ <text>涓婇檺鍊硷細</text>{{ checkItem.HUpLimit }}
</view>
<view class="detail" v-if="checkItem.HDownLimit">
- <text>涓嬮檺鍊硷細</text>{{checkItem.HDownLimit}}
+ <text>涓嬮檺鍊硷細</text>{{ checkItem.HDownLimit }}
</view>
<view class="detail" v-if="checkItem.HMax">
- <text>鏈�澶у�硷細</text>{{checkItem.HMax}}
+ <text>鏈�澶у�硷細</text>{{ checkItem.HMax }}
</view>
<view class="detail" v-if="checkItem.HMin">
- <text>鏈�灏忓�硷細</text>{{checkItem.HMin}}
+ <text>鏈�灏忓�硷細</text>{{ checkItem.HMin }}
</view>
<view class="detail" v-if="checkItem.HAvg">
- <text>骞冲潎鍊硷細</text>{{checkItem.HAvg}}
+ <text>骞冲潎鍊硷細</text>{{ checkItem.HAvg }}
</view>
</view>
- <view style="height: 20rpx;"></view>
+ <view style="height: 20rpx"></view>
<view class="more">
- <view class="part" style="color: #da0000;" @tap.stop="removeCheckItem(checkItem)">
- <uni-icons type="trash" style="color: #da0000;margin-right: 10rpx;"
+ <view class="part" style="color: #da0000" @tap.stop="removeCheckItem(checkItem)">
+ <uni-icons type="trash" style="color: #da0000; margin-right: 10rpx"
size="18"></uni-icons>鍒犻櫎
</view>
</view>
@@ -316,49 +344,56 @@
<view class="list" v-else>
<uni-card v-for="SamplingItem in checkItems" :key="SamplingItem.num">
<view class="card-detail">
- <view class="detail">
- <text>搴忓彿锛�</text>{{SamplingItem.num}}
- </view>
+ <view class="detail"> <text>搴忓彿锛�</text>{{ SamplingItem.num }} </view>
<view class="detail editable">
- <text>妫�楠岄」鐩細</text>{{SamplingItem.HQCCheckItemName}}
+ <text>妫�楠岄」鐩細</text>{{ SamplingItem.HQCCheckItemName }}
</view>
- <view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3;"></view>
- <view class="detail editable" style="width: 100%;">
- <view style="flex-shrink: 0;"><text>鎶芥牱鏂规锛�</text></view>
+ <view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3"></view>
+ <view class="detail editable" style="width: 100%">
+ <view style="flex-shrink: 0"><text>鎶芥牱鏂规锛�</text></view>
<input type="text" :value="SamplingItem.HSampleSchemeName" disabled />
<view class="icon-wrapper"><uni-icons type="search" size="16"
@click="showSelectorModule(SamplingItem, 1)"></uni-icons></view>
</view>
<view class="detail editable">
- <text>鎶芥牱绫诲瀷锛�</text>{{SamplingItem.HSamplingType}}
+ <text>鎶芥牱绫诲瀷锛�</text>{{ SamplingItem.HSamplingType }}
</view>
<view class="detail editable">
- <text>妫�楠屾按骞筹細</text>{{SamplingItem.HInspectionLevel}}
+ <text>妫�楠屾按骞筹細</text>{{ SamplingItem.HInspectionLevel }}
</view>
<view class="detail editable">
- <text>涓ユ牸搴︼細</text>{{SamplingItem.HStrictness}}
+ <text>涓ユ牸搴︼細</text>{{ SamplingItem.HStrictness }}
</view>
<view class="detail editable">
- <text>AQL锛�</text>{{SamplingItem.HAQL}}
+ <text>AQL锛�</text>{{ SamplingItem.HAQL }}
</view>
- <view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3;"></view>
+ <view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3"></view>
<view class="detail editable">
- <text>鏍锋湰閲忥細</text>{{SamplingItem.HSampleQty}}
+ <text>鏍锋湰閲忥細</text>{{ SamplingItem.HSampleQty }}
</view>
<view class="detail editable">
- <text>鍏佽鏁帮細</text>{{SamplingItem.HAcceptQty}}
+ <text>鍏佽鏁帮細</text>{{ SamplingItem.HAcceptQty }}
</view>
<view class="detail editable">
- <text>鎷掔粷鏁帮細</text>{{SamplingItem.HRejectQty}}
+ <text>鎷掔粷鏁帮細</text>{{ SamplingItem.HRejectQty }}
</view>
<view class="detail editable">
- <text>鏍锋湰涓嶅悎鏍兼暟锛�</text>{{SamplingItem.HSampleUnRightQty}}
+ <text>鏍锋湰涓嶅悎鏍兼暟锛�</text>{{ SamplingItem.HSampleUnRightQty }}
</view>
<view class="detail editable">
- <text>鏍锋湰鐮村潖鏁帮細</text>{{SamplingItem.HSampleDamageQty}}
+ <text>鏍锋湰鐮村潖鏁帮細</text>{{ SamplingItem.HSampleDamageQty }}
</view>
<view class="detail editable">
- <text>妫�楠岀粨鏋滐細</text>{{SamplingItem.HInspectResultToSee}}
+ <text>妫�楠岀粨鏋滐細</text>
+ <view style="border-radius: 15%; padding: 0 10rpx" :class="
+ SamplingItem.HInspectResultToSee == '鍚堟牸'
+ ? 'pass-background'
+ : SamplingItem.HInspectResultToSee == '涓嶅悎鏍�'
+ ? 'unpass-background'
+ : ''
+ ">
+ {{ SamplingItem.HInspectResultToSee }}
+ </view>
</view>
</view>
</uni-card>
@@ -368,17 +403,19 @@
<view v-else v-for="item in InspectModules" :key="item.id">
<view v-if="subTabSelected == item.id">
<InspectValueTemplateVue ref="InspectValueModules" :bind-key="item.id"
- :bind-data="{data: checkItems[item.checkItemId], list: InspectValues[item.checkItemId]}">
+ @syncCheckData="InspectValueComplete" :bind-data="{
+ data: checkItems[item.checkItemId],
+ list: InspectValues[item.checkItemId],
+ }">
</InspectValueTemplateVue>
</view>
</view>
-
</view>
</view>
- <view style="height: 120rpx;"></view>
+ <view style="height: 120rpx"></view>
<view class="bottom-btn">
<button class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
- <view style="flex: 1;"></view>
+ <view style="flex: 1"></view>
<button class="btn-a" size="mini" @tap="addNew">鏂板</button>
<button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
</view>
@@ -406,22 +443,25 @@
</template>
<script>
- import dayjs from 'dayjs'
+ import dayjs from "dayjs";
import {
CommonUtils
- } from '../../../utils/common'
- import InspectValueTemplateVue from '@/components/ZLGL/InspectValueTemplate.vue'
- import SampleSchemePopupVue from '@/components/ZLGL/SampleSchemePopup.vue'
- import CheckItemPopupVue from '@/components/ZLGL/CheckItemPopup.vue'
- import InspectMentPopupVue from '../../../components/ZLGL/InspectMentPopup.vue'
- import MaterialPopupVue from '../../../components/ZLGL/MaterialPopup.vue'
- import ICMOBillPopupVue from '../../../components/ZLGL/ICMOBillPopup.vue'
- import ProcExchBillPopupVue from '../../../components/ZLGL/ProcExchBillPopup.vue'
- import ProcessPopupVue from '../../../components/ZLGL/ProcessPopup.vue'
- import CheckProjectPopupVue from '../../../components/ZLGL/CheckProjectPopup.vue'
+ } from "../../../utils/common";
+ import InspectValueTemplateVue from "@/components/ZLGL/InspectValueTemplate.vue";
+ import SampleSchemePopupVue from "@/components/ZLGL/SampleSchemePopup.vue";
+ import CheckItemPopupVue from "@/components/ZLGL/CheckItemPopup.vue";
+ import InspectMentPopupVue from "../../../components/ZLGL/InspectMentPopup.vue";
+ import MaterialPopupVue from "../../../components/ZLGL/MaterialPopup.vue";
+ import ICMOBillPopupVue from "../../../components/ZLGL/ICMOBillPopup.vue";
+ import ProcExchBillPopupVue from "../../../components/ZLGL/ProcExchBillPopup.vue";
+ import ProcessPopupVue from "../../../components/ZLGL/ProcessPopup.vue";
+ import CheckProjectPopupVue from "../../../components/ZLGL/CheckProjectPopup.vue";
import {
getUserInfo
- } from '../../../utils/auth'
+ } from "../../../utils/auth";
+ import {
+ MpaasScan
+ } from "../../../utils/mpaasScan";
export default {
components: {
InspectValueTemplateVue,
@@ -432,14 +472,14 @@
ICMOBillPopupVue,
ProcExchBillPopupVue,
ProcessPopupVue,
- CheckProjectPopupVue
+ CheckProjectPopupVue,
},
computed: {
judgeConclusion: {
get() {
- return true
- }
- }
+ return true;
+ },
+ },
},
data() {
return {
@@ -449,9 +489,17 @@
subTabSelected: 1,
// 鎺у埗褰撳墠鏄剧ず鐨勫脊绐楁ā鍧�
- enablePopupModule: '',
- PopupModuleNameList: ["", "SampleScheme", "CheckItem",
- "InspectMent", "Material", "ICMOBill", "ProcExchBill", "QCScheme", "Process"
+ enablePopupModule: "",
+ PopupModuleNameList: [
+ "",
+ "SampleScheme",
+ "CheckItem",
+ "InspectMent",
+ "Material",
+ "ICMOBill",
+ "ProcExchBill",
+ "QCScheme",
+ "Process",
],
// 褰撳墠鎿嶄綔鐨勬楠屽崟ID缂撳瓨
currentChechItemIDCache: -1,
@@ -469,315 +517,634 @@
// 妫�楠屾柟妗�
arrayAnalysisMethod: [{
- value: 1,
- name: '瀹氭�у垎鏋�'
- }, {
- value: 2,
- name: '瀹氶噺鍒嗘瀽'
- }, {
- value: 3,
- name: '鍏朵粬鍒嗘瀽'
- }],
+ value: 1,
+ name: "瀹氭�у垎鏋�",
+ },
+ {
+ value: 2,
+ name: "瀹氶噺鍒嗘瀽",
+ },
+ {
+ value: 3,
+ name: "鍏朵粬鍒嗘瀽",
+ },
+ ],
ArrayAnalysisMethodValue: [1, 2, 3],
// 瀛愯〃 椤电淇℃伅
subTabs: {
- "1": {
+ 1: {
id: "1",
- name: "妫�楠岄」鐩�"
+ name: "妫�楠岄」鐩�",
},
- "2": {
+ 2: {
id: "2",
- name: "鎶芥牱妫�楠�"
- }
+ name: "鎶芥牱妫�楠�",
+ },
},
+
+ // 婧愬崟绫诲瀷
+ HSourceBillType: "宸ュ簭杩涚珯鎺ユ敹鍗�",
+ HSourceBillTypeValueList: ["3790", "3793", "3710", "3772"],
+ HSourceBillTypeNameList: [
+ "宸ュ簭杩涚珯鎺ユ敹鍗�",
+ "宸ュ簭濮斿鎺ユ敹鍗�",
+ "鐢熶骇璁㈠崟",
+ "宸ュ簭娴佽浆鍗�",
+ ],
// 涓昏〃灞炴��
hform: {
- "HBillNo": "",
- "HInterID": "0",
- "HDate": dayjs(new Date()).format("YYYY-MM-DD"),
- "HSourceName": "",
- "HSourceID": "0",
- "HShiftsName": "",
- "HShiftsID": "0",
- "HICMOBillNo": "",
- "HICMOInterID": "0",
- "HICMOEntryID": "1",
- "HICMOQty": "0",
- "HProcExchBillNo": "",
- "HProcExchInterID": "0",
- "HProcExchEntryID": "0",
- "HProcExchQty": "0",
- "HMaterNumber": "",
- "HMaterID": "0",
- "HMaterName": "",
- "HFirstCheckEmpName": "",
- "HFirstCheckEmp": 0,
- "HQCSchemeName": "",
- "HQCSchemeID": "0",
- "HBatchNo": "",
- "HLastResult": true, // 榛樿鍚堟牸
- "HProcName": "",
- "HProcID": "0",
- "HTakeSampleCheckBillNo": "", // 鍙栨牱鍗�
- "HTakeSampleCheckBillID": "0",
- "HRemark": "",
- "HErrTreatment": "", // 寮傚父涓存椂澶勭悊鏂规
- "HMaker": getUserInfo()["Czymc"] || "",
- "HChecker": "",
- "HCloseMan": "",
- "HMakeDate": dayjs(new Date()).format("YYYY-MM-DDTHH:mm:ss"),
- "HCheckDate": "",
- "HCloseDate": "",
- "HUpDater": "",
- "HDeleteMan": "",
- "HUpDateDate": "",
- "HDeleteDate": "",
- "HResult": "",
- "HAnalysisMethod": "",
+ HSourceBillType: "3790",
+ HSourceBillNo: "",
+ HBillNo: "",
+ HInterID: "0",
+ HDate: dayjs(new Date()).format("YYYY-MM-DD"),
+ HSourceName: "",
+ HSourceID: "0",
+ HShiftsName: "",
+ HShiftsID: "0",
+ HICMOBillNo: "",
+ HICMOInterID: "0",
+ HICMOEntryID: "1",
+ HICMOQty: "0",
+ HProcExchBillNo: "",
+ HProcExchInterID: "0",
+ HProcExchEntryID: "0",
+ HProcExchQty: "0",
+ HMaterNumber: "",
+ HMaterID: "0",
+ HMaterName: "",
+ HFirstCheckEmpName: "",
+ HFirstCheckEmp: 0,
+ HQCSchemeName: "",
+ HQCSchemeID: "0",
+ HBatchNo: "",
+ HLastResult: true, // 榛樿鍚堟牸
+ HProcName: "",
+ HProcID: "0",
+ HTakeSampleCheckBillNo: "", // 鍙栨牱鍗�
+ HTakeSampleCheckBillID: "0",
+ HRemark: "",
+ HErrTreatment: "", // 寮傚父涓存椂澶勭悊鏂规
+ HMaker: getUserInfo()["Czymc"] || "",
+ HChecker: "",
+ HCloseMan: "",
+ HMakeDate: dayjs(new Date()).format("YYYY-MM-DDTHH:mm:ss"),
+ HCheckDate: "",
+ HCloseDate: "",
+ HUpDater: "",
+ HDeleteMan: "",
+ HUpDateDate: "",
+ HDeleteDate: "",
+ HResult: "",
+ HAnalysisMethod: "",
- "HResDec": "",
- "HStatus": "",
+ HResDec: "",
+ HStatus: "",
- "HMainSourceBillType": "",
- "HMainSourceInterID": "0",
- "HMainSourceEntryID": "1",
- "HMainSourceBillNo": ""
+ HMainSourceBillType: "",
+ HMainSourceInterID: "0",
+ HMainSourceEntryID: "1",
+ HMainSourceBillNo: "",
},
// 妫�楠岄」鐩拰鎶芥牱妫�楠� 鍊�
- checkItems: {
-
- },
+ checkItems: {},
// 妫�娴嬪�兼ā鍧�
- InspectModules: {
-
- },
+ InspectModules: {},
// 妫�娴嬪��
- InspectValues: {
-
- }
- }
+ InspectValues: {},
+ };
},
methods: {
+ // 婧愬崟绫诲瀷閫夋嫨
+ HSourceBillTypeNameChange(e) {
+ this.HSourceBillType = this.HSourceBillTypeNameList[e.detail.value];
+ this.hform.HSourceBillType = this.HSourceBillTypeValueList[e.detail.value];
+ },
+ toScanCode() {
+ MpaasScan.scanCode((res) => {
+ if (res) {
+ this.getSourceBillInfo(HBarCode);
+ }
+ });
+ },
+ async getSourceBillInfo(HBarCode) {
+ console.log('HBarCode: ',HBarCode);
+ // 鏍规嵁鍗曟嵁绫诲瀷锛岃皟鐢ㄤ笉鍚岀殑涓嬫帹鍑芥暟
+ if (this.hform.HSourceBillType == 3790) {
+ // 宸ュ簭杩涚珯鎺ユ敹鍗曞垪琛ㄩ妫�
+ await this.LoadingInformation_StationInBill(HBarCode);
+ if (
+ (uni.getStorageSync("OrganizationID") == "7667152" &&
+ uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+ (uni.getStorageSync("OrganizationID") == "100199" &&
+ uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+ ) {
+ await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+ }
+ return;
+ }
+ if (this.hform.HSourceBillType == 3793) {
+ // 宸ュ簭濮斿鎺ユ敹鍗曞垪琛ㄩ妫�
+ await this.LoadingInformation_StationEntrustOutBill(HBarCode);
+ if (
+ (uni.getStorageSync("OrganizationID") == "7667152" &&
+ uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+ (uni.getStorageSync("OrganizationID") == "100199" &&
+ uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+ ) {
+ await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+ }
+ return;
+ }
+ if (this.hform.HSourceBillType == 3710) {
+ // 鐢熶骇璁㈠崟鍒楄〃棣栨
+ await this.LoadingInformation_ICMO(HBarCode);
+ if (
+ (uni.getStorageSync("OrganizationID") == "7667152" &&
+ uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+ (uni.getStorageSync("OrganizationID") == "100199" &&
+ uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+ ) {
+ await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+ }
+ return;
+ }
+ if (this.hform.HSourceBillType == 3772) {
+ // 宸ュ簭娴佽浆鍗″垪琛ㄩ妫�
+ await this.LoadingInformation_ProcExchange(HBarCode);
+ if (
+ (uni.getStorageSync("OrganizationID") == "7667152" &&
+ uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
+ (uni.getStorageSync("OrganizationID") == "100199" &&
+ uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
+ ) {
+ await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
+ }
+ return;
+ }
+ },
+ async GetCheckItemID() {
+ if (!this.hform.HMaterName && !this.hform.HProcName) {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Web/GetCheckItemID",
+ data: {
+ HName: this.hform.HMaterName,
+ HProName: this.hform.HProcName,
+ HSourceID: this.hform.HSourceID,
+ },
+ });
+
+ let {
+ count,
+ Message,
+ data
+ } = res.data;
+
+ if (count != 1) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇妫�楠屾柟妗� 閿欒: ${Message}`,
+ });
+ return;
+ }
+
+ this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
+ this.hform.HQCSchemeID = data[0].hmainid;
+
+ this.get_CheckItem();
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇妫�楠屾柟妗� 閿欒: ${err}`,
+ });
+ }
+ }
+ },
+ async LoadingInformation_ProcExchange(HBarCode) {
+ // 宸ュ簭娴佽浆鍗�
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/CheckBill/get_ProcessExchangeBill_ByBillNo",
+ data: {
+ HBillNo: HBarCode,
+ user: getUserInfo()["Czymc"],
+ },
+ });
+
+ let {
+ count,
+ Message,
+ data
+ } = res.data;
+
+ if (count != 1) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇宸ュ簭娴佽浆鍗� 閿欒: ${Message}`,
+ });
+ return;
+ }
+ 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.HICMOBillNo = data[0].浠诲姟鍗�;
+ this.hform.HICMOInterID = data[0].HICMOInterID;
+ this.hform.HICMOQty = data[0].HICMOQty || 0;
+ this.hform.HSourceName = data[0].鐢熶骇璧勬簮;
+ this.hform.HSourceID = data[0].HSourceID || 0;
+ this.hform.HMaterID = data[0].HMaterID;
+ this.hform.HMaterName = data[0].浜у搧鍚嶇О;
+ 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.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
+ this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
+ this.hform.HProcName = data[0].褰撳墠宸ュ簭;
+ this.hform.HBatchNo = data[0].鎵瑰彿;
+ this.get_CheckItem();
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇宸ュ簭娴佽浆鍗� 閿欒: ${err}`,
+ });
+ }
+ },
+ async LoadingInformation_ICMO(HBarCode) {
+ // 鐢熶骇璁㈠崟
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/QC_FirstPieceCheckBill/get_ICMOBill_ByBillNo",
+ data: {
+ HBillNo: HBarCode,
+ user: getUserInfo()["Czymc"],
+ },
+ });
+
+ let {
+ count,
+ Message,
+ data
+ } = res.data;
+
+ if (count != 1) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇鐢熶骇璁㈠崟 閿欒: ${Message}`,
+ });
+ return;
+ }
+ this.hform.HProcExchBillNo = data[0].娴佽浆鍗″彿;
+ this.hform.HProcExchInterID = data[0].HProcExchInterID;
+ this.hform.HProcExchEntryID = data[0].HProcExchEntryID;
+ this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲�;
+ this.hform.HICMOBillNo = data[0].浠诲姟鍗�;
+ this.hform.HICMOInterID = data[0].HICMOInterID;
+ this.hform.HICMOQty = data[0].HICMOQty;
+ this.hform.HSourceName = data[0].鐢熶骇璧勬簮;
+ this.hform.HSourceID = data[0].HSourceID;
+ this.hform.HMaterID = data[0].HMaterID;
+ this.hform.HMaterName = data[0].浜у搧鍚嶇О;
+ 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.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
+ this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
+ this.hform.HProcName = data[0].褰撳墠宸ュ簭;
+
+ this.get_CheckItem();
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇鐢熶骇璁㈠崟 閿欒: ${err}`,
+ });
+ }
+ },
+ async LoadingInformation_StationEntrustOutBill(HBarCode) {
+ // 宸ュ簭濮斿鎺ユ敹鍗�
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Cj_StationEntrustOutBill/list",
+ data: {
+ sWhere: ` and HBillNo = '${HBarCode}'`,
+ },
+ });
+
+ let {
+ count,
+ Message,
+ data
+ } = res.data;
+
+ if (count != 1) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇宸ュ簭濮斿鎺ユ敹鍗� 閿欒: ${Message}`,
+ });
+ return;
+ }
+
+ HProcExchBillNo = data[0].娴佽浆鍗″彿;
+ HProcExchInterID = data[0].HProcExchInterID;
+ HProcExchEntryID = data[0].HProcExchEntryID;
+ HProcExchQty = data[0].娴佽浆鍗℃暟閲�;
+ HICMOBillNo = data[0].鐢熶骇璁㈠崟鍙�;
+ HICMOInterID = data[0].HICMOInterID;
+ HICMOQty = data[0].HICMOQty;
+ HSourceName = data[0].鐢熶骇璧勬簮;
+ HSourceID = data[0].HSourceID;
+ HMaterID = data[0].HMaterID;
+ HMaterName = data[0].浜у搧鍚嶇О;
+ HMainSourceBillNo = data[0].鍗曟嵁鍙�;
+ HMainSourceBillType = data[0].HBillType;
+ HMainSourceInterID = data[0].HInterID;
+ HICMOEntryID = data[0].HICMOEntryID;
+
+ this.get_CheckItem();
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇宸ュ簭濮斿鎺ユ敹鍗� 閿欒: ${err}`,
+ });
+ }
+ },
+ async LoadingInformation_StationInBill(HBarCode) {
+ // 杩涚珯鎺ユ敹鍗�
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/QC_FirstPieceCheckBill/get_StationInBill_ByHBillNo",
+ data: {
+ HBillNo: HBarCode,
+ user: getUserInfo()["Czymc"],
+ },
+ });
+
+ let {
+ count,
+ Message,
+ data
+ } = res.data;
+
+ if (count != 1) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇杩涚珯鎺ユ敹鍗� 閿欒: ${Message}`,
+ });
+ return;
+ }
+ this.hform.HProcExchBillNo = data[0].娴佽浆鍗″彿;
+ this.hform.HProcExchInterID = data[0].HProcExchInterID;
+ this.hform.HProcExchEntryID = data[0].HProcExchEntryID;
+ this.hform.HProcExchQty = data[0].娴佽浆鍗℃暟閲�;
+ this.hform.HICMOBillNo = data[0].浠诲姟鍗�;
+ this.hform.HICMOInterID = data[0].HICMOInterID;
+ this.hform.HICMOQty = data[0].HICMOQty;
+ this.hform.HSourceName = data[0].鐢熶骇璧勬簮;
+ this.hform.HSourceID = data[0].HSourceID;
+ this.hform.HMaterID = data[0].HMaterID;
+ this.hform.HMaterName = data[0].浜у搧鍚嶇О;
+ 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.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�;
+ this.hform.HQCSchemeID = data[0].妫�楠屾柟妗圛D;
+ this.hform.HProcName = data[0].褰撳墠宸ュ簭;
+
+ this.get_CheckItem();
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇杩涚珯鎺ユ敹鍗� 閿欒: ${err}`,
+ });
+ }
+ },
// 妫�楠屽憳鍒濆鍖�
async InitHEmp() {
try {
let res = await CommonUtils.doRequest2Async({
- url: '/Gy_Employee/list',
+ url: "/Gy_Employee/list",
data: {
- sWhere: ` and 缁勭粐鍚嶇О = '${uni.getStorageSync("Organization")}' and 绂佺敤鏍囪 = ''and 瀹℃牳浜� !='' order by 閮ㄩ棬浠g爜`,
- user: getUserInfo()['Czymc'],
- Organization: uni.getStorageSync("Organization")
- }
- })
+ sWhere: ` and 缁勭粐鍚嶇О = '${uni.getStorageSync(
+ "Organization"
+ )}' and 绂佺敤鏍囪 = ''and 瀹℃牳浜� !='' order by 閮ㄩ棬浠g爜`,
+ user: getUserInfo()["Czymc"],
+ Organization: uni.getStorageSync("Organization"),
+ },
+ });
let {
data,
Message,
count
- } = res.data
+ } = res.data;
if (count == 1) {
- console.log('data: ', data);
- this.GyFirstCheckEmpList = data
- this.GyFirstCheckEmpNameList = Array.from(data).map(e => e["鑱屽憳鍚嶇О"])
+ console.log("data: ", data);
+ this.GyFirstCheckEmpList = data;
+ this.GyFirstCheckEmpNameList = Array.from(data).map((e) => e["鑱屽憳鍚嶇О"]);
} else {
CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鍒濆鍖栨楠屽憳澶辫触: ${Message}`
- })
+ title: "娓╅Θ鎻愮ず",
+ message: `鍒濆鍖栨楠屽憳澶辫触: ${Message}`,
+ });
}
-
} catch (err) {
CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鍒濆鍖栨楠屽憳澶辫触: ${err}`
- })
+ title: "娓╅Θ鎻愮ず",
+ message: `鍒濆鍖栨楠屽憳澶辫触: ${err}`,
+ });
}
},
async HFirstCheckEmpChange(e) {
- console.log('閫変腑妫�楠屽憳: ', e);
- let index = this.GyFirstCheckEmpList.findIndex(elem => elem["鑱屽憳鍚嶇О"] == e)
+ console.log("閫変腑妫�楠屽憳: ", e);
+ let index = this.GyFirstCheckEmpList.findIndex((elem) => elem["鑱屽憳鍚嶇О"] == e);
if (index == -1) {
- this.hform.HFirstCheckEmp = 0
- this.hform.HFirstCheckEmpName = ''
- return
+ this.hform.HFirstCheckEmp = 0;
+ this.hform.HFirstCheckEmpName = "";
+ return;
}
- this.hform.HFirstCheckEmp = this.GyFirstCheckEmpList[index]["HItemID"]
- this.hform.HFirstCheckEmpName = this.GyFirstCheckEmpList[index]["鑱屽憳鍚嶇О"]
+ this.hform.HFirstCheckEmp = this.GyFirstCheckEmpList[index]["HItemID"];
+ this.hform.HFirstCheckEmpName = this.GyFirstCheckEmpList[index]["鑱屽憳鍚嶇О"];
},
// 鐢熶骇鐝鍒濆鍖�
async InitHWorkShift() {
try {
let res = await CommonUtils.doRequest2Async({
- url: '/Gy_ShiftsController/Get_Gy_WorkShiftList',
+ url: "/Gy_ShiftsController/Get_Gy_WorkShiftList",
data: {
- sWhere: ` and 绂佺敤鏍囪 = '' and ISNULL(瀹℃牳浜�,'') != '' and 浣跨敤缁勭粐鍚嶇О = '${uni.getStorageSync("Organization")}'`,
- HMaker: getUserInfo()['Czymc']
- }
- })
+ sWhere: ` and 绂佺敤鏍囪 = '' and ISNULL(瀹℃牳浜�,'') != '' and 浣跨敤缁勭粐鍚嶇О = '${uni.getStorageSync(
+ "Organization"
+ )}'`,
+ HMaker: getUserInfo()["Czymc"],
+ },
+ });
let {
data,
Message,
count
- } = res.data
+ } = res.data;
if (count == 1) {
- console.log('data: ', data);
- this.GyWorkShiftList = data
- this.GyWorkShiftNameList = Array.from(data).map(e => e["鐝鍚嶇О"])
+ console.log("data: ", data);
+ this.GyWorkShiftList = data;
+ this.GyWorkShiftNameList = Array.from(data).map((e) => e["鐝鍚嶇О"]);
} else {
CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鍒濆鍖栫彮娆″け璐�: ${Message}`
- })
+ title: "娓╅Θ鎻愮ず",
+ message: `鍒濆鍖栫彮娆″け璐�: ${Message}`,
+ });
}
-
} catch (err) {
CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鍒濆鍖栫彮娆″け璐�: ${err}`
- })
+ title: "娓╅Θ鎻愮ず",
+ message: `鍒濆鍖栫彮娆″け璐�: ${err}`,
+ });
}
},
async HWorkShiftChange(e) {
- console.log('閫変腑鐝: ', e);
- let index = this.GyWorkShiftList.findIndex(elem => elem["鐝鍚嶇О"] == e)
+ console.log("閫変腑鐝: ", e);
+ let index = this.GyWorkShiftList.findIndex((elem) => elem["鐝鍚嶇О"] == e);
if (index == -1) {
- this.hform.HWorkShiftID = 0
- this.hform.HWorkShiftName = ''
- return
+ this.hform.HWorkShiftID = 0;
+ this.hform.HWorkShiftName = "";
+ return;
}
- this.hform.HWorkShiftID = this.GySourceList[index]["HInterID"]
- this.hform.HWorkShiftName = this.GySourceList[index]["鐝鍚嶇О"]
+ this.hform.HWorkShiftID = this.GySourceList[index]["HInterID"];
+ this.hform.HWorkShiftName = this.GySourceList[index]["鐝鍚嶇О"];
},
// 鐢熶骇璧勬簮鏇存柊
// 鐢熶骇璧勬簮鍒濆鍖�
async InitHSource() {
try {
let res = await CommonUtils.doRequest2Async({
- url: '/Gy_Source/list',
+ url: "/Gy_Source/list",
data: {
sWhere: `and 绂佺敤鏍囪 != 'Y' and ISNULL(瀹℃牳浜�,'') != '' and HUSEORGID = '100038'`,
- user: getUserInfo()['Czymc']
- }
- })
+ user: getUserInfo()["Czymc"],
+ },
+ });
let {
data,
Message,
count
- } = res.data
+ } = res.data;
if (count == 1) {
- this.GySourceList = data
- this.GySourceNameList = Array.from(data).map(e => e["鐢熶骇璧勬簮鍚嶇О"])
+ this.GySourceList = data;
+ this.GySourceNameList = Array.from(data).map((e) => e["鐢熶骇璧勬簮鍚嶇О"]);
} else {
CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${Message}`
- })
+ title: "娓╅Θ鎻愮ず",
+ message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${Message}`,
+ });
}
-
} catch (err) {
CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${err}`
- })
+ title: "娓╅Θ鎻愮ず",
+ message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${err}`,
+ });
}
},
// 鐢熶骇璧勬簮鏇存柊
async HSourceChange(e) {
- console.log('閫変腑鐢熶骇璧勬簮: ', e);
- let index = this.GySourceList.findIndex(elem => elem["鐢熶骇璧勬簮鍚嶇О"] == e)
+ console.log("閫変腑鐢熶骇璧勬簮: ", e);
+ let index = this.GySourceList.findIndex((elem) => elem["鐢熶骇璧勬簮鍚嶇О"] == e);
if (index == -1) {
- this.hform.HSourceID = 0
- this.hform.HSourceName = ''
- return
+ this.hform.HSourceID = 0;
+ this.hform.HSourceName = "";
+ return;
}
- this.hform.HSourceID = this.GySourceList[index]["HItemID"]
- this.hform.HSourceName = this.GySourceList[index]["鐢熶骇璧勬簮鍚嶇О"]
+ this.hform.HSourceID = this.GySourceList[index]["HItemID"];
+ this.hform.HSourceName = this.GySourceList[index]["鐢熶骇璧勬簮鍚嶇О"];
+
+ this.get_ICMOBillStatusList();
+ this.get_QC_TakeSampleCheckBillList();
+ this.GetCheckItemID();
},
// 鏄剧ず寮圭獥
async showSelectorModule(item, index) {
- this.currentChechItemIDCache = item.num || 0 // 0 琛ㄧず娌℃湁浠讳綍瀛愯〃琚�変腑
- this.enablePopupModule = this.PopupModuleNameList[index]
- console.log('this.$refs: ', this.$refs);
- await this.$nextTick()
+ this.currentChechItemIDCache = item.num || 0; // 0 琛ㄧず娌℃湁浠讳綍瀛愯〃琚�変腑
+ this.enablePopupModule = this.PopupModuleNameList[index];
+ console.log("this.$refs: ", this.$refs);
+ await this.$nextTick();
if (index == 7) {
// 妫�楠屾柟妗堥渶瑕侀澶栦紶閫掑伐搴忓拰鐗╂枡鍚嶇О涓や釜鍙傛暟
- this.$refs.listPopup.setRequiredInfo(item.HMaterName, item.HProcName)
+ this.$refs.listPopup.setRequiredInfo(item.HMaterName, item.HProcName);
}
- this.$refs.listPopup.showPopup()
+ this.$refs.listPopup.showPopup();
},
getAnalysisMethodDisplay(val) {
- console.log('AnalysisMethodVal: ', val);
+ console.log("AnalysisMethodVal: ", val);
if (val) {
- return this.arrayAnalysisMethod.find(e => e.value == val).name
+ return this.arrayAnalysisMethod.find((e) => e.value == val).name;
}
- return ''
+ return "";
},
checkResultChange(event) {
- console.log('event: ', event);
+ console.log("event: ", event);
},
// 妫�楠岄」鐩柊澧炶
addCheckItem(resource) {
-
- let ordinal = this.getObjLength(this.checkItems) + 1
+ let ordinal = this.getObjLength(this.checkItems) + 1;
let checkItem = {
- "num": ordinal,
- "HInterID": this.hform.HInterID,
- "HQCCheckItemID": "",
- "HQCCheckItemNumber": "",
- "HQCCheckItemName": "",
- "HInspectInstruMentID": "0",
- "HInspectInstruMentNumber": "",
- "HInspectInstruMentName": "",
- "HQCStd": "",
- "HUnit": "",
- "HQCNote": "",
- "HAnalysisMethod": "",
- "HResult": false,
- "HMax": "",
- "HMin": "",
- "HAvg": "",
- "HRemark": "",
- "HKeyInspect": false,
- "HStatus": 0,
- "HSampleSchemeID": "",
- "HUnitID": 0,
- "HInspectVal": '',
- "HTargetVal": '',
- "HUpLimit": '',
- "HDownLimit": '',
- "HUpOffSet": '',
- "HDownOffSet": '',
- "HSampleDamageQty": 0,
- "HSampleSchemeName": "",
- "HSampleQty": 0,
- "HAcceptQty": 0,
- "HInspectionLevel": "",
- "HRejectQty": 0,
- "HStrictness": "",
- "HSampleUnRightQty": 0,
- "HAQL": "",
- "HSamplingType": "",
- "HInspectResultToSee": ""
+ num: ordinal,
+ HInterID: this.hform.HInterID,
+ HQCCheckItemID: "",
+ HQCCheckItemNumber: "",
+ HQCCheckItemName: "",
+ HInspectInstruMentID: "0",
+ HInspectInstruMentNumber: "",
+ HInspectInstruMentName: "",
+ HQCStd: "",
+ HUnit: "",
+ HQCNote: "",
+ HAnalysisMethod: "",
+ HResult: 1,
+ HMax: "",
+ HMin: "",
+ HAvg: "",
+ HRemark: "",
+ HKeyInspect: false,
+ HStatus: 1,
+ HSampleSchemeID: "",
+ HUnitID: 0,
+ HInspectVal: "",
+ HTargetVal: "",
+ HUpLimit: "",
+ HDownLimit: "",
+ HUpOffSet: "",
+ HDownOffSet: "",
+ HSampleDamageQty: 0,
+ HSampleSchemeName: "",
+ HSampleQty: 0,
+ HAcceptQty: 0,
+ HInspectionLevel: "",
+ HRejectQty: 0,
+ HStrictness: "",
+ HSampleUnRightQty: 0,
+ HAQL: "",
+ HSamplingType: "",
+ HInspectResultToSee: "",
+ };
+ if (resource) {
+ // 閫氳繃涓昏〃妫�楠屾柟妗堝甫鍑虹殑妫�楠岄」鐩�
+ Object.assign(checkItem, resource);
}
- if (resource) { // 閫氳繃涓昏〃妫�楠屾柟妗堝甫鍑虹殑妫�楠岄」鐩�
- Object.assign(checkItem, resource)
- }
- this.$set(this.checkItems, ordinal, checkItem)
+ this.$set(this.checkItems, ordinal, checkItem);
this.$nextTick(() => {
// 妫�鏌ユ槸鍚﹀彲浠ユ柊澧炴楠屽�奸」
- this.setInspectValModule(this.checkItems[ordinal])
- })
-
-
+ this.setInspectValModule(this.checkItems[ordinal]);
+ });
},
// 妫�楠岄」鐩垹闄よ
removeCheckItem(item) {
@@ -786,295 +1153,412 @@
content: `纭瑕佸垹闄ょ${item.num}琛屽悧锛熷垹闄ゅ悗涓嶈兘鎭㈠`,
success: (res) => {
if (res.confirm) {
- this.$delete(this.checkItems, item.num)
- this.refreshCheckItemNum()
+ this.$delete(this.checkItems, item.num);
+ this.$delete(this.subTabs, `_${item.num}`);
+ this.$forceUpdate();
+ this.refreshCheckItemNum();
}
- }
- })
+ },
+ });
},
async refreshCheckItemNum() {
- await this.$nextTick()
+ await this.$nextTick();
// 閲嶆帓搴忓彿
- let num = 1
- let checkItemsCache = {}
+ let num = 1;
+ let checkItemsCache = {};
for (let s in this.checkItems) {
- checkItemsCache[num] = this.checkItems[s]
- checkItemsCache[num].num = num
- num++
+ checkItemsCache[num] = this.checkItems[s];
+ checkItemsCache[num].num = num;
+ num++;
}
- this.checkItems = checkItemsCache
+ this.checkItems = checkItemsCache;
},
getObjLength(obj) {
- return Object.keys(obj).length
+ return Object.keys(obj).length;
},
// 缁撹淇敼
HResultChange(id, e) {
- console.log('e: ', e);
- this.checkItems[id]["HResult"] = e.detail.value
+ console.log("e: ", e);
+ this.checkItems[id]["HResult"] = e.detail.value ? 1 : 0;
+
+ this.HCheckLastResult();
+ },
+ // 姣忔妫�楠岄」鐩殑缁撹鏇存柊锛岄兘瑕佸垽鏂渶缁堢粨璁�
+ HCheckLastResult() {
+ let unPassNum = 0;
+ for (var key in this.checkItems) {
+ if (this.checkItems[key]["HResult"] == 0) {
+ unPassNum++;
+ }
+ }
+
+ if (unPassNum > 0) {
+ this.hform.HLastResult = false;
+ return;
+ }
+ this.hform.HLastResult = true;
},
// 妫�楠屾柟妗堜慨鏀�
HAnalysisMethodChange(id, e) {
- console.log('e: ', e);
- this.checkItems[id]["HAnalysisMethod"] = this.arrayAnalysisMethod[e.detail.value]["value"]
+ console.log("e: ", e);
+ this.checkItems[id]["HAnalysisMethod"] = this.arrayAnalysisMethod[e.detail.value][
+ "value"
+ ];
// 妫�鏌ユ槸鍚﹀彲浠ユ柊澧炴楠屽�奸」
- this.setInspectValModule(this.checkItems[id])
+ this.setInspectValModule(this.checkItems[id]);
},
// 閲嶇偣妫�鏌ヤ慨鏀�
HKeyInspectChange(id, e) {
- console.log('e: ', e);
- this.checkItems[id]["HKeyInspect"] = e.detail.value
+ console.log("e: ", e);
+ this.checkItems[id]["HKeyInspect"] = e.detail.value;
},
// 妫�楠岄」鐩繑鍥�
async CheckItemComplete(e) {
- console.log('CheckItemRet: ', e);
+ console.log("CheckItemRet: ", e);
for (var key in e["retVal"]) {
- let data = e["retVal"][key]
+ let data = e["retVal"][key];
Object.assign(this.checkItems[key], {
- "HQCCheckItemID": data["HItemID"],
- "HQCCheckItemNumber": data["浠g爜"],
- "HQCCheckItemName": data["鍚嶇О"],
- })
- await this.$nextTick()
- this.$refs.listPopup.exit()
+ HQCCheckItemID: data["HItemID"],
+ HQCCheckItemNumber: data["浠g爜"],
+ HQCCheckItemName: data["鍚嶇О"],
+ });
+ await this.$nextTick();
+ this.$refs.listPopup.exit();
// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
- await this.$nextTick()
- this.enablePopupModule = this.PopupModuleNameList[0]
+ await this.$nextTick();
+ this.enablePopupModule = this.PopupModuleNameList[0];
}
},
// 妫�楠屾柟妗堣繑鍥�
async SampleSchemeComplete(e) {
- console.log('SampleSchemeRet: ', e);
+ console.log("SampleSchemeRet: ", e);
for (var key in e["retVal"]) {
- let data = e["retVal"][key]
+ let data = e["retVal"][key];
Object.assign(this.checkItems[key], {
- "HSampleSchemeID": data["hmainid"],
- "HSampleSchemeNumber": data["鎶芥牱鏂规浠g爜"],
- "HSampleSchemeName": data["鎶芥牱鏂规鍚嶇О"],
- "HSampleQty": data["鏍锋湰閲�"] || 0,
- "HAcceptQty": data["鍏佽鏁�"] || 0,
- "HInspectionLevel": data["妫�楠屾按骞�"],
- "HRejectQty": data["鎷掔粷鏁�"] || 0,
- "HStrictness": data["涓ユ牸搴�"],
- "HSampleUnRightQty": data["鏍锋湰涓嶅悎鏍兼暟"] || 0,
- "HAQL": data["AQL"],
- "HSamplingType": data["鎶芥牱绫诲瀷"],
- "HInspectResultToSee": data["妫�楠岀粨鏋�"],
- "HUpLimit": data["涓婇檺鍊�"] || 0,
- "HDownLimit": data["涓嬮檺鍊�"] || 0,
- "HSampleDamageQty": data["鏍锋湰鐮村潖鏁�"] || 0
- })
- await this.$nextTick()
- this.$refs.listPopup.exit()
- this.setInspectValModule(this.checkItems[key])
+ HSampleSchemeID: data["hmainid"],
+ HSampleSchemeNumber: data["鎶芥牱鏂规浠g爜"],
+ HSampleSchemeName: data["鎶芥牱鏂规鍚嶇О"],
+ HSampleQty: data["鏍锋湰閲�"] || 0,
+ HAcceptQty: data["鍏佽鏁�"] || 0,
+ HInspectionLevel: data["妫�楠屾按骞�"],
+ HRejectQty: data["鎷掔粷鏁�"] || 0,
+ HStrictness: data["涓ユ牸搴�"],
+ HSampleUnRightQty: data["鏍锋湰涓嶅悎鏍兼暟"] || 0,
+ HAQL: data["AQL"],
+ HSamplingType: data["鎶芥牱绫诲瀷"],
+ HInspectResultToSee: data["妫�楠岀粨鏋�"],
+ HUpLimit: data["涓婇檺鍊�"] || 0,
+ HDownLimit: data["涓嬮檺鍊�"] || 0,
+ HSampleDamageQty: data["鏍锋湰鐮村潖鏁�"] || 0,
+ });
+ await this.$nextTick();
+ this.$refs.listPopup.exit();
+ this.setInspectValModule(this.checkItems[key]);
- await this.$nextTick()
- this.enablePopupModule = this.PopupModuleNameList[0]
+ await this.$nextTick();
+ this.enablePopupModule = this.PopupModuleNameList[0];
}
},
// 妫�楠屼华鍣ㄨ繑鍥�
async InspectMentComplete(e) {
- console.log('InspectInstruMentRet: ', e);
+ console.log("InspectInstruMentRet: ", e);
for (var key in e["retVal"]) {
- let data = e["retVal"][key]
+ let data = e["retVal"][key];
Object.assign(this.checkItems[key], {
- "HInspectInstruMentID": data["HItemID"],
- "HInspectInstruMentNumber": data["妫�楠屼华鍣ㄤ唬鐮�"],
- "HInspectInstruMentName": data["妫�楠屼华鍣ㄥ悕绉�"],
- })
- await this.$nextTick()
- this.$refs.listPopup.exit()
+ HInspectInstruMentID: data["HItemID"],
+ HInspectInstruMentNumber: data["妫�楠屼华鍣ㄤ唬鐮�"],
+ HInspectInstruMentName: data["妫�楠屼华鍣ㄥ悕绉�"],
+ });
+ await this.$nextTick();
+ this.$refs.listPopup.exit();
// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
- await this.$nextTick()
- this.enablePopupModule = this.PopupModuleNameList[0]
+ await this.$nextTick();
+ this.enablePopupModule = this.PopupModuleNameList[0];
}
},
// 浜у搧浠g爜杩斿洖
async MaterComplete(e) {
- console.log('MaterRet: ', e);
+ console.log("MaterRet: ", e);
for (var key in e["retVal"]) {
- let data = e["retVal"][key]
+ let data = e["retVal"][key];
Object.assign(this.hform, {
- "HMaterNumber": data["鐗╂枡浠g爜"],
- "HMaterName": data["鐗╂枡鍚嶇О"],
- "HMaterID": data["HItemID"],
- })
- await this.$nextTick()
- this.$refs.listPopup.exit()
+ HMaterNumber: data["鐗╂枡浠g爜"],
+ HMaterName: data["鐗╂枡鍚嶇О"],
+ HMaterID: data["HItemID"],
+ });
+ await this.$nextTick();
+ this.$refs.listPopup.exit();
// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
- await this.$nextTick()
- this.enablePopupModule = this.PopupModuleNameList[0]
+ await this.$nextTick();
+ this.enablePopupModule = this.PopupModuleNameList[0];
+ this.GetCheckItemID();
}
},
// 浠诲姟鍗曡繑鍥�
async ICMOBillComplete(e) {
- console.log('ICMOBillRet: ', e);
+ console.log("ICMOBillRet: ", e);
for (var key in e["retVal"]) {
- let data = e["retVal"][key]
+ let data = e["retVal"][key];
Object.assign(this.hform, {
- "HICMOInterID": data.hmainid,
- "HICMOEntryID": data.HEntryID,
- "HICMOBillNo": data.鍗曟嵁鍙�,
- "HMaterNumber": data.浜у搧浠g爜,
- "HMaterName": data.浜у搧鍚嶇О,
- "HMaterID": data.HMaterID,
- "HICMOQty": data.鐢熶骇浠诲姟鍗曟暟閲�,
- })
- await this.$nextTick()
- this.$refs.listPopup.exit()
+ HICMOInterID: data.hmainid,
+ HICMOEntryID: data.HEntryID,
+ HICMOBillNo: data.鍗曟嵁鍙�,
+ HMaterNumber: data.浜у搧浠g爜,
+ HMaterName: data.浜у搧鍚嶇О,
+ HMaterID: data.HMaterID,
+ HICMOQty: data.鐢熶骇浠诲姟鍗曟暟閲�,
+ });
+ await this.$nextTick();
+ this.$refs.listPopup.exit();
// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
- await this.$nextTick()
- this.enablePopupModule = this.PopupModuleNameList[0]
+ await this.$nextTick();
+ this.enablePopupModule = this.PopupModuleNameList[0];
}
},
// 娴佽浆鍗¤繑鍥�
async ProcExchBillComplete(e) {
- console.log('ProcExchBillRet: ', e);
+ console.log("ProcExchBillRet: ", e);
for (var key in e["retVal"]) {
- let data = e["retVal"][key]
+ let data = e["retVal"][key];
Object.assign(this.hform, {
- "HProcExchInterID": data.hmainid,
- "HProcExchEntryID": data.hsubid,
- "HProcExchBillNo": data.鍗曟嵁鍙�,
- })
- await this.$nextTick()
- this.$refs.listPopup.exit()
+ HProcExchInterID: data.hmainid,
+ HProcExchEntryID: data.hsubid,
+ HProcExchBillNo: data.鍗曟嵁鍙�,
+ });
+ await this.$nextTick();
+ this.$refs.listPopup.exit();
// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
- await this.$nextTick()
- this.enablePopupModule = this.PopupModuleNameList[0]
+ await this.$nextTick();
+ this.enablePopupModule = this.PopupModuleNameList[0];
}
},
// 妫�楠屾柟妗�(涓昏〃)杩斿洖
async HQCSchemeComplete(e) {
- console.log('HQCSchemeRet: ', e);
+ console.log("HQCSchemeRet: ", e);
for (var key in e["retVal"]) {
- let data = e["retVal"][key]
+ let data = e["retVal"][key];
Object.assign(this.hform, {
HQCSchemeID: data.hmainid,
- HQCSchemeName: data.妫�楠屾柟妗堝悕绉�
- })
+ HQCSchemeName: data.妫�楠屾柟妗堝悕绉�,
+ });
await this.get_CheckItem();
- await this.$nextTick()
- this.$refs.listPopup.exit()
+ await this.$nextTick();
+ this.$refs.listPopup.exit();
// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
- await this.$nextTick()
- this.enablePopupModule = this.PopupModuleNameList[0]
+ await this.$nextTick();
+ this.enablePopupModule = this.PopupModuleNameList[0];
}
},
// 宸ュ簭杩斿洖
async HProcComplete(e) {
- console.log(' HProcRet: ', e);
+ console.log(" HProcRet: ", e);
for (var key in e["retVal"]) {
- let data = e["retVal"][key]
+ let data = e["retVal"][key];
Object.assign(this.hform, {
- "HProcName": data["宸ュ簭鍚嶇О"],
- "HProcID": data["HItemID"],
- })
- await this.$nextTick()
- this.$refs.listPopup.exit()
+ HProcName: data["宸ュ簭鍚嶇О"],
+ HProcID: data["HItemID"],
+ });
+ await this.$nextTick();
+ this.$refs.listPopup.exit();
// 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
- await this.$nextTick()
- this.enablePopupModule = this.PopupModuleNameList[0]
+ await this.$nextTick();
+ this.enablePopupModule = this.PopupModuleNameList[0];
+ await this.GetCheckItemID();
+ await this.get_ICMOBillStatusList();
+ await this.get_QC_TakeSampleCheckBillList();
}
},
- setInspectValModule(checkItem) {
- console.log('checkItem: ', checkItem);
- if (!checkItem.HAnalysisMethod || !checkItem.HSampleSchemeID) {
- return
+ async get_QC_TakeSampleCheckBillList() {
+ // 鍙栨牱鍗曟煡璇�
+ let HProcID = this.hform.HProcID;
+ let HProcExchInterId = this.hform.HProcExchInterID;
+ let sWhere = "";
+
+ if (HProcID == "0" || HProcID == "") {
+ CommonUtils.showTips({
+ message: "璇烽�夋嫨宸ュ簭",
+ });
+ return;
}
- // 鍖哄垎妫�楠屽�奸〉绛惧拰闈欐�侀〉绛撅紝妫�楠屽�奸〉绛剧殑id浠寮�澶�
- this.$set(this.InspectModules, `_${checkItem.num}`, {
- id: `_${checkItem.num}`,
- checkItemId: checkItem.num
- })
- console.log(' this.arrayAnalysisMethod: ', checkItem.HAnalysisMethod);
- let analysisMethodName = this.arrayAnalysisMethod.find(e => e.value == checkItem.HAnalysisMethod)
- .name
- this.$set(this.subTabs, `_${checkItem.num}`, {
- id: `_${checkItem.num}`,
- name: `${analysisMethodName}-${checkItem.HQCCheckItemName}`
- })
- },
- InspectValueUpdate(e) {
- console.log('e: ', e);
- let {
- data,
- list
- } = e
- this.checkItems[data.num] = Object.assign(this.checkItems[data.num], data)
- this.$set(this.InspectValues, `${data.num}`, list)
- },
- // 甯﹀嚭妫�楠岄」鐩�
- async get_CheckItem() {
+
+ sWhere = " and 宸ュ簭娴佽浆鍗′富鍐呯爜='" + HProcExchInterID + "' and HProcID=" + HProcID;
+
try {
let res = await CommonUtils.doRequest2Async({
- url: '/Web/GetCheckItemByCheckProjectID',
+ url: "//QC_TakeSampleCheckBill/QC_TakeSampleCheckBillMainList",
data: {
- CheckProjectID: this.hform.HQCSchemeID || 0,
- HBatchQty: this.hform.HProcExchQty
- }
- })
+ sWhere: sWhere,
+ user: getUserInfo()["Czymc"],
+ },
+ });
let {
data,
count,
Message
- } = res.data
+ } = res.data;
+ if (count != 1) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇鍙栨牱鍗曚俊鎭け璐�: ${Message}`,
+ });
+ }
+
+ this.hform.HTakeSampleCheckBillID = data[0]["hmainid"];
+ this.hform.HTakeSampleCheckBillNo = data[0]["鍗曟嵁鍙�"];
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇鍙栨牱鍗曚俊鎭け璐�: ${err}`,
+ });
+ }
+ },
+ async get_ICMOBillStatusList() {
+ let sWhere = "";
+ let HProcID = this.hform.HProcID;
+ let HSourceID = this.hform.HSourceID;
+ let HProcExchInterId = this.hform.HProcExchInterID;
+
+ if (HProcID != "0") {
+ sWhere += " and HProcID=" + HProcID;
+ }
+ if (HSourceID != "0") {
+ sWhere += " and HSourceID=" + HSourceID;
+ }
+
+ sWhere += " and HSourceInterID=" + HProcExchInterID;
+
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/CheckBill/GetICMOBillStatusList",
+ data: {
+ sWhere: sWhere,
+ user: getUserInfo()["Czymc"],
+ },
+ });
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data;
+ if (count != 1) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇鐢熶骇宸ュ崟淇℃伅澶辫触: ${Message}`,
+ });
+ }
+
+ this.hform.HProcID = data[0]["HProcID"];
+ this.hform.HProcName = data[0]["宸ュ簭"];
+ this.hform.HSourceID = data[0]["HSourceID"];
+ this.hform.HSourceName = data[0]["鐢熶骇璧勬簮"];
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇鐢熶骇宸ュ崟淇℃伅澶辫触: ${err}`,
+ });
+ }
+ },
+ setInspectValModule(checkItem) {
+ console.log("checkItem: ", checkItem);
+ if (!checkItem.HAnalysisMethod || !checkItem.HSampleSchemeID) {
+ return;
+ }
+ // 鍖哄垎妫�楠屽�奸〉绛惧拰闈欐�侀〉绛撅紝妫�楠屽�奸〉绛剧殑id浠寮�澶�
+ this.$set(this.InspectModules, `_${checkItem.num}`, {
+ id: `_${checkItem.num}`,
+ checkItemId: checkItem.num,
+ });
+ console.log(" this.arrayAnalysisMethod: ", checkItem.HAnalysisMethod);
+ let analysisMethodName = this.arrayAnalysisMethod.find(
+ (e) => e.value == checkItem.HAnalysisMethod
+ ).name;
+ this.$set(this.subTabs, `_${checkItem.num}`, {
+ id: `_${checkItem.num}`,
+ name: `${analysisMethodName}-${checkItem.HQCCheckItemName}`,
+ });
+ },
+ InspectValueUpdate(e) {
+ console.log("e: ", e);
+ let {
+ data,
+ list
+ } = e;
+ this.checkItems[data.num] = Object.assign(this.checkItems[data.num], data);
+ this.$set(this.InspectValues, `${data.num}`, list);
+ },
+ // 甯﹀嚭妫�楠岄」鐩�
+ async get_CheckItem() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Web/GetCheckItemByCheckProjectID",
+ data: {
+ CheckProjectID: this.hform.HQCSchemeID || 0,
+ HBatchQty: this.hform.HProcExchQty || 0,
+ },
+ });
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data;
if (count == 1) {
for (var i = 0; i < data.length; i++) {
let checkItem = {
- "HQCCheckItemID": data[i]["HQCCheckItemID"],
- "HQCCheckItemNumber": data[i]["妫�楠岄」鐩唬鐮�"],
- "HQCCheckItemName": data[i]["妫�楠岄」鐩�"],
- "HInspectInstruMentID": data[i]["HInspectInstruMentID"],
- "HInspectInstruMentNumber": data[i]["妫�楠屼华鍣ㄤ唬鐮�"],
- "HInspectInstruMentName": data[i]["妫�楠屼华鍣�"],
- "HQCStd": data[i]["HQCStd"],
- "HUnit": data[i]["鍗曚綅鍚嶇О"],
- "HQCNote": "",
- "HAnalysisMethod": data[i]["鍒嗘瀽鏂规硶"],
- "HResult": data[i]["榛樿缁撹"],
- "HMax": "",
- "HMin": "",
- "HAvg": "",
- "HRemark": "",
- "HKeyInspect": data[i]["閲嶇偣妫�鏌�"] == 1 ? true : false,
- "HStatus": 0,
- "HSampleSchemeID": data[i]["HSampleSchemeID"],
- "HUnitID": data[i]["HUnitID"],
- "HInspectVal": '',
- "HTargetVal": '',
- "HUpLimit": data[i].涓婇檺鍊�,
- "HDownLimit": data[i].涓嬮檺鍊�,
- "HUpOffSet": '',
- "HDownOffSet": '',
- "HSampleDamageQty": "0",
- "HSampleSchemeName": data[i].鎶芥牱鏂规鍚嶇О,
- "HSampleQty": data[i].鏍锋湰閲�,
- "HAcceptQty": data[i].鍏佽鏁�,
- "HInspectionLevel": data[i].妫�楠屾按骞�,
- "HRejectQty": data[i].鎷掔粷鏁�,
- "HStrictness": data[i].涓ユ牸搴�,
- "HSampleUnRightQty": "",
- "HAQL": data[i].AQL,
- "HSamplingType": data[i].鎶芥牱绫诲瀷
- }
+ HQCCheckItemID: data[i]["HQCCheckItemID"],
+ HQCCheckItemNumber: data[i]["妫�楠岄」鐩唬鐮�"],
+ HQCCheckItemName: data[i]["妫�楠岄」鐩�"],
+ HInspectInstruMentID: data[i]["HInspectInstruMentID"],
+ HInspectInstruMentNumber: data[i]["妫�楠屼华鍣ㄤ唬鐮�"],
+ HInspectInstruMentName: data[i]["妫�楠屼华鍣�"],
+ HQCStd: data[i]["HQCStd"],
+ HUnit: data[i]["鍗曚綅鍚嶇О"],
+ HQCNote: "",
+ HAnalysisMethod: data[i]["鍒嗘瀽鏂规硶"],
+ HResult: data[i]["榛樿缁撹"],
+ HMax: "",
+ HMin: "",
+ HAvg: "",
+ HRemark: "",
+ HKeyInspect: data[i]["閲嶇偣妫�鏌�"] == 1 ? true : false,
+ HStatus: 0,
+ HSampleSchemeID: data[i]["HSampleSchemeID"],
+ HUnitID: data[i]["HUnitID"],
+ HInspectVal: "",
+ HTargetVal: "",
+ HUpLimit: data[i].涓婇檺鍊�,
+ HDownLimit: data[i].涓嬮檺鍊�,
+ HUpOffSet: "",
+ HDownOffSet: "",
+ HSampleDamageQty: "0",
+ HSampleSchemeName: data[i].鎶芥牱鏂规鍚嶇О,
+ HSampleQty: data[i].鏍锋湰閲�,
+ HAcceptQty: data[i].鍏佽鏁�,
+ HInspectionLevel: data[i].妫�楠屾按骞�,
+ HRejectQty: data[i].鎷掔粷鏁�,
+ HStrictness: data[i].涓ユ牸搴�,
+ HSampleUnRightQty: "",
+ HAQL: data[i].AQL,
+ HSamplingType: data[i].鎶芥牱绫诲瀷,
+ };
- this.addCheckItem(checkItem)
+ this.addCheckItem(checkItem);
}
-
} else {
CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鑾峰彇妫�楠岄」鐩俊鎭け璐�: ${Message} `
- })
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇妫�楠岄」鐩俊鎭け璐�: ${Message} `,
+ });
}
} catch (err) {
CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鑾峰彇妫�楠岄」鐩俊鎭け璐�: ${err} `
- })
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇妫�楠岄」鐩俊鎭け璐�: ${err} `,
+ });
}
},
async getMaxBillNo() {
@@ -1082,346 +1566,366 @@
let res = await CommonUtils.doRequest2Sync({
url: "/Web/GetMAXNum",
data: {
- "HBillType": '7505'
- }
- })
+ HBillType: "7505",
+ },
+ });
if (!res) {
- return
+ return;
}
let {
data,
Message,
count
- } = res.data
+ } = res.data;
if (count == 1) {
- this.hform.HInterID = data[0].HInterID
- this.hform.HBillNo = data[0].HBillNo
+ this.hform.HInterID = data[0].HInterID;
+ this.hform.HBillNo = data[0].HBillNo;
} else {
- throw (Message)
+ throw Message;
}
-
} catch (err) {
CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: "鑾峰彇鍗曟嵁鍙峰紓甯�: " + err
- })
+ title: "娓╅Θ鎻愮ず",
+ message: "鑾峰彇鍗曟嵁鍙峰紓甯�: " + err,
+ });
}
+ },
+ // 妫�楠岄」鐩繑鍥炲��
+ InspectValueComplete(e) {
+ console.log("e: ", e);
+ let key = e.num;
+ Object.assign(this.checkItems[key], e);
+ this.checkItems[key].HInspectResultToSee = this.checkItems[key].HResult2;
},
checkSubmitValidate() {
if (this.hform.HICMOQty == "" || this.hform.HICMOQty <= 0) {
CommonUtils.showTips({
- message: "浠诲姟鍗曟暟閲忎笉鑳戒负绌轰笖涓嶈兘灏忎簬绛変簬0锛�"
- })
- return false
+ message: "浠诲姟鍗曟暟閲忎笉鑳戒负绌轰笖涓嶈兘灏忎簬绛変簬0锛�",
+ });
+ return false;
}
if (this.hform.HFirstCheckEmp) {
CommonUtils.showTips({
- message: "妫�楠屽憳鏈�夋嫨锛�"
- })
- return false
+ message: "妫�楠屽憳鏈�夋嫨锛�",
+ });
+ return false;
}
for (let key in this.checkItems) {
if (this.checkItems[key].HQCCheckItemID) {
CommonUtils.showTips({
- message: `绗�${this.checkItems[key].num}琛屾楠岄」鐩笉鑳戒负绌�!`
- })
- return false
+ message: `绗�${this.checkItems[key].num}琛屾楠岄」鐩笉鑳戒负绌�!`,
+ });
+ return false;
}
- if (this.checkItems[key].HSampleSchemeID == '' || this.checkItems[key].HSampleSchemeID == null) {
- this.checkItems[key].HSampleSchemeID = 0
+ if (
+ this.checkItems[key].HSampleSchemeID == "" ||
+ this.checkItems[key].HSampleSchemeID == null
+ ) {
+ this.checkItems[key].HSampleSchemeID = 0;
}
- if (this.checkItems[key].HSampleQty == '' || this.checkItems[key].HSampleQty == null) {
- this.checkItems[key].HSampleQty = 0
+ if (
+ this.checkItems[key].HSampleQty == "" ||
+ this.checkItems[key].HSampleQty == null
+ ) {
+ this.checkItems[key].HSampleQty = 0;
}
- if (this.checkItems[key].HSampleDamageQty == '' || this.checkItems[key].HSampleDamageQty == null) {
- this.checkItems[key].HSampleDamageQty = 0
+ if (
+ this.checkItems[key].HSampleDamageQty == "" ||
+ this.checkItems[key].HSampleDamageQty == null
+ ) {
+ this.checkItems[key].HSampleDamageQty = 0;
}
- if (this.checkItems[key].HAcceptQty == '' || this.checkItems[key].HAcceptQty == null) {
- this.checkItems[key].HAcceptQty = 0
+ if (
+ this.checkItems[key].HAcceptQty == "" ||
+ this.checkItems[key].HAcceptQty == null
+ ) {
+ this.checkItems[key].HAcceptQty = 0;
}
- if (this.checkItems[key].HRejectQty == '' || this.checkItems[key].HRejectQty == null) {
- this.checkItems[key].HRejectQty = 0
+ if (
+ this.checkItems[key].HRejectQty == "" ||
+ this.checkItems[key].HRejectQty == null
+ ) {
+ this.checkItems[key].HRejectQty = 0;
}
- if (this.checkItems[key].HSampleUnRightQty == '' || this.checkItems[key].HSampleUnRightQty ==
- null) {
- this.checkItems[key].HSampleUnRightQty = 0
+ if (
+ this.checkItems[key].HSampleUnRightQty == "" ||
+ this.checkItems[key].HSampleUnRightQty == null
+ ) {
+ this.checkItems[key].HSampleUnRightQty = 0;
}
- if (this.checkItems[key].HUnitID == '') {
- this.checkItems[key].HUnitID = 0
+ if (this.checkItems[key].HUnitID == "") {
+ this.checkItems[key].HUnitID = 0;
}
}
- return true
+ return true;
},
async submit() {
if (!this.checkSubmitValidate) {
- return
+ return;
}
try {
// 妫�鏌ユ槸鍚︽湁鏈垏鎹㈢殑妫�楠屽�兼ā鍧�(鏄惁鍖呭惈set_SaveValue鏂规硶),濡傛灉鏈夛紝鍒欒繍琛屼竴娆′繚瀛樻楠屽�肩殑鏂规硶锛屾牴鎹楠屽�兼槸鍚︿繚瀛樻垚鍔熷啀鎵ц涓嬩竴姝�
- if (typeof this.$refs.InspectValueModules != 'undefined') {
+ if (typeof this.$refs.InspectValueModules != "undefined") {
// 鍔犺浇鏈夋楠屽�兼ā鍧�
- await this.$refs.InspectValueModules[0].set_SaveValue()
- this.InspectValues[0] = this.$refs.InspectValueModules[0].InSpectValues
+ await this.$refs.InspectValueModules[0].set_SaveValue();
+ this.InspectValues[0] = this.$refs.InspectValueModules[0].InSpectValues;
}
- let InspectValuesTrans = []
- let HInterID = this.hform.HInterID
+ let InspectValuesTrans = [];
+ let HInterID = this.hform.HInterID;
for (let key in this.InspectValues) {
- let HEntryID = key
+ let HEntryID = key;
InspectValuesTrans.push(
- `${JSON.stringify(this.InspectValues[key])};${HInterID};${HEntryID}`)
+ `${JSON.stringify(this.InspectValues[key])};${HInterID};${HEntryID}`
+ );
}
- let checkItemsArray = []
+ let checkItemsArray = [];
for (var key in this.checkItems) {
- checkItemsArray.push(this.checkItems[key].data)
+ checkItemsArray.push(this.checkItems[key].data);
}
- let sMainSub =
- `${JSON.stringify(this.hform)};${JSON.stringify(checkItemsArray)};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0]}`
- console.log('this.checkItems: ', this.checkItems);
+ 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
- }
+ sValues: InspectValuesTrans,
+ };
- console.log('msg: ', msg);
+ console.log("msg: ", msg);
let res = await CommonUtils.doRequest2Sync({
url: "/QC_FirstPieceCheckBill/set_SaveBill",
data: {
sMainSub: sMainSub,
},
- method: 'POST'
- })
+ method: "POST",
+ });
if (!res) {
- return
+ return;
}
let {
count,
Message,
data
- } = res.data
+ } = res.data;
if (count == 1) {
uni.showModal({
- title: '鎻愮ず',
- content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵',
+ title: "鎻愮ず",
+ content: res.data.Message + "銆傛槸鍚︾户缁柊澧烇紵",
success: (res) => {
if (res.confirm) {
- console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ console.log("鐢ㄦ埛鐐瑰嚮纭畾");
uni.redirectTo({
- url: '/pages/ZLGL/shoujianjianyan/form?operationType=1'
- })
+ url: "/pages/ZLGL/shoujianjianyan/form?operationType=1",
+ });
} else if (res.cancel) {
- console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ console.log("鐢ㄦ埛鐐瑰嚮鍙栨秷");
// setTimeout(() => {
// uni.navigateBack();
// }, 50)
}
- }
+ },
});
} else {
CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `棣栦欢妫�楠屽崟淇濆瓨閿欒: ${Message}`
- })
+ title: "娓╅Θ鎻愮ず",
+ message: `棣栦欢妫�楠屽崟淇濆瓨閿欒: ${Message}`,
+ });
}
} catch (err) {
CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `棣栦欢妫�楠屽崟淇濆瓨閿欒: ${err}`
- })
+ title: "娓╅Θ鎻愮ず",
+ message: `棣栦欢妫�楠屽崟淇濆瓨閿欒: ${err}`,
+ });
}
-
},
addNew() {
uni.redirectTo({
- url: "pages/ZLGL/shoujianjianyan/form?operationType=1"
- })
+ url: "pages/ZLGL/shoujianjianyan/form?operationType=1",
+ });
},
goBack() {
- uni.navigateBack()
+ uni.navigateBack();
},
async RoadBillMain() {
try {
let res = await CommonUtils.doRequest2Async({
- url: '/QC_FirstPieceCheckBill/QC_FirstPieceCheckBill_Edit',
+ url: "/QC_FirstPieceCheckBill/QC_FirstPieceCheckBill_Edit",
data: {
sWhere: ` and hmainid=${this.hform.HInterID}`,
- user: getUserInfo()["Czymc"]
- }
- })
+ user: getUserInfo()["Czymc"],
+ },
+ });
let {
data,
count,
Message
- } = res.data
+ } = res.data;
if (count == 1) {
- console.log('RoadBillMain: : ',data );
+ console.log("RoadBillMain: : ", data);
Object.assign(this.hform, {
- "HInterID": data[0].hmainid,
- "HBillNo": data[0].鍗曟嵁鍙�,
- "HDate": dayjs(data[0].鏃ユ湡).format("YYYY-MM-DD"),
- "HSourceID": data[0].HSourceID,
- "HSourceName": data[0].鐢熶骇璧勬簮鍚嶇О,
- "HICMOBillNo": data[0].浠诲姟鍗曞彿,
- "HICMOQty": data[0].浠诲姟鍗曟暟閲�,
- "HICMOInterID": data[0].HICMOInterID,
- "HICMOEntryID": data[0].HICMOEntryID,
- "HMaterID": data[0].HMaterID,
- "HMaterName": data[0].鐗╂枡鍚嶇О,
- "HMaterNumber": data[0].鐗╂枡浠g爜,
- "HProcID": data[0].HProcID,
- "HProcName": data[0].HProcName,
- "HProcExchQty": data[0].HProcExchQty,
- "HProcExchBillNo": data[0].HProcExchBillNo,
- "HProcExchInterID": data[0].HProcExchInterID,
- "HProcExchEntryID": data[0].HProcExchEntryID,
- "HFirstCheckEmp": data[0].HFirstCheckEmp,
- "HFirstCheckEmpName": data[0].璐ㄦ鍛樺悕绉�,
- "HQCSchemeID": data[0].妫�楠屾柟妗圛D,
- "HQCSchemeName": data[0].妫�楠屾柟妗堝悕绉�,
- "HRemark": data[0].琛ㄥご澶囨敞,
- "HMaker": data[0].鍒跺崟浜�,
- "HMakeDate": data[0].鍒跺崟鏃ユ湡,
- "HChecker": data[0].瀹℃牳浜�,
- "HCheckDate": data[0].瀹℃牳鏃ユ湡,
- "HCloseMan": data[0].鍏抽棴浜�,
- "HCloseDate": data[0].鍏抽棴鏃ユ湡,
- "HUpDateDate": data[0].淇敼鏃ユ湡,
- "HDeleteDate": data[0].浣滃簾鏃ユ湡,
- "HSampleSchemeID": data[0].HSampleSchemeID,
- "HSampleSchemeName": data[0].鎶芥牱鏂规鍚嶇О,
- "HSampleQty": data[0].鏍锋湰閲�,
- "HSampleQty2": data[0].鏍锋湰閲�,
- "HSampleDamageQty": data[0].鏍锋湰鐮村潖鏁�,
- "HSamplingType": data[0].鎶芥牱绫诲瀷,
- "HAcceptQty": data[0].鍏佽鏁�,
- "HInspectionLevel": data[0].妫�楠屾按骞�,
- "HRejectQty": data[0].鎷掔粷鏁�,
- "HStrictness": data[0].涓ユ牸搴�,
- "HSampleUnRightQty": data[0].鏍锋湰涓嶅悎鏍兼暟,
- "HSampleUnRightQty2": data[0].鏍锋湰涓嶅悎鏍兼暟,
- "HAQL": data[0].AQL,
- "HUnitID": data[0].HUnitID,
- "HUnit": data[0].鍗曚綅,
- "HInspectValB": data[0].妫�娴嬪�煎熀纭�璧勬枡,
- "HInspectVal": data[0].妫�娴嬪��,
- "HTargetValB": data[0].鐩爣鍊煎熀纭�璧勬枡,
- "HTargetVal": data[0].鐩爣鍊�,
- "HUpLimit": data[0].涓婇檺鍊�,
- "HDownLimit": data[0].涓嬮檺鍊�,
- "HUpOffSet": data[0].涓婂亸宸�,
- "HDownOffSet": data[0].涓嬪亸宸�,
- "HEntryID": data[0].hsubid,
- "HQCCheckItemName": data[0].妫�楠岄」鐩悕绉�,
- "HQCCheckItemID": data[0].HQCCheckItemID,
- "HShiftsID": data[0].HShiftsID,
- "HShiftsName": data[0].鐝鍚嶇О,
- "HErrTreatment": data[0].寮傚父涓存椂澶勭悊鏂规,
- "HBatchNo": data[0].鎵瑰彿,
- "HLastResult": data[0].鍒ゅ畾缁撹 == "鍚堟牸" ? "true" : "false",
- "HTakeSampleCheckBillID": data[0].HTakeSampleCheckBillID,
- "HTakeSampleCheckBillNo": data[0].HTakeSampleCheckBillNo
- })
+ HInterID: data[0].hmainid,
+ HBillNo: data[0].鍗曟嵁鍙�,
+ HDate: dayjs(data[0].鏃ユ湡).format("YYYY-MM-DD"),
+ HSourceID: data[0].HSourceID,
+ HSourceName: data[0].鐢熶骇璧勬簮鍚嶇О,
+ HICMOBillNo: data[0].浠诲姟鍗曞彿,
+ HICMOQty: data[0].浠诲姟鍗曟暟閲�,
+ HICMOInterID: data[0].HICMOInterID,
+ HICMOEntryID: data[0].HICMOEntryID,
+ HMaterID: data[0].HMaterID,
+ HMaterName: data[0].鐗╂枡鍚嶇О,
+ HMaterNumber: data[0].鐗╂枡浠g爜,
+ HProcID: data[0].HProcID,
+ HProcName: data[0].HProcName,
+ HProcExchQty: data[0].HProcExchQty,
+ HProcExchBillNo: data[0].HProcExchBillNo,
+ HProcExchInterID: data[0].HProcExchInterID,
+ HProcExchEntryID: data[0].HProcExchEntryID,
+ HFirstCheckEmp: data[0].HFirstCheckEmp,
+ HFirstCheckEmpName: data[0].璐ㄦ鍛樺悕绉�,
+ HQCSchemeID: data[0].妫�楠屾柟妗圛D,
+ HQCSchemeName: data[0].妫�楠屾柟妗堝悕绉�,
+ HRemark: data[0].琛ㄥご澶囨敞,
+ HMaker: data[0].鍒跺崟浜�,
+ HMakeDate: data[0].鍒跺崟鏃ユ湡,
+ HChecker: data[0].瀹℃牳浜�,
+ HCheckDate: data[0].瀹℃牳鏃ユ湡,
+ HCloseMan: data[0].鍏抽棴浜�,
+ HCloseDate: data[0].鍏抽棴鏃ユ湡,
+ HUpDateDate: data[0].淇敼鏃ユ湡,
+ HDeleteDate: data[0].浣滃簾鏃ユ湡,
+ HSampleSchemeID: data[0].HSampleSchemeID,
+ HSampleSchemeName: data[0].鎶芥牱鏂规鍚嶇О,
+ HSampleQty: data[0].鏍锋湰閲�,
+ HSampleQty2: data[0].鏍锋湰閲�,
+ HSampleDamageQty: data[0].鏍锋湰鐮村潖鏁�,
+ HSamplingType: data[0].鎶芥牱绫诲瀷,
+ HAcceptQty: data[0].鍏佽鏁�,
+ HInspectionLevel: data[0].妫�楠屾按骞�,
+ HRejectQty: data[0].鎷掔粷鏁�,
+ HStrictness: data[0].涓ユ牸搴�,
+ HSampleUnRightQty: data[0].鏍锋湰涓嶅悎鏍兼暟,
+ HSampleUnRightQty2: data[0].鏍锋湰涓嶅悎鏍兼暟,
+ HAQL: data[0].AQL,
+ HUnitID: data[0].HUnitID,
+ HUnit: data[0].鍗曚綅,
+ HInspectValB: data[0].妫�娴嬪�煎熀纭�璧勬枡,
+ HInspectVal: data[0].妫�娴嬪��,
+ HTargetValB: data[0].鐩爣鍊煎熀纭�璧勬枡,
+ HTargetVal: data[0].鐩爣鍊�,
+ HUpLimit: data[0].涓婇檺鍊�,
+ HDownLimit: data[0].涓嬮檺鍊�,
+ HUpOffSet: data[0].涓婂亸宸�,
+ HDownOffSet: data[0].涓嬪亸宸�,
+ HEntryID: data[0].hsubid,
+ HQCCheckItemName: data[0].妫�楠岄」鐩悕绉�,
+ HQCCheckItemID: data[0].HQCCheckItemID,
+ HShiftsID: data[0].HShiftsID,
+ HShiftsName: data[0].鐝鍚嶇О,
+ HErrTreatment: data[0].寮傚父涓存椂澶勭悊鏂规,
+ HBatchNo: data[0].鎵瑰彿,
+ HLastResult: data[0].鍒ゅ畾缁撹 == "鍚堟牸" ? "true" : "false",
+ HTakeSampleCheckBillID: data[0].HTakeSampleCheckBillID,
+ HTakeSampleCheckBillNo: data[0].HTakeSampleCheckBillNo,
+ });
for (let i = 0; i < data.length; i++) {
this.addCheckItem({
-
- "HQCCheckItemID": data[i].HQCCheckItemID,
- "HQCCheckItemNumber": data[i].妫�楠岄」鐩唬鐮�,
- "HQCCheckItemName": data[i].妫�楠岄」鐩悕绉�,
- "HInspectInstruMentID": data[i].HInspectInstruMentID,
- "HInspectInstruMentNumber": data[i].妫�楠屼华鍣ㄤ唬鐮�,
- "HInspectInstruMentName": data[i].妫�楠屼华鍣ㄥ悕绉�,
- "HQCStd": data[i].妫�楠屾爣鍑�,
- "HUnit": data[i].鍗曚綅鍚嶇О,
- "HQCNote": data[i].妫�楠岃褰�,
- "HResult": data[i].缁撹 == "鍚堟牸" ? 1 : 2,
- "HMax": data[i].鏈�澶у��,
- "HMin": data[i].鏈�灏忓��,
- "HAvg": data[i].骞冲潎鍊�,
- "HRemark": data[i].琛ㄤ綋澶囨敞,
- "HAnalysisMethod": data[i].鍒嗘瀽鏂规硶 == "瀹氭�у垎鏋�" ? 1 : (data[i].鍒嗘瀽鏂规硶 == "瀹氶噺鍒嗘瀽" ?
+ HQCCheckItemID: data[i].HQCCheckItemID,
+ HQCCheckItemNumber: data[i].妫�楠岄」鐩唬鐮�,
+ HQCCheckItemName: data[i].妫�楠岄」鐩悕绉�,
+ HInspectInstruMentID: data[i].HInspectInstruMentID,
+ HInspectInstruMentNumber: data[i].妫�楠屼华鍣ㄤ唬鐮�,
+ HInspectInstruMentName: data[i].妫�楠屼华鍣ㄥ悕绉�,
+ HQCStd: data[i].妫�楠屾爣鍑�,
+ HUnit: data[i].鍗曚綅鍚嶇О,
+ HQCNote: data[i].妫�楠岃褰�,
+ HResult: data[i].缁撹 == "鍚堟牸" ? 1 : 0,
+ HMax: data[i].鏈�澶у��,
+ HMin: data[i].鏈�灏忓��,
+ HAvg: data[i].骞冲潎鍊�,
+ HRemark: data[i].琛ㄤ綋澶囨敞,
+ HAnalysisMethod: data[i].鍒嗘瀽鏂规硶 == "瀹氭�у垎鏋�" ?
+ 1 :
+ data[i].鍒嗘瀽鏂规硶 == "瀹氶噺鍒嗘瀽" ?
2 :
- 3),
- "HKeyInspect": data[i].閲嶇偣妫�鏌� == "鍚�" ? false : true,
- "HSampleSchemeID": data[i].HSampleSchemeID,
- "HUnitID": data[i].HUnitID,
- "HInspectVal": data[i].妫�娴嬪��,
- "HTargetVal": data[i].鐩爣鍊�,
- "HUpLimit": data[i].涓婇檺鍊�,
- "HDownLimit": data[i].涓嬮檺鍊�,
- "HUpOffSet": data[i].涓婂亸宸�,
- "HDownOffSet": data[i].涓嬪亸宸�,
- "HSampleDamageQty": data[i].鏍锋湰鐮村潖鏁�,
- "HSampleSchemeName": data[i].鎶芥牱鏂规鍚嶇О,
- "HSampleQty": data[i].鏍锋湰閲�,
- "HSampleDamageQty": data[i].鏍锋湰鐮村潖鏁�,
- "HAcceptQty": data[i].鍏佽鏁�,
- "HInspectionLevel": 0,
- "HRejectQty": data[i].鎷掔粷鏁�,
- "HStrictness": 0,
- "HSampleUnRightQty": data[i].鏍锋湰涓嶅悎鏍兼暟,
- "HAQL": data[i].AQL,
- "HSamplingType": 0,
- "HSamplingType": data[i].鎶芥牱绫诲瀷,
- "HStrictness": data[i].涓ユ牸搴�
- })
+ 3,
+ HKeyInspect: data[i].閲嶇偣妫�鏌� == "鍚�" ? false : true,
+ HSampleSchemeID: data[i].HSampleSchemeID,
+ HUnitID: data[i].HUnitID,
+ HInspectVal: data[i].妫�娴嬪��,
+ HTargetVal: data[i].鐩爣鍊�,
+ HUpLimit: data[i].涓婇檺鍊�,
+ HDownLimit: data[i].涓嬮檺鍊�,
+ HUpOffSet: data[i].涓婂亸宸�,
+ HDownOffSet: data[i].涓嬪亸宸�,
+ HSampleDamageQty: data[i].鏍锋湰鐮村潖鏁�,
+ HSampleSchemeName: data[i].鎶芥牱鏂规鍚嶇О,
+ HSampleQty: data[i].鏍锋湰閲�,
+ HSampleDamageQty: data[i].鏍锋湰鐮村潖鏁�,
+ HAcceptQty: data[i].鍏佽鏁�,
+ HInspectionLevel: 0,
+ HRejectQty: data[i].鎷掔粷鏁�,
+ HStrictness: 0,
+ HSampleUnRightQty: data[i].鏍锋湰涓嶅悎鏍兼暟,
+ HAQL: data[i].AQL,
+ HSamplingType: 0,
+ HSamplingType: data[i].鎶芥牱绫诲瀷,
+ HStrictness: data[i].涓ユ牸搴�,
+ });
}
-
-
} else {
CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鍔犺浇鍗曟嵁澶辫触: ${Message}`
- })
+ title: "娓╅Θ鎻愮ず",
+ message: `鍔犺浇鍗曟嵁澶辫触: ${Message}`,
+ });
}
} catch (err) {
CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鍔犺浇鍗曟嵁澶辫触: ${err}`
- })
+ title: "娓╅Θ鎻愮ず",
+ message: `鍔犺浇鍗曟嵁澶辫触: ${err}`,
+ });
}
- }
+ },
},
async onLoad(e) {
- this.operationType = e.operationType || 1
- this.hform.HInterID = e.linterid || 0
+ this.operationType = e.operationType || 1;
+ this.hform.HInterID = e.linterid || 0;
if (this.operationType == 1) {
- await this.getMaxBillNo()
+ await this.getMaxBillNo();
} else if (this.operationType == 2) {
- await this.RoadBillMain()
- } else if (this.operationType == 3) {
+ await this.RoadBillMain();
+ } else if (this.operationType == 3) {}
- }
-
- await this.InitHSource()
- await this.InitHWorkShift()
- await this.InitHEmp()
- }
- }
+ await this.InitHSource();
+ await this.InitHWorkShift();
+ await this.InitHEmp();
+ },
+ };
</script>
-<style lang="scss">
+<style lang="scss" scoped>
input {
width: inherit;
font-size: 26rpx;
}
.uni-input {
- padding: 0
+ padding: 0;
}
-
.bill-main-tabs,
.bill-sub-tabs {
@@ -1497,7 +2001,6 @@
height: inherit;
font-size: 26rpx;
}
-
}
.disabled {
@@ -1534,7 +2037,7 @@
}
.btn-a {
- background-color: #3A78FF;
+ background-color: #3a78ff;
color: #fff;
}
@@ -1626,7 +2129,7 @@
}
.icon-wrapper {
- background-color: #3A78FF;
+ background-color: #3a78ff;
border-radius: 100%;
width: 40rpx;
height: 40rpx;
@@ -1641,7 +2144,7 @@
}
.icon-wrapper-big {
- background-color: #3A78FF;
+ background-color: #3a78ff;
border-radius: 100%;
width: 50rpx;
height: 50rpx;
@@ -1668,4 +2171,14 @@
text-align: center;
}
}
+
+ .pass-background {
+ background-color: #cee3f2;
+ border: none;
+ }
+
+ .unpass-background {
+ background-color: #f0d6e3;
+ border: none;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.1