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

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

View File

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