添加 通过单据类型获取源单类型 函数 添加 通过当前用户是否设置关联仓库获取关联仓库函数
| | |
| | | import { |
| | | CommonUtils |
| | | } from '../../utils/common'; |
| | | import { |
| | | getUserStockRelation |
| | | } from "@/utils/userRelationManager.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | this.getNewData() |
| | | this.HSourceBillNoFocus = true |
| | | } |
| | | this.getHBaseList() |
| | | |
| | | this.getHSupList() |
| | | this.getHEmpList() |
| | | this.getHDeptList() |
| | | this.GetSourceBillType() |
| | | this.getRelationStore() |
| | | }, |
| | | methods: { |
| | | async getRelationStore() { |
| | | let { |
| | | data, |
| | | count |
| | | } = await getUserStockRelation() |
| | | if (count == 1) { |
| | | this.arrayHWHName = [] |
| | | this.HWHNameList = [] |
| | | Array.from(data).forEach(elem => { |
| | | console.log(elem.HItemID); |
| | | this.arrayHWHName.push(elem.HName) |
| | | this.HWHNameList.push({ |
| | | HItemID: elem.HItemID, |
| | | HName: elem.HName, |
| | | HNumber: elem.HNumber, |
| | | "仓库名称": elem.HName |
| | | }) |
| | | }) |
| | | } else { |
| | | this.getHBaseList() |
| | | } |
| | | }, |
| | | async refreshHSourceBillState() { |
| | | this.HSourceBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | // console.log('data: ', data); |
| | | this.arrayHMainSourceBillType = [] |
| | | this.arrayHMainSourceBillValue = [] |
| | | Array.from(data).forEach(e => { |
| | |
| | | |
| | | this.arrayHMainSourceBillType.push('手工录入') |
| | | this.arrayHMainSourceBillValue.push('-1') |
| | | |
| | | |
| | | this.HMainSourceBillType = this.arrayHMainSourceBillType[0] |
| | | this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[0] |
| | | } else { |
| | |
| | | }, |
| | | // 通过单据类型获取源单类型 |
| | | async GetSourceBillType() { |
| | | |
| | | CommonUtils.doRequest2({ |
| | | url: '/Web/GetHSourceBillType', |
| | | data: { |
| New file |
| | |
| | | import { getUserInfo } from "./auth"; |
| | | import { CommonUtils } from "./common"; |
| | | |
| | | export async function getUserStockRelation(userBm = getUserInfo()['Czybm']){ |
| | | return new Promise((resolve, reject) => { |
| | | CommonUtils.doRequest2({ |
| | | url: '/Xt_User/UserStocklistPlaylist', |
| | | data: { |
| | | HUserID: userBm |
| | | }, |
| | | resFunction: (res) => { |
| | | console.log('getUserStockRelation res: ',res); |
| | | let {data, count, Message} = res.data |
| | | resolve({data:data, count: count}) |
| | | } |
| | | }) |
| | | }) |
| | | } |