Sfoglia il codice sorgente

修改供应商默认携带id问题

hurx 4 giorni fa
parent
commit
45a2ae5640
1 ha cambiato i file con 9 aggiunte e 9 eliminazioni
  1. 9 9
      src/views/customer/info/detail.vue

+ 9 - 9
src/views/customer/info/detail.vue

@@ -1552,7 +1552,7 @@ const handleContactReset = () => {
 
 /** 新增联系人 */
 const handleAddContact = () => {
-  if (!detailData.value.id) {
+  if (!route.query.id) {
     ElMessage.warning('请先保存供应商基本信息后再新增联系人信息');
     return;
   }
@@ -2567,7 +2567,7 @@ const handleEditPayment = async (row: any) => {
 /** 新增付款信息 */
 const handleAddPayment = () => {
   // 检查是否已保存供应商基本信息
-  if (!detailData.value.id) {
+  if (!route.query.id) {
     ElMessage.warning('请先保存供应商基本信息后再新增财务信息');
     return;
   }
@@ -2576,7 +2576,7 @@ const handleAddPayment = () => {
   paymentForm.value = {
     num: undefined,
     supplierNo: detailData.value.supplierNo,
-    supplierId: detailData.value.id,
+    supplierId: route.query.id as any,
     bankNum: '',
     bankInfoNo: undefined,
     bankName: '',
@@ -2629,8 +2629,8 @@ const handlePaymentSubmit = async () => {
       if (!paymentForm.value.supplierNo && detailData.value.supplierNo) {
         paymentForm.value.supplierNo = detailData.value.supplierNo;
       }
-      if (!paymentForm.value.supplierId && detailData.value.id) {
-        paymentForm.value.supplierId = detailData.value.id;
+      if (!paymentForm.value.supplierId && route.query.id) {
+        paymentForm.value.supplierId = route.query.id as any;
       }
 
       if ((paymentForm.value as any).id) {
@@ -2679,14 +2679,14 @@ const getAddressList = async () => {
 
 /** 新增地址 */
 const handleAddAddress = () => {
-  if (!detailData.value.id) {
+  if (!route.query.id) {
     ElMessage.warning('请先保存供应商基本信息后再新增地址信息');
     return;
   }
   // 重置表单
   addressForm.value = {
     supplierNo: detailData.value.supplierNo,
-    supplierId: detailData.value.id,
+    supplierId: route.query.id as any,
     shipperName: '',
     shipperPhone: '',
     shippingPostCode: '',
@@ -2855,8 +2855,8 @@ const handleAddressSubmit = async () => {
       if (!addressForm.value.supplierNo && detailData.value.supplierNo) {
         addressForm.value.supplierNo = detailData.value.supplierNo;
       }
-      if (!addressForm.value.supplierId && detailData.value.id) {
-        addressForm.value.supplierId = detailData.value.id;
+      if (!addressForm.value.supplierId && route.query.id) {
+        addressForm.value.supplierId = route.query.id as any;
       }
 
       if ((addressForm.value as any).id) {