Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
# Conflicts:
# pages/qitachuku_v2/form.vue
| | |
| | | this.getEditData(e.linterid, e.HBillNo) |
| | | } else { |
| | | this.getNewData() |
| | | if(e.HBarCode){ |
| | | this.hform.HBarCode=e.HBarCode |
| | | setTimeout(() => { |
| | | this.toInCode(e); |
| | | }, 1000) |
| | | } |
| | | |
| | | } |
| | | this.getHMaterList() |
| | | this.getHProcList() |
| | |
| | | this.getHCenterList() |
| | | |
| | | this.getDefValByUser() |
| | | |
| | | }, |
| | | methods: { |
| | | //选中全部文本 |
| | |
| | | } else { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | content: res.data.Message + '。是否继续新增下一道工序?(点击取消返回新增页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/gongxuOut/form?OperationType=1' |
| | | }) |
| | | this.getNextProc() |
| | | // uni.redirectTo({ |
| | | // url: '/pages/gongxuOut/form?OperationType=1' |
| | | // }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | // setTimeout(() => { |
| | | // uni.navigateBack(); |
| | | // }, 50) |
| | | uni.redirectTo({ |
| | | url: '/pages/gongxuOut/form?OperationType=1' |
| | | }) |
| | | } |
| | | } |
| | | }); |
| | |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | getNextProc(){ |
| | | uni.request({ |
| | | url: this.serverUrl + '/LEMS/MES_Sc_ProcessExchangeBillQuerySub_Json', |
| | | method: 'GET', |
| | | dataType: "json", |
| | | data: { |
| | | sWhere:this.hform.HProcExchHinteID |
| | | }, |
| | | success: (res) => { |
| | | console.log(1, res); |
| | | if (res.data.count == 1) { |
| | | let processList = res.data.data |
| | | |
| | | // 1. 先过滤出 HSEQNumber === 'N' 的数据 |
| | | processList = processList.filter(item => item.HSEQNumber === this.hform.HSEQNumber); |
| | | |
| | | //当前工序编号 |
| | | const currentIndex = processList.findIndex(item => item["工序号"] === this.hform.HProcNo); |
| | | // 获取下一个工序(如果存在) |
| | | const nextProcess = currentIndex !== -1 && currentIndex < processList.length - 1 |
| | | ? processList[currentIndex + 1] : null; |
| | | if(!nextProcess){ |
| | | uni.showToast({ |
| | | title: '没有下一道工序即将跳转新增页面', |
| | | icon: 'none' |
| | | }) |
| | | uni.redirectTo({ |
| | | url: '/pages/gongxuOut/form?OperationType=1' |
| | | }) |
| | | }else{ |
| | | this.hform.HProcNo=nextProcess["工序号"]; |
| | | const HNextBarCode = this.hform.HBarCode+"@"+this.hform.HProcNo+"@"+this.hform.HSEQNumber |
| | | uni.redirectTo({ |
| | | url: '/pages/gongxuOut/form?OperationType=1&HBarCode='+HNextBarCode |
| | | }) |
| | | } |
| | | }else{ |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取下一道工序失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | OperationType: 1, |
| | | HInterID_Temp: '', |
| | | |
| | | HSourceFlag: false, |
| | | |
| | | showHStockPlaceName: false, |
| | | showHMainSourceBillType: true, |
| | | showHSourceBillNo: true, |
| | |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | var data = res.data.data |
| | | this.HSourceFlag = true |
| | | console.log(2, data); |
| | | this.hform.SourceFlag = true |
| | | this.hform.HSupName = data.hSupNameField |
| | |
| | | var sHQty = this.hform.HQty |
| | | var sSourceBillNo = this.hform.HSourceBillNo |
| | | var sSourceBillType = this.hform.HMainSourceBillType |
| | | |
| | | // var HSourceFlag = this.hform.HSourceBillNo == '' ? false : true |
| | | console.log(this.hform.HSourceBillNo, this.hform.SourceFlag) |
| | | if (HDeleteFlag == "*") { |
| | |
| | | HSPID: sHSPID, |
| | | HQty: sHQty, |
| | | HRedBlueFlag: this.hform.HRedBlueFlag, |
| | | // SourceFlag: HSourceFlag, |
| | | SourceFlag: this.hform.SourceFlag, |
| | | HSourceBillNo: sSourceBillNo, |
| | | HSourceBillType: sSourceBillType, |
| | |
| | | this.hform.HDeptID = data.hDeptIDField |
| | | this.tabs = 1 |
| | | } else if (data.hBarTypeField == '源单条码') { |
| | | this.HSourceFlag = true |
| | | this.hform.HSupName = data.hSupNameField |
| | | this.hform.HSupID = data.hSupIDField |
| | | if (data.hDeptIDField != 0) { |
| | |
| | | this.tabs = 2 |
| | | } else { //物料条码 |
| | | this.tabs = 2 |
| | | this.HSourceFlag = true |
| | | if (!this.hform.HSourceBillNo) { |
| | | this.hform.SourceFlag = true |
| | | this.hform.HSupName = data.hSupNameField |
| | |
| | | this.DisBillEntryList() |
| | | //清空数量 |
| | | this.hform.HQty = '' |
| | | this.refreshBarCodeState() |
| | | this.refreshBarCodeState() |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | |
| | | }, |
| | | //新增 |
| | | getNewData() { |
| | | this.HSourceFlag = false |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/GetMaxBillNoAndID_Json', |
| | | data: { |
| | |
| | | }, |
| | | //修改回填数据 |
| | | RoadBillMain(HInterID) { |
| | | this.HSourceFlag = true |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/GetSourceBill_Temp_Json', |
| | | data: { |
| | |
| | | }, |
| | | //扫描单据号条码 |
| | | GetMeesageByBillNo(e) { |
| | | if(this.hform.HBillNo==""||this.hform.HBillNo==undefined){ |
| | | return |
| | | } |
| | | if (this.hform.HBillNo == "" || this.hform.HBillNo == undefined) { |
| | | return |
| | | } |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/get_BillBarCode_BillCheck_Json', |
| | | data: { |
| | |
| | | }, |
| | | //扫条码处理 |
| | | getCode(HBarCode) { |
| | | if(HBarCode==undefined||HBarCode==""){ |
| | | return |
| | | } |
| | | if (HBarCode == undefined || HBarCode == "") { |
| | | return |
| | | } |
| | | //仓库、仓位文本框为空时,清空对应ID |
| | | if (!this.hform.HWHName) { |
| | | this.hform.HWHID = 0 |
| | |
| | | arrayHOrgName: [], // 组织 |
| | | arrayHOrgValue: [], // 组织对应ID |
| | | arrayHWHInName: [], // 调入仓库 |
| | | HHWHInNameList: [], |
| | | HWHInNameList: [], |
| | | arrayHStockPlaceInName: [], //调入仓位 |
| | | HStockPlaceInNameList: [], |
| | | |
| | |
| | | this.getNewData() |
| | | } |
| | | |
| | | this.getHWarehouseInList() |
| | | //this.getHWarehouseInList() |
| | | // this.getHBaseList() |
| | | this.getHSupList() |
| | | this.getHEmpList() |
| | |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HWHNameList = res.data.data |
| | | this.HWHInNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHWHName[i] = res.data.data[i].仓库名称 |
| | | this.arrayHWHInName[i] = res.data.data[i].仓库名称 |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | |
| | | |
| | | this.arrayHMainSourceBillType.push('手工录入') |
| | | this.arrayHMainSourceBillValue.push('-1') |
| | | |
| | | //如果手工录入不用选择源单 |
| | | if(this.arrayHMainSourceBillType[0]=='手工录入'){ |
| | | this.tabs=1 |
| | | } |
| | | |
| | | this.HMainSourceBillType = this.arrayHMainSourceBillType[0] |
| | | this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[0] |
| | | } else { |