Quellcode durchsuchen

feat:添加采购订单中对账单开收票单据逻辑

xieyong vor 1 Tag
Ursprung
Commit
71004010e9

+ 2 - 2
src/views/financialManage/invoiceManage/components/accountstatementDialog.vue

@@ -65,7 +65,7 @@
         }
       },
       type: {
-        type: String,
+        type: Number,
         default: 1
       },
       accountstatementDialogFlag: {
@@ -206,7 +206,7 @@
           size: limit,
           ...where,
           reviewStatus: 2,
-          type: this.type
+          type: String(this.type)
         });
       },
 

+ 4 - 4
src/views/financialManage/invoiceManage/components/addOrEditDialogNew.vue

@@ -29,8 +29,8 @@
               :disabled="!isEditType"
               style="width: 100%"
             >
-              <el-option label="开票" value="1"></el-option>
-              <el-option label="收票" value="2"></el-option>
+              <el-option label="开票" :value="1"></el-option>
+              <el-option label="收票" :value="2"></el-option>
             </el-select>
           </el-form-item>
         </el-col>
@@ -1029,8 +1029,8 @@
       //订单、合同列表
       async createInvoice1(data, type, sourceType) {
         console.log('createInvoice1~~~', data);
-        
-        this.$set(this.form, 'type', type);
+
+        this.$set(this.form, 'type', Number(type));
         this.$set(this.form, 'sourceType', sourceType);
         // this.$set(this.form, 'sourceCode', tempIds);
 

+ 13 - 11
src/views/purchasingManage/purchaseOrder/accountstatement/index.vue

@@ -109,7 +109,7 @@
               </template>
             </el-popconfirm>
 
-            <!-- <el-link
+            <el-link
               size="small"
               type="primary"
               :underline="false"
@@ -119,7 +119,7 @@
               @click="handleAddInvoice(row)"
             >
               新增发票
-            </el-link> -->
+            </el-link>
           </template>
         </ele-pro-table>
       </div>
@@ -188,7 +188,7 @@
   import dictMixins from '@/mixins/dictMixins';
   import 'file-saver';
   import AccountInfoDialog from '@/views/financialManage/invoiceManage/components/accountInfoDialog.vue';
-  import addInvoiceDialog from '@/views/financialManage/invoiceManage/components/addOrEditDialog.vue';
+  import addInvoiceDialog from '@/views/financialManage/invoiceManage/components/addOrEditDialogNew.vue';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import tabMixins from '@/mixins/tableColumnsMixin';
 
@@ -373,14 +373,16 @@
       /*新增发票*/
       handleAddInvoice(row) {
         this.currentRow = row;
-        this.accountInfoDialogFlag = true;
-        this.$nextTick(() => {
-          this.$refs.accountInfoDialogRef.createInvoice(
-            row,
-            'add',
-            'purchaseOrder'
-          );
-        });
+        setTimeout(() => {
+          this.addInvoiceDialogFlag = true;
+          this.$nextTick(() => {
+            this.$refs.addInvoiceDialogRef.createInvoice1(
+              [row],
+              '2',
+              1
+            );
+          });
+        }, 400);
       },
       /*新增发票选择对账单信息回调*/
       getAccountInfo(row) {