Pārlūkot izejas kodu

Merge branch 'deploy_0804' of jianguan-web/jg-ocs-html into master

李磊 3 gadi atpakaļ
vecāks
revīzija
f27347f37f

+ 11 - 0
src/api/salesReturn.js

@@ -165,3 +165,14 @@ export const salesReturnBatchInsert = params => {
     method: 'post'
   })
 }
+//  销售退货 导入产品 导出错误项
+export const salesReturnFailExcel = (params) => {
+  const url = `/salesReturn/detail/downloadFailExcel/${params.grabFlag}`
+  delete params.grabFlag
+  return axios.request({
+    url: url,
+    method: 'post',
+    data: params.list,
+    responseType: 'blob'
+  })
+}

+ 41 - 0
src/libs/exportExcel.js

@@ -0,0 +1,41 @@
+import notification from 'ant-design-vue/es/notification'
+import moment from 'moment'
+
+// 导出excel
+/*
+  *url: 数据请求接口
+  *params: 请求参数
+  *fileName: 导出文件名称
+  *callback: 回调函数
+*/
+export const hdExportExcel = function (url, params, fileName, callback) {
+  url(params).then(res => {
+    if (res.type == 'application/json') {
+      var reader = new FileReader()
+      reader.addEventListener('loadend', function () {
+        const obj = JSON.parse(reader.result)
+        notification.error({
+          message: '提示',
+          description: obj.message
+        })
+      })
+      reader.readAsText(res)
+    } else {
+      downloadExcel(res, fileName)
+    }
+    callback()
+  })
+}
+// 导出下载excel
+export const downloadExcel = function (data, fileName) {
+  if (!data) { return }
+  const url = window.URL.createObjectURL(new Blob([data]))
+  const link = document.createElement('a')
+  link.style.display = 'none'
+  link.href = url
+  const a = moment().format('YYYYMMDDHHmmss')
+  const fname = fileName + a
+  link.setAttribute('download', fname + '.xlsx')
+  document.body.appendChild(link)
+  link.click()
+}

+ 9 - 19
src/views/allocationManagement/transferOut/list.vue

@@ -42,14 +42,15 @@
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="allocateBillList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocateBillList-reset">重置</a-button>
-              <!-- <a-button
-                style="margin: 0 0 18px 5px"
+              <a-button
+                style="margin-left: 5px"
                 type="primary"
                 class="button-warning"
+                v-if="$hasPermissions('B_transferOut_export')"
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                id="allocateBillList-export">导出</a-button> -->
+                id="allocateBillList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -121,6 +122,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import auditModal from '@/views/common/auditModal.vue'
 import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
 import AllocateType from '@/views/common/allocateType.js'
