6.18宁夏问题修改
This commit is contained in:
parent
ef279443f2
commit
0a92f972ab
|
|
@ -319,50 +319,61 @@ import { basePath } from '../../public'
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
initFetch () {
|
||||||
|
let that = this
|
||||||
|
// 获取退料审批清单
|
||||||
|
that.$api.exitExam.exitExamList({
|
||||||
|
companyId: uni.getStorageSync('userInfo').sysUser.companyId
|
||||||
|
// companyId: 1
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.data.code == 200) {
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '未查询到相关数据!'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.fetchMaterialList = res.data.data
|
||||||
|
console.log(that.fetchMaterialList);
|
||||||
|
}
|
||||||
|
} else if (res.data.code == 500) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '登录状态已过期,请重新登录!',
|
||||||
|
success: () => {
|
||||||
|
uni.removeStorageSync('token')
|
||||||
|
uni.removeStorageSync('userInfo')
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: res.data.msg
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
let that = this
|
let that = this
|
||||||
// that.roles = uni.getStorageSync('roles')
|
// that.roles = uni.getStorageSync('roles')
|
||||||
console.log(that.roles, uni.getStorageSync('userInfo').sysUser.companyId);
|
console.log(that.roles, uni.getStorageSync('userInfo').sysUser.companyId);
|
||||||
if (that.roles.includes('admin')) that.roles = ['admin', 'jjfgs', 'tsfgs']
|
for (let i = 0; i < that.roles.length; i++) {
|
||||||
// 获取退料审批清单
|
if (that.roles[i] == 'em01' || that.roles[i] == 'em02') {
|
||||||
that.$api.exitExam.exitExamList({
|
that.roles[i] = 'jjfgs'
|
||||||
companyId: uni.getStorageSync('userInfo').sysUser.companyId
|
} else if (that.roles[i] == 'dm01' || that.roles[i] == 'dm02') {
|
||||||
// companyId: 1
|
that.roles[i] = 'tsfgs'
|
||||||
}).then(res => {
|
|
||||||
console.log(res);
|
|
||||||
if (res.data.code == 200) {
|
|
||||||
if (res.data.data.length == 0) {
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'none',
|
|
||||||
title: '未查询到相关数据!'
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
that.fetchMaterialList = res.data.data
|
|
||||||
console.log(that.fetchMaterialList);
|
|
||||||
}
|
|
||||||
} else if (res.data.code == 500) {
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'none',
|
|
||||||
title: '登录状态已过期,请重新登录!',
|
|
||||||
success: () => {
|
|
||||||
uni.removeStorageSync('token')
|
|
||||||
uni.removeStorageSync('userInfo')
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/login/login'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'none',
|
|
||||||
title: res.data.msg
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}
|
||||||
console.log(err);
|
if (that.roles.includes('admin')) that.roles = ['admin', 'jjfgs', 'tsfgs']
|
||||||
})
|
that.initFetch()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
<u-loading-page :loading="showLoading" color="#000" loading-text="表单提交中,请稍后..."></u-loading-page>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -223,7 +224,8 @@ import { basePath } from '../../public'
|
||||||
remark: ''
|
remark: ''
|
||||||
},
|
},
|
||||||
fetchedList: [],
|
fetchedList: [],
|
||||||
ableRoleArr: ['admin', 'em04', 'me02', 'dm03']
|
ableRoleArr: ['admin', 'em04', 'me02', 'dm03'],
|
||||||
|
showLoading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -259,6 +261,7 @@ import { basePath } from '../../public'
|
||||||
},
|
},
|
||||||
formSubmit () {
|
formSubmit () {
|
||||||
let that = this
|
let that = this
|
||||||
|
that.showLoading = true
|
||||||
that.$refs.exitForm.validate().then(formData => {
|
that.$refs.exitForm.validate().then(formData => {
|
||||||
that.$refs.popup.close()
|
that.$refs.popup.close()
|
||||||
// 判断单位id和工程id是否匹配
|
// 判断单位id和工程id是否匹配
|
||||||
|
|
@ -280,6 +283,7 @@ import { basePath } from '../../public'
|
||||||
that.$api.exitMaterial.newExitList(that.newAdd).then(res => {
|
that.$api.exitMaterial.newExitList(that.newAdd).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
|
that.showLoading = false
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '新增申请成功!',
|
title: '新增申请成功!',
|
||||||
|
|
@ -289,6 +293,12 @@ import { basePath } from '../../public'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
that.showLoading = false
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: res.data.msg
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
|
|
||||||
|
|
@ -64,19 +64,18 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
strongPwdReg: /^\S*(?=\S{8,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S*$/
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submitForm() {
|
submitForm() {
|
||||||
let that = this
|
let that = this
|
||||||
let strongPwdReg = /^\S*(?=\S{8,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S*$/
|
|
||||||
that.$refs.pwdForm.validate().then(formData => {
|
that.$refs.pwdForm.validate().then(formData => {
|
||||||
if (!strongPwdReg.test(formData.newPassword)) {
|
if (!that.strongPwdReg.test(formData.newPassword)) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '新密码格式有误!',
|
title: '新密码格式有误!'
|
||||||
duration: 3000
|
|
||||||
})
|
})
|
||||||
} else if (formData.newPassword != formData.confirmNewPassword) {
|
} else if (formData.newPassword != formData.confirmNewPassword) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
|
||||||
|
|
@ -321,13 +321,13 @@
|
||||||
// 初始化查询报废审核清单
|
// 初始化查询报废审核清单
|
||||||
that.$api.testExam.testExamList().then(res => {
|
that.$api.testExam.testExamList().then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.data.total != 0) {
|
if (res.data.data.total != 0) {
|
||||||
for (let i = 0; i < res.data.rows.length; i++) {
|
for (let i = 0; i < res.data.data.rows.length; i++) {
|
||||||
if (res.data.rows[i].taskStatus == 46) {
|
if (res.data.data.rows[i].taskStatus == 46) {
|
||||||
res.data.rows[i].checked = false
|
res.data.data.rows[i].checked = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
that.fetchMaterialList = res.data.rows
|
that.fetchMaterialList = res.data.data.rows
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue