chenyue 3 年 前
コミット
93137c912b
30 ファイル変更411 行追加160 行削除
  1. 18 2
      mini-pro-web/src/api/api-medicineAbinet.js
  2. 8 0
      mini-pro-web/src/api/login.js
  3. 2 2
      mini-pro-web/src/components/CustomUpload/index.vue
  4. 10 2
      mini-pro-web/src/components/ProductItem/index.vue
  5. 1 5
      mini-pro-web/src/components/layout/NavLayout.vue
  6. 10 7
      mini-pro-web/src/mixins/common.js
  7. 12 12
      mini-pro-web/src/router/device.js
  8. 76 15
      mini-pro-web/src/router/index.js
  9. 1 1
      mini-pro-web/src/router/me.js
  10. 2 2
      mini-pro-web/src/router/order.js
  11. 1 1
      mini-pro-web/src/router/personal.js
  12. 1 0
      mini-pro-web/src/store/getters.js
  13. 9 1
      mini-pro-web/src/store/modules/app.js
  14. 128 56
      mini-pro-web/src/views/device/cargoLane/index.vue
  15. 9 1
      mini-pro-web/src/views/device/cargoLane/setting.vue
  16. 1 1
      mini-pro-web/src/views/device/index.vue
  17. 1 1
      mini-pro-web/src/views/drug/css/drugSel.scss
  18. 5 2
      mini-pro-web/src/views/drug/list.vue
  19. 6 6
      mini-pro-web/src/views/machine/components/Result.vue
  20. 27 20
      mini-pro-web/src/views/machine/index.vue
  21. 1 1
      mini-pro-web/src/views/order/list.vue
  22. 20 3
      mini-pro-web/src/views/replenishment/device/detail.vue
  23. 1 1
      mini-pro-web/src/views/replenishment/picking/list.vue
  24. 1 1
      mini-pro-web/src/views/replenishment/record/list.vue
  25. 7 6
      mini-pro-web/src/views/replenishment/start/components/SetStockDialog.vue
  26. 38 4
      mini-pro-web/src/views/replenishment/start/deviceDetail.vue
  27. 10 2
      mini-pro-web/src/views/replenishment/start/deviceList.vue
  28. 2 1
      mini-pro-web/src/views/replenishment/start/productDetail.vue
  29. 2 3
      mini-pro-web/src/views/replenishment/stockUp/detail.vue
  30. 1 1
      mini-pro-web/src/views/replenishment/stockUp/deviceList.vue

+ 18 - 2
mini-pro-web/src/api/api-medicineAbinet.js

@ -146,6 +146,13 @@ let service = {
			method: "get",
			params
		});
    },
	getDrugListByDevice: function(params) {
		return request({
			url: `${BASE}/baseDrug/getDrugListByDevice`,
			method: "get",
			params
		});
    },
	getDrugDetailListById: function(params) {
		return request({
@ -470,6 +477,14 @@ let service = {
		});
    },
	openAndCloseCargo: function(data) {
		return request({
			url: `${BASE}/baseDevice/openAndCloseCargo`,
			method: "post",
			data
		});
    },
	checkOrderAndReturnOrderList: function(params) {
		return request({
			url: `${BASE}/open/noLogin/checkOrderAndReturnOrderList`,
@ -478,8 +493,6 @@ let service = {
		});
    },
	
	// 更新出货状态
	updateOrderOutStatus: function(data) {
		return request({
@ -523,6 +536,9 @@ let service = {
			params
		});
    },
	
};
export default service;

+ 8 - 0
mini-pro-web/src/api/login.js

@ -124,4 +124,12 @@ export function changePwd(data) {
	  method: 'post',
	  data
	})
}
export function checkWlyyLogin(data) {
	return request({
	  url: `${AUTH}/auth/oauth/checkWlyyUserLogin`,
	  method: 'post',
	  data
	})
}

+ 2 - 2
mini-pro-web/src/components/CustomUpload/index.vue