+import { hdExportExcel } from '@/libs/exportExcel'
 export default {
   components: { STable, VSelect, basicInfoModal, rangeDate, auditModal, AllocateType },
   data () {
@@ -261,27 +263,15 @@ export default {
     },
     //  导出
     handleExport () {
+      const _this = this
       const params = this.queryParam
       this.exportLoading = true
       this.spinning = true
-      allocateBillExport(params).then(res => {
-        this.exportLoading = false
-        this.download(res)
-        this.spinning = false
+      hdExportExcel(allocateBillExport, params, '调拨列表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
       })
     },
-    download (data) {
-      if (!data) { return }
-      const url = window.URL.createObjectURL(new Blob([data]))
-      const link = document.createElement('a')
-      link.style.display = 'none'
-      link.href = url
-      const a = moment().format('YYYYMMDDHHmmss')
-      const fname = '调拨列表' + a
-      link.setAttribute('download', fname + '.xlsx')
-      document.body.appendChild(link)
-      link.click()
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 55 - 2
src/views/reportData/actualSalesReport/list.vue

@@ -69,7 +69,15 @@
             </template>
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="actualSalesReportList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="actualSalesReportList-reset">重置</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="actualSalesReportList-reset">重置</a-button>
+              <!-- <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="actualSalesReportList-export">导出</a-button> -->
               <a @click="advanced=!advanced" style="margin-left: 8px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -86,7 +94,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 3120 }"
+        :scroll="{ x: 3220 }"
         :defaultLoadData="false"
         bordered>
         <template slot="footer">
@@ -113,6 +121,7 @@
                 <a-col span="4">雷贝斯托:{{ (totalData && (totalData.lbstAmount || totalData.lbstAmount==0)) ? totalData.lbstAmount : '--' }}</a-col>
                 <a-col span="4">德尔福:{{ (totalData && (totalData.defAmount || totalData.defAmount==0)) ? totalData.defAmount : '--' }}</a-col>
                 <a-col span="4">巴诺德:{{ (totalData && (totalData.bndAmount || totalData.bndAmount==0)) ? totalData.bndAmount : '--' }}</a-col>
+                <a-col span="4">布瑞斯:{{ (totalData && (totalData.brsAmount || totalData.brsAmount==0)) ? totalData.brsAmount : '--' }}</a-col>
                 <a-col span="6">实售销售合计金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
               </a-row>
             </a-col>
@@ -124,6 +133,7 @@
 </template>
 
 <script>
+import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
@@ -316,6 +326,13 @@ export default {
               align: 'center',
               width: 100,
               customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
+            },
+            {
+              title: '布瑞斯',
+              dataIndex: 'brsAmount',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
             }
           ] },
         { title: '实售销售合计金额', width: 200, dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } }
@@ -347,6 +364,42 @@ export default {
     }
   },
   methods: {
+    //  导出
+    handleExport () {
+      const _this = this
+      const params = this.queryParam
+      this.exportLoading = true
+      _this.spinning = true
+      reportSalesReturnDetailExport(params).then(res => {
+        this.exportLoading = false
+        _this.spinning = false
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.download(res)
+        }
+      })
+    },
+    download (data) {
+      if (!data) { return }
+      const url = window.URL.createObjectURL(new Blob([data]))
+      const link = document.createElement('a')
+      link.style.display = 'none'
+      link.href = url
+      const a = moment().format('YYYYMMDDHHmmss')
+      const fname = '实售销售报表' + a
+      link.setAttribute('download', fname + '.xlsx')
+      document.body.appendChild(link)
+      link.click()
+    },
     // 总计
     getCount (params) {
       salesBillRealReportCount(params).then(res => {

+ 54 - 1
src/views/reportData/billingReturnReport/list.vue

@@ -70,6 +70,14 @@
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="billingReturnReportList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="billingReturnReportList-reset">重置</a-button>
+              <!-- <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="billingReturnReportList-export">导出</a-button> -->
               <a @click="advanced=!advanced" style="margin-left: 8px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -86,7 +94,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 3020, y: tableHeight }"
+        :scroll="{ x: 3120, y: tableHeight }"
         :defaultLoadData="false"
         bordered>
         <template slot="footer">
@@ -113,6 +121,7 @@
                 <a-col span="4">雷贝斯托:{{ (totalData && (totalData.lbstAmount || totalData.lbstAmount==0)) ? totalData.lbstAmount : '--' }}</a-col>
                 <a-col span="4">德尔福:{{ (totalData && (totalData.defAmount || totalData.defAmount==0)) ? totalData.defAmount : '--' }}</a-col>
                 <a-col span="4">巴诺德:{{ (totalData && (totalData.bndAmount || totalData.bndAmount==0)) ? totalData.bndAmount : '--' }}</a-col>
+                <a-col span="4">布瑞斯:{{ (totalData && (totalData.brsAmount || totalData.brsAmount==0)) ? totalData.brsAmount : '--' }}</a-col>
                 <a-col span="6">开单退货合计金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
               </a-row>
             </a-col>
@@ -124,6 +133,7 @@
 </template>
 
 <script>
+import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
@@ -319,6 +329,13 @@ export default {
               align: 'center',
               width: 100,
               customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
+            },
+            {
+              title: '布瑞斯',
+              dataIndex: 'brsAmount',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
             }
           ] },
         { title: '开单退货合计金额', width: 200, dataIndex: 'sumAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } }
@@ -349,6 +366,42 @@ export default {
     }
   },
   methods: {
+    //  导出
+    handleExport () {
+      const _this = this
+      const params = this.queryParam
+      this.exportLoading = true
+      _this.spinning = true
+      reportSalesReturnDetailExport(params).then(res => {
+        this.exportLoading = false
+        _this.spinning = false
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.download(res)
+        }
+      })
+    },
+    download (data) {
+      if (!data) { return }
+      const url = window.URL.createObjectURL(new Blob([data]))
+      const link = document.createElement('a')
+      link.style.display = 'none'
+      link.href = url
+      const a = moment().format('YYYYMMDDHHmmss')
+      const fname = '开单退货报表' + a
+      link.setAttribute('download', fname + '.xlsx')
+      document.body.appendChild(link)
+      link.click()
+    },
     // 总计
     getCount (params) {
       salesReportReturnCount(params).then(res => {

+ 54 - 1
src/views/reportData/returnSlipReport/list.vue

@@ -75,6 +75,14 @@
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="returnSlipReportList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="returnSlipReportList-reset">重置</a-button>
+              <!-- <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="returnSlipReportList-export">导出</a-button> -->
               <a @click="advanced=!advanced" style="margin-left: 8px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -91,7 +99,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 3240, y: tableHeight }"
+        :scroll="{ x: 3340, y: tableHeight }"
         :defaultLoadData="false"
         bordered>
         <template slot="footer">
@@ -118,6 +126,7 @@
                 <a-col span="4">雷贝斯托:{{ (totalData && (totalData.lbstAmount || totalData.lbstAmount==0)) ? totalData.lbstAmount : '--' }}</a-col>
                 <a-col span="4">德尔福:{{ (totalData && (totalData.defAmount || totalData.defAmount==0)) ? totalData.defAmount : '--' }}</a-col>
                 <a-col span="4">巴诺德:{{ (totalData && (totalData.bndAmount || totalData.bndAmount==0)) ? totalData.bndAmount : '--' }}</a-col>
+                <a-col span="4">布瑞斯:{{ (totalData && (totalData.brsAmount || totalData.brsAmount==0)) ? totalData.brsAmount : '--' }}</a-col>
                 <a-col span="6">开单退货单合计金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
               </a-row>
             </a-col>
@@ -129,6 +138,7 @@
 </template>
 
 <script>
+import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
@@ -326,6 +336,13 @@ export default {
               align: 'center',
               width: 100,
               customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
+            },
+            {
+              title: '布瑞斯',
+              dataIndex: 'brsAmount',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
             }
           ] },
         { title: '开单退货单合计金额', width: 200, dataIndex: 'sumAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } }
@@ -355,6 +372,42 @@ export default {
     }
   },
   methods: {
+    //  导出
+    handleExport () {
+      const _this = this
+      const params = this.queryParam
+      this.exportLoading = true
+      _this.spinning = true
+      reportSalesReturnDetailExport(params).then(res => {
+        this.exportLoading = false
+        _this.spinning = false
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.download(res)
+        }
+      })
+    },
+    download (data) {
+      if (!data) { return }
+      const url = window.URL.createObjectURL(new Blob([data]))
+      const link = document.createElement('a')
+      link.style.display = 'none'
+      link.href = url
+      const a = moment().format('YYYYMMDDHHmmss')
+      const fname = '开单退货单报表' + a
+      link.setAttribute('download', fname + '.xlsx')
+      document.body.appendChild(link)
+      link.click()
+    },
     // 总计
     getCount (params) {
       salesReportReturnBillCount(params).then(res => {

+ 55 - 2
src/views/reportData/salesAmountReport/list.vue

@@ -69,7 +69,15 @@
             </template>
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesAmountReportList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesAmountReportList-reset">重置</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesAmountReportList-reset">重置</a-button>
+              <!-- <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="returnSlipReportList-export">导出</a-button> -->
               <a @click="advanced=!advanced" style="margin-left: 8px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -87,7 +95,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 3120 }"
+        :scroll="{ x: 3220 }"
         bordered>
         <template slot="footer">
           <a-row>
@@ -113,6 +121,7 @@
                 <a-col span="4">雷贝斯托:{{ (totalData && (totalData.lbstAmount || totalData.lbstAmount==0)) ? totalData.lbstAmount : '--' }}</a-col>
                 <a-col span="4">德尔福:{{ (totalData && (totalData.defAmount || totalData.defAmount==0)) ? totalData.defAmount : '--' }}</a-col>
                 <a-col span="4">巴诺德:{{ (totalData && (totalData.bndAmount || totalData.bndAmount==0)) ? totalData.bndAmount : '--' }}</a-col>
+                <a-col span="4">布瑞斯:{{ (totalData && (totalData.brsAmount || totalData.brsAmount==0)) ? totalData.brsAmount : '--' }}</a-col>
                 <a-col span="6">开单销售合计金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
               </a-row>
             </a-col>
@@ -124,6 +133,7 @@
 </template>
 
 <script>
+import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
@@ -316,6 +326,13 @@ export default {
               align: 'center',
               width: 100,
               customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
+            },
+            {
+              title: '布瑞斯',
+              dataIndex: 'brsAmount',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
             }
           ] },
         { title: '开单销售合计金额', width: 200, dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } }
@@ -348,6 +365,42 @@ export default {
     }
   },
   methods: {
+    //  导出
+    handleExport () {
+      const _this = this
+      const params = this.queryParam
+      this.exportLoading = true
+      _this.spinning = true
+      reportSalesReturnDetailExport(params).then(res => {
+        this.exportLoading = false
+        _this.spinning = false
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.download(res)
+        }
+      })
+    },
+    download (data) {
+      if (!data) { return }
+      const url = window.URL.createObjectURL(new Blob([data]))
+      const link = document.createElement('a')
+      link.style.display = 'none'
+      link.href = url
+      const a = moment().format('YYYYMMDDHHmmss')
+      const fname = '开单销售报表' + a
+      link.setAttribute('download', fname + '.xlsx')
+      document.body.appendChild(link)
+      link.click()
+    },
     // 总计
     getCount (params) {
       salesBillReportCount(params).then(res => {

+ 3 - 4
src/views/reportData/salesReturnDetailReport/list.vue

@@ -118,20 +118,19 @@
             <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
               <a-button
                 type="primary"
-                class="button-warning"
+                class="button-info"
                 size="small"
                 @click="handleStock"
                 id="salesReturnDetailList-stockDate">盘点区间日期</a-button>
               <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="salesReturnDetailList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesReturnDetailList-reset">重置</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesReturnDetailList-reset">重置</a-button>
               <a-button
-                style="margin-left: 5px"
+                style="margin-left: 10px"
                 type="primary"
                 class="button-warning"
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                v-if="$hasPermissions('B_salerReturnDetailTable_export')"
                 id="salesReturnDetailList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}

+ 54 - 1
src/views/reportData/salesReturnReport/list.vue

@@ -70,6 +70,14 @@
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesReturnReportList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesReturnReportList-reset">重置</a-button>
+              <!-- <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="salesReturnReportList-export">导出</a-button> -->
               <a @click="advanced=!advanced" style="margin-left: 8px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -86,7 +94,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 3020, y: tableHeight }"
+        :scroll="{ x: 3120, y: tableHeight }"
         :defaultLoadData="false"
         bordered>
         <template slot="footer">
@@ -113,6 +121,7 @@
                 <a-col span="4">雷贝斯托:{{ (totalData && (totalData.lbstAmount || totalData.lbstAmount==0)) ? totalData.lbstAmount : '--' }}</a-col>
                 <a-col span="4">德尔福:{{ (totalData && (totalData.defAmount || totalData.defAmount==0)) ? totalData.defAmount : '--' }}</a-col>
                 <a-col span="4">巴诺德:{{ (totalData && (totalData.bndAmount || totalData.bndAmount==0)) ? totalData.bndAmount : '--' }}</a-col>
+                <a-col span="4">布瑞斯:{{ (totalData && (totalData.brsAmount || totalData.brsAmount==0)) ? totalData.brsAmount : '--' }}</a-col>
                 <a-col span="6">实售退货合计金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
               </a-row>
             </a-col>
@@ -124,6 +133,7 @@
 </template>
 
 <script>
+import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
@@ -319,6 +329,13 @@ export default {
               align: 'center',
               width: 100,
               customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
+            },
+            {
+              title: '布瑞斯',
+              dataIndex: 'brsAmount',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
             }
           ] },
         { title: '实售退货合计金额', width: 200, dataIndex: 'sumAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } }
@@ -349,6 +366,42 @@ export default {
     }
   },
   methods: {
+    //  导出
+    handleExport () {
+      const _this = this
+      const params = this.queryParam
+      this.exportLoading = true
+      _this.spinning = true
+      reportSalesReturnDetailExport(params).then(res => {
+        this.exportLoading = false
+        _this.spinning = false
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.download(res)
+        }
+      })
+    },
+    download (data) {
+      if (!data) { return }
+      const url = window.URL.createObjectURL(new Blob([data]))
+      const link = document.createElement('a')
+      link.style.display = 'none'
+      link.href = url
+      const a = moment().format('YYYYMMDDHHmmss')
+      const fname = '实售退货报表' + a
+      link.setAttribute('download', fname + '.xlsx')
+      document.body.appendChild(link)
+      link.click()
+    },
     // 总计
     getCount (params) {
       salesReportReturnRebateCount(params).then(res => {

+ 48 - 2
src/views/reportData/salesReturnsReport/list.vue

@@ -75,12 +75,20 @@
             <a-col :md="7" :sm="24" style="margin-bottom: 10px;">
               <a-button
                 type="primary"
-                class="button-warning"
+                class="button-info"
                 size="small"
                 @click="handleStock"
                 id="salesReturnsReportList-stockDate">盘点区间日期</a-button>
               <a-button style="margin-left: 5px" type="primary" @click="handleSearch" :disabled="disabled" id="salesReturnsReportList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesReturnsReportList-reset">重置</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesReturnsReportList-reset">重置</a-button>
+              <!-- <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="salesReturnsReportList-export">导出</a-button> -->
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -135,11 +143,13 @@ import subarea from '@/views/common/subarea.js'
 import custList from '@/views/common/custList.vue'
 import { getArea } from '@/api/data'
 import { reportSalesReturnList, reportSalesReturnCount } from '@/api/reportData'
+import moment from 'moment'
 export default {
   components: { STable, VSelect, rangeDate, subarea, custList },
   data () {
     return {
       spinning: false,
+      exportLoading: false,
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -205,6 +215,42 @@ export default {
     }
   },
   methods: {
+    //  导出
+    handleExport () {
+      const _this = this
+      const params = this.queryParam
+      this.exportLoading = true
+      _this.spinning = true
+      oosDetailExport(params).then(res => {
+        this.exportLoading = false
+        _this.spinning = false
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.download(res)
+        }
+      })
+    },
+    download (data) {
+      if (!data) { return }
+      const url = window.URL.createObjectURL(new Blob([data]))
+      const link = document.createElement('a')
+      link.style.display = 'none'
+      link.href = url
+      const a = moment().format('YYYYMMDDHHmmss')
+      const fname = '销售退货单报表' + a
+      link.setAttribute('download', fname + '.xlsx')
+      document.body.appendChild(link)
+      link.click()
+    },
     // 盘点库存日期
     handleStock () {
       this.$message.info('无盘点区间的起始/终止时间,请自行选择日期区间查询!')

+ 55 - 2
src/views/reportData/salesSlipReport/list.vue

@@ -74,7 +74,15 @@
             </template>
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesSlipReportList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesSlipReportList-reset">重置</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesSlipReportList-reset">重置</a-button>
+              <!-- <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="salesSlipReportList-export">导出</a-button> -->
               <a @click="advanced=!advanced" style="margin-left: 8px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -92,7 +100,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 3220 }"
+        :scroll="{ x: 3320 }"
         bordered>
         <template slot="footer">
           <a-row>
@@ -118,6 +126,7 @@
                 <a-col span="4">雷贝斯托:{{ (totalData && (totalData.lbstAmount || totalData.lbstAmount==0)) ? totalData.lbstAmount : '--' }}</a-col>
                 <a-col span="4">德尔福:{{ (totalData && (totalData.defAmount || totalData.defAmount==0)) ? totalData.defAmount : '--' }}</a-col>
                 <a-col span="4">巴诺德:{{ (totalData && (totalData.bndAmount || totalData.bndAmount==0)) ? totalData.bndAmount : '--' }}</a-col>
+                <a-col span="4">布瑞斯:{{ (totalData && (totalData.brsAmount || totalData.brsAmount==0)) ? totalData.brsAmount : '--' }}</a-col>
                 <a-col span="6">开单销售单合计金额:{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? totalData.totalAmount : '--' }}</a-col>
               </a-row>
             </a-col>
@@ -129,6 +138,7 @@
 </template>
 
 <script>
+import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
@@ -323,6 +333,13 @@ export default {
               align: 'center',
               width: 100,
               customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
+            },
+            {
+              title: '布瑞斯',
+              dataIndex: 'brsAmount',
+              align: 'center',
+              width: 100,
+              customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' }
             }
           ] },
         { title: '开单销售单合计金额', width: 200, dataIndex: 'totalAmount', align: 'center', customRender: function (text) { return (text || text == 0) ? ('¥' + text) : '--' } }
@@ -355,6 +372,42 @@ export default {
     }
   },
   methods: {
+    //  导出
+    handleExport () {
+      const _this = this
+      const params = this.queryParam
+      this.exportLoading = true
+      _this.spinning = true
+      reportSalesReturnDetailExport(params).then(res => {
+        this.exportLoading = false
+        _this.spinning = false
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.download(res)
+        }
+      })
+    },
+    download (data) {
+      if (!data) { return }
+      const url = window.URL.createObjectURL(new Blob([data]))
+      const link = document.createElement('a')
+      link.style.display = 'none'
+      link.href = url
+      const a = moment().format('YYYYMMDDHHmmss')
+      const fname = '开单销售单报表' + a
+      link.setAttribute('download', fname + '.xlsx')
+      document.body.appendChild(link)
+      link.click()
+    },
     // 总计
     getCount (params) {
       salesBillReportCount(params).then(res => {

+ 28 - 4
src/views/salesManagement/salesReturn/chooseImportModal.vue

@@ -46,20 +46,28 @@
           size="large"
           :class="loadData.length==0?'button-grey':'button-primary'"
           @click="handleSubmit"
-          style="padding: 0 60px;">确认导入</a-button>
+          style="padding: 0 40px;">确认导入</a-button>
         <a-button
           id="chooseImport-cancel"
           size="large"
           class="button-cancel"
           @click="isShow=false"
-          style="padding: 0 60px;margin-left: 15px;">取消</a-button>
+          style="padding: 0 40px;margin-left: 15px;">取消</a-button>
+        <a-button
+          type="primary"
+          id="chooseImport-error"
+          size="large"
+          class="button-error"
+          @click="handleError"
+          style="padding: 0 40px;margin-left: 15px;">导出错误项</a-button>
       </div>
     </div>
   </a-modal>
 </template>
 
 <script>
-import { salesReturnParseProducts } from '@/api/salesReturn'
+import { hdExportExcel } from '@/libs/exportExcel'
+import { salesReturnParseProducts, salesReturnFailExcel } from '@/api/salesReturn'
 export default {
   name: 'ChooseImportModal',
   props: {
@@ -168,6 +176,22 @@ export default {
         this.$emit('ok', this.loadData)
         this.isShow = false
       }
+    },
+    // 导出
+    handleError () {
+      const _this = this
+      if (_this.unLoadData.length < 1) {
+        _this.$message.info('暂无可导出错误项~')
+        return
+      }
+      _this.spinning = true
+      const params = {
+        grabFlag: _this.paramsData.grabFlag,
+        list: _this.unLoadData
+      }
+      hdExportExcel(salesReturnFailExcel, params, '产品导入错误项', function () {
+        _this.spinning = false
+      })
     }
   },
   watch: {
@@ -198,7 +222,7 @@ export default {
       .btn-con{
         text-align: center;
         margin: 30px 0 20px;
-        .button-cancel{
+        .button-cancel,.button-error{
           font-size: 12px;
         }
       }

+ 1 - 1
src/views/salesManagement/salesReturn/queryPart.vue

@@ -109,7 +109,7 @@ export default {
           this.queryParam.dealerSn = this.buyerSn
         }
         const fun = [queryStockProductPage, salesQueryByReturn]
-        return fun[this.grabFlag](Object.assign(parameter, this.queryParam, { onlineFalg: '1' })).then(res => {
+        return fun[this.grabFlag](Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {

+ 3 - 2
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -21,8 +21,8 @@
                 <span>退货总金额:{{ ordeDetail&&(ordeDetail.totalAmount || ordeDetail.totalAmount==0) ? ordeDetail.totalAmount : '--' }}元;</span>
                 <span>退货总数量:{{ ordeDetail&&(ordeDetail.totalQty || ordeDetail.totalQty==0) ? ordeDetail.totalQty : '--' }};</span>
               </div>
-              <div style="position: absolute;right: 0;top: -2px;">
-                <a-button size="small" id="salesReturnEdit-import-btn" @click="openGuideModal=true">导入产品</a-button>
+              <div style="position: absolute;right: 0;top: -3px;">
+                <a-button size="small" type="primary" class="button-info" id="salesReturnEdit-import-btn" @click="openGuideModal=true">导入产品</a-button>
               </div>
             </div>
           </div>
@@ -302,6 +302,7 @@ export default {
       salesReturnBatchInsert(obj).then(res => {
         if (res.status == 200) {
           this.$refs.table.refresh(true)
+          this.getOrderDetail()
         }
       })
     },

+ 3 - 1
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -21,7 +21,7 @@
                 <span>退货总金额:<strong>{{ ordeDetail&&(ordeDetail.totalAmount || ordeDetail.totalAmount==0) ? ordeDetail.totalAmount : '--' }}</strong>元;</span>
                 <span>退货总数量:<strong>{{ ordeDetail&&(ordeDetail.totalQty || ordeDetail.totalQty==0) ? ordeDetail.totalQty : '--' }}</strong>;</span>
               </div>
-              <div style="position: absolute;right: 0;top: -2px;">
+              <div style="position: absolute;right: 0;top: -3px;">
                 <a-button size="small" type="primary" class="button-info" id="salesReturnEdit-import-btn" @click="openGuideModal=true">导入产品</a-button>
               </div>
             </div>
@@ -249,6 +249,7 @@ export default {
     //  重置
     resetSearchForm (flag) {
       this.$refs.table.refresh(!!flag)
+      this.getOrderDetail()
     },
     // 添加或修改产品
     saveProduct (row) {
@@ -296,6 +297,7 @@ export default {
       salesReturnBatchInsert(obj).then(res => {
         if (res.status == 200) {
           this.$refs.table.refresh(true)
+          this.getOrderDetail()
         }
       })
     },

+ 2 - 2
vue.config.js

@@ -108,8 +108,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.16.194:8602/ocs-admin',
-        target: 'http://p.ocs.360arrow.com/ocs-admin', //  Ô¤·¢²¼
+        target: 'http://192.168.16.188:8602/ocs-admin',
+        // target: 'http://p.ocs.360arrow.com/ocs-admin', //  Ô¤·¢²¼
         // target: 'http://ocs-admin.360arrow.com/ocs-admin', //  Éú²ú
         ws: false,
         changeOrigin: true,