货柜列表 货柜详情 货柜补货
This commit is contained in:
1 parent
eb57fc50b0
commit
763374df64
7 files changed
+317
-35
No files matched your search
@@ -17,15 +17,15 @@ VITE_PWD_ENC_KEY='pigxpigxpigxpigx'
|
||||
VITE_OAUTH2_APP_CLIENT='mini:mini'
|
||||
|
||||
# --------------------------- 开发环境 api地址 ----------------------------------
|
||||
VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上
|
||||
# VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上
|
||||
#VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上
|
||||
# VITE_APP_DEV_SERVICE = http://192.168.101.107:9999 # 邓-本地
|
||||
VITE_APP_DEV_SERVICE = http://192.168.101.107:9999 # 邓-本地
|
||||
# VITE_APP_DEV_SERVICE = http://47.96.250.9:8089/api # 测试线上
|
||||
|
||||
# --------------------------- 开发环境 图片访问基础地址 ---------------------------
|
||||
VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上
|
||||
# VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上
|
||||
#VITE_IMAGE_DEV_PATH = http://59.202.170.152:81/api # 信创线上
|
||||
# VITE_IMAGE_DEV_PATH = http://192.168.101.107:9999 # 邓-本地
|
||||
VITE_IMAGE_DEV_PATH = http://192.168.101.107:9999 # 邓-本地
|
||||
# VITE_IMAGE_DEV_PATH = http://47.96.250.9:8089/api # 测试线上
|
||||
# VITE_IMAGE_DEV_PATH = http://pjcloud.center.takin.cc # 张-本地
|
||||
|
||||
|
||||
@@ -336,6 +336,13 @@
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "cabinetDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智能柜详情",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "replenishment",
|
||||
"style": {
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
<template>
|
||||
<crud-layout title="货柜详情" mainIsScroll bg="/static/page/blue-bg.png">
|
||||
<view v-if="state.detail.id">
|
||||
<tm-sheet :margin="[0, 20]" class="second-text-28">
|
||||
<tm-text font-size="32">基本信息</tm-text>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>设备编号:</text>
|
||||
<text>{{ state.detail.deviceCode }}</text>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>设备名称:</text>
|
||||
<text>{{ state.detail.hardName }}</text>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>设备IMEI卡号:</text>
|
||||
<text>{{ state.detail.imei }}</text>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>货柜数量:</text>
|
||||
<text>{{ state.detail.cabinetNum }}</text>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>单个货柜摄像头数量:</text>
|
||||
<text>{{ state.detail.cabinetCameraNum }}</text>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>单个货柜称重单元数量:</text>
|
||||
<text>{{ state.detail.cabinetWeightUnitNum }}</text>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>SIM卡号:</text>
|
||||
<text>{{ state.detail.simSn }}</text>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>柜子层数:</text>
|
||||
<text>{{ state.detail.doorCount }}</text>
|
||||
</view>
|
||||
</tm-sheet>
|
||||
|
||||
<tm-sheet :margin="[0, 20]" class="second-text-28">
|
||||
<tm-text font-size="32">运行信息</tm-text>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>售卖状态:</text>
|
||||
<tm-tag size="xs" v-if="state.detail.saleStatus == 1">在售</tm-tag>
|
||||
<tm-tag size="xs" v-if="state.detail.saleStatus == 2" color="error">停售</tm-tag>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>电源状态:</text>
|
||||
<tm-tag size="xs" v-if="state.detail.powerStatus == 1">通电</tm-tag>
|
||||
<tm-tag size="xs" v-if="state.detail.powerStatus == 2" color="error">断电</tm-tag>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>在线状态:</text>
|
||||
<tm-tag size="xs" v-if="state.detail.netStatus == 1">在线</tm-tag>
|
||||
<tm-tag size="xs" v-if="state.detail.netStatus == 2" color="error">离线</tm-tag>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>媒体音量:</text>
|
||||
<text class="c-red">{{ state.detail.mediaVolume }}</text>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>系统音量:</text>
|
||||
<text class="c-red">{{ state.detail.systemVolume }}</text>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>SIM信号强度:</text>
|
||||
<text>{{ state.detail.signalIntensity }}</text>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>信噪比:</text>
|
||||
<text>{{ state.detail.signalRatio }}</text>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>SIM信号值更新时间:</text>
|
||||
<text>{{ state.detail.signalTime }}</text>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>上次重启时间:</text>
|
||||
<text>{{ state.detail.restartTime }}</text>
|
||||
</view>
|
||||
</tm-sheet>
|
||||
|
||||
<tm-sheet v-for="(item, index) in state.detail.cabinetList" :key="index" :margin="[0, 20]" class="second-text-28">
|
||||
<tm-text font-size="32">{{ "柜门" + state.detail.deviceCode + "-" + item.cabinetNo }}</tm-text>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>货柜号:</text>
|
||||
<text>{{ item.cabinetNo }}</text>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>锁在线:</text>
|
||||
<tm-tag size="xs" v-if="item.isLockOnline == 'Y'">在线</tm-tag>
|
||||
<tm-tag size="xs" v-if="item.isLockOnline == 2" color="error">离线</tm-tag>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>锁状态:</text>
|
||||
<tm-tag size="xs" v-if="item.lockStatus == 1">锁关</tm-tag>
|
||||
<tm-tag size="xs" v-if="item.lockStatus == 2" color="error">锁开</tm-tag>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>门状态:</text>
|
||||
<tm-tag size="xs" v-if="item.doorStatus == 1">门关</tm-tag>
|
||||
<tm-tag size="xs" v-if="item.doorStatus == 2" color="error">门开</tm-tag>
|
||||
</view>
|
||||
<view class="flex justify-between mt-1">
|
||||
<text>货柜售卖状态:</text>
|
||||
<tm-tag size="xs" v-if="item.saleStatus == 1">在售</tm-tag>
|
||||
<tm-tag size="xs" v-if="item.saleStatus == 2" color="error">停售</tm-tag>
|
||||
</view>
|
||||
</tm-sheet>
|
||||
</view>
|
||||
|
||||
<view class="h-40rpx" />
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive } from "vue"
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app"
|
||||
import { doorApi } from "@/sheep/api"
|
||||
|
||||
const state = reactive<any>({
|
||||
hardDoorId: "",
|
||||
detail: {},
|
||||
})
|
||||
|
||||
onLoad((option: any) => {
|
||||
if (!option.hardDoorId) return
|
||||
state.hardDoorId = option.hardDoorId
|
||||
})
|
||||
|
||||
onShow(async () => {
|
||||
try {
|
||||
uni.showLoading({ title: "加载中...", mask: true })
|
||||
const res = await doorApi.hardDoorDetail({ hardDoorId: state.hardDoorId })
|
||||
if (res.code == 0) {
|
||||
state.detail = res.data
|
||||
return
|
||||
}
|
||||
uni.showToast({ title: res.msg, icon: "none" })
|
||||
} catch (error: any) {
|
||||
uni.showToast({ title: error.msg, icon: "none" })
|
||||
} finally {
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -4,52 +4,66 @@
|
||||
ref="pageRef"
|
||||
height="100%"
|
||||
:fixed="false"
|
||||
v-model="pageHook.list"
|
||||
:default-page-size="10"
|
||||
safe-area-inset-bottom
|
||||
:loading-more-enabled="true"
|
||||
:show-scrollbar="false"
|
||||
@query="query"
|
||||
:auto-clean-list-when-reload="false"
|
||||
:auto-scroll-to-top-when-reload="false"
|
||||
@scroll="pageHook.scroll"
|
||||
>
|
||||
<view class="h-30rpx" />
|
||||
<tm-collapse :multiple="false">
|
||||
<tm-collapse-item
|
||||
v-for="(item, index) in new Array(3).fill({})"
|
||||
:key="index"
|
||||
left-icon="settings-line"
|
||||
:name="index"
|
||||
title="柜子123"
|
||||
>
|
||||
<tm-text class="line-10">地址:123</tm-text>
|
||||
<view class="card flex justify-around items-center">
|
||||
<view class="flex-col items-center p-2 rounded-1 active:bg-#E8E8E8">
|
||||
<image class="w-60 h-60" src="@/static/page/开门.svg" />
|
||||
<text>货柜详情</text>
|
||||
</view>
|
||||
<view class="flex-col items-center p-2 rounded-1 active:bg-#E8E8E8" @click="replenishment">
|
||||
<image class="w-60 h-60" src="@/static/page/开门.svg" />
|
||||
<text>货柜补货</text>
|
||||
</view>
|
||||
<view class="flex-col items-center p-2 rounded-1 active:bg-#E8E8E8" @click="openPutaway">
|
||||
<image class="w-60 h-60" src="@/static/page/开门.svg" />
|
||||
<text>商品上架</text>
|
||||
</view>
|
||||
<tm-sheet v-for="(item, index) in pageHook.list" :key="index" :margin="[0, 20]">
|
||||
<tm-text font-size="32">{{ item.hardName }} {{ item.deviceCode }}</tm-text>
|
||||
<view class="card flex justify-around items-center my-1 p-2">
|
||||
<view class="flex-col items-center p-2 rounded-1 active:bg-#E8E8E8" @click="doDetail(item.hardId)">
|
||||
<image class="w-50 h-50" src="@/static/page/货柜详情.svg" />
|
||||
<tm-text>货柜详情</tm-text>
|
||||
</view>
|
||||
</tm-collapse-item>
|
||||
</tm-collapse>
|
||||
<view class="flex-col items-center p-2 rounded-1 active:bg-#E8E8E8" @click="replenishment(item.hardId)">
|
||||
<image class="w-50 h-50" src="@/static/page/开门.svg" />
|
||||
<tm-text>货柜补货</tm-text>
|
||||
</view>
|
||||
<view class="flex-col items-center p-2 rounded-1 active:bg-#E8E8E8" @click="openPutaway(item.hardId)">
|
||||
<image class="w-50 h-50" src="@/static/page/货柜上架.svg" />
|
||||
<tm-text>商品上架</tm-text>
|
||||
</view>
|
||||
</view>
|
||||
</tm-sheet>
|
||||
</z-paging>
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { router } from "@/sheep"
|
||||
import { ref } from "vue"
|
||||
import { hooks, router } from "@/sheep"
|
||||
import { doorApi } from "@/sheep/api"
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
|
||||
const pageHook = hooks.usePage(pageRef, doorApi.hardDoorPage, null, "data.records")
|
||||
|
||||
const query = (page: number, pagesize: number) => {
|
||||
pageHook.startPage(page, pagesize, false, {})
|
||||
}
|
||||
|
||||
// 货柜详情
|
||||
const doDetail = (hardDoorId: string) => {
|
||||
if (!hardDoorId) return
|
||||
router.jump("/pages/cabinet/cabinetDetail", { hardDoorId }, 1)
|
||||
}
|
||||
|
||||
// 商品补货
|
||||
const replenishment = () => {
|
||||
router.jump("/pages/cabinet/replenishment", {}, 1)
|
||||
const replenishment = (hardDoorId: string) => {
|
||||
if (!hardDoorId) return
|
||||
router.jump("/pages/cabinet/replenishment", { hardDoorId }, 1)
|
||||
}
|
||||
|
||||
// 商品上架
|
||||
const openPutaway = () => {
|
||||
router.jump("/pages/cabinet/putaway", {}, 1)
|
||||
const openPutaway = (hardDoorId: string) => {
|
||||
if (!hardDoorId) return
|
||||
router.jump("/pages/cabinet/putaway", { hardDoorId }, 1)
|
||||
}
|
||||
</script>
|
||||
+115
-2
@@ -5,7 +5,6 @@ export default {
|
||||
* app获取智能柜授权信息
|
||||
* @param doorHardId 智能柜设备id
|
||||
* @param cabinetNo 货柜编号
|
||||
* @returns
|
||||
*/
|
||||
appGetAuthHardDoor: (data: { doorHardId: any; cabinetNo: any }) =>
|
||||
request({
|
||||
@@ -20,7 +19,6 @@ export default {
|
||||
* app获取智能柜授权信息
|
||||
* @param authId 授权id
|
||||
* @param authStatus 是否授权
|
||||
* @returns
|
||||
*/
|
||||
appAuthHardDoor: (data: { authId: any; authStatus: any }) =>
|
||||
request({
|
||||
@@ -31,4 +29,119 @@ export default {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
/**
|
||||
* app查询智能柜列表(有分页)
|
||||
*/
|
||||
hardDoorPage: (params: any) =>
|
||||
request({
|
||||
url: "hard/hard-door-manager/app/page",
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
/**
|
||||
* app查询智能柜详情
|
||||
* @param hardDoorId 智能柜id
|
||||
*/
|
||||
hardDoorDetail: (params: { hardDoorId: any }): Promise<any> =>
|
||||
request({
|
||||
url: "hard/hard-door-manager/app/detail",
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
/**
|
||||
* 上架
|
||||
* @param id 绑定id
|
||||
* @param hardSpuId 商品id
|
||||
*/
|
||||
putaway: (data: { hardDoorId: any }) =>
|
||||
request({
|
||||
url: "hard/hard-spu/app/putaway",
|
||||
method: "POST",
|
||||
data,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
/**
|
||||
* 下架
|
||||
* @param id 绑定id
|
||||
* @param hardSpuId 商品id
|
||||
*/
|
||||
unPutaway: (data: { hardDoorId: { id: any; hardSpuId: any } }) =>
|
||||
request({
|
||||
url: "hard/hard-spu/app/un-putaway",
|
||||
method: "POST",
|
||||
data,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
/**
|
||||
* app查询货柜补货商品列表
|
||||
* @param hardDoorId 智能柜编号
|
||||
* @param cabinetNo 货柜编号
|
||||
*/
|
||||
cabinetPutawayList: (params: { hardDoorId: any; cabinetNo: any }): Promise<any> =>
|
||||
request({
|
||||
url: "hard/hard-spu/app/cabinet-putaway-list",
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
/**
|
||||
* app查询货柜商品列表
|
||||
* @param hardId 智能柜编号
|
||||
* @param cabinetNo 货柜编号
|
||||
*/
|
||||
cabinetList: (params: { hardId: any; cabinetNo: any }): Promise<any> =>
|
||||
request({
|
||||
url: "hard/hard-spu/app/cabinet-list",
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
/**
|
||||
* app上架完成
|
||||
* @param flowId
|
||||
* @param list
|
||||
*/
|
||||
repertoryDone: (data: { flowId: any; list: Array<{ hardSpuId: any; plusCount: any }> }): Promise<any> =>
|
||||
request({
|
||||
url: "hard/hard-spu-repertory/app/repertory-done",
|
||||
method: "POST",
|
||||
data,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
/**
|
||||
* 上架开门
|
||||
* @param hardDoorId 智能柜编号
|
||||
* @param cabinetNo 货柜编号
|
||||
*/
|
||||
openRepertory: (data: { hardDoorId: string; cabinetNo: string }): Promise<any> =>
|
||||
request({
|
||||
url: "hard/hard-door-flow/app/open-repertory",
|
||||
method: "POST",
|
||||
data,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1744889227103" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7002" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M788.7872 51.2c41.1648 0 75.264 30.72 80.896 71.9872l0.512 5.0176 0.2048 5.3248v705.7408c0 43.6224-33.792 79.6672-76.8 82.2272l-4.8128 0.1024h-4.608l-0.6144 3.584c-5.12 24.2176-24.7808 43.2128-49.6128 46.9504l-4.7104 0.512-4.3008 0.1536h-47.2064a59.904 59.904 0 0 1-57.4976-43.1616l-1.1264-4.4544-0.6656-3.584H405.504l-0.6656 3.584c-5.12 24.2176-24.7808 43.2128-49.5616 46.9504l-4.7616 0.512-4.3008 0.1536h-47.2064a59.904 59.904 0 0 1-57.4976-43.1616l-1.1264-4.4544-0.6144-3.584h-4.608a81.92 81.92 0 0 1-81.0496-72.7552l-0.4096-4.7616L153.6 839.2704V133.5296c0-43.6224 33.792-79.6672 76.8-82.176L235.2128 51.2h553.5744zM478.1568 117.4016H235.2128c-7.1168 0-13.312 5.6832-14.5408 13.4656l-0.2048 2.6624v705.7408c0 8.192 5.5296 14.6944 12.3904 15.872l2.3552 0.256h70.8096v51.2h33.28v-51.2H478.208V117.3504z m310.6304 0H545.792v737.9456h138.8544v51.2h33.28l0.0512-51.2h70.8096c7.1168 0 13.312-5.632 14.5408-13.4144l0.2048-2.6624V134.8096l-0.0512-2.7136a15.6672 15.6672 0 0 0-12.288-14.4384l-2.4064-0.256zM390.7072 409.6a25.6 25.6 0 0 1 25.6 25.6v153.6a25.6 25.6 0 1 1-51.2 0v-153.6a25.6 25.6 0 0 1 25.6-25.6zM640 409.6a25.6 25.6 0 0 1 25.6 25.6v153.6a25.6 25.6 0 1 1-51.2 0v-153.6a25.6 25.6 0 0 1 25.6-25.6z" fill="#0779FD" p-id="7003"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1744889168384" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6791" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><path d="M847.0016 922.4192H210.176C178.9952 922.4192 153.6 897.024 153.6 865.792V158.976C153.6 127.7952 178.9952 102.4 210.176 102.4h636.7232c31.232 0 56.576 25.3952 56.576 56.576v706.6112a55.808 55.808 0 0 1-16.384 40.1408c-10.7008 10.752-24.8832 16.6912-40.0896 16.6912zM223.5904 852.3776H833.536V172.4416H223.5904v679.936z" fill="#0779FD" p-id="6792"></path><path d="M868.608 422.4H188.6208a35.0208 35.0208 0 0 1 0-69.9904h679.936a35.0208 35.0208 0 0 1 0 69.9904z m-470.016-124.9792H318.976a35.0208 35.0208 0 0 1 0-70.0416h79.6672a35.0208 35.0208 0 0 1 0 70.0416z m0 249.9584H318.976a35.0208 35.0208 0 0 1 0-69.9904h79.6672a35.0208 35.0208 0 0 1 0 69.9904z m0 250.0096H318.976a35.0208 35.0208 0 0 1 0-69.9904h79.6672a35.0208 35.0208 0 0 1 0 69.9904z m470.016-124.9792H188.6208a35.0208 35.0208 0 0 1 0-69.9904h679.936a35.0208 35.0208 0 0 1 0 69.9904z" fill="#0779FD" p-id="6793"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
Reference in new issue
Block a user