| | |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | tabs: 0, |
| | | urls: '/Web/GetEquipmentBillsList', |
| | | MvarReportTitle: '设备点检记录单缓存', |
| | | MvarReportTitle: '设备点检记录单列表', |
| | | hform: { |
| | | HBillNo: '', |
| | | HSourceBillNo: '', |
| | |
| | | } |
| | | }, |
| | | onShow() { |
| | | //用户模块权限判断 |
| | | this.CheckModRight() |
| | | this.changeTab(0) |
| | | console.log(this.userInfo, uni.getStorageSync('HUserName')) |
| | | }, |
| | |
| | | await this.$nextTick() |
| | | this.$refs.barcodePopup.open() |
| | | }, |
| | | CheckModRight() { |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/CheckModRight_Json', |
| | | data: { |
| | | ModRightName: 'CE_OtherOut', |
| | | HUserName: uni.getStorageSync('HUserName') |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) {} else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | onPaginationChangeHandler({ |
| | | current |
| | | }) { |
| | |
| | | if (this.tabs == 0) { |
| | | this.urls = '/Web/GetEquipmentBillsList' |
| | | } |
| | | // if (this.tabs == 1) { |
| | | // this.urls = '/WEBSController/GetKf_ICStockBillQueryList_User_Json' |
| | | // } |
| | | this.search() |
| | | }, |
| | | async getList() { |
| | |
| | | url: '/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill?operationType=1' |
| | | }) |
| | | }, |
| | | //编辑 |
| | | edit(item) { |
| | | console.log(item) |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/TempList_Modify_Json', |
| | | data: { |
| | | "HInterID": item.HInterID, |
| | | "HBillNo": item.单据号, |
| | | "HBillType": this.hform.HBillType |
| | | }, |
| | | success: (res) => { |
| | | console.log(1, res); |
| | | if (res.data.count == 1) { |
| | | uni.navigateTo({ |
| | | url: './OtherOutBill?OperationType=2&HInterID=' + item.HInterID |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | //删除 |
| | | del(item) { |
| | | // console.log(item.hmainid,uni.getStorageSync('HUserName')) |
| | |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | //撤销 |
| | | revoke(item) { |
| | | // console.log(item.hmainid,uni.getStorageSync('HUserName')) |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '是否确认撤销', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.request({ |
| | | url: this.serverUrl + |
| | | '/WEBSController/set_DeleteICStockBillAndWMS_Json', |
| | | data: { |
| | | HInterID: item.HInterID, |
| | | HBillNo: item.单据号, |
| | | HBillType: this.hform.HBillType, |
| | | HMaker: uni.getStorageSync('HUserName'), |
| | | MvarReportTitle: this.MvarReportTitle, |
| | | }, |
| | | success: (res) => { |
| | | console.log(1, res); |
| | | if (res.data.count == 1) { |
| | | this.clear() |
| | | } |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |