lincl 3 年之前
父节点
当前提交
b4286d668d

+ 10 - 0
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({
@ -529,6 +536,9 @@ let service = {
			params
		});
    },
	
};
export default service;

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

@ -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', {

+ 0 - 4
mini-pro-web/src/components/layout/NavLayout.vue

@ -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
		}

+ 4 - 2
mini-pro-web/src/mixins/common.js

@ -22,6 +22,9 @@ Vue.mixin({
			return (this.$navigation.getRoutes().length>1) && !_.includes(this.indexPages, this.$route.path)
		},
        hasTop(){
            if(this.$store.getters.noTop){
                return false
            }
            return !(this.$route.meta&&this.$route.meta.hasTop===false)
        },
		hasBot(){
@ -31,8 +34,7 @@ Vue.mixin({
			return (this.$route.meta&&this.$route.meta.hasBot);
		},
        offsetTop(){
            debugger
            return !(this.$route.meta&&this.$route.meta.hasTop===false)? '12.26667vw' : '0'
            return this.hasTop? '12.26667vw' : '0'
        }
    },
    methods:{

+ 3 - 0
mini-pro-web/src/router/index.js

@ -113,6 +113,9 @@ function redirectToLogin(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)

+ 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)
		},

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

@ -65,6 +65,7 @@ export default {
    },
    data(){
        return {
            deviceId: this.$route.query.deviceId,//轨道id
            trackId: this.$route.query.trackId,//轨道id
            value: "",
            list: [],
@ -82,12 +83,13 @@ export default {
                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)

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

@ -91,7 +91,7 @@ export default {
  	data() {
    	return {
			deviceNum: this.$route.query.deviceNum || '',//14912202107000001500000000000000  
			step: 3, //0启动页  1首页  2扫码页  3订单页
			step: 0, //0启动页  1首页  2扫码页  3订单页
			curImg: '',
			illustrationMskShow: false,
			socketUrl: '',
@ -103,7 +103,7 @@ export default {
			heartbitInterval: '',
			currindex: 0,
			orderdetail: [],
			rsType: 4,// 1:订单信息 2订单错误  3订单成功  4出药完成  5订单列表
			rsType: 0,// 1:订单信息 2订单错误  3订单成功  4出药完成  5订单列表
			imgList: [],
			videoList: [],
			inCheckBarcode: false,
@ -127,7 +127,7 @@ export default {
	},
	created(){
		if(this.deviceNum){
			this.step = 1
			this.init()
		}
	},
  	methods: {

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

@ -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)

+ 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>

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

@ -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})
        }
    },
}