5.31宁夏提交

This commit is contained in:
FrancisHu 2024-05-31 09:12:18 +08:00
parent c9d8962e93
commit f70d1317f2
9 changed files with 189 additions and 113 deletions

View File

@ -3,25 +3,25 @@ class HttpConfig {
baseUrl = "/api" baseUrl = "/api"
// #endif // #endif
// #ifdef APP-PLUS // #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://192.168.0.14:21624"
// baseUrl = "http://112.29.103.165:21626" // baseUrl = "http://112.29.103.165:21626"
// baseUrl = "http://172.20.10.3:8080" // baseUrl = "http://172.20.10.3:8080"
// baseUrl = "http://10.40.92.8:8080" // baseUrl = "http://10.40.92.8:8080"
// baseUrl = "http://10.40.92.52:28080" // baseUrl = "http://10.40.92.52:28080"
// baseUrl = "http://10.40.92.81:8080" // baseUrl = "http://10.40.92.78:28080"
// baseUrl = "https://z.csgmall.com.cn/gl" // baseUrl = "https://z.csgmall.com.cn/gl"
baseUrl = "http://10.40.92.141:28080" // baseUrl = "http://10.40.92.141:28080"
// #endif // #endif
// 基地址 // 基地址
/* authPath = `${this.baseUrl}/dev-api/auth` authPath = `${this.baseUrl}/dev-api/auth`
systemPath = `${this.baseUrl}/dev-api/system` systemPath = `${this.baseUrl}/dev-api/system`
basePath = `${this.baseUrl}/dev-api/base` basePath = `${this.baseUrl}/dev-api/base`
materialPath = `${this.baseUrl}/dev-api/material` */ materialPath = `${this.baseUrl}/dev-api/material`
authPath = `${this.baseUrl}/auth` /* authPath = `${this.baseUrl}/auth`
systemPath = `${this.baseUrl}/system` systemPath = `${this.baseUrl}/system`
basePath = `${this.baseUrl}/base` basePath = `${this.baseUrl}/base`
materialPath = `${this.baseUrl}/material` materialPath = `${this.baseUrl}/material` */
// 短链 // 短链
serviceUrl = { serviceUrl = {
login: { login: {

View File

@ -2,8 +2,8 @@
"name" : "智慧仓储", "name" : "智慧仓储",
"appid" : "__UNI__9D122E1", "appid" : "__UNI__9D122E1",
"description" : "", "description" : "",
"versionName" : "1.0.7", "versionName" : "1.0.8",
"versionCode" : 107, "versionCode" : 108,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@ -72,17 +72,17 @@
<uni-icons style="color: #fff;" type="auth"></uni-icons> <uni-icons style="color: #fff;" type="auth"></uni-icons>
施管审核 施管审核
</view> </view>
<view <!-- <view
style="background-color: #FCA30D;" style="background-color: #FCA30D;"
v-show="fetch.taskStatus == 31 && fetch.leaseApplyInfoList[0].status == 0 && roles.includes('ajb')" v-show="fetch.taskStatus == 31 && fetch.leaseApplyInfoList[0].status == 0 && roles.includes('ajb')"
@click="toggleOpenModal(fetch)" @click="toggleOpenModal(fetch)"
> >
<uni-icons style="color: #fff;" type="auth"></uni-icons> <uni-icons style="color: #fff;" type="auth"></uni-icons>
安监审核 安监审核
</view> </view> -->
<view <view
style="background-color: #FCA30D;" style="background-color: #FCA30D;"
v-show="fetch.taskStatus == 32 && fetch.leaseApplyInfoList[0].status == 5 && roles.includes('jjfgs')" v-show="fetch.taskStatus == 32 && roles.includes('jjfgs')"
@click="toggleOpenModal(fetch)" @click="toggleOpenModal(fetch)"
> >
<uni-icons style="color: #fff;" type="auth"></uni-icons> <uni-icons style="color: #fff;" type="auth"></uni-icons>
@ -90,7 +90,7 @@
</view> </view>
<view <view
style="background-color: #FCA30D;" style="background-color: #FCA30D;"
v-show="fetch.taskStatus == 32 && fetch.leaseApplyInfoList[0].status == 7 && roles.includes('tsfgs')" v-show="fetch.taskStatus == 32 && roles.includes('tsfgs')"
@click="toggleOpenModal(fetch)" @click="toggleOpenModal(fetch)"
> >
<uni-icons style="color: #fff;" type="auth"></uni-icons> <uni-icons style="color: #fff;" type="auth"></uni-icons>
@ -316,31 +316,54 @@ import { basePath } from '../../public'
} }
} }
} }
this.examList = { if (that.modalList.taskStatus == 30) {
taskId: that.modalList.taskId, if (that.modalList.leaseApplyInfoList[0].leaseApplyDetails[0].companyId == 101) {
taskStatus: that.modalList.taskStatus + 1, this.examList = {
leaseApplyInfoList: that.modalList.leaseApplyInfoList taskId: that.modalList.taskId,
} taskStatus: that.modalList.taskStatus + 1,
if (that.roles.includes('fgs')) { leaseApplyInfoList: that.modalList.leaseApplyInfoList
for (let k = 0; k < that.examList.leaseApplyInfoList.length; k++) { }
that.examList.leaseApplyInfoList[k].examineStatusId = 30 } else if (that.modalList.leaseApplyInfoList[0].leaseApplyDetails[0].companyId == 102) {
this.examList = {
taskId: that.modalList.taskId,
taskStatus: that.modalList.taskStatus + 2,
leaseApplyInfoList: that.modalList.leaseApplyInfoList
}
} }
} else if (that.roles.includes('sgb')) { } else {
this.examList = {
taskId: that.modalList.taskId,
taskStatus: that.modalList.taskStatus + 1,
leaseApplyInfoList: that.modalList.leaseApplyInfoList
}
}
if (that.roles.includes('fgs') && that.modalList.taskStatus == 30) {
for (let k = 0; k < that.examList.leaseApplyInfoList.length; k++) {
// console.log(that.examList.leaseApplyInfoList[0].leaseApplyDetails[0].companyId);
if (that.examList.leaseApplyInfoList[0].leaseApplyDetails[0].companyId == 101) {
that.examList.leaseApplyInfoList[k].examineStatusId = 30
that.examList.leaseApplyInfoList[k].status = 9
} else if (that.examList.leaseApplyInfoList[0].leaseApplyDetails[0].companyId == 102) {
that.examList.leaseApplyInfoList[k].examineStatusId = 31
that.examList.leaseApplyInfoList[k].status = 9
}
}
} else if (that.roles.includes('sgb') && that.modalList.taskStatus == 31) {
for (let k = 0; k < that.examList.leaseApplyInfoList.length; k++) { for (let k = 0; k < that.examList.leaseApplyInfoList.length; k++) {
that.examList.leaseApplyInfoList[k].status = 5 that.examList.leaseApplyInfoList[k].status = 5
that.examList.leaseApplyInfoList[k].examineStatusId = 31 that.examList.leaseApplyInfoList[k].examineStatusId = 31
} }
} else if (that.roles.includes('ajb')) { } else if (that.roles.includes('ajb') && that.modalList.taskStatus == 31) {
for (let k = 0; k < that.examList.leaseApplyInfoList.length; k++) { for (let k = 0; k < that.examList.leaseApplyInfoList.length; k++) {
that.examList.leaseApplyInfoList[k].status = 7 that.examList.leaseApplyInfoList[k].status = 7
that.examList.leaseApplyInfoList[k].examineStatusId = 31 that.examList.leaseApplyInfoList[k].examineStatusId = 31
} }
} else if (that.roles.includes('jjfgs')) { } else if (that.roles.includes('jjfgs') && that.modalList.taskStatus == 32) {
for (let k = 0; k < that.examList.leaseApplyInfoList.length; k++) { for (let k = 0; k < that.examList.leaseApplyInfoList.length; k++) {
that.examList.leaseApplyInfoList[k].status = 1 that.examList.leaseApplyInfoList[k].status = 1
that.examList.leaseApplyInfoList[k].examineStatusId = 32 that.examList.leaseApplyInfoList[k].examineStatusId = 32
} }
} else if (that.roles.includes('tsfgs')) { } else if (that.roles.includes('tsfgs') && that.modalList.taskStatus == 32) {
for (let k = 0; k < that.examList.leaseApplyInfoList.length; k++) { for (let k = 0; k < that.examList.leaseApplyInfoList.length; k++) {
that.examList.leaseApplyInfoList[k].status = 3 that.examList.leaseApplyInfoList[k].status = 3
that.examList.leaseApplyInfoList[k].examineStatusId = 32 that.examList.leaseApplyInfoList[k].examineStatusId = 32
@ -679,13 +702,22 @@ import { basePath } from '../../public'
}, },
onShow() { onShow() {
let that = this let that = this
console.log(uni.getStorageSync('userInfo'));
console.log(that.roles); console.log(that.roles);
that.roles.forEach(item => { for (let i = 0; i < that.roles.length; i++) {
if (that.roles[i] == 'em01' || that.roles[i] == 'em02') {
that.roles[i] = 'jjfgs'
} else if (that.roles[i] == 'dm01' || that.roles[i] == 'dm02') {
that.roles[i] = 'tsfgs'
}
}
/* that.roles.forEach(item => {
console.log(item); console.log(item);
if (item == 'em01' || item == 'em02') item = 'jjfgs' if (item == 'em01' || item == 'em02') item = 'jjfgs'
if (item == 'dm01' || item == 'dm02') item = 'tsfgs' if (item == 'dm01' || item == 'dm02') item = 'tsfgs'
}) }) */
if (that.roles.includes('admin')) that.roles = ['admin', 'fgs', 'sgb', 'ajb', 'jjfgs', 'tsfgs'] if (that.roles.includes('admin')) that.roles = ['fgs', 'sgb', 'ajb', 'jjfgs', 'tsfgs', 'admin']
console.log(that.roles);
that.initFetch() that.initFetch()
// that.getRoles() // that.getRoles()
} }

View File

@ -23,7 +23,7 @@
<checkbox :checked="fetch.checked" /> <checkbox :checked="fetch.checked" />
</checkbox-group> --> </checkbox-group> -->
<view class="upper-lef"> <view class="upper-lef">
{{ fetch.createBy.slice(0, 1) }} {{ fetch.createBy == null ? '' : fetch.createBy.slice(0, 1) }}
</view> </view>
<view class="upper-rig"> <view class="upper-rig">
<h4 style="font-size: 16px;">{{ fetch.createBy }}</h4> <h4 style="font-size: 16px;">{{ fetch.createBy }}</h4>
@ -147,16 +147,33 @@ import { basePath } from '../../public'
fetchMaterialList: [ fetchMaterialList: [
], ],
examList: [] examList: [],
ableRoles: ['admin', 'jjfgs', 'dm05']
} }
}, },
methods: { methods: {
seeDetail (taskId, taskStatus, id) { seeDetail (taskId, taskStatus, id) {
// if (taskStatus == 33) { /* let that = this
uni.navigateTo({ let nowRole = uni.getStorageSync('roles')
url: `/pages/fetchMaterialOutStoreDetail/fetchMaterialOutStoreDetail?taskId=${taskId}&taskStatus=${taskStatus}&id=${id}` let found = false
for (let role of nowRole) {
if (that.ableRoles.includes(role)) {
found = true;
break;
}
}
console.log(found);
if (!found) {
uni.showToast({
icon: 'none',
title: '当前角色没有操作权限!'
}) })
// } } else {
} */
uni.navigateTo({
url: `/pages/fetchMaterialOutStoreDetail/fetchMaterialOutStoreDetail?taskId=${taskId}&taskStatus=${taskStatus}&id=${id}`
})
}, },
/* checkAll() { /* checkAll() {
this.allChecked = !this.allChecked this.allChecked = !this.allChecked

View File

@ -280,7 +280,7 @@
that.fetchList.push(res.data.data.rows[0].leaseApplyInfoList[i].leaseApplyDetails[k]) that.fetchList.push(res.data.data.rows[0].leaseApplyInfoList[i].leaseApplyDetails[k])
} }
} */ } */
that.fetchList = res.data.data.rows that.fetchList = res.data.data
console.log('获取详情 ===========================',that.fetchList); console.log('获取详情 ===========================',that.fetchList);
// that.fetchList[1].manageType = 1 // that.fetchList[1].manageType = 1
} }

