diff --git a/fe/PC/src/api/wms-api.js b/fe/PC/src/api/wms-api.js index 68244299c..bf1391ead 100644 --- a/fe/PC/src/api/wms-api.js +++ b/fe/PC/src/api/wms-api.js @@ -778,6 +778,14 @@ export function getLocationByCode(data) { }) } +// 通过userid获取部门相关信息 +export function getDepartByUserId(id) { + return request({ + url: baseURL + 'auth/auth/department/by-userid', + method: 'get', + params:{userId:id} + }) +} // 客户退拆任务-完成 todo // export async function productionRecycleJobComplete(id) { diff --git a/fe/PC/src/mixins/mixins.js b/fe/PC/src/mixins/mixins.js index e37936f69..f9cb15650 100644 --- a/fe/PC/src/mixins/mixins.js +++ b/fe/PC/src/mixins/mixins.js @@ -243,6 +243,7 @@ export const mixins = { fd.append("file", formFile[0]) postImport(fd, _uploadURL, _isSpecial).then(res => { + console.log(246,res) const headers = JSON.parse(res.headers) // 判断是否有错误记录 if (headers.result.ErrorNum > 0) { diff --git a/fe/PC/src/mixins/printMixin.js b/fe/PC/src/mixins/printMixin.js index 2314cc6a4..2e1a1934b 100644 --- a/fe/PC/src/mixins/printMixin.js +++ b/fe/PC/src/mixins/printMixin.js @@ -1,6 +1,7 @@ // 打印功能数据整合 import { Enum } from "@/utils/index" import store from '@/store/index' +import { getDepartByUserId }from '@/api/wms-api' /**/ // 打印【箱标签-单个】 (xiangbq.rdlx) // 使用位置:补打标签 (RepairLabels.vue) @@ -218,7 +219,7 @@ const printEnumOption = { * @returns */ // - export function initPrintAllData(propsData,name,enumOption,options,deptInfo,url){ + export async function initPrintAllData(propsData,name,enumOption,options,deptInfo,url){ if(!propsData || propsData.details.length <= 0)return false let _printData = {details:[]} let _outData = {} @@ -252,10 +253,13 @@ const printEnumOption = { // 部门相关信息获取 if(deptInfo && _printData.details[0] && _printData.details[0].creatorId && _printData.details[0].creatorId != 'null'){ // todo获取接口 - _printData.details.forEach(item=>{ - item.deptCode = '111' - item.deptName = '222' - }) + await getDepartByUserId(_printData.details[0].creatorId) + .then(res=>{ + _printData.details.forEach(item=>{ + item.deptCode = res.code + item.deptName = res.name + }) + }) } let data = { reportName: name, diff --git a/fe/PC/src/views/kittingManage/KittingIssueNote.vue b/fe/PC/src/views/kittingManage/KittingIssueNote.vue index 605974189..2d168e191 100644 --- a/fe/PC/src/views/kittingManage/KittingIssueNote.vue +++ b/fe/PC/src/views/kittingManage/KittingIssueNote.vue @@ -104,6 +104,7 @@ let _propsData = JSON.parse(JSON.stringify(this.tableDataDetails)) _propsData.details.forEach(item=>{ item.handledToLot = item.handledToLot + " " + item.boxQtyShow = _propsData.enumIssueSendType == 2 ? item.requestQty : '' }) let data = initPrintAllData(_propsData,'xbcll.rdlx',false,false,true); this.Print(data) diff --git a/fe/PC/src/views/materialIssueBP/IssueNoteBP.vue b/fe/PC/src/views/materialIssueBP/IssueNoteBP.vue index d4565435a..f39227280 100644 --- a/fe/PC/src/views/materialIssueBP/IssueNoteBP.vue +++ b/fe/PC/src/views/materialIssueBP/IssueNoteBP.vue @@ -104,6 +104,7 @@ export default { let _propsData = JSON.parse(JSON.stringify(this.tableDataDetails)) _propsData.details.forEach(item=>{ item.handledToLot = item.handledToLot + " " + item.boxQtyShow = _propsData.enumIssueSendType == 2 ? item.requestQty : '' }) let data = initPrintAllData(_propsData,'xbcll.rdlx',false,false,true); this.Print(data) diff --git a/fe/PC/src/views/materialIssuePT/IssueNotePT.vue b/fe/PC/src/views/materialIssuePT/IssueNotePT.vue index 257f925d5..78990af6e 100644 --- a/fe/PC/src/views/materialIssuePT/IssueNotePT.vue +++ b/fe/PC/src/views/materialIssuePT/IssueNotePT.vue @@ -104,6 +104,7 @@ export default { let _propsData = JSON.parse(JSON.stringify(this.tableDataDetails)) _propsData.details.forEach(item=>{ item.handledToLot = item.handledToLot + " " + item.boxQtyShow = _propsData.enumIssueSendType == 2 ? item.requestQty : '' }) let data = initPrintAllData(_propsData,'xbcll.rdlx',false,false,true); this.Print(data) diff --git a/fe/PC/src/views/materialIssueZP/IssueNoteZP.vue b/fe/PC/src/views/materialIssueZP/IssueNoteZP.vue index 74b741a21..69d7658e4 100644 --- a/fe/PC/src/views/materialIssueZP/IssueNoteZP.vue +++ b/fe/PC/src/views/materialIssueZP/IssueNoteZP.vue @@ -104,6 +104,7 @@ export default { let _propsData = JSON.parse(JSON.stringify(this.tableDataDetails)) _propsData.details.forEach(item=>{ item.handledToLot = item.handledToLot + " " + item.boxQtyShow = _propsData.enumIssueSendType == 2 ? item.requestQty : '' }) let data = initPrintAllData(_propsData,'xbcll.rdlx',false,false,true); this.Print(data) diff --git a/fe/PC/src/views/materialIssueZS/IssueNoteZS.vue b/fe/PC/src/views/materialIssueZS/IssueNoteZS.vue index 1d7e99414..ddee067a2 100644 --- a/fe/PC/src/views/materialIssueZS/IssueNoteZS.vue +++ b/fe/PC/src/views/materialIssueZS/IssueNoteZS.vue @@ -104,6 +104,7 @@ export default { let _propsData = JSON.parse(JSON.stringify(this.tableDataDetails)) _propsData.details.forEach(item=>{ item.handledToLot = item.handledToLot + " " + item.boxQtyShow = _propsData.enumIssueSendType == 2 ? item.requestQty : '' }) let data = initPrintAllData(_propsData,'xbcll.rdlx',false,false,true); this.Print(data)