baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
+227
@@ -0,0 +1,227 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 常用事项 -->
|
||||
<view class="main" >
|
||||
<view class="m-title mt-center">
|
||||
<text class="title" decode="true">常用事项</text>
|
||||
</view>
|
||||
<view v-if="comList.length==0" style="text-align: center;margin: 10px 0;">暂无常用事项,请添加!</view>
|
||||
|
||||
<view class="example-body" style="margin-bottom: 20px;">
|
||||
<uni-grid :column="4" :show-border="false" :square="false" >
|
||||
<uni-grid-item v-for="(item ,index) in comList" :key="index" >
|
||||
<view class="grid-item-box" @click="MenuDelete(item,index)">
|
||||
<image class="image" src="../../../static/icon/unchecked.png" v-if="item.FTYPE==4" />
|
||||
<image class="image" :src="require('../../../static/icon/'+item.KEY+'.png')" v-else />
|
||||
<text class="text">{{item.NAME}}</text>
|
||||
<view class="grid-dot">
|
||||
<uni-badge text="-" type="warning" size="small" />
|
||||
</view>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 其他应用 -->
|
||||
<view class="main">
|
||||
<view class="m-title mt-center">
|
||||
<text class="title" decode="true">其他应用 </text>
|
||||
</view>
|
||||
<!-- 工作 -->
|
||||
<view class="main" v-for="(item ,index) in allMenu" :key="index">
|
||||
<view class="m-title">
|
||||
<text class="title" decode="true">{{item.NAME}}</text>
|
||||
</view>
|
||||
<view class="example-body">
|
||||
<uni-grid :column="4" :show-border="false" :square="false" >
|
||||
<uni-grid-item v-for="(subitem ,subindex) in item.SubMenus" :key="subindex" >
|
||||
<view class="grid-item-box" v-show="!subitem.inComList" @click="MenuAdd(subitem,subindex)">
|
||||
<image class="image" src="../../../static/icon/unchecked.png" v-if="subitem.FTYPE==4" />
|
||||
<image class="image" :src="require('../../../static/icon/'+subitem.KEY+'.png')" v-else />
|
||||
<!-- <image class="image" :src="'../../../static/icon/'+subitem.KEY+'.png'"/> -->
|
||||
<text class="text">{{subitem.NAME}}</text>
|
||||
<view class="grid-dot">
|
||||
<uni-badge text="+" type="primary" size="small"/>
|
||||
<!-- <uni-badge text="+" type="default" size="small" v-show="subitem.inComList" /> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="grid-item-box" v-show="subitem.inComList">
|
||||
<image class="image" src="../../../static/icon/unchecked.png" v-if="subitem.FTYPE==4" />
|
||||
<image class="image" :src="require('../../../static/icon/'+subitem.KEY+'.png')" v-else />
|
||||
<!-- <image class="image" :src="'../../../static/icon/'+subitem.KEY+'.png'"/> -->
|
||||
<text class="text">{{subitem.NAME}}</text>
|
||||
<view class="grid-dot">
|
||||
<!-- <uni-badge text="+" type="primary" size="small" v-show="!subitem.inComList" /> -->
|
||||
<uni-badge text="+" type="default" size="small" v-show="subitem.inComList" />
|
||||
</view>
|
||||
</view>
|
||||
</uni-grid-item>
|
||||
</uni-grid>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import uniGrid from '@/components/uni-grid/uni-grid.vue'
|
||||
import uniGridItem from '@/components/uni-grid-item/uni-grid-item.vue'
|
||||
import uniBadge from '@/components/uni-badge/uni-badge.vue'
|
||||
|
||||
export default {
|
||||
components:{
|
||||
uniGrid,
|
||||
uniGridItem,
|
||||
uniBadge
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
allMenu:[],
|
||||
comList:[],
|
||||
itemKey:'',
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.ShowMenuList();
|
||||
},
|
||||
methods: {
|
||||
showAddonLoad(comList,allMenu){
|
||||
let _self = this;
|
||||
let comIDList = [];
|
||||
if(comList.length==0){
|
||||
return
|
||||
}
|
||||
comList.forEach(
|
||||
function(e){
|
||||
let arr = {
|
||||
"ID":e.ID
|
||||
}
|
||||
comIDList.push(arr)
|
||||
}
|
||||
);
|
||||
console.log(this.allMenu)
|
||||
this.allMenu.forEach(
|
||||
function(e){
|
||||
e.SubMenus.forEach(
|
||||
function(el,index){
|
||||
comIDList.forEach(
|
||||
function(comEl){
|
||||
if(comEl.ID==el.ID){
|
||||
let inComList = {
|
||||
"inComList":true
|
||||
};
|
||||
Vue.set(e.SubMenus[index],'inComList',true)
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
console.log(this.allMenu)
|
||||
},
|
||||
ShowMenuList() {
|
||||
let _self = this;
|
||||
this.comList = uni.getStorageSync('ComMenu');
|
||||
this.allMenu = uni.getStorageSync('AllMenu');
|
||||
this.showAddonLoad(this.comList,this.allMenu);
|
||||
|
||||
},
|
||||
MenuDelete:function(item,index){
|
||||
let id = item.ID;
|
||||
this.delFavorites(id);
|
||||
if(index>=0){
|
||||
this.comList.splice(index,1)
|
||||
this.allMenu = uni.getStorageSync('AllMenu')
|
||||
this.showAddonLoad(this.comList,this.allMenu)
|
||||
}
|
||||
},
|
||||
MenuAdd:function(item,index){
|
||||
let id = item.ID;
|
||||
this.setFavorites(id);
|
||||
if(item){
|
||||
this.comList.push(item)
|
||||
let obj = {};
|
||||
this.comList= this.comList.reduce((cur,next) => {
|
||||
obj[next.ID] ? "" : obj[next.ID] = true && cur.push(next);
|
||||
return cur;
|
||||
},[]);
|
||||
this.allMenu = uni.getStorageSync('AllMenu')
|
||||
this.showAddonLoad(this.comList,this.allMenu)
|
||||
}
|
||||
|
||||
},
|
||||
setFavorites(id) {
|
||||
this.$request.post('/Service/SetFavorites',
|
||||
JSON.stringify(id)).then(res => {
|
||||
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
delFavorites(id) {
|
||||
this.$request.post('/Service/DelFavorites',
|
||||
JSON.stringify(id)).then(res => {
|
||||
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("../../../common/iconindex.css");
|
||||
|
||||
page{
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 角标 */
|
||||
.example-body {
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
font-size: 14px;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.grid-item-box {
|
||||
flex: 1;
|
||||
/* position: relative;
|
||||
*/
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px 0;
|
||||
border: 1upx solid #F2F2F2;
|
||||
}
|
||||
.text {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 10upx 0;
|
||||
overflow: hidden;
|
||||
/* text-overflow: ellipsis; */
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
|
||||
}
|
||||
.grid-dot {
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
right: 5px;
|
||||
}
|
||||
.uni-badge{
|
||||
width: 17upx !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in new issue
Block a user