Ver Fonte

Merge branch 'stage' into dev0.3

lxf há 1 ano atrás
pai
commit
3874cd90a8

+ 3 - 3
src/components/PDF/purchasePDF.vue

@@ -215,9 +215,9 @@ const handlePrintPdf = (row) => {
           countTotal += Number(e.count);
           productMoney += Number(e.amount);
         }
-        res.countTotal = countTotal;
-        res.productMoney = productMoney;
-        res.otherMoney = res.amount - res.productMoney;
+        res.countTotal = countTotal.toFixed(2);
+        res.productMoney = productMoney.toFixed(2);
+        res.otherMoney = (res.amount - res.productMoney).toFixed(2);
         res.moneyChinese = NumberToChinese(res.amount);
         res.supplyAddress = {
           countryName: supplyData.countryName,

+ 13 - 8
src/components/process/SendPurchase.vue

@@ -686,12 +686,12 @@ const handleChangeSupplier = (val) => {
   }
 };
 
-const formatNumber = (value) => {
+const formatNumber = (value, num = 10000) => {
   if (value === null || value === undefined || value === "") {
     return "";
   }
   // 将输入值保留四位小数
-  const formattedValue = Math.round(Number(value) * 10000) / 10000;
+  const formattedValue = Math.round(Number(value) * num) / num;
   return formattedValue;
 };
 
@@ -700,31 +700,36 @@ const handleChangeAmount = () => {
   let productAmount = 0;
   for (let i = 0; i < formData.data.purchaseDetailList.length; i++) {
     const e = formData.data.purchaseDetailList[i];
-    e.amount = formatNumber(parseFloat(e.count * e.price));
+    e.amount = formatNumber(parseFloat(e.count * e.price), 100);
     productAmount += Number(e.amount);
   }
-  formData.data.productAmount = formatNumber(productAmount);
+  formData.data.productAmount = formatNumber(productAmount, 100);
   // 其他收费
   let otherAmount = 0;
   for (let i = 0; i < formData.data.otherFeeList.length; i++) {
     const e = formData.data.otherFeeList[i];
     otherAmount += Number(e.price);
   }
-  formData.data.otherAmount = formatNumber(otherAmount);
+  formData.data.otherAmount = formatNumber(otherAmount, 100);
   formData.data.amount = formatNumber(
     parseFloat(
       Number(formData.data.productAmount) + Number(formData.data.otherAmount)
-    )
+    ),
+    100
   );
 };
 
 const handleChangeMoney = (val, index, key) => {
-  formData.data.purchaseDetailList[index][key] = formatNumber(val);
+  let num = 100;
+  if (key === "count") {
+    num = 10000;
+  }
+  formData.data.purchaseDetailList[index][key] = formatNumber(val, num);
   handleChangeAmount();
 };
 
 const handleChangeOtherMoney = (val, index, key) => {
-  formData.data.otherFeeList[index][key] = formatNumber(val);
+  formData.data.otherFeeList[index][key] = formatNumber(val, 100);
   handleChangeAmount();
 };
 

+ 3 - 3
src/views/purchaseManage/supplier/supplier/index.vue

@@ -189,7 +189,7 @@ const fileList = ref([]);
 const uploadData = ref({});
 let rules = ref({
   name: [{ required: true, message: "请输入供应商名称", trigger: "blur" }],
-  type: [{ required: true, message: "请选择供应商类型", trigger: "change" }],
+  // type: [{ required: true, message: "请选择供应商类型", trigger: "change" }],
   countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
   // provinceId: [{ required: true, message: "请选择省/洲", trigger: "change" }],
   // cityId: [{ required: true, message: "请选择城市", trigger: "change" }],
@@ -369,9 +369,9 @@ const formConfig = computed(() => {
     {
       type: "slot",
       slotName: "contact",
-      prop: "contactPerson",
+      prop: "",
       label: "联系信息",
-      required: true,
+      // required: true,
     },
     {
       type: "slot",

+ 1 - 1
src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue

@@ -246,7 +246,7 @@ const getList = async (req) => {
     .then((res) => {
       sourceList.value.data = res.rows.map((x) => ({
         ...x,
-        quantity: x.quantity - x.receiptQuantity,
+        quantity: (x.quantity - x.receiptQuantity).toFixed(4),
       }));
       sourceList.value.pagination.total = res.total;
       setTimeout(() => {

+ 1 - 1
src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue

@@ -242,7 +242,7 @@ const getList = async (req) => {
     .then((res) => {
       sourceList.value.data = res.rows.map((x) => ({
         ...x,
-        quantity: x.quantity - x.receiptQuantity,
+        quantity: (x.quantity - x.receiptQuantity).toFixed(4),
       }));
       sourceList.value.pagination.total = res.total;
       setTimeout(() => {

Diff do ficheiro suprimidas por serem muito extensas
+ 110 - 582
src/views/salesMange/shipmentMange/document/index.vue


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff