修改出单详情机构名称取值

This commit is contained in:
dong.ai
2024-10-22 10:09:45 +08:00
parent 92bd586bb7
commit 53abc65565

View File

@@ -340,7 +340,7 @@ export default {
},
created() {},
mounted() {
this.getInfo()
// this.getInfo()
let date = new Date()
let month = date.getMonth() + 1
if (month <= 9) {
@@ -352,38 +352,11 @@ export default {
},
methods: {
async getInfo() {
// const res = await getAgentInfo({})
// if (res.result == 0) {
// console.log(res)
// if (typeof res.branchType === 'number') {
// this.isJzg = true
// this.OrgLv2Name = '营业区'
// this.OrgLv3Name = '营业部'
// this.OrgLv4Name = '营业组'
// } else {
// this.isJzg = false
// this.OrgLvName = '总公司'
// this.OrgLv2Name = '分公司'
// this.OrgLv3Name = '中支公司'
// this.OrgLv4Name = '支公司'
// }
// let userInfo = JSON.parse(localStorage.getItem('userInfo'))
// // 获取代理人信息
// if (userInfo) {
// this.isJzg = isNumber(Number(userInfo.branchType))
// }
let userInfo = JSON.parse(localStorage.getItem('userInfo'))
// 获取代理人信息
if (userInfo) {
this.isJzg = isNumber(Number(userInfo.branchType))
console.log(this.isJzg, 'this.isJzg')
if (!this.isJzg) {
this.OrgLvName = '总公司'
this.OrgLv2Name = '分公司'
this.OrgLv3Name = '中支公司'
this.OrgLv4Name = '支公司'
} else {
this.OrgLv2Name = '营业区'
this.OrgLv3Name = '营业部'
this.OrgLv4Name = '营业组'
}
}
},
openTime(flag) {
this.TimeFlag = flag
@@ -482,15 +455,30 @@ export default {
loadingType: 'spinner',
message: '加载中……'
})
const res = await getMisBranchComList2({
// isJzg: this.isJzg,
// bussinessType: 'normal',
manageCode: this.isJzg ? '' : '86'
// manageLv: '06'
})
const res = await getAgentInfo({})
if (res.result == 0) {
this.OrgLv2s.push(...res.content)
this.isJzg = isNumber(Number(res.branchType))
if (this.isJzg) {
this.OrgLv2Name = '营业区'
this.OrgLv3Name = '营业部'
this.OrgLv4Name = '营业组'
} else {
this.OrgLvName = '总公司'
this.OrgLv2Name = '分公司'
this.OrgLv3Name = '中支公司'
this.OrgLv4Name = '支公司'
}
const resf = await getMisBranchComList2({
// isJzg: this.isJzg,
// bussinessType: 'normal',
manageCode: this.isJzg ? '' : '86'
// manageLv: '06'
})
if (res.result == 0) {
this.OrgLv2s.push(...resf.content)
}
}
// let resData = await getBranchByUser({})
// this.$toast.clear()
// if (resData.result != '0') return this.$toast(resData.resultMessage)
@@ -618,10 +606,10 @@ export default {
}
// 查询三级机构
const res = await getMisBranchComList2({
isJzg: this.isJzg,
bussinessType: 'normal',
manageCode: this.OrgLv2Code,
manageLv: '06'
// isJzg: this.isJzg,
// bussinessType: 'normal',
manageCode: this.OrgLv2Code
// manageLv: '06'
})
this.OrgLv3s.splice(0)
this.OrgLv3s.push(...res.content)
@@ -653,10 +641,10 @@ export default {
}
// 查询四级机构
const res = await getMisBranchComList2({
isJzg: this.isJzg,
bussinessType: 'normal',
manageCode: this.OrgLv3Code,
manageLv: '07'
// isJzg: this.isJzg,
// bussinessType: 'normal',
manageCode: this.OrgLv3Code
// manageLv: '07'
})
this.OrgLv4s.splice(0)
this.OrgLv4s.push(...res.content)