update: 版本迭代完成90%
|
@ -1,167 +0,0 @@
|
||||||
<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});
|
|
||||||
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});
|
|
||||||
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>
|
|
|
@ -60,7 +60,7 @@
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import TimeDialog from "./components/TimeDialog.vue";
|
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
|
||||||
import CEcharts from "./Echarts/echarts.vue";
|
import CEcharts from "./Echarts/echarts.vue";
|
||||||
import ProductDialog from "./components/ProductDialog.vue";
|
import ProductDialog from "./components/ProductDialog.vue";
|
||||||
import { formatDate, getCurrentMonthStartAndEnd } from "@/utils";
|
import { formatDate, getCurrentMonthStartAndEnd } from "@/utils";
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
:key="index"
|
:key="index"
|
||||||
v-show="isShowModule(item.child)"
|
v-show="isShowModule(item.child)"
|
||||||
>
|
>
|
||||||
<view class="title">
|
<view class="title" :class="item.color">
|
||||||
<Title :title="item.title" />
|
<Title :title="item.title" />
|
||||||
</view>
|
</view>
|
||||||
<view class="box-content">
|
<view class="box-content">
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
>
|
>
|
||||||
<view v-if="isShowModule([{ title: child.title }])">
|
<view v-if="isShowModule([{ title: child.title }])">
|
||||||
<up-image
|
<up-image
|
||||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesStatistics/${child.icon}`"
|
:src="`${url}/static/110/count/${child.icon}`"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
width="60rpx"
|
width="60rpx"
|
||||||
height="60rpx"
|
height="60rpx"
|
||||||
|
@ -35,8 +35,6 @@
|
||||||
}}</view>
|
}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="line" v-show="index < list.length - 1"></view>
|
|
||||||
</view>
|
</view>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
@ -56,15 +54,17 @@ import Title from "@/components/Title/index.vue";
|
||||||
import TabBar from "@/components/TabBar/index.vue";
|
import TabBar from "@/components/TabBar/index.vue";
|
||||||
import { useMemberStore } from "@/store/index";
|
import { useMemberStore } from "@/store/index";
|
||||||
import { ProfileApi } from "@/services";
|
import { ProfileApi } from "@/services";
|
||||||
import pinia from '@/store'
|
import pinia from "@/store";
|
||||||
|
import { url } from "@/utils/data";
|
||||||
|
|
||||||
const store = useMemberStore(pinia);
|
const store = useMemberStore(pinia);
|
||||||
const list = reactive([
|
const list = reactive([
|
||||||
{
|
{
|
||||||
title: "收货",
|
title: "收货数据",
|
||||||
|
color: "green",
|
||||||
child: [
|
child: [
|
||||||
{
|
{
|
||||||
icon: "01.png",
|
icon: "1.png",
|
||||||
title: "收货汇总",
|
title: "收货汇总",
|
||||||
fn: (item: any) => {
|
fn: (item: any) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -73,7 +73,25 @@ const list = reactive([
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "02.png",
|
icon: "2.png",
|
||||||
|
title: "收货明细",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/receiveDetail", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "3.png",
|
||||||
|
title: "收货作废",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/receiveCl", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "4.png",
|
||||||
title: "供应商排行",
|
title: "供应商排行",
|
||||||
fn: (item: any) => {
|
fn: (item: any) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -84,10 +102,11 @@ const list = reactive([
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "出货",
|
title: "出货数据",
|
||||||
|
color: "blue",
|
||||||
child: [
|
child: [
|
||||||
{
|
{
|
||||||
icon: "03.png",
|
icon: "5.png",
|
||||||
title: "出货汇总",
|
title: "出货汇总",
|
||||||
fn: (item: any) => {
|
fn: (item: any) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -96,7 +115,25 @@ const list = reactive([
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "04.png",
|
icon: "6.png",
|
||||||
|
title: "出货明细",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/shipmentDetail", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "7.png",
|
||||||
|
title: "出货作废",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/shipmentCl", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "8.png",
|
||||||
title: "客户排行",
|
title: "客户排行",
|
||||||
fn: (item: any) => {
|
fn: (item: any) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -107,19 +144,11 @@ const list = reactive([
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "账本",
|
title: "我的账本",
|
||||||
|
color: "orange",
|
||||||
child: [
|
child: [
|
||||||
{
|
{
|
||||||
icon: "05.png",
|
icon: "10.png",
|
||||||
title: "经营概况",
|
|
||||||
fn: (item: any) => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesStatistics/businessOverview", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: "06.png",
|
|
||||||
title: "供应商对账",
|
title: "供应商对账",
|
||||||
fn: (item: any) => {
|
fn: (item: any) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -128,7 +157,7 @@ const list = reactive([
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "07.png",
|
icon: "11.png",
|
||||||
title: "客户对账",
|
title: "客户对账",
|
||||||
fn: (item: any) => {
|
fn: (item: any) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -136,6 +165,34 @@ const list = reactive([
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
icon: "12.png",
|
||||||
|
title: "付款明细",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/paymentDetail", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "13.png",
|
||||||
|
title: "收款明细",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/incomeDetail", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "14.png",
|
||||||
|
title: "经营概况",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesStatistics/businessOverview", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
@ -165,19 +222,41 @@ onMounted(() => {
|
||||||
.title {
|
.title {
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
padding: 0rpx 20rpx;
|
padding: 0rpx 20rpx;
|
||||||
|
&::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
margin-top: 13px;
|
||||||
|
margin-left: 0rpx;
|
||||||
|
width: 6rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
background: #22d594;
|
||||||
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
||||||
|
border-radius: 3rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.green {
|
||||||
|
&::before {
|
||||||
|
background: #22d594;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.blue {
|
||||||
|
&::before {
|
||||||
|
background: rgba(34, 114, 213, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.orange {
|
||||||
|
&::before {
|
||||||
|
background: rgba(255, 120, 43, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.box-content {
|
.box-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 22rpx 0rpx;
|
|
||||||
padding: 0rpx 20rpx;
|
padding: 0rpx 20rpx;
|
||||||
|
flex-wrap: wrap;
|
||||||
.box {
|
.box {
|
||||||
width: 142rpx;
|
width: 140rpx;
|
||||||
height: 142rpx;
|
height: 140rpx;
|
||||||
background: #f9f9f9;
|
|
||||||
border-radius: 26rpx;
|
border-radius: 26rpx;
|
||||||
// text-align: center;
|
|
||||||
// vertical-align: middle;
|
|
||||||
// display: grid;
|
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
@ -195,12 +274,8 @@ onMounted(() => {
|
||||||
> .box + .box {
|
> .box + .box {
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
}
|
}
|
||||||
::v-deep .u-transition {
|
.box:nth-child(5n) {
|
||||||
align-items: center;
|
margin-left: 0rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.line {
|
|
||||||
height: 18rpx;
|
|
||||||
background: #f8f8f8;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -18,15 +18,6 @@
|
||||||
name="arrow-down"
|
name="arrow-down"
|
||||||
@click="handleDialog('showTime', true)"
|
@click="handleDialog('showTime', true)"
|
||||||
></u-icon>
|
></u-icon>
|
||||||
<text class="status">{{
|
|
||||||
state.scaleStatus === -1
|
|
||||||
? "单据状态"
|
|
||||||
: getScaleStatus(1, state.scaleStatus)
|
|
||||||
}}</text>
|
|
||||||
<u-icon
|
|
||||||
name="arrow-down"
|
|
||||||
@click="handleDialog('showStatus', true)"
|
|
||||||
></u-icon>
|
|
||||||
<text class="btn" @click="handleDialog('showFilter', true)">筛选</text>
|
<text class="btn" @click="handleDialog('showFilter', true)">筛选</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
|
@ -133,13 +124,6 @@
|
||||||
@changeTime="changeTime"
|
@changeTime="changeTime"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 单据弹框 -->
|
|
||||||
<StatusDialog
|
|
||||||
:show="showDialog.showStatus"
|
|
||||||
:isShipment="false"
|
|
||||||
@handleDialog="(v:boolean) => {handleDialog('showStatus', v)}"
|
|
||||||
@changeStatus="changeStatus"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 筛选弹框 -->
|
<!-- 筛选弹框 -->
|
||||||
<FilterDialog
|
<FilterDialog
|
||||||
|
@ -150,15 +134,13 @@
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import TimeDialog from "./components/TimeDialog.vue";
|
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
|
||||||
import StatusDialog from "./components/StatusDialog.vue";
|
|
||||||
import FilterDialog from "./components/FilterDialog.vue";
|
import FilterDialog from "./components/FilterDialog.vue";
|
||||||
import { ReceiveApi } from "@/services";
|
import { ReceiveApi } from "@/services";
|
||||||
import {
|
import {
|
||||||
formatDate,
|
formatDate,
|
||||||
formatMoney,
|
formatMoney,
|
||||||
getCurrentMonthStartAndEnd,
|
getCurrentMonthStartAndEnd,
|
||||||
getScaleStatus,
|
|
||||||
} from "@/utils";
|
} from "@/utils";
|
||||||
const tableTitleList = reactive([
|
const tableTitleList = reactive([
|
||||||
{
|
{
|
||||||
|
@ -183,7 +165,6 @@ const showDialog = <
|
||||||
}
|
}
|
||||||
>reactive({
|
>reactive({
|
||||||
showTime: false,
|
showTime: false,
|
||||||
showStatus: false,
|
|
||||||
showFilter: false,
|
showFilter: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -206,8 +187,8 @@ const state = reactive<{
|
||||||
averagePrice: 0, // 平均单价
|
averagePrice: 0, // 平均单价
|
||||||
rankings: [],
|
rankings: [],
|
||||||
},
|
},
|
||||||
startTime: formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}"),
|
startTime: formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d} {h}:{i}:{s}"),
|
||||||
endTime: formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}"),
|
endTime: formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d} {h}:{i}:{s}"),
|
||||||
scaleStatus: -1,
|
scaleStatus: -1,
|
||||||
userId: -1,
|
userId: -1,
|
||||||
productId: -1,
|
productId: -1,
|
||||||
|
@ -219,11 +200,6 @@ const changeTime = (obj: any) => {
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
|
||||||
// 单据状态
|
|
||||||
const changeStatus = (obj: any) => {
|
|
||||||
state.scaleStatus = obj.id;
|
|
||||||
getList();
|
|
||||||
};
|
|
||||||
|
|
||||||
const changeOther = (obj: any) => {
|
const changeOther = (obj: any) => {
|
||||||
state.userId = obj.userId;
|
state.userId = obj.userId;
|
||||||
|
@ -237,8 +213,8 @@ const handleDialog = (key: string, v: boolean) => {
|
||||||
|
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
let params: any = {
|
let params: any = {
|
||||||
startTime: state.startTime + " 00:00:00",
|
startTime: state.startTime,
|
||||||
endTime: state.endTime + " 23:59:59",
|
endTime: state.endTime,
|
||||||
};
|
};
|
||||||
if (state.scaleStatus > -1) {
|
if (state.scaleStatus > -1) {
|
||||||
params.scaleStatus = state.scaleStatus;
|
params.scaleStatus = state.scaleStatus;
|
||||||
|
|
|
@ -18,15 +18,6 @@
|
||||||
name="arrow-down"
|
name="arrow-down"
|
||||||
@click="handleDialog('showTime', true)"
|
@click="handleDialog('showTime', true)"
|
||||||
></u-icon>
|
></u-icon>
|
||||||
<text class="status">{{
|
|
||||||
state.scaleStatus === -1
|
|
||||||
? "单据状态"
|
|
||||||
: getScaleStatus(1, state.scaleStatus)
|
|
||||||
}}</text>
|
|
||||||
<u-icon
|
|
||||||
name="arrow-down"
|
|
||||||
@click="handleDialog('showStatus', true)"
|
|
||||||
></u-icon>
|
|
||||||
<text class="btn" @click="handleDialog('showFilter', true)">筛选</text>
|
<text class="btn" @click="handleDialog('showFilter', true)">筛选</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
|
@ -131,14 +122,6 @@
|
||||||
@changeTime="changeTime"
|
@changeTime="changeTime"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 单据弹框 -->
|
|
||||||
<StatusDialog
|
|
||||||
:show="showDialog.showStatus"
|
|
||||||
:isShipment="true"
|
|
||||||
@handleDialog="(v:boolean) => {handleDialog('showStatus', v)}"
|
|
||||||
@changeStatus="changeStatus"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 筛选弹框 -->
|
<!-- 筛选弹框 -->
|
||||||
<FilterDialog
|
<FilterDialog
|
||||||
:show="showDialog.showFilter"
|
:show="showDialog.showFilter"
|
||||||
|
@ -148,8 +131,7 @@
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import TimeDialog from "./components/TimeDialog.vue";
|
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
|
||||||
import StatusDialog from "./components/StatusDialog.vue";
|
|
||||||
import FilterDialog from "./components/FilterDialog.vue";
|
import FilterDialog from "./components/FilterDialog.vue";
|
||||||
import { ShipmentApi } from "@/services";
|
import { ShipmentApi } from "@/services";
|
||||||
import {
|
import {
|
||||||
|
@ -181,7 +163,6 @@ const showDialog = <
|
||||||
}
|
}
|
||||||
>reactive({
|
>reactive({
|
||||||
showTime: false,
|
showTime: false,
|
||||||
showStatus: false,
|
|
||||||
showFilter: false,
|
showFilter: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -204,8 +185,8 @@ const state = reactive<{
|
||||||
averagePrice: 0, // 平均单价
|
averagePrice: 0, // 平均单价
|
||||||
rankings: [],
|
rankings: [],
|
||||||
},
|
},
|
||||||
startTime: formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}"),
|
startTime: formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d} {h}:{i}:{s}"),
|
||||||
endTime: formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}"),
|
endTime: formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d} {h}:{i}:{s}"),
|
||||||
scaleStatus: -1,
|
scaleStatus: -1,
|
||||||
userId: -1,
|
userId: -1,
|
||||||
productId: -1,
|
productId: -1,
|
||||||
|
@ -217,11 +198,6 @@ const changeTime = (obj: any) => {
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
|
||||||
const changeStatus = (obj: any) => {
|
|
||||||
state.scaleStatus = obj.id;
|
|
||||||
getList();
|
|
||||||
};
|
|
||||||
|
|
||||||
const changeOther = (obj: any) => {
|
const changeOther = (obj: any) => {
|
||||||
state.userId = obj.userId;
|
state.userId = obj.userId;
|
||||||
state.productId = obj.productId;
|
state.productId = obj.productId;
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import TimeDialog from "./components/TimeDialog.vue";
|
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
|
||||||
import CEcharts from "./Echarts/echarts.vue";
|
import CEcharts from "./Echarts/echarts.vue";
|
||||||
import ProductDialog from "./components/ProductDialog.vue";
|
import ProductDialog from "./components/ProductDialog.vue";
|
||||||
import { ReceiveApi } from "@/services";
|
import { ReceiveApi } from "@/services";
|
||||||
|
|
|
@ -2,20 +2,43 @@
|
||||||
<u-popup :show="show" mode="bottom" :round="10" :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 v-if="isShipment">
|
||||||
|
<view v-for="(item, index) in state.list" :key="index">
|
||||||
|
<view class="first-title">{{ item.shmCategoryName }}</view>
|
||||||
|
<view v-for="(cItem, cIndex) in item.childrenList" :key="cIndex">
|
||||||
|
<view class="second-title">{{ cItem.shmCategoryName }}</view>
|
||||||
|
|
||||||
|
<view class="dialog-product-layout">
|
||||||
|
<view v-if="cItem.childrenLists">
|
||||||
|
<text
|
||||||
|
v-for="(child, childIndex) in cItem.childrenLists"
|
||||||
|
:key="childIndex"
|
||||||
|
:class="{ active: state.current === child.childIndex }"
|
||||||
|
@click="handleSelect(child)"
|
||||||
|
>{{ child.shmProductsName }}</text
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-else style="flex: auto">
|
||||||
|
<u-empty
|
||||||
|
mode="data"
|
||||||
|
icon="http://cdn.uviewui.com/uview/empty/data.png"
|
||||||
|
>
|
||||||
|
</u-empty>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="dialog-product-layout" v-else>
|
||||||
<text
|
<text
|
||||||
v-for="(item, index) in state.list"
|
v-for="(item, index) in state.list"
|
||||||
:class="{ active: state.current === item.id }"
|
:class="{ active: state.current === item.id }"
|
||||||
@click="handleSelect(item)"
|
@click="handleSelect(item)"
|
||||||
:key="index"
|
:key="index"
|
||||||
>{{isShipment ? item.shmProductsName : item.reProductsName }}</text
|
>{{ isShipment ? item.shmProductsName : item.reProductsName }}</text
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="btn-confirm">
|
|
||||||
<view class="btn">
|
|
||||||
<u-button type="primary" :text="'确认'"></u-button>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
</template>
|
</template>
|
||||||
|
@ -42,9 +65,17 @@ const handleSelect = (item: any) => {
|
||||||
};
|
};
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
if (props.isShipment) {
|
if (props.isShipment) {
|
||||||
GoodsApi.getShipmentProductList().then((res) => {
|
// GoodsApi.getShipmentProductList().then((res) => {
|
||||||
|
// if (res.code === 200) {
|
||||||
|
// state.list = res.data;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
GoodsApi.getChildrenList().then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
state.list = res.data;
|
if (res.code === 200) {
|
||||||
|
state.list = res.data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -63,6 +94,7 @@ onMounted(() => {
|
||||||
.c-dialog-filter {
|
.c-dialog-filter {
|
||||||
width: 95vw;
|
width: 95vw;
|
||||||
padding: 25rpx;
|
padding: 25rpx;
|
||||||
|
overflow-y: scroll;
|
||||||
.title {
|
.title {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
@ -70,12 +102,22 @@ onMounted(() => {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.first-title {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
.second-title {
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: rgba(0, 0, 0, 0.7);
|
||||||
|
margin: 20rpx;
|
||||||
|
}
|
||||||
// 产品dialog
|
// 产品dialog
|
||||||
.dialog-product-layout {
|
.dialog-product-layout {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
||||||
border-radius: 13rpx;
|
border-radius: 13rpx;
|
||||||
margin: 42rpx 25rpx;
|
margin: 30rpx 24rpx;
|
||||||
padding: 19rpx;
|
padding: 20rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
@ -3,52 +3,45 @@
|
||||||
:show="show"
|
:show="show"
|
||||||
mode="bottom"
|
mode="bottom"
|
||||||
:round="10"
|
:round="10"
|
||||||
:closeable="true"
|
:closeable="false"
|
||||||
@close="handleClose"
|
@close="handleClose"
|
||||||
>
|
>
|
||||||
<view class="c-dialog">
|
<view class="c-dialog">
|
||||||
<view class="box"><text>常用时间选择</text></view>
|
<view class="confrim-box">
|
||||||
|
<text @click="cancel()">取消</text>
|
||||||
|
<text class="btn" @click="confirm()">完成</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- :class="{ active: state.currentStates === item.id }" -->
|
||||||
|
|
||||||
<view class="box-btn">
|
<view class="box-btn">
|
||||||
<text
|
<text
|
||||||
v-for="(item, index) in state.statusList"
|
v-for="(item, index) in state.statusList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:class="{ active: state.currentStates === item.id }"
|
|
||||||
@click="handleSelect(item)"
|
@click="handleSelect(item)"
|
||||||
>{{ item.name }}</text
|
>{{ item.name }}</text
|
||||||
></view
|
></view
|
||||||
>
|
>
|
||||||
<view class="box box-border"
|
|
||||||
><text>其它时间选择</text
|
|
||||||
><text class="btn" @click="handleCustom()">自定义</text></view
|
|
||||||
>
|
|
||||||
|
|
||||||
<view v-if="showCalendar">
|
<view class="timeBox">
|
||||||
<view class="line"></view>
|
<uni-datetime-picker
|
||||||
<view class="box">
|
class="my-datetime-picker"
|
||||||
<text @click="showCalendar = false">取消</text>
|
v-model="state.datetimerange"
|
||||||
<text class="btn" @click="confirm()">完成</text>
|
type="datetimerange"
|
||||||
</view>
|
rangeSeparator="-"
|
||||||
<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>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { formatDate, getCurrentMonthStartAndEnd, getCurrentYearStartAndEnd, timeRange } from "@/utils";
|
import { formatDate, timeRange } from "@/utils";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
show: boolean;
|
show: boolean;
|
||||||
}>();
|
}>();
|
||||||
const state = reactive<any>({
|
const state = reactive<any>({
|
||||||
|
datetimerange: [],
|
||||||
startTime: "",
|
startTime: "",
|
||||||
endTime: "",
|
endTime: "",
|
||||||
currentStates: -1,
|
currentStates: -1,
|
||||||
|
@ -75,47 +68,27 @@ const emit = defineEmits(["handleDialog", "changeTime"]);
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
emit("handleDialog", false);
|
emit("handleDialog", false);
|
||||||
};
|
};
|
||||||
const handleCustom = () => {
|
|
||||||
showCalendar.value = true
|
|
||||||
state.currentStates = -1
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleSelect = (item: any) => {
|
const handleSelect = (item: any) => {
|
||||||
|
|
||||||
state.currentStates = item.id;
|
state.currentStates = item.id;
|
||||||
const range = timeRange(item.id)
|
const range = timeRange(item.id);
|
||||||
state.startTime = range.startTime;
|
state.startTime = range.startTime + ' 00:00:00';
|
||||||
state.endTime = range.endTime
|
state.endTime = range.endTime + ' 23:59:59';
|
||||||
|
state.datetimerange = [state.startTime, state.endTime]
|
||||||
emit("changeTime", {startTime: state.startTime, endTime: state.endTime, name: item.name});
|
|
||||||
emit("handleDialog", false);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const showCalendar = ref(false);
|
const cancel = () => {
|
||||||
const handleChangeDate = (v: any) => {
|
emit("handleDialog", false)
|
||||||
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 = () => {
|
const confirm = () => {
|
||||||
showCalendar.value = false
|
emit("changeTime", {
|
||||||
emit("changeTime", {startTime: state.startTime, endTime: state.endTime, name: '自定义'});
|
startTime: state.datetimerange[0],
|
||||||
|
endTime: state.datetimerange[1],
|
||||||
|
name: "自定义",
|
||||||
|
});
|
||||||
emit("handleDialog", false);
|
emit("handleDialog", false);
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep .u-popup__content {
|
::v-deep .u-popup__content {
|
||||||
|
@ -123,7 +96,7 @@ const confirm = () => {
|
||||||
border-radius: 32rpx 32rpx 0rpx 0rpx;
|
border-radius: 32rpx 32rpx 0rpx 0rpx;
|
||||||
}
|
}
|
||||||
.c-dialog {
|
.c-dialog {
|
||||||
margin: 65.38rpx 44.87rpx;
|
margin: 22rpx;
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
@ -133,6 +106,11 @@ const confirm = () => {
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
.btn {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: $u-primary;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.box-btn {
|
.box-btn {
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
|
@ -153,11 +131,7 @@ const confirm = () => {
|
||||||
color: $u-primary;
|
color: $u-primary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btn {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: $u-primary;
|
|
||||||
}
|
|
||||||
.box-border {
|
.box-border {
|
||||||
border-top: 1px solid rgba(233, 233, 233, 0.76);
|
border-top: 1px solid rgba(233, 233, 233, 0.76);
|
||||||
}
|
}
|
||||||
|
@ -166,4 +140,23 @@ const confirm = () => {
|
||||||
background: #f8f8f8;
|
background: #f8f8f8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.confrim-box {
|
||||||
|
line-height: 80rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
.btn {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: $u-primary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.timeBox {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
text {
|
||||||
|
margin: 0rpx 22rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<up-image
|
<up-image
|
||||||
src="https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/message.png"
|
:src="`${url}/static/pages/message.png`"
|
||||||
width="42rpx"
|
width="42rpx"
|
||||||
height="36rpx"
|
height="36rpx"
|
||||||
></up-image>
|
></up-image>
|
||||||
|
@ -22,37 +22,36 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import {url} from "@/utils/data";
|
||||||
import {
|
import {
|
||||||
ProfileApi,
|
// ProfileApi,
|
||||||
ReceiveApi,
|
// ReceiveApi,
|
||||||
ShipmentApi,
|
// ShipmentApi,
|
||||||
PictureApi,
|
// PictureApi,
|
||||||
ReceiveProductApi,
|
// ReceiveProductApi,
|
||||||
DeviceApi,
|
DeviceApi,
|
||||||
StockCardApi,
|
StockCardApi,
|
||||||
GoodsApi,
|
// GoodsApi,
|
||||||
SupplierApi,
|
SupplierApi,
|
||||||
CustomerApi,
|
CustomerApi,
|
||||||
FinanceApi,
|
FinanceApi,
|
||||||
MessageApi,
|
OtherConfigApi
|
||||||
} from "@/services";
|
} from "@/services";
|
||||||
import { formatDate } from "@/utils";
|
|
||||||
import { UsersType } from "@/utils/enum";
|
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
ProfileApi,
|
// ProfileApi,
|
||||||
ReceiveApi,
|
// ReceiveApi,
|
||||||
ShipmentApi,
|
// ShipmentApi,
|
||||||
PictureApi,
|
// PictureApi,
|
||||||
ReceiveProductApi,
|
// ReceiveProductApi,
|
||||||
DeviceApi,
|
DeviceApi,
|
||||||
StockCardApi,
|
StockCardApi,
|
||||||
GoodsApi,
|
// GoodsApi,
|
||||||
SupplierApi,
|
SupplierApi,
|
||||||
CustomerApi,
|
CustomerApi,
|
||||||
FinanceApi,
|
FinanceApi,
|
||||||
formatDate,
|
OtherConfigApi,
|
||||||
UsersType,
|
|
||||||
valid
|
valid
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<up-row customStyle="flex-wrap: wrap">
|
<up-row customStyle="flex-wrap: wrap" :gutter="8">
|
||||||
<up-col span="6" v-for="(item, index) in list" :key="index">
|
<up-col span="6" v-for="(item, index) in list" :key="index">
|
||||||
<view class="grid-item">
|
<view class="grid-item">
|
||||||
<up-image
|
<up-image
|
||||||
|
|
|
@ -1,41 +1,44 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 工作台底部菜单 -->
|
<!-- 工作台底部菜单 -->
|
||||||
<uni-transition mode-class="fade" :duration="100" :show="true">
|
<uni-transition mode-class="fade" :duration="100" :show="true">
|
||||||
<up-tabbar
|
<view class="custom-tabbar">
|
||||||
:value="select"
|
<up-tabbar
|
||||||
:fixed="true"
|
:value="select"
|
||||||
:placeholder="true"
|
:fixed="true"
|
||||||
:safeAreaInsetBottom="true"
|
:placeholder="true"
|
||||||
activeColor="#00DCEE"
|
:safeAreaInsetBottom="true"
|
||||||
:border="false"
|
activeColor="#00DCEE"
|
||||||
>
|
:border="false"
|
||||||
<up-tabbar-item
|
|
||||||
v-if="state.list.length > 0"
|
|
||||||
v-for="item in state.list"
|
|
||||||
:key="item.text"
|
|
||||||
:text="item.text"
|
|
||||||
@click="handleClick(item)"
|
|
||||||
:name="item.text"
|
|
||||||
>
|
>
|
||||||
<template #active-icon>
|
<up-tabbar-item
|
||||||
<image
|
v-if="state.list.length > 0"
|
||||||
:src="`/static/img/tabBar/${item.activeIcon}`"
|
v-for="item in state.list"
|
||||||
class="custom-img"
|
:key="item.text"
|
||||||
></image>
|
:text="item.text"
|
||||||
</template>
|
@click="handleClick(item)"
|
||||||
<template #inactive-icon>
|
:name="item.text"
|
||||||
<image
|
>
|
||||||
:src="`/static/img/tabBar/${item.icon}`"
|
<template #active-icon>
|
||||||
class="custom-img"
|
<image
|
||||||
></image>
|
:src="`${url}/static/110/tabBar/${item.activeIcon}`"
|
||||||
</template>
|
class="custom-img"
|
||||||
</up-tabbar-item>
|
></image>
|
||||||
</up-tabbar>
|
</template>
|
||||||
|
<template #inactive-icon>
|
||||||
|
<image
|
||||||
|
:src="`${url}/static/110/tabBar/${item.icon}`"
|
||||||
|
class="custom-img"
|
||||||
|
></image>
|
||||||
|
</template>
|
||||||
|
</up-tabbar-item>
|
||||||
|
</up-tabbar>
|
||||||
|
</view>
|
||||||
</uni-transition>
|
</uni-transition>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onLaunch } from "@dcloudio/uni-app";
|
import { onLaunch } from "@dcloudio/uni-app";
|
||||||
|
import {url} from "@/utils/data";
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
select: string;
|
select: string;
|
||||||
|
@ -64,10 +67,17 @@ const state = reactive({
|
||||||
activeIcon: "count_active.png",
|
activeIcon: "count_active.png",
|
||||||
path: "/pagesStatistics/index",
|
path: "/pagesStatistics/index",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
text: "配置",
|
text: "配置",
|
||||||
icon: "config.png",
|
icon: "config.png",
|
||||||
activeIcon: "config_active.png",
|
activeIcon: "config_active.png",
|
||||||
|
path: "/pagesConfig/index",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "配置旧",
|
||||||
|
icon: "config.png",
|
||||||
|
activeIcon: "config_active.png",
|
||||||
path: "/pagesHome/index1",
|
path: "/pagesHome/index1",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -95,13 +105,16 @@ onLaunch(() => {
|
||||||
width: 35rpx;
|
width: 35rpx;
|
||||||
height: 35rpx;
|
height: 35rpx;
|
||||||
}
|
}
|
||||||
.u-tabbar {
|
::v-deep .custom-tabbar {
|
||||||
background: #ffffff;
|
> view {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
> view {
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
background: #ffffff;
|
||||||
}
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
::v-deep.u-tabbar__content {
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
}
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
&:nth-child(1) {
|
||||||
|
height: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -14,5 +14,7 @@ const props = defineProps<{
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
|
padding: 0px 20rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -50,12 +50,6 @@
|
||||||
"navigationBarTitleText": "登陆"
|
"navigationBarTitleText": "登陆"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "login/forgetPwd",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "忘记密码"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "message/index",
|
"path": "message/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -75,13 +69,6 @@
|
||||||
"navigationBarTitleText": "基础信息",
|
"navigationBarTitleText": "基础信息",
|
||||||
"navigationBarBackgroundColor": "#FFFFFF"
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "profile/modifyPwd",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "修改密码",
|
|
||||||
"navigationBarBackgroundColor": "#FFFFFF"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -150,9 +137,22 @@
|
||||||
{
|
{
|
||||||
"path": "shipmentSettlement",
|
"path": "shipmentSettlement",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "出货结算"
|
"navigationBarTitleText": "待结算"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pendingPayment",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "待收款"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "receivedPayment",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "已收款"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "review/index",
|
"path": "review/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -256,9 +256,45 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"root": "pagesConfig",
|
||||||
|
"pages": [
|
||||||
|
{
|
||||||
|
"path": "index",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"navigationBarTitleText": "配置"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "printTemplate",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "打印模板配置"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "printDetail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "打印详情"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "otherConfig",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "其他配置"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"root": "pagesApp",
|
"root": "pagesApp",
|
||||||
"pages": [
|
"pages": [
|
||||||
|
{
|
||||||
|
"path": "supplierOrCustomerList",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "列表"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "receiveSpl",
|
"path": "receiveSpl",
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -364,7 +400,7 @@
|
||||||
{
|
{
|
||||||
"path": "incomeDetail",
|
"path": "incomeDetail",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "收入明细"
|
"navigationBarTitleText": "收款明细"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -442,7 +478,7 @@
|
||||||
{
|
{
|
||||||
"path": "components/addIncomeDetail",
|
"path": "components/addIncomeDetail",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "新增收入明细"
|
"navigationBarTitleText": "新增收款明细"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -466,25 +502,7 @@
|
||||||
// }
|
// }
|
||||||
],
|
],
|
||||||
"tabbar": {
|
"tabbar": {
|
||||||
"custom": true, //隐藏官方选项卡
|
"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",
|
||||||
|
|
|
@ -1,169 +0,0 @@
|
||||||
<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>
|
|
|
@ -273,7 +273,8 @@ onLoad((option) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -309,7 +309,7 @@ const handleUpload = () => {
|
||||||
...(res.data as any),
|
...(res.data as any),
|
||||||
businessId: model1.order.id,
|
businessId: model1.order.id,
|
||||||
imagesType: ImagesType.NORMARL, // 普通资源
|
imagesType: ImagesType.NORMARL, // 普通资源
|
||||||
orderType: OrderType.Income, // 收入明细
|
orderType: OrderType.Income, // 收款明细
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -420,7 +420,8 @@ const handleTime = (v: any) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -428,7 +428,7 @@ const handleUpload = () => {
|
||||||
...(res.data as any),
|
...(res.data as any),
|
||||||
businessId: model1.order.id,
|
businessId: model1.order.id,
|
||||||
imagesType: ImagesType.NORMARL, // 普通资源
|
imagesType: ImagesType.NORMARL, // 普通资源
|
||||||
orderType: OrderType.Pay, // 收入明细
|
orderType: OrderType.Pay, // 收款明细
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -542,7 +542,8 @@ const handleTime = (v: any) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -349,7 +349,8 @@ onLoad((option) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -190,7 +190,8 @@ onLoad((option) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -259,7 +259,8 @@ onLoad((option) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -267,7 +267,8 @@ onLoad((option) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -231,7 +231,8 @@ onLoad((option) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -209,7 +209,8 @@ onLoad((option) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -412,7 +412,8 @@ onLoad((option: any) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -190,7 +190,8 @@ onLoad((option) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<u-form
|
<u-form
|
||||||
labelPosition="left"
|
labelPosition="left"
|
||||||
:model="model1"
|
:model="model1"
|
||||||
:rules="model1.formData.id ? rules2 : rules1"
|
:rules="rules1"
|
||||||
ref="form"
|
ref="form"
|
||||||
:labelWidth="100"
|
:labelWidth="100"
|
||||||
:labelStyle="{ padding: '0rpx 10rpx' }"
|
:labelStyle="{ padding: '0rpx 10rpx' }"
|
||||||
|
@ -13,10 +13,25 @@
|
||||||
:prop="`formData.${item.key}`"
|
:prop="`formData.${item.key}`"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:required="item.required"
|
:required="item.required"
|
||||||
v-for="(item, index) in model1.formData.id ? formAttrList2 : formAttrList1"
|
v-for="(item, index) in formAttrList1"
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="item.fn"
|
@click="item.fn"
|
||||||
>
|
>
|
||||||
|
<u-radio-group
|
||||||
|
v-if="item.type === 'radio'"
|
||||||
|
v-model="(model1.formData as any)[item.key]"
|
||||||
|
placement="row"
|
||||||
|
>
|
||||||
|
<u-radio
|
||||||
|
v-for="(c, index) in item.child"
|
||||||
|
:key="index"
|
||||||
|
activeColor="#00DCEE"
|
||||||
|
:label="c.name"
|
||||||
|
:name="c.id"
|
||||||
|
:customStyle="{ marginRight: '10px' }"
|
||||||
|
></u-radio>
|
||||||
|
</u-radio-group>
|
||||||
|
|
||||||
<u-textarea
|
<u-textarea
|
||||||
v-if="item.type === 'textarea'"
|
v-if="item.type === 'textarea'"
|
||||||
v-model="(model1.formData as any)[item.key]"
|
v-model="(model1.formData as any)[item.key]"
|
||||||
|
@ -51,7 +66,7 @@
|
||||||
</template>
|
</template>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u-form>
|
</u-form>
|
||||||
<block v-for="(item, index) in model1.formData.id ? formAttrList2 : formAttrList1" :key="index">
|
<block v-for="(item, index) in formAttrList1" :key="index">
|
||||||
<u-action-sheet
|
<u-action-sheet
|
||||||
v-if="item.type === 'select'"
|
v-if="item.type === 'select'"
|
||||||
:actions="contrlModalParams[item.childKey].list"
|
:actions="contrlModalParams[item.childKey].list"
|
||||||
|
@ -84,15 +99,11 @@ const handleInput = (e: any, item: any) => {
|
||||||
model1.formData[item.key] = temp;
|
model1.formData[item.key] = temp;
|
||||||
}, 10);
|
}, 10);
|
||||||
}
|
}
|
||||||
if (item.key === "password") {
|
|
||||||
const temp = e?.replace(valid.valid_no_cn, "");
|
|
||||||
setTimeout(() => {
|
|
||||||
(model1.formData as any)[item.key] = temp;
|
|
||||||
}, 10);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
const model1 = reactive<any>({
|
const model1 = reactive<any>({
|
||||||
formData: {},
|
formData: {
|
||||||
|
gender: 1
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const rules1 = ref({
|
const rules1 = ref({
|
||||||
"formData.roleName": {
|
"formData.roleName": {
|
||||||
|
@ -101,30 +112,16 @@ const rules1 = ref({
|
||||||
message: "请选择用户角色",
|
message: "请选择用户角色",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
"formData.userName": {
|
"formData.name": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入账号",
|
message: "请输入姓名",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
"formData.password": {
|
"formData.phone": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入密码",
|
message: "请输入手机号",
|
||||||
trigger: ["blur", "change"],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const rules2 = ref({
|
|
||||||
"formData.roleName": {
|
|
||||||
type: "string",
|
|
||||||
required: true,
|
|
||||||
message: "请选择用户角色",
|
|
||||||
trigger: ["blur", "change"],
|
|
||||||
},
|
|
||||||
"formData.userName": {
|
|
||||||
type: "string",
|
|
||||||
required: true,
|
|
||||||
message: "请输入账号",
|
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -155,16 +152,22 @@ const formAttrList1 = reactive<any>([
|
||||||
name: "姓名",
|
name: "姓名",
|
||||||
key: "name",
|
key: "name",
|
||||||
type: "input",
|
type: "input",
|
||||||
|
required: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "性别",
|
name: "性别",
|
||||||
key: "genderName",
|
key: "gender",
|
||||||
type: "select",
|
type: "radio",
|
||||||
childKey: "gender",
|
child: [
|
||||||
fn: () => {
|
{
|
||||||
contrlModalParams.gender.isShow = true;
|
id: 1,
|
||||||
contrlModalParams.gender.title = "选择性别";
|
name: "男",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "女",
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "用户角色",
|
name: "用户角色",
|
||||||
|
@ -178,74 +181,18 @@ const formAttrList1 = reactive<any>([
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "账号",
|
name: "手机号",
|
||||||
key: "userName",
|
|
||||||
type: "input",
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "密码",
|
|
||||||
key: "password",
|
|
||||||
type: "input",
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "联系手机",
|
|
||||||
key: "phone",
|
key: "phone",
|
||||||
type: "input",
|
type: "input",
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const formAttrList2 = reactive<any>([
|
|
||||||
{
|
|
||||||
name: "姓名",
|
|
||||||
key: "name",
|
|
||||||
type: "input",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "性别",
|
|
||||||
key: "genderName",
|
|
||||||
type: "select",
|
|
||||||
childKey: "gender",
|
|
||||||
fn: () => {
|
|
||||||
contrlModalParams.gender.isShow = true;
|
|
||||||
contrlModalParams.gender.title = "选择性别";
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "用户角色",
|
|
||||||
key: "roleName",
|
|
||||||
type: "select",
|
|
||||||
childKey: "role",
|
|
||||||
required: true,
|
|
||||||
fn: () => {
|
|
||||||
contrlModalParams.role.isShow = true;
|
|
||||||
contrlModalParams.role.title = "选择角色";
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "账号",
|
|
||||||
key: "userName",
|
|
||||||
type: "input",
|
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "联系手机",
|
|
||||||
key: "phone",
|
|
||||||
type: "input",
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const handleSelect = (key: string, v: any) => {
|
const handleSelect = (key: string, v: any) => {
|
||||||
contrlModalParams[key].isShow = false;
|
contrlModalParams[key].isShow = false;
|
||||||
if (key === "role") {
|
if (key === "role") {
|
||||||
model1.formData.roleName = v.name;
|
model1.formData.roleName = v.name;
|
||||||
model1.formData.roleIds = [v.id];
|
model1.formData.roleIds = [v.id];
|
||||||
}
|
}
|
||||||
if (key === "gender") {
|
|
||||||
model1.formData.genderName = v.name;
|
|
||||||
model1.formData.gender = v.id;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const form = ref();
|
const form = ref();
|
||||||
|
@ -273,17 +220,6 @@ const save = () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!model1.formData.id) {
|
|
||||||
if (model1.formData.password) {
|
|
||||||
if (!valid.valid_password.pattern.test(model1.formData.password)) {
|
|
||||||
uni.showToast({
|
|
||||||
icon: "none",
|
|
||||||
title: valid.valid_password.message,
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
check().then((res) => {
|
check().then((res) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
|
@ -295,7 +231,7 @@ const save = () => {
|
||||||
const startSave = () => {
|
const startSave = () => {
|
||||||
if (model1.formData.id) {
|
if (model1.formData.id) {
|
||||||
ProfileApi.updateUserById({
|
ProfileApi.updateUserById({
|
||||||
name: model1.formData.name,
|
name: model1.formData.name,
|
||||||
id: model1.formData.id,
|
id: model1.formData.id,
|
||||||
roleIds: model1.formData.roleIds,
|
roleIds: model1.formData.roleIds,
|
||||||
userName: model1.formData.userName,
|
userName: model1.formData.userName,
|
||||||
|
@ -330,15 +266,19 @@ onMounted(() => {
|
||||||
getRoleList();
|
getRoleList();
|
||||||
});
|
});
|
||||||
|
|
||||||
onLoad((option) => {
|
onLoad((option: any) => {
|
||||||
// 接收传递的标题参数;
|
// 接收传递的标题参数;
|
||||||
const title = (option as any).title;
|
const title = option.title;
|
||||||
const obj = JSON.parse((option as any).item);
|
if (option.item) {
|
||||||
model1.formData = { ...obj, genderName: ["未知", "男", "女"][obj.gender] };
|
const obj = JSON.parse(option.item);
|
||||||
if (obj.roleVos.length > 0) {
|
model1.formData = { ...obj, genderName: ["未知", "男", "女"][obj.gender] };
|
||||||
model1.formData.roleIds = [obj.roleVos[0].id];
|
debugger
|
||||||
model1.formData.roleName = obj.roleVos[0].roleName;
|
if (obj.roleVos.length > 0) {
|
||||||
|
model1.formData.roleIds = [obj.roleVos[0].id];
|
||||||
|
model1.formData.roleName = obj.roleVos[0].roleName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置页面标题;
|
// 设置页面标题;
|
||||||
if (title) {
|
if (title) {
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
|
@ -368,7 +308,8 @@ onLoad((option) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
@search="handleSearch()"
|
@search="handleSearch()"
|
||||||
@clear="handleSearch()"
|
@clear="handleSearch()"
|
||||||
></u-search>
|
></u-search>
|
||||||
<view class="btn" @click="add"> 新增 </view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<page-view
|
<page-view
|
||||||
|
@ -41,6 +40,10 @@
|
||||||
</page-view>
|
</page-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="btn-box-fix-btn">
|
||||||
|
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
|
||||||
|
</view>
|
||||||
|
|
||||||
<SmallModal
|
<SmallModal
|
||||||
:title="'确认删除吗?'"
|
:title="'确认删除吗?'"
|
||||||
:content="'确认删除后,不能恢复!'"
|
:content="'确认删除后,不能恢复!'"
|
||||||
|
@ -81,7 +84,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const add = () => {
|
const add = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
import { FinanceApi } from "@/services";
|
import { FinanceApi } from "@/services";
|
||||||
import PageView from "@/components/PageView/index.vue";
|
import PageView from "@/components/PageView/index.vue";
|
||||||
import { formatDate, getCurrentMonthStartAndEnd } from "@/utils";
|
import { formatDate, getCurrentMonthStartAndEnd } from "@/utils";
|
||||||
import TimeDialog from "./components/TimeDialog.vue";
|
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
|
||||||
import FilterDialog from "./components/CustomFilterDialog.vue";
|
import FilterDialog from "./components/CustomFilterDialog.vue";
|
||||||
import { onShow } from "@dcloudio/uni-app";
|
import { onShow } from "@dcloudio/uni-app";
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
resetPageList();
|
resetPageList();
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
import { FinanceApi } from "@/services";
|
import { FinanceApi } from "@/services";
|
||||||
import PageView from "@/components/PageView/index.vue";
|
import PageView from "@/components/PageView/index.vue";
|
||||||
import { formatDate, getCurrentMonthStartAndEnd } from "@/utils";
|
import { formatDate, getCurrentMonthStartAndEnd } from "@/utils";
|
||||||
import TimeDialog from "./components/TimeDialog.vue";
|
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
|
||||||
import FilterDialog from "./components/CustomFilterDialog.vue";
|
import FilterDialog from "./components/CustomFilterDialog.vue";
|
||||||
import { onShow } from "@dcloudio/uni-app";
|
import { onShow } from "@dcloudio/uni-app";
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
resetPageList();
|
resetPageList();
|
||||||
|
|
|
@ -160,7 +160,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
|
|
|
@ -159,7 +159,7 @@ import {
|
||||||
getCurrentMonthStartAndEnd,
|
getCurrentMonthStartAndEnd,
|
||||||
filterNullUndefined,
|
filterNullUndefined,
|
||||||
} from "@/utils";
|
} from "@/utils";
|
||||||
import TimeDialog from "./components/TimeDialog.vue";
|
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
|
||||||
import FilterDialog from "./components/FilterDialog.vue";
|
import FilterDialog from "./components/FilterDialog.vue";
|
||||||
const showDialog = <
|
const showDialog = <
|
||||||
{
|
{
|
||||||
|
@ -350,7 +350,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleOk = (obj: any) => {
|
const handleOk = (obj: any) => {
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
@search="handleSearch()"
|
@search="handleSearch()"
|
||||||
@clear="handleSearch()"
|
@clear="handleSearch()"
|
||||||
></u-search>
|
></u-search>
|
||||||
<view class="btn" @click="add"> 新增 </view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<page-view
|
<page-view
|
||||||
|
@ -39,6 +38,10 @@
|
||||||
</view>
|
</view>
|
||||||
</page-view>
|
</page-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="btn-box-fix-btn">
|
||||||
|
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
|
||||||
|
</view>
|
||||||
<SmallModal
|
<SmallModal
|
||||||
:title="'确认删除吗?'"
|
:title="'确认删除吗?'"
|
||||||
:content="'确认删除后,不能恢复!'"
|
:content="'确认删除后,不能恢复!'"
|
||||||
|
@ -62,7 +65,7 @@ const handleModal = (v: boolean, id: number) => {
|
||||||
deleteId.value = id;
|
deleteId.value = id;
|
||||||
};
|
};
|
||||||
const handleOk = () => {
|
const handleOk = () => {
|
||||||
update({id: deleteId.value})
|
update({ id: deleteId.value });
|
||||||
};
|
};
|
||||||
const state = reactive<any>({
|
const state = reactive<any>({
|
||||||
name: "",
|
name: "",
|
||||||
|
@ -74,7 +77,7 @@ const pageList: PageResult<{
|
||||||
reProductsName: string;
|
reProductsName: string;
|
||||||
minPrice: number;
|
minPrice: number;
|
||||||
maxPrice: number;
|
maxPrice: number;
|
||||||
id: number
|
id: number;
|
||||||
}> = reactive({
|
}> = reactive({
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
noMoreData: false,
|
noMoreData: false,
|
||||||
|
@ -88,7 +91,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
resetPageList();
|
resetPageList();
|
||||||
|
@ -96,7 +99,6 @@ const handleSearch = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const update = (item: any) => {
|
const update = (item: any) => {
|
||||||
|
|
||||||
GoodsApi.deleteReceiveProduct({ id: item.id }).then((res) => {
|
GoodsApi.deleteReceiveProduct({ id: item.id }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
resetPageList();
|
resetPageList();
|
||||||
|
@ -127,7 +129,7 @@ const getList = (v?: boolean) => {
|
||||||
reProductsName: state.name,
|
reProductsName: state.name,
|
||||||
};
|
};
|
||||||
pageList.isLoading = true;
|
pageList.isLoading = true;
|
||||||
GoodsApi.getReceiveProductListByPage(params).then((res:any) => {
|
GoodsApi.getReceiveProductListByPage(params).then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
pageList.isLoading = false;
|
pageList.isLoading = false;
|
||||||
(pageList as any).list = (pageList as any).list = pageList.list.concat(
|
(pageList as any).list = (pageList as any).list = pageList.list.concat(
|
||||||
|
@ -143,7 +145,7 @@ const add = () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
resetPageList()
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -32,7 +32,12 @@
|
||||||
:customStyle="{}"
|
:customStyle="{}"
|
||||||
border="none"
|
border="none"
|
||||||
:disabled="item.disabled || item.type === 'select'"
|
:disabled="item.disabled || item.type === 'select'"
|
||||||
:disabledColor="['补单时间','站点磅秤','供应商','收货产品'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
:disabledColor="
|
||||||
|
['补单时间', '站点磅秤', '供应商', '收货产品'].indexOf(item.name) >
|
||||||
|
-1
|
||||||
|
? '#ffffff'
|
||||||
|
: '#f5f7fa'
|
||||||
|
"
|
||||||
@change="(e:any) => {handleInput(e, item)}"
|
@change="(e:any) => {handleInput(e, item)}"
|
||||||
@clear="handleClear(item)"
|
@clear="handleClear(item)"
|
||||||
>
|
>
|
||||||
|
@ -84,7 +89,9 @@
|
||||||
></u-datetime-picker>
|
></u-datetime-picker>
|
||||||
<block v-for="(item, index) in formAttrList" :key="index">
|
<block v-for="(item, index) in formAttrList" :key="index">
|
||||||
<u-action-sheet
|
<u-action-sheet
|
||||||
v-if="item.type === 'select' && item.key !== 'repairTime'"
|
v-if="
|
||||||
|
item.type === 'select' && item.key !== 'repairTime' && item.childKey
|
||||||
|
"
|
||||||
:actions="contrlModalParams[item.childKey].list"
|
:actions="contrlModalParams[item.childKey].list"
|
||||||
:title="contrlModalParams[item.childKey].title"
|
:title="contrlModalParams[item.childKey].title"
|
||||||
:show="contrlModalParams[item.childKey].isShow"
|
:show="contrlModalParams[item.childKey].isShow"
|
||||||
|
@ -98,14 +105,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"
|
||||||
|
@ -127,20 +126,19 @@ import {
|
||||||
import { countDots, formatDate } from "@/utils";
|
import { countDots, formatDate } from "@/utils";
|
||||||
import { DeviceType, ImagesType, OrderType } from "@/utils/enum";
|
import { DeviceType, ImagesType, OrderType } from "@/utils/enum";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
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 { onLoad } from "@dcloudio/uni-app";
|
||||||
|
|
||||||
const handleClear = (item:any) => {
|
const handleClear = (item: any) => {
|
||||||
(model1.order as any)[item.key] = '';
|
(model1.order as any)[item.key] = "";
|
||||||
}
|
};
|
||||||
// 供应商选择
|
// 供应商选择
|
||||||
const showDialog = <
|
const showDialog = <
|
||||||
{
|
{
|
||||||
[key: string]: boolean;
|
[key: string]: boolean;
|
||||||
}
|
}
|
||||||
>reactive({
|
>reactive({
|
||||||
showSupplier: false,
|
|
||||||
showProduct: false,
|
showProduct: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -148,11 +146,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; // 收货产品名称
|
||||||
|
@ -226,7 +219,8 @@ const model1 = reactive<any>({
|
||||||
splTime: "",
|
splTime: "",
|
||||||
subtractType: 1,
|
subtractType: 1,
|
||||||
netWeight: 0,
|
netWeight: 0,
|
||||||
totalPrice: 0
|
totalPrice: 0,
|
||||||
|
repairTime: formatDate(new Date(), "{y}-{m}-{d} {h}:{i}:{s}"),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
|
@ -287,11 +281,6 @@ const contrlModalParams = reactive<any>({
|
||||||
title: "标题",
|
title: "标题",
|
||||||
list: [],
|
list: [],
|
||||||
},
|
},
|
||||||
user: {
|
|
||||||
isShow: false,
|
|
||||||
title: "标题",
|
|
||||||
list: [],
|
|
||||||
},
|
|
||||||
product: {
|
product: {
|
||||||
isShow: false,
|
isShow: false,
|
||||||
title: "标题",
|
title: "标题",
|
||||||
|
@ -326,14 +315,12 @@ const formAttrList = reactive<any>([
|
||||||
name: "供应商",
|
name: "供应商",
|
||||||
key: "userName",
|
key: "userName",
|
||||||
type: "select",
|
type: "select",
|
||||||
childKey: "user",
|
|
||||||
required: true,
|
required: true,
|
||||||
unit: "",
|
unit: "",
|
||||||
fn: () => {
|
fn: () => {
|
||||||
// contrlModalParams.user.isShow = true;
|
uni.navigateTo({
|
||||||
// contrlModalParams.user.title = "供应商";
|
url: `/pagesApp/supplierOrCustomerList?isShipment=false`,
|
||||||
handleDialog("showSupplier", true);
|
});
|
||||||
uni.hideKeyboard();
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -350,8 +337,6 @@ const formAttrList = reactive<any>([
|
||||||
required: true,
|
required: true,
|
||||||
unit: "",
|
unit: "",
|
||||||
fn: () => {
|
fn: () => {
|
||||||
// contrlModalParams.product.isShow = true;
|
|
||||||
// contrlModalParams.product.title = "收货产品";
|
|
||||||
handleDialog("showProduct", true);
|
handleDialog("showProduct", true);
|
||||||
uni.hideKeyboard();
|
uni.hideKeyboard();
|
||||||
},
|
},
|
||||||
|
@ -436,7 +421,9 @@ watch(
|
||||||
预估总价: 结算单价*结算重量
|
预估总价: 结算单价*结算重量
|
||||||
实际收入:实际结算金额-运费-杂费
|
实际收入:实际结算金额-运费-杂费
|
||||||
*/
|
*/
|
||||||
model1.order.netWeight = ((parseFloat(grossWeightNew) || 0) - (parseFloat(tareNew) || 0)).toFixed(2);
|
model1.order.netWeight = (
|
||||||
|
(parseFloat(grossWeightNew) || 0) - (parseFloat(tareNew) || 0)
|
||||||
|
).toFixed(2);
|
||||||
if (model1.order.buttonType === 0) {
|
if (model1.order.buttonType === 0) {
|
||||||
if (model1.order.subtractNum) {
|
if (model1.order.subtractNum) {
|
||||||
model1.order.netWeight =
|
model1.order.netWeight =
|
||||||
|
@ -448,9 +435,10 @@ watch(
|
||||||
model1.order.netWeight * ((100 - model1.order.subtractNum) / 100);
|
model1.order.netWeight * ((100 - model1.order.subtractNum) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
model1.order.totalPrice =
|
model1.order.totalPrice = Math.floor(
|
||||||
Math.floor((model1.order.price || 0) * (model1.order.netWeight || 0)) ;
|
(model1.order.price || 0) * (model1.order.netWeight || 0)
|
||||||
// 实际付款默认=预估总价,当系统自动算出预估总价时,值需同步
|
);
|
||||||
|
// 实际付款默认=预估总价,当系统自动算出预估总价时,值需同步
|
||||||
model1.order.balanceTotalPrice = model1.order.totalPrice;
|
model1.order.balanceTotalPrice = model1.order.totalPrice;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -495,10 +483,7 @@ const handleUpload = () => {
|
||||||
};
|
};
|
||||||
const handleSelect = (key: string, v: any) => {
|
const handleSelect = (key: string, v: any) => {
|
||||||
contrlModalParams[key].isShow = false;
|
contrlModalParams[key].isShow = false;
|
||||||
if (key === "user") {
|
if (key === "product") {
|
||||||
model1.order.userName = v.name;
|
|
||||||
model1.order.userId = v.id;
|
|
||||||
} else if (key === "product") {
|
|
||||||
model1.order.productName = v.name;
|
model1.order.productName = v.name;
|
||||||
model1.order.productId = v.id;
|
model1.order.productId = v.id;
|
||||||
} else if (key === "device") {
|
} else if (key === "device") {
|
||||||
|
@ -506,12 +491,6 @@ const handleSelect = (key: string, v: any) => {
|
||||||
model1.order.deviceId = v.id;
|
model1.order.deviceId = v.id;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 供应商信息
|
|
||||||
SupplierApi.getSupplierUserList({}).then((res) => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
contrlModalParams.user.list = res.data;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 产品信息
|
// 产品信息
|
||||||
ReceiveProductApi.getAllReProducts().then((res) => {
|
ReceiveProductApi.getAllReProducts().then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
@ -598,7 +577,7 @@ const startSave = () => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
model1.order.id = res.data;
|
model1.order.id = res.data;
|
||||||
upload();
|
upload();
|
||||||
uni.navigateBack()
|
uni.navigateBack();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -606,6 +585,17 @@ const handleTime = (v: any) => {
|
||||||
model1.order.repairTime = formatDate(v.value, "{y}-{m}-{d} {h}:{i}:{s}");
|
model1.order.repairTime = formatDate(v.value, "{y}-{m}-{d} {h}:{i}:{s}");
|
||||||
contrlModalParams.isShowSplTime = false;
|
contrlModalParams.isShowSplTime = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onLoad((option: any) => {
|
||||||
|
uni.$on("getSupplier", (data) => {
|
||||||
|
model1.order.userName = data.item.name; // 供应商名称
|
||||||
|
model1.order.userId = data.item.id; // 供应商Id,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
uni.$off("getSupplier", () => {});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.c-card {
|
.c-card {
|
||||||
|
@ -628,7 +618,8 @@ const handleTime = (v: any) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
@search="handleSearch()"
|
@search="handleSearch()"
|
||||||
@clear="handleSearch()"
|
@clear="handleSearch()"
|
||||||
></u-search>
|
></u-search>
|
||||||
<view class="btn" @click="add"> 新增 </view>
|
|
||||||
</view>
|
</view>
|
||||||
<page-view
|
<page-view
|
||||||
@loadList="
|
@loadList="
|
||||||
|
@ -31,13 +30,17 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="op-box">
|
<view class="op-box">
|
||||||
<view class="btn" @click="edit(item)"> 编辑 </view>
|
<view class="btn" @click="edit(item)"> 编辑 </view>
|
||||||
<view class="btn" @click="handleModal(true, item.id)" > 删除 </view>
|
<view class="btn" @click="handleModal(true, item.id)"> 删除 </view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</page-view>
|
</page-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="btn-box-fix-btn">
|
||||||
|
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
|
||||||
|
</view>
|
||||||
|
|
||||||
<SmallModal
|
<SmallModal
|
||||||
:title="'确认删除吗?'"
|
:title="'确认删除吗?'"
|
||||||
:content="'确认删除后,不能恢复!'"
|
:content="'确认删除后,不能恢复!'"
|
||||||
|
@ -60,13 +63,13 @@ const handleModal = (v: boolean, id: number) => {
|
||||||
deleteId.value = id;
|
deleteId.value = id;
|
||||||
};
|
};
|
||||||
const handleOk = () => {
|
const handleOk = () => {
|
||||||
deleteType({id: deleteId.value})
|
deleteType({ id: deleteId.value });
|
||||||
};
|
};
|
||||||
|
|
||||||
const state = reactive<any>({
|
const state = reactive<any>({
|
||||||
name: "",
|
name: "",
|
||||||
});
|
});
|
||||||
const pageList: PageResult<{ reCategoryName: string, id: number }> = reactive({
|
const pageList: PageResult<{ reCategoryName: string; id: number }> = reactive({
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
noMoreData: false,
|
noMoreData: false,
|
||||||
total: 0,
|
total: 0,
|
||||||
|
@ -79,7 +82,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const add = () => {
|
const add = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -123,7 +126,7 @@ const getList = (v?: boolean) => {
|
||||||
params.supplierTypeId = state.supplierTypeId;
|
params.supplierTypeId = state.supplierTypeId;
|
||||||
}
|
}
|
||||||
pageList.isLoading = true;
|
pageList.isLoading = true;
|
||||||
GoodsApi.getPage(params).then((res:any) => {
|
GoodsApi.getPage(params).then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
pageList.isLoading = false;
|
pageList.isLoading = false;
|
||||||
(pageList as any).list = (pageList as any).list = pageList.list.concat(
|
(pageList as any).list = (pageList as any).list = pageList.list.concat(
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
@search="handleSearch()"
|
@search="handleSearch()"
|
||||||
@clear="handleSearch()"
|
@clear="handleSearch()"
|
||||||
></u-search>
|
></u-search>
|
||||||
<view class="btn" @click="add"> 新增 </view>
|
|
||||||
</view>
|
</view>
|
||||||
<page-view
|
<page-view
|
||||||
@loadList="
|
@loadList="
|
||||||
|
@ -42,6 +41,9 @@
|
||||||
</page-view>
|
</page-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="btn-box-fix-btn">
|
||||||
|
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
|
||||||
|
</view>
|
||||||
<SmallModal
|
<SmallModal
|
||||||
:title="'确认删除吗?'"
|
:title="'确认删除吗?'"
|
||||||
:content="'确认删除后,不能恢复!'"
|
:content="'确认删除后,不能恢复!'"
|
||||||
|
@ -85,7 +87,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const add = () => {
|
const add = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
|
@ -188,7 +188,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
|
|
|
@ -174,7 +174,7 @@ import {
|
||||||
getCurrentMonthStartAndEnd,
|
getCurrentMonthStartAndEnd,
|
||||||
filterNullUndefined,
|
filterNullUndefined,
|
||||||
} from "@/utils";
|
} from "@/utils";
|
||||||
import TimeDialog from "./components/TimeDialog.vue";
|
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
|
||||||
import FilterDialog from "./components/FilterDialog.vue";
|
import FilterDialog from "./components/FilterDialog.vue";
|
||||||
const showDialog = <
|
const showDialog = <
|
||||||
{
|
{
|
||||||
|
@ -383,7 +383,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleOk = (obj: any) => {
|
const handleOk = (obj: any) => {
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
@search="handleSearch()"
|
@search="handleSearch()"
|
||||||
@clear="handleSearch()"
|
@clear="handleSearch()"
|
||||||
></u-search>
|
></u-search>
|
||||||
<view class="btn" @click="add"> 新增 </view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<page-view
|
<page-view
|
||||||
|
@ -41,6 +40,10 @@
|
||||||
</view>
|
</view>
|
||||||
</page-view>
|
</page-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="btn-box-fix-btn">
|
||||||
|
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
|
||||||
|
</view>
|
||||||
<SmallModal
|
<SmallModal
|
||||||
:title="'确认删除吗?'"
|
:title="'确认删除吗?'"
|
||||||
:content="'确认删除后,不能恢复!'"
|
:content="'确认删除后,不能恢复!'"
|
||||||
|
@ -64,7 +67,7 @@ const handleModal = (v: boolean, id: number) => {
|
||||||
deleteId.value = id;
|
deleteId.value = id;
|
||||||
};
|
};
|
||||||
const handleOk = () => {
|
const handleOk = () => {
|
||||||
update({id: deleteId.value})
|
update({ id: deleteId.value });
|
||||||
};
|
};
|
||||||
const state = reactive<any>({
|
const state = reactive<any>({
|
||||||
name: "",
|
name: "",
|
||||||
|
@ -76,7 +79,7 @@ const pageList: PageResult<{
|
||||||
shmProductsName: string;
|
shmProductsName: string;
|
||||||
parentName: string;
|
parentName: string;
|
||||||
shmCategoryName: string;
|
shmCategoryName: string;
|
||||||
id: number
|
id: number;
|
||||||
}> = reactive({
|
}> = reactive({
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
noMoreData: false,
|
noMoreData: false,
|
||||||
|
@ -90,7 +93,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
resetPageList();
|
resetPageList();
|
||||||
|
@ -142,7 +145,7 @@ const add = () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
resetPageList()
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -45,8 +45,6 @@
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</u-input>
|
||||||
<!-- @afterRead="afterRead"
|
|
||||||
@delete="deletePic" -->
|
|
||||||
<uni-file-picker
|
<uni-file-picker
|
||||||
v-if="item.type === 'upload'"
|
v-if="item.type === 'upload'"
|
||||||
v-model="model1.order.fileLists"
|
v-model="model1.order.fileLists"
|
||||||
|
@ -84,7 +82,7 @@
|
||||||
></u-datetime-picker>
|
></u-datetime-picker>
|
||||||
<block v-for="(item, index) in formAttrList" :key="index">
|
<block v-for="(item, index) in formAttrList" :key="index">
|
||||||
<u-action-sheet
|
<u-action-sheet
|
||||||
v-if="item.type === 'select' && item.key !== 'repairTime'"
|
v-if="item.type === 'select' && item.key !== 'repairTime' && item.childKey"
|
||||||
:actions="contrlModalParams[item.childKey].list"
|
:actions="contrlModalParams[item.childKey].list"
|
||||||
:title="contrlModalParams[item.childKey].title"
|
:title="contrlModalParams[item.childKey].title"
|
||||||
:show="contrlModalParams[item.childKey].isShow"
|
:show="contrlModalParams[item.childKey].isShow"
|
||||||
|
@ -98,14 +96,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="true"
|
|
||||||
></SupplierDialog>
|
|
||||||
<!-- 出货产品弹框 -->
|
<!-- 出货产品弹框 -->
|
||||||
<ProductDialog
|
<ProductDialog
|
||||||
:show="showDialog.showProduct"
|
:show="showDialog.showProduct"
|
||||||
|
@ -126,9 +116,9 @@ import {
|
||||||
import { countDots, formatDate } from "@/utils";
|
import { countDots, formatDate } from "@/utils";
|
||||||
import { DeviceType, ImagesType, OrderType } from "@/utils/enum";
|
import { DeviceType, ImagesType, OrderType } from "@/utils/enum";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
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 { onLoad } from "@dcloudio/uni-app";
|
||||||
const handleClear = (item:any) => {
|
const handleClear = (item:any) => {
|
||||||
(model1.order as any)[item.key] = '';
|
(model1.order as any)[item.key] = '';
|
||||||
}
|
}
|
||||||
|
@ -138,7 +128,6 @@ const showDialog = <
|
||||||
[key: string]: boolean;
|
[key: string]: boolean;
|
||||||
}
|
}
|
||||||
>reactive({
|
>reactive({
|
||||||
showSupplier: false,
|
|
||||||
showProduct: false,
|
showProduct: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -146,10 +135,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) => {
|
||||||
|
@ -194,7 +179,8 @@ const model1 = reactive<any>({
|
||||||
fileLists: [],
|
fileLists: [],
|
||||||
splTime: "",
|
splTime: "",
|
||||||
subtractType: 1,
|
subtractType: 1,
|
||||||
netWeight: 0
|
netWeight: 0,
|
||||||
|
repairTime: formatDate(new Date(), "{y}-{m}-{d} {h}:{i}:{s}"),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
|
@ -249,11 +235,6 @@ const contrlModalParams = reactive<any>({
|
||||||
title: "标题",
|
title: "标题",
|
||||||
list: [],
|
list: [],
|
||||||
},
|
},
|
||||||
user: {
|
|
||||||
isShow: false,
|
|
||||||
title: "标题",
|
|
||||||
list: [],
|
|
||||||
},
|
|
||||||
product: {
|
product: {
|
||||||
isShow: false,
|
isShow: false,
|
||||||
title: "标题",
|
title: "标题",
|
||||||
|
@ -288,14 +269,12 @@ const formAttrList = reactive<any>([
|
||||||
name: "客户",
|
name: "客户",
|
||||||
key: "userName",
|
key: "userName",
|
||||||
type: "select",
|
type: "select",
|
||||||
childKey: "user",
|
|
||||||
required: true,
|
required: true,
|
||||||
unit: "",
|
unit: "",
|
||||||
fn: () => {
|
fn: () => {
|
||||||
// contrlModalParams.user.isShow = true;
|
uni.navigateTo({
|
||||||
// contrlModalParams.user.title = "客户";
|
url: `/pagesApp/supplierOrCustomerList?isShipment=true`,
|
||||||
handleDialog("showSupplier", true);
|
});
|
||||||
uni.hideKeyboard();
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -466,12 +445,6 @@ const handleSelect = (key: string, v: any) => {
|
||||||
model1.order.deviceId = v.id;
|
model1.order.deviceId = v.id;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 客户信息
|
|
||||||
CustomerApi.getCustomUserList({}).then((res) => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
contrlModalParams.user.list = res.data;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 产品信息
|
// 产品信息
|
||||||
GoodsApi.getShipmentProductList().then((res) => {
|
GoodsApi.getShipmentProductList().then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
@ -569,6 +542,17 @@ const handleTime = (v: any) => {
|
||||||
model1.order.repairTime = formatDate(v.value, "{y}-{m}-{d} {h}:{i}:{s}");
|
model1.order.repairTime = formatDate(v.value, "{y}-{m}-{d} {h}:{i}:{s}");
|
||||||
contrlModalParams.isShowSplTime = false;
|
contrlModalParams.isShowSplTime = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onLoad((option: any) => {
|
||||||
|
uni.$on("getCustomer", (data) => {
|
||||||
|
model1.order.userName = data.item.name; // 供应商名称
|
||||||
|
model1.order.userId = data.item.id; // 供应商Id,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
uni.$off("getSupplier", () => {});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.c-card {
|
.c-card {
|
||||||
|
@ -591,7 +575,8 @@ const handleTime = (v: any) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -1,18 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="c-card">
|
<view class="c-card">
|
||||||
<view class="search">
|
|
||||||
<!-- <u-search
|
|
||||||
placeholder="请输入出货分类"
|
|
||||||
v-model="state.name"
|
|
||||||
:showAction="false"
|
|
||||||
:bgColor="'#fff'"
|
|
||||||
:borderColor="'rgba(0, 0, 0, 0.1)'"
|
|
||||||
:placeholderColor="'#C1C1C1'"
|
|
||||||
@search="handleSearch()"
|
|
||||||
></u-search> -->
|
|
||||||
|
|
||||||
<view class="btn" @click="add"> 新增 </view>
|
|
||||||
</view>
|
|
||||||
<view class="collapse-box box">
|
<view class="collapse-box box">
|
||||||
<view v-for="(item, index) in pageList.list" :key="index">
|
<view v-for="(item, index) in pageList.list" :key="index">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
|
@ -60,6 +47,9 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="btn-box-fix-btn">
|
||||||
|
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
|
||||||
|
</view>
|
||||||
<SmallModal
|
<SmallModal
|
||||||
:title="'确认删除吗?'"
|
:title="'确认删除吗?'"
|
||||||
:content="'确认删除后,不能恢复!'"
|
:content="'确认删除后,不能恢复!'"
|
||||||
|
@ -102,7 +92,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const add = () => {
|
const add = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
@search="handleSearch()"
|
@search="handleSearch()"
|
||||||
@clear="handleSearch()"
|
@clear="handleSearch()"
|
||||||
></u-search>
|
></u-search>
|
||||||
<view class="btn" @click="add"> 新增 </view>
|
|
||||||
</view>
|
</view>
|
||||||
<page-view
|
<page-view
|
||||||
@loadList="
|
@loadList="
|
||||||
|
@ -48,6 +47,10 @@
|
||||||
</page-view>
|
</page-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="btn-box-fix-btn">
|
||||||
|
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
|
||||||
|
</view>
|
||||||
|
|
||||||
<SmallModal
|
<SmallModal
|
||||||
:title="'确认删除吗?'"
|
:title="'确认删除吗?'"
|
||||||
:content="'确认删除后,不能恢复!'"
|
:content="'确认删除后,不能恢复!'"
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
@search="handleSearch()"
|
@search="handleSearch()"
|
||||||
@clear="handleSearch()"
|
@clear="handleSearch()"
|
||||||
></u-search>
|
></u-search>
|
||||||
<view class="btn" @click="addSupplier"> 新增 </view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<page-view
|
<page-view
|
||||||
|
@ -52,6 +51,10 @@
|
||||||
@select="handleSelect"
|
@select="handleSelect"
|
||||||
></u-action-sheet>
|
></u-action-sheet>
|
||||||
|
|
||||||
|
<view class="btn-box-fix-btn">
|
||||||
|
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
|
||||||
|
</view>
|
||||||
|
|
||||||
<SmallModal
|
<SmallModal
|
||||||
:title="'确认删除吗?'"
|
:title="'确认删除吗?'"
|
||||||
:content="'确认删除后,不能恢复!'"
|
:content="'确认删除后,不能恢复!'"
|
||||||
|
@ -75,7 +78,7 @@ const handleModal = (v: boolean, id: number) => {
|
||||||
deleteId.value = id;
|
deleteId.value = id;
|
||||||
};
|
};
|
||||||
const handleOk = () => {
|
const handleOk = () => {
|
||||||
update({id: deleteId.value})
|
update({ id: deleteId.value });
|
||||||
};
|
};
|
||||||
const state = reactive<any>({
|
const state = reactive<any>({
|
||||||
name: "",
|
name: "",
|
||||||
|
@ -94,7 +97,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const handleSelect = (v: any) => {
|
const handleSelect = (v: any) => {
|
||||||
state.supplierTypeId = v.id;
|
state.supplierTypeId = v.id;
|
||||||
|
@ -119,9 +122,7 @@ const update = (item: any) => {
|
||||||
|
|
||||||
const edit = (item: any) => {
|
const edit = (item: any) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:
|
url: "/pagesApp/components/addSupplier?title=编辑供应商&item=" + item.id, // 要跳转到的页面路径
|
||||||
"/pagesApp/components/addSupplier?title=编辑供应商&item=" +
|
|
||||||
item.id, // 要跳转到的页面路径
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const getList = (v?: boolean) => {
|
const getList = (v?: boolean) => {
|
||||||
|
@ -159,13 +160,13 @@ const getSupplierTypeList = () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const addSupplier = () => {
|
const add = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pagesApp/components/addSupplier", // 要跳转到的页面路径
|
url: "/pagesApp/components/addSupplier", // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
resetPageList()
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
getSupplierTypeList();
|
getSupplierTypeList();
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,236 @@
|
||||||
|
<template>
|
||||||
|
<view class="c-dialog-filter">
|
||||||
|
<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"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
class="contact-detail-container"
|
||||||
|
@click="handleClick(cItem)"
|
||||||
|
>
|
||||||
|
<view class="contact-name">{{ cItem.name }}</view>
|
||||||
|
<view class="contact-address">{{ cItem.cardCode }}</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>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { CustomerApi, SupplierApi } from "@/services";
|
||||||
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
|
|
||||||
|
const isShipment = ref(true);
|
||||||
|
const emit = defineEmits(["handleDialog", "changeUser"]);
|
||||||
|
|
||||||
|
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) => {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1,
|
||||||
|
success: () => {
|
||||||
|
uni.$emit(isShipment.value ? "getCustomer" : "getSupplier", {item: {...item}});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSearch = () => {
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
const getList = () => {
|
||||||
|
if (isShipment.value) {
|
||||||
|
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;
|
||||||
|
}, []);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
onLoad((option: any) => {
|
||||||
|
// 接收传递的标题参数
|
||||||
|
|
||||||
|
// 设置页面标题
|
||||||
|
if (option.isShipment === "false") {
|
||||||
|
isShipment.value = false;
|
||||||
|
}
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: `${isShipment.value ? "客户" : "供应商"}筛选`,
|
||||||
|
});
|
||||||
|
|
||||||
|
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>
|
|
@ -11,7 +11,6 @@
|
||||||
@search="handleSearch()"
|
@search="handleSearch()"
|
||||||
@clear="handleSearch()"
|
@clear="handleSearch()"
|
||||||
></u-search>
|
></u-search>
|
||||||
<view class="btn" @click="add"> 新增 </view>
|
|
||||||
</view>
|
</view>
|
||||||
<page-view
|
<page-view
|
||||||
@loadList="
|
@loadList="
|
||||||
|
@ -38,6 +37,10 @@
|
||||||
</page-view>
|
</page-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="btn-box-fix-btn">
|
||||||
|
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
|
||||||
|
</view>
|
||||||
|
|
||||||
<SmallModal
|
<SmallModal
|
||||||
:title="'确认删除吗?'"
|
:title="'确认删除吗?'"
|
||||||
:content="'确认删除后,不能恢复!'"
|
:content="'确认删除后,不能恢复!'"
|
||||||
|
@ -60,7 +63,7 @@ const handleModal = (v: boolean, id: number) => {
|
||||||
deleteId.value = id;
|
deleteId.value = id;
|
||||||
};
|
};
|
||||||
const handleOk = () => {
|
const handleOk = () => {
|
||||||
deleteType({id: deleteId.value})
|
deleteType({ id: deleteId.value });
|
||||||
};
|
};
|
||||||
const state = reactive<any>({
|
const state = reactive<any>({
|
||||||
name: "",
|
name: "",
|
||||||
|
@ -77,7 +80,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const add = () => {
|
const add = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -138,7 +141,7 @@ const getList = (v?: boolean) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
resetPageList()
|
resetPageList();
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
@search="handleSearch()"
|
@search="handleSearch()"
|
||||||
@clear="handleSearch()"
|
@clear="handleSearch()"
|
||||||
></u-search>
|
></u-search>
|
||||||
<view class="btn" @click="add"> 新增 </view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<page-view
|
<page-view
|
||||||
|
@ -29,8 +28,8 @@
|
||||||
<view v-for="(item, index) in pageList.list" :key="index">
|
<view v-for="(item, index) in pageList.list" :key="index">
|
||||||
<view>
|
<view>
|
||||||
<view>{{ item.name || item.userName }}</view>
|
<view>{{ item.name || item.userName }}</view>
|
||||||
<view>{{ item.phone || "-" }}</view>
|
<view>手机号:{{ item.phone || "-" }}</view>
|
||||||
<view>{{
|
<view>关联角色:{{
|
||||||
item.roleVos.length > 0 ? item.roleVos[0].roleName : "-"
|
item.roleVos.length > 0 ? item.roleVos[0].roleName : "-"
|
||||||
}}</view>
|
}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -43,6 +42,10 @@
|
||||||
</page-view>
|
</page-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="btn-box-fix-btn">
|
||||||
|
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
|
||||||
|
</view>
|
||||||
|
|
||||||
<SmallModal
|
<SmallModal
|
||||||
:title="'确认删除吗?'"
|
:title="'确认删除吗?'"
|
||||||
:content="'确认删除后,不能恢复!'"
|
:content="'确认删除后,不能恢复!'"
|
||||||
|
@ -105,7 +108,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
resetPageList();
|
resetPageList();
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
<template>
|
||||||
|
<view class="input-box">
|
||||||
|
<up-icon
|
||||||
|
name="minus"
|
||||||
|
@click="decrease"
|
||||||
|
:size="14"
|
||||||
|
color="rgba(0,0,0,0.25)"
|
||||||
|
></up-icon>
|
||||||
|
<input
|
||||||
|
class="uni-input"
|
||||||
|
type="number"
|
||||||
|
placeholder="1"
|
||||||
|
v-model="num"
|
||||||
|
@input="handleInput"
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
|
<up-icon
|
||||||
|
name="plus"
|
||||||
|
@click="increase"
|
||||||
|
:size="14"
|
||||||
|
color="rgba(0,0,0,0.25)"
|
||||||
|
></up-icon>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
const props = defineProps<{
|
||||||
|
min: number;
|
||||||
|
max: number;
|
||||||
|
value: number;
|
||||||
|
}>();
|
||||||
|
const emit = defineEmits(["changeValue"]);
|
||||||
|
const num = ref(props.value);
|
||||||
|
const handleInput = (event) => {
|
||||||
|
const value = parseInt(event.target.value);
|
||||||
|
if (!isNaN(value) && value >= 1) {
|
||||||
|
num.value = value;
|
||||||
|
} else {
|
||||||
|
num.value = 1;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const increase = () => {
|
||||||
|
if (num.value < props.max) {
|
||||||
|
num.value++;
|
||||||
|
emit("changeValue", num.value)
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const decrease = () => {
|
||||||
|
if (num.value > props.min) {
|
||||||
|
num.value--;
|
||||||
|
emit("changeValue", num.value)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.input-box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-items: center;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||||
|
padding: 0rpx 8rpx;
|
||||||
|
border-radius: 5px;
|
||||||
|
margin: 0rpx 16rpx;
|
||||||
|
.uni-input {
|
||||||
|
text-align: center;
|
||||||
|
max-width: 100rpx;
|
||||||
|
color: rgba(0, 0, 0, 0.75);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,247 @@
|
||||||
|
<template>
|
||||||
|
<NavBar :count="0" :title="'配置'"></NavBar>
|
||||||
|
<Box
|
||||||
|
v-if="
|
||||||
|
isShowModule(list[0].child.concat(list[1].child))
|
||||||
|
"
|
||||||
|
:isShow="true"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in list"
|
||||||
|
:key="index"
|
||||||
|
v-show="isShowModule(item.child)"
|
||||||
|
>
|
||||||
|
<view class="title">
|
||||||
|
<Title :title="item.title" />
|
||||||
|
</view>
|
||||||
|
<view class="box-content">
|
||||||
|
<view
|
||||||
|
v-for="(child, index) in item.child"
|
||||||
|
:key="index"
|
||||||
|
@click="(child as any).fn(child)"
|
||||||
|
v-show="isShowModule([{ title: child.title }])"
|
||||||
|
:class="{ box: isShowModule([{ title: child.title }]) }"
|
||||||
|
>
|
||||||
|
<view v-if="isShowModule([{ title: child.title }])">
|
||||||
|
<up-image
|
||||||
|
:src="`${url}/static/110/config/${child.icon}`"
|
||||||
|
mode="aspectFill"
|
||||||
|
width="60rpx"
|
||||||
|
height="60rpx"
|
||||||
|
></up-image>
|
||||||
|
</view>
|
||||||
|
<view v-if="isShowModule([{ title: child.title }])">{{
|
||||||
|
child.title
|
||||||
|
}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</Box>
|
||||||
|
|
||||||
|
<!-- 当收货 出货 常用app全部为空 显示暂无权限 -->
|
||||||
|
<up-empty
|
||||||
|
v-else
|
||||||
|
mode="permission"
|
||||||
|
icon="http://cdn.uviewui.com/uview/empty/permission.png"
|
||||||
|
:text="'暂无相关权限, 请联系管理员'"
|
||||||
|
>
|
||||||
|
</up-empty>
|
||||||
|
<TabBar :select="'配置'"></TabBar>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import Box from "@/components/Box/index.vue";
|
||||||
|
import Title from "@/components/Title/index.vue";
|
||||||
|
import TabBar from "@/components/TabBar/index.vue";
|
||||||
|
import { useMemberStore } from "@/store/index";
|
||||||
|
import { ProfileApi } from "@/services";
|
||||||
|
import pinia from "@/store";
|
||||||
|
import { url } from "@/utils/data";
|
||||||
|
const store = useMemberStore(pinia);
|
||||||
|
const list = reactive([
|
||||||
|
{
|
||||||
|
title: "参数管理",
|
||||||
|
child: [
|
||||||
|
{
|
||||||
|
icon: "1.png",
|
||||||
|
title: "收货分类",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/receiveType", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "4.png",
|
||||||
|
title: "收货产品",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/receiveProduct", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "3.png",
|
||||||
|
title: "出货分类",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/shipmentType", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "2.png",
|
||||||
|
title: "出货产品",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/shipmentProduct", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "5.png",
|
||||||
|
title: "供应商分类",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/supplierType", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "6.png",
|
||||||
|
title: "供应商管理",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/supplierMgt", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "7.png",
|
||||||
|
title: "客户管理",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/customerMgt", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "8.png",
|
||||||
|
title: "库存卡管理",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/stockCard", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "9.png",
|
||||||
|
title: "人员管理",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/user", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "10.png",
|
||||||
|
title: "权限管理",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesApp/role", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "货场管理",
|
||||||
|
child: [
|
||||||
|
{
|
||||||
|
icon: "11.png",
|
||||||
|
title: "打印模板",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesConfig/printTemplate", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "12.png",
|
||||||
|
title: "其他配置",
|
||||||
|
fn: (item: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesConfig/otherConfig", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
// 收货、出货、常用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;
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
// 重新获取权限
|
||||||
|
ProfileApi.getUserInfo().then((res: any) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
store.setProfile({ ...res.data, token: store.profile.token });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.title {
|
||||||
|
line-height: 80rpx;
|
||||||
|
padding: 0rpx 20rpx;
|
||||||
|
&::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
margin-top: 13px;
|
||||||
|
margin-left: 0rpx;
|
||||||
|
width: 6rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
background: #22d594;
|
||||||
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
||||||
|
border-radius: 3rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.box-content {
|
||||||
|
display: flex;
|
||||||
|
padding: 0rpx 20rpx;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
.box {
|
||||||
|
width: 140rpx;
|
||||||
|
height: 140rpx;
|
||||||
|
border-radius: 26rpx;
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #000000;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
flex-direction: column;
|
||||||
|
> view {
|
||||||
|
display: grid;
|
||||||
|
place-content: center;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
> .box + .box {
|
||||||
|
margin-left: 32rpx;
|
||||||
|
}
|
||||||
|
.box:nth-child(4n+1) {
|
||||||
|
margin-left: 0rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,251 @@
|
||||||
|
<template>
|
||||||
|
<block v-if="Object.keys(state.formData).length > 0">
|
||||||
|
<view class="title">终端机自动打单配置</view>
|
||||||
|
<view class="box">
|
||||||
|
<view
|
||||||
|
>自动打印设置 <up-switch
|
||||||
|
activeColor="#00D2E3"
|
||||||
|
size="20"
|
||||||
|
v-model="state.formData.autoPrintConfig"
|
||||||
|
></up-switch
|
||||||
|
></view>
|
||||||
|
<view
|
||||||
|
>收货联单打印<AvatarInput
|
||||||
|
:min="1"
|
||||||
|
:max="5"
|
||||||
|
:value="state.formData.machineOrderInConfig"
|
||||||
|
@changeValue="
|
||||||
|
(v) => {
|
||||||
|
console.log(v);
|
||||||
|
state.formData.machineOrderInConfig = v;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>张</view
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
>出货联单打印<AvatarInput
|
||||||
|
:min="1"
|
||||||
|
:max="5"
|
||||||
|
:value="state.formData.machineOrderOutConfig"
|
||||||
|
@changeValue="
|
||||||
|
(v) => {
|
||||||
|
state.formData.machineOrderOutConfig = v;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>张</view
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
<view class="title">手动打单配置(小程序端 WEB端)</view>
|
||||||
|
<view class="box">
|
||||||
|
<view
|
||||||
|
>收货-待审核联单打印<AvatarInput
|
||||||
|
:min="1"
|
||||||
|
:max="7"
|
||||||
|
:value="state.formData.manualPrintAudit"
|
||||||
|
@changeValue="
|
||||||
|
(v) => {
|
||||||
|
state.formData.manualPrintAudit = v;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
张</view
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
>收货-已审核联单打印<AvatarInput
|
||||||
|
:min="1"
|
||||||
|
:max="7"
|
||||||
|
:value="state.formData.manualPrintAudited"
|
||||||
|
@changeValue="
|
||||||
|
(v) => {
|
||||||
|
state.formData.manualPrintAudited = v;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
张</view
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
>出货-待结算联单打印<AvatarInput
|
||||||
|
:min="1"
|
||||||
|
:max="7"
|
||||||
|
:value="state.formData.manualPrintToBeSettled"
|
||||||
|
@changeValue="
|
||||||
|
(v) => {
|
||||||
|
state.formData.manualPrintToBeSettled = v;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
张</view
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
>出货-已结算联单打印<AvatarInput
|
||||||
|
:min="1"
|
||||||
|
:max="7"
|
||||||
|
:value="state.formData.manualPrintSettled"
|
||||||
|
@changeValue="
|
||||||
|
(v) => {
|
||||||
|
state.formData.manualPrintSettled = v;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
张</view
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
<view class="title">出货结算配置</view>
|
||||||
|
<view class="box">
|
||||||
|
<view
|
||||||
|
>结算金额配置
|
||||||
|
<view class="avatar-select" @click="showSelect"
|
||||||
|
><input v-model="list[state.formData.settlementConfig]" disabled />
|
||||||
|
<up-icon
|
||||||
|
name="arrow-down"
|
||||||
|
:size="14"
|
||||||
|
color="rgba(0,0,0,0.25)"
|
||||||
|
></up-icon
|
||||||
|
></view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
>自动结算配置 <up-switch
|
||||||
|
activeColor="#00D2E3"
|
||||||
|
size="20"
|
||||||
|
v-model="state.formData.autoSettlement"
|
||||||
|
></up-switch
|
||||||
|
></view>
|
||||||
|
<view
|
||||||
|
v-for="item in state.formData.devices"
|
||||||
|
:key="item.id"
|
||||||
|
style="padding: 8rpx 44rpx"
|
||||||
|
>{{ item.deviceName }}
|
||||||
|
<AvatarInput
|
||||||
|
:min="1"
|
||||||
|
:max="7"
|
||||||
|
:value="item.expireConfig"
|
||||||
|
@changeValue="
|
||||||
|
(v) => {
|
||||||
|
item.expireConfig = v;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
天后自动结算</view
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
|
||||||
|
<view class="btn-box-fix-btn">
|
||||||
|
<u-button
|
||||||
|
type="primary"
|
||||||
|
text="保存"
|
||||||
|
shape="circle"
|
||||||
|
@click="handleSave"
|
||||||
|
></u-button>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<up-action-sheet
|
||||||
|
:actions="state.list"
|
||||||
|
:title="'请选择'"
|
||||||
|
:show="state.show"
|
||||||
|
@select="selectClick"
|
||||||
|
:closeOnClickOverlay="true"
|
||||||
|
:closeOnClickAction="true"
|
||||||
|
></up-action-sheet>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { reactive } from "vue";
|
||||||
|
import AvatarInput from "./components/avatar-input.vue";
|
||||||
|
import { OtherConfigApi } from "@/services/index";
|
||||||
|
const list = [
|
||||||
|
"",
|
||||||
|
"正常计算",
|
||||||
|
"抹分",
|
||||||
|
"抹角分",
|
||||||
|
"抹元",
|
||||||
|
"分位四舍五入",
|
||||||
|
"角位四舍五入",
|
||||||
|
"元位四舍五入",
|
||||||
|
];
|
||||||
|
const state = reactive<any>({
|
||||||
|
show: false,
|
||||||
|
list: [
|
||||||
|
{ id: 1, name: "正常计算" },
|
||||||
|
{ id: 2, name: "抹分" },
|
||||||
|
{ id: 3, name: "抹角分" },
|
||||||
|
{ id: 4, name: "抹元" },
|
||||||
|
{ id: 5, name: "分位四舍五入" },
|
||||||
|
{ id: 6, name: "角位四舍五入" },
|
||||||
|
{ id: 7, name: "元位四舍五入" },
|
||||||
|
],
|
||||||
|
formData: {
|
||||||
|
// autoPrintConfig: true,
|
||||||
|
// machineOrderInConfig: 2,
|
||||||
|
// machineOrderOutConfig: 2,
|
||||||
|
// manualPrintAudit: 3,
|
||||||
|
// manualPrintAudited: 3,
|
||||||
|
// manualPrintToBeSettled: 3,
|
||||||
|
// manualPrintSettled: 3,
|
||||||
|
// settlementConfig: 6,
|
||||||
|
// autoSettlement: true,
|
||||||
|
// devices: [],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
OtherConfigApi.printdetail({}).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
state.formData = res.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const handleSave = () => {
|
||||||
|
OtherConfigApi.updateprintOne({ ...state.formData }).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "设置更新成功",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const showSelect = () => {
|
||||||
|
state.show = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const selectClick = (v:any) => {
|
||||||
|
state.formData.settlementConfig = v.id;
|
||||||
|
state.show = false;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.title {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #000000;
|
||||||
|
padding: 22rpx;
|
||||||
|
padding-left: 44rpx;
|
||||||
|
&::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
margin-top: 3px;
|
||||||
|
margin-left: -22rpx;
|
||||||
|
width: 6rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
background: #00d2e3;
|
||||||
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
||||||
|
border-radius: 3rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.box {
|
||||||
|
padding: 0rpx 22rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
> view {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 8rpx 22rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.avatar-select {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-items: center;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||||
|
padding: 0rpx 8rpx;
|
||||||
|
border-radius: 5px;
|
||||||
|
margin: 0rpx 16rpx;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,72 @@
|
||||||
|
<template>
|
||||||
|
<view class="title">{{ title }}打印模版字段</view>
|
||||||
|
<view class="box">
|
||||||
|
<view v-for="item in list" :key="item.id">
|
||||||
|
<up-checkbox
|
||||||
|
:customStyle="{ marginBottom: '8px' }"
|
||||||
|
:label="item.printTemplateName"
|
||||||
|
:checked="item.templateDeleted"
|
||||||
|
:activeColor="'#00D2E3'"
|
||||||
|
:usedAlone="true"
|
||||||
|
@change="(v) => {item.templateDeleted = v}"
|
||||||
|
>
|
||||||
|
</up-checkbox>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="btn-box-fix-btn">
|
||||||
|
<u-button type="primary" text="保存" shape="circle" @click="handleSave"></u-button>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
|
import { OtherConfigApi } from "@/services/index";
|
||||||
|
|
||||||
|
const title = ref("");
|
||||||
|
const list = ref([]);
|
||||||
|
|
||||||
|
const handleSave = () => {
|
||||||
|
OtherConfigApi.updatePrintTemplate({printTemplatePos: list.value}).then(res => {
|
||||||
|
if(res.code === 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "设置更新成功",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
onLoad((option: any) => {
|
||||||
|
// 设置页面标题
|
||||||
|
if (option.key) {
|
||||||
|
title.value = [
|
||||||
|
"收货 - 待审核",
|
||||||
|
"收货 - 已审核",
|
||||||
|
"出货 - 待结算",
|
||||||
|
"出货 - 已结算",
|
||||||
|
][option.key];
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: title.value,
|
||||||
|
});
|
||||||
|
// 获取详情信息
|
||||||
|
OtherConfigApi.getTemplates({ templateType: option.key }).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
list.value = res.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.title {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #000000;
|
||||||
|
padding: 22rpx;
|
||||||
|
}
|
||||||
|
.box {
|
||||||
|
padding: 0rpx 40rpx;
|
||||||
|
height: calc(100vh - 120px);
|
||||||
|
overflow: scroll;
|
||||||
|
> view {
|
||||||
|
padding: 2rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,33 @@
|
||||||
|
<template>
|
||||||
|
<up-list>
|
||||||
|
<up-list-item v-for="(item, index) in list" :key="index">
|
||||||
|
<up-cell
|
||||||
|
:title="item.name"
|
||||||
|
isLink
|
||||||
|
:url="`/pagesConfig/printDetail?key=${item.key}`"
|
||||||
|
>
|
||||||
|
</up-cell>
|
||||||
|
</up-list-item>
|
||||||
|
</up-list>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
const list = ref([
|
||||||
|
{
|
||||||
|
key: 0,
|
||||||
|
name: '收货 - 待审核'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 1,
|
||||||
|
name: '收货 - 已审核'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 2,
|
||||||
|
name: '出货 - 待结算'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 3,
|
||||||
|
name: '出货 - 已结算'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped></style>
|
|
@ -25,7 +25,7 @@
|
||||||
<view class="summary">
|
<view class="summary">
|
||||||
<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="`${url}/static/pages/${item.imgUrl}`"
|
||||||
/>
|
/>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view class="num">{{ formatMoney(item.num, 2) }}</view>
|
<view class="num">{{ formatMoney(item.num, 2) }}</view>
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
:offset="[10, 10]"
|
:offset="[10, 10]"
|
||||||
></up-badge>
|
></up-badge>
|
||||||
<up-image
|
<up-image
|
||||||
:src="`/static/img/home/${item.icon}`"
|
:src="`${url}/static/110/home/${item.icon}`"
|
||||||
width="184rpx"
|
width="184rpx"
|
||||||
height="162rpx"
|
height="162rpx"
|
||||||
></up-image>
|
></up-image>
|
||||||
|
@ -58,12 +58,13 @@
|
||||||
</up-grid-item>
|
</up-grid-item>
|
||||||
</up-grid>
|
</up-grid>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-top: 30rpx">
|
<view style="margin: 30rpx 0rpx">
|
||||||
<text class="title title-shipment">出货销售</text>
|
<text class="title title-shipment">出货销售</text>
|
||||||
<up-grid :border="false">
|
<up-grid :border="false">
|
||||||
<up-grid-item
|
<up-grid-item
|
||||||
v-for="(item, index) in stateNew.shipmentList"
|
v-for="(item, index) in stateNew.shipmentList"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
@click="handleClick(item)"
|
||||||
>
|
>
|
||||||
<up-badge
|
<up-badge
|
||||||
max="99"
|
max="99"
|
||||||
|
@ -72,7 +73,7 @@
|
||||||
:offset="[10, 10]"
|
:offset="[10, 10]"
|
||||||
></up-badge>
|
></up-badge>
|
||||||
<up-image
|
<up-image
|
||||||
:src="`/static/img/home/${item.icon}`"
|
:src="`${url}/static/110/home/${item.icon}`"
|
||||||
width="184rpx"
|
width="184rpx"
|
||||||
height="162rpx"
|
height="162rpx"
|
||||||
></up-image>
|
></up-image>
|
||||||
|
@ -97,7 +98,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { timeList, homeInitData } from "@/utils/data";
|
import { timeList, homeInitData, url } from "@/utils/data";
|
||||||
import { useMemberStore } from "@/store/index";
|
import { useMemberStore } from "@/store/index";
|
||||||
import {
|
import {
|
||||||
MessageApi,
|
MessageApi,
|
||||||
|
@ -109,7 +110,7 @@ import TabBar from "@/components/TabBar/index.vue";
|
||||||
import { formatMoney } from "@/utils";
|
import { formatMoney } from "@/utils";
|
||||||
import { onBackPress, onShow } from "@dcloudio/uni-app";
|
import { onBackPress, onShow } from "@dcloudio/uni-app";
|
||||||
import pinia from "@/store";
|
import pinia from "@/store";
|
||||||
|
import { timeRange } from "@/utils";
|
||||||
const store = useMemberStore(pinia);
|
const store = useMemberStore(pinia);
|
||||||
const navbarRect = reactive({
|
const navbarRect = reactive({
|
||||||
height: 42,
|
height: 42,
|
||||||
|
@ -132,9 +133,16 @@ const stateNew = reactive({
|
||||||
filterTimeValue: "本月",
|
filterTimeValue: "本月",
|
||||||
receiveList: homeInitData.receiveList,
|
receiveList: homeInitData.receiveList,
|
||||||
shipmentList: homeInitData.shipmentList,
|
shipmentList: homeInitData.shipmentList,
|
||||||
|
startTime: timeRange(3).startTime + " 00:00:00",
|
||||||
|
endTime: timeRange(3).endTime + " 23:59:59",
|
||||||
});
|
});
|
||||||
const handleFilter = (item: { id: number; name: string }) => {
|
const handleFilter = (item: { id: number; name: string }) => {
|
||||||
stateNew.filterTimeValue = item.name;
|
stateNew.filterTimeValue = item.name;
|
||||||
|
const range = timeRange(item.id);
|
||||||
|
stateNew.startTime = range.startTime + " 00:00:00";
|
||||||
|
stateNew.endTime = range.endTime + " 23:59:59";
|
||||||
|
// 获取数据面板信息
|
||||||
|
getSummery();
|
||||||
};
|
};
|
||||||
|
|
||||||
const summaryList = reactive([
|
const summaryList = reactive([
|
||||||
|
@ -162,15 +170,14 @@ const summaryList = reactive([
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
count: 0,
|
count: 0,
|
||||||
});
|
});
|
||||||
const init = () => {
|
|
||||||
// 消息统计
|
// H获取数据面板信息
|
||||||
MessageApi.getUserNoticeInfoNumVo().then((res: any) => {
|
const getSummery = () => {
|
||||||
if (res.code === 200) {
|
|
||||||
state.count = res.data.unreadNoticeNum;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 收货入库相关信息
|
// 收货入库相关信息
|
||||||
ReceiveApi.countOrderByMonth().then((res) => {
|
ReceiveApi.countOrderByMonth({
|
||||||
|
startTime: stateNew.startTime,
|
||||||
|
endTime: stateNew.endTime,
|
||||||
|
}).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
const {
|
const {
|
||||||
totalReceipt,
|
totalReceipt,
|
||||||
|
@ -189,7 +196,10 @@ const init = () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 出货相关信息
|
// 出货相关信息
|
||||||
ShipmentApi.countOrderByMonth().then((res) => {
|
ShipmentApi.countOrderByMonth({
|
||||||
|
startTime: stateNew.startTime,
|
||||||
|
endTime: stateNew.endTime,
|
||||||
|
}).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
const {
|
const {
|
||||||
totalShipment,
|
totalShipment,
|
||||||
|
@ -207,7 +217,16 @@ const init = () => {
|
||||||
stateNew.shipmentList[3].num = toBeSettled;
|
stateNew.shipmentList[3].num = toBeSettled;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
const init = () => {
|
||||||
|
// 消息统计
|
||||||
|
MessageApi.getUserNoticeInfoNumVo().then((res: any) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
state.count = res.data.unreadNoticeNum;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 获取数据面板信息
|
||||||
|
getSummery();
|
||||||
// 重新获取权限
|
// 重新获取权限
|
||||||
ProfileApi.getUserInfo().then((res: any) => {
|
ProfileApi.getUserInfo().then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|
|
@ -466,7 +466,7 @@ const appList = reactive([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "12.png",
|
icon: "12.png",
|
||||||
title: "支付明细",
|
title: "付款明细",
|
||||||
fn: () => {
|
fn: () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pagesApp/paymentDetail", // 要跳转到的页面路径
|
url: "/pagesApp/paymentDetail", // 要跳转到的页面路径
|
||||||
|
@ -475,7 +475,7 @@ const appList = reactive([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "13.png",
|
icon: "13.png",
|
||||||
title: "收入明细",
|
title: "收款明细",
|
||||||
fn: () => {
|
fn: () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pagesApp/incomeDetail", // 要跳转到的页面路径
|
url: "/pagesApp/incomeDetail", // 要跳转到的页面路径
|
||||||
|
|
|
@ -1,30 +1,44 @@
|
||||||
<template>
|
<template>
|
||||||
<swiper
|
<view style="position: relative">
|
||||||
class="swiper"
|
<swiper
|
||||||
circular
|
class="swiper"
|
||||||
:indicator-dots="true"
|
:circular="false"
|
||||||
:autoplay="false"
|
:indicator-dots="true"
|
||||||
:interval="2000"
|
:autoplay="false"
|
||||||
:duration="500"
|
:interval="2000"
|
||||||
indicator-active-color="#00DCEE"
|
:duration="500"
|
||||||
>
|
indicator-active-color="#00DCEE"
|
||||||
<swiper-item v-for="(item, index) in list" :key="index">
|
@change="change"
|
||||||
<view class="image-box">
|
:current="current"
|
||||||
<image
|
>
|
||||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLaunch/${item.imgUrl}`"
|
<swiper-item v-for="(item, index) in list" :key="index">
|
||||||
></image>
|
<view class="image-box">
|
||||||
<view class="title">
|
<image :src="`${url}/static/pagesLaunch/${item.imgUrl}`"></image>
|
||||||
{{ item.title }}
|
<view class="title">
|
||||||
|
{{ item.title }}
|
||||||
|
</view>
|
||||||
|
<view v-if="index === 3" class="btn-start" @click="start()">
|
||||||
|
立即启用
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="index === 3" class="btn-start" @click="start()">
|
</swiper-item>
|
||||||
立即启用
|
</swiper>
|
||||||
</view>
|
|
||||||
</view>
|
<view class="left" v-if="current > 0" @click="sub">
|
||||||
</swiper-item>
|
<up-icon name="arrow-left" color="#00d2e3" :size="'12px'"></up-icon>
|
||||||
</swiper>
|
</view>
|
||||||
|
<view class="right" v-if="current < list.length - 1" @click="add">
|
||||||
|
<up-icon
|
||||||
|
name="arrow-right"
|
||||||
|
color="#00d2e3"
|
||||||
|
:size="'12px'"
|
||||||
|
></up-icon> </view
|
||||||
|
></view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useMemberStore } from "@/store/index";
|
import { useMemberStore } from "@/store/index";
|
||||||
|
import { url } from "@/utils/data";
|
||||||
const store = useMemberStore();
|
const store = useMemberStore();
|
||||||
const profile = store.profile;
|
const profile = store.profile;
|
||||||
|
|
||||||
|
@ -46,6 +60,8 @@ const list = [
|
||||||
imgUrl: "4.png",
|
imgUrl: "4.png",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const current = ref(0);
|
||||||
const start = () => {
|
const start = () => {
|
||||||
// 若当前存在token 直接跳到首页 若不存在则跳转登录页
|
// 若当前存在token 直接跳到首页 若不存在则跳转登录页
|
||||||
if (profile.token) {
|
if (profile.token) {
|
||||||
|
@ -58,6 +74,18 @@ const start = () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const change = (e: any) => {
|
||||||
|
current.value = e.detail.current;
|
||||||
|
};
|
||||||
|
|
||||||
|
const add = () => {
|
||||||
|
current.value++
|
||||||
|
};
|
||||||
|
|
||||||
|
const sub = () => {
|
||||||
|
current.value--;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.swiper {
|
.swiper {
|
||||||
|
@ -90,4 +118,20 @@ const start = () => {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.left {
|
||||||
|
position: absolute;
|
||||||
|
top: 35%;
|
||||||
|
border: 1px solid #00dcee;
|
||||||
|
border-radius: 50%;
|
||||||
|
padding: 5rpx;
|
||||||
|
left: 22rpx;
|
||||||
|
}
|
||||||
|
.right {
|
||||||
|
position: absolute;
|
||||||
|
top: 35%;
|
||||||
|
border: 1px solid #00dcee;
|
||||||
|
border-radius: 50%;
|
||||||
|
padding: 5rpx;
|
||||||
|
right: 22rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<view class="c-login-container">
|
<view class="c-login-container">
|
||||||
<!-- logo -->
|
<!-- logo -->
|
||||||
<view class="logo">
|
<view class="logo">
|
||||||
<image :src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/logo2.png`" ></image>
|
<image :src="`${url}/static/pages/logo2.png`" ></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- form表单 -->
|
<!-- form表单 -->
|
||||||
<view class="login-form">
|
<view class="login-form">
|
||||||
|
@ -12,6 +12,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import {url} from "@/utils/data";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -1,286 +0,0 @@
|
||||||
<template>
|
|
||||||
<LoginLayout>
|
|
||||||
<template #form-box>
|
|
||||||
<u-form
|
|
||||||
labelPosition="left"
|
|
||||||
:model="model1"
|
|
||||||
:rules="rules"
|
|
||||||
ref="loginForm"
|
|
||||||
:labelWidth="0"
|
|
||||||
>
|
|
||||||
<u-form-item
|
|
||||||
v-for="(item, index) in formAttrList"
|
|
||||||
:key="index"
|
|
||||||
:prop="`userInfo.${item.modelName}`"
|
|
||||||
>
|
|
||||||
<view v-if="item.type === 'text'">
|
|
||||||
<u-input
|
|
||||||
v-model="model1.userInfo[`${item.modelName}`]"
|
|
||||||
:placeholder="item.placeholder"
|
|
||||||
:shape="'circle'"
|
|
||||||
clearable
|
|
||||||
:customStyle="{
|
|
||||||
'border-color':
|
|
||||||
currentFocus === item.modelName ? '#00dcee !important' : '',
|
|
||||||
}"
|
|
||||||
@focus="handleFocus(item.modelName)"
|
|
||||||
@blur="handleFocus('')"
|
|
||||||
@change="(e:any) => {handleInput(e, item.modelName)}"
|
|
||||||
@clear="handleClear(item)"
|
|
||||||
>
|
|
||||||
<template #suffix>
|
|
||||||
<text v-if="item.modelName === 'code'" class="code-btn">
|
|
||||||
<text
|
|
||||||
v-if="seconds === 0"
|
|
||||||
@click="handleCode"
|
|
||||||
class="code-primary"
|
|
||||||
>获取验证码</text
|
|
||||||
>
|
|
||||||
<text v-else
|
|
||||||
>剩余<text class="code-primary">{{ seconds }}秒</text></text
|
|
||||||
>
|
|
||||||
</text>
|
|
||||||
</template>
|
|
||||||
</u-input>
|
|
||||||
</view>
|
|
||||||
<view v-if="item.type === 'password'">
|
|
||||||
<u-input
|
|
||||||
v-model="model1.userInfo[`${item.modelName}`]"
|
|
||||||
:placeholder="item.placeholder"
|
|
||||||
:shape="'circle'"
|
|
||||||
clearable
|
|
||||||
:password="!item.isShowPwd"
|
|
||||||
:customStyle="{
|
|
||||||
'border-color':
|
|
||||||
currentFocus === item.modelName ? '#00dcee !important' : '',
|
|
||||||
}"
|
|
||||||
@focus="handleFocus(item.modelName)"
|
|
||||||
@blur="handleFocus('')"
|
|
||||||
@change="(e:any) => {handleInput(e, item.modelName)}"
|
|
||||||
@clear="handleClear(item)"
|
|
||||||
>
|
|
||||||
<template #suffix>
|
|
||||||
<image
|
|
||||||
v-if="!item.isShowPwd"
|
|
||||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/login/hide.png`"
|
|
||||||
class="custom-icon"
|
|
||||||
@click="item.isShowPwd = true"
|
|
||||||
></image>
|
|
||||||
<image
|
|
||||||
v-else
|
|
||||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/login/show.png`"
|
|
||||||
class="custom-icon"
|
|
||||||
@click="item.isShowPwd = false"
|
|
||||||
></image>
|
|
||||||
</template>
|
|
||||||
</u-input>
|
|
||||||
</view>
|
|
||||||
</u-form-item>
|
|
||||||
</u-form>
|
|
||||||
|
|
||||||
<view class="login-btn">
|
|
||||||
<u-button
|
|
||||||
@click="submit"
|
|
||||||
type="primary"
|
|
||||||
:customStyle="{
|
|
||||||
'border-radius': '43rpx',
|
|
||||||
}"
|
|
||||||
>保存</u-button
|
|
||||||
>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
</LoginLayout>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ProfileApi } from "@/services/index";
|
|
||||||
import LoginLayout from "./components/loginLayout.vue";
|
|
||||||
import valid from "@/utils/validate";
|
|
||||||
const handleClear = (item:any) => {
|
|
||||||
(model1.userInfo as any)[item.modelName] = '';
|
|
||||||
}
|
|
||||||
const loginForm = ref(null);
|
|
||||||
const model1 = <any>reactive({
|
|
||||||
userInfo: {
|
|
||||||
phone: "",
|
|
||||||
code: "",
|
|
||||||
newPassword: "",
|
|
||||||
passwordConfirm: "",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
// 控制focus 边框样式
|
|
||||||
const currentFocus = ref("");
|
|
||||||
|
|
||||||
// 表单属性清单
|
|
||||||
const formAttrList = ref([
|
|
||||||
{
|
|
||||||
modelName: "phone",
|
|
||||||
type: "text",
|
|
||||||
placeholder: "请输入手机号",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
modelName: "code",
|
|
||||||
type: "text",
|
|
||||||
placeholder: "请输入验证码",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
modelName: "newPassword",
|
|
||||||
type: "password",
|
|
||||||
placeholder: "请输入新密码",
|
|
||||||
isShowPwd: false, // 控制密码显示隐藏
|
|
||||||
},
|
|
||||||
{
|
|
||||||
modelName: "passwordConfirm",
|
|
||||||
type: "password",
|
|
||||||
placeholder: "请输入确认密码",
|
|
||||||
isShowPwd: false, // 控制密码显示隐藏
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const handleInput = (e: any, key: string) => {
|
|
||||||
if (key === "phone") {
|
|
||||||
const temp = e?.replace(valid.valid_number, "");
|
|
||||||
setTimeout(() => {
|
|
||||||
(model1.userInfo as any)[key] = temp;
|
|
||||||
}, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (key === "code") {
|
|
||||||
const temp = e?.replace(valid.valid_number, "");
|
|
||||||
setTimeout(() => {
|
|
||||||
(model1.userInfo as any)[key] = temp;
|
|
||||||
}, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (key === "newPassword" || key === "passwordConfirm") {
|
|
||||||
const temp = e?.replace(valid.valid_no_cn, "");
|
|
||||||
setTimeout(() => {
|
|
||||||
(model1.userInfo as any)[key] = temp;
|
|
||||||
}, 10);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 获取验证码交互
|
|
||||||
const seconds = ref(0);
|
|
||||||
const handleCode = () => {
|
|
||||||
if (model1.userInfo === undefined || !model1.userInfo.phone) {
|
|
||||||
uni.showToast({
|
|
||||||
title: "请输入手机号",
|
|
||||||
icon: "error",
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!valid.mobile.pattern.test(model1.userInfo.phone)) {
|
|
||||||
uni.showToast({
|
|
||||||
title: "请输入正确的手机号",
|
|
||||||
icon: "error",
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ProfileApi.sendCommonMsg({
|
|
||||||
phone: model1.userInfo.phone,
|
|
||||||
type: "forget",
|
|
||||||
}).then((res) => {
|
|
||||||
seconds.value = 120;
|
|
||||||
let countDownTimer = setInterval(() => {
|
|
||||||
if (seconds.value > 0) {
|
|
||||||
--seconds.value;
|
|
||||||
} else {
|
|
||||||
clearInterval(countDownTimer);
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
const rules = ref({
|
|
||||||
"userInfo.phone": {
|
|
||||||
type: "string",
|
|
||||||
required: true,
|
|
||||||
message: "请输入手机号",
|
|
||||||
trigger: ["blur", "change"],
|
|
||||||
},
|
|
||||||
"userInfo.code": {
|
|
||||||
type: "string",
|
|
||||||
required: true,
|
|
||||||
message: "请输入验证码",
|
|
||||||
trigger: ["blur", "change"],
|
|
||||||
},
|
|
||||||
"userInfo.newPassword": {
|
|
||||||
type: "string",
|
|
||||||
required: true,
|
|
||||||
trigger: ["blur", "change"],
|
|
||||||
message: "请输入新密码",
|
|
||||||
},
|
|
||||||
"userInfo.passwordConfirm": {
|
|
||||||
type: "string",
|
|
||||||
required: true,
|
|
||||||
message: "请输入确认密码",
|
|
||||||
trigger: ["blur", "change"],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const handleFocus = (attr: string) => {
|
|
||||||
currentFocus.value = attr;
|
|
||||||
};
|
|
||||||
|
|
||||||
const submit = () => {
|
|
||||||
if (model1.userInfo.phone) {
|
|
||||||
if (!valid.mobile.pattern.test(model1.userInfo.phone)) {
|
|
||||||
uni.showToast({ icon: "none", title: "请输入正确的手机号" });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (model1.userInfo.newPassword || model1.userInfo.passwordConfirm) {
|
|
||||||
if (
|
|
||||||
!valid.valid_password.pattern.test(model1.userInfo.newPassword) ||
|
|
||||||
!valid.valid_password.pattern.test(model1.userInfo.passwordConfirm)
|
|
||||||
) {
|
|
||||||
uni.showToast({
|
|
||||||
icon: "none",
|
|
||||||
title: valid.valid_password.message,
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (model1.userInfo.newPassword !== model1.userInfo.passwordConfirm) {
|
|
||||||
uni.showToast({ icon: "none", title: "新密码必须和确认密码相同" });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
(loginForm.value as any).validate().then((res: any) => {
|
|
||||||
if (res) {
|
|
||||||
// 忘记密码登录
|
|
||||||
ProfileApi.forgetPwd({ ...model1.userInfo, type: "forget" }).then(
|
|
||||||
(res: any) => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
uni.showToast({ title: "密码更新成功" });
|
|
||||||
uni.navigateBack();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.custom-icon {
|
|
||||||
width: 37.18rpx;
|
|
||||||
height: 18.59rpx;
|
|
||||||
}
|
|
||||||
.login-btn {
|
|
||||||
margin-top: 23.72rpx;
|
|
||||||
}
|
|
||||||
::v-deep .u-form-item__body__right__message {
|
|
||||||
margin-left: 10px !important;
|
|
||||||
}
|
|
||||||
.code-btn {
|
|
||||||
font-size: 27rpx;
|
|
||||||
font-family: Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
cursor: pointer;
|
|
||||||
.code-primary {
|
|
||||||
color: $u-primary;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -9,75 +9,41 @@
|
||||||
ref="loginForm"
|
ref="loginForm"
|
||||||
:labelWidth="0"
|
:labelWidth="0"
|
||||||
>
|
>
|
||||||
<u-form-item prop="userInfo.userName">
|
<u-form-item prop="userInfo.phone">
|
||||||
<u-input
|
<u-input
|
||||||
v-model="model1.userInfo.userName"
|
v-model="model1.userInfo.phone"
|
||||||
placeholder="请输入手机号"
|
placeholder="请输入手机号"
|
||||||
:shape="'circle'"
|
:shape="'circle'"
|
||||||
clearable
|
clearable
|
||||||
:customStyle="{
|
:customStyle="{
|
||||||
'border-color':
|
'border-color':
|
||||||
currentFocus === 'userName' ? '#00dcee !important' : '',
|
currentFocus === 'phone' ? '#00dcee !important' : '',
|
||||||
}"
|
}"
|
||||||
border="none"
|
border="none"
|
||||||
type="number"
|
type="number"
|
||||||
@focus="handleFocus('userName')"
|
@focus="handleFocus('phone')"
|
||||||
@change="(e:any) => {handleInput(e, 'userName')}"
|
@change="(e:any) => {handleInput(e, 'phone')}"
|
||||||
@clear="handleClear({ key: 'userName' })"
|
@clear="handleClear({ key: 'phone' })"
|
||||||
>
|
>
|
||||||
</u-input>
|
</u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item prop="userInfo.password">
|
<u-form-item prop="userInfo.code">
|
||||||
<u-input
|
<u-input
|
||||||
v-model="model1.userInfo.password"
|
v-model="model1.userInfo.code"
|
||||||
placeholder="请输入密码"
|
placeholder="请输入验证码"
|
||||||
:shape="'circle'"
|
:shape="'circle'"
|
||||||
type="text"
|
type="text"
|
||||||
:password="!isShowPwd"
|
|
||||||
:customStyle="{
|
|
||||||
'border-color':
|
|
||||||
currentFocus === 'password' ? '#00dcee !important' : '',
|
|
||||||
}"
|
|
||||||
border="none"
|
border="none"
|
||||||
@focus="handleFocus('password')"
|
|
||||||
clearable
|
|
||||||
@change="(e:any) => {handleInput(e, 'password')}"
|
|
||||||
@clear="handleClear({ key: 'password' })"
|
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<image
|
<text v-if="seconds === 0" class="code_text" @click="getCode"
|
||||||
v-if="!isShowPwd"
|
>获取验证码</text
|
||||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/login/hide.png`"
|
>
|
||||||
class="custom-icon"
|
<text v-else class="code_text">{{ seconds }}s后重新发送</text>
|
||||||
@click="isShowPwd = true"
|
|
||||||
></image>
|
|
||||||
<image
|
|
||||||
v-else
|
|
||||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/login/show.png`"
|
|
||||||
class="custom-icon"
|
|
||||||
@click="isShowPwd = false"
|
|
||||||
></image>
|
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u-form>
|
</u-form>
|
||||||
<view class="remember-box">
|
|
||||||
<view>
|
|
||||||
<u-checkbox-group v-model="checkGroup.rememberCheck">
|
|
||||||
<u-checkbox
|
|
||||||
:customStyle="{}"
|
|
||||||
:key="1"
|
|
||||||
:label="'记住密码?'"
|
|
||||||
:name="1"
|
|
||||||
:size="'25rpx'"
|
|
||||||
:activeColor="'#00dcee'"
|
|
||||||
:labelSize="'25rpx'"
|
|
||||||
:labelColor="'#000000'"
|
|
||||||
></u-checkbox>
|
|
||||||
</u-checkbox-group>
|
|
||||||
</view>
|
|
||||||
<text @click="handleForgetPwd">忘记密码</text>
|
|
||||||
</view>
|
|
||||||
<view class="login-btn">
|
<view class="login-btn">
|
||||||
<u-button
|
<u-button
|
||||||
@click="submit"
|
@click="submit"
|
||||||
|
@ -89,14 +55,19 @@
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
<view class="agree">
|
<view class="agree">
|
||||||
<u-checkbox-group v-model="checkGroup.agreeCheck">
|
<u-checkbox
|
||||||
<u-checkbox
|
:key="1"
|
||||||
:key="1"
|
:size="'25rpx'"
|
||||||
:size="'25rpx'"
|
:activeColor="'#00dcee'"
|
||||||
:activeColor="'#00dcee'"
|
:name="1"
|
||||||
:name="1"
|
:usedAlone="true"
|
||||||
></u-checkbox>
|
:checked="checkGroup.agreeCheck"
|
||||||
</u-checkbox-group>
|
@change="
|
||||||
|
(v:any) => {
|
||||||
|
checkGroup.agreeCheck = v;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
></u-checkbox>
|
||||||
<view>
|
<view>
|
||||||
我已阅读并同意用户
|
我已阅读并同意用户
|
||||||
<text class="agree-item" @click="openDoc('爱梵达用户服务协议')"
|
<text class="agree-item" @click="openDoc('爱梵达用户服务协议')"
|
||||||
|
@ -111,15 +82,6 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</LoginLayout>
|
</LoginLayout>
|
||||||
|
|
||||||
<u-action-sheet
|
|
||||||
:actions="state.dpList"
|
|
||||||
:title="'基地名称'"
|
|
||||||
:show="state.isShow"
|
|
||||||
@select="(v: any) => handleSelect(v)"
|
|
||||||
@close="state.isShow = false"
|
|
||||||
:closeOnClickAction="true"
|
|
||||||
></u-action-sheet>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
@ -129,6 +91,7 @@ import { useMemberStore } from "@/store/index";
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
import pinia from "@/store";
|
import pinia from "@/store";
|
||||||
import { onShow } from "@dcloudio/uni-app";
|
import { onShow } from "@dcloudio/uni-app";
|
||||||
|
import { url } from "@/utils/data";
|
||||||
|
|
||||||
const handleClear = (item: any) => {
|
const handleClear = (item: any) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -139,45 +102,71 @@ const store = useMemberStore(pinia);
|
||||||
const loginForm = ref(null);
|
const loginForm = ref(null);
|
||||||
const model1 = reactive({
|
const model1 = reactive({
|
||||||
userInfo: {
|
userInfo: {
|
||||||
userName: "",
|
phone: "",
|
||||||
password: "",
|
code: "",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
const seconds = ref(0);
|
||||||
// 控制focus 边框样式
|
// 控制focus 边框样式
|
||||||
const currentFocus = ref("");
|
const currentFocus = ref("");
|
||||||
// 控制密码显示隐藏
|
// 控制密码显示隐藏
|
||||||
const isShowPwd = ref(false);
|
const isShowPwd = ref(false);
|
||||||
// 记住密码 // 同意协议
|
// 记住密码 // 同意协议
|
||||||
const checkGroup = reactive({
|
const checkGroup = reactive({
|
||||||
rememberCheck: [],
|
agreeCheck: true,
|
||||||
agreeCheck: [],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
"userInfo.userName": {
|
"userInfo.phone": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入手机号",
|
message: "请输入手机号",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
"userInfo.password": {
|
"userInfo.code": {
|
||||||
type: "string",
|
type: "string",
|
||||||
required: true,
|
required: true,
|
||||||
message: "请输入密码",
|
message: "请输入验证码",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleInput = (e: any, key: string) => {
|
const getCode = () => {
|
||||||
if (key === "userName") {
|
if (!valid.mobile.pattern.test(model1.userInfo.phone)) {
|
||||||
const temp = e?.replace(valid.valid_number, "");
|
uni.showToast({ icon: "none", title: "请输入正确的手机号" });
|
||||||
setTimeout(() => {
|
return;
|
||||||
(model1.userInfo as any)[key] = temp;
|
|
||||||
}, 10);
|
|
||||||
}
|
}
|
||||||
|
ProfileApi.getCommonDbPhone({ phone: model1.userInfo.phone }).then(
|
||||||
if (key === "password") {
|
(res: any) => {
|
||||||
const temp = e?.replace(valid.valid_no_cn, "");
|
if (res.code === 200) {
|
||||||
|
if (res.data) {
|
||||||
|
store.setMechanismCode(res.data[0].mechanismCode);
|
||||||
|
sendMsg();
|
||||||
|
} else {
|
||||||
|
uni.$u.toast("当前号码未加入货场,请联系管理员");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
const sendMsg = () => {
|
||||||
|
ProfileApi.sendMsg({ phone: model1.userInfo.phone }).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
uni.$u.toast("验证码已发送");
|
||||||
|
seconds.value = 60;
|
||||||
|
let countDownTimer = setInterval(() => {
|
||||||
|
if (seconds.value > 0) {
|
||||||
|
--seconds.value;
|
||||||
|
} else {
|
||||||
|
clearInterval(countDownTimer);
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const handleInput = (e: any, key: string) => {
|
||||||
|
if (key === "phone") {
|
||||||
|
const temp = e?.replace(valid.valid_number, "");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
(model1.userInfo as any)[key] = temp;
|
(model1.userInfo as any)[key] = temp;
|
||||||
}, 10);
|
}, 10);
|
||||||
|
@ -188,39 +177,24 @@ const handleFocus = (attr: string) => {
|
||||||
currentFocus.value = attr;
|
currentFocus.value = attr;
|
||||||
};
|
};
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
if (model1.userInfo.userName) {
|
if (model1.userInfo.phone) {
|
||||||
if (!valid.mobile.pattern.test(model1.userInfo.userName)) {
|
if (!valid.mobile.pattern.test(model1.userInfo.phone)) {
|
||||||
uni.showToast({ icon: "none", title: "请输入正确的手机号" });
|
uni.showToast({ icon: "none", title: "请输入正确的手机号" });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (model1.userInfo.password) {
|
|
||||||
if (!valid.valid_password.pattern.test(model1.userInfo.password)) {
|
|
||||||
uni.showToast({
|
|
||||||
icon: "none",
|
|
||||||
title: valid.valid_password.message,
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
(loginForm.value as any).validate().then((res: any) => {
|
(loginForm.value as any).validate().then((res: any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
if (checkGroup.agreeCheck.length === 0) {
|
if (!checkGroup.agreeCheck) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "请同意协议",
|
title: "请同意协议",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ProfileApi.loginByAccount(model1.userInfo).then((res: any) => {
|
ProfileApi.loginPhone(model1.userInfo).then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
if(checkGroup.rememberCheck.length === 1) {
|
|
||||||
uni.setStorageSync('catchLoginInfo', model1.userInfo);
|
|
||||||
} else {
|
|
||||||
uni.setStorageSync('catchLoginInfo', {});
|
|
||||||
}
|
|
||||||
store.setProfile(res.data);
|
store.setProfile(res.data);
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: "/pagesHome/index", // 要跳转到的页面路径
|
url: "/pagesHome/index", // 要跳转到的页面路径
|
||||||
|
@ -230,17 +204,12 @@ const submit = () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const handleForgetPwd = () => {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pagesLogin/login/forgetPwd", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const openDoc = (item: string) => {
|
const openDoc = (item: string) => {
|
||||||
//文件预览
|
//文件预览
|
||||||
|
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url: `https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/login/${item}.docx`,
|
url: `${url}/static/pages/login/${item}.docx`,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
setTimeout(
|
setTimeout(
|
||||||
() =>
|
() =>
|
||||||
|
@ -265,45 +234,7 @@ const openDoc = (item: string) => {
|
||||||
console.log(res); //失败
|
console.log(res); //失败
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// uni.openDocument({
|
|
||||||
// filePath: `https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/login/${item}.docx`,
|
|
||||||
// showMenu: true,
|
|
||||||
// success: function (res) {
|
|
||||||
// uni.showToast({ title: "打开成功" });
|
|
||||||
// },
|
|
||||||
// });
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSelect = (v: any) => {
|
|
||||||
state.isShow = false;
|
|
||||||
state.dpObj = v;
|
|
||||||
store.setChildPath(v.dbIp);
|
|
||||||
};
|
|
||||||
|
|
||||||
const state = reactive({
|
|
||||||
dpList: [],
|
|
||||||
isShow: false,
|
|
||||||
dpObj: {},
|
|
||||||
});
|
|
||||||
|
|
||||||
// 获取基地信息
|
|
||||||
ProfileApi.getDbInfo({}).then((res) => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
state.dpList = res.data.map((item: any) => {
|
|
||||||
return { name: item.dbName, ...item };
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
onShow(() => {
|
|
||||||
if (uni.getStorageSync('catchLoginInfo')) {
|
|
||||||
const {userName, password} = uni.getStorageSync('catchLoginInfo')
|
|
||||||
model1.userInfo.userName = userName
|
|
||||||
model1.userInfo.password = password
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -315,16 +246,6 @@ onShow(() => {
|
||||||
width: 37.18rpx;
|
width: 37.18rpx;
|
||||||
height: 18.59rpx;
|
height: 18.59rpx;
|
||||||
}
|
}
|
||||||
.remember-box {
|
|
||||||
display: flex;
|
|
||||||
font-size: 25rpx;
|
|
||||||
font-family: Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 10rpx;
|
|
||||||
color: $u-primary;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.login-btn {
|
.login-btn {
|
||||||
margin-top: 23.72rpx;
|
margin-top: 23.72rpx;
|
||||||
}
|
}
|
||||||
|
@ -343,4 +264,7 @@ onShow(() => {
|
||||||
color: $u-primary;
|
color: $u-primary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.code_text {
|
||||||
|
color: $u-primary;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -69,7 +69,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getList = (v?: boolean) => {
|
const getList = (v?: boolean) => {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<view class="baseinfo">
|
<view class="baseinfo">
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view> 姓名: {{ profile.userName }} </view>
|
<view> 姓名: {{ profile.userName }} </view>
|
||||||
|
<view> 性别: {{ profile.gender ? (profile.gender === 1 ? '男' : '女') :'未知' }} </view>
|
||||||
<view> 手机号码: {{ profile.phone }} </view>
|
<view> 手机号码: {{ profile.phone }} </view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -5,26 +5,26 @@
|
||||||
<view>
|
<view>
|
||||||
<image
|
<image
|
||||||
class="bg"
|
class="bg"
|
||||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/profile/bg.png`"
|
:src="`${url}/static/pages/profile/bg.png`"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="baseinfo">
|
<view class="baseinfo">
|
||||||
<view class="head">
|
<view class="head">
|
||||||
<image
|
<image
|
||||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/profile/user.png`"
|
:src="`${url}/static/pages/profile/user.png`"
|
||||||
class="user"
|
class="user"
|
||||||
></image>
|
></image>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
<text class="name">{{ profile.userName || "-" }}</text>
|
<text class="name">{{ profile.name || "-" }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<text class="company">{{ profile.factory_name || "-" }}</text>
|
<text class="company">{{ profile.phone || "-" }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<u-list :height="'130px'">
|
<u-list :height="'200px'">
|
||||||
<u-list-item v-for="(item, index) in list" :key="index">
|
<u-list-item v-for="(item, index) in list" :key="index">
|
||||||
<u-cell
|
<u-cell
|
||||||
:title="item.name"
|
:title="item.name"
|
||||||
|
@ -37,7 +37,8 @@
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<view style="width: 40rpx">
|
<view style="width: 40rpx">
|
||||||
<image
|
<image
|
||||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/profile/${item.icon}`"
|
:src="`${url}/static/pages/profile/${item.icon}`"
|
||||||
|
mode="widthFix"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -67,8 +68,8 @@ import { useMemberStore } from "@/store/index";
|
||||||
import TabBar from "@/components/TabBar/index.vue";
|
import TabBar from "@/components/TabBar/index.vue";
|
||||||
import SmallModal from "@/components/Modal/smallModal.vue";
|
import SmallModal from "@/components/Modal/smallModal.vue";
|
||||||
import Box from "@/components/Box/index.vue";
|
import Box from "@/components/Box/index.vue";
|
||||||
import pinia from '@/store'
|
import pinia from "@/store";
|
||||||
|
import {url} from "@/utils/data";
|
||||||
|
|
||||||
const isShowCancelModal = ref(false);
|
const isShowCancelModal = ref(false);
|
||||||
|
|
||||||
|
@ -88,18 +89,21 @@ const store = useMemberStore(pinia);
|
||||||
const profile = store.profile.userInfo;
|
const profile = store.profile.userInfo;
|
||||||
const list = reactive([
|
const list = reactive([
|
||||||
{
|
{
|
||||||
name: "基本信息",
|
name: "个人信息",
|
||||||
icon: "baseinfo.png",
|
icon: "1.png",
|
||||||
path: "/pagesLogin/profile/baseinfo",
|
path: "/pagesLogin/profile/baseinfo",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "修改密码",
|
name: "用户协议",
|
||||||
icon: "modifyPwd.png",
|
icon: "4.png",
|
||||||
path: "/pagesLogin/profile/modifyPwd",
|
},
|
||||||
|
{
|
||||||
|
name: "隐私政策",
|
||||||
|
icon: "5.png",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "退出登录",
|
name: "退出登录",
|
||||||
icon: "logout.png",
|
icon: "3.png",
|
||||||
path: "",
|
path: "",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
@ -107,8 +111,42 @@ const list = reactive([
|
||||||
const hanldeClick = (item: any) => {
|
const hanldeClick = (item: any) => {
|
||||||
if (item.name === "退出登录") {
|
if (item.name === "退出登录") {
|
||||||
handleModal(true);
|
handleModal(true);
|
||||||
|
} else if (item.name === "用户协议") {
|
||||||
|
openDoc('爱梵达用户服务协议')
|
||||||
|
} else if (item.name === "隐私政策") {
|
||||||
|
openDoc(item.name)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const openDoc = (item: string) => {
|
||||||
|
//文件预览
|
||||||
|
uni.downloadFile({
|
||||||
|
url: `${url}/static/pages/login/${item}.docx`,
|
||||||
|
success: function (res) {
|
||||||
|
setTimeout(
|
||||||
|
() =>
|
||||||
|
uni.openDocument({
|
||||||
|
filePath: res.tempFilePath,
|
||||||
|
showMenu: false,
|
||||||
|
success: function () {
|
||||||
|
console.log("打开文档成功");
|
||||||
|
},
|
||||||
|
fail: function () {
|
||||||
|
uni.showToast({
|
||||||
|
title: "暂不支持此类型",
|
||||||
|
duration: 2000,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
100
|
||||||
|
);
|
||||||
|
},
|
||||||
|
fail: function (res) {
|
||||||
|
console.log(res); //失败
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.profile {
|
.profile {
|
||||||
|
@ -149,16 +187,7 @@ const hanldeClick = (item: any) => {
|
||||||
padding: 28.21rpx 21.15rpx;
|
padding: 28.21rpx 21.15rpx;
|
||||||
margin-top: 24.36rpx;
|
margin-top: 24.36rpx;
|
||||||
image:nth-child(1) {
|
image:nth-child(1) {
|
||||||
width: 28.85rpx;
|
width: 100%;
|
||||||
height: 24.36rpx;
|
|
||||||
}
|
|
||||||
image:nth-child(2) {
|
|
||||||
width: 25rpx;
|
|
||||||
height: 32.69rpx;
|
|
||||||
}
|
|
||||||
image:nth-child(3) {
|
|
||||||
width: 30.13rpx;
|
|
||||||
height: 30.13rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,226 +0,0 @@
|
||||||
<template>
|
|
||||||
<view class="baseinfo">
|
|
||||||
<view class="box">
|
|
||||||
<u-form
|
|
||||||
labelPosition="left"
|
|
||||||
:model="model1"
|
|
||||||
:rules="rules"
|
|
||||||
ref="form"
|
|
||||||
:labelWidth="0"
|
|
||||||
:errorType="'border-bottom'"
|
|
||||||
>
|
|
||||||
<u-form-item
|
|
||||||
v-for="(item, index) in formAttrList"
|
|
||||||
:key="index"
|
|
||||||
:prop="`userInfo.${item.key}`"
|
|
||||||
>
|
|
||||||
<u-input
|
|
||||||
v-model="(model1.userInfo as any)[item.key]"
|
|
||||||
:placeholder="`请${item.type === 'select' ? '选择' : '输入'}${
|
|
||||||
item.name
|
|
||||||
}`"
|
|
||||||
clearable
|
|
||||||
:customStyle="{}"
|
|
||||||
:border="index === 2 ? 'none' : 'bottom'"
|
|
||||||
:value="(model1.userInfo as any)[item.key]"
|
|
||||||
:password="!item.isShowPwd"
|
|
||||||
@change="(e:any) => {handleInput(e, item.key)}"
|
|
||||||
@clear="handleClear(item)"
|
|
||||||
>
|
|
||||||
<template #suffix>
|
|
||||||
<image
|
|
||||||
v-if="!item.isShowPwd"
|
|
||||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/login/hide.png`"
|
|
||||||
class="custom-icon"
|
|
||||||
@click="item.isShowPwd = true"
|
|
||||||
></image>
|
|
||||||
<image
|
|
||||||
v-else
|
|
||||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/login/show.png`"
|
|
||||||
class="custom-icon"
|
|
||||||
@click="item.isShowPwd = false"
|
|
||||||
></image>
|
|
||||||
</template>
|
|
||||||
</u-input>
|
|
||||||
</u-form-item>
|
|
||||||
</u-form>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="save-btn">
|
|
||||||
<u-button
|
|
||||||
@click="submit"
|
|
||||||
type="primary"
|
|
||||||
:customStyle="{
|
|
||||||
'border-radius': '43rpx',
|
|
||||||
}"
|
|
||||||
>保存</u-button
|
|
||||||
>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ProfileApi } from "@/services";
|
|
||||||
import valid from "@/utils/validate";
|
|
||||||
|
|
||||||
const handleInput = (e: any, key: string) => {
|
|
||||||
const temp = e?.replace(valid.valid_no_cn, "");
|
|
||||||
setTimeout(() => {
|
|
||||||
(model1.userInfo as any)[key] = temp;
|
|
||||||
}, 10);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleClear = (item:any) => {
|
|
||||||
(model1.userInfo as any)[item.key] = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
// 表单属性清单
|
|
||||||
const formAttrList = ref([
|
|
||||||
{
|
|
||||||
name: "当前密码",
|
|
||||||
key: "password",
|
|
||||||
type: "password",
|
|
||||||
required: true,
|
|
||||||
isShowPwd: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "新密码",
|
|
||||||
key: "newPassword",
|
|
||||||
type: "password",
|
|
||||||
required: true,
|
|
||||||
isShowPwd: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "确认密码",
|
|
||||||
key: "passwordConfirm",
|
|
||||||
type: "password",
|
|
||||||
required: true,
|
|
||||||
isShowPwd: false,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const model1 = <any>reactive({
|
|
||||||
userInfo: {
|
|
||||||
password: "",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const rules = ref({
|
|
||||||
"userInfo.password": {
|
|
||||||
type: "string",
|
|
||||||
required: true,
|
|
||||||
message: "请输入当前密码",
|
|
||||||
trigger: ["blur", "change"],
|
|
||||||
},
|
|
||||||
"userInfo.newPassword": {
|
|
||||||
type: "string",
|
|
||||||
required: true,
|
|
||||||
message: "请输入新密码",
|
|
||||||
trigger: ["blur", "change"],
|
|
||||||
},
|
|
||||||
"userInfo.passwordConfirm": {
|
|
||||||
type: "string",
|
|
||||||
required: true,
|
|
||||||
message: "请输入确认密码",
|
|
||||||
trigger: ["blur", "change"],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const form = ref();
|
|
||||||
const check = () => {
|
|
||||||
return new Promise((resolve) => {
|
|
||||||
form.value
|
|
||||||
.validate()
|
|
||||||
.then((res: boolean) => {
|
|
||||||
resolve(res);
|
|
||||||
})
|
|
||||||
.catch((errors: any) => {
|
|
||||||
resolve(false);
|
|
||||||
uni.showToast({
|
|
||||||
icon: "none",
|
|
||||||
title: errors[0].message || "校验失败",
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const startSave = () => {
|
|
||||||
console.log(model1.userInfo);
|
|
||||||
ProfileApi.updateUserPwd({ ...model1.userInfo }).then((res) => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
uni.showToast({ icon: "none", title: "密码修改成功" });
|
|
||||||
model1.userInfo = {};
|
|
||||||
setTimeout(() => {
|
|
||||||
ProfileApi.logOut().then((res: any) => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
uni.reLaunch({
|
|
||||||
url: "/pagesLogin/login/index", // 要跳转到的页面路径
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 10);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const submit = () => {
|
|
||||||
if (model1.userInfo.newPassword || model1.userInfo.passwordConfirm) {
|
|
||||||
if (
|
|
||||||
!valid.valid_password.pattern.test(model1.userInfo.newPassword) ||
|
|
||||||
!valid.valid_password.pattern.test(model1.userInfo.passwordConfirm)
|
|
||||||
) {
|
|
||||||
uni.showToast({
|
|
||||||
icon: "none",
|
|
||||||
title: valid.valid_password.message,
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (model1.userInfo.password === model1.userInfo.newPassword) {
|
|
||||||
uni.showToast({ icon: "none", title: "新密码不能和旧密码相同" });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (model1.userInfo.newPassword !== model1.userInfo.passwordConfirm) {
|
|
||||||
uni.showToast({ icon: "none", title: "新密码必须和确认密码相同" });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
check().then((res) => {
|
|
||||||
if (res) {
|
|
||||||
startSave();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="scss">
|
|
||||||
.custom-icon {
|
|
||||||
width: 37.18rpx;
|
|
||||||
height: 18.59rpx;
|
|
||||||
}
|
|
||||||
.baseinfo {
|
|
||||||
background: #f8f8f8;
|
|
||||||
height: 100vh;
|
|
||||||
padding: 26.28rpx 25.64rpx;
|
|
||||||
.box {
|
|
||||||
padding: 18.59rpx;
|
|
||||||
background: #ffffff;
|
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
|
||||||
border-radius: 13rpx;
|
|
||||||
font-size: 27rpx;
|
|
||||||
font-family: Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #000000;
|
|
||||||
::v-deep .u-border-bottom {
|
|
||||||
border-color: rgb(233 233 233 / 0.76) !important;
|
|
||||||
}
|
|
||||||
::v-deep .u-form-item__body__right__message {
|
|
||||||
height: 0px;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
::v-deep .u-form-item {
|
|
||||||
height: 45px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.save-btn {
|
|
||||||
margin-top: 150px;
|
|
||||||
button {
|
|
||||||
width: 80%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -0,0 +1,377 @@
|
||||||
|
<template>
|
||||||
|
<view class="c-card">
|
||||||
|
<view class="box">
|
||||||
|
<view class="base">
|
||||||
|
<view>
|
||||||
|
<view class="supplier"> {{ currentOrder.deviceName || "-" }} </view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex-box1">
|
||||||
|
<view class="type">{{ currentOrder.productName || "" }}</view>
|
||||||
|
<view class="btn">
|
||||||
|
<view
|
||||||
|
><u-tag
|
||||||
|
text="现场照片"
|
||||||
|
plain
|
||||||
|
shape="circle"
|
||||||
|
:bgColor="'rgba(237, 254, 255, 1)'"
|
||||||
|
@click="handleScenePhoto(currentOrder.id)"
|
||||||
|
></u-tag
|
||||||
|
></view>
|
||||||
|
<view
|
||||||
|
><u-tag
|
||||||
|
text="收货单作废"
|
||||||
|
plain
|
||||||
|
shape="circle"
|
||||||
|
:borderColor="'rgba(255, 147, 68, 1) !important'"
|
||||||
|
:bgColor="'rgba(255, 240, 229, 1)'"
|
||||||
|
:color="'rgba(255, 157, 85, 1) !important'"
|
||||||
|
@click="handleModal(true, currentOrder.id as number)"
|
||||||
|
></u-tag
|
||||||
|
></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 入库 过磅时间对应过毛时间 -->
|
||||||
|
<view class="flex-box" style="border: none">
|
||||||
|
<text>过磅时间:{{ currentOrder.grossTime || "-" }}</text>
|
||||||
|
<!-- {{ currentOrder.createTime }} -->
|
||||||
|
</view>
|
||||||
|
<view class="flex-box">
|
||||||
|
<text>定价人:{{ currentOrder.pricingUserName || "-" }}</text>
|
||||||
|
<text>审核人:{{ currentOrder.reviewerUserName || "-" }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="more">
|
||||||
|
<view> 收货单号:{{ currentOrder.receiptNumber }} </view>
|
||||||
|
<view></view>
|
||||||
|
<view v-for="(item, index) in gridList1" :key="index">
|
||||||
|
<text v-if="item.name"
|
||||||
|
><text :class="{ bold: item.isBold }">{{ item.name }}</text
|
||||||
|
>:</text
|
||||||
|
><text>
|
||||||
|
<text :class="{ bold: item.isBold }">
|
||||||
|
{{ item.isBefore ? item.unit : "" }}
|
||||||
|
{{ item.num }}
|
||||||
|
{{ item.isBefore ? "" : item.unit }}
|
||||||
|
</text>
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="op-btn">
|
||||||
|
<view>
|
||||||
|
<u-button
|
||||||
|
text="打印"
|
||||||
|
type="primary"
|
||||||
|
:customStyle="{ 'border-radius': '43rpx' }"
|
||||||
|
@click="handlePrint"
|
||||||
|
></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<SmallModal
|
||||||
|
:title="'确认作废吗?'"
|
||||||
|
:content="'确认作废后,该订单不能恢复!'"
|
||||||
|
:okText="'确认作废'"
|
||||||
|
:isMain="true"
|
||||||
|
:show="isShowCancelModal"
|
||||||
|
@handleModal="(v:boolean) => {handleModal(v, deleteId)}"
|
||||||
|
@handleOk="handleOk()"
|
||||||
|
/>
|
||||||
|
<u-modal
|
||||||
|
showCancelButton
|
||||||
|
:confirmColor="'#00D2E3'"
|
||||||
|
:show="isInput"
|
||||||
|
:title="'修改实际付款'"
|
||||||
|
@confirm="handleConfirm"
|
||||||
|
@cancel="isInput = false"
|
||||||
|
>
|
||||||
|
<u-input
|
||||||
|
placeholder="请输入实际付款"
|
||||||
|
type="number"
|
||||||
|
v-model="amount"
|
||||||
|
></u-input>
|
||||||
|
</u-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { DeviceApi, ReceiveApi } from "@/services/index";
|
||||||
|
|
||||||
|
import SmallModal from "@/components/Modal/smallModal.vue";
|
||||||
|
import { OrderType, ScaleStatus } from "@/utils/enum";
|
||||||
|
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
currentOrder: Order;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
currentOrder: {},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const emit = defineEmits(["refresh"]);
|
||||||
|
const gridList1 = reactive([
|
||||||
|
{
|
||||||
|
name: "毛重",
|
||||||
|
enName: "grossWeight",
|
||||||
|
num: "",
|
||||||
|
unit: "KG",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "皮重",
|
||||||
|
enName: "tare",
|
||||||
|
num: "",
|
||||||
|
unit: "KG",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "扣杂",
|
||||||
|
enName: "buckleMiscellaneous",
|
||||||
|
num: "",
|
||||||
|
unit: "KG",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
name: "净重",
|
||||||
|
enName: "netWeight",
|
||||||
|
num: "",
|
||||||
|
unit: "KG",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "单价",
|
||||||
|
enName: "price",
|
||||||
|
num: "",
|
||||||
|
unit: "元/KG",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "预估总价",
|
||||||
|
enName: "totalPrice",
|
||||||
|
num: "",
|
||||||
|
unit: "元",
|
||||||
|
isBefore: false,
|
||||||
|
isBold: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "实际付款",
|
||||||
|
enName: "balanceTotalPrice",
|
||||||
|
num: "",
|
||||||
|
unit: "元",
|
||||||
|
isBefore: false,
|
||||||
|
isBold: true,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
const handleScenePhoto = (id: any) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesScenePhoto/index?orderType=1&imagesType=1&id=" + id, // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const isInput = ref(false);
|
||||||
|
const amount = ref(null);
|
||||||
|
|
||||||
|
const handleConfirm = () => {
|
||||||
|
ReceiveApi.updateOrderIn({
|
||||||
|
orderInPos: [
|
||||||
|
{
|
||||||
|
...props.currentOrder,
|
||||||
|
balanceTotalPrice: amount.value,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
props.currentOrder.balanceTotalPrice = amount.value || 0;
|
||||||
|
uni.showToast({ title: "修改成功" });
|
||||||
|
gridList1[gridList1.length - 1].num = amount.value || "";
|
||||||
|
isInput.value = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const isShowCancelModal = ref(false);
|
||||||
|
const deleteId = ref(0);
|
||||||
|
// 打开确认作废对话框
|
||||||
|
const handleModal = (v: boolean, id: number) => {
|
||||||
|
isShowCancelModal.value = v;
|
||||||
|
deleteId.value = id;
|
||||||
|
};
|
||||||
|
const handleOk = () => {
|
||||||
|
ReceiveApi.deleteOrder({ ids: [deleteId.value] }).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
emit("refresh");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handlePrint = () => {
|
||||||
|
DeviceApi.print({
|
||||||
|
id: props.currentOrder.id,
|
||||||
|
orderType: OrderType.Receive,
|
||||||
|
userId: props.currentOrder.deviceId,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "打印成功",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
if (props.currentOrder) {
|
||||||
|
const { currentOrder } = props;
|
||||||
|
gridList1.map((item: any) => {
|
||||||
|
if (item.name === "扣杂" || item.name === "扣点") {
|
||||||
|
if (currentOrder.buttonType === 0) {
|
||||||
|
item.name = "扣杂";
|
||||||
|
item.enName = "buckleMiscellaneous";
|
||||||
|
item.unit = "KG";
|
||||||
|
} else if (currentOrder.buttonType === 1) {
|
||||||
|
item.name = "扣点";
|
||||||
|
item.enName = "points";
|
||||||
|
item.unit = "%";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (item.name === "实际付款") {
|
||||||
|
if (currentOrder[item.enName as string]) {
|
||||||
|
item.num = currentOrder[item.enName as string];
|
||||||
|
} else {
|
||||||
|
item.num = currentOrder["totalPrice"];
|
||||||
|
currentOrder[item.enName] = currentOrder["totalPrice"];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (item.enName === "buckleMiscellaneous") {
|
||||||
|
if (currentOrder[item.enName as string]) {
|
||||||
|
item.num = currentOrder[item.enName as string];
|
||||||
|
} else {
|
||||||
|
item.num = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
item.num = currentOrder[item.enName as string];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.c-card {
|
||||||
|
margin: 30rpx 25rpx;
|
||||||
|
.box {
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
||||||
|
border-radius: 13rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
.base {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #000000;
|
||||||
|
.btn {
|
||||||
|
border-radius: 24rpx;
|
||||||
|
border: 1px solid #00dcee;
|
||||||
|
padding: 10rpx 30rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #00dcee;
|
||||||
|
line-height: 41rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.name {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #000000;
|
||||||
|
margin: 15rpx 0rpx;
|
||||||
|
text {
|
||||||
|
background-color: #ffaf75;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
padding: 5rpx 20rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-box1 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin: 20rpx 0rpx;
|
||||||
|
.type {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #ec0f3e;
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
display: flex;
|
||||||
|
> view + view {
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.flex-box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
border-bottom: 1rpx solid rgba(233, 233, 233, 0.76);
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.more {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
flex: 1;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #000000;
|
||||||
|
padding: 25rpx 0rpx 0rpx 0rpx;
|
||||||
|
> view {
|
||||||
|
line-height: 50rpx;
|
||||||
|
width: max-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bold {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.op-btn {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0px auto;
|
||||||
|
margin-top: 22rpx;
|
||||||
|
.c-btn-review {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
background: #f5f5f5;
|
||||||
|
border-radius: 38rpx;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 80rpx;
|
||||||
|
> view {
|
||||||
|
width: 50%;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.active {
|
||||||
|
background: #00dcee;
|
||||||
|
border-radius: 38rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
> view + view {
|
||||||
|
margin-top: 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -824,7 +824,8 @@ onUnmounted(() => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="card-box">
|
<view class="card-box">
|
||||||
|
|
||||||
<page-view
|
<page-view
|
||||||
@loadList="
|
@loadList="
|
||||||
(v) => {
|
(v) => {
|
||||||
|
@ -32,13 +31,12 @@
|
||||||
"
|
"
|
||||||
:noMoreData="pageList.noMoreData"
|
:noMoreData="pageList.noMoreData"
|
||||||
:list="pageList.list"
|
:list="pageList.list"
|
||||||
:height="ScaleStatus.Paid === currentTab ? 160 : 240"
|
:height="40"
|
||||||
: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">
|
||||||
|
<Detail :currentOrder="item" @refresh="handleSearch"/>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<u-gap
|
<u-gap
|
||||||
height="10"
|
height="10"
|
||||||
|
@ -63,6 +61,7 @@ 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";
|
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
|
||||||
|
import Detail from "./components/detail.vue";
|
||||||
// 筛选条件
|
// 筛选条件
|
||||||
const filterState = reactive({
|
const filterState = reactive({
|
||||||
showTime: false,
|
showTime: false,
|
||||||
|
@ -95,9 +94,8 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const currentTab = ref(2);
|
|
||||||
|
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
resetPageList();
|
resetPageList();
|
||||||
|
@ -117,10 +115,10 @@ const getList = (v?: boolean) => {
|
||||||
ReceiveApi.getOrderPage({
|
ReceiveApi.getOrderPage({
|
||||||
pageSize: pageList.pageSize,
|
pageSize: pageList.pageSize,
|
||||||
pageNumber: pageList.pageNum,
|
pageNumber: pageList.pageNum,
|
||||||
scaleStatus: currentTab.value,
|
scaleStatus: ScaleStatus.Paid,
|
||||||
userName: keyword.value,
|
userName: keyword.value,
|
||||||
startTime: filterState.startTime ? `${filterState.startTime} 00:00:00` : '',
|
startTime: filterState.startTime ? `${filterState.startTime} 00:00:00` : "",
|
||||||
endTime: filterState.startTime ? `${filterState.endTime} 00:00:00` : '',
|
endTime: filterState.startTime ? `${filterState.endTime} 00:00:00` : "",
|
||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
pageList.isLoading = false;
|
pageList.isLoading = false;
|
||||||
|
@ -136,9 +134,7 @@ const getList = (v?: boolean) => {
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
onLoad((option) => {
|
onLoad((option) => {});
|
||||||
currentTab.value = parseInt((option as any).scaleStatus);
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search-box {
|
.search-box {
|
||||||
|
@ -196,8 +192,6 @@ onLoad((option) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.c-layout {
|
.c-layout {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
value="cb"
|
value="cb"
|
||||||
:color="'#00D2E3'"
|
:color="'#00D2E3'"
|
||||||
:checked="item.isChecked"
|
:checked="item.isChecked"
|
||||||
style="transform: scale(0.5)"
|
style="transform: scale(0.7)"
|
||||||
@click="item.isChecked = !item.isChecked"
|
@click="item.isChecked = !item.isChecked"
|
||||||
/></view>
|
/></view>
|
||||||
<view class="inner-box">
|
<view class="inner-box">
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
<text class="number">收货单号:{{ item.receiptNumber }}</text>
|
<text class="number">收货单号:{{ item.receiptNumber }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.userName">
|
<view v-if="item.userName">
|
||||||
<text class="name">{{ item.userName }} <text v-if="item.cardNumber">{{ item.cardNumber }}</text></text>
|
<text class="name">{{ item.userName }}<text v-if="item.cardNumber"> / {{ item.cardNumber }}</text></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -236,7 +236,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const currentTab = ref(2);
|
const currentTab = ref(2);
|
||||||
const handleTab = (item: any) => {
|
const handleTab = (item: any) => {
|
||||||
|
@ -427,7 +427,7 @@ onLoad((option) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
||||||
border-radius: 13rpx;
|
border-radius: 13rpx;
|
||||||
margin: 0rpx 25rpx;
|
margin: 0rpx 25rpx;
|
||||||
margin-top: 35rpx;
|
margin-top: 22rpx;
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<text class="number">收货单号:{{ item.receiptNumber }}</text>
|
<text class="number">收货单号:{{ item.receiptNumber }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<text class="name">{{ item.userName }} {{item.cardNumber}}</text>
|
<text class="name">{{ item.userName }} / {{item.cardNumber}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
|
@ -154,7 +154,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
scaleStatus: 0,
|
scaleStatus: 0,
|
||||||
|
|
|
@ -0,0 +1,399 @@
|
||||||
|
<template>
|
||||||
|
<view class="c-card">
|
||||||
|
<view class="box">
|
||||||
|
<view class="base">
|
||||||
|
<view>
|
||||||
|
<view class="supplier"> {{ currentOrder.deviceName || "-" }} </view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex-box1">
|
||||||
|
<view class="type">{{ currentOrder.productName || "" }}</view>
|
||||||
|
<view class="btn">
|
||||||
|
<view
|
||||||
|
><u-tag
|
||||||
|
text="现场照片"
|
||||||
|
plain
|
||||||
|
shape="circle"
|
||||||
|
:bgColor="'rgba(237, 254, 255, 1)'"
|
||||||
|
@click="handleScenePhoto(currentOrder.id)"
|
||||||
|
></u-tag
|
||||||
|
></view>
|
||||||
|
<view
|
||||||
|
><u-tag
|
||||||
|
text="出货单作废"
|
||||||
|
plain
|
||||||
|
shape="circle"
|
||||||
|
:borderColor="'rgba(255, 147, 68, 1) !important'"
|
||||||
|
:bgColor="'rgba(255, 240, 229, 1)'"
|
||||||
|
:color="'rgba(255, 157, 85, 1) !important'"
|
||||||
|
@click="handleModal(true, currentOrder.id as string)"
|
||||||
|
></u-tag
|
||||||
|
></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="more">
|
||||||
|
<view v-for="(item, index) in gridList1" :key="index">
|
||||||
|
<text v-if="item.name">{{ item.name }}:</text
|
||||||
|
><text
|
||||||
|
>{{ item.isBefore ? item.unit : "" }}
|
||||||
|
{{ item.num }}
|
||||||
|
{{ item.isBefore ? "" : item.unit }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <u-gap height="10" bgColor="#F8F8F8"></u-gap> -->
|
||||||
|
<view class="mt-30">
|
||||||
|
<u-line></u-line>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="more">
|
||||||
|
<view v-for="(item, index) in gridList3" :key="index">
|
||||||
|
<text v-if="item.name">{{ item.name }}:</text
|
||||||
|
><text
|
||||||
|
>{{ item.isBefore ? item.unit : "" }}
|
||||||
|
<text v-if="item.name === '净重误差'">
|
||||||
|
{{
|
||||||
|
(currentOrder.netWeight || 0) -
|
||||||
|
(currentOrder.settlementNet || 0)
|
||||||
|
}}
|
||||||
|
</text>
|
||||||
|
<text v-else-if="item.name === '结算方式'">
|
||||||
|
{{ payMethodMap[item.num] || "暂无" }}
|
||||||
|
</text>
|
||||||
|
<text v-else> {{ item.num }}</text>
|
||||||
|
|
||||||
|
{{ item.isBefore ? "" : item.unit }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="op-btn">
|
||||||
|
<view>
|
||||||
|
<u-button
|
||||||
|
text="打印"
|
||||||
|
type="primary"
|
||||||
|
:customStyle="{ 'border-radius': '43rpx' }"
|
||||||
|
@click="handlePrint"
|
||||||
|
></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<SmallModal
|
||||||
|
:title="'确认作废吗?'"
|
||||||
|
:content="'确认作废后,该订单不能恢复!'"
|
||||||
|
:okText="'确认作废'"
|
||||||
|
:isMain="true"
|
||||||
|
:show="isShowCancelModal"
|
||||||
|
@handleModal="(v:boolean) => {handleModal(v, deleteId)}"
|
||||||
|
@handleOk="handleOk()"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { DeviceApi, ShipmentApi } from "@/services/index";
|
||||||
|
import { OrderType, ScaleStatusBtnType } from "@/utils/enum";
|
||||||
|
import SmallModal from "@/components/Modal/smallModal.vue";
|
||||||
|
const payMethodMap: any = {
|
||||||
|
"1": "现金",
|
||||||
|
"2": "转账",
|
||||||
|
"3": "微信",
|
||||||
|
"4": "支付宝",
|
||||||
|
};
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
currentOrder: Order;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
currentOrder: {},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
const state = reactive<{
|
||||||
|
order: Shipment;
|
||||||
|
[attrName: string]: any;
|
||||||
|
}>({
|
||||||
|
order: {
|
||||||
|
id: "",
|
||||||
|
buttonType: 0,
|
||||||
|
netWeight: 0,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const gridList1 = reactive([
|
||||||
|
{
|
||||||
|
name: "毛重",
|
||||||
|
enName: "grossWeight",
|
||||||
|
num: "",
|
||||||
|
unit: "KG",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "皮重",
|
||||||
|
enName: "tare",
|
||||||
|
num: "",
|
||||||
|
unit: "KG",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "净重",
|
||||||
|
enName: "netWeight",
|
||||||
|
num: "",
|
||||||
|
unit: "KG",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const gridList3 = reactive([
|
||||||
|
{
|
||||||
|
name: "客户名称",
|
||||||
|
enName: "userName",
|
||||||
|
num: "",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "结算人",
|
||||||
|
enName: "updateName",
|
||||||
|
num: "",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "结算时间",
|
||||||
|
enName: "signTime",
|
||||||
|
num: "",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
name: "结算重量",
|
||||||
|
enName: "settlementWeight",
|
||||||
|
num: 0,
|
||||||
|
unit: "KG",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "结算单价",
|
||||||
|
enName: "unitPrice",
|
||||||
|
num: "",
|
||||||
|
unit: "元/KG",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "预估总价",
|
||||||
|
enName: "estimatePrice",
|
||||||
|
num: "",
|
||||||
|
unit: "元",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "结算金额",
|
||||||
|
enName: "totalPrice",
|
||||||
|
num: "",
|
||||||
|
unit: "元",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "运费",
|
||||||
|
enName: "freight",
|
||||||
|
num: "",
|
||||||
|
unit: "元",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "杂费",
|
||||||
|
enName: "incidentals",
|
||||||
|
num: "",
|
||||||
|
unit: "元",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "实际收入",
|
||||||
|
enName: "realIncome",
|
||||||
|
num: "",
|
||||||
|
unit: "元",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "结算方式",
|
||||||
|
enName: "paymentMethod",
|
||||||
|
num: "",
|
||||||
|
unit: "",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
// 客户过磅净重-机器过磅净重
|
||||||
|
{
|
||||||
|
name: "净重误差",
|
||||||
|
enName: "netWeightError",
|
||||||
|
num: "",
|
||||||
|
unit: "KG",
|
||||||
|
isBefore: false,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const handleScenePhoto = (id: string) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesScenePhoto/index?orderType=2&imagesType=1&id=" + id, // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const isShowCancelModal = ref(false);
|
||||||
|
const deleteId = ref("0");
|
||||||
|
// 打开确认作废对话框
|
||||||
|
const handleModal = (v: boolean, id: string) => {
|
||||||
|
isShowCancelModal.value = v;
|
||||||
|
deleteId.value = id;
|
||||||
|
};
|
||||||
|
const handleOk = () => {
|
||||||
|
ShipmentApi.deleteOrder({ ids: [deleteId.value] }).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:
|
||||||
|
"/pagesShipment/shipmentSettlement?scaleStatus=" + state.scaleStatus, // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handlePrint = () => {
|
||||||
|
DeviceApi.print({
|
||||||
|
id: props.currentOrder.id,
|
||||||
|
orderType: OrderType.Shipment,
|
||||||
|
userId: props.currentOrder.deviceId,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "打印成功",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
if (props.currentOrder) {
|
||||||
|
gridList1.map((item) => {
|
||||||
|
item.num = props.currentOrder[item.enName as string];
|
||||||
|
});
|
||||||
|
gridList3.map((item) => {
|
||||||
|
if (item.name === "净重误差") {
|
||||||
|
item.num =
|
||||||
|
(props.currentOrder as any).netWeight -
|
||||||
|
(props.currentOrder as any).settlementNet;
|
||||||
|
}
|
||||||
|
item.num = props.currentOrder[item.enName as string];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.c-card {
|
||||||
|
.box {
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
||||||
|
border-radius: 13rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
.base {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #000000;
|
||||||
|
.btn {
|
||||||
|
border-radius: 24rpx;
|
||||||
|
border: 1px solid #00dcee;
|
||||||
|
padding: 10rpx 30rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #00dcee;
|
||||||
|
line-height: 41rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.name {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #000000;
|
||||||
|
margin: 15rpx 0rpx;
|
||||||
|
text {
|
||||||
|
background-color: #ffaf75;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
padding: 5rpx 20rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-box1 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin: 20rpx 0rpx;
|
||||||
|
.type {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #ec0f3e;
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
display: flex;
|
||||||
|
> view + view {
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.flex-box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
border-bottom: 1rpx solid rgba(233, 233, 233, 0.76);
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.more {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
flex: 1;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #000000;
|
||||||
|
padding: 25rpx 0rpx 0rpx 0rpx;
|
||||||
|
> view {
|
||||||
|
line-height: 50rpx;
|
||||||
|
width: max-content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.op-btn {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0px auto;
|
||||||
|
margin-top: 22rpx;
|
||||||
|
.c-btn-review {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
background: #f5f5f5;
|
||||||
|
border-radius: 38rpx;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 80rpx;
|
||||||
|
> view {
|
||||||
|
width: 50%;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.active {
|
||||||
|
background: #00dcee;
|
||||||
|
border-radius: 38rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
> view + view {
|
||||||
|
margin-top: 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -40,10 +40,16 @@
|
||||||
>
|
>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<text v-if="item.key === 'subtractNum'">
|
<text v-if="item.key === 'subtractNum'">
|
||||||
{{ model1.order.buttonType === 0 ? item.unit : "%" }}
|
{{
|
||||||
|
model1.order.buttonType === 0
|
||||||
|
? isKg()
|
||||||
|
? item.unit
|
||||||
|
: item.unit1 || item.unit
|
||||||
|
: "%"
|
||||||
|
}}
|
||||||
</text>
|
</text>
|
||||||
<text v-else>
|
<text v-else>
|
||||||
{{ item.unit }}
|
{{ isKg() ? item.unit : item.unit1 || item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</u-input>
|
||||||
|
@ -184,8 +190,16 @@ const model1 = reactive<{
|
||||||
subtractNum: 0,
|
subtractNum: 0,
|
||||||
grossWeight: 0, //毛重
|
grossWeight: 0, //毛重
|
||||||
tare: 0, //皮重
|
tare: 0, //皮重
|
||||||
|
unit: 1,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
const isKg = () => {
|
||||||
|
if (model1.order.unit === 1) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
"order.settlementGross": {
|
"order.settlementGross": {
|
||||||
type: "number",
|
type: "number",
|
||||||
|
@ -256,12 +270,28 @@ const contrlModalParams = reactive<ComType>({
|
||||||
});
|
});
|
||||||
|
|
||||||
const formAttrList = reactive<ComType>([
|
const formAttrList = reactive<ComType>([
|
||||||
|
{
|
||||||
|
name: "称重单位",
|
||||||
|
key: "unit",
|
||||||
|
type: "radio",
|
||||||
|
child: [
|
||||||
|
{
|
||||||
|
id: 0,
|
||||||
|
name: "kg",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "吨",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "毛重",
|
name: "毛重",
|
||||||
key: "settlementGross",
|
key: "settlementGross",
|
||||||
type: "input",
|
type: "input",
|
||||||
required: true,
|
required: true,
|
||||||
unit: "kg",
|
unit: "kg",
|
||||||
|
unit1: "吨",
|
||||||
fn: () => {},
|
fn: () => {},
|
||||||
isNumber: true,
|
isNumber: true,
|
||||||
},
|
},
|
||||||
|
@ -271,6 +301,7 @@ const formAttrList = reactive<ComType>([
|
||||||
type: "input",
|
type: "input",
|
||||||
required: true,
|
required: true,
|
||||||
unit: "kg",
|
unit: "kg",
|
||||||
|
unit1: "吨",
|
||||||
fn: () => {},
|
fn: () => {},
|
||||||
isNumber: true,
|
isNumber: true,
|
||||||
},
|
},
|
||||||
|
@ -281,6 +312,7 @@ const formAttrList = reactive<ComType>([
|
||||||
required: true,
|
required: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
unit: "kg",
|
unit: "kg",
|
||||||
|
unit1: "吨",
|
||||||
fn: () => {},
|
fn: () => {},
|
||||||
isNumber: true,
|
isNumber: true,
|
||||||
},
|
},
|
||||||
|
@ -290,6 +322,7 @@ const formAttrList = reactive<ComType>([
|
||||||
type: "input",
|
type: "input",
|
||||||
required: true,
|
required: true,
|
||||||
unit: "元/kg",
|
unit: "元/kg",
|
||||||
|
unit1: "元/吨",
|
||||||
fn: () => {},
|
fn: () => {},
|
||||||
isNumber: true,
|
isNumber: true,
|
||||||
},
|
},
|
||||||
|
@ -319,7 +352,8 @@ const formAttrList = reactive<ComType>([
|
||||||
name: "杂质扣除",
|
name: "杂质扣除",
|
||||||
key: "subtractNum",
|
key: "subtractNum",
|
||||||
type: "input",
|
type: "input",
|
||||||
unit: "KG",
|
unit: "kg",
|
||||||
|
unit1: "吨",
|
||||||
isNumber: true,
|
isNumber: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -328,7 +362,8 @@ const formAttrList = reactive<ComType>([
|
||||||
type: "input",
|
type: "input",
|
||||||
required: true,
|
required: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
unit: "KG",
|
unit: "kg",
|
||||||
|
unit1: "吨",
|
||||||
isNumber: true,
|
isNumber: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -411,19 +446,6 @@ const formAttrList = reactive<ComType>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// const handleIsShowInput = (item: any) => {
|
|
||||||
// if () {
|
|
||||||
// return true
|
|
||||||
// } else {
|
|
||||||
// if (model1.order.deliveryMethod === 0 && ['freight', 'incidentals'].indexOf(item.key) > -1) {
|
|
||||||
// return false
|
|
||||||
// } {
|
|
||||||
// return true
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 监听毛重 皮重
|
// 监听毛重 皮重
|
||||||
watch(
|
watch(
|
||||||
[
|
[
|
||||||
|
@ -683,6 +705,7 @@ onLoad((option) => {
|
||||||
fileLists: model1.order.fileLists.map((item: any) => {
|
fileLists: model1.order.fileLists.map((item: any) => {
|
||||||
return { ...item, fileID: item.id };
|
return { ...item, fileID: item.id };
|
||||||
}),
|
}),
|
||||||
|
unit: 1,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -720,11 +743,15 @@ onLoad((option) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
border-radius: 43rpx;
|
border-radius: 43rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
:v-deep.u-radio-group {
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -41,15 +41,6 @@
|
||||||
{{ item.unit }}
|
{{ item.unit }}
|
||||||
</template>
|
</template>
|
||||||
</u-input>
|
</u-input>
|
||||||
<!-- @afterRead="afterRead"
|
|
||||||
@delete="deletePic" -->
|
|
||||||
<!-- <u-upload
|
|
||||||
v-if="item.type === 'upload'"
|
|
||||||
:fileList="[]"
|
|
||||||
name="1"
|
|
||||||
multiple
|
|
||||||
:maxCount="10"
|
|
||||||
></u-upload> -->
|
|
||||||
|
|
||||||
<uni-file-picker
|
<uni-file-picker
|
||||||
v-if="item.type === 'upload'"
|
v-if="item.type === 'upload'"
|
||||||
|
@ -76,6 +67,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.Shipment, imagesType: 1}"/>
|
||||||
|
</u-form-item>
|
||||||
</u-form>
|
</u-form>
|
||||||
<block v-for="(item, index) in formAttrList" :key="index">
|
<block v-for="(item, index) in formAttrList" :key="index">
|
||||||
<u-action-sheet
|
<u-action-sheet
|
||||||
|
@ -109,8 +103,9 @@ import type { ComType } from "@/types/global";
|
||||||
import { ImagesType, OrderType, ScaleStatus } from "@/utils/enum";
|
import { ImagesType, OrderType, ScaleStatus } from "@/utils/enum";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
import ProductDialog from "../components/ProductDialog.vue";
|
import ProductDialog from "@/components/Dialog/ProductDialog.vue";
|
||||||
import valid from "@/utils/validate";
|
import valid from "@/utils/validate";
|
||||||
|
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] = '';
|
||||||
}
|
}
|
||||||
|
@ -517,7 +512,8 @@ onLoad((option) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
padding: 25rpx 50rpx;
|
padding: 25rpx 50rpx;
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
bottom: 0rpx;
|
bottom: 0rpx;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button {
|
::v-deep button {
|
||||||
|
|
|
@ -65,7 +65,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const isShowCancelModal = ref(false);
|
const isShowCancelModal = ref(false);
|
||||||
const deleteId = ref(0);
|
const deleteId = ref(0);
|
||||||
|
|
|
@ -0,0 +1,462 @@
|
||||||
|
<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="130"
|
||||||
|
:isLoading="pageList.isLoading"
|
||||||
|
>
|
||||||
|
<block v-for="(item, index) in pageList.list" :key="index">
|
||||||
|
<view class="c-layout">
|
||||||
|
<view style="min-width: 20px"
|
||||||
|
><checkbox
|
||||||
|
v-if="ScaleStatus.ToBeShipmentPay === currentTab"
|
||||||
|
:color="'#00D2E3'"
|
||||||
|
:checked="item.isChecked"
|
||||||
|
style="transform: scale(0.7)"
|
||||||
|
@click="item.isChecked = !item.isChecked"
|
||||||
|
/></view>
|
||||||
|
<view class="inner-box">
|
||||||
|
<view class="top-flex-box">
|
||||||
|
<view>
|
||||||
|
<view>
|
||||||
|
<text class="number">出货单号:{{ item.orderNumber }}</text>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<text class="name"
|
||||||
|
>{{ item.userName
|
||||||
|
}}<text v-if="item.cardNumber">
|
||||||
|
/ {{ item.cardNumber }}</text
|
||||||
|
></text
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom-flex-box">
|
||||||
|
<view>
|
||||||
|
<view>
|
||||||
|
<text class="desc"
|
||||||
|
>过磅总净重:{{ item.netWeight || 0 }}KG</text
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 其他内容 -->
|
||||||
|
<view class="more">
|
||||||
|
<view>结算皮重:{{ item.settlementTare }} KG</view>
|
||||||
|
<view>结算毛重:{{ item.settlementGross }} KG</view>
|
||||||
|
<view>
|
||||||
|
{{ item.buttonType === 0 ? "扣杂" : "扣点" }}:{{
|
||||||
|
item.buttonType === 0
|
||||||
|
? item["buckleMiscellaneous"]
|
||||||
|
: item["points"]
|
||||||
|
}}
|
||||||
|
{{ item.buttonType === 0 ? "KG" : "%" }}</view
|
||||||
|
>
|
||||||
|
<view>结算净重:{{ item.settlementNet }} KG</view>
|
||||||
|
<view>单价:{{ item.unitPrice }} 元/KG</view>
|
||||||
|
<view>实际收款:{{ item.totalPrice }} 元</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="btn" @click="handleReview(item.id, 3)"> 去收款 </view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-gap
|
||||||
|
height="10"
|
||||||
|
bgColor="#f8f8f8"
|
||||||
|
v-if="index < pageList.list.length - 1"
|
||||||
|
></u-gap>
|
||||||
|
</block>
|
||||||
|
</page-view>
|
||||||
|
</view>
|
||||||
|
<view class="btn-box" v-if="currentTab === 3 && pageList.list.length > 0">
|
||||||
|
<u-button
|
||||||
|
text="全选/取消"
|
||||||
|
color="#fff"
|
||||||
|
:customStyle="{ color: '#00DCEE', border: '1px solid #00DCEE' }"
|
||||||
|
@click="handleSelect"
|
||||||
|
></u-button>
|
||||||
|
<u-button
|
||||||
|
type="primary"
|
||||||
|
:text="`批量收款`"
|
||||||
|
@click="handleReviewOrPay()"
|
||||||
|
></u-button>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<block>
|
||||||
|
<u-action-sheet
|
||||||
|
:actions="contrlModalParams.select.list"
|
||||||
|
:title="contrlModalParams.select.title"
|
||||||
|
:show="contrlModalParams.select.isShow"
|
||||||
|
@select="(v: any) => handleSelect1('select', v)"
|
||||||
|
@close="contrlModalParams.select.isShow = false"
|
||||||
|
:closeOnClickAction="true"
|
||||||
|
></u-action-sheet>
|
||||||
|
</block>
|
||||||
|
|
||||||
|
<!-- 时间弹框 -->
|
||||||
|
<TimeDialog
|
||||||
|
ref="timeDialog"
|
||||||
|
:show="filterState.showTime"
|
||||||
|
@handleDialog="(v:boolean) => {filterState.showTime = false}"
|
||||||
|
@changeTime="changeTime"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ShipmentApi } from "@/services/index";
|
||||||
|
import { ScaleStatus, ScaleStatusBtnType } from "@/utils/enum";
|
||||||
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
|
import { onShow } from "@dcloudio/uni-app";
|
||||||
|
import PageView from "@/components/PageView/index.vue";
|
||||||
|
import type { ComType } from "@/types/global";
|
||||||
|
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<ComType>({
|
||||||
|
select: {
|
||||||
|
isShow: false,
|
||||||
|
title: "标题",
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
name: "微信",
|
||||||
|
key: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "现金",
|
||||||
|
key: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "支付宝",
|
||||||
|
key: 4,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "转账",
|
||||||
|
key: 2,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const payState = reactive({
|
||||||
|
paymentMethodName: "",
|
||||||
|
paymentMethod: "",
|
||||||
|
});
|
||||||
|
const handleSelect1 = (key: string, v: any) => {
|
||||||
|
contrlModalParams.select.isShow = false;
|
||||||
|
payState.paymentMethodName = v.name;
|
||||||
|
payState.paymentMethod = v.key;
|
||||||
|
updateStatus(ScaleStatus.ShipmentPaid);
|
||||||
|
};
|
||||||
|
// scaleStatus
|
||||||
|
const pageList: PageResult<Shipment> = reactive({
|
||||||
|
isLoading: false,
|
||||||
|
noMoreData: false,
|
||||||
|
total: 0,
|
||||||
|
list: [],
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
});
|
||||||
|
const keyword = ref("");
|
||||||
|
const state = reactive<{
|
||||||
|
[attrName: string]: any;
|
||||||
|
}>({
|
||||||
|
checkMap: {},
|
||||||
|
isAll: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
const currentTab = ref(3);
|
||||||
|
const handleReview = (id: string, scaleStatus: number) => {
|
||||||
|
let type = ScaleStatusBtnType.ShipmentSettlement;
|
||||||
|
if (scaleStatus === 2) {
|
||||||
|
type = ScaleStatusBtnType.ShipmentSettlement;
|
||||||
|
} else if (scaleStatus === 3) {
|
||||||
|
type = ScaleStatusBtnType.ShipmentNoPay;
|
||||||
|
} else if (scaleStatus === 4) {
|
||||||
|
type = ScaleStatusBtnType.ShipmentPay;
|
||||||
|
}
|
||||||
|
uni.navigateTo({
|
||||||
|
url:
|
||||||
|
"/pagesShipment/review/index?id=" +
|
||||||
|
id +
|
||||||
|
`&scaleStatusBtnType=${type}&scaleStatus=${scaleStatus}`, // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleReviewOrPay = () => {
|
||||||
|
const list = pageList.list.filter((item) => item.isChecked);
|
||||||
|
if (list.length === 0) {
|
||||||
|
uni.showToast({ icon: "none", title: "请至少选择一个出货单" });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 批量支付
|
||||||
|
contrlModalParams.select.isShow = true;
|
||||||
|
contrlModalParams.select.title = "结算方式";
|
||||||
|
};
|
||||||
|
const updateStatus = (status: number) => {
|
||||||
|
const list = pageList.list
|
||||||
|
.filter((item) => item.isChecked)
|
||||||
|
.map((item) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
scaleStatus: status,
|
||||||
|
paymentMethodName: payState.paymentMethodName,
|
||||||
|
paymentMethod: payState.paymentMethod,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
if (list.length === 0) {
|
||||||
|
uni.showToast({ icon: "none", title: "请至少选择一个出货单" });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ShipmentApi.updateOrderIn({ orderOutPos: list }).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
resetPageList();
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSelect = () => {
|
||||||
|
state.isAll = !state.isAll;
|
||||||
|
console.log(state.isAll);
|
||||||
|
pageList.list = pageList.list.map((item) => {
|
||||||
|
return { ...item, isChecked: state.isAll };
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const resetPageList = () => {
|
||||||
|
pageList.noMoreData = false;
|
||||||
|
pageList.total = 0;
|
||||||
|
pageList.list = [];
|
||||||
|
pageList.pageNum = 1;
|
||||||
|
pageList.pageSize = 100;
|
||||||
|
};
|
||||||
|
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;
|
||||||
|
ShipmentApi.getOrderPage({
|
||||||
|
pageSize: pageList.pageSize,
|
||||||
|
pageNumber: pageList.pageNum,
|
||||||
|
scaleStatus: ScaleStatus.ToBeShipmentPay,
|
||||||
|
userName: keyword.value,
|
||||||
|
startTime: filterState.startTime ? `${filterState.startTime} 00:00:00` : "",
|
||||||
|
endTime: filterState.startTime ? `${filterState.endTime} 00:00:00` : "",
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
pageList.isLoading = false;
|
||||||
|
// (pageList as any).list = (res.data.list as any).map((item: any) => {
|
||||||
|
// return { ...item, isChecked: false };
|
||||||
|
// });
|
||||||
|
pageList.list = pageList.list.concat(
|
||||||
|
res.data.list.map((item: any) => {
|
||||||
|
return { ...item, isChecked: false };
|
||||||
|
})
|
||||||
|
);
|
||||||
|
pageList.total = (res.data as any).total;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
onShow(() => {
|
||||||
|
resetPageList();
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
onLoad((option) => {});
|
||||||
|
</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);
|
||||||
|
width: 100%;
|
||||||
|
margin: 0px auto;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #c1c1c1;
|
||||||
|
> 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 {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 30rpx 25rpx 30rpx 0rpx;
|
||||||
|
}
|
||||||
|
.inner-box {
|
||||||
|
width: 100%;
|
||||||
|
// padding: 40rpx 40rpx;
|
||||||
|
.bottom-flex-box {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
border-radius: 24rpx;
|
||||||
|
border: 1px solid #00dcee;
|
||||||
|
padding: 10rpx 30rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #00dcee;
|
||||||
|
line-height: 41rpx;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 22rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
||||||
|
border-radius: 13rpx;
|
||||||
|
margin: 0rpx 25rpx;
|
||||||
|
margin-top: 22rpx;
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #000000;
|
||||||
|
line-height: 41rpx;
|
||||||
|
|
||||||
|
.desc {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.name {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.flex-box {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #000000;
|
||||||
|
line-height: 41rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.more {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
flex: 1;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #000000;
|
||||||
|
padding: 25rpx 0rpx 0rpx 0rpx;
|
||||||
|
border-top: 1px dashed rgba(0, 0, 0, 0.25);
|
||||||
|
margin-top: 16rpx;
|
||||||
|
> view {
|
||||||
|
line-height: 50rpx;
|
||||||
|
width: max-content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn-box {
|
||||||
|
margin-top: 60rpx;
|
||||||
|
display: flex;
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
|
padding: 25rpx 50rpx;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0rpx;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
|
::v-deep button {
|
||||||
|
border-radius: 43rpx;
|
||||||
|
}
|
||||||
|
::v-deep button + button {
|
||||||
|
margin-left: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,263 @@
|
||||||
|
<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="80"
|
||||||
|
:isLoading="pageList.isLoading"
|
||||||
|
>
|
||||||
|
<block v-for="(item, index) in pageList.list" :key="index">
|
||||||
|
<view>
|
||||||
|
<ReceivedDetail :currentOrder="item" />
|
||||||
|
</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 { ShipmentApi } from "@/services/index";
|
||||||
|
import { ScaleStatus, ScaleStatusBtnType } from "@/utils/enum";
|
||||||
|
import { onShow } from "@dcloudio/uni-app";
|
||||||
|
import PageView from "@/components/PageView/index.vue";
|
||||||
|
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
|
||||||
|
import ReceivedDetail from "./components/receivedDetail.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<Shipment> = 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 = 100;
|
||||||
|
};
|
||||||
|
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;
|
||||||
|
ShipmentApi.getOrderPage({
|
||||||
|
pageSize: pageList.pageSize,
|
||||||
|
pageNumber: pageList.pageNum,
|
||||||
|
scaleStatus: ScaleStatus.ToBeShipmentReview,
|
||||||
|
userName: keyword.value,
|
||||||
|
startTime: filterState.startTime ? `${filterState.startTime} 00:00:00` : "",
|
||||||
|
endTime: filterState.startTime ? `${filterState.endTime} 00:00:00` : "",
|
||||||
|
}).then((res) => {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
onShow(() => {
|
||||||
|
resetPageList();
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</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);
|
||||||
|
width: 100%;
|
||||||
|
margin: 0px auto;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #c1c1c1;
|
||||||
|
> 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 {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.inner-box {
|
||||||
|
width: 100%;
|
||||||
|
// padding: 40rpx 40rpx;
|
||||||
|
.bottom-flex-box {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.btn {
|
||||||
|
border-radius: 24rpx;
|
||||||
|
border: 1px solid #00dcee;
|
||||||
|
padding: 10rpx 30rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #00dcee;
|
||||||
|
line-height: 41rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
||||||
|
border-radius: 13rpx;
|
||||||
|
margin: 0rpx 25rpx;
|
||||||
|
margin-top: 22rpx;
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #000000;
|
||||||
|
line-height: 41rpx;
|
||||||
|
|
||||||
|
.desc {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.name {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.flex-box {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #000000;
|
||||||
|
line-height: 41rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn-box {
|
||||||
|
margin-top: 60rpx;
|
||||||
|
display: flex;
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
|
||||||
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
||||||
|
padding: 25rpx 50rpx;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0rpx;
|
||||||
|
width: calc(100vw - 100rpx);
|
||||||
|
::v-deep button {
|
||||||
|
border-radius: 43rpx;
|
||||||
|
}
|
||||||
|
::v-deep button + button {
|
||||||
|
margin-left: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -58,14 +58,6 @@
|
||||||
<text>过磅时间:{{ state.order.tareTime }}</text>
|
<text>过磅时间:{{ state.order.tareTime }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="flex-box" v-if="getIsShow()" style="border: none">
|
|
||||||
<text>过磅时间:{{ state.order.grossTime || "-" }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="flex-box" v-if="getIsShow()">
|
|
||||||
<text>定价人:{{ state.order.pricingUserName || "-" }}</text>
|
|
||||||
<text>审核人:{{ state.order.reviewerUserName || "-" }}</text>
|
|
||||||
</view> -->
|
|
||||||
|
|
||||||
<view class="more">
|
<view class="more">
|
||||||
<view
|
<view
|
||||||
v-if="
|
v-if="
|
||||||
|
@ -83,6 +75,18 @@
|
||||||
state.scaleStatusBtnType === ScaleStatusBtnType.ShipmentNoPay
|
state.scaleStatusBtnType === ScaleStatusBtnType.ShipmentNoPay
|
||||||
"
|
"
|
||||||
></view>
|
></view>
|
||||||
|
<view
|
||||||
|
v-if="
|
||||||
|
state.scaleStatusBtnType === ScaleStatusBtnType.ShipmentSettlement
|
||||||
|
"
|
||||||
|
>
|
||||||
|
客户名称:{{ state.order.userName }}
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
v-if="
|
||||||
|
state.scaleStatusBtnType === ScaleStatusBtnType.ShipmentSettlement
|
||||||
|
"
|
||||||
|
></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">{{ item.name }}:</text
|
||||||
><text
|
><text
|
||||||
|
@ -93,24 +97,13 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <u-gap height="10" bgColor="#F8F8F8"></u-gap> -->
|
|
||||||
<view class="mt-30">
|
|
||||||
<u-line></u-line>
|
|
||||||
</view>
|
|
||||||
<view
|
<view
|
||||||
class="more"
|
class="mt-30"
|
||||||
v-if="
|
v-if="
|
||||||
state.scaleStatusBtnType === ScaleStatusBtnType.ShipmentSettlement
|
state.scaleStatusBtnType !== ScaleStatusBtnType.ShipmentSettlement
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<view v-for="(item, index) in gridList2" :key="index">
|
<u-line></u-line>
|
||||||
<text v-if="item.name">{{ item.name }}:</text
|
|
||||||
><text
|
|
||||||
>{{ item.isBefore ? item.unit : "" }}
|
|
||||||
{{ item.num }}
|
|
||||||
{{ item.isBefore ? "" : item.unit }}
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
|
@ -146,8 +139,8 @@
|
||||||
state.scaleStatusBtnType === ScaleStatusBtnType.ShipmentSettlement
|
state.scaleStatusBtnType === ScaleStatusBtnType.ShipmentSettlement
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<view @click="handleReviewNoPay"> 出货未结算 </view>
|
<view @click="handleReviewNoPay"> 暂不收款 </view>
|
||||||
<view class="active" @click="handleReviewPay"> 出货并结算 </view>
|
<view class="active" @click="handleReviewPay"> 立即收款 </view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
v-if="
|
v-if="
|
||||||
|
@ -170,7 +163,7 @@
|
||||||
<u-button
|
<u-button
|
||||||
v-if="state.scaleStatusBtnType === ScaleStatusBtnType.ShipmentNoPay"
|
v-if="state.scaleStatusBtnType === ScaleStatusBtnType.ShipmentNoPay"
|
||||||
@click="handleSettlement"
|
@click="handleSettlement"
|
||||||
text="立即结算"
|
text="立即收款"
|
||||||
type="primary"
|
type="primary"
|
||||||
:customStyle="{ 'border-radius': '43rpx' }"
|
:customStyle="{ 'border-radius': '43rpx' }"
|
||||||
></u-button>
|
></u-button>
|
||||||
|
@ -242,28 +235,6 @@ const contrlModalParams = reactive<{ [attrName: string]: any }>({
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
printSelect: {
|
|
||||||
isShow: false,
|
|
||||||
title: "请选择打印设备",
|
|
||||||
list: [
|
|
||||||
{
|
|
||||||
name: "打印设备1",
|
|
||||||
key: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "打印设备2",
|
|
||||||
key: 2,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "打印设备3",
|
|
||||||
key: 3,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "打印设备4",
|
|
||||||
key: 4,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
const state = reactive<{
|
const state = reactive<{
|
||||||
order: Shipment;
|
order: Shipment;
|
||||||
|
@ -278,9 +249,6 @@ const state = reactive<{
|
||||||
{
|
{
|
||||||
key: "paySelect",
|
key: "paySelect",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: "printSelect",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
scaleStatusBtnType: 0,
|
scaleStatusBtnType: 0,
|
||||||
});
|
});
|
||||||
|
@ -307,78 +275,6 @@ const gridList1 = reactive([
|
||||||
isBefore: false,
|
isBefore: false,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const gridList2 = reactive([
|
|
||||||
{
|
|
||||||
name: "客户名称",
|
|
||||||
enName: "userName",
|
|
||||||
num: "",
|
|
||||||
isBefore: false,
|
|
||||||
},
|
|
||||||
{},
|
|
||||||
{
|
|
||||||
name: "签收时间",
|
|
||||||
enName: "signTime",
|
|
||||||
num: "",
|
|
||||||
isBefore: false,
|
|
||||||
},
|
|
||||||
{},
|
|
||||||
{
|
|
||||||
name: "毛重",
|
|
||||||
enName: "settlementGross",
|
|
||||||
num: "",
|
|
||||||
unit: "KG",
|
|
||||||
isBefore: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "皮重",
|
|
||||||
enName: "settlementTare",
|
|
||||||
num: "",
|
|
||||||
unit: "KG",
|
|
||||||
isBefore: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "结算重量",
|
|
||||||
enName: "settlementWeight",
|
|
||||||
num: "",
|
|
||||||
unit: "KG",
|
|
||||||
isBefore: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "单价",
|
|
||||||
enName: "unitPrice",
|
|
||||||
num: "",
|
|
||||||
unit: "元/KG",
|
|
||||||
isBefore: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "预估总价",
|
|
||||||
enName: "estimatePrice",
|
|
||||||
num: "",
|
|
||||||
unit: "元",
|
|
||||||
isBefore: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "结算金额",
|
|
||||||
enName: "totalPrice",
|
|
||||||
num: "",
|
|
||||||
unit: "元",
|
|
||||||
isBefore: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "运费",
|
|
||||||
enName: "freight",
|
|
||||||
num: "",
|
|
||||||
unit: "元",
|
|
||||||
isBefore: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "杂费",
|
|
||||||
enName: "incidentals",
|
|
||||||
num: "",
|
|
||||||
unit: "元",
|
|
||||||
isBefore: false,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const gridList3 = reactive([
|
const gridList3 = reactive([
|
||||||
{
|
{
|
||||||
|
@ -401,7 +297,7 @@ const gridList3 = reactive([
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
name: "结算重量",
|
name: "结算净重",
|
||||||
enName: "settlementWeight",
|
enName: "settlementWeight",
|
||||||
num: 0,
|
num: 0,
|
||||||
unit: "KG",
|
unit: "KG",
|
||||||
|
@ -443,7 +339,7 @@ const gridList3 = reactive([
|
||||||
isBefore: false,
|
isBefore: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "实际收入",
|
name: "实际收款",
|
||||||
enName: "realIncome",
|
enName: "realIncome",
|
||||||
num: "",
|
num: "",
|
||||||
unit: "元",
|
unit: "元",
|
||||||
|
@ -465,7 +361,7 @@ const gridList3 = reactive([
|
||||||
isBefore: false,
|
isBefore: false,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
// 立即结算 // 先填写结算信息后更新状态为4
|
// 立即收款 // 先填写结算信息后更新状态为4
|
||||||
const handleSettlement = () => {
|
const handleSettlement = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:
|
url:
|
||||||
|
@ -479,7 +375,7 @@ const handleScenePhoto = (id: string) => {
|
||||||
url: "/pagesScenePhoto/index?orderType=2&imagesType=1&id=" + id, // 要跳转到的页面路径
|
url: "/pagesScenePhoto/index?orderType=2&imagesType=1&id=" + id, // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 出货未结算 // 先填写结算信息后更新状态为3
|
// 暂不收款 // 先填写结算信息后更新状态为3
|
||||||
const handleReviewNoPay = () => {
|
const handleReviewNoPay = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:
|
url:
|
||||||
|
@ -487,13 +383,6 @@ const handleReviewNoPay = () => {
|
||||||
state.order.id +
|
state.order.id +
|
||||||
`&scaleStatusBtnType=${ScaleStatusBtnType.ShipmentNoPay}`, // 要跳转到的页面路径
|
`&scaleStatusBtnType=${ScaleStatusBtnType.ShipmentNoPay}`, // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
// ShipmentApi.updateOrderIn({ ...state.order, scaleStatus: 3 }).then((res) => {
|
|
||||||
// if (res.code === 200) {
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: "/pagesShipment/shipmentSettlement?scaleStatus=3", // 要跳转到的页面路径
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
};
|
};
|
||||||
// 审核立即支付
|
// 审核立即支付
|
||||||
const handleReviewPay = () => {
|
const handleReviewPay = () => {
|
||||||
|
@ -507,26 +396,6 @@ const handleReviewPay = () => {
|
||||||
|
|
||||||
const handleSelect = (key: string, v: any) => {
|
const handleSelect = (key: string, v: any) => {
|
||||||
contrlModalParams[key].isShow = false;
|
contrlModalParams[key].isShow = false;
|
||||||
if (key === "paySelect") {
|
|
||||||
// 修改订单状态
|
|
||||||
// ShipmentApi.updateOne({
|
|
||||||
// ...state.order,
|
|
||||||
// scaleStatus: 4,
|
|
||||||
// paymentMethod: v.key,
|
|
||||||
// }).then((res) => {
|
|
||||||
// if (res.code === 200) {
|
|
||||||
// uni.showToast({
|
|
||||||
// title: "支付成功",
|
|
||||||
// icon: "success",
|
|
||||||
// });
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: "/pagesReceive/payReview?scaleStatus=4", // 要跳转到的页面路径
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
} else if (key === "printSelect") {
|
|
||||||
// 打印
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
const isShowCancelModal = ref(false);
|
const isShowCancelModal = ref(false);
|
||||||
const deleteId = ref("0");
|
const deleteId = ref("0");
|
||||||
|
@ -540,8 +409,7 @@ const handleOk = () => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:
|
url:
|
||||||
"/pagesShipment/shipmentSettlement?scaleStatus=" +
|
"/pagesShipment/shipmentSettlement?scaleStatus=" + state.scaleStatus, // 要跳转到的页面路径
|
||||||
state.scaleStatus, // 要跳转到的页面路径
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -574,9 +442,6 @@ const init = () => {
|
||||||
gridList1.map((item) => {
|
gridList1.map((item) => {
|
||||||
item.num = state.order[item.enName as string];
|
item.num = state.order[item.enName as string];
|
||||||
});
|
});
|
||||||
gridList2.map((item) => {
|
|
||||||
item.num = state.order[item.enName as string];
|
|
||||||
});
|
|
||||||
gridList3.map((item) => {
|
gridList3.map((item) => {
|
||||||
if (item.name === "净重误差") {
|
if (item.name === "净重误差") {
|
||||||
item.num =
|
item.num =
|
||||||
|
@ -605,7 +470,7 @@ const handlePrint = () => {
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
init();
|
init();
|
||||||
});
|
});
|
||||||
onLoad((option:any) => {
|
onLoad((option: any) => {
|
||||||
state.order.id = (option as any).id;
|
state.order.id = (option as any).id;
|
||||||
state.scaleStatusBtnType = parseInt((option as any).scaleStatusBtnType);
|
state.scaleStatusBtnType = parseInt((option as any).scaleStatusBtnType);
|
||||||
state.scaleStatus = parseInt(option.scaleStatus);
|
state.scaleStatus = parseInt(option.scaleStatus);
|
||||||
|
|
|
@ -1,33 +1,28 @@
|
||||||
<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><text>请输入客户名称</text>
|
<u-search
|
||||||
|
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">
|
|
||||||
<text
|
|
||||||
v-for="(item, index) in tabList"
|
|
||||||
:key="index"
|
|
||||||
:class="{ active: currentTab === item.key }"
|
|
||||||
@click="handleTab(item)"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<page-view
|
<page-view
|
||||||
@loadList="
|
@loadList="
|
||||||
|
@ -37,24 +32,17 @@
|
||||||
"
|
"
|
||||||
:noMoreData="pageList.noMoreData"
|
:noMoreData="pageList.noMoreData"
|
||||||
:list="pageList.list"
|
:list="pageList.list"
|
||||||
:height="
|
:height="80"
|
||||||
ScaleStatus.ShipmentPaid === currentTab ||
|
|
||||||
ScaleStatus.ToBeShipmentReview === 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.ToBeShipmentPay === currentTab"
|
||||||
ScaleStatus.ToBeShipmentPay === currentTab
|
|
||||||
"
|
|
||||||
:color="'#00D2E3'"
|
:color="'#00D2E3'"
|
||||||
:checked="item.isChecked"
|
:checked="item.isChecked"
|
||||||
style="transform: scale(0.5)"
|
style="transform: scale(0.7)"
|
||||||
@click="item.isChecked = !item.isChecked"
|
@click="item.isChecked = !item.isChecked"
|
||||||
/></view>
|
/></view>
|
||||||
<view class="inner-box">
|
<view class="inner-box">
|
||||||
|
@ -64,7 +52,12 @@
|
||||||
<text class="number">出货单号:{{ item.orderNumber }}</text>
|
<text class="number">出货单号:{{ item.orderNumber }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<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>
|
||||||
|
@ -81,7 +74,7 @@
|
||||||
<text
|
<text
|
||||||
v-if="currentTab === 2"
|
v-if="currentTab === 2"
|
||||||
@click="handleReview(item.id, 2)"
|
@click="handleReview(item.id, 2)"
|
||||||
>出货结算</text
|
>去结算</text
|
||||||
>
|
>
|
||||||
<text
|
<text
|
||||||
v-if="currentTab === 3"
|
v-if="currentTab === 3"
|
||||||
|
@ -130,6 +123,14 @@
|
||||||
:closeOnClickAction="true"
|
:closeOnClickAction="true"
|
||||||
></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 { ShipmentApi } from "@/services/index";
|
import { ShipmentApi } from "@/services/index";
|
||||||
|
@ -138,6 +139,22 @@ import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { onShow } from "@dcloudio/uni-app";
|
import { onShow } from "@dcloudio/uni-app";
|
||||||
import PageView from "@/components/PageView/index.vue";
|
import PageView from "@/components/PageView/index.vue";
|
||||||
import type { ComType } from "@/types/global";
|
import type { ComType } from "@/types/global";
|
||||||
|
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<ComType>({
|
const contrlModalParams = reactive<ComType>({
|
||||||
select: {
|
select: {
|
||||||
|
@ -184,34 +201,14 @@ const pageList: PageResult<Shipment> = reactive({
|
||||||
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;
|
||||||
}>({
|
}>({
|
||||||
checkMap: {},
|
checkMap: {},
|
||||||
isAll: false,
|
isAll: false,
|
||||||
});
|
});
|
||||||
const tabList = reactive([
|
|
||||||
{
|
|
||||||
name: "待出货结算",
|
|
||||||
key: 2,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "已出未结算",
|
|
||||||
key: 3,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "已出已结算",
|
|
||||||
key: 4,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const currentTab = ref(2);
|
const currentTab = ref(2);
|
||||||
const handleTab = (item: any) => {
|
|
||||||
state.isAll = false;
|
|
||||||
currentTab.value = item.key;
|
|
||||||
resetPageList();
|
|
||||||
getList();
|
|
||||||
};
|
|
||||||
const handleReview = (id: string, scaleStatus: number) => {
|
const handleReview = (id: string, scaleStatus: number) => {
|
||||||
let type = ScaleStatusBtnType.ShipmentSettlement;
|
let type = ScaleStatusBtnType.ShipmentSettlement;
|
||||||
if (scaleStatus === 2) {
|
if (scaleStatus === 2) {
|
||||||
|
@ -230,8 +227,7 @@ const handleReview = (id: string, scaleStatus: number) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleReviewOrPay = () => {
|
const handleReviewOrPay = () => {
|
||||||
const list = pageList.list
|
const list = pageList.list.filter((item) => item.isChecked);
|
||||||
.filter((item) => item.isChecked)
|
|
||||||
if (list.length === 0) {
|
if (list.length === 0) {
|
||||||
uni.showToast({ icon: "none", title: "请至少选择一个出货单" });
|
uni.showToast({ icon: "none", title: "请至少选择一个出货单" });
|
||||||
return;
|
return;
|
||||||
|
@ -275,7 +271,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
resetPageList();
|
resetPageList();
|
||||||
|
@ -294,8 +290,10 @@ const getList = (v?: boolean) => {
|
||||||
ShipmentApi.getOrderPage({
|
ShipmentApi.getOrderPage({
|
||||||
pageSize: pageList.pageSize,
|
pageSize: pageList.pageSize,
|
||||||
pageNumber: pageList.pageNum,
|
pageNumber: pageList.pageNum,
|
||||||
scaleStatus: currentTab.value,
|
scaleStatus: ScaleStatus.ToBeShipmentReview,
|
||||||
userName: keyword.value,
|
userName: keyword.value,
|
||||||
|
startTime: filterState.startTime ? `${filterState.startTime} 00:00:00` : "",
|
||||||
|
endTime: filterState.startTime ? `${filterState.endTime} 00:00:00` : "",
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
pageList.isLoading = false;
|
pageList.isLoading = false;
|
||||||
|
@ -316,18 +314,25 @@ onShow(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
currentTab.value = parseInt((option as any).scaleStatus);
|
|
||||||
console.log(option);
|
|
||||||
});
|
});
|
||||||
</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%;
|
width: 100%;
|
||||||
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;
|
||||||
|
@ -341,6 +346,12 @@ 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;
|
||||||
|
@ -388,7 +399,7 @@ onLoad((option) => {
|
||||||
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
|
||||||
border-radius: 13rpx;
|
border-radius: 13rpx;
|
||||||
margin: 0rpx 25rpx;
|
margin: 0rpx 25rpx;
|
||||||
margin-top: 35rpx;
|
margin-top: 22rpx;
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
|
|
@ -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
|
||||||
:noMoreData="pageList.noMoreData"
|
:noMoreData="pageList.noMoreData"
|
||||||
:list="pageList.list"
|
:list="pageList.list"
|
||||||
|
@ -20,7 +39,7 @@
|
||||||
<text class="number">出货单号:{{ item.orderNumber }}</text>
|
<text class="number">出货单号:{{ item.orderNumber }}</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>
|
||||||
|
@ -43,14 +62,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 any)"
|
@click="handleModal(true, item.id as any)"
|
||||||
></u-button>
|
></u-button>
|
||||||
<u-button
|
<u-button
|
||||||
type="primary"
|
type="primary"
|
||||||
text="点击编辑"
|
text="编辑"
|
||||||
@click="pricingDetail(item.id as any)"
|
@click="pricingDetail(item.id as any)"
|
||||||
></u-button>
|
></u-button>
|
||||||
</view>
|
</view>
|
||||||
|
@ -66,13 +85,56 @@
|
||||||
@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 { ShipmentApi } from "@/services/index";
|
import { DeviceApi, ShipmentApi } 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, onShow } from "@dcloudio/uni-app";
|
import { onLoad, onShow } 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<Shipment> = reactive({
|
const pageList: PageResult<Shipment> = reactive({
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
@ -87,7 +149,7 @@ const resetPageList = () => {
|
||||||
pageList.total = 0;
|
pageList.total = 0;
|
||||||
pageList.list = [];
|
pageList.list = [];
|
||||||
pageList.pageNum = 1;
|
pageList.pageNum = 1;
|
||||||
pageList.pageSize = 10;
|
pageList.pageSize = 100;
|
||||||
};
|
};
|
||||||
|
|
||||||
const isShowCancelModal = ref(false);
|
const isShowCancelModal = ref(false);
|
||||||
|
@ -133,6 +195,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,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
pageList.isLoading = false;
|
pageList.isLoading = false;
|
||||||
|
@ -175,6 +238,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);
|
||||||
|
|
|
@ -9,7 +9,7 @@ export const getPaymentCount = (data: any) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 经营概况-收入明细
|
// 经营概况-收款明细
|
||||||
export const getRevenueCount = (data: any) => {
|
export const getRevenueCount = (data: any) => {
|
||||||
return http({
|
return http({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
@ -62,7 +62,7 @@ export const getRevenueDetailsPage = (data: any) => {
|
||||||
data,
|
data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 收入明细查看详情
|
// 收款明细查看详情
|
||||||
export const getRevenueDetailsById = (data: any) => {
|
export const getRevenueDetailsById = (data: any) => {
|
||||||
return http({
|
return http({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
@ -70,7 +70,7 @@ export const getRevenueDetailsById = (data: any) => {
|
||||||
data,
|
data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 收入明细新增
|
// 收款明细新增
|
||||||
export const addIncome = (data: any) => {
|
export const addIncome = (data: any) => {
|
||||||
return http({
|
return http({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
@ -78,7 +78,7 @@ export const addIncome = (data: any) => {
|
||||||
data,
|
data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 收入明细逻辑删除
|
// 收款明细逻辑删除
|
||||||
export const deleteRevenueDes = (data: any) => {
|
export const deleteRevenueDes = (data: any) => {
|
||||||
return http({
|
return http({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
|
@ -10,4 +10,5 @@ export * as SupplierApi from './supplier'
|
||||||
export * as CustomerApi from './customer'
|
export * as CustomerApi from './customer'
|
||||||
export * as FinanceApi from './finance'
|
export * as FinanceApi from './finance'
|
||||||
export * as MessageApi from './message'
|
export * as MessageApi from './message'
|
||||||
|
export * as OtherConfigApi from './otherConfig'
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
import { http } from "@/utils/http";
|
||||||
|
|
||||||
|
// 根据打印类型查询模板
|
||||||
|
export const getTemplates = (data: any) => {
|
||||||
|
return http({
|
||||||
|
method: "GET",
|
||||||
|
url: "/api/printtemplate/getTemplates",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 批量修改
|
||||||
|
export const updatePrintTemplate = (data: any) => {
|
||||||
|
return http({
|
||||||
|
method: "POST",
|
||||||
|
url: "/api/printtemplate/updatePrintTemplate",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export const printdetail = (data: any) => {
|
||||||
|
return http({
|
||||||
|
method: "GET",
|
||||||
|
url: "/api/param/printdetail",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const updateprintOne = (data: any) => {
|
||||||
|
return http({
|
||||||
|
method: "POST",
|
||||||
|
url: "/api/param/updateprintOne",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,15 @@
|
||||||
// const store = useMemberStore(pinia);
|
// const store = useMemberStore(pinia);
|
||||||
import type { User } from "@/types/user";
|
import type { User } from "@/types/user";
|
||||||
import { http } from "@/utils/http";
|
import { http } from "@/utils/http";
|
||||||
// console.log(store.profile.childPath)
|
|
||||||
|
// 判断手机是否存在公共库中
|
||||||
|
export const getCommonDbPhone = (data: { phone: string }) => {
|
||||||
|
return http({
|
||||||
|
method: "GET",
|
||||||
|
url: "/api/db/getCommonDbPhone",
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
// 登陆
|
// 登陆
|
||||||
export const loginByAccount = (data: {
|
export const loginByAccount = (data: {
|
||||||
userName: string;
|
userName: string;
|
||||||
|
@ -253,12 +261,4 @@ export const forgetPwd = (data: any) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 获取基地信息
|
|
||||||
export const getDbInfo = (data: any) => {
|
|
||||||
return http<User>({
|
|
||||||
method: "POST",
|
|
||||||
url: "/prod/gateway/api/db/getDbInfo",
|
|
||||||
data,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
|
@ -65,10 +65,11 @@ export const deleteOrder = (data: any) => {
|
||||||
// 统计首页的本月总收获以及总支出
|
// 统计首页的本月总收获以及总支出
|
||||||
// 收货类型
|
// 收货类型
|
||||||
|
|
||||||
export const countOrderByMonth = () => {
|
export const countOrderByMonth = (data:any) => {
|
||||||
return http<ReceiveSummary>({
|
return http<ReceiveSummary>({
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url: "/api/orderIn/countOrderByMonth"
|
url: "/api/orderIn/countOrderByMonth",
|
||||||
|
data
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -49,10 +49,11 @@ export const getOrderPage = (data: PageParams) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 统计首页的本月收入以及待出库
|
// 统计首页的本月收入以及待出库
|
||||||
export const countOrderByMonth = () => {
|
export const countOrderByMonth = (data:any) => {
|
||||||
return http<ShipmentSummary>({
|
return http<ShipmentSummary>({
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url: "/api/orderOut/countOrderByMonth"
|
url: "/api/orderOut/countOrderByMonth",
|
||||||
|
data
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 39 KiB |