update: 细节优化
This commit is contained in:
parent
0c36e5300d
commit
e04464657e
16
src/App.vue
16
src/App.vue
|
@ -1,21 +1,9 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
|
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
|
||||||
// const isFirstLaunch = ref(true);
|
|
||||||
|
|
||||||
onLaunch(() => {
|
onLaunch(() => {
|
||||||
// console.log(Boolean(uni.getStorageSync("hasLaunched")))
|
//隐藏官方的tabBar
|
||||||
// // 当应用启动时,检查是否已显示过启动页
|
// uni.hideTabBar();
|
||||||
// if (Boolean(uni.getStorageSync("hasLaunched"))) {
|
|
||||||
// // 如果已显示过,不再显示启动页
|
|
||||||
// isFirstLaunch.value = false;
|
|
||||||
// console.log("不再显示启动页");
|
|
||||||
// } else {
|
|
||||||
|
|
||||||
// // 如果未显示过,标记为已显示,并保存到存储
|
|
||||||
// uni.redirectTo({ url: "pagesLaunch/index" });
|
|
||||||
// uni.setStorageSync("hasLaunched", true);
|
|
||||||
// console.log('******* 执行啦')
|
|
||||||
// }
|
|
||||||
});
|
});
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
console.log("App Show");
|
console.log("App Show");
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onLaunch } from "@dcloudio/uni-app";
|
import { onLaunch } from "@dcloudio/uni-app";
|
||||||
import {url} from "@/utils/data";
|
import { url } from "@/utils/data";
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
select: string;
|
select: string;
|
||||||
|
@ -92,6 +92,9 @@ const handleClick = (item: tabBar) => {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: item.path, // 要跳转到的页面路径
|
url: item.path, // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
|
// uni.switchTab({
|
||||||
|
// url: item.path, // 要跳转到的页面路径
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
onLaunch(() => {
|
onLaunch(() => {
|
||||||
|
|
|
@ -502,7 +502,29 @@
|
||||||
// }
|
// }
|
||||||
],
|
],
|
||||||
"tabbar": {
|
"tabbar": {
|
||||||
"custom": true //隐藏官方选项卡
|
"custom": true, //隐藏官方选项卡
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"pagePath": "/pagesHome/index",
|
||||||
|
"text": "工作台"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "/pagesStatistics/index",
|
||||||
|
"text": "统计"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "/pagesConfig/index",
|
||||||
|
"text": "配置"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "/pagesHome/index1",
|
||||||
|
"text": "配置旧"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "/pagesLogin/profile/index",
|
||||||
|
"text": "我的"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
|
|
|
@ -39,7 +39,9 @@
|
||||||
<text class="number">收货单号:{{ item.receiptNumber }}</text>
|
<text class="number">收货单号:{{ item.receiptNumber }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<text class="name">{{ item.userName }} / {{item.cardNumber}}</text>
|
<text class="name"
|
||||||
|
>{{ item.userName }} / {{ item.cardNumber }}</text
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
|
@ -59,8 +61,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-box">
|
<view class="flex-box">
|
||||||
<text>毛重:{{ item.grossWeight }}kg</text>
|
<text>毛重:{{ item.grossWeight }}kg</text>
|
||||||
<text
|
<text v-if="state.scaleStatus !== 0"
|
||||||
v-if="state.scaleStatus !== 0"
|
|
||||||
>单价:{{
|
>单价:{{
|
||||||
state.scaleStatus === 0 ? "未定价" : item.price + "元/KG"
|
state.scaleStatus === 0 ? "未定价" : item.price + "元/KG"
|
||||||
}}</text
|
}}</text
|
||||||
|
@ -116,6 +117,7 @@ const stateNew = reactive<any>({
|
||||||
deviceList: [],
|
deviceList: [],
|
||||||
isShow: false,
|
isShow: false,
|
||||||
currentDevice: {
|
currentDevice: {
|
||||||
|
id: 0,
|
||||||
name: "全部",
|
name: "全部",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -139,6 +141,8 @@ DeviceApi.getDeviceList({ deviceType: DeviceType.Weighbridge }).then(
|
||||||
|
|
||||||
const handleSelect = (v: any) => {
|
const handleSelect = (v: any) => {
|
||||||
stateNew.currentDevice = v;
|
stateNew.currentDevice = v;
|
||||||
|
resetPageList();
|
||||||
|
getList();
|
||||||
};
|
};
|
||||||
|
|
||||||
const pageList: PageResult<Order> = reactive({
|
const pageList: PageResult<Order> = reactive({
|
||||||
|
@ -200,8 +204,11 @@ const getList = (v?: boolean) => {
|
||||||
pageSize: pageList.pageSize,
|
pageSize: pageList.pageSize,
|
||||||
pageNumber: pageList.pageNum,
|
pageNumber: pageList.pageNum,
|
||||||
scaleStatus: state.scaleStatus,
|
scaleStatus: state.scaleStatus,
|
||||||
userName: stateNew.keywoard,
|
userName: stateNew.keywoard
|
||||||
};
|
};
|
||||||
|
if (stateNew.currentDevice.id) {
|
||||||
|
params.deviceId = stateNew.currentDevice.id
|
||||||
|
}
|
||||||
pageList.isLoading = true;
|
pageList.isLoading = true;
|
||||||
ReceiveApi.getOrderPage(params).then((res) => {
|
ReceiveApi.getOrderPage(params).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|
|
@ -39,7 +39,9 @@
|
||||||
<text class="number">出货单号:{{ item.orderNumber }}</text>
|
<text class="number">出货单号:{{ item.orderNumber }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<text class="name">{{ item.userName }} / {{item.cardNumber}}</text>
|
<text class="name"
|
||||||
|
>{{ item.userName }} / {{ item.cardNumber }}</text
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
|
@ -110,6 +112,7 @@ const stateNew = reactive<any>({
|
||||||
deviceList: [],
|
deviceList: [],
|
||||||
isShow: false,
|
isShow: false,
|
||||||
currentDevice: {
|
currentDevice: {
|
||||||
|
id: 0,
|
||||||
name: "全部",
|
name: "全部",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -134,6 +137,8 @@ DeviceApi.getDeviceList({ deviceType: DeviceType.Weighbridge }).then(
|
||||||
|
|
||||||
const handleSelect = (v: any) => {
|
const handleSelect = (v: any) => {
|
||||||
stateNew.currentDevice = v;
|
stateNew.currentDevice = v;
|
||||||
|
resetPageList();
|
||||||
|
getList();
|
||||||
};
|
};
|
||||||
|
|
||||||
const pageList: PageResult<Shipment> = reactive({
|
const pageList: PageResult<Shipment> = reactive({
|
||||||
|
@ -191,12 +196,17 @@ const getList = (v?: boolean) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pageList.isLoading = true;
|
pageList.isLoading = true;
|
||||||
ShipmentApi.getOrderPage({
|
|
||||||
|
let params: any = {
|
||||||
pageSize: pageList.pageSize,
|
pageSize: pageList.pageSize,
|
||||||
pageNumber: pageList.pageNum,
|
pageNumber: pageList.pageNum,
|
||||||
scaleStatus: state.scaleStatus,
|
scaleStatus: state.scaleStatus,
|
||||||
userName: stateNew.keywoard,
|
userName: stateNew.keywoard,
|
||||||
}).then((res) => {
|
};
|
||||||
|
if (stateNew.currentDevice.id) {
|
||||||
|
params.deviceId = stateNew.currentDevice.id;
|
||||||
|
}
|
||||||
|
ShipmentApi.getOrderPage(params).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
pageList.isLoading = false;
|
pageList.isLoading = false;
|
||||||
(pageList as any).list = (pageList as any).list.concat(res.data.list);
|
(pageList as any).list = (pageList as any).list.concat(res.data.list);
|
||||||
|
|
Loading…
Reference in New Issue