update: 细节优化

This commit is contained in:
admin 2024-05-21 16:13:03 +08:00
parent aea5e834d0
commit f433f725cd
2 changed files with 26 additions and 9 deletions

View File

@ -108,9 +108,9 @@ import {
} from "@/utils/enum"; } from "@/utils/enum";
import valid from "@/utils/validate"; import valid from "@/utils/validate";
import { onLoad } from "@dcloudio/uni-app"; import { onLoad } from "@dcloudio/uni-app";
const handleClear = (item:any) => { const handleClear = (item: any) => {
(model1.order as any)[item.key] = ''; (model1.order as any)[item.key] = "";
} };
const isShowFormItem = (item: any) => { const isShowFormItem = (item: any) => {
if (model1.scaleStatusBtnType === ScaleStatusBtnType.ShipmentPay) { if (model1.scaleStatusBtnType === ScaleStatusBtnType.ShipmentPay) {
return true; return true;
@ -175,6 +175,8 @@ const model1 = reactive<{
unitPrice: 0, unitPrice: 0,
estimatePrice: 0, estimatePrice: 0,
subtractNum: 0, subtractNum: 0,
grossWeight: 0, //
tare: 0, //
}, },
}); });
const rules = reactive({ const rules = reactive({
@ -559,14 +561,29 @@ const save = () => {
} }
} }
} }
check().then((res) => { check().then((res) => {
if (res) { if (res) {
if (!model1.order.paymentMethodName && model1.scaleStatusBtnType === ScaleStatusBtnType.ShipmentPay) { if (
!model1.order.paymentMethodName &&
model1.scaleStatusBtnType === ScaleStatusBtnType.ShipmentPay
) {
uni.showToast({ uni.showToast({
title: "请选择结算方式", title: "请选择结算方式",
icon: "none", icon: "none",
}); });
return return;
}
if (
parseFloat(model1.order.settlementTare.toString()) >
parseFloat(model1.order.settlementGross.toString())
) {
uni.showToast({
title: `毛重需大于皮重`,
icon: "none",
});
return;
} }
startSave(); startSave();
} }

View File

@ -113,9 +113,9 @@ interface Shipment {
carNumber?: string; //车牌号 carNumber?: string; //车牌号
scaleStatus?: number; //出库单状态 scaleStatus?: number; //出库单状态
orderNumber?: string; //订单编号 orderNumber?: string; //订单编号
grossWeight?: number; //毛重 grossWeight: number; //毛重
grossTime?: string; //过毛时间 grossTime?: string; //过毛时间
tare?: number; //皮重 tare: number; //皮重
tareTime?: string; //过皮时间 tareTime?: string; //过皮时间
netWeight?: number; //净重 netWeight?: number; //净重
number?: number; //数量 number?: number; //数量
@ -144,8 +144,8 @@ interface Shipment {
updateTime?: string; //undefined updateTime?: string; //undefined
isDeleted?: string; //删除标识true删除false未删除 isDeleted?: string; //删除标识true删除false未删除
settlementWeight?: number; // 结算重量 settlementWeight?: number; // 结算重量
settlementGross?: number; // 结算毛重 settlementGross: number; // 结算毛重
settlementTare?: number; // 结算皮重 settlementTare: number; // 结算皮重
settlementNet?: number; // 结算净重 settlementNet?: number; // 结算净重
signTime?: string; // 签收时间 signTime?: string; // 签收时间
paymentMethod?: string; //支付方式0:未支付,1:现金支付2银行卡支付3线上支付微信4支付宝 paymentMethod?: string; //支付方式0:未支付,1:现金支付2银行卡支付3线上支付微信4支付宝