update: 增加首页菜单

This commit is contained in:
admin 2024-03-13 10:41:39 +08:00
parent 4f40642986
commit b675e78a3f
34 changed files with 173 additions and 110 deletions

View File

@ -12,13 +12,6 @@
}
},
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationStyle": "custom", //
"navigationBarTitleText": "工作台"
}
},
// {
// "path": "pages/index/index",
// "style": {
@ -26,6 +19,12 @@
// "navigationBarTitleText": "工作台"
// }
// },
{
"path": "pages/login/index",
"style": {
"navigationBarTitleText": "登陆"
}
},
{
"path": "pages/index/shipmentSettlement",
"style": {
@ -38,12 +37,6 @@
"navigationBarTitleText": "待结算"
}
},
{
"path": "pages/login/index",
"style": {
"navigationBarTitleText": "登陆"
}
},
{
"path": "pages/login/forgetPwd",
"style": {
@ -90,6 +83,18 @@
}
]
},
{
"root": "pagesHome",
"pages": [
{
"path": "index",
"style": {
"navigationStyle": "custom", //
"navigationBarTitleText": "工作台"
}
}
]
},
{
"root": "pagesReceive",
"pages": [

View File

@ -157,7 +157,7 @@ const submit = () => {
if (res.code === 200) {
store.setProfile(res.data);
uni.navigateTo({
url: "/pages/index/index", //
url: "/pagesHome/index", //
});
}
});

View File

@ -18,7 +18,7 @@
<view class="supplier"> 上海奉贤两网融合大磅 </view>
</view>
<view>
<text class="btn" @click="handleScenePhoto">现场照片</text>
<text class="btn" @click="handleScenePhoto(1)">现场照片</text>
</view>
</view>
@ -103,9 +103,9 @@ const gridList1 = reactive([
isCustomStyle: true
},
]);
const handleScenePhoto = () => {
const handleScenePhoto = (imagesId: number) => {
uni.navigateTo({
url: "/pagesScenePhoto/index", //
url: "/pagesScenePhoto/index?orderType=1&id=" + imagesId, //
});
};
</script>

View File

@ -20,26 +20,26 @@
<view class="time">2024-01-01</view>
<view class="box" v-for="item in 10" :key="item">
<view class="box" v-for="(item, index) in pageList.list" :key="index">
<view class="base">
<view>
<view class="no"> 收货单号SHD20230901132333 </view>
<view class="supplier"> 上海奉贤两网融合大磅 </view>
<view class="no"> 收货单号{{ item.receiptNumber }} </view>
<view class="supplier"> {{ item.deviceName || '-' }} </view>
</view>
<view>
<text class="btn" @click="handleScenePhoto">现场照片</text>
<text class="btn" @click="handleScenePhoto((item as any).id)">现场照片</text>
</view>
</view>
<view class="name">吴小勇 <text>未审核</text></view>
<view class="type">轻二</view>
<view class="name">{{ item.userName }} <text>{{ getScaleStatus((item as any).scaleStatus) }}</text></view>
<view class="type">{{ item.productName }}</view>
<view class="flex-box">
<text>定价人谭兵</text>
<text>创建时间2023-09-01 13:23:33</text>
<text>定价人{{ item.userName }}</text>
<text>创建时间{{ item.createTime }}</text>
</view>
<view class="more">
<view v-for="(item, index) in gridList1" :key="index" :style="item.isCustomStyle ? 'font-size: 22rpx;color:#999' : ''">
<view v-for="(item, index) in gridList1" :key="index" :style="item.isCustomStyle ? 'font-size: 24rpx;color:#999' : ''">
<text v-if="item.name">{{ item.name }}</text
><text
>{{ item.isBefore ? item.unit : "" }}
@ -52,6 +52,9 @@
</view>
</template>
<script setup lang="ts">
import { ReceiveApi } from '@/services';
import { ScaleStatus } from '@/utils/enum';
const keyword = ref("");
const gridList1 = reactive([
{
@ -112,11 +115,46 @@ const gridList1 = reactive([
isCustomStyle: true
},
]);
const handleScenePhoto = () => {
const handleScenePhoto = (id: string) => {
uni.navigateTo({
url: "/pagesScenePhoto/index", //
url: "/pagesScenePhoto/index?orderType=1&id=" + id, //
});
};
const getScaleStatus = (type: number) => {
if (type === ScaleStatus.ToBePriced) {
return '待定价'
} else if (type === ScaleStatus.ToBeTare) {
return '待过毛重'
} else if (type === ScaleStatus.ToBeReview) {
return '待审核'
} else if (type === ScaleStatus.ToBePay) {
return '待支付'
} else if (type === ScaleStatus.Paid) {
return '已支付'
}
}
interface PageResult<T> {
total: number;
list: T[];
pageNum: number;
pageSize: number;
}
const pageList: PageResult<Order> = reactive({
total: 0,
list: [],
pageNum: 1,
pageSize: 10,
});
const getOrderList = () => {
ReceiveApi.getOrderPage({ pageNumber: 1, pageSize: 10 }).then((res) => {
if (res.code === 200) {
(pageList as any).list = res.data.list;
}
});
};
onMounted(() => {
getOrderList();
});
</script>
<style lang="scss" scoped>
.c-card {
@ -130,7 +168,7 @@ const handleScenePhoto = () => {
border-radius: 24rpx;
border: 1px solid #00dcee;
font-weight: 500;
font-size: 24rpx;
font-size: 26rpx;
color: #ffffff;
margin-left: 50rpx;
padding: 6rpx 30rpx;
@ -143,7 +181,7 @@ const handleScenePhoto = () => {
align-items: center;
justify-content: space-between;
font-weight: 400;
font-size: 27rpx;
font-size: 26rpx;
color: #000000;
> view {
display: inline-block;
@ -154,13 +192,13 @@ const handleScenePhoto = () => {
}
}
.btn {
font-size: 27rpx;
font-size: 26rpx;
color: #00dcee;
}
}
.time {
font-weight: 400;
font-size: 22rpx;
font-size: 26rpx;
color: #000000;
margin: 30rpx 0rpx;
}
@ -178,12 +216,12 @@ const handleScenePhoto = () => {
justify-content: space-between;
.no {
font-weight: 400;
font-size: 21rpx;
font-size: 26rpx;
color: #000000;
}
.supplier {
font-weight: 400;
font-size: 24rpx;
font-size: 26rpx;
color: #000000;
}
.btn {
@ -198,23 +236,25 @@ const handleScenePhoto = () => {
}
.name {
font-weight: 400;
font-size: 27rpx;
font-size: 26rpx;
color: #000000;
margin: 15rpx 0rpx;
text {
background-color: #ffaf75;
font-weight: 500;
font-size: 16rpx;
font-size: 24rpx;
color: #ffffff;
padding: 5rpx 20rpx;
margin-left: 20rpx;
border-radius: 10rpx;
}
}
.type {
font-weight: 400;
font-size: 27rpx;
font-size: 26rpx;
color: #ec0f3e;
margin-bottom: 20rpx;
font-weight: bold;
}
.flex-box {
display: flex;
@ -232,7 +272,7 @@ const handleScenePhoto = () => {
grid-template-columns: repeat(2, 1fr);
flex: 1;
font-weight: 400;
font-size: 24rpx;
font-size: 26rpx;
color: #000000;
padding: 25rpx 0rpx 0rpx 0rpx;
> view {

View File

@ -91,7 +91,13 @@
</view>
</template>
<script setup lang="ts">
import { DeviceApi, PictureApi, ProfileApi, ReceiveApi, ReceiveProductApi } from "@/services";
import {
DeviceApi,
PictureApi,
ProfileApi,
ReceiveApi,
ReceiveProductApi,
} from "@/services";
import { formatDate } from "@/utils";
import { DeviceType, ImagesType, OrderType } from "@/utils/enum";
import _ from "underscore";
@ -153,7 +159,7 @@ const formAttrList = reactive<any>([
name: "站点磅秤",
key: "deviceName",
type: "select",
childKey: 'device',
childKey: "device",
required: true,
unit: "",
fn: () => {
@ -165,7 +171,7 @@ const formAttrList = reactive<any>([
name: "供应商",
key: "userName",
type: "select",
childKey: 'user',
childKey: "user",
required: true,
unit: "",
fn: () => {
@ -183,7 +189,7 @@ const formAttrList = reactive<any>([
name: "收货产品",
key: "productName",
type: "select",
childKey: 'product',
childKey: "product",
required: true,
unit: "",
fn: () => {
@ -278,7 +284,7 @@ const handleUpload = () => {
const handleSelect = (key: string, v: any) => {
contrlModalParams[key].isShow = false;
if (key === "user") {
debugger
debugger;
model1.order.userName = v.name;
model1.order.userId = v.id;
} else if (key === "product") {
@ -293,7 +299,7 @@ const handleSelect = (key: string, v: any) => {
ProfileApi.getUserList({ userType: 2 }).then((res) => {
if (res.code === 200) {
contrlModalParams.user.list = res.data;
console.log(contrlModalParams.user.list)
console.log(contrlModalParams.user.list);
}
});
//
@ -308,7 +314,7 @@ ReceiveProductApi.getAllReProducts().then((res) => {
}
});
//
DeviceApi.getDeviceList({deviceType: DeviceType.Weighbridge}).then(res => {
DeviceApi.getDeviceList({ deviceType: DeviceType.Weighbridge }).then((res) => {
if (res.code === 200) {
contrlModalParams.device.list = _.map(
res.data as any,
@ -317,22 +323,23 @@ DeviceApi.getDeviceList({deviceType: DeviceType.Weighbridge}).then(res => {
}
);
}
})
});
const upload = () => {
Promise.all(handleUpload()).then((res) => {
//
if (res.length > 0) {
PictureApi.addListAnnex({ annexPos: res }).then((res1) => {
if (res1.code === 200) {
uni.showToast({
title: "图片资源上传成功",
icon: "success",
});
}
});
}
});
};
const save = () => {
// Promise.all(handleUpload()).then((res) => {
// //
// if (res.length > 0) {
// PictureApi.addListAnnex({ annexPos: res }).then((res1) => {
// if (res1.code === 200) {
// uni.showToast({
// title: "",
// icon: "success",
// });
// }
// });
// }
// });
if (model1.order.buttonType === 0) {
model1.order.buckleMiscellaneous = model1.order.subtractNum;
} else if (model1.order.buttonType === 1) {
@ -340,10 +347,11 @@ const save = () => {
}
ReceiveApi.addOrderIn(model1.order).then((res) => {
if (res.code === 200) {
model1.order.id = (res.data as any).id
// uni.navigateTo({
// url: "/pages/index/index", //
// });
model1.order.id = res.data;
upload();
uni.navigateTo({
url: "/pages/index/index", //
});
}
});
};

View File

@ -91,7 +91,15 @@
</view>
</template>
<script setup lang="ts">
import { DeviceApi, GoodsApi, PictureApi, ProfileApi, ReceiveApi, ReceiveProductApi, ShipmentApi } from "@/services";
import {
DeviceApi,
GoodsApi,
PictureApi,
ProfileApi,
ReceiveApi,
ReceiveProductApi,
ShipmentApi,
} from "@/services";
import { formatDate } from "@/utils";
import { DeviceType, ImagesType, OrderType } from "@/utils/enum";
import _ from "underscore";
@ -153,7 +161,7 @@ const formAttrList = reactive<any>([
name: "过磅设备",
key: "deviceName",
type: "select",
childKey: 'device',
childKey: "device",
required: true,
unit: "",
fn: () => {
@ -165,7 +173,7 @@ const formAttrList = reactive<any>([
name: "客户",
key: "userName",
type: "select",
childKey: 'user',
childKey: "user",
required: true,
unit: "",
fn: () => {
@ -177,7 +185,7 @@ const formAttrList = reactive<any>([
name: "出货产品",
key: "productName",
type: "select",
childKey: 'product',
childKey: "product",
required: true,
unit: "",
fn: () => {
@ -297,7 +305,7 @@ const handleUpload = () => {
const handleSelect = (key: string, v: any) => {
contrlModalParams[key].isShow = false;
if (key === "user") {
debugger
debugger;
model1.order.userName = v.name;
model1.order.userId = v.id;
} else if (key === "product") {
@ -312,7 +320,7 @@ const handleSelect = (key: string, v: any) => {
ProfileApi.getUserList({ userType: 3 }).then((res) => {
if (res.code === 200) {
contrlModalParams.user.list = res.data;
console.log(contrlModalParams.user.list)
console.log(contrlModalParams.user.list);
}
});
//
@ -327,7 +335,7 @@ GoodsApi.getShipmentProductList().then((res) => {
}
});
//
DeviceApi.getDeviceList({deviceType: DeviceType.Weighbridge}).then(res => {
DeviceApi.getDeviceList({ deviceType: DeviceType.Weighbridge }).then((res) => {
if (res.code === 200) {
contrlModalParams.device.list = _.map(
res.data as any,
@ -336,22 +344,23 @@ DeviceApi.getDeviceList({deviceType: DeviceType.Weighbridge}).then(res => {
}
);
}
})
});
const upload = () => {
Promise.all(handleUpload()).then((res) => {
//
if (res.length > 0) {
PictureApi.addListAnnex({ annexPos: res }).then((res1) => {
if (res1.code === 200) {
uni.showToast({
title: "图片资源上传成功",
icon: "success",
});
}
});
}
});
};
const save = () => {
// Promise.all(handleUpload()).then((res) => {
// //
// if (res.length > 0) {
// PictureApi.addListAnnex({ annexPos: res }).then((res1) => {
// if (res1.code === 200) {
// uni.showToast({
// title: "",
// icon: "success",
// });
// }
// });
// }
// });
if (model1.order.buttonType === 0) {
model1.order.buckleMiscellaneous = model1.order.subtractNum;
} else if (model1.order.buttonType === 1) {
@ -359,7 +368,8 @@ const save = () => {
}
ShipmentApi.addOrderOut(model1.order).then((res) => {
if (res.code === 200) {
model1.order.id = (res.data as any).id
model1.order.id = res.data;
upload();
uni.navigateTo({
url: "/pages/index/index", //
});

View File

@ -90,9 +90,9 @@
<u-grid :border="false" col="4">
<u-grid-item v-for="(item, listIndex) in appList" :key="listIndex" @click="item.fn">
<up-image
:src="`/static/img/${item.icon}`"
width="40rpx"
height="40rpx"
:src="`/pagesHome/static/${item.icon}`"
width="60rpx"
height="60rpx"
></up-image>
<text class="grid-text">{{ item.title }}</text>
</u-grid-item>
@ -285,7 +285,7 @@ const shipmentList = reactive([
const appList = reactive([
{
icon: "app1.png",
icon: "01.png",
title: "收货补单",
fn: () => {
uni.navigateTo({
@ -294,7 +294,7 @@ const appList = reactive([
},
},
{
icon: "app2.png",
icon: "02.png",
title: "出货补单",
fn: () => {
uni.navigateTo({
@ -303,7 +303,7 @@ const appList = reactive([
},
},
{
icon: "app4.png",
icon: "03.png",
title: "收货明细",
fn: () => {
uni.navigateTo({
@ -312,7 +312,7 @@ const appList = reactive([
},
},
{
icon: "app3.png",
icon: "04.png",
title: "出货明细",
fn: () => {
uni.navigateTo({
@ -321,7 +321,7 @@ const appList = reactive([
},
},
{
icon: "app5.png",
icon: "05.png",
title: "收货作废",
fn: () => {
uni.navigateTo({
@ -330,7 +330,7 @@ const appList = reactive([
},
},
{
icon: "app6.png",
icon: "06.png",
title: "出货作废",
fn: () => {
uni.navigateTo({
@ -339,7 +339,7 @@ const appList = reactive([
},
},
{
icon: "app7.png",
icon: "07.png",
title: "供应商管理",
fn: () => {
uni.navigateTo({
@ -348,7 +348,7 @@ const appList = reactive([
},
},
{
icon: "app8.png",
icon: "08.png",
title: "客户管理",
fn: () => {
uni.navigateTo({
@ -357,7 +357,7 @@ const appList = reactive([
},
},
{
icon: "app1.png",
icon: "09.png",
title: "收货产品",
fn: () => {
// uni.navigateTo({
@ -366,7 +366,7 @@ const appList = reactive([
},
},
{
icon: "app2.png",
icon: "10.png",
title: "收货分类",
fn: () => {
// uni.navigateTo({
@ -375,7 +375,7 @@ const appList = reactive([
},
},
{
icon: "app4.png",
icon: "11.png",
title: "出货产品",
fn: () => {
// uni.navigateTo({
@ -384,7 +384,7 @@ const appList = reactive([
},
},
{
icon: "app3.png",
icon: "12.png",
title: "支付明细",
fn: () => {
// uni.navigateTo({
@ -393,7 +393,7 @@ const appList = reactive([
},
},
{
icon: "app5.png",
icon: "13.png",
title: "收入明细",
fn: () => {
// uni.navigateTo({
@ -402,7 +402,7 @@ const appList = reactive([
},
},
{
icon: "app6.png",
icon: "14.png",
title: "人员管理",
fn: () => {
// uni.navigateTo({
@ -411,7 +411,7 @@ const appList = reactive([
},
},
{
icon: "app7.png",
icon: "15.png",
title: "权限管理",
fn: () => {
// uni.navigateTo({
@ -420,7 +420,7 @@ const appList = reactive([
},
},
{
icon: "app8.png",
icon: "16.png",
title: "库存卡管理",
fn: () => {
// uni.navigateTo({

BIN
src/pagesHome/static/01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
src/pagesHome/static/02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
src/pagesHome/static/03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
src/pagesHome/static/04.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
src/pagesHome/static/05.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
src/pagesHome/static/06.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
src/pagesHome/static/07.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
src/pagesHome/static/08.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
src/pagesHome/static/09.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
src/pagesHome/static/10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
src/pagesHome/static/11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

BIN
src/pagesHome/static/12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
src/pagesHome/static/13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
src/pagesHome/static/14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
src/pagesHome/static/15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
src/pagesHome/static/16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -409,7 +409,7 @@ const save = () => {
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
border-radius: 13rpx 13rpx 0rpx 0rpx;
padding: 25rpx 50rpx;
position: sticky;
position: fixed;
bottom: 0rpx;
z-index: 999;
::v-deep button {

View File

@ -265,7 +265,7 @@ onLoad((option) => {
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
border-radius: 13rpx 13rpx 0rpx 0rpx;
padding: 25rpx 50rpx;
position: absolute;
position: fixed;
bottom: 0rpx;
width: calc(100vw - 100rpx);
::v-deep button {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -33,7 +33,7 @@ export enum ScaleStatus {
ToBePriced = 0,
ToBeTare = 1,
ToBeReview = 2,
ToBePay = 2,
ToBePay = 3,
Paid = 4,
ToBeShipment = 0,
ToBeGrossWeight = 1,