lincl 3 years ago
parent
commit
298cc31285

+ 21 - 19
mini-pro-web/src/api/login.js

@ -134,27 +134,29 @@ export function findOneUserFormat(data) {
			params: data
		})
		.then(res=>{
			// "saasAdmin": "管理员"; regionAdmin" "区域管理员" ; communityAdmin "社区管理员" ;  "  "replenisher": "补货员"
			var temArr = ['saasAdmin', 'regionAdmin', 'communityAdmin', 'replenisher']
			var roleList = _.map(res.obj.role, v=>{
				return {
					id: v.id,
					code: v.code,
					name: v.name
			if(res && res.obj){
				// "saasAdmin": "管理员"; regionAdmin" "区域管理员" ; communityAdmin "社区管理员" ;  "  "replenisher": "补货员"
				var temArr = ['saasAdmin', 'regionAdmin', 'communityAdmin', 'replenisher']
				var roleList = _.map(res.obj.role, v=>{
					return {
						id: v.id,
						code: v.code,
						name: v.name
					}
				})
				roleList = _.sortBy(roleList, v=>{
					return temArr.indexOf(v.code)
				})
				var curRole = roleList[0]
				var userInfo = {
					roleList,
					curRoleId: curRole.id,
					curRoleCode: curRole.code,
					curRoleName: curRole.name
				}
			})
			roleList = _.sortBy(roleList, v=>{
				return temArr.indexOf(v.code)
			})
			var curRole = roleList[0]
			var userInfo = {
				roleList,
				curRoleId: curRole.id,
				curRoleCode: curRole.code,
				curRoleName: curRole.name
				resolve(userInfo)
			}
			resolve(userInfo)
		})
		.catch(err=>{
			reject(err)

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

@ -11,15 +11,15 @@
                    <span>货道数</span>
                </div>
                <div class="c-t-center">
                    <div class='c-ff5e6c c-f16 mb5'>{{deviceInfo.openedCargo || 0}}</div>
                    <div class='c-ff5e6c c-f16 mb5'>{{openCount}}</div>
                    <span>启用</span>
                </div>
                <div class="c-t-center">
                    <div class='c-ff5e6c c-f16 mb5'>{{deviceInfo.closedCargo || 0}}</div>
                    <div class='c-ff5e6c c-f16 mb5'>{{closeCount}}</div>
                    <span>禁用</span>
                </div>
                <div class="c-t-center">
                    <div class='c-ff5e6c c-f16 mb5'>{{deviceInfo.faultCargo || 0}}</div>
                    <div class='c-ff5e6c c-f16 mb5'>{{faultCount}}</div>
                    <span>故障</span>
                </div>
            </div>

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

@ -35,7 +35,7 @@
                <div class="kitbox fs-12 plr10 pb5">
                    <div class="box-flex-1"> 共:{{deviceInfo.device.layer}}层</div>
                    <div class="box-flex-1 ml5">总货道:{{deviceInfo.totalCargo}}</div>
                    <div class="box-flex-1 ml5">故障:{{deviceInfo.faultCargo || 0}}</div>
                    <div class="box-flex-1 ml5">故障:{{faultCount || 0}}</div>
                    <div class="box-flex-1 ml5">关闭:{{deviceInfo.closedCargo || 0}}</div>
                </div>
            </div>
@ -52,7 +52,7 @@
                <van-button v-if="curOrder" @click="updateStockUpStatus(curOrder, 2)" type="primary" color="#17b3ec" size="mini">完成入库</van-button>
                <van-button v-else-if="orderList&&orderList.length" @click="showOrderPicker=true" type="primary" color="#17b3ec" size="mini">导入申领药品单</van-button>
            </div>
            <div class="plr15" v-if="isView">
            <div class="plr15" v-if="isView&&$hasAuth('device', 'operate','replenish')">
                <van-button @click="gotoUrl('/replenishment/start/deviceDetail', {deviceId: deviceId})" type="primary" color="#17b3ec" size="mini">点击进行入库</van-button>
            </div>
        </div>