|
@@ -950,7 +950,7 @@ const activeName = ref("1");
|
|
|
const formData = reactive({
|
|
|
data: {
|
|
|
currency: "",
|
|
|
- amount: undefined,
|
|
|
+ amount: null,
|
|
|
contractProductList: [],
|
|
|
contractProjectList: [],
|
|
|
fileList: [],
|
|
@@ -1375,6 +1375,8 @@ const getDecisionAids = () => {
|
|
|
|
|
|
const changeCustomer = (val) => {
|
|
|
formData.data.contractProductList = [];
|
|
|
+ formData.data.contractWaitShipmentList = [];
|
|
|
+ formData.data.contractShipmentList = [];
|
|
|
formData.data.customerName = "";
|
|
|
formData.data.customerTel = "";
|
|
|
if (val) {
|
|
@@ -1495,8 +1497,8 @@ const selectProduct = (goods) => {
|
|
|
productName: goods.nameEnglish,
|
|
|
productModel:
|
|
|
goods.productLong + "*" + goods.productWide + "*" + goods.productHigh,
|
|
|
- quantity: undefined,
|
|
|
- price: undefined,
|
|
|
+ quantity: null,
|
|
|
+ price: null,
|
|
|
amount: "",
|
|
|
tradeMethods: "",
|
|
|
packMethod: packMethod,
|
|
@@ -1514,8 +1516,8 @@ const selectProduct = (goods) => {
|
|
|
goods.productWide +
|
|
|
"*" +
|
|
|
goods.productHigh,
|
|
|
- quantity: undefined,
|
|
|
- price: undefined,
|
|
|
+ quantity: null,
|
|
|
+ price: null,
|
|
|
amount: "",
|
|
|
tradeMethods: "",
|
|
|
packMethod: packMethod,
|
|
@@ -1527,7 +1529,7 @@ const selectProduct = (goods) => {
|
|
|
productCode: goods.code,
|
|
|
productId: goods.id,
|
|
|
productName: goods.nameEnglish,
|
|
|
- quantity: undefined,
|
|
|
+ quantity: null,
|
|
|
waitQuantity: "",
|
|
|
});
|
|
|
// formData.data.contractShipmentList.push({
|
|
@@ -1535,7 +1537,7 @@ const selectProduct = (goods) => {
|
|
|
// productId: goods.id,
|
|
|
// productName: goods.nameEnglish,
|
|
|
// shipmentTime: "",
|
|
|
- // quantity: undefined,
|
|
|
+ // quantity: null,
|
|
|
// });
|
|
|
ElMessage({
|
|
|
message: "添加成功!",
|
|
@@ -1565,15 +1567,10 @@ const calculationAmount = (att = "") => {
|
|
|
) {
|
|
|
for (let i = 0; i < formData.data.contractProductList.length; i++) {
|
|
|
let money = 0;
|
|
|
- if (
|
|
|
- formData.data.contractProductList[i].quantity &&
|
|
|
- formData.data.contractProductList[i].price
|
|
|
- ) {
|
|
|
- money = parseFloat(
|
|
|
- Number(formData.data.contractProductList[i].quantity) *
|
|
|
- Number(formData.data.contractProductList[i].price)
|
|
|
- ).toFixed(2);
|
|
|
- }
|
|
|
+ money = parseFloat(
|
|
|
+ Number(formData.data.contractProductList[i].quantity) *
|
|
|
+ Number(formData.data.contractProductList[i].price)
|
|
|
+ ).toFixed(2);
|
|
|
formData.data.contractProductList[i].amount = money;
|
|
|
}
|
|
|
// 重新计算待出货数量
|
|
@@ -1621,12 +1618,12 @@ const clickAdd = () => {
|
|
|
) {
|
|
|
formData.data.contractProjectList.push({
|
|
|
payName: "",
|
|
|
- amount: undefined,
|
|
|
+ amount: null,
|
|
|
remark: "",
|
|
|
});
|
|
|
} else {
|
|
|
formData.data.contractProjectList = [
|
|
|
- { payName: "", amount: undefined, remark: "" },
|
|
|
+ { payName: "", amount: null, remark: "" },
|
|
|
];
|
|
|
}
|
|
|
};
|
|
@@ -1797,7 +1794,7 @@ const clickSplit = (item) => {
|
|
|
productId: item.productId,
|
|
|
productName: item.productName,
|
|
|
shipmentTime: "",
|
|
|
- quantity: undefined,
|
|
|
+ quantity: null,
|
|
|
});
|
|
|
};
|
|
|
const clickDelete = (index) => {
|
|
@@ -1958,7 +1955,7 @@ onMounted(() => {
|
|
|
productCode: e.productCode,
|
|
|
productId: e.productId,
|
|
|
productName: e.productName,
|
|
|
- quantity: undefined,
|
|
|
+ quantity: null,
|
|
|
waitQuantity: e.quantity,
|
|
|
});
|
|
|
}
|