From 2f0171d6525018a1c32cd4afa6bfaa983d6f585b Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 30 十月 2025 12:36:48 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
components/ZLGL/SampleSchemePopup.vue | 290 ++++++++
pages/ZLGL/shoujianjianyan/form.vue | 947 ++++++++++++++++++++++++++
pages/ZLGL/shoujianjianyan/table.vue | 572 +++++++++++++++
components/ZLGL/InspectValueTemplate.vue | 309 ++++++++
pages/zhijiediaobo/table.vue | 2
pages.json | 14
pages/index/tab2.vue | 14
7 files changed, 2,147 insertions(+), 1 deletions(-)
diff --git a/components/ZLGL/InspectValueTemplate.vue b/components/ZLGL/InspectValueTemplate.vue
new file mode 100644
index 0000000..bbfe0f9
--- /dev/null
+++ b/components/ZLGL/InspectValueTemplate.vue
@@ -0,0 +1,309 @@
+<template>
+ <view>
+ <view class="inspect-value-content">
+ <view class="form-item">
+ <view class="left">椤圭洰搴忓彿</view>
+ <view class="right disabled">
+ <input type="text" v-model="checkData.num" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">妫�楠岄」鐩�</view>
+ <view class="right disabled">
+ <input type="text" v-model="checkData.HQCCheckItemName" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">鏍锋湰閲�</view>
+ <view class="right disabled">
+ <input type="text" v-model="checkData.HSampleQty" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">妫�楠岀粨鏋�</view>
+ <view class="right disabled">
+ <input type="text" v-model="checkData.HResult2" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">涓嶅悎鏍兼暟</view>
+ <view class="right">
+ <input type="number" v-model="checkData.HSampleUnRightQty" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">淇濈暀灏忔暟浣�</view>
+ <view class="right">
+ <input type="number" v-model="checkData.HResDec" />
+ </view>
+ </view>
+ <view style="width: 100%;border-bottom: 1px solid #e3e3e3;"></view>
+ <view class="form-item" style="width: 100%;">
+ <view class="left">鐘舵��</view>
+ <view class="right none-border">
+ <view style="width: 4em; ">
+ {{ checkData.HStatus?"鍚堟牸":"涓嶅悎鏍�" }}
+ </view>
+ <view>
+ <switch style="width: 2em; transform:scale(0.7);" :checked="checkData.HStatus?'checked':''"
+ @change="HStatusChange" />
+ </view>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">姣旇緝绗�</view>
+ <view class="right disabled">
+ <input type="text" v-model="checkData.HResult2" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">鍗曚綅</view>
+ <view class="right disabled">
+ <input type="text" v-model="checkData.HTargetVal" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">妫�楠屽��</view>
+ <view class="right disabled">
+ <input type="text" v-model="checkData.HInspectVal" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">鐩爣鍊�</view>
+ <view class="right disabled">
+ <input type="text" v-model="checkData.HTargetVal" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">涓婇檺鍊�</view>
+ <view class="right disabled">
+ <input type="text" v-model="checkData.HUpLimit" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">涓嬮檺鍊�</view>
+ <view class="right disabled">
+ <input type="text" v-model="checkData.HDownLimit" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">涓婂亸宸�</view>
+ <view class="right disabled">
+ <input type="text" v-model="checkData.HUpOffset" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">涓嬪亸宸�</view>
+ <view class="right disabled">
+ <input type="text" v-model="checkData.HDownOffset" disabled />
+ </view>
+ </view>
+ <view style="width: 100%;border-bottom: 1px solid #e3e3e3;"></view>
+ <view class="inspect-value-list">
+ <view style="width: 100%;text-align: right;">
+ <button type="default" size="mini" class="btn-a" @click="storeInspectValue">缂撳瓨妫�楠屽��</button>
+ </view>
+ <view class="item" style="border-top: 2px solid #e3e3e3 ;">
+ <view class="th1">搴忓彿</view>
+ <view class="th2" style="display: flex; flex-direction: row; align-items: center;">
+ 妫�楠岀粨鏋�
+ </view>
+ <view class="th3">
+ 妫�楠屽��({{getAnalysisMethodTitle(checkData.HAnalysisMethod)}})
+ </view>
+ </view>
+ <view class="item" v-for="(item, index) in inspectValues">
+ <view class="th1">{{item.HSEQ}}</view>
+ <view class="th2" style="display: flex; flex-direction: row; align-items: center;">
+ <view style="width: 3em; ">
+ {{ item.HInspectResult?"鍚堟牸":"涓嶅悎鏍�" }}
+ </view>
+ <view>
+ <switch style="width: 3em; transform:scale(0.7);" :checked="item.HInspectResult?'checked':''"
+ @change="HInspectResultChange(index, $event)" />
+ </view>
+ </view>
+ <view class="th3">
+ <input type="number" v-model="item.HInspectValue" />
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+</template>
+
+<script>
+ // 妫�楠屽�兼ā鏉�
+ export default {
+ name: "InspectValueTemplate",
+ data() {
+ return {
+ checkData: {
+ HResDec: 2,
+ HResult2: '',
+ HStatus: true,
+ },
+ inspectValues: []
+ };
+ },
+ props: {
+ bindKey: {
+ type: [String, Number],
+ required: true
+ },
+ bindData: {
+ type: Object,
+ required: true
+ }
+ },
+ mounted() {
+ console.log('bingData: ', this.bindData);
+ let {data, list} = this.bindData
+ this.checkData = Object.assign(data, JSON.parse(JSON.stringify(this.bindData)))
+ // 鍒ゆ柇鏄惁鏈夌紦瀛樻暟鎹垨鑰呯紦瀛樻暟鎹槸鍚︿笌鏍锋湰鏁颁竴鑷�
+ if(!list || list.length != this.checkData.HSampleQty ){
+ for (let index = 0; index < this.checkData.HSampleQty; index++) {
+ this.inspectValues.push({
+ HSEQ: index + 1,
+ HInspectResult: true,
+ HInspectValue: 0,
+ })
+ }
+ }else {
+ this.inspectValues = list
+ }
+
+ this.$forceUpdate()
+ },
+ methods: {
+ storeInspectValue(){
+ this.$emit("update", {
+ data: this.checkData,
+ list: this.inspectValues
+ })
+ },
+ getAnalysisMethodTitle(type){
+ if(type == 1) {
+ return '瀹氭�у垎鏋�'
+ }else if(type == 2){
+ return '瀹氶噺鍒嗘瀽'
+ }
+ return '鍏朵粬鍒嗘瀽'
+ },
+ HStatusChange(e) {
+ this.checkData.HStatus = e.detail.value
+ },
+ HInspectResultChange(index, e) {
+ console.log('e: ',e.detail.value);
+ this.inspectValues[index].HInspectResult = e.detail.value
+ },
+
+ }
+ }
+</script>
+
+<style lang="scss">
+ input {
+ height: inherit;
+ width: inherit;
+ font-size: 26rpx;
+ }
+
+ .inspect-value-content {
+ box-sizing: border-box;
+ padding: 20rpx 10rpx;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ gap: 20rpx 0;
+
+ .form-item {
+ width: 50%;
+ display: flex;
+ align-items: center;
+ font-size: 26rpx;
+ box-sizing: border-box;
+ padding-left: 20rpx;
+
+ .left {
+ 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;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ }
+
+ .disabled {
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+
+ .none-border {
+ border: none;
+ }
+ }
+ }
+
+ .inspect-value-list {
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+
+ .item {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ font-size: 30rpx;
+ }
+
+ .th1 {
+ height: 100%;
+ width: 4em;
+ border: #e4e4e4 2px solid;
+ border-top: 0;
+ display: flex;
+ align-items: center;
+ box-sizing: border-box;
+ padding: 8rpx 16rpx;
+ }
+
+ .th2 {
+ height: 100%;
+ width: 50%;
+ border: #e4e4e4 2px solid;
+ border-left: 0;
+ border-top: 0;
+ box-sizing: border-box;
+ padding: 8rpx 16rpx;
+ }
+
+ .th3 {
+ height: 100%;
+ flex: 1;
+ border: #e4e4e4 2px solid;
+ border-left: 0;
+ border-top: 0;
+ box-sizing: border-box;
+ padding: 8rpx 16rpx;
+ }
+ }
+
+ .btn-a {
+ background-color: #3A78FF;
+ color: #fff;
+ }
+</style>
\ No newline at end of file
diff --git a/components/ZLGL/SampleSchemePopup.vue b/components/ZLGL/SampleSchemePopup.vue
new file mode 100644
index 0000000..7df8b14
--- /dev/null
+++ b/components/ZLGL/SampleSchemePopup.vue
@@ -0,0 +1,290 @@
+<template>
+ <view>
+ <uni-popup ref="popup" type="bottom" @change="popupChangeHandler">
+ <view class="content">
+ <view class="buttons">
+ <view style="flex: 1;"></view>
+ <button size="mini" type="primary" @click="exit">閫�鍑�</button>
+ </view>
+ <scroll-view id="#BillListPanel" scroll-y="true" style="height: 55vh;">
+ <view class="options-wrapper" v-show="HBillList.length != 0">
+ <uni-card :is-active="bill.isActive" :class="bill.isActive?'uni-card--is-active':''"
+ v-for="(bill, index) in HBillList[curPage-1]" :key="index" :title="bill['鎶芥牱鏂规鍚嶇О']"
+ @tap="clickCard(bill, index)">
+ <view class="item">
+ <view class="left">鎶芥牱鏂规浠g爜: </view>
+ <view class="right">{{bill['鎶芥牱鏂规浠g爜']}}</view>
+ </view>
+ <view class="item">
+ <view class="left">鎶芥牱绫诲瀷: </view>
+ <view class="right">{{bill['鎶芥牱绫诲瀷']}}</view>
+ </view>
+ <view class="item">
+ <view class="left">妫�楠屾按骞�: </view>
+ <view class="right">{{bill['妫�楠屾按骞�']}}</view>
+ </view>
+ <view class="item">
+ <view class="left">涓ユ牸搴�: </view>
+ <view class="right">{{bill['涓ユ牸搴�']}}</view>
+ </view>
+ <view class="item">
+ <view class="left">AQL: </view>
+ <view class="right">{{bill['AQL']}}</view>
+ </view>
+ <view class="item">
+ <view class="left">鏍锋湰閲�: </view>
+ <view class="right">{{bill['鏍锋湰閲�']}}</view>
+ </view>
+ <view class="item">
+ <view class="left">鍏佽鏁�: </view>
+ <view class="right">{{bill['鍏佽鏁�']}}</view>
+ </view>
+ <view class="item">
+ <view class="left">鎷掔粷鏁�: </view>
+ <view class="right">{{bill['鎷掔粷鏁�']}}</view>
+ </view>
+ <view class="item">
+ <view class="left">涓婇檺鍊�: </view>
+ <view class="right">{{bill['涓婇檺鍊�']}}</view>
+ </view>
+ <view class="item">
+ <view class="left">涓嬮檺鍊�: </view>
+ <view class="right">{{bill['涓嬮檺鍊�']}}</view>
+ </view>
+ <view class="item">
+ <view class="left">浣跨敤缁勭粐: </view>
+ <view class="right">{{bill['浣跨敤缁勭粐']}}</view>
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-show="HBillList.length == 0">鏆傛棤鏁版嵁</view>
+ </scroll-view>
+ <uni-pagination id="#pagination" title="鏍囬鏂囧瓧" v-model="curPage" :pageSize="size"
+ :total="length"></uni-pagination>
+ </view>
+
+ </uni-popup>
+ </view>
+</template>
+
+<script>
+ import dayjs from 'dayjs';
+ import {
+ CommonUtils
+ } from '@/utils/common';
+ import {
+ getUserInfo
+ } from '@/utils/auth';
+ export default {
+ name: "SampleSchemePopup",
+ emits: ["update:modelValue"],
+ data() {
+ return {
+ dayjs: dayjs,
+ enablefocus: false,
+ size: 20,
+ curPage: 1,
+ length: 0,
+ page: 0,
+ HSourceBillNo: '',
+ HMater: '',
+ HCustom: '',
+ HBillList: [],
+ panelHeight: 0,
+
+ multiSouceBillList: []
+ };
+ },
+ props: {
+ bindKey: {
+ type: [String, Number],
+ required: true
+ },
+ HStockOrgID: {
+ type: [String, Number],
+ },
+ },
+ methods: {
+ popupChangeHandler(e) {
+ if (e.show === true) {
+ this.getBillList()
+ }
+ },
+ async exit() {
+ this.size = 20
+ this.curPage = 1
+ this.length = 0
+ this.page = 0
+ this.HSourceBillNo = ''
+ this.HMater = ''
+ this.HCustom = ''
+ this.HBillList = []
+ this.enablefocus = false
+ this.multiSouceBillList = []
+ // 闇�瑕佺瓑寰呴〉闈㈠唴鐨勬暟鎹祴鍊煎畬姣�
+ await this.$nextTick()
+ this.$refs.popup.close();
+ },
+ search() {
+ this.getBillList()
+ },
+ showPopup() {
+ this.$refs.popup.open();
+ },
+ clickCard(bill, index) {
+ let retVal = {}
+ retVal[this.bindKey] = bill
+ console.log('retVal: ', retVal);
+ this.$emit("update", {
+ retVal: retVal
+ })
+ },
+ getsWhere() {
+ let sWhere = ''
+ if (this.HBeginDate && this.HEndDate) {
+ sWhere += ` and CONVERT(varchar(100),鏃ユ湡, 23) between '${this.HBeginDate}' and '${this.HEndDate}'`
+ }
+
+
+ if (this.HNumber) {
+ sWhere += ` and 浜у搧妯″叿浠g爜 like '%${this.HNumber}%'`
+ }
+
+ if (this.HName) {
+ sWhere += ` and 浜у搧妯″叿 like '%${this.HName}%'`
+ }
+
+ if (this.HBillNo) {
+ sWhere += ` and 鍗曟嵁鍙� like '%${this.HBillNo}%'`
+ }
+ return sWhere
+ },
+ getBillList() {
+ this.HBillList = []
+ this.length = 0
+ this.page = 0
+ this.curPage = 1
+ CommonUtils.doRequest(
+ "/Web/GetGy_SampleScheme", {
+ SampleScheme: '',
+ OrganizationID: this.HStockOrgID || uni.getStorageSync("OrganizationID")
+ },
+ (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.length = Array.from(data).length
+ const result = [];
+ for (let i = 0; i < data.length; i += this.size) {
+ result.push(data.slice(i, i + this.size));
+ }
+ this.HBillList = result
+ this.page = result.length
+ setTimeout(() => {
+ this.enablefocus = true
+ }, 500)
+ } else {
+ setTimeout(() => {
+ this.enablefocus = true
+ }, 500)
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ )
+ },
+ },
+ }
+</script>
+
+<style lang="scss">
+ .content {
+ box-sizing: border-box;
+ border-radius: 15rpx 15rpx 0 0;
+ padding: 20rpx 20rpx 40rpx 20rpx;
+ background-color: #fff;
+ display: flex;
+ flex-direction: column;
+ gap: 10rpx;
+
+ .search-condition {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 20rpx;
+ font-size: 30rpx;
+
+ .title {
+ width: 5rem;
+ text-align: right;
+ }
+
+ .right {
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ height: auto;
+ padding: 8rpx 16rpx;
+
+ input {
+ width: 100%;
+ font-size: 30rpx;
+ }
+ }
+ }
+
+ .buttons {
+ display: flex;
+ flex-direction: row;
+ gap: 20rpx;
+ justify-content: flex-end;
+
+ >button {
+ display: inline-flex;
+ width: 4rem;
+ }
+ }
+
+ .options-wrapper {
+ padding: 20rpx;
+ display: grid;
+ grid-template-columns: repeat(1, 1fr);
+ gap: 20rpx;
+
+ >view {
+ margin: 0 !important;
+ box-sizing: border-box;
+
+ }
+
+ .item {
+ .left {
+ display: inline-block;
+ width: 6rem;
+ }
+
+ .right {
+ display: inline-block;
+ }
+ }
+ }
+
+ .uni-card--is-active {
+ background-color: rgba(0, 122, 255, 0.2);
+ }
+
+ .daterange {
+ display: flex;
+ flex-direction: row;
+ gap: 10rpx;
+ justify-content: center;
+ align-items: center;
+
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages.json b/pages.json
index fecb117..f9ff9c3 100644
--- a/pages.json
+++ b/pages.json
@@ -886,6 +886,20 @@
{
"navigationBarTitleText" : "ERP鍗虫椂搴撳瓨鏌ヨ"
}
+ },
+ {
+ "path" : "pages/ZLGL/shoujianjianyan/table",
+ "style" :
+ {
+ "navigationBarTitleText" : "棣栦欢妫�楠屽崟缁存姢"
+ }
+ },
+ {
+ "path" : "pages/ZLGL/shoujianjianyan/form",
+ "style" :
+ {
+ "navigationBarTitleText" : "棣栦欢妫�楠屽崟"
+ }
}
],
"tabBar": {
diff --git a/pages/ZLGL/shoujianjianyan/form.vue b/pages/ZLGL/shoujianjianyan/form.vue
new file mode 100644
index 0000000..8da4f9e
--- /dev/null
+++ b/pages/ZLGL/shoujianjianyan/form.vue
@@ -0,0 +1,947 @@
+<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>
+ <!-- 涓昏〃鍐呭 -->
+ <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">
+ <input type="text" value="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">鐢熶骇鐝</view>
+ <view class="right">
+ <input type="text" value="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">鐢熶骇璧勬簮</view>
+ <view class="right">
+ <input type="text" value="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">浠诲姟鍗曞彿</view>
+ <view class="right">
+ <input type="text" value="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">浠诲姟鍗曟暟閲�</view>
+ <view class="right">
+ <input type="number" value="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">娴佽浆鍗″彿</view>
+ <view class="right">
+ <input type="text" value="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">娴佽浆鍗℃暟閲�</view>
+ <view class="right">
+ <input type="number" value="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">浜у搧鍚嶇О</view>
+ <view class="right">
+ <input type="text" value="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">妫�楠屽憳</view>
+ <view class="right">
+ <input type="text" value="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">妫�楠屾柟妗�</view>
+ <view class="right">
+ <input type="text" value="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">鎵瑰彿</view>
+ <view class="right">
+ <input type="text" value="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">鍒ゆ柇缁撹</view>
+ <view class="right none-border">
+ <radio-group @changer="checkResultChange">
+ <label>
+ <radio value="0" :checked="judgeConclusion" /><text></text>
+ 鍚堟牸
+ </label>
+ <view style="width: 20rpx;display: inline-block;"></view>
+ <label>
+ <radio value="1" :checked="!judgeConclusion" /><text></text>
+ 涓嶅悎鏍�
+ </label>
+ </radio-group>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">宸ュ簭</view>
+ <view class="right">
+ <input type="text" value="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">澶囨敞</view>
+ <view class="right">
+ <input type="text" value="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">寮傚父涓存椂澶勭悊鏂规</view>
+ <view class="right">
+ <input type="text" value="" />
+ </view>
+ </view>
+ </view>
+ <!-- 鍒跺崟淇℃伅 -->
+ <view class="bill-main-content" v-if="mainTabSelected == 2">
+ <view class="form-item">
+ <view class="left">鍒跺崟浜�</view>
+ <view class="right disabled">
+ <input type="text" value="" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">鍒跺崟鏃ユ湡</view>
+ <view class="right disabled">
+ <input type="text" value="" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">瀹℃牳浜�</view>
+ <view class="right disabled">
+ <input type="text" value="" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">瀹℃牳鏃ユ湡</view>
+ <view class="right disabled">
+ <input type="text" value="" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">鍏抽棴浜�</view>
+ <view class="right disabled">
+ <input type="text" value="" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">鍏抽棴鏃ユ湡</view>
+ <view class="right disabled">
+ <input type="text" value="" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">淇敼浜�</view>
+ <view class="right disabled">
+ <input type="text" value="" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">淇敼鏃ユ湡</view>
+ <view class="right disabled">
+ <input type="text" value="" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">浣滃簾浜�</view>
+ <view class="right disabled">
+ <input type="text" value="" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">浣滃簾鏃ユ湡</view>
+ <view class="right disabled">
+ <input type="text" value="" 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">
+ <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="showHQCCheckItemSelector"></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="showInspectInstruMentSelector"></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">
+ <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.num, $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 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="showHSampleSchemeNameSelector(SamplingItem)"></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>{{SamplingItem.HSampleDamageQty}}
+ </view>
+ <view class="detail editable">
+ <text>妫�楠岀粨鏋滐細</text>{{SamplingItem.HInspectResultToSee}}
+ </view>
+ </view>
+ </uni-card>
+ </view>
+ </view>
+ <!-- 妫�娴嬪�� 鍛堢幇 -->
+ <view v-else v-for="item in InspectModules" :key="item.id">
+ <view v-if="subTabSelected == item.id">
+ <InspectValueTemplateVue :bind-key="item.id"
+ :bind-data="{data: checkItems[item.checkItemId], list: InspectValues[item.checkItemId]}"
+ @update="InspectValueUpdate"></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 ref="sampleSchemePopup" @update="SampleSchemeComplete" :bindKey="currentChechItemIDCache">
+ </SampleSchemePopupVue>
+ </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 { getUserInfo } from '../../../utils/auth'
+ export default {
+ components: {
+ InspectValueTemplateVue,
+ SampleSchemePopupVue
+ },
+ computed: {
+ judgeConclusion: {
+ get() {
+ return true
+ }
+ }
+ },
+ data() {
+ return {
+ operationType: 1,
+ linterid: 0,
+
+ mainTabSelected: 1,
+ subTabSelected: 1,
+
+ // 褰撳墠鎿嶄綔鐨勬楠屽崟ID缂撳瓨
+ currentChechItemIDCache: -1,
+
+ // 妫�楠屾柟妗�
+ arrayAnalysisMethod: [{
+ value: 1,
+ name: '瀹氭�у垎鏋�'
+ }, {
+ value: 2,
+ name: '瀹氶噺鍒嗘瀽'
+ }, {
+ value: 3,
+ name: '鍏朵粬鍒嗘瀽'
+ }],
+ ArrayAnalysisMethodValue: [1, 2, 3],
+ // 瀛愯〃 椤电淇℃伅
+ subTabs: {
+ "1": {
+ id: "1",
+ name: "妫�楠岄」鐩�"
+ },
+ "2": {
+ id: "2",
+ name: "鎶芥牱妫�楠�"
+ }
+ },
+ // 涓昏〃灞炴��
+ hform: {
+ "HBillNo": "",
+ "HInterID": "0",
+ "HDate": dayjs(new Date()).format("YYYY-MM-DD"),
+ "HSourceName": "",
+ "HSourceID": "0",
+ "HShiftsName": "",
+ "HShiftsID": "0",
+ "HICMOBillNo": "",
+ "HICMOInterID": "0",
+ "HICMOEntryID": "1",
+ "HICMOQty": "",
+ "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": "2",
+ // "HAnalysisMethod": "1",
+ // "layTableCheckbox": "on",
+ // "HEntryID": "1",
+ // "HQCCheckItemName": "澶栬",
+ // "HQCCheckItemID": "2",
+ // "HSampleSchemeName": "",
+ // "HSampleSchemeID": "0",
+ // "HSampleQty": "0",
+ // "HSampleDamageQty": "0",
+ // "HSamplingType": "",
+ // "HAcceptQty": "",
+ // "HInspectResultToSee": "",
+ // "HInspectionLevel": "",
+ // "HRejectQty": "",
+ // "HStrictness": "",
+ // "HSampleUnRightQty": "0",
+ // "HAQL": "",
+ // "HSampleQty2": "0",
+ // "HInspectResultToSee2": "",
+ // "HSampleUnRightQty2": "0",
+ // "HResDec": "2",
+ // "HStatus": "1",
+ // "HComparator": "=",
+ // "HUnit": "",
+ // "HUnitID": "0",
+ // "HInspectVal": "",
+ // "HInspectValB": "",
+ // "HTargetVal": "",
+ // "HTargetValB": "",
+ // "HUpLimit": "0",
+ // "HDownLimit": "0",
+ // "HUpOffSet": "",
+ // "HDownOffSet": "",
+ // "HInSpectResult": "",
+ "HMainSourceBillType": "",
+ "HMainSourceInterID": "0",
+ "HMainSourceEntryID": "1",
+ "HMainSourceBillNo": ""
+ },
+ // 妫�楠岄」鐩拰鎶芥牱妫�楠� 鍊�
+ checkItems: {
+
+ },
+ // 妫�娴嬪�兼ā鍧�
+ InspectModules: {
+
+ },
+ // 妫�娴嬪��
+ InspectValues: {
+
+ }
+ }
+ },
+ methods: {
+ async showHSampleSchemeNameSelector(item) {
+ this.currentChechItemIDCache = item.num
+ console.log('this.$refs: ', this.$refs);
+ await this.$nextTick()
+ this.$refs.sampleSchemePopup.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() {
+ let ordinal = this.getObjLength(this.checkItems) + 1
+ let checkItem = {
+ "num": ordinal,
+ "HQCCheckItemID": "",
+ "HQCCheckItemNumber": "",
+ "HQCCheckItemName": "",
+ "HInspectInstruMentID": "0",
+ "HInspectInstruMentNumber": "",
+ "HInspectInstruMentName": "",
+ "HQCStd": "",
+ "HUnit": "",
+ "HQCNote": "",
+ "HAnalysisMethod": "",
+ "HResult": false,
+ "HMax": "",
+ "HMin": "",
+ "HAvg": "",
+ "HRemark": "",
+ "HKeyInspect": false,
+ "HStatus": 0,
+ "HSampleSchemeID": "",
+ "HUnitID": 0,
+ "HInspectVal": '',
+ "HTargetVal": '',
+ "HUpLimit": '',
+ "HDownLimit": '',
+ "HUpOffSet": '',
+ "HDownOffSet": '',
+ "HSampleDamageQty": 0,
+ "HSampleSchemeName": "",
+ "HSampleQty": 0,
+ "HAcceptQty": 0,
+ "HInspectionLevel": "",
+ "HRejectQty": 0,
+ "HStrictness": "",
+ "HSampleUnRightQty": 0,
+ "HAQL": "",
+ "HSamplingType": "",
+ "HInspectResultToSee": ""
+ }
+
+ this.$set(this.checkItems, ordinal, checkItem)
+
+
+ },
+ // 妫�楠岄」鐩垹闄よ
+ removeCheckItem(item) {
+ uni.showModal({
+ title: "娓╅Θ鎻愮ず",
+ content: `纭瑕佸垹闄ょ${item.num}琛屽悧锛熷垹闄ゅ悗涓嶈兘鎭㈠`,
+ success: (res) => {
+ if (res.confirm) {
+ this.$delete(this.checkItems, item.num)
+ this.refreshCheckItemNum()
+ }
+ }
+ })
+ },
+ async refreshCheckItemNum() {
+ await this.$nextTick()
+ // 閲嶆帓搴忓彿
+ let num = 1
+ for (let s in this.checkItems) {
+ console.log('s: ', s);
+ this.checkItems[s].num = num
+ num++
+ }
+ },
+ getObjLength(obj) {
+ return Object.keys(obj).length
+ },
+ // 缁撹淇敼
+ HResultChange(id, e) {
+ console.log('e: ', e);
+ this.checkItems[id]["HResult"] = e.detail.value ? 1 : 2
+ },
+ // 妫�楠屾柟妗堜慨鏀�
+ HAnalysisMethodChange(id, e) {
+ console.log('e: ', e);
+ this.checkItems[id]["HAnalysisMethod"] = this.arrayAnalysisMethod[e.detail.value]["value"]
+ },
+ // 閲嶇偣妫�鏌ヤ慨鏀�
+ HKeyInspectChange(id, e) {
+ console.log('e: ', e);
+ this.checkItems[id]["HKeyInspect"] = e.detail.value
+ },
+ // 妫�楠屾柟妗堥�夋嫨缁撴潫
+ 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.sampleSchemePopup.exit()
+ this.setInspectValModule(this.checkItems[key])
+ }
+ },
+ setInspectValModule(checkItem) {
+ // 鍖哄垎妫�楠屽�奸〉绛惧拰闈欐�侀〉绛撅紝妫�楠屽�奸〉绛剧殑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.HSampleSchemeName}`
+ })
+ },
+ 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 getMaxBillNo() {
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: "/Web/GetMAXNum",
+ data: {
+ "HBillType": '7505'
+ }
+ })
+
+ 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
+ })
+ }
+ }
+ },
+ async onLoad(e) {
+ this.operationType = e.operationType || 1
+ this.linterid = e.linterid || 0
+ if (this.operationType == 1) {
+ await this.getMaxBillNo()
+ } else if (this.operationType == 2) {
+
+ } else if (this.operationType == 3) {
+
+ }
+ }
+ }
+</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 10rpx;
+ 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;
+ }
+
+ .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;
+ }
+ }
+ }
+
+ .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;
+ }
+ }
+
+ .more {
+ color: #888;
+ font-size: 22rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 10rpx;
+
+ .part {
+ width: 100%;
+ text-align: center;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/ZLGL/shoujianjianyan/table.vue b/pages/ZLGL/shoujianjianyan/table.vue
new file mode 100644
index 0000000..1c9728e
--- /dev/null
+++ b/pages/ZLGL/shoujianjianyan/table.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 listDataShow">
+ <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['瑙勬牸鍨嬪彿'].trim()">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{item['瑙勬牸鍨嬪彿']}}
+ </view>
+ <view class="detail" v-if="item['妫�楠屾柟妗�'].trim()">
+ <text>妫�楠屾柟妗堬細</text>{{item['妫�楠屾柟妗�']}}
+ </view>
+ <view class="detail" v-if="item['瑙勬牸鍨嬪彿'].trim()">
+ <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, 0)" v-if="!listDataShow[index]['瀹℃牳浜�']">瀹℃牳</button>
+ <button class="op3" size="mini" plain @tap.stop="audit(item, 1)" v-if="listDataShow[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="listDataShow.length == 0">鏆傛棤鏁版嵁</view>
+ </view>
+
+ <view class="pagination-zone" id="pagination-zone">
+ <uni-pagination show-icon :page-size="paginationMeta.pageSize" :total="paginationMeta.total"
+ :current="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,
+ },
+
+ 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/shoujianjianyan/form?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_POStockInCheckBill/GetPOStockInCheckBill',
+ data: {
+ "sWhere": sWhere,
+ "user": getUserInfo()["Czymc"]
+ },
+ })
+
+ if (!res) {
+ return
+ }
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count > 0) {
+ this.listData = data
+ this.paginationMeta.total = data.length
+ this.onPaginationChangeHandler({
+ current: 1
+ })
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ } catch (err) {
+ console.warn(err);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触:' + err,
+ icon: 'none'
+ })
+ }
+ },
+ async onPaginationChangeHandler({
+ current
+ }) {
+ this.listDataShow =
+ this.listData.slice((current - 1) * this.paginationMeta.pageSize,
+ current * this.paginationMeta.pageSize)
+
+ },
+ async audit(item, mode) {
+ console.log('瀹℃牳鍗曟嵁: ',item);
+
+ try{
+ let res = await CommonUtils.doRequest2Sync({
+ method: 'GET',
+ url: 'QC_POStockInCheck_ValueTable/QC_POStockInCheckValue',
+ data: {
+ HInterID: item["hmainid"],
+ IsAudit: mode,
+ CurUserName: 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: '/Sc_MouldConkBookBill/DeltetMouldConkBookBill',
+ 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/shoujianjianyan/form?operationType=2&linterid=${item.hmainid}`
+ })
+ }
+ },
+ onLoad() {
+
+ 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/index/tab2.vue b/pages/index/tab2.vue
index 55fc725..aef34be 100644
--- a/pages/index/tab2.vue
+++ b/pages/index/tab2.vue
@@ -317,6 +317,20 @@
url: '/pages/weixiujilu/form',
id: 40,
hidden: false,
+ },
+ {
+ img: '../../static/icon/icon13.png',
+ text: '棣栦欢妫�楠屽崟缂撳瓨',
+ url: '/pages/ZLGL/shoujianjianyan/table',
+ id: 41,
+ hidden: false,
+ },
+ {
+ img: '../../static/icon/icon13.png',
+ text: '棣栦欢妫�楠屽崟',
+ url: '/pages/ZLGL/shoujianjianyan/form?operationType=1',
+ id: 42,
+ hidden: false,
}
]
}
diff --git a/pages/zhijiediaobo/table.vue b/pages/zhijiediaobo/table.vue
index 5319e1a..e074f6b 100644
--- a/pages/zhijiediaobo/table.vue
+++ b/pages/zhijiediaobo/table.vue
@@ -2,7 +2,7 @@
<view class="content">
<view class="tabs">
<view :class="tabs == 0 ? 'on':''" @tap="changeTab(0)">缂撳瓨鍒楄〃</view>
- <view :class="tabs == 1 ? 'on':''" @tap="changeTab(1)">宸叉牎楠屽垪琛�</view>
+ <view :class="tabs == 1 ? 'on':''" @tap="changeTab(1)">宸蹭笂浼犲垪琛�</view>
</view>
<view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
--
Gitblit v1.9.1