|
@@ -2,28 +2,33 @@
|
|
<view>
|
|
<view>
|
|
<view class="wrap">
|
|
<view class="wrap">
|
|
<view class='title'>收购业务管理</view>
|
|
<view class='title'>收购业务管理</view>
|
|
- <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
|
|
|
|
- <view class="cu-item" v-for="(item,index) in gridList" :key="index" @click="gridClick(item, index)" v-if="index<gridCol*2">
|
|
|
|
|
|
+ <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
|
|
|
|
+ <view class="cu-item" v-for="(item,index) in gridList" :key="index" @click="gridClick(item, index)"
|
|
|
|
+ v-if="index<gridCol*2">
|
|
<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
|
|
<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
|
|
<image :src="item.src" class="sign"></image>
|
|
<image :src="item.src" class="sign"></image>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
<text>{{item.name}}</text>
|
|
<text>{{item.name}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="wrap" >
|
|
|
|
|
|
+ <view class="wrap">
|
|
<view class='title'>出库管理</view>
|
|
<view class='title'>出库管理</view>
|
|
- <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
|
|
|
|
- <view class="cu-item" v-for="(item,index) in gridList1" :key="index" @click="gridClick(item, index)" v-if="index<gridCol*2">
|
|
|
|
|
|
+ <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
|
|
|
|
+ <view class="cu-item" v-for="(item,index) in gridList1" :key="index" @click="gridClick(item, index)"
|
|
|
|
+ v-if="index<gridCol*2">
|
|
<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
|
|
<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
|
|
<image :src="item.src" class="sign"></image>
|
|
<image :src="item.src" class="sign"></image>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
<text>{{item.name}}</text>
|
|
<text>{{item.name}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
|
|
|
|
+ :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='温馨提示'
|
|
|
|
+ showCancelButton='false' :content="content" @confirm="goOpenService" @cancel="cancelClick"></u-modal>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
@@ -40,7 +45,9 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- a:false,
|
|
|
|
|
|
+ isShowAlert: false,
|
|
|
|
+ content: '您确定要退出吗?',
|
|
|
|
+ a: false,
|
|
inputShow: false,
|
|
inputShow: false,
|
|
modalName: '',
|
|
modalName: '',
|
|
mycarStyle: '',
|
|
mycarStyle: '',
|
|
@@ -56,15 +63,14 @@
|
|
carInfo: [],
|
|
carInfo: [],
|
|
gridCol: 4,
|
|
gridCol: 4,
|
|
gridBorder: false,
|
|
gridBorder: false,
|
|
- headUrl:"../../static/img/myimg/YongHu@3x.png",
|
|
|
|
- userphone:"",
|
|
|
|
- username:"请更改昵称",
|
|
|
|
- gridList: [
|
|
|
|
- {
|
|
|
|
|
|
+ headUrl: "../../static/img/myimg/YongHu@3x.png",
|
|
|
|
+ userphone: "",
|
|
|
|
+ username: "请更改昵称",
|
|
|
|
+ gridList: [{
|
|
num: 0,
|
|
num: 0,
|
|
name: '邀请用户',
|
|
name: '邀请用户',
|
|
// icon: 'cuIcon-apps',
|
|
// icon: 'cuIcon-apps',
|
|
- src:'../../static/img/erp/yaoqingyonghu@3x.png',
|
|
|
|
|
|
+ src: '../../static/img/erp/yaoqingyonghu@3x.png',
|
|
tips: 0,
|
|
tips: 0,
|
|
url: '/pages/erpbusiness/QRCode/QRCode',
|
|
url: '/pages/erpbusiness/QRCode/QRCode',
|
|
show: true
|
|
show: true
|
|
@@ -73,7 +79,7 @@
|
|
num: 1,
|
|
num: 1,
|
|
name: '收购质检',
|
|
name: '收购质检',
|
|
// icon: 'cuIcon-calendar',
|
|
// icon: 'cuIcon-calendar',
|
|
- src:'../../static/img/erp/shougouzhijian@3x.png',
|
|
|
|
|
|
+ src: '../../static/img/erp/shougouzhijian@3x.png',
|
|
tips: 0,
|
|
tips: 0,
|
|
url: '/pages/erpbusiness/quality_testing?managementType=1',
|
|
url: '/pages/erpbusiness/quality_testing?managementType=1',
|
|
show: true
|
|
show: true
|
|
@@ -113,7 +119,7 @@
|
|
num: 1,
|
|
num: 1,
|
|
name: '出库质检',
|
|
name: '出库质检',
|
|
// icon: 'cuIcon-calendar',
|
|
// icon: 'cuIcon-calendar',
|
|
- src:'../../static/img/erp/chukuzhijian@3x.png',
|
|
|
|
|
|
+ src: '../../static/img/erp/chukuzhijian@3x.png',
|
|
tips: 0,
|
|
tips: 0,
|
|
url: '/pages/erpbusiness/quality_testing?managementType=3',
|
|
url: '/pages/erpbusiness/quality_testing?managementType=3',
|
|
show: true
|
|
show: true
|
|
@@ -133,9 +139,9 @@
|
|
current: 4
|
|
current: 4
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
onLoad() {
|
|
onLoad() {
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
// #ifndef MP
|
|
// #ifndef MP
|
|
onNavigationBarButtonTap(e) {
|
|
onNavigationBarButtonTap(e) {
|
|
@@ -160,9 +166,9 @@
|
|
computed: {
|
|
computed: {
|
|
...mapState(['hasLogin', 'userInfo']),
|
|
...mapState(['hasLogin', 'userInfo']),
|
|
// 手机号中间4位加*
|
|
// 手机号中间4位加*
|
|
- starUserphone(){
|
|
|
|
|
|
+ starUserphone() {
|
|
let reg = /^(\d{3})\d{4}(\d{4})$/;
|
|
let reg = /^(\d{3})\d{4}(\d{4})$/;
|
|
- if(this.userphone){
|
|
|
|
|
|
+ if (this.userphone) {
|
|
return this.userphone.replace(reg, "$1****$2");
|
|
return this.userphone.replace(reg, "$1****$2");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -173,7 +179,7 @@
|
|
uni.showTabBar()
|
|
uni.showTabBar()
|
|
this.loadData()
|
|
this.loadData()
|
|
this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
|
|
this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
|
|
- console.log("checkSession",res)
|
|
|
|
|
|
+ console.log("checkSession", res)
|
|
if (res.data.data == "INVALID") {
|
|
if (res.data.data == "INVALID") {
|
|
uni.showModal({
|
|
uni.showModal({
|
|
title: '登录提示',
|
|
title: '登录提示',
|
|
@@ -192,18 +198,18 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- console.log("hasLogin",this.hasLogin )
|
|
|
|
- if(this.userInfo){
|
|
|
|
- if(!this.userInfo.avatarUrl){
|
|
|
|
|
|
+ console.log("hasLogin", this.hasLogin)
|
|
|
|
+ if (this.userInfo) {
|
|
|
|
+ if (!this.userInfo.avatarUrl) {
|
|
this.headUrl = "../../static/img/myimg/YongHu@3x.png"
|
|
this.headUrl = "../../static/img/myimg/YongHu@3x.png"
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
this.headUrl = this.userInfo.avatarUrl
|
|
this.headUrl = this.userInfo.avatarUrl
|
|
}
|
|
}
|
|
this.username = this.userInfo.userName
|
|
this.username = this.userInfo.userName
|
|
this.userphone = this.userInfo.phone
|
|
this.userphone = this.userInfo.phone
|
|
var that = this
|
|
var that = this
|
|
this.$api.doRequest('get', '/notice/query/noticeNumber').then(res => {
|
|
this.$api.doRequest('get', '/notice/query/noticeNumber').then(res => {
|
|
- console.log("noticeNumber",res)
|
|
|
|
|
|
+ console.log("noticeNumber", res)
|
|
if (res.data.data) {
|
|
if (res.data.data) {
|
|
let name = 'myTip';
|
|
let name = 'myTip';
|
|
let value = res.data.data.task;
|
|
let value = res.data.data.task;
|
|
@@ -211,10 +217,10 @@
|
|
name,
|
|
name,
|
|
value
|
|
value
|
|
});
|
|
});
|
|
- if(value != 0&&value){
|
|
|
|
|
|
+ if (value != 0 && value) {
|
|
uni.setTabBarBadge({
|
|
uni.setTabBarBadge({
|
|
- index:4,
|
|
|
|
- text:value+""
|
|
|
|
|
|
+ index: 4,
|
|
|
|
+ text: value + ""
|
|
})
|
|
})
|
|
}
|
|
}
|
|
name = 'taskTip';
|
|
name = 'taskTip';
|
|
@@ -231,39 +237,53 @@
|
|
// });
|
|
// });
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
this.headUrl = "../../static/img/myimg/YongHu@3x.png"
|
|
this.headUrl = "../../static/img/myimg/YongHu@3x.png"
|
|
this.username = "立即登录"
|
|
this.username = "立即登录"
|
|
}
|
|
}
|
|
- console.log("this.userInfo",this.userInfo)
|
|
|
|
|
|
+ console.log("this.userInfo", this.userInfo)
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ cancelClick() {
|
|
|
|
+ this.isShowAlert = false
|
|
|
|
+ },
|
|
|
|
+ goOpenService() {
|
|
|
|
+ uni.hideTabBarRedDot({
|
|
|
|
+ index: 3
|
|
|
|
+ })
|
|
|
|
+ uni.clearStorageSync();
|
|
|
|
+ this.$store.commit('logout')
|
|
|
|
+ this.$api.logout()
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: `/pages/public/login`
|
|
|
|
+ })
|
|
|
|
+ },
|
|
getRoles: function(role) {
|
|
getRoles: function(role) {
|
|
let _roles = uni.getStorageSync('rolesList')
|
|
let _roles = uni.getStorageSync('rolesList')
|
|
for (let i = 0; i < _roles.length; i++) {
|
|
for (let i = 0; i < _roles.length; i++) {
|
|
if (_roles[i] == role) {
|
|
if (_roles[i] == role) {
|
|
- return true
|
|
|
|
- }
|
|
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return false
|
|
return false
|
|
},
|
|
},
|
|
- isShow(){
|
|
|
|
- for(let i = 0;i<this.gridList.length;i++){
|
|
|
|
- if(i==1){
|
|
|
|
|
|
+ isShow() {
|
|
|
|
+ for (let i = 0; i < this.gridList.length; i++) {
|
|
|
|
+ if (i == 1) {
|
|
this.gridList[i].show = this.getRoles('acquisitionQuality.view')
|
|
this.gridList[i].show = this.getRoles('acquisitionQuality.view')
|
|
- }else if (i==2){
|
|
|
|
|
|
+ } else if (i == 2) {
|
|
this.gridList[i].show = this.getRoles('acquisitionWeight.view')
|
|
this.gridList[i].show = this.getRoles('acquisitionWeight.view')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- for(let k = 0;k<this.gridList1.length;k++){
|
|
|
|
- if(k==0){
|
|
|
|
|
|
+ for (let k = 0; k < this.gridList1.length; k++) {
|
|
|
|
+ if (k == 0) {
|
|
this.gridList[k].show = this.getRoles('acquisitionWeightOut.view')
|
|
this.gridList[k].show = this.getRoles('acquisitionWeightOut.view')
|
|
- }else if (k==1){
|
|
|
|
|
|
+ } else if (k == 1) {
|
|
this.gridList[k].show = this.getRoles('acquisitionQualityOut.view')
|
|
this.gridList[k].show = this.getRoles('acquisitionQualityOut.view')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- fankui(){
|
|
|
|
|
|
+ fankui() {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: `/pages/user/fankui`
|
|
url: `/pages/user/fankui`
|
|
})
|
|
})
|
|
@@ -371,15 +391,15 @@
|
|
fail: () => {},
|
|
fail: () => {},
|
|
complete: () => {}
|
|
complete: () => {}
|
|
})
|
|
})
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
if (item.url) {
|
|
if (item.url) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: item.url
|
|
|
|
|
|
+ url: item.url
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- setting(){
|
|
|
|
|
|
+ setting() {
|
|
if (!this.hasLogin) {
|
|
if (!this.hasLogin) {
|
|
uni.showModal({
|
|
uni.showModal({
|
|
title: '登录提示',
|
|
title: '登录提示',
|
|
@@ -396,20 +416,19 @@
|
|
fail: () => {},
|
|
fail: () => {},
|
|
complete: () => {}
|
|
complete: () => {}
|
|
})
|
|
})
|
|
- }else {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url:'/pages/user/setUp'
|
|
|
|
- })
|
|
|
|
|
|
+ } else {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/user/setUp'
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
toLogin() {
|
|
toLogin() {
|
|
- console.log("userInfo",this.userInfo)
|
|
|
|
|
|
+ console.log("userInfo", this.userInfo)
|
|
if (!this.hasLogin || !this.userInfo || this.username == "立即登录") {
|
|
if (!this.hasLogin || !this.userInfo || this.username == "立即登录") {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: '/pages/public/login_account_number'
|
|
url: '/pages/public/login_account_number'
|
|
})
|
|
})
|
|
- }
|
|
|
|
- else{
|
|
|
|
|
|
+ } else {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: '/pages/user/setUp'
|
|
url: '/pages/user/setUp'
|
|
})
|
|
})
|
|
@@ -446,26 +465,27 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
logout() {
|
|
logout() {
|
|
- const that = this
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '询问',
|
|
|
|
- content: '您确定要退出吗?',
|
|
|
|
- cancelText: '取消',
|
|
|
|
- confirmText: '确定',
|
|
|
|
- success: (e) => {
|
|
|
|
- if (e.confirm) {
|
|
|
|
- uni.hideTabBarRedDot({
|
|
|
|
- index:3
|
|
|
|
- })
|
|
|
|
- uni.clearStorageSync();
|
|
|
|
- that.$store.commit('logout')
|
|
|
|
- that.$api.logout()
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: `/pages/public/login`
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ // const that = this
|
|
|
|
+ this.isShowAlert = true
|
|
|
|
+ // uni.showModal({
|
|
|
|
+ // title: '询问',
|
|
|
|
+ // content: '您确定要退出吗?',
|
|
|
|
+ // cancelText: '取消',
|
|
|
|
+ // confirmText: '确定',
|
|
|
|
+ // success: (e) => {
|
|
|
|
+ // if (e.confirm) {
|
|
|
|
+ // uni.hideTabBarRedDot({
|
|
|
|
+ // index:3
|
|
|
|
+ // })
|
|
|
|
+ // uni.clearStorageSync();
|
|
|
|
+ // that.$store.commit('logout')
|
|
|
|
+ // that.$api.logout()
|
|
|
|
+ // uni.navigateTo({
|
|
|
|
+ // url: `/pages/public/login`
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
},
|
|
},
|
|
/**
|
|
/**
|
|
* 统一跳转接口,拦截未登录路由
|
|
* 统一跳转接口,拦截未登录路由
|
|
@@ -507,9 +527,10 @@
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang='scss' scoped>
|
|
<style lang='scss' scoped>
|
|
- page{
|
|
|
|
- background:#F5F6FA;
|
|
|
|
|
|
+ page {
|
|
|
|
+ background: #F5F6FA;
|
|
}
|
|
}
|
|
|
|
+
|
|
.container {
|
|
.container {
|
|
padding-top: 85px;
|
|
padding-top: 85px;
|
|
padding-top: 35px;
|
|
padding-top: 35px;
|
|
@@ -550,11 +571,13 @@
|
|
.cu-list {
|
|
.cu-list {
|
|
/* height: 483rpx;
|
|
/* height: 483rpx;
|
|
overflow-y: scroll; */
|
|
overflow-y: scroll; */
|
|
- background:transparent;
|
|
|
|
|
|
+ background: transparent;
|
|
}
|
|
}
|
|
- .cu-list.grid.no-border{
|
|
|
|
- padding:0;
|
|
|
|
|
|
+
|
|
|
|
+ .cu-list.grid.no-border {
|
|
|
|
+ padding: 0;
|
|
}
|
|
}
|
|
|
|
+
|
|
.badge_user {
|
|
.badge_user {
|
|
color: #fff;
|
|
color: #fff;
|
|
background-color: #dc3545;
|
|
background-color: #dc3545;
|
|
@@ -733,11 +756,11 @@
|
|
}
|
|
}
|
|
|
|
|
|
.cover-container {
|
|
.cover-container {
|
|
- padding: 1px 10px ;
|
|
|
|
|
|
+ padding: 1px 10px;
|
|
padding-bottom: 200upx;
|
|
padding-bottom: 200upx;
|
|
-
|
|
|
|
- /* background-color: #F5F6FA; */
|
|
|
|
- /* border-radius: 20px; */
|
|
|
|
|
|
+
|
|
|
|
+ /* background-color: #F5F6FA; */
|
|
|
|
+ /* border-radius: 20px; */
|
|
margin-top: 60upx;
|
|
margin-top: 60upx;
|
|
|
|
|
|
.arc {
|
|
.arc {
|
|
@@ -891,30 +914,36 @@
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
height: 36px;
|
|
height: 36px;
|
|
}
|
|
}
|
|
- .indexlow{
|
|
|
|
|
|
+
|
|
|
|
+ .indexlow {
|
|
/* margin-top: 30px; */
|
|
/* margin-top: 30px; */
|
|
border-radius: 10px;
|
|
border-radius: 10px;
|
|
}
|
|
}
|
|
- .cu-list>.cu-item:after{
|
|
|
|
- border:none;
|
|
|
|
|
|
+
|
|
|
|
+ .cu-list>.cu-item:after {
|
|
|
|
+ border: none;
|
|
}
|
|
}
|
|
- .sign{
|
|
|
|
|
|
+
|
|
|
|
+ .sign {
|
|
width: 40px;
|
|
width: 40px;
|
|
height: 40px;
|
|
height: 40px;
|
|
top: 4px;
|
|
top: 4px;
|
|
margin-right: 6px;
|
|
margin-right: 6px;
|
|
}
|
|
}
|
|
- .indexUp{
|
|
|
|
- padding:0 20px;
|
|
|
|
|
|
+
|
|
|
|
+ .indexUp {
|
|
|
|
+ padding: 0 20px;
|
|
align-items: center;
|
|
align-items: center;
|
|
}
|
|
}
|
|
- .wrap{
|
|
|
|
- background:#fff;
|
|
|
|
- margin:10px;
|
|
|
|
- border-radius:10px;
|
|
|
|
- padding:10px;
|
|
|
|
- .title{
|
|
|
|
- font-size:16px;
|
|
|
|
|
|
+
|
|
|
|
+ .wrap {
|
|
|
|
+ background: #fff;
|
|
|
|
+ margin: 10px;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ padding: 10px;
|
|
|
|
+
|
|
|
|
+ .title {
|
|
|
|
+ font-size: 16px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|