Przeglądaj źródła

Merge branch 'deploy_0804' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into deploy_0804

lilei 3 lat temu
rodzic
commit
03d0c839da

+ 11 - 0
src/api/dispatch.js

@@ -81,3 +81,14 @@ export const dispatchDetailType = (params) => {
     method: 'get'
   })
 }
+// 下推 详情  导出Excel
+export const dispatchDetailExcel = params => {
+  const url = `/dispatch/excel/${params.printType}`
+  delete params.printType
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 72 - 0
src/api/reportData.js

@@ -151,3 +151,75 @@ export const reportRebateExport = (params) => {
     responseType: 'blob'
   })
 }
+// 销售退货单 导出
+export const salesReturnsExport = (params) => {
+  return axios({
+    url: '/report/reportSalesReturn/exportExcel',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+// 销售退货明细 导出
+export const salesReturnDetailExport = (params) => {
+  return axios({
+    url: '/report/reportRebate/export',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+// 开单销售单 导出
+export const salesSlipExport = (params) => {
+  return axios({
+    url: '/report/salesBillReport/export',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+// 开单退货单 导出
+export const returnSlipExport = (params) => {
+  return axios({
+    url: 'report/salesReturnBillReport/returnBillExportExcel',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+// 开单销售 导出
+export const salesAmountExport = (params) => {
+  return axios({
+    url: '/report/reportRebate/export',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+// 实售销售 导出
+export const actualSalesExport = (params) => {
+  return axios({
+    url: '/report/',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+// 开单退货 导出
+export const billingReturnExport = (params) => {
+  return axios({
+    url: '/report/salesReturnBillReport/returnExportExcel',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+// 实售退货 导出
+export const salesReturnExport = (params) => {
+  return axios({
+    url: '/report/salesReturnBillReport/returnRebateExportExcel',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 19 - 4
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -52,6 +52,17 @@
                     <a-input id="inventoryQueryWarehouseDetail-unitName" v-model.trim="queryParam.unitName" allowClear placeholder="请输入单位名称"/>
                   </a-form-item>
                 </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="出入库状态">
+                    <v-select
+                      v-model="queryParam.state"
+                      ref="state"
+                      id="inventoryQueryWarehouseDetail-state"
+                      code="STOCK_FLOW_STATE"
+                      placeholder="请选择出入库状态"
+                      allowClear></v-select>
+                  </a-form-item>
+                </a-col>
               </template>
               <a-col :md="6" :sm="24">
                 <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryWarehouseDetail-refresh">查询</a-button>
@@ -80,7 +91,7 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :scroll="{ x: 1590, y: tableHeight }"
+          :scroll="{ x: 1870, y: tableHeight }"
           :defaultLoadData="false"
           bordered>
           <!-- 数量 -->
@@ -114,7 +125,8 @@ export default {
         bizType: undefined,
         flowType: undefined,
         unitName: '',
-        warehouseSn: undefined
+        warehouseSn: undefined,
+        state: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       // 加载数据方法 必须为 Promise 对象
@@ -152,15 +164,17 @@ export default {
         { title: '原厂编码', dataIndex: 'productOrigCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '批次号', dataIndex: 'stockBatchNo', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单据类型', dataIndex: 'bizTypeDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单号', dataIndex: 'bizNo', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单据审核时间', dataIndex: 'auditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位名称', dataIndex: 'unitName', width: 180, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '数量', scopedSlots: { customRender: 'qty' }, width: 80, align: 'center' },
+        { title: '出入库状态', dataIndex: 'stateDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '总售价', dataIndex: 'totalPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('B_isShowCost')) {
-        arr.splice(11, 0, { title: '总成本', dataIndex: 'totalCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(13, 0, { title: '总成本', dataIndex: 'totalCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr
     }
@@ -192,6 +206,7 @@ export default {
       this.queryParam.flowType = undefined
       this.queryParam.unitName = ''
       this.queryParam.warehouseSn = undefined
+      this.queryParam.state = undefined
       this.$refs.table.refresh(true)
     },
     //  返回列表
@@ -217,7 +232,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 230 - 52
+      this.tableHeight = window.innerHeight - tableSearchH - 230 - 62
     }
   },
   watch: {

+ 4 - 4
src/views/reportData/billingReturnReport/list.vue

@@ -70,14 +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
+              <a-button
                 style="margin-left: 10px"
                 type="primary"
                 class="button-warning"
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                id="billingReturnReportList-export">导出</a-button> -->
+                id="billingReturnReportList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 8px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -140,7 +140,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import custList from '@/views/common/custList.vue'
 import subarea from '@/views/common/subarea.js'
 import { getArea } from '@/api/data'
-import { salesReportReturnList, salesReportReturnCount } from '@/api/reportData'
+import { salesReportReturnList, salesReportReturnCount, billingReturnExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, custList, subarea, rangeDate },
   data () {
@@ -372,7 +372,7 @@ export default {
       const params = this.queryParam
       this.exportLoading = true
       _this.spinning = true
-      reportSalesReturnDetailExport(params).then(res => {
+      billingReturnExport(params).then(res => {
         this.exportLoading = false
         _this.spinning = false
         if (res.type == 'application/json') {

+ 4 - 4
src/views/reportData/returnSlipReport/list.vue

@@ -75,14 +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
+              <a-button
                 style="margin-left: 10px"
                 type="primary"
                 class="button-warning"
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                id="returnSlipReportList-export">导出</a-button> -->
+                id="returnSlipReportList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 8px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -145,7 +145,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import custList from '@/views/common/custList.vue'
 import subarea from '@/views/common/subarea.js'
 import { getArea } from '@/api/data'
-import { salesReportReturnBillList, salesReportReturnBillCount } from '@/api/reportData'
+import { salesReportReturnBillList, salesReportReturnBillCount, returnSlipExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, custList, subarea, rangeDate },
   data () {
@@ -378,7 +378,7 @@ export default {
       const params = this.queryParam
       this.exportLoading = true
       _this.spinning = true
-      reportSalesReturnDetailExport(params).then(res => {
+      returnSlipExport(params).then(res => {
         this.exportLoading = false
         _this.spinning = false
         if (res.type == 'application/json') {

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

@@ -141,6 +141,7 @@ import custList from '@/views/common/custList.vue'
 import subarea from '@/views/common/subarea.js'
 import { getArea } from '@/api/data'
 import { salesBillReportGroupByBuyerList, salesBillReportCount } from '@/api/salesBillReport'
+import { salesAmountExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate, subarea, custList },
   data () {
@@ -371,7 +372,7 @@ export default {
       const params = this.queryParam
       this.exportLoading = true
       _this.spinning = true
-      reportSalesReturnDetailExport(params).then(res => {
+      salesAmountExport(params).then(res => {
         this.exportLoading = false
         _this.spinning = false
         if (res.type == 'application/json') {

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

@@ -70,14 +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
+              <a-button
                 style="margin-left: 10px"
                 type="primary"
                 class="button-warning"
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                id="salesReturnReportList-export">导出</a-button> -->
+                id="salesReturnReportList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 8px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -141,6 +141,7 @@ import custList from '@/views/common/custList.vue'
 import subarea from '@/views/common/subarea.js'
 import { getArea } from '@/api/data'
 import { salesReportReturnRebateList, salesReportReturnRebateCount } from '@/api/reportData'
+import { salesReturnExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, custList, subarea, rangeDate },
   data () {
@@ -372,7 +373,7 @@ export default {
       const params = this.queryParam
       this.exportLoading = true
       _this.spinning = true
-      reportSalesReturnDetailExport(params).then(res => {
+      salesReturnExport(params).then(res => {
         this.exportLoading = false
         _this.spinning = false
         if (res.type == 'application/json') {

+ 4 - 4
src/views/reportData/salesReturnsReport/list.vue

@@ -81,14 +81,14 @@
                 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: 8px" @click="resetSearchForm" :disabled="disabled" id="salesReturnsReportList-reset">重置</a-button>
-              <!-- <a-button
+              <a-button
                 style="margin-left: 10px"
                 type="primary"
                 class="button-warning"
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                id="salesReturnsReportList-export">导出</a-button> -->
+                id="salesReturnsReportList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -142,7 +142,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
 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 { reportSalesReturnList, reportSalesReturnCount, salesReturnsExport } from '@/api/reportData'
 import moment from 'moment'
 export default {
   components: { STable, VSelect, rangeDate, subarea, custList },
@@ -221,7 +221,7 @@ export default {
       const params = this.queryParam
       this.exportLoading = true
       _this.spinning = true
-      oosDetailExport(params).then(res => {
+      salesReturnsExport(params).then(res => {
         this.exportLoading = false
         _this.spinning = false
         if (res.type == 'application/json') {

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

@@ -75,14 +75,14 @@
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="salesSlipReportList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="salesSlipReportList-reset">重置</a-button>
-              <!-- <a-button
+              <a-button
                 style="margin-left: 10px"
                 type="primary"
                 class="button-warning"
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                id="salesSlipReportList-export">导出</a-button> -->
+                id="salesSlipReportList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 8px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -146,6 +146,7 @@ import custList from '@/views/common/custList.vue'
 import subarea from '@/views/common/subarea.js'
 import { getArea } from '@/api/data'
 import { salesBillReportList, salesBillReportCount } from '@/api/salesBillReport'
+import { salesSlipExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate, subarea, custList },
   data () {
@@ -378,7 +379,7 @@ export default {
       const params = this.queryParam
       this.exportLoading = true
       _this.spinning = true
-      reportSalesReturnDetailExport(params).then(res => {
+      salesSlipExport(params).then(res => {
         this.exportLoading = false
         _this.spinning = false
         if (res.type == 'application/json') {

+ 27 - 3
src/views/salesManagement/pushOrderManagement/detail.vue

@@ -6,6 +6,13 @@
           <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon> 返回列表</a>
         </template>
         <template slot="extra" v-if="$hasPermissions('B_dispatchPrint')">
+          <a-button
+            key="3"
+            type="primary"
+            class="button-warning"
+            id="purchaseOrderDetail-export-btn"
+            :disabled="localDataSource.length==0"
+            @click="openExcelModal=true">导出Excel</a-button>
           <a-button
             key="2"
             type="primary"
@@ -79,6 +86,8 @@
     </a-spin>
     <!-- 分类打印 -->
     <choose-type-modal :openModal="openModal" :outBizSubSn="outBizSubSn" @ok="handleOk" @close="openModal=false" />
+    <!-- 导出Excel -->
+    <export-excel-modal :openModal="openExcelModal" :itemData="detailData" @ok="handleExcelOk" @close="openExcelModal=false" />
     <!-- 打印 -->
     <div id="print"></div>
   </div>
@@ -87,10 +96,12 @@
 <script>
 import { STable, VSelect } from '@/components'
 import chooseTypeModal from './chooseTypeModal.vue'
-import { dispatchDetaillList, dispatchFindBySn, dispatchDetailPrint } from '@/api/dispatch'
+import exportExcelModal from './exportExcelModal.vue'
+import { hdExportExcel } from '@/libs/exportExcel'
+import { dispatchDetaillList, dispatchFindBySn, dispatchDetailPrint, dispatchDetailExcel } from '@/api/dispatch'
 export default {
   name: 'SalesDetail',
-  components: { STable, VSelect, chooseTypeModal },
+  components: { STable, VSelect, chooseTypeModal, exportExcelModal },
   props: {
     outBizSubSn: { //  有值则为弹框,无值则为页面
       type: [Number, String],
@@ -146,7 +157,8 @@ export default {
       detailData: null, //  详情数据
       openModal: false,
       localDataSource: [],
-      nowPrintType: '' //  当前打印类型
+      nowPrintType: '', //  当前打印类型
+      openExcelModal: false
     }
   },
   methods: {
@@ -164,6 +176,18 @@ export default {
         }
       })
     },
+    // 导出Excel
+    handleExcelOk(priceType){
+      const _this = this
+      const params = {
+        dispatchBillSn: this.outBizSubSn || this.$route.params.sn,
+        printType: priceType
+      }
+      this.spinning = true
+      hdExportExcel(dispatchDetailExcel, params, '下推产品', function () {
+        _this.spinning = false
+      })
+    },
     // 分类选择
     handleOk (obj) {
       this.requestFun(obj)

+ 109 - 0
src/views/salesManagement/pushOrderManagement/exportExcelModal.vue

@@ -0,0 +1,109 @@
+<template>
+  <a-modal
+    centered
+    :footer="null"
+    :maskClosable="false"
+    class="export-excel-modal"
+    title="导出Excel"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="600">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="export-excel-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-form-model-item label="销售单号">{{ itemData&&itemData.salesBillNo || '--' }}</a-form-model-item>
+        <a-form-model-item label="客户名称">{{ itemData&&itemData.buyerName || '--' }}</a-form-model-item>
+        <a-form-model-item label="产品售价" prop="priceType">
+          <a-radio-group v-model="form.priceType">
+            <a-radio value="DISPATCH_BILL_PRICE">导出</a-radio>
+            <a-radio value="DISPATCH_BILL">不导出</a-radio>
+          </a-radio-group>
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="export-excel-save" @click="handleSave()">导出</a-button>
+        <a-button id="export-excel-back" @click="handleCancel" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+export default {
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemData: {
+      type: Object,
+      default: () => {
+        return null
+      }
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      form: {
+        priceType: undefined
+      },
+      rules: {
+        priceType: [{ required: true, message: '请选择产品售价', trigger: 'change' }]
+      },
+      formItemLayout: {
+        labelCol: { span: 6 },
+        wrapperCol: { span: 18 }
+      },
+      spinning: false
+    }
+  },
+  methods: {
+    // 确认
+    handleSave (isPrint) {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$emit('ok', _this.form.priceType)
+          _this.isShow = false
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    // 取消选择分类
+    handleCancel () {
+      this.isShow = false
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.$refs.ruleForm.resetFields()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .export-excel-modal{
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>