5.24宁夏权限修改
This commit is contained in:
parent
23c99c7cb8
commit
c9d8962e93
11
apis/http.js
11
apis/http.js
|
|
@ -3,7 +3,7 @@ class HttpConfig {
|
|||
baseUrl = "/api"
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
baseUrl = "http://112.29.103.165:21624"
|
||||
// baseUrl = "http://112.29.103.165:21624"
|
||||
// baseUrl = "http://192.168.0.14:21624"
|
||||
// baseUrl = "http://112.29.103.165:21626"
|
||||
// baseUrl = "http://172.20.10.3:8080"
|
||||
|
|
@ -11,16 +11,17 @@ class HttpConfig {
|
|||
// baseUrl = "http://10.40.92.52:28080"
|
||||
// baseUrl = "http://10.40.92.81:8080"
|
||||
// baseUrl = "https://z.csgmall.com.cn/gl"
|
||||
baseUrl = "http://10.40.92.141:28080"
|
||||
// #endif
|
||||
// 基地址
|
||||
authPath = `${this.baseUrl}/dev-api/auth`
|
||||
/* authPath = `${this.baseUrl}/dev-api/auth`
|
||||
systemPath = `${this.baseUrl}/dev-api/system`
|
||||
basePath = `${this.baseUrl}/dev-api/base`
|
||||
materialPath = `${this.baseUrl}/dev-api/material`
|
||||
/* authPath = `${this.baseUrl}/auth`
|
||||
materialPath = `${this.baseUrl}/dev-api/material` */
|
||||
authPath = `${this.baseUrl}/auth`
|
||||
systemPath = `${this.baseUrl}/system`
|
||||
basePath = `${this.baseUrl}/base`
|
||||
materialPath = `${this.baseUrl}/material` */
|
||||
materialPath = `${this.baseUrl}/material`
|
||||
// 短链
|
||||
serviceUrl = {
|
||||
login: {
|
||||
|
|
|
|||
|
|
@ -680,9 +680,14 @@ import { basePath } from '../../public'
|
|||
onShow() {
|
||||
let that = this
|
||||
console.log(that.roles);
|
||||
that.roles.forEach(item => {
|
||||
console.log(item);
|
||||
if (item == 'em01' || item == 'em02') item = 'jjfgs'
|
||||
if (item == 'dm01' || item == 'dm02') item = 'tsfgs'
|
||||
})
|
||||
if (that.roles.includes('admin')) that.roles = ['admin', 'fgs', 'sgb', 'ajb', 'jjfgs', 'tsfgs']
|
||||
that.initFetch()
|
||||
that.getRoles()
|
||||
// that.getRoles()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ import { basePath } from '../../public';
|
|||
]
|
||||
}
|
||||
},
|
||||
ableUseArr: ['admin', 'em04', 'me02', 'dm03']
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -265,65 +266,74 @@ import { basePath } from '../../public';
|
|||
},
|
||||
|
||||
async formSubmit () {
|
||||
let that = this
|
||||
let nowRole = uni.getStorageSync('userInfo').roles.join(',')
|
||||
await this.getgreementId()
|
||||
if(this.deptFormData.deptName = ''){
|
||||
return;
|
||||
}
|
||||
let that = this
|
||||
that.$refs.deptForm.validate().then(formData => {
|
||||
console.log(formData, that.totalGoods);
|
||||
that.totalGoods = that.totalGoods.map((item) => {
|
||||
return {
|
||||
id: item['id'],
|
||||
if (!that.ableUseArr.includes(nowRole)) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '当前角色没有操作权限!'
|
||||
})
|
||||
} else {
|
||||
// console.log(1);
|
||||
that.$refs.deptForm.validate().then(formData => {
|
||||
console.log(formData, that.totalGoods);
|
||||
that.totalGoods = that.totalGoods.map((item) => {
|
||||
return {
|
||||
id: item['id'],
|
||||
createBy: uni.getStorageSync('userInfo').sysUser.userName,
|
||||
companyId: item['companyId'],
|
||||
status: '0',
|
||||
// createTime: that.formatDate(new Date().getTime()),
|
||||
typeId: item['typeId'],
|
||||
preNum: item['bookNum']
|
||||
}
|
||||
})
|
||||
that.sendData = {
|
||||
companyId: uni.getStorageSync('userInfo').sysUser.companyId,
|
||||
createBy: uni.getStorageSync('userInfo').sysUser.userName,
|
||||
companyId: item['companyId'],
|
||||
status: '0',
|
||||
unitId: formData.deptName,
|
||||
projectId: formData.projName,
|
||||
agreementId: that.deptFormData.agreementId,
|
||||
agreementCode: that.deptFormData.agreementCode,
|
||||
taskType: 29,
|
||||
taskStatus: 30,
|
||||
// createTime: that.formatDate(new Date().getTime()),
|
||||
typeId: item['typeId'],
|
||||
preNum: item['bookNum']
|
||||
leaseApplyInfo: {
|
||||
leasePerson: uni.getStorageSync('userInfo').sysUser.userName,
|
||||
phone: uni.getStorageSync('userInfo').sysUser.phonenumber
|
||||
},
|
||||
leaseApplyDetails: that.totalGoods
|
||||
}
|
||||
console.log('that.sendData =================== ',that.sendData);
|
||||
// 提交预约商品
|
||||
that.$api.fetchMaterial.subCart(that.sendData).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
success: () => {
|
||||
uni.redirectTo({
|
||||
url: '/pages/orderCart/orderCart'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title:res.data.msg
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
that.$refs.popup.close()
|
||||
})
|
||||
that.sendData = {
|
||||
companyId: uni.getStorageSync('userInfo').sysUser.companyId,
|
||||
createBy: uni.getStorageSync('userInfo').sysUser.userName,
|
||||
unitId: formData.deptName,
|
||||
projectId: formData.projName,
|
||||
agreementId: that.deptFormData.agreementId,
|
||||
agreementCode: that.deptFormData.agreementCode,
|
||||
taskType: 29,
|
||||
taskStatus: 30,
|
||||
// createTime: that.formatDate(new Date().getTime()),
|
||||
leaseApplyInfo: {
|
||||
leasePerson: uni.getStorageSync('userInfo').sysUser.userName,
|
||||
phone: uni.getStorageSync('userInfo').sysUser.phonenumber
|
||||
},
|
||||
leaseApplyDetails: that.totalGoods
|
||||
}
|
||||
console.log('that.sendData =================== ',that.sendData);
|
||||
// 提交预约商品
|
||||
that.$api.fetchMaterial.subCart(that.sendData).then(res => {
|
||||
console.log(res);
|
||||
if (res.data.code == 200) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.msg,
|
||||
success: () => {
|
||||
uni.redirectTo({
|
||||
url: '/pages/orderCart/orderCart'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title:res.data.msg
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
})
|
||||
that.$refs.popup.close()
|
||||
})
|
||||
}
|
||||
},
|
||||
deptChange (e) {
|
||||
let that = this
|
||||
|
|
@ -410,6 +420,7 @@ import { basePath } from '../../public';
|
|||
})
|
||||
} */
|
||||
// 初始化查询全部部门
|
||||
console.log(uni.getStorageSync('userInfo').roles.join(','))
|
||||
that.$api.fetchMaterial.getDeptList().then(res => {
|
||||
if (res.data.code == 200) {
|
||||
that.deptRange = res.data.data.map((item) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue