123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569 |
- <template>
- <view class="home-wrap">
- <view class="home-title">
- <view class="title-bac">
- <view class="roomt">
- <span class="rom-spn">当前所在机构</span>
- <image class="quit-spn" @click.stop="loginOff()" src="../../static/logout.svg"></image>
- </view>
- <view class="rom-set">
- <image class="park" src="../../static/iconPark.svg"></image>
- <view class="houseName">
- <view>{{ instData.spdName }}</view>
- </view>
- </view>
- <view class="section-view">
- <view class="user-cont">
- <span class="user-spn">欢迎</span>
- <span class="user-spn spnr">{{userData.userName}}</span>
- </view>
- <view class="sec-data">
- <view class="sec-item">
- <span class="item-spn spnVal">待受理</span>
- <span class="item-spn">{{userType=='mcs'?instData.wslnum:instData.unAcpNum}}</span>
- </view>
- <view class="sec-item">
- <span class="item-spn spnVal">待出库</span>
- <span class="item-spn">{{userType=='mcs'?instData.wcknum:instData.unStoOutNum}}</span>
- </view>
- <view class="sec-item">
- <span class="item-spn spnVal">待退货</span>
- <span class="item-spn">{{userType=='mcs'?instData.wqrnum:instData.unRetnNum}}</span>
- </view>
- <view class="sec-item">
- <span class="item-spn spnVal">采购单</span>
- <span class="item-spn">{{userType=='mcs'?instData.cgdcx:instData.sumPurcNum}}</span>
- </view>
- </view>
- </view>
- <view class="message-view">
- <view class="all-message" @click.stop="allMessage()">
- 全部消息 >>
- </view>
- <view>
- <view class="message-item" v-for="(item,index) in msData" :key="index">
- <view class="item-mesage" v-html="messItem(item)">
- </view>
- <view class="fot-btn" @click="jumpDetails(item)">
- 查看详情>>
- </view>
- </view>
- </view>
- </view>
- <view class="all-app">
- <view class="all-title">
- 全部应用
- </view>
- <view class="all-app-view">
- <view class="app-view-item" v-for="(item,index) in appData[userType]" :key="index">
- <view class="app-item-img" :style="{background: item.bgColor}" @click.stop="appView(item)">
- <image class="app-item-svg" :src="item.iconUrl">
- </image>
- </view>
- <view class="app-item-text">
- {{item.name}}
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState,
- mapMutations,
- mapActions
- } from 'vuex';
- export default {
- components: {},
- computed: {
- ...mapState(['houseData', 'houseSelectData', 'userData', 'homeAwaitData', 'messData', 'instData']),
- },
- data() {
- return {
- listData: [],
- msData: [],
- outRoom: "请选择仓库",
- romDetData: {
- unAcpNum: '待受理',
- unStoOutNum: '待出库',
- unRetnNum: "待退货",
- sumPurcNum: "采购单查询"
- },
- userType: "mcs",
- appData: {
- drug: [{
- iconUrl: "../../static/shangjia.svg",
- name: "订单受理",
- bgColor: "#F4CE98",
- path: "/durgsubpkg/pages/order-taking/index"
- },
- {
- iconUrl: "../../static/shangjia.svg",
- name: "订单明细出库",
- bgColor: "#FFB298",
- path: "/subpkg/pages/outbond-detal/details"
- },
- {
- iconUrl: "../../static/shangjia.svg",
- name: "退货管理",
- bgColor: "#2CE4BF",
- path: "/durgsubpkg/pages/depart-return/index"
- },
- {
- iconUrl: "../../static/shangjia.svg",
- name: "采购单查询",
- bgColor: "#2CE4BF",
- path: "/subpkg/pages/puhse-order/index"
- },
- // {
- // iconUrl: "../../static/shangjia.svg",
- // name: "数据监测",
- // bgColor: "#F4CE98",
- // path: "/subpkg/pages/mintir/index"
- // },
- // {
- // iconUrl: "../../static/shangjia.svg",
- // name: "验收管理",
- // bgColor: "#2CE4BF",
- // path: "/subpkg/pages/acceptance/index"
- // },
- // {
- // iconUrl: "../../static/shangjia.svg",
- // name: "采购计划审批",
- // bgColor: "#2CE4BF",
- // path: "/subpkg/pages/proplanconfirm/index"
- // },
- // {
- // iconUrl: "../../static/shangjia.svg",
- // name: "目录管理",
- // bgColor: "#2CE4BF",
- // path: "/subpkg/pages/dire-manment/index"
- // },
- ],
- mcs: [{
- iconUrl: "../../static/shangjia.svg",
- name: "订单受理",
- bgColor: "#F4CE98",
- path: "/subpkg/pages/mcs-order-taking/index"
- },
- {
- iconUrl: "../../static/shangjia.svg",
- name: "订单出库",
- bgColor: "#7DCEFF",
- path: "/subpkg/pages/order-outbond/index"
- },
- {
- iconUrl: "../../static/shangjia.svg",
- name: "退货管理",
- bgColor: "#2CE4BF",
- path: "/subpkg/pages/mcs-depart-return/index"
- },
- {
- iconUrl: "../../static/shangjia.svg",
- name: "采购单查询",
- bgColor: "#2CE4BF",
- path: "/subpkg/pages/mcs-puhse-order/index"
- },
- {
- iconUrl: "../../static/shangjia.svg",
- name: "数据监测",
- bgColor: "#F4CE98",
- path: "/subpkg/pages/mintir/index"
- },
- // {
- // iconUrl: "../../static/shangjia.svg",
- // name: "验收管理",
- // bgColor: "#2CE4BF",
- // path: "/subpkg/pages/acceptance/index"
- // },
- // {
- // iconUrl: "../../static/shangjia.svg",
- // name: "采购计划审批",
- // bgColor: "#2CE4BF",
- // path: "/subpkg/pages/proplanconfirm/index"
- // },
- // {
- // iconUrl: "../../static/shangjia.svg",
- // name: "目录管理",
- // bgColor: "#2CE4BF",
- // path: "/subpkg/pages/dire-manment/index"
- // },
- ]
- }
- }
- },
- onLoad() {
- },
- onShow() {
- let userType = uni.getStorageSync('userType') || "mcs";
- this.userType = userType;
- },
- mounted() {
- this.setInst();
- this.getUserData({
- sysType: "2"
- });
- },
- watch: {
- messData(newOld) {
- }
- },
- methods: {
- ...mapActions(['getHouseData', 'getUserData', 'getHomeAwaitData', 'getMessData']),
- ...mapMutations(['setHouseName', 'setInst']),
- onPullDownRefresh() {
- this.setInst();
- this.getUserData({
- sysType: "2"
- });
- setTimeout(function() {
- uni.stopPullDownRefresh(); //停止下拉刷新动画
- }, 1000);
- },
- //跳转页面
- appView(item) {
- uni.navigateTo({
- url: item.path,
- success: function(res) {}
- });
- },
- //退出当前账号
- dialogConfirm() {
- uni.redirectTo({
- url: '/pages/login/index',
- success: function(res) {}
- });
- uni.removeStorageSync('token');
- },
- dialogClose() {
- this.$refs.message.close();
- },
- //退出确认
- loginOff() {
- uni.redirectTo({
- url: '/subpkg/pages/home/home',
- success: function(res) {}
- });
- },
- //跳转更多页面
- moreView() {
- uni.navigateTo({
- url: '/pages/grounding/grounding',
- success: function(res) {}
- });
- },
- dateChange(slectd) {
- this.getDataList({
- type: slectd[0][0].value
- });
- },
- // 获取数据
- getDataList(data) {
- this.getGroundData(data);
- },
- jumpDetails(item) {
- this.$http('home.readData', [{
- id: item.id,
- msgStas: "1"
- }], '加载中', true).then((res) => {
- if (res.success == true) {
- }
- })
- // this.$http(item.msgColumnList[0].url, {
- // [item.msgColumnList[0].msgKey]: item.msgColumnList[0].msgColumn
- // }, '加载中', true).then((res) => {
- // if (res.success == true) {
- // uni.setStorage({
- // key: item.msgColumnList[0].msgRoutePath,
- // data: res.data.records[0] || {}
- // });
- // uni.navigateTo({
- // url: `/pages/${item.msgColumnList[0].msgRoutePath}/index`,
- // success: function(res) {
- // console.log(res, "res")
- // }
- // });
- // }
- // })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .home-wrap {
- width: 100%;
- height: 100%;
- background-color: #F5F5F5;
- .home-title {
- width: 100%;
- height: auto;
- .title-bac {
- width: 100%;
- height: 392rpx;
- border-radius: 0rpx 0rpx 40rpx 40rpx;
- background: linear-gradient(180deg, rgba(1, 169, 146, 1) 0%, rgba(1, 176, 164, 0.54) 46%, rgba(2, 181, 176, 0.24) 100%, rgba(2, 185, 185, 0) 100%);
- padding: 20rpx;
- box-sizing: border-box;
- .roomt {
- width: 100%;
- height: 70rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .rom-spn {
- color: rgba(255, 255, 255, 0.9);
- font-size: 36rpx;
- text-align: left;
- font-family: PingFangSC-bold;
- }
- .quit-spn {
- width: 48rpx;
- height: 48rpx;
- background-size: 100% 100%;
- }
- }
- .rom-set {
- width: 100%;
- height: 50rpx;
- display: flex;
- align-items: center;
- .park {
- width: 40rpx;
- height: 40rpx;
- background-size: 100% 100%;
- }
- .houseName {
- color: rgba(255, 255, 255, 0.9);
- font-size: 36rpx;
- text-align: left;
- font-family: OPPOSans-medium;
- margin-left: 20rpx;
- .romtitle {
- font-size: 36rpx;
- font-family: OPPOSans-medium;
- }
- .c-flex-align {
- display: flex;
- align-items: center;
- color: #fff;
- }
- .icon-triangle {
- width: 16rpx;
- height: 16rpx;
- margin-left: 10rpx;
- }
- }
- .down {
- width: 40rpx;
- height: 40rpx;
- background: url('../../static/down.svg');
- background-size: 100% 100%;
- margin-left: 20rpx;
- }
- }
- .section-view {
- width: 97%;
- margin: 70rpx auto 40rpx auto;
- height: 270rpx;
- background-color: rgba(255, 255, 255, 1);
- box-shadow: -2rpx 4rpx 10rpx 0rpx rgba(0, 0, 0, 0.4);
- border-radius: 20rpx;
- padding: 20rpx;
- box-sizing: border-box;
- .user-cont {
- width: 100%;
- height: 50rpx;
- .user-spn {
- color: rgba(0, 0, 0, 0.8);
- font-size: 36rpx;
- font-family: AlibabaPuHui-medium;
- }
- .spnr {
- margin-left: 20rpx;
- font-size: 35rpx;
- font-family: AlibabaPuHui-medium;
- }
- }
- .sec-data {
- width: 100%;
- height: 110rpx;
- display: flex;
- justify-content: space-around;
- margin-top: 60rpx;
- .sec-item {
- width: 130rpx;
- height: 100%;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
- .item-spn {
- font-size: 32rpx;
- font-family: PingFangSC-bold;
- }
- .spnVal {
- color: rgba(7, 190, 167, 1);
- }
- }
- }
- }
- .message-view {
- width: 100%;
- margin-top: 20rpx;
- position: relative;
- padding-top: 20rpx;
- margin-bottom: 20rpx;
- .all-message {
- position: absolute;
- right: 0rpx;
- top: 5rpx;
- width: 117rpx;
- height: 20rpx;
- color: rgba(1, 169, 146, 1);
- font-size: 20rpx;
- font-family: AlibabaPuHui-regular;
- display: flex;
- align-items: center;
- }
- .message-item {
- margin-top: 20rpx;
- width: 100%;
- height: 50rpx;
- border-radius: 25rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 20rpx;
- box-sizing: border-box;
- color: rgba(0, 0, 0, 0.8);
- font-size: 20rpx;
- text-align: left;
- font-family: AlibabaPuHui-regular;
- background-color: rgba(255, 255, 255, 1);
- box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.4);
- .item-mesage {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .fot-btn {
- width: 170rpx;
- margin-left: 20rpx;
- }
- }
- }
- .all-app {
- width: 100%;
- .all-title {
- width: 100%;
- height: 46rpx;
- color: rgba(0, 0, 0, 0.8);
- font-size: 32rpx;
- text-align: left;
- font-family: AlibabaPuHui-bold;
- }
- .all-app-view {
- margin-top: 20rpx;
- width: 100%;
- height: auto;
- background-color: #fff;
- border-radius: 20rpx;
- display: flex;
- flex-wrap: wrap;
- align-content: flex-start;
- padding-bottom: 50rpx;
- .app-view-item {
- width: 24%;
- margin-left: 7rpx;
- height: 150rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- margin-top: 20rpx;
- margin-bottom: 20rpx;
- justify-content: space-between;
- .app-item-img {
- width: 102rpx;
- height: 102rpx;
- border-radius: 20rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- .app-item-svg {
- width: 80rpx;
- height: 80rpx;
- background-size: 100% 100%;
- }
- }
- .app-item-text {
- width: 100%;
- height: 34rpx;
- color: rgba(0, 0, 0, 0.8);
- font-size: 28rpx;
- text-align: center;
- font-family: AlibabaPuHui-bold;
- }
- }
- }
- }
- }
- }
- }
- uni-page-body {
- width: 100%;
- height: 100%;
- }
- uni-page-wrapper {
- width: 100%;
- height: 100%;
- }
- uni-page {
- width: 100%;
- height: 100%;
- }
- </style>
|