Преглед на файлове

change: 创建po模块. fix 传真字段. 退税版不再生成第二份pdf. pdf生成质量优化.

peter преди 1 година
родител
ревизия
8d8f83d287
променени са 1 файла, в които са добавени 6 реда и са изтрити 17 реда
  1. 6 17
      src/pages/purchase-order/edit.vue

+ 6 - 17
src/pages/purchase-order/edit.vue

@@ -136,7 +136,7 @@
                   v-show="computedCompany.fax"
                   class="company-fax"
                 >
-                   | 传真: {{ computedCompany.phone }}
+                   | 传真: {{ computedCompany.fax }}
                 </div>
               </div>
             </div>
@@ -524,7 +524,7 @@
                 v-show="computedCompany.fax"
                 class="company-fax"
               >
-                &nbsp;|&nbsp;传真:&nbsp;{{ computedCompany.phone }}
+                &nbsp;|&nbsp;传真:&nbsp;{{ computedCompany.fax }}
               </div>
             </div>
           </div>
@@ -1163,7 +1163,7 @@ const generatePDF = (ele = pdfElement, isFirstTime = true) => {
           )
         // document.body.appendChild(page)
         pdf.addImage(
-          page.toDataURL('image/jpeg', 0.2),
+          page.toDataURL('image/jpeg', 0.5),
           'JPEG',
           10,
           10,
@@ -1184,19 +1184,7 @@ const generatePDF = (ele = pdfElement, isFirstTime = true) => {
 
       sendPDF(pdf.output('datauristring'), fileName)
         .then(() => {
-          // 有两个退税版模版, 需要生成两个PDF.
-          if (computedCompany.value.taxReimbursement === true && isFirstTime) {
-            ElNotification({
-              duration: 0,
-              title: '正在生成附件2 PDF',
-              type: 'info',
-            })
-            generatePDF(pdfElement2, false).then(() => {
-              resolve(true)
-            })
-          } else {
-            resolve(true)
-          }
+          resolve(true)
         })
         .catch((e) => {
           reject(e)
@@ -1872,7 +1860,8 @@ const p2 = axios
     const res = response.data.result
     form.value.field7 = res.Owner_name || res.Owner.name || ''
     soOwner.value = res.Owner_name || res.Owner.name || ''
-    form.value.Title = res.Contract_Title || res.Sales_Order_Title_Job_Name || ''
+    form.value.Title =
+      res.Contract_Title || res.Sales_Order_Title_Job_Name || ''
     form.value.saleOrderId = res.sales_orders_id || res.id || ''
     form.value.PO_Date = dayjs(new Date()).format('YYYY-MM-DD')
     form.value.Reference = res.Reference || ''