From 423c1948a631cff298e6348cc55626f5149c111a Mon Sep 17 00:00:00 2001
From: qq_41295110 <qq_41295110@noreply.gitcode.com>
Date: 星期四, 26 二月 2026 13:10:19 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill.vue | 390 ++++++++++++++++++++++++++++---------------------------
1 files changed, 201 insertions(+), 189 deletions(-)
diff --git a/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill.vue b/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill.vue
index b41f1a2..835acfc 100644
--- a/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill.vue
+++ b/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill.vue
@@ -2,9 +2,7 @@
<view>
<view class="tabs" id="tabs">
<view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">鍩烘湰淇℃伅</view>
- <!-- <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">鏄庣粏淇℃伅</view> -->
<view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">鍏朵粬淇℃伅</view>
- <!-- <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">闄勪欢淇℃伅</view> -->
</view>
<!-- 鍩烘湰淇℃伅 -->
<template v-if="tabs == 0">
@@ -48,22 +46,31 @@
</view>
</view>
<view class="form-item">
- <view class="title">婧愬崟绫诲瀷:</view>
- <zxz-uni-data-select class="right" :localdata="[
- {key: '鎵嬪伐褰曞叆', value: '-1'},
- {key: '妯″叿鏁呴殰鐧昏鍗�', value: '3815'}
- ]" dataKey="key" dataValue="value" v-model="hform.HMainSourceBillType">
+ <view class="title">婧愬崟绫诲瀷</view>
+ <view class="right" v-show="showHMainSourceBillType">
+ <picker :range="arrayHMainSourceBillType" @change="HMainSourceBillTypeChange">
- </zxz-uni-data-select>
- <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
+ <input disabled name="HMainSourceBillType" v-model="HMainSourceBillType"
+ placeholder="璇烽�夋嫨婧愬崟绫诲瀷" />
+ <view class="picker-overlay"></view>
+ </picker>
+ </view>
+ <view class="righton" v-show="!showHMainSourceBillType">
+ <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType"
+ placeholder="璇烽�夋嫨婧愬崟绫诲瀷" />
+ </view>
</view>
<view class="form-item">
- <view class="title">婧愬崟鍙�:</view>
- <view class="right">
- <input v-model="hform.HMainSourceBillNo" />
+ <view class="title required">鏁呴殰鐧昏鍗�</view>
+ <view class="right" v-show="hform.HMainSourceBillType != 1">
+ <input type="text" name="HBarCode" v-model="hform.HMainSourceBillNo" />
</view>
- <view class="icon-wrapper">
- <uni-icons type="search" size="20" @click="toCheckFile"></uni-icons>
+ <view class="icon-wrapper" v-show="hform.HMainSourceBillType != 1"
+ :disabled="hform.HMainSourceBillType == -1">
+ <uni-icons type="search" size="20" @click="showBillList"></uni-icons>
+ </view>
+ <view class="righton" v-show="hform.HMainSourceBillType == 1">
+ <input type="text" disabled name="HBarCode" v-model="hform.HMainSourceBillNo" />
</view>
</view>
<view class="form-item">
@@ -84,40 +91,38 @@
dataValue="HItemID" v-model="hform.HDeptID">
</zxz-uni-data-select>
- <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
</view>
<view class="form-item">
<view class="title required">楠屾敹浜�:</view>
<zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
dataValue="HItemID" v-model="hform.HEmpID">
-
</zxz-uni-data-select>
- <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
</view>
<view class="form-item">
- <view class="title required">楠屾敹椤圭洰:</view>
- <zxz-uni-data-select required class="right" :localdata="HRepairCheckList" dataKey="缁翠慨楠屾敹椤圭洰"
+ <view class="title">楠屾敹椤圭洰:</view>
+ <zxz-uni-data-select class="right" :localdata="HRepairCheckList" dataKey="缁翠慨楠屾敹椤圭洰"
dataValue="hitemid" v-model="hform.HRepairCheckMainID">
-
</zxz-uni-data-select>
- <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
</view>
<view class="form-item">
<view class="title required">璐熻矗浜�:</view>
<zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
dataValue="HItemID" v-model="hform.HManagerID">
-
</zxz-uni-data-select>
- <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
</view>
<!-- 鎵爜甯﹀嚭缁翠慨璁板綍 -->
<view class="form-item">
<view class="title required">缁翠慨璁板綍:</view>
- <view class="right">
- <input type="text" value="" />
+ <view class="right" v-show="hform.HMainSourceBillType != 1">
+ <input type="text" v-model="hform.HMouldRepairWorkName"
+ :disabled="hform.HMainSourceBillType == -1" placeholder="璇烽�夋嫨缁翠慨璁板綍" />
</view>
- <view class="icon-wrapper">
- <uni-icons type="search" size="20" @click="toCheckFile"></uni-icons>
+ <view class="icon-wrapper" v-show="hform.HMainSourceBillType != 1"
+ :disabled="hform.HMainSourceBillType == -1">
+ <uni-icons type="search" size="20" @click="showRepairRecordList"></uni-icons>
+ </view>
+ <view class="righton" v-show="hform.HMainSourceBillType == 1">
+ <input type="text" disabled v-model="hform.HMouldRepairWorkName" />
</view>
</view>
<view class="form-item">
@@ -204,7 +209,13 @@
<button class="btn-a" size="mini" @tap="addNew">鏂板</button>
<button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
</view>
- <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload>
+ <!-- 寮瑰嚭妯″叿鏁呴殰鐧昏鍗曠殑閫夋嫨鍒楄〃 -->
+ <BillListPopupMouldConkBookBillVue ref="billList" :HBillType="hform.HBillType"
+ :HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID">
+ </BillListPopupMouldConkBookBillVue>
+ <!-- 寮瑰嚭妯″叿缁翠慨璁板綍鍗曠殑閫夋嫨鍒楄〃 -->
+ <RepairRecordPopup ref="repairRecordList" :HBillType="hform.HBillType" :HStockOrgID="hform.HStockOrgID">
+ </RepairRecordPopup>
</view>
</template>
@@ -219,25 +230,37 @@
import {
getUserInfo
} from "../../../utils/auth";
+ import BillListPopupMouldConkBookBillVue from '../../../components/BillListPopup/BillListPopupMouldConkBookBill.vue';
+ import RepairRecordPopup from '../../../components/BillListPopup/BillListPopuMouldRepairRecordPopup.vue';
+
export default {
+ components: {
+ BillListPopupMouldConkBookBillVue,
+ RepairRecordPopup
+ },
name: 'Sc_MouldRepairCheckBill',
data() {
return {
tabs: 0,
- HMainSourceBillType: "",
btnTop: 0,
tabsBottom: 0,
HModName: "Sc_MouldRepairCheckBill",
HBillType: '3817',
operationType: 1,
- uploadOptions: {},
enableEdit: true,
+
+ // 鎺у埗婧愬崟绫诲瀷鏄惁鍙紪杈�
+ showHMainSourceBillType: true,
+ HMainSourceBillType: '妯″叿鏁呴殰鐧昏鍗�',
+ arrayHMainSourceBillType: ['妯″叿鏁呴殰鐧昏鍗�'],
+ arrayHMainSourceBillTypeID: ['3815'],
HDeptList: [],
HRepairCheckList: [],
HEmpList: [],
hform: {
+ "HBillType": 3817,
"HBarCode": "",
"HBillNo": "",
"HInterID": 0,
@@ -247,23 +270,24 @@
"HMouldSpec": "",
"HMouldModel": "",
"HMouldID": 0,
- "HMainSourceBillType": "-1",
+ "HMainSourceBillType": "3815",
"HMainSourceInterID": 0,
"HMainSourceEntryID": 0,
"HCheckResult": "OK",
- "HEmpName": "",
- "HEmpID": 0,
+ "HEmpName": getUserInfo().HEmpName,
+ "HEmpID": getUserInfo().HEmpID,
"HCheckBeginDate": dayjs(new Date()).format("YYYY-MM-DD"),
- "HDeptName": "",
- "HDeptID": 0,
+ "HDeptName": getUserInfo().HDeptName,
+ "HDeptID": getUserInfo().HDeptID,
"HMainSourceBillNo": "",
- "HManagerName": "",
- "HManagerID": 0,
+ "HManagerName": getUserInfo().HManagerName,
+ "HManagerID": getUserInfo().HManagerID,
"HMouldRepairWorkName": "",
"HMouldRepairWorkID": 0,
"HExplanation": "",
"HRemark": "",
"HOrgID": uni.getStorageSync("OrganizationID"),
+ "HStockOrgID": uni.getStorageSync("OrganizationID"),
"HMaker": getUserInfo()["Czymc"],
"HChecker": "",
"HCloseMan": "",
@@ -318,12 +342,12 @@
state: false
}
}
- if (this.hform.HRepairCheckMainID == 0) {
- return {
- Message: "楠岃瘉椤圭洰涓嶅緱涓虹┖!",
- state: false
- }
- }
+ // if (this.hform.HRepairCheckMainID == 0) {
+ // return {
+ // Message: "楠岃瘉椤圭洰涓嶅緱涓虹┖!",
+ // state: false
+ // }
+ // }
if (this.hform.HManagerID == 0) {
return {
Message: "璐熻矗浜轰笉寰椾负绌�!",
@@ -338,11 +362,44 @@
},
addNew() {
uni.redirectTo({
- url: './Sb_MouldRepairCheckBill?operationType=1'
+ url: './Sc_MouldRepairCheckBill?operationType=1'
})
},
goBack() {
uni.navigateBack()
+ },
+ showBillList() {
+ this.$refs.billList.showPopup()
+ },
+ showRepairRecordList() {
+ if (this.hform.HMouldID === 0) {
+ CommonUtils.showTips({
+ title: '鎻愮ず',
+ message: '璇峰厛閫夋嫨妯″叿'
+ });
+ return;
+ }
+ this.$refs.repairRecordList.showPopup(this.hform.HMouldID);
+ },
+ //閫夋嫨婧愬崟绫诲瀷
+ HMainSourceBillTypeChange(e) {
+ if (e.detail.value == -1 || e.detail.value == NaN) {
+ this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ 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
+ })
},
checkBoxChangeHandler(index, e) {
let cr = e.detail.value
@@ -350,89 +407,6 @@
this.HCheckFileList[index]["HDotCheckResult"] = false
} else {
this.HCheckFileList[index]["HDotCheckResult"] = true
- }
- },
- uploadFile(index) {
- console.log('filePath: ', this.attachmentInfo[index].filePath);
- // 閫氳繃涓存椂璺緞璇诲彇鏂囦欢
- uni.uploadFile({
- url: CommonUtils.getServerUrl() + "/Sb_EquipDotCheckBill/UploadFile",
- filePath: this.attachmentInfo[index].filePath,
- name: 'file',
- formData: {
- HBillNo: this.hform.HBillNo,
- HRemark: "",
- HUserName: getUserInfo()["Czymc"]
- },
- success: (uploadRes) => {
- CommonUtils.showTips({
- message: "涓婁紶鎴愬姛"
- })
- this.attachmentInfo[index].status = "涓婁紶鎴愬姛"
- },
- fail: (err) => {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `涓婁紶澶辫触: ${err}`
- })
- }
- })
- },
- delFile(index) {
- console.log('attachmentInfo: ', this.attachmentInfo[index]);
- uni.showModal({
- title: '鎻愮ず',
- content: '纭瑕佸垹闄� " ' + this.attachmentInfo[index].fileName + ' " 鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�',
- success: (res) => {
- if (res.confirm) {
- this.attachmentInfo.splice(index, 1)
- }
- },
- })
-
- },
- handleUploadCallback(res) { // 鏂囦欢涓婁紶鍥炶皟
- console.log('file: ', res);
- let fileInfo = res.data[0]
- this.attachmentInfo.push({
- fileName: fileInfo.name,
- size: fileInfo.size,
- status: '绛夊緟涓婁紶',
- filePath: fileInfo.tempFilePath
- })
- },
- // 涓婁紶鏂囦欢
- fileUpload() {
- this.$refs.XeUpload.upload('file', {});
- },
- //鑾峰彇鐝鏁版嵁
- async getShiftList() {
- try {
- let res = await CommonUtils.doRequest2Async({
- url: '/Web/GetGy_ShiftsList_Json',
- data: {
- Shifts: "",
- }
- })
-
- let {
- data,
- count,
- Message
- } = res.data
- if (count == 1) {
- this.HShiftsList = data
- } else {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: Message
- })
- }
- } catch (err) {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: err
- })
}
},
//鑾峰彇浣跨敤閮ㄩ棬鏁版嵁
@@ -530,7 +504,7 @@
},
toScanCode() {
MpaasScan.scanCode(cb => {
- this.hfrom.HBarCode = cb
+ this.hform.HBarCode = cb
this.GetMessageByBarCode(cb)
})
},
@@ -574,65 +548,6 @@
CommonUtils.showTips({
title: "娓╅Θ鎻愮ず",
message: err
- })
- }
- },
- async GetItemByEquipFile() {
- try {
- let res = await CommonUtils.doRequest2Async({
- url: "/Web/GetItemByEquipFile",
- data: {
- "EquipProjectID": this.hform.HEquipID,
- "Type": "DJ",
- "HDate": this.hform.HBeginDate
- }
- })
-
- let {
- data,
- Message,
- count
- } = res.data
- if (count == 1) {
- this.hform.HEquipDotCheckRuleInterID = data[0].鐐规瑙勭▼ID
- this.hform.HEquipDotCheckRuleInterNo = data[0].鐐规瑙勭▼鍗曞彿
- this.hform.HPlanNo = data[0].鐐规璁″垝鍗�
- this.hform.HPlanInterID = (data[0].鐐规璁″垝ID == null ? 0 : data[0].鐐规璁″垝ID) == "" ? 0 : data[0]
- .鐐规璁″垝ID
- this.hform.HPlanEntryID = (data[0].鐐规璁″垝瀛怚D == null ? 0 : data[0].鐐规璁″垝瀛怚D) == "" ? 0 : data[
- 0].鐐规璁″垝瀛怚D
-
- this.HCheckFileList = Array.from(data).map(item => {
- return {
- "HDotCheckItemID": item.HDotCheckItemID,
- "HDotCheckCode": item.鐐规椤圭洰浠g爜,
- "HDotCheckItem": item.鐐规椤圭洰,
- "HDotCheckPart": item.鐐规閮ㄤ綅,
- "HClaim": item.鍏蜂綋瑕佹眰,
- "HManagerID": item.璐熻矗浜篒D,
- "HManagerCode": item.璐熻矗浜轰唬鐮�,
- "HManagerName": item.璐熻矗浜哄悕绉�,
- "HSourceInterID": item.鐐规璁″垝ID == null ? 0 : item.鐐规璁″垝ID,
- "HSourceEntryID": item.鐐规璁″垝瀛怚D == null ? 0 : item.鐐规璁″垝瀛怚D,
- "HSourceBillNo": item.鐐规璁″垝鍗�,
- "HDotCheckItemClassID": 0,
- "HDotCheckItemClassName": "",
- "HDotCheckItemMethodID": 0,
- "HDotCheckItemMethodName": "",
- "HDotCheckResult": item.榛樿缁撹 == 1 ? true : false
- }
- })
-
- } else {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鑾峰彇鐐规瑙勭▼閿欒锛� ${Message}`
- })
- }
- } catch (err) {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鑾峰彇鐐规瑙勭▼閿欒锛� ${err}`
})
}
},
@@ -731,6 +646,60 @@
message: "鎻愪氦鍗曟嵁澶辫触: " + err
})
}
+ },
+ async getSendWorkBill(HRepairSendWorkID) {
+ let res2 = await CommonUtils.doRequest2Async({
+ url: "/Sc_MouldRepairSendWorkBill/Sc_MouldRepairSendWorkBill_Edit",
+ data: {
+ "linterid": HRepairSendWorkID,
+ "user": getUserInfo()["Czymc"]
+ }
+ })
+
+ let {data, count, Message} = res2.data
+ if(count == 1) {
+ this.hform.HRepairCheckMainID = this.HRepairCheckList.find(item => item["缁翠慨楠屾敹椤圭洰"] == data[0]["缁翠慨椤圭洰"])?.hitemid
+ this.hform.HRepairCheckMainContent = data[0]["缁翠慨鍐呭"]
+ } else {
+
+ }
+ },
+ async getSourceBillInfo(HSourceBillType, HInterID, HBillNo, HRepairSendWorkID) {
+ // 涓嬫帹鍗曟嵁绫诲瀷涓鸿澶囨晠闅滅櫥璁板崟
+ if(HSourceBillType == 3815) {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Sc_MouldConkBookBill/Sb_MouldConkBookBillListCheckDetai",
+ data: {
+ HID: HInterID
+ }
+ })
+
+ let {data,code, count, Message} = res.data
+ console.log('data: ',data);
+ if(code == 1) {
+ console.log('data: ',data.h_v_Sc_MouldConkBookBillList_Edit);
+ let data1 = data.h_v_Sc_MouldConkBookBillList_Edit[0]
+ this.hform.HMainSourceBillType = HSourceBillType
+ this.HMainSourceBillType = '鍣ㄥ叿鏁呴殰鐧昏鍗�'
+ this.hform.HMainSourceBillNo = data1.鍗曟嵁鍙�
+ this.hform.HMainSourceInterID = data1.hmainid
+ this.hform.HMainSourceEntryID = data1.hsubid
+ this.hform.HMouldID = data1.HMouldID
+ this.hform.HManagerName = data1.璐熻矗浜�
+ this.hform.HManagerID = data1.HManagerID
+ this.hform.HMouldName = data1.浜у搧妯″叿
+ this.hform.HMouldModel = data1.浜у搧妯″叿鍨嬪彿
+ this.hform.HMouldSpec = data1.浜у搧妯″叿瑙勬牸
+
+ this.getSendWorkBill(HRepairSendWorkID)
+ }
+ else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鑾峰彇婧愬崟澶辫触: ${Message}`
+ })
+ }
+ }
}
},
onLoad(e) {
@@ -750,13 +719,56 @@
// 缂栬緫
} else if (this.operationType == 4) {
- // 娴忚
-
+ // 涓嬫帹
+ // 涓嬫帹
+ let {
+ HSourceBillType,
+ HInterID,
+ HBillNo,
+ HRepairBillNo,
+ HRepairID,
+ HRepairSendWorkID
+ } = e
+ // 涓嬫帹
+ // this.enableEdit = false;
+ // this.enableSourceBillEdit = false;
+ // this.showHMainSourceBillType = false;
+ this.hform.HMouldRepairWorkID = HRepairID
+ this.hform.HMouldRepairWorkName = HRepairBillNo
+
+ this.getMaxNum()
+ this.getSourceBillInfo(HSourceBillType, HInterID, HBillNo, HRepairSendWorkID)
}
this.getHDeptList()
this.getEmpList()
this.getCheckProjList()
+ // 鐩戝惉鏁呴殰鐧昏鍗曢�夋嫨瀹屾垚浜嬩欢
+ uni.$on('BillSelectComplete', (e) => {
+ console.log("鎺ユ敹鍒扮殑娑堟伅: ", e)
+ this.hform.HMainSourceInterID = e.HInterID
+ this.hform.HMainSourceBillNo = e.HBillNo
+ this.hform.HMainSourceEntryID = e.HEntryID
+ this.hform.HMouldID = e.HMouldID
+ this.hform.HMouldName = e.HMouldName
+ this.hform.HMouldSpec = e.HMouldSpec
+ this.hform.HMouldModel = e.HMouldModel
+ this.$refs.billList.exit()
+ })
+ // 鐩戝惉缁翠慨璁板綍閫夋嫨瀹屾垚浜嬩欢
+ uni.$on('RepairRecordSelectComplete', (e) => {
+ console.log("鎺ユ敹鍒扮淮淇褰曢�夋嫨: ", e);
+ if (e.HInterID) {
+ this.hform.HMouldRepairWorkName = e.HBillNo;
+ this.hform.HMouldRepairWorkID = e.HInterID;
+ // 鍙互鏍规嵁闇�瑕佽缃叾浠栧瓧娈�
+ }
+ this.$refs.repairRecordList.exit();
+ });
+ },
+ onUnload() {
+ uni.$off('BillSelectComplete');
+ uni.$off('RepairRecordSelectComplete');
},
onReady() {
const query = uni.createSelectorQuery().in(this)
--
Gitblit v1.9.1