Explorar o código

b端出口退税

changjiaming hai 1 mes
pai
achega
9322b544f8

+ 18 - 4
src/api/myApplication/exportTax.js

@@ -1,9 +1,23 @@
 import request from '@/utils/request'
 // 出口退税列表
-export function getList(data) {
+export function getList(params) {
   return request({
-    url: '/salesContract/get/page',
-    method: 'post',
-    data
+    url: '/taxRebate/pages',
+    method: 'get',
+    params
+  })
+}
+// 申请出口退税权限
+export function applyTaxRebate() {
+  return request({
+    url: '/enterprise/apply/taxRebate/permission',
+    method: 'post'
+  })
+}
+// 重定向小图进行退税
+export function taxRebate() {
+  return request({
+    url: '/taxRebate/doTaxRebate',
+    method: 'get'
   })
 }

+ 2 - 1
src/store/modules/constant.js

@@ -28,7 +28,8 @@ export default {
       invoice_type: [],
       sys_sign_status: [], // 企业签署状态
       sales_order_status: [], // 销售订单状态
-      purchase_order_status: [] // 采购订单状态
+      purchase_order_status: [], // 采购订单状态
+      rebate_process_status: [] // 退税处理状态
     }
   },
   mutations: {

+ 12 - 2
src/store/modules/user.js

@@ -23,7 +23,9 @@ const getDefaultState = () => {
       proxyDistrictCode: '', // 代理公司区域  CN_MAINLAND-中国大陆   CN_HK-香港   CN_MO-澳门   CN_TW-台湾   FOREIGN-境外
 
       purchaseFunction: 'show' // 生产企业 + 自营出口  无采购相关功能
-    }
+    },
+    showApplyTaxRebateBtn: false, // 展示“申请出口退税”按钮
+    showTaxRebateBtn: false // 展示“出口退税”按钮
   }
 }
 
@@ -77,6 +79,12 @@ const mutations = {
   },
   SET_PURCHASE_FUNCTION: (state, info) => { // 采购相关功能
     state.enterpriseInfo.purchaseFunction = info
+  },
+  SET_APPLY_TAX_REBATE: (state, info) => { // 退税
+    state.enterpriseInfo.purchaseFunction = info
+  },
+  SET_TAX_REBATE: (state, info) => { // 退税
+    state.enterpriseInfo.purchaseFunction = info
   }
 }
 
