From 36fc0b413762f30fd9b33e2269bc6d7d374ad890 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 06 二月 2026 11:25:33 +0800
Subject: [PATCH] 设置宽屏自适应
---
/dev/null | 1436 ---------------------------------------------------------
pages.json | 5
pages/index/index.vue | 2
3 files changed, 5 insertions(+), 1,438 deletions(-)
diff --git a/pages.json b/pages.json
index 523252a..0140585 100644
--- a/pages.json
+++ b/pages.json
@@ -1837,7 +1837,10 @@
"navigationBarTitleText": "璁惧绠$悊",
"navigationBarBackgroundColor": "#3A78FF",
"backgroundColor": "#F8F8F8",
- "pageOrientation": "default"
+ "pageOrientation": "default",
+ "rpxCalcMaxDeviceWidth": 600, // rpx 璁$畻鎵�鏀寔鐨勬渶澶ц澶囧搴︼紝鍗曚綅 px锛岄粯璁ゅ�间负 960
+ "rpxCalcBaseDeviceWidth": 375, // rpx 璁$畻浣跨敤鐨勫熀鍑嗚澶囧搴︼紝璁惧瀹為檯瀹藉害瓒呭嚭 rpx 璁$畻鎵�鏀寔鐨勬渶澶ц澶囧搴︽椂灏嗘寜鍩哄噯瀹藉害璁$畻锛屽崟浣� px锛岄粯璁ゅ�间负 375
+ "rpxCalcIncludeWidth": 720 // rpx 璁$畻鐗规畩澶勭悊鐨勫�硷紝濮嬬粓鎸夊疄闄呯殑璁惧瀹藉害璁$畻锛屽崟浣� rpx锛岄粯璁ゅ�间负 750
},
"uniIdRouter": {},
"condition": { //妯″紡閰嶇疆锛屼粎寮�鍙戞湡闂寸敓鏁�
diff --git a/pages/ZLGL/QualityReportStep/QualityReportStepBill_tablet.vue b/pages/ZLGL/QualityReportStep/QualityReportStepBill_tablet.vue
deleted file mode 100644
index 2b82411..0000000
--- a/pages/ZLGL/QualityReportStep/QualityReportStepBill_tablet.vue
+++ /dev/null
@@ -1,1436 +0,0 @@
-<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 :class="mainTabSelected == 4 ? 'selected' : ''" @tap="mainTabSelected = 4">鍏朵粬淇℃伅</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-select" 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> -->
- <zxz-uni-data-select
- v-model="hform.HSourceBillType"
- dataKey="typeName"
- dataValue="typeID"
- :filterable="true"
- :localdata="HSourceBillTypeList"
- :clear="false"
- :disabled="hasSourceBill"
- @change="HSourceBillTypeNameChange"
- ></zxz-uni-data-select>
- </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"
- :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
- :disabled="hasSourceBill" size="20" @click="toScanCode"></uni-icons>
- </view>
- <view class="icon-wrapper-big">
- <uni-icons class="right-icon" type="search"
- :class="!hasSourceBill?'enable-icon-button':'disable-icon-button'"
- :disabled="hasSourceBill" size="20" @click="toBillSelector"></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>
- <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 disabled">
- <input type="number" v-model="hform.HSourceBillQty" />
- </view>
- </view>
- <view class="form-item">
- <view class="left">妫�楠屾暟閲�</view>
- <view class="right">
- <input type="number" v-model="hform.HCheckQty" :disabled="hasCheckQty" />
- </view>
- </view>
-
- <view class="form-item">
- <view class="left">妫�楠屽憳</view>
- <view class="right-select">
- <zxz-uni-data-select
- v-model="hform.HEmpID"
- dataKey="鑱屽憳鍚嶇О"
- dataValue="HItemID"
- :filterable="true"
- :localdata="HCheckEmpList"
- :clear="false"
- ></zxz-uni-data-select>
- </view>
- </view>
-
- <view class="form-item">
- <view class="left">宸ュ簭</view>
- <view class="right disabled">
- <input type="text" disabled :value="hform.HProcName" />
- </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 == 2">
- <view class="list" v-for="(item,index) in HisReportList" :key="index">
- <uni-card :title="item.HBadReasonName" style="margin: 10px;" @tap="delReason(item, $event)">
- <view class="card-detail">
- <view
- class="detail"
- v-for="(value, key,keyIndex) in item"
- :key="key"
- v-if="shouldShowField(key, value)"
- >
- <text>{{ formatFieldName(key) }}锛�</text>{{ value }}
- </view>
- </view>
- </uni-card>
- </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 class="bill-main-content" v-if="mainTabSelected == 4">
- <view class="form-item">
- <view class="left">鐢熶骇鐝粍</view>
- <view class="right-select">
- <zxz-uni-data-select
- v-model="hform.HGroupID"
- dataKey="鐝粍鍚嶇О"
- dataValue="HItemID"
- :filterable="true"
- :localdata="HGroupList"
- :clear="false"
- ></zxz-uni-data-select>
- </view>
- </view>
- <view class="form-item">
- <view class="left">鐢熶骇璧勬簮</view>
- <view class="right-select">
- <zxz-uni-data-select
- v-model="hform.HSourceID"
- dataKey="鐢熶骇璧勬簮鍚嶇О"
- dataValue="HItemID"
- :filterable="true"
- :localdata="HSourceList"
- :clear="false"
- ></zxz-uni-data-select>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 瀛愯〃鍖哄煙 -->
- <view class="bill-sub-area">
- <!-- 瀛愯〃椤电 -->
- <view class="bill-sub-tabs">
- <view v-for="subTab in subTabs" :key="subTab.typeID" :class="subTab.typeID == subTabSelected ? 'selected' : ''"
- @tap="subTabSelected = subTab.typeID">{{ subTab.typeName }}</view>
- </view>
- <!-- 瀛愯〃鍐呭 -->
- <view class="reason-container-flex">
- <!-- 妫�娴嬪�� 鍛堢幇 -->
- <view v-for="item in HBadReasonList"
- v-if="item.涓嶈壇绫诲瀷id==subTabSelected"
- :key="item.HItemID"
- class="reason-item-flex"
- :class="{ 'double-clicked': item.isDoubleClicked }"
- @click="reasonClick(item)"
- >
- <view >
- <view>{{ item.涓嶈壇鍘熷洜浠g爜 }}</view>
- <view>{{ item.涓嶈壇鍘熷洜鍚嶇О }}</view>
- <view>姹囨姤鎬绘暟:{{ item.num }}</view>
- </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>
-
- <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HSourceBillType"
- :HStockOrgID="hform.HStockOrgID" @BillSelectComplete="HandleBillSelectComplete"></BillListPopupVue>
- </view>
-</template>
-
-<script>
- import dayjs from "dayjs";
- import {
- CommonUtils
- } from "../../../utils/common";
-
- import BillListPopupVue from "../../../components/BillListPopup/BillListPopup.vue";
- import {
- getUserInfo
- } from "../../../utils/auth";
- import {
- MpaasScan
- } from "../../../utils/mpaasScan";
- export default {
- components: {
-
- BillListPopupVue,
- },
- computed: {
- },
- data() {
- return {
- serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
- //涓婁竴娆$偣鍑绘椂闂�
- lastClickTime: 0,
- operationType: 1,
-
- mainTabSelected: 1,
- subTabSelected: 0,
-
- // 婧愬崟鐘舵�佹帶鍒�
- hasSourceBill: false,
- hasCheckQty:false,
- // 瀛愯〃 椤电淇℃伅
- subTabs: {
- 0: {
- typeID: "0",
- typeName: "鍏跺畠绫诲瀷",
- },
- },
- HBadReasonList:[],
- //婧愬崟绫诲瀷
- HSourceBillTypeList:[{typeID:"3772",typeName:"宸ュ簭娴佽浆鍗�"},{typeID:"0",typeName:"鍘嗗彶缂撳瓨"}],
- //鐢熶骇璧勬簮
- HSourceList:[],
- //妫�楠屽憳
- HCheckEmpList:[],
- //鐝粍
- HGroupList:[],
- //鍘嗗彶鎵爜璁板綍
- HisReportList:[],
- // 涓昏〃灞炴��
- hform: {
- HBillType: '3717',
- HBillNo: "",
- HInterID: "0",
- HDate: dayjs(new Date()).format("YYYY-MM-DD"),
- HSourceID: getUserInfo().HSourceID,
- HEmpID:getUserInfo().HEmpID,
- HGroupID:getUserInfo().HGroupID,
- HDeptID:0,
- HMaterNumber: "",
- HMaterID: "0",
- HMaterName: "",
- HProcID: "0",
-
- HRemark: "",
- HMaker: getUserInfo()["Czymc"] || "",
- HChecker: "",
- HCloseMan: "",
- HMakeDate: dayjs(new Date()).format("YYYY-MM-DDTHH:mm:ss"),
- HCheckDate: "",
- HCloseDate: "",
- HUpDater: "",
- HDeleteMan: "",
- HUpDateDate: "",
- HDeleteDate: "",
-
- HCheckQty: 0,
- //婧愬崟淇℃伅
- HSourceBillQty: 0,
- HSourceBillNo:'',
- HSourceBillType: "3772",
- //娴佽浆鍗′俊鎭�
- HICMOBillNo: "",
- HICMOInterID: "0",
- HICMOEntryID: "1",
- HICMOQty: "0",
- HProcExchBillNo: "",
- HProcExchInterID: "0",
- HProcExchEntryID: "0",
- HProcExchQty: "0",
- HMainSourceBillType: "",
- HMainSourceInterID: "0",
- HMainSourceEntryID: "1",
- HMainSourceBillNo: "",
- HStockOrgID: uni.getStorageSync('OrganizationID'),
- },
- };
- },
- 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 = {
- 'HBadReasonNumber': '涓嶈壇鍘熷洜浠g爜',
- 'HBadReasonHName': '涓嶈壇鍘熷洜鍚嶇О',
- 'HCheckMan': '妫�楠屽憳',
- 'HGroupName': '鐝粍',
- 'HSourceName': '鐢熶骇璧勬簮',
- // ... 鍏朵粬瀛楁鏄犲皠
- };
- return nameMap[key] || key;
- },
- //涓嶈壇鍘熷洜鍗曞嚮
- reasonClick(item) {
- const now = Date.now();
- if (now - this.lastClickTime < 300) {
- // 鍙屽嚮閫昏緫
- this.handleDoubleClick(item);
- this.lastClickTime = 0;
- } else {
- // 鍗曞嚮閫昏緫
- this.handleSingleClick(item);
- this.lastClickTime = now;
- }
- },
- handleSingleClick(item) {
- console.log('鍗曞嚮:', item.涓嶈壇鍘熷洜鍚嶇О);
- },
- handleDoubleClick(item) {
-
-
- // 璁剧疆鍙屽嚮鐘舵��
- this.$set(item, 'isDoubleClicked', true);
-
- // 300ms鍚庣Щ闄ゅ姩鐢荤被锛堜笌鍔ㄧ敾鏃堕暱鍖归厤锛�
- setTimeout(() => {
- this.$set(item, 'isDoubleClicked', false);
- }, 300);
-
- // 瀹為檯涓氬姟閫昏緫
- console.log('鍙屽嚮:', item.涓嶈壇鍘熷洜鍚嶇О);
-
- this.submitBarCode(item);
- uni.vibrateShort(); // 鍙�夛細闇囧姩鍙嶉
- },
- // 婧愬崟绫诲瀷閫夋嫨
- HSourceBillTypeNameChange(e) {
-
- const pages = getCurrentPages()
- // 鑾峰彇椤甸潰鏍堜腑鐨勬渶鍚庝竴涓厓绱狅紝涔熷氨鏄綋鍓嶆樉绀虹殑椤甸潰
- const currentPage = pages[pages.length - 1]
- // 閫夋嫨婧愬崟绫诲瀷鍚� 缂撳瓨褰撳墠椤甸潰閫夋嫨
- uni.setStorageSync(`${currentPage.route.split("/").pop()}_HSourceBillTypeCache`, {
- HSourceBillType: this.hform.HSourceBillType
- })
- },
- // 璇诲彇缂撳瓨
- loadCache() {
- const pages = getCurrentPages()
- // 鑾峰彇椤甸潰鏍堜腑鐨勬渶鍚庝竴涓厓绱狅紝涔熷氨鏄綋鍓嶆樉绀虹殑椤甸潰
- const currentPage = pages[pages.length - 1]
- let HBillTypeCache = uni.getStorageSync(`${currentPage.route.split("/").pop()}_HSourceBillTypeCache`)
- if (HBillTypeCache) {
- this.hform.HSourceBillType = HBillTypeCache.HSourceBillType
- }
- },
- // 鏍规嵁婧愬崟绫诲瀷閫夋嫨鍗曟嵁
- toBillSelector() {
- this.$refs['billList'].showPopup()
- },
- toScanCode() {
- MpaasScan.scanCode((res) => {
- if (res) {
- this.getSourceBillInfo(res);
- }
- });
- },
- async getGy_BadReasonList() {
- let sWhere = ` and HUSEORGID = '${uni.getStorageSync('OrganizationID')}' and ISNULL(瀹℃牳浜�,'') != '' `
- if (this.serverUrl == 'http://122.228.39.234:7177/API/') {
- //娴疯瘹鏍规嵁鐗╂枡鍒嗙粍璁剧疆涓嶈壇鍘熷洜
- sWhere += " and 涓嶈壇绫诲瀷 like '%鎴愬搧%' order by 涓嶈壇鍘熷洜浠g爜"
- }else{
- sWhere += " order by 涓嶈壇鍘熷洜浠g爜"
- }
- let res = await CommonUtils.doRequest2Async({
- url: "/Gy_BadReason/list",
- data: {
- sWhere:sWhere,
- user:getUserInfo()["Czymc"]
- }
- })
-
- console.log(res)
- let {
- data,
- Message,
- count
- } = res.data
- if (count == 1) {
- data.forEach(item=>{
- const typeID = item["涓嶈壇绫诲瀷id"]
- const typeName = item["涓嶈壇绫诲瀷"]
- if (!this.subTabs[typeID]) {
- this.subTabs[typeID] = {
- typeID: typeID,
- typeName: typeName
- }
- }
- })
- this.HBadReasonList = data;
-
- } else {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: Message
- })
- }
- },
- async getSourceBillInfo(HBarCode) {
- console.log('HBarCode: ', HBarCode);
- let res = await CommonUtils.doRequest2Async({
- url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem",
- data: {
- HBillType: this.hform.HBillType,
- HSourceBillType: this.hform.HSourceBillType,
- HBarCode: HBarCode,
- HInterID: 0,
- HEntryID: 0,
- Mode: 1 ,//鎵爜妯″紡
- user:getUserInfo()["Czymc"]
- }
- })
-
- console.log(res)
- let {
- data,
- Message,
- count
- } = res.data
- if (count == 1) {
- if(data[0]['HBack']==1){
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: data[0]['HBackRemark']
- })
- return;
- }
- this.hform.HMaterID = data[0]['HMaterID']
- this.hform.HMaterName = data[0]['浜у搧鍚嶇О']
- this.hform.HMaterNumber = data[0]['浜у搧浠g爜']
- //婧愬崟淇℃伅
- this.hform.HMainSourceBillNo = data[0]['鍗曟嵁鍙�']
- this.hform.HSourceBillNo = data[0]['鍗曟嵁鍙�']
- this.hform.HMainSourceInterID = data[0].HInterID
- this.hform.HMainSourceEntryID = data[0].HEntryID
- this.hform.HSourceBillQty = data[0].娴佽浆鍗℃暟閲�
- this.hform.HICMOBillNo= data[0].浠诲姟鍗曞彿
- this.hform.HICMOInterID= data[0].HICMOInterID
- this.hform.HICMOEntryID= data[0].HICMOEntryID
- this.hform.HICMOQty= data[0].鐢熶骇鏁伴噺
- this.hform.HProcExchBillNo= data[0].鍗曟嵁鍙�
- this.hform.HProcExchInterID= data[0].HInterID
- this.hform.HProcExchEntryID= data[0].HEntryID
- this.hform.HProcExchQty= data[0].娴佽浆鍗℃暟閲�
- this.hasSourceBill = true
-
- this.hform.HSourceName= data[0].鐢熶骇璧勬簮
- this.hform.HSourceID= data[0].HSourceID
- this.hform.HProcID= data[0].HProcID
- this.hform.HProcName= data[0].褰撳墠宸ュ簭
- this.hform.HDeptID= data[0].HWorkShopID
-
- } else {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: Message
- })
- }
- },
- async HandleBillSelectComplete(e) {
- if(this.hform.HSourceBillType=="0"){
- this.hform.HSourceBillType = e.billInfo["HSourceBillType"];
- this.hform.HBillNo = e.billInfo["缂撳瓨鍗曟嵁鍙�"];
- this.hform.HInterID = e.billInfo["HInterID"];
- this.hform.HCheckQty = e.billInfo["妫�楠屾暟閲�"];
- await this.getHisReportList();
- }
- try {
- let res = await CommonUtils.doRequest2Async({
- url: "/WEBSController/get_CheckBillBarCode_Json_CheckItem",
- data: {
- HBillType: this.hform.HBillType,
- HSourceBillType: this.hform.HSourceBillType,
- HBarCode: "",
- HInterID: e?.HInterID,
- HEntryID: e?.HEntryID,
- Mode: 2 ,//閫夊崟妯″紡
- user:getUserInfo()["Czymc"]
- }
- })
-
- let {
- data,
- Message,
- count
- } = res.data
- if (count == 1) {
- //濡傛灉婧愬崟鏁伴噺瓒呭嚭鎻愮ず
- if(data[0]['HBack']==1){
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: data[0]['HBackRemark']
- })
- return;
- }
- console.log('鑾峰彇婧愬崟锛�', data)
- this.hform.HMaterID = data[0]['HMaterID']
- this.hform.HMaterName = data[0]['浜у搧鍚嶇О']
- this.hform.HMaterNumber = data[0]['浜у搧浠g爜']
- //婧愬崟淇℃伅
- this.hform.HMainSourceBillNo = data[0]['HBillNo']
- this.hform.HSourceBillNo = data[0]['鍗曟嵁鍙�']
- this.hform.HMainSourceInterID = data[0].HInterID
- this.hform.HMainSourceEntryID = data[0].HEntryID
- this.hform.HSourceBillQty = data[0].娴佽浆鍗℃暟閲�
- this.hform.HICMOBillNo= data[0].浠诲姟鍗曞彿
- this.hform.HICMOInterID= data[0].HICMOInterID
- this.hform.HICMOEntryID= data[0].HICMOEntryID
- this.hform.HICMOQty= data[0].鐢熶骇鏁伴噺
- this.hform.HProcExchBillNo= data[0].鍗曟嵁鍙�
- this.hform.HProcExchInterID= data[0].HInterID
- this.hform.HProcExchEntryID= data[0].HEntryID
- this.hform.HProcExchQty= data[0].娴佽浆鍗℃暟閲�
-
- this.hasSourceBill = true
-
- this.hform.HSourceName= data[0].鐢熶骇璧勬簮
- this.hform.HSourceID= data[0].HSourceID
- this.hform.HProcID= data[0].HProcID
- this.hform.HProcName= data[0].褰撳墠宸ュ簭
- this.hform.HDeptID= data[0].HWorkShopID
- this.$refs['billList'].exit()
- } else {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: Message
- })
- }
-
-
- } catch (err) {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: "婧愬崟涓嬫帹閿欒: " + err
- })
- }
-
- },
- // 鍘嗗彶鎵爜璁板綍鑾峰彇鍒濆鍖�
- async getHisReportList() {
- try {
- let res = await CommonUtils.doRequest2Async({
- url: "/Sc_QualityReportBill/get_BarCodeDetail",
- data: {
- HInterID: this.hform.HInterID,
-
- },
- });
-
- let {
- data,
- Message,
- count
- } = res.data;
-
- if (count == 1) {
- console.log("data: ", data);
- this.HisReportList = data;
-
- } else {
- this.HisReportList = [];
- CommonUtils.showTips({
- title: "娓╅Θ鎻愮ず",
- message: `鑾峰彇鍘嗗彶鎵爜璁板綍澶辫触: ${Message}`,
- });
- }
- } catch (err) {
- CommonUtils.showTips({
- title: "娓╅Θ鎻愮ず",
- message: `鑾峰彇鍘嗗彶鎵爜璁板綍澶辫触: ${err}`,
- });
- }
- },
- //鍒犻櫎鍘嗗彶璁板綍
- delReason(item) {
- uni.showModal({
- title: '鎻愮ず',
- content: '纭瑕佸垹闄� "' + item.HBadReasonHName + '" 鐨勬壂鐮佽褰曪紵鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�',
- success: (res) => {
- if (res.confirm) {
- uni.request({
- url: this.serverUrl +
- '/Sc_QualityReportBill/del_BarCodeDetail',
- data: {
- HItemID: item.HItemID,
-
- },
- success: (res) => {
- if (res.data.count == 1) {
- this.getHisReportList()
- uni.showToast({
- title: "鍒犻櫎鎴愬姛",
- icon: 'none'
- })
- } else {
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- }
- });
-
- }
- }
- });
- },
-
- // 妫�楠屽憳鍒濆鍖�
- async InitHEmp() {
- try {
- let res = await CommonUtils.doRequest2Async({
- url: "/Gy_Employee/list",
- data: {
- sWhere: ` and 绂佺敤鏍囪 = '' `,
- user: getUserInfo()["Czymc"],
- Organization: uni.getStorageSync("Organization"),
- },
- });
-
- let {
- data,
- Message,
- count
- } = res.data;
-
- if (count == 1) {
- console.log("data: ", data);
- this.HCheckEmpList = data;
-
- } else {
- CommonUtils.showTips({
- title: "娓╅Θ鎻愮ず",
- message: `鍒濆鍖栨楠屽憳澶辫触: ${Message}`,
- });
- }
- } catch (err) {
- CommonUtils.showTips({
- title: "娓╅Θ鎻愮ず",
- message: `鍒濆鍖栨楠屽憳澶辫触: ${err}`,
- });
- }
- },
- // 鐢熶骇璧勬簮鍒濆鍖�
- async InitHSource() {
- try {
- let res = await CommonUtils.doRequest2Async({
- url: "/Gy_Source/list",
- data: {
- sWhere: `and 绂佺敤鏍囪 != 'Y' and 缁勭粐 = '${uni.getStorageSync("Organization")}'`,
- user: getUserInfo()["Czymc"],
- },
- });
-
- let {
- data,
- Message,
- count
- } = res.data;
-
- if (count == 1) {
- this.HSourceList = data;
- } else {
- CommonUtils.showTips({
- title: "娓╅Θ鎻愮ず",
- message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${Message}`,
- });
- }
- } catch (err) {
- CommonUtils.showTips({
- title: "娓╅Θ鎻愮ず",
- message: `鍒濆鍖栫敓浜ц祫婧愬け璐�: ${err}`,
- });
- }
- },
- // 鐝粍鍒濆鍖�
- async InitHGroup() {
- try {
- let res = await CommonUtils.doRequest2Async({
- url: "/Gy_Group/list",
- data: {
- sWhere: `and 绂佺敤鏍囪 != 'Y' and 缁勭粐 = '${uni.getStorageSync("Organization")}'`,
- user: getUserInfo()["Czymc"],
- },
- });
-
- let {
- data,
- Message,
- count
- } = res.data;
-
- if (count == 1) {
- this.HGroupList = data;
- } 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: "3717",
- },
- });
-
- 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 submitBarCode(item){
- if(!this.checkSubmitValidate()){
- return
- }
- try {
- let oMainObject = {
- HInterID:this.hform.HInterID//閫掑叆type寰楀埌鐨勫崟鎹甀D
- ,HBillNo:this.hform.HBillNo
- ,HBillType:this.hform.HBillType
- ,HDate:new Date()
- ,HICMOBillNo:this.hform.HICMOBillNo
- ,HICMOInterID:this.hform.HICMOInterID
- ,HICMOEntryID:this.hform.HICMOEntryID
- ,HProcExchBillNo:this.hform.HProcExchBillNo
- ,HProcExchInterID:this.hform.HProcExchInterID
- ,HProcExchEntryID:this.hform.HProcExchEntryID
- ,HProcID:this.hform.HProcID
- ,HMaterID:this.hform.HMaterID
- ,HSourceID:this.hform.HSourceID
- ,HGroupID:this.hform.HGroupID
- ,HDeptID:this.hform.HDeptID
- ,HCheckManID:this.hform.HEmpID
- ,HBadReasonID:item.HItemID
- ,HBarCode:item.涓嶈壇鍘熷洜浠g爜
- ,HMaker:this.hform.HMaker
- ,HMakeDate:this.hform.HMakeDate
- ,HReportType:1
- ,HSourceBillType:this.hform.HSourceBillType
- ,HSourceBillNo:this.hform.HSourceBillNo
- ,HSourceInterID:this.hform.HMainSourceInterID
- ,HSourceEntryID:this.hform.HMainSourceEntryID
- ,HBadReasonHQty:1
- ,HQty:this.hform.HCheckQty
- }
- var sMainStr = JSON.stringify(oMainObject);
- var oMain = sMainStr + ';' + this.operationType;
-
- let res = await CommonUtils.doRequest2Sync({
- url: "/Sc_QualityReportBill/set_SaveBarCode",
- data: {
- oMain: oMain,
- },
- method: "POST",
- });
-
- if (!res) {
- return;
- }
-
- let {
- count,
- Message,
- data
- } = res.data;
- if (count == 1) {
- CommonUtils.showTips({
- title: "淇濆瓨鎴愬姛",
- message: `淇濆瓨鎴愬姛`,
- });
- if(!item.num){
- this.$set(item, 'num', 1);
- }else{
- this.$set(item, 'num', item.num+1);
- }
- console.log(item.num)
- //this.$set(item, 'num', newValue);
- this.getHisReportList();
- this.hasCheckQty=true;
- } else {
- CommonUtils.showTips({
- title: "娓╅Θ鎻愮ず",
- message: `涓嶈壇鍘熷洜淇濆瓨閿欒: ${Message}`,
- });
- }
- } catch (err) {
- CommonUtils.showTips({
- title: "娓╅Θ鎻愮ず",
- message: `涓嶈壇鍘熷洜淇濆瓨閿欒: ${err}`,
- });
- }
- },
- checkSubmitValidate() {
- // if (this.hform.HICMOQty == "" || this.hform.HICMOQty <= 0) {
- // CommonUtils.showTips({
- // message: "浠诲姟鍗曟暟閲忎笉鑳戒负绌轰笖涓嶈兘灏忎簬绛変簬0锛�",
- // });
- // return false;
- // }
-
- if (this.hform.HCheckQty==0||this.hform.HCheckQty=="") {
- CommonUtils.showTips({
- message: "璇疯緭鍏ユ楠屾暟閲忥紒",
- });
- return false;
- }
- if (this.hform.HEmpID == 0) {
- CommonUtils.showTips({
- message: "妫�楠屽憳鏈�夋嫨锛�",
- });
- return false;
- }
- if (!this.hasSourceBill) {
- CommonUtils.showTips({
- message: "婧愬崟鏈�夋嫨锛�",
- });
- return false;
- }
-
- return true;
- },
- async submit() {
- // if (!this.checkSubmitValidate()) {
- // return;
- // }
- if(this.HisReportList.length<=0){
- CommonUtils.showTips({
- title: "娓╅Θ鎻愮ず",
- message: `璇疯緭鍏ユ楠屼俊鎭痐,
- });
- return
- }
- try {
- console.log('this.$refs: ', this.$refs);
-
- let res = await CommonUtils.doRequest2Sync({
- url: "/Sc_QualityReportBill/set_SaveBill",
- data: {
- HInterID: this.hform.HInterID,
- HBillNo: this.hform.HBillNo,
- HChecker: getUserInfo()["Czymc"],
- HBillSubType: this.hform.HBillType
- },
- method: "Get",
- });
-
- 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/QualityReportStep/QualityReportStepBill?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/QualityReportStep/QualityReportStepBill",
- });
- },
- goBack() {
- uni.navigateBack();
- },
- // 璁剧疆涓鸿嚜鍔�
- setAuto() {
- if (uni.getSystemInfoSync().platform === 'android' ||
- uni.getSystemInfoSync().platform === 'ios') {
- plus.screen.unlockOrientation();
- }
- },
- // 璁剧疆涓虹珫灞�
- setPortrait() {
- if (uni.getSystemInfoSync().platform === 'android' ||
- uni.getSystemInfoSync().platform === 'ios') {
- plus.screen.lockOrientation('portrait');
- }
- },
-
- },
- async onLoad(e) {
- this.setAuto();
- this.operationType = e.operationType || 1;
- this.hform.HInterID = e.linterid || 0;
- if (this.operationType == 1) {
- await this.getMaxBillNo();
- } else if (this.operationType == 2) {
-
- }
- this.getGy_BadReasonList();
- await this.InitHSource();
- await this.InitHEmp();
- await this.InitHGroup();
- await this.loadCache();
- },
- onUnload(){
- this.setPortrait();
- }
- };
-</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: 100%;
- 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: row;
- flex-wrap: wrap; /* 瓒呭嚭鑷姩鎹㈣ */
- /* 鍙�夛細璁剧疆鎹㈣鍚庣殑瀵归綈鏂瑰紡 */
- align-content: flex-start; /* 澶氳瀵归綈鏂瑰紡 */
- .form-item {
- width: 600rpx;
- display: flex;
- align-items: center;
- font-size: 26rpx;
- padding: 6rpx 0;
- margin-right: 20rpx;
- .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;
- }
- }
- .right-select {
- //padding: 8rpx 20rpx;
- font-size: 26rpx;
- flex: 1;
-
- }
- .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: 50%;
-
- .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: 10%;
- padding: 0 12rpx;
- }
- .editable-input {
- 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;
- }
- .enable-icon-button {
- background-color: #3a78ff;
- padding: 6rpx;
- color: #fff;
- border-radius: 100%;
- }
-
- .disable-icon-button {
- background-color: lightgray;
- padding: 6rpx;
- color: #fff;
- border-radius: 100%;
- pointer-events: none;
- }
- /* 鍩虹鏍峰紡 */
- .reason-container-flex {
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- align-items: flex-start;
- gap: 10px; /* 鏂瑰潡闂磋窛 */
- padding: 10px;
- box-sizing: border-box;
- }
-
- .reason-item-flex {
- /* 鏂瑰潡鍩虹鏍峰紡 */
- background-color: #f5f5f5;
- border-radius: 8px;
- padding: 12px 16px;
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
- transition: all 0.3s ease;
-
- /* 鏂囧瓧鏍峰紡 */
- font-size: 14px;
- color: #333;
- text-align: center;
-
- width: 300rpx;
-
- /* 纭繚鍐呭涓嶆崲琛屾椂灞呬腑 */
- display: flex;
- justify-content: center;
- align-items: center;
- }
- /* 鍙屽嚮鍔ㄧ敾鏁堟灉 */
- @keyframes doubleClickPulse {
- 0% {
- transform: scale(1);
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
- }
- 50% {
- transform: scale(0.95);
- box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.3);
- }
- 100% {
- transform: scale(1);
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
- }
- }
- .reason-item-flex.double-clicked {
- animation: doubleClickPulse 0.5s ease-out;
- background-color: #e6f7ff;
- border: 1px solid #91d5ff;
- }
-</style>
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index fb03372..4cad284 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -446,7 +446,7 @@
<style lang="scss" scoped>
.header {
- width: 750rpx;
+ width: 100%;
background: linear-gradient(0deg, #71AFFC 0%, #3A78FF 100%);
font-size: 47rpx;
font-weight: bold;
--
Gitblit v1.9.1