From 793ef6856085ca36fd586cc7848c07e673c2ae37 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 12 一月 2026 15:22:44 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue | 239 +++++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 180 insertions(+), 59 deletions(-)
diff --git a/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue b/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue
index 1aef13a..acd4e0e 100644
--- a/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue
+++ b/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue
@@ -50,13 +50,13 @@
<radio-group @change="radioChange" class="radio_Container">
<label>
<view>
- <radio value="OK" :checked="hform.HLastResult == 'OK'" />
+ <radio value="OK" :checked="calcHLastResult == 'OK'" />
<text>OK</text>
</view>
</label>
</label>
<view>
- <radio value="NG" :checked="hform.HLastResult == 'NG'" />
+ <radio value="NG" :checked="calcHLastResult == 'NG'" />
<text>NG</text>
</view>
</label>
@@ -141,7 +141,10 @@
</template>
<!-- 鏄庣粏淇℃伅 -->
<template v-if="tabs == 1">
- <view class="form">
+ <view class="form" :style="{
+ height: containerHeight + 'px',
+ overflow: 'auto'
+ }">
<view class="form-item">
<view class="left">
璁惧鐐规瑙勭▼
@@ -153,39 +156,40 @@
<uni-icons type="search" size="20" @click="toCheckFile"></uni-icons>
</view>
</view>
+
+ <view class="list" v-for="(item,index) in HCheckFileList" :key="index">
+ <uni-card style="margin: 10px;">
+ <view class="card-detail">
+ <view class="detail">
+ <text>搴忓彿锛�</text>{{index+1}}
+ </view>
+ <view class="detail">
+ <text>缁撴灉锛�</text>
+ <checkbox-group style="display: inline-block;"
+ @change="checkBoxChangeHandler(index, $event)">
+ <checkbox value="enabled" :checked="item.HDotCheckResult" />
+ </checkbox-group>
+ </view>
+ <view class="detail">
+ <text>鐐规椤圭洰鍒嗙被锛�</text>{{item.HDotCheckItemClassName}}
+ </view>
+ <view class="detail">
+ <text>鐐规椤圭洰锛�</text>{{item.HDotCheckItem}}
+ </view>
+ <view class="detail">
+ <text>鐐规閮ㄤ綅锛�</text>{{item.HDotCheckPart}}
+ </view>
+ <view class="detail">
+ <text>璐熻矗浜哄悕绉帮細</text>{{item.HManagerName}}
+ </view>
+ <view class="detail">
+ <text>澶囨敞锛�</text>{{item.HRemark}}
+ </view>
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-if="HCheckFileList.length == 0">鏆傛棤鏁版嵁</view>
</view>
- <view class="list" v-for="(item,index) in HCheckFileList" :key="index">
- <uni-card style="margin: 10px;">
- <view class="card-detail">
- <view class="detail">
- <text>搴忓彿锛�</text>{{index+1}}
- </view>
- <view class="detail">
- <text>缁撴灉锛�</text>
- <checkbox-group style="display: inline-block;"
- @change="checkBoxChangeHandler(index, $event)">
- <checkbox value="enabled" :checked="item.HDotCheckResult" />
- </checkbox-group>
- </view>
- <view class="detail">
- <text>鐐规椤圭洰鍒嗙被锛�</text>{{item.HDotCheckItemClassName}}
- </view>
- <view class="detail">
- <text>鐐规鏂规硶锛�</text>{{item.HDotCheckItemMethodName}}
- </view>
- <view class="detail">
- <text>鐐规閮ㄤ綅锛�</text>{{item.HDotCheckPart}}
- </view>
- <view class="detail">
- <text>璐熻矗浜哄悕绉帮細</text>{{item.HManagerName}}
- </view>
- <view class="detail">
- <text>澶囨敞锛�</text>{{item.HRemark}}
- </view>
- </view>
- </uni-card>
- </view>
- <view class="over" v-if="HCheckFileList.length == 0">鏆傛棤鏁版嵁</view>
</template>
<!-- 鍏朵粬淇℃伅 -->
<template v-if="tabs == 2">
@@ -278,6 +282,7 @@
<button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
</view>
<xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload>
+ <BillSelectorPopupVue @update="billSelectHandler" ref="billSelector" :Type="'DJ'"></BillSelectorPopupVue>
</view>
</template>
@@ -289,15 +294,15 @@
import {
MpaasScan
} from "@/utils/mpaasScan.js"
- import "@/pages/MJGL/style/MJBillStyle.scss"
import {
getUserInfo
} from "../../../utils/auth";
- import {
- TrackOpTypes
- } from "vue";
+ import BillSelectorPopupVue from "../../../components/MJGL/BillSelectorPopup.vue";
export default {
name: 'sb_EquipDotCheckBill',
+ components: {
+ BillSelectorPopupVue
+ },
data() {
return {
tabs: 0,
@@ -358,9 +363,50 @@
get() {
return this.btnTop - this.tabsBottom - 5
}
+ },
+ calcHLastResult: {
+ get() {
+ if (this.HCheckFileList.length == 0) {
+ return 'OK'
+ } else {
+ let okCount = this.HCheckFileList.reduce((acc, item) => {
+ if (item.HDotCheckResult) {
+ return acc + 1
+ }
+ return acc
+ }, 0)
+ if (okCount == this.HCheckFileList.length) {
+ return 'OK'
+ }
+ return 'NG'
+ }
+ }
}
+
},
methods: {
+ billSelectHandler(billData) {
+ console.log('billData: ', billData);
+ let data = billData.retVal[this.hform.HEquipID]
+ this.get_DocCheckItem2(data.hmainid)
+ },
+
+ toCheckFile() {
+ if (this.hform.HEquipID == 0) {
+ return CommonUtils.showTips({
+ message: '涓嶈兘閫夋嫨鐐规瑙勭▼锛岃鍏堟壂鎻忚澶囨潯鐮�!!!'
+ })
+ }
+ this.$refs['billSelector'].showPopup(this.hform.HEquipID)
+ },
+ addNew() {
+ uni.redirectTo({
+ url: './Sb_EquipDotCheckBill?operationType=1'
+ })
+ },
+ goBack() {
+ uni.navigateBack()
+ },
checkBoxChangeHandler(index, e) {
let cr = e.detail.value
if (cr.length == 0) {
@@ -511,17 +557,88 @@
Message
} = res.data
- console.log('data: ', data);
- this.hform.HEquipID = data[0].HInterID
- this.hform.HBarName = data[0].璁惧鍚嶇О
- this.hform.HBarSpec = data[0].璁惧瑙勬牸
- this.hform.HBarModel = data[0].璁惧鍨嬪彿
- this.hform.HQty = 1
+ if (count == 1) {
+ console.log('data: ', data);
+ this.hform.HEquipID = data[0].HInterID
+ this.hform.HBarName = data[0].璁惧鍚嶇О
+ this.hform.HBarSpec = data[0].璁惧瑙勬牸
+ this.hform.HBarModel = data[0].璁惧鍨嬪彿
+ this.hform.HQty = 1
- // 鑾峰彇妫�楠岃绋�
- this.GetItemByEquipFile()
+ // 鑾峰彇妫�楠岃绋�
+ this.GetItemByEquipFile()
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: Message
+ })
+ }
+
} catch (err) {
-
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: err
+ })
+ }
+ },
+ // 鑾峰彇淇濆吇瑙勭▼
+ async get_DocCheckItem2(HDotCheckRuleInterID) {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Web/GetDotCheckRuleItemByDotCheckRuleID",
+ data: {
+ "HDotCheckRuleInterID": HDotCheckRuleInterID
+ },
+ })
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ console.log('data: ',data);
+ this.hform.HEquipDotCheckRuleInterID = data[0].HInterID
+ this.hform.HEquipDotCheckRuleInterNo = data[0].HBillNo
+ this.hform.HPlanNo = data[0].鐐规璁″垝鍗�
+ this.hform.HPlanInterID = (data[0].鐐规璁″垝ID == null ? 0 : data[0].鐐规璁″垝ID) == "" ? 0 : data[0]
+ .鐐规璁″垝ID
+ this.hform.HPlanEntryID = (data[0].鐐规璁″垝瀛怚D == null ? 0 : data[0].鐐规璁″垝瀛怚D) == "" ? 0 : data[
+ 0].鐐规璁″垝瀛怚D
+
+ this.HCheckFileList = Array.from(data).map(item => {
+ return {
+ "HDotCheckItemID": item.HDotCheckItemID,
+ "HDotCheckCode": item.鐐规椤圭洰浠g爜,
+ "HDotCheckItem": item.鐐规椤圭洰,
+ "HDotCheckPart": item.鐐规閮ㄤ綅,
+ "HClaim": item.鍏蜂綋瑕佹眰,
+ "HManagerID": item.璐熻矗浜篒D,
+ "HManagerCode": item.璐熻矗浜轰唬鐮�,
+ "HManagerName": item.璐熻矗浜哄悕绉�,
+ "HSourceInterID": item.鐐规璁″垝ID == null ? 0 : item.鐐规璁″垝ID,
+ "HSourceEntryID": item.鐐规璁″垝瀛怚D == null ? 0 : item.鐐规璁″垝瀛怚D,
+ "HSourceBillNo": item.鐐规璁″垝鍗�,
+ "HDotCheckItemClassID": 0,
+ "HDotCheckItemClassName": "",
+ "HDotCheckItemMethodID": 0,
+ "HDotCheckItemMethodName": "",
+ "HDotCheckResult": item.榛樿缁撹 == 1 ? true : false
+ }
+ })
+
+ this.enableEdit = false
+ this.$refs["billSelector"].exit()
+
+ } else {
+ CommonUtils.showTips({
+ message: Message
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ message: err
+ })
}
},
async GetItemByEquipFile() {
@@ -626,13 +743,16 @@
},
method: "POST"
})
-
- if(!res) {
- return
+
+ if (!res) {
+ return
}
-
- let {count, Message} = res.data
- if(count == 1){
+
+ let {
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
uni.showModal({
title: '鎻愮ず',
content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
@@ -640,7 +760,7 @@
if (res.confirm) {
console.log('鐢ㄦ埛鐐瑰嚮纭畾');
uni.redirectTo({
- url: '/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill?operationType=1'
+ url: '/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill?operationType=1'
})
} else if (res.cancel) {
console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
@@ -650,14 +770,14 @@
}
}
});
- }else {
+ } else {
CommonUtils.showTips({
title: "娓╅Θ鎻愮ず",
message: "鎻愪氦鍗曟嵁澶辫触: " + Message
})
}
-
-
+
+
} catch (err) {
CommonUtils.showTips({
title: "娓╅Θ鎻愮ず",
@@ -704,5 +824,6 @@
}
</script>
-<style lang="scss">
+<style lang="scss" scoped>
+ @import "@/pages/MJGL/style/MJBillStyle.scss"
</style>
\ No newline at end of file
--
Gitblit v1.9.1