@@ -120,9 +128,11 @@ const actions = {
     return new Promise((resolve, reject) => {
       getCertificationStatus().then(response => {
         const { data } = response
-        const { certificationStatus, showAllFunctions } = data
+        const { certificationStatus, showAllFunctions, showApplyTaxRebateBtn, showTaxRebateBtn } = data
         commit('SET_AUTH_STATUS', certificationStatus)
         commit('SET_SHOW_ALLMENU', showAllFunctions ? 'show' : 'hide')
+        commit('SET_APPLY_TAX_REBATE', showApplyTaxRebateBtn)
+        commit('SET_TAX_REBATE', showTaxRebateBtn)
         resolve(data)
       }).catch(error => {
         reject(error)

+ 70 - 57
src/views/myApplication/tax/index.vue

@@ -3,52 +3,54 @@
     <div class="search">
       <div class="left" />
       <div class="right">
+        <el-date-picker
+          v-model="applyDate"
+          type="daterange"
+          range-separator="至"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          start-placeholder="申报年月日期范围"
+          end-placeholder="申报年月日期范围"
+        />
         <div>
-          <el-input v-model="search.contractInfo" placeholder="申报批次" />
+          <el-input v-model="search.declarationBatch" placeholder="申报批次" />
         </div>
         <div>
-          <el-input v-model="search.contractInfo" placeholder="报关单号" />
+          <el-input v-model="search.customsDeclarationNo" placeholder="报关单号" />
         </div>
         <div>
-          <el-input v-model="search.contractInfo" placeholder="销售订单ID" />
+          <el-input v-model="search.salesOrderNo" placeholder="销售订单ID" />
         </div>
         <div>
-          <el-input v-model="search.contractInfo" placeholder="出口发票号" />
+          <el-input v-model="search.proformaInvoiceNo" placeholder="出口发票号" />
         </div>
+        <el-date-picker
+          v-model="exportDate"
+          type="daterange"
+          range-separator="至"
+          start-placeholder="出口日期范围"
+          end-placeholder="出口日期范围"
+          value-format="yyyy-MM-dd HH:mm:ss"
+        />
         <div>
-          <el-select v-model="search.contractStatus" placeholder="请选择退税状态" clearable>
+          <el-select v-model="search.status" placeholder="请选择退税状态" clearable>
             <el-option
-              v-for="item in constant.sales_contract_status"
+              v-for="item in constant.rebate_process_status"
               :key="item.dictCode"
               :label="item.dictLabel"
               :value="item.dictValue"
             />
           </el-select>
         </div>
-        <div>
-          <el-date-picker
-            v-model="addDate"
-            type="daterange"
-            range-separator="至"
-            start-placeholder="申报年月日期范围"
-            end-placeholder="申报年月日期范围"
-          />
-        </div>
-        <div>
-          <el-date-picker
-            v-model="addDate"
-            type="daterange"
-            range-separator="至"
-            start-placeholder="出口日期范围"
-            end-placeholder="出口日期范围"
-          />
-        </div>
         <div class="right-btn">
+          <el-button type="primary" @click="fetchData('reset')">重置</el-button>
           <el-button type="primary" @click="fetchData('search')">查询</el-button>
-          <el-button type="primary" @click="addContract">添加合同</el-button>
         </div>
       </div>
     </div>
+    <div style="text-align: right; margin-top: 10px;">
+      <el-button v-if="$store.state.user.showApplyTaxRebateBtn" type="primary" @click="taxRebate(1)">申请出口退税</el-button>
+      <el-button v-if="$store.state.user.showTaxRebateBtn" type="primary" @click="taxRebate(2)">出口退税</el-button>
+    </div>
     <cy-comm-table
       ref="commTable"
       v-loading="loading"
@@ -64,8 +66,8 @@
 <script>
 import { mapGetters } from 'vuex'
 import {
-  getList
-} from '@/api/myTrade/salesContract'
+  getList, applyTaxRebate, taxRebate
+} from '@/api/myApplication/exportTax'
 import { formatMoney, codeChangeName } from '@/utils'
 
 export default {
@@ -76,15 +78,16 @@ export default {
     return {
       count: 0,
       search: {
-        customerUserInfo: '',
-        importerCertNo: '',
-        agencyCertNo: '',
-        paymentWay: '',
-        contractStatus: ''
+        declarationBatch: '',
+        customsDeclarationNo: '',
+        salesOrderNo: '',
+        proformaInvoiceNo: '',
+        status: ''
       },
+      applyDate: [],
+      exportDate: [],
       page: 1,
       size: 10,
-      addDate: [],
       tableData: [],
       columns: [
         {
@@ -93,69 +96,65 @@ export default {
         },
         {
           label: '申报年月',
-          prop: 'contractNo',
+          prop: 'declarationMonthYear',
           showTooltip: true
         },
         {
           label: '申报批次',
           showTooltip: true,
-          prop: 'contractName'
+          prop: 'declarationBatch'
         },
         {
           label: '报关单号',
           showTooltip: true,
-          prop: 'importerEnterpriseName'
+          prop: 'customsDeclarationNo'
         },
         {
           label: '销售订单ID',
           showTooltip: true,
-          prop: 'importerEnterpriseName'
+          prop: 'salesOrderNo'
         },
         {
-          label: '退税额',
+          label: '退税额',
           showTooltip: true,
           render: (h, row) => {
-            return <div>{ formatMoney(row.contractAmount) }</div>
+            return <div>{ formatMoney(row.taxRefundAmount) }</div>
           }
         },
         {
           label: '出口发票号',
           showTooltip: true,
-          prop: 'contractName'
+          prop: 'proformaInvoiceNo'
         },
         {
           label: '出口数量',
           showTooltip: true,
-          prop: 'importerEnterpriseName'
+          prop: 'exportQuantity'
         },
         {
           label: '出口日期',
           showTooltip: true,
-          prop: 'importerEnterpriseName'
+          prop: 'exportDate'
         },
         {
           label: '退税状态',
-          prop: 'paymentWay',
+          prop: 'status',
           showTooltip: true,
           render: (h, row) => {
-            return <div> <el-tooltip class='item' effect='dark' content={codeChangeName(this.constant.payment_way, row.paymentWay, 'dictValue', 'dictLabel')} placement='top'>
+            return <div> <el-tooltip class='item' effect='dark' content={codeChangeName(this.constant.rebate_process_status, row.status, 'dictValue', 'dictLabel')} placement='top'>
               <div class='one-ellipsis'>
-                {codeChangeName(this.constant.payment_way, row.paymentWay, 'dictValue', 'dictLabel')}
+                {codeChangeName(this.constant.rebate_process_status, row.status, 'dictValue', 'dictLabel')}
               </div>
             </el-tooltip></div>
           }
         }
 
       ],
-      loading: false,
-      platformList: [],
-      commodityList: [],
-      uploadDialogVisible: false,
-      curContractId: ''
+      loading: false
     }
   },
   computed: {
-    ...mapGetters(['constant']),
+    ...mapGetters(['constant', '']),
     tablePower() {
       return ({ item, row }) => {
         const { rowPower } = item
@@ -170,7 +169,7 @@ export default {
     }
   },
   created() {
-    this.$store.dispatch('getConstant', ['payment_way', 'sales_contract_status'])
+    this.$store.dispatch('getConstant', ['rebate_process_status'])
   },
   mounted() {
     this.fetchData()
@@ -178,14 +177,23 @@ export default {
   methods: {
     fetchData(type) {
       this.loading = true
-      if (type === 'search') {
+      if (type) {
         this.page = 1
         this.size = 10
+        if (type === 'reset') {
+          for (const key in this.search) {
+            this.search[key] = ''
+          }
+          this.applyDate = []
+          this.exportDate = []
+        }
       }
       const params = {
         ...this.search,
-        timeStart: this.addDate.length ? this.addDate[0] : '',
-        timeEnd: this.addDate.length ? this.addDate[1] : '',
+        declarationMonthYearStart: this.applyDate && this.applyDate.length ? this.applyDate[0] : '',
+        declarationMonthYearEnd: this.applyDate && this.applyDate.length ? this.applyDate[1] : '',
+        exportDateStart: this.exportDate && this.exportDate.length ? this.exportDate[0] : '',
+        exportDateEnd: this.exportDate && this.exportDate.length ? this.exportDate[1] : '',
         page: this.page || 1,
         rows: this.size || 10
       }
@@ -195,7 +203,6 @@ export default {
         this.count = Number(data.records)
       })
     },
-
     addContract() {
       this.$router.push({
         name: 'SalesContractAdd',
@@ -203,8 +210,14 @@ export default {
           type: 'add'
         }
       })
+    },
+    taxRebate(type) {
+      if (type === 1) {
+        applyTaxRebate()
+      } else {
+        taxRebate()
+      }
     }
-
   }
 }
 </script>