update: 版本迭代完成90%

This commit is contained in:
admin 2024-07-15 14:15:49 +08:00
parent 8470b20396
commit 618d4c82c2
118 changed files with 3645 additions and 1943 deletions

View File

@ -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>

View File

@ -60,7 +60,7 @@
/>
</template>
<script setup lang="ts">
import TimeDialog from "./components/TimeDialog.vue";
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
import CEcharts from "./Echarts/echarts.vue";
import ProductDialog from "./components/ProductDialog.vue";
import { formatDate, getCurrentMonthStartAndEnd } from "@/utils";

View File

@ -11,7 +11,7 @@
:key="index"
v-show="isShowModule(item.child)"
>
<view class="title">
<view class="title" :class="item.color">
<Title :title="item.title" />
</view>
<view class="box-content">
@ -24,7 +24,7 @@
>
<view v-if="isShowModule([{ title: child.title }])">
<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"
width="60rpx"
height="60rpx"
@ -35,8 +35,6 @@
}}</view>
</view>
</view>
<view class="line" v-show="index < list.length - 1"></view>
</view>
</Box>
@ -56,15 +54,17 @@ 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 pinia from "@/store";
import { url } from "@/utils/data";
const store = useMemberStore(pinia);
const list = reactive([
{
title: "收货",
title: "收货数据",
color: "green",
child: [
{
icon: "01.png",
icon: "1.png",
title: "收货汇总",
fn: (item: any) => {
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: "供应商排行",
fn: (item: any) => {
uni.navigateTo({
@ -84,10 +102,11 @@ const list = reactive([
],
},
{
title: "出货",
title: "出货数据",
color: "blue",
child: [
{
icon: "03.png",
icon: "5.png",
title: "出货汇总",
fn: (item: any) => {
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: "客户排行",
fn: (item: any) => {
uni.navigateTo({
@ -107,19 +144,11 @@ const list = reactive([
],
},
{
title: "账本",
title: "我的账本",
color: "orange",
child: [
{
icon: "05.png",
title: "经营概况",
fn: (item: any) => {
uni.navigateTo({
url: "/pagesStatistics/businessOverview", //
});
},
},
{
icon: "06.png",
icon: "10.png",
title: "供应商对账",
fn: (item: any) => {
uni.navigateTo({
@ -128,7 +157,7 @@ const list = reactive([
},
},
{
icon: "07.png",
icon: "11.png",
title: "客户对账",
fn: (item: any) => {
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 {
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;
}
}
.green {
&::before {
background: #22d594;
}
}
.blue {
&::before {
background: rgba(34, 114, 213, 1);
}
}
.orange {
&::before {
background: rgba(255, 120, 43, 1);
}
}
.box-content {
display: flex;
margin: 22rpx 0rpx;
padding: 0rpx 20rpx;
flex-wrap: wrap;
.box {
width: 142rpx;
height: 142rpx;
background: #f9f9f9;
width: 140rpx;
height: 140rpx;
border-radius: 26rpx;
// text-align: center;
// vertical-align: middle;
// display: grid;
font-family: Source Han Sans CN;
font-weight: 400;
font-size: 26rpx;
@ -195,12 +274,8 @@ onMounted(() => {
> .box + .box {
margin-left: 32rpx;
}
::v-deep .u-transition {
align-items: center;
.box:nth-child(5n) {
margin-left: 0rpx;
}
}
.line {
height: 18rpx;
background: #f8f8f8;
}
</style>

View File

@ -18,15 +18,6 @@
name="arrow-down"
@click="handleDialog('showTime', true)"
></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>
</view>
<view class="box">
@ -133,13 +124,6 @@
@changeTime="changeTime"
/>
<!-- 单据弹框 -->
<StatusDialog
:show="showDialog.showStatus"
:isShipment="false"
@handleDialog="(v:boolean) => {handleDialog('showStatus', v)}"
@changeStatus="changeStatus"
/>
<!-- 筛选弹框 -->
<FilterDialog
@ -150,15 +134,13 @@
/>
</template>
<script setup lang="ts">
import TimeDialog from "./components/TimeDialog.vue";
import StatusDialog from "./components/StatusDialog.vue";
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
import FilterDialog from "./components/FilterDialog.vue";
import { ReceiveApi } from "@/services";
import {
formatDate,
formatMoney,
getCurrentMonthStartAndEnd,
getScaleStatus,
} from "@/utils";
const tableTitleList = reactive([
{
@ -183,7 +165,6 @@ const showDialog = <
}
>reactive({
showTime: false,
showStatus: false,
showFilter: false,
});
@ -206,8 +187,8 @@ const state = reactive<{
averagePrice: 0, //
rankings: [],
},
startTime: formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}"),
endTime: formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}"),
startTime: formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d} {h}:{i}:{s}"),
endTime: formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d} {h}:{i}:{s}"),
scaleStatus: -1,
userId: -1,
productId: -1,
@ -219,11 +200,6 @@ const changeTime = (obj: any) => {
getList();
};
//
const changeStatus = (obj: any) => {
state.scaleStatus = obj.id;
getList();
};
const changeOther = (obj: any) => {
state.userId = obj.userId;
@ -237,8 +213,8 @@ const handleDialog = (key: string, v: boolean) => {
const getList = () => {
let params: any = {
startTime: state.startTime + " 00:00:00",
endTime: state.endTime + " 23:59:59",
startTime: state.startTime,
endTime: state.endTime,
};
if (state.scaleStatus > -1) {
params.scaleStatus = state.scaleStatus;

View File

@ -18,15 +18,6 @@
name="arrow-down"
@click="handleDialog('showTime', true)"
></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>
</view>
<view class="box">
@ -131,14 +122,6 @@
@changeTime="changeTime"
/>
<!-- 单据弹框 -->
<StatusDialog
:show="showDialog.showStatus"
:isShipment="true"
@handleDialog="(v:boolean) => {handleDialog('showStatus', v)}"
@changeStatus="changeStatus"
/>
<!-- 筛选弹框 -->
<FilterDialog
:show="showDialog.showFilter"
@ -148,8 +131,7 @@
/>
</template>
<script setup lang="ts">
import TimeDialog from "./components/TimeDialog.vue";
import StatusDialog from "./components/StatusDialog.vue";
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
import FilterDialog from "./components/FilterDialog.vue";
import { ShipmentApi } from "@/services";
import {
@ -181,7 +163,6 @@ const showDialog = <
}
>reactive({
showTime: false,
showStatus: false,
showFilter: false,
});
@ -204,8 +185,8 @@ const state = reactive<{
averagePrice: 0, //
rankings: [],
},
startTime: formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}"),
endTime: formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}"),
startTime: formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d} {h}:{i}:{s}"),
endTime: formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d} {h}:{i}:{s}"),
scaleStatus: -1,
userId: -1,
productId: -1,
@ -217,11 +198,6 @@ const changeTime = (obj: any) => {
getList();
};
const changeStatus = (obj: any) => {
state.scaleStatus = obj.id;
getList();
};
const changeOther = (obj: any) => {
state.userId = obj.userId;
state.productId = obj.productId;

View File

@ -57,7 +57,7 @@
</view>
</template>
<script setup lang="ts">
import TimeDialog from "./components/TimeDialog.vue";
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
import CEcharts from "./Echarts/echarts.vue";
import ProductDialog from "./components/ProductDialog.vue";
import { ReceiveApi } from "@/services";

View File

@ -2,20 +2,43 @@
<u-popup :show="show" mode="bottom" :round="10" :closeable="true" @close="handleClose">
<view class="c-dialog-filter">
<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
v-for="(item, index) in state.list"
:class="{ active: state.current === item.id }"
@click="handleSelect(item)"
:key="index"
>{{isShipment ? item.shmProductsName : item.reProductsName }}</text
>{{ isShipment ? item.shmProductsName : item.reProductsName }}</text
>
</view>
<!-- <view class="btn-confirm">
<view class="btn">
<u-button type="primary" :text="'确认'"></u-button>
</view>
</view> -->
</view>
</u-popup>
</template>
@ -42,9 +65,17 @@ const handleSelect = (item: any) => {
};
const getList = () => {
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) {
state.list = res.data;
if (res.code === 200) {
state.list = res.data;
}
}
});
} else {
@ -63,6 +94,7 @@ onMounted(() => {
.c-dialog-filter {
width: 95vw;
padding: 25rpx;
overflow-y: scroll;
.title {
font-weight: 500;
font-size: 32rpx;
@ -70,12 +102,22 @@ onMounted(() => {
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-product-layout {
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 13rpx;
margin: 42rpx 25rpx;
padding: 19rpx;
margin: 30rpx 24rpx;
padding: 20rpx;
display: flex;
justify-content: flex-start;
align-items: center;

View File

@ -3,52 +3,45 @@
:show="show"
mode="bottom"
:round="10"
:closeable="true"
:closeable="false"
@close="handleClose"
>
<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">
<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 class="timeBox">
<uni-datetime-picker
class="my-datetime-picker"
v-model="state.datetimerange"
type="datetimerange"
rangeSeparator="-"
/>
</view>
</view>
</u-popup>
</template>
<script setup lang="ts">
import { formatDate, getCurrentMonthStartAndEnd, getCurrentYearStartAndEnd, timeRange } from "@/utils";
import { formatDate, timeRange } from "@/utils";
const props = defineProps<{
show: boolean;
}>();
const state = reactive<any>({
datetimerange: [],
startTime: "",
endTime: "",
currentStates: -1,
@ -75,47 +68,27 @@ 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 range = timeRange(item.id);
state.startTime = range.startTime + ' 00:00:00';
state.endTime = range.endTime + ' 23:59:59';
state.datetimerange = [state.startTime, state.endTime]
};
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 cancel = () => {
emit("handleDialog", false)
}
const confirm = () => {
showCalendar.value = false
emit("changeTime", {startTime: state.startTime, endTime: state.endTime, name: '自定义'});
emit("changeTime", {
startTime: state.datetimerange[0],
endTime: state.datetimerange[1],
name: "自定义",
});
emit("handleDialog", false);
}
};
</script>
<style lang="scss" scoped>
::v-deep .u-popup__content {
@ -123,7 +96,7 @@ const confirm = () => {
border-radius: 32rpx 32rpx 0rpx 0rpx;
}
.c-dialog {
margin: 65.38rpx 44.87rpx;
margin: 22rpx;
font-family: Source Han Sans CN;
font-weight: 500;
font-size: 26rpx;
@ -133,6 +106,11 @@ const confirm = () => {
line-height: 80rpx;
display: flex;
justify-content: space-between;
.btn {
font-weight: 500;
font-size: 26rpx;
color: $u-primary;
}
}
.box-btn {
line-height: 40rpx;
@ -153,11 +131,7 @@ const confirm = () => {
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);
}
@ -166,4 +140,23 @@ const confirm = () => {
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>

View File

@ -12,7 +12,7 @@
</view>
<up-image
src="https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/message.png"
:src="`${url}/static/pages/message.png`"
width="42rpx"
height="36rpx"
></up-image>
@ -22,37 +22,36 @@
</view>
</template>
<script setup lang="ts">
import {url} from "@/utils/data";
import {
ProfileApi,
ReceiveApi,
ShipmentApi,
PictureApi,
ReceiveProductApi,
// ProfileApi,
// ReceiveApi,
// ShipmentApi,
// PictureApi,
// ReceiveProductApi,
DeviceApi,
StockCardApi,
GoodsApi,
// GoodsApi,
SupplierApi,
CustomerApi,
FinanceApi,
MessageApi,
OtherConfigApi
} from "@/services";
import { formatDate } from "@/utils";
import { UsersType } from "@/utils/enum";
import valid from "@/utils/validate";
console.log(
ProfileApi,
ReceiveApi,
ShipmentApi,
PictureApi,
ReceiveProductApi,
// ProfileApi,
// ReceiveApi,
// ShipmentApi,
// PictureApi,
// ReceiveProductApi,
DeviceApi,
StockCardApi,
GoodsApi,
// GoodsApi,
SupplierApi,
CustomerApi,
FinanceApi,
formatDate,
UsersType,
OtherConfigApi,
valid
);

View File

@ -1,5 +1,5 @@
<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">
<view class="grid-item">
<up-image

View File

@ -1,41 +1,44 @@
<template>
<!-- 工作台底部菜单 -->
<uni-transition mode-class="fade" :duration="100" :show="true">
<up-tabbar
:value="select"
:fixed="true"
:placeholder="true"
:safeAreaInsetBottom="true"
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"
<view class="custom-tabbar">
<up-tabbar
:value="select"
:fixed="true"
:placeholder="true"
:safeAreaInsetBottom="true"
activeColor="#00DCEE"
:border="false"
>
<template #active-icon>
<image
:src="`/static/img/tabBar/${item.activeIcon}`"
class="custom-img"
></image>
</template>
<template #inactive-icon>
<image
:src="`/static/img/tabBar/${item.icon}`"
class="custom-img"
></image>
</template>
</up-tabbar-item>
</up-tabbar>
<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>
<image
:src="`${url}/static/110/tabBar/${item.activeIcon}`"
class="custom-img"
></image>
</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>
</template>
<script setup lang="ts">
import { onLaunch } from "@dcloudio/uni-app";
import {url} from "@/utils/data";
const props = withDefaults(
defineProps<{
select: string;
@ -64,10 +67,17 @@ const state = reactive({
activeIcon: "count_active.png",
path: "/pagesStatistics/index",
},
{
text: "配置",
icon: "config.png",
activeIcon: "config_active.png",
path: "/pagesConfig/index",
},
{
text: "配置旧",
icon: "config.png",
activeIcon: "config_active.png",
path: "/pagesHome/index1",
},
{
@ -95,13 +105,16 @@ onLaunch(() => {
width: 35rpx;
height: 35rpx;
}
.u-tabbar {
background: #ffffff;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
border-radius: 13rpx 13rpx 0rpx 0rpx;
}
::v-deep.u-tabbar__content {
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
border-radius: 13rpx 13rpx 0rpx 0rpx;
::v-deep .custom-tabbar {
> view {
> view {
background: #ffffff;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
border-radius: 13rpx 13rpx 0rpx 0rpx;
}
&:nth-child(1) {
height: 0px;
}
}
}
</style>

View File

@ -14,5 +14,7 @@ const props = defineProps<{
font-weight: 500;
font-size: 28rpx;
color: #000000;
padding: 0px 20rpx;
}
</style>

View File

@ -50,12 +50,6 @@
"navigationBarTitleText": "登陆"
}
},
{
"path": "login/forgetPwd",
"style": {
"navigationBarTitleText": "忘记密码"
}
},
{
"path": "message/index",
"style": {
@ -75,13 +69,6 @@
"navigationBarTitleText": "基础信息",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "profile/modifyPwd",
"style": {
"navigationBarTitleText": "修改密码",
"navigationBarBackgroundColor": "#FFFFFF"
}
}
]
},
@ -150,9 +137,22 @@
{
"path": "shipmentSettlement",
"style": {
"navigationBarTitleText": "出货结算"
"navigationBarTitleText": "结算"
}
},
{
"path": "pendingPayment",
"style": {
"navigationBarTitleText": "待收款"
}
},
{
"path": "receivedPayment",
"style": {
"navigationBarTitleText": "已收款"
}
},
{
"path": "review/index",
"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",
"pages": [
{
"path": "supplierOrCustomerList",
"style": {
"navigationBarTitleText": "列表"
}
},
{
"path": "receiveSpl",
"style": {
@ -364,7 +400,7 @@
{
"path": "incomeDetail",
"style": {
"navigationBarTitleText": "收明细"
"navigationBarTitleText": "收明细"
}
},
{
@ -442,7 +478,7 @@
{
"path": "components/addIncomeDetail",
"style": {
"navigationBarTitleText": "新增收明细"
"navigationBarTitleText": "新增收明细"
}
},
{
@ -466,25 +502,7 @@
// }
],
"tabbar": {
"custom": true, //
"list": [
{
"pagePath": "pagesHome/index",
"text": "工作台"
},
{
"pagePath": "pagesStatistics/index",
"text": "统计"
},
{
"pagePath": "pagesHome/index",
"text": "配置"
},
{
"pagePath": "pagesLogin/profile/index",
"text": "我的"
}
]
"custom": true //
},
"globalStyle": {
"navigationBarTextStyle": "black",

View File

@ -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>

View File

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

View File

@ -309,7 +309,7 @@ const handleUpload = () => {
...(res.data as any),
businessId: model1.order.id,
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);
border-radius: 13rpx 13rpx 0rpx 0rpx;
padding: 25rpx 50rpx;
position: sticky;
position: fixed;
width: calc(100vw - 100rpx);
bottom: 0rpx;
z-index: 999;
::v-deep button {

View File

@ -428,7 +428,7 @@ const handleUpload = () => {
...(res.data as any),
businessId: model1.order.id,
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);
border-radius: 13rpx 13rpx 0rpx 0rpx;
padding: 25rpx 50rpx;
position: sticky;
position: fixed;
width: calc(100vw - 100rpx);
bottom: 0rpx;
z-index: 999;
::v-deep button {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
<u-form
labelPosition="left"
:model="model1"
:rules="model1.formData.id ? rules2 : rules1"
:rules="rules1"
ref="form"
:labelWidth="100"
:labelStyle="{ padding: '0rpx 10rpx' }"
@ -13,10 +13,25 @@
:prop="`formData.${item.key}`"
:label="item.name"
:required="item.required"
v-for="(item, index) in model1.formData.id ? formAttrList2 : formAttrList1"
v-for="(item, index) in formAttrList1"
:key="index"
@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
v-if="item.type === 'textarea'"
v-model="(model1.formData as any)[item.key]"
@ -51,7 +66,7 @@
</template>
</u-form-item>
</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
v-if="item.type === 'select'"
:actions="contrlModalParams[item.childKey].list"
@ -84,15 +99,11 @@ const handleInput = (e: any, item: any) => {
model1.formData[item.key] = temp;
}, 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>({
formData: {},
formData: {
gender: 1
},
});
const rules1 = ref({
"formData.roleName": {
@ -101,30 +112,16 @@ const rules1 = ref({
message: "请选择用户角色",
trigger: ["blur", "change"],
},
"formData.userName": {
"formData.name": {
type: "string",
required: true,
message: "请输入账号",
message: "请输入姓名",
trigger: ["blur", "change"],
},
"formData.password": {
"formData.phone": {
type: "string",
required: true,
message: "请输入密码",
trigger: ["blur", "change"],
},
});
const rules2 = ref({
"formData.roleName": {
type: "string",
required: true,
message: "请选择用户角色",
trigger: ["blur", "change"],
},
"formData.userName": {
type: "string",
required: true,
message: "请输入账号",
message: "请输入手机号",
trigger: ["blur", "change"],
},
});
@ -155,16 +152,22 @@ const formAttrList1 = reactive<any>([
name: "姓名",
key: "name",
type: "input",
required: true,
},
{
name: "性别",
key: "genderName",
type: "select",
childKey: "gender",
fn: () => {
contrlModalParams.gender.isShow = true;
contrlModalParams.gender.title = "选择性别";
},
key: "gender",
type: "radio",
child: [
{
id: 1,
name: "男",
},
{
id: 2,
name: "女",
},
],
},
{
name: "用户角色",
@ -178,74 +181,18 @@ const formAttrList1 = reactive<any>([
},
},
{
name: "账号",
key: "userName",
type: "input",
required: true,
},
{
name: "密码",
key: "password",
type: "input",
required: true,
},
{
name: "联系手机",
name: "手机号",
key: "phone",
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,
},
{
name: "联系手机",
key: "phone",
type: "input",
},
]);
const handleSelect = (key: string, v: any) => {
contrlModalParams[key].isShow = false;
if (key === "role") {
model1.formData.roleName = v.name;
model1.formData.roleIds = [v.id];
}
if (key === "gender") {
model1.formData.genderName = v.name;
model1.formData.gender = v.id;
}
};
const form = ref();
@ -273,17 +220,6 @@ const save = () => {
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) => {
if (res) {
@ -295,7 +231,7 @@ const save = () => {
const startSave = () => {
if (model1.formData.id) {
ProfileApi.updateUserById({
name: model1.formData.name,
name: model1.formData.name,
id: model1.formData.id,
roleIds: model1.formData.roleIds,
userName: model1.formData.userName,
@ -330,15 +266,19 @@ onMounted(() => {
getRoleList();
});
onLoad((option) => {
onLoad((option: any) => {
// ;
const title = (option as any).title;
const obj = JSON.parse((option as any).item);
model1.formData = { ...obj, genderName: ["未知", "男", "女"][obj.gender] };
if (obj.roleVos.length > 0) {
model1.formData.roleIds = [obj.roleVos[0].id];
model1.formData.roleName = obj.roleVos[0].roleName;
const title = option.title;
if (option.item) {
const obj = JSON.parse(option.item);
model1.formData = { ...obj, genderName: ["未知", "男", "女"][obj.gender] };
debugger
if (obj.roleVos.length > 0) {
model1.formData.roleIds = [obj.roleVos[0].id];
model1.formData.roleName = obj.roleVos[0].roleName;
}
}
// ;
if (title) {
uni.setNavigationBarTitle({
@ -368,7 +308,8 @@ onLoad((option) => {
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
border-radius: 13rpx 13rpx 0rpx 0rpx;
padding: 25rpx 50rpx;
position: sticky;
position: fixed;
width: calc(100vw - 100rpx);
bottom: 0rpx;
z-index: 999;
::v-deep button {

View File

@ -11,7 +11,6 @@
@search="handleSearch()"
@clear="handleSearch()"
></u-search>
<view class="btn" @click="add"> 新增 </view>
</view>
<page-view
@ -41,6 +40,10 @@
</page-view>
</view>
<view class="btn-box-fix-btn">
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
</view>
<SmallModal
:title="'确认删除吗?'"
:content="'确认删除后,不能恢复!'"
@ -81,7 +84,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const add = () => {
uni.navigateTo({

View File

@ -113,7 +113,7 @@
import { FinanceApi } from "@/services";
import PageView from "@/components/PageView/index.vue";
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 { onShow } from "@dcloudio/uni-app";
@ -190,7 +190,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const handleSearch = () => {
resetPageList();

View File

@ -108,7 +108,7 @@
import { FinanceApi } from "@/services";
import PageView from "@/components/PageView/index.vue";
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 { onShow } from "@dcloudio/uni-app";
@ -194,7 +194,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const handleSearch = () => {
resetPageList();

View File

@ -160,7 +160,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const handleSearch = () => {

View File

@ -159,7 +159,7 @@ import {
getCurrentMonthStartAndEnd,
filterNullUndefined,
} from "@/utils";
import TimeDialog from "./components/TimeDialog.vue";
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
import FilterDialog from "./components/FilterDialog.vue";
const showDialog = <
{
@ -350,7 +350,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const handleOk = (obj: any) => {

View File

@ -11,7 +11,6 @@
@search="handleSearch()"
@clear="handleSearch()"
></u-search>
<view class="btn" @click="add"> 新增 </view>
</view>
<page-view
@ -39,6 +38,10 @@
</view>
</page-view>
</view>
<view class="btn-box-fix-btn">
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
</view>
<SmallModal
:title="'确认删除吗?'"
:content="'确认删除后,不能恢复!'"
@ -62,7 +65,7 @@ const handleModal = (v: boolean, id: number) => {
deleteId.value = id;
};
const handleOk = () => {
update({id: deleteId.value})
update({ id: deleteId.value });
};
const state = reactive<any>({
name: "",
@ -74,7 +77,7 @@ const pageList: PageResult<{
reProductsName: string;
minPrice: number;
maxPrice: number;
id: number
id: number;
}> = reactive({
isLoading: false,
noMoreData: false,
@ -88,7 +91,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const handleSearch = () => {
resetPageList();
@ -96,7 +99,6 @@ const handleSearch = () => {
};
const update = (item: any) => {
GoodsApi.deleteReceiveProduct({ id: item.id }).then((res) => {
if (res.code === 200) {
resetPageList();
@ -127,7 +129,7 @@ const getList = (v?: boolean) => {
reProductsName: state.name,
};
pageList.isLoading = true;
GoodsApi.getReceiveProductListByPage(params).then((res:any) => {
GoodsApi.getReceiveProductListByPage(params).then((res: any) => {
if (res.code === 200) {
pageList.isLoading = false;
(pageList as any).list = (pageList as any).list = pageList.list.concat(
@ -143,7 +145,7 @@ const add = () => {
});
};
onShow(() => {
resetPageList()
resetPageList();
getList();
});
</script>

View File

@ -32,7 +32,12 @@
:customStyle="{}"
border="none"
: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)}"
@clear="handleClear(item)"
>
@ -84,7 +89,9 @@
></u-datetime-picker>
<block v-for="(item, index) in formAttrList" :key="index">
<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"
:title="contrlModalParams[item.childKey].title"
:show="contrlModalParams[item.childKey].isShow"
@ -98,14 +105,6 @@
<u-button type="primary" text="保存" @click="save()"></u-button>
</view>
<!-- 供应商选择弹框 -->
<SupplierDialog
ref="supplierDialog"
:show="showDialog.showSupplier"
@handleDialog="(v:boolean) => {handleDialog('showSupplier', v)}"
@changeUser="changeUser"
:isShipment="false"
></SupplierDialog>
<!-- 收货产品弹框 -->
<ProductDialog
:show="showDialog.showProduct"
@ -127,20 +126,19 @@ import {
import { countDots, formatDate } from "@/utils";
import { DeviceType, ImagesType, OrderType } from "@/utils/enum";
import _ from "underscore";
import SupplierDialog from "./components/SupplierDialog.vue";
import ProductDialog from "./components/ProductDialog.vue";
import ProductDialog from "@/components/Dialog/ProductDialog.vue";
import valid from "@/utils/validate";
import { onLoad } from "@dcloudio/uni-app";
const handleClear = (item:any) => {
(model1.order as any)[item.key] = '';
}
const handleClear = (item: any) => {
(model1.order as any)[item.key] = "";
};
//
const showDialog = <
{
[key: string]: boolean;
}
>reactive({
showSupplier: false,
showProduct: false,
});
@ -148,11 +146,6 @@ const handleDialog = (key: string, v: boolean) => {
showDialog[key] = v;
};
const changeUser = (obj: any) => {
model1.order.userName = obj.name; //
model1.order.userId = obj.id; // Id,
};
//
const changeProduct = (obj: any) => {
model1.order.productName = obj.reProductsName; //
@ -226,7 +219,8 @@ const model1 = reactive<any>({
splTime: "",
subtractType: 1,
netWeight: 0,
totalPrice: 0
totalPrice: 0,
repairTime: formatDate(new Date(), "{y}-{m}-{d} {h}:{i}:{s}"),
},
});
const rules = reactive({
@ -287,11 +281,6 @@ const contrlModalParams = reactive<any>({
title: "标题",
list: [],
},
user: {
isShow: false,
title: "标题",
list: [],
},
product: {
isShow: false,
title: "标题",
@ -326,14 +315,12 @@ const formAttrList = reactive<any>([
name: "供应商",
key: "userName",
type: "select",
childKey: "user",
required: true,
unit: "",
fn: () => {
// contrlModalParams.user.isShow = true;
// contrlModalParams.user.title = "";
handleDialog("showSupplier", true);
uni.hideKeyboard();
uni.navigateTo({
url: `/pagesApp/supplierOrCustomerList?isShipment=false`,
});
},
},
{
@ -350,8 +337,6 @@ const formAttrList = reactive<any>([
required: true,
unit: "",
fn: () => {
// contrlModalParams.product.isShow = true;
// contrlModalParams.product.title = "";
handleDialog("showProduct", true);
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.subtractNum) {
model1.order.netWeight =
@ -448,9 +435,10 @@ watch(
model1.order.netWeight * ((100 - model1.order.subtractNum) / 100);
}
}
model1.order.totalPrice =
Math.floor((model1.order.price || 0) * (model1.order.netWeight || 0)) ;
// =
model1.order.totalPrice = Math.floor(
(model1.order.price || 0) * (model1.order.netWeight || 0)
);
// =
model1.order.balanceTotalPrice = model1.order.totalPrice;
}
);
@ -495,10 +483,7 @@ const handleUpload = () => {
};
const handleSelect = (key: string, v: any) => {
contrlModalParams[key].isShow = false;
if (key === "user") {
model1.order.userName = v.name;
model1.order.userId = v.id;
} else if (key === "product") {
if (key === "product") {
model1.order.productName = v.name;
model1.order.productId = v.id;
} else if (key === "device") {
@ -506,12 +491,6 @@ const handleSelect = (key: string, v: any) => {
model1.order.deviceId = v.id;
}
};
//
SupplierApi.getSupplierUserList({}).then((res) => {
if (res.code === 200) {
contrlModalParams.user.list = res.data;
}
});
//
ReceiveProductApi.getAllReProducts().then((res) => {
if (res.code === 200) {
@ -598,7 +577,7 @@ const startSave = () => {
if (res.code === 200) {
model1.order.id = res.data;
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}");
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>
<style lang="scss" scoped>
.c-card {
@ -628,7 +618,8 @@ const handleTime = (v: any) => {
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
border-radius: 13rpx 13rpx 0rpx 0rpx;
padding: 25rpx 50rpx;
position: sticky;
position: fixed;
width: calc(100vw - 100rpx);
bottom: 0rpx;
z-index: 999;
::v-deep button {

View File

@ -11,7 +11,6 @@
@search="handleSearch()"
@clear="handleSearch()"
></u-search>
<view class="btn" @click="add"> 新增 </view>
</view>
<page-view
@loadList="
@ -31,13 +30,17 @@
</view>
<view class="op-box">
<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>
</page-view>
</view>
<view class="btn-box-fix-btn">
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
</view>
<SmallModal
:title="'确认删除吗?'"
:content="'确认删除后,不能恢复!'"
@ -60,13 +63,13 @@ const handleModal = (v: boolean, id: number) => {
deleteId.value = id;
};
const handleOk = () => {
deleteType({id: deleteId.value})
deleteType({ id: deleteId.value });
};
const state = reactive<any>({
name: "",
});
const pageList: PageResult<{ reCategoryName: string, id: number }> = reactive({
const pageList: PageResult<{ reCategoryName: string; id: number }> = reactive({
isLoading: false,
noMoreData: false,
total: 0,
@ -79,7 +82,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const add = () => {
uni.navigateTo({
@ -123,7 +126,7 @@ const getList = (v?: boolean) => {
params.supplierTypeId = state.supplierTypeId;
}
pageList.isLoading = true;
GoodsApi.getPage(params).then((res:any) => {
GoodsApi.getPage(params).then((res: any) => {
if (res.code === 200) {
pageList.isLoading = false;
(pageList as any).list = (pageList as any).list = pageList.list.concat(

View File

@ -11,7 +11,6 @@
@search="handleSearch()"
@clear="handleSearch()"
></u-search>
<view class="btn" @click="add"> 新增 </view>
</view>
<page-view
@loadList="
@ -42,6 +41,9 @@
</page-view>
</view>
<view class="btn-box-fix-btn">
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
</view>
<SmallModal
:title="'确认删除吗?'"
:content="'确认删除后,不能恢复!'"
@ -85,7 +87,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const add = () => {
uni.navigateTo({

View File

@ -188,7 +188,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const handleSearch = () => {

View File

@ -174,7 +174,7 @@ import {
getCurrentMonthStartAndEnd,
filterNullUndefined,
} from "@/utils";
import TimeDialog from "./components/TimeDialog.vue";
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
import FilterDialog from "./components/FilterDialog.vue";
const showDialog = <
{
@ -383,7 +383,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const handleOk = (obj: any) => {

View File

@ -11,7 +11,6 @@
@search="handleSearch()"
@clear="handleSearch()"
></u-search>
<view class="btn" @click="add"> 新增 </view>
</view>
<page-view
@ -41,6 +40,10 @@
</view>
</page-view>
</view>
<view class="btn-box-fix-btn">
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
</view>
<SmallModal
:title="'确认删除吗?'"
:content="'确认删除后,不能恢复!'"
@ -64,7 +67,7 @@ const handleModal = (v: boolean, id: number) => {
deleteId.value = id;
};
const handleOk = () => {
update({id: deleteId.value})
update({ id: deleteId.value });
};
const state = reactive<any>({
name: "",
@ -76,7 +79,7 @@ const pageList: PageResult<{
shmProductsName: string;
parentName: string;
shmCategoryName: string;
id: number
id: number;
}> = reactive({
isLoading: false,
noMoreData: false,
@ -90,7 +93,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const handleSearch = () => {
resetPageList();
@ -142,7 +145,7 @@ const add = () => {
});
};
onShow(() => {
resetPageList()
resetPageList();
getList();
});
</script>

View File

@ -45,8 +45,6 @@
</text>
</template>
</u-input>
<!-- @afterRead="afterRead"
@delete="deletePic" -->
<uni-file-picker
v-if="item.type === 'upload'"
v-model="model1.order.fileLists"
@ -84,7 +82,7 @@
></u-datetime-picker>
<block v-for="(item, index) in formAttrList" :key="index">
<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"
:title="contrlModalParams[item.childKey].title"
:show="contrlModalParams[item.childKey].isShow"
@ -98,14 +96,6 @@
<u-button type="primary" text="保存" @click="save()"></u-button>
</view>
<!-- 客户选择弹框 -->
<SupplierDialog
ref="supplierDialog"
:show="showDialog.showSupplier"
@handleDialog="(v:boolean) => {handleDialog('showSupplier', v)}"
@changeUser="changeUser"
:isShipment="true"
></SupplierDialog>
<!-- 出货产品弹框 -->
<ProductDialog
:show="showDialog.showProduct"
@ -126,9 +116,9 @@ import {
import { countDots, formatDate } from "@/utils";
import { DeviceType, ImagesType, OrderType } from "@/utils/enum";
import _ from "underscore";
import SupplierDialog from "./components/SupplierDialog.vue";
import ProductDialog from "./components/ProductDialog.vue";
import ProductDialog from "@/components/Dialog/ProductDialog.vue";
import valid from "@/utils/validate";
import { onLoad } from "@dcloudio/uni-app";
const handleClear = (item:any) => {
(model1.order as any)[item.key] = '';
}
@ -138,7 +128,6 @@ const showDialog = <
[key: string]: boolean;
}
>reactive({
showSupplier: false,
showProduct: false,
});
@ -146,10 +135,6 @@ const handleDialog = (key: string, v: boolean) => {
showDialog[key] = v;
};
const changeUser = (obj: any) => {
model1.order.userName = obj.name; //
model1.order.userId = obj.id; // Id,
};
//
const changeProduct = (obj: any) => {
@ -194,7 +179,8 @@ const model1 = reactive<any>({
fileLists: [],
splTime: "",
subtractType: 1,
netWeight: 0
netWeight: 0,
repairTime: formatDate(new Date(), "{y}-{m}-{d} {h}:{i}:{s}"),
},
});
const rules = reactive({
@ -249,11 +235,6 @@ const contrlModalParams = reactive<any>({
title: "标题",
list: [],
},
user: {
isShow: false,
title: "标题",
list: [],
},
product: {
isShow: false,
title: "标题",
@ -288,14 +269,12 @@ const formAttrList = reactive<any>([
name: "客户",
key: "userName",
type: "select",
childKey: "user",
required: true,
unit: "",
fn: () => {
// contrlModalParams.user.isShow = true;
// contrlModalParams.user.title = "";
handleDialog("showSupplier", true);
uni.hideKeyboard();
uni.navigateTo({
url: `/pagesApp/supplierOrCustomerList?isShipment=true`,
});
},
},
{
@ -466,12 +445,6 @@ const handleSelect = (key: string, v: any) => {
model1.order.deviceId = v.id;
}
};
//
CustomerApi.getCustomUserList({}).then((res) => {
if (res.code === 200) {
contrlModalParams.user.list = res.data;
}
});
//
GoodsApi.getShipmentProductList().then((res) => {
if (res.code === 200) {
@ -569,6 +542,17 @@ const handleTime = (v: any) => {
model1.order.repairTime = formatDate(v.value, "{y}-{m}-{d} {h}:{i}:{s}");
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>
<style lang="scss" scoped>
.c-card {
@ -591,7 +575,8 @@ const handleTime = (v: any) => {
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
border-radius: 13rpx 13rpx 0rpx 0rpx;
padding: 25rpx 50rpx;
position: sticky;
position: fixed;
width: calc(100vw - 100rpx);
bottom: 0rpx;
z-index: 999;
::v-deep button {

View File

@ -1,18 +1,5 @@
<template>
<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> -->
&nbsp;
<view class="btn" @click="add"> 新增 </view>
</view>
<view class="collapse-box box">
<view v-for="(item, index) in pageList.list" :key="index">
<view class="item">
@ -60,6 +47,9 @@
</view>
</view>
</view>
<view class="btn-box-fix-btn">
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
</view>
<SmallModal
:title="'确认删除吗?'"
:content="'确认删除后,不能恢复!'"
@ -102,7 +92,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const add = () => {
uni.navigateTo({

View File

@ -11,7 +11,6 @@
@search="handleSearch()"
@clear="handleSearch()"
></u-search>
<view class="btn" @click="add"> 新增 </view>
</view>
<page-view
@loadList="
@ -48,6 +47,10 @@
</page-view>
</view>
<view class="btn-box-fix-btn">
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
</view>
<SmallModal
:title="'确认删除吗?'"
:content="'确认删除后,不能恢复!'"

View File

@ -14,7 +14,6 @@
@search="handleSearch()"
@clear="handleSearch()"
></u-search>
<view class="btn" @click="addSupplier"> 新增 </view>
</view>
<page-view
@ -52,6 +51,10 @@
@select="handleSelect"
></u-action-sheet>
<view class="btn-box-fix-btn">
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
</view>
<SmallModal
:title="'确认删除吗?'"
:content="'确认删除后,不能恢复!'"
@ -75,7 +78,7 @@ const handleModal = (v: boolean, id: number) => {
deleteId.value = id;
};
const handleOk = () => {
update({id: deleteId.value})
update({ id: deleteId.value });
};
const state = reactive<any>({
name: "",
@ -94,7 +97,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const handleSelect = (v: any) => {
state.supplierTypeId = v.id;
@ -119,9 +122,7 @@ const update = (item: any) => {
const edit = (item: any) => {
uni.navigateTo({
url:
"/pagesApp/components/addSupplier?title=编辑供应商&item=" +
item.id, //
url: "/pagesApp/components/addSupplier?title=编辑供应商&item=" + item.id, //
});
};
const getList = (v?: boolean) => {
@ -159,13 +160,13 @@ const getSupplierTypeList = () => {
}
});
};
const addSupplier = () => {
const add = () => {
uni.navigateTo({
url: "/pagesApp/components/addSupplier", //
});
};
onShow(() => {
resetPageList()
resetPageList();
getList();
getSupplierTypeList();
});

View File

@ -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>

View File

@ -11,7 +11,6 @@
@search="handleSearch()"
@clear="handleSearch()"
></u-search>
<view class="btn" @click="add"> 新增 </view>
</view>
<page-view
@loadList="
@ -38,6 +37,10 @@
</page-view>
</view>
<view class="btn-box-fix-btn">
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
</view>
<SmallModal
:title="'确认删除吗?'"
:content="'确认删除后,不能恢复!'"
@ -60,7 +63,7 @@ const handleModal = (v: boolean, id: number) => {
deleteId.value = id;
};
const handleOk = () => {
deleteType({id: deleteId.value})
deleteType({ id: deleteId.value });
};
const state = reactive<any>({
name: "",
@ -77,7 +80,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const add = () => {
uni.navigateTo({
@ -138,7 +141,7 @@ const getList = (v?: boolean) => {
};
onShow(() => {
resetPageList()
resetPageList();
getList();
});
</script>

View File

@ -11,7 +11,6 @@
@search="handleSearch()"
@clear="handleSearch()"
></u-search>
<view class="btn" @click="add"> 新增 </view>
</view>
<page-view
@ -29,8 +28,8 @@
<view v-for="(item, index) in pageList.list" :key="index">
<view>
<view>{{ item.name || item.userName }}</view>
<view>{{ item.phone || "-" }}</view>
<view>{{
<view>手机号{{ item.phone || "-" }}</view>
<view>关联角色{{
item.roleVos.length > 0 ? item.roleVos[0].roleName : "-"
}}</view>
</view>
@ -43,6 +42,10 @@
</page-view>
</view>
<view class="btn-box-fix-btn">
<u-button type="primary" text="新增" @click="add" shape="circle"></u-button>
</view>
<SmallModal
:title="'确认删除吗?'"
:content="'确认删除后,不能恢复!'"
@ -105,7 +108,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const handleSearch = () => {
resetPageList();

View File

@ -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>

247
src/pagesConfig/index.vue Normal file
View File

@ -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>

View File

@ -0,0 +1,251 @@
<template>
<block v-if="Object.keys(state.formData).length > 0">
<view class="title">终端机自动打单配置</view>
<view class="box">
<view
>自动打印设置&nbsp;&nbsp;<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
>自动结算配置&nbsp;&nbsp;<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>

View File

@ -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>

View File

@ -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>

View File

@ -25,7 +25,7 @@
<view class="summary">
<view class="panel" v-for="(item, index) in summaryList" :key="index">
<image
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/${item.imgUrl}`"
:src="`${url}/static/pages/${item.imgUrl}`"
/>
<view class="box">
<view class="num">{{ formatMoney(item.num, 2) }}</view>
@ -50,7 +50,7 @@
:offset="[10, 10]"
></up-badge>
<up-image
:src="`/static/img/home/${item.icon}`"
:src="`${url}/static/110/home/${item.icon}`"
width="184rpx"
height="162rpx"
></up-image>
@ -58,12 +58,13 @@
</up-grid-item>
</up-grid>
</view>
<view style="margin-top: 30rpx">
<view style="margin: 30rpx 0rpx">
<text class="title title-shipment">出货销售</text>
<up-grid :border="false">
<up-grid-item
v-for="(item, index) in stateNew.shipmentList"
:key="index"
@click="handleClick(item)"
>
<up-badge
max="99"
@ -72,7 +73,7 @@
:offset="[10, 10]"
></up-badge>
<up-image
:src="`/static/img/home/${item.icon}`"
:src="`${url}/static/110/home/${item.icon}`"
width="184rpx"
height="162rpx"
></up-image>
@ -97,7 +98,7 @@
</template>
<script setup lang="ts">
import { timeList, homeInitData } from "@/utils/data";
import { timeList, homeInitData, url } from "@/utils/data";
import { useMemberStore } from "@/store/index";
import {
MessageApi,
@ -109,7 +110,7 @@ import TabBar from "@/components/TabBar/index.vue";
import { formatMoney } from "@/utils";
import { onBackPress, onShow } from "@dcloudio/uni-app";
import pinia from "@/store";
import { timeRange } from "@/utils";
const store = useMemberStore(pinia);
const navbarRect = reactive({
height: 42,
@ -132,9 +133,16 @@ const stateNew = reactive({
filterTimeValue: "本月",
receiveList: homeInitData.receiveList,
shipmentList: homeInitData.shipmentList,
startTime: timeRange(3).startTime + " 00:00:00",
endTime: timeRange(3).endTime + " 23:59:59",
});
const handleFilter = (item: { id: number; name: string }) => {
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([
@ -162,15 +170,14 @@ const summaryList = reactive([
const state = reactive({
count: 0,
});
const init = () => {
//
MessageApi.getUserNoticeInfoNumVo().then((res: any) => {
if (res.code === 200) {
state.count = res.data.unreadNoticeNum;
}
});
// H
const getSummery = () => {
//
ReceiveApi.countOrderByMonth().then((res) => {
ReceiveApi.countOrderByMonth({
startTime: stateNew.startTime,
endTime: stateNew.endTime,
}).then((res) => {
if (res.code === 200) {
const {
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) {
const {
totalShipment,
@ -207,7 +217,16 @@ const init = () => {
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) => {
if (res.code === 200) {

View File

@ -466,7 +466,7 @@ const appList = reactive([
},
{
icon: "12.png",
title: "付明细",
title: "明细",
fn: () => {
uni.navigateTo({
url: "/pagesApp/paymentDetail", //
@ -475,7 +475,7 @@ const appList = reactive([
},
{
icon: "13.png",
title: "收明细",
title: "收明细",
fn: () => {
uni.navigateTo({
url: "/pagesApp/incomeDetail", //

View File

@ -1,30 +1,44 @@
<template>
<swiper
class="swiper"
circular
:indicator-dots="true"
:autoplay="false"
:interval="2000"
:duration="500"
indicator-active-color="#00DCEE"
>
<swiper-item v-for="(item, index) in list" :key="index">
<view class="image-box">
<image
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLaunch/${item.imgUrl}`"
></image>
<view class="title">
{{ item.title }}
<view style="position: relative">
<swiper
class="swiper"
:circular="false"
:indicator-dots="true"
:autoplay="false"
:interval="2000"
:duration="500"
indicator-active-color="#00DCEE"
@change="change"
:current="current"
>
<swiper-item v-for="(item, index) in list" :key="index">
<view class="image-box">
<image :src="`${url}/static/pagesLaunch/${item.imgUrl}`"></image>
<view class="title">
{{ item.title }}
</view>
<view v-if="index === 3" class="btn-start" @click="start()">
立即启用
</view>
</view>
<view v-if="index === 3" class="btn-start" @click="start()">
立即启用
</view>
</view>
</swiper-item>
</swiper>
</swiper-item>
</swiper>
<view class="left" v-if="current > 0" @click="sub">
<up-icon name="arrow-left" color="#00d2e3" :size="'12px'"></up-icon>
</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>
<script setup lang="ts">
import { useMemberStore } from "@/store/index";
import { url } from "@/utils/data";
const store = useMemberStore();
const profile = store.profile;
@ -46,6 +60,8 @@ const list = [
imgUrl: "4.png",
},
];
const current = ref(0);
const start = () => {
// 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>
<style lang="scss" scoped>
.swiper {
@ -90,4 +118,20 @@ const start = () => {
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>

View File

@ -2,7 +2,7 @@
<view class="c-login-container">
<!-- 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>
<!-- form表单 -->
<view class="login-form">
@ -12,6 +12,7 @@
</template>
<script setup lang="ts">
import {url} from "@/utils/data";
</script>
<style lang="scss" scoped>

View File

@ -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>

View File

@ -9,75 +9,41 @@
ref="loginForm"
:labelWidth="0"
>
<u-form-item prop="userInfo.userName">
<u-form-item prop="userInfo.phone">
<u-input
v-model="model1.userInfo.userName"
v-model="model1.userInfo.phone"
placeholder="请输入手机号"
:shape="'circle'"
clearable
:customStyle="{
'border-color':
currentFocus === 'userName' ? '#00dcee !important' : '',
currentFocus === 'phone' ? '#00dcee !important' : '',
}"
border="none"
type="number"
@focus="handleFocus('userName')"
@change="(e:any) => {handleInput(e, 'userName')}"
@clear="handleClear({ key: 'userName' })"
@focus="handleFocus('phone')"
@change="(e:any) => {handleInput(e, 'phone')}"
@clear="handleClear({ key: 'phone' })"
>
</u-input>
</u-form-item>
<u-form-item prop="userInfo.password">
<u-form-item prop="userInfo.code">
<u-input
v-model="model1.userInfo.password"
placeholder="请输入码"
v-model="model1.userInfo.code"
placeholder="请输入验证码"
:shape="'circle'"
type="text"
:password="!isShowPwd"
:customStyle="{
'border-color':
currentFocus === 'password' ? '#00dcee !important' : '',
}"
border="none"
@focus="handleFocus('password')"
clearable
@change="(e:any) => {handleInput(e, 'password')}"
@clear="handleClear({ key: 'password' })"
>
<template #suffix>
<image
v-if="!isShowPwd"
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/login/hide.png`"
class="custom-icon"
@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>
<text v-if="seconds === 0" class="code_text" @click="getCode"
>获取验证码</text
>
<text v-else class="code_text">{{ seconds }}s后重新发送</text>
</template>
</u-input>
</u-form-item>
</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">
<u-button
@click="submit"
@ -89,14 +55,19 @@
>
</view>
<view class="agree">
<u-checkbox-group v-model="checkGroup.agreeCheck">
<u-checkbox
:key="1"
:size="'25rpx'"
:activeColor="'#00dcee'"
:name="1"
></u-checkbox>
</u-checkbox-group>
<u-checkbox
:key="1"
:size="'25rpx'"
:activeColor="'#00dcee'"
:name="1"
:usedAlone="true"
:checked="checkGroup.agreeCheck"
@change="
(v:any) => {
checkGroup.agreeCheck = v;
}
"
></u-checkbox>
<view>
我已阅读并同意用户
<text class="agree-item" @click="openDoc('爱梵达用户服务协议')"
@ -111,15 +82,6 @@
</view>
</template>
</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>
<script setup lang="ts">
@ -129,6 +91,7 @@ import { useMemberStore } from "@/store/index";
import valid from "@/utils/validate";
import pinia from "@/store";
import { onShow } from "@dcloudio/uni-app";
import { url } from "@/utils/data";
const handleClear = (item: any) => {
setTimeout(() => {
@ -139,45 +102,71 @@ const store = useMemberStore(pinia);
const loginForm = ref(null);
const model1 = reactive({
userInfo: {
userName: "",
password: "",
phone: "",
code: "",
},
});
const seconds = ref(0);
// focus
const currentFocus = ref("");
//
const isShowPwd = ref(false);
// //
const checkGroup = reactive({
rememberCheck: [],
agreeCheck: [],
agreeCheck: true,
});
const rules = ref({
"userInfo.userName": {
"userInfo.phone": {
type: "string",
required: true,
message: "请输入手机号",
trigger: ["blur", "change"],
},
"userInfo.password": {
"userInfo.code": {
type: "string",
required: true,
message: "请输入码",
message: "请输入验证码",
trigger: ["blur", "change"],
},
});
const handleInput = (e: any, key: string) => {
if (key === "userName") {
const temp = e?.replace(valid.valid_number, "");
setTimeout(() => {
(model1.userInfo as any)[key] = temp;
}, 10);
const getCode = () => {
if (!valid.mobile.pattern.test(model1.userInfo.phone)) {
uni.showToast({ icon: "none", title: "请输入正确的手机号" });
return;
}
if (key === "password") {
const temp = e?.replace(valid.valid_no_cn, "");
ProfileApi.getCommonDbPhone({ phone: model1.userInfo.phone }).then(
(res: any) => {
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(() => {
(model1.userInfo as any)[key] = temp;
}, 10);
@ -188,39 +177,24 @@ const handleFocus = (attr: string) => {
currentFocus.value = attr;
};
const submit = () => {
if (model1.userInfo.userName) {
if (!valid.mobile.pattern.test(model1.userInfo.userName)) {
if (model1.userInfo.phone) {
if (!valid.mobile.pattern.test(model1.userInfo.phone)) {
uni.showToast({ icon: "none", title: "请输入正确的手机号" });
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) => {
if (res) {
if (checkGroup.agreeCheck.length === 0) {
if (!checkGroup.agreeCheck) {
uni.showToast({
title: "请同意协议",
icon: "none",
});
return;
}
ProfileApi.loginByAccount(model1.userInfo).then((res: any) => {
ProfileApi.loginPhone(model1.userInfo).then((res: any) => {
if (res.code === 200) {
if(checkGroup.rememberCheck.length === 1) {
uni.setStorageSync('catchLoginInfo', model1.userInfo);
} else {
uni.setStorageSync('catchLoginInfo', {});
}
store.setProfile(res.data);
uni.reLaunch({
url: "/pagesHome/index", //
@ -230,17 +204,12 @@ const submit = () => {
}
});
};
const handleForgetPwd = () => {
uni.navigateTo({
url: "/pagesLogin/login/forgetPwd", //
});
};
const openDoc = (item: string) => {
//
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) {
setTimeout(
() =>
@ -265,45 +234,7 @@ const openDoc = (item: string) => {
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>
<style lang="scss" scoped>
@ -315,16 +246,6 @@ onShow(() => {
width: 37.18rpx;
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 {
margin-top: 23.72rpx;
}
@ -343,4 +264,7 @@ onShow(() => {
color: $u-primary;
}
}
.code_text {
color: $u-primary;
}
</style>

View File

@ -69,7 +69,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const getList = (v?: boolean) => {

View File

@ -2,6 +2,7 @@
<view class="baseinfo">
<view class="box">
<view> 姓名 {{ profile.userName }} </view>
<view> 性别 {{ profile.gender ? (profile.gender === 1 ? '男' : '女') :'未知' }} </view>
<view> 手机号码 {{ profile.phone }} </view>
</view>
</view>

View File

@ -5,26 +5,26 @@
<view>
<image
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 class="baseinfo">
<view class="head">
<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"
></image>
<view>
<view>
<text class="name">{{ profile.userName || "-" }}</text>
<text class="name">{{ profile.name || "-" }}</text>
</view>
<view>
<text class="company">{{ profile.factory_name || "-" }}</text>
<text class="company">{{ profile.phone || "-" }}</text>
</view>
</view>
</view>
<view class="content">
<u-list :height="'130px'">
<u-list :height="'200px'">
<u-list-item v-for="(item, index) in list" :key="index">
<u-cell
:title="item.name"
@ -37,7 +37,8 @@
<template #icon>
<view style="width: 40rpx">
<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>
</template>
@ -67,8 +68,8 @@ import { useMemberStore } from "@/store/index";
import TabBar from "@/components/TabBar/index.vue";
import SmallModal from "@/components/Modal/smallModal.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);
@ -88,18 +89,21 @@ const store = useMemberStore(pinia);
const profile = store.profile.userInfo;
const list = reactive([
{
name: "基本信息",
icon: "baseinfo.png",
name: "个人信息",
icon: "1.png",
path: "/pagesLogin/profile/baseinfo",
},
{
name: "修改密码",
icon: "modifyPwd.png",
path: "/pagesLogin/profile/modifyPwd",
name: "用户协议",
icon: "4.png",
},
{
name: "隐私政策",
icon: "5.png",
},
{
name: "退出登录",
icon: "logout.png",
icon: "3.png",
path: "",
},
]);
@ -107,8 +111,42 @@ const list = reactive([
const hanldeClick = (item: any) => {
if (item.name === "退出登录") {
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>
<style lang="scss">
.profile {
@ -149,16 +187,7 @@ const hanldeClick = (item: any) => {
padding: 28.21rpx 21.15rpx;
margin-top: 24.36rpx;
image:nth-child(1) {
width: 28.85rpx;
height: 24.36rpx;
}
image:nth-child(2) {
width: 25rpx;
height: 32.69rpx;
}
image:nth-child(3) {
width: 30.13rpx;
height: 30.13rpx;
width: 100%;
}
}
}

View File

@ -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>

View File

@ -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>

View File

@ -824,7 +824,8 @@ onUnmounted(() => {
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
border-radius: 13rpx 13rpx 0rpx 0rpx;
padding: 25rpx 50rpx;
position: sticky;
position: fixed;
width: calc(100vw - 100rpx);
bottom: 0rpx;
z-index: 999;
::v-deep button {

View File

@ -23,7 +23,6 @@
</view>
<view class="card-box">
<page-view
@loadList="
(v) => {
@ -32,13 +31,12 @@
"
:noMoreData="pageList.noMoreData"
:list="pageList.list"
:height="ScaleStatus.Paid === currentTab ? 160 : 240"
:height="40"
:isLoading="pageList.isLoading"
>
<block v-for="(item, index) in pageList.list" :key="index">
<view class="c-layout">
<Detail :currentOrder="item" @refresh="handleSearch"/>
</view>
<u-gap
height="10"
@ -63,6 +61,7 @@ import { onLoad } from "@dcloudio/uni-app";
import PageView from "@/components/PageView/index.vue";
import { ScaleStatus } from "@/utils/enum";
import TimeDialog from "@/components/Dialog/TimeDialog.vue";
import Detail from "./components/detail.vue";
//
const filterState = reactive({
showTime: false,
@ -95,9 +94,8 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const currentTab = ref(2);
const handleSearch = () => {
resetPageList();
@ -117,10 +115,10 @@ const getList = (v?: boolean) => {
ReceiveApi.getOrderPage({
pageSize: pageList.pageSize,
pageNumber: pageList.pageNum,
scaleStatus: currentTab.value,
scaleStatus: ScaleStatus.Paid,
userName: keyword.value,
startTime: filterState.startTime ? `${filterState.startTime} 00:00:00` : '',
endTime: filterState.startTime ? `${filterState.endTime} 00:00:00` : '',
startTime: filterState.startTime ? `${filterState.startTime} 00:00:00` : "",
endTime: filterState.startTime ? `${filterState.endTime} 00:00:00` : "",
}).then((res: any) => {
if (res.code === 200) {
pageList.isLoading = false;
@ -136,9 +134,7 @@ const getList = (v?: boolean) => {
onMounted(() => {
getList();
});
onLoad((option) => {
currentTab.value = parseInt((option as any).scaleStatus);
});
onLoad((option) => {});
</script>
<style lang="scss" scoped>
.search-box {
@ -196,8 +192,6 @@ onLoad((option) => {
}
}
.c-layout {
}
}
</style>

View File

@ -56,7 +56,7 @@
value="cb"
:color="'#00D2E3'"
:checked="item.isChecked"
style="transform: scale(0.5)"
style="transform: scale(0.7)"
@click="item.isChecked = !item.isChecked"
/></view>
<view class="inner-box">
@ -66,7 +66,7 @@
<text class="number">收货单号{{ item.receiptNumber }}</text>
</view>
<view v-if="item.userName">
<text class="name">{{ item.userName }} &nbsp; <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>
@ -236,7 +236,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const currentTab = ref(2);
const handleTab = (item: any) => {
@ -427,7 +427,7 @@ onLoad((option) => {
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 13rpx;
margin: 0rpx 25rpx;
margin-top: 35rpx;
margin-top: 22rpx;
font-family: Source Han Sans CN;
font-weight: 400;
font-size: 26rpx;

View File

@ -39,7 +39,7 @@
<text class="number">收货单号{{ item.receiptNumber }}</text>
</view>
<view>
<text class="name">{{ item.userName }} &nbsp; {{item.cardNumber}}</text>
<text class="name">{{ item.userName }} / {{item.cardNumber}}</text>
</view>
</view>
<view>
@ -154,7 +154,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const state = reactive({
scaleStatus: 0,

View File

@ -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>

View File

@ -40,10 +40,16 @@
>
<template #suffix>
<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 v-else>
{{ item.unit }}
{{ isKg() ? item.unit : item.unit1 || item.unit }}
</text>
</template>
</u-input>
@ -184,8 +190,16 @@ const model1 = reactive<{
subtractNum: 0,
grossWeight: 0, //
tare: 0, //
unit: 1,
},
});
const isKg = () => {
if (model1.order.unit === 1) {
return false;
} else {
return true;
}
};
const rules = reactive({
"order.settlementGross": {
type: "number",
@ -256,12 +270,28 @@ const contrlModalParams = reactive<ComType>({
});
const formAttrList = reactive<ComType>([
{
name: "称重单位",
key: "unit",
type: "radio",
child: [
{
id: 0,
name: "kg",
},
{
id: 1,
name: "吨",
},
],
},
{
name: "毛重",
key: "settlementGross",
type: "input",
required: true,
unit: "kg",
unit1: "吨",
fn: () => {},
isNumber: true,
},
@ -271,6 +301,7 @@ const formAttrList = reactive<ComType>([
type: "input",
required: true,
unit: "kg",
unit1: "吨",
fn: () => {},
isNumber: true,
},
@ -281,6 +312,7 @@ const formAttrList = reactive<ComType>([
required: true,
disabled: true,
unit: "kg",
unit1: "吨",
fn: () => {},
isNumber: true,
},
@ -290,6 +322,7 @@ const formAttrList = reactive<ComType>([
type: "input",
required: true,
unit: "元/kg",
unit1: "元/吨",
fn: () => {},
isNumber: true,
},
@ -319,7 +352,8 @@ const formAttrList = reactive<ComType>([
name: "杂质扣除",
key: "subtractNum",
type: "input",
unit: "KG",
unit: "kg",
unit1: "吨",
isNumber: true,
},
{
@ -328,7 +362,8 @@ const formAttrList = reactive<ComType>([
type: "input",
required: true,
disabled: true,
unit: "KG",
unit: "kg",
unit1: "吨",
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(
[
@ -683,6 +705,7 @@ onLoad((option) => {
fileLists: model1.order.fileLists.map((item: any) => {
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);
border-radius: 13rpx 13rpx 0rpx 0rpx;
padding: 25rpx 50rpx;
position: sticky;
position: fixed;
width: calc(100vw - 100rpx);
bottom: 0rpx;
z-index: 999;
::v-deep button {
border-radius: 43rpx;
}
}
:v-deep.u-radio-group {
justify-content: space-around;
}
</style>

View File

@ -41,15 +41,6 @@
{{ item.unit }}
</template>
</u-input>
<!-- @afterRead="afterRead"
@delete="deletePic" -->
<!-- <u-upload
v-if="item.type === 'upload'"
:fileList="[]"
name="1"
multiple
:maxCount="10"
></u-upload> -->
<uni-file-picker
v-if="item.type === 'upload'"
@ -76,6 +67,9 @@
<u-icon name="arrow-right"></u-icon>
</template>
</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>
<block v-for="(item, index) in formAttrList" :key="index">
<u-action-sheet
@ -109,8 +103,9 @@ import type { ComType } from "@/types/global";
import { ImagesType, OrderType, ScaleStatus } from "@/utils/enum";
import { onLoad } from "@dcloudio/uni-app";
import _ from "underscore";
import ProductDialog from "../components/ProductDialog.vue";
import ProductDialog from "@/components/Dialog/ProductDialog.vue";
import valid from "@/utils/validate";
import Photo from "@/components/Photo/index.vue";
const handleClear = (item:any) => {
(model1.order as any)[item.key] = '';
}
@ -517,7 +512,8 @@ onLoad((option) => {
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 56, 93, 0.12);
border-radius: 13rpx 13rpx 0rpx 0rpx;
padding: 25rpx 50rpx;
position: sticky;
position: fixed;
width: calc(100vw - 100rpx);
bottom: 0rpx;
z-index: 999;
::v-deep button {

View File

@ -65,7 +65,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const isShowCancelModal = ref(false);
const deleteId = ref(0);

View File

@ -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>

View File

@ -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>

View File

@ -58,14 +58,6 @@
<text>过磅时间{{ state.order.tareTime }}</text>
</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
v-if="
@ -83,6 +75,18 @@
state.scaleStatusBtnType === ScaleStatusBtnType.ShipmentNoPay
"
></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">
<text v-if="item.name">{{ item.name }}</text
><text
@ -93,24 +97,13 @@
</view>
</view>
<!-- <u-gap height="10" bgColor="#F8F8F8"></u-gap> -->
<view class="mt-30">
<u-line></u-line>
</view>
<view
class="more"
class="mt-30"
v-if="
state.scaleStatusBtnType === ScaleStatusBtnType.ShipmentSettlement
state.scaleStatusBtnType !== ScaleStatusBtnType.ShipmentSettlement
"
>
<view v-for="(item, index) in gridList2" :key="index">
<text v-if="item.name">{{ item.name }}</text
><text
>{{ item.isBefore ? item.unit : "" }}
{{ item.num }}
{{ item.isBefore ? "" : item.unit }}
</text>
</view>
<u-line></u-line>
</view>
<view
@ -146,8 +139,8 @@
state.scaleStatusBtnType === ScaleStatusBtnType.ShipmentSettlement
"
>
<view @click="handleReviewNoPay"> 出货未结算 </view>
<view class="active" @click="handleReviewPay"> 出货并结算 </view>
<view @click="handleReviewNoPay"> 暂不收款 </view>
<view class="active" @click="handleReviewPay"> 立即收款 </view>
</view>
<view
v-if="
@ -170,7 +163,7 @@
<u-button
v-if="state.scaleStatusBtnType === ScaleStatusBtnType.ShipmentNoPay"
@click="handleSettlement"
text="立即结算"
text="立即收款"
type="primary"
:customStyle="{ 'border-radius': '43rpx' }"
></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<{
order: Shipment;
@ -278,9 +249,6 @@ const state = reactive<{
{
key: "paySelect",
},
{
key: "printSelect",
},
],
scaleStatusBtnType: 0,
});
@ -307,78 +275,6 @@ const gridList1 = reactive([
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([
{
@ -401,7 +297,7 @@ const gridList3 = reactive([
},
{},
{
name: "结算",
name: "结算重",
enName: "settlementWeight",
num: 0,
unit: "KG",
@ -443,7 +339,7 @@ const gridList3 = reactive([
isBefore: false,
},
{
name: "实际收",
name: "实际收",
enName: "realIncome",
num: "",
unit: "元",
@ -465,7 +361,7 @@ const gridList3 = reactive([
isBefore: false,
},
]);
// // 4
// // 4
const handleSettlement = () => {
uni.navigateTo({
url:
@ -479,7 +375,7 @@ const handleScenePhoto = (id: string) => {
url: "/pagesScenePhoto/index?orderType=2&imagesType=1&id=" + id, //
});
};
// // 3
// // 3
const handleReviewNoPay = () => {
uni.navigateTo({
url:
@ -487,13 +383,6 @@ const handleReviewNoPay = () => {
state.order.id +
`&scaleStatusBtnType=${ScaleStatusBtnType.ShipmentNoPay}`, //
});
// ShipmentApi.updateOrderIn({ ...state.order, scaleStatus: 3 }).then((res) => {
// if (res.code === 200) {
// uni.navigateTo({
// url: "/pagesShipment/shipmentSettlement?scaleStatus=3", //
// });
// }
// });
};
//
const handleReviewPay = () => {
@ -507,26 +396,6 @@ const handleReviewPay = () => {
const handleSelect = (key: string, v: any) => {
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 deleteId = ref("0");
@ -540,8 +409,7 @@ const handleOk = () => {
if (res.code === 200) {
uni.navigateTo({
url:
"/pagesShipment/shipmentSettlement?scaleStatus=" +
state.scaleStatus, //
"/pagesShipment/shipmentSettlement?scaleStatus=" + state.scaleStatus, //
});
}
});
@ -574,9 +442,6 @@ const init = () => {
gridList1.map((item) => {
item.num = state.order[item.enName as string];
});
gridList2.map((item) => {
item.num = state.order[item.enName as string];
});
gridList3.map((item) => {
if (item.name === "净重误差") {
item.num =
@ -605,7 +470,7 @@ const handlePrint = () => {
onShow(() => {
init();
});
onLoad((option:any) => {
onLoad((option: any) => {
state.order.id = (option as any).id;
state.scaleStatusBtnType = parseInt((option as any).scaleStatusBtnType);
state.scaleStatus = parseInt(option.scaleStatus);

View File

@ -1,33 +1,28 @@
<template>
<view class="search">
<view v-if="!isShowSearch" @click="isShowSearch = true">
<u-icon color="#C1C1C1" name="search"></u-icon><text></text>
<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>
<u-search
v-else
placeholder="请输入客户名称"
v-model="keyword"
:focus="true"
bgColor="#fff"
clearable
:showAction="false"
placeholderColor="#C1C1C1"
@search="handleSearch()"
@clear="handleSearch()"
></u-search>
<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">
<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
@loadList="
@ -37,24 +32,17 @@
"
:noMoreData="pageList.noMoreData"
:list="pageList.list"
:height="
ScaleStatus.ShipmentPaid === currentTab ||
ScaleStatus.ToBeShipmentReview === currentTab
? 160
: 240
"
:height="80"
: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
"
v-if="ScaleStatus.ToBeShipmentPay === currentTab"
:color="'#00D2E3'"
:checked="item.isChecked"
style="transform: scale(0.5)"
style="transform: scale(0.7)"
@click="item.isChecked = !item.isChecked"
/></view>
<view class="inner-box">
@ -64,7 +52,12 @@
<text class="number">出货单号{{ item.orderNumber }}</text>
</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>
@ -81,7 +74,7 @@
<text
v-if="currentTab === 2"
@click="handleReview(item.id, 2)"
>出货结算</text
>结算</text
>
<text
v-if="currentTab === 3"
@ -130,6 +123,14 @@
: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";
@ -138,6 +139,22 @@ 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: {
@ -184,34 +201,14 @@ const pageList: PageResult<Shipment> = reactive({
pageSize: 10,
});
const keyword = ref("");
const isShowSearch = ref(false);
const state = reactive<{
[attrName: string]: any;
}>({
checkMap: {},
isAll: false,
});
const tabList = reactive([
{
name: "待出货结算",
key: 2,
},
{
name: "已出未结算",
key: 3,
},
{
name: "已出已结算",
key: 4,
},
]);
const currentTab = ref(2);
const handleTab = (item: any) => {
state.isAll = false;
currentTab.value = item.key;
resetPageList();
getList();
};
const handleReview = (id: string, scaleStatus: number) => {
let type = ScaleStatusBtnType.ShipmentSettlement;
if (scaleStatus === 2) {
@ -230,8 +227,7 @@ const handleReview = (id: string, scaleStatus: number) => {
};
const handleReviewOrPay = () => {
const list = pageList.list
.filter((item) => item.isChecked)
const list = pageList.list.filter((item) => item.isChecked);
if (list.length === 0) {
uni.showToast({ icon: "none", title: "请至少选择一个出货单" });
return;
@ -275,7 +271,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const handleSearch = () => {
resetPageList();
@ -294,8 +290,10 @@ const getList = (v?: boolean) => {
ShipmentApi.getOrderPage({
pageSize: pageList.pageSize,
pageNumber: pageList.pageNum,
scaleStatus: currentTab.value,
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;
@ -316,18 +314,25 @@ onShow(() => {
getList();
});
onLoad((option) => {
currentTab.value = parseInt((option as any).scaleStatus);
console.log(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: 80%;
width: 100%;
margin: 0px auto;
margin-top: 30rpx;
font-weight: 400;
font-size: 26rpx;
color: #c1c1c1;
@ -341,6 +346,12 @@ onLoad((option) => {
margin-left: 15rpx;
}
}
.fullTime {
font-size: 26rpx;
padding: 22rpx 22rpx 0rpx 22rpx;
color: #606266;
}
.card-box {
.c-tab {
font-family: Source Han Sans CN;
@ -388,7 +399,7 @@ onLoad((option) => {
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 13rpx;
margin: 0rpx 25rpx;
margin-top: 35rpx;
margin-top: 22rpx;
font-family: Source Han Sans CN;
font-weight: 400;
font-size: 26rpx;

View File

@ -1,4 +1,23 @@
<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
:noMoreData="pageList.noMoreData"
:list="pageList.list"
@ -20,7 +39,7 @@
<text class="number">出货单号{{ item.orderNumber }}</text>
</view>
<view>
<text class="name">{{ item.userName }}</text>
<text class="name">{{ item.userName }} / {{item.cardNumber}}</text>
</view>
</view>
<view>
@ -43,14 +62,14 @@
</view>
<view class="btn-box">
<u-button
text="点击作废"
text="作废"
color="#E8E8E8"
:customStyle="{ color: '#999' }"
@click="handleModal(true, item.id as any)"
></u-button>
<u-button
type="primary"
text="点击编辑"
text="编辑"
@click="pricingDetail(item.id as any)"
></u-button>
</view>
@ -66,13 +85,56 @@
@handleModal="(v:boolean) => {handleModal(v, deleteId)}"
@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>
<script setup lang="ts">
import { ShipmentApi } from "@/services/index";
import { DeviceApi, ShipmentApi } from "@/services/index";
import SmallModal from "@/components/Modal/smallModal.vue";
import PageView from "@/components/PageView/index.vue";
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({
isLoading: false,
@ -87,7 +149,7 @@ const resetPageList = () => {
pageList.total = 0;
pageList.list = [];
pageList.pageNum = 1;
pageList.pageSize = 10;
pageList.pageSize = 100;
};
const isShowCancelModal = ref(false);
@ -133,6 +195,7 @@ const getList = (v?: boolean) => {
pageSize: pageList.pageSize,
pageNumber: pageList.pageNum,
scaleStatus: state.scaleStatus,
userName: stateNew.keywoard,
}).then((res) => {
if (res.code === 200) {
pageList.isLoading = false;
@ -175,6 +238,22 @@ onLoad((option) => {
});
</script>
<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 {
padding: 38rpx 50rpx;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);

View File

@ -9,7 +9,7 @@ export const getPaymentCount = (data: any) => {
})
}
// 经营概况-收明细
// 经营概况-收明细
export const getRevenueCount = (data: any) => {
return http({
method: 'GET',
@ -62,7 +62,7 @@ export const getRevenueDetailsPage = (data: any) => {
data,
})
}
// 收明细查看详情
// 收明细查看详情
export const getRevenueDetailsById = (data: any) => {
return http({
method: 'GET',
@ -70,7 +70,7 @@ export const getRevenueDetailsById = (data: any) => {
data,
})
}
// 收明细新增
// 收明细新增
export const addIncome = (data: any) => {
return http({
method: 'POST',
@ -78,7 +78,7 @@ export const addIncome = (data: any) => {
data,
})
}
// 收明细逻辑删除
// 收明细逻辑删除
export const deleteRevenueDes = (data: any) => {
return http({
method: 'POST',

View File

@ -10,4 +10,5 @@ export * as SupplierApi from './supplier'
export * as CustomerApi from './customer'
export * as FinanceApi from './finance'
export * as MessageApi from './message'
export * as OtherConfigApi from './otherConfig'

View File

@ -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,
});
};

View File

@ -4,7 +4,15 @@
// const store = useMemberStore(pinia);
import type { User } from "@/types/user";
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: {
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,
});
};

View File

@ -65,10 +65,11 @@ export const deleteOrder = (data: any) => {
// 统计首页的本月总收获以及总支出
// 收货类型
export const countOrderByMonth = () => {
export const countOrderByMonth = (data:any) => {
return http<ReceiveSummary>({
method: "GET",
url: "/api/orderIn/countOrderByMonth"
url: "/api/orderIn/countOrderByMonth",
data
});
};

View File

@ -49,10 +49,11 @@ export const getOrderPage = (data: PageParams) => {
});
};
// 统计首页的本月收入以及待出库
export const countOrderByMonth = () => {
export const countOrderByMonth = (data:any) => {
return http<ShipmentSummary>({
method: "GET",
url: "/api/orderOut/countOrderByMonth"
url: "/api/orderOut/countOrderByMonth",
data
});
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Some files were not shown because too many files have changed in this diff Show More