diff --git a/jshERP-web/src/api/api.js b/jshERP-web/src/api/api.js index 6cb0a72f..28f9117a 100644 --- a/jshERP-web/src/api/api.js +++ b/jshERP-web/src/api/api.js @@ -139,6 +139,7 @@ const checkFunction = (params)=>getAction("/function/checkIsNameExist",params); const addSystemConfig = (params)=>postAction("/systemConfig/add",params); const editSystemConfig = (params)=>putAction("/systemConfig/update",params); const checkSystemConfig = (params)=>getAction("/systemConfig/checkIsNameExist",params); +const getCurrentSystemConfig = (params)=>getAction("/systemConfig/getCurrentInfo",params); //用户|角色|模块关系 const addUserBusiness = (params)=>postAction("/userBusiness/add",params); const editUserBusiness = (params)=>putAction("/userBusiness/update",params); @@ -254,6 +255,7 @@ export { addSystemConfig, editSystemConfig, checkSystemConfig, + getCurrentSystemConfig, addUserBusiness, editUserBusiness, checkUserBusiness, diff --git a/jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue b/jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue index befeb7ea..eea9d4c6 100644 --- a/jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue +++ b/jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal.vue @@ -260,9 +260,9 @@ }, getDepotList() { let that = this; - getAction('/depot/findDepotByUserId?UBType=UserDepot&UBKeyId=').then((res) => { - if (res) { - that.depotList = res + getAction('/depot/findDepotByCurrentUser').then((res) => { + if(res.code === 200){ + that.depotList = res.data } }) }, diff --git a/jshERP-web/src/views/bill/mixins/BillModalMixin.js b/jshERP-web/src/views/bill/mixins/BillModalMixin.js index 9b8dfd40..e01fbc86 100644 --- a/jshERP-web/src/views/bill/mixins/BillModalMixin.js +++ b/jshERP-web/src/views/bill/mixins/BillModalMixin.js @@ -111,13 +111,14 @@ export const BillModalMixin = { }, initDepot() { let that = this; - getAction('/depot/findDepotByUserId?UBType=UserDepot&UBKeyId=').then((res) => { - if (res) { - for(let i=0; i { + if(res.code === 200){ + let arr = res.data + for(let i=0; i - {{ depot.name }} + {{ depot.depotName }} @@ -169,15 +169,9 @@ }); }, getDepotData() { - getAction('/depot/getAllList').then((res)=>{ + getAction('/depot/findDepotByCurrentUser').then((res)=>{ if(res.code === 200){ - let arr=res.data; - for(let i=0;i - {{ depot.name }} + {{ depot.depotName }} @@ -155,15 +155,9 @@ }); }, getDepotData() { - getAction('/depot/getAllList').then((res)=>{ + getAction('/depot/findDepotByCurrentUser').then((res)=>{ if(res.code === 200){ - let arr=res.data; - for(let i=0;i - {{ depot.name }} + {{ depot.depotName }} @@ -137,15 +137,9 @@ return param; }, getDepotData() { - getAction('/depot/getAllList').then((res)=>{ + getAction('/depot/findDepotByCurrentUser').then((res)=>{ if(res.code === 200){ - let arr=res.data; - for(let i=0;i - {{ depot.name }} + {{ depot.depotName }} @@ -169,15 +169,9 @@ }); }, getDepotData() { - getAction('/depot/getAllList').then((res)=>{ + getAction('/depot/findDepotByCurrentUser').then((res)=>{ if(res.code === 200){ - let arr=res.data; - for(let i=0;i - {{ depot.name }} + {{ depot.depotName }} @@ -155,15 +155,9 @@ }); }, getDepotData() { - getAction('/depot/getAllList').then((res)=>{ + getAction('/depot/findDepotByCurrentUser').then((res)=>{ if(res.code === 200){ - let arr=res.data; - for(let i=0;i - {{ depot.name }} + {{ depot.depotName }} @@ -114,15 +114,9 @@ return param; }, getDepotData() { - getAction('/depot/getAllList').then((res)=>{ + getAction('/depot/findDepotByCurrentUser').then((res)=>{ if(res.code === 200){ - let arr=res.data; - for(let i=0;i - 分配仓库 - - 分配客户 - + 分配仓库 + + 分配客户 + 编辑 @@ -81,6 +81,7 @@ import UserDepotModal from './modules/UserDepotModal' import UserCustomerModal from './modules/UserCustomerModal' import {postAction} from '@/api/manage'; + import {getCurrentSystemConfig} from '@/api/api' import {JeecgListMixin} from '@/mixins/JeecgListMixin' import JInput from '@/components/jeecg/JInput' export default { @@ -95,6 +96,8 @@ data() { return { queryParam: {}, + depotFlag: '0', + customerFlag: '0', columns: [ { title: '#', @@ -129,7 +132,30 @@ }, } }, + created () { + this.getSystemConfig() + }, methods: { + getSystemConfig() { + getCurrentSystemConfig().then((res) => { + if(res.code === 200){ + let systemConfig = res.data + this.depotFlag = systemConfig.depotFlag + this.customerFlag = systemConfig.customerFlag + } else { + this.$message.warning(res.data); + } + }) + }, + searchQuery() { + this.loadData(1); + this.getSystemConfig(); + }, + searchReset() { + this.queryParam = {} + this.loadData(1); + this.getSystemConfig(); + }, handleReset(id) { let that = this; postAction(that.url.resetPwd, {id: id}).then((res) => {