chenrui пре 1 година
родитељ
комит
5301fa7577

+ 127 - 0
src/api/promotion.js

@@ -0,0 +1,127 @@
+import { axios } from '@/utils/request'
+
+// 经销商促销列表  分页
+export const dealerPromotionList = (params) => {
+  const url = `/promotion/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 新增促销活动
+export const dealerPromotionSave = params => {
+  return axios({
+    url: '/promotion/create',
+    data: params,
+    method: 'post'
+  })
+}
+// 获取促销活动详情
+export const dealerPromotionInfo = params => {
+  return axios({
+    url: `/promotion/findBySn/${params.sn}`,
+    data: {},
+    method: 'get'
+  })
+}
+// 修改促销活动
+export const dealerPromotionEdit = params => {
+  return axios({
+    url: '/promotion/modify',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 删除促销活动
+export const dealerPromotionDel = params => {
+  return axios({
+    url: `/promotion/delete/${params.sn}`,
+    data: {},
+    method: 'get'
+  })
+}
+
+// 获取默认仓库
+export const getDefaultWarehouse = (params) => {
+  return axios({
+    url: '/warehouse/getDefaultWithExt',
+    data: params,
+    method: 'get'
+  })
+}
+//  仓库列表  无分页 有权限
+export const queryAuthWarehouse = (params) => {
+  return axios({
+    url: '/bizuser/queryAuthWarehouse',
+    data: params,
+    method: 'get'
+  })
+}
+//  仓库列表  无分页
+export const warehouseAllList = (params) => {
+  const url = '/warehouse/queryList'
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  仓库仓位  级联数据
+export const warehouseCascadeList = (params) => {
+  const url = '/warehouse/queryListWithExt'
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 新增/编辑仓库
+export const warehouseSave = params => {
+  return axios({
+    url: '/warehouse/save',
+    data: params,
+    method: 'post'
+  })
+}
+// 删除仓库
+export const warehouseDel = params => {
+  return axios({
+    url: `/warehouse/delete/${params.sn}`,
+    data: {},
+    method: 'get'
+  })
+}
+
+//  仓位列表  有分页
+export const warehouseLocList = (params) => {
+  const url = `/warehouseLoc/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  仓位列表  无分页
+export const warehouseLocAllList = (params) => {
+  const url = '/warehouseLoc/queryList'
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 删除仓位
+export const warehouseLocDel = params => {
+  return axios({
+    url: `/warehouseLoc/delete/${params.sn}`,
+    data: {},
+    method: 'get'
+  })
+}

+ 26 - 1
src/config/router.config.js

@@ -2518,6 +2518,31 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            path: '/reportData/promotionSalesOrderReport',
+            redirect: '/reportData/promotionSalesOrderReport/list',
+            name: 'promotionSalesOrderReport',
+            component: BlankLayout,
+            meta: {
+              title: '促销销售单报表',
+              icon: 'profile'
+              // permission: 'M_promotionSalesOrderReportList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'promotionSalesOrderReportList',
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/promotionSalesOrderReport/list.vue'),
+                meta: {
+                  title: '促销销售单报表',
+                  icon: 'profile',
+                  hidden: true
+                  // permission: 'M_promotionSalesOrderReportList'
+                }
+              }
+            ]
           }
           // {
           //   path: '/reportData/allCountryCostReport',
