From c140f641bf373790b22c2d4fd59a506a7c0612a0 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期一, 29 十二月 2025 15:24:00 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
pages/MJGL/MouldScrapOutBill/MouldScrapOutBill.vue | 1129 ++++++++++++++++
pages.json | 28
pages/ZLGL/QualityReportStep/QualityReportStepBill.vue | 1536 ++++++++++++++++++++++
pages/index/tab2.vue | 21
pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill.vue | 56
.hbuilderx/launch.json | 4
pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue | 15
uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue | 13
pages/zhuangxiangdan/form.vue | 58
utils/common.js | 2
pages/ZLGL/QualityReportStep/QualityReportStepBillList.vue | 557 ++++++++
pages/weixiujilu/mouldRepairRecordBill.vue | 70
pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList.vue | 486 +++++++
pages/MJGL/mujulingliaochukudan/MouldProdOutBill.vue | 49
components/BillListPopup/BillListPopup.vue | 7
pages/index/index.vue | 9
pages/qijvguzhangdengji/mouldMistakeBill.vue | 33
17 files changed, 3,920 insertions(+), 153 deletions(-)
diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
index a7d9080..4dd14cd 100644
--- a/.hbuilderx/launch.json
+++ b/.hbuilderx/launch.json
@@ -21,11 +21,11 @@
"type" : "uni-app:app-ios"
},
{
- "customPlaygroundType" : "local",
+ "customPlaygroundType" : "device",
"localRepoPath" : "D:/WorkBench/ZY_APP_Dev/STUWMS/unpackage/debug",
"openVueDevtools" : true,
"packageName" : "com.shebeiguanli.www",
- "playground" : "custom",
+ "playground" : "standard",
"type" : "uni-app:app-android"
}
]
diff --git a/components/BillListPopup/BillListPopup.vue b/components/BillListPopup/BillListPopup.vue
index 50880e6..ae4c641 100644
--- a/components/BillListPopup/BillListPopup.vue
+++ b/components/BillListPopup/BillListPopup.vue
@@ -26,7 +26,7 @@
<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['鐗╂枡鍚嶇О']"
:extra="`鏁伴噺: ${bill['鏁伴噺']}`"
- @tap="clickCard(bill['HSourceInterID'], bill['鍗曟嵁鍙�'], index, bill['HSourceEntryID'])">
+ @tap="clickCard(bill['HSourceInterID'], bill['鍗曟嵁鍙�'], index, bill['HSourceEntryID'],bill)">
<view class="item" v-for="(field, index) in HFieldList" :key="index">
<view class="left">{{ field.ColmCols}}: </view>
<view class="right" v-if="field.ColmType == 'DateTime'">{{
@@ -150,7 +150,7 @@
showPopup() {
this.$refs.popup.open();
},
- clickCard(interid, billno, index, entryid) {
+ clickCard(interid, billno, index, entryid,bill=[]) {
if (this.MultiSourceBill == false) { // 闈炲婧愬崟妯″紡
// 鎬荤嚎鏂瑰紡浼犻�掓暟鎹� (鍙法缁勪欢浼犻��)
uni.$emit('BillSelectComplete', {
@@ -165,7 +165,8 @@
HInterID: interid,
HBillNo: billno,
enableMultiSourceBill: this.MultiSourceBill,
- HEntryID: entryid || 0
+ HEntryID: entryid || 0,
+ billInfo:bill
})
} else {
this.$set(this.HBillList[this.curPage - 1][index], 'isActive', !this.HBillList[this.curPage - 1][
diff --git a/pages.json b/pages.json
index 13fad90..f0a9c47 100644
--- a/pages.json
+++ b/pages.json
@@ -1336,6 +1336,34 @@
"navigationBarTitleText" : "妯″叿妗f鏌ヨ",
"enablePullDownRefresh": true
}
+ },
+ {
+ "path" : "pages/ZLGL/QualityReportStep/QualityReportStepBill",
+ "style" :
+ {
+ "navigationBarTitleText" : "鍏ㄦ妫�楠屽崟(涓嶈壇姹囨姤)",
+ "pageOrientation": "auto" // 鏀寔妯睆
+ }
+ },
+ {
+ "path" : "pages/ZLGL/QualityReportStep/QualityReportStepBillList",
+ "style" :
+ {
+ "navigationBarTitleText" : "鍏ㄦ妫�楠屽崟(涓嶈壇姹囨姤)鏌ヨ"
+ }
+ },
+ {
+ "path": "pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList",
+ "style": {
+ "navigationBarTitleText": "妯″叿鎶ュ簾鍑哄簱鍗曞垪琛�"
+ }
+ },
+ {
+ "path": "pages/MJGL/MouldScrapOutBill/MouldScrapOutBill",
+ "style": {
+ "navigationBarTitleText": "妯″叿鎶ュ簾鍑哄簱鍗�",
+ "enablePullDownRefresh": true
+ }
}
],
diff --git a/pages/MJGL/MouldScrapOutBill/MouldScrapOutBill.vue b/pages/MJGL/MouldScrapOutBill/MouldScrapOutBill.vue
new file mode 100644
index 0000000..cee2d24
--- /dev/null
+++ b/pages/MJGL/MouldScrapOutBill/MouldScrapOutBill.vue
@@ -0,0 +1,1129 @@
+<template>
+ <view>
+ <view class="form">
+ <view class="form-item">
+ <view class="title">鏉$爜</view>
+ <view class="right" style="width: 350rpx;">
+ <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" @click="searchModule">
+ <view class="title">鍣ㄥ叿</view>
+ <view class="righton" style="width: 350rpx;">
+ <input placeholder="璇烽�夋嫨鍣ㄥ叿" />
+ </view>
+ <uni-icons type="search"
+ style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
+ size="20" ></uni-icons>
+ </view>
+ <view class="form-item">
+ <view class="title">浠撳簱:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHWHName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撳簱" v-model="hform.HWHName"
+ @input="HWHNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浠撲綅:</view>
+ <view class="right" v-show="showHStockPlaceName">
+ <uni-combox :candidates="arrayHStockPlaceName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撲綅"
+ v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox>
+ </view>
+ <view class="righton" v-show="!showHStockPlaceName">
+ <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName"
+ placeholder="涓嶅彲鎿嶄綔" /></view>
+ </view>
+ <view class="form-item">
+ <view class="title">淇濈:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHEmpName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)鍙戞枡浜�" v-model="hform.HKeeperName"
+ @input="HScatterUserChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">楠屾敹:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHEmpName" placeholder="璇疯緭鍏�(鎴栨壂鎻�)棰嗘枡浜�" v-model="hform.HSecManagerName"
+ @input="HCollectUserChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">閮ㄩ棬:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" v-model="hform.HDeptName"
+ @input="HDeptNameChange"></uni-combox>
+ </view>
+ </view>
+
+ <view class="tabs">
+ <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">琛ㄥご淇℃伅</view>
+ <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">妯″叿淇℃伅</view>
+ </view>
+ <view v-if="tabs == 0">
+ <view class="form-item">
+ <view class="title">鏃ユ湡:</view>
+ <view class="right">
+ <picker mode="date" v-model="hform.HDate" @change="HDateChange">
+ <view class="picker-overlay"></view>
+ <input disabled v-model="hform.HDate" placeholder="璇烽�夋嫨鏃ユ湡" />
+ </picker>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">婧愬崟绫诲瀷:</view>
+ <view class="right" :class="showHMainSourceBillType?'':'disabled'">
+ <zxz-uni-data-select
+ v-model="hform.HMainSourceBillType"
+ dataKey="typeName"
+ dataValue="typeID"
+ :filterable="true"
+ :localdata="HSourceBillTypeList"
+ :clear="false"
+ :disabled="!showHMainSourceBillType"
+ @change="HSourceBillTypeNameChange"
+ ></zxz-uni-data-select>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">婧愬崟鍗曞彿:</view>
+ <view class="right" v-show="showHSourceBillNo">
+ <!-- <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="璇疯緭鍏ユ簮鍗曞崟鍙�" />
+
+ </view>
+ <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1">
+ <uni-icons type="search" size="20" @click="showBillList"></uni-icons>
+ </view>
+
+ <view class="righton" v-show="!showHSourceBillNo">
+ <input name="HSourceBillNo" disabled v-model="hform.HSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" />
+ </view>
+ <!-- <view class="right" v-show="showHSourceBillNo">
+ <uni-combox ref="uniComboxSourceBill" :isFocus="HSourceBillNoFocus"
+ :confirm-call="onSourceBillBlurHandler" v-if="reHSourceBillNo"
+ :candidates="arrayHSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" v-model="hform.HSourceBillNo"
+ @input="HSourceBillNoChange"></uni-combox>
+ </view>
+ <view class="righton" v-show="!showHSourceBillNo">
+ <input name="HSourceBillNo" disabled v-model="hform.HSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�" />
+ </view> -->
+ </view>
+ <view class="form-item">
+ <view class="title">鍒跺崟浜�:</view>
+ <view class="righton">
+ <input name="HMaker" disabled v-model="hform.HMaker" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="righton">
+ <input name="HBillNo" disabled v-model="hform.HBillNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁ID:</view>
+ <view class="righton">
+ <input name="HInterID" disabled v-model="hform.HInterID" />
+ </view>
+ </view>
+ </view>
+ <view v-if="tabs==1">
+ <view class="list" v-for="(item,index) in HMouldList" :key="index">
+ <uni-card :title="item.鍣ㄥ叿鍚嶇О" style="margin: 10px;" @tap="delMater(item, $event)">
+ <!-- 鍣ㄥ叿浠g爜浣滀负鍙偣鍑婚摼鎺� -->
+ <view class="card-header">
+ <text class="link-text">鍣ㄥ叿鍙凤細{{item.鍣ㄥ叿鍙穧}</text>
+ </view>
+
+ <view class="card-detail">
+ <view class="detail">
+ <text>鏁伴噺锛�</text>{{item.鏁伴噺}}
+ </view>
+ <view class="detail">
+ <text>鍣ㄥ叿鏉$爜锛�</text>{{item.鍣ㄥ叿鏉$爜}}
+ </view>
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-if="HMouldList.length == 0">鏆傛棤鏁版嵁</view>
+ </view>
+ <view class="bottom-btn">
+ <button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
+ <button v-if="btnType == 1 && !isEdit" class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
+ <!-- <button v-if="btnType != 1 && !isEdit" class="btn-a" size="mini" @tap="ifEdit">淇敼</button> -->
+ <button v-if="btnType != 1 " class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
+ </view>
+ </view>
+ <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType"
+ :HStockOrgID="hform.HStockOrgID"></BillListPopupVue>
+ <BillListPopupMouldVue @BillSelectComplete="MouldBillHandler" ref="billListMould"></BillListPopupMouldVue>
+ </view>
+</template>
+
+<script>
+ import getDateTime from '@/utils/getdateTime.js';
+ import {
+ getUserInfo
+ } from "@/utils/auth.js";
+ import { CommonUtils } from '@/utils/common';
+ import BillListPopupVue from '../../../components/BillListPopup/BillListPopup.vue';
+ import BillListPopupMouldVue from '../../../components/BillListPopup/BillListPopup_Mould.vue';
+ export default {
+ data() {
+ return {
+ HSourceBillNoFocus: false,
+ barCodeFocus: true,//鏉$爜鍏夋爣
+ userInfo: getUserInfo(),
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+ tabs: 0,
+ btnType:1,//1鏂板锛�3淇敼
+ linterid:'',
+ arrayHEmpName: [],
+ HEmpNameList: [],
+ arrayHWHName: [], //浠撳簱
+ HWHNameList: [],
+ arrayHStockPlaceName: [], //浠撲綅
+ HStockPlaceNameList: [],
+ arrayHDeptName: [], //閮ㄩ棬
+ HDeptNameList: [],
+ arrayHCusName: [], //瀹㈡埛
+ HCusNameList: [],
+ arrayHSupplierName:[],//渚涘簲鍟�
+ HSuplierList:[],
+ linterid: '',
+ HBillNo: '',
+ showHStockPlaceName: true,
+ HMouldList:[],
+ isEdit: false,
+
+ showHMainSourceBillType: true,
+ showHSourceBillNo: true,
+
+ //婧愬崟绫诲瀷
+ HSourceBillTypeList:[{typeID:"-1",typeName:"鎵嬪伐褰曞叆"}],
+ hform: {
+ HBarCode: '',
+ HInterID: '',
+ HBillType: 3832,
+ HWHName: getUserInfo().HWHName,
+ HWHID: getUserInfo().HWhID,
+ HStockPlaceName: getUserInfo().HSPName,
+ HStockPlaceID: getUserInfo().HSPID,
+ HKeeperName: getUserInfo().User,
+ HKeeperID: getUserInfo().User,//鍙戞枡浜�
+ HSecManagerName: getUserInfo().HEmpName,
+ HSecManagerID: getUserInfo().HEmpID,//棰嗘枡浜�
+ HDeptName: getUserInfo().HDept,
+ HDeptID: getUserInfo().HDeptID,
+ //婧愬崟淇℃伅
+ HMainSourceBillType: "-1",
+ HSourceBillNo: '', //CGDD000200
+ HDate: getDateTime.dateTimeStr('y-m-d'),
+ HMaker: uni.getStorageSync('HUserName'),
+
+ HRedBlueFlag:'false',
+ HStockOrgName: uni.getStorageSync('Organization'),
+ HStockOrgID: uni.getStorageSync('OrganizationID'),
+ HStockOutOrgID:uni.getStorageSync('OrganizationID'),
+ HBarCode_B:'',
+ HMouldName_B:'',
+ HMouldID_B:'',
+ HMouldCount_B:'',
+ }
+ }
+ },
+ components: {
+ BillListPopupVue,
+ BillListPopupMouldVue
+ },
+ methods: {
+ searchModule() {
+ this.$refs['billListMould'].showPopup()
+ },
+ MouldBillHandler(mould) {
+ if(!mould.enableMultiSourceBill){
+ let val = mould.val[0]
+ this.hform.HBarCode = val['鏉$爜缂栧彿']
+ this.getCode(this.hform.HBarCode)
+ }
+ this.$refs['billListMould'].exit()
+ },
+ // 璇诲彇缂撳瓨
+ loadCache() {
+ const pages = getCurrentPages()
+ // 鑾峰彇椤甸潰鏍堜腑鐨勬渶鍚庝竴涓厓绱狅紝涔熷氨鏄綋鍓嶆樉绀虹殑椤甸潰
+ const currentPage = pages[pages.length - 1]
+ let HBillTypeCache = uni.getStorageSync(`${currentPage.route.split("/").pop()}_HSourceBillTypeCache`)
+ if (HBillTypeCache) {
+ this.hform.HMainSourceBillType = HBillTypeCache.HSourceBillType
+ }
+ },
+ //鎵爜
+ toScanCode() {
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval': '10', //瓒呮椂鏃堕棿
+ 'timeoutText': '鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ }, (ret) => {
+ console.log(ret.resp_result)
+ if (this.hform.HBarCode == '*') {
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ } else {
+ this.hform.HBarCode = ret.resp_result
+ }
+
+ this.getCode(this.hform.HBarCode)
+ })
+ },
+ getNewData() {
+ CommonUtils.doRequest("/WEBSController/GetMaxBillNoAndID_Json", {
+ HBillType: this.hform.HBillType
+ },
+ (res) => {
+ let res1 = res.data;
+ let {
+ data,
+ count
+ } = res1
+ if (count == 1) {
+ this.hform.HInterID = data[0].HInterID
+ this.hform.HBillNo = data[0].HBillNo
+ } else {
+ uni.showToast({
+ title: data.Message,
+ icon: 'none'
+ })
+ }
+ })
+ },
+ async getCode(HBarCode) {
+ //浠撳簱銆佷粨浣嶆枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
+ if (!this.hform.HWHName) {
+ this.hform.HWHID = 0
+ }
+ if (!this.hform.HStockPlaceName) {
+ this.hform.HStockPlaceID = 0
+ }
+ var sHWHID = this.hform.HWHID
+ var sHSPID = this.hform.HStockPlaceID
+ var sOldBarCode = HBarCode;
+ var HDeleteFlag = sOldBarCode.substring(0, 1); //鍙栨潯鐮佺涓�涓瓧绗�
+ var sBarCode = sOldBarCode.slice(1); //鑾峰彇绗竴涓瓧绗︿互澶栫殑鍏ㄩ儴瀛楃
+ var sSourceBillNo = this.hform.HSourceBillNo
+ var sSourceBillType =this.hform.HMainSourceBillType
+ if(sSourceBillType != -1&&sSourceBillNo==""){
+
+ uni.showToast({
+ title: "璇峰厛閫夋嫨婧愬崟",
+ icon: 'none'
+ })
+ return
+ }
+ if (HDeleteFlag == '*') {
+ if (sBarCode == "") {
+ uni.showToast({
+ title: '璇疯緭鍏ヨ鍒犻櫎鐨勬潯鐮�',
+ icon: 'none'
+ });
+ } else {
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/MouldController/set_DelMouldStockBillMain_Temp_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillType: this.hform.HBillType,
+ HBarCode: sBarCode
+ },
+ })
+
+ if (!res) {
+ return
+ }
+
+ console.log('鍒犻櫎鏉$爜', res.data);
+ this.hform.HBarCode = '';
+ if (res.data.count == 1) {
+ this.hform.HQty = ''
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+
+
+ } catch (err) {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ }
+ }else
+ {
+ var sBarCode = this.hform.HBarCode
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/MouldController/Get_CheckTypeByMouldBarCode_Json',
+ data: {
+ sBarCode: sBarCode,
+ HInterID: this.hform.HInterID,
+ HBillType: this.hform.HBillType,
+ HBillNo: this.hform.HBillNo,
+ HMaker: this.hform.HMaker,
+ HWhID: sHWHID,
+ HSPID: sHSPID,
+ HSCWhID:0,
+ HSCSPID: 0,
+ HRedBlueFlag: this.hform.HRedBlueFlag,
+ HSourceBillNo: sSourceBillNo,
+ HSourceBillType: sSourceBillType,
+ HStockOrgID: this.hform.HStockOrgID,
+ HStockOutOrgID: this.hform.HStockOutOrgID,
+ },
+ })
+
+ if (!res) {
+ return
+ }
+
+ console.log('妫�鏌ユ壂鐮佽繑鍥炵殑鏁版嵁', res.data);
+ this.hform.HBarCode=''
+ if(res.data.count==1){
+ this.tabs = 1
+ this.DisBillEntryList()
+ this.showHMainSourceBillType = false
+ this.showHSourceBillNo = false
+ }
+ else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+
+
+ } catch (err) {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ }
+ },
+ //浠撳簱鐩戝惉浜嬩欢
+ HWHNameChange(e) {
+ for (var i = 0; i < this.HWHNameList.length; i++) {
+ if (this.HWHNameList[i]["HName"] == e) {
+ this.hform.HWHName = this.HWHNameList[i]["HName"]
+ this.hform.HWHID = this.HWHNameList[i].HItemID
+
+ this.showHStockPlaceName = this.HWHNameList[i].HIsStockMgr
+ }
+ }
+ },
+ HStockPlaceNameChange(e) {
+ for (var i = 0; i < this.HStockPlaceNameList.length; i++) {
+ if (this.HStockPlaceNameList[i]["HWhName"] == e) {
+ this.hform.HStockPlaceID = this.HStockPlaceNameList[i].HItemID
+ this.hform.HStockPlaceName = this.HStockPlaceNameList[i]["HWhName"]
+ }
+ }
+ },
+ /* #region 浠撳簱浠撲綅鑾峰彇涓嬫媺妗� */
+ getHBaseList() {
+ CommonUtils.doRequest(
+ "/Web/GetWarehouseList_Json_New", {
+ Warehouse: "",
+ HOrgID: uni.getStorageSync('OrganizationID')
+ },
+ (res) => {
+ let res1 = res.data
+ let {
+ data,
+ count
+ } = res1
+ if (count == 1) {
+ this.HWHNameList = data
+ for (var i = 0; i < data.length; i++) {
+ this.arrayHWHName[i] = data[i]["HName"]
+ }
+ } else {
+ uni.showToast({
+ title: '浠撳簱鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ )
+ CommonUtils.doRequest(
+ "/WEBSController/GetStockPlaceList_Json", {
+ StockPlace: '',
+ HWhID: this.hform.HWHID,
+ HStockOrgID: uni.getStorageSync('OrganizationID')
+ },
+ (res) => {
+ let res1 = res.data
+ console.log(res1)
+ let {
+ data,
+ count
+ } = res1
+ if (count == 1) {
+ this.HStockPlaceNameList = data
+ for (var i = 0; i < data.length; i++) {
+ this.arrayHStockPlaceName[i] = data[i]["HWhName"]
+ }
+ } else {
+ uni.showToast({
+ title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ )
+ },
+ /* #endregion */
+ getHEmpList() {
+ CommonUtils.doRequest("/Web/GetEmployeeList_Json", {
+ Employee: '',
+ HGroupID: 0
+ },
+ (res) => {
+ if (res.data.count == 1) {
+ this.HEmpNameList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHEmpName[i] = res.data.data[i].HName
+ }
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: '浜哄憳鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ )
+ },
+ HScatterUserChange(e) {
+ for (var i = 0; i < this.HEmpNameList.length; i++) {
+ if (this.HEmpNameList[i].HName == e) {
+ this.hform.HKeeperID = this.HEmpNameList[i].HItemID
+ this.hform.HKeeperName = this.HEmpNameList[i].HName
+ }
+ }
+ },
+ HCollectUserChange(e) {
+ for (var i = 0; i < this.HEmpNameList.length; i++) {
+ if (this.HEmpNameList[i].HName == e) {
+ this.hform.HSecManagerID = this.HEmpNameList[i].HItemID
+ this.hform.HSecManagerName = this.HEmpNameList[i].HName
+ }
+ }
+ },
+ //鑾峰彇浣跨敤閮ㄩ棬鏁版嵁
+ getHDeptList() {
+ uni.request({
+ url: this.serverUrl + '/Gy_Department/list',
+ data: {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.HDeptNameList = res.data.data
+ for (var i = 0; i < res.data.data.length; i++) {
+ this.arrayHDeptName[i] = res.data.data[i].閮ㄩ棬鍚嶇О
+ }
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: '閮ㄩ棬鏁版嵁璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ getHCusList() {
+ CommonUtils.doRequest(
+ "/Gy_Customer/list", {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ },
+ (res) => {
+ let res1 = res.data
+ let {
+ data,
+ count
+ } = res1
+ if (count == 1) {
+ this.HCusNameList = data
+ for (var i = 0; i < data.length; i++) {
+ this.arrayHCusName[i] = data[i].瀹㈡埛鍚嶇О
+ }
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: data.Message,
+ icon: 'none'
+ })
+ }
+ }
+ )
+ },
+ getHSupList() {
+ CommonUtils.doRequest(
+ "/Gy_Supplier/list", {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ },
+ (res) => {
+ let res1 = res.data
+ let {
+ data,
+ count
+ } = res1
+ if (count == 1) {
+ this.HSuplierList = data
+ for (var i = 0; i < data.length; i++) {
+ this.arrayHSupplierName[i] = data[i].渚涘簲鍟嗗悕绉�
+ }
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: data.Message,
+ icon: 'none'
+ })
+ }
+ }
+ )
+ },
+ //閫夋嫨浣跨敤閮ㄩ棬
+ HDeptNameChange(e) {
+ for (var i = 0; i < this.HDeptNameList.length; i++) {
+ if (this.HDeptNameList[i].閮ㄩ棬鍚嶇О == e) {
+ this.hform.HDeptID = this.HDeptNameList[i].HItemID
+ this.hform.HDeptName = this.HDeptNameList[i].閮ㄩ棬鍚嶇О
+ }
+ }
+ },
+ HDateChange(e) {
+ console.log(e.detail.value)
+ this.hform.HDate = e.detail.value
+ },
+ //鍣ㄥ叿淇℃伅
+ DisBillEntryList() {
+ CommonUtils.doRequest(
+ "/MouldController/GetMouldBillEntryTmpList_Json", {
+ HInterID: this.hform.HInterID,
+ HBillNo: this.hform.HBillNo,
+ HBillType: this.hform.HBillType
+ },
+ (res) => {
+ console.log('鍣ㄥ叿', res.data)
+ var data = res.data.data
+ this.HMouldList = data;
+ if (res.data.count==0) {
+ this.HMouldList = [];
+ this.hform.HMouldCount_B = ''
+ this.hform.HMouldID_B = ''
+ this.hform.HMouldName_B = ''
+
+ } else {
+ this.hform.HMouldCount_B = data[0].HQty
+ this.hform.HMouldID_B = data[0].HMouldID
+ this.hform.HMouldName_B = data[0].HMouldName
+ this.hform.HBarCode_B=data[0].HBarCode
+ }
+ },
+
+ )
+ },
+ goBack() {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕侀��鍑哄綋鍓嶉〉闈㈠悧锛�',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: '/pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ }
+ }
+ });
+ },
+ ifEdit(){
+ this.isEdit = true
+ this.hform.eventType = 'Modify'
+ },
+ async submit() {
+ //浠撳簱銆佷粨浣嶃�佷繚绠°�侀獙鏀躲�侀儴闂ㄣ�佷緵搴斿晢鏂囨湰妗嗕负绌烘椂锛屾竻绌哄搴擨D
+ if (!this.hform.HWHName) {
+ this.hform.HWHID = 0
+ }
+ if (!this.hform.HStockPlaceName) {
+ this.hform.HStockPlaceID = 0
+ }
+ if (!this.hform.HKeeperName) {
+ this.hform.HKeeperID = 0
+ }
+
+ if (!this.hform.HSecManagerName) {
+ this.hform.HSecManagerID = 0
+ }
+
+ if (!this.hform.HDeptName) {
+ this.hform.HDeptID = 0
+ }
+ // if (!this.hform.HSupName) {
+ // this.hform.HSupID = 0
+ // }
+ 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.hform.HMouldID_B == 0||this.hform.HMouldID_B ==null) {
+ uni.showToast({
+ title: '娌℃湁鎵弿鍣ㄥ叿鏉$爜锛岃鍏堟壂鎻忓櫒鍏锋潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�',
+ icon: 'none'
+ })
+ } else {
+ uni.showLoading({
+ title: '璇风◢鍊�'
+ })
+
+
+ let sMainStr = JSON.stringify(this.hform);
+ console.log("涓昏〃锛�" + sMainStr)
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/MouldController/set_SaveMouldScrapOutBill_Json',
+ method: 'POST',
+ data: {
+ oMain: sMainStr
+ },
+ })
+
+ 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/mjgl/MouldScrapOutBill/MouldScrapOutBill'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
+ }
+ }
+ });
+ } else {
+ // uni.showToast({
+ // title: res.data.Message,
+ // icon: 'none'
+ // })
+ uni.showModal({
+ content: res.data.Message,
+ showCancel: false,
+ complete() {
+ uni.hideLoading()
+ }
+ })
+ }
+ } catch (err) {
+ console.warn(err);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触:' + err,
+ icon: 'none'
+ })
+ }
+ }
+ }
+ },
+ showBillList() {
+ this.$refs.billList.showPopup()
+ },
+ HSourceBillTypeNameChange(e) {
+
+ const pages = getCurrentPages()
+ // 鑾峰彇椤甸潰鏍堜腑鐨勬渶鍚庝竴涓厓绱狅紝涔熷氨鏄綋鍓嶆樉绀虹殑椤甸潰
+ const currentPage = pages[pages.length - 1]
+ // 閫夋嫨婧愬崟绫诲瀷鍚� 缂撳瓨褰撳墠椤甸潰閫夋嫨
+ uni.setStorageSync(`${currentPage.route.split("/").pop()}_HSourceBillTypeCache`, {
+ HSourceBillType: this.hform.HMainSourceBillType
+ })
+ },
+ //閫変腑婧愬崟
+ getHBarCodeData(HBarCode) {
+ uni.request({
+ url: this.serverUrl + '/MouldController/Get_SourceBarCode_ProdOut_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillNo: this.hform.HBillNo,
+ HBillType: this.hform.HBillType,
+ HSourceBillNo: HBarCode,
+ HSourceBillType: this.hform.HMainSourceBillType,
+ HMaker: this.hform.HMaker,
+ HStockOrgID: this.hform.HStockOrgID
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ var data = res.data.data[0]
+ console.log(2, data);
+
+ this.hform.HSourceBillNo = data.HSourceBillNo
+ this.showHMainSourceBillType = false
+ //榛樿闈炲婧愬崟
+ this.showHSourceBillNo = false
+
+ this.tabs = 1
+ CommonUtils.playSound(1)
+ //鍏夋爣瀵瑰噯鏉$爜
+ this.refreshBarCodeState()
+ this.DisBillEntryList()
+ } else {
+ console.log('res.data.Message: ', res.data.Message);
+ CommonUtils.playSound(0)
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ CommonUtils.playSound(0)
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ async refreshBarCodeState() {
+ this.barCodeFocus = false
+ await this.$nextTick(() => {
+ this.barCodeFocus = true
+ this.hform.HBarCode = ""
+ })
+ },
+
+ delMater(item) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕佸垹闄� "' + item.鍣ㄥ叿鍙� + '" 鎵�鏈夋壂鐮佽褰曪紵鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�',
+ success: (res) => {
+ if (res.confirm) {
+ uni.request({
+ url: this.serverUrl +
+ '/MouldController/set_DelMouldStockBillMain_Temp_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBarCode: item.HBarCode,
+ HBillType: this.hform.HBillType
+ },
+ success: (res) => {
+ if (res.data.count == 1) {
+ this.DisBillEntryList()
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ }
+ });
+ }
+ }
+ });
+ },
+ onLoad(e) {
+ console.log(e, this.userInfo)
+ console.log(getUserInfo().HEmpName)
+ if(e.linterid){
+ this.btnType = 3
+ this.linterid = e.linterid
+ this.HBillNo = e.HBillNo
+ this.getEditData(e.linterid, e.HBillNo)
+ }else{
+ this.getNewData()
+ }
+
+ this.getHBaseList()
+ this.getHCusList()
+ this.getHEmpList()
+ this.getHDeptList()
+ this.getHSupList()
+
+ setTimeout(() => {
+ this.$nextTick(() => {
+ this.loadCache()
+ })
+
+ }, 300);
+ uni.$on('BillSelectComplete', (e) => {
+ console.log("鎺ユ敹鍒扮殑娑堟伅: ", e.HBillNo)
+ this.getHBarCodeData(e.HBillNo)
+ this.$refs.billList.exit()
+ })
+ //this.getHEmpList()
+ },
+ //閲嶈閫夋嫨婧愬崟蹇呴』娣诲姞杩欎釜鍚﹀垯鍑虹幇涓ラ噸bug
+ onUnload() {
+ uni.$off('BillSelectComplete')
+ },
+ }
+ }
+</script>
+<style lang="scss" scoped>
+ .form {
+ width: 668rpx;
+ margin: 20rpx auto;
+ padding-bottom: 240rpx;
+ }
+
+ .tab_area {
+ width: 100%;
+ height: 50rpx;
+ }
+
+ .other {
+ margin-top: 8rpx;
+ text-align: center;
+ font-size: 28rpx;
+ padding: 4rpx 18rpx;
+ color: #1890FF;
+ }
+
+ .tabs {
+ width: 100%;
+ display: flex;
+ border-bottom: 1px solid #ddd;
+ margin: 20rpx 0;
+
+ view {
+ width: 25%;
+ font-size: 30rpx;
+ color: #555;
+ text-align: center;
+ padding: 16rpx 0;
+ }
+
+ .on {
+ color: #3a78ff;
+ font-weight: bold;
+ border-bottom: 3px solid #3a78ff;
+ }
+ }
+
+ .form-item {
+ display: flex;
+ align-items: center;
+ font-size: 30rpx;
+ padding: 6rpx 0;
+ gap: 12rpx;
+
+ .title {
+ width: 208rpx;
+ flex-shrink: 0;
+
+ text {
+ color: red;
+ font-weight: bold;
+ }
+ }
+ .disabled {
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+ .right {
+ // width: 450rpx;
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ position: relative;
+ display: flex;
+
+ picker {
+ width: 100%;
+ }
+
+ .uni-combox {
+ width: 100%;
+ }
+ }
+
+ .righton {
+ // width: 450rpx;
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ position: relative;
+ display: flex;
+ }
+
+ input {
+ width: 100%;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
+
+ textarea {
+ width: 98%;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
+
+ .icon-wrapper {
+ background-color: #3A78FF;
+ border-radius: 100%;
+ width: 52rpx;
+ height: 52rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-shrink: 0;
+
+ .uni-icons {
+ color: #fff !important;
+ }
+ }
+
+ .icon-wrapper[disabled] {
+ background-color: rgba(228, 228, 228, 1);
+ pointer-events: none;
+ touch-action: none;
+ }
+ }
+
+ .bottom-btn {
+ width: 100%;
+ box-sizing: border-box;
+ // 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;
+ }
+ }
+
+ .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/MJGL/MouldScrapOutBill/MouldScrapOutBillList.vue b/pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList.vue
new file mode 100644
index 0000000..788adcb
--- /dev/null
+++ b/pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList.vue
@@ -0,0 +1,486 @@
+<template>
+ <view class="content">
+ <view class="form">
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="right">
+ <input v-model="hform.HBillNo" placeholder="璇疯緭鍏ュ崟鎹彿" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍒跺崟浜�:</view>
+ <view class="right">
+ <input v-model="hform.HCreateBy" placeholder="璇疯緭鍏ュ埗鍗曚汉" />
+ </view>
+ </view>
+ <view class="form-item">
+ <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>
+ </view>
+ <view class="form-item">
+ <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>
+ </view>
+
+ <view class="buttons">
+ <button class="btn-a" size="mini" type="default" @tap="clear">閲嶇疆</button>
+ <button class="btn-b" size="mini" type="default" @tap="creat">鏂板</button>
+ <button class="btn-c" size="mini" type="default" @tap="search">鏌ヨ</button>
+ </view>
+ </view>
+
+ <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+
+ <view class="list" v-for="(item,index) in showList" :key="index">
+ <uni-card :title="item.鍗曟嵁鍙�" style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index">
+ <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 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.寮�濮嬫棩鏈�.substr(0,10)}}
+ </view>
+ <view class="detail" v-if="item.缁撴潫鏃ユ湡">
+ <text>缁撴潫鏃ユ湡锛�</text>{{item.缁撴潫鏃ユ湡.substr(0,10)}}
+ </view>
+ <view class="detail" v-if="item.琛ㄤ綋澶囨敞">
+ <text>琛ㄤ綋澶囨敞锛�</text>{{item.琛ㄤ綋澶囨敞}}
+ </view>
+ <view class="detail" v-if="item.鍏抽棴绫诲瀷">
+ <text>鍏抽棴绫诲瀷锛�</text>{{item.鍏抽棴绫诲瀷}}
+ </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.鍒跺崟鏃ユ湡.substr(0,10)}}
+ </view>
+ <view class="detail" v-if="item.瀹℃牳浜�">
+ <text>瀹℃牳浜猴細</text>{{item.瀹℃牳浜簘}
+ </view>
+ <view class="detail" v-if="item.瀹℃牳鏃ユ湡">
+ <text>瀹℃牳鏃ユ湡锛�</text>{{item.瀹℃牳鏃ユ湡.substr(0,10)}}
+ </view>
+ <view class="detail" v-if="item.淇敼浜�">
+ <text>淇敼浜猴細</text>{{item.淇敼浜簘}
+ </view>
+ <view class="detail" v-if="item.淇敼鏃ユ湡">
+ <text>淇敼鏃ユ湡锛�</text>{{item.淇敼鏃ユ湡.substr(0,10)}}
+ </view>
+ <view class="detail" v-if="item.鍏抽棴浜�">
+ <text>鍏抽棴浜猴細</text>{{item.鍏抽棴浜簘}
+ </view>
+ <view class="detail" v-if="item.鍏抽棴鏃ユ湡">
+ <text>鍏抽棴鏃ユ湡锛�</text>{{item.鍏抽棴鏃ユ湡.substr(0,10)}}
+ </view>
+ <view class="detail" v-if="item.浣滃簾浜�">
+ <text>浣滃簾浜猴細</text>{{item.浣滃簾浜簘}
+ </view>
+ <view class="detail" v-if="item.浣滃簾鏃ユ湡">
+ <text>浣滃簾鏃ユ湡锛�</text>{{item.浣滃簾鏃ユ湡.substr(0,10)}}
+ </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.hbilltype">
+ <text>hbilltype锛�</text>{{item.hbilltype}}
+ </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="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 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 { getUserInfo } from "@/utils/auth.js";
+ export default {
+ data() {
+ return {
+ userInfo:getUserInfo(),
+ serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API',
+ hform:{
+ HBillNo:'',
+ HCreateBy:'',
+ BenginHCreateDate:'',
+ EndHCreateDate:'',
+ },
+ sWhere:"",
+ listData:[],
+ showList:[],
+ showDetail:-1,
+ operations:-1,
+
+ page:1,
+ size:100
+ }
+ },
+ onLoad() {
+ this.getList()
+ console.log(this.userInfo,uni.getStorageSync('HUserName'))
+ },
+ onReachBottom: function() {
+ this.page++
+ setTimeout(() => {
+ this.showList = this.showList.concat(this.getPage(this.page,this.listData))
+ }, 100)
+ },
+ onPullDownRefresh: function() {
+ this.clear()
+ setTimeout(()=>{
+ uni.stopPullDownRefresh();
+ }, 1000);
+ },
+ methods: {
+ getPage(page,list){
+ let sindex = (parseInt(page) - 1) * 20
+ let eindex = parseInt(page) * 20
+ let newList = list.slice(sindex,eindex)
+ return newList
+ },
+ getList(){
+ console.log(this.sWhere)
+ uni.showLoading({
+ title:'鍔犺浇涓�...'
+ })
+ uni.request({
+ url: this.serverUrl + '/Sc_MouldScrapOutHouseBill/page',
+ data:{
+ sWhere: this.sWhere,
+ user: uni.getStorageSync('HUserName'),
+ page:1,
+ size:100
+ },
+ success: (res) => {
+ console.log(1,uni.getStorageSync('Organization'));
+ console.log(1,res);
+ if(res.data.code ==1){
+ this.listData = res.data.data
+ this.showList = this.getPage(this.page,this.listData)
+
+ setTimeout(()=>{
+ uni.hideLoading()
+ }, 1000)
+ }else{
+ uni.hideLoading()
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title:'鎺ュ彛璇锋眰澶辫触',
+ icon:'none'
+ })
+ },
+ });
+ },
+ //閫夋嫨鍗曟嵁鏃ユ湡
+ BenginHCreateDateChange(e){
+ console.log(e.detail.value)
+ this.hform.BenginHCreateDate = e.detail.value
+ },
+ //閫夋嫨鍗曟嵁鏃ユ湡
+ EndHCreateDateChange(e){
+ console.log(e.detail.value)
+ this.hform.EndHCreateDate = e.detail.value
+ },
+ search(){
+ this.sWhere = ''
+ this.listData = []
+ this.page = 1
+ this.showList = []
+
+ console.log(this.hform)
+ if (this.hform.HBillNo) {
+ this.sWhere += " and 鍗曟嵁鍙� like '%" + this.hform.HBillNo + "%'";
+ }
+ if (this.hform.HCreateBy) {
+ this.sWhere += " and 鍒跺崟浜� like '%" + this.hform.HCreateBy + "%'";
+ }
+ if (this.hform.BenginHCreateDate) {
+ this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.hform.BenginHCreateDate + "'";
+ }
+ if (this.hform.EndHCreateDate) {
+ this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.hform.EndHCreateDate + "'";
+ }
+
+ this.getList()
+ },
+ creat(){
+ uni.navigateTo({
+ url:'/pages/MJGL/MouldScrapOutBill/MouldScrapOutBill'
+ })
+ },
+ clear(){
+ this.listData = []
+ this.page = 1
+ this.showList = []
+
+ this.sWhere = ''
+ this.showDetail = -1,
+ this.operations = -1,
+ this.hform = {
+ HBillNo:'',
+ HCreateBy:'',
+ BenginHCreateDate:'',
+ EndHCreateDate:'',
+ }
+ this.getList()
+ },
+ //TODO 瀛愯〃鍒楄〃
+ // toSon(item){
+ // uni.navigateTo({
+ // url:'/pages/baoyangjilu/Sb_EquipMaintainRuleList_son?HInterID=' + item.hmainid
+ // + '&璁惧鍚嶇О=' + item.璁惧鍚嶇О
+ // + '&璁惧浠g爜=' + item.璁惧浠g爜,
+ // })
+ // },
+
+ //缂栬緫
+ edit(item){
+ console.log(item)
+ uni.navigateTo({
+ url:'/pages/MJGL/MouldScrapOutBill/MouldScrapOutBill?linterid=' + item.hmainid + '&HBillNo=' + item.鍗曟嵁鍙�
+ })
+ },
+ //鍒犻櫎
+ del(item){
+ console.log(item)
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾',);
+ uni.request({
+ url: this.serverUrl + '/Sc_MouldScrapOutHouseBill/DeltetMouldScrapOutHouseBill',
+ data:{
+ HInterID: item.hmainid,
+ user: uni.getStorageSync('HUserName')
+ },
+ success: (res) => {
+ console.log(1,res);
+ if(res.data.count == 1){
+ this.clear()
+ }
+ uni.showToast({
+ title:res.data.Message,
+ icon:'none'
+ })
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title:'鎺ュ彛璇锋眰澶辫触',
+ icon:'none'
+ })
+ },
+ });
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ }
+ }
+ });
+ },
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .form{
+ width: 640rpx;
+ margin: 20rpx auto;
+ }
+ .form-item{
+ display: flex;
+ align-items: center;
+ font-size: 28rpx;
+ padding: 6rpx 0;
+ .title{
+ width: 180rpx;
+ text{
+ color: red;
+ font-weight: bold;
+ }
+ }
+ .right{
+ width: 450rpx;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ }
+ .righton{
+ width: 450rpx;
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+ input{
+ width: 100%;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
+ }
+ .buttons{
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ margin-top: 20rpx;
+ button{
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+ .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;
+ 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;
+ }
+ }
+ .op{
+ display: flex;
+ justify-content: space-around;
+ margin-top: 20rpx;
+ button{
+ padding: 0;
+ width: 130rpx;
+ 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;
+ }
+ }
+ }
+
+</style>
diff --git a/pages/MJGL/mujulingliaochukudan/MouldProdOutBill.vue b/pages/MJGL/mujulingliaochukudan/MouldProdOutBill.vue
index b901a8b..bcfae5f 100644
--- a/pages/MJGL/mujulingliaochukudan/MouldProdOutBill.vue
+++ b/pages/MJGL/mujulingliaochukudan/MouldProdOutBill.vue
@@ -978,9 +978,9 @@
if(data.HCorrespondentTypeID==1){
this.hform.TypeName = "渚涘簲鍟�"
}else if(data.HCorrespondentTypeID==2){
- this.hform.TypeName = "閮ㄩ棬"
- }else{
this.hform.TypeName = "瀹㈡埛"
+ }else{
+ this.hform.TypeName = "閮ㄩ棬"
}
@@ -1015,50 +1015,7 @@
this.hform.HBarCode = ""
})
},
- delMater(item) {
- if (event && event.target.classList && event.target.classList.contains('link-text')) {
- return; // 濡傛灉鏄摼鎺ョ偣鍑伙紝涓嶆墽琛屽垹闄�
- }
-
- uni.showModal({
- title: '鎻愮ず',
- content: '纭瑕佸垹闄� "' + item.鐗╂枡鍚嶇О + '" 鎵�鏈夋壂鐮佽褰曪紵鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�',
- success: (res) => {
- if (res.confirm) {
- uni.request({
- url: this.serverUrl +
- '/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json',
- data: {
- HInterID: this.hform.HInterID,
- HMaterID: item.HMaterID,
- HAuxPropID: item.HAuxPropID,
- HMTONo: item.HMTONo,
- HSourceInterID: item.HSourceInterID,
- HSourceEntryID: item.HSourceEntryID,
- HBillType: this.hform.HBillType
- },
- success: (res) => {
- if (res.data.count == 1) {
- this.DisBillEntryList()
- } else {
- uni.showToast({
- title: res.data.Message,
- icon: 'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- }
- });
- }
- }
- });
- },
+
delMater(item) {
uni.showModal({
title: '鎻愮ず',
diff --git a/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill.vue b/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill.vue
index 1eb582d..6ab3387 100644
--- a/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill.vue
+++ b/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill.vue
@@ -250,10 +250,8 @@
HStockPlaceNameList: [],
arrayHDeptName: [], //閮ㄩ棬
HDeptNameList: [],
- arrayHCusName: [],
+ arrayHCusName: [],//瀹㈡埛
HCusNameList: [],
- arrayHSupName: [], //瀹㈡埛
- HSupNameList: [],
arrayHSupplierName: [], //渚涘簲鍟�
HSuplierList: [],
linterid: '',
@@ -279,14 +277,9 @@
HWHID: getUserInfo().HWhID,
HStockPlaceName: getUserInfo().HSPName,
HStockPlaceID: getUserInfo().HSPID,
- HSactterUserName: getUserInfo().User,
- HSactterUserID: getUserInfo().User,
- HCollectUserName: getUserInfo().HEmpName,
- HCollectUserID: getUserInfo().HEmpID,
+
HDeptName: getUserInfo().HDept,
HDeptID: getUserInfo().HDeptID,
- HSupName: '',
- HSupID: '',
HSecManagerID: getUserInfo().HEmpID,
HSecManagerName: getUserInfo().HEmpName,
HKeeperID: 0,
@@ -630,7 +623,7 @@
},
getHSupList() {
CommonUtils.doRequest(
- "/Gy_Customer/list", {
+ "/Gy_Supplier/list", {
sWhere: "",
user: uni.getStorageSync('HUserName'),
Organization: uni.getStorageSync('Organization')
@@ -642,9 +635,9 @@
count
} = res1
if (count == 1) {
- this.HSupNameList = data
+ this.HSuplierList = data
for (var i = 0; i < data.length; i++) {
- this.arrayHSupName[i] = data[i].瀹㈡埛鍚嶇О
+ this.arrayHSupplierName[i] = data[i].渚涘簲鍟嗗悕绉�
}
this.$forceUpdate();
} else {
@@ -656,33 +649,7 @@
}
)
},
- getSupplier() {
- CommonUtils.doRequest(
- "/WEBSController/GetSupplier_Json", {
- HBarCode: uni.getStorageSync(''),
- Organization: uni.getStorageSync('Organization')
- },
- (res) => {
- let res1 = res.data
- let {
- data,
- count
- } = res1
- if (count == 1) {
- this.HSupNameList = data
- for (var i = 0; i < data.length; i++) {
- this.arrayHSupName[i] = data[i].瀹㈡埛鍚嶇О
- }
- this.$forceUpdate();
- } else {
- uni.showToast({
- title: data.Message,
- icon: 'none'
- })
- }
- }
- )
- },
+
//閫夋嫨浣跨敤閮ㄩ棬
HDeptNameChange(e) {
for (var i = 0; i < this.HDeptNameList.length; i++) {
@@ -786,16 +753,7 @@
if (!this.hform.HStockPlaceName) {
this.hform.HStockPlaceID = 0
}
- if (!this.hform.HSactterUserName) {
- this.hform.HSactterUserID = 0
- } else {
- this.HSecManagerID = this.hform.HSactterUserID
- }
- if (!this.hform.HCollectUserName) {
- this.hform.HCollectUserID = 0
- } else {
- this.HKeeperID = this.hform.HCollectUserID
- }
+
if (!this.hform.HDeptName) {
this.hform.HDeptID = 0
}
diff --git a/pages/ZLGL/QualityReportStep/QualityReportStepBill.vue b/pages/ZLGL/QualityReportStep/QualityReportStepBill.vue
new file mode 100644
index 0000000..0e9f667
--- /dev/null
+++ b/pages/ZLGL/QualityReportStep/QualityReportStepBill.vue
@@ -0,0 +1,1536 @@
+<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-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.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.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-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 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>
+ </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,
+ 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(HBarCode);
+ }
+ });
+ },
+ async getGy_BadReasonList() {
+ let sWhere = ` and HUSEORGID = '${uni.getStorageSync('OrganizationID')}' and ISNULL(瀹℃牳浜�,'') != '' 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 //鎵爜妯″紡
+ }
+ })
+
+ console.log(res)
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+ if (count == 1) {
+ 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]['HBillNo']
+ 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 //閫夊崟妯″紡
+ }
+ })
+
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+ if (count == 1) {
+ 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]['HBillNo']
+ 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 缁勭粐鍚嶇О = '${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.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 ISNULL(瀹℃牳浜�,'') != '' 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 ISNULL(瀹℃牳浜�,'') != '' 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
+ ,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++);
+ }
+ //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;
+ // }
+ 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();
+ },
+ async RoadBillMain() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/QC_ProcessCheckBill/QC_ProcessCheckBill_Edit",
+ 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].鎵瑰彿,
+ HCheckerResult: 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();
+ }
+ this.getGy_BadReasonList();
+ await this.InitHSource();
+ await this.InitHEmp();
+ await this.InitHGroup();
+ await this.loadCache();
+ },
+ };
+</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/ZLGL/QualityReportStep/QualityReportStepBillList.vue b/pages/ZLGL/QualityReportStep/QualityReportStepBillList.vue
new file mode 100644
index 0000000..a4ea1cc
--- /dev/null
+++ b/pages/ZLGL/QualityReportStep/QualityReportStepBillList.vue
@@ -0,0 +1,557 @@
+<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" :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>=11 && 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="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: {
+ // 鍒ゆ柇鍝簺瀛楁闇�瑕佹樉绀�
+ 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;
+ },
+ exit() {
+ uni.navigateBack()
+ },
+ cmdAdd() {
+ uni.redirectTo({
+ url: "/pages/ZLGL/QualityReportStep/QualityReportStepBill"
+ })
+ },
+ 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: '/Sc_QualityReportBill/getSc_QualityReportBill',
+ 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: '/Sc_QualityReportBill/AuditSc_QualityReportBill',
+ 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_QualityReportBill/DropSc_QualityReportBill',
+ 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/mojianjianyan/lastPieceCheckBill?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/lailiaojianyan/POStockInCheckBill.vue b/pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
index 3241dd7..6c0945f 100644
--- a/pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
+++ b/pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
@@ -631,18 +631,11 @@
ArrayAnalysisMethodValue: [1, 2, 3],
// 瀛愯〃 椤电淇℃伅
subTabs: {
- 1: {
- id: "1",
- name: "妫�楠岄」鐩�",
+ 0: {
+ id: "0",
+ name: "鍏朵粬绫诲瀷",
},
- 2: {
- id: "2",
- name: "涓嶈壇鍘熷洜",
- },
- 3: {
- id: "3",
- name: "鎶芥牱妫�楠�",
- },
+
},
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 54296f1..0203ac5 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -288,7 +288,7 @@
hidden: false,
},{
img: '../../static/icon/icon8.png',
- text: '瑁呯鍗�',
+ text: '瑁呯鍗�-鍑礉',
url: '/pages/zhuangxiangdan/form',
id: 33,
hidden: false,
@@ -314,6 +314,13 @@
id: 36,
hidden: false,
},
+ {
+ img: '../../static/icon/icon8.png',
+ text: '涓婃ā鍗�',
+ url: `/pages/MJGL/shangmudan/MouldUpperBill`,
+ id: 37,
+ hidden: false,
+ },
],
// itemData: [{
// img: '../../static/icon/icon1.png',
diff --git a/pages/index/tab2.vue b/pages/index/tab2.vue
index 6994958..74c1986 100644
--- a/pages/index/tab2.vue
+++ b/pages/index/tab2.vue
@@ -426,6 +426,13 @@
},
{
"img": "../../static/icon/icon8.png",
+ "text": "妯″叿鎶ュ簾鍑哄簱鍗曞垪琛�",
+ "url": "/pages/MJGL/MouldScrapOutBill/MouldScrapOutBillList",
+ "id": 51,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
"text": "瑁呯鍗曟殏瀛樺垪琛�",
"url": "/pages/zhuangxiangdan/table",
"id": 52,
@@ -465,6 +472,20 @@
"url": "/pages/ZLGL/lailiaojianyan_fast/Kf_QCStockInCheckBill_Fast",
"id": 55,
"hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
+ "text": "鍏ㄦ妫�楠屽崟",
+ "url": "/pages/ZLGL/QualityReportStep/QualityReportStepBill",
+ "id": 55,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
+ "text": "鍏ㄦ妫�楠屽崟鏌ヨ",
+ "url": "/pages/ZLGL/QualityReportStep/QualityReportStepBillList",
+ "id": 55,
+ "hidden": false
}
]
diff --git a/pages/qijvguzhangdengji/mouldMistakeBill.vue b/pages/qijvguzhangdengji/mouldMistakeBill.vue
index 80cc9b2..f9d29af 100644
--- a/pages/qijvguzhangdengji/mouldMistakeBill.vue
+++ b/pages/qijvguzhangdengji/mouldMistakeBill.vue
@@ -17,6 +17,15 @@
style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;flex-shrink: 0;"
size="20" @click="toScanCode"></uni-icons>
</view>
+ <view class="form-item" @click="searchModule">
+ <view class="title">鍣ㄥ叿</view>
+ <view class="righton" style="width: 350rpx;">
+ <input placeholder="璇烽�夋嫨鍣ㄥ叿" />
+ </view>
+ <uni-icons type="search"
+ style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
+ size="20" ></uni-icons>
+ </view>
<view class="form-item">
<view class="title">鏁呴殰鍙戠敓鏃ユ湡</view>
@@ -161,6 +170,7 @@
</view>
</view>
<BarCodePopupVue ref="barcodePopup"></BarCodePopupVue>
+ <BillListPopupMouldVue @BillSelectComplete="MouldBillHandler" ref="billListMould"></BillListPopupMouldVue>
</view>
</template>
<script>
@@ -177,13 +187,15 @@
import BillListPopupVue from '../../components/BillListPopup/BillListPopup.vue';
import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue";
import BillSelectPopupXiaoWeiVue from '../../components/BillSelectPopupXiaoWei/BillSelectPopupXiaoWei.vue';
+ import BillListPopupMouldVue from '../../components/BillListPopup/BillListPopup_Mould.vue';
import dayjs from 'dayjs';
import { MpaasScan } from '../../utils/mpaasScan';
export default {
components: {
BillListPopupVue,
BarCodePopupVue,
- BillSelectPopupXiaoWeiVue
+ BillSelectPopupXiaoWeiVue,
+ BillListPopupMouldVue,
},
data() {
@@ -244,10 +256,10 @@
"HDate": dayjs(new Date()).format("YYYY-MM-DD hh:mm:ss"),
"HDeptName": getUserInfo()["HDeptName"],
"HDeptID": getUserInfo()["HDeptID"],
- "HEmpName": "",
- "HEmpID": "0",
- "HManagerName": "",
- "HManagerID": "0",
+ "HEmpName": getUserInfo().HEmpName,
+ "HEmpID": getUserInfo().HEmpID,
+ "HManagerName": getUserInfo().HSecManager,
+ "HManagerID": getUserInfo().HSecManagerID,
"HBarName": "",
"HMouldID": "0",
"HBarSpec": "",
@@ -291,6 +303,17 @@
this.InitEmp()
},
methods: {
+ searchModule() {
+ this.$refs['billListMould'].showPopup()
+ },
+ MouldBillHandler(mould) {
+ if(!mould.enableMultiSourceBill){
+ let val = mould.val[0]
+ this.hform.HBarCode = val['鏉$爜缂栧彿']
+ this.getHBarCodeData(this.hform.HBarCode)
+ }
+ this.$refs['billListMould'].exit()
+ },
// 鏁呴殰绫诲埆
async InitConkType() { // 鍒濆鍖栨晠闅滅被鍒�
try {
diff --git a/pages/weixiujilu/mouldRepairRecordBill.vue b/pages/weixiujilu/mouldRepairRecordBill.vue
index e54de02..b6e167a 100644
--- a/pages/weixiujilu/mouldRepairRecordBill.vue
+++ b/pages/weixiujilu/mouldRepairRecordBill.vue
@@ -17,10 +17,19 @@
style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;flex-shrink: 0;"
size="20" @click="toScanCode"></uni-icons>
</view>
+ <view class="form-item" @click="searchModule">
+ <view class="title">鍣ㄥ叿</view>
+ <view class="righton" style="width: 350rpx;">
+ <input placeholder="璇烽�夋嫨鍣ㄥ叿" />
+ </view>
+ <uni-icons type="search"
+ style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
+ size="20" ></uni-icons>
+ </view>
<view class="form-item">
<view class="title">婧愬崟绫诲瀷</view>
<view class="right" v-show="showHMainSourceBillType">
- <picker :range="arrayHMainSourceBillType" v-model="HMainSourceBillType"
+ <picker :range="arrayHMainSourceBillType"
@change="HMainSourceBillTypeChange">
<input disabled name="HMainSourceBillType" v-model="HMainSourceBillType"
@@ -166,7 +175,7 @@
<view class="form-item">
<view class="title">鏂拌璁″鍛�</view>
<view class="right">
- <textarea v-model="hform.HNewDesignLife" style="height: 6em;" maxlength="2000"
+ <input v-model="hform.HNewDesignLife"
placeholder="璇疯緭鍏ユ柊璁捐瀵垮懡..." />
</view>
</view>
@@ -252,6 +261,7 @@
:HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID">
</BillListPopupMouldConkBookBillVue>
<BarCodePopupVue ref="barcodePopup"></BarCodePopupVue>
+ <BillListPopupMouldVue @BillSelectComplete="MouldBillHandler" ref="billListMould"></BillListPopupMouldVue>
</view>
</template>
<script>
@@ -267,11 +277,13 @@
} from '../../utils/userRelationManager';
import BillListPopupMouldConkBookBillVue from '../../components/BillListPopup/BillListPopupMouldConkBookBill.vue';
import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue";
+ import BillListPopupMouldVue from '../../components/BillListPopup/BillListPopup_Mould.vue';
import dayjs from 'dayjs';
export default {
components: {
BarCodePopupVue,
- BillListPopupMouldConkBookBillVue
+ BillListPopupMouldConkBookBillVue,
+ BillListPopupMouldVue,
},
data() {
@@ -344,15 +356,12 @@
"HBillNo": "",
"HInterID": "0",
"HDate": dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
- "HDeptName": "",
- "HDeptID": "0",
- "Department": "",
- "HEmpName": "",
- "HEmpID": "0",
- "HEmp": "",
- "HManagerName": "",
- "HManagerID": "0",
- "HManager": "",
+ "HDeptName": getUserInfo()["HDeptName"],
+ "HDeptID": getUserInfo()["HDeptID"],
+ "HEmpName": getUserInfo().HEmpName,
+ "HEmpID": getUserInfo().HEmpID,
+ "HManagerName": getUserInfo().HSecManager,
+ "HManagerID": getUserInfo().HSecManagerID,
"HRepairName": "",
"HRepairID": "0",
"HRepairList": "",
@@ -362,7 +371,7 @@
"HSupIDList": "",
"HRepairType": "鍐呴儴缁翠慨",
"HNewModel": "",
- "HNewDesignLife": "",
+ "HNewDesignLife": "0",
"HBarName": "",
"HMouldID": "0",
"HBarSpec": "",
@@ -403,7 +412,7 @@
this.InitEmp()
this.InitSupplier()
this.InitRepairName()
-
+ this.loadCache()
uni.$on('BillSelectComplete', (e) => {
console.log("鎺ユ敹鍒扮殑娑堟伅: ", e)
this.hform.HMainSourceInterID = e.HInterID
@@ -420,6 +429,17 @@
uni.$off('BillSelectComplete')
},
methods: {
+ searchModule() {
+ this.$refs['billListMould'].showPopup()
+ },
+ MouldBillHandler(mould) {
+ if(!mould.enableMultiSourceBill){
+ let val = mould.val[0]
+ this.hform.HBarCode = val['鏉$爜缂栧彿']
+ this.getHBarCodeData(this.hform.HBarCode)
+ }
+ this.$refs['billListMould'].exit()
+ },
// 缁翠慨椤圭洰
async InitRepairName() { // 鍒濆鍖栫淮淇」鐩�
try {
@@ -732,10 +752,30 @@
this.hform.HMainSourceBillType = -1
return
}
-
+ console.log(e.detail.value)
+ console.log(e)
this.HMainSourceBillType = this.arrayHMainSourceBillType[e.detail.value]
this.hform.HMainSourceBillType = this.arrayHMainSourceBillTypeID[e.detail.value]
+ const pages = getCurrentPages()
+ // 鑾峰彇椤甸潰鏍堜腑鐨勬渶鍚庝竴涓厓绱狅紝涔熷氨鏄綋鍓嶆樉绀虹殑椤甸潰
+ const currentPage = pages[pages.length - 1]
+ // 閫夋嫨婧愬崟绫诲瀷鍚� 缂撳瓨褰撳墠椤甸潰閫夋嫨
+ uni.setStorageSync(`${currentPage.route.split("/").pop()}_HSourceBillTypeCache`, {
+ HSourceBillTypeName: this.HMainSourceBillType,
+ HSourceBillType: this.hform.HMainSourceBillType
+ })
},
+ // 璇诲彇缂撳瓨
+ loadCache() {
+ const pages = getCurrentPages()
+ // 鑾峰彇椤甸潰鏍堜腑鐨勬渶鍚庝竴涓厓绱狅紝涔熷氨鏄綋鍓嶆樉绀虹殑椤甸潰
+ const currentPage = pages[pages.length - 1]
+ let HBillTypeCache = uni.getStorageSync(`${currentPage.route.split("/").pop()}_HSourceBillTypeCache`)
+ if (HBillTypeCache) {
+ this.HMainSourceBillType = HBillTypeCache.HSourceBillTypeName
+ this.hform.HMainSourceBillType = HBillTypeCache.HSourceBillType
+ }
+ },
// 鎵弿妯″叿鏉$爜
async getHBarCodeData(HBarCode) {
if (!HBarCode) {
diff --git a/pages/zhuangxiangdan/form.vue b/pages/zhuangxiangdan/form.vue
index 61ca8ad..a4aae1f 100644
--- a/pages/zhuangxiangdan/form.vue
+++ b/pages/zhuangxiangdan/form.vue
@@ -319,7 +319,7 @@
// 鏍规嵁绠辨潯鐮佽幏鍙栦俊鎭�
GetMeesageByBarCode_Pack(HBarCode_Pack) {
CommonUtils.doRequest2({
- url: '/WEBSController/Get_PackBarCode_PackUnionBill_New_Json_Cus',
+ url: '/WEBSController/GetHBarCode_CusJX',
data: {
HInterID: this.hform.HInterID || 0,
HBillNo: this.hform.HBillNo,
@@ -336,20 +336,48 @@
list
} = res.data
if (count == 1) {
- CommonUtils.playSound(1)
- this.hform.HBillNo = data[0].HBillNo
- this.hform.HInterID = data[0].HInterID
- this.HMaterNumber_Pack = data[0].HMaterNumber
- this.hform.HMaterName = data[0].HMaterName
- // 璁剧疆鎬绘暟锛屽綋鍓嶆壂鎻忔暟閲忛�氳繃DisBillEntryList鏇存柊
- const totalQty = data[0].HQty || 0
- this.hform.HQtySum = `0/${totalQty}`
- //澶勭悊鎴愬姛鍚庤仛鐒﹀埌浜у搧鐮佽緭鍏ユ
- this.HBarCodeFocusRefresh()
- this.DisBillEntryList();
- uni.showToast({
- icon: 'none',
- title: Message
+ CommonUtils.doRequest2({
+ url: '/WEBSController/Get_PackBarCode_PackUnionBill_New_Json_Cus',
+ data: {
+ HInterID: this.hform.HInterID || 0,
+ HBillNo: this.hform.HBillNo,
+ HBillType: this.HBillType,
+ HBillSubType: this.HBillSubType,
+ HBarCode_Pack: HBarCode_Pack,
+ HSourceBillNo: this.hform.HSourceBillNo,
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message,
+ list
+ } = res.data
+ if (count == 1) {
+ CommonUtils.playSound(1)
+ this.hform.HBillNo = data[0].HBillNo
+ this.hform.HInterID = data[0].HInterID
+ this.HMaterNumber_Pack = data[0].HMaterNumber
+ this.hform.HMaterName = data[0].HMaterName
+ // 璁剧疆鎬绘暟锛屽綋鍓嶆壂鎻忔暟閲忛�氳繃DisBillEntryList鏇存柊
+ const totalQty = data[0].HQty || 0
+ this.hform.HQtySum = `0/${totalQty}`
+ //澶勭悊鎴愬姛鍚庤仛鐒﹀埌浜у搧鐮佽緭鍏ユ
+ this.HBarCodeFocusRefresh()
+ this.DisBillEntryList();
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ } else {
+ CommonUtils.playSound(0)
+ this.HBarCodePackFocusRefresh()
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
})
} else {
CommonUtils.playSound(0)
diff --git a/uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue b/uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue
index 4c689a5..c9eb603 100644
--- a/uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue
+++ b/uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue
@@ -3,9 +3,9 @@
<!-- hide-on-phone -->
<span v-if="label" class="uni-label-text">{{label + '锛�'}}</span>
<view class="uni-stat-box" :class="{'uni-stat__actived': current}">
- <view class="uni-select" :style="{height:multiple?'100%':' 35px'}"
+ <view class="uni-select" :style="{height:multiple?'100%':' 25px'}"
:class="{'uni-select--disabled':disabled}">
- <view class="uni-select__input-box" :style="{height:multiple?'100%':'35px'}" @click="toggleSelector">
+ <view class="uni-select__input-box" :style="{height:multiple?'100%':'25px'}" @click="toggleSelector">
<view class="" style="display: flex;flex-wrap: wrap;width: 100%;" v-if="multiple&¤t.length>0">
<view class="tag-calss"
v-for="(item,index) in collapseTags?current.slice(0,collapseTagsNum):current"
@@ -581,6 +581,7 @@
.uni-stat-box {
width: 100%;
flex: 1;
+
}
.uni-stat__actived {
@@ -599,9 +600,11 @@
.uni-select {
font-size: 14px;
- border: 1px solid $uni-border-3;
+ //border: 1px solid $uni-border-3;
box-sizing: border-box;
- border-radius: 4px;
+ //border-radius: 4px;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
padding: 0 5px;
padding-left: 10px;
position: relative;
@@ -615,7 +618,7 @@
width: 100%;
flex: 1;
height: 35px;
- min-height: 35px;
+ min-height: 25px;
&--disabled {
background-color: #f5f7fa;
diff --git a/utils/common.js b/utils/common.js
index 69f9d1d..2002e39 100644
--- a/utils/common.js
+++ b/utils/common.js
@@ -481,7 +481,7 @@
FieldListCache = FieldListCache.filter(elem => !role.test(elem.ColmCols))
})
- FieldListCache = FieldListCache.filter(elem => !ExcludeKeys.includes(elem))
+ FieldListCache = FieldListCache.filter(elem => !ExcludeKeys.includes(elem.ColmCols))
return {
status: true,
data: FieldListCache,
--
Gitblit v1.9.1