| | |
| | | @confirm="getHBarCodeData(hform.HBarCode)" /> |
| | | </view> |
| | | <uni-icons type="scan" |
| | | style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;flex-shrink: 0;" |
| | | size="20" @click="toScanCode"></uni-icons> |
| | | 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" @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> |
| | | |
| | |
| | | CommonUtils |
| | | } from '../../../utils/common'; |
| | | import dayjs from 'dayjs'; |
| | | import { MpaasScan } from '../../../utils/mpaasScan'; |
| | | import { |
| | | MpaasScan |
| | | } from '../../../utils/mpaasScan'; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | HModName: 'Kf_POStockInBackBill_PDA', |
| | | ModRightName: 'CE_POStockInBack', |
| | | OperationType: 1, |
| | | operationType: 1, |
| | | HInterID_Temp: '', |
| | | |
| | | showHStockPlaceName: false, |
| | |
| | | // 提交数据 |
| | | hform: { |
| | | "HBarCode": "", |
| | | "HConkBeginDate": dayjs(new Date()).format("YYYY-MM-DD hh:mm:ss"), |
| | | "HConkBeginDate": dayjs(new Date()).format("YYYY-MM-DD"), |
| | | "HConkTypeName": "", |
| | | "HConkTypeID": "0", |
| | | "HConkReasonName": "", |
| | |
| | | "HExplanation": "", |
| | | "HBillNo": "", |
| | | "HInterID": "0", |
| | | "HDate": dayjs(new Date()).format("YYYY-MM-DD hh:mm:ss"), |
| | | "HDate": dayjs(new Date()).format("YYYY-MM-DD"), |
| | | "HDeptName": getUserInfo()["HDeptName"], |
| | | "HDeptID": getUserInfo()["HDeptID"], |
| | | "HEmpName": getUserInfo().HEmpName, |
| | |
| | | "HBarSpec": "", |
| | | "HBarModel": "", |
| | | "HMaker": getUserInfo()["Czymc"], |
| | | "HMakeDate": dayjs(new Date()).format("YYYY-MM-DD hh:mm:ss"), |
| | | "HMakeDate": dayjs(new Date()).format("YYYY-MM-DD"), |
| | | "HUpDater": "", |
| | | "HUpDateDate": "", |
| | | "HChecker": "", |
| | |
| | | }, |
| | | async onLoad(e) { |
| | | console.log(e, this.userInfo) |
| | | this.OperationType = e.OperationType || 1 |
| | | if(operationType == 1) { |
| | | this.operationType = e.operationType || 1 |
| | | if (this.operationType == 1) { |
| | | if (e.HInterID) { |
| | | this.HInterID_Temp = e.HInterID |
| | | this.RoadBillMain(e.HInterID) |
| | |
| | | this.HSourceBillNoFocus = true |
| | | this.refreshBarCodeState() |
| | | } |
| | | |
| | | }else if(operationType == 5) { |
| | | |
| | | } else if (this.operationType == 5) { |
| | | // 单据下推 |
| | | let {HSourceBillType, HInterID, HBillNo} = e |
| | | let { |
| | | HSourceBillType, |
| | | HInterID, |
| | | HBillNo, |
| | | } = e |
| | | this.getMaxNum() |
| | | this.getSourceBillInfo(HSourceBillType, HInterID, HBillNo) |
| | | } |
| | | |
| | | |
| | | this.InitConkType() |
| | | this.InitConkReason() |
| | | this.InitDept() |
| | | 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() |
| | | }, |
| | | 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 { |
| | |
| | | } |
| | | |
| | | }, |
| | | |
| | | |
| | | // 新增回调 |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: '/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill?OperationType=1' |
| | | url: '/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill?operationType=1' |
| | | }) |
| | | }, |
| | | //新增 |
| | |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | }, |
| | | checkBillValidate() { |
| | | let message = '' |
| | | |
| | |
| | | message = '未填写部门' |
| | | } else if (!this.hform.HEmpName) { |
| | | message = '未填写发现人' |
| | | } |
| | | } |
| | | if (!message) { |
| | | return true |
| | | } |
| | |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBill?OperationType=1' |
| | | url: '/pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBill?operationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | |
| | | }, |
| | | async getSourceBillInfo(HSourceBillType, HInterID, HBillNo) { |
| | | // 下推单据类型为设备故障登记单 |
| | | if(HSourceBillType == 3815) { |
| | | 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 { |
| | | 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.HMouldName = data1.产品模具 |
| | | this.hform.HMouldModel = data1.产品模具型号 |
| | | this.hform.HMouldSpec = data1.产品模具规格 |
| | | } |
| | | else { |
| | | |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取源单失败: ${Message}` |
| | | }) |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |