From 7f71fb6f5f97b05606c901f3cfbbf2da0da121fd Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 05 一月 2026 19:46:30 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue | 2
pages/ZLGL/mojianjianyan/lastPieceCheckBill.vue | 2
utils/auth.js | 2
pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBillList.vue | 572 +++++++
pages.json | 28
pages/ZLGL/QualityReportStep/QualityReportStepBill.vue | 3
pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBill.vue | 2253 +++++++++++++++++++++++++++++
pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill.vue | 8
pages/index/tab4.vue | 14
utils/i18n.js | 72
.hbuilderx/launch.json | 4
pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue | 2
pages/MJGL/mujulingliaochukudan/MouldProdOutBillList.vue | 7
pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList.vue | 2
pages/MJGL/mujulingliaochukudan/MouldProdOutBill.vue | 4
pages/ZLGL/checkFlowList/QC_CheckedBillflowList.vue | 544 +++++++
manifest.json | 3
pages/ZLGL/xunjianjianyan/PatrolProcCheckBill.vue | 2
pages/index/tab3.vue | 18
pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList.vue | 4
main.js | 79
pages/index/login.vue | 6
pages/ZLGL/zaikujianyandan/InStockCheckBill.vue | 904 +++++++++++
pages/index/mine.vue | 2
24 files changed, 4,471 insertions(+), 66 deletions(-)
diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
index 4dd14cd..a7d9080 100644
--- a/.hbuilderx/launch.json
+++ b/.hbuilderx/launch.json
@@ -21,11 +21,11 @@
"type" : "uni-app:app-ios"
},
{
- "customPlaygroundType" : "device",
+ "customPlaygroundType" : "local",
"localRepoPath" : "D:/WorkBench/ZY_APP_Dev/STUWMS/unpackage/debug",
"openVueDevtools" : true,
"packageName" : "com.shebeiguanli.www",
- "playground" : "standard",
+ "playground" : "custom",
"type" : "uni-app:app-android"
}
]
diff --git a/main.js b/main.js
index 6bd543f..aade6d2 100644
--- a/main.js
+++ b/main.js
@@ -1,32 +1,37 @@
// 瀵煎叆i18n鏂囦欢
import en from "./locale/en.json"
import ZhCN from "./locale/zh-Hans.json"
+import {
+ addMissingKeyToMap
+} from "@/utils/i18n.js"
// 鍔犺浇鏈湴璇█鍖�
const messages = {
- "zh-Hans":ZhCN,
- en,
+ "zh-Hans": ZhCN,
+ en,
}
let i18nConfig = {
- locale: uni.getLocale(),// 鑾峰彇宸茶缃殑璇█
- messages,
- silentTranslationWarn: true,
- missing: function(locale, key, vm, values){
- // 椤甸潰涓惈鏈夎瑷�鍖呬腑涓嶅瓨鍦ㄧ殑瀛楁锛岄渶鍚屾鍒版暟鎹簱涓�
- console.log("[i18n]: 椤甸潰涓璳ey涓�: ", key ,"鐨勫瓧娈靛湪缈昏瘧鏂囦欢涓笉瀛樺湪锛屽悓姝ュ埌鏁版嵁搴�...")
-
- // 涓洪檷浣庡悓姝ョ殑闅惧害锛孉PP涓� 瀵圭炕璇戞ā鍧楃殑key 涓嶉噰鐢ㄦ暟缁勭殑鍐欐硶锛岀粺涓�浣跨敤 妯″潡鍚�.瀛楁鍚嶇殑鍐欐硶
- }
+ locale: uni.getLocale(), // 鑾峰彇宸茶缃殑璇█
+ messages,
+ silentTranslationWarn: true,
+
+ // missing: function(locale, key, vm, values){
+ // // 椤甸潰涓惈鏈夎瑷�鍖呬腑涓嶅瓨鍦ㄧ殑瀛楁锛岄渶鍚屾鍒版暟鎹簱涓�
+ // console.log("[i18n]: 椤甸潰涓璳ey涓�: ", key ,"鐨勫瓧娈靛湪缈昏瘧鏂囦欢涓笉瀛樺湪锛屽悓姝ュ埌鏁版嵁搴�...")
+ //
+ // // 涓洪檷浣庡悓姝ョ殑闅惧害锛孉PP涓� 瀵圭炕璇戞ā鍧楃殑key 涓嶉噰鐢ㄦ暟缁勭殑鍐欐硶锛岀粺涓�浣跨敤 妯″潡鍚�.瀛楁鍚嶇殑鍐欐硶
+ // let [HMouldName, HFieldKey] = key.split('.')
+ //
+ //
+ // }
}
-
-
import App from './App'
import Printer from './plugins/printer'
Vue.use(Printer);
// 鐢熶骇鐜
- // Vue.prototype.serverUrl = "https://qqyapi.xinlinsoft.cn/qqy-api";
+// Vue.prototype.serverUrl = "https://qqyapi.xinlinsoft.cn/qqy-api";
// 寮�鍙戠幆澧�
// Vue.prototype.serverUrl = "http://47.96.97.237/API";
@@ -41,9 +46,23 @@
// #ifndef VUE3
import Vue from 'vue'
import VueI18n from 'vue-i18n'
-
Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)
+// TODO missing鍥炶皟鏃犳硶婊¤冻 鍔犺浇绾夸笂鍖� 鍚庣殑妫�楠屽姛鑳斤紝闇�閲嶅啓$t鍑芥暟
+const originalT = Vue.prototype.$t
+Vue.prototype.$t = function(key, ...args) {
+ // 璋冪敤鍘熷 $t 鎵ц缈昏瘧
+ const translated = originalT.call(this, key, args);
+
+ // console.log(i18n.getLocaleMessage(i18n.locale))
+ if (translated == key) {
+ // 缈昏瘧鍚庣殑鏂囨湰涓庝紶鍏ョ殑key鐩稿悓锛屽垯琛ㄧず缈昏瘧鏂囨湰缂哄け 璁板綍缂哄け鐨勭炕璇戞枃鏈�
+ let [moduleName, fieldCode] = key.split(".")
+ addMissingKeyToMap(moduleName, fieldCode)
+ }
+
+ return translated
+}
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
@@ -55,25 +74,29 @@
// #endif
// #ifdef VUE3
-import { createSSRApp } from 'vue'
-import { createI18n } from 'vue-i18n'// v9.x
+import {
+ createSSRApp
+} from 'vue'
+import {
+ createI18n
+} from 'vue-i18n' // v9.x
const i18n = createI18n(i18nConfig)
export function createApp() {
- const app = createSSRApp(App)
- app.use(i18n)
- return {
- app
- }
+ const app = createSSRApp(App)
+ app.use(i18n)
+ return {
+ app
+ }
}
export default i18n
// #endif
// main.js uni.showToast 瀹炵幇鍏ㄥ眬鎷︽埅璁剧疆榛樿鎻愮ず鏃堕棿涓�3.5绉�
const originalShowToast = uni.showToast;
uni.showToast = (options) => {
- originalShowToast({
- duration: options.duration || 3500, // 榛樿2绉�
- icon: options.icon || 'none',
- title: options.title || 'none',
- ...options
- });
+ originalShowToast({
+ duration: options.duration || 3500, // 榛樿2绉�
+ icon: options.icon || 'none',
+ title: options.title || 'none',
+ ...options
+ });
};
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
index eab7ef6..a66fbe2 100644
--- a/manifest.json
+++ b/manifest.json
@@ -163,5 +163,6 @@
//鑷劧鏂瑰悜
"default"
],
- "locale" : "zh-Hans"
+ "locale" : "zh-Hans",
+ "fallbackLocale" : "zh-Hans"
}
diff --git a/pages.json b/pages.json
index 9fb3b8b..c13608c 100644
--- a/pages.json
+++ b/pages.json
@@ -1347,6 +1347,14 @@
"enablePullDownRefresh": true
}
},
+ {
+ "path" : "pages/ZLGL/checkFlowList/QC_CheckedBillflowList",
+ "style" :
+ {
+ "navigationBarTitleText" : "宸插鏍�",
+ "enablePullDownRefresh": true
+ }
+ },
{
"path" : "pages/MJGL/Gy_MouldFile/Gy_MouldFileList",
"style" :
@@ -1382,6 +1390,26 @@
"navigationBarTitleText": "妯″叿鎶ュ簾鍑哄簱鍗�",
"enablePullDownRefresh": true
}
+ },
+ {
+ "path": "pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBill",
+ "style": {
+ "navigationBarTitleText": "杞﹂棿鑷鍗�"
+ }
+ },
+ {
+ "path": "pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBillList",
+ "style": {
+ "navigationBarTitleText": "杞﹂棿鑷鍗曞垪琛�",
+ "enablePullDownRefresh": true
+ }
+ },
+ {
+ "path" : "pages/ZLGL/zaikujianyandan/InStockCheckBill",
+ "style" :
+ {
+ "navigationBarTitleText" : "鍦ㄥ簱妫�楠屽崟"
+ }
}
],
diff --git a/pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList.vue b/pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList.vue
index 788adcb..1ee08c0 100644
--- a/pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList.vue
+++ b/pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList.vue
@@ -17,7 +17,6 @@
<view class="title">寮�濮嬫椂闂�:</view>
<view class="right">
<picker mode="date" :value="hform.BenginHCreateDate" @change="BenginHCreateDateChange">
- <view class="picker-overlay"></view>
<input name="BenginHCreateDate" disabled :value="hform.BenginHCreateDate" placeholder="璇烽�夋嫨" />
</picker>
</view>
@@ -26,7 +25,6 @@
<view class="title">缁撴潫鏃堕棿:</view>
<view class="right">
<picker mode="date" :value="hform.EndHCreateDate" @change="EndHCreateDateChange">
- <view class="picker-overlay"></view>
<input name="EndHCreateDate" disabled :value="hform.EndHCreateDate" placeholder="璇烽�夋嫨" />
</picker>
</view>
diff --git a/pages/MJGL/mujulingliaochukudan/MouldProdOutBill.vue b/pages/MJGL/mujulingliaochukudan/MouldProdOutBill.vue
index db2e66c..984f151 100644
--- a/pages/MJGL/mujulingliaochukudan/MouldProdOutBill.vue
+++ b/pages/MJGL/mujulingliaochukudan/MouldProdOutBill.vue
@@ -112,7 +112,7 @@
<!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�"
v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> -->
<input :focus="HSourceBillNoFocus" type="text" name="HSourceBillNo"
- v-model="hform.HSourceBillNo" @confirm="onSourceBillBlurHandler" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" />
+ v-model="hform.HSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" />
</view>
<view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1">
@@ -900,7 +900,7 @@
if (res.confirm) {
console.log('鐢ㄦ埛鐐瑰嚮纭畾');
uni.redirectTo({
- url: '/pages/caigouruku/POStockInBill?OperationType=1'
+ url: '/pages/MJGL/mujulingliaochukudan/MouldProdOutBill'
})
} else if (res.cancel) {
console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
diff --git a/pages/MJGL/mujulingliaochukudan/MouldProdOutBillList.vue b/pages/MJGL/mujulingliaochukudan/MouldProdOutBillList.vue
index cf78ba1..26dbe41 100644
--- a/pages/MJGL/mujulingliaochukudan/MouldProdOutBillList.vue
+++ b/pages/MJGL/mujulingliaochukudan/MouldProdOutBillList.vue
@@ -17,7 +17,7 @@
<view class="title">寮�濮嬫椂闂�:</view>
<view class="right">
<picker mode="date" :value="hform.BenginHCreateDate" @change="BenginHCreateDateChange">
- <view class="picker-overlay"></view>
+
<input name="BenginHCreateDate" disabled :value="hform.BenginHCreateDate" placeholder="璇烽�夋嫨" />
</picker>
</view>
@@ -26,7 +26,7 @@
<view class="title">缁撴潫鏃堕棿:</view>
<view class="right">
<picker mode="date" :value="hform.EndHCreateDate" @change="EndHCreateDateChange">
- <view class="picker-overlay"></view>
+
<input name="EndHCreateDate" disabled :value="hform.EndHCreateDate" placeholder="璇烽�夋嫨" />
</picker>
</view>
@@ -362,6 +362,9 @@
</script>
<style lang="scss" scoped>
+ picker input{
+ pointer-events: none;
+ }
.form{
width: 640rpx;
margin: 20rpx auto;
diff --git a/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill.vue b/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill.vue
index ae4969a..5011e03 100644
--- a/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill.vue
+++ b/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill.vue
@@ -90,7 +90,7 @@
<view class="title">婧愬崟绫诲瀷:</view>
<view class="right" v-show="showHMainSourceBillType">
<picker :range="arrayHMainSourceBillType" v-model="HMainSourceBillType"
- @change="HMainSourceBillTypeChange">
+ >
<input name="HMainSourceBillType" disabled v-model="HMainSourceBillType"
placeholder="璇烽�夋嫨婧愬崟绫诲瀷" />
<view class="picker-overlay"></view>
@@ -107,11 +107,11 @@
<!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�"
v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> -->
<input :focus="HSourceBillNoFocus" type="text" name="HSourceBillNo"
- v-model="hform.HSourceBillNo" @confirm="onSourceBillBlurHandler" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" />
+ v-model="hform.HSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" />
</view>
<view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1">
- <uni-icons type="search" size="20" @click="showBillList"></uni-icons>
+ <uni-icons type="search" size="20" ></uni-icons>
</view>
<view class="righton" v-show="!showHSourceBillNo">
@@ -800,7 +800,7 @@
if (res.confirm) {
console.log('鐢ㄦ埛鐐瑰嚮纭畾');
uni.redirectTo({
- url: '/pages/caigouruku/POStockInBill?OperationType=1'
+ url: '/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill'
})
} else if (res.cancel) {
console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
diff --git a/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList.vue b/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList.vue
index d152d20..f5488de 100644
--- a/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList.vue
+++ b/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList.vue
@@ -17,7 +17,7 @@
<view class="title">寮�濮嬫椂闂�:</view>
<view class="right">
<picker mode="date" :value="hform.BenginHCreateDate" @change="BenginHCreateDateChange">
- <view class="picker-overlay"></view>
+
<input name="BenginHCreateDate" disabled :value="hform.BenginHCreateDate" placeholder="璇烽�夋嫨" />
</picker>
</view>
@@ -26,7 +26,7 @@
<view class="title">缁撴潫鏃堕棿:</view>
<view class="right">
<picker mode="date" :value="hform.EndHCreateDate" @change="EndHCreateDateChange">
- <view class="picker-overlay"></view>
+
<input name="EndHCreateDate" disabled :value="hform.EndHCreateDate" placeholder="璇烽�夋嫨" />
</picker>
</view>
diff --git a/pages/ZLGL/QualityReportStep/QualityReportStepBill.vue b/pages/ZLGL/QualityReportStep/QualityReportStepBill.vue
index 3df60d0..1ea919b 100644
--- a/pages/ZLGL/QualityReportStep/QualityReportStepBill.vue
+++ b/pages/ZLGL/QualityReportStep/QualityReportStepBill.vue
@@ -893,8 +893,9 @@
if(!item.num){
this.$set(item, 'num', 1);
}else{
- this.$set(item, 'num', item.num++);
+ this.$set(item, 'num', item.num+1);
}
+ console.log(item.num)
//this.$set(item, 'num', newValue);
this.getHisReportList();
this.hasCheckQty=true;
diff --git a/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBill.vue b/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBill.vue
new file mode 100644
index 0000000..ef5d0a5
--- /dev/null
+++ b/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBill.vue
@@ -0,0 +1,2253 @@
+<template>
+ <view>
+ <!-- 涓昏〃鍖哄煙 -->
+ <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 == 3 ? 'selected' : ''" @tap="mainTabSelected = 3">鍒跺崟淇℃伅</view>
+ </view>
+ <!-- 涓昏〃鍐呭 -->
+ <view class="bill-main-contents">
+ <!-- 鍩烘湰淇℃伅 -->
+ <view class="bill-main-content" v-if="mainTabSelected == 1">
+ <view class="form-item">
+ <view class="left">鍗曟嵁鍙�</view>
+ <view class="right disabled">
+ <input type="text" :value="hform.HBillNo" disabled />
+ </view>
+ </view>
+
+ <view class="form-item">
+ <view class="left">鏃ユ湡</view>
+ <view class="right">
+ <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HDate">
+ <view>{{ hform.HDate }}</view>
+ </uni-datetime-picker>
+ </view>
+ </view>
+
+ <view class="form-item">
+ <view class="left">婧愬崟鍗曞彿</view>
+ <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">
+ <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">
+ <view class="left">浠诲姟鍗曞彿</view>
+ <view class="right disabled">
+ <input type="text" :value="hform.HICMOBillNo" disabled />
+ </view>
+ <view class="icon-wrapper-big"><uni-icons type="search" size="20"
+ @click="showSelectorModule(hform, 5)"></uni-icons></view>
+ </view>
+ <view class="form-item">
+ <view class="left">娴佽浆鍗″彿</view>
+ <view class="right disabled">
+ <input type="text" :value="hform.HProcExchBillNo" disabled />
+ </view>
+ <view class="icon-wrapper-big"><uni-icons type="search" size="20"
+ @click="showSelectorModule(hform, 6)"></uni-icons></view>
+ </view>
+ <view class="form-item">
+ <view class="left">浜у搧浠g爜</view>
+ <view class="right disabled">
+ <input type="text" disabled :value="hform.HMaterNumber" />
+ </view>
+ <view class="icon-wrapper-big">
+ <uni-icons type="search" size="20" @click="showSelectorModule(hform, 4)"></uni-icons>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">浜у搧鍚嶇О</view>
+ <view class="right disabled">
+ <input type="text" disabled :value="hform.HMaterName" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">妫�楠屽憳</view>
+ <view class="right">
+ <uni-combox :candidates="GyFirstCheckEmpNameList" placeholder="璇烽�夋嫨妫�楠屽憳"
+ :v-model="hform.HFirstCheckEmpName"
+ @update:modelValue="HFirstCheckEmpChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">妫�楠屾柟妗�</view>
+ <view class="right disabled">
+ <input type="text" disabled :value="this.hform.HQCSchemeName" />
+ </view>
+ <view class="icon-wrapper-big"><uni-icons type="search" size="20"
+ @click="showSelectorModule(hform, 7)"></uni-icons></view>
+ </view>
+
+ <view class="form-item">
+ <view class="left">鍒ゆ柇缁撹</view>
+ <view class="right none-border">
+ <radio-group @changer="checkResultChange">
+ <label>
+ <radio value="0" :checked="hform.HLastResult" /><text></text>
+ 鍚堟牸
+ </label>
+ <view style="width: 20rpx; display: inline-block"></view>
+ <label>
+ <radio value="1" :checked="!hform.HLastResult" /><text></text>
+ 涓嶅悎鏍�
+ </label>
+ </radio-group>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">宸ュ簭</view>
+ <view class="right disabled">
+ <input type="text" disabled :value="hform.HProcName" />
+ </view>
+ <view class="icon-wrapper-big"><uni-icons type="search" size="20"
+ @click="showSelectorModule(hform, 8)"></uni-icons></view>
+ </view>
+
+ </view>
+ <!-- 鍏朵粬淇℃伅 -->
+ <view class="bill-main-content" v-if="mainTabSelected == 2">
+ <view class="form-item">
+ <view class="left">婧愬崟绫诲瀷</view>
+ <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" />
+ <view class="picker-overlay"></view>
+ </picker>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">鐢熶骇璧勬簮</view>
+ <view class="right">
+ <uni-combox :candidates="GySourceNameList" placeholder="璇烽�夋嫨鐢熶骇璧勬簮" v-model="hform.HSourceName"
+ @update:modelValue="HSourceChange"></uni-combox>
+ </view>
+ </view>
+ <!-- <view class="form-item">
+ <view class="left">鐢熶骇鐝</view>
+ <view class="right">
+ <uni-combox :candidates="GyWorkShiftNameList" placeholder="璇烽�夋嫨鐢熶骇鐝"
+ v-model="hform.HShiftsName" @update:modelValue="HWorkShiftChange"></uni-combox>
+ </view>
+ </view> -->
+ <view class="form-item">
+ <view class="left">鐢熶骇鐝</view>
+ <view class="right">
+ <uni-combox :candidates="GyWorkShiftNameList" placeholder="璇烽�夋嫨鐢熶骇鐝"
+ 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" v-model="hform.HErrTreatment" value="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">浠诲姟鍗曟暟閲�</view>
+ <view class="right">
+ <input type="number" v-model="hform.HICMOQty" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">娴佽浆鍗℃暟閲�</view>
+ <view class="right">
+ <input type="number" v-model="hform.HProcExchQty" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">鎵瑰彿</view>
+ <view class="right">
+ <input type="text" v-model="hform.HBatchNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">澶囨敞</view>
+ <view class="right">
+ <input type="text" v-model="hform.HRemark" value="" />
+ </view>
+ </view>
+ </view>
+ <!-- 鍒跺崟淇℃伅 -->
+ <view class="bill-main-content" v-if="mainTabSelected == 3">
+ <view class="form-item">
+ <view class="left">鍒跺崟浜�</view>
+ <view class="right 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="hform.HMakeDate" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">瀹℃牳浜�</view>
+ <view class="right 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="hform.HCheckDate" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">鍏抽棴浜�</view>
+ <view class="right 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="hform.HCloseDate" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">淇敼浜�</view>
+ <view class="right 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="hform.HUpDateDate" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">浣滃簾浜�</view>
+ <view class="right 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="hform.HDeleteDate" disabled />
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <!-- 瀛愯〃鍖哄煙 -->
+ <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>
+ <!-- 瀛愯〃鍐呭 -->
+ <view class="bill-main-contents">
+ <!-- 妫�楠岄」鐩� 鍛堢幇 -->
+ <view v-if="subTabSelected == 1">
+ <!-- 闇�閫氳繃鏄惧紡璋冪敤蹇界暐$event鍙傛暟 -->
+ <view class="buttons" @tap="addCheckItem()">
+ <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 editable">
+ <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>
+ <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>
+ <view>
+ <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>
+ <picker :range="arrayAnalysisMethod" range-key="name"
+ @change="HAnalysisMethodChange(checkItem.num, $event)">
+ <input disabled :value="getAnalysisMethodDisplay(checkItem.HAnalysisMethod)"
+ placeholder="璇烽�夋嫨" />
+ <view class="picker-overlay"></view>
+ </picker>
+ </view>
+ <view class="detail editable">
+ <view style="flex-shrink: 0"><text>閲嶇偣妫�鏌ワ細</text></view>
+ <view>
+ <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 }}
+ </view>
+ <view class="detail" v-if="checkItem.HUnit">
+ <text>鍗曚綅锛�</text>{{ checkItem.HUnit }}
+ </view>
+ <view class="detail" v-if="checkItem.HQCStd">
+ <text>妫�楠屽�硷細</text>{{ checkItem.HQCStd }}
+ </view>
+ <view class="detail" v-if="checkItem.HQCNote">
+ <text>妫�楠岃褰曪細</text>{{ checkItem.HQCNote }}
+ </view>
+ <view class="detail" v-if="checkItem.HTargetVal">
+ <text>鐩爣鍊硷細</text>{{ checkItem.HTargetVal }}
+ </view>
+ <view class="detail" v-if="checkItem.HUpLimit">
+ <text>涓婇檺鍊硷細</text>{{ checkItem.HUpLimit }}
+ </view>
+ <view class="detail" v-if="checkItem.HDownLimit">
+ <text>涓嬮檺鍊硷細</text>{{ checkItem.HDownLimit }}
+ </view>
+ <view class="detail" v-if="checkItem.HMax">
+ <text>鏈�澶у�硷細</text>{{ checkItem.HMax }}
+ </view>
+ <view class="detail" v-if="checkItem.HMin">
+ <text>鏈�灏忓�硷細</text>{{ checkItem.HMin }}
+ </view>
+ <view class="detail" v-if="checkItem.HAvg">
+ <text>骞冲潎鍊硷細</text>{{ checkItem.HAvg }}
+ </view>
+ </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"
+ size="18"></uni-icons>鍒犻櫎
+ </view>
+ </view>
+ </uni-card>
+ </view>
+ </view>
+ <!-- 鎶芥牱妫�楠� 鍛堢幇 -->
+ <view v-if="subTabSelected == 2">
+ <view class="over" v-if="!checkItems || getObjLength(checkItems) == 0">鏆傛棤鏁版嵁</view>
+ <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 editable">
+ <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>
+ <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 }}
+ </view>
+ <view class="detail editable">
+ <text>妫�楠屾按骞筹細</text>{{ SamplingItem.HInspectionLevel }}
+ </view>
+ <view class="detail editable">
+ <text>涓ユ牸搴︼細</text>{{ SamplingItem.HStrictness }}
+ </view>
+ <view class="detail editable">
+ <text>AQL锛�</text>{{ SamplingItem.HAQL }}
+ </view>
+ <view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3"></view>
+ <view class="detail editable">
+ <text>鏍锋湰閲忥細</text>{{ SamplingItem.HSampleQty }}
+ </view>
+ <view class="detail editable">
+ <text>鍏佽鏁帮細</text>{{ SamplingItem.HAcceptQty }}
+ </view>
+ <view class="detail editable">
+ <text>鎷掔粷鏁帮細</text>{{ SamplingItem.HRejectQty }}
+ </view>
+ <view class="detail editable">
+ <text>鏍锋湰涓嶅悎鏍兼暟锛�</text>{{ SamplingItem.HSampleUnRightQty }}
+ </view>
+ <view class="detail editable">
+ <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 }}
+ </view>
+ </view>
+ </view>
+ </uni-card>
+ </view>
+ </view>
+ <!-- 妫�娴嬪�� 鍛堢幇 -->
+ <view v-else v-for="item in InspectModules" :key="item.id">
+ <view v-if="subTabSelected == item.id">
+ <InspectValueTemplateVue ref="InspectValueModules" :bind-key="item.id"
+ @syncCheckData="InspectValueComplete" :bind-data="{
+ data: checkItems[item.checkItemId],
+ list: InspectValues[item.checkItemId],
+ mode: 2 // 宸℃妫�楠屽�兼ā鍧�
+ }">
+ </InspectValueTemplateVue>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view style="height: 120rpx"></view>
+ <view class="bottom-btn">
+ <button class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
+ <view style="flex: 1"></view>
+ <button class="btn-a" size="mini" @tap="addNew">鏂板</button>
+ <button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
+ </view>
+ <SampleSchemePopupVue v-if="enablePopupModule == PopupModuleNameList[1]" ref="listPopup"
+ @update="SampleSchemeComplete" :bindKey="currentChechItemIDCache">
+ </SampleSchemePopupVue>
+ <CheckItemPopupVue v-if="enablePopupModule == PopupModuleNameList[2]" ref="listPopup"
+ @update="CheckItemComplete" :bindKey="currentChechItemIDCache">
+ </CheckItemPopupVue>
+ <InspectMentPopupVue v-if="enablePopupModule == PopupModuleNameList[3]" ref="listPopup"
+ @update="InspectMentComplete" :bindKey="currentChechItemIDCache">
+ </InspectMentPopupVue>
+ <MaterialPopupVue v-if="enablePopupModule == PopupModuleNameList[4]" ref="listPopup" @update="MaterComplete"
+ :bindKey="0">
+ </MaterialPopupVue>
+ <ICMOBillPopupVue v-if="enablePopupModule == PopupModuleNameList[5]" ref="listPopup" @update="ICMOBillComplete"
+ :bindKey="0"></ICMOBillPopupVue>
+ <ProcExchBillPopupVue v-if="enablePopupModule == PopupModuleNameList[6]" ref="listPopup"
+ @update="ProcExchBillComplete" :bindKey="0"></ProcExchBillPopupVue>
+ <ProcessPopupVue v-if="enablePopupModule == PopupModuleNameList[8]" ref="listPopup" @update="HProcComplete"
+ :bindKey="0"></ProcessPopupVue>
+ <CheckProjectPopupVue v-if="enablePopupModule == PopupModuleNameList[7]" ref="listPopup"
+ @update="HQCSchemeComplete" :bindKey="0"></CheckProjectPopupVue>
+ </view>
+</template>
+
+<script>
+ 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";
+ import {
+ getUserInfo
+ } from "../../../utils/auth";
+ import {
+ MpaasScan
+ } from "../../../utils/mpaasScan";
+ export default {
+ components: {
+ InspectValueTemplateVue,
+ SampleSchemePopupVue,
+ CheckItemPopupVue,
+ InspectMentPopupVue,
+ MaterialPopupVue,
+ ICMOBillPopupVue,
+ ProcExchBillPopupVue,
+ ProcessPopupVue,
+ CheckProjectPopupVue,
+ },
+ computed: {
+ judgeConclusion: {
+ get() {
+ return true;
+ },
+ },
+ },
+ data() {
+ return {
+ operationType: 1,
+
+ mainTabSelected: 1,
+ subTabSelected: 1,
+
+ // 婧愬崟鐘舵�佹帶鍒�
+ hasSourceBill: false,
+
+ // 鎺у埗褰撳墠鏄剧ず鐨勫脊绐楁ā鍧�
+ enablePopupModule: "",
+ PopupModuleNameList: [
+ "",
+ "SampleScheme",
+ "CheckItem",
+ "InspectMent",
+ "Material",
+ "ICMOBill",
+ "ProcExchBill",
+ "QCScheme",
+ "Process",
+ ],
+ // 褰撳墠鎿嶄綔鐨勬楠屽崟ID缂撳瓨
+ currentChechItemIDCache: -1,
+
+ // uni-combox 閫夋嫨鍣ㄤ娇鐢�
+ // 鐢熶骇璧勬簮
+ GySourceList: [],
+ GySourceNameList: [],
+ // 鐝
+ GyWorkShiftList: [],
+ GyWorkShiftNameList: [],
+ // 妫�楠屽憳
+ GyFirstCheckEmpList: [],
+ GyFirstCheckEmpNameList: [],
+
+ // 妫�楠屾柟妗�
+ arrayAnalysisMethod: [{
+ value: 1,
+ name: "瀹氭�у垎鏋�",
+ },
+ {
+ value: 2,
+ name: "瀹氶噺鍒嗘瀽",
+ },
+ {
+ value: 3,
+ name: "鍏朵粬鍒嗘瀽",
+ },
+ ],
+ ArrayAnalysisMethodValue: [1, 2, 3],
+ // 瀛愯〃 椤电淇℃伅
+ subTabs: {
+ 1: {
+ id: "1",
+ name: "妫�楠岄」鐩�",
+ },
+ 2: {
+ id: "2",
+ name: "鎶芥牱妫�楠�",
+ },
+ },
+
+ // 婧愬崟绫诲瀷
+ HSourceBillType: "宸ュ簭杩涚珯鎺ユ敹鍗�",
+ HSourceBillTypeValueList: ["3790", "3793", "3710", "3772"],
+ HSourceBillTypeNameList: [
+ "宸ュ簭杩涚珯鎺ユ敹鍗�",
+ "宸ュ簭濮斿鎺ユ敹鍗�",
+ "鐢熶骇璁㈠崟",
+ "宸ュ簭娴佽浆鍗�",
+ ],
+ // 涓昏〃灞炴��
+ hform: {
+ HSourceBillType: "7518",
+ 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: 1,
+ HAnalysisMethod: "",
+
+ HResDec: "",
+ HStatus: 1,
+
+ HMainSourceBillType: "",
+ HMainSourceInterID: "0",
+ HMainSourceEntryID: "1",
+ HMainSourceBillNo: "",
+ },
+ // 妫�楠岄」鐩拰鎶芥牱妫�楠� 鍊�
+ checkItems: {},
+ // 妫�娴嬪�兼ā鍧�
+ InspectModules: {},
+ // 妫�娴嬪��
+ 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(res);
+ }
+ });
+ },
+ 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].娴佽浆鍗℃暟閲� || 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 || 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({
+ 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].娴佽浆鍗℃暟閲� || 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 || 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({
+ 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].娴佽浆鍗℃暟閲� || 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 || 1;
+ this.hasSourceBill = true
+ 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].娴佽浆鍗℃暟閲� || 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 || 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({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇杩涚珯鎺ユ敹鍗� 閿欒: ${err}`,
+ });
+ }
+ },
+ // 妫�楠屽憳鍒濆鍖�
+ async InitHEmp() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Gy_Employee/list",
+ data: {
+ sWhere: ` and 缁勭粐鍚嶇О = '${uni.getStorageSync(
+ "Organization"
+ )}' and 绂佺敤鏍囪 = ''and 瀹℃牳浜� !='' order by 閮ㄩ棬浠g爜`,
+ user: getUserInfo()["Czymc"],
+ Organization: uni.getStorageSync("Organization"),
+ },
+ });
+
+ let {
+ data,
+ Message,
+ count
+ } = res.data;
+
+ if (count == 1) {
+ console.log("data: ", data);
+ this.GyFirstCheckEmpList = data;
+ this.GyFirstCheckEmpNameList = Array.from(data).map((e) => e["鑱屽憳鍚嶇О"]);
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鍒濆鍖栨楠屽憳澶辫触: ${Message}`,
+ });
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鍒濆鍖栨楠屽憳澶辫触: ${err}`,
+ });
+ }
+ },
+ async HFirstCheckEmpChange(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 = this.GyFirstCheckEmpList[index]["HItemID"];
+ this.hform.HFirstCheckEmpName = this.GyFirstCheckEmpList[index]["鑱屽憳鍚嶇О"];
+ },
+ // 鐢熶骇鐝鍒濆鍖�
+ async InitHWorkShift() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Gy_ShiftsController/Get_Gy_WorkShiftList",
+ data: {
+ sWhere: ` and 绂佺敤鏍囪 = '' and ISNULL(瀹℃牳浜�,'') != '' and 浣跨敤缁勭粐鍚嶇О = '${uni.getStorageSync(
+ "Organization"
+ )}'`,
+ HMaker: getUserInfo()["Czymc"],
+ },
+ });
+
+ let {
+ data,
+ Message,
+ count
+ } = res.data;
+
+ if (count == 1) {
+ console.log("data: ", data);
+ this.GyWorkShiftList = data;
+ this.GyWorkShiftNameList = Array.from(data).map((e) => e["鐝鍚嶇О"]);
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鍒濆鍖栫彮娆″け璐�: ${Message}`,
+ });
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鍒濆鍖栫彮娆″け璐�: ${err}`,
+ });
+ }
+ },
+ async HWorkShiftChange(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 = this.GySourceList[index]["HInterID"];
+ this.hform.HWorkShiftName = this.GySourceList[index]["鐝鍚嶇О"];
+ },
+ // 鐢熶骇璧勬簮鏇存柊
+ // 鐢熶骇璧勬簮鍒濆鍖�
+ async InitHSource() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Gy_Source/list",
+ data: {
+ sWhere: `and 绂佺敤鏍囪 != 'Y' and ISNULL(瀹℃牳浜�,'') != '' and HUSEORGID = '100038'`,
+ user: getUserInfo()["Czymc"],
+ },
+ });
+
+ let {
+ data,
+ Message,
+ count
+ } = res.data;
+
+ if (count == 1) {
+ this.GySourceList = data;
+ this.GySourceNameList = Array.from(data).map((e) => e["鐢熶骇璧勬簮鍚嶇О"]);
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${Message}`,
+ });
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${err}`,
+ });
+ }
+ },
+ // 鐢熶骇璧勬簮鏇存柊
+ async HSourceChange(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 = 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();
+ if (index == 7) {
+ // 妫�楠屾柟妗堥渶瑕侀澶栦紶閫掑伐搴忓拰鐗╂枡鍚嶇О涓や釜鍙傛暟
+ this.$refs.listPopup.setRequiredInfo(item.HMaterName, item.HProcName);
+ }
+
+ this.$refs.listPopup.showPopup();
+ },
+ getAnalysisMethodDisplay(val) {
+ console.log("AnalysisMethodVal: ", val);
+ if (val) {
+ return this.arrayAnalysisMethod.find((e) => e.value == val).name;
+ }
+ return "";
+ },
+ checkResultChange(event) {
+ console.log("event: ", event);
+ },
+ // 妫�楠岄」鐩柊澧炶
+ addCheckItem(resource) {
+ 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: 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);
+ }
+ this.$set(this.checkItems, ordinal, checkItem);
+ this.$nextTick(() => {
+ // 妫�鏌ユ槸鍚﹀彲浠ユ柊澧炴楠屽�奸」
+ this.setInspectValModule(this.checkItems[ordinal]);
+ });
+ },
+ // 妫�楠岄」鐩垹闄よ
+ removeCheckItem(item) {
+ uni.showModal({
+ title: "娓╅Θ鎻愮ず",
+ content: `纭瑕佸垹闄ょ${item.num}琛屽悧锛熷垹闄ゅ悗涓嶈兘鎭㈠`,
+ success: (res) => {
+ if (res.confirm) {
+ this.$delete(this.checkItems, item.num);
+ this.$delete(this.subTabs, `_${item.num}`);
+ this.$forceUpdate();
+ this.refreshCheckItemNum();
+ }
+ },
+ });
+ },
+ async refreshCheckItemNum() {
+ await this.$nextTick();
+ // 閲嶆帓搴忓彿
+ let num = 1;
+ let checkItemsCache = {};
+ for (let s in this.checkItems) {
+ checkItemsCache[num] = this.checkItems[s];
+ checkItemsCache[num].num = num;
+ num++;
+ }
+ this.checkItems = checkItemsCache;
+ },
+ getObjLength(obj) {
+ return Object.keys(obj).length;
+ },
+ // 缁撹淇敼
+ HResultChange(id, e) {
+ console.log("e: ", e);
+ this.checkItems[id]["HResult"] = e.detail.value ? 1 : 2;
+
+ this.HCheckLastResult();
+ },
+ // 姣忔妫�楠岄」鐩殑缁撹鏇存柊锛岄兘瑕佸垽鏂渶缁堢粨璁�
+ HCheckLastResult() {
+ let unPassNum = 0;
+ for (var key in this.checkItems) {
+ if (!(this.checkItems[key]["HResult"] == 1)) {
+ 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"
+ ];
+
+ // 妫�鏌ユ槸鍚﹀彲浠ユ柊澧炴楠屽�奸」
+ this.setInspectValModule(this.checkItems[id]);
+ },
+ // 閲嶇偣妫�鏌ヤ慨鏀�
+ HKeyInspectChange(id, e) {
+ console.log("e: ", e);
+ this.checkItems[id]["HKeyInspect"] = e.detail.value;
+ },
+ // 妫�楠岄」鐩繑鍥�
+ async CheckItemComplete(e) {
+ console.log("CheckItemRet: ", e);
+ for (var key in e["retVal"]) {
+ 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();
+ // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+ await this.$nextTick();
+ this.enablePopupModule = this.PopupModuleNameList[0];
+ }
+ },
+ // 妫�楠屾柟妗堣繑鍥�
+ async SampleSchemeComplete(e) {
+ console.log("SampleSchemeRet: ", e);
+ for (var key in e["retVal"]) {
+ 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]);
+
+ await this.$nextTick();
+ this.enablePopupModule = this.PopupModuleNameList[0];
+ }
+ },
+ // 妫�楠屼华鍣ㄨ繑鍥�
+ async InspectMentComplete(e) {
+ console.log("InspectInstruMentRet: ", e);
+ for (var key in e["retVal"]) {
+ let data = e["retVal"][key];
+ Object.assign(this.checkItems[key], {
+ HInspectInstruMentID: data["HItemID"],
+ HInspectInstruMentNumber: data["妫�楠屼华鍣ㄤ唬鐮�"],
+ HInspectInstruMentName: data["妫�楠屼华鍣ㄥ悕绉�"],
+ });
+ await this.$nextTick();
+ this.$refs.listPopup.exit();
+ // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+ await this.$nextTick();
+ this.enablePopupModule = this.PopupModuleNameList[0];
+ }
+ },
+ // 浜у搧浠g爜杩斿洖
+ async MaterComplete(e) {
+ console.log("MaterRet: ", e);
+ for (var key in e["retVal"]) {
+ let data = e["retVal"][key];
+ Object.assign(this.hform, {
+ HMaterNumber: data["鐗╂枡浠g爜"],
+ HMaterName: data["鐗╂枡鍚嶇О"],
+ HMaterID: data["HItemID"],
+ });
+ await this.$nextTick();
+ this.$refs.listPopup.exit();
+ // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+ await this.$nextTick();
+ this.enablePopupModule = this.PopupModuleNameList[0];
+ this.GetCheckItemID();
+ }
+ },
+ // 浠诲姟鍗曡繑鍥�
+ async ICMOBillComplete(e) {
+ console.log("ICMOBillRet: ", e);
+ for (var key in e["retVal"]) {
+ let data = e["retVal"][key];
+ Object.assign(this.hform, {
+ HICMOInterID: data.hmainid,
+ HICMOEntryID: data.HEntryID || 1,
+ 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];
+ }
+ },
+ // 娴佽浆鍗¤繑鍥�
+ async ProcExchBillComplete(e) {
+ console.log("ProcExchBillRet: ", e);
+ for (var key in e["retVal"]) {
+ let data = e["retVal"][key];
+ Object.assign(this.hform, {
+ HProcExchInterID: data.hmainid,
+ HProcExchEntryID: data.hsubid,
+ HProcExchBillNo: data.鍗曟嵁鍙�,
+ });
+ await this.$nextTick();
+ this.$refs.listPopup.exit();
+ // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+ await this.$nextTick();
+ this.enablePopupModule = this.PopupModuleNameList[0];
+ }
+ },
+ // 妫�楠屾柟妗�(涓昏〃)杩斿洖
+ async HQCSchemeComplete(e) {
+ console.log("HQCSchemeRet: ", e);
+ for (var key in e["retVal"]) {
+ let data = e["retVal"][key];
+ Object.assign(this.hform, {
+ HQCSchemeID: data.hmainid,
+ HQCSchemeName: data.妫�楠屾柟妗堝悕绉�,
+ });
+ await this.get_CheckItem();
+ await this.$nextTick();
+ this.$refs.listPopup.exit();
+ // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+ await this.$nextTick();
+ this.enablePopupModule = this.PopupModuleNameList[0];
+ }
+ },
+ // 宸ュ簭杩斿洖
+ async HProcComplete(e) {
+ console.log(" HProcRet: ", e);
+ for (var key in e["retVal"]) {
+ let data = e["retVal"][key];
+ Object.assign(this.hform, {
+ HProcName: data["宸ュ簭鍚嶇О"],
+ HProcID: data["HItemID"],
+ });
+ await this.$nextTick();
+ this.$refs.listPopup.exit();
+ // 纭繚鍦ㄥ脊绐楃粨鏉熷悗锛屽啀灏嗛〉闈笂鎸傚湪鐨勭粍浠剁疆绌�
+ await this.$nextTick();
+ this.enablePopupModule = this.PopupModuleNameList[0];
+ await this.GetCheckItemID();
+ await this.get_ICMOBillStatusList();
+ await this.get_QC_TakeSampleCheckBillList();
+ }
+ },
+ async get_QC_TakeSampleCheckBillList() {
+ // 鍙栨牱鍗曟煡璇�
+ let HProcID = this.hform.HProcID;
+ let HProcExchInterId = this.hform.HProcExchInterID;
+ let sWhere = "";
+
+ if (HProcID == "0" || HProcID == "") {
+ CommonUtils.showTips({
+ message: "璇烽�夋嫨宸ュ簭",
+ });
+ return;
+ }
+
+ sWhere = " and 宸ュ簭娴佽浆鍗′富鍐呯爜='" + HProcExchInterID + "' and HProcID=" + HProcID;
+
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "//QC_TakeSampleCheckBill/QC_TakeSampleCheckBillMainList",
+ data: {
+ sWhere: sWhere,
+ user: getUserInfo()["Czymc"],
+ },
+ });
+
+ let {
+ data,
+ count,
+ Message
+ } = 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() {
+ // 棣栧厛娓呯┖妫�楠岄」鐩� 鍜� 妫�楠屽��
+ 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_Sec",
+ data: {
+ CheckProjectID: this.hform.HQCSchemeID || 0,
+ HBatchQty: this.hform.HProcExchQty || 0,
+ HMaterID: this.hform.HMaterID,
+ HBillType: '鑷鏂规'
+ },
+ });
+
+ 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: 0,
+ HAQL: data[i].AQL,
+ HSamplingType: data[i].鎶芥牱绫诲瀷,
+ HCompareSymbol: data[i].姣旇緝绗�,
+ HTargetVal: data[i].鐩爣鍊� || 0,
+ };
+
+ this.addCheckItem(checkItem);
+ }
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇妫�楠岄」鐩俊鎭け璐�: ${Message} `,
+ });
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇妫�楠岄」鐩俊鎭け璐�: ${err} `,
+ });
+ }
+ },
+ async getMaxBillNo() {
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: "/Web/GetMAXNum",
+ data: {
+ HBillType: "7518",
+ },
+ });
+
+ if (!res) {
+ return;
+ }
+
+ let {
+ data,
+ Message,
+ count
+ } = res.data;
+ if (count == 1) {
+ this.hform.HInterID = data[0].HInterID;
+ this.hform.HBillNo = data[0].HBillNo;
+ } else {
+ throw Message;
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鑾峰彇鍗曟嵁鍙峰紓甯�: " + err,
+ });
+ }
+ },
+ // 妫�楠屽�艰繑鍥炲��
+ 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) {
+ // CommonUtils.showTips({
+ // message: "浠诲姟鍗曟暟閲忎笉鑳戒负绌轰笖涓嶈兘灏忎簬绛変簬0锛�",
+ // });
+ // return false;
+ // }
+
+ if (this.hform.HFirstCheckEmp == 0) {
+ CommonUtils.showTips({
+ message: "妫�楠屽憳鏈�夋嫨锛�",
+ });
+ return false;
+ }
+
+ for (let key in this.checkItems) {
+ if (!this.checkItems[key].HQCCheckItemID) {
+ CommonUtils.showTips({
+ 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].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].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].HSampleUnRightQty == "" ||
+ this.checkItems[key].HSampleUnRightQty == 0
+ ) {
+ this.checkItems[key].HSampleUnRightQty = 0;
+ }
+ if (this.checkItems[key].HUnitID == "") {
+ this.checkItems[key].HUnitID = 0;
+ }
+ }
+
+ return true;
+ },
+ async submit() {
+ if (!this.checkSubmitValidate()) {
+ return;
+ }
+ try {
+ console.log('this.$refs: ', this.$refs);
+ // 妫�鏌ユ槸鍚︽湁鏈垏鎹㈢殑妫�楠屽�兼ā鍧�(鏄惁鍖呭惈set_SaveValue鏂规硶),濡傛灉鏈夛紝鍒欒繍琛屼竴娆′繚瀛樻楠屽�肩殑鏂规硶锛屾牴鎹楠屽�兼槸鍚︿繚瀛樻垚鍔熷啀鎵ц涓嬩竴姝�
+ 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;
+ for (let key in this.InspectValues) {
+ let HEntryID = key;
+
+ InspectValuesTrans.push(
+ `${JSON.stringify(this.InspectValues[key])}`
+ );
+ }
+ let checkItemsArray = [];
+ for (var key in this.checkItems) {
+ 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 res = await CommonUtils.doRequest2Sync({
+ url: "/QC_WorkSelfCheckBill/set_SaveBill",
+ data: {
+ sMainSub: sMainSub,
+ },
+ method: "POST",
+ });
+
+ if (!res) {
+ return;
+ }
+
+ let {
+ count,
+ Message,
+ data
+ } = res.data;
+ if (count == 1) {
+ uni.showModal({
+ title: "鎻愮ず",
+ content: res.data.Message + "銆傛槸鍚︾户缁柊澧烇紵",
+ success: (res) => {
+ if (res.confirm) {
+ console.log("鐢ㄦ埛鐐瑰嚮纭畾");
+ uni.redirectTo({
+ url: "/pages/ZLGL/xunjianjianyan/PatrolProcCheckBill?operationType=1",
+ });
+ } else if (res.cancel) {
+ console.log("鐢ㄦ埛鐐瑰嚮鍙栨秷");
+ // setTimeout(() => {
+ // uni.navigateBack();
+ // }, 50)
+ }
+ },
+ });
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `宸℃妫�楠屽崟淇濆瓨閿欒: ${Message}`,
+ });
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `宸℃妫�楠屽崟淇濆瓨閿欒: ${err}`,
+ });
+ }
+ },
+ addNew() {
+ uni.redirectTo({
+ url: "/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBill",
+ });
+ },
+ goBack() {
+ uni.navigateBack();
+ },
+ async RoadBillMain() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/QC_WorkSelfCheckBill/QC_WorkSelfCheckBillEdit",
+ data: {
+ sWhere: ` and hmainid=${this.hform.HInterID}`,
+ user: getUserInfo()["Czymc"],
+ },
+ });
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data;
+
+ if (count == 1) {
+ 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 || 1,
+ HMaterID: data[0].HMaterID,
+ HMaterName: data[0].鐗╂枡鍚嶇О,
+ HMaterNumber: data[0].鐗╂枡浠g爜,
+ HProcID: data[0].HProcID,
+ HProcName: data[0].HProcName,
+ HProcExchQty: data[0].HProcExchQty || 0,
+ HProcExchBillNo: data[0].HProcExchBillNo,
+ HProcExchInterID: data[0].HProcExchInterID,
+ HProcExchEntryID: data[0].HProcExchEntryID || 0,
+ 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].鏍锋湰涓嶅悎鏍兼暟 || 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,
+ 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++) {
+ 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 : 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].涓ユ牸搴�,
+ HInspectResultToSee: data[i].妫�楠岀粨鏋�
+ });
+
+ }
+
+
+ this.hasSourceBill = true
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鍔犺浇鍗曟嵁澶辫触: ${Message}`,
+ });
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鍔犺浇鍗曟嵁澶辫触: ${err}`,
+ });
+ }
+ },
+ },
+ async onLoad(e) {
+ this.operationType = e.operationType || 1;
+ this.hform.HInterID = e.linterid || 0;
+ if (this.operationType == 1) {
+ await this.getMaxBillNo();
+ } else if (this.operationType == 2) {
+
+ } else if (this.operationType == 3) {
+ await this.RoadBillMain();
+ }
+
+ await this.InitHSource();
+ await this.InitHWorkShift();
+ await this.InitHEmp();
+ },
+ };
+</script>
+
+<style lang="scss" scoped>
+ input {
+ width: inherit;
+ font-size: 26rpx;
+ }
+
+ .uni-input {
+ padding: 0;
+ }
+
+ .bill-main-tabs,
+ .bill-sub-tabs {
+ box-sizing: border-box;
+ width: 730rpx;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: nowrap;
+ gap: 20rpx;
+ flex-shrink: 0;
+ overflow-x: auto;
+ border-bottom: 1px solid #ddd;
+ padding: 20rpx 10rpx;
+ white-space: nowrap;
+
+ view {
+ width: auto;
+ font-size: 26rpx;
+ color: #555;
+ text-align: center;
+ padding: 16rpx 0;
+ }
+
+ .selected {
+ color: #3a78ff;
+ font-weight: bold;
+ border-bottom: 3px solid #3a78ff;
+ }
+ }
+
+ .bill-main-content,
+ .bill-sub-content {
+ box-sizing: border-box;
+ padding: 0 30rpx 0 30rpx;
+ display: flex;
+ flex-direction: column;
+
+ .form-item {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ font-size: 26rpx;
+ padding: 6rpx 0;
+
+ .left {
+ width: 208rpx;
+
+ text {
+ color: red;
+ font-weight: bold;
+ }
+ }
+
+ .right {
+ // width: 450rpx;
+ padding: 8rpx 20rpx;
+ font-size: 26rpx;
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+
+ .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 {
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+
+ .none-border {
+ border: none;
+ }
+ }
+ }
+
+ .bottom-btn {
+ box-sizing: border-box;
+ width: 100%;
+ height: 120rpx;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ background-color: #fff;
+ box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
+ padding: 30rpx 40rpx 40rpx 40rpx;
+ display: flex;
+ flex-direction: row;
+ gap: 10rpx;
+
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+
+ .btn-a {
+ background-color: #3a78ff;
+ color: #fff;
+ }
+
+ .btn-b {
+ background-color: #41a863;
+ color: #fff;
+ }
+
+ .btn-c {
+ background-color: #acacac;
+ color: #fff;
+ // position: absolute;
+ // right: 120rpx;
+ }
+
+ .btn-d {
+ background-color: #ff8901;
+ color: #fff;
+ }
+ }
+
+ .buttons {
+ box-sizing: border-box;
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ padding: 10rpx 0;
+
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 26rpx;
+ }
+
+ .btn-a {
+ background-color: #acacac;
+ color: #fff;
+ }
+
+ .btn-b {
+ background-color: #41a863;
+ color: #fff;
+ }
+
+ .btn-c {
+ background-color: #3a78ff;
+ color: #fff;
+ }
+ }
+
+ .list {
+ width: 100%;
+
+ .card-detail {
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ align-items: center;
+ line-height: 120%;
+ gap: 10rpx 0;
+
+ input {
+ font-size: 26rpx;
+ }
+
+ .detail {
+ // width: 50%;
+ box-sizing: border-box;
+ font-size: 26rpx;
+ color: #555;
+ padding-right: 20rpx;
+
+ text {
+ color: #999;
+ font-size: 26rpx;
+ }
+ }
+
+ .editable {
+ width: 50%;
+ display: inline-flex;
+ flex-direction: row;
+ align-items: center;
+
+ text {
+ flex-shrink: 0;
+ }
+
+ .sampleDestory {
+ border: 1px solid #acacac;
+ border-radius: 5rpx;
+ padding: 0 12rpx;
+ }
+ }
+ }
+ }
+
+ .icon-wrapper {
+ background-color: #3a78ff;
+ border-radius: 100%;
+ width: 40rpx;
+ height: 40rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-shrink: 0;
+
+ .uni-icons {
+ color: #fff !important;
+ }
+ }
+
+ .icon-wrapper-big {
+ background-color: #3a78ff;
+ border-radius: 100%;
+ width: 50rpx;
+ height: 50rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-shrink: 0;
+ margin-left: 20rpx;
+
+ .uni-icons {
+ color: #fff !important;
+ }
+ }
+
+ .more {
+ color: #888;
+ font-size: 22rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 10rpx;
+
+ .part {
+ width: 100%;
+ text-align: center;
+ }
+ }
+
+ .pass-background {
+ background-color: #cee3f2;
+ border: none;
+ }
+
+ .unpass-background {
+ background-color: #f0d6e3;
+ border: none;
+ }
+</style>
\ No newline at end of file
diff --git a/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBillList.vue b/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBillList.vue
new file mode 100644
index 0000000..2936f1e
--- /dev/null
+++ b/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBillList.vue
@@ -0,0 +1,572 @@
+<template>
+ <view class="page" id="pageContent">
+ <view class="search-condition-zone">
+ <view class="form-item">
+ <view class="left">
+ 鏃ユ湡:
+ </view>
+ <view class="daterange" style="flex: 1;">
+ <view class="right general">
+ <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HBeginDate">
+ <view>{{hform.HBeginDate}}</view>
+ </uni-datetime-picker>
+ </view>
+ <view>鈥�</view>
+ <view class="right general">
+ <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HEndDate">
+ <view>{{hform.HEndDate}}</view>
+ </uni-datetime-picker>
+ </view>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">
+ 鍗曟嵁鍙�:
+ </view>
+ <view class="right general">
+ <input type="text" v-model="hform.HBillNo" />
+ </view>
+ </view>
+ </view>
+ <view class="button-zone">
+ <button type="default" class="btn-a" size="mini" @tap="cmdAdd">鏂板</button>
+ <button type="default" class="btn-a" size="mini" @tap="cmdSearch">鏌ヨ</button>
+ <button type="default" class="btn-c" size="mini" @tap="exit">閫�鍑�</button>
+ </view>
+ <view class="info-list-zone" id="scroll-content" :style="{height: scrollContentHeight + 'px'}">
+ <view class="card-item" v-for="(item, index) in listData" :key="index">
+ <uni-card :title="item['鍗曟嵁鍙�']" :extra="'鏃ユ湡:' + item['鏃ユ湡'].split('T')[0]"
+ @tap="showDetail = showDetail==index?-1:index">
+ <view class="card-detail">
+ <view class="detail" v-if="item['鍗曟嵁绫诲瀷']">
+ <text>鍗曟嵁绫诲瀷锛�</text>{{item['鍗曟嵁绫诲瀷']}}
+ </view>
+ <view class="detail" v-if="item['鍗曟嵁鐘舵��']">
+ <text>鍗曟嵁鐘舵�侊細</text>{{item['鍗曟嵁鐘舵��']}}
+ </view>
+ <view class="detail" v-if="item['鍒ゆ柇缁撹']">
+ <text>鍒ゆ柇缁撹锛�</text>{{item['鍒ゆ柇缁撹']}}
+ </view>
+ <view class="detail" v-if="item['鐗╂枡浠g爜']">
+ <text>鐗╂枡浠g爜锛�</text>{{item['鐗╂枡浠g爜']}}
+ </view>
+ <view class="detail" v-if="item['鐗╂枡鍚嶇О']">
+ <text>鐗╂枡鍚嶇О锛�</text>{{item['鐗╂枡鍚嶇О']}}
+ </view>
+ <view class="detail" v-if="item['瑙勬牸鍨嬪彿']">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{item['瑙勬牸鍨嬪彿']}}
+ </view>
+ <view class="detail" v-if="item['妫�楠屾柟妗�']">
+ <text>妫�楠屾柟妗堬細</text>{{item['妫�楠屾柟妗�']}}
+ </view>
+ <view class="detail" v-if="item['瑙勬牸鍨嬪彿']">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{item['瑙勬牸鍨嬪彿']}}
+ </view>
+ </view>
+ <view class="card-detail" v-if="showDetail == index">
+ <view class="detail" v-if="item['璐ㄦ鍛�']">
+ <text>璐ㄦ鍛橈細</text>{{item['璐ㄦ鍛�']}}
+ </view>
+ <view class="detail" v-if="item['閮ㄩ棬']">
+ <text>閮ㄩ棬锛�</text>{{item['閮ㄩ棬']}}
+ </view>
+ <view class="detail" v-if="item['鐢熶骇璁㈠崟']">
+ <text>鐢熶骇璁㈠崟锛�</text>{{item['鐢熶骇璁㈠崟']}}
+ </view>
+ <view class="detail" v-if="item['宸ュ簭娴佽浆鍗″彿']">
+ <text>宸ュ簭娴佽浆鍗″彿锛�</text>{{item['宸ュ簭娴佽浆鍗″彿']}}
+ </view>
+ <view class="detail" v-if="item['鐢熶骇璧勬簮鍚嶇О']">
+ <text>鐢熶骇璧勬簮鍚嶇О锛�</text>{{item['鐢熶骇璧勬簮鍚嶇О']}}
+ </view>
+ <view class="detail" v-if="item['鍒涘缓浜�']">
+ <text>鍒涘缓浜猴細</text>{{item['鍒涘缓浜�']}}
+ </view>
+ <view class="detail" v-if="item['瀹℃牳浜�']">
+ <text>瀹℃牳浜猴細</text>{{item['瀹℃牳浜�']}}
+ </view>
+ <view class="detail" v-if="item['缁勭粐鍚嶇О']">
+ <text>缁勭粐鍚嶇О锛�</text>{{item['缁勭粐鍚嶇О']}}
+ </view>
+ <view class="detail" v-if="item['澶囨敞']">
+ <text>澶囨敞锛�</text>{{item['澶囨敞']}}
+ </view>
+ <view class="detail" v-if="item['婧愬崟鍙�']">
+ <text>婧愬崟鍙凤細</text>{{item['婧愬崟鍙�']}}
+ </view>
+ <view class="detail" v-if="item['鍒跺崟鏃ユ湡']">
+ <text>鍒跺崟鏃ユ湡锛�</text>{{item['鍒跺崟鏃ユ湡']}}
+ </view>
+ <view class="detail" v-if="item['瀹℃牳鏃ユ湡']">
+ <text>瀹℃牳鏃ユ湡锛�</text>{{item['瀹℃牳鏃ユ湡']}}
+ </view>
+
+ </view>
+ <view class="more" v-if="showDetail == index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;">
+ <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏀惰捣
+ </view>
+ <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view>
+ </view>
+ <view class="more" v-if="showDetail != index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;">
+ <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏇村淇℃伅
+ </view>
+ <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view>
+ </view>
+ <view class="op" v-if="operations == index">
+ <button class="op3" size="mini" plain @tap.stop="edit(item)">缂栬緫</button>
+ <button class="op3" size="mini" plain @tap.stop="audit(item, 1)" v-if="!listData[index]['瀹℃牳浜�']">瀹℃牳</button>
+ <button class="op3" size="mini" plain @tap.stop="audit(item, 2)" v-if="listData[index]['瀹℃牳浜�']">鍙嶅鏍�</button>
+ <button class="op4" size="mini" plain @tap.stop="del(item)">鍒犻櫎</button>
+ <button class="op5" size="mini" plain @tap.stop="operations = -1">鍙栨秷鎿嶄綔</button>
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-if="listData.length == 0">鏆傛棤鏁版嵁</view>
+ </view>
+
+ <view class="pagination-zone" id="pagination-zone">
+ <uni-pagination show-icon :page-size="paginationMeta.pageSize" :total="paginationMeta.total"
+ v-model="paginationMeta.current" @change="onPaginationChangeHandler"></uni-pagination>
+ </view>
+ </view>
+</template>
+
+<script>
+ import {
+ CommonUtils
+ } from '@/utils/common'
+ import {
+ getUserInfo
+ } from '@/utils/auth'
+ import dayjs, {
+ Dayjs
+ } from 'dayjs'
+ export default {
+ data() {
+ return {
+
+ navHeight: 0,
+ scrollTop: 0,
+
+ showDetail: -1,
+ operations: -1,
+
+ hform: {
+ HBeginDate: dayjs(new Date).subtract(30, 'd').format('YYYY-MM-DD'),
+ HEndDate: dayjs(new Date).format('YYYY-MM-DD'),
+ HBillNo: ''
+ },
+
+ paginationMeta: {
+ current: 1,
+ total: 0,
+ // pageSize: 30,
+ pageSize: 10,
+ },
+
+ pageMeta: {
+ scrollContentTop: 0,
+ bottomBtnTop: 0,
+ },
+
+ listData: [],
+ listDataShow: [],
+ }
+ },
+ computed: {
+ scrollContentHeight: {
+ get() {
+ return this.pageMeta.bottomBtnTop - this.pageMeta.scrollContentTop
+ }
+ }
+ },
+ methods: {
+ exit() {
+ uni.navigateBack()
+ },
+ cmdAdd() {
+ uni.navigateTo({
+ url: "/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBill?operationType=1"
+ })
+ },
+ async cmdSearch() {
+ let sWhere = ''
+ if (this.hform.HBeginDate != "" && this.hform.HEndDate != "") {
+ sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) between '" + this.hform.HBeginDate + "' and '" +
+ this.hform.HEndDate + "' ";
+ }
+ if (this.hform.HBillNo != "") {
+ sWhere += " and 鍗曟嵁鍙� like '%" + this.hform.HBillNo + "%'"
+ }
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/QC_WorkSelfCheckBill/QC_WorkSelfCheckBillListPage',
+ data: {
+ "sWhere": sWhere,
+ "user": getUserInfo()["Czymc"],
+ "page": this.paginationMeta.current,
+ "size": this.paginationMeta.pageSize
+ },
+ })
+
+ if (!res) {
+ return
+ }
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count > 0) {
+ this.listData = data
+ this.paginationMeta.total = count
+
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ } catch (err) {
+ console.warn(err);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触:' + err,
+ icon: 'none'
+ })
+ }
+ },
+ async onPaginationChangeHandler({
+ current
+ }) {
+
+ this.paginationMeta.current = current
+ this.cmdSearch()
+
+ },
+ async audit(item, mode) {
+ console.log('瀹℃牳鍗曟嵁: ',item);
+
+ try{
+ let res = await CommonUtils.doRequest2Sync({
+ method: 'GET',
+ url: '/QC_WorkSelfCheckBill/AuditQC_WorkSelfCheckBill',
+ data: {
+ HInterID: item["hmainid"],
+ type: mode,
+ user: getUserInfo()["Czymc"]
+ }
+ })
+
+ if(!res) {
+ return
+ }
+
+ let {count, data, Message} = res.data
+
+ if(count == 1) {
+ CommonUtils.showTips({
+ message: `${item["瀹℃牳浜�"]?'鍙嶅鏍�':'瀹℃牳'}鎴愬姛`
+ })
+ this.$forceUpdate()
+ setTimeout(() => {
+ this.cmdSearch()
+ }, 2000)
+ }else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鍗曟嵁${item["瀹℃牳浜�"]?'鍙嶅鏍�':'瀹℃牳'}澶辫触: ${Message}`
+ })
+ }
+ }catch(err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鍗曟嵁${item["瀹℃牳浜�"]?'鍙嶅鏍�':'瀹℃牳'}閿欒: ${err}`
+ })
+ }
+ },
+ async del(item) {
+ console.log("delItem: ", item);
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕佸垹闄よ褰曪紵鍒犻櫎鍚庝笉鑳芥仮澶�',
+ success: async (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/QC_WorkSelfCheckBill/DeltetQC_WorkSelfCheckBill',
+ data: {
+ "HInterID": item.hmainid,
+ "user": getUserInfo()["Czymc"]
+ }
+ })
+
+ if (!res) {
+ return
+ }
+
+ let {
+ count,
+ code,
+ Message
+ } = res.data
+ if (count == 0) {
+ return uni.showModal({
+ title: '閿欒鎻愮ず',
+ content: `鍒犻櫎閿欒: ${Message}`,
+ showCancel: false
+ })
+ }
+ uni.showToast({
+ title: '鍒犻櫎鎴愬姛',
+ icon: 'none'
+ })
+ this.cmdSearch()
+ } catch (err) {
+ uni.showModal({
+ title: '閿欒鎻愮ず',
+ content: `鎺ュ彛璇锋眰澶辫触: ${err}`,
+ showCancel: false
+ })
+ }
+ }
+ },
+ })
+
+ },
+ edit(item) {
+ console.log("editItem:", item)
+ uni.navigateTo({
+ url: `/pages/ZLGL/xunjianjianyan/PatrolProcCheckBill?operationType=3&linterid=${item.hmainid}`
+ })
+ }
+ },
+ onShow() {
+ this.$nextTick(() => {
+ this.cmdSearch()
+ })
+ },
+ onReady() {
+ // #ifndef MP-WEIXIN
+ let query = uni.createSelectorQuery().in(this)
+ query.select("#scroll-content").boundingClientRect((data) => {
+ this.pageMeta.scrollContentTop = data.top
+ }).exec()
+ query.select("#pagination-zone").boundingClientRect((data) => {
+ this.pageMeta.bottomBtnTop = data.top
+ }).exec()
+ // #endif
+ // #ifdef MP-WEIXIN
+ // 寰俊涓嶆敮鎸� uni.createSelectorQuery().in(this)
+ // #endif
+
+ },
+ }
+</script>
+
+<style lang="scss" scoped>
+ .page {
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+ padding: 20rpx 0;
+ position: relative;
+
+ .button-zone {
+ height: auto;
+ box-sizing: border-box;
+ padding-top: 20rpx;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ flex-wrap: wrap;
+
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+
+ .btn-a {
+ background-color: #3a78ff;
+ color: #fff;
+ }
+
+ .btn-c {
+ background-color: #ff5722;
+ color: #fff;
+ }
+ }
+
+ .search-condition-zone {
+ height: auto;
+ box-sizing: border-box;
+ padding: 0 60rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+
+ .form-item {
+ display: flex;
+ flex-direction: row;
+ gap: 20rpx;
+ align-items: center;
+ font-size: 28rpx;
+
+ .left {
+ width: 4rem;
+ }
+
+ .right {
+ flex: 1;
+ padding: 8rpx 16rpx;
+
+ .search {
+ width: 28rpx;
+ height: 28rpx;
+ }
+
+ input {
+ font-size: 28rpx;
+ }
+
+ .uni-combox {
+ padding: 0;
+ margin: 0;
+
+ ::v-deep .uni-combox__input {
+ font-size: 28rpx;
+ height: auto;
+ }
+ }
+ }
+
+ .general {
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ }
+
+ .disabled {
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+ }
+ }
+
+ .info-list-zone {
+ overflow-y: auto;
+
+ .card-item {
+ .card-detail {
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ line-height: 120%;
+
+ .detail {
+ // width: 50%;
+ font-size: 26rpx;
+ margin-bottom: 12rpx;
+ color: #555;
+ margin-right: 20rpx;
+
+ text {
+ color: #999;
+ font-size: 26rpx;
+ }
+ }
+ }
+ }
+ }
+
+ .daterange {
+ display: flex;
+ flex-direction: row;
+ gap: 10rpx;
+ justify-content: center;
+ align-items: center;
+ }
+
+ .more {
+ color: #888;
+ font-size: 24rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 20rpx;
+
+ .part {
+ width: 50%;
+ text-align: center;
+ }
+ }
+
+ .op {
+ display: flex;
+ justify-content: space-between;
+ gap: 20rpx;
+ margin-top: 20rpx;
+ flex-wrap: wrap;
+ align-content: flex-start;
+ button {
+ margin: 0;
+ flex-shrink: 0;
+ padding: 0;
+ width: 150rpx;
+ flex-basis: 150rpx;
+ font-size: 25rpx;
+ }
+
+ .op1 {
+ border: 1px solid #41a863;
+ color: #41a863;
+ }
+
+ .op2 {
+ border: 1px solid #d98d00;
+ color: #d98d00;
+ }
+
+ .op3 {
+ border: 1px solid #3a78ff;
+ color: #3a78ff;
+ }
+
+ .op4 {
+ border: 1px solid #da0000;
+ color: #da0000;
+ }
+
+ .op5 {
+ border: 1px solid #888;
+ color: #888;
+ }
+ }
+
+ .pagination-zone {
+ position: fixed;
+ bottom: 0;
+ box-sizing: border-box;
+ background-color: #fff;
+ box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
+ padding: 20rpx 40rpx 20rpx 40rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+ justify-content: space-between;
+ width: 100%;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/ZLGL/checkFlowList/QC_CheckedBillflowList.vue b/pages/ZLGL/checkFlowList/QC_CheckedBillflowList.vue
new file mode 100644
index 0000000..d2e6f78
--- /dev/null
+++ b/pages/ZLGL/checkFlowList/QC_CheckedBillflowList.vue
@@ -0,0 +1,544 @@
+<template>
+ <view class="page" id="pageContent">
+ <view class="search-condition-zone">
+ <view class="form-item">
+ <view class="left">婧愬崟绫诲瀷</view>
+
+ <uni-combox :candidates="arrayHSourceBillTypeName" placeholder="璇烽�夋嫨婧愬崟绫诲瀷" v-model="hform.HSourceBillTypeName"
+ @input="HSourceBillTypeNameChange"></uni-combox>
+ </view>
+ <view class="form-item">
+ <view class="left">
+ 鍗曟嵁鍙�:
+ </view>
+ <view class="right general">
+ <input type="text" v-model="hform.HBillNo" />
+ </view>
+ </view>
+ </view>
+ <view class="button-zone">
+ <button type="default" class="btn-a" size="mini" @tap="cmdSearch">鏌ヨ</button>
+ <button type="default" class="btn-c" size="mini" @tap="exit">閫�鍑�</button>
+ </view>
+
+ <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+
+ <view class="card-item" v-for="(item, index) in showList" :key="index">
+ <uni-card :title="item['鍗曟嵁鍙�']" :extra="'鏃ユ湡:' + item['鏃ユ湡'].split('T')[0]"
+ @tap="showDetail = showDetail==index?-1:index">
+ <view class="card-detail">
+ <!-- 鍔ㄦ�佺敓鎴愭墍鏈夐潪绌哄瓧娈� -->
+ <view
+ class="detail"
+ v-for="(value, key,keyIndex) in item"
+ :key="key"
+ v-if="keyIndex<=10 && shouldShowField(key, value)"
+ >
+ <text>{{ formatFieldName(key) }}锛�</text>{{ value }}
+ </view>
+ </view>
+ <view class="card-detail" v-if="showDetail == index">
+ <view
+ class="detail"
+ v-for="(value, key,keyIndex) in item"
+ :key="key"
+ v-if="keyIndex>=15 && shouldShowField(key, value)"
+ >
+ <text>{{ formatFieldName(key) }}锛�</text>{{ value }}
+ </view>
+
+ </view>
+ <view class="more" v-if="showDetail == index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;">
+ <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏀惰捣
+ </view>
+ <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view>
+ </view>
+ <view class="more" v-if="showDetail != index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;">
+ <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏇村淇℃伅
+ </view>
+ <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view>
+ </view>
+ <view class="op" v-if="operations == index">
+ <button class="op3" size="mini" plain @tap.stop="audit(item, 1)">鍙嶅鏍�</button>
+ <button class="op3" size="mini" plain @tap.stop="Reject(item)">椹冲洖</button>
+ <button class="op5" size="mini" plain @tap.stop="operations = -1">鍙栨秷鎿嶄綔</button>
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-if="listData.length == 0">鏆傛棤鏁版嵁</view>
+ <view class="over" v-if="listData.length != 0 && listData.length != showList.length">鍔犺浇涓�...</view>
+ <view class="over" v-if="listData.length != 0 && listData.length == showList.length">宸插埌搴�</view>
+
+
+ </view>
+</template>
+
+<script>
+ import {
+ CommonUtils
+ } from '@/utils/common'
+ import {
+ getUserInfo
+ } from '@/utils/auth'
+ import dayjs, {
+ Dayjs
+ } from 'dayjs'
+ export default {
+ data() {
+ return {
+ showDetail: -1,
+ operations : -1,
+ hform: {
+ HSourceBillType:'8505',
+ HSourceBillTypeName: "棣栦欢妫�楠屽崟",
+ HBillNo: ''
+ },
+ sWhere: '',
+ listData: [],
+ showList: [],
+ page: 1,
+ HSourceBillTypeList: {棣栦欢妫�楠屽崟:'8505',鏈欢妫�楠屽崟:'8507'},
+ arrayHSourceBillTypeName: [
+ "棣栦欢妫�楠屽崟",
+ "鏈欢妫�楠屽崟",
+ ],
+ }
+ },
+ onReachBottom: function() {
+ this.page++
+ setTimeout(() => {
+ this.showList = this.showList.concat(this.getPage(this.page, this.listData))
+ }, 100)
+ },
+ onPullDownRefresh: function() {
+ this.cmdSearch()
+ setTimeout(() => {
+ uni.stopPullDownRefresh();
+ }, 1000);
+ },
+ computed: {
+
+ },
+ methods: {
+ // 鍒ゆ柇鍝簺瀛楁闇�瑕佹樉绀�
+ shouldShowField(key, value) {
+ // 鎺掗櫎涓嶉渶瑕佹樉绀虹殑瀛楁
+ const excludeKeys = ['鍗曟嵁鍙�', '鏃ユ湡']; // 杩欎簺瀛楁宸茬粡鍦ㄥ叾浠栧湴鏂规樉绀轰簡
+
+ // 鍒ゆ柇key鏄惁鍏ㄨ嫳鏂囷紙涓嶅寘鍚腑鏂囷級
+ const isAllEnglish = /^[a-zA-Z]+$/.test(key);
+
+ // 鍒ゆ柇key鏄惁鍖呭惈"ID"锛堜笉鍖哄垎澶у皬鍐欙級
+ const containsID = key.toUpperCase().includes('ID');
+
+ return !excludeKeys.includes(key) &&
+ !isAllEnglish && // 鎺掗櫎鍏ㄨ嫳鏂囩殑key
+ !containsID && // 鎺掗櫎鍖呭惈ID鐨刱ey
+ value !== null &&
+ value !== undefined &&
+ value !== '';
+ },
+
+ // 鏍煎紡鍖栧瓧娈靛悕鏄剧ず
+ formatFieldName(key) {
+ // 浣犲彲浠ユ牴鎹渶姹傝嚜瀹氫箟鏄剧ず鍚嶇О
+ const nameMap = {
+ '鐗╂枡浠g爜': '鐗╂枡浠g爜',
+ '鐗╂枡鍚嶇О': '鐗╂枡鍚嶇О',
+ '瑙勬牸鍨嬪彿': '瑙勬牸鍨嬪彿',
+ // ... 鍏朵粬瀛楁鏄犲皠
+ };
+ return nameMap[key] || key;
+ },
+ HSourceBillTypeNameChange(e) {
+ console.log(e);
+ this.hform.HSourceBillType = this.HSourceBillTypeList[this.hform.HSourceBillTypeName];
+ console.log(this.hform.HSourceBillType);
+ this.cmdSearch();
+ },
+ exit() {
+ uni.navigateBack()
+ },
+ getPage(page, list) {
+ let sindex = (parseInt(page) - 1) * 20
+ let eindex = parseInt(page) * 20
+ let newList = list.slice(sindex, eindex)
+ return newList
+ },
+ async cmdSearch() {
+ let sWhere = ' '
+
+ if (this.hform.HBillNo != "") {
+ sWhere += " and 鍗曟嵁鍙� like '%" + this.hform.HBillNo + "%'"
+ }
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/LEMS/CheckFlowList',
+ data: {
+ "sWhere": sWhere,
+ "billType":this.hform.HSourceBillType,
+ "type":3,
+ "userid": getUserInfo()["Czybm"]
+ },
+ })
+ if (!res) {
+ return
+ }
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count > 0) {
+ this.listData = res.data.data
+ this.showList = this.getPage(this.page, this.listData)
+
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ } catch (err) {
+ console.warn(err);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触:' + err,
+ icon: 'none'
+ })
+ }
+ },
+
+ async audit(item, mode) {
+ console.log('瀹℃牳鍗曟嵁: ',item);
+ let url = '';
+ let ajaxData = '';
+ if(this.hform.HSourceBillType=='8505'){
+ url = 'QC_FirstPieceCheckBill/AuditFlow',
+ ajaxData= {
+ HInterID: item["hmainid"],
+ IsAudit: mode,
+ CurUserName: getUserInfo()["Czymc"],
+ CurUserID:getUserInfo()["Czybm"],
+ }
+ }else if(this.hform.HSourceBillType=='8507'){
+ url = 'QC_ProcessCheckBill/AuditFlow',
+ ajaxData= {
+ HInterID: item["hmainid"],
+ IsAudit: mode,
+ CurUserName: getUserInfo()["Czymc"],
+ CurUserID:getUserInfo()["Czybm"],
+ }
+ }
+ try{
+ let res = await CommonUtils.doRequest2Sync({
+ method: 'GET',
+ url: url,
+ data: ajaxData
+ })
+
+ if(!res) {
+ return
+ }
+
+ let {count, data, Message} = res.data
+
+ if(count == 1) {
+ CommonUtils.showTips({
+ message: `瀹℃牳鎴愬姛`
+ })
+ this.$forceUpdate()
+ setTimeout(() => {
+ this.cmdSearch()
+ }, 2000)
+ }else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `瀹℃牳澶辫触: ${Message}`
+ })
+ }
+ }catch(err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鍗曟嵁瀹℃牳鍑虹幇閿欒: ${err}`
+ })
+ }
+ },
+ async Reject(item) {
+ console.log("delItem: ", item);
+ let url = '';
+ let ajaxData = '';
+ if(this.hform.HSourceBillType=='8505'){
+ url = 'QC_FirstPieceCheckBill/RejectCheckFlow',
+ ajaxData= {
+ HInterID: item["hmainid"],
+ CurUserID:getUserInfo()["Czybm"],
+ }
+ }else if(this.hform.HSourceBillType=='8507'){
+ url = 'QC_ProcessCheckBill/RejectCheckFlow',
+ ajaxData= {
+ HInterID: item["hmainid"],
+ CurUserID:getUserInfo()["Czybm"],
+ }
+ }
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕侀┏鍥炶褰曪紵',
+ success: async (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: url,
+ data: ajaxData
+ })
+
+ if (!res) {
+ return
+ }
+
+ let {
+ count,
+ code,
+ Message
+ } = res.data
+ if (count == 0) {
+ return uni.showModal({
+ title: '閿欒鎻愮ず',
+ content: `椹冲洖閿欒: ${Message}`,
+ showCancel: false
+ })
+ }
+ uni.showToast({
+ title: '椹冲洖鎴愬姛',
+ icon: 'none'
+ })
+ this.cmdSearch()
+ } catch (err) {
+ uni.showModal({
+ title: '閿欒鎻愮ず',
+ content: `鎺ュ彛璇锋眰澶辫触: ${err}`,
+ showCancel: false
+ })
+ }
+ }
+ },
+ })
+
+ },
+
+ },
+ onShow() {
+ this.$nextTick(() => {
+ this.cmdSearch()
+ })
+ },
+
+ }
+</script>
+
+<style lang="scss" scoped>
+ .page {
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+ padding: 20rpx 0;
+ position: relative;
+
+ .button-zone {
+ height: auto;
+ box-sizing: border-box;
+ padding-top: 20rpx;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ flex-wrap: wrap;
+
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+
+ .btn-a {
+ background-color: #3a78ff;
+ color: #fff;
+ }
+
+ .btn-c {
+ background-color: #ff5722;
+ color: #fff;
+ }
+ }
+
+ .search-condition-zone {
+ height: auto;
+ box-sizing: border-box;
+ padding: 0 60rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+
+ .form-item {
+ display: flex;
+ flex-direction: row;
+ gap: 20rpx;
+ align-items: center;
+ font-size: 28rpx;
+
+ .left {
+ width: 4rem;
+ }
+
+ .right {
+ flex: 1;
+ padding: 8rpx 16rpx;
+
+ .search {
+ width: 28rpx;
+ height: 28rpx;
+ }
+
+ input {
+ font-size: 28rpx;
+ }
+
+ .uni-combox {
+ padding: 0;
+ margin: 0;
+
+ ::v-deep .uni-combox__input {
+ font-size: 28rpx;
+ height: auto;
+ }
+ }
+ }
+
+ .general {
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ }
+
+ .disabled {
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+ }
+ }
+
+ .info-list-zone {
+ overflow-y: auto;
+
+ .card-item {
+ .card-detail {
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ line-height: 120%;
+
+ .detail {
+ // width: 50%;
+ font-size: 26rpx;
+ margin-bottom: 12rpx;
+ color: #555;
+ margin-right: 20rpx;
+
+ text {
+ color: #999;
+ font-size: 26rpx;
+ }
+ }
+ }
+ }
+ }
+
+ .daterange {
+ display: flex;
+ flex-direction: row;
+ gap: 10rpx;
+ justify-content: center;
+ align-items: center;
+ }
+
+ .more {
+ color: #888;
+ font-size: 24rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 20rpx;
+
+ .part {
+ width: 50%;
+ text-align: center;
+ }
+ }
+
+ .op {
+ display: flex;
+ justify-content: space-between;
+ gap: 20rpx;
+ margin-top: 20rpx;
+ flex-wrap: wrap;
+ align-content: flex-start;
+ button {
+ margin: 0;
+ flex-shrink: 0;
+ padding: 0;
+ width: 150rpx;
+ flex-basis: 150rpx;
+ font-size: 25rpx;
+ }
+
+ .op1 {
+ border: 1px solid #41a863;
+ color: #41a863;
+ }
+
+ .op2 {
+ border: 1px solid #d98d00;
+ color: #d98d00;
+ }
+
+ .op3 {
+ border: 1px solid #3a78ff;
+ color: #3a78ff;
+ }
+
+ .op4 {
+ border: 1px solid #da0000;
+ color: #da0000;
+ }
+
+ .op5 {
+ border: 1px solid #888;
+ color: #888;
+ }
+ }
+
+ .pagination-zone {
+ position: fixed;
+ bottom: 0;
+ box-sizing: border-box;
+ background-color: #fff;
+ box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
+ padding: 20rpx 40rpx 20rpx 40rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+ justify-content: space-between;
+ width: 100%;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue b/pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
index 512fb27..e61f1a9 100644
--- a/pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
+++ b/pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
@@ -851,7 +851,7 @@
toScanCode() {
MpaasScan.scanCode((res) => {
if (res) {
- this.getSourceBillInfo(HBarCode);
+ this.getSourceBillInfo(res);
}
});
},
diff --git a/pages/ZLGL/mojianjianyan/lastPieceCheckBill.vue b/pages/ZLGL/mojianjianyan/lastPieceCheckBill.vue
index 212e1c0..f2ac772 100644
--- a/pages/ZLGL/mojianjianyan/lastPieceCheckBill.vue
+++ b/pages/ZLGL/mojianjianyan/lastPieceCheckBill.vue
@@ -682,7 +682,7 @@
toScanCode() {
MpaasScan.scanCode((res) => {
if (res) {
- this.getSourceBillInfo(HBarCode);
+ this.getSourceBillInfo(res);
}
});
},
diff --git a/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue b/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue
index dfef792..b2fde55 100644
--- a/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue
+++ b/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue
@@ -865,7 +865,7 @@
toScanCode() {
MpaasScan.scanCode((res) => {
if (res) {
- this.getSourceBillInfo(HBarCode);
+ this.getSourceBillInfo(res);
}
});
},
diff --git a/pages/ZLGL/xunjianjianyan/PatrolProcCheckBill.vue b/pages/ZLGL/xunjianjianyan/PatrolProcCheckBill.vue
index 68d0633..dd4d5fa 100644
--- a/pages/ZLGL/xunjianjianyan/PatrolProcCheckBill.vue
+++ b/pages/ZLGL/xunjianjianyan/PatrolProcCheckBill.vue
@@ -640,7 +640,7 @@
toScanCode() {
MpaasScan.scanCode((res) => {
if (res) {
- this.getSourceBillInfo(HBarCode);
+ this.getSourceBillInfo(res);
}
});
},
diff --git a/pages/ZLGL/zaikujianyandan/InStockCheckBill.vue b/pages/ZLGL/zaikujianyandan/InStockCheckBill.vue
new file mode 100644
index 0000000..af59c42
--- /dev/null
+++ b/pages/ZLGL/zaikujianyandan/InStockCheckBill.vue
@@ -0,0 +1,904 @@
+<template>
+ <view>
+ <!-- 鍩虹淇℃伅濉啓 -->
+ <view class="bill-main-area">
+ <view class="bill-main-content">
+ <!-- 鍩烘湰淇℃伅 -->
+ <view class="form-item">
+ <view class="title">鏉$爜:</view>
+ <view class="right">
+ <input :focus="barCodeFocus" v-model="hform.HBarCode" placeholder="璇锋壂鎻�(鎴栬緭鍏�)鏉$爜"
+ @confirm="getCode(hform.HBarCode)" />
+ </view>
+ <uni-icons type="scan"
+ style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
+ size="20" @click="toScanCode"></uni-icons>
+ </view>
+ <view class="form-item">
+ <view class="title">鏁伴噺:</view>
+ <view class="right">
+ <input v-model="hform.HQty" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">妫�楠岀粨鏋�:</view>
+ <view>
+ <radio-group name="QualityCheck" @change="HCheckResuleChangeHandler">
+ <label>
+ <radio value="姝e父" :checked="hform.HCheckResult == '姝e父'" /><text>鍚堟牸</text>
+ </label>
+ <view style="width: 1em;display: inline-block;"></view>
+ <label>
+ <radio value="寮傚父" :checked="hform.HCheckResult == '寮傚父'" /><text>涓嶅悎鏍�</text>
+ </label>
+ </radio-group>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁鏃ユ湡:</view>
+ <view class="right disabled">
+ <input v-model="hform.HDate" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="right disabled">
+ <input v-model="hform.HBillNo" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐗╂枡浠g爜:</view>
+ <view class="right disabled">
+ <input v-model="hform.HMaterNumber" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐗╂枡鍚嶇О:</view>
+ <view class="right disabled">
+ <input v-model="hform.HMaterName" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">瑙勬牸鍨嬪彿:</view>
+ <view class="right disabled">
+ <input v-model="hform.HModel" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">璁¢噺鍗曚綅:</view>
+ <view class="right disabled">
+ <input v-model="hform.HUnitName" disabled />
+ </view>
+ </view>
+ </view>
+ </view>
+
+ <view class="bill-sub-area">
+ <view class="bill-sub-tabs">
+ <view :class="tabs == 1 ? 'selected':''" @tap="tabs = 1">鐗╂枡淇℃伅</view>
+ <view :class="tabs == 2 ? 'selected':''" @tap="tabs = 2">鏉$爜淇℃伅</view>
+ </view>
+ <view class="bill-main-contents">
+ <!-- 鏉$爜缂撳瓨 -->
+ <view v-if="tabs == 2">
+ <view class="over" v-if="BarCodeList.length == 0">
+ 鏆傛棤鏁版嵁
+ </view>
+ <view v-else class="list" v-for="(item,index) in BarCodeList" :key="index">
+ <uni-card style="margin: 10px;" @tap="dalBarCodeCache(item , index)">
+ <view class="card-detail">
+ <view class="detail">
+ <text>鏉$爜缂栧彿锛�</text>{{item.HBarCode}}
+ </view>
+ <view class="detail">
+ <text>婧愬崟鍗曞彿锛�</text>{{item.HSourceBillNo}}
+ </view>
+ <view class="detail">
+ <text>鏁伴噺锛�</text>{{item.HQty}}
+ </view>
+ <view class="detail">
+ <text>鐗╂枡浠g爜锛�</text>{{item.HMaterNumber}}
+ </view>
+ <view class="detail">
+ <text>鐗╂枡鍚嶇О锛�</text>{{item.HMaterName}}
+ </view>
+ <view class="detail">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{item.HModel}}
+ </view>
+ <view class="detail">
+ <text>璁¢噺鍗曚綅锛�</text>{{item.HUnitName}}
+ </view>
+ <view class="detail">
+ <text>鏉$爜鐘舵�侊細</text>{{item.HBarCodeState}}
+ </view>
+ </view>
+ </uni-card>
+ </view>
+ </view>
+ <!-- 鐗╂枡缂撳瓨 -->
+ <view v-if="tabs == 1">
+ <view class="over" v-if="Object.keys(Materlist).length == 0">
+ 鏆傛棤鏁版嵁
+ </view>
+ <view v-else class="list" v-for="(item,index) in Materlist" :key="index">
+ <uni-card :title="item.HMaterName" :extra="item.HMaterNumber" style="margin: 10px;"
+ @tap="showBarCodeCache(item.HMaterNumber)">
+ <view class="card-detail">
+ <view class="detail">
+ <text>婧愬崟鍗曞彿锛�</text>{{item.HSourceBillNo}}
+ </view>
+ <view class="detail">
+ <text>鍚堟牸鏁伴噺锛�</text>{{item.HRightQty}}
+ </view>
+ <view class="detail">
+ <text>涓嶅悎鏍兼暟閲忥細</text>{{item.HBadQty}}
+ </view>
+ </view>
+ </uni-card>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view style="height: 120rpx;"></view>
+ <view class="bottom-btn">
+ <button class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
+ <view style="flex: 1;"></view>
+ <button class="btn-a" size="mini" @tap="addNew">鏂板</button>
+ <button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
+ </view>
+ </view>
+</template>
+
+<script>
+ import dayjs from "dayjs";
+ import {
+ getUserInfo
+ } from "../../../utils/auth";
+ import {
+ CommonUtils
+ } from "../../../utils/common";
+ import {
+ MpaasScan
+ } from "@/utils/mpaasScan.js"
+ export default {
+ name: "InStockCheckBill",
+ components: {},
+ data() {
+ return {
+ tabs: 1,
+ barCodeFocus: false,
+ HModName: "QC_InStockChechBill",
+ HBillType: "7526",
+ hform: {
+ HInterID: 0,
+ HBarCode: "",
+ HQty: 0,
+ HBillType: "7526",
+ HCheckResult: '姝e父',
+ HDate: dayjs(new Date()).format("YYYY-MM-DD"),
+ HBillNo: "",
+ HMaterNumber: "",
+ HMaterName: "",
+ HMaterModel: "",
+ HUnitName: "",
+ HUser: uni.getStorageSync("HEmpID")
+ },
+ Materlist: {}, // 鐗╂枡缂撳瓨锛岀敤鐗╂枡浠g爜浣滀负key锛屽叾涓繚瀛樼殑鍚堟牸鏁伴噺鍜屼笉鍚堟牸鏁伴噺鐩稿姞涓�0鍒欎粠缂撳瓨涓垹鍘�
+ BarCodeList: [], // 鏉$爜缂撳瓨
+ };
+ },
+ onLoad() {
+ this.getMaxBillNo()
+ },
+ methods: {
+ addNew() {
+ uni.redirectTo({
+ url: "/pages/ZLGL/zaikujianyandan/InStockCheckBill?OperationType=1"
+ })
+ },
+ async submit() {
+ if (this.hform.HInterID == 0 || !this.hform.HInterID) {
+ uni.showToast({
+ title: '鍗曟嵁鍐呯爜鑾峰彇澶辫触锛岄敊璇殑鍗曟嵁鍐呯爜锛�',
+ icon: 'none'
+ })
+ } else if (!this.hform.HBillNo) {
+ uni.showToast({
+ title: '鍗曟嵁鍙疯幏鍙栧け璐ワ紝閿欒鐨勫崟鎹彿锛�',
+ icon: 'none'
+ })
+ } else if (!this.Materlist || this.Materlist.length == 0) {
+ uni.showToast({
+ title: '娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忔潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�',
+ icon: 'none'
+ })
+ } else {
+
+ this.hform.HYear = dayjs(this.hform.HDate).year()
+ this.hform.HPeriod = dayjs(this.hform.HDate).month()
+ let sMainSub = {
+ sMain: this.hform,
+ sSub: this.Materlist
+ }
+
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/QC_InStockCheckBill/saveBill',
+ method: 'POST',
+ data: sMainSub
+ })
+
+ if (!res) {
+ return
+ }
+
+ console.log(1, res);
+ uni.hideLoading()
+ if (res.data.count == 1) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: '/pages/ZLGL/zaikujianyandan/InStockCheckBill?OperationType=1'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+
+ }
+ }
+ });
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ } catch (err) {
+ console.warn(err);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触:' + err,
+ icon: 'none'
+ })
+ }
+
+ }
+ },
+
+ goBack() {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕侀��鍑哄綋鍓嶉〉闈㈠悧锛�',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.navigateBack()
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ }
+ }
+ });
+ },
+ async getMaxBillNo() {
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: "/Web/GetMAXNum",
+ data: {
+ HBillType: this.HBillType,
+ },
+ });
+
+ if (!res) {
+ return;
+ }
+
+ let {
+ data,
+ Message,
+ count
+ } = res.data;
+ if (count == 1) {
+ this.hform.HInterID = data[0].HInterID;
+ this.hform.HBillNo = data[0].HBillNo;
+ } else {
+ throw Message;
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鑾峰彇鍗曟嵁鍙峰紓甯�: " + err,
+ });
+ }
+ },
+ dalBarCodeCache(item, index) {
+ console.log('item: ',item);
+ let Qty = this.BarCodeList[index]["HQty"]
+ let quit = false
+ let HBarCodeState = this.BarCodeList[index]["HBarCodeState"]
+ uni.showModal({
+ title: "鎻愮ず",
+ content: "鏄惁鍒犻櫎 鏉$爜 " + this.BarCodeList[index]["HBarCode"],
+ success: async (res) => {
+ if (res.confirm) {
+ // if (HBarCodeState == '姝e父') {
+ // this.Materlist[HMaterNumber]["HRightQty"] -= Qty
+ // } else if (HBarCodeState == '寮傚父') {
+ // this.Materlist[HMaterNumber]["HBadQty"] -= Qty
+ // }
+
+ // // 灏嗘潯鐮佽褰曚粠缂撳瓨涓垹闄�
+ // this.Materlist[HMaterNumber]["HBarCodeCache"].splice(index, 1)
+ // this.BarCodeList.splice(index, 1)
+ // if (this.Materlist[HMaterNumber]["HBarCodeCache"].length == 0) {
+ // // 鐗╂枡璁板綍涓棤鏉$爜锛屽垯鍒犻櫎鐗╂枡璁板綍
+ // this.$delete(this.Materlist, HMaterNumber)
+ // }
+ let delRes = await CommonUtils.doRequest2Async({
+ url: '/QC_InStockCheckBillController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json',
+ data: {
+ HItemID: item.HItemID,
+ HInterID: this.hform.HInterID,
+ HMaterID: item.HMaterID,
+ HAuxPropID: item.HAuxPropID || 0,
+ HMTONo: item.HMTONo || "",
+ HSourceInterID: item.HSourceInterID,
+ HSourceEntryID: item.HSourceEntryID,
+ HBillType: this.hform.HBillType
+ },
+ })
+ console.log('delRes: ',delRes);
+ if(delRes.data.count == 1) {
+ this.Materlist = {}
+ this.BarCodeList = []
+ this.DisBillEntryList()
+ }
+ } else if (res.cancel) {
+ quit = true
+ }
+ }
+ })
+
+ if (quit) {
+ return
+ }
+ },
+ showBarCodeCache(key) {
+ this.BarCodeList = this.Materlist[key]["HBarCodeCache"]
+ this.tabs = 2
+ },
+ HCheckResuleChangeHandler({
+ detail
+ }) {
+ console.log('value: ', detail.value);
+ this.hform.HCheckResult = detail.value
+ },
+ async DisBillEntryList() {
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: "/QC_InStockCheckBillController/GetBillEntryTmpList_Json",
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillNo: this.hform.HBillNo,
+ HBillType: this.hform.HBillType,
+ HStockOrgID: uni.getStorageSync('OrganizationID')
+ }
+ })
+
+ if (!res) {
+ return
+ }
+
+ let {
+ count,
+ data,
+ Message
+ } = res.data
+ if (count == 1) {
+ console.log('data: ', data);
+
+ this.BillEntryListPreProcess(data)
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇鏉$爜鏄庣粏閿欒: ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇鏉$爜鏄庣粏閿欒: ${err}`
+ })
+ }
+ },
+ BillEntryListPreProcess(data) {
+ // 璋冩暣鍥炰紶鐨勫崟鎹鍚� 鍓嶇鏄剧ず鐨勬牸寮�
+ let [
+ materList,
+ barCodeList
+ ] = data
+ let barCodeObj = {}
+ // 璋冩暣鏉$爜鍒楄〃
+ for (let i = 0; i < barCodeList.length; i++) {
+ if (!barCodeObj[barCodeList[i]["HMaterNumber"]]) {
+ barCodeObj[barCodeList[i]["HMaterNumber"]] = []
+ }
+
+ barCodeObj[barCodeList[i]["HMaterNumber"]].push({
+ HBarCode: barCodeList[i]["HBarCode"],
+ HSourceBillNo: barCodeList[i]["婧愬崟鍗曞彿"],
+ HMaterID: barCodeList[i]["HMaterID"],
+ HMaterNumber: barCodeList[i]["鐗╂枡浠g爜"],
+ HMaterName: barCodeList[i]["鐗╂枡鍚嶇О"],
+ HMaterModel: barCodeList[i]["瑙勬牸鍨嬪彿"],
+ HQty: barCodeList[i]["鏁伴噺"],
+ HAuxPropID: barCodeList[i]["HAuxPropID"],
+ HMTONo: barCodeList[i]["HMTONo"],
+ HBarCodeState: barCodeList[i]["鏉$爜鐘舵��"],
+ HItemID: barCodeList[i]["HItemID"],
+ HSourceInterID: barCodeList[i]["HSourceInterID"],
+ HSourceEntryID: barCodeList[i]["HSourceEntryID"]
+ })
+
+ // 璋冩暣鐗╂枡鍒楄〃
+ for (let i = 0; i < materList.length; i++) {
+ this.$set(this.Materlist, `${materList[i]["鐗╂枡浠g爜"]}`, {
+ HSourceBillNo: materList[i]["婧愬崟鍗曞彿"],
+ HMaterID: materList[i]["HMaterID"],
+ HMaterNumber: materList[i]["鐗╂枡浠g爜"],
+ HMaterName: materList[i]["鐗╂枡鍚嶇О"],
+ HMaterModel: materList[i]["瑙勬牸鍨嬪彿"],
+ HUnitName: materList[i]["璁¢噺鍗曚綅"],
+ HInterID: materList[i]["HInterID"],
+ HItemID: materList[i]["HItemID"],
+ HRightQty: materList[i]["鍚堟牸鏁伴噺"],
+ HBadQty: materList[i]["涓嶅悎鏍兼暟閲�"],
+ HBarCodeCache: barCodeObj[materList[i]["鐗╂枡浠g爜"]]
+ })
+ }
+ }
+
+ this.tabs = 1
+ },
+ toScanCode() {
+ MpaasScan.scanCode((code) => {
+ if (code) {
+ this.getCode(code);
+ }
+ })
+ },
+ async getCode(HBarCode) {
+ // 甯﹀嚭鏉$爜淇℃伅
+ console.log('HBarCode: ', HBarCode);
+ try {
+
+ // let res = await CommonUtils.doRequest2Sync({
+ // url: "/Gy_BarCodeBillList/page",
+ // data: {
+ // sWhere: ` and 鏉$爜缂栧彿=''${HBarCode}''`,
+ // user: getUserInfo()["Czymc"],
+ // page: 1,
+ // size: 50
+ // }
+ // })
+
+ let res = await CommonUtils.doRequest2Sync({
+ url: "/QC_InStockCheckBill/getBarCode",
+ data: {
+ sBarCode: HBarCode,
+ "HInterID": this.hform.HInterID,
+ "HBillType": this.hform.HBillType,
+ "HBillNo": this.hform.HBillNo,
+ "HMaker": getUserInfo()["Czymc"],
+ "HWhID": 0,
+ "HSPID": 0,
+ "HQty": 0,
+ "HRedBlueFlag": false,
+ "SourceFlag": true,
+ "HSourceBillNo": "",
+ "HSourceBillType": "",
+ "HStockOrgID": uni.getStorageSync("OrganizationID"),
+ "HScanStyle": "",
+ "HCustom1": "",
+ "HCustom2": "",
+ sBarCodeStatus: this.hform.HCheckResult
+ }
+ })
+
+ if (!res) {
+ return
+ }
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+
+ if (count == 1) {
+ console.log('data: ', data);
+ let barCodeInfo = data[0]
+ // 灞曠ず鏉$爜淇℃伅
+ Object.assign(this.hform, {
+ HBarCode: "",
+ HQty: barCodeInfo["鏁伴噺"],
+ HSourceBillNo: barCodeInfo["HSourceBillNo"],
+ HMaterNumber: barCodeInfo["鐗╂枡浠g爜"],
+ HMaterName: barCodeInfo["鐗╂枡鍚嶇О"],
+ HMaterModel: barCodeInfo["瑙勬牸鍨嬪彿"],
+ })
+
+ this.DisBillEntryList()
+
+ // 鏉$爜鏍规嵁褰撳墠鏄惁鍚堟牸 褰曞叆 鐗╂枡缂撳瓨
+ // if (!this.Materlist[`${barCodeInfo["鐗╂枡浠g爜"]}`]) {
+ // this.$set(this.Materlist, `${barCodeInfo["鐗╂枡浠g爜"]}`, {
+ // HSourceBillNo: barCodeInfo["婧愬崟鍗曞彿"],
+ // HMaterID: barCodeInfo["HMaterID"],
+ // HMaterNumber: barCodeInfo["鐗╂枡浠g爜"],
+ // HMaterName: barCodeInfo["鐗╂枡鍚嶇О"],
+ // HMaterModel: barCodeInfo["瑙勬牸鍨嬪彿"],
+ // HUnitName: barCodeInfo["璁¢噺鍗曚綅"],
+ // HRightQty: 0,
+ // HBadQty: 0,
+ // HBarCodeCache: []
+ // })
+ // }
+ //
+ // if (this.hform.HCheckResult == '姝e父') {
+ // this.Materlist[`${barCodeInfo["鐗╂枡浠g爜"]}`]["HRightQty"] += barCodeInfo["鏁伴噺"]
+ // // 瀛樺叆鏉$爜缂撳瓨
+ // this.Materlist[`${barCodeInfo["鐗╂枡浠g爜"]}`]["HBarCodeCache"].push({
+ // HBarCode: HBarCode,
+ // HSourceBillNo: barCodeInfo["婧愬崟鍗曞彿"],
+ // HMaterNumber: barCodeInfo["鐗╂枡浠g爜"],
+ // HMaterName: barCodeInfo["鐗╂枡鍚嶇О"],
+ // HMaterModel: barCodeInfo["瑙勬牸鍨嬪彿"],
+ // HUnitName: barCodeInfo["璁¢噺鍗曚綅"],
+ // HQty: barCodeInfo["鏁伴噺"],
+ // HBarCodeState: '姝e父'
+ // })
+ // } else {
+ // this.Materlist[`${barCodeInfo["鐗╂枡浠g爜"]}`]["HBadQty"] += barCodeInfo["鏁伴噺"]
+ // this.Materlist[`${barCodeInfo["鐗╂枡浠g爜"]}`]["HBarCodeCache"].push({
+ // HBarCode: HBarCode,
+ // HSourceBillNo: barCodeInfo["婧愬崟鍗曞彿"],
+ // HMaterNumber: barCodeInfo["鐗╂枡浠g爜"],
+ // HMaterName: barCodeInfo["鐗╂枡鍚嶇О"],
+ // HMaterModel: barCodeInfo["瑙勬牸鍨嬪彿"],
+ // HUnitName: barCodeInfo["璁¢噺鍗曚綅"],
+ // HQty: barCodeInfo["鏁伴噺"],
+ // HBarCodeState: '寮傚父'
+ // })
+ // }
+ } else {
+ CommonUtils.showTips({
+ titie: '娓╅Θ鎻愮ず',
+ message: `鑾峰彇鏉$爜淇℃伅澶辫触: ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ titie: '娓╅Θ鎻愮ず',
+ message: `鑾峰彇鏉$爜淇℃伅澶辫触: ${err}`
+ })
+ }
+ }
+ }
+ }
+</script>
+
+<style lang="scss">
+ input {
+ width: inherit;
+ font-size: 26rpx;
+ }
+
+ .uni-input {
+ padding: 0;
+ }
+
+ .bill-main-tabs,
+ .bill-sub-tabs {
+ box-sizing: border-box;
+ width: 730rpx;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: nowrap;
+ gap: 20rpx;
+ flex-shrink: 0;
+ overflow-x: auto;
+ border-bottom: 1px solid #ddd;
+ padding: 20rpx 10rpx;
+ white-space: nowrap;
+
+ view {
+ width: auto;
+ font-size: 26rpx;
+ color: #555;
+ text-align: center;
+ padding: 16rpx 0;
+ }
+
+ .selected {
+ color: #3a78ff;
+ font-weight: bold;
+ border-bottom: 3px solid #3a78ff;
+ }
+ }
+
+ .bill-main-content,
+ .bill-sub-content {
+ box-sizing: border-box;
+ padding: 0 30rpx 0 30rpx;
+ display: flex;
+ flex-direction: column;
+
+ .form-item {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ font-size: 26rpx;
+ padding: 6rpx 0;
+
+ .title {
+ width: 5em;
+
+ text {
+ color: red;
+ font-weight: bold;
+ }
+ }
+
+ .right {
+ // width: 450rpx;
+ padding: 8rpx 20rpx;
+ font-size: 26rpx;
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+
+ .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 {
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+
+ .none-border {
+ border: none;
+ }
+ }
+ }
+
+ .bottom-btn {
+ box-sizing: border-box;
+ width: 100%;
+ height: 120rpx;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ background-color: #fff;
+ box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
+ padding: 30rpx 40rpx 40rpx 40rpx;
+ display: flex;
+ flex-direction: row;
+ gap: 10rpx;
+
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+
+ .btn-a {
+ background-color: #3a78ff;
+ color: #fff;
+ }
+
+ .btn-b {
+ background-color: #41a863;
+ color: #fff;
+ }
+
+ .btn-c {
+ background-color: #acacac;
+ color: #fff;
+ // position: absolute;
+ // right: 120rpx;
+ }
+
+ .btn-d {
+ background-color: #ff8901;
+ color: #fff;
+ }
+ }
+
+ .buttons {
+ box-sizing: border-box;
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ padding: 10rpx 0;
+
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 26rpx;
+ }
+
+ .btn-a {
+ background-color: #acacac;
+ color: #fff;
+ }
+
+ .btn-b {
+ background-color: #41a863;
+ color: #fff;
+ }
+
+ .btn-c {
+ background-color: #3a78ff;
+ color: #fff;
+ }
+ }
+
+ .list {
+ width: 100%;
+
+ .card-detail {
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ align-items: center;
+ line-height: 120%;
+ gap: 10rpx 0;
+
+ input {
+ font-size: 26rpx;
+ }
+
+ .detail {
+ // width: 50%;
+ box-sizing: border-box;
+ font-size: 26rpx;
+ color: #555;
+ padding-right: 20rpx;
+
+ text {
+ color: #999;
+ font-size: 26rpx;
+ }
+ }
+
+ .editable {
+ width: 50%;
+ display: inline-flex;
+ flex-direction: row;
+ align-items: center;
+
+ text {
+ flex-shrink: 0;
+ }
+
+ .sampleDestory {
+ border: 1px solid #acacac;
+ border-radius: 5rpx;
+ padding: 0 12rpx;
+ }
+ }
+ }
+ }
+
+ .icon-wrapper {
+ background-color: #3a78ff;
+ border-radius: 100%;
+ width: 40rpx;
+ height: 40rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-shrink: 0;
+
+ .uni-icons {
+ color: #fff !important;
+ }
+ }
+
+ .icon-wrapper-big {
+ background-color: #3a78ff;
+ border-radius: 100%;
+ width: 50rpx;
+ height: 50rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-shrink: 0;
+ margin-left: 20rpx;
+
+ .uni-icons {
+ color: #fff !important;
+ }
+ }
+
+ .more {
+ color: #888;
+ font-size: 22rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 10rpx;
+
+ .part {
+ width: 100%;
+ text-align: center;
+ }
+ }
+
+ .pass-background {
+ background-color: #cee3f2;
+ border: none;
+ }
+
+ .unpass-background {
+ background-color: #f0d6e3;
+ border: none;
+ }
+
+ .list {
+ width: 100%;
+
+ .card-detail {
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ line-height: 120%;
+
+ .detail {
+ // width: 50%;
+ font-size: 26rpx;
+ margin-bottom: 12rpx;
+ color: #555;
+ margin-right: 20rpx;
+
+ text {
+ color: #999;
+ font-size: 26rpx;
+ }
+ }
+ }
+
+ .more {
+ color: #888;
+ font-size: 24rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 20rpx;
+
+ .part {
+ width: 50%;
+ text-align: center;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/index/login.vue b/pages/index/login.vue
index a1b464c..b923ab7 100644
--- a/pages/index/login.vue
+++ b/pages/index/login.vue
@@ -151,12 +151,12 @@
methods: {
async ApplyLanguagePack(lang, forceUpdate = false) {
// 璇诲彇璇█鍖呭苟鍔犺浇
- let languagePack = await getLanguagePackJson(lang)
- // this.$i18n.setLocaleMessage(lang, JSON.parse(languagePack))
+ // let languagePack = await getLanguagePackJson(lang)
+ // this.$i18n.setLocaleMessage(lang, languagePack)
this.$i18n.locale = lang
},
onLanguageChangeHandler(e) {
- //TODO: 鍔ㄦ�佽幏鍙栧悗绔殑璇█鍖呮枃浠讹紝骞跺皢璇█鍖呭簲鐢ㄥ埌鍏ㄥ眬
+ //鍔ㄦ�佽幏鍙栧悗绔殑璇█鍖呮枃浠讹紝骞跺皢璇█鍖呭簲鐢ㄥ埌鍏ㄥ眬
console.log('e: ', e.detail.value);
if (e.detail.value == 0) {
this.Language = '涓枃'
diff --git a/pages/index/mine.vue b/pages/index/mine.vue
index ff8cc08..7ffbc22 100644
--- a/pages/index/mine.vue
+++ b/pages/index/mine.vue
@@ -45,7 +45,7 @@
},{
img:'../../static/icon01.png',
text:'宸插鏍�',
- url:'',
+ url:'/pages/ZLGL/checkFlowList/QC_CheckedBillflowList',
id:1
},{
img:'../../static/icon06.png',
diff --git a/pages/index/tab3.vue b/pages/index/tab3.vue
index c75f8e6..0ef9312 100644
--- a/pages/index/tab3.vue
+++ b/pages/index/tab3.vue
@@ -112,20 +112,34 @@
},
{
"img": "../../static/icon/icon8.png",
- "text": "妯″叿棰嗘枡鍑哄簱鍗曞垪琛�",
+ "text": "妯″叿棰嗙敤鍑哄簱鍗曞垪琛�",
"url": "/pages/MJGL/mujulingliaochukudan/MouldProdOutBillList",
"id": 49,
"hidden": false
},
{
"img": "../../static/icon/icon8.png",
- "text": "妯″叿棰嗘枡閫�搴撳崟鍒楄〃",
+ "text": "妯″叿棰嗙敤閫�搴撳崟鍒楄〃",
"url": "/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBillList",
"id": 50,
"hidden": false
},
{
"img": "../../static/icon/icon8.png",
+ "text": "妯″叿棰嗙敤鍑哄簱鍗�",
+ "url": "/pages/MJGL/mujulingliaochukudan/MouldProdOutBill",
+ "id": 49,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
+ "text": "妯″叿棰嗙敤閫�搴撳崟",
+ "url": "/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill",
+ "id": 50,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
"text": "妯″叿璋冩嫧鍗曞垪琛�",
"url": "/pages/MJGL/qijudiaobodan/Sc_MouldMoveStockBillList",
"id": 51,
diff --git a/pages/index/tab4.vue b/pages/index/tab4.vue
index 2e86cc1..a41308d 100644
--- a/pages/index/tab4.vue
+++ b/pages/index/tab4.vue
@@ -134,6 +134,20 @@
"url": "/pages/ZLGL/QualityReportStep/QualityReportStepBillList",
"id": 55,
"hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
+ "text": "杞﹂棿鑷鍗�",
+ "url": "/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBill",
+ "id": 55,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
+ "text": "杞﹂棿鑷鍗曟煡璇�",
+ "url": "/pages/ZLGL/WorkSelfCheckBill/WorkSelfCheckBillList",
+ "id": 55,
+ "hidden": false
}
]
diff --git a/utils/auth.js b/utils/auth.js
index 488f616..6c2b0c9 100644
--- a/utils/auth.js
+++ b/utils/auth.js
@@ -74,7 +74,7 @@
}
export function getUserInfo() {
let userinfo = uni.getStorageSync('userinfo');
- console.log('userinfo', userinfo)
+ //console.log('userinfo', userinfo)
if (userinfo) {
return JSON.parse(userinfo);
}
diff --git a/utils/i18n.js b/utils/i18n.js
index b097a7e..04133e2 100644
--- a/utils/i18n.js
+++ b/utils/i18n.js
@@ -3,10 +3,14 @@
import {
CommonUtils
} from "./common.js"
-const MissingKeysMap = new Map()
+let MissingKeysMap = {}
+let enableCollectMissingKey = false
+let clockID = null
// 杩滅▼鑾峰彇璇█鍖�
export async function getLanguagePackJson(language, forceUpdate = false) {
+ // TODO 鑾峰彇璇█鍖呮椂锛屾坊鍔犱竴涓増鏈瓧娈碉紝瀵规瘮娴忚鍣ㄧ紦瀛樹腑鐨勭増鏈瓧娈靛拰鍚庣鏂囦欢鐨勬槸鍚﹀搴�
+ // 濡傛灉瀵瑰簲锛屽垯涓嶈繑鍥炰换浣曟枃浠讹紝浣跨敤缂撳瓨鏂囦欢鍗冲彲銆�
try {
const res = await CommonUtils.doRequest2Async({
url: '/Xt_grdAlignment_WMES/SelectMESLanguage_JSON',
@@ -15,17 +19,24 @@
forceUpdate: forceUpdate
}
})
- let {data, Message, count} = res.data
- if(count == 1) {
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+ if (count == 1) {
+ enableCollectMissingKey = true
return data
- }else {
+ } else {
+ enableCollectMissingKey = false
CommonUtils.showTips({
title: "娓╅Θ鎻愮ず",
message: "[i18n]鑾峰彇璇█鍖呭け璐�: " + Message
})
return
}
- }catch(err) {
+ } catch (err) {
+ enableCollectMissingKey = false
CommonUtils.showTips({
title: "娓╅Θ鎻愮ず",
message: "[i18n]鑾峰彇璇█鍖呭け璐�: " + err.message
@@ -34,13 +45,52 @@
}
}
-export function addMissingKeyToMap(key) {
- MissingKeysMap.set(key, key)
+export function addMissingKeyToMap(key, HFieldCode) {
+ if (enableCollectMissingKey) {
+ if (!MissingKeysMap[key]) {
+ MissingKeysMap[key] = new Set()
+ }
+ // 闃叉椤甸潰鍒濇鍔犺浇鏃讹紝浣跨敤鏈湴缈昏瘧妯″潡瀵艰嚧鐨� 鍋囩己澶辩幇璞�
+ MissingKeysMap[key].add(HFieldCode)
+ console.log('MissingKeysMap: ', MissingKeysMap);
+ if (!clockID) {
+ clockID = setTimeout(() => {
+ syncMissingKeyToDB()
+ }, 1000)
+ } else {
+ clearTimeout(clockID)
+ clockID = setTimeout(() => {
+ syncMissingKeyToDB()
+ }, 1000)
+ }
+ }
}
// 娣诲姞缂哄け瀛楁鍒拌繙绋嬫暟鎹簱
-export async function syncMissingKeyToDB(){
-
+export async function syncMissingKeyToDB() {
+ console.log('MissingKeysMap: ', MissingKeysMap);
+ for (let key in MissingKeysMap) {
+ if (MissingKeysMap.hasOwnProperty(key)) {
+ MissingKeysMap[key] = Array.from(MissingKeysMap[key])
+ }
+ }
+ CommonUtils.doRequest2Sync({
+ url: "/Xt_grdAlignment_WMES/syncMissingKeyToDB",
+ data: {
+ missingObj: JSON.stringify(MissingKeysMap)
+ }
+ })
// 娓呴櫎缂哄け瀛楁缂撳瓨
- MissingKeysMap.clear()
-}
+ MissingKeysMap = {}
+ // 閲嶅惎搴旂敤
+ const systemInfo = uni.getSystemInfoSync();
+ const platform = systemInfo.platform;
+
+ if (platform === 'ios' || platform === 'android') {
+ // App 绔細瀹屽叏閲嶅惎
+ plus.runtime.restart();
+ } else if (platform === 'h5') {
+ // H5 绔細鍒锋柊椤甸潰
+ window.location.reload();
+ }
+}
\ No newline at end of file
--
Gitblit v1.9.1