| components/BillListPopup/BillListPopupEquipConkBookBill.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/MJGL/Sb_EqpMaintenance/Sb_EqpMaintenanceBill.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
components/BillListPopup/BillListPopupEquipConkBookBill.vue
@@ -137,9 +137,12 @@ }, MultiSourceBill: { type: Boolean, default: false, required: false } default: false }, HEquipID: { type: Number, default: 0 } // 新增设备ID }, model: { prop: "HSourceBill", @@ -247,10 +250,13 @@ if (this.HBillNo) { sWhere += ` and 单据号 like '%${this.HBillNo}%'` } if (this.HSourceBillType === '设备维修记录单') { sWhere += ` and isnull(维修人,'')!='${uni.getStorageSync('HUserName')}$' ` if (this.HEquipID && this.HEquipID > 0) { sWhere += ` and HEquipID = ${this.HEquipID}` } sWhere += ` and isnull(关闭人,'')!='' ` if (this.HSourceBillType === '设备维修记录单') { sWhere += ` and isnull(维修人,'')!='${uni.getStorageSync('HUserName')}' ` } sWhere += ` and isnull(关闭人,'')='' ` return sWhere @@ -284,16 +290,17 @@ Message } = res.data if (count == 1) { this.length = Array.from(data).length data = data || []; // ✅ 关键:若 data 为 null,替换成空数组 this.length = data.length; const result = []; for (let i = 0; i < data.length; i += this.size) { result.push(data.slice(i, i + this.size)); } this.HBillList = result this.page = result.length this.HBillList = result; this.page = result.length; setTimeout(() => { this.enablefocus = true }, 500) this.enablefocus = true; }, 500); } else { setTimeout(() => { this.enablefocus = true pages/MJGL/Sb_EqpMaintenance/Sb_EqpMaintenanceBill.vue
@@ -37,12 +37,6 @@ </view> </view> <view class="form-item"> <view class="title">维修内容:</view> <view class="right"> <textarea v-model="hform.HRepairContent" placeholder="请输入维修内容" /> </view> </view> <view class="form-item"> <view class="title">单据号:</view> <view class="righton"> <input disabled v-model="hform.HBillNo" /> @@ -112,17 +106,30 @@ dataValue="HItemID" v-model="hform.HEmpID"> </zxz-uni-data-select> </view> <view class="form-item"> <view class="title">维修项目:</view> <zxz-uni-data-select required class="right" :localdata="HRepairList" dataKey="维修项目" dataValue="hitemid" v-model="hform.HRepairID" filterable> </zxz-uni-data-select> </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> </view> <view class="form-item"> <view class="title required">维修项目:</view> <zxz-uni-data-select required class="right" :localdata="HRepairList" dataKey="维修项目" dataValue="hitemid" v-model="hform.HRepairID" filterable> </zxz-uni-data-select> </view> <view class="form-item"> <view class="title">维修要求:</view> <view class="right"> <textarea v-model="hform.HExplanation" placeholder="请输入维修要求" /> </view> </view> <view class="form-item"> <view class="title">维修内容:</view> <view class="right"> <textarea v-model="hform.HRepairContent" placeholder="请输入维修内容" /> </view> </view> <view class="form-item"> <view class="title">设备名称:</view> @@ -143,9 +150,9 @@ </view> </view> <view class="form-item"> <view class="title">维修要求:</view> <view class="title">备注:</view> <view class="right"> <textarea v-model="hform.HExplanation" placeholder="请输入维修要求" /> <textarea v-model="hform.HRemark" placeholder="请输入备注" /> </view> </view> </view> @@ -217,7 +224,7 @@ </view> <!-- <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> --> <!-- 源单单据列表弹窗 --> <BillListPopupEquipConkBookBillVue ref="billList" :HBillType="hform.HBillType" <BillListPopupEquipConkBookBillVue ref="billList" :HBillType="hform.HBillType" :HEquipID="hform.HEquipID" :HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID"> </BillListPopupEquipConkBookBillVue> </view> @@ -257,7 +264,7 @@ enableSourceBillEdit: false, // 源单类型相关 HMainSourceBillType: "手工录入", // 用于显示的源单类型 HMainSourceBillType: "设备维修登记单", // 用于显示的源单类型 arrayHMainSourceBillType: ['设备维修登记单', '手工录入', '设备维修派工单'], arrayHMainSourceBillTypeID: ['设备维修登记单', '手工录入', '设备维修派工单'], // 对应的单据类型ID showHMainSourceBillType: true, @@ -298,6 +305,7 @@ HEquipID: 0, HBarSpec: '', HBarModel: '', HRemark: '', HMaker: getUserInfo()["Czymc"], HChecker: '', HCloseMan: '', @@ -337,7 +345,6 @@ showBillList() { this.$refs.billList.showPopup() }, // 选择源单类型 HMainSourceBillTypeChange(e) { if (e.detail.value == -1 || e.detail.value == NaN) { @@ -362,9 +369,13 @@ uni.setStorageSync(`${currentPage.route.split("/").pop()}_HSourceBillTypeCache`, { HSourceBillTypeName: this.HMainSourceBillType, HSourceBillType: this.hform.HMainSourceBillType }) }, }) this.updateEnableSourceBillEdit(); }, updateEnableSourceBillEdit() { this.enableSourceBillEdit = this.hform.HMainSourceBillType !== '手工录入'; }, // 读取缓存 loadCache() { const pages = getCurrentPages() @@ -413,36 +424,37 @@ }, // 提交数据有效性校验 ValidCheck() { if (this.hform.HEquipID == 0) { if (this.hform.HEquipID == 0 || this.hform.HEquipID === undefined) { return { Message: "未录入设备信息,请先录入设备信息!", state: false } } if (this.hform.HDeptID == 0) { if (this.hform.HDeptID == 0 || this.hform.HDeptID === undefined) { return { Message: "部门不得为空!", state: false } } if (this.hform.HEmpID == 0) { if (this.hform.HEmpID == 0 || this.hform.HEmpID === undefined) { return { Message: "验收人不得为空!", Message: "维修人不得为空!", state: false } } // if (this.hform.HRepairCheckMainID == 0) { // return { // Message: "维修项目不得为空!", // state: false // } // } if (this.hform.HManagerID == 0) { if (this.hform.HManagerID == 0 || this.hform.HManagerID === undefined) { return { Message: "负责人不得为空!", state: false } } if (this.hform.HRepairID == 0 || this.hform.HRepairID === undefined) { return { Message: "维修项目不得为空!", state: false } } if (this.hform.HMainSourceBillType !== '手工录入') { if (!this.hform.HMainSourceBillNo || this.hform.HMainSourceBillNo.trim() === '') { CommonUtils.showTips({ @@ -940,10 +952,15 @@ } }) let {data, count, Message} = res.data let { data, count, Message } = res.data if(count == 1) { console.log('data: ',data); this.hform.HRepairID = this.HRepairList.find(item => data[0]["表体维修项目"] == item["维修项目"])?.hitemid this.hform.HRepairID = this.HRepairList.find(item => data[0]["表体维修项目"] == item["维修项目"]) ?.hitemid }else { CommonUtils.showTips({ title: "温馨提示", @@ -958,7 +975,7 @@ } }, async getSourceBillInfo(HSourceBillType, HInterID, HBillNo, HSendWorkID) { // 下推单据类型为设备故障登记单 // 下推单据类型为设备维修登记单 if (HSourceBillType == 3907) { let res = await CommonUtils.doRequest2Async({ url: "/Sb_EqpRepairWorkBill/Sb_EqpConkBookBillListCheckDetai", @@ -978,7 +995,7 @@ console.log('data: ', data.h_v_Sb_EquipConkBookBillList_Edit); let data1 = data.h_v_Sb_EquipConkBookBillList_Edit[0] this.hform.HMainSourceBillType = HSourceBillType this.HMainSourceBillType = '设备故障登记单' this.HMainSourceBillType = '设备维修登记单' this.hform.HMainSourceBillNo = data1.单据号 this.hform.HMainSourceInterID = data1.hmainid this.hform.HMainSourceEntryID = data1.hsubid @@ -1039,6 +1056,7 @@ this.getEmpList() this.getRepairList() this.loadCache() this.updateEnableSourceBillEdit(); // 监听单据选择完成事件 uni.$on('BillSelectComplete', (e) => { pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill.vue
@@ -236,7 +236,7 @@ "HConkReasonCode": "", "HConkReasonName": "", "HConkExplanation": "", "HManagerID": "", "HManagerID": "0", "HManagerCode": "", "HManagerName": "", "HRemark": " " @@ -319,37 +319,37 @@ }, // 提交数据有效性校验 ValidCheck() { if (this.hform.HEquipID == 0) { if (this.hform.HEquipID == 0 || this.hform.HEquipID === undefined) { return { Message: this.$t('Sb_EquipConkBookBill.noEquipInfo') == 'Sb_EquipConkBookBill.noEquipInfo' ? '未录入设备信息,请先录入设备信息!' : this.$t('Sb_EquipConkBookBill.noEquipInfo'), state: false } } if (this.hform.HDeptID == 0) { if (this.hform.HDeptID == 0 || this.hform.HDeptID === undefined) { return { Message: this.$t('Sb_EquipConkBookBill.deptRequired') == 'Sb_EquipConkBookBill.deptRequired' ? '部门不得为空!' : this.$t('Sb_EquipConkBookBill.deptRequired'), state: false } } if (this.hform.HEmpID == 0) { if (this.hform.HEmpID == 0 || this.hform.HEmpID === undefined) { return { Message: this.$t('Sb_EquipConkBookBill.discovererRequired') == 'Sb_EquipConkBookBill.discovererRequired' ? '发现人不得为空!' : this.$t('Sb_EquipConkBookBill.discovererRequired'), state: false } } if (this.hform.HManagerID == 0) { if (this.hform.HManagerID === 0 || this.hform.HManagerID === undefined) { return { Message: this.$t('Sb_EquipConkBookBill.checkerRequired') == 'Sb_EquipConkBookBill.checkerRequired' ? '验收人不得为空!' : this.$t('Sb_EquipConkBookBill.checkerRequired'), state: false } } if (this.hform.HConkReasonID == 0) { if (this.hform.HConkReasonID == 0 || this.hform.HConkReasonID === undefined) { return { Message: this.$t('Sb_EquipConkBookBill.reasonRequired') == 'Sb_EquipConkBookBill.reasonRequired' ? '故障原因不得为空!' : this.$t('Sb_EquipConkBookBill.reasonRequired'), state: false } } if (this.hform.HConkTypeID == 0) { if (this.hform.HConkTypeID == 0 || this.hform.HConkTypeID === undefined) { return { Message: this.$t('Sb_EquipConkBookBill.typeRequired') == 'Sb_EquipConkBookBill.typeRequired' ? '故障类别不得为空!' : this.$t('Sb_EquipConkBookBill.typeRequired'), state: false pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill.vue
@@ -41,12 +41,7 @@ </radio-group> </view> </view> <view class="form-item"> <view class="title">验收内容:</view> <view class="right"> <textarea v-model="HDetailList[0].HRepairCheckContent" placeholder="请输入验收内容" /> </view> </view> <!-- 维修记录(源单) --> <view class="form-item"> <view class="title required">维修记录:</view> @@ -89,16 +84,22 @@ </zxz-uni-data-select> </view> <view class="form-item"> <view class="title">验收项目:</view> <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> </view> <view class="form-item"> <view class="title required">验收项目:</view> <zxz-uni-data-select required class="right" :localdata="HRepairCheckList" dataKey="维修验收项目" dataValue="hitemid" v-model="hform.HRepairCheckID"> </zxz-uni-data-select> </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> <view class="title">验收内容:</view> <view class="right"> <textarea v-model="HDetailList[0].HRepairCheckContent" placeholder="请输入验收内容" /> </view> </view> <view class="form-item"> <view class="title">设备名称:</view> @@ -116,6 +117,12 @@ <view class="title">设备型号:</view> <view class="righton"> <input v-model="hform.HBarModel" disabled /> </view> </view> <view class="form-item"> <view class="title">备注:</view> <view class="right"> <textarea v-model="hform.HRemark" placeholder="请输入备注" /> </view> </view> </view> @@ -187,7 +194,7 @@ <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> <!-- 源单单据列表弹窗 --> <BillListPopupEquipConkBookBillVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="'设备维修记录单'" <BillListPopupEquipConkBookBillVue ref="billList" :HEquipID="hform.HEquipID" :HBillType="hform.HBillType" :HSourceBillType="'设备维修记录单'" :HStockOrgID="hform.HStockOrgID"> </BillListPopupEquipConkBookBillVue> </view> @@ -249,6 +256,7 @@ "HEquipID": 0, "HBarSpec": "", "HBarModel": "", "HRemark": "", "HMaker": getUserInfo()["Czymc"], "HMakeDate": dayjs(new Date()).format("YYYY-MM-DD"), "HUpDater": "", @@ -390,36 +398,37 @@ // 提交数据有效性校验 ValidCheck() { if (this.hform.HEquipID == 0) { if (this.hform.HEquipID == 0 || this.hform.HEquipID === undefined) { return { Message: "未录入设备信息,请先录入设备信息!", state: false } } if (this.hform.HDeptID == 0) { if (this.hform.HDeptID == 0 || this.hform.HDeptID === undefined) { return { Message: "部门不得为空!", state: false } } if (this.hform.HEmpID == 0) { if (this.hform.HEmpID == 0 || this.hform.HEmpID === undefined) { return { Message: "验收人不得为空!", state: false } } if (this.hform.HRepairCheckID == 0) { return { Message: "验证项目不得为空!", state: false } } if (this.hform.HManagerID == 0) { if (this.hform.HManagerID == 0 || this.hform.HManagerID === undefined) { return { Message: "负责人不得为空!", state: false } } if (this.hform.HRepairCheckID == 0 || this.hform.HRepairCheckID === undefined) { return { Message: "验收项目不得为空!", state: false } } // 新增:维修记录校验 if (!this.hform.HMainSourceBillNo || this.hform.HMainSourceBillNo.trim() === '') { return { @@ -723,11 +732,6 @@ if(count == 1) { this.hform.HRepairCheckID = this.HRepairCheckList.find(item => data[0]["表体维修项目"] == item["维修验收项目"])?.hitemid this.HDetailList[0].HRepairCheckContent = data[0].维修内容 }else { CommonUtils.showTips({ title: "温馨提示", message: `获取派工单失败: ${Message}` }) } }catch(err) { CommonUtils.showTips({ pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill.vue
@@ -33,12 +33,6 @@ </uni-datetime-picker> </view> </view> <view class="form-item"> <view class="title">维修内容:</view> <view class="right"> <textarea v-model="hform.HRepairContent" placeholder="请输入维修内容" /> </view> </view> <!-- 源单类型 --> <view class="form-item"> <view class="title">源单类型:</view> @@ -113,16 +107,28 @@ </zxz-uni-data-select> </view> <view class="form-item"> <view class="title">维修项目:</view> <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> </view> <view class="form-item"> <view class="title required">维修项目:</view> <zxz-uni-data-select class="right" :localdata="HRepairList" dataKey="维修项目" dataValue="hitemid" v-model="hform.HRepairID"> </zxz-uni-data-select> </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> <view class="title">维修要求:</view> <view class="right"> <textarea v-model="HDetailList[0].HRepairExplanation" placeholder="请输入维修要求" /> </view> </view> <view class="form-item"> <view class="title">维修内容:</view> <view class="right"> <textarea v-model="hform.HRepairContent" placeholder="请输入维修内容" /> </view> </view> <view class="form-item"> <view class="title">设备名称:</view> @@ -146,12 +152,6 @@ <view class="title">备注:</view> <view class="right"> <textarea v-model="hform.HRemark" placeholder="请输入备注" /> </view> </view> <view class="form-item"> <view class="title">维修要求:</view> <view class="right"> <textarea v-model="HDetailList[0].HRepairExplanation" placeholder="请输入维修要求" /> </view> </view> </view> @@ -223,7 +223,7 @@ </view> <!-- <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> --> <!-- 源单单据列表弹窗 --> <BillListPopupEquipConkBookBillVue ref="billList" :HBillType="HBillType" <BillListPopupEquipConkBookBillVue ref="billList" :HBillType="HBillType" :HEquipID="hform.HEquipID" :HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID"> </BillListPopupEquipConkBookBillVue> </view> @@ -527,27 +527,33 @@ }, // 提交数据有效性校验 ValidCheck() { if (this.hform.HEquipID == 0) { if (this.hform.HEquipID == 0 || this.hform.HEquipID === undefined) { return { Message: "未录入设备信息,请先录入设备信息!", state: false } } if (this.hform.HDeptID == 0) { if (this.hform.HDeptID == 0 || this.hform.HDeptID === undefined) { return { Message: "部门不得为空!", state: false } } if (this.hform.HEmpID == 0) { if (this.hform.HEmpID == 0 || this.hform.HEmpID === undefined) { return { Message: "维修人不得为空!", state: false } } if (this.hform.HManagerID == 0) { if (this.hform.HManagerID == 0 || this.hform.HManagerID === undefined) { return { Message: "负责人不得为空!", state: false } } if (this.hform.HRepairID == 0 || this.hform.HRepairID === undefined) { return { Message: "维修项目不得为空!", state: false } } @@ -764,7 +770,7 @@ }, toScanCode() { MpaasScan.scanCode(cb => { this.hform.HBarCode = cb; // 修复:原来是 hfrom 应该是 hform this.hform.HBarCode = cb; this.GetMessageByBarCode(cb) }) },