Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
# Conflicts:
# pages/index/tab3.vue
| | |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | // { |
| | | // "path": "pages/baogong/OA_ErrMsgBackBill", |
| | | // "style": { |
| | | // "navigationBarTitleText": "异常反馈单", |
| | | // "enablePullDownRefresh": false |
| | | // } |
| | | // }, |
| | | { |
| | | "path": "pages/baogong/OA_ErrMsgBackBill", |
| | | "style": { |
| | | "navigationBarTitleText": "异常反馈单", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBillList", |
| | | "style": { |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/weixiujilu/mouldRepairRecordBillList", |
| | | "path": "pages/MJGL/Sc_MouldRepairWorkBill/Sc_MouldRepairWorkBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具维修记录", |
| | | "navigationBarTitleText": "模具维修记录单列表", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/weixiujilu/mouldRepairRecordBill", |
| | | "path": "pages/MJGL/Sc_MouldRepairWorkBill/Sc_MouldRepairWorkBill", |
| | | "style": { |
| | | "navigationBarTitleText": "模具维修记录单" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/qijvguzhangdengji/mouldMistake", |
| | | "path": "pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBill", |
| | | "style": { |
| | | "navigationBarTitleText": "模具故障登记" |
| | | "navigationBarTitleText": "模具故障登记单" |
| | | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/qijvguzhangdengji/mouldMistakeBill", |
| | | "path": "pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具故障登记单" |
| | | "navigationBarTitleText": "模具故障登记单列表" |
| | | } |
| | | }, |
| | | { |
| | |
| | | "HMainSourceInterID": 0, |
| | | "HMainSourceEntryID": 0, |
| | | "HCheckResult": "OK", |
| | | "HEmpName": "", |
| | | "HEmpID": 0, |
| | | "HEmpName": getUserInfo().HEmpName, |
| | | "HEmpID": getUserInfo().HEmpID, |
| | | "HCheckBeginDate": dayjs(new Date()).format("YYYY-MM-DD"), |
| | | "HDeptName": "", |
| | | "HDeptID": 0, |
| | | "HDeptName": getUserInfo().HDeptName, |
| | | "HDeptID": getUserInfo().HDeptID, |
| | | "HMainSourceBillNo": "", |
| | | "HManagerName": "", |
| | | "HManagerID": 0, |
| | | "HManagerName": getUserInfo().HManagerName, |
| | | "HManagerID": getUserInfo().HManagerID, |
| | | "HMouldRepairWorkName": "", |
| | | "HMouldRepairWorkID": 0, |
| | | "HExplanation": "", |
| | |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: './Sb_MouldRepairCheckBill?operationType=1' |
| | | url: './Sc_MouldRepairCheckBill?operationType=1' |
| | | }) |
| | | }, |
| | | goBack() { |
| | |
| | | this.HCheckFileList[index]["HDotCheckResult"] = false |
| | | } else { |
| | | this.HCheckFileList[index]["HDotCheckResult"] = true |
| | | } |
| | | }, |
| | | uploadFile(index) { |
| | | console.log('filePath: ', this.attachmentInfo[index].filePath); |
| | | // 通过临时路径读取文件 |
| | | uni.uploadFile({ |
| | | url: CommonUtils.getServerUrl() + "/Sb_EquipDotCheckBill/UploadFile", |
| | | filePath: this.attachmentInfo[index].filePath, |
| | | name: 'file', |
| | | formData: { |
| | | HBillNo: this.hform.HBillNo, |
| | | HRemark: "", |
| | | HUserName: getUserInfo()["Czymc"] |
| | | }, |
| | | success: (uploadRes) => { |
| | | CommonUtils.showTips({ |
| | | message: "上传成功" |
| | | }) |
| | | this.attachmentInfo[index].status = "上传成功" |
| | | }, |
| | | fail: (err) => { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `上传失败: ${err}` |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | delFile(index) { |
| | | console.log('attachmentInfo: ', this.attachmentInfo[index]); |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要删除 " ' + this.attachmentInfo[index].fileName + ' " 删除后将不可恢复!', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | this.attachmentInfo.splice(index, 1) |
| | | } |
| | | }, |
| | | }) |
| | | |
| | | }, |
| | | handleUploadCallback(res) { // 文件上传回调 |
| | | console.log('file: ', res); |
| | | let fileInfo = res.data[0] |
| | | this.attachmentInfo.push({ |
| | | fileName: fileInfo.name, |
| | | size: fileInfo.size, |
| | | status: '等待上传', |
| | | filePath: fileInfo.tempFilePath |
| | | }) |
| | | }, |
| | | // 上传文件 |
| | | fileUpload() { |
| | | this.$refs.XeUpload.upload('file', {}); |
| | | }, |
| | | //获取班次数据 |
| | | async getShiftList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Web/GetGy_ShiftsList_Json', |
| | | data: { |
| | | Shifts: "", |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.HShiftsList = data |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | //获取使用部门数据 |
| | |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | async GetItemByEquipFile() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetItemByEquipFile", |
| | | data: { |
| | | "EquipProjectID": this.hform.HEquipID, |
| | | "Type": "DJ", |
| | | "HDate": this.hform.HBeginDate |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.hform.HEquipDotCheckRuleInterID = data[0].点检规程ID |
| | | this.hform.HEquipDotCheckRuleInterNo = data[0].点检规程单号 |
| | | this.hform.HPlanNo = data[0].点检计划单 |
| | | this.hform.HPlanInterID = (data[0].点检计划ID == null ? 0 : data[0].点检计划ID) == "" ? 0 : data[0] |
| | | .点检计划ID |
| | | this.hform.HPlanEntryID = (data[0].点检计划子ID == null ? 0 : data[0].点检计划子ID) == "" ? 0 : data[ |
| | | 0].点检计划子ID |
| | | |
| | | this.HCheckFileList = Array.from(data).map(item => { |
| | | return { |
| | | "HDotCheckItemID": item.HDotCheckItemID, |
| | | "HDotCheckCode": item.点检项目代码, |
| | | "HDotCheckItem": item.点检项目, |
| | | "HDotCheckPart": item.点检部位, |
| | | "HClaim": item.具体要求, |
| | | "HManagerID": item.负责人ID, |
| | | "HManagerCode": item.负责人代码, |
| | | "HManagerName": item.负责人名称, |
| | | "HSourceInterID": item.点检计划ID == null ? 0 : item.点检计划ID, |
| | | "HSourceEntryID": item.点检计划子ID == null ? 0 : item.点检计划子ID, |
| | | "HSourceBillNo": item.点检计划单, |
| | | "HDotCheckItemClassID": 0, |
| | | "HDotCheckItemClassName": "", |
| | | "HDotCheckItemMethodID": 0, |
| | | "HDotCheckItemMethodName": "", |
| | | "HDotCheckResult": item.默认结论 == 1 ? true : false |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取点检规程错误: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取点检规程错误: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | radioChange({ |
| | | detail: { |
| | | value |
| | |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | tabs: 0, |
| | | urls: '/Web/GetMouldBillsList', |
| | | 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/GetMouldBillsList' |
| | | } |
| | | // if (this.tabs == 1) { |
| | | // this.urls = '/WEBSController/GetKf_ICStockBillQueryList_User_Json' |
| | | // } |
| | | |
| | | this.search() |
| | | }, |
| | | async getList() { |
| | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取设备点检记录单失败: ${Message}` |
| | | message: `获取模具维修验收单失败: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取设备点检记录单失败: ${err}` |
| | | message: `获取模具维修验收单失败: ${err}` |
| | | }) |
| | | } |
| | | |
| | |
| | | }, |
| | | add() { |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/Sb_EquipRepariCheckBill/Sb_EquipRepariCheckBill?operationType=1' |
| | | url: '/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill?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> |
| | |
| | | HBillNo: "", |
| | | HInterID: 0, |
| | | HDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HDeptName: "", |
| | | HDeptID: 0, |
| | | HEmpName: "", |
| | | HEmpID: 0, |
| | | HManagerName: "", |
| | | HManagerID: 0, |
| | | HDeptName: getUserInfo().HDeptName, |
| | | HDeptID: getUserInfo().HDeptID, |
| | | HEmpName: getUserInfo().HEmpName, |
| | | HEmpID: getUserInfo().HEmpID, |
| | | HManagerName: getUserInfo().HManagerName, |
| | | HManagerID: getUserInfo().HManagerID, |
| | | HBarName: "", |
| | | HEquipID: 0, |
| | | HBarSpec: "", |
| | |
| | | HBillNo: "", |
| | | HInterID: 0, |
| | | HDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HDeptName: "", |
| | | HDeptID: 0, |
| | | HDeptName: getUserInfo().HDeptName, |
| | | HDeptID: getUserInfo().HDeptID, |
| | | HRemark: "", |
| | | HBarName: "", |
| | | HEquipID: 0, |
| | |
| | | async getShiftList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Web/GetGy_ShiftsList_Json', |
| | | url: '/Gy_ShiftsController/Get_Gy_WorkShiftList', |
| | | data: { |
| | | Shifts: "", |
| | | } |
| | | sWhere: ` and 禁用标记 = '' and ISNULL(审核人,'') != '' and 使用组织名称 = '${uni.getStorageSync("Organization")}'`, |
| | | HMaker: getUserInfo()["Czymc"], |
| | | }, |
| | | }) |
| | | |
| | | let { |
| | |
| | | return { |
| | | "HDotCheckItemID": item.HDotCheckItemID, |
| | | "HDotCheckCode": item.点检项目代码, |
| | | "HDotCheckItem": item.点检项目, |
| | | "HDotCheckItem": item.点检项目名称, |
| | | "HDotCheckPart": item.点检部位, |
| | | "HClaim": item.具体要求, |
| | | "HManagerID": item.负责人ID, |
| | |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | tabs: 0, |
| | | urls: '/Web/GetEquipmentBillsList', |
| | | MvarReportTitle: '设备点检记录单缓存', |
| | | MvarReportTitle: '设备点检记录单列表', |
| | | showmore: false, |
| | | hform: { |
| | | HBillNo: '', |
| | |
| | | } |
| | | }, |
| | | onShow() { |
| | | //用户模块权限判断 |
| | | this.CheckModRight() |
| | | this.changeTab(0) |
| | | console.log(this.userInfo, uni.getStorageSync('HUserName')) |
| | | }, |
| | |
| | | } |
| | | |
| | | } |
| | | }, |
| | | // onPullDownRefresh: function() { |
| | | // this.clear() |
| | | // setTimeout(() => { |
| | | // uni.stopPullDownRefresh(); |
| | | // }, 1000); |
| | | // }, |
| | | }, |
| | | onReady() { |
| | | this.getCalcHeight() |
| | | }, |
| | |
| | | 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() { |
| | |
| | | } |
| | | this.search() |
| | | }, |
| | | add() { |
| | | creat() { |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill?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' |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | //删除 |
| | |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | //撤销 |
| | | 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> |
| | |
| | | <template> |
| | | <view> |
| | | <view class="tabs" id="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">基本信息</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">明细信息</view> |
| | | <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">其他信息</view> |
| | | <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">附件信息</view> |
| | | </view> |
| | | <!-- 基本信息 --> |
| | | <template v-if="tabs == 0"> |
| | | <view class="form" :style="{ |
| | | <view> |
| | | <view class="tabs" id="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">基本信息</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">明细信息</view> |
| | | <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">其他信息</view> |
| | | <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">附件信息</view> |
| | | </view> |
| | | <!-- 基本信息 --> |
| | | <template v-if="tabs == 0"> |
| | | <view class="form" :style="{ |
| | | height: containerHeight + 'px', |
| | | overflow: 'auto' |
| | | }"> |
| | | <view class="form-item"> |
| | | <view class="title">设备条码:</view> |
| | | <view :class="enableEdit?'right':'righton'"> |
| | | <input :disabled="!enableEdit" v-model="hform.HBarCode" |
| | | @confirm="GetMessageByBarCode(hform.HBarCode)" placeholder="请输入(或扫描)设备条码" /> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <uni-icons type="scan" size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">保养开始:</view> |
| | | <view class="right"> |
| | | <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HBeginDate"> |
| | | <input :value="hform.HBeginDate" /> |
| | | </uni-datetime-picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">保养结束:</view> |
| | | <view class="right"> |
| | | <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HEndDate"> |
| | | <input :value="hform.HEndDate" /> |
| | | </uni-datetime-picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">最终结论:</view> |
| | | <view class="right none-border"> |
| | | <radio-group @change="radioChange" class="radio_Container"> |
| | | <label> |
| | | <view> |
| | | <radio value="OK" :checked="calcHLastResult == 'OK'" /> |
| | | <text>OK</text> |
| | | </view> |
| | | </label> |
| | | </label> |
| | | <view> |
| | | <radio value="NG" :checked="calcHLastResult == 'NG'" /> |
| | | <text>NG</text> |
| | | </view> |
| | | </label> |
| | | </radio-group> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">设备条码:</view> |
| | | <view :class="enableEdit?'right':'righton'"> |
| | | <input :disabled="!enableEdit" v-model="hform.HBarCode" |
| | | @confirm="GetMessageByBarCode(hform.HBarCode)" placeholder="请输入(或扫描)设备条码" /> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <uni-icons type="scan" size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">保养开始:</view> |
| | | <view class="right"> |
| | | <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HBeginDate"> |
| | | <input :value="hform.HBeginDate" /> |
| | | </uni-datetime-picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">保养结束:</view> |
| | | <view class="right"> |
| | | <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HEndDate"> |
| | | <input :value="hform.HEndDate" /> |
| | | </uni-datetime-picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">最终结论:</view> |
| | | <view class="right none-border"> |
| | | <radio-group @change="radioChange" class="radio_Container"> |
| | | <label> |
| | | <view> |
| | | <radio value="OK" :checked="calcHLastResult == 'OK'" /> |
| | | <text>OK</text> |
| | | </view> |
| | | </label> |
| | | </label> |
| | | <view> |
| | | <radio value="NG" :checked="calcHLastResult == 'NG'" /> |
| | | <text>NG</text> |
| | | </view> |
| | | </label> |
| | | </radio-group> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-item"> |
| | | <view class="title">单据号:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HBillNo" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据日期:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">部门:</view> |
| | | <zxz-uni-data-select class="right" :localdata="HDeptList" dataKey="部门名称" dataValue="HItemID" |
| | | v-model="hform.HDeptID"> |
| | | <view class="form-item"> |
| | | <view class="title">单据号:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HBillNo" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据日期:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">部门:</view> |
| | | <zxz-uni-data-select class="right" :localdata="HDeptList" dataKey="部门名称" dataValue="HItemID" |
| | | v-model="hform.HDeptID"> |
| | | |
| | | </zxz-uni-data-select> |
| | | <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">备注:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HRemark" placeholder="请输入备注" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">设备名称:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HBarName" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">设备规格:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HBarSpec" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">设备型号:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HBarModel" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">保养计划:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HPlanNo" disabled /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- 明细信息 --> |
| | | <template v-if="tabs == 1"> |
| | | <view :style="{ |
| | | </zxz-uni-data-select> |
| | | <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">备注:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HRemark" placeholder="请输入备注" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">设备名称:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HBarName" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">设备规格:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HBarSpec" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">设备型号:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HBarModel" disabled /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">保养计划:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HPlanNo" disabled /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- 明细信息 --> |
| | | <template v-if="tabs == 1"> |
| | | <view :style="{ |
| | | height: containerHeight + 'px', |
| | | overflow: 'auto' |
| | | }"> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="left"> |
| | | 设备保养规程 |
| | | </view> |
| | | <view class="right"> |
| | | <input type="text" :value="hform.HEquipMaintainRuleInterNo" /> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <uni-icons type="search" size="20" @click="toCheckFile"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="left"> |
| | | 设备保养规程 |
| | | </view> |
| | | <view class="right"> |
| | | <input type="text" :value="hform.HEquipMaintainRuleInterNo" /> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <uni-icons type="search" size="20" @click="toCheckFile"></uni-icons> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="list" v-for="(item,index) in HCheckFileList" :key="index"> |
| | | <uni-card style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>序号:</text>{{index+1}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>结果:</text> |
| | | <checkbox-group style="display: inline-block;" |
| | | @change="checkBoxChangeHandler(index, $event)"> |
| | | <checkbox value="enabled" :checked="item.HMaintainResult" /> |
| | | </checkbox-group> |
| | | </view> |
| | | <view class="detail"> |
| | | <text>保养项目:</text>{{item.HMaintainItem}} |
| | | </view> |
| | | <view class="detail" v-if="item.HMaintainPart"> |
| | | <text>保养部位:</text>{{item.HMaintainPart}} |
| | | </view> |
| | | <view class="detail" v-if="item.HClaim"> |
| | | <text>具体要求:</text>{{item.HClaim}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>负责人:</text>{{item.HManagerName}} |
| | | </view> |
| | | <view class="detail" v-if="item.Remark"> |
| | | <text>备注:</text>{{item.Remark}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="HCheckFileList.length == 0">暂无数据</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- 其他信息 --> |
| | | <template v-if="tabs == 2"> |
| | | <view class="form" :style="{ |
| | | <view class="list" v-for="(item,index) in HCheckFileList" :key="index"> |
| | | <uni-card style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>序号:</text>{{index+1}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>结果:</text> |
| | | <checkbox-group style="display: inline-block;" |
| | | @change="checkBoxChangeHandler(index, $event)"> |
| | | <checkbox value="enabled" :checked="item.HMaintainResult" /> |
| | | </checkbox-group> |
| | | </view> |
| | | <view class="detail"> |
| | | <text>保养项目:</text>{{item.HMaintainItem}} |
| | | </view> |
| | | <view class="detail" v-if="item.HMaintainPart"> |
| | | <text>保养部位:</text>{{item.HMaintainPart}} |
| | | </view> |
| | | <view class="detail" v-if="item.HClaim"> |
| | | <text>具体要求:</text>{{item.HClaim}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>负责人:</text>{{item.HManagerName}} |
| | | </view> |
| | | <view class="detail" v-if="item.Remark"> |
| | | <text>备注:</text>{{item.Remark}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="HCheckFileList.length == 0">暂无数据</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- 其他信息 --> |
| | | <template v-if="tabs == 2"> |
| | | <view class="form" :style="{ |
| | | height: containerHeight + 'px', |
| | | overflow: 'auto' |
| | | }"> |
| | | <view class="form-item"> |
| | | <view class="title">创建人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HMaker" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">创建日期:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HMakeDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">修改人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HUpDater" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">修改日期:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HUpDateDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">审核人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HChecker" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">审核时间:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HCheckDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">作废人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HDeleteMan" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">作废日期:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HDeleteDate" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">创建人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HMaker" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">创建日期:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HMakeDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">修改人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HUpDater" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">修改日期:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HUpDateDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">审核人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HChecker" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">审核时间:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HCheckDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">作废人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HDeleteMan" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">作废日期:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HDeleteDate" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </template> |
| | | <!-- 附件信息 --> |
| | | <template v-if="tabs == 3"> |
| | | <view class="card-item-wrapper"> |
| | | <view class="attachment-btns"> |
| | | <button type="primary" size="mini" @tap="fileUpload">选择文件</button> |
| | | <view style="flex: 1;"></view> |
| | | </view> |
| | | <view v-for="(item, index) in attachmentInfo" :key="index"> |
| | | <uni-card :title="item['fileName']" :thumbnail="item.filePath"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>大小:</text>{{item["size"]}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>状态:</text>{{item["status"]}} |
| | | </view> |
| | | <view class="detail operation" v-if="item['status']!='上传成功'"> |
| | | <text>操作:</text> |
| | | <button class="btn-a" size="mini" @tap.stop="uploadFile(index)">上传</button> |
| | | <button class="btn-b" size="mini" @tap.stop="delFile(index)">删除</button> |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- 操作按钮 --> |
| | | <view class="buttons" id="buttons"> |
| | | <button class="btn-a" size="mini" @tap="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> |
| | | </view> |
| | | <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> |
| | | <BillSelectorPopupVue @update="billSelectHandler" ref="billSelector" :Type="'BY'"></BillSelectorPopupVue> |
| | | </view> |
| | | </template> |
| | | <!-- 附件信息 --> |
| | | <template v-if="tabs == 3"> |
| | | <view class="card-item-wrapper"> |
| | | <view class="attachment-btns"> |
| | | <button type="primary" size="mini" @tap="fileUpload">选择文件</button> |
| | | <view style="flex: 1;"></view> |
| | | </view> |
| | | <view v-for="(item, index) in attachmentInfo" :key="index"> |
| | | <uni-card :title="item['fileName']" :thumbnail="item.filePath"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>大小:</text>{{item["size"]}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>状态:</text>{{item["status"]}} |
| | | </view> |
| | | <view class="detail operation" v-if="item['status']!='上传成功'"> |
| | | <text>操作:</text> |
| | | <button class="btn-a" size="mini" @tap.stop="uploadFile(index)">上传</button> |
| | | <button class="btn-b" size="mini" @tap.stop="delFile(index)">删除</button> |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <!-- 操作按钮 --> |
| | | <view class="buttons" id="buttons"> |
| | | <button class="btn-a" size="mini" @tap="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> |
| | | </view> |
| | | <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> |
| | | <BillSelectorPopupVue @update="billSelectHandler" ref="billSelector" :Type="'BY'"></BillSelectorPopupVue> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from "dayjs"; |
| | | import { |
| | | CommonUtils |
| | | } from "@/utils/common"; |
| | | import { |
| | | MpaasScan |
| | | } from "@/utils/mpaasScan.js" |
| | | import { |
| | | getUserInfo |
| | | } from "../../../utils/auth"; |
| | | import BillSelectorPopupVue from "../../../components/MJGL/BillSelectorPopup.vue"; |
| | | export default { |
| | | name: 'sb_EquipMaintainBill', |
| | | components: { |
| | | BillSelectorPopupVue |
| | | }, |
| | | data() { |
| | | return { |
| | | tabs: 0, |
| | | HMainSourceBillType: "", |
| | | btnTop: 0, |
| | | tabsBottom: 0, |
| | | HModName: "sb_EquipMaintainBill", |
| | | HBillType: '3901', |
| | | operationType: 1, |
| | | enableEdit: true, |
| | | uploadOptions: {}, |
| | | import dayjs from "dayjs"; |
| | | import { |
| | | CommonUtils |
| | | } from "@/utils/common"; |
| | | import { |
| | | MpaasScan |
| | | } from "@/utils/mpaasScan.js" |
| | | import { |
| | | getUserInfo |
| | | } from "../../../utils/auth"; |
| | | import BillSelectorPopupVue from "../../../components/MJGL/BillSelectorPopup.vue"; |
| | | export default { |
| | | name: 'sb_EquipMaintainBill', |
| | | components: { |
| | | BillSelectorPopupVue |
| | | }, |
| | | data() { |
| | | return { |
| | | tabs: 0, |
| | | HMainSourceBillType: "", |
| | | btnTop: 0, |
| | | tabsBottom: 0, |
| | | HModName: "sb_EquipMaintainBill", |
| | | HBillType: '3901', |
| | | operationType: 1, |
| | | enableEdit: true, |
| | | uploadOptions: {}, |
| | | |
| | | HDeptList: [], |
| | | HShiftsList: [], |
| | | HCheckFileList: [], |
| | | attachmentInfo: [], |
| | | HDeptList: [], |
| | | HShiftsList: [], |
| | | HCheckFileList: [], |
| | | attachmentInfo: [], |
| | | |
| | | hform: { |
| | | HBarCode: "", |
| | | HBeginDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HEndDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HQty: 0, |
| | | HErrNote: "", |
| | | HBigSafeNote: "", |
| | | HShiftsName: "", |
| | | HShiftsID: 0, |
| | | HBillNo: "", |
| | | HInterID: 0, |
| | | HDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HDeptName: "", |
| | | HDeptID: 0, |
| | | HRemark: "", |
| | | HBarName: "", |
| | | HEquipID: 0, |
| | | HBarSpec: "", |
| | | HBarModel: "", |
| | | HPlanNo: "", |
| | | HPlanInterID: 0, |
| | | HPlanEntryID: 0, |
| | | HEquipMaintainPlanInterID: 0, |
| | | HEquipMaintainPlanEntryID: "", |
| | | HMaker: getUserInfo()['Czymc'], |
| | | HMakeDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HUpDater: "", |
| | | HUpDateDate: "", |
| | | HChecker: "", |
| | | HCheckDate: "", |
| | | HDeleteMan: "", |
| | | HDeleteDate: "", |
| | | lngBillKey: 0, |
| | | lngBillSubKey: 0, |
| | | HLastResult: "OK" |
| | | } |
| | | }; |
| | | }, |
| | | computed: { |
| | | containerHeight: { |
| | | get() { |
| | | return this.btnTop - this.tabsBottom - 5 |
| | | } |
| | | }, |
| | | calcHLastResult: { |
| | | get() { |
| | | if (this.HCheckFileList.length == 0) { |
| | | return 'OK' |
| | | } else { |
| | | let okCount = this.HCheckFileList.reduce((acc, item) => { |
| | | if (item.HMaintainResult) { |
| | | return acc + 1 |
| | | } |
| | | return acc |
| | | }, 0) |
| | | if (okCount == this.HCheckFileList.length) { |
| | | return 'OK' |
| | | } |
| | | return 'NG' |
| | | } |
| | | } |
| | | } |
| | | hform: { |
| | | HBarCode: "", |
| | | HBeginDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HEndDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HQty: 0, |
| | | HErrNote: "", |
| | | HBigSafeNote: "", |
| | | HShiftsName: "", |
| | | HShiftsID: 0, |
| | | HBillNo: "", |
| | | HInterID: 0, |
| | | HDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HDeptName: getUserInfo().HDeptName, |
| | | HDeptID: getUserInfo().HDeptID, |
| | | HRemark: "", |
| | | HBarName: "", |
| | | HEquipID: 0, |
| | | HBarSpec: "", |
| | | HBarModel: "", |
| | | HPlanNo: "", |
| | | HPlanInterID: 0, |
| | | HPlanEntryID: 0, |
| | | HEquipMaintainPlanInterID: 0, |
| | | HEquipMaintainPlanEntryID: "", |
| | | HMaker: getUserInfo()['Czymc'], |
| | | HMakeDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HUpDater: "", |
| | | HUpDateDate: "", |
| | | HChecker: "", |
| | | HCheckDate: "", |
| | | HDeleteMan: "", |
| | | HDeleteDate: "", |
| | | lngBillKey: 0, |
| | | lngBillSubKey: 0, |
| | | HLastResult: "OK" |
| | | } |
| | | }; |
| | | }, |
| | | computed: { |
| | | containerHeight: { |
| | | get() { |
| | | return this.btnTop - this.tabsBottom - 5 |
| | | } |
| | | }, |
| | | calcHLastResult: { |
| | | get() { |
| | | if (this.HCheckFileList.length == 0) { |
| | | return 'OK' |
| | | } else { |
| | | let okCount = this.HCheckFileList.reduce((acc, item) => { |
| | | if (item.HMaintainResult) { |
| | | return acc + 1 |
| | | } |
| | | return acc |
| | | }, 0) |
| | | if (okCount == this.HCheckFileList.length) { |
| | | return 'OK' |
| | | } |
| | | return 'NG' |
| | | } |
| | | } |
| | | } |
| | | |
| | | }, |
| | | methods: { |
| | | billSelectHandler(billData) { |
| | | console.log('billData: ', billData); |
| | | let data = billData.retVal[this.hform.HEquipID] |
| | | this.get_DocCheckItem2(data.hmainid) |
| | | }, |
| | | // 获取保养规程 |
| | | async get_DocCheckItem2(HEquipMaintainRuleInterID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetMaintainItemByMaintainRuleID", |
| | | data: { |
| | | "HEquipMaintainRuleInterID": HEquipMaintainRuleInterID |
| | | }, |
| | | }) |
| | | }, |
| | | methods: { |
| | | billSelectHandler(billData) { |
| | | console.log('billData: ', billData); |
| | | let data = billData.retVal[this.hform.HEquipID] |
| | | this.get_DocCheckItem2(data.hmainid) |
| | | }, |
| | | // 获取保养规程 |
| | | async get_DocCheckItem2(HEquipMaintainRuleInterID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetMaintainItemByMaintainRuleID", |
| | | data: { |
| | | "HEquipMaintainRuleInterID": HEquipMaintainRuleInterID |
| | | }, |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | this.hform.HEquipMaintainRuleInterID = data[0].保养规程ID |
| | | this.hform.HEquipMaintainRuleInterNo = data[0].保养规程单号 |
| | | this.hform.HPlanNo = data[0].保养计划单 |
| | | this.hform.HEquipMaintainPlanInterID = (data[0].保养计划ID == null ? 0 : data[0].保养计划ID) == "" ? |
| | | 0 : data[0].保养计划ID |
| | | this.hform.HEquipMaintainPlanEntryID = (data[0].保养计划子ID == null ? 0 : data[0].保养计划子ID) == |
| | | "" ? 0 : data[0].保养计划子ID |
| | | this.hform.HMainSourceBillNo = data[0].保养计划单 |
| | | this.hform.HMainSourceInterID = (data[0].保养计划ID == null ? 0 : data[0].保养计划ID) == "" ? 0 : |
| | | data[0].保养计划ID |
| | | this.hform.HMainSourceEntryID = (data[0].保养计划子ID == null ? 0 : data[0].保养计划子ID) == "" ? 0 : |
| | | data[0].保养计划子ID |
| | | |
| | | this.HCheckFileList = Array.from(data).map(item => { |
| | | return { |
| | | "HMaintainResult": item.默认结论 == 1 ? true : false, |
| | | "HMaintainItemID": item.HMaintainItemID, |
| | | "HMaintainNumber": item.保养项目代码, |
| | | "HMaintainItem": item.保养项目, |
| | | "HMaintainPart": item.保养部位, |
| | | "HClaim": item.具体要求, |
| | | "HManagerID": item.负责人ID, |
| | | "HManagerNumber": item.负责人代码, |
| | | "HManagerName": item.负责人名称, |
| | | "HRemark": "", |
| | | "HSourceInterID": item.保养计划ID || 0, |
| | | "HSourceEntryID": item.保养计划子ID || 0, |
| | | "HSourceBillNo": item.保养计划单 || "" |
| | | } |
| | | }) |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | this.hform.HEquipMaintainRuleInterID = data[0].保养规程ID |
| | | this.hform.HEquipMaintainRuleInterNo = data[0].保养规程单号 |
| | | this.hform.HPlanNo = data[0].保养计划单 |
| | | this.hform.HEquipMaintainPlanInterID = (data[0].保养计划ID == null ? 0 : data[0].保养计划ID) == "" ? |
| | | 0 : data[0].保养计划ID |
| | | this.hform.HEquipMaintainPlanEntryID = (data[0].保养计划子ID == null ? 0 : data[0].保养计划子ID) == |
| | | "" ? 0 : data[0].保养计划子ID |
| | | this.hform.HMainSourceBillNo = data[0].保养计划单 |
| | | this.hform.HMainSourceInterID = (data[0].保养计划ID == null ? 0 : data[0].保养计划ID) == "" ? 0 : |
| | | data[0].保养计划ID |
| | | this.hform.HMainSourceEntryID = (data[0].保养计划子ID == null ? 0 : data[0].保养计划子ID) == "" ? 0 : |
| | | data[0].保养计划子ID |
| | | |
| | | this.enableEdit = false |
| | | this.$refs["billSelector"].exit() |
| | | this.HCheckFileList = Array.from(data).map(item => { |
| | | return { |
| | | "HMaintainResult": item.默认结论 == 1 ? true : false, |
| | | "HMaintainItemID": item.HMaintainItemID, |
| | | "HMaintainNumber": item.保养项目代码, |
| | | "HMaintainItem": item.保养项目, |
| | | "HMaintainPart": item.保养部位, |
| | | "HClaim": item.具体要求, |
| | | "HManagerID": item.负责人ID, |
| | | "HManagerNumber": item.负责人代码, |
| | | "HManagerName": item.负责人名称, |
| | | "HRemark": "", |
| | | "HSourceInterID": item.保养计划ID || 0, |
| | | "HSourceEntryID": item.保养计划子ID || 0, |
| | | "HSourceBillNo": item.保养计划单 || "" |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | toCheckFile() { |
| | | if (this.hform.HEquipID == 0) { |
| | | return CommonUtils.showTips({ |
| | | message: '不能选择保养规程,请先扫描设备条码!!!' |
| | | }) |
| | | } |
| | | this.$refs['billSelector'].showPopup(this.hform.HEquipID) |
| | | }, |
| | | ValidCheck() { |
| | | if (this.hform.HEquipID == 0) { |
| | | return { |
| | | Message: "未录入设备信息,请先录入设备信息!", |
| | | state: false |
| | | } |
| | | } |
| | | this.enableEdit = false |
| | | this.$refs["billSelector"].exit() |
| | | |
| | | return { |
| | | Message: "", |
| | | state: true |
| | | } |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: './Sb_EquipMaintainBill?operationType=1' |
| | | }) |
| | | }, |
| | | goBack() { |
| | | uni.navigateBack() |
| | | }, |
| | | checkBoxChangeHandler(index, e) { |
| | | let cr = e.detail.value |
| | | if (cr.length == 0) { |
| | | this.HCheckFileList[index]["HMaintainResult"] = false |
| | | } else { |
| | | this.HCheckFileList[index]["HMaintainResult"] = true |
| | | } |
| | | }, |
| | | uploadFile(index) { |
| | | console.log('filePath: ', this.attachmentInfo[index].filePath); |
| | | // 通过临时路径读取文件 |
| | | uni.uploadFile({ |
| | | url: CommonUtils.getServerUrl() + "/Sb_EquipDotCheckBill/UploadFile", |
| | | filePath: this.attachmentInfo[index].filePath, |
| | | name: 'file', |
| | | formData: { |
| | | HBillNo: this.hform.HBillNo, |
| | | HRemark: "", |
| | | HUserName: getUserInfo()["Czymc"] |
| | | }, |
| | | success: (uploadRes) => { |
| | | CommonUtils.showTips({ |
| | | message: "上传成功" |
| | | }) |
| | | this.attachmentInfo[index].status = "上传成功" |
| | | }, |
| | | fail: (err) => { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `上传失败: ${err}` |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | delFile(index) { |
| | | console.log('attachmentInfo: ', this.attachmentInfo[index]); |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要删除 " ' + this.attachmentInfo[index].fileName + ' " 删除后将不可恢复!', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | this.attachmentInfo.splice(index, 1) |
| | | } |
| | | }, |
| | | }) |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | toCheckFile() { |
| | | if (this.hform.HEquipID == 0) { |
| | | return CommonUtils.showTips({ |
| | | message: '不能选择保养规程,请先扫描设备条码!!!' |
| | | }) |
| | | } |
| | | this.$refs['billSelector'].showPopup(this.hform.HEquipID) |
| | | }, |
| | | ValidCheck() { |
| | | if (this.hform.HEquipID == 0) { |
| | | return { |
| | | Message: "未录入设备信息,请先录入设备信息!", |
| | | state: false |
| | | } |
| | | } |
| | | |
| | | }, |
| | | handleUploadCallback(res) { // 文件上传回调 |
| | | console.log('file: ', res); |
| | | let fileInfo = res.data[0] |
| | | this.attachmentInfo.push({ |
| | | fileName: fileInfo.name, |
| | | size: fileInfo.size, |
| | | status: '等待上传', |
| | | filePath: fileInfo.tempFilePath |
| | | }) |
| | | }, |
| | | // 上传文件 |
| | | fileUpload() { |
| | | this.$refs.XeUpload.upload('file', {}); |
| | | }, |
| | | //获取班次数据 |
| | | async getShiftList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Web/GetGy_ShiftsList_Json', |
| | | data: { |
| | | Shifts: "", |
| | | } |
| | | }) |
| | | return { |
| | | Message: "", |
| | | state: true |
| | | } |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: './Sb_EquipMaintainBill?operationType=1' |
| | | }) |
| | | }, |
| | | goBack() { |
| | | uni.navigateBack() |
| | | }, |
| | | checkBoxChangeHandler(index, e) { |
| | | let cr = e.detail.value |
| | | if (cr.length == 0) { |
| | | this.HCheckFileList[index]["HMaintainResult"] = false |
| | | } else { |
| | | this.HCheckFileList[index]["HMaintainResult"] = true |
| | | } |
| | | }, |
| | | uploadFile(index) { |
| | | console.log('filePath: ', this.attachmentInfo[index].filePath); |
| | | // 通过临时路径读取文件 |
| | | uni.uploadFile({ |
| | | url: CommonUtils.getServerUrl() + "/Sb_EquipDotCheckBill/UploadFile", |
| | | filePath: this.attachmentInfo[index].filePath, |
| | | name: 'file', |
| | | formData: { |
| | | HBillNo: this.hform.HBillNo, |
| | | HRemark: "", |
| | | HUserName: getUserInfo()["Czymc"] |
| | | }, |
| | | success: (uploadRes) => { |
| | | CommonUtils.showTips({ |
| | | message: "上传成功" |
| | | }) |
| | | this.attachmentInfo[index].status = "上传成功" |
| | | }, |
| | | fail: (err) => { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `上传失败: ${err}` |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | delFile(index) { |
| | | console.log('attachmentInfo: ', this.attachmentInfo[index]); |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要删除 " ' + this.attachmentInfo[index].fileName + ' " 删除后将不可恢复!', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | this.attachmentInfo.splice(index, 1) |
| | | } |
| | | }, |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.HShiftsList = data |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | //获取使用部门数据 |
| | | async getHDeptList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Department/list', |
| | | data: { |
| | | sWhere: ` AND HUSEORGID = ${uni.getStorageSync('OrganizationID')}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | } |
| | | }) |
| | | }, |
| | | handleUploadCallback(res) { // 文件上传回调 |
| | | console.log('file: ', res); |
| | | let fileInfo = res.data[0] |
| | | this.attachmentInfo.push({ |
| | | fileName: fileInfo.name, |
| | | size: fileInfo.size, |
| | | status: '等待上传', |
| | | filePath: fileInfo.tempFilePath |
| | | }) |
| | | }, |
| | | // 上传文件 |
| | | fileUpload() { |
| | | this.$refs.XeUpload.upload('file', {}); |
| | | }, |
| | | //获取班次数据 |
| | | async getShiftList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_ShiftsController/Get_Gy_WorkShiftList', |
| | | data: { |
| | | sWhere: ` and 禁用标记 = '' and ISNULL(审核人,'') != '' and 使用组织名称 = '${uni.getStorageSync("Organization")}'`, |
| | | HMaker: getUserInfo()["Czymc"], |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.HDeptList = data |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | toScanCode() { |
| | | MpaasScan.scanCode(cb => { |
| | | this.hfrom.HBarCode = cb |
| | | this.GetMessageByBarCode(cb) |
| | | }) |
| | | }, |
| | | async GetMessageByBarCode(HBarCode) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/Gy_EquipFileBill/txtHBarCode_KeyDown", |
| | | data: { |
| | | HBarCode: HBarCode, |
| | | user: getUserInfo()["Czymc"] |
| | | }, |
| | | }) |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.HShiftsList = data |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | //获取使用部门数据 |
| | | async getHDeptList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Department/list', |
| | | data: { |
| | | sWhere: ` AND HUSEORGID = ${uni.getStorageSync('OrganizationID')}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.HDeptList = data |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | toScanCode() { |
| | | MpaasScan.scanCode(cb => { |
| | | this.hfrom.HBarCode = cb |
| | | this.GetMessageByBarCode(cb) |
| | | }) |
| | | }, |
| | | async GetMessageByBarCode(HBarCode) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/Gy_EquipFileBill/txtHBarCode_KeyDown", |
| | | data: { |
| | | HBarCode: HBarCode, |
| | | user: getUserInfo()["Czymc"] |
| | | }, |
| | | }) |
| | | |
| | | |
| | | if (!res) { |
| | | return |
| | | } |
| | | if (!res) { |
| | | return |
| | | } |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | |
| | | console.log('data: ', data); |
| | | console.log('data: ', data); |
| | | |
| | | if (count == 1) { |
| | | this.hform.HEquipID = data[0].HInterID |
| | | this.hform.HBarName = data[0].设备名称 |
| | | this.hform.HBarSpec = data[0].设备规格 |
| | | this.hform.HBarModel = data[0].设备型号 |
| | | this.hform.HQty = 1 |
| | | if (count == 1) { |
| | | this.hform.HEquipID = data[0].HInterID |
| | | this.hform.HBarName = data[0].设备名称 |
| | | this.hform.HBarSpec = data[0].设备规格 |
| | | this.hform.HBarModel = data[0].设备型号 |
| | | this.hform.HQty = 1 |
| | | |
| | | // 获取检验规程 |
| | | this.GetItemByEquipFile() |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: Message |
| | | }) |
| | | } |
| | | // 获取检验规程 |
| | | this.GetItemByEquipFile() |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: Message |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | async GetItemByEquipFile() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetItemByEquipFile", |
| | | data: { |
| | | "EquipProjectID": this.hform.HEquipID, |
| | | "Type": "BY", |
| | | "HDate": this.hform.HBeginDate |
| | | } |
| | | }) |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | async GetItemByEquipFile() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetItemByEquipFile", |
| | | data: { |
| | | "EquipProjectID": this.hform.HEquipID, |
| | | "Type": "BY", |
| | | "HDate": this.hform.HBeginDate |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.hform.HEquipMaintainRuleInterID = data[0].保养规程ID |
| | | this.hform.HEquipMaintainRuleInterNo = data[0].保养规程单号 |
| | | this.hform.HPlanNo = data[0].保养计划单 |
| | | this.hform.HEquipMaintainPlanInterID = (data[0].保养计划ID == null ? 0 : data[0].保养计划ID) == "" ? |
| | | 0 : data[0].保养计划ID |
| | | this.hform.HEquipMaintainPlanEntryID = (data[0].保养计划子ID == null ? 0 : data[0].保养计划子ID) == |
| | | "" ? 0 : data[0].保养计划子ID |
| | | this.hform.HMainSourceBillNo = data[0].保养计划单 |
| | | this.hform.HMainSourceInterID = (data[0].保养计划ID == null ? 0 : data[0].保养计划ID) == "" ? 0 : |
| | | data[0].保养计划ID |
| | | this.hform.HMainSourceEntryID = (data[0].保养计划子ID == null ? 0 : data[0].保养计划子ID) == "" ? 0 : |
| | | data[0].保养计划子ID |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.hform.HEquipMaintainRuleInterID = data[0].保养规程ID |
| | | this.hform.HEquipMaintainRuleInterNo = data[0].保养规程单号 |
| | | this.hform.HPlanNo = data[0].保养计划单 |
| | | this.hform.HEquipMaintainPlanInterID = (data[0].保养计划ID == null ? 0 : data[0].保养计划ID) == "" ? |
| | | 0 : data[0].保养计划ID |
| | | this.hform.HEquipMaintainPlanEntryID = (data[0].保养计划子ID == null ? 0 : data[0].保养计划子ID) == |
| | | "" ? 0 : data[0].保养计划子ID |
| | | this.hform.HMainSourceBillNo = data[0].保养计划单 |
| | | this.hform.HMainSourceInterID = (data[0].保养计划ID == null ? 0 : data[0].保养计划ID) == "" ? 0 : |
| | | data[0].保养计划ID |
| | | this.hform.HMainSourceEntryID = (data[0].保养计划子ID == null ? 0 : data[0].保养计划子ID) == "" ? 0 : |
| | | data[0].保养计划子ID |
| | | |
| | | this.HCheckFileList = Array.from(data).map(item => { |
| | | return { |
| | | "HMaintainResult": item.默认结论 == 1 ? true : false, |
| | | "HMaintainItemID": item.保养项目ID, |
| | | "HMaintainNumber": item.保养项目代码, |
| | | "HMaintainItem": item.保养项目名称, |
| | | "HMaintainPart": item.保养部位, |
| | | "HClaim": item.具体要求, |
| | | "HManagerID": item.负责人ID, |
| | | "HManagerNumber": item.负责人代码, |
| | | "HManagerName": item.负责人名称, |
| | | "HRemark": "", |
| | | "HSourceInterID": item.保养计划ID, |
| | | "HSourceEntryID": item.保养计划子ID, |
| | | "HSourceBillNo": item.保养计划单 |
| | | } |
| | | }) |
| | | this.HCheckFileList = Array.from(data).map(item => { |
| | | return { |
| | | "HMaintainResult": item.默认结论 == 1 ? true : false, |
| | | "HMaintainItemID": item.保养项目ID, |
| | | "HMaintainNumber": item.保养项目代码, |
| | | "HMaintainItem": item.保养项目名称, |
| | | "HMaintainPart": item.保养部位, |
| | | "HClaim": item.具体要求, |
| | | "HManagerID": item.负责人ID, |
| | | "HManagerNumber": item.负责人代码, |
| | | "HManagerName": item.负责人名称, |
| | | "HRemark": "", |
| | | "HSourceInterID": item.保养计划ID, |
| | | "HSourceEntryID": item.保养计划子ID, |
| | | "HSourceBillNo": item.保养计划单 |
| | | } |
| | | }) |
| | | |
| | | this.enableEdit = false |
| | | this.enableEdit = false |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取保养规程错误: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取点检规程错误: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | radioChange({ |
| | | detail: { |
| | | value |
| | | } |
| | | }) { |
| | | this.HLastResult = value |
| | | }, |
| | | async getMaxNum() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetMAXNum", |
| | | data: { |
| | | "HBillType": this.HBillType |
| | | } |
| | | }) |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取保养规程错误: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取点检规程错误: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | radioChange({ |
| | | detail: { |
| | | value |
| | | } |
| | | }) { |
| | | this.HLastResult = value |
| | | }, |
| | | async getMaxNum() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetMAXNum", |
| | | data: { |
| | | "HBillType": this.HBillType |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | count, |
| | | data, |
| | | Message |
| | | } = res.data |
| | | console.log('data: ', data); |
| | | this.hform.HInterID = 0 |
| | | this.hform.HBillNo = data[0]["HBillNo"] |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: "获取单据信息异常: " + err |
| | | }) |
| | | } |
| | | }, |
| | | async submit() { |
| | | let valid = this.ValidCheck() |
| | | if (!valid.state) { |
| | | return CommonUtils.showTips({ |
| | | message: valid.Message |
| | | }) |
| | | } |
| | | let { |
| | | count, |
| | | data, |
| | | Message |
| | | } = res.data |
| | | console.log('data: ', data); |
| | | this.hform.HInterID = 0 |
| | | this.hform.HBillNo = data[0]["HBillNo"] |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: "获取单据信息异常: " + err |
| | | }) |
| | | } |
| | | }, |
| | | async submit() { |
| | | let valid = this.ValidCheck() |
| | | if (!valid.state) { |
| | | return CommonUtils.showTips({ |
| | | message: valid.Message |
| | | }) |
| | | } |
| | | |
| | | try { |
| | | let oMain = JSON.stringify(this.hform); |
| | | let sSubStr = JSON.stringify(this.HCheckFileList); |
| | | let sMainSub = oMain + ';' + sSubStr; |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/Sb_PDA_EquipMaintainBill/SaveGetEquipMaintainBillList", |
| | | data: { |
| | | "msg": sMainSub |
| | | }, |
| | | method: "POST" |
| | | }) |
| | | try { |
| | | let oMain = JSON.stringify(this.hform); |
| | | let sSubStr = JSON.stringify(this.HCheckFileList); |
| | | let sMainSub = oMain + ';' + sSubStr; |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/Sb_PDA_EquipMaintainBill/SaveGetEquipMaintainBillList", |
| | | data: { |
| | | "msg": sMainSub |
| | | }, |
| | | method: "POST" |
| | | }) |
| | | |
| | | if (!res) { |
| | | return |
| | | } |
| | | if (!res) { |
| | | return |
| | | } |
| | | |
| | | let { |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill?operationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: "提交单据失败: " + Message |
| | | }) |
| | | } |
| | | let { |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill?operationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: "提交单据失败: " + Message |
| | | }) |
| | | } |
| | | |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: "提交单据失败: " + err |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | console.log('e: ', e); |
| | | if (!e.operationType) { |
| | | this.operationType = 1 |
| | | } else { |
| | | this.operationType = e.operationType |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: "提交单据失败: " + err |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | console.log('e: ', e); |
| | | if (!e.operationType) { |
| | | this.operationType = 1 |
| | | } else { |
| | | this.operationType = e.operationType |
| | | } |
| | | |
| | | if (this.operationType == 1) { |
| | | // 新增 |
| | | this.getMaxNum() |
| | | } else if (this.operationType == 2) { |
| | | // 复制 |
| | | } else if (this.operationType == 3) { |
| | | // 编辑 |
| | | if (this.operationType == 1) { |
| | | // 新增 |
| | | this.getMaxNum() |
| | | } else if (this.operationType == 2) { |
| | | // 复制 |
| | | } else if (this.operationType == 3) { |
| | | // 编辑 |
| | | |
| | | } else if (this.operationType == 4) { |
| | | // 浏览 |
| | | } else if (this.operationType == 4) { |
| | | // 浏览 |
| | | |
| | | } |
| | | } |
| | | |
| | | this.getHDeptList() |
| | | this.getShiftList() |
| | | }, |
| | | onReady() { |
| | | const query = uni.createSelectorQuery().in(this) |
| | | query.select("#buttons") |
| | | .boundingClientRect() |
| | | .select("#tabs") |
| | | .boundingClientRect() |
| | | .exec(res => { |
| | | this.btnTop = Math.floor(res[0].top) |
| | | this.tabsBottom = Math.ceil(res[1].bottom) |
| | | }) |
| | | } |
| | | } |
| | | this.getHDeptList() |
| | | this.getShiftList() |
| | | }, |
| | | onReady() { |
| | | const query = uni.createSelectorQuery().in(this) |
| | | query.select("#buttons") |
| | | .boundingClientRect() |
| | | .select("#tabs") |
| | | .boundingClientRect() |
| | | .exec(res => { |
| | | this.btnTop = Math.floor(res[0].top) |
| | | this.tabsBottom = Math.ceil(res[1].bottom) |
| | | }) |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | @import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | </style> |
| | |
| | | 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> |
| | |
| | | "HBillNo": "", |
| | | "HInterID": 0, |
| | | "HDate": dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | "HDeptName": "", |
| | | "HDeptID": 0, |
| | | "HEmpName": "", |
| | | "HEmpID": 0, |
| | | "HDeptName": getUserInfo().HDeptName, |
| | | "HDeptID": getUserInfo().HDeptID, |
| | | "HEmpName": getUserInfo().HEmpName, |
| | | "HEmpID": getUserInfo().HEmpID, |
| | | "HManagerName": getUserInfo().HManagerName, |
| | | "HManagerID": getUserInfo().HManagerID, |
| | | "HRepairCheckMainName": "", |
| | | "HRepairCheckMainID": 0, |
| | | "HManagerName": "", |
| | | "HManagerID": 0, |
| | | "HBarName": "", |
| | | "HEquipID": 0, |
| | | "HBarSpec": "", |
| | |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | tabs: 0, |
| | | urls: '/Web/GetEquipmentBillsList', |
| | | MvarReportTitle: '设备点检记录单缓存', |
| | | MvarReportTitle: '设备维修验收单列表', |
| | | hform: { |
| | | HBillNo: '', |
| | | HSourceBillNo: '', |
| | |
| | | if (this.tabs == 0) { |
| | | this.urls = '/Web/GetEquipmentBillsList' |
| | | } |
| | | // if (this.tabs == 1) { |
| | | // this.urls = '/WEBSController/GetKf_ICStockBillQueryList_User_Json' |
| | | // } |
| | | this.search() |
| | | }, |
| | | async getList() { |
| | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取设备点检记录单失败: ${Message}` |
| | | message: `获取设备维修验收单失败: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取设备点检记录单失败: ${err}` |
| | | message: `获取设备维修验收单失败: ${err}` |
| | | }) |
| | | } |
| | | |
| | |
| | | }, |
| | | add() { |
| | | uni.navigateTo({ |
| | | url: '/pages/MJGL/Sb_EquipRepariCheckBill/Sb_EquipRepariCheckBill?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' |
| | | }) |
| | | }, |
| | | url: '/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill?operationType=1' |
| | | }) |
| | | }, |
| | | //删除 |
| | |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | //撤销 |
| | | 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> |
| | |
| | | HDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HInnerBillNo: '', |
| | | HRepairContent: '', |
| | | HDeptIDName: '', |
| | | HDeptID: 0, |
| | | HEmpIDName: '', |
| | | HEmpID: 0, |
| | | HManagerIDName: '', |
| | | HManagerID: 0, |
| | | HDeptName: getUserInfo().HDeptName, |
| | | HDeptID: getUserInfo().HDeptID, |
| | | HEmpName: getUserInfo().HEmpName, |
| | | HEmpID: getUserInfo().HEmpID, |
| | | HManagerName: getUserInfo().HManagerName, |
| | | HManagerID: getUserInfo().HManagerID, |
| | | HEquipIDName: '', |
| | | HEquipID: 0, |
| | | HRepairIDName: '', |
| | |
| | | HRepairPlanBeginDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HRepairPlanEndDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HCycleUnit: '小时', |
| | | HPlanTimes: '', |
| | | HPlanTimes: '0', |
| | | HExplanation: '', |
| | | HRemark: '', |
| | | HMaker: getUserInfo()["Czymc"], |
| | |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | tabs: 0, |
| | | urls: '/Web/GetEquipmentBillsList', |
| | | MvarReportTitle: '设备维修派工单缓存', |
| | | MvarReportTitle: '设备维修派工单列表', |
| | | hform: { |
| | | HBillNo: '', |
| | | HSourceBillNo: '', |
| 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) |
| | | } |
| | | } |
| | | }); |
| File was renamed from pages/qijvguzhangdengji/mouldMistake.vue |
| | |
| | | <script> |
| | | import { |
| | | CommonUtils |
| | | } from '../../utils/common' |
| | | } from '../../../utils/common' |
| | | import { |
| | | getUserInfo |
| | | } from '../../utils/auth' |
| | | } from '../../../utils/auth' |
| | | import dayjs, { |
| | | Dayjs |
| | | } from 'dayjs' |
| | |
| | | }, |
| | | cmdAdd() { |
| | | uni.navigateTo({ |
| | | url: "/pages/qijvguzhangdengji/mouldMistakeBill?operationType=1" |
| | | url: "/pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBill?operationType=1" |
| | | }) |
| | | }, |
| | | async cmdSearch() { |
| | |
| | | <button class="btn-a" size="mini" @tap="addNew">新增</button> |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | </view> |
| | | <!-- <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> --> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | "HCycleUnit": "小时", |
| | | "MouldHName": "", |
| | | "MouldHModel": "", |
| | | "HDeptIDName": "", |
| | | "HDeptID": "0", |
| | | "HManagerIDName": "", |
| | | "HManagerID": "0", |
| | | "HEmpIDName": "", |
| | | "HEmpID": "0", |
| | | "HDeptName": getUserInfo()["HDeptName"], |
| | | "HDeptID": getUserInfo()["HDeptID"], |
| | | "HEmpName": getUserInfo().HEmpName, |
| | | "HEmpID": getUserInfo().HEmpID, |
| | | "HManagerName": getUserInfo().HSecManager, |
| | | "HManagerID": getUserInfo().HSecManagerID, |
| | | "HRepairBeginDate": dayjs(new Date()).format('YYYY-MM-DD'), |
| | | "HMainSourceBillType": "", |
| | | "HMainSourceInterID": "0", |
| | |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: './Sb_EquipRepairSendWorkBill?operationType=1' |
| | | url: './Sc_MouldRepairSendWorkBill?operationType=1' |
| | | }) |
| | | }, |
| | | goBack() { |
| | |
| | | this.HCheckFileList[index]["HDotCheckResult"] = false |
| | | } else { |
| | | this.HCheckFileList[index]["HDotCheckResult"] = true |
| | | } |
| | | }, |
| | | uploadFile(index) { |
| | | console.log('filePath: ', this.attachmentInfo[index].filePath); |
| | | // 通过临时路径读取文件 |
| | | uni.uploadFile({ |
| | | url: CommonUtils.getServerUrl() + "/Sb_EquipDotCheckBill/UploadFile", |
| | | filePath: this.attachmentInfo[index].filePath, |
| | | name: 'file', |
| | | formData: { |
| | | HBillNo: this.hform.HBillNo, |
| | | HRemark: "", |
| | | HUserName: getUserInfo()["Czymc"] |
| | | }, |
| | | success: (uploadRes) => { |
| | | CommonUtils.showTips({ |
| | | message: "上传成功" |
| | | }) |
| | | this.attachmentInfo[index].status = "上传成功" |
| | | }, |
| | | fail: (err) => { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `上传失败: ${err}` |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | delFile(index) { |
| | | console.log('attachmentInfo: ', this.attachmentInfo[index]); |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要删除 " ' + this.attachmentInfo[index].fileName + ' " 删除后将不可恢复!', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | this.attachmentInfo.splice(index, 1) |
| | | } |
| | | }, |
| | | }) |
| | | |
| | | }, |
| | | handleUploadCallback(res) { // 文件上传回调 |
| | | console.log('file: ', res); |
| | | let fileInfo = res.data[0] |
| | | this.attachmentInfo.push({ |
| | | fileName: fileInfo.name, |
| | | size: fileInfo.size, |
| | | status: '等待上传', |
| | | filePath: fileInfo.tempFilePath |
| | | }) |
| | | }, |
| | | // 上传文件 |
| | | fileUpload() { |
| | | this.$refs.XeUpload.upload('file', {}); |
| | | }, |
| | | //获取班次数据 |
| | | async getShiftList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Web/GetGy_ShiftsList_Json', |
| | | data: { |
| | | Shifts: "", |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.HShiftsList = data |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | //获取使用部门数据 |
| File was renamed from pages/weixiujilu/mouldRepairRecordBill.vue |
| | |
| | | } from "@/utils/auth.js"; |
| | | import { |
| | | CommonUtils |
| | | } from '../../utils/common'; |
| | | } from '../../../utils/common'; |
| | | import { |
| | | getUserStockRelation |
| | | } from '../../utils/userRelationManager'; |
| | | import BillListPopupMouldConkBookBillVue from '../../components/BillListPopup/BillListPopupMouldConkBookBill.vue'; |
| | | import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue"; |
| | | import BillListPopupMouldVue from '../../components/BillListPopup/BillListPopup_Mould.vue'; |
| | | } from '../../../utils/userRelationManager'; |
| | | import BillListPopupMouldConkBookBillVue from '../../../components/BillListPopup/BillListPopupMouldConkBookBill.vue'; |
| | | import BarCodePopupVue from "../../../components/BarCodePopup/BarCodePopup.vue"; |
| | | import BillListPopupMouldVue from '../../../components/BillListPopup/BillListPopup_Mould.vue'; |
| | | import dayjs from 'dayjs'; |
| | | export default { |
| | | components: { |
| File was renamed from pages/weixiujilu/mouldRepairRecordBillList.vue |
| | |
| | | <script> |
| | | import { |
| | | CommonUtils |
| | | } from '../../utils/common' |
| | | } from '../../../utils/common' |
| | | import { |
| | | getUserInfo |
| | | } from '../../utils/auth' |
| | | } from '../../../utils/auth' |
| | | import dayjs, { |
| | | Dayjs |
| | | } from 'dayjs' |
| | |
| | | }, |
| | | cmdAdd() { |
| | | uni.navigateTo({ |
| | | url: "/pages/weixiujilu/mouldRepairRecordBill?operationType=1" |
| | | url: "/pages/MJGL/Sc_MouldRepairWorkBill/Sc_MouldRepairWorkBill?operationType=1" |
| | | }) |
| | | }, |
| | | async cmdSearch() { |
| | |
| | | }) |
| | | |
| | | |
| | | }, |
| | | edit(item) { |
| | | console.log("editItem:", item) |
| | | uni.navigateTo({ |
| | | url: `/pages/weixiujilu/mouldRepairRecordBill?operationType=2&linterid=${item.hmainid}&hsubid=${item.hsubid}` |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | onLoad() { |
| | | |
| | |
| | | HBillNo: "", |
| | | HInterID: 0, |
| | | HDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HDeptName: "", |
| | | HDeptID: 0, |
| | | HDeptName: getUserInfo().HDeptName, |
| | | HDeptID: getUserInfo().HDeptID, |
| | | HRemark: "", |
| | | HBarName: "", |
| | | HMouldID: 0, |
| | |
| | | async getShiftList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Web/GetGy_ShiftsList_Json', |
| | | url: '/Gy_ShiftsController/Get_Gy_WorkShiftList', |
| | | data: { |
| | | Shifts: "", |
| | | } |
| | | sWhere: ` and 禁用标记 = '' and ISNULL(审核人,'') != '' and 使用组织名称 = '${uni.getStorageSync("Organization")}'`, |
| | | HMaker: getUserInfo()["Czymc"], |
| | | }, |
| | | }) |
| | | |
| | | let { |
| | |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.hform.HMouldDotCheckRuleID = data[0].HMouldDotCheckRuleID |
| | | this.hform.HMouldDotCheckRuleNo = data[0].HMouldDotCheckRuleNo |
| | | this.hform.HMouldDotCheckRuleNo = data[0].HBillNo |
| | | this.hform.HMouldDotCheckRuleID = data[0].HInterID |
| | | this.hform.HPlanNo = data[0].单据号 |
| | | this.hform.HPlanInterID = (data[0].hmainid == null ? 0 : data[0].hmainid) == "" ? 0 : data[0].hmainid |
| | | this.hform.HPlanEntryID = (data[0].HEntryID == null ? 0 : data[0].HEntryID) == "" ? 0 : data[0].HEntryID |
| | | |
| | | this.HCheckFileList = Array.from(data).map(item => { |
| | | return { |
| | | "HDotCheckItemID": item.点检项目ID, |
| | | "HDotCheckItem": item.点检项目名称, |
| | | "HDotCheckItemID": item.HDotCheckItemID, |
| | | "HDotCheckItem": item.点检项目, |
| | | "HDotCheckPart": item.点检部位, |
| | | "HClaim": item.具体要求, |
| | | "HManagerID": item.负责人ID, |
| | |
| | | "HSourceInterID": item.hmainid == null ? 0 : item.hmainid, |
| | | "HSourceEntryID": item.HEntryID == null ? 0 : item.HEntryID, |
| | | "HSourceBillNo": item.单据号, |
| | | "HDotCheckItemClassID": item.点检项目分类id || 0, |
| | | "HDotCheckItemClassName": item.点检项目分类 || "", |
| | | "HDotCheckItemClassID": item.HDotCheckItemClassID || 0, |
| | | "HDotCheckItemClassName": item.点检项目分类名称 || "", |
| | | "HDotCheckItemMethodID": item.点检方法id || 0, |
| | | "HDotCheckItemMethodName": item.点检方法 || "", |
| | | "HDotCheckResult": item.默认结论 == 1 ? true : false |
| | |
| | | <template> |
| | | <view> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="title">条码</view> |
| | | <view class="right" style="width: 350rpx;"> |
| | | <input :focus="barCodeFocus" v-model="hform.HBarCode" placeholder="请扫描(或输入)条码" @confirm="getCode(hform.HBarCode)"/> |
| | | </view> |
| | | <uni-icons type="scan" |
| | | style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" |
| | | 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"> |
| | | <view class="title">仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHStockPlaceName"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" |
| | | placeholder="不可操作" /></view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">发料:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请输入(或扫描)发料人" v-model="hform.HKeeperName" |
| | | @input="HScatterUserChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">领料:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请输入(或扫描)领料人" v-model="hform.HSecManagerName" |
| | | @input="HCollectUserChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">部门:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHDeptName" placeholder="请选择部门" v-model="hform.HDeptName" |
| | | @input="HDeptNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">往来类型:</view> |
| | | <view class="right" v-show="showHSourceBillNo"> |
| | | <uni-combox :candidates="['供应商','客户','部门']" placeholder="请选择类型" v-model="hform.TypeName" |
| | | @input="HSelectTypeChange"></uni-combox> |
| | | </view> |
| | | <view class="right" v-show="!showHSourceBillNo"> |
| | | <input name="TypeName" disabled v-model="hform.TypeName" placeholder="" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">往来单位:</view> |
| | | <view class="right" v-show="showHSourceBillNo"> |
| | | <uni-combox :candidates="arrayHSelectType" placeholder="请选择" v-model="hform.HSupName" |
| | | @input="HSupNameChange" ></uni-combox> |
| | | </view> |
| | | <view class="right" v-show="!showHSourceBillNo"> |
| | | <input name="HSupName" disabled v-model="hform.HSupName" placeholder="" /> |
| | | </view> |
| | | </view> |
| | | <view class="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">表头信息</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">模具信息</view> |
| | | </view> |
| | | <view v-if="tabs == 0"> |
| | | <view class="form-item"> |
| | | <view class="title">日期:</view> |
| | | <view class="right"> |
| | | <picker mode="date" v-model="hform.HDate" @change="HDateChange"> |
| | | <view class="picker-overlay"></view> |
| | | <input disabled v-model="hform.HDate" placeholder="请选择日期" /> |
| | | </picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">源单类型:</view> |
| | | <view class="right" v-show="showHMainSourceBillType"> |
| | | <picker :range="arrayHMainSourceBillType" |
| | | @change="HMainSourceBillTypeChange"> |
| | | <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType" |
| | | placeholder="请选择源单类型" /> |
| | | <view class="picker-overlay"></view> |
| | | </picker> |
| | | </view> |
| | | <view class="righton" v-show="!showHMainSourceBillType"> |
| | | <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType" |
| | | placeholder="请选择源单类型" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">源单单号:</view> |
| | | <view class="right" v-show="showHSourceBillNo"> |
| | | <!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="请输入源单单号" |
| | | <view> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="title">条码</view> |
| | | <view class="right" style="width: 350rpx;"> |
| | | <input :focus="barCodeFocus" v-model="hform.HBarCode" placeholder="请扫描(或输入)条码" |
| | | @confirm="getCode(hform.HBarCode)" /> |
| | | </view> |
| | | <uni-icons type="scan" |
| | | style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" |
| | | 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"> |
| | | <view class="title">仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHStockPlaceName"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="不可操作" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">发料:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请输入(或扫描)发料人" v-model="hform.HKeeperName" |
| | | @input="HScatterUserChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">领料:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHEmpName" placeholder="请输入(或扫描)领料人" v-model="hform.HSecManagerName" |
| | | @input="HCollectUserChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">部门:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHDeptName" placeholder="请选择部门" v-model="hform.HDeptName" |
| | | @input="HDeptNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">往来类型:</view> |
| | | <view class="right" v-show="showHSourceBillNo"> |
| | | <uni-combox :candidates="['供应商','客户','部门']" placeholder="请选择类型" v-model="hform.TypeName" |
| | | @input="HSelectTypeChange"></uni-combox> |
| | | </view> |
| | | <view class="right" v-show="!showHSourceBillNo"> |
| | | <input name="TypeName" disabled v-model="hform.TypeName" placeholder="" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">往来单位:</view> |
| | | <view class="right" v-show="showHSourceBillNo"> |
| | | <uni-combox :candidates="arrayHSelectType" placeholder="请选择" v-model="hform.HSupName" |
| | | @input="HSupNameChange"></uni-combox> |
| | | </view> |
| | | <view class="right" v-show="!showHSourceBillNo"> |
| | | <input name="HSupName" disabled v-model="hform.HSupName" placeholder="" /> |
| | | </view> |
| | | </view> |
| | | <view class="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">表头信息</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">模具信息</view> |
| | | </view> |
| | | <view v-if="tabs == 0"> |
| | | <view class="form-item"> |
| | | <view class="title">日期:</view> |
| | | <view class="right"> |
| | | <picker mode="date" v-model="hform.HDate" @change="HDateChange"> |
| | | <view class="picker-overlay"></view> |
| | | <input disabled v-model="hform.HDate" placeholder="请选择日期" /> |
| | | </picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">源单类型:</view> |
| | | <view class="right" v-show="showHMainSourceBillType"> |
| | | <picker :range="arrayHMainSourceBillType" @change="HMainSourceBillTypeChange"> |
| | | <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType" |
| | | placeholder="请选择源单类型" /> |
| | | <view class="picker-overlay"></view> |
| | | </picker> |
| | | </view> |
| | | <view class="righton" v-show="!showHMainSourceBillType"> |
| | | <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType" |
| | | placeholder="请选择源单类型" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">源单单号:</view> |
| | | <view class="right" v-show="showHSourceBillNo"> |
| | | <!-- <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" placeholder="请输入源单单号" /> |
| | | |
| | | </view> |
| | | <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1"> |
| | | <uni-icons type="search" size="20" @click="showBillList"></uni-icons> |
| | | </view> |
| | | |
| | | <view class="righton" v-show="!showHSourceBillNo"> |
| | | <input name="HSourceBillNo" disabled v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | </view> |
| | | <!-- <view class="right" v-show="showHSourceBillNo"> |
| | | <input :focus="HSourceBillNoFocus" type="text" name="HSourceBillNo" |
| | | v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | |
| | | </view> |
| | | <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1"> |
| | | <uni-icons type="search" size="20" @click="showBillList"></uni-icons> |
| | | </view> |
| | | |
| | | <view class="righton" v-show="!showHSourceBillNo"> |
| | | <input name="HSourceBillNo" disabled v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | </view> |
| | | <!-- <view class="right" v-show="showHSourceBillNo"> |
| | | <uni-combox ref="uniComboxSourceBill" :isFocus="HSourceBillNoFocus" |
| | | :confirm-call="onSourceBillBlurHandler" v-if="reHSourceBillNo" |
| | | :candidates="arrayHSourceBillNo" placeholder="请输入源单单号" v-model="hform.HSourceBillNo" |
| | |
| | | <view class="righton" v-show="!showHSourceBillNo"> |
| | | <input name="HSourceBillNo" disabled v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | </view> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">制单人:</view> |
| | | <view class="righton"> |
| | | <input name="HMaker" disabled v-model="hform.HMaker" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据号:</view> |
| | | <view class="righton"> |
| | | <input name="HBillNo" disabled v-model="hform.HBillNo" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据ID:</view> |
| | | <view class="righton"> |
| | | <input name="HInterID" disabled v-model="hform.HInterID" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view v-if="tabs==1"> |
| | | <view class="list" v-for="(item,index) in HMouldList" :key="index"> |
| | | <uni-card :title="item.器具名称" style="margin: 10px;" @tap="delMater(item, $event)"> |
| | | <!-- 器具代码作为可点击链接 --> |
| | | <view class="card-header"> |
| | | <text class="link-text">器具号:{{item.器具号}}</text> |
| | | </view> |
| | | |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>数量:</text>{{item.数量}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>器具条码:</text>{{item.器具条码}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="HMouldList.length == 0">暂无数据</view> |
| | | </view> |
| | | <view class="bottom-btn"> |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | <button v-if="btnType == 1 && !isEdit" class="btn-a" size="mini" @tap="submit">提交</button> |
| | | <!-- <button v-if="btnType != 1 && !isEdit" class="btn-a" size="mini" @tap="ifEdit">修改</button> --> |
| | | <button v-if="btnType != 1 " class="btn-a" size="mini" @tap="submit">提交</button> |
| | | </view> |
| | | </view> |
| | | <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType" |
| | | :HStockOrgID="hform.HStockOrgID"></BillListPopupVue> |
| | | <BillListPopupMouldVue @BillSelectComplete="MouldBillHandler" ref="billListMould"></BillListPopupMouldVue> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import getDateTime from '@/utils/getdateTime.js'; |
| | | import { |
| | | getUserInfo |
| | | } from "@/utils/auth.js"; |
| | | import { CommonUtils } from '@/utils/common'; |
| | | import BillListPopupVue from '../../../components/BillListPopup/BillListPopup.vue'; |
| | | import BillListPopupMouldVue from '../../../components/BillListPopup/BillListPopup_Mould.vue'; |
| | | export default { |
| | | data() { |
| | | return { |
| | | HSourceBillNoFocus: false, |
| | | barCodeFocus: true,//条码光标 |
| | | userInfo: getUserInfo(), |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | tabs: 0, |
| | | btnType:1,//1新增,3修改 |
| | | linterid:'', |
| | | arrayHEmpName: [], |
| | | HEmpNameList: [], |
| | | arrayHWHName: [], //仓库 |
| | | HWHNameList: [], |
| | | arrayHStockPlaceName: [], //仓位 |
| | | HStockPlaceNameList: [], |
| | | arrayHDeptName: [], //部门 |
| | | HDeptNameList: [], |
| | | arrayHCusName: [], //客户 |
| | | HCusNameList: [], |
| | | arrayHSupplierName:[],//供应商 |
| | | HSuplierList:[], |
| | | linterid: '', |
| | | HBillNo: '', |
| | | arrayHSelectType: [], // 往来单位下拉列表 |
| | | HSelectTypeList: [], // 往来单位完整数据列表 |
| | | showHStockPlaceName: true, |
| | | HMouldList:[], |
| | | isEdit: false, |
| | | |
| | | showHMainSourceBillType: true, |
| | | showHSourceBillNo: true, |
| | | HMainSourceBillType: uni.getStorageSync('billTypeName_3802') ? uni.getStorageSync('billTypeName_3802'):'领用申请单', |
| | | arrayHMainSourceBillType: ['领用申请单', '手工录入'], |
| | | arrayHMainSourceBillValue: ['3849', '-1'], |
| | | |
| | | hform: { |
| | | HBarCode: '', |
| | | HInterID: '', |
| | | HBillType: 3802, |
| | | HWHName: getUserInfo().HWhName, |
| | | HWHID: getUserInfo().HWhID, |
| | | HStockPlaceName: getUserInfo().HSPName, |
| | | HStockPlaceID: getUserInfo().HSPID, |
| | | HKeeperName: getUserInfo().HKeeperName, |
| | | HKeeperID: getUserInfo().HKeeperID,//发料人 |
| | | HSecManagerName: getUserInfo().HEmpName, |
| | | HSecManagerID: getUserInfo().HEmpID,//领料人 |
| | | HDeptName: getUserInfo().HDept, |
| | | HDeptID: getUserInfo().HDeptID, |
| | | //源单信息 |
| | | HMainSourceBillType: uni.getStorageSync('billType_3802') ? uni.getStorageSync('billType_3802'):3849, |
| | | HSourceBillNo: '', //CGDD000200 |
| | | //往来类型 |
| | | TypeName:uni.getStorageSync('typeName_3802'), |
| | | HSupName: '', // 往来单位选中的值 |
| | | HSupID: '' ,// 往来单位对应的ID |
| | | HSupTypeID:uni.getStorageSync('typeID_3802')?uni.getStorageSync('typeID_3802'):0, |
| | | HDate: getDateTime.dateTimeStr('y-m-d'), |
| | | HMaker: uni.getStorageSync('HUserName'), |
| | | |
| | | HRedBlueFlag:'false', |
| | | HStockOrgName: uni.getStorageSync('Organization'), |
| | | HStockOrgID: uni.getStorageSync('OrganizationID'), |
| | | HStockOutOrgID:uni.getStorageSync('OrganizationID'), |
| | | HBarCode_B:'', |
| | | HMouldName_B:'', |
| | | HMouldID_B:'', |
| | | HMouldCount_B:'', |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | BillListPopupVue, |
| | | BillListPopupMouldVue |
| | | }, |
| | | methods: { |
| | | searchModule() { |
| | | this.$refs['billListMould'].showPopup() |
| | | }, |
| | | MouldBillHandler(mould) { |
| | | if(!mould.enableMultiSourceBill){ |
| | | let val = mould.val[0] |
| | | this.hform.HBarCode = val['条码编号'] |
| | | this.getCode(this.hform.HBarCode) |
| | | } |
| | | this.$refs['billListMould'].exit() |
| | | }, |
| | | HSupNameChange(e) { |
| | | let index = this.arrayHSelectType.findIndex(el => el == e) |
| | | let HSupInfo = this.HSelectTypeList[index] |
| | | console.log('HSupInfo: ',HSupInfo); |
| | | |
| | | this.hform.HSupID = HSupInfo.HItemID |
| | | this.hform.HSupName = HSupInfo['部门名称'] || HSupInfo['客户名称'] || HSupInfo['供应商名称'] |
| | | |
| | | const pages = getCurrentPages() |
| | | // 获取页面栈中的最后一个元素,也就是当前显示的页面 |
| | | const currentPage = pages[pages.length - 1] |
| | | // 选择源单类型后 缓存当前页面选择 |
| | | uni.setStorageSync(`${currentPage.route.split("/").pop()}_${this.hform.HBillType}`, { |
| | | HSupName: HSupInfo['部门名称'] || HSupInfo['客户名称'] || HSupInfo['供应商名称'], |
| | | HSupID: HSupInfo.HItemID |
| | | }) |
| | | }, |
| | | loadCache(){ |
| | | const pages = getCurrentPages() |
| | | // 获取页面栈中的最后一个元素,也就是当前显示的页面 |
| | | const currentPage = pages[pages.length - 1] |
| | | // 选择源单类型后 缓存当前页面选择 |
| | | let cache = uni.getStorageSync(`${currentPage.route.split("/").pop()}_${this.hform.HBillType}`) |
| | | |
| | | this.hform.HSupID = cache.HSupID |
| | | this.hform.HSupName = cache.HSupName |
| | | }, |
| | | //扫码 |
| | | toScanCode() { |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval': '10', //超时时间 |
| | | 'timeoutText': '未识别到二维码' //超时提醒 |
| | | }, (ret) => { |
| | | console.log(ret.resp_result) |
| | | if (this.hform.HBarCode == '*') { |
| | | this.hform.HBarCode = this.hform.HBarCode + ret.resp_result |
| | | } else { |
| | | this.hform.HBarCode = ret.resp_result |
| | | } |
| | | |
| | | this.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | getNewData() { |
| | | CommonUtils.doRequest("/WEBSController/GetMaxBillNoAndID_Json", { |
| | | HBillType: this.hform.HBillType |
| | | }, |
| | | (res) => { |
| | | let res1 = res.data; |
| | | let { |
| | | data, |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.hform.HInterID = data[0].HInterID |
| | | this.hform.HBillNo = data[0].HBillNo |
| | | } else { |
| | | uni.showToast({ |
| | | title: data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | async getCode(HBarCode) { |
| | | //仓库、仓位文本框为空时,清空对应ID |
| | | if (!this.hform.HWHName) { |
| | | this.hform.HWHID = 0 |
| | | } |
| | | if (!this.hform.HStockPlaceName) { |
| | | this.hform.HStockPlaceID = 0 |
| | | } |
| | | var sHWHID = this.hform.HWHID |
| | | var sHSPID = this.hform.HStockPlaceID |
| | | var sOldBarCode = HBarCode; |
| | | var HDeleteFlag = sOldBarCode.substring(0, 1); //取条码第一个字符 |
| | | var sBarCode = sOldBarCode.slice(1); //获取第一个字符以外的全部字符 |
| | | var sSourceBillNo = this.hform.HSourceBillNo |
| | | var sSourceBillType =this.hform.HMainSourceBillType |
| | | if(sSourceBillType != -1&&sSourceBillNo==""){ |
| | | |
| | | uni.showToast({ |
| | | title: "请先选择源单", |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | if (HDeleteFlag == '*') { |
| | | if (sBarCode == "") { |
| | | uni.showToast({ |
| | | title: '请输入要删除的条码', |
| | | icon: 'none' |
| | | }); |
| | | } else { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: '/MouldController/set_DelMouldStockBillMain_Temp_Json', |
| | | data: { |
| | | HInterID: this.hform.HInterID, |
| | | HBillType: this.hform.HBillType, |
| | | HBarCode: sBarCode |
| | | }, |
| | | }) |
| | | |
| | | if (!res) { |
| | | return |
| | | } |
| | | |
| | | console.log('删除条码', res.data); |
| | | this.hform.HBarCode = ''; |
| | | if (res.data.count == 1) { |
| | | this.hform.HQty = '' |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | |
| | | } catch (err) { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | }else |
| | | { |
| | | var sBarCode = this.hform.HBarCode |
| | | try { |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: '/MouldController/Get_CheckTypeByMouldBarCode_Json', |
| | | data: { |
| | | sBarCode: sBarCode, |
| | | HInterID: this.hform.HInterID, |
| | | HBillType: this.hform.HBillType, |
| | | HBillNo: this.hform.HBillNo, |
| | | HMaker: this.hform.HMaker, |
| | | HWhID: sHWHID, |
| | | HSPID: sHSPID, |
| | | HSCWhID:0, |
| | | HSCSPID: 0, |
| | | HRedBlueFlag: this.hform.HRedBlueFlag, |
| | | HSourceBillNo: sSourceBillNo, |
| | | HSourceBillType: sSourceBillType, |
| | | HStockOrgID: this.hform.HStockOrgID, |
| | | HStockOutOrgID: this.hform.HStockOutOrgID, |
| | | }, |
| | | }) |
| | | |
| | | if (!res) { |
| | | return |
| | | } |
| | | |
| | | console.log('检查扫码返回的数据', res.data); |
| | | this.hform.HBarCode='' |
| | | if(res.data.count==1){ |
| | | this.tabs = 1 |
| | | this.DisBillEntryList() |
| | | this.showHMainSourceBillType = false |
| | | this.showHSourceBillNo = false |
| | | } |
| | | else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | |
| | | } catch (err) { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | //仓库监听事件 |
| | | HWHNameChange(e) { |
| | | for (var i = 0; i < this.HWHNameList.length; i++) { |
| | | if (this.HWHNameList[i]["HName"] == e) { |
| | | this.hform.HWHName = this.HWHNameList[i]["HName"] |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | |
| | | this.showHStockPlaceName = this.HWHNameList[i].HIsStockMgr |
| | | } |
| | | } |
| | | }, |
| | | HStockPlaceNameChange(e) { |
| | | for (var i = 0; i < this.HStockPlaceNameList.length; i++) { |
| | | if (this.HStockPlaceNameList[i]["HWhName"] == e) { |
| | | this.hform.HStockPlaceID = this.HStockPlaceNameList[i].HItemID |
| | | this.hform.HStockPlaceName = this.HStockPlaceNameList[i]["HWhName"] |
| | | } |
| | | } |
| | | }, |
| | | HScatterUserChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | this.hform.HKeeperID = this.HEmpNameList[i].HItemID |
| | | this.hform.HKeeperName = this.HEmpNameList[i].HName |
| | | } |
| | | } |
| | | }, |
| | | HCollectUserChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | this.hform.HSecManagerID = this.HEmpNameList[i].HItemID |
| | | this.hform.HSecManagerName = this.HEmpNameList[i].HName |
| | | } |
| | | } |
| | | }, |
| | | /* #region 仓库仓位获取下拉框 */ |
| | | getHBaseList() { |
| | | CommonUtils.doRequest( |
| | | "/Web/GetWarehouseList_Json_New", { |
| | | Warehouse: "", |
| | | HOrgID: uni.getStorageSync('OrganizationID') |
| | | }, |
| | | (res) => { |
| | | let res1 = res.data |
| | | let { |
| | | data, |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.HWHNameList = data |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHWHName[i] = data[i]["HName"] |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓库数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | ) |
| | | CommonUtils.doRequest( |
| | | "/WEBSController/GetStockPlaceList_Json", { |
| | | StockPlace: '', |
| | | HWhID: this.hform.HWHID, |
| | | HStockOrgID: uni.getStorageSync('OrganizationID') |
| | | }, |
| | | (res) => { |
| | | let res1 = res.data |
| | | console.log(res1) |
| | | let { |
| | | data, |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.HStockPlaceNameList = data |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = data[i]["HWhName"] |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | ) |
| | | }, |
| | | /* #endregion */ |
| | | getHEmpList() { |
| | | CommonUtils.doRequest("/Web/GetEmployeeList_Json", { |
| | | Employee: '', |
| | | HGroupID: 0 |
| | | }, |
| | | (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HEmpNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHEmpName[i] = res.data.data[i].HName |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '人员数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | ) |
| | | }, |
| | | //获取使用部门数据 |
| | | getHDeptList() { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_Department/list', |
| | | data: { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HDeptNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHDeptName[i] = res.data.data[i].部门名称 |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '部门数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | getHCusList() { |
| | | CommonUtils.doRequest( |
| | | "/Gy_Customer/list", { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | (res) => { |
| | | let res1 = res.data |
| | | let { |
| | | data, |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.HCusNameList = data |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHCusName[i] = data[i].客户名称 |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | ) |
| | | }, |
| | | getHSupList() |
| | | { |
| | | CommonUtils.doRequest( |
| | | "/Gy_Supplier/list", { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | (res) => { |
| | | let res1 = res.data |
| | | let { |
| | | data, |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.HSuplierList = data |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHSupplierName[i] = data[i].供应商名称 |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | ) |
| | | }, |
| | | //选择使用部门 |
| | | HDeptNameChange(e) { |
| | | for (var i = 0; i < this.HDeptNameList.length; i++) { |
| | | if (this.HDeptNameList[i].部门名称 == e) { |
| | | this.hform.HDeptID = this.HDeptNameList[i].HItemID |
| | | this.hform.HDeptName = this.HDeptNameList[i].部门名称 |
| | | } |
| | | } |
| | | }, |
| | | HDateChange(e) { |
| | | console.log(e.detail.value) |
| | | this.hform.HDate = e.detail.value |
| | | }, |
| | | HSelectTypeChange(e) |
| | | { |
| | | this.hform.TypeName=e; |
| | | this.hform.HSupName = ''; // 清空往来单位选择 |
| | | this.hform.HSupID = ''; |
| | | uni.setStorageSync("typeName_3802",e); |
| | | if(e=='部门') |
| | | { |
| | | this.hform.HSupTypeID=3; |
| | | uni.setStorageSync("typeID_3802",3); |
| | | this.arrayHSelectType = this.arrayHDeptName; |
| | | this.HSelectTypeList = this.HDeptNameList; |
| | | } |
| | | else if(e === '供应商') { |
| | | this.hform.HSupTypeID=1; |
| | | uni.setStorageSync("typeID_3802",1); |
| | | this.arrayHSelectType = this.arrayHSupplierName; |
| | | this.HSelectTypeList = this.HSuplierList; |
| | | } else if(e === '客户') { |
| | | // 客户数据 - 这里留空,后续添加获取客户数据的逻辑 |
| | | this.hform.HSupTypeID=2; |
| | | uni.setStorageSync("typeID_3802",2); |
| | | this.arrayHSelectType =this.arrayHCusName; |
| | | this.HSelectTypeList = this.HCusNameList; |
| | | } else { |
| | | uni.setStorageSync("typeID_3802",0); |
| | | this.arrayHSelectType = []; |
| | | this.HSelectTypeList = []; |
| | | } |
| | | }, |
| | | //器具信息 |
| | | DisBillEntryList() { |
| | | CommonUtils.doRequest( |
| | | "/MouldController/GetMouldBillEntryTmpList_Json", { |
| | | HInterID: this.hform.HInterID, |
| | | HBillNo: this.hform.HBillNo, |
| | | HBillType: this.hform.HBillType |
| | | }, |
| | | (res) => { |
| | | console.log('器具', res.data) |
| | | var data = res.data.data |
| | | this.HMouldList = data; |
| | | if (res.data.count==0) { |
| | | this.HMouldList = []; |
| | | this.hform.HMouldCount_B = '' |
| | | this.hform.HMouldID_B = '' |
| | | this.hform.HMouldName_B = '' |
| | | |
| | | } else { |
| | | this.hform.HMouldCount_B = data[0].HQty |
| | | this.hform.HMouldID_B = data[0].HMouldID |
| | | this.hform.HMouldName_B = data[0].HMouldName |
| | | this.hform.HBarCode_B=data[0].HBarCode |
| | | } |
| | | }, |
| | | |
| | | ) |
| | | }, |
| | | goBack() { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要退出当前页面吗?', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/MJGL/mujulingliaochukudan/MouldProdOutBillList' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | ifEdit(){ |
| | | this.isEdit = true |
| | | this.hform.eventType = 'Modify' |
| | | }, |
| | | //编辑回显 |
| | | getEditData(linterid,HBillNo){ |
| | | //主表 |
| | | var sWhere = " and hmainid='" + linterid + "'"; |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MouldProdOutBill/list_byPage', |
| | | data: { sWhere: this.sWhere, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization'), |
| | | page:1, |
| | | size:100 }, |
| | | success: (res) => { |
| | | console.log(1,res.data.data[0]); |
| | | if(res.data.code == 1){ |
| | | var data = res.data.data[0] |
| | | this.btnType=3 |
| | | this.hform.HInterID= data.hmainid |
| | | this.hform.HBillNo= data.单据号 |
| | | // this.hform.HBarCode= data.条形码 视图中没有该字段 |
| | | this.hform.HDeptID= data.HDeptID |
| | | this.hform.HDeptName= data.部门 |
| | | this.hform.HSecManagerName= data.领料人 |
| | | this.hform.HSecManagerID= data.hsecmanagerid |
| | | this.hform.HKeeperID= data.hkeeperid |
| | | this.hform.HKeeperName= data.发料人 |
| | | // this.hform.HRemark= data.表头备注 |
| | | this.hform.HDate = data.日期.substr(0,10) |
| | | |
| | | this.hform.HWHID=data.HWHID, |
| | | this.hform.HWHName=data.仓库, |
| | | this.hform.HStockPlaceID=data.HSPID, |
| | | this.hform.HStockPlaceName=data.仓位, |
| | | |
| | | this.hform.HSupName=data.往来单位, |
| | | this.hform.HSupID=data.HSupID, |
| | | this.hform.TypeName=data.往来类型名称, |
| | | this.hform.HSupTypeID=data.往来类型, |
| | | |
| | | this.hform.HMouldID_B=data.hmaterid, |
| | | // this.hform.HMouldID_B=data.模具代码, |
| | | this.hform.HMouldName_B=data.模具名称, |
| | | // this.hform.HMouldModel=data.模具规格, |
| | | this.hform.HMouldCount_B=1, |
| | | this.hform.HRedBlueFlag=data.红蓝单标记=='蓝字'?false:true, |
| | | |
| | | |
| | | this.hform.HStockOrgID=data.HStockOrgID, |
| | | this.hform.HStockOrgName=data.库存组织, |
| | | // this.hform.HICMOEntryID=data.HICMOEntryID, |
| | | // this.hform.HProcExchBillNo=data.HProcExchBillNo, |
| | | // this.hform.HProcExchInterID=data.HProcExchInterID, |
| | | // this.hform.HProcExchEntryID=data.HProcExchEntryID, |
| | | // this.hform.HOrgID=data.HOrgID, |
| | | |
| | | this.hform.HMaker= data.制单人 |
| | | //this.hform.HMakeDate= data.制单日期 |
| | | //this.hform.HUpDater= data.修改人 |
| | | //this.hform.HUpDateDate= data.修改日期 |
| | | // this.hform.HChecker= data.审核人 |
| | | // this.hform.HCheckDate= data.审核日期 |
| | | // this.hform.HDeleteMan= data.作废人 |
| | | // this.hform.HDeleteDate= data.作废日期 |
| | | }else{ |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | async submit() { |
| | | //仓库、仓位、保管、验收、部门、供应商文本框为空时,清空对应ID |
| | | if (!this.hform.HWHName) { |
| | | this.hform.HWHID = 0 |
| | | } |
| | | if (!this.hform.HStockPlaceName) { |
| | | this.hform.HStockPlaceID = 0 |
| | | } |
| | | if (!this.hform.HKeeperName) { |
| | | this.hform.HKeeperID = 0 |
| | | } |
| | | |
| | | if (!this.hform.HSecManagerName) { |
| | | this.hform.HSecManagerID = 0 |
| | | } |
| | | |
| | | if (!this.hform.HDeptName) { |
| | | this.hform.HDeptID = 0 |
| | | } |
| | | if (!this.hform.HSupName) { |
| | | this.hform.HSupID = 0 |
| | | } |
| | | if (this.hform.HInterID == 0 || !this.hform.HInterID) { |
| | | uni.showToast({ |
| | | title: '单据内码获取失败,错误的单据内码!', |
| | | icon: 'none' |
| | | }) |
| | | } else if (!this.hform.HBillNo) { |
| | | uni.showToast({ |
| | | title: '单据号获取失败,错误的单据号!', |
| | | icon: 'none' |
| | | }) |
| | | } else { |
| | | if (this.hform.HMouldID_B == 0||this.hform.HMouldID_B ==null) { |
| | | uni.showToast({ |
| | | title: '没有扫描器具条码,请先扫描器具条码,确认无误后再提交!', |
| | | icon: 'none' |
| | | }) |
| | | } else { |
| | | uni.showLoading({ |
| | | title: '请稍候' |
| | | }) |
| | | |
| | | |
| | | let sMainStr = JSON.stringify(this.hform); |
| | | console.log("主表:" + sMainStr) |
| | | try { |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: '/MouldController/set_SaveMouldProdOutBill_Json', |
| | | method: 'POST', |
| | | data: { |
| | | oMain: sMainStr |
| | | }, |
| | | }) |
| | | |
| | | if (!res) { |
| | | return |
| | | } |
| | | |
| | | console.log(1, res); |
| | | uni.hideLoading() |
| | | if (res.data.count == 1) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/MJGL/mujulingliaochukudan/MouldProdOutBill' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | // uni.showToast({ |
| | | // title: res.data.Message, |
| | | // icon: 'none' |
| | | // }) |
| | | uni.showModal({ |
| | | content: res.data.Message, |
| | | showCancel: false, |
| | | complete() { |
| | | uni.hideLoading() |
| | | } |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | console.warn(err); |
| | | uni.showToast({ |
| | | title: '接口请求失败:' + err, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | showBillList() { |
| | | this.$refs.billList.showPopup() |
| | | }, |
| | | //选择源单类型 |
| | | HMainSourceBillTypeChange(e) { |
| | | this.HMainSourceBillType = this.arrayHMainSourceBillType[e.detail.value] |
| | | |
| | | let index = this.arrayHMainSourceBillType.findIndex(e => e == this.HMainSourceBillType) |
| | | if (index != -1) { |
| | | this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[index] |
| | | // this.getHYDList() |
| | | } |
| | | console.log(this.hform.HMainSourceBillType) |
| | | uni.setStorageSync("billType_3802",this.hform.HMainSourceBillType); |
| | | uni.setStorageSync("billTypeName_3802",this.HMainSourceBillType); |
| | | }, |
| | | //选中源单 |
| | | getHBarCodeData(HBarCode) { |
| | | uni.request({ |
| | | url: this.serverUrl + '/MouldController/Get_SourceBarCode_ProdOut_Json', |
| | | data: { |
| | | HInterID: this.hform.HInterID, |
| | | HBillNo: this.hform.HBillNo, |
| | | HBillType: this.hform.HBillType, |
| | | HSourceBillNo: HBarCode, |
| | | HSourceBillType: this.hform.HMainSourceBillType, |
| | | HMaker: this.hform.HMaker, |
| | | HStockOrgID: this.hform.HStockOrgID |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | var data = res.data.data[0] |
| | | console.log(2, data); |
| | | |
| | | this.hform.HSourceBillNo = data.HSourceBillNo |
| | | this.showHMainSourceBillType = false |
| | | //默认非多源单 |
| | | this.showHSourceBillNo = false |
| | | //设置往来单位 |
| | | this.hform.HSupTypeID = data.HCorrespondentTypeID |
| | | this.hform.HSupID = data.HCorrespondentID |
| | | this.hform.HSupName = data.HCorrespondentName |
| | | if(data.HCorrespondentTypeID==1){ |
| | | this.hform.TypeName = "供应商" |
| | | }else if(data.HCorrespondentTypeID==2){ |
| | | this.hform.TypeName = "客户" |
| | | }else{ |
| | | this.hform.TypeName = "部门" |
| | | } |
| | | |
| | | |
| | | this.tabs = 1 |
| | | CommonUtils.playSound(1) |
| | | //光标对准条码 |
| | | this.refreshBarCodeState() |
| | | this.DisBillEntryList() |
| | | } else { |
| | | console.log('res.data.Message: ', res.data.Message); |
| | | CommonUtils.playSound(0) |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0) |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | async refreshBarCodeState() { |
| | | this.barCodeFocus = false |
| | | await this.$nextTick(() => { |
| | | this.barCodeFocus = true |
| | | this.hform.HBarCode = "" |
| | | }) |
| | | }, |
| | | |
| | | delMater(item) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要删除 "' + item.器具号 + '" 所有扫码记录?删除后将不可恢复!', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | uni.request({ |
| | | url: this.serverUrl + |
| | | '/MouldController/set_DelMouldStockBillMain_Temp_Json', |
| | | data: { |
| | | HInterID: this.hform.HInterID, |
| | | HBarCode: item.HBarCode, |
| | | 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' |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | onLoad(e) { |
| | | console.log(e, this.userInfo) |
| | | console.log(getUserInfo().HEmpName) |
| | | if(e.linterid){ |
| | | this.btnType = 3 |
| | | this.linterid = e.linterid |
| | | this.HBillNo = e.HBillNo |
| | | this.getEditData(e.linterid, e.HBillNo) |
| | | }else{ |
| | | this.getNewData() |
| | | } |
| | | |
| | | this.getHBaseList() |
| | | this.getHCusList() |
| | | this.getHEmpList() |
| | | this.getHDeptList() |
| | | this.getHSupList() |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">制单人:</view> |
| | | <view class="righton"> |
| | | <input name="HMaker" disabled v-model="hform.HMaker" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据号:</view> |
| | | <view class="righton"> |
| | | <input name="HBillNo" disabled v-model="hform.HBillNo" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据ID:</view> |
| | | <view class="righton"> |
| | | <input name="HInterID" disabled v-model="hform.HInterID" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view v-if="tabs==1"> |
| | | <view class="list" v-for="(item,index) in HMouldList" :key="index"> |
| | | <uni-card :title="item.器具名称" style="margin: 10px;" @tap="delMater(item, $event)"> |
| | | <!-- 器具代码作为可点击链接 --> |
| | | <view class="card-header"> |
| | | <text class="link-text">器具号:{{item.器具号}}</text> |
| | | </view> |
| | | |
| | | setTimeout(() => { |
| | | this.HSelectTypeChange(this.hform.TypeName) |
| | | //初始化往来单位 |
| | | if(this.hform.TypeName=='部门') |
| | | { |
| | | this.hform.HSupName = getUserInfo().HDept; // 清空往来单位选择 |
| | | this.hform.HSupID = getUserInfo().HDeptID; |
| | | } |
| | | else if(this.hform.TypeName === '供应商') { |
| | | this.hform.HSupName = getUserInfo().HSupName; // 清空往来单位选择 |
| | | this.hform.HSupID = getUserInfo().HSupID; |
| | | } else if(this.hform.TypeName === '客户') { |
| | | |
| | | } |
| | | this.$nextTick(() => { |
| | | this.loadCache() |
| | | }) |
| | | |
| | | }, 300); |
| | | uni.$on('BillSelectComplete', (e) => { |
| | | console.log("接收到的消息: ", e.HBillNo) |
| | | this.getHBarCodeData(e.HBillNo) |
| | | this.$refs.billList.exit() |
| | | }) |
| | | //this.getHEmpList() |
| | | }, |
| | | //重要选择源单必须添加这个否则出现严重bug |
| | | onUnload() { |
| | | uni.$off('BillSelectComplete') |
| | | }, |
| | | } |
| | | } |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>数量:</text>{{item.数量}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>器具条码:</text>{{item.器具条码}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="HMouldList.length == 0">暂无数据</view> |
| | | </view> |
| | | <view class="bottom-btn"> |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | <button v-if="btnType == 1 && !isEdit" class="btn-a" size="mini" @tap="submit">提交</button> |
| | | <!-- <button v-if="btnType != 1 && !isEdit" class="btn-a" size="mini" @tap="ifEdit">修改</button> --> |
| | | <button v-if="btnType != 1 " class="btn-a" size="mini" @tap="submit">提交</button> |
| | | </view> |
| | | </view> |
| | | <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType" |
| | | :HStockOrgID="hform.HStockOrgID"></BillListPopupVue> |
| | | <BillListPopupMouldVue @BillSelectComplete="MouldBillHandler" ref="billListMould"></BillListPopupMouldVue> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import getDateTime from '@/utils/getdateTime.js'; |
| | | import { |
| | | getUserInfo |
| | | } from "@/utils/auth.js"; |
| | | import { |
| | | CommonUtils |
| | | } from '@/utils/common'; |
| | | import BillListPopupVue from '../../../components/BillListPopup/BillListPopup.vue'; |
| | | import BillListPopupMouldVue from '../../../components/BillListPopup/BillListPopup_Mould.vue'; |
| | | export default { |
| | | data() { |
| | | return { |
| | | HSourceBillNoFocus: false, |
| | | barCodeFocus: true, //条码光标 |
| | | userInfo: getUserInfo(), |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | tabs: 0, |
| | | btnType: 1, //1新增,3修改 |
| | | linterid: '', |
| | | arrayHEmpName: [], |
| | | HEmpNameList: [], |
| | | arrayHWHName: [], //仓库 |
| | | HWHNameList: [], |
| | | arrayHStockPlaceName: [], //仓位 |
| | | HStockPlaceNameList: [], |
| | | arrayHDeptName: [], //部门 |
| | | HDeptNameList: [], |
| | | arrayHCusName: [], //客户 |
| | | HCusNameList: [], |
| | | arrayHSupplierName: [], //供应商 |
| | | HSuplierList: [], |
| | | linterid: '', |
| | | HBillNo: '', |
| | | arrayHSelectType: [], // 往来单位下拉列表 |
| | | HSelectTypeList: [], // 往来单位完整数据列表 |
| | | showHStockPlaceName: true, |
| | | HMouldList: [], |
| | | isEdit: false, |
| | | |
| | | showHMainSourceBillType: true, |
| | | showHSourceBillNo: true, |
| | | HMainSourceBillType: uni.getStorageSync('billTypeName_3802') ? uni.getStorageSync('billTypeName_3802') : |
| | | '领用申请单', |
| | | arrayHMainSourceBillType: ['领用申请单', '手工录入'], |
| | | arrayHMainSourceBillValue: ['3849', '-1'], |
| | | |
| | | hform: { |
| | | HBarCode: '', |
| | | HInterID: '', |
| | | HBillType: 3802, |
| | | HWHName: getUserInfo().HWhName, |
| | | HWHID: getUserInfo().HWhID, |
| | | HStockPlaceName: getUserInfo().HSPName, |
| | | HStockPlaceID: getUserInfo().HSPID, |
| | | HKeeperName: getUserInfo().HKeeperName, |
| | | HKeeperID: getUserInfo().HKeeperID, //发料人 |
| | | HSecManagerName: getUserInfo().HEmpName, |
| | | HSecManagerID: getUserInfo().HEmpID, //领料人 |
| | | HDeptName: getUserInfo().HDeptName, |
| | | HDeptID: getUserInfo().HDeptID, |
| | | //源单信息 |
| | | HMainSourceBillType: uni.getStorageSync('billType_3802') ? uni.getStorageSync('billType_3802') : 3849, |
| | | HSourceBillNo: '', //CGDD000200 |
| | | //往来类型 |
| | | TypeName: uni.getStorageSync('typeName_3802'), |
| | | HSupName: '', // 往来单位选中的值 |
| | | HSupID: '', // 往来单位对应的ID |
| | | HSupTypeID: uni.getStorageSync('typeID_3802') ? uni.getStorageSync('typeID_3802') : 0, |
| | | HDate: getDateTime.dateTimeStr('y-m-d'), |
| | | HMaker: uni.getStorageSync('HUserName'), |
| | | |
| | | HRedBlueFlag: 'false', |
| | | HStockOrgName: uni.getStorageSync('Organization'), |
| | | HStockOrgID: uni.getStorageSync('OrganizationID'), |
| | | HStockOutOrgID: uni.getStorageSync('OrganizationID'), |
| | | HBarCode_B: '', |
| | | HMouldName_B: '', |
| | | HMouldID_B: '', |
| | | HMouldCount_B: '', |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | BillListPopupVue, |
| | | BillListPopupMouldVue |
| | | }, |
| | | methods: { |
| | | searchModule() { |
| | | this.$refs['billListMould'].showPopup() |
| | | }, |
| | | MouldBillHandler(mould) { |
| | | if (!mould.enableMultiSourceBill) { |
| | | let val = mould.val[0] |
| | | this.hform.HBarCode = val['条码编号'] |
| | | this.getCode(this.hform.HBarCode) |
| | | } |
| | | this.$refs['billListMould'].exit() |
| | | }, |
| | | HSupNameChange(e) { |
| | | let index = this.arrayHSelectType.findIndex(el => el == e) |
| | | let HSupInfo = this.HSelectTypeList[index] |
| | | console.log('HSupInfo: ', HSupInfo); |
| | | |
| | | this.hform.HSupID = HSupInfo.HItemID |
| | | this.hform.HSupName = HSupInfo['部门名称'] || HSupInfo['客户名称'] || HSupInfo['供应商名称'] |
| | | |
| | | const pages = getCurrentPages() |
| | | // 获取页面栈中的最后一个元素,也就是当前显示的页面 |
| | | const currentPage = pages[pages.length - 1] |
| | | // 选择源单类型后 缓存当前页面选择 |
| | | uni.setStorageSync(`${currentPage.route.split("/").pop()}_${this.hform.HBillType}`, { |
| | | HSupName: HSupInfo['部门名称'] || HSupInfo['客户名称'] || HSupInfo['供应商名称'], |
| | | HSupID: HSupInfo.HItemID |
| | | }) |
| | | }, |
| | | loadCache() { |
| | | const pages = getCurrentPages() |
| | | // 获取页面栈中的最后一个元素,也就是当前显示的页面 |
| | | const currentPage = pages[pages.length - 1] |
| | | // 选择源单类型后 缓存当前页面选择 |
| | | let cache = uni.getStorageSync(`${currentPage.route.split("/").pop()}_${this.hform.HBillType}`) |
| | | |
| | | this.hform.HSupID = cache.HSupID |
| | | this.hform.HSupName = cache.HSupName |
| | | }, |
| | | //扫码 |
| | | toScanCode() { |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval': '10', //超时时间 |
| | | 'timeoutText': '未识别到二维码' //超时提醒 |
| | | }, (ret) => { |
| | | console.log(ret.resp_result) |
| | | if (this.hform.HBarCode == '*') { |
| | | this.hform.HBarCode = this.hform.HBarCode + ret.resp_result |
| | | } else { |
| | | this.hform.HBarCode = ret.resp_result |
| | | } |
| | | |
| | | this.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | getNewData() { |
| | | CommonUtils.doRequest("/WEBSController/GetMaxBillNoAndID_Json", { |
| | | HBillType: this.hform.HBillType |
| | | }, |
| | | (res) => { |
| | | let res1 = res.data; |
| | | let { |
| | | data, |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.hform.HInterID = data[0].HInterID |
| | | this.hform.HBillNo = data[0].HBillNo |
| | | } else { |
| | | uni.showToast({ |
| | | title: data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | async getCode(HBarCode) { |
| | | //仓库、仓位文本框为空时,清空对应ID |
| | | if (!this.hform.HWHName) { |
| | | this.hform.HWHID = 0 |
| | | } |
| | | if (!this.hform.HStockPlaceName) { |
| | | this.hform.HStockPlaceID = 0 |
| | | } |
| | | var sHWHID = this.hform.HWHID |
| | | var sHSPID = this.hform.HStockPlaceID |
| | | var sOldBarCode = HBarCode; |
| | | var HDeleteFlag = sOldBarCode.substring(0, 1); //取条码第一个字符 |
| | | var sBarCode = sOldBarCode.slice(1); //获取第一个字符以外的全部字符 |
| | | var sSourceBillNo = this.hform.HSourceBillNo |
| | | var sSourceBillType = this.hform.HMainSourceBillType |
| | | if (sSourceBillType != -1 && sSourceBillNo == "") { |
| | | |
| | | uni.showToast({ |
| | | title: "请先选择源单", |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | if (HDeleteFlag == '*') { |
| | | if (sBarCode == "") { |
| | | uni.showToast({ |
| | | title: '请输入要删除的条码', |
| | | icon: 'none' |
| | | }); |
| | | } else { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: '/MouldController/set_DelMouldStockBillMain_Temp_Json', |
| | | data: { |
| | | HInterID: this.hform.HInterID, |
| | | HBillType: this.hform.HBillType, |
| | | HBarCode: sBarCode |
| | | }, |
| | | }) |
| | | |
| | | if (!res) { |
| | | return |
| | | } |
| | | |
| | | console.log('删除条码', res.data); |
| | | this.hform.HBarCode = ''; |
| | | if (res.data.count == 1) { |
| | | this.hform.HQty = '' |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | |
| | | } catch (err) { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | } else { |
| | | var sBarCode = this.hform.HBarCode |
| | | try { |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: '/MouldController/Get_CheckTypeByMouldBarCode_Json', |
| | | data: { |
| | | sBarCode: sBarCode, |
| | | HInterID: this.hform.HInterID, |
| | | HBillType: this.hform.HBillType, |
| | | HBillNo: this.hform.HBillNo, |
| | | HMaker: this.hform.HMaker, |
| | | HWhID: sHWHID, |
| | | HSPID: sHSPID, |
| | | HSCWhID: 0, |
| | | HSCSPID: 0, |
| | | HRedBlueFlag: this.hform.HRedBlueFlag, |
| | | HSourceBillNo: sSourceBillNo, |
| | | HSourceBillType: sSourceBillType, |
| | | HStockOrgID: this.hform.HStockOrgID, |
| | | HStockOutOrgID: this.hform.HStockOutOrgID, |
| | | }, |
| | | }) |
| | | |
| | | if (!res) { |
| | | return |
| | | } |
| | | |
| | | console.log('检查扫码返回的数据', res.data); |
| | | this.hform.HBarCode = '' |
| | | if (res.data.count == 1) { |
| | | this.tabs = 1 |
| | | this.DisBillEntryList() |
| | | this.showHMainSourceBillType = false |
| | | this.showHSourceBillNo = false |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | |
| | | } catch (err) { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | //仓库监听事件 |
| | | HWHNameChange(e) { |
| | | for (var i = 0; i < this.HWHNameList.length; i++) { |
| | | if (this.HWHNameList[i]["HName"] == e) { |
| | | this.hform.HWHName = this.HWHNameList[i]["HName"] |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | |
| | | this.showHStockPlaceName = this.HWHNameList[i].HIsStockMgr |
| | | } |
| | | } |
| | | }, |
| | | HStockPlaceNameChange(e) { |
| | | for (var i = 0; i < this.HStockPlaceNameList.length; i++) { |
| | | if (this.HStockPlaceNameList[i]["HWhName"] == e) { |
| | | this.hform.HStockPlaceID = this.HStockPlaceNameList[i].HItemID |
| | | this.hform.HStockPlaceName = this.HStockPlaceNameList[i]["HWhName"] |
| | | } |
| | | } |
| | | }, |
| | | HScatterUserChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | this.hform.HKeeperID = this.HEmpNameList[i].HItemID |
| | | this.hform.HKeeperName = this.HEmpNameList[i].HName |
| | | } |
| | | } |
| | | }, |
| | | HCollectUserChange(e) { |
| | | for (var i = 0; i < this.HEmpNameList.length; i++) { |
| | | if (this.HEmpNameList[i].HName == e) { |
| | | this.hform.HSecManagerID = this.HEmpNameList[i].HItemID |
| | | this.hform.HSecManagerName = this.HEmpNameList[i].HName |
| | | } |
| | | } |
| | | }, |
| | | /* #region 仓库仓位获取下拉框 */ |
| | | getHBaseList() { |
| | | CommonUtils.doRequest( |
| | | "/Web/GetWarehouseList_Json_New", { |
| | | Warehouse: "", |
| | | HOrgID: uni.getStorageSync('OrganizationID') |
| | | }, |
| | | (res) => { |
| | | let res1 = res.data |
| | | let { |
| | | data, |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.HWHNameList = data |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHWHName[i] = data[i]["HName"] |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓库数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | ) |
| | | CommonUtils.doRequest( |
| | | "/WEBSController/GetStockPlaceList_Json", { |
| | | StockPlace: '', |
| | | HWhID: this.hform.HWHID, |
| | | HStockOrgID: uni.getStorageSync('OrganizationID') |
| | | }, |
| | | (res) => { |
| | | let res1 = res.data |
| | | console.log(res1) |
| | | let { |
| | | data, |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.HStockPlaceNameList = data |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = data[i]["HWhName"] |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | ) |
| | | }, |
| | | /* #endregion */ |
| | | getHEmpList() { |
| | | CommonUtils.doRequest("/Web/GetEmployeeList_Json", { |
| | | Employee: '', |
| | | HGroupID: 0 |
| | | }, |
| | | (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HEmpNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHEmpName[i] = res.data.data[i].HName |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '人员数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | ) |
| | | }, |
| | | //获取使用部门数据 |
| | | getHDeptList() { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_Department/list', |
| | | data: { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | this.HDeptNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHDeptName[i] = res.data.data[i].部门名称 |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '部门数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | getHCusList() { |
| | | CommonUtils.doRequest( |
| | | "/Gy_Customer/list", { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | (res) => { |
| | | let res1 = res.data |
| | | let { |
| | | data, |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.HCusNameList = data |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHCusName[i] = data[i].客户名称 |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | ) |
| | | }, |
| | | getHSupList() { |
| | | CommonUtils.doRequest( |
| | | "/Gy_Supplier/list", { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | (res) => { |
| | | let res1 = res.data |
| | | let { |
| | | data, |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.HSuplierList = data |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHSupplierName[i] = data[i].供应商名称 |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | ) |
| | | }, |
| | | //选择使用部门 |
| | | HDeptNameChange(e) { |
| | | for (var i = 0; i < this.HDeptNameList.length; i++) { |
| | | if (this.HDeptNameList[i].部门名称 == e) { |
| | | this.hform.HDeptID = this.HDeptNameList[i].HItemID |
| | | this.hform.HDeptName = this.HDeptNameList[i].部门名称 |
| | | } |
| | | } |
| | | }, |
| | | HDateChange(e) { |
| | | console.log(e.detail.value) |
| | | this.hform.HDate = e.detail.value |
| | | }, |
| | | HSelectTypeChange(e) { |
| | | this.hform.TypeName = e; |
| | | this.hform.HSupName = ''; // 清空往来单位选择 |
| | | this.hform.HSupID = ''; |
| | | uni.setStorageSync("typeName_3802", e); |
| | | if (e == '部门') { |
| | | this.hform.HSupTypeID = 3; |
| | | uni.setStorageSync("typeID_3802", 3); |
| | | this.arrayHSelectType = this.arrayHDeptName; |
| | | this.HSelectTypeList = this.HDeptNameList; |
| | | } else if (e === '供应商') { |
| | | this.hform.HSupTypeID = 1; |
| | | uni.setStorageSync("typeID_3802", 1); |
| | | this.arrayHSelectType = this.arrayHSupplierName; |
| | | this.HSelectTypeList = this.HSuplierList; |
| | | } else if (e === '客户') { |
| | | // 客户数据 - 这里留空,后续添加获取客户数据的逻辑 |
| | | this.hform.HSupTypeID = 2; |
| | | uni.setStorageSync("typeID_3802", 2); |
| | | this.arrayHSelectType = this.arrayHCusName; |
| | | this.HSelectTypeList = this.HCusNameList; |
| | | } else { |
| | | uni.setStorageSync("typeID_3802", 0); |
| | | this.arrayHSelectType = []; |
| | | this.HSelectTypeList = []; |
| | | } |
| | | }, |
| | | //器具信息 |
| | | DisBillEntryList() { |
| | | CommonUtils.doRequest( |
| | | "/MouldController/GetMouldBillEntryTmpList_Json", { |
| | | HInterID: this.hform.HInterID, |
| | | HBillNo: this.hform.HBillNo, |
| | | HBillType: this.hform.HBillType |
| | | }, |
| | | (res) => { |
| | | console.log('器具', res.data) |
| | | var data = res.data.data |
| | | this.HMouldList = data; |
| | | if (res.data.count == 0) { |
| | | this.HMouldList = []; |
| | | this.hform.HMouldCount_B = '' |
| | | this.hform.HMouldID_B = '' |
| | | this.hform.HMouldName_B = '' |
| | | |
| | | } else { |
| | | this.hform.HMouldCount_B = data[0].HQty |
| | | this.hform.HMouldID_B = data[0].HMouldID |
| | | this.hform.HMouldName_B = data[0].HMouldName |
| | | this.hform.HBarCode_B = data[0].HBarCode |
| | | } |
| | | }, |
| | | |
| | | ) |
| | | }, |
| | | goBack() { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要退出当前页面吗?', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/MJGL/mujulingliaochukudan/MouldProdOutBillList' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | ifEdit() { |
| | | this.isEdit = true |
| | | this.hform.eventType = 'Modify' |
| | | }, |
| | | //编辑回显 |
| | | getEditData(linterid, HBillNo) { |
| | | //主表 |
| | | var sWhere = " and hmainid='" + linterid + "'"; |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MouldProdOutBill/list_byPage', |
| | | data: { |
| | | sWhere: this.sWhere, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization'), |
| | | page: 1, |
| | | size: 100 |
| | | }, |
| | | success: (res) => { |
| | | console.log(1, res.data.data[0]); |
| | | if (res.data.code == 1) { |
| | | var data = res.data.data[0] |
| | | this.btnType = 3 |
| | | this.hform.HInterID = data.hmainid |
| | | this.hform.HBillNo = data.单据号 |
| | | // this.hform.HBarCode= data.条形码 视图中没有该字段 |
| | | this.hform.HDeptID = data.HDeptID |
| | | this.hform.HDeptName = data.部门 |
| | | this.hform.HSecManagerName = data.领料人 |
| | | this.hform.HSecManagerID = data.hsecmanagerid |
| | | this.hform.HKeeperID = data.hkeeperid |
| | | this.hform.HKeeperName = data.发料人 |
| | | // this.hform.HRemark= data.表头备注 |
| | | this.hform.HDate = data.日期.substr(0, 10) |
| | | |
| | | this.hform.HWHID = data.HWHID, |
| | | this.hform.HWHName = data.仓库, |
| | | this.hform.HStockPlaceID = data.HSPID, |
| | | this.hform.HStockPlaceName = data.仓位, |
| | | |
| | | this.hform.HSupName = data.往来单位, |
| | | this.hform.HSupID = data.HSupID, |
| | | this.hform.TypeName = data.往来类型名称, |
| | | this.hform.HSupTypeID = data.往来类型, |
| | | |
| | | this.hform.HMouldID_B = data.hmaterid, |
| | | // this.hform.HMouldID_B=data.模具代码, |
| | | this.hform.HMouldName_B = data.模具名称, |
| | | // this.hform.HMouldModel=data.模具规格, |
| | | this.hform.HMouldCount_B = 1, |
| | | this.hform.HRedBlueFlag = data.红蓝单标记 == '蓝字' ? false : true, |
| | | |
| | | |
| | | this.hform.HStockOrgID = data.HStockOrgID, |
| | | this.hform.HStockOrgName = data.库存组织, |
| | | // this.hform.HICMOEntryID=data.HICMOEntryID, |
| | | // this.hform.HProcExchBillNo=data.HProcExchBillNo, |
| | | // this.hform.HProcExchInterID=data.HProcExchInterID, |
| | | // this.hform.HProcExchEntryID=data.HProcExchEntryID, |
| | | // this.hform.HOrgID=data.HOrgID, |
| | | |
| | | this.hform.HMaker = data.制单人 |
| | | //this.hform.HMakeDate= data.制单日期 |
| | | //this.hform.HUpDater= data.修改人 |
| | | //this.hform.HUpDateDate= data.修改日期 |
| | | // this.hform.HChecker= data.审核人 |
| | | // this.hform.HCheckDate= data.审核日期 |
| | | // this.hform.HDeleteMan= data.作废人 |
| | | // this.hform.HDeleteDate= data.作废日期 |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | async submit() { |
| | | //仓库、仓位、保管、验收、部门、供应商文本框为空时,清空对应ID |
| | | if (!this.hform.HWHName) { |
| | | this.hform.HWHID = 0 |
| | | } |
| | | if (!this.hform.HStockPlaceName) { |
| | | this.hform.HStockPlaceID = 0 |
| | | } |
| | | if (!this.hform.HKeeperName) { |
| | | this.hform.HKeeperID = 0 |
| | | } |
| | | |
| | | if (!this.hform.HSecManagerName) { |
| | | this.hform.HSecManagerID = 0 |
| | | } |
| | | |
| | | if (!this.hform.HDeptName) { |
| | | this.hform.HDeptID = 0 |
| | | } |
| | | if (!this.hform.HSupName) { |
| | | this.hform.HSupID = 0 |
| | | } |
| | | if (this.hform.HInterID == 0 || !this.hform.HInterID) { |
| | | uni.showToast({ |
| | | title: '单据内码获取失败,错误的单据内码!', |
| | | icon: 'none' |
| | | }) |
| | | } else if (!this.hform.HBillNo) { |
| | | uni.showToast({ |
| | | title: '单据号获取失败,错误的单据号!', |
| | | icon: 'none' |
| | | }) |
| | | } else { |
| | | if (this.hform.HMouldID_B == 0 || this.hform.HMouldID_B == null) { |
| | | uni.showToast({ |
| | | title: '没有扫描器具条码,请先扫描器具条码,确认无误后再提交!', |
| | | icon: 'none' |
| | | }) |
| | | } else { |
| | | uni.showLoading({ |
| | | title: '请稍候' |
| | | }) |
| | | |
| | | |
| | | let sMainStr = JSON.stringify(this.hform); |
| | | console.log("主表:" + sMainStr) |
| | | try { |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: '/MouldController/set_SaveMouldProdOutBill_Json', |
| | | method: 'POST', |
| | | data: { |
| | | oMain: sMainStr |
| | | }, |
| | | }) |
| | | |
| | | if (!res) { |
| | | return |
| | | } |
| | | |
| | | console.log(1, res); |
| | | uni.hideLoading() |
| | | if (res.data.count == 1) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/MJGL/mujulingliaochukudan/MouldProdOutBill' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | uni.showModal({ |
| | | content: res.data.Message, |
| | | showCancel: false, |
| | | complete() { |
| | | uni.hideLoading() |
| | | } |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | console.warn(err); |
| | | uni.showToast({ |
| | | title: '接口请求失败:' + err, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | showBillList() { |
| | | this.$refs.billList.showPopup() |
| | | }, |
| | | //选择源单类型 |
| | | HMainSourceBillTypeChange(e) { |
| | | this.HMainSourceBillType = this.arrayHMainSourceBillType[e.detail.value] |
| | | |
| | | let index = this.arrayHMainSourceBillType.findIndex(e => e == this.HMainSourceBillType) |
| | | if (index != -1) { |
| | | this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[index] |
| | | // this.getHYDList() |
| | | } |
| | | console.log(this.hform.HMainSourceBillType) |
| | | uni.setStorageSync("billType_3802", this.hform.HMainSourceBillType); |
| | | uni.setStorageSync("billTypeName_3802", this.HMainSourceBillType); |
| | | }, |
| | | //选中源单 |
| | | getHBarCodeData(HBarCode) { |
| | | uni.request({ |
| | | url: this.serverUrl + '/MouldController/Get_SourceBarCode_ProdOut_Json', |
| | | data: { |
| | | HInterID: this.hform.HInterID, |
| | | HBillNo: this.hform.HBillNo, |
| | | HBillType: this.hform.HBillType, |
| | | HSourceBillNo: HBarCode, |
| | | HSourceBillType: this.hform.HMainSourceBillType, |
| | | HMaker: this.hform.HMaker, |
| | | HStockOrgID: this.hform.HStockOrgID |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | var data = res.data.data[0] |
| | | console.log(2, data); |
| | | |
| | | this.hform.HSourceBillNo = data.HSourceBillNo |
| | | this.showHMainSourceBillType = false |
| | | //默认非多源单 |
| | | this.showHSourceBillNo = false |
| | | //设置往来单位 |
| | | this.hform.HSupTypeID = data.HCorrespondentTypeID |
| | | this.hform.HSupID = data.HCorrespondentID |
| | | this.hform.HSupName = data.HCorrespondentName |
| | | if (data.HCorrespondentTypeID == 1) { |
| | | this.hform.TypeName = "供应商" |
| | | } else if (data.HCorrespondentTypeID == 2) { |
| | | this.hform.TypeName = "客户" |
| | | } else { |
| | | this.hform.TypeName = "部门" |
| | | } |
| | | |
| | | |
| | | this.tabs = 1 |
| | | CommonUtils.playSound(1) |
| | | //光标对准条码 |
| | | this.refreshBarCodeState() |
| | | this.DisBillEntryList() |
| | | } else { |
| | | console.log('res.data.Message: ', res.data.Message); |
| | | CommonUtils.playSound(0) |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0) |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | async refreshBarCodeState() { |
| | | this.barCodeFocus = false |
| | | await this.$nextTick(() => { |
| | | this.barCodeFocus = true |
| | | this.hform.HBarCode = "" |
| | | }) |
| | | }, |
| | | |
| | | delMater(item) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要删除 "' + item.器具号 + '" 所有扫码记录?删除后将不可恢复!', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | uni.request({ |
| | | url: this.serverUrl + |
| | | '/MouldController/set_DelMouldStockBillMain_Temp_Json', |
| | | data: { |
| | | HInterID: this.hform.HInterID, |
| | | HBarCode: item.HBarCode, |
| | | 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' |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | onLoad(e) { |
| | | console.log(e, this.userInfo) |
| | | console.log(getUserInfo().HEmpName) |
| | | if (e.linterid) { |
| | | this.btnType = 3 |
| | | this.linterid = e.linterid |
| | | this.HBillNo = e.HBillNo |
| | | this.getEditData(e.linterid, e.HBillNo) |
| | | } else { |
| | | this.getNewData() |
| | | } |
| | | if (uni.getStorageSync('Organization') == "宁波市华舟包装有限公司") { |
| | | this.HSourceBillType = "手工录入"; // 显示名称 |
| | | this.hform.HSourceBillType = "-1"; // 对应的值 |
| | | } |
| | | this.getHBaseList() |
| | | this.getHCusList() |
| | | this.getHEmpList() |
| | | this.getHDeptList() |
| | | this.getHSupList() |
| | | |
| | | setTimeout(() => { |
| | | this.HSelectTypeChange(this.hform.TypeName) |
| | | //初始化往来单位 |
| | | if (this.hform.TypeName == '部门') { |
| | | this.hform.HSupName = getUserInfo().HDept; // 清空往来单位选择 |
| | | this.hform.HSupID = getUserInfo().HDeptID; |
| | | } else if (this.hform.TypeName === '供应商') { |
| | | this.hform.HSupName = getUserInfo().HSupName; // 清空往来单位选择 |
| | | this.hform.HSupID = getUserInfo().HSupID; |
| | | } else if (this.hform.TypeName === '客户') { |
| | | |
| | | } |
| | | this.$nextTick(() => { |
| | | this.loadCache() |
| | | }) |
| | | |
| | | }, 300); |
| | | uni.$on('BillSelectComplete', (e) => { |
| | | console.log("接收到的消息: ", e.HBillNo) |
| | | this.getHBarCodeData(e.HBillNo) |
| | | this.$refs.billList.exit() |
| | | }) |
| | | //this.getHEmpList() |
| | | }, |
| | | //重要选择源单必须添加这个否则出现严重bug |
| | | onUnload() { |
| | | uni.$off('BillSelectComplete') |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .form { |
| | | width: 668rpx; |
| | | margin: 20rpx auto; |
| | | padding-bottom: 240rpx; |
| | | } |
| | | |
| | | .tab_area { |
| | | width: 100%; |
| | | height: 50rpx; |
| | | } |
| | | |
| | | .other { |
| | | margin-top: 8rpx; |
| | | text-align: center; |
| | | font-size: 28rpx; |
| | | padding: 4rpx 18rpx; |
| | | color: #1890FF; |
| | | } |
| | | |
| | | .tabs { |
| | | width: 100%; |
| | | display: flex; |
| | | border-bottom: 1px solid #ddd; |
| | | margin: 20rpx 0; |
| | | |
| | | view { |
| | | width: 25%; |
| | | font-size: 30rpx; |
| | | color: #555; |
| | | text-align: center; |
| | | padding: 16rpx 0; |
| | | } |
| | | |
| | | .on { |
| | | color: #3a78ff; |
| | | font-weight: bold; |
| | | border-bottom: 3px solid #3a78ff; |
| | | } |
| | | } |
| | | |
| | | .form-item { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 30rpx; |
| | | padding: 6rpx 0; |
| | | gap: 12rpx; |
| | | |
| | | .title { |
| | | width: 208rpx; |
| | | flex-shrink: 0; |
| | | |
| | | text { |
| | | color: red; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | |
| | | .right { |
| | | // width: 450rpx; |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | position: relative; |
| | | display: flex; |
| | | |
| | | picker { |
| | | width: 100%; |
| | | } |
| | | |
| | | .uni-combox { |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | .righton { |
| | | // width: 450rpx; |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #e4e4e4; |
| | | background-color: #e4e4e4; |
| | | position: relative; |
| | | display: flex; |
| | | } |
| | | |
| | | input { |
| | | width: 100%; |
| | | padding: 8rpx 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | textarea { |
| | | width: 98%; |
| | | padding: 8rpx 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .icon-wrapper { |
| | | background-color: #3A78FF; |
| | | border-radius: 100%; |
| | | width: 52rpx; |
| | | height: 52rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex-shrink: 0; |
| | | |
| | | .uni-icons { |
| | | color: #fff !important; |
| | | } |
| | | } |
| | | |
| | | .icon-wrapper[disabled] { |
| | | background-color: rgba(228, 228, 228, 1); |
| | | pointer-events: none; |
| | | touch-action: none; |
| | | } |
| | | } |
| | | |
| | | .bottom-btn { |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | // height: 120rpx; |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | background-color: #fff; |
| | | box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4); |
| | | padding: 30rpx 40rpx 40rpx 40rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 10rpx; |
| | | |
| | | button { |
| | | border-radius: 50rpx; |
| | | width: 180rpx; |
| | | height: 66rpx; |
| | | line-height: 66rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .btn-a { |
| | | background-color: #3A78FF; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-b { |
| | | background-color: #41a863; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-c { |
| | | background-color: #acacac; |
| | | color: #fff; |
| | | // position: absolute; |
| | | // right: 120rpx; |
| | | } |
| | | |
| | | .btn-d { |
| | | background-color: #ff8901; |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | .list { |
| | | width: 100%; |
| | | |
| | | .card-detail { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | line-height: 120%; |
| | | |
| | | .detail { |
| | | // width: 50%; |
| | | font-size: 26rpx; |
| | | margin-bottom: 12rpx; |
| | | color: #555; |
| | | margin-right: 20rpx; |
| | | |
| | | text { |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .more { |
| | | color: #888; |
| | | font-size: 24rpx; |
| | | display: flex; |
| | | border-top: 1px solid #eee; |
| | | padding-top: 20rpx; |
| | | |
| | | .part { |
| | | width: 50%; |
| | | text-align: center; |
| | | } |
| | | } |
| | | } |
| | | .form { |
| | | width: 668rpx; |
| | | margin: 20rpx auto; |
| | | padding-bottom: 240rpx; |
| | | } |
| | | |
| | | .tab_area { |
| | | width: 100%; |
| | | height: 50rpx; |
| | | } |
| | | |
| | | .other { |
| | | margin-top: 8rpx; |
| | | text-align: center; |
| | | font-size: 28rpx; |
| | | padding: 4rpx 18rpx; |
| | | color: #1890FF; |
| | | } |
| | | |
| | | .tabs { |
| | | width: 100%; |
| | | display: flex; |
| | | border-bottom: 1px solid #ddd; |
| | | margin: 20rpx 0; |
| | | |
| | | view { |
| | | width: 25%; |
| | | font-size: 30rpx; |
| | | color: #555; |
| | | text-align: center; |
| | | padding: 16rpx 0; |
| | | } |
| | | |
| | | .on { |
| | | color: #3a78ff; |
| | | font-weight: bold; |
| | | border-bottom: 3px solid #3a78ff; |
| | | } |
| | | } |
| | | |
| | | .form-item { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 30rpx; |
| | | padding: 6rpx 0; |
| | | gap: 12rpx; |
| | | |
| | | .title { |
| | | width: 208rpx; |
| | | flex-shrink: 0; |
| | | |
| | | text { |
| | | color: red; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | |
| | | .right { |
| | | // width: 450rpx; |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | position: relative; |
| | | display: flex; |
| | | |
| | | picker { |
| | | width: 100%; |
| | | } |
| | | |
| | | .uni-combox { |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | .righton { |
| | | // width: 450rpx; |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #e4e4e4; |
| | | background-color: #e4e4e4; |
| | | position: relative; |
| | | display: flex; |
| | | } |
| | | |
| | | input { |
| | | width: 100%; |
| | | padding: 8rpx 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | textarea { |
| | | width: 98%; |
| | | padding: 8rpx 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .icon-wrapper { |
| | | background-color: #3A78FF; |
| | | border-radius: 100%; |
| | | width: 52rpx; |
| | | height: 52rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex-shrink: 0; |
| | | |
| | | .uni-icons { |
| | | color: #fff !important; |
| | | } |
| | | } |
| | | |
| | | .icon-wrapper[disabled] { |
| | | background-color: rgba(228, 228, 228, 1); |
| | | pointer-events: none; |
| | | touch-action: none; |
| | | } |
| | | } |
| | | |
| | | .bottom-btn { |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | // height: 120rpx; |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | background-color: #fff; |
| | | box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4); |
| | | padding: 30rpx 40rpx 40rpx 40rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 10rpx; |
| | | |
| | | button { |
| | | border-radius: 50rpx; |
| | | width: 180rpx; |
| | | height: 66rpx; |
| | | line-height: 66rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .btn-a { |
| | | background-color: #3A78FF; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-b { |
| | | background-color: #41a863; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-c { |
| | | background-color: #acacac; |
| | | color: #fff; |
| | | // position: absolute; |
| | | // right: 120rpx; |
| | | } |
| | | |
| | | .btn-d { |
| | | background-color: #ff8901; |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | .list { |
| | | width: 100%; |
| | | |
| | | .card-detail { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | line-height: 120%; |
| | | |
| | | .detail { |
| | | // width: 50%; |
| | | font-size: 26rpx; |
| | | margin-bottom: 12rpx; |
| | | color: #555; |
| | | margin-right: 20rpx; |
| | | |
| | | text { |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .more { |
| | | color: #888; |
| | | font-size: 24rpx; |
| | | display: flex; |
| | | border-top: 1px solid #eee; |
| | | padding-top: 20rpx; |
| | | |
| | | .part { |
| | | width: 50%; |
| | | text-align: center; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <input name="HInterID" disabled v-model="hform.HInterID" /> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="form-item"> |
| | | <view class="title">日期:</view> |
| | | <view class="right"> |
| | | <picker mode="date" v-model="hform.HDate" @change="HDateChange"> |
| | | <view class="picker-overlay"></view> |
| | | <input disabled v-model="hform.HDate" placeholder="请选择日期" /> |
| | | </picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">制单人:</view> |
| | | <view class="righton"> |
| | | <input name="HMaker" disabled v-model="hform.HMaker" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据号:</view> |
| | | <view class="righton"> |
| | | <input name="HBillNo" disabled v-model="hform.HBillNo" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据ID:</view> |
| | | <view class="righton"> |
| | | <input name="HInterID" disabled v-model="hform.HInterID" /> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <view v-if="tabs==1"> |
| | | <view class="list" v-for="(item,index) in HMouldList" :key="index"> |
| | |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="HMouldList.length == 0">暂无数据</view> |
| | | <!-- <view class="form-item"> |
| | | <view class="title">器具条码:</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="righton"> |
| | | <input disabled v-model="hform.HMouldName_B" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">器具号:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HMouldID_B" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">数量:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HMouldCount_B" /> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <view class="bottom-btn"> |
| | | <button class="btn-a" size="mini" @tap="submit">提交</button> |
| | |
| | | HStockPlaceName: getUserInfo().HSPName, |
| | | HStockPlaceID: getUserInfo().HSPID, |
| | | |
| | | HDeptName: getUserInfo().HDept, |
| | | HDeptName: getUserInfo().HDeptName, |
| | | HDeptID: getUserInfo().HDeptID, |
| | | HSecManagerID: getUserInfo().HEmpID, |
| | | HSecManagerName: getUserInfo().HEmpName, |
| | |
| | | HDeptID: uni.getStorageSync('HDeptID'), |
| | | HEmpName: uni.getStorageSync('HEmpName'), |
| | | HEmpID: uni.getStorageSync('HEmpID'), |
| | | HMangerName: uni.getStorageSync('HEmpName'), |
| | | HMangerID: uni.getStorageSync('HEmpID'), |
| | | HMangerName: uni.getStorageSync('HMangerName'), |
| | | HMangerID: uni.getStorageSync('HMangerID'), |
| | | |
| | | |
| | | HSourceName: '', |
| | |
| | | HBillType: HBillType |
| | | }, |
| | | success: (res) => { |
| | | console.log(2, res.data); |
| | | if (res.data.code == 1) { |
| | | var data = res.data.data[0]; |
| | | console.log(3, data); |
| | | var num = data.Num; |
| | | console.log(4, num); |
| | | switch (num) { |
| | | case 1: |
| | | this.hform.HSourceID = data.HItemID; |
| | |
| | | }); |
| | | return; |
| | | } |
| | | // 根据组织条件决定是否进行校验 |
| | | const isSpecialOrg = uni.getStorageSync('OrganizationID') == "100007" && |
| | | uni.getStorageSync('Organization') == "事业一处"; |
| | | |
| | | // 先调用模具档案检查,校验通过后才添加数据 |
| | | this.getMould_FC().then(isValid => { |
| | | if (isValid) { |
| | | this.tabs = 1; |
| | | // 检查模具是否已存在于表格中 |
| | | const existingIndex = this.listData.findIndex(item => |
| | | item.HMouldID === data.hmainid |
| | | ); |
| | | if (uni.getStorageSync('OrganizationID') == "100007" && uni |
| | | .getStorageSync('Organization') == "事业一处") { |
| | | if (existingIndex === -1) { |
| | | // 如果不存在,添加到表格 |
| | | uni.showToast({ |
| | | title: '当前检具不在当前物料的检具清单中', |
| | | icon: 'none', |
| | | duration: 1500 |
| | | }); |
| | | this.refreshBarCodeState(); |
| | | } else { |
| | | // 如果已存在,检查器具数量 |
| | | if (this.listData[existingIndex].器具数量 === 0) { |
| | | // 器具数量为0,更新条码并将数量变为1 |
| | | this.listData[existingIndex].器具条码 = this.hform |
| | | .HBarCode; |
| | | this.listData[existingIndex].器具数量 = 1; |
| | | uni.showToast({ |
| | | title: '扫描成功', |
| | | icon: 'success', |
| | | duration: 1500 |
| | | }); |
| | | this.refreshBarCodeState(); |
| | | } else { |
| | | // 器具数量已为1,提示不允许重复扫描 |
| | | uni.showToast({ |
| | | title: '该模具已扫描,不允许重复扫描', |
| | | icon: 'none', |
| | | duration: 1500 |
| | | }); |
| | | this.refreshBarCodeState(); |
| | | } |
| | | } |
| | | if (isSpecialOrg) { |
| | | // 特殊组织:需要调用模具档案检查 |
| | | this.getMould_FC().then(isValid => { |
| | | if (isValid) { |
| | | this.handleMouldData(data); |
| | | } else { |
| | | if (existingIndex === -1) { |
| | | // 如果不存在,添加到表格 |
| | | const newRow = { |
| | | index: this.listData.length + 1, |
| | | HMouldID: data.hmainid, |
| | | 器具编码: data.模具编号, |
| | | 器具名称: data.模具名称, |
| | | 器具型号: data.模具型号, |
| | | 器具条码: this.hform.HBarCode, |
| | | 器具数量: 1, |
| | | checked: false // 默认不选中 |
| | | }; |
| | | this.listData.push(newRow); |
| | | this.refreshBarCodeState(); |
| | | } else { |
| | | // 如果已存在,提示用户 |
| | | uni.showToast({ |
| | | title: '该模具已扫描', |
| | | icon: 'none', |
| | | duration: 1500 |
| | | }); |
| | | this.refreshBarCodeState(); |
| | | } |
| | | // 校验不通过,清空条码但不添加数据 |
| | | this.refreshBarCodeState(); |
| | | } |
| | | |
| | | } else { |
| | | // 校验不通过,清空条码但不添加数据 |
| | | }).catch(error => { |
| | | console.log('校验失败:', error); |
| | | this.refreshBarCodeState(); |
| | | } |
| | | }).catch(error => { |
| | | console.log('校验失败:', error); |
| | | this.refreshBarCodeState(); |
| | | }); |
| | | }); |
| | | } else { |
| | | // 其他组织:直接处理模具数据 |
| | | this.handleMouldData(data); |
| | | } |
| | | break; |
| | | |
| | | case 4: |
| | | this.hform.HProcExchBillNo = data.单据号; |
| | | this.hform.HProcExchInterID = data.hmainid; |
| | |
| | | }, |
| | | }); |
| | | }, |
| | | handleMouldData(data) { |
| | | this.tabs = 1; |
| | | // 检查模具是否已存在于表格中 |
| | | const existingIndex = this.listData.findIndex(item => |
| | | item.HMouldID === data.hmainid |
| | | ); |
| | | |
| | | const isSpecialOrg = uni.getStorageSync('OrganizationID') == "100007" && |
| | | uni.getStorageSync('Organization') == "事业一处"; |
| | | |
| | | if (isSpecialOrg) { |
| | | // 特殊组织:检查物料器具清单 |
| | | if (existingIndex === -1) { |
| | | // 如果不存在,说明不在当前物料的检具清单中 |
| | | uni.showToast({ |
| | | title: '当前检具不在当前物料的检具清单中', |
| | | icon: 'none', |
| | | duration: 1500 |
| | | }); |
| | | this.refreshBarCodeState(); |
| | | } else { |
| | | // 如果已存在,检查器具数量 |
| | | if (this.listData[existingIndex].器具数量 === 0) { |
| | | // 器具数量为0,更新条码并将数量变为1 |
| | | this.listData[existingIndex].器具条码 = this.hform.HBarCode; |
| | | this.listData[existingIndex].器具数量 = 1; |
| | | uni.showToast({ |
| | | title: '扫描成功', |
| | | icon: 'success', |
| | | duration: 1500 |
| | | }); |
| | | this.refreshBarCodeState(); |
| | | } else { |
| | | // 器具数量已为1,提示不允许重复扫描 |
| | | uni.showToast({ |
| | | title: '该模具已扫描,不允许重复扫描', |
| | | icon: 'none', |
| | | duration: 1500 |
| | | }); |
| | | this.refreshBarCodeState(); |
| | | } |
| | | } |
| | | } else { |
| | | // 其他组织:直接处理 |
| | | if (existingIndex === -1) { |
| | | // 如果不存在,添加到表格 |
| | | const newRow = { |
| | | index: this.listData.length + 1, |
| | | HMouldID: data.hmainid, |
| | | 器具编码: data.模具编号, |
| | | 器具名称: data.模具名称, |
| | | 器具型号: data.模具型号, |
| | | 器具条码: this.hform.HBarCode, |
| | | 器具数量: 1, |
| | | checked: false // 默认不选中 |
| | | }; |
| | | this.listData.push(newRow); |
| | | uni.showToast({ |
| | | title: '扫描成功', |
| | | icon: 'success', |
| | | duration: 1500 |
| | | }); |
| | | this.refreshBarCodeState(); |
| | | } else { |
| | | // 如果已存在,提示用户 |
| | | uni.showToast({ |
| | | title: '该模具已扫描', |
| | | icon: 'none', |
| | | duration: 1500 |
| | | }); |
| | | this.refreshBarCodeState(); |
| | | } |
| | | } |
| | | }, |
| | | //获取使用部门数据 |
| | | getHDeptList() { |
| | | uni.request({ |
| | |
| | | <view class="form-item"> |
| | | <view class="title"><text>*</text>条形码:</view> |
| | | <view class="right" style="width: 380rpx;"> |
| | | <input v-model="hform.HBarCode" disabled placeholder="请扫描条码" @blur="getHBarCodeData(hform.HBarCode)"/> |
| | | <input v-model="hform.HBarCode" placeholder="请扫描条码" @blur="getHBarCodeData(hform.HBarCode)"/> |
| | | </view> |
| | | <uni-icons type="scan" style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | |
| | | HBillNo:'', |
| | | HDate:getDateTime.dateTimeStr('y-m-d'), |
| | | HBarCode:'', |
| | | HDeptName:'', |
| | | HDeptID:'', |
| | | HEmpName:'', |
| | | HEmpID:'', |
| | | HMangerName:'', |
| | | HMangerID:'', |
| | | HDeptName: uni.getStorageSync('HDeptName'), |
| | | HDeptID: uni.getStorageSync('HDeptID'), |
| | | HEmpName: uni.getStorageSync('HEmpName'), |
| | | HEmpID: uni.getStorageSync('HEmpID'), |
| | | HMangerName: uni.getStorageSync('HMangerName'), |
| | | HMangerID: uni.getStorageSync('HMangerID'), |
| | | |
| | | |
| | | HSourceName:'', |
| | |
| | | getShiftsList() { |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Web/GetGy_ShiftsList_Json', |
| | | url: this.serverUrl + '/Gy_ShiftsController/Get_Gy_WorkShiftList', |
| | | data: { |
| | | Shifts: "" |
| | | sWhere: ` and 禁用标记 = '' and ISNULL(审核人,'') != '' and 使用组织名称 = '${uni.getStorageSync("Organization")}'`, |
| | | HMaker: getUserInfo()["Czymc"], |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | |
| | | onPullDownRefresh() { |
| | | this.onSearchClickHandler() |
| | | }, |
| | | onShow() { |
| | | // 每次页面显示时检查是否需要刷新 |
| | | if (this.needRefresh) { |
| | | this.onSearchClickHandler() |
| | | this.needRefresh = false |
| | | } |
| | | }, |
| | | async onReady() { |
| | | // #ifndef MP-WEIXIN |
| | | let query = uni.createSelectorQuery().in(this) |
| | |
| | | } |
| | | |
| | | console.log('下推签到单:', item) |
| | | this.needRefresh = true // 设置刷新标记 |
| | | uni.navigateTo({ |
| | | url: '/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackSignBill/OA_ErrMsgBackSignBill?OperationType=2&linterid=' + |
| | | item.HInterID + '&HEntryID=' + (item.HEntryID || 0) + '&HSouceBillType=4502', |
| | |
| | | } |
| | | |
| | | console.log('下推处理单:', item) |
| | | this.needRefresh = true // 设置刷新标记 |
| | | uni.navigateTo({ |
| | | url: '/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackHandleBill/OA_ErrMsgBackHandleBill?OperationType=2&linterid=' + |
| | | item.HInterID + '&HEntryID=' + (item.HEntryID || 0) + '&HSouceBillType=4502', |
| | |
| | | }) |
| | | return |
| | | } |
| | | |
| | | const currentUser = getUserInfo()["Czymc"]; |
| | | if (item.发送人 !== currentUser) { |
| | | uni.showToast({ |
| | | title: '当前单据发送人与登录用户不一致,不允许下推验收单', |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | console.log('下推验收单:', item) |
| | | this.needRefresh = true // 设置刷新标记 |
| | | uni.navigateTo({ |
| | | url: '/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackCheckBill/OA_ErrMsgBackCheckBill?OperationType=2&linterid=' + |
| | | item.HInterID + '&HEntryID=' + (item.HEntryID || 0) + '&HSouceBillType=4502', |
| | |
| | | HSampleDamageQty: 0, |
| | | TestType: '首检', |
| | | HBadNote: '', |
| | | HDeptName: '', |
| | | HDeptID: 0, |
| | | HCenterID: 0, |
| | | HDeptName: getUserInfo().HDeptName, |
| | | HDeptID: getUserInfo().HDeptID, |
| | | HCenterID: getUserInfo().HWorkCenterID, |
| | | HShiftsName: '', |
| | | HShiftsID: 0, |
| | | HGroupName: '', |
| | | HGroupID: 0, |
| | | HCheckEmpName: '', |
| | | HCheckEmp: '', |
| | | HSourceName: '', |
| | | HSourceID: 0, |
| | | HGroupName: getUserInfo().HGroupName, |
| | | HGroupID: getUserInfo().HGroupID, |
| | | HCheckEmpName: getUserInfo().HEmpName, |
| | | HCheckEmp: getUserInfo().HEmpID, |
| | | HSourceName: getUserInfo().HSourceName, |
| | | HSourceID: getUserInfo().HSourceID, |
| | | HDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HBillNo: '', |
| | | HInterID: 0, |
| | |
| | | this.GetEmployeeList() |
| | | this.getSourceList() |
| | | this.GetDepartmentList() |
| | | this.get_HWorkShift() |
| | | }, |
| | | methods: { |
| | | HDeptNameChangeHandler() { |
| | |
| | | url: '/Web/GetEmployeeList_Json', |
| | | data: { |
| | | Employee: '', |
| | | HGroupID: this.hform.HGroupID |
| | | HGroupID:0 |
| | | }, |
| | | resFunction: (res) => { |
| | | let { |
| | |
| | | "HICMOBillNo": data1[0].任务单号, //生产订单 |
| | | "HDeptID": data1[0].HWorkShopID, //车间ID |
| | | "HDeptName": data1[0].生产车间, //车间 |
| | | |
| | | }) |
| | | |
| | | uni.showToast({ |
| | |
| | | }) |
| | | return; |
| | | } |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hasSourceBill = true |
| | | this.hform.HICMOBillNo= data[0].任务单号 |
| | | this.hform.HICMOInterID= data[0].HICMOInterID |
| | | this.hform.HICMOEntryID= data[0].HICMOEntryID |
| | | this.hform.HICMOQty= data[0].生产数量 |
| | | this.hform.HProcExchBillNo= data[0].单据号 |
| | | this.hform.HProcExchInterID= data[0].HInterID |
| | | this.hform.HProcExchEntryID= data[0].HEntryID |
| | | this.hform.HProcExchQty= data[0].流转卡数量 |
| | | this.hform.HSourceName= data[0].生产资源 |
| | | this.hform.HSourceID= data[0].HSourceID |
| | | this.hform.HProcID= data[0].HProcID |
| | | this.hform.HProcName= data[0].当前工序 |
| | | |
| | | if(this.hform.HSourceBillType=="3791"){ //出站单 |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['单据号'] |
| | | this.hform.HSourceBillNo = data[0]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hasSourceBill = true |
| | | this.hform.HICMOBillNo= data[0].任务单号 |
| | | this.hform.HICMOInterID= data[0].HICMOInterID |
| | | this.hform.HICMOEntryID= data[0].HICMOEntryID |
| | | this.hform.HICMOQty= data[0].生产数量 |
| | | this.hform.HProcExchBillNo= data[0].HProcExchBillNo |
| | | this.hform.HProcExchInterID= data[0].HProcExchInterID |
| | | this.hform.HProcExchEntryID= data[0].HProcExchEntryID |
| | | this.hform.HProcExchQty= data[0].流转卡数量 |
| | | this.hform.HSourceName= data[0].生产资源 |
| | | this.hform.HSourceID= data[0].HSourceID |
| | | this.hform.HProcID= data[0].HProcID |
| | | this.hform.HProcName= data[0].工序名称 |
| | | this.hform.HCheckQty=data[0].出站数量 |
| | | }else{ |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hasSourceBill = true |
| | | this.hform.HICMOBillNo= data[0].任务单号 |
| | | this.hform.HICMOInterID= data[0].HICMOInterID |
| | | this.hform.HICMOEntryID= data[0].HICMOEntryID |
| | | this.hform.HICMOQty= data[0].生产数量 |
| | | this.hform.HProcExchBillNo= data[0].单据号 |
| | | this.hform.HProcExchInterID= data[0].HInterID |
| | | this.hform.HProcExchEntryID= data[0].HEntryID |
| | | this.hform.HProcExchQty= data[0].流转卡数量 |
| | | this.hform.HSourceName= data[0].生产资源 |
| | | this.hform.HSourceID= data[0].HSourceID |
| | | this.hform.HProcID= data[0].HProcID |
| | | this.hform.HProcName= data[0].当前工序 |
| | | } |
| | | this.get_CheckItem(); |
| | | } else { |
| | | CommonUtils.showTips({ |
| | |
| | | }) |
| | | return; |
| | | } |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hform.HICMOBillNo= data[0].任务单号 |
| | | this.hform.HICMOInterID= data[0].HICMOInterID |
| | | this.hform.HICMOEntryID= data[0].HICMOEntryID |
| | | this.hform.HICMOQty= data[0].生产数量 |
| | | this.hform.HProcExchBillNo= data[0].单据号 |
| | | this.hform.HProcExchInterID= data[0].HInterID |
| | | this.hform.HProcExchEntryID= data[0].HEntryID |
| | | this.hform.HProcExchQty= data[0].流转卡数量 |
| | | this.hform.HSourceName= data[0].生产资源 |
| | | this.hform.HSourceID= data[0].HSourceID |
| | | this.hform.HProcID= data[0].HProcID |
| | | this.hform.HProcName= data[0].当前工序 |
| | | |
| | | if(this.hform.HSourceBillType=="3791"){ |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['单据号'] |
| | | this.hform.HSourceBillNo = data[0]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hasSourceBill = true |
| | | this.hform.HICMOBillNo= data[0].任务单号 |
| | | this.hform.HICMOInterID= data[0].HICMOInterID |
| | | this.hform.HICMOEntryID= data[0].HICMOEntryID |
| | | this.hform.HICMOQty= data[0].生产数量 |
| | | this.hform.HProcExchBillNo= data[0].HProcExchBillNo |
| | | this.hform.HProcExchInterID= data[0].HProcExchInterID |
| | | this.hform.HProcExchEntryID= data[0].HProcExchEntryID |
| | | this.hform.HProcExchQty= data[0].流转卡数量 |
| | | this.hform.HSourceName= data[0].生产资源 |
| | | this.hform.HSourceID= data[0].HSourceID |
| | | this.hform.HProcID= data[0].HProcID |
| | | this.hform.HProcName= data[0].工序名称 |
| | | this.hform.HCheckQty=data[0].出站数量 |
| | | }else{ |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['单据号'] |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].HSourceBillQty |
| | | this.hform.HICMOBillNo= data[0].任务单号 |
| | | this.hform.HICMOInterID= data[0].HICMOInterID |
| | | this.hform.HICMOEntryID= data[0].HICMOEntryID |
| | | this.hform.HICMOQty= data[0].生产数量 |
| | | this.hform.HProcExchBillNo= data[0].单据号 |
| | | this.hform.HProcExchInterID= data[0].HInterID |
| | | this.hform.HProcExchEntryID= data[0].HEntryID |
| | | this.hform.HProcExchQty= data[0].流转卡数量 |
| | | this.hform.HSourceName= data[0].生产资源 |
| | | this.hform.HSourceID= data[0].HSourceID |
| | | this.hform.HProcID= data[0].HProcID |
| | | this.hform.HProcName= data[0].当前工序 |
| | | } |
| | | |
| | | this.get_CheckItem(); |
| | | this.hasSourceBill = true |
| | | this.$refs['billList'].exit() |
| | |
| | | CheckProjectID: this.hform.HQCSchemeID || 0, |
| | | HBatchQty: this.hform.HProcExchQty || 0, |
| | | HMaterID: this.hform.HMaterID, |
| | | HBillType: '生产入库检方案' |
| | | HBillType: '末件检方案' |
| | | }, |
| | | }); |
| | | |
| | |
| | | HUnit: data[i]["单位名称"], |
| | | HQCNote: "", |
| | | HAnalysisMethod: data[i]["分析方法"], |
| | | HResult: data[i]["默认结论"], |
| | | HResult: data[i]["HResult"], |
| | | HMax: "", |
| | | HMin: "", |
| | | HAvg: "", |
| | |
| | | checkItemsArray.push(checkItem); |
| | | } |
| | | console.log('checkItemsArray: ', checkItemsArray); |
| | | let sMainSub = `${JSON.stringify(this.hform)};${JSON.stringify( |
| | | checkItemsArray |
| | | )};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0]}`; |
| | | let sMainSub = `${JSON.stringify(this.hform)};${JSON.stringify(checkItemsArray)};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0]}`; |
| | | console.log("this.checkItems: ", this.checkItems); |
| | | |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | |
| | | } else if (this.operationType == 3) { |
| | | await this.RoadBillMain(); |
| | | } |
| | | |
| | | if (uni.getStorageSync('Organization') == "宁波市华舟包装有限公司") { |
| | | this.HSourceBillType = "工序出站汇报单"; // 显示名称 |
| | | this.hform.HSourceBillType = "3791"; // 对应的值 |
| | | } |
| | | await this.InitHSource(); |
| | | await this.InitHWorkShift(); |
| | | await this.InitHEmp(); |
| | |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | if(HSourceBillType=3772){ |
| | | if(this.hform.HSourceBillType=="3772"){ |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | |
| | | this.hform.HSourceID = data[0].HSourceID |
| | | this.hform.HProcID = data[0].HProcID |
| | | this.hform.HProcName = data[0].当前工序 |
| | | }else if(HSourceBillType=7521){ |
| | | } |
| | | else if(this.hform.HSourceBillType=="7521"){ |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HMainSourceBillNo = data[0].单据号 |
| | | this.hform.HSourceBillNo = data[0].单据号 |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | | this.hform.HQCSchemeID = data[0].检验方案ID |
| | | this.hform.HSourceBillQty = data[0].检验数量 |
| | | this.hasSourceBill = true |
| | | this.hform.HICMOBillNo = data[0].任务单号 |
| | | this.hform.HICMOInterID = data[0].HICMOInterID |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID |
| | |
| | | this.hform.HSourceID = data[0].HSourceID |
| | | this.hform.HProcID = data[0].HProcID |
| | | this.hform.HProcName = data[0].当前工序 |
| | | }else{ |
| | | this.hform.HTakeSampleCheckBillNo = data[0].单据号 |
| | | this.hform.HTakeSampleCheckBillID = data[0].HInterID |
| | | } |
| | | else{ |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | | this.hform.HMaterNumber = data[0]['产品代码'] |
| | | this.hform.HMainSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HSourceBillNo = data[0]['HBillNo'] |
| | | this.hform.HMainSourceBillNo = data[0].单据号 |
| | | this.hform.HSourceBillNo = data[0].单据号 |
| | | this.hform.HMainSourceInterID = data[0].HInterID |
| | | this.hform.HMainSourceEntryID = data[0].HEntryID |
| | | this.hform.HQCSchemeName = data[0].检验方案名称 |
| | |
| | | this.hform.HSourceID = data[0].HSourceID |
| | | this.hform.HProcID = data[0].HProcID |
| | | this.hform.HProcName = data[0].当前工序 |
| | | this.hform.HTakeSampleCheckBillNo = data[0].单据号 |
| | | this.hform.HTakeSampleCheckBillID = data[0].HInterID |
| | | }else{ |
| | | this.hform.HMaterID = data[0]['HMaterID'] |
| | | this.hform.HMaterName = data[0]['产品名称'] |
| | |
| | | CheckProjectID: this.hform.HQCSchemeID || 0, |
| | | HBatchQty: this.hform.HProcExchQty || 0, |
| | | HMaterID: this.hform.HMaterID, |
| | | HBillType: '生产入库检方案' |
| | | HBillType: '首件检方案' |
| | | }, |
| | | }); |
| | | |
| | |
| | | HUnit: data[i]["单位名称"], |
| | | HQCNote: "", |
| | | HAnalysisMethod: data[i]["分析方法"], |
| | | HResult: data[i]["默认结论"], |
| | | HResult: data[i]["HResult"], |
| | | HMax: "", |
| | | HMin: "", |
| | | HAvg: "", |
| | |
| | | await this.getMaxBillNo(); |
| | | |
| | | if(e.HSouceBillType=="7521"){ |
| | | this.hform.HSourceBillType="7521"; |
| | | if (uni.getStorageSync('Organization') == "宁波市华舟包装有限公司") { |
| | | this.HSourceBillType = "取样单"; // 显示名称 |
| | | this.hform.HSourceBillType = "7521"; // 对应的值 |
| | | } |
| | | this.hform.HTakeSampleCheckBillNo=e.HBillNo; |
| | | this.hform.HTakeSampleCheckBillID=e.linterid; |
| | | //取样单查询数据 |
| | |
| | | HReTransmitMan: '', // 转发至 |
| | | HSourceName: '', // 生产资源 |
| | | HSourceID: '0', // 生产资源ID |
| | | HCenterName: getUserInfo().HWorkCenter, // 车间 |
| | | HCenterName: getUserInfo().HWorkCenterName, // 车间 |
| | | HCenterID: getUserInfo().HWorkCenterID, // 车间ID |
| | | HQty: 0, // 数量 |
| | | HDeleteMan: '', // 作废人 |
| | |
| | | getShiftsList() { |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Web/GetGy_ShiftsList_Json', |
| | | url: this.serverUrl + '/Gy_ShiftsController/Get_Gy_WorkShiftList', |
| | | data: { |
| | | Shifts: "" |
| | | sWhere: ` and 禁用标记 = '' and ISNULL(审核人,'') != '' and 使用组织名称 = '${uni.getStorageSync("Organization")}'`, |
| | | HMaker: getUserInfo()["Czymc"], |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <image class="bg-img" src="../../static/login.jpg"></image> |
| | | <view class="container"> |
| | | <view class="title">{{ $t("login.title") }}</view> |
| | | <view class="box"> |
| | | <view class="logo"> |
| | | <image src="../../static/logo.png" mode=""></image> |
| | | </view> |
| | | <view class="login"> |
| | | <!-- <view class="item"> |
| | | <view class="content"> |
| | | <image class="bg-img" src="../../static/login.jpg"></image> |
| | | <view class="container"> |
| | | <view class="title">{{ $t("login.title") }}</view> |
| | | <view class="box"> |
| | | <view class="logo"> |
| | | <image src="../../static/logo.png" mode=""></image> |
| | | </view> |
| | | <view class="login"> |
| | | <!-- <view class="item"> |
| | | <view class="left">当前帐套:</view> |
| | | <picker :range="arrayDataBases" :value="DataBases" @change="DataBasesChange"> |
| | | <view class="right" style="display: flex;align-items: center;"> |
| | |
| | | </view> |
| | | </picker> |
| | | </view> --> |
| | | <view class="item"> |
| | | <view class="left">{{ $t("login.Language") }}:</view> |
| | | <picker :range="['中文','English']" :value="Language" @change="onLanguageChangeHandler"> |
| | | <view class="right" style="display: flex;align-items: center;"> |
| | | <input type="text" disabled v-model="Language" placeholder="请选择语言"> |
| | | <uni-icons type="forward" color="#808080" |
| | | style="border-left: 1px solid #aaaaaa;padding: 0 8rpx;" size="18"></uni-icons> |
| | | </view> |
| | | </picker> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">{{ $t("login.CurrentOrganization") }}:</view> |
| | | <picker :range="arrayOrganization" :value="Organization" @change="OrganizationChange"> |
| | | <view class="right" style="display: flex;align-items: center;"> |
| | | <input type="text" disabled v-model="Organization" placeholder="请选择当前组织"> |
| | | <uni-icons type="forward" color="#808080" |
| | | style="border-left: 1px solid #aaaaaa;padding: 0 8rpx;" size="18"></uni-icons> |
| | | </view> |
| | | </picker> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">{{ $t("login.Language") }}:</view> |
| | | <picker :range="['中文','English']" :value="Language" @change="onLanguageChangeHandler"> |
| | | <view class="right" style="display: flex;align-items: center;"> |
| | | <input type="text" disabled v-model="Language" placeholder="请选择语言"> |
| | | <uni-icons type="forward" color="#808080" |
| | | style="border-left: 1px solid #aaaaaa;padding: 0 8rpx;" size="18"></uni-icons> |
| | | </view> |
| | | </picker> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">{{ $t("login.CurrentOrganization") }}:</view> |
| | | <picker :range="arrayOrganization" :value="Organization" @change="OrganizationChange"> |
| | | <view class="right" style="display: flex;align-items: center;"> |
| | | <input type="text" disabled v-model="Organization" placeholder="请选择当前组织"> |
| | | <uni-icons type="forward" color="#808080" |
| | | style="border-left: 1px solid #aaaaaa;padding: 0 8rpx;" size="18"></uni-icons> |
| | | </view> |
| | | </picker> |
| | | </view> |
| | | |
| | | <view class="item"> |
| | | <view class="left">{{ $t("login.UserName") }}:</view> |
| | | <view class="right"> |
| | | <input type="text" v-model="UserName"> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">{{ $t("login.PassWord") }}:</view> |
| | | <view class="right"> |
| | | <input type="password" v-model="PassWord"> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="api"> |
| | | <view class="item"> |
| | | <view class="left">{{ $t("login.UserName") }}:</view> |
| | | <view class="right"> |
| | | <input type="text" v-model="UserName"> |
| | | </view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="left">{{ $t("login.PassWord") }}:</view> |
| | | <view class="right"> |
| | | <input type="password" v-model="PassWord"> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="api"> |
| | | 当前服务器地址:{{serverUrl}} |
| | | </view> |
| | | <view class="apibtn" @tap="changeApi=true">修改服务器地址</view> --> |
| | | </view> |
| | | </view> |
| | | <uni-popup ref="popup" type="center"> |
| | | <uni-popup-dialog :title="$t('login.ServiceSetting')" mode="input" @confirm="confirmHandler" |
| | | :before-close="true" @close="close"> |
| | | <view class="popup-content"> |
| | | <input type="text" v-model="serverUrlName" placeholder="请输入服务器名称"> |
| | | </view> |
| | | </uni-popup-dialog> |
| | | </uni-popup> |
| | | </view> |
| | | </view> |
| | | <uni-popup ref="popup" type="center"> |
| | | <uni-popup-dialog :title="$t('login.ServiceSetting')" mode="input" @confirm="confirmHandler" |
| | | :before-close="true" @close="close"> |
| | | <view class="popup-content"> |
| | | <input type="text" v-model="serverUrlName" placeholder="请输入服务器名称"> |
| | | </view> |
| | | </uni-popup-dialog> |
| | | </uni-popup> |
| | | |
| | | <view class="btn" @tap="submit">{{$t("login.Login")}}</view> |
| | | <view class="btn apibtn" @click="openServerSettingHandler">{{$t("login.ServiceSetting")}}</view> |
| | | <view class="btn" @tap="submit">{{$t("login.Login")}}</view> |
| | | <view class="btn apibtn" @click="openServerSettingHandler">{{$t("login.ServiceSetting")}}</view> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | setLoginData, |
| | | setUserInfo |
| | | } from "@/utils/auth.js"; |
| | | import hFormAlert from '@/components/h-form-alert/h-form-alert.vue'; |
| | | import { |
| | | CommonUtils |
| | | } from "../../utils/common"; |
| | | import { |
| | | getLanguagePackJson |
| | | } from "../../utils/i18n"; |
| | | import WebSocketServices from "@/utils/WebSocketServices"; |
| | | import getuiUtils from "../../utils/getuiUtils"; |
| | | export default { |
| | | components: { |
| | | hFormAlert |
| | | }, |
| | | mounted() { |
| | | console.log(uni.getLocale()) |
| | | }, |
| | | data() { |
| | | return { |
| | | WebSocketServices, |
| | | CommonUtils, |
| | | arrayDataBases: [], |
| | | DataBases: '', |
| | | Language: '中文', |
| | | serverUrlandName: { |
| | | "浙江智云迈思": 'http://47.96.97.237/API/', |
| | | "温州海诚光学": 'http://122.228.39.234:7177/API/', |
| | | "宁波惠康工业": 'http://172.16.72.30:6699/API/', |
| | | "余姚兴达起动器": 'http://121.37.133.104/API/', |
| | | "李林俊本地测试": 'http://localhost:8082/LuBaoAPI/', |
| | | "杭州凯贝奈特": 'http://192.168.50.253:8080/API/', |
| | | "杭州凯贝奈特外网": 'http://erp.hzcabinet.cn:9090/API/', |
| | | "翁涛涛本地测试": 'http://localhost:81/API/', |
| | | "陈镐哲本地测试": 'http://192.168.0.121:81/API/', |
| | | "陈镐哲本地测试2": 'http://192.168.0.102:81/API/', |
| | | "张瑞广本地测试": 'http://localhost:8082/API/', |
| | | "余思杰本地测试": 'http://localhost:8082/LuBaoAPI/', |
| | | // 小卫内外网 |
| | | "苏州卫智科技-外网": 'http://221.224.60.42:8082/API_WW/', |
| | | "苏州卫智科技-内网": 'http://172.16.20.233:8082/API_NW/', |
| | | // 四维尔内外网 |
| | | "宁波四维尔-内网": "http://192.168.0.236:9010/API/", |
| | | "宁波四维尔-外网": "http://220.189.218.155:9010/API/", |
| | | // 锦隆 |
| | | "锦隆-智能家居": "http://192.168.1.11/API/", |
| | | "锦隆-智能家居-外网": "http://61.174.29.234:8880/API/", |
| | | // 华舟包装 |
| | | "宁波华舟包装1": "http://192.168.110.222:8082/API_NW/", |
| | | "宁波华舟包装2": "http://192.168.88.167:8082/API_NW/", |
| | | "宁波华舟包装": "http://61.164.64.222:8082/API_WW/", |
| | | }, |
| | | serverUrlName: uni.getStorageSync('serverUrlName') || '浙江智云迈思', |
| | | import { |
| | | setLoginData, |
| | | setUserInfo |
| | | } from "@/utils/auth.js"; |
| | | import hFormAlert from '@/components/h-form-alert/h-form-alert.vue'; |
| | | import { |
| | | CommonUtils |
| | | } from "../../utils/common"; |
| | | import { |
| | | getLanguagePackJson |
| | | } from "../../utils/i18n"; |
| | | import WebSocketServices from "@/utils/WebSocketServices"; |
| | | import getuiUtils from "../../utils/getuiUtils"; |
| | | export default { |
| | | components: { |
| | | hFormAlert |
| | | }, |
| | | mounted() { |
| | | console.log(uni.getLocale()) |
| | | }, |
| | | data() { |
| | | return { |
| | | WebSocketServices, |
| | | CommonUtils, |
| | | arrayDataBases: [], |
| | | DataBases: '', |
| | | Language: '中文', |
| | | serverUrlandName: { |
| | | "浙江智云迈思": 'http://47.96.97.237/API/', |
| | | "温州海诚光学": 'http://122.228.39.234:7177/API/', |
| | | "宁波惠康工业": 'http://172.16.72.30:6699/API/', |
| | | "余姚兴达起动器": 'http://121.37.133.104/API/', |
| | | "李林俊本地测试": 'http://localhost:8082/LuBaoAPI/', |
| | | "杭州凯贝奈特": 'http://192.168.50.253:8080/API/', |
| | | "杭州凯贝奈特外网": 'http://erp.hzcabinet.cn:9090/API/', |
| | | "翁涛涛本地测试": 'http://localhost:81/API/', |
| | | "陈镐哲本地测试": 'http://192.168.0.121:81/API/', |
| | | "陈镐哲本地测试2": 'http://192.168.0.102:81/API/', |
| | | "张瑞广本地测试": 'http://localhost:8082/API/', |
| | | "余思杰本地测试": 'http://localhost:8082/LuBaoAPI/', |
| | | // 小卫内外网 |
| | | "苏州卫智科技-外网": 'http://221.224.60.42:8082/API_WW/', |
| | | "苏州卫智科技-内网": 'http://172.16.20.233:8082/API_NW/', |
| | | // 四维尔内外网 |
| | | "宁波四维尔-内网": "http://192.168.0.236:9010/API/", |
| | | "宁波四维尔-外网": "http://220.189.218.155:9010/API/", |
| | | // 锦隆 |
| | | "锦隆-智能家居": "http://192.168.1.11/API/", |
| | | "锦隆-智能家居-外网": "http://61.174.29.234:8880/API/", |
| | | // 华舟包装 |
| | | "宁波华舟包装1": "http://192.168.110.222:8082/API_NW/", |
| | | "宁波华舟包装2": "http://192.168.88.167:8082/API_NW/", |
| | | "宁波华舟包装": "http://61.164.64.222:8082/API_WW/", |
| | | }, |
| | | serverUrlName: uni.getStorageSync('serverUrlName') || '浙江智云迈思', |
| | | |
| | | arrayOrganization: [], |
| | | Organization: '', |
| | | HOrgNameList: [], |
| | | arrayOrganization: [], |
| | | Organization: '', |
| | | HOrgNameList: [], |
| | | |
| | | HOrgName: '', |
| | | UserName: '', //admin 001 |
| | | PassWord: '', //123456 |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API/', |
| | | serverUrlCache: '', |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.ApplyLanguagePack(this.$i18n.locale) |
| | | }, |
| | | onShow() { |
| | | var logindata = uni.getStorageSync('loginData') || '' |
| | | // console.log(logindata) |
| | | if (logindata) { |
| | | logindata = JSON.parse(logindata) |
| | | this.HOrgName = logindata.HOrgName |
| | | this.Organization = logindata.Organization |
| | | this.UserName = logindata.HUserNumber |
| | | this.PassWord = logindata.HPassWord |
| | | // this.UserName = logindata.UserName |
| | | // this.PassWord = logindata.PassWord |
| | | } |
| | | this.getOrganization() |
| | | this.getDataBases() |
| | | }, |
| | | methods: { |
| | | async ApplyLanguagePack(lang, forceUpdate = false) { |
| | | // 读取语言包并加载 |
| | | // let languagePack = await getLanguagePackJson(lang) |
| | | // this.$i18n.setLocaleMessage(lang, languagePack) |
| | | this.$i18n.locale = lang |
| | | }, |
| | | onLanguageChangeHandler(e) { |
| | | //动态获取后端的语言包文件,并将语言包应用到全局 |
| | | console.log('e: ', e.detail.value); |
| | | if (e.detail.value == 0) { |
| | | this.Language = '中文' |
| | | this.ApplyLanguagePack("zh-Hans") |
| | | // this.$i18n.locale = 'zh-Hans' |
| | | } |
| | | if (e.detail.value == 1) { |
| | | this.Language = 'English' |
| | | this.ApplyLanguagePack("en") |
| | | // this.$i18n.locale = 'en' |
| | | } |
| | | }, |
| | | async InitOrgination() { |
| | | console.log("初始化组织") |
| | | await this.$nextTick(() => { |
| | | this.Organization = this.arrayOrganization[0] |
| | | this.HOrgName = this.HOrgNameList[0] |
| | | HOrgName: '', |
| | | UserName: '', //admin 001 |
| | | PassWord: '', //123456 |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API/', |
| | | serverUrlCache: '', |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.ApplyLanguagePack(this.$i18n.locale) |
| | | }, |
| | | onShow() { |
| | | var logindata = uni.getStorageSync('loginData') || '' |
| | | // console.log(logindata) |
| | | if (logindata) { |
| | | logindata = JSON.parse(logindata) |
| | | this.HOrgName = logindata.HOrgName |
| | | this.Organization = logindata.Organization |
| | | this.UserName = logindata.HUserNumber |
| | | this.PassWord = logindata.HPassWord |
| | | // this.UserName = logindata.UserName |
| | | // this.PassWord = logindata.PassWord |
| | | } |
| | | this.getOrganization() |
| | | this.getDataBases() |
| | | }, |
| | | methods: { |
| | | async ApplyLanguagePack(lang, forceUpdate = false) { |
| | | // 读取语言包并加载 |
| | | // let languagePack = await getLanguagePackJson(lang) |
| | | // this.$i18n.setLocaleMessage(lang, languagePack) |
| | | this.$i18n.locale = lang |
| | | }, |
| | | onLanguageChangeHandler(e) { |
| | | //动态获取后端的语言包文件,并将语言包应用到全局 |
| | | console.log('e: ', e.detail.value); |
| | | if (e.detail.value == 0) { |
| | | this.Language = '中文' |
| | | this.ApplyLanguagePack("zh-Hans") |
| | | // this.$i18n.locale = 'zh-Hans' |
| | | } |
| | | if (e.detail.value == 1) { |
| | | this.Language = 'English' |
| | | this.ApplyLanguagePack("en") |
| | | // this.$i18n.locale = 'en' |
| | | } |
| | | }, |
| | | async InitOrgination() { |
| | | console.log("初始化组织") |
| | | await this.$nextTick(() => { |
| | | this.Organization = this.arrayOrganization[0] |
| | | this.HOrgName = this.HOrgNameList[0] |
| | | |
| | | let org = uni.getStorageSync('Organization') |
| | | let orgName = uni.getStorageSync('OrganizationID') |
| | | let orgHas = Array.from(this.arrayOrganization).findIndex((e) => e == org) |
| | | if (org && (orgHas != -1)) { |
| | | this.Organization = org |
| | | this.HOrgName = orgName |
| | | } |
| | | }) |
| | | }, |
| | | confirmHandler() { |
| | | console.log(this.serverUrlName) |
| | | console.log(this.serverUrlandName[this.serverUrlName]) |
| | | let url = this.serverUrlandName[this.serverUrlName]; |
| | | if (url != undefined) { |
| | | uni.setStorageSync('serverUrl', url) |
| | | uni.setStorageSync('serverUrlName', this.serverUrlName) |
| | | this.serverUrl = url |
| | | this.changeApi = false |
| | | this.getOrganization() |
| | | this.$refs.popup.close() |
| | | } else { |
| | | uni.showToast({ |
| | | title: '服务器名称错误请重新输入', |
| | | icon: 'none', |
| | | }) |
| | | } |
| | | }, |
| | | close() { |
| | | this.$refs.popup.close() |
| | | }, |
| | | openServerSettingHandler() { |
| | | this.$refs.popup.open() |
| | | }, |
| | | getDataBases() { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Web/GetDataBases', |
| | | success: (result) => { |
| | | console.log(result); |
| | | if (result.count == 1) { |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayDataBases[i] = result.data.data[i].name; |
| | | } |
| | | } |
| | | console.log(this.arrayDataBases); |
| | | this.$forceUpdate(); |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | }, |
| | | }); |
| | | }, |
| | | DataBasesChange(e) { |
| | | console.log(e.detail.value) |
| | | this.DataBases = this.arrayDataBases[e.detail.value] |
| | | uni.setStorageSync('DataBases', this.DataBases); |
| | | }, |
| | | let org = uni.getStorageSync('Organization') |
| | | let orgName = uni.getStorageSync('OrganizationID') |
| | | let orgHas = Array.from(this.arrayOrganization).findIndex((e) => e == org) |
| | | if (org && (orgHas != -1)) { |
| | | this.Organization = org |
| | | this.HOrgName = orgName |
| | | } |
| | | }) |
| | | }, |
| | | confirmHandler() { |
| | | console.log(this.serverUrlName) |
| | | console.log(this.serverUrlandName[this.serverUrlName]) |
| | | let url = this.serverUrlandName[this.serverUrlName]; |
| | | if (url != undefined) { |
| | | uni.setStorageSync('serverUrl', url) |
| | | uni.setStorageSync('serverUrlName', this.serverUrlName) |
| | | this.serverUrl = url |
| | | this.changeApi = false |
| | | this.getOrganization() |
| | | this.$refs.popup.close() |
| | | } else { |
| | | uni.showToast({ |
| | | title: '服务器名称错误请重新输入', |
| | | icon: 'none', |
| | | }) |
| | | } |
| | | }, |
| | | close() { |
| | | this.$refs.popup.close() |
| | | }, |
| | | openServerSettingHandler() { |
| | | this.$refs.popup.open() |
| | | }, |
| | | getDataBases() { |
| | | uni.request({ |
| | | url: this.serverUrl + '/Web/GetDataBases', |
| | | success: (result) => { |
| | | console.log(result); |
| | | if (result.count == 1) { |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayDataBases[i] = result.data.data[i].name; |
| | | } |
| | | } |
| | | console.log(this.arrayDataBases); |
| | | this.$forceUpdate(); |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | }, |
| | | }); |
| | | }, |
| | | DataBasesChange(e) { |
| | | console.log(e.detail.value) |
| | | this.DataBases = this.arrayDataBases[e.detail.value] |
| | | uni.setStorageSync('DataBases', this.DataBases); |
| | | }, |
| | | |
| | | getOrganization() { |
| | | this.arrayOrganization = [] |
| | | uni.request({ |
| | | url: this.serverUrl + '/Web/GetOrganizations', |
| | | success: (res) => { |
| | | console.log(res.data.data); |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayOrganization[i] = res.data.data[i].Name |
| | | this.HOrgNameList[i] = res.data.data[i].ID |
| | | } |
| | | // this.Organization = res.data.data[0].Name |
| | | // this.HOrgName = res.data.data[0].ID |
| | | this.$forceUpdate(); |
| | | this.InitOrgination() |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取组织失败,请检查服务器地址', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | OrganizationChange(e) { |
| | | // console.log(e.detail.value) |
| | | this.Organization = this.arrayOrganization[e.detail.value] |
| | | this.HOrgName = this.HOrgNameList[e.detail.value] |
| | | }, |
| | | submit() { |
| | | if (!this.Organization) { |
| | | uni.showToast({ |
| | | title: '请选择组织', |
| | | icon: 'none' |
| | | }) |
| | | } else if (!this.UserName) { |
| | | uni.showToast({ |
| | | title: '请输入用户名', |
| | | icon: 'none' |
| | | }) |
| | | } else if (!this.PassWord) { |
| | | uni.showToast({ |
| | | title: '请输入密码', |
| | | icon: 'none' |
| | | }) |
| | | } else { |
| | | uni.showLoading({ |
| | | title: '登录中...', |
| | | mask: true |
| | | }) |
| | | var data = { |
| | | HUserNumber: this.UserName, |
| | | HPassWord: this.PassWord, |
| | | HStockOrgID: this.HOrgName, |
| | | HStockOrgName: this.Organization |
| | | } |
| | | getOrganization() { |
| | | this.arrayOrganization = [] |
| | | uni.request({ |
| | | url: this.serverUrl + '/Web/GetOrganizations', |
| | | success: (res) => { |
| | | console.log(res.data.data); |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayOrganization[i] = res.data.data[i].Name |
| | | this.HOrgNameList[i] = res.data.data[i].ID |
| | | } |
| | | // this.Organization = res.data.data[0].Name |
| | | // this.HOrgName = res.data.data[0].ID |
| | | this.$forceUpdate(); |
| | | this.InitOrgination() |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '获取组织失败,请检查服务器地址', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | OrganizationChange(e) { |
| | | // console.log(e.detail.value) |
| | | this.Organization = this.arrayOrganization[e.detail.value] |
| | | this.HOrgName = this.HOrgNameList[e.detail.value] |
| | | }, |
| | | submit() { |
| | | if (!this.Organization) { |
| | | uni.showToast({ |
| | | title: '请选择组织', |
| | | icon: 'none' |
| | | }) |
| | | } else if (!this.UserName) { |
| | | uni.showToast({ |
| | | title: '请输入用户名', |
| | | icon: 'none' |
| | | }) |
| | | } else if (!this.PassWord) { |
| | | uni.showToast({ |
| | | title: '请输入密码', |
| | | icon: 'none' |
| | | }) |
| | | } else { |
| | | uni.showLoading({ |
| | | title: '登录中...', |
| | | mask: true |
| | | }) |
| | | var data = { |
| | | HUserNumber: this.UserName, |
| | | HPassWord: this.PassWord, |
| | | HStockOrgID: this.HOrgName, |
| | | HStockOrgName: this.Organization |
| | | } |
| | | |
| | | // UserName: this.UserName, |
| | | // PassWord: this.PassWord, |
| | | // HOrgName: this.HOrgName, |
| | | // Organization: this.Organization |
| | | // } |
| | | uni.setStorageSync('loginData', JSON.stringify(data)); |
| | | uni.request({ |
| | | url: this.serverUrl + 'WEBSController/GetUser_Json', |
| | | method: 'GET', |
| | | data: data, |
| | | success: (res) => { |
| | | console.log(res) |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | if (res.data.count == 1) { |
| | | setLoginData(data) |
| | | setUserInfo(res.data.data[0]) |
| | | uni.setStorageSync('HUserName', res.data.data[0].Czymc); |
| | | uni.setStorageSync('HBillerID', res.data.data[0].HK3UserID); |
| | | uni.setStorageSync('SourceFlag', false); |
| | | uni.setStorageSync('login', "login"); |
| | | uni.setStorageSync('Organization', this.Organization); |
| | | uni.setStorageSync('OrganizationID', this.HOrgName); |
| | | //存储部门 职员 仓库 等信息 |
| | | uni.setStorageSync('HDeptID', res.data.data[0].HDeptID); //部门 |
| | | uni.setStorageSync('HDeptName', res.data.data[0].HDeptName); |
| | | uni.setStorageSync('HEmpID', res.data.data[0].HEmpID); //职员 |
| | | uni.setStorageSync('HEmpName', res.data.data[0].HEmpName); |
| | | uni.setStorageSync('HSCWHID', res.data.data[0].HSCWHID); //调入仓库 |
| | | uni.setStorageSync('HSCWHName', res.data.data[0].HSCWHName); |
| | | uni.setStorageSync('HWhID', res.data.data[0].HWhID); //对应仓库 |
| | | uni.setStorageSync('HWhName', res.data.data[0].HWhName); |
| | | uni.setStorageSync('HWorkCenterID', res.data.data[0].HWorkCenterID); //工作中心 |
| | | uni.setStorageSync('HWorkCenterName', res.data.data[0].HWorkCenterName); |
| | | uni.setStorageSync('HSecManagerID', res.data.data[0].HSecManagerID); //对应验收 |
| | | uni.setStorageSync('HSecManagerName', res.data.data[0].HSecManagerName); |
| | | this.CommonUtils.setServerUrl(this.serverUrl) |
| | | // this.WebSocketServices.createConnect(res.data.data[0].Czybm,res.data.data[0].Czymc); |
| | | // getuiUtils.getClientID() |
| | | getuiUtils.getClientID(res.data.data[0].Czybm,res.data.data[0].Czymc) |
| | | uni.reLaunch({ |
| | | url: '/pages/index/index' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | // UserName: this.UserName, |
| | | // PassWord: this.PassWord, |
| | | // HOrgName: this.HOrgName, |
| | | // Organization: this.Organization |
| | | // } |
| | | uni.setStorageSync('loginData', JSON.stringify(data)); |
| | | uni.request({ |
| | | url: this.serverUrl + 'WEBSController/GetUser_Json', |
| | | method: 'GET', |
| | | data: data, |
| | | success: (res) => { |
| | | console.log(res) |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | if (res.data.count == 1) { |
| | | setLoginData(data) |
| | | setUserInfo(res.data.data[0]) |
| | | uni.setStorageSync('HUserName', res.data.data[0].Czymc); |
| | | uni.setStorageSync('HBillerID', res.data.data[0].HK3UserID); |
| | | uni.setStorageSync('SourceFlag', false); |
| | | uni.setStorageSync('login', "login"); |
| | | uni.setStorageSync('Organization', this.Organization); |
| | | uni.setStorageSync('OrganizationID', this.HOrgName); |
| | | //存储部门 职员 仓库 等信息 |
| | | uni.setStorageSync('HDeptID', res.data.data[0].HDeptID); //部门 |
| | | uni.setStorageSync('HDeptName', res.data.data[0].HDeptName); |
| | | uni.setStorageSync('HEmpID', res.data.data[0].HEmpID); //职员 |
| | | uni.setStorageSync('HEmpName', res.data.data[0].HEmpName); |
| | | uni.setStorageSync('HSCWHID', res.data.data[0].HSCWHID); //调入仓库 |
| | | uni.setStorageSync('HSCWHName', res.data.data[0].HSCWHName); |
| | | uni.setStorageSync('HWhID', res.data.data[0].HWhID); //对应仓库 |
| | | uni.setStorageSync('HWhName', res.data.data[0].HWhName); |
| | | uni.setStorageSync('HWorkCenterID', res.data.data[0].HWorkCenterID); //工作中心 |
| | | uni.setStorageSync('HWorkCenterName', res.data.data[0].HWorkCenterName); |
| | | uni.setStorageSync('HSecManagerID', res.data.data[0].HSecManagerID); //对应验收 |
| | | uni.setStorageSync('HSecManagerName', res.data.data[0].HSecManagerName); |
| | | uni.setStorageSync('HGroupID', res.data.data[0].HGroupID); //对应班组 |
| | | uni.setStorageSync('HGroupName', res.data.data[0].HGroup); |
| | | uni.setStorageSync('HProcID', res.data.data[0].HProcID); //对应工序 |
| | | uni.setStorageSync('HProcName', res.data.data[0].HProcName); |
| | | uni.setStorageSync('HSourceID', res.data.data[0].HSourceID); //对应生产资源 |
| | | uni.setStorageSync('HSourceName', res.data.data[0].HSource); |
| | | this.CommonUtils.setServerUrl(this.serverUrl) |
| | | // this.WebSocketServices.createConnect(res.data.data[0].Czybm,res.data.data[0].Czymc); |
| | | // getuiUtils.getClientID() |
| | | getuiUtils.getClientID(res.data.data[0].Czybm, res.data.data[0].Czymc) |
| | | uni.reLaunch({ |
| | | url: '/pages/index/index' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | |
| | | // uni.request({ |
| | | // url: this.serverUrl + '/Web/GetUser', |
| | | // method: 'GET', |
| | | // data: data, |
| | | // success: (res) => { |
| | | // console.log(res) |
| | | // uni.hideLoading() |
| | | // uni.showToast({ |
| | | // title: res.data.Message, |
| | | // icon: 'none' |
| | | // }) |
| | | // if (res.data.count == 1) { |
| | | // setLoginData(data) |
| | | // setUserInfo(res.data.data[0]) |
| | | // uni.setStorageSync('HUserName', res.data.data[0].Czymc); |
| | | // uni.setStorageSync('HBillerID', res.data.data[0].HK3UserID); |
| | | // uni.setStorageSync('SourceFlag', false); |
| | | // uni.setStorageSync('login', "login"); |
| | | // uni.setStorageSync('Organization', this.Organization); |
| | | // uni.setStorageSync('OrganizationID', this.HOrgName); |
| | | // this.CommonUtils.setServerUrl(this.serverUrl) |
| | | // uni.reLaunch({ |
| | | // url: '/pages/index/index' |
| | | // }) |
| | | // } |
| | | // }, |
| | | // fail: (res) => { |
| | | // console.log(res); |
| | | // uni.hideLoading() |
| | | // uni.showToast({ |
| | | // title: '接口请求失败', |
| | | // icon: 'none' |
| | | // }) |
| | | // }, |
| | | // }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // uni.request({ |
| | | // url: this.serverUrl + '/Web/GetUser', |
| | | // method: 'GET', |
| | | // data: data, |
| | | // success: (res) => { |
| | | // console.log(res) |
| | | // uni.hideLoading() |
| | | // uni.showToast({ |
| | | // title: res.data.Message, |
| | | // icon: 'none' |
| | | // }) |
| | | // if (res.data.count == 1) { |
| | | // setLoginData(data) |
| | | // setUserInfo(res.data.data[0]) |
| | | // uni.setStorageSync('HUserName', res.data.data[0].Czymc); |
| | | // uni.setStorageSync('HBillerID', res.data.data[0].HK3UserID); |
| | | // uni.setStorageSync('SourceFlag', false); |
| | | // uni.setStorageSync('login', "login"); |
| | | // uni.setStorageSync('Organization', this.Organization); |
| | | // uni.setStorageSync('OrganizationID', this.HOrgName); |
| | | // this.CommonUtils.setServerUrl(this.serverUrl) |
| | | // uni.reLaunch({ |
| | | // url: '/pages/index/index' |
| | | // }) |
| | | // } |
| | | // }, |
| | | // fail: (res) => { |
| | | // console.log(res); |
| | | // uni.hideLoading() |
| | | // uni.showToast({ |
| | | // title: '接口请求失败', |
| | | // icon: 'none' |
| | | // }) |
| | | // }, |
| | | // }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .bg-img { |
| | | position: fixed; |
| | | width: 100%; |
| | | height: 100%; |
| | | top: 0; |
| | | left: 0; |
| | | z-index: -1; |
| | | } |
| | | .bg-img { |
| | | position: fixed; |
| | | width: 100%; |
| | | height: 100%; |
| | | top: 0; |
| | | left: 0; |
| | | z-index: -1; |
| | | } |
| | | |
| | | .container { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | .container { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | .title { |
| | | margin-top: 174rpx; |
| | | font-size: 47rpx; |
| | | font-weight: bold; |
| | | color: #FFFFFF; |
| | | } |
| | | .title { |
| | | margin-top: 174rpx; |
| | | font-size: 47rpx; |
| | | font-weight: bold; |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | .box { |
| | | width: 682rpx; |
| | | position: relative; |
| | | top: 120rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | .box { |
| | | width: 682rpx; |
| | | position: relative; |
| | | top: 120rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | |
| | | .logo { |
| | | width: 155rpx; |
| | | height: 155rpx; |
| | | padding: 10rpx; |
| | | position: absolute; |
| | | z-index: 9; |
| | | background-color: rgba(255, 255, 255, 0.5); |
| | | border-radius: 100%; |
| | | .logo { |
| | | width: 155rpx; |
| | | height: 155rpx; |
| | | padding: 10rpx; |
| | | position: absolute; |
| | | z-index: 9; |
| | | background-color: rgba(255, 255, 255, 0.5); |
| | | border-radius: 100%; |
| | | |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | border-radius: 100%; |
| | | background-color: #f0f3f7; |
| | | } |
| | | } |
| | | image { |
| | | width: 100%; |
| | | height: 100%; |
| | | border-radius: 100%; |
| | | background-color: #f0f3f7; |
| | | } |
| | | } |
| | | |
| | | .login { |
| | | width: 100%; |
| | | height: 520rpx; |
| | | position: absolute; |
| | | top: 90rpx; |
| | | z-index: 0; |
| | | background: #FFFFFF; |
| | | border-radius: 25rpx 0 25rpx 0; |
| | | box-shadow: 0 6rpx 24rpx 8rpx rgba(21, 99, 210, 0.14); |
| | | padding-top: 160rpx; |
| | | .login { |
| | | width: 100%; |
| | | height: 520rpx; |
| | | position: absolute; |
| | | top: 90rpx; |
| | | z-index: 0; |
| | | background: #FFFFFF; |
| | | border-radius: 25rpx 0 25rpx 0; |
| | | box-shadow: 0 6rpx 24rpx 8rpx rgba(21, 99, 210, 0.14); |
| | | padding-top: 160rpx; |
| | | |
| | | .item { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | margin-right: 38rpx; |
| | | margin-bottom: 70rpx; |
| | | .item { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | margin-right: 38rpx; |
| | | margin-bottom: 70rpx; |
| | | |
| | | .left { |
| | | font-size: 34rpx; |
| | | font-weight: 400; |
| | | color: #3C3C3C; |
| | | } |
| | | .left { |
| | | font-size: 34rpx; |
| | | font-weight: 400; |
| | | color: #3C3C3C; |
| | | } |
| | | |
| | | .right { |
| | | width: 441rpx; |
| | | height: 68rpx; |
| | | background: #EBEBEB; |
| | | border-radius: 10rpx; |
| | | .right { |
| | | width: 441rpx; |
| | | height: 68rpx; |
| | | background: #EBEBEB; |
| | | border-radius: 10rpx; |
| | | |
| | | input { |
| | | height: 100%; |
| | | padding: 0 30rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | } |
| | | input { |
| | | height: 100%; |
| | | padding: 0 30rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // .api{ |
| | | // margin-left: 30rpx; |
| | | // font-size: 27rpx; |
| | | // color: #888; |
| | | // } |
| | | // .apibtn{ |
| | | // text-align: center; |
| | | // font-size: 27rpx; |
| | | // margin-top: 14rpx; |
| | | // color: #066fb8; |
| | | // text-decoration: underline; /* 添加下划线 */ |
| | | // font-style: italic; /* 将字体变为斜体 */ |
| | | // } |
| | | } |
| | | } |
| | | // .api{ |
| | | // margin-left: 30rpx; |
| | | // font-size: 27rpx; |
| | | // color: #888; |
| | | // } |
| | | // .apibtn{ |
| | | // text-align: center; |
| | | // font-size: 27rpx; |
| | | // margin-top: 14rpx; |
| | | // color: #066fb8; |
| | | // text-decoration: underline; /* 添加下划线 */ |
| | | // font-style: italic; /* 将字体变为斜体 */ |
| | | // } |
| | | } |
| | | } |
| | | |
| | | .btn { |
| | | width: 540rpx; |
| | | height: 92rpx; |
| | | line-height: 92rpx; |
| | | margin-top: 940rpx; |
| | | background: #78CEFD; |
| | | box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(120, 206, 253, 0.3); |
| | | border-radius: 10rpx; |
| | | font-weight: 400; |
| | | color: #FEFEFE; |
| | | text-align: center; |
| | | font-size: 36rpx; |
| | | } |
| | | .btn { |
| | | width: 540rpx; |
| | | height: 92rpx; |
| | | line-height: 92rpx; |
| | | margin-top: 940rpx; |
| | | background: #78CEFD; |
| | | box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(120, 206, 253, 0.3); |
| | | border-radius: 10rpx; |
| | | font-weight: 400; |
| | | color: #FEFEFE; |
| | | text-align: center; |
| | | font-size: 36rpx; |
| | | } |
| | | |
| | | .apibtn { |
| | | margin-top: 50rpx; |
| | | background: #eec18e; |
| | | box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(253, 186, 118, 0.3); |
| | | } |
| | | } |
| | | .apibtn { |
| | | margin-top: 50rpx; |
| | | background: #eec18e; |
| | | box-shadow: 0rpx 0rpx 44rpx 7rpx rgba(253, 186, 118, 0.3); |
| | | } |
| | | } |
| | | |
| | | .popup-content { |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 30rpx; |
| | | .popup-content { |
| | | box-sizing: border-box; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 30rpx; |
| | | |
| | | .pop-item { |
| | | border: #EBEBEB 2rpx solid; |
| | | border-radius: 10rpx; |
| | | padding: 14rpx 8rpx; |
| | | } |
| | | .pop-item { |
| | | border: #EBEBEB 2rpx solid; |
| | | border-radius: 10rpx; |
| | | padding: 14rpx 8rpx; |
| | | } |
| | | |
| | | >picker { |
| | | background-color: #EBEBEB; |
| | | } |
| | | } |
| | | >picker { |
| | | background-color: #EBEBEB; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "模具故障登记列表", |
| | | "url": "/pages/qijvguzhangdengji/mouldMistake", |
| | | "url": "/pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBillList", |
| | | "id": 37, |
| | | "hidden": false |
| | | }, |
| | |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "模具维修记录列表", |
| | | "url": "/pages/weixiujilu/mouldRepairRecordBillList", |
| | | "url": "/pages/MJGL/Sc_MouldRepairWorkBill/Sc_MouldRepairWorkBillList", |
| | | "id": 39, |
| | | "hidden": false |
| | | }, |
| | |
| | | canEdit: false, |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | itemData: [{ |
| | | |
| | | img: '../../static/icon/icon8.png', |
| | | text: '模具档案查询', |
| | | url: `/pages/MJGL/Gy_MouldFile/Gy_MouldFileList`, |
| | | id: 1, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon6.png', |
| | | text: '模具状态分析', |
| | | tip: '查看详情', |
| | |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备故障登记单", |
| | | "url": "/pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill?operationType=1", |
| | | "id": 20, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备维修派工单", |
| | | "url": "/pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill", |
| | | "id": 21, |
| | |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "url": "/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill", |
| | | "id": 23, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "text": "设备维修验收单", |
| | | "url": "/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill", |
| | | "id": 23, |
| | |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | |
| | | "text": "设备维修记录单", |
| | | "url": "/pages/MJGL/Sb_EqpMaintenance/Sb_EqpMaintenanceBill", |
| | | "id": 28, |
| | |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "取样单", |
| | | "url": "/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill", |
| | | "url": "/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill?operationType=0", |
| | | "id": 17, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "还样单", |
| | | "url": "/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill", |
| | | "url": "/pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill?operationType=0", |
| | | "id": 18, |
| | | "hidden": false |
| | | }, |