@@ -3467,7 +3492,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'ruleSet/:type',
+                path: 'ruleSet',
                 name: 'dealerPromotionManagementRule',
                 component: () => import(/* webpackChunkName: "promotionRulesManagement" */ '@/views/promotionRulesManagement/dealerPromotions/detail.vue'),
                 meta: {

+ 72 - 67
src/views/promotionRulesManagement/dealerPromotions/addModal.vue

@@ -16,30 +16,25 @@
         :rules="rules"
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol" >
-        <a-form-model-item label="促销名称" prop="supplierSn">
-          <a-input id="promotionList-promotionName" v-model.trim="form.promotionName" allowClear placeholder="请输入促销名称(最多30个字符)" :maxLength="30"></a-input>
+        <a-form-model-item label="促销名称" prop="title">
+          <a-input id="promotionList-promotionName" v-model.trim="form.title" allowClear placeholder="请输入促销名称(最多30个字符)" :maxLength="30"></a-input>
         </a-form-model-item>
-        <a-form-model-item label="促销时间" prop="supplierSn">
+        <a-form-model-item label="促销时间" prop="activeDate">
           <a-range-picker
             style="width:100%"
             id="promotionList-basicInfo-activeDate"
             :disabledDate="disabledDate"
             v-model="form.activeDate"
             :format="dateFormat"
-            :placeholder="['开始时间', '结束时间']"></a-range-picker>
+            :placeholder="['开始时间', '结束时间']"
+            @change="onChangeDate"></a-range-picker>
         </a-form-model-item>
-        <a-form-model-item label="费用所属部门" prop="returnReason">
-          <v-select
-            v-model="form.returnReason"
-            ref="returnReason"
-            id="promotionList-basicInfo-returnReason"
-            code="SPARE_PARTS_RETURN_REASON"
-            placeholder="请选择费用所属部门"
-            allowClear></v-select>
+        <a-form-model-item label="费用所属部门" prop="expenseDepartmentSn">
+           <department style="width: 100%;" @change="departementChange" id="promotionList-basicInfo-activeDate" v-model="form.expenseDepartmentSn"></department>
         </a-form-model-item>
-        <a-form-model-item label="参与客户" prop="supplierSn">
+        <a-form-model-item label="参与客户" prop="dealerSnList">
           <a-row :gutter="15">
-            <a-col :md="5" :sm="24">
+            <a-col :md="3" :sm="24">
               <a-button type="primary" :loading="spinning" @click="handleDealerModal">选择</a-button>
             </a-col>
             <a-col :md="6" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
@@ -47,19 +42,19 @@
             </a-col>
             <a-col :md="24" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
               <div class="buyerBox">
-                <a-tag closable v-for="con in chooseDealerList" :key="con.buyerSn" @close="delBuyerName(con)">
-                  {{ con.buyerName }}
+                <a-tag closable v-for="con in chooseDealerList" :key="con.dealerSn" @close="delBuyerName(con)">
+                  {{ con.dealerName }}
                 </a-tag>
               </div>
             </a-col>
           </a-row>
         </a-form-model-item>
-        <a-form-model-item label="促销描述" prop="explainInfo">
+        <a-form-model-item label="促销描述" prop="description">
           <a-textarea
             id="promotionList"
             :maxLength="500"
             :rows="5"
-            v-model="form.explainInfo"
+            v-model="form.description"
             placeholder="请输入促销描述"
             allowClear />
         </a-form-model-item>
@@ -94,7 +89,7 @@
       width="60%"
     >
       <div class="dealerModalCon">
-        <chooseDealer ref="dealerChoose" @plAdd="handleAddDealer"></chooseDealer>
+        <chooseDealer ref="dealerChoose" pageType="dealerPromotion" @plAdd="handleAddDealer"></chooseDealer>
       </div>
     </a-modal>
   </a-modal>
@@ -102,16 +97,16 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { VSelect, Upload } from '@/components'
-import supplier from '@/views/common/supplier.js'
+import { Upload } from '@/components'
+import department from '@/views/expenseManagement/expenseReimbursement/department.js'
 import warehouse from '@/views/common/chooseWarehouse.js'
 import moment from 'moment'
 import chooseDealer from '../promotionManagement/chooseDealer'
-import { sparePartsReturnSave, sparePartsReturnInfo } from '@/api/sparePartsReturn'
+import { dealerPromotionSave, dealerPromotionInfo,dealerPromotionEdit } from '@/api/promotion'
 export default {
   name: 'PromotionListBasicInfoModal',
   mixins: [commonMixin],
-  components: { VSelect, Upload, supplier, warehouse, chooseDealer },
+  components: { Upload, department, warehouse, chooseDealer },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -131,31 +126,42 @@ export default {
         wrapperCol: { span: 16 }
       },
       form: {
-        promotionName: '',
+        title: '',
         activeDate: undefined,
-        supplierSn: undefined, // 供应商
-        returnReason: '', // 退货原因
-        explainInfo: '', // 补充说明
-        warehouseSn: undefined,
-        attachmentList: ''
+        expenseDepartmentSn:undefined,//费用所属部门
+        description: '', // 活动描述
+        attachmentList: '',//附件
+        dealerSnList:[]//参与客户
       },
       openDealerModal: false,
       chooseDealerList: [],
       attachList: [], // 附件
       dateFormat: 'YYYY-MM-DD',
       rules: {
-        supplierSn: [
-          { required: true, message: '请选择供应商名称', trigger: 'change' }
-        ],
-        returnReason: [
-          { required: true, message: '请选择退货原因', trigger: 'change' }
-        ],
-        warehouseSn: [{ required: true, message: '请选择退货仓库', trigger: 'change' }]
+        title:[{ required: true, message: '请输入促销名称', trigger: 'blur' }],
+        activeDate:[{ required: true, message: '请选择促销时间', trigger: 'change' } ],
+        expenseDepartmentSn: [{ required: true, message: '请选择费用所属部门', trigger: 'change' }],
+        dealerSnList: [{ required: true, message: '请选择参与客户', trigger: 'change' }],
+        description:[{ required: true, message: '请输入促销描述', trigger: 'blur' }]
       },
       attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo'
     }
   },
   methods: {
+    //选择活动时间
+    onChangeDate(date, dateString){
+      this.form.activeDate = date
+      if (dateString[0] != '' && dateString[1] != '') {
+       this.form.promotionDateStart = dateString[0] + ' 00:00:00'
+        this.form.promotionDateEnd = dateString[1] + ' 23:59:59'
+      }
+    },
+    //费用所属部门
+    departementChange () {
+      this.$nextTick(() => {
+        this.$refs.ruleForm.validateField('expenseDepartmentSn')
+      })
+    },
     //  附件上传
     changeAttach (file) {
       this.attachList = JSON.parse(file)
@@ -168,37 +174,43 @@ export default {
       this.openDealerModal = true
       const _this = this
       if (_this.chooseDealerList.length == 0) {
-        _this.form.promoBuyerList = []
+        _this.form.dealerSnList = []
       }
       const arr = _this.chooseDealerList.map(item => {
-        return item.buyerSn
+        return item.dealerSn
       })
-      // 选择经销商回显
+      // 选择参与客户回显
       _this.$nextTick(() => {
         _this.$refs.dealerChoose.pageInit(arr)
       })
     },
+    // 删除所选参与客户
+    delBuyerName (row) {
+      const pot = this.chooseDealerList.findIndex(con => { return con.dealerSn == row.dealerSn })
+      this.chooseDealerList.splice(pot, 1)
+    },
     // 添加经销商
     handleAddDealer (list) {
-      this.chooseDealerList = list.map(con => {
-        return {
-          buyerSn: con.dealerSn,
-          buyerName: con.dealerName
-        }
-      })
+      this.chooseDealerList = list
       this.openDealerModal = false
       // 移除表单必填项
-      this.$refs.ruleForm.clearValidate('promoBuyerList')
+      this.$refs.ruleForm.clearValidate('dealerSnList')
     },
-    //  保存
+    //  新增/编辑
     handleSave () {
       const _this = this
+      const newArr = this.chooseDealerList.map(item => {
+        return item.dealerSn
+      })
+      _this.form.dealerSnList = newArr
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const form = JSON.parse(JSON.stringify(_this.form))
           form.attachmentList = _this.attachList
+          delete form.activeDate
           _this.spinning = true
-          sparePartsReturnSave(form).then(res => {
+          const ajaxName = _this.itemSn?dealerPromotionEdit:dealerPromotionSave
+          ajaxName(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               setTimeout(() => {
@@ -217,23 +229,19 @@ export default {
     },
     // 获取编辑详情
     getDetail () {
-      sparePartsReturnInfo({ sn: this.itemSn }).then(res => {
+      dealerPromotionInfo({ sn: this.itemSn }).then(res => {
         if (res.status == 200) {
-          const resultObj = res.data
-          this.attachList = resultObj.attachmentList
-          const obj = {
-            supplierSn: resultObj.supplierSn,
-            returnReason: resultObj.returnReason, // 退货原因
-            explainInfo: resultObj.explainInfo, // 补充说明
-            warehouseSn: resultObj.warehouseSn,
-            sparePartsReturnSn: this.itemSn
+          const data = res.data
+          this.chooseDealerList = data.dealerList
+          data.dealerSnList = data.dealerSnList
+          data.activeDate = [data.promotionDateStart, data.promotionDateEnd]
+          if(data.attachmentList){
+            this.attachList = data.attachmentList
+            this.$nextTick(() => {
+              this.$refs.attachList.setFileList(this.attachList)
+            })
           }
-          this.$nextTick(() => {
-            this.$refs.attachList.setFileList(this.attachList)
-          })
-          this.form = { ...this.form, ...obj }
-        } else {
-          this.detailsData = null
+          this.form = data
         }
       })
     },
@@ -252,7 +260,7 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.attachList = []
-        this.supplierName = null
+        this.chooseDealerList = []
         this.$nextTick(() => {
           this.$refs.attachList.setFileList('')
           this.$refs.ruleForm.resetFields()
@@ -260,9 +268,6 @@ export default {
       } else {
         if (this.itemSn) {
           this.getDetail()
-        } else {
-          // 默认仓库
-          this.form.warehouseSn = this.isShowWarehouse ? undefined : this.defWarehouse && this.defWarehouse.warehouseSn
         }
       }
     }

+ 20 - 7
src/views/promotionRulesManagement/dealerPromotions/detail.vue

@@ -13,8 +13,10 @@
       <!-- 基础信息 -->
       <a-card size="small" title="基础信息" :bordered="false" v-show="!isShowBisiceInfo" class="salesDetail-cont">
         <a-descriptions size="small" :column="3" v-if="detailData">
-          <a-descriptions-item label="促销名称">{{ detailData.salesBillNo || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="促销时间">{{ detailData.salesBillNo || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="促销名称">{{ detailData.title || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="促销时间" v-if="detailData.promotionDateStart&& detailData.promotionDateEnd">{{ detailData.promotionDateStart }}-{{ detailData.promotionDateEnd }}</a-descriptions-item>
+          <a-descriptions-item label="促销时间" v-else>--</a-descriptions-item>
+
           <a-descriptions-item :span="2" label="促销品费用归属品牌">{{ detailData.createDate || '--' }}all是积分兑换更好地给好的坤哥电饭锅快递费给对方看个房<span class="link-bule btn-box" @click="handleSeeDetail('brand')">详情</span></a-descriptions-item>
           <a-descriptions-item label="费用所属部门">{{ detailData.buyerName || '--' }}</a-descriptions-item>
           <a-descriptions-item label="参与客户">{{ detailData.buyerName || '--' }}<span class="link-bule btn-box" @click="handleSee">查看</span></a-descriptions-item>
@@ -22,11 +24,22 @@
 
           <a-descriptions-item label="促销描述" :span="3">
             <div class="flex">
-              <div>{{ detailData.salesBillExtEntity&&detailData.salesBillExtEntity.shippingAddrProvinceName || '' }}</div>
+              <div>{{ detailData.description || '' }}</div>
               <span class="link-bule btn-box">查看全部</span>
             </div>
           </a-descriptions-item>
-          <a-descriptions-item label="附件"><a class="link-bule" target="downloadFile" download>{{ detailData.billStatusDictValue || '--' }}</a></a-descriptions-item>
+          <a-descriptions-item label="附件">
+            <div v-if="detailData.attachmentList&&detailData.attachmentList.length>0">
+              <a
+                class="link-bule"
+                target="downloadFile"
+                :href="item.filePath"
+                v-for="item in detailData.attachmentList"
+                :key="item.id"
+                download>{{ item.fileName }}</a>
+            </div>
+            <span v-else>--</span>
+          </a-descriptions-item>
         </a-descriptions>
       </a-card>
       <a-card size="small" title="规则设置" :bordered="false" class="pages-wrap">
@@ -104,7 +117,7 @@ import detailModal from './detailModal'
 import sendProductsModal from './sendProductsModal'
 import sendAmountModal from './sendAmountModal'
 import specialOfferModal from './specialOfferModal'
-import { queryPageForWarehouseDetail, salesDetailBySn } from '@/api/sales'
+import { queryPageForWarehouseDetail, dealerPromotionInfo } from '@/api/promotion'
 export default {
   name: 'SalesOrderWarehouseDetail',
   mixins: [commonMixin],
@@ -168,9 +181,9 @@ export default {
     },
     //  详情
     getDetail () {
-      salesDetailBySn({ salesBillSn: '559837590779535360' }).then(res => {
+      dealerPromotionInfo({ sn: this.$route.query.sn }).then(res => {
         if (res.status == 200) {
-          this.$refs.table.refresh(true)
+          // this.$refs.table.refresh(true)
           this.detailData = res.data || null
         } else {
           this.detailData = null

+ 26 - 21
src/views/promotionRulesManagement/dealerPromotions/list.vue

@@ -12,7 +12,7 @@
             </a-col>
             <a-col :md="5" :sm="24">
               <a-form-item label="促销名称">
-                <a-input id="promotionList-promotionName" v-model.trim="queryParam.promotionName" allowClear placeholder="请输入促销名称"/>
+                <a-input id="promotionList-title" v-model.trim="queryParam.title" allowClear placeholder="请输入促销名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="5" :sm="24">
@@ -75,18 +75,23 @@
         bordered>
         <!-- 促销名称 -->
         <template slot="promotionName" slot-scope="text, record">
-          <div class="link-bule nameBox text-overflows2" @click="handleDetail(record)">{{ record.promotionName }}名字</div>
+          <div class="link-bule nameBox text-overflows2" @click="handleDetail(record)">{{ record.title }}</div>
+        </template>
+        <!-- 促销时间-->
+        <template slot="promotionTime" slot-scope="text, record">
+          <div>{{ record.promotionDateStart }}-{{ record.promotionDateEnd }}</div>
         </template>
         <!-- 参与客户 -->
         <template slot="joinCustomers" slot-scope="text, record">
-          <div @click="handleCustomers(record)">共有<span style="color:#39f;vertical-align:top;">6</span>个客户</div>
+          <div @click="handleCustomers(record)">共有<span style="color:#39f;vertical-align:top;">{{ record.dealerSnList?record.dealerSnList.length:0 }}</span>个客户</div>
         </template>
         <!-- 发布状态 -->
         <template slot="releaseStatus" slot-scope="text, record">
           <a-switch
+            v-if="record.enabledFlag"
             id="promotionList-enable"
             @change="changeStatus(record)"
-            :checked="record.loginFlag == 1 ? true : false"></a-switch>
+            :checked="record.enabledFlag == 1 ? true : false"></a-switch>
         </template>
         <!-- 操作 -->
         <!-- state 待提交 WAIT_SUBMIT 待审核 WAIT_AUDIT 未开始 NO_START 进行中 A_FOOT 已完结 FINISH 审核不通过 AUDIT_REJECT -->
@@ -140,7 +145,7 @@
     <!-- 参与客户 -->
     <lookUp-customers-modal ref="lookUpCustomers" :openModal="openCustomerModal" @close="openCustomerModal = false"></lookUp-customers-modal>
     <!-- 新增/编辑弹窗-->
-    <add-modal v-drag :openModal="openModal" @ok="handleOk" @close="openModal=false" />
+    <add-modal v-drag :itemSn="itemSn" :openModal="openModal" @ok="handleOk" @close="openModal=false" />
     <!-- 促销时间变更 -->
     <edit-active-end-time v-drag :openModal="editEndModal" @ok="handleEditOk" @close="editEndModal=false" />
   </a-card>
@@ -159,7 +164,7 @@ import reportModal from '@/views/common/reportModal.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
 import supplier from '@/views/common/supplier.js'
 import warehouse from '@/views/common/chooseWarehouse.js'
-import { sparePartsReturnList, sparePartsReturnDelete, sparePartsReturnExportDetail, againSubmit } from '@/api/sparePartsReturn'
+import { dealerPromotionList, dealerPromotionDel, sparePartsReturnExportDetail, againSubmit } from '@/api/promotion'
 export default {
   name: 'PromotionManagementList',
   mixins: [commonMixin],
@@ -179,19 +184,17 @@ export default {
       queryParam: {
         beginDate: undefined,
         endDate: undefined,
-        sparePartsReturnNo: undefined,
-        supplierSn: undefined,
-        returnReason: undefined,
-        warehouseSn: undefined, // 仓库
+        title: '',
+        publishStatus: undefined, // 发布状态
         state: undefined
       },
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '促销名称', scopedSlots: { customRender: 'promotionName' }, width: '14%', align: 'center' },
-        { title: '促销时间', dataIndex: 'auditDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '参与客户', scopedSlots: { customRender: 'joinCustomers' }, width: '9%', align: 'center', ellipsis: true },
-        { title: '促销描述', dataIndex: 'returnReasonDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '促销时间', scopedSlots: { customRender: 'promotionTime' }, width: '15%', align: 'center' },
+        { title: '参与客户', scopedSlots: { customRender: 'joinCustomers' }, width: '12%', align: 'center', ellipsis: true },
+        { title: '促销描述', dataIndex: 'description', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '活动状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '发布状态', scopedSlots: { customRender: 'releaseStatus' }, width: '9%', align: 'center', ellipsis: true },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
@@ -200,7 +203,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return sparePartsReturnList(Object.assign(parameter, this.queryParam)).then(res => {
+        return dealerPromotionList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -215,15 +218,14 @@ export default {
         })
       },
       itemSnSh: null,
-      itemSn: null, // 采购退货SN
+      itemSn: null, // 经销商促销活动SN
       auditTime: null// 审核时间
     }
   },
   methods: {
     //  详情
     handleDetail (row) {
-      // this.$router.push({ path: `/dealerManagement/promotionManagement/detail/${row.salesBillSn}/${row.warehouseSn}` })
-      this.$router.push({ path: `/promotionRulesManagement/dealerPromotions/detail` })
+      this.$router.push({ name: 'dealerPromotionManagementDetail', query: { sn: row.promotionSn } })
     },
     // 创建时间
     dateChange (date) {
@@ -245,6 +247,7 @@ export default {
     },
     //  新增
     handleAdd () {
+      this.itemSn = null
       this.openModal = true
     },
     // 参与客户
@@ -255,12 +258,14 @@ export default {
       // })
     },
     //  基本信息  保存
-    handleOk (row) {
-      this.$router.push({ name: 'promotionListAdd', query: { returnSn: row.sparePartsReturnSn, no: row.sparePartsReturnNo, sn: row.supplierSn } })
+    handleOk () {
+      this.itemSn = null
+      this.resetSearchForm()
     },
     //  编辑
     handleEdit (row) {
-      this.$router.push({ name: 'promotionListEdit', query: { returnSn: row.sparePartsReturnSn, no: row.sparePartsReturnNo, sn: row.supplierSn } })
+      this.openModal = true
+      this.itemSn = row.promotionSn
     },
     // 发布状态
     changeStatus (record) {
@@ -372,7 +377,7 @@ export default {
         centered: true,
         onOk () {
           _this.spinning = true
-          sparePartsReturnDelete({ sn: row.sparePartsReturnSn }).then(res => {
+          dealerPromotionDel({ sn: row.promotionSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()

+ 8 - 0
src/views/promotionRulesManagement/promotionManagement/chooseDealer.vue

@@ -4,6 +4,11 @@
     <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="15">
+          <a-col :md="8" :sm="24" v-if="pageType=='dealerPromotion'">
+            <a-form-model-item label="地区">
+              <AreaList id="viewDealers-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+            </a-form-model-item>
+          </a-col>
           <a-col :md="8" :sm="24">
             <a-form-item label="经销商名称/别名">
               <a-input id="chooseDealer-nameLike" v-model.trim="queryParam.nameLike" allowClear placeholder="请输入经销商名称/别名"/>
@@ -197,6 +202,9 @@ export default {
       }
       if (this.pageType != 'viewDealers') {
         this.$refs.subarea.clearData()
+        if (this.pageType == 'dealerPromotion') {
+          this.$refs.areaList.clearData()
+        }
       } else {
         this.$refs.areaList.clearData()
       }

+ 501 - 0
src/views/reportData/promotionSalesOrderReport/list.vue

@@ -0,0 +1,501 @@
+<template>
+  <a-card size="small" :bordered="false" class="promotionSalesOrderReport-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="销售日期">
+                <rangeDate ref="rangeDate" :value="salesDate" @change="salesDateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="促销时间">
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="促销名称">
+                <a-input id="promotionSalesOrderReport-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入促销名称"/>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="促销类型">
+                  <v-select
+                    v-model="queryParam.printStatus"
+                    ref="printStatus"
+                    id="promotionSalesOrderReport-printStatus"
+                    code="PRINT_STATUS"
+                    placeholder="请选择促销类型"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="销售单号">
+                  <a-input id="promotionSalesOrderReport-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入销售单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="客户级别">
+                  <v-select
+                    v-model="queryParam.dealerLevel"
+                    ref="dealerLevel"
+                    id="actualSalesReportList-allocateTypeSn"
+                    code="DEALER_LEVEL"
+                    placeholder="请选择客户级别"
+                    allowClear></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="客户名称">
+                  <a-input id="promotionSalesOrderReport-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入客户名称"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="所在区域">
+                  <subarea ref="subarea" id="promotionSalesOrderReport-subarea" @change="subareaChange"></subarea>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="地区" prop="shippingAddrProvinceSn">
+                  <Area id="promotionSalesOrderReport-shippingAddrProvinceSn" v-model="queryParam.shippingAddrProvinceSn" placeholder="请选择省"></Area>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="操作员">
+                  <a-select
+                    id="promotionSalesOrderReport-creatorId"
+                    allowClear
+                    v-model="queryParam.creatorId"
+                    placeholder="请选择操作员"
+                    :showSearch="true"
+                    option-filter-prop="children"
+                    :filter-option="filterOption">
+                    <a-select-option v-for="item in operatorList" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+                <a-button
+                  style="margin-left: 10px"
+                  type="primary"
+                  class="button-warning"
+                  @click="handleExport"
+                  :disabled="disabled"
+                  :loading="exportLoading"
+                  v-if="$hasPermissions('B_sales_export')"
+                >导出</a-button>
+                <a @click="advanced=!advanced" style="margin-left: 8px">
+                  {{ advanced ? '收起' : '展开' }}
+                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                </a>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+75+'px'}"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x:1890, y: tableHeight}"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 销售单号 -->
+        <template slot="salesBillNo" slot-scope="text, record">
+          <div v-if="$hasPermissions('B_salesDetail')">
+            <a-badge :count="'改'+record.changeTimes" :offset="[16,-13]" v-if="record.changeTimes>0" class="badge-con-t">
+              <span class="link-bule" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
+            </a-badge>
+            <span v-else class="link-bule" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
+          </div>
+          <div v-else>{{ record.salesBillNo }}</div>
+        </template>
+        <template slot="footer">
+          <a-row>
+            <a-col span="2">合计:</a-col>
+            <a-col span="22">
+              <a-row>
+                <a-col span="3">数量:{{ (totalData && (totalData.beginQty || totalData.beginQty==0)) ? totalData.beginQty : '--' }}</a-col>
+                <a-col span="3">实售价:{{ (totalData && (totalData.beginAmount || totalData.beginAmount==0)) ? toThousands(totalData.beginAmount) : '--' }}</a-col>
+                <a-col span="3">开单价:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount) : '--' }}</a-col>
+                <a-col span="3">成本:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount) : '--' }}</a-col>
+                <a-col span="3">毛利:{{ (totalData && (totalData.endQty || totalData.endQty==0)) ? toThousands(totalData.endQty) : '--' }}</a-col>
+                <a-col span="4">返利:{{ (totalData && (totalData.endPrice || totalData.endPrice==0)) ? toThousands(totalData.endPrice) : '--' }}</a-col>
+                <a-col span="3">损失总费用:{{ (totalData && (totalData.endAmount || totalData.endAmount==0)) ? toThousands(totalData.endAmount) : '--' }}</a-col>
+              </a-row>
+            </a-col>
+          </a-row>
+        </template>
+      </s-table>
+    </a-spin>
+    <!-- 导出提示框 -->
+    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+  </a-card>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+import subarea from '@/views/common/subarea.js'
+import Area from '@/views/common/area.js'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { STable, VSelect } from '@/components'
+import commonModal from '@/views/common/commonModal.vue'
+// import chooseCustomModal from './chooseCustomModal.vue'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import reportModal from '@/views/common/reportModal.vue'
+import { salesList, salesDel, salesCount } from '@/api/sales'
+import { hdExportExcel } from '@/libs/exportExcel'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
+import { findBySalesBillSn, dispatchBatchPrintStatus, queryBySalesBillSn } from '@/api/dispatch'
+import { salesDetailExport } from '@/api/salesBillReport'
+export default {
+  name: 'SalesQueryList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, dealerSubareaScopeList, Area, rangeDate, subarea, commonModal, reportModal, chooseWarehouse },
+  data () {
+    return {
+      spinning: false,
+      advanced: true, // 高级搜索 展开/关闭
+      disabled: false, //  查询、重置按钮是否可操作
+      openModal: false, // 选择客户弹框是否显示
+      showTipModal: false, // 备货打印弹框
+      showExport: false,
+      exportLoading: false,
+      tableHeight: 0,
+      salesDate: [
+        moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+      ],
+      time: [
+        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+      ],
+      // 查询参数
+      queryParam: {
+        beginDate: getDate.getThreeMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
+        buyerSn: undefined, //  客户名称
+        salesBillNo: '', //  销售单号
+        purchaseBillNo: '',
+        printStatus: undefined,
+        billStatus: undefined, //  业务状态
+        financialStatus: undefined, //  财务状态
+        salesBillSource: undefined,
+        dealerLevel: undefined,
+        subareaArea: {
+          subareaSn: undefined,
+          subareaAreaSn: undefined
+        },
+        shippingAddrProvinceSn: undefined,
+        warehouseSn: undefined
+      },
+      totalData: {
+        totalAmount: 0,
+        totalCategory: 0,
+        totalQty: 0,
+        totalRecord: 0,
+        totalPushedQty: 0,
+        totalDispatchQty: 0,
+        totalCancelQty: 0,
+        totalUnpushedQty: 0,
+        totalPushedAmount: 0,
+        totalCancelAmount: 0,
+        totalUnpushedAmount: 0,
+        totalDispatchAmount: 0
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        delete parameter.tableId
+        delete parameter.index
+        // 查询总计
+        salesCount(Object.assign(parameter, this.queryParam)).then(res => {
+          this.totalData = Object.assign(this.totalData, res.data || {})
+        })
+        return salesList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      showCancelNum: false, //  是否显示取消数量和待下推数量
+      tipData: null, // 备货单信息
+      tempSalesBillSn: null,
+      // 允许备货打印
+      selectedRowKeys: []
+    }
+  },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '促销名称', dataIndex: 'buyerName', width: '160px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left', ellipsis: true },
+        { title: '促销时间', dataIndex: 'createDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
+        { title: '费用所属部门', dataIndex: 'submitDate', width: '180px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true, fixed: 'left' },
+        { title: '促销类型', dataIndex: 'auditDate', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
+        { title: '规则', scopedSlots: { customRender: 'warehouseBox' }, width: '160px', align: 'center', fixed: 'left' },
+        { title: '销售单号', scopedSlots: { customRender: 'warehouseBox' }, width: '100px', align: 'center', fixed: 'left' },
+        { title: '客户名称', dataIndex: 'buyerName', width: '100px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户级别', dataIndex: 'buyerName', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售日期', dataIndex: 'buyerName', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总数量', dataIndex: 'totalPushedQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '开单金额', dataIndex: 'totalAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '成本金额', dataIndex: 'totalAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '实售金额', dataIndex: 'totalAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '损失费用', dataIndex: 'totalAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '毛利', dataIndex: 'totalAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '操作员', dataIndex: 'auditDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '箭牌', dataIndex: 'lastStockUpDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '促销品费用归属品牌', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '促销品费用归属分类', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    //  导出
+    handleExport () {
+      const _this = this
+      _this.$store.state.app.curActionPermission = 'B_sales_export'
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(salesDetailExport, _this.queryParam, '销售明细', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+        _this.showExport = true
+        _this.$store.state.app.curActionPermission = ''
+      })
+    },
+    salesDateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    //  时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    custChange (val) {
+      this.queryParam.buyerSn = val.key
+    },
+    subareaChange (val) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
+    },
+    // 新增
+    handleAdd () {
+      this.openModal = true
+    },
+    // 选择客户成功
+    chooseCustomOk (data) {
+      this.$router.push({ name: 'salesAdd', params: { sn: data.salesBillSn } })
+    },
+    // 下推
+    handleDispatch (row) {
+      this.spinning = true
+      findBySalesBillSn({ salesBillSn: row.salesBillSn }).then(res => {
+        this.spinning = false
+        if (res.status == 200) {
+          this.$router.push({ name: 'waitDispatch', params: { salesBillSn: row.salesBillSn } })
+        }
+      })
+    },
+    // 详情
+    handleDetail (row) {
+      this.$router.push({ name: 'salesDetail', params: { sn: row.salesBillSn } })
+    },
+    // 审核
+    handleDetailAudit (row) {
+      this.$router.push({ name: 'salesDetailAudit', params: { sn: row.salesBillSn } })
+    },
+    // 编辑
+    handleEdit (row) {
+      this.$router.push({ name: 'salesEdit', params: { sn: row.salesBillSn } })
+    },
+    // 删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: row.salesBillSource == 'PURCHASE' ? '确认要取消吗?' : '确认要删除吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.spinning = true
+          salesDel({ salesBillSn: row.salesBillSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
+    // 允许备货打印
+    handlePrint (row) {
+      // 获取关联的下推单
+      this.tempSalesBillSn = row.salesBillSn
+      queryBySalesBillSn({ salesBillSn: row.salesBillSn }).then(res => {
+        this.tipData = res.data || []
+        this.tipData.map(item => {
+          item.key = item.dispatchBillSn
+          if (item.printStatus == 'UNABLE_PRINT') {
+            this.selectedRowKeys.push(item.dispatchBillSn)
+          }
+        })
+        this.showTipModal = true
+      })
+    },
+    canselModal () {
+      this.tipData = null
+      this.showTipModal = false
+      this.tempSalesBillSn = null
+      this.selectedRowKeys = []
+    },
+    onSelectChange (selectedRowKeys) {
+      this.selectedRowKeys = selectedRowKeys
+    },
+    // 允许备货打印状态
+    updatePrintStatus () {
+      const isOne = this.tipData.length
+      if (isOne > 1 && this.selectedRowKeys.length == 0) {
+        this.$message.info('请选择备货单!')
+        return
+      }
+      const dispatchBillSnList = []
+      this.tipData.map(item => {
+        dispatchBillSnList.push(item.dispatchBillSn)
+      })
+
+      const params = {
+        'salesBillSn': this.tempSalesBillSn,
+        'dispatchBillSnList': isOne > 1 ? this.selectedRowKeys : dispatchBillSnList,
+        'printStatus': 'NO_PRINT'
+      }
+      dispatchBatchPrintStatus(params).then(res => {
+        if (res.status == 200) {
+          this.canselModal()
+          this.$message.info(res.message)
+          this.$refs.table.refresh()
+        }
+      })
+    },
+    // 重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.$refs.dealerSubareaScopeList.resetForm()
+      this.queryParam.buyerSn = undefined
+      this.queryParam.salesBillNo = ''
+      this.queryParam.purchaseBillNo = ''
+      this.queryParam.printStatus = undefined
+      this.queryParam.billStatus = undefined
+      this.queryParam.financialStatus = undefined
+      this.queryParam.salesBillSource = undefined
+      this.queryParam.subareaArea.subareaSn = undefined
+      this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.shippingAddrProvinceSn = undefined
+      this.queryParam.warehouseSn = undefined
+      if (this.advanced) {
+        this.$refs.subarea.clearData()
+      }
+      this.$refs.table.refresh(true)
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 290
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      console.log(newValue)
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+<style lang="less" scoped>
+  .promotionSalesOrderReport-wrap{
+    .sTable{
+      margin-top: 10px;
+      .badge-con-t{
+        .ant-badge-count{
+          transform: scale(0.8);
+          font-size: 13px;
+        }
+      }
+      .warehouse_box{
+        width: 100%;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+      }
+      // .warehouse_box>span::after{
+      //   content:',';
+      // }
+      // .warehouse_box>span:last-child::after{
+      //   content:'';
+      // }
+    }
+  }
+</style>

+ 2 - 2
vue.config.js

@@ -108,9 +108,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.111/ocs-admin',
+        target: 'http://192.168.2.117:80/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
+        // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {