From 295b93984fd94a11d0337637f76ff91b5a618215 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 24 四月 2023 09:49:26 +0800
Subject: [PATCH] 2023-04-24

---
 src/tabviews/custom/components/module/voucher/index.jsx |   43 +++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/src/tabviews/custom/components/module/voucher/index.jsx b/src/tabviews/custom/components/module/voucher/index.jsx
index c230975..87bde0b 100644
--- a/src/tabviews/custom/components/module/voucher/index.jsx
+++ b/src/tabviews/custom/components/module/voucher/index.jsx
@@ -208,6 +208,8 @@
       let employee = []
       let cash_flow = []
       let others = []
+      let logistics = []
+      let lessor = []
 
       res.sup && res.sup.forEach(item => {
         names[item.sup_type_code] = item.sup_type_name
@@ -215,6 +217,14 @@
 
       res.supplier && res.supplier.forEach(item => {
         supplier.push({value: item.suppliercode, label: item.suppliername})
+      })
+
+      res.logistics && res.logistics.forEach(item => {
+        logistics.push({value: item.suppliercode, label: item.suppliername})
+      })
+
+      res.lessor && res.lessor.forEach(item => {
+        lessor.push({value: item.suppliercode, label: item.suppliername})
       })
 
       res.customer && res.customer.forEach(item => {
@@ -249,6 +259,8 @@
         subjects: res.subjects || [],
         names: names,
         supplier: supplier,
+        logistics: logistics,
+        lessor: lessor,
         customer: customer,
         department: department,
         project: project,
@@ -406,6 +418,14 @@
       } else if (line.sup_accounting && line.supAccounts) {
         line.supAccounts.forEach(item => {
           if (item.sup_acc_type === 'supplier') {
+            if (!item.suppliercode || !item.suppliername) {
+              err = `绗�${_index}琛岋紝璇烽�夋嫨杈呭姪鏍哥畻銆俙
+            }
+          } else if (item.sup_acc_type === 'logistics') {
+            if (!item.suppliercode || !item.suppliername) {
+              err = `绗�${_index}琛岋紝璇烽�夋嫨杈呭姪鏍哥畻銆俙
+            }
+          } else if (item.sup_acc_type === 'lessor') {
             if (!item.suppliercode || !item.suppliername) {
               err = `绗�${_index}琛岋紝璇烽�夋嫨杈呭姪鏍哥畻銆俙
             }
@@ -700,6 +720,14 @@
       } else if (line.sup_accounting && line.supAccounts) {
         line.supAccounts.forEach(item => {
           if (item.sup_acc_type === 'supplier') {
+            if (!item.suppliercode || !item.suppliername) {
+              err = `绗�${_index}琛岋紝璇烽�夋嫨杈呭姪鏍哥畻銆俙
+            }
+          } else if (item.sup_acc_type === 'logistics') {
+            if (!item.suppliercode || !item.suppliername) {
+              err = `绗�${_index}琛岋紝璇烽�夋嫨杈呭姪鏍哥畻銆俙
+            }
+          } else if (item.sup_acc_type === 'lessor') {
             if (!item.suppliercode || !item.suppliername) {
               err = `绗�${_index}琛岋紝璇烽�夋嫨杈呭姪鏍哥畻銆俙
             }
@@ -1020,16 +1048,27 @@
   triggerclose = () => {
     const { config, status } = this.state
 
+    let tabId = ''
+    if (config.wrap.linkmenu && config.wrap.linkmenu.length > 0) {
+      tabId = config.wrap.linkmenu[config.wrap.linkmenu.length - 1]
+    }
+
     if (status === 'change') {
       confirm({
         content: '鍐呭宸插彉鏇达紝纭畾瑕佸叧闂悧锛�',
         onOk() {
           MKEmitter.emit('closeTabView', config.$pageId)
+          if (tabId) {
+            MKEmitter.emit('reloadMenuView', tabId, 'table')
+          }
         },
         onCancel() {}
       })
     } else {
       MKEmitter.emit('closeTabView', config.$pageId)
+      if (tabId) {
+        MKEmitter.emit('reloadMenuView', tabId, 'table')
+      }
     }
   }
 
@@ -1150,8 +1189,8 @@
               </Select>
             </div>
             <div className="temp-action">
-              <Button className="add-background header-btn" onClick={() => this.triggerTempsave()}>淇濆瓨</Button>
-              <Button className="out-background header-btn" onClick={this.triggerclose}>鍏抽棴</Button>
+              <Button className="save-temp header-btn" onClick={() => this.triggerTempsave()}>淇濆瓨</Button>
+              <Button className="close-temp header-btn" onClick={this.triggerclose}>鍏抽棴</Button>
             </div>
           </div> : null}
           <VoucherTable config={config} loading={loading} data={data} onChange={this.dataChange}/>

--
Gitblit v1.8.0