| | |
| | | <view class="form-item"> |
| | | <view class="title">维修内容:</view> |
| | | <view class="right"> |
| | | <textarea v-model="hform.HRepairContent" placeholder="请输入验证内容" /> |
| | | <textarea v-model="hform.HRepairContent" placeholder="请输入维修内容" /> |
| | | </view> |
| | | </view> |
| | | <!-- 源单类型 --> |
| | |
| | | |
| | | <!-- 源单单号 --> |
| | | <view class="form-item"> |
| | | <view class="title required">源单单号:</view> |
| | | <view class="title">源单单号:</view> |
| | | <view :class="enableSourceBillEdit?'right':'righton'"> |
| | | <input v-model="hform.HMainSourceBillNo" :disabled="!enableSourceBillEdit" |
| | | @confirm="GetMessageByHMainSourceBillNo(hform.HMainSourceBillNo)" |
| | |
| | | </view> |
| | | <!-- <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> --> |
| | | <!-- 源单单据列表弹窗 --> |
| | | <BillListPopupEquipConkBookBillVue ref="billList" :HBillType="hform.HBillType" |
| | | <BillListPopupEquipConkBookBillVue ref="billList" :HBillType="HBillType" |
| | | :HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID"> |
| | | </BillListPopupEquipConkBookBillVue> |
| | | </view> |
| | |
| | | HDeleteMan: '', |
| | | HDeleteDate: '', |
| | | // 新增的源单相关字段 |
| | | HMainSourceBillType: '设备维修登记单', // 默认为设备维修登记单 |
| | | HMainSourceBillType: '-1', // 默认为设备维修登记单 |
| | | HMainSourceBillNo: '', |
| | | HMainSourceInterID: 0, |
| | | HMainSourceEntryID: 0, |
| | |
| | | // 获取职员数据 |
| | | async getEmpList() { |
| | | try { |
| | | let sWhere= " where 1=1 " |
| | | if(this.hform.HDeptName && uni.getStorageSync("Organization") == '宁波市华舟包装有限公司'){ |
| | | sWhere += ` and HDeptName = '${this.hform.HDeptName}'` |
| | | } |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/PublicPageMethod/UserList', |
| | | data: { |
| | | sWhere: " where 1=1", |
| | | sWhere: sWhere, |
| | | } |
| | | }) |
| | | |
| | |
| | | let oMain = JSON.stringify(this.hform); |
| | | this.HDetailList[0].HManagerID = this.hform.HManagerID |
| | | this.HDetailList[0].HRepairID = this.hform.HRepairID |
| | | let oprType = this.operationType |
| | | if(oprType == 4){ |
| | | oprType = 1 |
| | | } |
| | | let sSubStr = JSON.stringify(this.HDetailList); |
| | | let sMainSub = oMain + ';' + sSubStr + `;-1;${this.operationType}` + ';' + getUserInfo()[ |
| | | let sMainSub = oMain + ';' + sSubStr + `;-1;${oprType}` + ';' + getUserInfo()[ |
| | | 'Czymc']; |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/Sb_EquipRepairSendWorkBill/AddEquipRepairSendWorkBill", |
| | |
| | | message: "提交单据失败: " + err |
| | | }) |
| | | } |
| | | }, |
| | | async getSourceBillInfo(HSourceBillType, HInterID, HBillNo) { |
| | | // 下推单据类型为设备故障登记单 |
| | | if(HSourceBillType == 3907) { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Sb_EqpRepairWorkBill/Sb_EqpConkBookBillListCheckDetai", |
| | | data: { |
| | | HID: HInterID |
| | | } |
| | | }) |
| | | |
| | | let {data,code, count, Message} = res.data |
| | | |
| | | if(code == 1) { |
| | | 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.hform.HMainSourceBillNo = data1.单据号 |
| | | this.hform.HMainSourceInterID = data1.hmainid |
| | | this.hform.HMainSourceEntryID = data1.hsubid |
| | | this.hform.HEquipID = data1.HEquipID |
| | | this.hform.HManagerName = data1.负责人 |
| | | this.hform.HManagerID = data1.HManagerID |
| | | this.hform.HBarName = data1.设备名称 |
| | | this.hform.HBarModel = data1.设备型号 |
| | | this.hform.HBarSpec = data1.设备规格 |
| | | this.hform.HRepairContent = data1.故障描述 |
| | | |
| | | } |
| | | else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取源单失败: ${Message}` |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | |
| | | } else if (this.operationType == 3) { |
| | | // 编辑 |
| | | } else if (this.operationType == 4) { |
| | | // 浏览 |
| | | this.enableEdit = false; |
| | | this.enableSourceBillEdit = false; |
| | | this.showHMainSourceBillType = false; |
| | | let {HSourceBillType, HInterID, HBillNo} = e |
| | | // 下推 |
| | | // this.enableEdit = false; |
| | | // this.enableSourceBillEdit = false; |
| | | // this.showHMainSourceBillType = false; |
| | | this.getMaxNum() |
| | | this.getSourceBillInfo(HSourceBillType, HInterID, HBillNo) |
| | | } |
| | | |
| | | this.getHDeptList() |