update: 版本迭代
|
@ -104,7 +104,7 @@ const gridList2 = reactive([
|
||||||
isBefore: false,
|
isBefore: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "货款金额",
|
name: "实际付款",
|
||||||
enName: "totalPrice",
|
enName: "totalPrice",
|
||||||
num: "",
|
num: "",
|
||||||
unit: "元",
|
unit: "元",
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
:text="'暂无相关权限, 请联系管理员'"
|
:text="'暂无相关权限, 请联系管理员'"
|
||||||
>
|
>
|
||||||
</up-empty>
|
</up-empty>
|
||||||
<TabBar></TabBar>
|
<TabBar :select="'统计'"></TabBar>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Box from "@/components/Box/index.vue";
|
import Box from "@/components/Box/index.vue";
|
||||||
|
|
|
@ -87,7 +87,7 @@ const gridList1 = reactive<any>([
|
||||||
isBefore: false,
|
isBefore: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "货款金额",
|
name: "实际付款",
|
||||||
enName: "balanceTotalPrice",
|
enName: "balanceTotalPrice",
|
||||||
num: "",
|
num: "",
|
||||||
unit: "元",
|
unit: "元",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<u-popup :show="show" mode="right" :closeable="true" @close="handleClose">
|
<u-popup :show="show" mode="bottom" :round="10" :closeable="true" @close="handleClose">
|
||||||
<view class="c-dialog-filter">
|
<view class="c-dialog-filter">
|
||||||
<view class="title">{{ isShipment ? "出货" : "收货" }}产品</view>
|
<view class="title">{{ isShipment ? "出货" : "收货" }}产品</view>
|
||||||
<view class="dialog-product-layout">
|
<view class="dialog-product-layout">
|
|
@ -0,0 +1,242 @@
|
||||||
|
<template>
|
||||||
|
<u-popup :show="show" mode="right" :closeable="true" @close="handleClose">
|
||||||
|
<view class="c-dialog-filter">
|
||||||
|
<view class="title">{{isShipment? '客户' : '供应商'}}筛选</view>
|
||||||
|
<view class="search">
|
||||||
|
<u-search
|
||||||
|
:placeholder="`请输入${isShipment? '客户' : '供应商'}名称 / 卡号搜索`"
|
||||||
|
v-model="keyword"
|
||||||
|
@search="handleSearch()"
|
||||||
|
@clear="handleSearch()"
|
||||||
|
></u-search>
|
||||||
|
</view>
|
||||||
|
<view class="dialog-product-layout">
|
||||||
|
<!-- 自定义索引列表 -->
|
||||||
|
<view class="address-book-container">
|
||||||
|
<!-- 左侧通讯录 -->
|
||||||
|
<scroll-view
|
||||||
|
class="scroll-container"
|
||||||
|
:scroll-y="true"
|
||||||
|
:scroll-into-view="toView"
|
||||||
|
:scroll-with-animation="true"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
class="address-book"
|
||||||
|
v-for="(item, index) in addressBook"
|
||||||
|
:key="index"
|
||||||
|
:id="item.name"
|
||||||
|
>
|
||||||
|
<view class="address-book-index">{{ item.name }}</view>
|
||||||
|
<view
|
||||||
|
class="contact-container"
|
||||||
|
v-for="(cItem, index) in item.list"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<!-- <img
|
||||||
|
class="contact-img"
|
||||||
|
src="http://www.lixia.gov.cn/picture/0/s_97b76c734a6f40f8abba95615cbff1e1.jpg"
|
||||||
|
alt=""
|
||||||
|
/> -->
|
||||||
|
<view
|
||||||
|
class="contact-detail-container"
|
||||||
|
@click="handleClick(cItem)"
|
||||||
|
>
|
||||||
|
<view class="contact-name">{{ cItem.name }}</view>
|
||||||
|
<view class="contact-address">{{ cItem.cardCode }}</view>
|
||||||
|
<!-- <view class="contact-phone">{{ item.phone }}</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
<!-- 右侧字母导航条 -->
|
||||||
|
<view class="letter-nav">
|
||||||
|
<view
|
||||||
|
class="item"
|
||||||
|
:class="{ active: toView === item }"
|
||||||
|
v-for="(item, index) in indexList"
|
||||||
|
:key="index"
|
||||||
|
@click="toSelectIndex(item)"
|
||||||
|
>{{ item }}</view
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { CustomerApi, SupplierApi } from "@/services";
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
show: boolean;
|
||||||
|
isShipment: boolean;
|
||||||
|
}>();
|
||||||
|
const emit = defineEmits(["handleDialog", "changeUser"]);
|
||||||
|
const handleClose = () => {
|
||||||
|
emit("handleDialog", false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const keyword = ref("");
|
||||||
|
|
||||||
|
const indexList = [
|
||||||
|
"A",
|
||||||
|
"B",
|
||||||
|
"C",
|
||||||
|
"D",
|
||||||
|
"E",
|
||||||
|
"F",
|
||||||
|
"G",
|
||||||
|
"H",
|
||||||
|
"I",
|
||||||
|
"J",
|
||||||
|
"K",
|
||||||
|
"L",
|
||||||
|
"M",
|
||||||
|
"N",
|
||||||
|
"O",
|
||||||
|
"P",
|
||||||
|
"Q",
|
||||||
|
"R",
|
||||||
|
"S",
|
||||||
|
"T",
|
||||||
|
"U",
|
||||||
|
"V",
|
||||||
|
"W",
|
||||||
|
"X",
|
||||||
|
"Y",
|
||||||
|
"Z",
|
||||||
|
"#",
|
||||||
|
];
|
||||||
|
const toView = ref("");
|
||||||
|
const addressBook = ref();
|
||||||
|
// [
|
||||||
|
// {
|
||||||
|
// id: "A",
|
||||||
|
// data: [
|
||||||
|
// {
|
||||||
|
// zh_title: "阿联酋迪拉姆",
|
||||||
|
// en_title: "aa",
|
||||||
|
// address: "910289591",
|
||||||
|
// phone: "111111",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// zh_title: "阿尔巴尼亚列克",
|
||||||
|
// en_title: "aaaaa",
|
||||||
|
// address: "ALL",
|
||||||
|
// phone: "222222",
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// }
|
||||||
|
// ];
|
||||||
|
|
||||||
|
const toSelectIndex = (item: any) => {
|
||||||
|
toView.value = item;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleClick = (item: any) => {
|
||||||
|
emit("changeUser", item);
|
||||||
|
emit("handleDialog", false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSearch = () => {
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
const getList = () => {
|
||||||
|
if (props.isShipment) {
|
||||||
|
CustomerApi.getCustomUserListLettera({ name: keyword.value }).then(
|
||||||
|
(res: any) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
addressBook.value = res.data.reduce((pre: any, curr: any) => {
|
||||||
|
if (curr.list.length > 0) {
|
||||||
|
pre.push(curr);
|
||||||
|
}
|
||||||
|
return pre;
|
||||||
|
}, []);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
SupplierApi.getSupplierUserListLettera({ name: keyword.value }).then(
|
||||||
|
(res: any) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
addressBook.value = res.data.reduce((pre: any, curr: any) => {
|
||||||
|
if (curr.list.length > 0) {
|
||||||
|
pre.push(curr);
|
||||||
|
}
|
||||||
|
return pre;
|
||||||
|
}, []);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.isShipment,
|
||||||
|
(newValue, oldValue) => {
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.c-dialog-filter {
|
||||||
|
width: 95vw;
|
||||||
|
padding: 25rpx;
|
||||||
|
.title {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #000000;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.search {
|
||||||
|
margin: 30rpx 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.dialog-product-layout {
|
||||||
|
height: 80vh;
|
||||||
|
.address-book-container {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.address-book-index {
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
.contact-img {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
.scroll-container {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.letter-nav {
|
||||||
|
position: fixed;
|
||||||
|
right: 25rpx;
|
||||||
|
top: 100px;
|
||||||
|
font-size: 22rpx;
|
||||||
|
text-align: center;
|
||||||
|
.item:hover,
|
||||||
|
.active {
|
||||||
|
color: $u-primary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.contact-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 2%;
|
||||||
|
}
|
||||||
|
.contact-detail-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 80%;
|
||||||
|
font-size: 22rpx;
|
||||||
|
.contact-address {
|
||||||
|
color: rgba(0, 0, 0, 0.65);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,169 @@
|
||||||
|
<template>
|
||||||
|
<u-popup
|
||||||
|
:show="show"
|
||||||
|
mode="bottom"
|
||||||
|
:round="10"
|
||||||
|
:closeable="true"
|
||||||
|
@close="handleClose"
|
||||||
|
>
|
||||||
|
<view class="c-dialog">
|
||||||
|
<view class="box"><text>常用时间选择</text></view>
|
||||||
|
<view class="box-btn">
|
||||||
|
<text
|
||||||
|
v-for="(item, index) in state.statusList"
|
||||||
|
:key="index"
|
||||||
|
:class="{ active: state.currentStates === item.id }"
|
||||||
|
@click="handleSelect(item)"
|
||||||
|
>{{ item.name }}</text
|
||||||
|
></view
|
||||||
|
>
|
||||||
|
<view class="box box-border"
|
||||||
|
><text>其它时间选择</text
|
||||||
|
><text class="btn" @click="handleCustom()">自定义</text></view
|
||||||
|
>
|
||||||
|
|
||||||
|
<view v-if="showCalendar">
|
||||||
|
<view class="line"></view>
|
||||||
|
<view class="box">
|
||||||
|
<text @click="showCalendar = false">取消</text>
|
||||||
|
<text class="btn" @click="confirm()">完成</text>
|
||||||
|
</view>
|
||||||
|
<view>{{ state.startTime }} - {{ state.endTime }}</view>
|
||||||
|
<uni-calendar
|
||||||
|
:insert="true"
|
||||||
|
:lunar="true"
|
||||||
|
:start-date="'2014-1-1'"
|
||||||
|
:end-date="'2034-1-1'"
|
||||||
|
:range="true"
|
||||||
|
@change="handleChangeDate"
|
||||||
|
color="#00D2E3"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { formatDate, getCurrentMonthStartAndEnd, getCurrentYearStartAndEnd, timeRange } from "@/utils";
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
show: boolean;
|
||||||
|
}>();
|
||||||
|
const state = reactive<any>({
|
||||||
|
startTime: "",
|
||||||
|
endTime: "",
|
||||||
|
currentStates: -1,
|
||||||
|
statusList: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "今日",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "昨日",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "本月",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
name: "本年",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
const emit = defineEmits(["handleDialog", "changeTime"]);
|
||||||
|
const handleClose = () => {
|
||||||
|
emit("handleDialog", false);
|
||||||
|
};
|
||||||
|
const handleCustom = () => {
|
||||||
|
showCalendar.value = true
|
||||||
|
state.currentStates = -1
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSelect = (item: any) => {
|
||||||
|
|
||||||
|
state.currentStates = item.id;
|
||||||
|
const range = timeRange(item.id)
|
||||||
|
state.startTime = range.startTime;
|
||||||
|
state.endTime = range.endTime
|
||||||
|
|
||||||
|
emit("changeTime", {startTime: state.startTime, endTime: state.endTime, name: item.name});
|
||||||
|
emit("handleDialog", false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const showCalendar = ref(false);
|
||||||
|
const handleChangeDate = (v: any) => {
|
||||||
|
const time1 = v.range.before;
|
||||||
|
const time2 = v.range.after;
|
||||||
|
if (time1 && time2) {
|
||||||
|
const date1 = new Date(time1);
|
||||||
|
const date2 = new Date(time2);
|
||||||
|
if (date1 < date2) {
|
||||||
|
state.startTime = formatDate(time1, "{y}-{m}-{d}");
|
||||||
|
state.endTime = formatDate(time2, "{y}-{m}-{d}");
|
||||||
|
} else if (date1 > date2) {
|
||||||
|
state.startTime = formatDate(time2, "{y}-{m}-{d}");
|
||||||
|
state.endTime = formatDate(time1, "{y}-{m}-{d}");
|
||||||
|
} else {
|
||||||
|
state.startTime = formatDate(time1, "{y}-{m}-{d}");
|
||||||
|
state.endTime = formatDate(time2, "{y}-{m}-{d}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const confirm = () => {
|
||||||
|
showCalendar.value = false
|
||||||
|
emit("changeTime", {startTime: state.startTime, endTime: state.endTime, name: '自定义'});
|
||||||
|
emit("handleDialog", false);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .u-popup__content {
|
||||||
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
||||||
|
border-radius: 32rpx 32rpx 0rpx 0rpx;
|
||||||
|
}
|
||||||
|
.c-dialog {
|
||||||
|
margin: 65.38rpx 44.87rpx;
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #000000;
|
||||||
|
.box-btn,
|
||||||
|
.box {
|
||||||
|
line-height: 80rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.box-btn {
|
||||||
|
line-height: 40rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
text {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999999;
|
||||||
|
width: 140rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
border: 1px solid rgba(153, 153, 153, 0.64);
|
||||||
|
text-align: center;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.active {
|
||||||
|
border-color: $u-primary;
|
||||||
|
color: $u-primary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: $u-primary;
|
||||||
|
}
|
||||||
|
.box-border {
|
||||||
|
border-top: 1px solid rgba(233, 233, 233, 0.76);
|
||||||
|
}
|
||||||
|
.line {
|
||||||
|
height: 18rpx;
|
||||||
|
background: #f8f8f8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,52 @@
|
||||||
|
<template>
|
||||||
|
<up-row customStyle="flex-wrap: wrap">
|
||||||
|
<up-col span="6" v-for="(item, index) in list" :key="index">
|
||||||
|
<view class="grid-item">
|
||||||
|
<up-image
|
||||||
|
:src="item.url"
|
||||||
|
:mode="'widthFix'"
|
||||||
|
:width="'100%'"
|
||||||
|
@click="showImage(index)"
|
||||||
|
></up-image>
|
||||||
|
</view>
|
||||||
|
</up-col>
|
||||||
|
</up-row>
|
||||||
|
|
||||||
|
<view v-if="list.length === 0" style="justify-content: center">
|
||||||
|
<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
||||||
|
</u-empty>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { PictureApi } from "@/services";
|
||||||
|
const props = defineProps<{
|
||||||
|
params: Object;
|
||||||
|
}>();
|
||||||
|
let list: any = ref([]);
|
||||||
|
const showImage = (index: number) => {
|
||||||
|
uni.previewImage({
|
||||||
|
urls: list.value.map((item: any) => item.url), // 图片列表
|
||||||
|
current: index, // 当前显示图片的索引
|
||||||
|
indicator: "default", // 图片指示器样式,默认为圆点
|
||||||
|
loop: true,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
if (props.params) {
|
||||||
|
PictureApi.getAnnex(props.params as any).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
console.log(props.params);
|
||||||
|
list.value = res.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.grid-item {
|
||||||
|
position: relative;
|
||||||
|
image {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -1,153 +1,107 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 工作台底部菜单 -->
|
<!-- 工作台底部菜单 -->
|
||||||
<uni-transition mode-class="fade" :duration="100" :show="true">
|
<uni-transition mode-class="fade" :duration="100" :show="true">
|
||||||
<view>
|
<up-tabbar
|
||||||
<view class="tabBar">
|
:value="select"
|
||||||
<view class="tabMenuBox">
|
:fixed="true"
|
||||||
<view class="circle-box"></view>
|
:placeholder="true"
|
||||||
<u-grid :border="false">
|
:safeAreaInsetBottom="true"
|
||||||
<u-grid-item
|
activeColor="#00DCEE"
|
||||||
v-for="(item, listIndex) in tabMenuList"
|
:border="false"
|
||||||
:key="listIndex"
|
>
|
||||||
@click="item.fn"
|
<up-tabbar-item
|
||||||
>
|
v-if="state.list.length > 0"
|
||||||
<up-image
|
v-for="item in state.list"
|
||||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/TabMenu/${
|
:key="item.text"
|
||||||
item.icon
|
:text="item.text"
|
||||||
}${
|
@click="handleClick(item)"
|
||||||
listIndex !== 1 && currentIndex === listIndex ? '1' : ''
|
:name="item.text"
|
||||||
}.png`"
|
>
|
||||||
width="33rpx"
|
<template #active-icon>
|
||||||
height="40rpx"
|
<image
|
||||||
mode="aspectFill"
|
:src="`/static/img/tabBar/${item.activeIcon}`"
|
||||||
class="grid-icon"
|
class="custom-img"
|
||||||
></up-image>
|
></image>
|
||||||
<text
|
</template>
|
||||||
class="grid-text"
|
<template #inactive-icon>
|
||||||
:class="{ active: currentIndex === listIndex }"
|
<image
|
||||||
:style="{ color: listIndex === 1 ? '#fff' : '' }"
|
:src="`/static/img/tabBar/${item.icon}`"
|
||||||
>{{ item.title }}</text
|
class="custom-img"
|
||||||
>
|
></image>
|
||||||
</u-grid-item>
|
</template>
|
||||||
</u-grid>
|
</up-tabbar-item>
|
||||||
</view>
|
</up-tabbar>
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</uni-transition>
|
</uni-transition>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLaunch } from "@dcloudio/uni-app";
|
||||||
|
const props = withDefaults(
|
||||||
const tabMenuList = reactive([
|
defineProps<{
|
||||||
|
select: string;
|
||||||
|
}>(),
|
||||||
{
|
{
|
||||||
icon: "statistics",
|
select: "工作台",
|
||||||
title: "统计",
|
}
|
||||||
fn: () => {
|
);
|
||||||
const pages: any = getCurrentPages();
|
type tabBar = {
|
||||||
if (
|
text: string;
|
||||||
[
|
icon: string;
|
||||||
"pagesStatistics/index",
|
activeIcon: string;
|
||||||
"pagesHome/index",
|
path: string;
|
||||||
"pagesLogin/profile/index",
|
};
|
||||||
].indexOf(pages[pages.length - 1].route) === 0
|
const state = reactive({
|
||||||
) {
|
list: [
|
||||||
return;
|
{
|
||||||
}
|
text: "工作台",
|
||||||
uni.redirectTo({
|
icon: "home.png",
|
||||||
url: "/pagesStatistics/index", // 要跳转到的页面路径
|
activeIcon: "home_active.png",
|
||||||
});
|
path: "/pagesHome/index",
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
{
|
text: "统计",
|
||||||
icon: "home",
|
icon: "count.png",
|
||||||
title: "工作台",
|
activeIcon: "count_active.png",
|
||||||
fn: () => {
|
path: "/pagesStatistics/index",
|
||||||
const pages: any = getCurrentPages();
|
|
||||||
if (
|
|
||||||
[
|
|
||||||
"pagesStatistics/index",
|
|
||||||
"pagesHome/index",
|
|
||||||
"pagesLogin/profile/index",
|
|
||||||
].indexOf(pages[pages.length - 1].route) === 1
|
|
||||||
) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
uni.redirectTo({
|
|
||||||
url: "/pagesHome/index", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
{
|
text: "配置",
|
||||||
icon: "profile",
|
icon: "config.png",
|
||||||
title: "我的",
|
activeIcon: "config_active.png",
|
||||||
fn: () => {
|
path: "/pagesHome/index1",
|
||||||
const pages: any = getCurrentPages();
|
|
||||||
if (
|
|
||||||
[
|
|
||||||
"pagesStatistics/index",
|
|
||||||
"pagesHome/index",
|
|
||||||
"pagesLogin/profile/index",
|
|
||||||
].indexOf(pages[pages.length - 1].route) === 2
|
|
||||||
) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
uni.redirectTo({
|
|
||||||
url: "/pagesLogin/profile/index", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
},
|
{
|
||||||
]);
|
text: "我的",
|
||||||
|
icon: "profile.png",
|
||||||
|
activeIcon: "profile_active.png",
|
||||||
|
path: "/pagesLogin/profile/index",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
const handleClick = (item: tabBar) => {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: item.path, // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const currentIndex = ref(1);
|
onLaunch(() => {
|
||||||
|
//隐藏官方的tabBar
|
||||||
onLoad(() => {
|
uni.hideTabBar();
|
||||||
const pages: any = getCurrentPages();
|
|
||||||
currentIndex.value = [
|
|
||||||
"pagesStatistics/index",
|
|
||||||
"pagesHome/index",
|
|
||||||
"pagesLogin/profile/index",
|
|
||||||
].indexOf(pages[pages.length - 1].route);
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.tabBar {
|
.custom-img {
|
||||||
background: url("https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/TabMenu/bg.png");
|
width: 35rpx;
|
||||||
height: 140rpx;
|
height: 35rpx;
|
||||||
background-size: cover;
|
}
|
||||||
position: fixed;
|
.u-tabbar {
|
||||||
width: 100%;
|
background: #ffffff;
|
||||||
bottom: 0px;
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
.tabMenuBox {
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding-top: 30rpx;
|
}
|
||||||
font-size: 26rpx;
|
::v-deep.u-tabbar__content {
|
||||||
font-weight: 400;
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
color: #999999;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
.grid-text {
|
|
||||||
margin-top: 10rpx;
|
|
||||||
}
|
|
||||||
.circle-box {
|
|
||||||
width: 154rpx;
|
|
||||||
height: 154rpx;
|
|
||||||
background: linear-gradient(0deg, #1992ef, #00f6ff);
|
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 50, 100, 0.12);
|
|
||||||
border-radius: 50%;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #ffffff;
|
|
||||||
position: absolute;
|
|
||||||
margin-top: -49rpx;
|
|
||||||
margin-left: calc(50% - 78rpx);
|
|
||||||
}
|
|
||||||
.normal-box {
|
|
||||||
width: 150rpx;
|
|
||||||
height: 150rpx;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.active {
|
|
||||||
color: rgba(0, 220, 238, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -18,6 +18,13 @@
|
||||||
"navigationStyle": "custom", // 控制头部是否显示
|
"navigationStyle": "custom", // 控制头部是否显示
|
||||||
"navigationBarTitleText": "工作台"
|
"navigationBarTitleText": "工作台"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pagesHome/index1",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom", // 控制头部是否显示
|
||||||
|
"navigationBarTitleText": "工作台"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||||
],
|
],
|
||||||
|
@ -60,7 +67,6 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"navigationBarTitleText": "个人中心"
|
"navigationBarTitleText": "个人中心"
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -106,6 +112,12 @@
|
||||||
"navigationBarTitleText": "付款审核"
|
"navigationBarTitleText": "付款审核"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "payList",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "已付款"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "form/pricingForm",
|
"path": "form/pricingForm",
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -453,6 +465,27 @@
|
||||||
// ]
|
// ]
|
||||||
// }
|
// }
|
||||||
],
|
],
|
||||||
|
"tabbar": {
|
||||||
|
"custom": true, //隐藏官方选项卡
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"pagePath": "pagesHome/index",
|
||||||
|
"text": "工作台"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pagesStatistics/index",
|
||||||
|
"text": "统计"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pagesHome/index",
|
||||||
|
"text": "配置"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pagesLogin/profile/index",
|
||||||
|
"text": "我的"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
"navigationBarTitleText": "智能回收",
|
"navigationBarTitleText": "智能回收",
|
||||||
|
|
|
@ -162,7 +162,7 @@ const changeProduct = (obj: any) => {
|
||||||
model1.order.maxPrice = obj.maxPrice;
|
model1.order.maxPrice = obj.maxPrice;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 毛重 皮重 杂质扣除校验 净重 单价 预估总价 货款金额
|
// 毛重 皮重 杂质扣除校验 净重 单价 预估总价 实际付款
|
||||||
const handleInput = (e: any, item: any) => {
|
const handleInput = (e: any, item: any) => {
|
||||||
if (
|
if (
|
||||||
["grossWeight", "tare", "price", "balanceTotalPrice"].indexOf(item.key) > -1
|
["grossWeight", "tare", "price", "balanceTotalPrice"].indexOf(item.key) > -1
|
||||||
|
@ -275,7 +275,7 @@ const rules = reactive({
|
||||||
"order.balanceTotalPrice": {
|
"order.balanceTotalPrice": {
|
||||||
type: "number",
|
type: "number",
|
||||||
required: true,
|
required: true,
|
||||||
message: "货款金额为空或输入错误",
|
message: "实际付款为空或输入错误",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -403,7 +403,7 @@ const formAttrList = reactive<any>([
|
||||||
disabled: true,
|
disabled: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "货款金额",
|
name: "实际付款",
|
||||||
key: "balanceTotalPrice",
|
key: "balanceTotalPrice",
|
||||||
type: "input",
|
type: "input",
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -450,7 +450,7 @@ watch(
|
||||||
}
|
}
|
||||||
model1.order.totalPrice =
|
model1.order.totalPrice =
|
||||||
Math.floor((model1.order.price || 0) * (model1.order.netWeight || 0)) ;
|
Math.floor((model1.order.price || 0) * (model1.order.netWeight || 0)) ;
|
||||||
// 货款金额默认=预估总价,当系统自动算出预估总价时,值需同步
|
// 实际付款默认=预估总价,当系统自动算出预估总价时,值需同步
|
||||||
model1.order.balanceTotalPrice = model1.order.totalPrice;
|
model1.order.balanceTotalPrice = model1.order.totalPrice;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,80 +0,0 @@
|
||||||
|
|
||||||
<template>
|
|
||||||
<view class="carousel">
|
|
||||||
<swiper
|
|
||||||
:circular="true"
|
|
||||||
:autoplay="true"
|
|
||||||
:interval="3000"
|
|
||||||
@change="onChange"
|
|
||||||
>
|
|
||||||
<swiper-item v-for="item in list" :key="item.id">
|
|
||||||
<navigator :url="item.herfUrl" hover-class="none" class="navigator">
|
|
||||||
<image mode="aspectFill" class="image" :src="item.imgUrl"></image>
|
|
||||||
</navigator>
|
|
||||||
</swiper-item>
|
|
||||||
</swiper>
|
|
||||||
<!-- 指示点 -->
|
|
||||||
<view class="indicator">
|
|
||||||
<text
|
|
||||||
v-for="(item, index) in list"
|
|
||||||
:key="item.id"
|
|
||||||
class="dot"
|
|
||||||
:class="{ active: index === activeIndex }"
|
|
||||||
></text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import type { BannerItem } from '@/types/home';
|
|
||||||
|
|
||||||
const activeIndex = ref(0)
|
|
||||||
const onChange: UniHelper.SwiperOnChange = (ev) => {
|
|
||||||
activeIndex.value = ev.detail.current
|
|
||||||
}
|
|
||||||
const props = defineProps<{
|
|
||||||
list: BannerItem[],
|
|
||||||
}>()
|
|
||||||
</script>
|
|
||||||
<style lang="scss">
|
|
||||||
:host {
|
|
||||||
display: block;
|
|
||||||
height: 280rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 轮播图 */
|
|
||||||
.carousel {
|
|
||||||
// height: 100%;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
transform: translateY(0);
|
|
||||||
background-color: #efefef;
|
|
||||||
|
|
||||||
.indicator {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 16rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
.dot {
|
|
||||||
width: 30rpx;
|
|
||||||
height: 6rpx;
|
|
||||||
margin: 0 8rpx;
|
|
||||||
border-radius: 6rpx;
|
|
||||||
background-color: rgba(255, 255, 255, 0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.active {
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.navigator,
|
|
||||||
.image {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -8,13 +8,21 @@
|
||||||
height: navbarRect.safeHeight + 'px',
|
height: navbarRect.safeHeight + 'px',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
<!-- 筛选条件 -->
|
||||||
|
<view class="time-filter">
|
||||||
|
<up-text
|
||||||
|
v-for="item in timeList"
|
||||||
|
:key="item.id"
|
||||||
|
:text="item.name"
|
||||||
|
:color="`${
|
||||||
|
stateNew.filterTimeValue === item.name ? '#00DCEE' : '#999999'
|
||||||
|
}`"
|
||||||
|
:size="'32rpx'"
|
||||||
|
@click="handleFilter(item)"
|
||||||
|
></up-text>
|
||||||
|
</view>
|
||||||
<!-- 数据汇总面板 -->
|
<!-- 数据汇总面板 -->
|
||||||
<!-- `url('/static/img/${item.imgUrl}')`, -->
|
|
||||||
<view class="summary">
|
<view class="summary">
|
||||||
<!-- :style="{
|
|
||||||
'background': 'url(\'/static/img/'+ item.imgUrl +'\')',
|
|
||||||
backgroundSize: 'cover',
|
|
||||||
}" -->
|
|
||||||
<view class="panel" v-for="(item, index) in summaryList" :key="index">
|
<view class="panel" v-for="(item, index) in summaryList" :key="index">
|
||||||
<image
|
<image
|
||||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/${item.imgUrl}`"
|
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/${item.imgUrl}`"
|
||||||
|
@ -25,121 +33,55 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 其他核心模块 -->
|
||||||
<view class="data-detail">
|
<view class="core-content">
|
||||||
<view
|
<view>
|
||||||
class="p-15"
|
<text class="title">收货入库</text>
|
||||||
v-if="isShowModule(receiveList) || isShowModule(shipmentList)"
|
<up-grid :border="false">
|
||||||
>
|
<up-grid-item
|
||||||
<!-- 收货入库 -->
|
v-for="(item, index) in stateNew.receiveList"
|
||||||
<view v-if="isShowModule(receiveList)">
|
:key="index"
|
||||||
<text class="title">收货入库</text>
|
@click="handleClick(item)"
|
||||||
<view class="data-receive">
|
|
||||||
<up-row justify="flex-start" gutter="10">
|
|
||||||
<up-col
|
|
||||||
span="3"
|
|
||||||
v-for="(item, index) in receiveList"
|
|
||||||
:key="index"
|
|
||||||
@click="(item as any).fn()"
|
|
||||||
:customStyle="{
|
|
||||||
display: isShowModule([{ title: item.title }]) ? '' : 'none',
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<view
|
|
||||||
v-if="isShowModule([{ title: item.title }])"
|
|
||||||
class="box"
|
|
||||||
:style="{
|
|
||||||
backgroundColor: boxStyleList[index].backgroundColor,
|
|
||||||
borderColor: boxStyleList[index].borderColor,
|
|
||||||
boxShadow: `0rpx 7rpx 12rpx 0rpx ${boxStyleList[index].shadowColor}`,
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<view
|
|
||||||
class="num"
|
|
||||||
:style="{ color: boxStyleList[index].numColor }"
|
|
||||||
>
|
|
||||||
<text>{{ item.num }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="desc">
|
|
||||||
<text>{{ item.title }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</up-col>
|
|
||||||
</up-row>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 出货入库 -->
|
|
||||||
<view v-if="isShowModule(shipmentList)">
|
|
||||||
<text class="title title-shipment">出货销售</text>
|
|
||||||
<view class="data-shipment">
|
|
||||||
<up-row justify="flex-start" gutter="10">
|
|
||||||
<up-col
|
|
||||||
span="3"
|
|
||||||
v-for="(item, index) in shipmentList"
|
|
||||||
:key="index"
|
|
||||||
@click="(item as any).fn()"
|
|
||||||
:customStyle="{
|
|
||||||
display: isShowModule([{ title: item.title }]) ? '' : 'none',
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<view
|
|
||||||
v-if="isShowModule([{ title: item.title }])"
|
|
||||||
class="box"
|
|
||||||
:style="{
|
|
||||||
backgroundColor: boxStyleList[index].backgroundColor,
|
|
||||||
borderColor: boxStyleList[index].borderColor,
|
|
||||||
boxShadow: `0rpx 7rpx 12rpx 0rpx ${boxStyleList[index].shadowColor}`,
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<view
|
|
||||||
class="num"
|
|
||||||
:style="{ color: boxStyleList[index].numColor }"
|
|
||||||
>
|
|
||||||
<text>{{ item.num }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="desc">
|
|
||||||
<text>{{ item.title }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</up-col>
|
|
||||||
</up-row>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 线条 -->
|
|
||||||
<view class="line"> </view>
|
|
||||||
|
|
||||||
<!-- 常用应用 -->
|
|
||||||
<view class="app-list" v-if="isShowModule(appList)">
|
|
||||||
<view class="name">常用应用</view>
|
|
||||||
<u-grid :border="false" col="4">
|
|
||||||
<u-grid-item
|
|
||||||
v-for="(item, listIndex) in appList"
|
|
||||||
:key="listIndex"
|
|
||||||
@click="item.fn"
|
|
||||||
:customStyle="{
|
|
||||||
display: isShowModule([{ title: item.title }]) ? '' : 'none',
|
|
||||||
}"
|
|
||||||
>
|
>
|
||||||
|
<up-badge
|
||||||
|
max="99"
|
||||||
|
:value="item.num"
|
||||||
|
:absolute="true"
|
||||||
|
:offset="[10, 10]"
|
||||||
|
></up-badge>
|
||||||
<up-image
|
<up-image
|
||||||
v-if="isShowModule([{ title: item.title }])"
|
:src="`/static/img/home/${item.icon}`"
|
||||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesHome/${item.icon}`"
|
width="184rpx"
|
||||||
width="60rpx"
|
height="162rpx"
|
||||||
height="60rpx"
|
|
||||||
></up-image>
|
></up-image>
|
||||||
<text
|
<view class="name">{{ item.title }}</view>
|
||||||
class="grid-text"
|
</up-grid-item>
|
||||||
v-if="isShowModule([{ title: item.title }])"
|
</up-grid>
|
||||||
>{{ item.title }}</text
|
</view>
|
||||||
>
|
<view style="margin-top: 30rpx">
|
||||||
</u-grid-item>
|
<text class="title title-shipment">出货销售</text>
|
||||||
</u-grid>
|
<up-grid :border="false">
|
||||||
|
<up-grid-item
|
||||||
|
v-for="(item, index) in stateNew.shipmentList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<up-badge
|
||||||
|
max="99"
|
||||||
|
:value="item.num"
|
||||||
|
:absolute="true"
|
||||||
|
:offset="[10, 10]"
|
||||||
|
></up-badge>
|
||||||
|
<up-image
|
||||||
|
:src="`/static/img/home/${item.icon}`"
|
||||||
|
width="184rpx"
|
||||||
|
height="162rpx"
|
||||||
|
></up-image>
|
||||||
|
<view class="name">{{ item.title }}</view>
|
||||||
|
</up-grid-item>
|
||||||
|
</up-grid>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 当收货 出货 常用app全部为空 显示暂无权限 -->
|
<!-- <up-empty
|
||||||
<up-empty
|
|
||||||
v-if="
|
v-if="
|
||||||
!isShowModule(receiveList.concat(shipmentList)) &&
|
!isShowModule(receiveList.concat(shipmentList)) &&
|
||||||
!isShowModule(appList)
|
!isShowModule(appList)
|
||||||
|
@ -148,13 +90,14 @@
|
||||||
icon="http://cdn.uviewui.com/uview/empty/permission.png"
|
icon="http://cdn.uviewui.com/uview/empty/permission.png"
|
||||||
:text="'暂无相关权限, 请联系管理员'"
|
:text="'暂无相关权限, 请联系管理员'"
|
||||||
>
|
>
|
||||||
</up-empty>
|
</up-empty> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<TabBar />
|
<TabBar />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { timeList, homeInitData } from "@/utils/data";
|
||||||
import { useMemberStore } from "@/store/index";
|
import { useMemberStore } from "@/store/index";
|
||||||
import {
|
import {
|
||||||
MessageApi,
|
MessageApi,
|
||||||
|
@ -179,16 +122,21 @@ const getSafeHeight = () => {
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
navbarRect.safeHeight =
|
navbarRect.safeHeight =
|
||||||
res.windowHeight -
|
res.windowHeight - 50 - navbarRect.top - navbarRect.height;
|
||||||
uni.upx2px(80) -
|
|
||||||
navbarRect.height -
|
|
||||||
navbarRect.top -
|
|
||||||
40 -
|
|
||||||
17;
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const stateNew = reactive({
|
||||||
|
filterTimeValue: "本月",
|
||||||
|
receiveList: homeInitData.receiveList,
|
||||||
|
shipmentList: homeInitData.shipmentList,
|
||||||
|
});
|
||||||
|
const handleFilter = (item: { id: number; name: string }) => {
|
||||||
|
stateNew.filterTimeValue = item.name;
|
||||||
|
};
|
||||||
|
|
||||||
const summaryList = reactive([
|
const summaryList = reactive([
|
||||||
{
|
{
|
||||||
title: "总收货/KG",
|
title: "总收货/KG",
|
||||||
|
@ -211,290 +159,6 @@ const summaryList = reactive([
|
||||||
imgUrl: "04.png",
|
imgUrl: "04.png",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const boxStyleList = reactive([
|
|
||||||
{
|
|
||||||
borderColor: "rgba(240, 147, 107, 1)",
|
|
||||||
backgroundColor: "#FFFAF7",
|
|
||||||
shadowColor: "rgba(146,44,0,0.2)",
|
|
||||||
numColor: "rgba(240, 145, 105, 1)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
borderColor: "rgba(218, 193, 88, 1)",
|
|
||||||
backgroundColor: "#FFFEF7",
|
|
||||||
shadowColor: "rgba(138,111,0,0.2)",
|
|
||||||
numColor: "rgba(217, 193, 88, 1)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
borderColor: "rgba(88, 173, 232, 1)",
|
|
||||||
backgroundColor: "#F7FCFF",
|
|
||||||
shadowColor: "rgba(8, 82, 92, 0.20)",
|
|
||||||
numColor: "rgba(88, 173, 232, 1)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
borderColor: "rgba(82, 210, 207, 1)",
|
|
||||||
backgroundColor: "#F7FFFF",
|
|
||||||
shadowColor: "rgba(0, 106, 103, 0.20)",
|
|
||||||
numColor: "rgba(84, 212, 208, 1)",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const receiveList = reactive([
|
|
||||||
{
|
|
||||||
title: "待定价",
|
|
||||||
num: 0,
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesReceive/pricing?scaleStatus=0", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "待过皮重",
|
|
||||||
num: 0,
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesReceive/pricing?scaleStatus=1", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "付款审核",
|
|
||||||
num: 0,
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesReceive/payReview?scaleStatus=2", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "待支付",
|
|
||||||
num: 0,
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesReceive/payReview?scaleStatus=3", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const shipmentList = reactive([
|
|
||||||
{
|
|
||||||
title: "待出货",
|
|
||||||
num: 0,
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesShipment/shipmenting?scaleStatus=0", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "待过毛重",
|
|
||||||
num: 0,
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesShipment/shipmenting?scaleStatus=1", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "出货结算",
|
|
||||||
num: 0,
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesShipment/shipmentSettlement?scaleStatus=2", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "待结算",
|
|
||||||
num: 0,
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesShipment/shipmentSettlement?scaleStatus=3", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const appList = reactive([
|
|
||||||
{
|
|
||||||
icon: "01.png",
|
|
||||||
title: "收货补单",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/receiveSpl", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "03.png",
|
|
||||||
title: "收货明细",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/receiveDetail", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "05.png",
|
|
||||||
title: "收货作废",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/receiveCl", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "07.png",
|
|
||||||
title: "供应商管理",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/supplierMgt", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "02.png",
|
|
||||||
title: "出货补单",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/shipmentSpl", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
icon: "04.png",
|
|
||||||
title: "出货明细",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/shipmentDetail", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
icon: "06.png",
|
|
||||||
title: "出货作废",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/shipmentCl", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
icon: "08.png",
|
|
||||||
title: "客户管理",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/customerMgt", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "11.png",
|
|
||||||
title: "收货产品",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/receiveProduct", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "10.png",
|
|
||||||
title: "收货分类",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/receiveType", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "09.png",
|
|
||||||
title: "出货产品",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/shipmentProduct", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "18.png",
|
|
||||||
title: "出货分类",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/shipmentType", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "14.png",
|
|
||||||
title: "人员管理",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/user", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "15.png",
|
|
||||||
title: "权限管理",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/role", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "17.png",
|
|
||||||
title: "供应商分类",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/supplierType", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "16.png",
|
|
||||||
title: "库存卡管理",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/stockCard", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "12.png",
|
|
||||||
title: "支付明细",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/paymentDetail", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "13.png",
|
|
||||||
title: "收入明细",
|
|
||||||
fn: () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesApp/incomeDetail", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
// 收货、出货、常用app是否显示
|
|
||||||
const isShowModule = (list: any) => {
|
|
||||||
let flag = false;
|
|
||||||
list.forEach((item: any) => {
|
|
||||||
if (store.profile.menusNameList.indexOf(item.title) > -1) {
|
|
||||||
flag = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return flag;
|
|
||||||
};
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
count: 0,
|
count: 0,
|
||||||
});
|
});
|
||||||
|
@ -518,10 +182,10 @@ const init = () => {
|
||||||
} = res.data;
|
} = res.data;
|
||||||
summaryList[0].num = totalReceipt;
|
summaryList[0].num = totalReceipt;
|
||||||
summaryList[1].num = totalExpenditure;
|
summaryList[1].num = totalExpenditure;
|
||||||
receiveList[0].num = toBePriced;
|
stateNew.receiveList[0].num = toBePriced;
|
||||||
receiveList[1].num = toBeTare;
|
stateNew.receiveList[1].num = toBeTare;
|
||||||
receiveList[2].num = audit;
|
stateNew.receiveList[2].num = audit;
|
||||||
receiveList[3].num = toBePaid;
|
stateNew.receiveList[3].num = toBePaid;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 出货相关信息
|
// 出货相关信息
|
||||||
|
@ -537,10 +201,10 @@ const init = () => {
|
||||||
} = res.data;
|
} = res.data;
|
||||||
summaryList[2].num = totalShipment;
|
summaryList[2].num = totalShipment;
|
||||||
summaryList[3].num = totalIncome;
|
summaryList[3].num = totalIncome;
|
||||||
shipmentList[0].num = toBeShipped;
|
stateNew.shipmentList[0].num = toBeShipped;
|
||||||
shipmentList[1].num = roughWeight;
|
stateNew.shipmentList[1].num = roughWeight;
|
||||||
shipmentList[2].num = shipmentReview;
|
stateNew.shipmentList[2].num = shipmentReview;
|
||||||
shipmentList[3].num = toBeSettled;
|
stateNew.shipmentList[3].num = toBeSettled;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -551,6 +215,11 @@ const init = () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const handleClick = (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: item.path, // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||||
|
@ -590,6 +259,17 @@ onShow(() => {
|
||||||
height: calc(100vh - 67px - 70px) !important;
|
height: calc(100vh - 67px - 70px) !important;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
.time-filter {
|
||||||
|
display: flex;
|
||||||
|
text-align: center;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 16rpx 130rpx;
|
||||||
|
> view {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.summary {
|
.summary {
|
||||||
.panel {
|
.panel {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
@ -621,12 +301,10 @@ onShow(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-15 {
|
.core-content {
|
||||||
padding: 15rpx;
|
padding: 22rpx;
|
||||||
}
|
background: #ffffff;
|
||||||
.data-detail {
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
||||||
margin-top: 15rpx;
|
|
||||||
// box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
|
||||||
border-radius: 13rpx;
|
border-radius: 13rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
.title {
|
.title {
|
||||||
|
@ -653,66 +331,16 @@ onShow(() => {
|
||||||
background: #ff782b;
|
background: #ff782b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.name {
|
||||||
.data-receive,
|
font-weight: 400;
|
||||||
.data-shipment {
|
font-size: 28rpx;
|
||||||
margin: 15rpx 15rpx 15rpx;
|
color: #000000;
|
||||||
.box {
|
|
||||||
width: 141.15rpx;
|
|
||||||
height: 141.15rpx;
|
|
||||||
background: #fffaf7;
|
|
||||||
border: 1px solid #f0936b;
|
|
||||||
box-shadow: 0rpx 7rpx 12rpx 0rpx rgba(146, 44, 0, 0.2);
|
|
||||||
border-radius: 26rpx;
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
display: table-cell;
|
|
||||||
// display: flex;
|
|
||||||
// align-items: center;
|
|
||||||
position: relative;
|
|
||||||
// top: 50%;
|
|
||||||
// transform: translateY(-50%);
|
|
||||||
.num {
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-family: Source Han Sans CN;
|
|
||||||
font-weight: bold;
|
|
||||||
/* #ifdef H5 */
|
|
||||||
margin-top: 0.7rem;
|
|
||||||
/* #endif */
|
|
||||||
}
|
|
||||||
.desc {
|
|
||||||
font-size: 26rpx;
|
|
||||||
font-family: Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.data-shipment {
|
::v-deep.u-grid-item {
|
||||||
margin-bottom: 21rpx;
|
padding: 22rpx 0rpx 0rpx 0rpx;
|
||||||
}
|
}
|
||||||
|
::v-deep.u-badge {
|
||||||
.line {
|
z-index: 999;
|
||||||
height: 18rpx;
|
|
||||||
background: #f8f8f8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-list {
|
|
||||||
padding: 15rpx;
|
|
||||||
padding-bottom: 0rpx;
|
|
||||||
.name {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-family: Source Han Sans CN;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #000000;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
}
|
|
||||||
.grid-text {
|
|
||||||
margin-top: 17rpx;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
font-size: 26rpx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,719 @@
|
||||||
|
<template>
|
||||||
|
<!-- 自定义工作台头部 -->
|
||||||
|
<NavBar :count="state.count" :title="'工作台'"></NavBar>
|
||||||
|
<view
|
||||||
|
class="contaner"
|
||||||
|
:style="{
|
||||||
|
marginTop: navbarRect.height + navbarRect.top + 'px',
|
||||||
|
height: navbarRect.safeHeight + 'px',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<!-- 数据汇总面板 -->
|
||||||
|
<!-- `url('/static/img/${item.imgUrl}')`, -->
|
||||||
|
<view class="summary">
|
||||||
|
<!-- :style="{
|
||||||
|
'background': 'url(\'/static/img/'+ item.imgUrl +'\')',
|
||||||
|
backgroundSize: 'cover',
|
||||||
|
}" -->
|
||||||
|
<view class="panel" v-for="(item, index) in summaryList" :key="index">
|
||||||
|
<image
|
||||||
|
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/${item.imgUrl}`"
|
||||||
|
/>
|
||||||
|
<view class="box">
|
||||||
|
<view class="num">{{ formatMoney(item.num, 2) }}</view>
|
||||||
|
<view class="title">{{ item.title }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="data-detail">
|
||||||
|
<view
|
||||||
|
class="p-15"
|
||||||
|
v-if="isShowModule(receiveList) || isShowModule(shipmentList)"
|
||||||
|
>
|
||||||
|
<!-- 收货入库 -->
|
||||||
|
<view v-if="isShowModule(receiveList)">
|
||||||
|
<text class="title">收货入库</text>
|
||||||
|
<view class="data-receive">
|
||||||
|
<up-row justify="flex-start" gutter="10">
|
||||||
|
<up-col
|
||||||
|
span="3"
|
||||||
|
v-for="(item, index) in receiveList"
|
||||||
|
:key="index"
|
||||||
|
@click="(item as any).fn()"
|
||||||
|
:customStyle="{
|
||||||
|
display: isShowModule([{ title: item.title }]) ? '' : 'none',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
v-if="isShowModule([{ title: item.title }])"
|
||||||
|
class="box"
|
||||||
|
:style="{
|
||||||
|
backgroundColor: boxStyleList[index].backgroundColor,
|
||||||
|
borderColor: boxStyleList[index].borderColor,
|
||||||
|
boxShadow: `0rpx 7rpx 12rpx 0rpx ${boxStyleList[index].shadowColor}`,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
class="num"
|
||||||
|
:style="{ color: boxStyleList[index].numColor }"
|
||||||
|
>
|
||||||
|
<text>{{ item.num }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="desc">
|
||||||
|
<text>{{ item.title }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</up-col>
|
||||||
|
</up-row>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 出货入库 -->
|
||||||
|
<view v-if="isShowModule(shipmentList)">
|
||||||
|
<text class="title title-shipment">出货销售</text>
|
||||||
|
<view class="data-shipment">
|
||||||
|
<up-row justify="flex-start" gutter="10">
|
||||||
|
<up-col
|
||||||
|
span="3"
|
||||||
|
v-for="(item, index) in shipmentList"
|
||||||
|
:key="index"
|
||||||
|
@click="(item as any).fn()"
|
||||||
|
:customStyle="{
|
||||||
|
display: isShowModule([{ title: item.title }]) ? '' : 'none',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
v-if="isShowModule([{ title: item.title }])"
|
||||||
|
class="box"
|
||||||
|
:style="{
|
||||||
|
backgroundColor: boxStyleList[index].backgroundColor,
|
||||||
|
borderColor: boxStyleList[index].borderColor,
|
||||||
|
boxShadow: `0rpx 7rpx 12rpx 0rpx ${boxStyleList[index].shadowColor}`,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
class="num"
|
||||||
|
:style="{ color: boxStyleList[index].numColor }"
|
||||||
|
>
|
||||||
|
<text>{{ item.num }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="desc">
|
||||||
|
<text>{{ item.title }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</up-col>
|
||||||
|
</up-row>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 线条 -->
|
||||||
|
<view class="line"> </view>
|
||||||
|
|
||||||
|
<!-- 常用应用 -->
|
||||||
|
<view class="app-list" v-if="isShowModule(appList)">
|
||||||
|
<view class="name">常用应用</view>
|
||||||
|
<u-grid :border="false" col="4">
|
||||||
|
<u-grid-item
|
||||||
|
v-for="(item, listIndex) in appList"
|
||||||
|
:key="listIndex"
|
||||||
|
@click="item.fn"
|
||||||
|
:customStyle="{
|
||||||
|
display: isShowModule([{ title: item.title }]) ? '' : 'none',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<up-image
|
||||||
|
v-if="isShowModule([{ title: item.title }])"
|
||||||
|
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesHome/${item.icon}`"
|
||||||
|
width="60rpx"
|
||||||
|
height="60rpx"
|
||||||
|
></up-image>
|
||||||
|
<text
|
||||||
|
class="grid-text"
|
||||||
|
v-if="isShowModule([{ title: item.title }])"
|
||||||
|
>{{ item.title }}</text
|
||||||
|
>
|
||||||
|
</u-grid-item>
|
||||||
|
</u-grid>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 当收货 出货 常用app全部为空 显示暂无权限 -->
|
||||||
|
<up-empty
|
||||||
|
v-if="
|
||||||
|
!isShowModule(receiveList.concat(shipmentList)) &&
|
||||||
|
!isShowModule(appList)
|
||||||
|
"
|
||||||
|
mode="permission"
|
||||||
|
icon="http://cdn.uviewui.com/uview/empty/permission.png"
|
||||||
|
:text="'暂无相关权限, 请联系管理员'"
|
||||||
|
>
|
||||||
|
</up-empty>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<TabBar />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { useMemberStore } from "@/store/index";
|
||||||
|
import {
|
||||||
|
MessageApi,
|
||||||
|
ProfileApi,
|
||||||
|
ReceiveApi,
|
||||||
|
ShipmentApi,
|
||||||
|
} from "@/services/index";
|
||||||
|
import TabBar from "@/components/TabBar/index.vue";
|
||||||
|
import { formatMoney } from "@/utils";
|
||||||
|
import { onBackPress, onShow } from "@dcloudio/uni-app";
|
||||||
|
import pinia from "@/store";
|
||||||
|
|
||||||
|
const store = useMemberStore(pinia);
|
||||||
|
const navbarRect = reactive({
|
||||||
|
height: 42,
|
||||||
|
top: 48,
|
||||||
|
safeHeight: 500,
|
||||||
|
});
|
||||||
|
|
||||||
|
const getSafeHeight = () => {
|
||||||
|
// #ifdef APP-PLUS || MP-WEIXIN
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success: (res) => {
|
||||||
|
navbarRect.safeHeight =
|
||||||
|
res.windowHeight -
|
||||||
|
uni.upx2px(80) -
|
||||||
|
navbarRect.height -
|
||||||
|
navbarRect.top -
|
||||||
|
40 -
|
||||||
|
17;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
// #endif
|
||||||
|
};
|
||||||
|
const summaryList = reactive([
|
||||||
|
{
|
||||||
|
title: "总收货/KG",
|
||||||
|
num: 0,
|
||||||
|
imgUrl: "01.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "收货总支出/元",
|
||||||
|
num: 0,
|
||||||
|
imgUrl: "02.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "总出货/KG",
|
||||||
|
num: 0,
|
||||||
|
imgUrl: "03.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "出货总收入/元",
|
||||||
|
num: 0,
|
||||||
|
imgUrl: "04.png",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const boxStyleList = reactive([
|
||||||
|
{
|
||||||
|
borderColor: "rgba(240, 147, 107, 1)",
|
||||||
|
backgroundColor: "#FFFAF7",
|
||||||
|
shadowColor: "rgba(146,44,0,0.2)",
|
||||||
|
numColor: "rgba(240, 145, 105, 1)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
borderColor: "rgba(218, 193, 88, 1)",
|
||||||
|
backgroundColor: "#FFFEF7",
|
||||||
|
shadowColor: "rgba(138,111,0,0.2)",
|
||||||
|
numColor: "rgba(217, 193, 88, 1)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
borderColor: "rgba(88, 173, 232, 1)",
|
||||||
|
backgroundColor: "#F7FCFF",
|
||||||
|
shadowColor: "rgba(8, 82, 92, 0.20)",
|
||||||
|
numColor: "rgba(88, 173, 232, 1)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
borderColor: "rgba(82, 210, 207, 1)",
|
||||||
|
backgroundColor: "#F7FFFF",
|
||||||
|
shadowColor: "rgba(0, 106, 103, 0.20)",
|
||||||
|
numColor: "rgba(84, 212, 208, 1)",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const receiveList = reactive([
|
||||||
|
{
|
||||||
|
title: "待定价",
|
||||||
|
num: 0,
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesReceive/pricing?scaleStatus=0", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "待过皮重",
|
||||||
|
num: 0,
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesReceive/pricing?scaleStatus=1", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "待审核",
|
||||||
|
num: 0,
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesReceive/payReview?scaleStatus=2", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "待付款",
|
||||||
|
num: 0,
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesReceive/payReview?scaleStatus=3", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
const shipmentList = reactive([
|
||||||
|
{
|
||||||
|
title: "待出货",
|
||||||
|
num: 0,
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesShipment/shipmenting?scaleStatus=0", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "待过毛重",
|
||||||
|
num: 0,
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesShipment/shipmenting?scaleStatus=1", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "出货结算",
|
||||||
|
num: 0,
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesShipment/shipmentSettlement?scaleStatus=2", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "待结算",
|
||||||
|
num: 0,
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesShipment/shipmentSettlement?scaleStatus=3", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const appList = reactive([
|
||||||
|
{
|
||||||
|
icon: "01.png",
|
||||||
|
title: "收货补单",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/receiveSpl", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "03.png",
|
||||||
|
title: "收货明细",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/receiveDetail", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "05.png",
|
||||||
|
title: "收货作废",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/receiveCl", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "07.png",
|
||||||
|
title: "供应商管理",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/supplierMgt", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "02.png",
|
||||||
|
title: "出货补单",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/shipmentSpl", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
icon: "04.png",
|
||||||
|
title: "出货明细",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/shipmentDetail", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
icon: "06.png",
|
||||||
|
title: "出货作废",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/shipmentCl", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
icon: "08.png",
|
||||||
|
title: "客户管理",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/customerMgt", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "11.png",
|
||||||
|
title: "收货产品",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/receiveProduct", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "10.png",
|
||||||
|
title: "收货分类",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/receiveType", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "09.png",
|
||||||
|
title: "出货产品",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/shipmentProduct", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "18.png",
|
||||||
|
title: "出货分类",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/shipmentType", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "14.png",
|
||||||
|
title: "人员管理",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/user", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "15.png",
|
||||||
|
title: "权限管理",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/role", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "17.png",
|
||||||
|
title: "供应商分类",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/supplierType", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "16.png",
|
||||||
|
title: "库存卡管理",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/stockCard", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "12.png",
|
||||||
|
title: "支付明细",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/paymentDetail", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "13.png",
|
||||||
|
title: "收入明细",
|
||||||
|
fn: () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/incomeDetail", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
// 收货、出货、常用app是否显示
|
||||||
|
const isShowModule = (list: any) => {
|
||||||
|
let flag = false;
|
||||||
|
list.forEach((item: any) => {
|
||||||
|
if (store.profile.menusNameList.indexOf(item.title) > -1) {
|
||||||
|
flag = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return flag;
|
||||||
|
};
|
||||||
|
const state = reactive({
|
||||||
|
count: 0,
|
||||||
|
});
|
||||||
|
const init = () => {
|
||||||
|
// 消息统计
|
||||||
|
MessageApi.getUserNoticeInfoNumVo().then((res: any) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
state.count = res.data.unreadNoticeNum;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 收货入库相关信息
|
||||||
|
ReceiveApi.countOrderByMonth().then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
const {
|
||||||
|
totalReceipt,
|
||||||
|
totalExpenditure,
|
||||||
|
toBePriced,
|
||||||
|
toBeTare,
|
||||||
|
audit,
|
||||||
|
toBePaid,
|
||||||
|
} = res.data;
|
||||||
|
summaryList[0].num = totalReceipt;
|
||||||
|
summaryList[1].num = totalExpenditure;
|
||||||
|
receiveList[0].num = toBePriced;
|
||||||
|
receiveList[1].num = toBeTare;
|
||||||
|
receiveList[2].num = audit;
|
||||||
|
receiveList[3].num = toBePaid;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 出货相关信息
|
||||||
|
ShipmentApi.countOrderByMonth().then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
const {
|
||||||
|
totalShipment,
|
||||||
|
totalIncome,
|
||||||
|
toBeShipped,
|
||||||
|
roughWeight,
|
||||||
|
shipmentReview,
|
||||||
|
toBeSettled,
|
||||||
|
} = res.data;
|
||||||
|
summaryList[2].num = totalShipment;
|
||||||
|
summaryList[3].num = totalIncome;
|
||||||
|
shipmentList[0].num = toBeShipped;
|
||||||
|
shipmentList[1].num = roughWeight;
|
||||||
|
shipmentList[2].num = shipmentReview;
|
||||||
|
shipmentList[3].num = toBeSettled;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 重新获取权限
|
||||||
|
ProfileApi.getUserInfo().then((res: any) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
store.setProfile({ ...res.data, token: store.profile.token });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
// #ifdef MP-WEIXIN
|
||||||
|
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
||||||
|
navbarRect.height = menuButtonInfo.height;
|
||||||
|
navbarRect.top = menuButtonInfo.top;
|
||||||
|
getSafeHeight();
|
||||||
|
// #endif
|
||||||
|
// #ifndef MP-WEIXIN
|
||||||
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
|
navbarRect.safeHeight = (systemInfo.safeArea as any).height;
|
||||||
|
getSafeHeight();
|
||||||
|
// #endif
|
||||||
|
});
|
||||||
|
onShow(() => {
|
||||||
|
if (store.profile?.token) {
|
||||||
|
init();
|
||||||
|
} else {
|
||||||
|
// 当应用启动时,检查是否已显示过启动页
|
||||||
|
if (Boolean(uni.getStorageSync("hasLaunched"))) {
|
||||||
|
// 如果已显示过,不再显示启动页
|
||||||
|
uni.reLaunch({
|
||||||
|
url: "/pagesLogin/login/index",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 如果未显示过,标记为已显示,并保存到存储
|
||||||
|
uni.setStorageSync("hasLaunched", true);
|
||||||
|
uni.reLaunch({ url: "/pagesLaunch/index" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.contaner {
|
||||||
|
padding: 17rpx;
|
||||||
|
/* #ifdef H5 */
|
||||||
|
height: calc(100vh - 67px - 70px) !important;
|
||||||
|
/* #endif */
|
||||||
|
overflow: auto;
|
||||||
|
.summary {
|
||||||
|
.panel {
|
||||||
|
width: 50%;
|
||||||
|
display: inline-block;
|
||||||
|
height: 155rpx;
|
||||||
|
position: relative;
|
||||||
|
// background: url('/static/img/01.png');
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.box {
|
||||||
|
position: absolute;
|
||||||
|
padding: 20rpx 0rpx 0rpx 40rpx;
|
||||||
|
margin-top: -155rpx;
|
||||||
|
.num {
|
||||||
|
font-size: 40rpx;
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-15 {
|
||||||
|
padding: 15rpx;
|
||||||
|
}
|
||||||
|
.data-detail {
|
||||||
|
margin-top: 15rpx;
|
||||||
|
// box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
||||||
|
border-radius: 13rpx;
|
||||||
|
position: relative;
|
||||||
|
.title {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #000000;
|
||||||
|
padding-left: 20rpx;
|
||||||
|
&::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
margin-top: 6px;
|
||||||
|
margin-left: -20rpx;
|
||||||
|
width: 6rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
background: #22d594;
|
||||||
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
||||||
|
border-radius: 3rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title-shipment {
|
||||||
|
&::before {
|
||||||
|
content: "";
|
||||||
|
background: #ff782b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-receive,
|
||||||
|
.data-shipment {
|
||||||
|
margin: 15rpx 15rpx 15rpx;
|
||||||
|
.box {
|
||||||
|
width: 141.15rpx;
|
||||||
|
height: 141.15rpx;
|
||||||
|
background: #fffaf7;
|
||||||
|
border: 1px solid #f0936b;
|
||||||
|
box-shadow: 0rpx 7rpx 12rpx 0rpx rgba(146, 44, 0, 0.2);
|
||||||
|
border-radius: 26rpx;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
display: table-cell;
|
||||||
|
// display: flex;
|
||||||
|
// align-items: center;
|
||||||
|
position: relative;
|
||||||
|
// top: 50%;
|
||||||
|
// transform: translateY(-50%);
|
||||||
|
.num {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: bold;
|
||||||
|
/* #ifdef H5 */
|
||||||
|
margin-top: 0.7rem;
|
||||||
|
/* #endif */
|
||||||
|
}
|
||||||
|
.desc {
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.data-shipment {
|
||||||
|
margin-bottom: 21rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line {
|
||||||
|
height: 18rpx;
|
||||||
|
background: #f8f8f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-list {
|
||||||
|
padding: 15rpx;
|
||||||
|
padding-bottom: 0rpx;
|
||||||
|
.name {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #000000;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
.grid-text {
|
||||||
|
margin-top: 17rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -9,23 +9,6 @@
|
||||||
ref="loginForm"
|
ref="loginForm"
|
||||||
:labelWidth="0"
|
:labelWidth="0"
|
||||||
>
|
>
|
||||||
<u-form-item prop="userInfo.dpName" @click="state.isShow = true">
|
|
||||||
<u-input
|
|
||||||
v-model="model1.userInfo.dpName"
|
|
||||||
:placeholder="`请选择基地名称`"
|
|
||||||
clearable
|
|
||||||
:customStyle="{}"
|
|
||||||
border="none"
|
|
||||||
:disabledColor="''"
|
|
||||||
:disabled="true"
|
|
||||||
>
|
|
||||||
<!-- @change="(e:any) => {handleInput(e, item)}"
|
|
||||||
@clear="handleClear(item)" -->
|
|
||||||
</u-input>
|
|
||||||
<template #right>
|
|
||||||
<u-icon name="arrow-right" color="#dadbde"></u-icon>
|
|
||||||
</template>
|
|
||||||
</u-form-item>
|
|
||||||
<u-form-item prop="userInfo.userName">
|
<u-form-item prop="userInfo.userName">
|
||||||
<u-input
|
<u-input
|
||||||
v-model="model1.userInfo.userName"
|
v-model="model1.userInfo.userName"
|
||||||
|
@ -158,7 +141,6 @@ const model1 = reactive({
|
||||||
userInfo: {
|
userInfo: {
|
||||||
userName: "",
|
userName: "",
|
||||||
password: "",
|
password: "",
|
||||||
dpName: "",
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
// 控制focus 边框样式
|
// 控制focus 边框样式
|
||||||
|
@ -172,12 +154,6 @@ const checkGroup = reactive({
|
||||||
});
|
});
|
||||||
|
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
"userInfo.dpName": {
|
|
||||||
type: "string",
|
|
||||||
required: true,
|
|
||||||
message: "请选择基地名称",
|
|
||||||
trigger: ["blur", "change"],
|
|
||||||
},
|
|
||||||
"userInfo.userName": {
|
"userInfo.userName": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -302,7 +278,6 @@ const openDoc = (item: string) => {
|
||||||
const handleSelect = (v: any) => {
|
const handleSelect = (v: any) => {
|
||||||
state.isShow = false;
|
state.isShow = false;
|
||||||
state.dpObj = v;
|
state.dpObj = v;
|
||||||
model1.userInfo.dpName = v.name;
|
|
||||||
store.setChildPath(v.dbIp);
|
store.setChildPath(v.dbIp);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
</view>
|
</view>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<TabBar></TabBar>
|
<TabBar :select="'我的'"></TabBar>
|
||||||
<SmallModal
|
<SmallModal
|
||||||
:title="'确认退出吗?'"
|
:title="'确认退出吗?'"
|
||||||
:content="'退出后将返回至登陆页'"
|
:content="'退出后将返回至登陆页'"
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
:disabled="item.disabled || item.type === 'select'"
|
:disabled="item.disabled || item.type === 'select'"
|
||||||
:disabledColor="item.name === '收货产品' ? '#ffffff' : '#f5f7fa'"
|
:disabledColor="item.name === '收货产品' ? '#ffffff' : '#f5f7fa'"
|
||||||
@clear="handleClear(item)"
|
@clear="handleClear(item)"
|
||||||
|
@blur="item.blur()"
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text v-if="item.key === 'subtractNum'">
|
<text v-if="item.key === 'subtractNum'">
|
||||||
|
@ -82,6 +83,9 @@
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
</template>
|
</template>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
<u-form-item :label="'现场照片'" v-if="model1.order.id">
|
||||||
|
<Photo :params="{'businessId': model1.order.id, orderType: OrderType.Receive, imagesType: ImagesType.Tare}"/>
|
||||||
|
</u-form-item>
|
||||||
</u-form>
|
</u-form>
|
||||||
<block
|
<block
|
||||||
v-for="(item, index) in prePage ? formAttrList1 : formAttrList"
|
v-for="(item, index) in prePage ? formAttrList1 : formAttrList"
|
||||||
|
@ -104,14 +108,6 @@
|
||||||
<u-button type="primary" text="保存" @click="save()"></u-button>
|
<u-button type="primary" text="保存" @click="save()"></u-button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 供应商选择弹框 -->
|
|
||||||
<SupplierDialog
|
|
||||||
ref="supplierDialog"
|
|
||||||
:show="showDialog.showSupplier"
|
|
||||||
@handleDialog="(v:boolean) => {handleDialog('showSupplier', v)}"
|
|
||||||
@changeUser="changeUser"
|
|
||||||
:isShipment="false"
|
|
||||||
></SupplierDialog>
|
|
||||||
<!-- 收货产品弹框 -->
|
<!-- 收货产品弹框 -->
|
||||||
<ProductDialog
|
<ProductDialog
|
||||||
:show="showDialog.showProduct"
|
:show="showDialog.showProduct"
|
||||||
|
@ -132,10 +128,10 @@ import {
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||||
import { ImagesType, OrderType } from "@/utils/enum";
|
import { ImagesType, OrderType } from "@/utils/enum";
|
||||||
import SupplierDialog from "../components/SupplierDialog.vue";
|
import ProductDialog from "@/components/Dialog/ProductDialog.vue";
|
||||||
import ProductDialog from "../components/ProductDialog.vue";
|
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
import { countDots } from "@/utils";
|
import { countDots } from "@/utils";
|
||||||
|
import Photo from "@/components/Photo/index.vue";
|
||||||
const handleClear = (item: any) => {
|
const handleClear = (item: any) => {
|
||||||
(model1.order as any)[item.key] = "";
|
(model1.order as any)[item.key] = "";
|
||||||
};
|
};
|
||||||
|
@ -145,7 +141,6 @@ const showDialog = <
|
||||||
[key: string]: boolean;
|
[key: string]: boolean;
|
||||||
}
|
}
|
||||||
>reactive({
|
>reactive({
|
||||||
showSupplier: false,
|
|
||||||
showProduct: false,
|
showProduct: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -153,11 +148,6 @@ const handleDialog = (key: string, v: boolean) => {
|
||||||
showDialog[key] = v;
|
showDialog[key] = v;
|
||||||
};
|
};
|
||||||
|
|
||||||
const changeUser = (obj: any) => {
|
|
||||||
model1.order.userName = obj.name; // 供应商名称
|
|
||||||
model1.order.userId = obj.id; // 供应商Id,
|
|
||||||
};
|
|
||||||
|
|
||||||
// 收货产品选择
|
// 收货产品选择
|
||||||
const changeProduct = (obj: any) => {
|
const changeProduct = (obj: any) => {
|
||||||
model1.order.productName = obj.reProductsName; // 收货产品名称
|
model1.order.productName = obj.reProductsName; // 收货产品名称
|
||||||
|
@ -232,7 +222,7 @@ const rules = reactive({
|
||||||
"order.userName": {
|
"order.userName": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请选择供应商",
|
message: "请输入供应商",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
"order.productName": {
|
"order.productName": {
|
||||||
|
@ -287,18 +277,12 @@ const formAttrList = reactive<ComType>([
|
||||||
{
|
{
|
||||||
name: "供应商",
|
name: "供应商",
|
||||||
key: "userName",
|
key: "userName",
|
||||||
type: "select",
|
type: "input",
|
||||||
unit: "",
|
unit: "",
|
||||||
childKey: "userSelect",
|
|
||||||
required: true,
|
required: true,
|
||||||
fn: () => {
|
fn: () => {},
|
||||||
uni.navigateTo({
|
blur: () => {
|
||||||
url:
|
updateSupplierUserName();
|
||||||
"/pagesApp/components/addSupplier?title=编辑供应商&item=" +
|
|
||||||
model1.order.userId, // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
|
|
||||||
uni.hideKeyboard();
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -406,13 +390,11 @@ const formAttrList1 = reactive<ComType>([
|
||||||
{
|
{
|
||||||
name: "供应商",
|
name: "供应商",
|
||||||
key: "userName",
|
key: "userName",
|
||||||
type: "select",
|
type: "input",
|
||||||
unit: "",
|
unit: "",
|
||||||
childKey: "userSelect",
|
|
||||||
required: true,
|
required: true,
|
||||||
fn: () => {
|
blur: () => {
|
||||||
// handleDialog("showSupplier", true);
|
updateSupplierUserName();
|
||||||
uni.hideKeyboard();
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -495,7 +477,7 @@ const formAttrList1 = reactive<ComType>([
|
||||||
disabled: true,
|
disabled: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "货款金额",
|
name: "实际付款",
|
||||||
key: "balanceTotalPrice",
|
key: "balanceTotalPrice",
|
||||||
type: "input",
|
type: "input",
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -550,34 +532,14 @@ watch(
|
||||||
model1.order.netWeight * ((100 - model1.order.subtractNum) / 100);
|
model1.order.netWeight * ((100 - model1.order.subtractNum) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 定价的时候不对totalPrice 进行处理
|
|
||||||
// model1.order.totalPrice =
|
|
||||||
// Math.round(
|
|
||||||
// (model1.order.price || 0) * (model1.order.netWeight || 0) * 100
|
|
||||||
// ) / 100;
|
|
||||||
|
|
||||||
// 货款金额默认=预估总价,当系统自动算出预估总价时,值需同步
|
// 实际付款默认=预估总价,当系统自动算出预估总价时,值需同步
|
||||||
if (<number>model1.order.balanceTotalPrice <= 0) {
|
if (<number>model1.order.balanceTotalPrice <= 0) {
|
||||||
model1.order.balanceTotalPrice = model1.order.totalPrice;
|
model1.order.balanceTotalPrice = model1.order.totalPrice;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// SupplierApi.getSupplierUserList({}).then((res) => {
|
|
||||||
// if (res.code === 200) {
|
|
||||||
// contrlModalParams.userSelect.list = res.data;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// ReceiveProductApi.getAllReProducts().then((res) => {
|
|
||||||
// if (res.code === 200) {
|
|
||||||
// contrlModalParams.productSelect.list = _.map(
|
|
||||||
// res.data as any,
|
|
||||||
// function (item: any) {
|
|
||||||
// return { name: item.reProductsName, ...item };
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
const handleSelect = (key: string, v: any) => {
|
const handleSelect = (key: string, v: any) => {
|
||||||
contrlModalParams[key].isShow = false;
|
contrlModalParams[key].isShow = false;
|
||||||
if (key === "userSelect") {
|
if (key === "userSelect") {
|
||||||
|
@ -635,6 +597,17 @@ const handleDelete = (e: any) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const updateSupplierUserName = () => {
|
||||||
|
const { userId, userName } = model1.order;
|
||||||
|
SupplierApi.updateSupplierUserName({ id: userId, name: userName }).then(
|
||||||
|
(res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
uni.showToast({ title: "供应商名称已更新" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点击保存 先执行upload接口
|
* 点击保存 先执行upload接口
|
||||||
* 上传成功后 保存图片资源 和更新订单数据
|
* 上传成功后 保存图片资源 和更新订单数据
|
||||||
|
@ -701,20 +674,16 @@ const save = () => {
|
||||||
}
|
}
|
||||||
check().then((res) => {
|
check().then((res) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
|
// 保存前先更新供应商名称
|
||||||
startSave();
|
startSave();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const startSave = () => {
|
const startSave = () => {
|
||||||
Promise.all(handleUpload()).then((res) => {
|
Promise.all(handleUpload()).then((res) => {
|
||||||
console.log("***** 所有文件已经上传成功", res);
|
|
||||||
if (res.filter((item) => item).length > 0) {
|
if (res.filter((item) => item).length > 0) {
|
||||||
PictureApi.addListAnnex({ annexPos: res.filter((item) => item) }).then(
|
PictureApi.addListAnnex({ annexPos: res.filter((item) => item) }).then(
|
||||||
(res1) => {
|
(res1) => {
|
||||||
console.log(
|
|
||||||
"***** 关联的内容是",
|
|
||||||
res.filter((item) => item)
|
|
||||||
);
|
|
||||||
if (res1.code === 200) {
|
if (res1.code === 200) {
|
||||||
console.log("*** 资源文件更新成功");
|
console.log("*** 资源文件更新成功");
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,203 @@
|
||||||
|
<template>
|
||||||
|
<view class="search-box">
|
||||||
|
<view class="search">
|
||||||
|
<u-search
|
||||||
|
placeholder="请输入供应商名称"
|
||||||
|
v-model="keyword"
|
||||||
|
:focus="true"
|
||||||
|
bgColor="#fff"
|
||||||
|
clearable
|
||||||
|
:showAction="false"
|
||||||
|
placeholderColor="#C1C1C1"
|
||||||
|
@search="handleSearch()"
|
||||||
|
@clear="handleSearch()"
|
||||||
|
></u-search>
|
||||||
|
</view>
|
||||||
|
<view @click="handleCalendar()">
|
||||||
|
<up-icon name="calendar" size="26"></up-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="fullTime" v-if="filterState.startTime">
|
||||||
|
{{ filterState.startTime }} - {{ filterState.endTime }}
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="card-box">
|
||||||
|
|
||||||
|
<page-view
|
||||||
|
@loadList="
|
||||||
|
(v) => {
|
||||||
|
getList(v);
|
||||||
|
}
|
||||||
|
"
|
||||||
|
:noMoreData="pageList.noMoreData"
|
||||||
|
:list="pageList.list"
|
||||||
|
:height="ScaleStatus.Paid === currentTab ? 160 : 240"
|
||||||
|
:isLoading="pageList.isLoading"
|
||||||
|
>
|
||||||
|
<block v-for="(item, index) in pageList.list" :key="index">
|
||||||
|
<view class="c-layout">
|
||||||
|
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<u-gap
|
||||||
|
height="10"
|
||||||
|
bgColor="#f8f8f8"
|
||||||
|
v-if="index < pageList.list.length - 1"
|
||||||
|
></u-gap>
|
||||||
|
</block>
|
||||||
|
</page-view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 时间弹框 -->
|
||||||
|
<TimeDialog
|
||||||
|
ref="timeDialog"
|
||||||
|
:show="filterState.showTime"
|
||||||
|
@handleDialog="(v:boolean) => {filterState.showTime = false}"
|
||||||
|
@changeTime="changeTime"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ReceiveApi } from "@/services/index";
|
||||||
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
|
import PageView from "@/components/PageView/index.vue";
|
||||||
|
import { ScaleStatus } from "@/utils/enum";
|
||||||
|
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
|
||||||
|
// 筛选条件
|
||||||
|
const filterState = reactive({
|
||||||
|
showTime: false,
|
||||||
|
startTime: "",
|
||||||
|
endTime: "",
|
||||||
|
});
|
||||||
|
const handleCalendar = () => {
|
||||||
|
filterState.showTime = true;
|
||||||
|
};
|
||||||
|
const changeTime = (obj: any) => {
|
||||||
|
filterState.startTime = obj.startTime;
|
||||||
|
filterState.endTime = obj.endTime;
|
||||||
|
resetPageList();
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
// scaleStatus
|
||||||
|
const pageList: PageResult<Order> = reactive({
|
||||||
|
isLoading: false,
|
||||||
|
noMoreData: false,
|
||||||
|
total: 0,
|
||||||
|
list: [],
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
});
|
||||||
|
const keyword = ref("");
|
||||||
|
|
||||||
|
const resetPageList = () => {
|
||||||
|
pageList.noMoreData = false;
|
||||||
|
pageList.total = 0;
|
||||||
|
pageList.list = [];
|
||||||
|
pageList.pageNum = 1;
|
||||||
|
pageList.pageSize = 10;
|
||||||
|
};
|
||||||
|
const currentTab = ref(2);
|
||||||
|
|
||||||
|
const handleSearch = () => {
|
||||||
|
resetPageList();
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
const getList = (v?: boolean) => {
|
||||||
|
if (v) {
|
||||||
|
if (Math.ceil(pageList.total / pageList.pageSize) > pageList.pageNum) {
|
||||||
|
pageList.pageNum++;
|
||||||
|
} else {
|
||||||
|
pageList.noMoreData = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pageList.isLoading = true;
|
||||||
|
ReceiveApi.getOrderPage({
|
||||||
|
pageSize: pageList.pageSize,
|
||||||
|
pageNumber: pageList.pageNum,
|
||||||
|
scaleStatus: currentTab.value,
|
||||||
|
userName: keyword.value,
|
||||||
|
startTime: filterState.startTime ? `${filterState.startTime} 00:00:00` : '',
|
||||||
|
endTime: filterState.startTime ? `${filterState.endTime} 00:00:00` : '',
|
||||||
|
}).then((res: any) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
pageList.isLoading = false;
|
||||||
|
pageList.list = pageList.list.concat(
|
||||||
|
res.data.list.map((item: any) => {
|
||||||
|
return { ...item, isChecked: false };
|
||||||
|
})
|
||||||
|
);
|
||||||
|
pageList.total = (res.data as any).total;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
onLoad((option) => {
|
||||||
|
currentTab.value = parseInt((option as any).scaleStatus);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.search-box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0rpx 22rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
view + view {
|
||||||
|
margin-left: 22rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.search {
|
||||||
|
box-shadow: 0rpx 3rpx 16rpx 5rpx rgba(0, 0, 0, 0.2);
|
||||||
|
border-radius: 28rpx;
|
||||||
|
background: rgba(255, 255, 255, 0.86);
|
||||||
|
margin: 0px auto;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #c1c1c1;
|
||||||
|
flex: 1;
|
||||||
|
> view {
|
||||||
|
line-height: 60rpx;
|
||||||
|
text-align: center;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
text {
|
||||||
|
margin-left: 15rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.fullTime {
|
||||||
|
font-size: 26rpx;
|
||||||
|
padding: 22rpx 22rpx 0rpx 22rpx;
|
||||||
|
color: #606266;
|
||||||
|
}
|
||||||
|
.card-box {
|
||||||
|
.c-tab {
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999999;
|
||||||
|
line-height: 41rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
border-bottom: 1rpx solid rgba(233, 233, 233, 0.76);
|
||||||
|
text {
|
||||||
|
padding: 16rpx;
|
||||||
|
}
|
||||||
|
.active {
|
||||||
|
color: $u-primary;
|
||||||
|
border-bottom: 5rpx solid $u-primary;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.c-layout {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
|
@ -1,25 +1,29 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="search">
|
<view class="search-box">
|
||||||
<view v-if="!isShowSearch" @click="isShowSearch = true">
|
<view class="search">
|
||||||
<u-icon color="#C1C1C1" name="search"></u-icon
|
<u-search
|
||||||
><text>请输入供应商名称</text>
|
placeholder="请输入供应商名称"
|
||||||
|
v-model="keyword"
|
||||||
|
:focus="true"
|
||||||
|
bgColor="#fff"
|
||||||
|
clearable
|
||||||
|
:showAction="false"
|
||||||
|
placeholderColor="#C1C1C1"
|
||||||
|
@search="handleSearch()"
|
||||||
|
@clear="handleSearch()"
|
||||||
|
></u-search>
|
||||||
</view>
|
</view>
|
||||||
<u-search
|
<view @click="handleCalendar()">
|
||||||
v-else
|
<up-icon name="calendar" size="26"></up-icon>
|
||||||
placeholder="请输入供应商名称"
|
</view>
|
||||||
v-model="keyword"
|
</view>
|
||||||
:focus="true"
|
|
||||||
bgColor="#fff"
|
<view class="fullTime" v-if="filterState.startTime">
|
||||||
clearable
|
{{ filterState.startTime }} - {{ filterState.endTime }}
|
||||||
:showAction="false"
|
|
||||||
placeholderColor="#C1C1C1"
|
|
||||||
@search="handleSearch()"
|
|
||||||
@clear="handleSearch()"
|
|
||||||
></u-search>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="card-box">
|
<view class="card-box">
|
||||||
<view class="c-tab">
|
<!-- <view class="c-tab">
|
||||||
<text
|
<text
|
||||||
v-for="(item, index) in tabList"
|
v-for="(item, index) in tabList"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
@ -28,7 +32,7 @@
|
||||||
>
|
>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<page-view
|
<page-view
|
||||||
@loadList="
|
@loadList="
|
||||||
|
@ -38,12 +42,12 @@
|
||||||
"
|
"
|
||||||
:noMoreData="pageList.noMoreData"
|
:noMoreData="pageList.noMoreData"
|
||||||
:list="pageList.list"
|
:list="pageList.list"
|
||||||
:height="ScaleStatus.Paid === currentTab ? 160 : 240 "
|
:height="ScaleStatus.Paid === currentTab ? 160 : 240"
|
||||||
:isLoading="pageList.isLoading"
|
:isLoading="pageList.isLoading"
|
||||||
>
|
>
|
||||||
<block v-for="(item, index) in pageList.list" :key="index">
|
<block v-for="(item, index) in pageList.list" :key="index">
|
||||||
<view class="c-layout">
|
<view class="c-layout">
|
||||||
<view style="min-width: 20px;">
|
<view style="min-width: 20px">
|
||||||
<checkbox
|
<checkbox
|
||||||
v-if="
|
v-if="
|
||||||
ScaleStatus.ToBeReview === currentTab ||
|
ScaleStatus.ToBeReview === currentTab ||
|
||||||
|
@ -61,8 +65,8 @@
|
||||||
<view>
|
<view>
|
||||||
<text class="number">收货单号:{{ item.receiptNumber }}</text>
|
<text class="number">收货单号:{{ item.receiptNumber }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view v-if="item.userName">
|
||||||
<text class="name">{{ item.userName }}</text>
|
<text class="name">{{ item.userName }} <text v-if="item.cardNumber">{{ item.cardNumber }}</text></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -74,9 +78,13 @@
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-box">
|
<view class="flex-box">
|
||||||
<!-- 若是等待审核显示预估总价 其他显示货款金额 -->
|
<!-- 若是等待审核显示预估总价 其他显示实际付款 -->
|
||||||
<text v-if="currentTab === 2">预估总价:{{ item.totalPrice || 0 }}元</text>
|
<text v-if="currentTab === 2"
|
||||||
<text v-else>货款金额:{{ item.balanceTotalPrice || 0 }}元</text>
|
>预估总价:{{ item.totalPrice || 0 }}元</text
|
||||||
|
>
|
||||||
|
<text v-else
|
||||||
|
>实际付款:{{ item.balanceTotalPrice || 0 }}元</text
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
|
@ -88,8 +96,8 @@
|
||||||
>
|
>
|
||||||
<text
|
<text
|
||||||
v-if="currentTab === 3"
|
v-if="currentTab === 3"
|
||||||
@click="handleReview(item.id as number, 3, '去支付')"
|
@click="handleReview(item.id as number, 3, '去付款')"
|
||||||
>去支付</text
|
>去付款</text
|
||||||
>
|
>
|
||||||
<text
|
<text
|
||||||
v-if="currentTab === 4"
|
v-if="currentTab === 4"
|
||||||
|
@ -138,12 +146,35 @@
|
||||||
></u-action-sheet>
|
></u-action-sheet>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
|
<!-- 时间弹框 -->
|
||||||
|
<TimeDialog
|
||||||
|
ref="timeDialog"
|
||||||
|
:show="filterState.showTime"
|
||||||
|
@handleDialog="(v:boolean) => {filterState.showTime = false}"
|
||||||
|
@changeTime="changeTime"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ReceiveApi } from "@/services/index";
|
import { ReceiveApi } from "@/services/index";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import PageView from "@/components/PageView/index.vue";
|
import PageView from "@/components/PageView/index.vue";
|
||||||
import { ScaleStatus } from "@/utils/enum";
|
import { ScaleStatus } from "@/utils/enum";
|
||||||
|
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
|
||||||
|
// 筛选条件
|
||||||
|
const filterState = reactive({
|
||||||
|
showTime: false,
|
||||||
|
startTime: "",
|
||||||
|
endTime: "",
|
||||||
|
});
|
||||||
|
const handleCalendar = () => {
|
||||||
|
filterState.showTime = true;
|
||||||
|
};
|
||||||
|
const changeTime = (obj: any) => {
|
||||||
|
filterState.startTime = obj.startTime;
|
||||||
|
filterState.endTime = obj.endTime;
|
||||||
|
resetPageList();
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
const contrlModalParams = reactive<{ [attrName: string]: any }>({
|
const contrlModalParams = reactive<{ [attrName: string]: any }>({
|
||||||
paySelect: {
|
paySelect: {
|
||||||
|
@ -179,8 +210,7 @@ const pageList: PageResult<Order> = reactive({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
});
|
});
|
||||||
const keyword = ref('');
|
const keyword = ref("");
|
||||||
const isShowSearch = ref(false);
|
|
||||||
const state = reactive<{
|
const state = reactive<{
|
||||||
[attrName: string]: any;
|
[attrName: string]: any;
|
||||||
}>({
|
}>({
|
||||||
|
@ -219,7 +249,7 @@ const handleTab = (item: any) => {
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
resetPageList();
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
}
|
};
|
||||||
const handleReview = (id: number, scaleStatus: number, title: string) => {
|
const handleReview = (id: number, scaleStatus: number, title: string) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:
|
url:
|
||||||
|
@ -236,7 +266,7 @@ const handleReviewOrPay = (status: number) => {
|
||||||
updateStatus(ScaleStatus.ToBePay, -1);
|
updateStatus(ScaleStatus.ToBePay, -1);
|
||||||
} else if (ScaleStatus.ToBePay === status) {
|
} else if (ScaleStatus.ToBePay === status) {
|
||||||
// 批量支付
|
// 批量支付
|
||||||
contrlModalParams.paySelect.isShow = true
|
contrlModalParams.paySelect.isShow = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const updateStatus = (status: number, key: number) => {
|
const updateStatus = (status: number, key: number) => {
|
||||||
|
@ -245,14 +275,16 @@ const updateStatus = (status: number, key: number) => {
|
||||||
.map((item) => {
|
.map((item) => {
|
||||||
return { ...item, scaleStatus: status };
|
return { ...item, scaleStatus: status };
|
||||||
});
|
});
|
||||||
if(list.length === 0) {
|
if (list.length === 0) {
|
||||||
uni.showToast({icon: 'none', title: '请至少选择一个收货单'})
|
uni.showToast({ icon: "none", title: "请至少选择一个收货单" });
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let paramsList:any = list;
|
let paramsList: any = list;
|
||||||
if (ScaleStatus.Paid === status) {
|
if (ScaleStatus.Paid === status) {
|
||||||
paramsList = list.map(item => {return {...item, paymentMethod: key}})
|
paramsList = list.map((item) => {
|
||||||
|
return { ...item, paymentMethod: key };
|
||||||
|
});
|
||||||
}
|
}
|
||||||
ReceiveApi.updateOrderIn({ orderInPos: paramsList }).then((res) => {
|
ReceiveApi.updateOrderIn({ orderInPos: paramsList }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
@ -269,9 +301,8 @@ const handleSelect = () => {
|
||||||
};
|
};
|
||||||
const handleSelect1 = (key: string, v: any) => {
|
const handleSelect1 = (key: string, v: any) => {
|
||||||
contrlModalParams[key].isShow = false;
|
contrlModalParams[key].isShow = false;
|
||||||
// 修改订单状态
|
// 修改订单状态
|
||||||
updateStatus(ScaleStatus.Paid, v.key);
|
updateStatus(ScaleStatus.Paid, v.key);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const getList = (v?: boolean) => {
|
const getList = (v?: boolean) => {
|
||||||
|
@ -288,8 +319,10 @@ const getList = (v?: boolean) => {
|
||||||
pageSize: pageList.pageSize,
|
pageSize: pageList.pageSize,
|
||||||
pageNumber: pageList.pageNum,
|
pageNumber: pageList.pageNum,
|
||||||
scaleStatus: currentTab.value,
|
scaleStatus: currentTab.value,
|
||||||
userName: keyword.value
|
userName: keyword.value,
|
||||||
}).then((res:any) => {
|
startTime: filterState.startTime ? `${filterState.startTime} 00:00:00` : '',
|
||||||
|
endTime: filterState.startTime ? `${filterState.endTime} 00:00:00` : '',
|
||||||
|
}).then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
pageList.isLoading = false;
|
pageList.isLoading = false;
|
||||||
pageList.list = pageList.list.concat(
|
pageList.list = pageList.list.concat(
|
||||||
|
@ -305,20 +338,33 @@ onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
|
const statusList = ['待定价', '待过皮', '待审核', '待付款','已付款']
|
||||||
currentTab.value = parseInt((option as any).scaleStatus);
|
currentTab.value = parseInt((option as any).scaleStatus);
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: statusList[currentTab.value],
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.search-box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0rpx 22rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
view + view {
|
||||||
|
margin-left: 22rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
.search {
|
.search {
|
||||||
box-shadow: 0rpx 3rpx 16rpx 5rpx rgba(0, 0, 0, 0.2);
|
box-shadow: 0rpx 3rpx 16rpx 5rpx rgba(0, 0, 0, 0.2);
|
||||||
border-radius: 28rpx;
|
border-radius: 28rpx;
|
||||||
background: rgba(255, 255, 255, 0.86);
|
background: rgba(255, 255, 255, 0.86);
|
||||||
width: 80%;
|
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
margin-top: 30rpx;
|
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #c1c1c1;
|
color: #c1c1c1;
|
||||||
|
flex: 1;
|
||||||
> view {
|
> view {
|
||||||
line-height: 60rpx;
|
line-height: 60rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -329,6 +375,11 @@ onLoad((option) => {
|
||||||
margin-left: 15rpx;
|
margin-left: 15rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.fullTime {
|
||||||
|
font-size: 26rpx;
|
||||||
|
padding: 22rpx 22rpx 0rpx 22rpx;
|
||||||
|
color: #606266;
|
||||||
|
}
|
||||||
.card-box {
|
.card-box {
|
||||||
.c-tab {
|
.c-tab {
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
|
|
|
@ -1,4 +1,23 @@
|
||||||
<template>
|
<template>
|
||||||
|
<view class="search">
|
||||||
|
<u-search
|
||||||
|
placeholder="请输入供应商"
|
||||||
|
v-model="stateNew.keywoard"
|
||||||
|
:showAction="false"
|
||||||
|
:bgColor="'#fff'"
|
||||||
|
:borderColor="'rgba(0, 0, 0, 0.1)'"
|
||||||
|
:placeholderColor="'#C1C1C1'"
|
||||||
|
@search="handleSearch()"
|
||||||
|
@clear="handleSearch()"
|
||||||
|
></u-search>
|
||||||
|
<view class="btn" @click="stateNew.isShow = true">
|
||||||
|
{{
|
||||||
|
stateNew.currentDevice.name === "全部"
|
||||||
|
? "选择设备"
|
||||||
|
: stateNew.currentDevice.name
|
||||||
|
}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<page-view
|
<page-view
|
||||||
@loadList="
|
@loadList="
|
||||||
(v) => {
|
(v) => {
|
||||||
|
@ -20,7 +39,7 @@
|
||||||
<text class="number">收货单号:{{ item.receiptNumber }}</text>
|
<text class="number">收货单号:{{ item.receiptNumber }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<text class="name">{{ item.userName }}</text>
|
<text class="name">{{ item.userName }} {{item.cardNumber}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
|
@ -36,11 +55,12 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<text class="desc">过毛时间:{{ item.grossTime }}</text>
|
<text class="desc">过磅时间:{{ item.grossTime }}</text>
|
||||||
</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"
|
||||||
>单价:{{
|
>单价:{{
|
||||||
state.scaleStatus === 0 ? "未定价" : item.price + "元/KG"
|
state.scaleStatus === 0 ? "未定价" : item.price + "元/KG"
|
||||||
}}</text
|
}}</text
|
||||||
|
@ -48,14 +68,14 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="btn-box">
|
<view class="btn-box">
|
||||||
<u-button
|
<u-button
|
||||||
text="点击作废"
|
text="作废"
|
||||||
color="#E8E8E8"
|
color="#E8E8E8"
|
||||||
:customStyle="{ color: '#999' }"
|
:customStyle="{ color: '#999' }"
|
||||||
@click="handleModal(true, item.id as number)"
|
@click="handleModal(true, item.id as number)"
|
||||||
></u-button>
|
></u-button>
|
||||||
<u-button
|
<u-button
|
||||||
type="primary"
|
type="primary"
|
||||||
:text="state.scaleStatus === 0 ? '点击定价' : '点击编辑'"
|
:text="state.scaleStatus === 0 ? '定价' : '编辑'"
|
||||||
@click="pricingDetail(item.id as number)"
|
@click="pricingDetail(item.id as number)"
|
||||||
></u-button>
|
></u-button>
|
||||||
</view>
|
</view>
|
||||||
|
@ -71,13 +91,55 @@
|
||||||
@handleModal="(v:boolean) => {handleModal(v, deleteId)}"
|
@handleModal="(v:boolean) => {handleModal(v, deleteId)}"
|
||||||
@handleOk="handleOk()"
|
@handleOk="handleOk()"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<block>
|
||||||
|
<u-action-sheet
|
||||||
|
:actions="stateNew.deviceList"
|
||||||
|
:title="'选择设备'"
|
||||||
|
:show="stateNew.isShow"
|
||||||
|
@select="(v: any) => handleSelect(v)"
|
||||||
|
@close="stateNew.isShow = false"
|
||||||
|
:closeOnClickAction="true"
|
||||||
|
></u-action-sheet>
|
||||||
|
</block>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ReceiveApi } from "@/services/index";
|
import { ReceiveApi, DeviceApi } from "@/services/index";
|
||||||
import SmallModal from "@/components/Modal/smallModal.vue";
|
import SmallModal from "@/components/Modal/smallModal.vue";
|
||||||
import PageView from "@/components/PageView/index.vue";
|
import PageView from "@/components/PageView/index.vue";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { ScaleStatus } from "@/utils/enum";
|
import { DeviceType, ScaleStatus } from "@/utils/enum";
|
||||||
|
import _ from "underscore";
|
||||||
|
|
||||||
|
const stateNew = reactive<any>({
|
||||||
|
keywoard: "",
|
||||||
|
deviceList: [],
|
||||||
|
isShow: false,
|
||||||
|
currentDevice: {
|
||||||
|
name: "全部",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const handleSearch = () => {
|
||||||
|
resetPageList();
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 设备信息
|
||||||
|
DeviceApi.getDeviceList({ deviceType: DeviceType.Weighbridge }).then(
|
||||||
|
(res: any) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
stateNew.deviceList = [{ id: 0, name: "全部" }].concat(
|
||||||
|
_.map(res.data, function (item) {
|
||||||
|
return { name: item.deviceName, ...item };
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const handleSelect = (v: any) => {
|
||||||
|
stateNew.currentDevice = v;
|
||||||
|
};
|
||||||
|
|
||||||
const pageList: PageResult<Order> = reactive({
|
const pageList: PageResult<Order> = reactive({
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
@ -113,7 +175,7 @@ const pricingDetail = (id: number) => {
|
||||||
ReceiveApi.getDetailById({ id: id }).then((res: any) => {
|
ReceiveApi.getDetailById({ id: id }).then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
if (res.data.scaleStatus > 1) {
|
if (res.data.scaleStatus > 1) {
|
||||||
uni.showToast({title : '当前订单已处理'});
|
uni.showToast({ title: "当前订单已处理" });
|
||||||
resetPageList();
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
} else {
|
} else {
|
||||||
|
@ -138,6 +200,7 @@ 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,
|
||||||
};
|
};
|
||||||
pageList.isLoading = true;
|
pageList.isLoading = true;
|
||||||
ReceiveApi.getOrderPage(params).then((res) => {
|
ReceiveApi.getOrderPage(params).then((res) => {
|
||||||
|
@ -177,6 +240,22 @@ onLoad((option) => {
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.search {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin: 26rpx 26rpx 0rpx 26rpx;
|
||||||
|
.btn {
|
||||||
|
background: #00dcee;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
border: 1px solid #00dcee;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
margin-left: 50rpx;
|
||||||
|
padding: 6rpx 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
.card-box {
|
.card-box {
|
||||||
padding: 38rpx 50rpx;
|
padding: 38rpx 50rpx;
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
||||||
|
|
|
@ -66,14 +66,19 @@
|
||||||
</view>
|
</view>
|
||||||
<view v-if="getIsShow()"></view>
|
<view v-if="getIsShow()"></view>
|
||||||
<view v-for="(item, index) in gridList1" :key="index">
|
<view v-for="(item, index) in gridList1" :key="index">
|
||||||
<text v-if="item.name">{{ item.name }}:</text
|
<text v-if="item.name"
|
||||||
|
><text :class="{ bold: item.isBold }">{{ item.name }}</text
|
||||||
|
>:</text
|
||||||
><text>
|
><text>
|
||||||
{{ item.isBefore ? item.unit : "" }}
|
<text :class="{ bold: item.isBold }">
|
||||||
{{ item.num }}
|
{{ item.isBefore ? item.unit : "" }}
|
||||||
{{ item.isBefore ? "" : item.unit }}
|
{{ item.num }}
|
||||||
|
{{ item.isBefore ? "" : item.unit }}
|
||||||
|
</text>
|
||||||
|
|
||||||
<text
|
<text
|
||||||
v-if="
|
v-if="
|
||||||
item.name === '货款金额' &&
|
item.name === '实际付款' &&
|
||||||
ScaleStatus.ToBeReview === state.order.scaleStatus
|
ScaleStatus.ToBeReview === state.order.scaleStatus
|
||||||
"
|
"
|
||||||
@click="handleEdit()"
|
@click="handleEdit()"
|
||||||
|
@ -154,12 +159,12 @@
|
||||||
showCancelButton
|
showCancelButton
|
||||||
:confirmColor="'#00D2E3'"
|
:confirmColor="'#00D2E3'"
|
||||||
:show="isInput"
|
:show="isInput"
|
||||||
:title="'修改货款金额'"
|
:title="'修改实际付款'"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
@cancel="isInput = false"
|
@cancel="isInput = false"
|
||||||
>
|
>
|
||||||
<u-input
|
<u-input
|
||||||
placeholder="请输入货款金额"
|
placeholder="请输入实际付款"
|
||||||
type="number"
|
type="number"
|
||||||
v-model="amount"
|
v-model="amount"
|
||||||
></u-input>
|
></u-input>
|
||||||
|
@ -280,13 +285,15 @@ const gridList1 = reactive([
|
||||||
num: "",
|
num: "",
|
||||||
unit: "元",
|
unit: "元",
|
||||||
isBefore: false,
|
isBefore: false,
|
||||||
|
isBold: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "货款金额",
|
name: "实际付款",
|
||||||
enName: "balanceTotalPrice",
|
enName: "balanceTotalPrice",
|
||||||
num: "",
|
num: "",
|
||||||
unit: "元",
|
unit: "元",
|
||||||
isBefore: false,
|
isBefore: false,
|
||||||
|
isBold: true,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const getIsShow = () => {
|
const getIsShow = () => {
|
||||||
|
@ -428,7 +435,7 @@ onLoad((option) => {
|
||||||
item.unit = "%";
|
item.unit = "%";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (item.name === "货款金额") {
|
if (item.name === "实际付款") {
|
||||||
if (state.order[item.enName as string]) {
|
if (state.order[item.enName as string]) {
|
||||||
item.num = state.order[item.enName as string];
|
item.num = state.order[item.enName as string];
|
||||||
} else {
|
} else {
|
||||||
|
@ -532,6 +539,10 @@ onLoad((option) => {
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
width: max-content;
|
width: max-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bold {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.op-btn {
|
.op-btn {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
|
|
|
@ -78,3 +78,11 @@ export const getSupplierUserListLettera = (data: any) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 供应商用户修改名称
|
||||||
|
export const updateSupplierUserName = (data: any) => {
|
||||||
|
return http({
|
||||||
|
method: 'POST',
|
||||||
|
url: '/api/supplier/user/updateSupplierUserName',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.7 KiB |
|
@ -0,0 +1,7 @@
|
||||||
|
import type { DeviceType } from "@/utils/enum"
|
||||||
|
|
||||||
|
export type DeviceItem = {
|
||||||
|
id: number
|
||||||
|
deviceName: string,
|
||||||
|
deviceType: DeviceType
|
||||||
|
}
|
|
@ -29,7 +29,7 @@ interface Order {
|
||||||
points?: number; //扣点
|
points?: number; //扣点
|
||||||
buckleMiscellaneous?: number; //扣杂
|
buckleMiscellaneous?: number; //扣杂
|
||||||
price?: number; //单价
|
price?: number; //单价
|
||||||
balanceTotalPrice?: number; //结算总价 货款金额
|
balanceTotalPrice?: number; //结算总价 实际付款
|
||||||
totalPrice?: number; //实际总价 预估价格
|
totalPrice?: number; //实际总价 预估价格
|
||||||
weighingMethod?: number; //称重方式:0:有皮重 1:零皮重
|
weighingMethod?: number; //称重方式:0:有皮重 1:零皮重
|
||||||
multiCategory?: number; //多品类:0:单品类 1:多品类
|
multiCategory?: number; //多品类:0:单品类 1:多品类
|
||||||
|
@ -101,6 +101,8 @@ type PageParams = {
|
||||||
isDeleted?: boolean;
|
isDeleted?: boolean;
|
||||||
userName?: string; // 供应商名称
|
userName?: string; // 供应商名称
|
||||||
receiptNumber?: string;
|
receiptNumber?: string;
|
||||||
|
startTime?:string;
|
||||||
|
endTime?:string;
|
||||||
};
|
};
|
||||||
|
|
||||||
interface Shipment {
|
interface Shipment {
|
||||||
|
|
|
@ -0,0 +1,114 @@
|
||||||
|
import {ScaleStatus} from './enum'
|
||||||
|
export const timeList = [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "昨日",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "今日",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: "本周",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
name: "本月",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
name: "本年",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export const homeInitData = {
|
||||||
|
receiveList: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
title: "待定价",
|
||||||
|
icon: "1.png",
|
||||||
|
num: 0,
|
||||||
|
path: `/pagesReceive/pricing?scaleStatus=${ScaleStatus.ToBePriced}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
title: "待过皮重",
|
||||||
|
icon: "2.png",
|
||||||
|
num: 0,
|
||||||
|
path: `/pagesReceive/pricing?scaleStatus=${ScaleStatus.ToBeTare}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
title: "待审核",
|
||||||
|
icon: "3.png",
|
||||||
|
num: 0,
|
||||||
|
path: `/pagesReceive/payReview?scaleStatus=${ScaleStatus.ToBeReview}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
title: "待付款",
|
||||||
|
icon: "4.png",
|
||||||
|
num: 0,
|
||||||
|
path: `/pagesReceive/payReview?scaleStatus=${ScaleStatus.ToBePay}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
title: "已付款",
|
||||||
|
icon: "5.png",
|
||||||
|
num: 0,
|
||||||
|
path: `/pagesReceive/payList?scaleStatus=${ScaleStatus.Paid}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
title: "收货补单",
|
||||||
|
icon: "6.png",
|
||||||
|
num: 0,
|
||||||
|
path: "/pagesApp/receiveSpl",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
shipmentList: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
title: "待出货",
|
||||||
|
icon: "7.png",
|
||||||
|
num: 0,
|
||||||
|
path: "/pagesReceive/pricing?scaleStatus=0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
title: "待过毛重",
|
||||||
|
icon: "8.png",
|
||||||
|
num: 0,
|
||||||
|
path: "/pagesReceive/pricing?scaleStatus=0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
title: "待结算",
|
||||||
|
icon: "9.png",
|
||||||
|
num: 0,
|
||||||
|
path: "/pagesReceive/pricing?scaleStatus=0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
title: "待收款",
|
||||||
|
icon: "10.png",
|
||||||
|
num: 0,
|
||||||
|
path: "/pagesReceive/pricing?scaleStatus=0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
title: "已收款",
|
||||||
|
icon: "11.png",
|
||||||
|
num: 0,
|
||||||
|
path: "/pagesReceive/pricing?scaleStatus=0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
title: "出货补单",
|
||||||
|
icon: "12.png",
|
||||||
|
num: 0,
|
||||||
|
path: "/pagesReceive/pricing?scaleStatus=0",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
|
@ -36,6 +36,7 @@ const obj = {
|
||||||
if (token) {
|
if (token) {
|
||||||
options.header["x-userToken"] = token;
|
options.header["x-userToken"] = token;
|
||||||
}
|
}
|
||||||
|
options.header["code"] = 'hoe-cs';
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
// 请求拦截器
|
// 请求拦截器
|
||||||
|
|