Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
| | |
| | | "title": "采购退料单" |
| | | }, |
| | | "MoveStockBill_PDA": { |
| | | "title": "直接调拨单" |
| | | "title": "直接调拨单" |
| | | }, |
| | | "Kf_OtherOutBill_PDA": { |
| | | "title": "其他出库单", |
| | |
| | | }, |
| | | "SellOutBill_PDA": { |
| | | "title": "销售出库单" |
| | | }, |
| | | "Kf_POStockInBill_PDA": { |
| | | "物料代码": "物料代码", |
| | | "源单单号": "源单单号", |
| | | "源单数量": "源单数量", |
| | | "数量": "数量", |
| | | "条码个数": "条码个数", |
| | | "规格型号": "规格型号", |
| | | "HSourceBillType0": "收料通知单@1103", |
| | | "HSourceBillType1": "采购订单@1101", |
| | | "HSourceBillType2": "手工录入@-1" |
| | | |
| | | }, |
| | | "Gy": { |
| | | "HBarCode": "条码", |
| | | "HBarCode_Placeholder": "请扫描(或输入)条码", |
| | | "HQty": "数量", |
| | | "HQty_Placeholder": "请输入数量", |
| | | "HWHName": "仓库", |
| | | "HWHName_Placeholder": "请选择仓库", |
| | | "HStockPlaceName": "仓位", |
| | | "HStockPlaceName_Placeholder": "请输入(或扫描)仓位", |
| | | "OperationDisabled": "不可操作", |
| | | "SourceBillSelect": "选择源单", |
| | | "TableHeaderInfo": "表头信息", |
| | | "MaterInfo": "物料信息", |
| | | "BarCodeInfo": "条码信息", |
| | | "HMainSourceBillType": "源单信息", |
| | | "HMainSourceBillType_Placeholder": "请选择源单类型", |
| | | "HMainSourceBillNo": "源单单号", |
| | | "HMainSourceBillNo_Placeholder": "请输入(扫描)源单单号", |
| | | "HDate": "日期", |
| | | "HDate_Placeholder": "请选择日期", |
| | | "HMaker": "制单人", |
| | | "HBillNo": "单据号", |
| | | "HInterID": "单据ID", |
| | | "HKeeperName": "保管", |
| | | "HKeeperName_Placeholder": "请选择保管员", |
| | | "HSecManagerName": "验收", |
| | | "HSecManagerName_Placeholder": "请选择验收员", |
| | | "HDeptName": "部门", |
| | | "HDeptName_Placeholder": "请选择部门", |
| | | "HSupName": "供应商", |
| | | "HSupName_Placeholder": "请选择供应商", |
| | | "HStockOrgName": "组织", |
| | | "HBarCode_B": "条码", |
| | | "HMaterName_B": "物料", |
| | | "HMaterModel_B": "规格", |
| | | "HBatchNo_B": "批次", |
| | | "HUnitName_B": "单位", |
| | | "HQty_B": "数量", |
| | | "HTMQty_B": "容量", |
| | | "HWHName_B": "仓库", |
| | | "HSPName_B": "仓位", |
| | | "submit": "提交", |
| | | "addNew": "新增", |
| | | "goBack": "退出" |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | "landscape-secondary", |
| | | //自然方向 |
| | | "default" |
| | | ] |
| | | ], |
| | | "fallbackLocale" : "zh-Hans" |
| | | } |
| | |
| | | <view class="row-head">{{ item["分组名称"] }}</view> |
| | | <uni-row :gutter="3" class="row-content"> |
| | | <uni-col class="equal-height-col" :span="8" v-for="unit in item['参数列表']"> |
| | | <view style="font-size: 28rpx;"> |
| | | {{ unit.HTechParamName }}:{{unit.HResult}} |
| | | <view style="font-size: 28rpx; text-align: center; padding: 8rpx 0;"> |
| | | {{ unit.HTechParamName }}: {{unit.HResult}} |
| | | </view> |
| | | </uni-col> |
| | | </uni-row> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | import { |
| | | getUserInfo |
| | | } from '@/utils/auth'; |
| | | import timerManager from '@/utils/timer'; |
| | | export default { |
| | | data() { |
| | | return { |
| | | HTimerID: 'Sc_EquipTechParamQueryTimer', |
| | | HTechParams: [] |
| | | }; |
| | | }, |
| | | methods: { |
| | | async loadBillMain(HEquipID) { |
| | | async loadBillMain(HEquipID, showLoading=true) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/getSB_EquipTechParamBillListByEquipID", |
| | | data: { |
| | | HEquipID: HEquipID, |
| | | } |
| | | }, |
| | | showLoading: showLoading |
| | | }) |
| | | |
| | | let { |
| | |
| | | } = res.data |
| | | |
| | | if (code == 1) { |
| | | // Object.assign(this.hform, { |
| | | // "HMaterID": data[0].HMaterID, |
| | | // "HMaterNumber": data[0].产品代码, |
| | | // "HMaterName": data[0].产品名称, |
| | | // "HMaterModel": data[0].规格型号, |
| | | // "HProcID": data[0].HProcID, |
| | | // "HProcName": data[0].工序名称, |
| | | // "HProcNo": data[0].工序号, |
| | | // //"HGroupID": data[0].HGroupID == undefined ? 0 : data[0].HGroupID, |
| | | // //"HGroupName": data[0].班组, |
| | | // "HDeptID": data[0].HDeptID == undefined ? 0 : data[0].HDeptID, |
| | | // "HDeptName": data[0].加工车间, |
| | | |
| | | // "HSourceID": data[0].HSourceID, |
| | | // "HSourceName": data[0].生产资源, |
| | | |
| | | // "HEquipID": data[0].HEquipID, |
| | | // "HEquipName": data[0].设备名称, |
| | | |
| | | // "HICMOInterID": data[0].hicmointerid, |
| | | // "HICMOEntryID": data[0].HICMOEntryID, |
| | | // "HICMOBillNo": data[0].任务单号, |
| | | |
| | | // "HProcExchInterID": data[0].hmainid, |
| | | // "HProcExchEntryID": data[0].HEntryID, |
| | | // "HProcExchBillNo": data[0].单据号, |
| | | |
| | | // "HMainSourceInterID": data[0].hmainid, |
| | | // "HMainSourceEntryID": data[0].HEntryID, |
| | | // "HMainSourceBillNo": data[0].单据号, |
| | | // "HMainSourceBillType": data[0].单据类型, |
| | | |
| | | // "HMouldName": data[0].模具名称, |
| | | // "HMouldID": data[0].HMouldID |
| | | // }) |
| | | |
| | | this.HTechParams = data |
| | | } else { |
| | | CommonUtils.showTips({ |
| | |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | }, |
| | | onLoad(e) { |
| | | let { |
| | | HEquipID |
| | | } = e |
| | | this.loadBillMain(HEquipID) |
| | | this.HEquipID = HEquipID |
| | | }, |
| | | onShow() { |
| | | // 初始化定时器 定时访问设备工艺参数 |
| | | timerManager.createTimer(this.HTimerID, () => { |
| | | this.loadBillMain(this.HEquipID, false) |
| | | }, 60000, 'interval') |
| | | }, |
| | | beforeDestroy() { |
| | | timerManager.clearAllTimers() |
| | | }, |
| | | onUnload() { |
| | | timerManager.clearAllTimers(); |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <style lang="scss"> |
| | | .row-head { |
| | | border-radius: 10rpx 10rpx 0 0; |
| | | background-color: rgb(229, 236, 243); |
| | | padding: 0 12rpx; |
| | | background-color: rgb(0, 125, 255); |
| | | color: rgb(255, 255, 255); |
| | | font-weight: bold; |
| | | padding: 12rpx 16rpx; |
| | | font-family: "PingFang SC", "Microsoft YaHei", sans-serifs; |
| | | } |
| | | |
| | |
| | | height: inherit; |
| | | padding: 1rpx; |
| | | justify-content: center; |
| | | color: rgba(124, 124, 124, 1.0); |
| | | color: rgba(51, 51, 51, 1.0); |
| | | font-family: "PingFang SC", "Microsoft YaHei", sans-serifs; |
| | | } |
| | | </style> |
| | |
| | | this.hform.HErrMsgBackTypeID = LoadData.HErrMsgBackTypeID |
| | | this.hform.HErrMsgBackTypeName = LoadData.异常类型名称 |
| | | this.hform.HSendMan = LoadData.发送人 |
| | | this.hform.HReceiveMan = LoadData.指派处理人 |
| | | this.hform.HReceiveMan = getUserInfo()["HEmpName"] || LoadData.指派处理人 |
| | | this.hform.HCopyMan = LoadData.抄送 |
| | | this.hform.HLevel = LoadData.紧急程度 |
| | | this.hform.HContext = LoadData.主题 |
| | |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">处理原因:</view> |
| | | <view class="title"><text>*</text>处理原因:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHBadReasonName" placeholder="请选择处理原因" v-model="hform.HBadReasonName" |
| | | @input="HBadReasonNameChange"></uni-combox> |
| | |
| | | this.hform.HErrMsgBackTypeID = LoadData.HErrMsgBackTypeID |
| | | this.hform.HErrMsgBackTypeName = LoadData.异常类型名称 |
| | | this.hform.HSendMan = LoadData.发送人 |
| | | this.hform.HReceiveMan = LoadData.指派处理人 |
| | | this.hform.HReceiveMan = getUserInfo()["HEmpName"] || LoadData.指派处理人 |
| | | this.hform.HCopyMan = LoadData.抄送 |
| | | this.hform.HLevel = LoadData.紧急程度 |
| | | this.hform.HContext = LoadData.主题 |
| | |
| | | this.hform.HErrMsgBackBillNo = LoadData.单据号 |
| | | this.hform.HErrMsgBackInterID = LoadData.HInterID |
| | | this.hform.HErrMsgBackEntryID = LoadData.HEntryID |
| | | this.hform.HHandleEmpID = LoadData.HHandleEmpID |
| | | this.hform.HHandleEmpName = LoadData.指派处理人 |
| | | this.hform.HHandleEmpID = getUserInfo()["HEmpID"] || LoadData.HHandleEmpID |
| | | this.hform.HHandleEmpName = getUserInfo()["HEmpName"] || LoadData.指派处理人 |
| | | } else if (num == 2) { |
| | | // 异常反馈接收单 |
| | | this.hform.HDeptID = LoadData.HDeptID |
| | |
| | | title: '请选择接收人', |
| | | icon: 'none' |
| | | }) |
| | | } else { |
| | | } |
| | | else if(!this.hform.HBadReasonName){ |
| | | uni.showToast({ |
| | | title: '请选择处理原因', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | else { |
| | | uni.showLoading({ |
| | | title: '请稍候' |
| | | }) |
| | |
| | | this.hform.HErrMsgBackTypeID = LoadData.HErrMsgBackTypeID |
| | | this.hform.HErrMsgBackTypeName = LoadData.异常类型名称 |
| | | this.hform.HSendMan = LoadData.发送人 |
| | | this.hform.HReceiveMan = LoadData.指派处理人 |
| | | this.hform.HReceiveMan = getUserInfo()["HEmpName"] || LoadData.指派处理人 |
| | | this.hform.HCopyMan = LoadData.抄送 |
| | | this.hform.HLevel = LoadData.紧急程度 |
| | | this.hform.HContext = LoadData.主题 |
| | |
| | | this.hform.HErrMsgBackBillNo = LoadData.单据号 |
| | | this.hform.HErrMsgBackInterID = LoadData.HInterID |
| | | this.hform.HErrMsgBackEntryID = LoadData.HEntryID |
| | | this.hform.HSignEmpID = LoadData.HHandleEmpID |
| | | this.hform.HSignEmpName = LoadData.指派处理人 |
| | | this.hform.HSignEmpID = getUserInfo()["HEmpID"] || LoadData.HHandleEmpID |
| | | this.hform.HSignEmpName = getUserInfo()["HEmpName"] || LoadData.指派处理人 |
| | | } else if (num == 2) { |
| | | // 异常反馈接收单 |
| | | this.hform.HDeptID = LoadData.HDeptID |
| | |
| | | this.tabs[0].pageMeta.total = data.h_p_OA_ErrMsgBackSelfQuery_APP.length |
| | | this.tabs[0].count = data.h_p_OA_ErrMsgBackSelfQuery_APP.length |
| | | } |
| | | |
| | | if (data && data.h_p_OA_ErrMsgBackSelfQuery_APP_Role) { |
| | | // 更新待签到页签 |
| | | this.tabs[0].listData = data.h_p_OA_ErrMsgBackSelfQuery_APP_Role |
| | | this.tabs[0].pageMeta.total = data.h_p_OA_ErrMsgBackSelfQuery_APP_Role.length |
| | | this.tabs[0].count = data.h_p_OA_ErrMsgBackSelfQuery_APP_Role.length |
| | | } |
| | | |
| | | if (data && data.h_p_OA_ErrMsgBackSelfQuery_APP1) { |
| | | // 更新待处理页签 |
| | |
| | | this.tabs[1].pageMeta.total = data.h_p_OA_ErrMsgBackSelfQuery_APP1.length |
| | | this.tabs[1].count = data.h_p_OA_ErrMsgBackSelfQuery_APP1.length |
| | | } |
| | | |
| | | if (data && data.h_p_OA_ErrMsgBackSelfQuery_APP_Role1) { |
| | | // 更新待处理页签 |
| | | this.tabs[1].listData = data.h_p_OA_ErrMsgBackSelfQuery_APP_Role1 |
| | | this.tabs[1].pageMeta.total = data.h_p_OA_ErrMsgBackSelfQuery_APP_Role1.length |
| | | this.tabs[1].count = data.h_p_OA_ErrMsgBackSelfQuery_APP_Role1.length |
| | | } |
| | | |
| | | if (data && data.h_p_OA_ErrMsgBackSelfQuery_APP2) { |
| | | if (data && data.h_p_OA_ErrMsgBackSelfQuery_APP_Role2) { |
| | | // 更新待验收页签 |
| | | this.tabs[2].listData = data.h_p_OA_ErrMsgBackSelfQuery_APP2 |
| | | this.tabs[2].pageMeta.total = data.h_p_OA_ErrMsgBackSelfQuery_APP2.length |
| | | this.tabs[2].count = data.h_p_OA_ErrMsgBackSelfQuery_APP2.length |
| | | this.tabs[2].listData = data.h_p_OA_ErrMsgBackSelfQuery_APP_Role2 |
| | | this.tabs[2].pageMeta.total = data.h_p_OA_ErrMsgBackSelfQuery_APP_Role2.length |
| | | this.tabs[2].count = data.h_p_OA_ErrMsgBackSelfQuery_APP_Role2.length |
| | | } |
| | | |
| | | if (data && data.h_p_OA_ErrMsgBackSelfQuery_APP2) { |
| | | // 更新待验收页签 |
| | | this.tabs[2].listData = data.h_p_OA_ErrMsgBackSelfQuery_APP2 |
| | | this.tabs[2].pageMeta.total = data.h_p_OA_ErrMsgBackSelfQuery_APP2.length |
| | | this.tabs[2].count = data.h_p_OA_ErrMsgBackSelfQuery_APP2.length |
| | | } |
| | | |
| | | if (data && data.h_p_OA_ErrMsgBackSelfQuery_APP3) { |
| | | // 更新全部单据页签 |
| | |
| | | this.tabs[3].pageMeta.total = data.h_p_OA_ErrMsgBackSelfQuery_APP3.length |
| | | this.tabs[3].count = data.h_p_OA_ErrMsgBackSelfQuery_APP3.length |
| | | } |
| | | |
| | | if (data && data.h_p_OA_ErrMsgBackSelfQuery_APP_Role3) { |
| | | // 更新全部单据页签 |
| | | this.tabs[3].listData = data.h_p_OA_ErrMsgBackSelfQuery_APP_Role3 |
| | | this.tabs[3].pageMeta.total = data.h_p_OA_ErrMsgBackSelfQuery_APP_Role3.length |
| | | this.tabs[3].count = data.h_p_OA_ErrMsgBackSelfQuery_APP_Role3.length |
| | | } |
| | | |
| | | uni.stopPullDownRefresh() |
| | | } |
| | |
| | | return |
| | | } |
| | | const currentUser = getUserInfo()["Czymc"]; |
| | | if (item.发送人 !== currentUser) { |
| | | uni.showToast({ |
| | | title: '当前单据发送人与登录用户不一致,不允许下推验收单', |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | // if (item.发送人 !== currentUser) { |
| | | // uni.showToast({ |
| | | // title: '当前单据发送人与登录用户不一致,不允许下推验收单', |
| | | // icon: 'none' |
| | | // }) |
| | | // return |
| | | // } |
| | | console.log('下推验收单:', item) |
| | | this.needRefresh = true // 设置刷新标记 |
| | | uni.navigateTo({ |
| | |
| | | </template> |
| | | <template v-else> |
| | | <view class="over" v-if="!readCompelete">正在获取数据...</view> |
| | | <view class="over" v-if="readCompelete">数据已读完...</view> |
| | | <view class="over" v-if="readCompelete">没有更多数据...</view> |
| | | </template> |
| | | </view> |
| | | </template> |
| | |
| | | // 触底加载 |
| | | onReachBottom() { |
| | | this.page++; |
| | | this.onSearchClickHandler() |
| | | this.switchTab(this.tabs) |
| | | }, |
| | | methods: { |
| | | onDateRangePickerChangeHandler({ |
| | |
| | | } |
| | | }, |
| | | onSearchClickHandler() { |
| | | this.BillsDisplay = [] |
| | | this.switchTab(this.tabs) |
| | | }, |
| | | onResetClickHandler() { |
| | |
| | | this.enableCustomDateRange = false, |
| | | this.startDate = dayjs(new Date()).subtract(7, 'day').format('YYYY-MM-DD'), |
| | | this.endDate = dayjs(new Date()).format('YYYY-MM-DD'), |
| | | this.getWorkLinkList() |
| | | this.onSearchClickHandler() |
| | | }, |
| | | switchTab(tabIndex) { |
| | | if(tabIndex == this.tabs){ |
| | |
| | | this.sWhere += |
| | | ` and 日期 >= CONVERT(VARCHAR(10), '${this.startDate}', 23) and 日期 <= CONVERT(VARCHAR(10), '${this.endDate}', 23)` |
| | | try { |
| | | |
| | | // TODO: 调整为存储过程分页接口 |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: 'Sc_MESTransFerWorkBill/GetOA_WorkLinkBillList', |
| | | url: 'Sc_MESTransFerWorkBill/GetOA_WorkLinkBillListProcess', |
| | | data: { |
| | | sWhere: this.sWhere, |
| | | user: getUserInfo()["Czymc"], |
| | | // sWhere: this.sWhere, |
| | | beginDate: this.startDate, |
| | | endDate: this.endDate, |
| | | type: this.tabs + 1, |
| | | user: getUserInfo()["HEmpName"] || getUserInfo()["Czymc"], |
| | | page: this.page, |
| | | size: this.size |
| | | } |
| | |
| | | } = res.data |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | |
| | | if(data.length == 0) { |
| | | // 当获取的数据长度为0时,表示预先增加的页数不对,需要减去 |
| | | if(this.page > 1) { |
| | | this.page-- |
| | | } |
| | | } |
| | | if(data.length == 0 || data.length <= this.size) { |
| | | this.readCompelete = true |
| | | } |
| | | this.BillsDisplay.push(...data) |
| | | |
| | | |
| | |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.switchTab(this.tabs) |
| | | this.onSearchClickHandler() |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.switchTab(0) |
| | | this.onSearchClickHandler() |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <view class="form-item"> |
| | | <view class="left">判断结论</view> |
| | | <view class="right none-border"> |
| | | <radio-group @changer="checkResultChange"> |
| | | <radio-group @change.stop="checkResultChange"> |
| | | <label> |
| | | <radio value="0" :checked="hform.HCheckerResult" /><text></text> |
| | | 合格 |
| | |
| | | } |
| | | return ""; |
| | | }, |
| | | checkResultChange(event) { |
| | | console.log("event: ", event); |
| | | checkResultChange({detail: {value}}) { |
| | | if(value == 1) { |
| | | this.hform.HLastResult = false |
| | | }else { |
| | | this.hform.HLastResult = true |
| | | } |
| | | }, |
| | | // 检验项目新增行 |
| | | addCheckItem(resource) { |
| | |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | // 判断 最后结果为不合格的情况下,检验项目中是否有不合格项 |
| | | if(this.hform.HLastResult == 0 || this.hform.HLastResult == false){ |
| | | let count = 0 |
| | | for (let key in this.checkItems) { |
| | | if (this.checkItems.hasOwnProperty(key)) { |
| | | let element = this.checkItems[key]; |
| | | if(element.HResult == 0){ |
| | | count ++ |
| | | } |
| | | |
| | | } |
| | | } |
| | | if(count == 0) { |
| | | CommonUtils.showTips({ |
| | | message: "判断结论为不合格,检验项目中不存在不合格单据,提交失败!", |
| | | }); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | for (let key in this.checkItems) { |
| | | if (!this.checkItems[key].HQCCheckItemID) { |
| | |
| | | <view class="form-item"> |
| | | <view class="left">判断结论</view> |
| | | <view class="right none-border"> |
| | | <radio-group @changer="checkResultChange"> |
| | | <radio-group @change.stop="checkResultChange"> |
| | | <label> |
| | | <radio value="0" :checked="hform.HLastResult" /><text></text> |
| | | 合格 |
| | |
| | | } |
| | | return ""; |
| | | }, |
| | | checkResultChange(event) { |
| | | console.log("event: ", event); |
| | | checkResultChange({detail: {value}}) { |
| | | if(value == 1) { |
| | | this.hform.HLastResult = false |
| | | }else { |
| | | this.hform.HLastResult = true |
| | | } |
| | | }, |
| | | // 检验项目新增行 |
| | | addCheckItem(resource) { |
| | |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | // 判断 最后结果为不合格的情况下,检验项目中是否有不合格项 |
| | | if(this.hform.HLastResult == 0 || this.hform.HLastResult == false){ |
| | | let count = 0 |
| | | for (let key in this.checkItems) { |
| | | if (this.checkItems.hasOwnProperty(key)) { |
| | | let element = this.checkItems[key]; |
| | | if(element.HResult == 0){ |
| | | count ++ |
| | | } |
| | | |
| | | } |
| | | } |
| | | if(count == 0) { |
| | | CommonUtils.showTips({ |
| | | message: "判断结论为不合格,检验项目中不存在不合格单据,提交失败!", |
| | | }); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | for (let key in this.checkItems) { |
| | | if (!this.checkItems[key].HQCCheckItemID) { |
| | |
| | | this.checkItems[key].HUnitID = 0; |
| | | } |
| | | } |
| | | |
| | | |
| | | return false |
| | | |
| | | return true; |
| | | }, |
| | |
| | | <view class="form-item"> |
| | | <view class="left">判断结论</view> |
| | | <view class="right none-border"> |
| | | <radio-group @changer="checkResultChange"> |
| | | <radio-group @change.stop="checkResultChange"> |
| | | <label> |
| | | <radio value="0" :checked="hform.HLastResult" /><text></text> |
| | | 合格 |
| | |
| | | } |
| | | return ""; |
| | | }, |
| | | checkResultChange(event) { |
| | | console.log("event: ", event); |
| | | checkResultChange({detail: {value}}) { |
| | | if(value == 1) { |
| | | this.hform.HLastResult = false |
| | | }else { |
| | | this.hform.HLastResult = true |
| | | } |
| | | }, |
| | | // 检验项目新增行 |
| | | addCheckItem(resource) { |
| | |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | // 判断 最后结果为不合格的情况下,检验项目中是否有不合格项 |
| | | if(this.hform.HLastResult == 0 || this.hform.HLastResult == false){ |
| | | let count = 0 |
| | | for (let key in this.checkItems) { |
| | | if (this.checkItems.hasOwnProperty(key)) { |
| | | let element = this.checkItems[key]; |
| | | if(element.HResult == 0){ |
| | | count ++ |
| | | } |
| | | |
| | | } |
| | | } |
| | | if(count == 0) { |
| | | CommonUtils.showTips({ |
| | | message: "判断结论为不合格,检验项目中不存在不合格单据,提交失败!", |
| | | }); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | for (let key in this.checkItems) { |
| | | if (!this.checkItems[key].HQCCheckItemID) { |
| | |
| | | <!-- <view class="title">条码:</view> --> |
| | | <view class="title">{{ $t(`Gy.HBarCode`) == "Gy.HBarCode"?"条码": $t(`Gy.HBarCode`) }}:</view> |
| | | <view class="right" style="width: 380rpx;"> |
| | | <input :focus="barCodeFocus" v-model="hform.HBarCode" placeholder="请扫描(或输入)条码" |
| | | <input :focus="barCodeFocus" v-model="hform.HBarCode" :placeholder="$t(`Gy.HBarCode_Placeholder`)" |
| | | @confirm="getCode(hform.HBarCode)" /> |
| | | </view> |
| | | <uni-icons type="scan" |
| | |
| | | <view class="form-item"> |
| | | <view class="title">{{ $t(`Gy.HQty`) == "Gy.HQty"?"数量": $t(`Gy.HQty`) }}:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HQty" placeholder="请输入数量" /> |
| | | <input v-model="hform.HQty" :placeholder="$t(`Gy.HQty_Placeholder`)" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">{{ $t(`Gy.HWHName`) == "Gy.HWHName"?"仓库": $t(`Gy.HWHName`) }}:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请选择仓库" v-model="hform.HWHName" |
| | | <uni-combox :candidates="arrayHWHName" :placeholder="$t(`Gy.HWHName_Placeholder`)" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | |
| | | {{ $t(`Gy.HStockPlaceName`) == "Gy.HStockPlaceName"?"仓位": $t(`Gy.HStockPlaceName`) }}: |
| | | </view> |
| | | <view class="right" v-show="true"> |
| | | <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="请输入(或扫描)仓位" |
| | | <uni-combox :candidates="arrayHStockPlaceNameComputed" :placeholder="$t(`Gy.HStockPlaceName_Placeholder`)" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange" |
| | | @confirm="HStockPlaceNameScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="false"><input v-model="hform.HStockPlaceName" placeholder="不可操作" |
| | | <view class="righton" v-show="false"><input v-model="hform.HStockPlaceName" :placeholder="$t(`Gy.OperationDisabled`)" |
| | | :disabled="!showHStockPlaceName" /></view> |
| | | </view> |
| | | |
| | |
| | | <picker :range="arrayHMainSourceBillType" v-model="HMainSourceBillType" |
| | | @change="HMainSourceBillTypeChange"> |
| | | <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType" |
| | | placeholder="请选择源单类型" /> |
| | | :placeholder="$t(`Gy.HMainSourceBillType_Placeholder`)" /> |
| | | <view class="picker-overlay"></view> |
| | | </picker> |
| | | </view> |
| | | <view class="righton" v-show="!showHMainSourceBillType"> |
| | | <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType" |
| | | placeholder="请选择源单类型" /> |
| | | :placeholder="$t(`HMainSourceBillType_Placeholder`)" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | |
| | | <!-- <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="请输入源单单号" /> |
| | | v-model="hform.HSourceBillNo" @confirm="onSourceBillBlurHandler" :placeholder="$t(`Gy.HMainSourceBillNo_Placeholder`)" /> |
| | | |
| | | </view> |
| | | <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1"> |
| | |
| | | |
| | | |
| | | <view class="righton" v-show="!showHSourceBillNo"> |
| | | <input name="HSourceBillNo" disabled v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | <input name="HSourceBillNo" disabled v-model="hform.HSourceBillNo" :placeholder="$t(`Gy.HMainSourceBillNo_Placeholder`)" /> |
| | | </view> |
| | | <!-- <view class="right" v-show="showHSourceBillNo"> |
| | | <uni-combox ref="uniComboxSourceBill" :isFocus="HSourceBillNoFocus" |
| | |
| | | <view class="title">{{ $t(`Gy.HDate`) == "Gy.HDate"?"日期": $t(`Gy.HDate`) }}:</view> |
| | | <view class="right"> |
| | | <picker mode="date" v-model="hform.HDate" @change="HDateChange"> |
| | | <input disabled v-model="hform.HDate" placeholder="请选择日期" /> |
| | | <input disabled v-model="hform.HDate" :placeholder="$t(`Gy.HDate_Placeholder`)" /> |
| | | <view class="picker-overlay"></view> |
| | | </picker> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据ID:</view> |
| | | <view class="title">{{$t("Gy.HInterID")}}:</view> |
| | | <view class="righton"> |
| | | <input name="HInterID" disabled v-model="hform.HInterID" /> |
| | | </view> |
| | |
| | | |
| | | <view v-if="tabs == 1"> |
| | | <view class="form-item"> |
| | | <view class="title">保管:</view> |
| | | <view class="title">{{$t("Gy.HKeeperName")}}:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请选择保管员" v-model="hform.HKeeperName" |
| | | <uni-combox :candidates="arrayHEmpName" :placeholder="$t('Gy.HKeeperName_Placeholder')" v-model="hform.HKeeperName" |
| | | @input="HKeeperNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">验收:</view> |
| | | <view class="title">{{$t("Gy.HSecManagerName")}}:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请选择验收员" v-model="hform.HSecManagerName" |
| | | <uni-combox :candidates="arrayHEmpName" :placeholder="$t('Gy.HSecManagerName_Placeholder')" v-model="hform.HSecManagerName" |
| | | @input="HSecManagerNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">部门:</view> |
| | | <view class="title">{{$t("Gy.HDeptName")}}:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHDeptName" placeholder="请选择部门" v-model="hform.HDeptName" |
| | | <uni-combox :candidates="arrayHDeptName" :placeholder="$t('Gy.HDeptName_Placeholder')" v-model="hform.HDeptName" |
| | | @input="HDeptNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">供应商:</view> |
| | | <view class="title">{{$t("Gy.HSupName")}}:</view> |
| | | <!-- <view class="right" v-show="showHSupName"> |
| | | <uni-combox :candidates="arrayHSupName" placeholder="请选择供应商" v-model="hform.HSupName" |
| | | @input="HSupNameChange"></uni-combox> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">组织:</view> |
| | | <view class="title">{{$t("Gy.HStockOrgName")}}:</view> |
| | | <view class="righton"> |
| | | <input name="HStockOrgName" disabled v-model="hform.HStockOrgName" /> |
| | | </view> |
| | |
| | | <uni-card :title="item.物料名称" style="margin: 10px;" @tap="delMater(item, $event)"> |
| | | <!-- 物料代码作为可点击链接 --> |
| | | <view class="card-header" @tap.stop="gotoInventoryQuery(item.物料代码)"> |
| | | <text class="link-text">物料代码:{{item.物料代码}}</text> |
| | | <text class="link-text">{{$t(`${HModName}.物料代码`)}}:{{item.物料代码}}</text> |
| | | </view> |
| | | |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>源单单号:</text>{{item.源单单号}} |
| | | <text>{{$t(`${HModName}.源单单号`)}}:</text>{{item.源单单号}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>源单数量:</text>{{item.源单数量}} |
| | | <text>{{$t(`${HModName}.源单数量`)}}:</text>{{item.源单数量}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>数量:</text>{{item.数量}} |
| | | <text>{{$t(`${HModName}.数量`)}}:</text>{{item.数量}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>条码个数:</text>{{item.条码个数}} |
| | | <text>{{$t(`${HModName}.条码个数`)}}:</text>{{item.条码个数}} |
| | | </view> |
| | | <view class="detail" v-if="item.规格型号"> |
| | | <text>规格型号:</text>{{item.规格型号}} |
| | | <text>{{$t(`${HModName}.规格型号`)}}:</text>{{item.规格型号}} |
| | | </view> |
| | | <view class="detail" v-if="item.辅助属性"> |
| | | <text>辅助属性:</text>{{item.辅助属性}} |
| | | <text>{{$t(`${HModName}.辅助属性`)}}:</text>{{item.辅助属性}} |
| | | </view> |
| | | <view class="detail" v-if="item.款号"> |
| | | <text>款号:</text>{{item.款号}} |
| | | <text>{{$t(`${HModName}.款号`)}}:</text>{{item.款号}} |
| | | </view> |
| | | <view class="detail" v-if="item.合计数量"> |
| | | <text>合计数量:</text>{{item.合计数量}} |
| | | <text>{{$t(`${HModName}.合计数量`)}}:</text>{{item.合计数量}} |
| | | </view> |
| | | <view class="detail" v-if="item.单价"> |
| | | <text>单价:</text>{{item.单价}} |
| | | <text>{{$t(`${HModName}.单价`)}}:</text>{{item.单价}} |
| | | </view> |
| | | <view class="detail" v-if="materMeta[0].HWHName && /兴达/.test(hform.HStockOrgName)"> |
| | | <text>仓库:</text>{{materMeta[0].HWHName}} |
| | | <text>{{$t(`${HModName}.仓库`)}}:</text>{{materMeta[0].HWHName}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | |
| | | |
| | | <view v-if="tabs == 3"> |
| | | <view class="form-item"> |
| | | <view class="title">条码:</view> |
| | | <view class="title">{{$t("Gy.HBarCode_B")}}:</view> |
| | | <view class="righton"> |
| | | <input name="HBarCode_B" disabled v-model="hform.HBarCode_B" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">物料:</view> |
| | | <view class="title">{{$t("Gy.HMaterName_B")}}:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HMaterName_B" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">规格:</view> |
| | | <view class="title">{{$t("Gy.HMaterModel_B")}}:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HMaterModel_B" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">批次:</view> |
| | | <view class="title">{{$t("Gy.HBatchNo_B")}}:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HBatchNo_B" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单位:</view> |
| | | <view class="title">{{$t("Gy.HUnitName_B")}}:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HUnitName_B" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">数量:</view> |
| | | <view class="title">{{$t("Gy.HQty_B")}}:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HQty_B" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">容量:</view> |
| | | <view class="title">{{$t("Gy.HTMQty_B")}}:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HTMQty_B" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓库:</view> |
| | | <view class="title">{{$t("Gy.HWHName_B")}}:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HWHName_B" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="title">{{$t("Gy.HSPName_B")}}:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HSPName_B" /> |
| | | </view> |
| | |
| | | </view> |
| | | |
| | | <view class="bottom-btn"> |
| | | <button class="btn-a" size="mini" @tap="submit">提交</button> |
| | | <button class="btn-a" size="mini" @tap="submit">{{$t("Gy.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> |
| | | <button class="btn-a" size="mini" @tap="addNew">{{$t("Gy.addNew")}}</button> |
| | | <button class="btn-c" size="mini" @tap="goBack">{{$t("Gy.goBack")}}</button> |
| | | </view> |
| | | </view> |
| | | <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType" |
| | |
| | | } from "@/utils/userRelationManager.js" |
| | | import BillListPopupVue from '../../components/BillListPopup/BillListPopup.vue'; |
| | | import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue"; |
| | | import { MpaasScan } from '../../utils/mpaasScan'; |
| | | import { |
| | | MpaasScan |
| | | } from '../../utils/mpaasScan'; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | } = res.data |
| | | if (count == 1) { |
| | | // console.log('data: ', data); |
| | | if(data.length == 0){ |
| | | // 数据库中没有配置,默认使用本地 |
| | | return |
| | | } |
| | | this.arrayHMainSourceBillType = [] |
| | | this.arrayHMainSourceBillValue = [] |
| | | Array.from(data).forEach(e => { |
| | |
| | | this.arrayHMainSourceBillValue.push(e['HSourceBillType']) |
| | | }) |
| | | |
| | | this.arrayHMainSourceBillType.push('手工录入') |
| | | this.arrayHMainSourceBillValue.push('-1') |
| | | let trans = (this.$t(`${this.HModName}.HSourceBillType2`)).split("@") |
| | | console.log('trans: ',trans); |
| | | this.arrayHMainSourceBillType.push(trans[0]) |
| | | this.arrayHMainSourceBillValue.push(trans[1]) |
| | | |
| | | this.HMainSourceBillType = this.arrayHMainSourceBillType[0] |
| | | this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[0] |
| | | } else { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: Message |
| | | }) |
| | | // 数据库中没有配置,则使用本地的配置 |
| | | for(let i = 0;i<this.HMainSourceBillType; i++) { |
| | | let transed = this.$t(`${this.HModName}.HSourceBillType${i}`).split("@") |
| | | this.arrayHMainSourceBillType.push(transed[0]) |
| | | this.arrayHMainSourceBillValue.push(transed[1]) |
| | | } |
| | | } |
| | | } |
| | | }) |
| | |
| | | "杭州凯贝奈特": 'http://192.168.50.253:8080/API/', |
| | | "杭州凯贝奈特外网": 'http://erp.hzcabinet.cn:9090/API/', |
| | | "翁涛涛本地测试": 'http://localhost:81/API/', |
| | | "陈镐哲本地测试": 'http://192.168.0.101:81/API/', |
| | | "陈镐哲本地测试": 'http://192.168.0.174:81/API/', |
| | | "陈镐哲本地测试2": 'http://192.168.88.82:81/API/', |
| | | "张瑞广本地测试": 'http://localhost:8082/API/', |
| | | "余思杰本地测试": 'http://localhost:8082/LuBaoAPI/', |
| | |
| | | "余姚华远": "http://192.168.3.248:82/HuaYuaAPI/", |
| | | //天擎航天 |
| | | "天擎航天": "http://space-engine.com.cn:81/API/", |
| | | //添康科技 |
| | | "添康科技": "http://61.164.219.166:12137/APPAPI/" |
| | | |
| | | }, |
| | | serverUrlName: uni.getStorageSync('serverUrlName'), |
| | | |
| | |
| | | <view class="graph"><l-echart ref="chartRef1" @finished="initHistogram1"></l-echart></view> |
| | | <view class="graph"><l-echart ref="chartRef2" @finished="initLineChart"></l-echart></view> |
| | | <view class="graph"><l-echart ref="chartRef3" @finished="initStatistics"></l-echart></view> |
| | | <view class="graph"><l-echart ref="chartRef4" @finished="initHistogram4"></l-echart></view> |
| | | <view class="graph" style="display: none;"><l-echart ref="chartRef4" @finished="initHistogram4"></l-echart> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="operation-zone" @click="doOperation"> |
| | |
| | | getUserInfo |
| | | } from "@/utils/auth.js"; |
| | | import * as echarts from "echarts" |
| | | import timerManager from "@/utils/timer"; |
| | | import timer from "@/utils/timer"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | HTimerID: 'shebeiyunxingzhuangtai', |
| | | HEquipID: 0, |
| | | HICMOInterID: 0, |
| | | HICMOEntryID: 0, |
| | | HSourceID: 0, |
| | | |
| | | userInfo: getUserInfo(), |
| | | organInfo: { |
| | | id: uni.getStorageSync("OrganizationID") || "", |
| | |
| | | // 默认的option结构 |
| | | var option = { |
| | | title: { |
| | | text: '近七天产能', // 默认标题为空 |
| | | text: '近七天产能', |
| | | left: 'center', |
| | | top: '10%', // 调整标题位置,放到最上面 |
| | | top: '8%', |
| | | textStyle: { |
| | | fontSize: 18, |
| | | color: '#ff0000' |
| | | } |
| | | }, |
| | | grid: { |
| | | top: '25%', // 调整grid的top值,给标题留出空间 |
| | | bottom: '20%', |
| | | left: '10%', |
| | | right: '10%' |
| | | top: '25%', |
| | | bottom: '25%', |
| | | left: '15%', |
| | | right: '10%', |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: [] // 默认x轴数据为空 |
| | | data: [], |
| | | axisLabel: { |
| | | interval: 0, |
| | | rotate: 45, |
| | | fontSize: 12, |
| | | formatter: function(value) { |
| | | return value.length > 8 ? value.slice(0, 8) + '...' : value; |
| | | } |
| | | }, |
| | | axisLine: { |
| | | show: true |
| | | }, |
| | | axisTick: { |
| | | show: true |
| | | } |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | type: 'value', |
| | | axisLabel: { |
| | | fontSize: 12, |
| | | margin: 15, |
| | | formatter: function(value) { |
| | | if (value < 1000) { |
| | | // 小于1000,显示原始数字(百位数不变) |
| | | return value; |
| | | } else if (value < 10000) { |
| | | // 1000-9999,显示X千(保留1位小数,去掉末尾.0) |
| | | let thousand = (value / 1000).toFixed(1); |
| | | return thousand.replace('.0', '') + '千'; |
| | | } else { |
| | | // 大于等于10000,显示X万(保留1位小数,去掉末尾.0) |
| | | let tenThousand = (value / 10000).toFixed(1); |
| | | return tenThousand.replace('.0', '') + '万'; |
| | | } |
| | | } |
| | | }, |
| | | splitNumber: 6, |
| | | axisLine: { |
| | | show: true |
| | | }, |
| | | axisTick: { |
| | | show: true |
| | | }, |
| | | // 可选:强制Y轴刻度从0开始,避免数值挤压 |
| | | min: 0 |
| | | }, |
| | | series: [{ |
| | | data: [], // 默认series数据为空 |
| | | type: 'bar' |
| | | }], |
| | | data: [], |
| | | type: 'bar', |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | fontSize: 12, // 统一标签字体 |
| | | formatter: function(params) { |
| | | return echarts.format.addCommas(params.value); |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: '#15b1fa' |
| | | } |
| | | }] |
| | | }; |
| | | |
| | | // 如果有数据,更新option的内容 |
| | |
| | | this.HEquipID |
| | | }); |
| | | break; |
| | | // 导航到设备工艺参数 |
| | | // 导航到设备工艺参数 |
| | | case "equipTechParam": |
| | | uni.navigateTo({ |
| | | url: "/pages/MJGL/Sc_EquipTechParamQuery/Sc_EquipTechParamQuery?HEquipID=" + |
| | |
| | | } |
| | | } |
| | | }, |
| | | async getDiagram(HDeptID, HSourceID,HEquipID) { |
| | | async getDiagram(HDeptID, HSourceID, HEquipID, showLoading = true) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Sc_HEquipStateDistribution/Get_EquipStateDistribution_FourReport", |
| | |
| | | "HEquipID": HEquipID |
| | | }, |
| | | user: getUserInfo()["Czymc"], |
| | | OrganizationID: this.organInfo.id |
| | | OrganizationID: this.organInfo.id, |
| | | showLoading |
| | | } |
| | | }) |
| | | |
| | |
| | | this.HEquipID = HEquipID |
| | | this.HICMOInterID = HICMOInterID |
| | | this.HICMOEntryID = HICMOEntryID |
| | | this.HDeptID = HDeptID; |
| | | this.HSourceID = HSourceID; |
| | | this.HEquipID = HEquipID; |
| | | |
| | | await this.getDiagram(HDeptID, HSourceID, HEquipID) |
| | | timerManager.createTimer(this.HTimerID, |
| | | async () => { |
| | | await this.getDiagram(HDeptID, HSourceID, HEquipID, false) |
| | | }, |
| | | 60000, 'interval' |
| | | ) |
| | | }, |
| | | beforeDestroy() { |
| | | timerManager.clearAllTimers() |
| | | }, |
| | | onUnload() { |
| | | timerManager.clearAllTimers() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | <view class="detail" v-if="item['OEE']"> |
| | | <text>OEE:</text>{{item['OEE']}} |
| | | </view> |
| | | <view class="detail"> |
| | | <button class="btn-a" size="mini" @tap.stop="toTechparam(item)">工艺参数</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | toTechparam(item) { |
| | | uni.navigateTo({ |
| | | url: `/pages/MJGL/Sc_EquipTechParamQuery/Sc_EquipTechParamQuery?HEquipID=${item['设备id']}` |
| | | }) |
| | | }, |
| | | async DepartmentChange(e) { |
| | | let index = e.detail.value |
| | | this.selectedDepartment = this.departmentsTitles[index] |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .btn-a { |
| | | background-color: #3A78FF; |
| | | color: #fff; |
| | | margin: 0; |
| | | padding: 0 8rpx; |
| | | } |
| | | </style> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view v-if="tabs == 4"> |
| | | <FIFOListComponentVue :FIFOList="HFIFOList"></FIFOListComponentVue> |
| | | </view> |
| | |
| | | HTMQty_B: '', |
| | | HWHName_B: '', |
| | | HSPName_B: '', |
| | | HInterID_B: 0, // 条码自增列 |
| | | }, |
| | | |
| | | HFIFOList: [], // 先进先出列表缓存 |
| | |
| | | uni.$off('BillSelectComplete') |
| | | }, |
| | | methods: { |
| | | // 通过条码明细中的内容 更新本单据条码数量 |
| | | async changeQty() { |
| | | let HBarCodeOld = this.hform.HBarCode_B |
| | | let HQtyOld = this.hform.HQty_B |
| | | this.hform.HBarCode = `*${this.hform.HBarCode_B}` |
| | | // 先删除 |
| | | await this.getCode(`*${this.hform.HBarCode_B}`) |
| | | // 再录入 |
| | | this.hform.HBarCode = HBarCodeOld |
| | | this.hform.HQty = HQtyOld |
| | | await this.getCode(this.hform.HBarCode_B) |
| | | this.hform.HQty = '' |
| | | this.hform.HBarCode = '' |
| | | |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/WEBSController/set_UpdatePonderationBillMain_Temp_BarCode_Json', |
| | | data: { |
| | | HInterID: this.hform.HInterID, |
| | | HBillType: this.hform.HBillType, |
| | | HItemID: this.hform.HInterID_B, // 条码自增列 |
| | | HBarCode: HBarCodeOld, |
| | | HQty: HQtyOld |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | Message, |
| | | count |
| | | } = res.data |
| | | |
| | | if (count == 1) { |
| | | this.DisBillEntryList() |
| | | this.tabs = 2 |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `更新条码数量失败: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `更新条码数量失败: ${err}` |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | // 获取仓位 |
| | | async getStockPlaceRemote(HSPGroupID) { |
| | |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | |
| | | if (res.data.count == 1) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | |
| | | this.hform.HStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HWHID = res.data.data[0].HWHID |
| | |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | // uni.request({ |
| | | // url: this.serverUrl + '/WEBSController/get_BillBarCode_BillCheck_Json', |
| | | // data: { |
| | | // HBillNo: this.hform.HBillNo, |
| | | // HBillType: this.hform.HBillType, |
| | | // HMaker: this.hform.HMaker, |
| | | // HStockOrgID: this.hform.HStockOrgID |
| | | // }, |
| | | // success: (res) => { |
| | | // if (res.data.count == 1) { |
| | | // CommonUtils.playSound(1) |
| | | // var data = res.data.data |
| | | // console.log(data) |
| | | // this.hform.HInterID = data.hInterIDField |
| | | // this.hform.HBillNo = data.hBillNoField |
| | | // this.showHBillNo = false |
| | | // //条码核对标记 |
| | | // if (data.hSourceBarCodeFlagField) { |
| | | // this.hform.HSourceBarCodeCtl = "Y" |
| | | // this.hform.chkHBarflag = true |
| | | // this.hform.HBarflag = data |
| | | // } |
| | | // this.tabs = 2 |
| | | // this.DisBillEntryList(); |
| | | // this.refreshHBarCodeFocus() |
| | | // } else { |
| | | // CommonUtils.playSound(0) |
| | | // this.refreshHBillNoFocus() |
| | | // uni.showToast({ |
| | | // title: res.data.Message, |
| | | // icon: 'none' |
| | | // }) |
| | | // this.hform.HBillNo = '' |
| | | // } |
| | | // }, |
| | | // fail: (res) => { |
| | | // console.log(res); |
| | | // CommonUtils.playSound(0) |
| | | // this.refreshHBillNoFocus() |
| | | // uni.showToast({ |
| | | // title: '接口请求失败', |
| | | // icon: 'none' |
| | | // }) |
| | | // }, |
| | | // }); |
| | | }, |
| | | //基础仓库资料 |
| | | getHBaseList() { |
| | |
| | | // var name = e.split("(") |
| | | for (var i = 0; i < this.HWHNameList.length; i++) { |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | this.HStockPlaceNameChange(null) |
| | | this.showHStockPlaceName = false |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"]) |
| | | } |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | this.HStockPlaceNameChange(null) |
| | | this.showHStockPlaceName = false |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | HStockPlaceNameChange(e) { |
| | | for (var i = 0; i < this.HStockPlaceNameList.length; i++) { |
| | | if (this.HStockPlaceNameList[i].仓位名称 == e) { |
| | | console.log('e: ',this.HStockPlaceNameList[i]); |
| | | console.log('e: ', this.HStockPlaceNameList[i]); |
| | | this.hform.HStockPlaceName = this.HStockPlaceNameList[i].仓位名称 |
| | | this.hform.HStockPlaceID = this.HStockPlaceNameList[i].HMainID |
| | | } |
| | |
| | | if (!this.hform.HStockPlaceName) { |
| | | this.hform.HStockPlaceID = 0 |
| | | } |
| | | |
| | | console.log('HBarCode: ',HBarCode); |
| | | |
| | | console.log('HBarCode: ', HBarCode); |
| | | var sOldBarCode = HBarCode |
| | | var HDeleteFlag = sOldBarCode.substring(0, 1); |
| | | var sBarCode = sOldBarCode.slice(1); |
| | |
| | | }) |
| | | |
| | | } |
| | | if(exit){ |
| | | if (exit) { |
| | | return |
| | | } |
| | | |
| | | |
| | | if (!this.hform.HSourceBillNo) { |
| | | this.hform.HSupName = data.hSupNameField |
| | | this.hform.HSupID = data.hSupIDField |
| | |
| | | this.hform.HTMQty_B = '' |
| | | this.hform.HWHName_B = '' |
| | | this.hform.HSPName_B = '' |
| | | this.hform.HInterID_B = 0 |
| | | } else { |
| | | this.hform.HBarCode_B = data.BarCodeDetailslist[0].HBarCode |
| | | this.hform.HMaterName_B = data.BarCodeDetailslist[0].HMaterName |
| | |
| | | this.hform.HTMQty_B = data.BarCodeDetailslist[0].HTMQty |
| | | this.hform.HWHName_B = data.BarCodeDetailslist[0].HWHName |
| | | this.hform.HSPName_B = data.BarCodeDetailslist[0].HSPName |
| | | this.hform.HInterID_B = data.BarCodeDetailslist[0].HItemID |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | |
| | | margin-top: 30rpx; |
| | | float: right; |
| | | } |
| | | |
| | | .btn-a { |
| | | background-color: #3A78FF; |
| | | color: #fff; |
| | |
| | | }) |
| | | }) |
| | | } |
| | | //没有添加锁的异步查询 |
| | | //没有添加锁的异步查询 |
| | | async doRequest2Async({ |
| | | url, |
| | | data, |
| | | method, |
| | | showLoading = true, |
| | | }) { |
| | | return new Promise((resolve, reject) => { |
| | | // that = that || this; |
| | | let errorTip = null; |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }) |
| | | if (showLoading) { |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }) |
| | | } |
| | | |
| | | uni.request({ |
| | | method: method || "GET", |
| | | url: this.serverUrl + url, |
| | |
| | | reject(err) |
| | | }, |
| | | complete: () => { |
| | | uni.hideLoading() |
| | | if (showLoading) { |
| | | uni.hideLoading() |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | |
| | | console.log('播放暂停,销毁'); |
| | | innerAudioContext.destroy(); |
| | | }); |
| | | |
| | | |
| | | } |
| | | // playSound(e) { |
| | | // // 全局维护一个音频实例,防止缓存溢出 |
| | |
| | | return handler(key, match); |
| | | }); |
| | | } |
| | | |
| | | fieldListFilterRole({FieldList, ExcludeKeys = [] ,RoleList = null}) { |
| | | if(!RoleList) { |
| | | |
| | | fieldListFilterRole({ |
| | | FieldList, |
| | | ExcludeKeys = [], |
| | | RoleList = null |
| | | }) { |
| | | if (!RoleList) { |
| | | RoleList = [ |
| | | /^[a-zA-Z]+$/, |
| | | /id$/i |
| | | ] |
| | | } |
| | | if(!Array.isArray(RoleList)){ |
| | | if (!Array.isArray(RoleList)) { |
| | | return { |
| | | status: false, |
| | | data: null, |
| | | Message: "过滤字段列表失败,规则必须是数组。" |
| | | } |
| | | } |
| | | |
| | | |
| | | let FieldListCache = Array(...FieldList) |
| | | |
| | | |
| | | RoleList.forEach(role => { |
| | | FieldListCache = FieldListCache.filter(elem => !role.test(elem.ColmCols)) |
| | | }) |
| | | |
| | | |
| | | FieldListCache = FieldListCache.filter(elem => !ExcludeKeys.includes(elem.ColmCols)) |
| | | return { |
| | | status: true, |
| | |
| | | Message: "" |
| | | } |
| | | } |
| | | |
| | | emptyValueFilter(item, fieldList){ |
| | | |
| | | emptyValueFilter(item, fieldList) { |
| | | return fieldList.filter(e => { |
| | | return item[e.ColmCols] |
| | | }) |
| | | } |
| | | |
| | | httpFormatWs(httpUrl=this.serverUrl) { |
| | | if(httpUrl.indexOf("http://") === 0){ |
| | | |
| | | httpFormatWs(httpUrl = this.serverUrl) { |
| | | if (httpUrl.indexOf("http://") === 0) { |
| | | httpUrl = httpUrl.replace("http://", "") |
| | | httpUrl = httpUrl.substring(0, httpUrl.length - 1) |
| | | let BackSlashLast = httpUrl.lastIndexOf('/') |
| | | httpUrl = httpUrl.substring(0, BackSlashLast) |
| | | httpUrl = "ws://" + httpUrl.split(":")[0]+":12345/ws" |
| | | }else if(httpUrl.indexOf("https://") === 0) { |
| | | httpUrl = "ws://" + httpUrl.split(":")[0] + ":12345/ws" |
| | | } else if (httpUrl.indexOf("https://") === 0) { |
| | | httpUrl = httpUrl.replace("https://", "") |
| | | httpUrl = httpUrl.substring(0, httpUrl.length - 1) |
| | | let BackSlashLast = httpUrl.lastIndexOf('/') |
| | | httpUrl = httpUrl.substring(0, BackSlashLast) |
| | | httpUrl = "wss://" + httpUrl.split(":")[0]+":12345/ws" |
| | | }else{ |
| | | httpUrl = "wss://" + httpUrl.split(":")[0] + ":12345/ws" |
| | | } else { |
| | | // 提示传入连接错误 |
| | | } |
| | | |
| | | |
| | | return httpUrl |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | export const CommonUtils = new commonUtils() |
| | |
| | | // }) |
| | | resolve(data) |
| | | } else { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | Message: Message |
| | | }) |
| | | // uni.showToast({ |
| | | // icon: 'none', |
| | | // Message: Message |
| | | // }) |
| | | reject() |
| | | } |
| | | } |
| New file |
| | |
| | | class TimerManager { |
| | | constructor() { |
| | | this.timers = new Map(); // 存储定时器:key=自定义标识,value={id, type, callback, interval, isPaused: false} |
| | | } |
| | | |
| | | /** |
| | | * 创建定时器 |
| | | * @param {String} key 定时器唯一标识(如:'countdown') |
| | | * @param {Function} callback 执行的业务函数 |
| | | * @param {Number} interval 执行间隔(ms) |
| | | * @param {String} type 类型:interval(重复)/ timeout(单次) |
| | | * @returns {void} |
| | | */ |
| | | createTimer(key, callback, interval = 1000, type = 'interval') { |
| | | // 先清除同名定时器,避免重复创建 |
| | | this.clearTimer(key); |
| | | |
| | | let timerId = null; |
| | | const timerConfig = { |
| | | id: null, |
| | | type, |
| | | callback, |
| | | interval, |
| | | isPaused: false |
| | | }; |
| | | |
| | | if (type === 'interval') { |
| | | timerId = setInterval(() => { |
| | | // 暂停状态不执行 |
| | | if (!timerConfig.isPaused) { |
| | | callback(); |
| | | } |
| | | }, interval); |
| | | } else if (type === 'timeout') { |
| | | timerId = setTimeout(() => { |
| | | if (!timerConfig.isPaused) { |
| | | callback(); |
| | | this.clearTimer(key); // 单次执行后自动清除 |
| | | } |
| | | }, interval); |
| | | } |
| | | |
| | | timerConfig.id = timerId; |
| | | this.timers.set(key, timerConfig); |
| | | } |
| | | |
| | | /** |
| | | * 暂停定时器 |
| | | * @param {String} key 定时器标识 |
| | | */ |
| | | pauseTimer(key) { |
| | | const timer = this.timers.get(key); |
| | | if (timer) { |
| | | timer.isPaused = true; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 恢复定时器 |
| | | * @param {String} key 定时器标识 |
| | | */ |
| | | resumeTimer(key) { |
| | | const timer = this.timers.get(key); |
| | | if (timer) { |
| | | timer.isPaused = false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 清除单个定时器 |
| | | * @param {String} key 定时器标识 |
| | | */ |
| | | clearTimer(key) { |
| | | const timer = this.timers.get(key); |
| | | if (timer) { |
| | | if (timer.type === 'interval') { |
| | | clearInterval(timer.id); |
| | | } else if (timer.type === 'timeout') { |
| | | clearTimeout(timer.id); |
| | | } |
| | | this.timers.delete(key); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 清除所有定时器(页面销毁时调用) |
| | | */ |
| | | clearAllTimers() { |
| | | this.timers.forEach((timer) => { |
| | | if (timer.type === 'interval') { |
| | | clearInterval(timer.id); |
| | | } else if (timer.type === 'timeout') { |
| | | clearTimeout(timer.id); |
| | | } |
| | | }); |
| | | this.timers.clear(); |
| | | } |
| | | } |
| | | |
| | | // 导出单例 |
| | | export default new TimerManager(); |