View File

@ -11,7 +11,7 @@
<uni-easyinput type="password" placeholder="请输入" maxlength="60" <uni-easyinput type="password" placeholder="请输入" maxlength="60"
v-model="pwdFormData.oldPassword"></uni-easyinput> v-model="pwdFormData.oldPassword"></uni-easyinput>
</uni-forms-item> </uni-forms-item>
<uni-forms-item name="newPassword" required label="新密码" label-width="100"> <uni-forms-item name="newPassword" required label="新密码(最少8位包括至少1个大写字母1个小写字母1个数字1个特殊字符)" label-width="100">
<uni-easyinput type="password" placeholder="请输入" maxlength="60" <uni-easyinput type="password" placeholder="请输入" maxlength="60"
v-model="pwdFormData.newPassword"></uni-easyinput> v-model="pwdFormData.newPassword"></uni-easyinput>
</uni-forms-item> </uni-forms-item>
@ -70,8 +70,15 @@
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 (formData.newPassword != formData.confirmNewPassword) { if (!strongPwdReg.test(formData.newPassword)) {
uni.showToast({
icon: 'none',
title: '新密码格式有误!',
duration: 3000
})
} else if (formData.newPassword != formData.confirmNewPassword) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '确认密码与新密码不一致!' title: '确认密码与新密码不一致!'

View File

@ -82,7 +82,6 @@
<h5>{{ notice.createTime }}</h5> <h5>{{ notice.createTime }}</h5>
</view> </view>
</view> </view>
<u-loading-page :loading="showLoading" color="#000" :loading-text="`下载中,请稍后...${percent}%`"></u-loading-page>
</view> </view>
</template> </template>
@ -138,67 +137,7 @@ import { authPath, basePath, publicPath, systemPath } from '../../public';
}, },
onLoad() { onLoad() {
let that = this
let nowVer = ''
let serveVer = ''
let apkPath = ''
// app
plus.runtime.getProperty(plus.runtime.appid, (info) => {
nowVer = info.version.replace(/\./g, '')
})
// app
this.$api.update.fetchAppVer().then(res => {
console.log(res);
if (res.data.code == 200) {
serveVer = res.data.data[0].versionName.replace(/\./g, '')
apkPath = res.data.data[0].apkPath
//
setTimeout(() => {
console.log(nowVer, serveVer, apkPath);
if (nowVer < serveVer) {
uni.showModal({
title: '版本升级',
content: '当前版本非最新版本,请前往升级!',
showCancel: false,
confirmText: '升级',
success: (res) => {
if (res.confirm) {
that.showLoading = true
uni.hideTabBar()
let downloadApk = uni.downloadFile({
url: apkPath,
success: (download) => {
console.log(download);
if (download.statusCode == 200) {
plus.runtime.install(download.tempFilePath, {
force: true
}, (install) => {
that.showLoading = false
uni.showTabBar()
console.log(install);
})
} else {
uni.showTabBar()
that.showLoading = false
uni.showToast({
icon: 'none',
title: '下载异常,请稍后再试!'
})
}
}
})
downloadApk.onProgressUpdate(res => {
that.percent = res.progress
})
}
}
})
}
}, 500)
}
}).catch(err => {
console.log(err);
})
}, },
onShow() { onShow() {
console.log(uni.getStorageSync('token')); console.log(uni.getStorageSync('token'));

View File

@ -61,6 +61,7 @@
</uni-forms> </uni-forms>
</view> </view>
<u-loading-page :loading="showLoading" color="#000" loading-text="登录中,请稍后..."></u-loading-page> <u-loading-page :loading="showLoading" color="#000" loading-text="登录中,请稍后..."></u-loading-page>
<u-loading-page :loading="showDownload" color="#000" :loading-text="`下载中,请稍后...${percent}%`"></u-loading-page>
</view> </view>
</template> </template>
@ -70,6 +71,7 @@ export default {
data() { data() {
return { return {
showLoading: false, showLoading: false,
showDownload: false,
accountFormData: { accountFormData: {
username: '', username: '',
password: '' password: ''
@ -118,7 +120,8 @@ export default {
} }
] ]
} }
} },
percent: ''
} }
}, },
methods: { methods: {
@ -205,7 +208,8 @@ export default {
uni.setStorageSync('userInfo', res.data.data.login_user) uni.setStorageSync('userInfo', res.data.data.login_user)
uni.setStorageSync('token', res.data.data.access_token) uni.setStorageSync('token', res.data.data.access_token)
uni.setStorageSync('roles', res.data.data.login_user.roles) uni.setStorageSync('roles', res.data.data.login_user.roles)
uni.setStorageSync('deptId', res.data.data.login_user.sysUser.dept.deptId) uni.setStorageSync('pwd', formData.password)
// uni.setStorageSync('deptId', res.data.data.login_user.sysUser.dept.deptId)
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '登录成功!', title: '登录成功!',
@ -230,6 +234,74 @@ export default {
}) })
}) })
} }
},
onShow() {
if (uni.getStorageSync('pwd')) {
this.accountFormData.password = uni.getStorageSync('pwd')
}
},
onLoad() {
let that = this
let nowVer = ''
let serveVer = ''
let apkPath = ''
// app
plus.runtime.getProperty(plus.runtime.appid, (info) => {
nowVer = info.version.replace(/\./g, '')
})
// app
this.$api.update.fetchAppVer().then(res => {
console.log(res);
if (res.data.code == 200) {
serveVer = res.data.data[0].versionName.replace(/\./g, '')
apkPath = res.data.data[0].apkPath
//
setTimeout(() => {
console.log(nowVer, serveVer, apkPath);
if (nowVer < serveVer) {
uni.showModal({
title: '版本升级',
content: '当前版本非最新版本,请前往升级!',
showCancel: false,
confirmText: '升级',
success: (res) => {
if (res.confirm) {
that.showDownload = true
uni.hideTabBar()
let downloadApk = uni.downloadFile({
url: apkPath,
success: (download) => {
console.log(download);
if (download.statusCode == 200) {
plus.runtime.install(download.tempFilePath, {
force: true
}, (install) => {
that.showDownload = false
uni.showTabBar()
console.log(install);
})
} else {
uni.showTabBar()
that.showDownload = false
uni.showToast({
icon: 'none',
title: '下载异常,请稍后再试!'
})
}
}
})
downloadApk.onProgressUpdate(res => {
that.percent = res.progress
})
}
}
})
}
}, 500)
}
}).catch(err => {
console.log(err);
})
} }
} }
</script> </script>