@ -35,7 +35,7 @@
<script>
import { isIOS } from '@/utils/platform';
import fileApi from '@/api/fileApi';
import {imgPreview} from '@/utils/imgCompress';
import {compress} from '@/utils/imgCompress';
import cryptoUtils from "@/utils/cryptoUtils";
export default {
	name: "CustomUpload",
@ -268,7 +268,7 @@ export default {
					resolve(item.file)
					return
				}
				imgPreview(item, async (rs, v) => {
				compress(item, async (rs, v) => {
                    if(rs!=1){
						resolve(item.file)
                    } else {

+ 10 - 2
mini-pro-web/src/components/ProductItem/index.vue

@ -1,5 +1,5 @@
<template>
    <div @click="toSet" class='components-product-item' :class="data.cargoCapacity==data.qty?'pitem-full':''">
    <div @click="toSet" class='components-product-item' :class="{'pitem-full':data.cargoCapacity==data.qty, 'pitem-close': data.cargoState!=1}">
        <div :style="'height: '+ (rate) +'%'" class="pitem-bg"></div>
        <div class="pitem-inner" >
            <div class="kitbox " >
@ -41,7 +41,8 @@ export default{
            }
            if(this.data.shelfStatus != 1){
                this.gotoUrl('/drugList', {
                    trackId: this.data.id
                    trackId: this.data.id,
                    deviceId: this.data.idDevice
                })
            } else {
                this.gotoUrl('./productDetail', {
@ -97,5 +98,12 @@ export default{
        bottom: 2px;
        font-size: 12px;
    }
    &.pitem-close{
        background-color: #ff9526;
        color: #fff;
        .pitem-bg{
            display: none;
        }
    }
}
</style>

+ 1 - 5
mini-pro-web/src/components/layout/NavLayout.vue

@ -9,7 +9,7 @@
			@click-left="onClickLeft"
			>
		</van-nav-bar>
		<div class="main-container" :class="{pt50:hasTop, mainNobotHasTop: hasTop, 'has-bot': hasBot}">
		<div class="main-container" :class="{pt46:hasTop, mainNobotHasTop: hasTop, 'has-bot': hasBot}">
			<app-main/>
		</div>
		<AppBotNav v-if="hasBot"></AppBotNav>
@ -43,10 +43,6 @@ export default {
		}
	},
	computed: {
		hasTop(){
			return false
			return !(this.$route.meta&&this.$route.meta.hasTop===false)
		},
		title() {
			return this.$store.state.app.pageTitle
		}

+ 10 - 7
mini-pro-web/src/mixins/common.js

@ -21,18 +21,21 @@ Vue.mixin({
        hasBack() {
			return (this.$navigation.getRoutes().length>1) && !_.includes(this.indexPages, this.$route.path)
		},
		hasTop(){
			if(this.isApp) {
				return true
			}
			return (this.$route.meta&&this.$route.meta.hasTop===true);
		},
        hasTop(){
            if(this.$store.getters.noTop){
                return false
            }
            return !(this.$route.meta&&this.$route.meta.hasTop===false)
        },
		hasBot(){
			if(!this.$route.meta){
				return false
			}
			return (this.$route.meta&&this.$route.meta.hasBot);
		}
		},
        offsetTop(){
            return this.hasTop? '12.26667vw' : '0'
        }
    },
    methods:{
        _refreshPageData(instance, params) {

+ 12 - 12
mini-pro-web/src/router/device.js

@ -14,7 +14,7 @@ const device = [
                meta: {
                    title: '设备管理',
                    hasBot: false,
                    hasTop: false
                    // hasTop: false
                }
            },
            {
@ -24,7 +24,7 @@ const device = [
                meta: {
                    title: '设备',
                    hasBot: false,
                    hasTop: false
                    // hasTop: false
                }
            },
            {
@ -34,7 +34,7 @@ const device = [
                meta: {
                    title: '温度控制',
                    hasBot: false,
                    hasTop: false
                    // hasTop: false
                }
            },
            {
@ -44,7 +44,7 @@ const device = [
                meta: {
                    title: '开启温度控制',
                    hasBot: false,
                    hasTop: false
                    // hasTop: false
                }
            },
            {
@ -54,7 +54,7 @@ const device = [
                meta: {
                    title: '湿度控制',
                    hasBot: false,
                    hasTop: false
                    // hasTop: false
                }
            },
            {
@ -64,7 +64,7 @@ const device = [
                meta: {
                    title: '开启湿度控制',
                    hasBot: false,
                    hasTop: false
                    // hasTop: false
                }
            },
            {
@ -74,7 +74,7 @@ const device = [
                meta: {
                    title: '货道状态',
                    hasBot: false,
                    hasTop: false
                    // hasTop: false
                }
            },
            {
@ -84,7 +84,7 @@ const device = [
                meta: {
                    title: '货道状态',
                    hasBot: false,
                    hasTop: false
                    // hasTop: false
                }
            },
            {
@ -94,7 +94,7 @@ const device = [
                meta: {
                    title: '设备状态',
                    hasBot: false,
                    hasTop: false
                    // hasTop: false
                }
            },
            {
@ -104,7 +104,7 @@ const device = [
                meta: {
                    title: '设备重启',
                    hasBot: false,
                    hasTop: false
                    // hasTop: false
                }
            },
            {
@ -114,7 +114,7 @@ const device = [
                meta: {
                    title: '信息日志',
                    hasBot: false,
                    hasTop: false
                    // hasTop: false
                }
            },
            {
@ -124,7 +124,7 @@ const device = [
                meta: {
                    title: '在售停售',
                    hasBot: false,
                    hasTop: false
                    // hasTop: false
                }
            },
        ]

+ 76 - 15
mini-pro-web/src/router/index.js

@ -16,6 +16,8 @@ import order from './order'
import replenishment from './replenishment'
import device from './device'
import machine from './machine'
import {getPublicKey, getHwlyyDecrypt, checkWlyyLogin} from '@/api/login'
import JSEncrypt from "@/utils/jsencrypt";
Vue.use(VueRouter)
const routes = [
@ -33,7 +35,8 @@ const routes = [
        name: 'login',
        component: Login,
        meta: {
            title: '登录'
            title: '登录',
            hasTop: false
        }
    },
    {
@ -49,7 +52,7 @@ const routes = [
        name: 'fotgetPassword',
        component: FotgetPassword,
        meta: {
            title: '忘记密码'
            title: '忘记密码',
        }
    },
    {
@ -71,11 +74,17 @@ const routes = [
    {
        path: '/drugList',
        name: 'drugList',
        component: DrugList,
        meta: {
            title: '选择药品'
        }
        component: NavLayout,
        children: [{
            path: '/drugList',
            name: 'drugList',
            component: DrugList,
            meta: {
                title: '选择药品'
            }
        }]
    },
    
]
const whiteList = [
@ -102,8 +111,19 @@ function redirectToLogin(to, from, next) {
    }
}
if(process.env.NODE_ENV==='production') {
    router.beforeEach(async (to, from, next) => {
router.beforeEach(async (to, from, next) => {
    // _from=ihealth&_platform=webApp
    if(to.query._noTop==1){
        store.dispatch('SetNoTop', true)
    }
    new Promise((resolve, reject)=>{
        if(to.query._code){
            return authLogin(to.query._code, to)
        } else {
            resolve()
        }
    })
    .then(res=>{
        if((store.getters.user && store.getters.user.accessToken)) {
            next()
        } else {
@ -114,13 +134,54 @@ if(process.env.NODE_ENV==='production') {
            }
        }
    })
} else {
    router.beforeEach(async (to, from, next) => {
        if ((!store.getters.user || !store.getters.user.accessToken) && whiteList.indexOf(to.path) == -1) {
            next('/login')
            return
        }
        next()
    .catch(err=>{
        console.error(err)
    })
})
function authLogin(code, to){
    return new Promise((resolve, reject)=>{
        getHwlyyDecrypt({code: decodeURIComponent(code)})
            .then(data=>{
                return new Promise((resolve, reject)=>{
                    getPublicKey({})
                        .then(res=>{
                            var encrypt = new JSEncrypt()
                            encrypt.setPublicKey(res.obj.publicKey)
                            resolve(encrypt.encrypt(data.obj.code))
                        })
                        .catch(err=>{
                            reject(err)
                        })
                })
            })
            .then(code=>{
                return checkWlyyLogin({
                    code: code,
                    client_id: store.getters.clientId,
                    login_type: 1
                })
            })
            .then(res=>{
                if(res.obj && res.obj.authCode==1){
                    var userInfo  = loginRes.obj.WlyyUserSimple
                    userInfo.token = userInfo.accessToken
                    userInfo.clientType = to.query.clientType//1 来自i健康app 区域互联网
                    store
                        .dispatch('SetLoginUser', userInfo)
                        .then(res=>{
                            resolve()
                        })
                } else {
                    Toast(res.obj&&res.obj.mes)
                    reject(err)
                }
            })
            .catch(err=>{
                console.error(err)
                // Toast("获取医生数据错误")
                reject(err)
            })
    })
}

+ 1 - 1
mini-pro-web/src/router/me.js

@ -14,7 +14,7 @@ const me = [
                meta: {
                    title: '切换账号',
                    hasBot: false,
                    hasTop: false
                    // hasTop: false
                }
            },
            

+ 2 - 2
mini-pro-web/src/router/order.js

@ -10,7 +10,7 @@ const routeMap = [
                name: "orderList",
                meta: {
                    title: "订单管理",
                    hasTop: false,
                    // hasTop: false,
                    hasBot: false
                },
				component: () => import("@/views/order/list.vue")
@ -20,7 +20,7 @@ const routeMap = [
                name: "orderDetail",
                meta: {
                    title: "订单详情",
                    hasTop: false,
                    // hasTop: false,
                    hasBot: false
                },
				component: () => import("@/views/order/detail/index.vue")

+ 1 - 1
mini-pro-web/src/router/personal.js

@ -20,7 +20,7 @@ const routeMap = [
                name: "personalChangePassword",
                meta: {
                    title: "修改密码",
                    hasTop: false,
                    // hasTop: false,
                    hasBot: false
                },
				component: () => import("@/views/personal/changePassword.vue")

+ 1 - 0
mini-pro-web/src/store/getters.js

@ -5,5 +5,6 @@ const getters = {
    user: state => state.user,
    wxAppId: state => state.app.wxWechatConfig && state.app.wxWechatConfig.wxAppId,
    wxId: state => state.app.wxWechatConfig && state.app.wxWechatConfig.wxId,
    noTop: state => state.app.noTop,
};
export default getters;

+ 9 - 1
mini-pro-web/src/store/modules/app.js

@ -6,9 +6,14 @@ const app = {
			wxId: process.env.VUE_APP_WXID
        },
        loading: false,
        pageTitle: "智能药房"
        pageTitle: "智能药房",
		platform: 'web',  //网页web   
		noTop: false
	},
	mutations: {
		SET_NO_TOP: (state, bool) => {
            state.noTop = bool
		},
		SET_LOADING: (state, bool) => {
            state.loading = bool
		},
@ -17,6 +22,9 @@ const app = {
        }
	},
	actions: {
		SetNoTop({ commit, state }, bool) {
            commit('SET_NO_TOP', bool)
		},
		SetLoading({ commit, state }, bool) {
            commit('SET_LOADING', bool)
		},

+ 128 - 56
mini-pro-web/src/views/device/cargoLane/index.vue

@ -1,61 +1,62 @@
<template>
    <div class='cargoLaneIndex'>
        <div class='grid-4 c-f14 c-border-b c-333 ptb15 bgc-fff'>
            <div class="c-t-center">
                <div class='c-ff5e6c c-f16 mb5'>{{deviceInfo.layer || 0}}</div>
                <span>层数</span>
            </div>
            <div class="c-t-center">
                <div class='c-ff5e6c c-f16 mb5'>{{deviceInfo.aisles || 0}}</div>
                <span>货道数</span>
            </div>
            <div class="c-t-center">
                <div class='c-ff5e6c c-f16 mb5'>{{0}}</div>
                <span>启用</span>
            </div>
            <div class="c-t-center">
                <div class='c-ff5e6c c-f16 mb5'>{{0}}</div>
                <span>禁用</span>
            </div>
        </div>
        <div class='bgc-fff p10'>
            <div class='flex f_y_c f_x_s'>
                <div style="width: 50%" class="pr10">
                    <van-button block type="info" class='c-border-r-5'>货道开启</van-button>
        <van-sticky :offset-top="offsetTop">
            <div class='grid-4 c-f14 c-border-b c-333 ptb15 bgc-fff'>
                <div class="c-t-center">
                    <div class='c-ff5e6c c-f16 mb5'>{{deviceInfo.layer || 0}}</div>
                    <span>层数</span>
                </div>
                <div class="c-t-center">
                    <div class='c-ff5e6c c-f16 mb5'>{{deviceInfo.aisles || 0}}</div>
                    <span>货道数</span>
                </div>
                <div style="width: 50%" class="pl10">
                    <van-button block type="info" class='c-border-r-5'>货道关闭</van-button>
                <div class="c-t-center">
                    <div class='c-ff5e6c c-f16 mb5'>{{openCount}}</div>
                    <span>启用</span>
                </div>
                <div class="c-t-center">
                    <div class='c-ff5e6c c-f16 mb5'>{{closeCount}}</div>
                    <span>禁用</span>
                </div>
            </div>
            <div class='bgc-fff p10'>
                <div class='flex f_y_c f_x_s'>
                    <div style="width: 50%" class="pr10">
                        <van-button @click="openAndCloseCargo(1)" block type="info" class='c-border-r-5'>货道开启</van-button>
                    </div>
                    <div style="width: 50%" class="pl10">
                        <van-button @click="openAndCloseCargo(0)" block type="info" class='c-border-r-5'>货道关闭</van-button>
                    </div>
                </div>
                <!-- <div>
                    <van-button type="info" class='mr10 c-border-r-5'>售卖</van-button>
                    <van-button type="info" class='c-border-r-5'>停售</van-button>
                </div> -->
                <div class='mt10'><van-button @click="findMediicinecabinetInventoryByDeviceId" type="info" style='width:100%;' class='c-border-r-5'>获取货道状态</van-button></div>
            </div>
            <div class='mt10'><van-button @click="findMediicinecabinetInventoryByDeviceId" type="info" style='width:100%;' class='c-border-r-5'>获取货道状态</van-button></div>
            <div class='mt20 c-f14'>
                <div class='flex f_y_c x-overflow'>
                    <div v-for='(citem, index) in list' :key="index">
                        <div>
                            <div class='c-t-center w50 ptb10 bgc-ccc' :class='(Math.ceil(number/6))!=index+1?"mr10":""'>{{index+1}}</div>
                            <div v-for='(item, j) in citem.list' :key="j">
                                <div @click="onSelect(item)" class='c-t-center w50 ptb10 mt10 bgc-fff c-border c-position-r' 
                                    :class="{'mr10': (Math.ceil(number/6))!=index+1, 'active': selectList.indexOf(item)!=-1}">
                                    <div>
                                        <div v-if='true' class='c-20d7ad'>正常</div>
                                        <div v-else class='c-ff9526'>故障</div>
                                    </div>
                                    <div>
                                        <div v-if='true' class='c-20d7ad'>已启动</div>
                                        <div v-else class='c-ff5e6c'>已停用</div>
                                    </div>
                                    <!-- <div>
                                        <div v-if='true' class='c-20d7ad'>售卖</div>
                                        <div v-else class='c-ff5e6c'>停售</div>
                                    </div> -->
                                </div>
        </van-sticky>
        <div class='bgc-fff plr10 pt10'>
            <div class=' c-f14 list'>
                <div class="row row-header">
                    <div v-for='(item, i) in list[0].list' :key="i" class='c-t-center w50 ptb10 bgc-ccc' >{{i+1}}</div>
                </div>
                <div v-for='(citem, index) in list' :key="index" class="row ">
                    <div v-for='(item, j) in citem.list' :key="j">
                        <div @click="onSelect(item)" class='c-t-center w50 ptb10 mt10 bgc-fff c-border c-position-r' 
                            :class="{'mr10': (Math.ceil(number/6))!=index+1, 'active': selectList.indexOf(item)!=-1}">
                            <!-- <div>
                                <div v-if='true' class='c-20d7ad'>正常</div>
                                <div v-else class='c-ff9526'>故障</div>
                            </div> -->
                            <div>
                                <div v-if='item.cargoState==1' class='c-20d7ad'>已开启</div>
                                <div v-else class='c-ff5e6c'>已关闭</div>
                            </div>
                            <!-- <div>
                                <div v-if='true' class='c-20d7ad'>售卖</div>
                                <div v-else class='c-ff5e6c'>停售</div>
                            </div> -->
                        </div>
                    </div>
                    
                    <!-- <div v-for='(item, i) in list[0].list' :key="i" class='c-t-center w50 ptb10 bgc-ccc' >{{i+1}}</div> -->
                </div>
            </div>
        </div>
@ -73,19 +74,23 @@ export default{
            list: [],
            activeKey: 0,
            curItem: [],
            selectList: []
            selectList: [],
            openCount: 0,
            closeCount: 0
        }
    },
     created() {
    created() {
        this.findMediicinecabinetInventoryByDeviceId()
        this.findDeviceById()
    },
    methods:{
        $refreshData(){
            this.findMediicinecabinetInventoryByDeviceId()
        $refreshData(noLoading){
            this.findMediicinecabinetInventoryByDeviceId(noLoading)
        },
        findMediicinecabinetInventoryByDeviceId(){
            this.$loading('加载中..')
        findMediicinecabinetInventoryByDeviceId(noLoading){
            if(!noLoading){
                this.$loading('加载中..')
            }
            let p = {
                deviceId: this.deviceId
            }
@ -96,13 +101,19 @@ export default{
                    console.log('findMediicinecabinetInventoryByDeviceId', res)
                    this.$toast.clear()
                    if(res.detailModelList && res.detailModelList.length){
                        var openCount = 0, closeCount = 0
                        var list = _.map(res.detailModelList, v=>{
                            var key = _.keys(v)[0]
                            v[key].forEach(m => {
                                m.cargoState==1? openCount++ : closeCount++
                            });
                            return {
                                index: key,
                                list: v[key],
                            }
                        })
                        this.openCount = openCount
                        this.closeCount = closeCount
                        list = _.sortBy(list, 'index')
                        this.list = list
                        this.curItem = this.list[0]
@ -136,15 +147,76 @@ export default{
            } else {
                this.selectList.splice(i, 1)
            }
        },
        openAndCloseCargo(cargoState){
            if(!this.selectList || !this.selectList.length){
                this.$toast('请选择要操作的通道')
                return
            }
            this.$dialog.confirm({
                title: '',
                message: `确定${cargoState==1? '开启' : '关闭'}通道`,
            })
            .then(() => {
                this.$nextTick(()=>{
                    var ids = _.map(this.selectList, v=>{
                        return v.id
                    })
                    this.$loading('保存中..')
                    let p = {
                        cargoIds: ids.join(','),//必穿		货道id,多个id,英文逗号隔开,例如   1,2 		4,5,6
                        cargoState 		//必传		1开启,0关闭
                    }
                    console.log('params', p)
                    medicineAbinetApi
                        .openAndCloseCargo(p)
                        .then(res=>{
                            console.log('openAndCloseCargo', res)
                            this.selectList = []
                            this.$toast({
                                message: '操作成功',
                                forbidClick: true,
                                onClose: ()=>{
                                }
                            })
                            this.$refreshData(true)
                        })
                        .catch(err=>{
                            console.error(err)
                        })
                })
            })
        }
    },
}
</script>
<style scoped lang='scss'>
.cargoLaneIndex{
    .list{
        overflow-y: auto;
        padding-bottom: 10px;
        .row{
            display: -webkit-box;
            >div{
                width: 50px;
                margin-right: 5px;
                &:last-child{
                    margin-right: 10px;
                }
            }
        }
    }
    
    .grid-4{
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr;
        // position: fixed;
        // top: 0;
        // left: 0;
        // width: 100%;
    }
    .x-overflow{
        overflow-x: auto;

+ 9 - 1
mini-pro-web/src/views/device/cargoLane/setting.vue

@ -25,7 +25,7 @@
                        <div @click="onSelectCol(item)" class='c-t-center w30 c-position-r item' 
                            :class='{mr10: cindex!=citem.list.length-1}'>
                            <div>{{cindex+1}}</div>
                            <div class='c-t-center'><div class='c-cirlce-17b3ec'></div></div>
                            <div class='c-t-center'><div :class='item.cargoState==1? "c-cirlce-17b3ec" : "c-cirlce-ccc"'></div></div>
                            <div class='c-border ptb5 item-box ellipsis_1' :class='{active: selectList.indexOf(item)!=-1, isMerge: item.state==21||item.state==20}'>{{item.state==21?"主":item.cargoCapacity}}</div>
                        </div>
                    </div>
@ -282,6 +282,14 @@ export default{
        border-radius: 50%;
        display: inline-block;
    }
    .c-cirlce-ccc{
        background: #ccc;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        display: inline-block;
    }
    .x-overflow{
        overflow-x: auto;
        -ms-overflow-style: none;

+ 1 - 1
mini-pro-web/src/views/device/index.vue

@ -1,6 +1,6 @@
<template>
    <div class='deviceIndex'>
        <van-sticky>
        <van-sticky :offset-top="offsetTop">
            <van-field
                v-model="searchText"
                center

+ 1 - 1
mini-pro-web/src/views/drug/css/drugSel.scss

@ -13,7 +13,7 @@
    }
}
.has-top{
.mainNobotHasTop{
    .drug-sel{
        .search{
            top: 46px;

+ 5 - 2
mini-pro-web/src/views/drug/list.vue

@ -1,6 +1,6 @@
<template>
    <div class="drug-list">
        <van-sticky>
        <van-sticky :offset-top="offsetTop">
            <div class="search">
                <form action="/">
                    <van-search
@ -65,6 +65,7 @@ export default {
    },
    data(){
        return {
            deviceId: this.$route.query.deviceId,//轨道id
            trackId: this.$route.query.trackId,//轨道id
            value: "",
            list: [],
@ -81,12 +82,14 @@ export default {
			if(val&&val.length>=2){
                var p = {
                    content: this.value,
                    userId: this.user.id,
                    deviceId: this.deviceId,
                    page: 1,
                    size: 999
                }
                console.log('params', p)
                medicineAbinetApi
                    .drugList(p)
                    .getDrugListByDevice(p)
                    .then(res => {
                        if(res.status == 200){
                            console.log('drugList', res)

+ 6 - 6
mini-pro-web/src/views/machine/components/Result.vue

@ -9,7 +9,7 @@
			<div class="order-list" v-if="rsType==5">
				<div>
					<div class="order-list-inner">
						<div @click="$emit('showOrderDetail', item)" v-for="(item, i) in orderList" :key="i" class="item">
						<div @tap="$emit('showOrderDetail', item)" v-for="(item, i) in orderList" :key="i" class="item">
							处方编号:{{item.num}}
						</div>
					</div>
@ -29,8 +29,8 @@
				<img @click="$emit('outDrug'); rsType=3;" v-show="rsType==1" src="../img/quanbuquyao_icon.png" alt="">
				<img @click="$emit('onBack')" v-show="rsType==2" src="../img/yaofangquyao_icon.png" alt="">
				<img @click="$emit('onBackIndex')" v-show="rsType==4" src="../img/back.png" alt="">
				<img @click="$emit('onPrint')" v-show="rsType==4" src="../img/dayin.png" alt="">
				<img @click="$emit('onBackIndex')" class="mr5" v-show="rsType==4" src="../img/back.png" alt="">
				<img @click="$emit('onPrint')" class="ml5" v-show="rsType==4" src="../img/dayin.png" alt="">
				<img class="jiantou" v-show="rsType==5" src="../img/tjiantou.png" alt="">
				<img class="check-btn" v-show="rsType==5" src="../img/shangfangdingdan.png" alt="">
@ -102,13 +102,13 @@ export default {
			text-align: center;
			img{
				display: inline-block;
				margin: calc(186px / 6) auto 0;
				margin-top: calc(186px / 6) auto 0;
				width: calc(790px / 6);
				&:first-child{
				&.mr5{
					margin-right: calc(60px / 6);
				}
				&:last-child{
				&.ml5{
					margin-left: calc(60px / 6);
				}
			}

+ 27 - 20
mini-pro-web/src/views/machine/index.vue

@ -19,21 +19,20 @@
			</div>
			<div class="video-swipe">
				<van-swipe :autoplay="0" indicator-color="white">
				<van-swipe :touchable="false" :autoplay="0" indicator-color="white">
					<template v-if="videoList&& videoList.length">
						<van-swipe-item v-for="(item, i) in videoList" :key="i">
							<video class="swipe-item-video" :autoplay="i==0" loop controls muted :src="setImgUrl(item.url)"></video>
						</van-swipe-item>
					</template>
					<van-swipe-item v-else>
						<!-- <img class="swipe-item-img" src="./img/banner01.png"> -->
						<video class="swipe-item-video" autoplay loop controls muted src="./img/default.mp4"></video>
					</van-swipe-item>
				</van-swipe>
			</div>
			<div class="img-swipe">
				<van-swipe :autoplay="3000" indicator-color="white">
				<van-swipe :touchable="false" :autoplay="3000" indicator-color="white">
					<template v-if="imgList && imgList.length">
						<van-swipe-item v-for="(item, i) in imgList" :key="i">
							<img class="swipe-item-img" :src="setImgUrl(item.url)">
@ -91,14 +90,13 @@ export default {
  	},
  	data() {
    	return {
			deviceNum: this.$route.query.deviceNum || '14912202107000001500000000000000',//14912202107000001500000000000000
			deviceNum: this.$route.query.deviceNum || '',//14912202107000001500000000000000  
			step: 0, //0启动页  1首页  2扫码页  3订单页
			curImg: '',
			illustrationMskShow: false,
			socketUrl: '',
			path: "ws://yik.ab-inbev.vip/c/websocket/",
			socket: "",
			mess: [],
			layerNo: "0",
			wayerNo: "0",
			forceClose: false,
@ -128,7 +126,9 @@ export default {
		}
	},
	created(){
		
		if(this.deviceNum){
			this.init()
		}
	},
  	methods: {
		onPrev(){
@ -180,7 +180,7 @@ export default {
            let p = {
                deviceId: this.deviceNum, //设备编号
				pickUpNum, //取药码
				cardNum: cardNum //社保卡号 //"DA7292254" ||
				cardNum //社保卡号 //"DA7292254" ||
            }
            console.log('params', p)
            medicineAbinetApi
@ -189,17 +189,22 @@ export default {
                    console.log('checkOrderAndReturnOrderList', res)
					if(res.status == 200){
						this.$toast.clear()
						if(res.obj && res.obj.orderList && res.obj.orderList.length){
							if(res.obj.orderList.length == 1){
								this.showOrderDetail(res.obj.orderList[0])
							} else {
								this.orderList = res.obj.orderList || []
								this.rsType = 5
								this.step = 3
						if(res.obj && res.obj.orderList){
							var list = _.map(res.obj.orderList, v=>{
								return v.status===0
							}) 
							if(list.length){
								if(list == 1){
									this.showOrderDetail(res.obj.orderList[0])
								} else {
									this.orderList = res.obj.orderList || []
									this.rsType = 5
									this.step = 3
								}
								return
							}
						} else {
							this.$toast('查不到订单信息')
						}
						this.$toast('查不到订单信息')
					} else {
						this.$toast(res.message || '获取订单失败')
					}
@ -216,7 +221,7 @@ export default {
			})
			this.orderdetail = item.drugList
			this.orderInfo = item
			this.rsType = item.status==1? 1 : 2
			this.rsType = item.orderStatus==1? 1 : 2
			this.step = 3
		},
		init: function() {
@ -258,8 +263,7 @@ export default {
			console.log("连接错误")
		},
		getMessage: function(msg) {
			console.log(msg.data)
			this.mess.push(msg.data); //返回数据信息,包含医保瞳
			// console.log(msg.data)
			var msgobj = JSON.parse(msg.data)
			if (msgobj.type == 'ShipInfo') {
				var item = this.orderdetail[this.currindex]
@ -309,6 +313,8 @@ export default {
				}).then(() => {
					this.onPrev()
				});
			} else if(msgobj.type == 'PageRload'){
				location.reload(true)
			}
		},
		sendReadCard: function() {
@ -472,6 +478,7 @@ export default {
		},
		shipComplete(msg){
			this.$toast.clear()
			this.orderList.splice(this.orderList.indexOf(this.orderInfo), 1)
			if(msg){
				this.$dialog.alert({
					title: '',
@ -485,7 +492,6 @@ export default {
			this.rsType = 4
		},
		countDown(){
			return
			this.times = 30
			countDownFunc = setInterval(()=>{
				if(this.times === 0){
@ -499,6 +505,7 @@ export default {
	destroyed() {
		this.forceClose = true
		clearInterval(this.heartbitInterval)
		clearInterval(countDownFunc)
	}
}
</script>

+ 1 - 1
mini-pro-web/src/views/order/list.vue

@ -1,6 +1,6 @@
<template>
    <div class='order-list'>
        <van-sticky>
        <van-sticky :offset-top="offsetTop">
            <div class="top-banner kitbox fs-14 ptb10 pl15">
                <div @click="pickDate(1)" class="date-item">{{$moment(startDate).format('YYYY-MM-DD')}}</div>
                <div class="ptb5 plr10">至</div>

+ 20 - 3
mini-pro-web/src/views/replenishment/device/detail.vue

@ -1,15 +1,19 @@
<template>
    <div class='replenishment-device-detail'>
        <div class="kitbox plr15 ptb10">
            <div class="box-flex-1 box-v-middle fs-14">从上往下数</div>
            <div class="box-flex-1 box-v-middle fs-14">
                <span>从上往下数</span>
                <div class="color-block"></div>
                <span class="ml5 fs-12">已关闭的通道</span>
            </div>
            <div><van-button @click="gotoUrl('/replenishment/start/deviceDetail', {deviceId: deviceId})" type="info" size="small">点击设置商品</van-button></div>
        </div>
        <div class="list ">
            <div v-for="(item, i) in list" :key="i" class="item plr15 bt-e1e1e1 bb-e1e1e1">
                <div class="pt10">第1层</div>
                <div class="pt10">第{{i+1}}层</div>
                <div class="item-list ptb10">
                    <div v-for="(data, k) in item.list" :key="k" :class="data.cargoCapacity==data.qty?'pitem-full':''" class="pitem">
                    <div v-for="(data, k) in item.list" :key="k" :class="{'pitem-full':data.cargoCapacity==data.qty, 'pitem-close': data.cargoState!=1}" class="pitem">
                        <div :style="'height: '+ (formatRate(data)) +'%'" class="pitem-bg"></div>
                        <div class="pitem-inner">
                            <div class="kitbox ">
@ -79,6 +83,15 @@ export default{
</script>
<style lang='scss' scoped>
.replenishment-device-detail{
    .color-block{
        background: #ff9526;
        width: 10px;
        height: 10px;
        display: inline-block;
        margin-left: 20px;
        border-radius: 2px;
        
    }
    .list{
        .item{
            margin-bottom: 10px;
@ -128,6 +141,10 @@ export default{
                             background: #ff5e6c;
                        }
                    }
                    &.pitem-close{
                        background-color: #ff9526;
                        color: #fff;
                    }
                }
            }
        }

+ 1 - 1
mini-pro-web/src/views/replenishment/picking/list.vue

@ -1,6 +1,6 @@
<template>
    <div class='replenishment-picking-list'>
        <van-sticky>
        <van-sticky :offset-top="offsetTop">
            <van-tabs v-model="active" @change="onChange">
                <!-- <van-tab title="全部"></van-tab> -->
                <van-tab title="备货中"></van-tab>

+ 1 - 1
mini-pro-web/src/views/replenishment/record/list.vue

@ -1,6 +1,6 @@
<template>
    <div class='replenishment-record-list'>
        <van-sticky>
        <van-sticky :offset-top="offsetTop">
            <van-tabs v-model="active">
                <van-tab title="补货"></van-tab>
                <van-tab title="换货"></van-tab>

+ 7 - 6
mini-pro-web/src/views/replenishment/start/components/SetStockDialog.vue

@ -89,12 +89,13 @@ export default{
                    this.setStockShow = false
                    this.$toast.clear()
                    this.$emitRefreshPage('replenishmentStartDeviceDetail')
                    this.$router.replace({
                        path: '/replenishment/start/productDetail',
                        query: {
                            id: this.trackId
                        }
                    })
                    history.back()
                    // this.$router.replace({
                    //     path: '/replenishment/start/productDetail',
                    //     query: {
                    //         id: this.trackId
                    //     }
                    // })
                })
                .catch(err=>{
                    console.error(err)

+ 38 - 4
mini-pro-web/src/views/replenishment/start/deviceDetail.vue

@ -1,6 +1,6 @@
<template>
    <div class='replenishment-start-device-detail fs-14'>
        <van-sticky>
        <van-sticky :offset-top="offsetTop">
            <div class="bgc-17b3ec c-fff">
                <div class="pt10 plr15 ellipsis_1">当前货柜:{{deviceInfo.equName}}</div>
                <van-row>
@ -37,11 +37,16 @@
                    <div class="box-flex-1"> 共:{{deviceInfo.layer}}层</div>
                    <div class="box-flex-1 ml5">总货道:{{deviceInfo.aisles}}</div>
                    <div class="box-flex-1 ml5">故障:0</div>
                    <div class="box-flex-1 ml5">关闭:0</div>
                    <div class="box-flex-1 ml5">关闭:{{closeCount}}</div>
                </div>
            </div>
        </van-sticky>
        <div class="fs-14 pl15 ptb10 bgc-fff">从上往下数</div>
        <div class="fs-14 pl15 ptb10 bgc-fff">
            <span>从上往下数</span>
            <div class="color-block"></div>
            <span class="ml5 fs-12">已关闭的通道</span>
        </div>
        <div class="kitbox">
            <div class="left-list">
                <van-sidebar v-model="activeKey">
@ -70,7 +75,9 @@ export default{
            deviceId: this.$route.query.deviceId,
            list: [],
            activeKey: 0,
            curItem: []
            curItem: [],
            openCount: 0,
            closeCount: 0
        }
    },
    watch:{
@ -98,13 +105,19 @@ export default{
                    console.log('findMediicinecabinetInventoryByDeviceId', res)
                    this.$toast.clear()
                    if(res.detailModelList && res.detailModelList.length){
                        var openCount = 0, closeCount = 0
                        var list = _.map(res.detailModelList, v=>{
                            var key = _.keys(v)[0]
                            v[key].forEach(m => {
                                m.cargoState==1? openCount++ : closeCount++
                            });
                            return {
                                index: key,
                                list: v[key],
                            }
                        })
                        this.openCount = openCount
                        this.closeCount = closeCount
                        list = _.sortBy(list, 'index')
                        this.list = list
                        this.curItem = this.list[0]
@ -142,6 +155,8 @@ export default{
    .list{
        display: flex;
        flex-wrap: wrap;
        height: calc(100vh - 153px);
        overflow-y: auto;
        // min-height: calc(100vh - 130px);
        .item{
            margin-left: 5px;
@ -154,5 +169,24 @@ export default{
    .left-list{
        height: calc(100vh - 153px);
    }
    .color-block{
        background: #ff9526;
        width: 10px;
        height: 10px;
        display: inline-block;
        margin-left: 20px;
        border-radius: 2px;
        
    }
}
</style>
<style lang="scss">
.mainNobotHasTop{
    .replenishment-start-device-detail{
        .list, .left-list{
            height: calc(100vh - 199px);
        }
    }
}
</style>

+ 10 - 2
mini-pro-web/src/views/replenishment/start/deviceList.vue

@ -1,6 +1,6 @@
<template>
    <div class='replenishment-start-device-list'>
        <van-sticky>
        <van-sticky :offset-top="offsetTop">
            <van-tabs v-model="active">
                <van-tab title="缺货设备"></van-tab>
                <van-tab title="全部设备"></van-tab>
@ -73,7 +73,6 @@ export default{
                .then(res=>{
                    console.log('getOutOfStockDeviceListByUserId', res)
                    if(res.status == 200){
                        debugger
                        var list = res.detailModelList
                        this.list = page==1? list : this.list.concat(list)
                        this.$refs.customList.endLoad(res.totalPage<=page || this.active===0, this.list.length)
@ -117,4 +116,13 @@ export default{
        }
    }
}
</style>
<style lang="scss">
.mainNobotHasTop{
    .replenishment-start-device-list{
        .custom-list .search{
            top: 96px;
        }
    }
}
</style>

+ 2 - 1
mini-pro-web/src/views/replenishment/start/productDetail.vue

@ -6,7 +6,8 @@
                :src="require('@/assets/images/drug_default.png')"
            />
        </div>
        <div class="c-17b3ec tc pt20" @click="gotoUrl('/drugList')">更换商品</div>
        <div class="tc c-333 pt20 pb10 plr15 break-all">{{info.drugName}}</div>
        <div class="c-17b3ec tc" @click="gotoUrl('/drugList', {deviceId: info.idDevice})">更换商品</div>
        <div class=" tc pt20">
            <span class="mr10">现有数量:{{info.qty}} </span>
            <span class="ml10">货道容量:{{info.cargoCapacity}} </span>

+ 2 - 3
mini-pro-web/src/views/replenishment/stockUp/detail.vue

@ -1,7 +1,7 @@
<template>
    <div class='replenishment-stock-up-detail fs-14'>
        <div class="list bgc-fff ">
            <van-sticky>
            <van-sticky :offset-top="offsetTop">
                <div class="row kitbox bgc-fff"  >
                    <div class="box-flex-1 pl10">商品名称</div>
                    <div class="tc">现料数</div>
@ -117,12 +117,11 @@ export default{
        },
        toAdd(){
            var device = this.oriData[0]
            debugger
            if(device.canPickCount <= this.list.length){
				this.$toast(`已达到药柜容量,无法在添加`)
				return
			}
            this.gotoUrl('/drugList')
            this.gotoUrl('/drugList', {deviceId: device.id})
        }
    },
}

+ 1 - 1
mini-pro-web/src/views/replenishment/stockUp/deviceList.vue

@ -22,7 +22,7 @@
                        </div>
                        <div class="lh20 ptb10 kitbox">
                            <div class="box-flex-1">
                                <div>待补商品数量:{{item.unuserdCapacity}}</div>
                                <div>待补商品数量:{{item.daibuQty}}</div>
                                <div>未设商品空货道:{{item.unusedAisles}}</div>
                                <div>设备所属:{{item.community}}</div>
                                <div>设备编号:{{item.equNum}}</div>