| File was renamed from pages/qijvguzhangdengji/mouldMistakeBill.vue |
| | |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | </view> |
| | | </view> |
| | | <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> |
| | | <BillListPopupMouldVue @BillSelectComplete="MouldBillHandler" ref="billListMould"></BillListPopupMouldVue> |
| | | </view> |
| | | </template> |
| | | <script> |
| | |
| | | } from "@/utils/auth.js"; |
| | | import { |
| | | CommonUtils |
| | | } from '../../utils/common'; |
| | | import { |
| | | getUserStockRelation |
| | | } from '../../utils/userRelationManager'; |
| | | import BillListPopupVue from '../../components/BillListPopup/BillListPopup.vue'; |
| | | import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue"; |
| | | import BillSelectPopupXiaoWeiVue from '../../components/BillSelectPopupXiaoWei/BillSelectPopupXiaoWei.vue'; |
| | | import BillListPopupMouldVue from '../../components/BillListPopup/BillListPopup_Mould.vue'; |
| | | } from '../../../utils/common'; |
| | | import dayjs from 'dayjs'; |
| | | import { MpaasScan } from '../../utils/mpaasScan'; |
| | | import { MpaasScan } from '../../../utils/mpaasScan'; |
| | | export default { |
| | | components: { |
| | | BillListPopupVue, |
| | | BarCodePopupVue, |
| | | BillSelectPopupXiaoWeiVue, |
| | | BillListPopupMouldVue, |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | HSourceBillNoFocus: false, |
| | |
| | | this.OperationType = e.OperationType |
| | | if (e.HInterID) { |
| | | this.HInterID_Temp = e.HInterID |
| | | // this.btnType = 1 |
| | | this.RoadBillMain(e.HInterID) |
| | | this.barCodeFocus = true |
| | | } else { |
| | |
| | | } |
| | | |
| | | }, |
| | | //物料信息 |
| | | DisBillEntryList() { |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/GetBillEntryTmpList_Json', |
| | | data: { |
| | | HInterID: this.hform.HInterID, |
| | | HBillNo: this.hform.HBillNo, |
| | | HBillType: this.hform.HBillType, |
| | | HStockOrgID: this.hform.HStockOrgID |
| | | }, |
| | | success: (res) => { |
| | | console.log('物料', res.data) |
| | | if (res.data.count == 1) { |
| | | var data = res.data.data |
| | | this.materMeta = data.BarCodeDetailslist |
| | | this.Materlist = data.Materlist |
| | | if (/兴达/.test(uni.getStorageSync("Organization"))) { |
| | | // 兴达客户 带出 仓库 |
| | | console.log("兴达带出默认仓库") |
| | | this.HWHNameChange(data.BarCodeDetailslist[0].HWHName) |
| | | } |
| | | |
| | | |
| | | if (!data.BarCodeDetailslist[0].HBarCode) { |
| | | this.hform.HMaterName_B = '' |
| | | this.hform.HMaterModel_B = '' |
| | | this.hform.HBatchNo_B = '' |
| | | this.hform.HUnitName_B = '' |
| | | this.hform.HQty_B = '' |
| | | this.hform.HTMQty_B = '' |
| | | this.hform.HWHName_B = '' |
| | | this.hform.HSPName_B = '' |
| | | } else { |
| | | this.hform.HMaterName_B = data.BarCodeDetailslist[0].HMaterName |
| | | this.hform.HMaterModel_B = data.BarCodeDetailslist[0].HMaterModel |
| | | this.hform.HBatchNo_B = data.BarCodeDetailslist[0].HBatchNo |
| | | this.hform.HUnitName_B = data.BarCodeDetailslist[0].HUnitName |
| | | this.hform.HQty_B = data.BarCodeDetailslist[0].HQty |
| | | this.hform.HTMQty_B = data.BarCodeDetailslist[0].HTMQty |
| | | this.hform.HWHName_B = data.BarCodeDetailslist[0].HWHName |
| | | this.hform.HSPName_B = data.BarCodeDetailslist[0].HSPName |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | //删除物料码 |
| | | delMater(item) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要删除 " ' + item.物料名称 + ' " 所有扫码记录?删除后将不可恢复!', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | uni.request({ |
| | | url: this.serverUrl + |
| | | '/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json', |
| | | data: { |
| | | HInterID: this.hform.HInterID, |
| | | HMaterID: item.HMaterID, |
| | | HAuxPropID: item.HAuxPropID, |
| | | HMTONo: item.HMTONo, |
| | | HSourceInterID: item.HSourceInterID, |
| | | HSourceEntryID: item.HSourceEntryID, |
| | | HBillType: this.hform.HBillType |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.DisBillEntryList() |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 新增回调 |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: '/pages/qijvguzhangdengji/mouldMistakeBill?OperationType=1' |
| | | url: '/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill?OperationType=1' |
| | | }) |
| | | }, |
| | | //新增 |
| | |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | //修改回填数据 |
| | | RoadBillMain(HInterID) { |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/GetSourceBill_Temp_Json', |
| | | data: { |
| | | HInterID: HInterID, |
| | | HBillType: this.hform.HBillType |
| | | }, |
| | | success: (res) => { |
| | | console.log(33, res.data.data[0]); |
| | | if (res.data.count == 1) { |
| | | var data = res.data.data[0] |
| | | this.hform.HInterID = data.HInterID |
| | | this.hform.HBillNo = data.HBillNo |
| | | this.hform.HMainSourceBillType = data.HSourceBillType |
| | | this.hform.HSourceBillNo = data.HSourceBillNo |
| | | if (data.HSourceBillType == 1105) { |
| | | this.hform.HMainSourceBillType = 1105 |
| | | this.HMainSourceBillType = '退料通知单' |
| | | this.showHSupName = false |
| | | } else if (data.HSourceBillType == 1102) { |
| | | this.hform.HMainSourceBillType = 1102 |
| | | this.HMainSourceBillType = '采购订单' |
| | | this.showHSupName = false |
| | | } else if (data.HSourceBillType == 1201) { |
| | | this.hform.HMainSourceBillType = 1201 |
| | | this.HMainSourceBillType = '采购入库单' |
| | | this.showHSupName = false |
| | | } else { |
| | | this.hform.HMainSourceBillType = -1 |
| | | this.HMainSourceBillType = '手工录入' |
| | | } |
| | | this.showHMainSourceBillType = false |
| | | |
| | | //非多源单模式 |
| | | if (data.HMulSourceBill == 0) { |
| | | this.showHSourceBillNo = false |
| | | } |
| | | this.hform.HDeptID = data.HDeptID |
| | | this.hform.HDeptName = data.HDeptName |
| | | this.hform.HSupID = data.HCusID |
| | | this.hform.HSupName = data.HSupName |
| | | this.DisBillEntryList() |
| | | this.tabs = 2 |
| | | } else { |
| | | uni.showToast({ |
| | | title: '获取数据回填失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | }, |
| | | checkBillValidate() { |
| | | let message = '' |
| | | |
| | |
| | | } else if (!this.hform.HEmpName) { |
| | | message = '未填写发现人' |
| | | } |
| | | // else if (!this.hform.HManagerName) { |
| | | // message = '未填写负责人' |
| | | // } |
| | | |
| | | if (!message) { |
| | | return true |
| | | } |
| | |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/qijvguzhangdengji/mouldMistakeBill?OperationType=1' |
| | | url: '/pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBill?OperationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | // setTimeout(() => { |
| | | // uni.navigateBack(); |
| | | // }, 50) |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |