添加 通过单据类型获取源单类型 函数 添加 通过当前用户是否设置关联仓库获取关联仓库函数
2个文件已修改
1个文件已添加
51 ■■■■■ 已修改文件
pages/caigouruku/form.vue 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/zhijiediaobo/form.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/userRelationManager.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/caigouruku/form.vue
@@ -239,6 +239,9 @@
    import {
        CommonUtils
    } from '../../utils/common';
    import {
        getUserStockRelation
    } from "@/utils/userRelationManager.js"
    export default {
        data() {
            return {
@@ -337,13 +340,36 @@
                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(() => {
@@ -559,7 +585,7 @@
                            Message
                        } = res.data
                        if (count == 1) {
                            console.log('data: ', data);
                            // console.log('data: ', data);
                            this.arrayHMainSourceBillType = []
                            this.arrayHMainSourceBillValue = []
                            Array.from(data).forEach(e => {
@@ -569,7 +595,7 @@
                            this.arrayHMainSourceBillType.push('手工录入')
                            this.arrayHMainSourceBillValue.push('-1')
                            this.HMainSourceBillType = this.arrayHMainSourceBillType[0]
                            this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[0]
                        } else {
pages/zhijiediaobo/form.vue
@@ -791,7 +791,6 @@
            },
            // 通过单据类型获取源单类型
            async GetSourceBillType() {
                CommonUtils.doRequest2({
                    url: '/Web/GetHSourceBillType',
                    data: {
utils/userRelationManager.js
New file
@@ -0,0 +1,18 @@
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})
            }
        })
    })
}