View File

@ -51,7 +51,6 @@
<uni-icons <uni-icons
style="color: #AAAAAA; font-weight: bold;" style="color: #AAAAAA; font-weight: bold;"
type="closeempty" type="closeempty"
size="32"
@click="closePopup" @click="closePopup"
> >
</uni-icons> </uni-icons>
@ -126,7 +125,6 @@ import { basePath } from '../../public';
}, },
computed: { computed: {
totalPrice() { totalPrice() {
//
var str = 0; var str = 0;
for (var i = 0; i < this.searchData.length; i++) { for (var i = 0; i < this.searchData.length; i++) {
if (this.searchData[i].checked) { if (this.searchData[i].checked) {
@ -137,7 +135,6 @@ import { basePath } from '../../public';
return str; return str;
}, },
searchData: function() { searchData: function() {
//
if (!this.inputs) { if (!this.inputs) {
return this.list; return this.list;
} }
@ -147,7 +144,7 @@ import { basePath } from '../../public';
}, },
}, },
methods: { methods: {
add(item) { // add(item) {
let that = this let that = this
let num = item.bookNum let num = item.bookNum
item.bookNum = num + 1 item.bookNum = num + 1
@ -267,12 +264,24 @@ import { basePath } from '../../public';
async formSubmit () { async formSubmit () {
let that = this let that = this
let nowRole = uni.getStorageSync('userInfo').roles.join(',') let nowRole = uni.getStorageSync('roles')
await this.getgreementId() let found = false
if(this.deptFormData.deptName = ''){ /* that.ableUseArr.forEach(item => {
return; if (nowRole.includes(item)) found = true
}) */
for (let role of nowRole) {
console.log(role);
if (that.ableUseArr.includes(role)) {
found = true;
break;
}
} }
if (!that.ableUseArr.includes(nowRole)) { console.log(found);
await this.getgreementId()
/* if(this.deptFormData.deptName = ''){
return;
} */
if (!found) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '当前角色没有操作权限!' title: '当前角色没有操作权限!'
@ -420,10 +429,10 @@ import { basePath } from '../../public';
}) })
} */ } */
// //
console.log(uni.getStorageSync('userInfo').roles.join(',')) console.log(uni.getStorageSync('roles'))
that.$api.fetchMaterial.getDeptList().then(res => { that.$api.fetchMaterial.getDeptList().then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
that.deptRange = res.data.data.map((item) => { that.deptRange = res.data.data.map(item => {
return { return {
text: item['name'], text: item['name'],
value: item['id'] value: item['id']