update: 客户管理删除优化 经营概况显示优化

This commit is contained in:
admin 2024-06-14 11:04:19 +08:00
parent 7f89c108cf
commit 3e6923b94f
4 changed files with 26 additions and 14 deletions

View File

@ -22,7 +22,7 @@
<view v-for="(item, index) in gridList1" :key="index"> <view v-for="(item, index) in gridList1" :key="index">
<text v-if="item.name">{{ item.name }}</text <text v-if="item.name">{{ item.name }}</text
><text v-if="item.name" ><text v-if="item.name"
>{{ item.isBefore ? item.unit : "" }} {{ formatMoney(item.num) }} >{{ item.isBefore ? item.unit : "" }} {{ formatMoney(item.num, 2) }}
{{ item.isBefore ? "" : item.unit }} {{ item.isBefore ? "" : item.unit }}
</text> </text>
</view> </view>
@ -33,7 +33,7 @@
<text v-if="item.name">{{ item.name }}</text <text v-if="item.name">{{ item.name }}</text
> >
<text :class="{'highLight': item.isHighLight || false}" v-if="item.name" <text :class="{'highLight': item.isHighLight || false}" v-if="item.name"
>{{ item.isBefore ? item.unit : "" }} {{ formatMoney(item.num) }} >{{ item.isBefore ? item.unit : "" }} {{ formatMoney(item.num, item.decimal) }}
{{ item.isBefore ? "" : item.unit }} {{ item.isBefore ? "" : item.unit }}
</text> </text>
</view> </view>
@ -43,7 +43,7 @@
<view v-for="(item, index) in gridList3" :key="index"> <view v-for="(item, index) in gridList3" :key="index">
<text>{{ item.name }}</text <text>{{ item.name }}</text
><text :class="item.isHighLight ? 'highLight' : ''" ><text :class="item.isHighLight ? 'highLight' : ''"
>{{ item.isBefore ? item.unit : "" }} {{ formatMoney(item.num) }} >{{ item.isBefore ? item.unit : "" }} {{ formatMoney(item.num, item.decimal)}}
{{ item.isBefore ? "" : item.unit }} {{ item.isBefore ? "" : item.unit }}
</text> </text>
</view> </view>
@ -177,6 +177,7 @@ const gridList2 = reactive([
unit: "¥", unit: "¥",
isBefore: true, isBefore: true,
isHighLight: true, isHighLight: true,
decimal: 2,
}, },
{ {
name: "出货应收金额", name: "出货应收金额",
@ -185,12 +186,15 @@ const gridList2 = reactive([
unit: "¥", unit: "¥",
isBefore: true, isBefore: true,
isHighLight: true, isHighLight: true,
decimal: 2,
}, },
{ {
name: "出货笔数", name: "出货笔数",
enName: "orderOutNum", enName: "orderOutNum",
num: "2", num: "",
isHighLight: true, isHighLight: true,
decimal: 0,
}, },
{ {
name: "", name: "",
@ -202,6 +206,7 @@ const gridList2 = reactive([
num: "", num: "",
unit: "KG", unit: "KG",
isBefore: false, isBefore: false,
decimal: 2,
}, },
{ {
name: "出货净重(客户)", name: "出货净重(客户)",
@ -209,6 +214,7 @@ const gridList2 = reactive([
num: "", num: "",
unit: "KG", unit: "KG",
isBefore: false, isBefore: false,
decimal: 2,
}, },
{ {
name: "出货重量(已结)", name: "出货重量(已结)",
@ -216,6 +222,7 @@ const gridList2 = reactive([
num: "", num: "",
unit: "KG", unit: "KG",
isBefore: false, isBefore: false,
decimal: 2,
}, },
{ {
name: "结算总重量", name: "结算总重量",
@ -223,6 +230,7 @@ const gridList2 = reactive([
num: "", num: "",
unit: "KG", unit: "KG",
isBefore: false, isBefore: false,
decimal: 2,
}, },
{ {
name: "出货重量(未结)", name: "出货重量(未结)",
@ -230,6 +238,7 @@ const gridList2 = reactive([
num: "", num: "",
unit: "KG", unit: "KG",
isBefore: false, isBefore: false,
decimal: 2,
}, },
{ {
name: "结算重量(已结)", name: "结算重量(已结)",
@ -237,6 +246,7 @@ const gridList2 = reactive([
num: "", num: "",
unit: "KG", unit: "KG",
isBefore: false, isBefore: false,
decimal: 2,
}, },
{ {
name: "净重误差", name: "净重误差",
@ -244,6 +254,7 @@ const gridList2 = reactive([
num: "", num: "",
unit: "KG", unit: "KG",
isBefore: false, isBefore: false,
decimal: 2,
}, },
{ {
name: "结算总量(未结)", name: "结算总量(未结)",
@ -251,6 +262,7 @@ const gridList2 = reactive([
num: "", num: "",
unit: "KG", unit: "KG",
isBefore: false, isBefore: false,
decimal: 2,
}, },
]); ]);
const gridList3 = reactive([ const gridList3 = reactive([
@ -261,6 +273,7 @@ const gridList3 = reactive([
unit: "KG", unit: "KG",
isBefore: false, isBefore: false,
isHighLight: true, isHighLight: true,
decimal: 2,
}, },
{ {
name: "收货笔数", name: "收货笔数",
@ -269,6 +282,7 @@ const gridList3 = reactive([
unit: "", unit: "",
isBefore: false, isBefore: false,
isHighLight: true, isHighLight: true,
decimal: 0,
}, },
{ {
name: "收货重量(已付)", name: "收货重量(已付)",
@ -276,6 +290,7 @@ const gridList3 = reactive([
num: "", num: "",
unit: "KG", unit: "KG",
isBefore: false, isBefore: false,
decimal: 2,
}, },
{ {
name: "收货实付金额", name: "收货实付金额",
@ -283,6 +298,7 @@ const gridList3 = reactive([
num: "", num: "",
unit: "¥", unit: "¥",
isBefore: true, isBefore: true,
decimal: 2,
}, },
{ {
name: "收货重量(未付)", name: "收货重量(未付)",
@ -290,6 +306,7 @@ const gridList3 = reactive([
num: "", num: "",
unit: "KG", unit: "KG",
isBefore: false, isBefore: false,
decimal: 2,
}, },
{ {
name: "收货应付金额", name: "收货应付金额",
@ -297,6 +314,7 @@ const gridList3 = reactive([
num: "", num: "",
unit: "¥", unit: "¥",
isBefore: true, isBefore: true,
decimal: 2,
}, },
]); ]);

View File

@ -102,6 +102,7 @@ const handleSearch = () => {
const deleteCustomer = (item: any) => { const deleteCustomer = (item: any) => {
CustomerApi.updateCustomUser({ isDeleted: true, id: item.id }).then((res) => { CustomerApi.updateCustomUser({ isDeleted: true, id: item.id }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
resetPageList();
getList(); getList();
} }
}); });

View File

@ -119,6 +119,7 @@ const edit = (item: any) => {
const deleteType = (item: any) => { const deleteType = (item: any) => {
GoodsApi.deleteById({ id: item.id }).then((res) => { GoodsApi.deleteById({ id: item.id }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
resetPageList();
getList(); getList();
} }
}); });

View File

@ -157,10 +157,7 @@ export const http = <T>(options: UniApp.RequestOptions) => {
console.log(res1); console.log(res1);
if (res.statusCode >= 200 && res.statusCode < 300) { if (res.statusCode >= 200 && res.statusCode < 300) {
if ( if (
res1.code === 1001 || [1001,1002,1003,1004].indexOf(res1.code) > -1
res1.code === 1002 ||
res1.code === 1003 ||
res1.code === 1004
) { ) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
@ -171,17 +168,12 @@ export const http = <T>(options: UniApp.RequestOptions) => {
url: "/pagesLogin/login/index", url: "/pagesLogin/login/index",
}); });
return; return;
} else if ((res1 as any).code === 10001) { } else if ([500,5001,10001].indexOf(res1.code) > -1) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
title: (res1 as Data<T>).message || "请求失败", title: (res1 as Data<T>).message || "请求失败",
}); });
return; return;
} else if ((res1 as any).code === 5001) {
uni.showToast({
icon: "none",
title: (res1 as Data<T>).message || "请求失败",
});
} }
resolve(res1 as Data<T>); resolve(res1 as Data<T>);
} else { } else {