123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667 |
- <template>
- <view class="wrap">
- <view v-if="!isShowAlert">
- <view class="comp" @click='show0=true'>
- <view>{{compName}}</view>
- <u-icon name="arrow-right" color="" v-if="compList.length>1"></u-icon>
- <u-picker @confirm="compChange" range-key='compName' mode="selector" v-model="show0" :range="compList"
- v-if="compList.length>1"></u-picker>
- </view>
- <view class='title'>仓库管理</view>
- <view class="dropdown">
- <view class="left" @click='show1=true'>
- <view>{{warehouseName}}</view>
- <u-icon name="arrow-right" color=""></u-icon>
- <u-picker @confirm="warehousechange" range-key='warehouseName' mode="selector" v-model="show1"
- :range="warehouseList"></u-picker>
- </view>
- <view class="right" @click='show2=true'>
- <view>{{binNumber}}仓位</view>
- <u-icon name="arrow-right" color=""></u-icon>
- <u-picker @confirm="warehouseCWchange" range-key='binNumber' mode="selector" v-model="show2"
- :range="warehouseCWList"></u-picker>
- </view>
- </view>
- <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']" v-if="isShowBtn">
- <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]">
- <image :src="item.src" class="sign"></image>
- </view>
- <text>{{item.name}}</text>
- </view>
- </view>
- </view>
- <view>
- <view class='title'>运输管理</view>
- <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']" v-if="isShowBtn">
- <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]" class="ys-item">
- <view class="ys-number" v-if="index==0&&ysFNumber!=0">
- {{ysFNumber}}
- </view>
- <view class="ys-number" v-if="index==1&&ysSNumber!=0">
- {{ysSNumber}}
- </view>
- <image :src="item.src" class="sign"></image>
- </view>
- <text>{{item.name}}</text>
- </view>
- </view>
- </view>
- <view>
- <view class='title'>常用功能</view>
- <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']" v-if="isShowBtn">
- <view class="cu-item" v-for="(item,index) in gridList2" :key="index" @click="gridClick(item, index)"
- v-if="index<gridCol*2">
- <view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]" class="ys-item">
-
- <image :src="item.src" class="sign"></image>
- </view>
- <text>{{item.name}}</text>
- </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='您尚未开通ERP业务' :showCancelButton='false' :content="content" @confirm="goOpenService"
- @cancel="cancelClick"></u-modal>
- <u-modal v-model="isShowAlert1" :title-style="{fontSize: '18px',fontWeight:'500'}"
- :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
- :showCancelButton='false' :content="content1" @confirm="alertBtn1" @cancel="cancelClick1"></u-modal>
- </view>
- </template>
- <script>
- import {
- mapState
- } from 'vuex';
- import helper from '@/common/helper.js';
- export default {
- components: {
- },
- data() {
- return {
- ysSNumber: '',
- ysFNumber: '',
- isShowAlert1: false,
- content1: '您尚未登录,是否立即登录?',
- show0: false,
- show1: false,
- show2: false,
- isShowAlert: false,
- compName:uni.getStorageSync('compName1')? uni.getStorageSync('compName1').company:'',
- compList: [],
- isShowBtn: false,
- content: '易粮易运ERP系统包含合同管理、仓库管理、运输管理、结算管理等多个模块,可为粮企提供粮食贸易的全流程服务,平台诚邀您的加入。',
- warehouseName: '暂无仓库',
- binNumber: '暂无',
- compId: '',
- warehouseId: "",
- positionId: "",
- warehouseList: [],
- warehouseCWList: [],
- allWarehouse: [],
- gridCol: 4,
- gridBorder: false,
- personCharge: '',
- gridList2: [{
- num: 0,
- name: '邀请用户',
- // icon: 'cuIcon-apps',
- src: '../../static/img/erp/yaoqingyonghu@3x.png',
- tips: 0,
- url: '/pages/erpbusiness/QRCode/QRCode',
- show: true
- },
-
-
- {
- num: 1,
- name: '收购信息',
- // icon: 'cuIcon-copy',
- src: '../../static/img/erp/receiving@3x.png',
- tips: 0,
- url: '/pages/erpbusiness/acquisitionInformation',
- show: true
- }
- // {
- // num: 5,
- // name: '设置',
- // // icon: 'cuIcon-edit',
- // src:'../../static/img/sign/shezhi@2x.png',
- // tips: 0,
- // url: `/pages/user/setUp`,
- // show: true
- // }
- ],
- gridList: [
- // {
- // num: 0,
- // name: '入库',
- // // icon: 'cuIcon-apps',
- // src: '../../static/img/erp/yaoqingyonghu@3x.png',
- // tips: 0,
- // url: '/pages/erp/warehousing/warehousing',
- // show: true
- // },
- // {
- // num: 1,
- // name: '待完善入库',
- // // icon: 'cuIcon-calendar',
- // src: '../../static/img/erp/shougouzhijian@3x.png',
- // tips: 0,
- // url: '/pages/erp/improvedWrehousing/improvedWrehousing',
- // show: true
- // },
- {
- num: 0,
- name: '出库',
- // icon: 'cuIcon-copy',
- src: '../../static/img/erp/shougoujianjin@3x.png',
- tips: 0,
- url: '/pages/erp/exWarehousing/exWarehousing',
- show: true
- },
- {
- num: 1,
- name: '待完善出库',
- // icon: 'cuIcon-edit',
- src: '../../static/img/erp/shougouzhijian@3x.png',
- tips: 0,
- url: `/pages/erp/improvedExWaehousing/improvedExWaehousing`,
- show: true
- }
- // {
- // num: 0,
- // name: '入库质检',
- // // icon: 'cuIcon-apps',
- // src: '../../static/img/erp/yaoqingyonghu@3x.png',
- // tips: 0,
- // url: '/pages/erpbusiness/quality_testing?managementType=1',
- // show: true
- // },
- // {
- // num: 1,
- // name: '入库检斤',
- // // icon: 'cuIcon-calendar',
- // src: '../../static/img/erp/shougouzhijian@3x.png',
- // tips: 0,
- // url: '/pages/erpbusiness/acquisitionInspection/acquisitionInspection',
- // show: true
- // },
- // {
- // num: 2,
- // name: '出库检斤',
- // // icon: 'cuIcon-copy',
- // src: '../../static/img/erp/shougoujianjin@3x.png',
- // tips: 0,
- // url: '/pages/erpbusiness/acquisitionInspection/warehouseWeighing',
- // show: true
- // },
- // {
- // num: 3,
- // name: '出库质检',
- // // icon: 'cuIcon-edit',
- // src: '../../static/img/erp/shougouzhijian@3x.png',
- // tips: 0,
- // url: `/pages/erpbusiness/outbound_quality_testing?managementType=3`,
- // show: true
- // }
- // {
- // num: 4,
- // name: '开通业务',
- // // icon: 'cuIcon-edit',
- // src: '../../static/img/erp/shougouzhijian@3x.png',
- // tips: 0,
- // url: `/pages/erp/openService/openService`,
- // show: true
- // },
- // {
- // num: 5,
- // name: '联系客服',
- // // icon: 'cuIcon-edit',
- // src: '../../static/img/erp/shougouzhijian@3x.png',
- // tips: 0,
- // url: `/pages/erp/contactCustomerService/contactCustomerService`,
- // show: true
- // }
- ],
- gridList1: [{
- num: 0,
- name: '发货反馈',
- // icon: 'cuIcon-copy',
- src: '../../static/img/erp/delivery@3x.png',
- tips: 0,
- url: '/pages/erp/deliveryfeedback/list',
- show: true
- },
- {
- num: 1,
- name: '收货反馈',
- // icon: 'cuIcon-edit',
- src: '../../static/img/erp/receiving@3x.png',
- tips: 0,
- url: `/pages/erp/receivingfeedback/list`,
- show: true
- },
- // {
- // num: 4,
- // name: '开通业务',
- // // icon: 'cuIcon-edit',
- // src: '../../static/img/erp/shougouzhijian@3x.png',
- // tips: 0,
- // url: `/pages/erp/openService/openService`,
- // show: true
- // },
- // {
- // num: 5,
- // name: '联系客服',
- // // icon: 'cuIcon-edit',
- // src: '../../static/img/erp/shougouzhijian@3x.png',
- // tips: 0,
- // url: `/pages/erp/contactCustomerService/contactCustomerService`,
- // show: true
- // }
- ],
- }
- },
- onLoad() {},
- // #ifndef MP
- onNavigationBarButtonTap(e) {
- const index = e.index;
- if (index === 0) {
- this.navTo('/pages/set/set');
- } else if (index === 1) {
- // #ifdef APP-PLUS
- const pages = getCurrentPages();
- const page = pages[pages.length - 1];
- const currentWebview = page.$getAppWebview();
- currentWebview.hideTitleNViewButtonRedDot({
- index
- });
- // #endif
- uni.navigateTo({
- url: '/pages/notice/notice'
- })
- }
- },
- onBackPress() {
- uni.switchTab({
- url: '/pages/user/user'
- });
- return true
- },
- // #endif
- computed: {
- ...mapState(['hasLogin', 'userInfo']),
- },
- onShow() {
- uni.showLoading({
- title:"加载中...",
- mask:true
- })
- this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
- if (res.data.data == "INVALID") {
- uni.hideLoading()
- this.isShowAlert1 = true;
- // uni.showModal({
- // title: '提示',
- // content: '当前登入信息验证失败,是否重新登录?',
- // showCancel: true,
- // confirmText: '登录',
- // success: (e) => {
- // if (e.confirm) {
- // uni.navigateTo({
- // url: '/pages/public/login'
- // })
- // }
- // },
- // fail: () => {},
- // complete: () => {}
- // })
- }
- })
- this.$api.doRequest('get', '/openServiceInfo/selectCommonCompany', {
- phone: this.userInfo.phone
- }).then(res => {
- if (res.data.code == 200) {
- if (res.data.data.length == 0) {
- this.isShowAlert = true
- uni.hideLoading()
- } else {
- this.isShowAlert = false
- }
- this.compList = res.data.data
- if(this.compName){
- for (var i = 0; i < res.data.data.length; i++) {
- if(res.data.data[i].compName==this.compName){
- this.init(res.data.data[i].compId)
- }
- }
- }else{
- this.compName = res.data.data[0].compName
- this.init(res.data.data[0].compId)
- }
-
-
- }
- })
- // 发货执行中
- this.$api.doRequest('get', '/tranProcessInfo/selectTranProcessInfo', {
- feedbackFlag: 1,
- currentPage: 1,
- pageSize: 1
- }).then(res => {
- if (res.data.code == 200) {
- this.ysFNumber = res.data.data.total
- }
- })
- // 收货执行中
- this.$api.doRequest('get', '/tranProcessInfo/selectTranProcessInfo', {
- feedbackFlag: 4,
- currentPage: 1,
- pageSize: 1
- }).then(res => {
- if (res.data.code == 200) {
- this.ysSNumber = res.data.data.total
- }
- })
- },
- methods: {
- cancelClick() {
- uni.navigateBack(-1)
- },
- getCompWarehouse() {},
- alertBtn1() {
- uni.navigateTo({
- url: '/pages/public/login'
- })
- },
- cancelClick1() {
- this.isShowAlert = false
- },
- goOpenService() {
- if (!this.hasLogin) {
- url = '/pages/public/login';
- }
- uni.navigateTo({
- url: '/pages/erp/openService/openService'
- })
- },
- /**
- * 统一跳转接口,拦截未登录路由
- * navigator标签现在默认没有转场动画,所以用view
- */
- navTo(url) {
- if (!this.hasLogin) {
- url = '/pages/public/login';
- }
- uni.navigateTo({
- url
- })
- },
- gridClick(item, index) {
- var that = this
- if (!this.hasLogin) {
- this.isShowAlert1 = true;
- // uni.showModal({
- // title: '提示',
- // content: '您尚未登录,是否立即登录?',
- // showCancel: true,
- // confirmText: '登录',
- // success: (e) => {
- // if (e.confirm) {
- // uni.navigateTo({
- // url: '/pages/public/login'
- // })
- // }
- // },
- // fail: () => {},
- // complete: () => {}
- // })
- } else {
- if (item.url) {
- helper.erpWarehouse = {
- warehouseName: this.warehouseName,
- binNumber: this.binNumber,
- compId: this.compId,
- warehouseId: this.warehouseId,
- baseId: this.baseId,
- allWarehouse: this.allWarehouse,
- warehouseCWList: this.warehouseCWList,
- positionId: this.positionId,
- personCharge: this.personCharge
- }
- uni.navigateTo({
- url: item.url
- })
- }
- }
- },
- confirmWarehouse() {},
- confirmPositon() {},
- compChange(e) {
- this.compName = this.compList[e[0]].compName
- this.init(this.compList[e[0]].compId)
- },
- init(compId) {
- this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelfNew', {
- compId: compId,
- }).then(res => {
- if (res.data.data.length != 0) {
- let _showData = uni.getStorageSync("erpSelectWarehous")
- let _showCWData = uni.getStorageSync("erpSelectWarehousCW")
- this.allWarehouse = res.data.data
- this.warehouseList = res.data.data
- this.isShowBtn = true
- uni.hideLoading()
- if (_showData) {
- this.warehouseName = _showData.warehouseName
- this.compId = _showData.compId
- this.agent = _showData.agent
- this.binNumber = _showCWData.binNumber
- this.warehouseCWList = _showData.positionInfos
- this.warehouseId = _showData.id
- this.baseId = _showCWData.baseId
- this.positionId = _showCWData.id
- this.personCharge = _showData.personCharge
- } else {
- this.allWarehouse = res.data.data
- this.warehouseName = res.data.data[0].warehouseName
- this.warehouseList = res.data.data;
- this.compId = res.data.data[0].compId
- this.agent = res.data.data[0].agent
- this.warehouseCWList = res.data.data[0].positionInfos
- this.binNumber = res.data.data[0].positionInfos ? res.data.data[0].positionInfos[0]
- .binNumber : '暂无'
- this.warehouseId = res.data.data[0].id
- this.baseId = res.data.data[0].positionInfos ? res.data.data[0].positionInfos[0]
- .baseId : ''
- this.positionId = res.data.data[0].positionInfos ? res.data.data[0].positionInfos[0]
- .id : ''
- this.personCharge = res.data.data[0].personCharge
- }
- } else {
- uni.hideLoading()
- this.warehouseList = []
- this.warehouseCWList = []
- this.warehouseName = '暂无仓库'
- this.binNumber = '暂无'
- }
- })
- },
- makeBinNumber() {
- },
- warehousechange(e) {
- this.warehouseName = this.warehouseList[e[0]].warehouseName
- this.compId = this.warehouseList[e[0]].compId
- this.agent = this.warehouseList[e[0]].agent
- this.warehouseId = this.warehouseList[e[0]].id
- this.warehouseCWList = this.warehouseList[e[0]].positionInfos
- uni.setStorageSync('erpSelectWarehous', this.warehouseList[e[0]])
- this.warehouseCWchange([0])
- },
- warehouseCWchange(e) {
- this.binNumber = this.warehouseCWList ? this.warehouseCWList[e[0]].binNumber : '暂无'
- this.baseId = this.warehouseCWList ? this.warehouseCWList[e[0]].baseId : ''
- this.positionId = this.warehouseCWList ? this.warehouseCWList[e[0]].id : ''
- uni.setStorageSync('erpSelectWarehousCW', this.warehouseCWList ? this.warehouseCWList[e[0]] : '')
- }
- }
- }
- </script>
- <style lang='scss' scoped>
- page {
- background: #F5F6FA;
- }
- .container {
- padding-top: 85px;
- padding-top: 35px;
- background-color: #F5F6FA;
- position: relative;
- width: 100vw;
- height: 100vh;
- overflow: hidden;
- background: url('~@/static/img/login/bg_slices/bg@3x.png');
- background-size: 100% 100%;
- margin: 0 auto;
- }
- .wrap {
- background: #fff;
- margin: 10px;
- border-radius: 10px;
- padding: 10px;
- .title {
- font-size: 16px;
- font-weight: 700;
- }
- }
- .cu-list {
- /* height: 483rpx;
- overflow-y: scroll; */
- background: transparent;
- }
- .cu-list.grid.no-border {
- padding: 0;
- }
- .grid {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- /* border-top: 2upx solid rgba(172,172,172,.2); */
- .grid-item-3 {
- box-sizing: border-box;
- width: calc(100% / 3);
- border-bottom: 2upx solid rgba(172, 172, 172, .2);
- border-right: 2upx solid rgba(172, 172, 172, .2);
- text-align: center;
- padding: 40upx 0;
- position: relative;
- /* view{
- font-size: $font-sm;
- margin-top: 16upx;
- color: $font-color-dark;
- } */
- .grid_icon {
- font-size: 48upx;
- margin-bottom: 18upx;
- color: #fa436a;
- }
- .tip_text {
- display: block;
- padding: 4upx 8upx;
- text-align: center;
- border-radius: 36upx;
- font-size: 24upx;
- background-color: #fa436a;
- color: rgba(255, 255, 255, 1);
- position: absolute;
- right: 6upx;
- top: 6upx;
- }
- }
- .grid-item-3:nth-child(3n + 3),
- .grid-item-4:nth-child(4n + 4) {
- border-right: none;
- }
- }
- .sign {
- width: 40px;
- height: 40px;
- top: 4px;
- /* margin-right: 6px; */
- }
- .dropdown {
- display: flex;
- margin: 20rpx 0;
- justify-content: space-between;
- border-bottom: 1px solid #EEEEEE;
- padding-bottom: 20rpx;
- .left,
- .right {
- display: flex;
- align-items: center;
- }
- }
- .comp {
- display: flex;
- font-size: 36rpx;
- font-weight: 500;
- color: #333333;
- margin-bottom: 20rpx;
- padding-bottom: 20rpx;
- font-weight: 700;
- border-bottom: 1px solid #EEEEEE;
- }
- .-model__title {
- background: red;
- color: red;
- }
- .ys-item {
- position: relative;
- .ys-number {
- color: #fff;
- border: 1px solid #fff;
- background-color: #FF6600;
- display: inline-block;
- padding: .25em .25em;
- position: absolute;
- font-size: 9px;
- font-weight: 700;
- line-height: 1;
- text-align: center;
- white-space: nowrap;
- vertical-align: top;
- right: 20px;
- top: -5px;
- z-index: 2;
- border-radius: 50%;
- width: 40rpx;
- }
- }
- </style>
|