소스 검색

Merge branch 'deploy_hy1.0' of chelingzhu-web/zxyj-admin-html into master

lilei 4 년 전
부모
커밋
34efccfd61

+ 30 - 0
src/api/offPartnerGoldLog.js

@@ -0,0 +1,30 @@
+import { axios } from '@/utils/request'
+// 商户乐豆统计列表查询
+export const getOffPartnerGoldLog = (params) => {
+  const url = `/offPartnerGoldLog/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 商户乐豆总计
+export const getQueryStatistic = (params) => {
+  const url = `/offPartnerGoldLog/queryStatistic`
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 商户乐豆统计导出接口
+export const exportOffPartnerGoldLog = (params) => {
+  return axios.request({
+    url: '/offPartnerGoldLog/exportGoldLogByDay',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 9 - 1
src/api/releaseRecord.js

@@ -11,7 +11,15 @@ export const getDeliveryLogList = (params) => {
     method: 'post'
   })
 }
-
+// 导出
+export const exportDeliveryLog = (params) => {
+  return axios.request({
+    url: 'deliveryLog/exportDeliveryLog',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
 // 合计
 export const getDeliveryLogTotal = (params) => {
   const url = `deliveryLog/total`

+ 42 - 0
src/config/router.config.js

@@ -241,6 +241,38 @@ export const asyncRouterMap = [{
       }
     ]
   },
+  // {
+  //   path: '/market',
+  //   redirect: '/market/winingRecord',
+  //   component: PageView,
+  //   meta: {
+  //     title: '营销',
+  //     icon: 'gift'
+  //     // permission: 'M_winingRecord_list'
+  //   },
+  //   children: [
+  //     {
+  //       path: '/market/winingRecord',
+  //       name: 'winingRecord',
+  //       component: () => import(/* webpackChunkName: "market" */ '@/views/market/winingRecord.vue'),
+  //       meta: {
+  //         title: '中奖记录',
+  //         icon: 'file-done'
+  //         // permission: 'M_winingRecord_list'
+  //       }
+  //     },
+  //     {
+  //       path: '/market/lotterySettings',
+  //       name: 'lotterySettings',
+  //       component: () => import(/* webpackChunkName: "market" */ '@/views/market/lotterySettings.vue'),
+  //       meta: {
+  //         title: '大转盘设置',
+  //         icon: 'edit'
+  //         // permission: 'M_lotterySettings'
+  //       }
+  //     }
+  //   ]
+  // },
   {
     path: '/shopSetting',
     redirect: '/shopSetting/bannerSetting',
@@ -354,6 +386,16 @@ export const asyncRouterMap = [{
           icon: 'folder',
           permission: 'M_userManage_list'
         }
+      },
+      {
+        path: '/businessManage/leduQuery',
+        name: 'leduQuery',
+        component: () => import(/* webpackChunkName: "businessManage" */ '@/views/businessManage/leduQuery/leduQuery.vue'),
+        meta: {
+          title: '商户乐豆统计',
+          icon: 'search',
+          permission: 'M_ledouTjList'
+        }
       }
     ]
   },

+ 229 - 0
src/views/businessManage/leduQuery/leduQuery.vue

@@ -0,0 +1,229 @@
+<template>
+  <a-card :bordered="false" class="leduQuery-table-page-search-wrapper">
+    <div class="leduQuery-searchForm">
+      <a-form layout="inline" @keyup.enter.native="refresh">
+        <a-row :gutter="20">
+          <a-col :span="6">
+            <a-form-item label="交易时间:" :label-col="{ span: 7 }" :wrapper-col="{ span: 17}">
+              <a-range-picker
+                style="width:100%"
+                id="releaseRecordList-queryOrderDate"
+                :disabledDate="disabledDate"
+                v-model="queryOrderDate"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="商户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <a-input id="releaseRecordList-officialPartnerName" allowClear :maxLength="11" v-model=" queryParam.officialPartnerName" placeholder="请输入商户名称" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-button class="handle-btn serach-btn" id="releaseRecordList-serach" type="primary" @click="refresh">查询</a-button>
+            <a-button class="handle-btn" id="releaseRecordList-reset" @click="handleReset">重置</a-button>
+            <a-button class="handle-btn export-btn" id="releaseRecordList-export" v-hasPermission="'B_ledouTjExport'" :loading="loading" @click="handleExport">导出</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div class="ftext" slot="message">总计<span> {{ orderTotal }} </span>条记录,收取乐豆<span> {{ amountTotal }} </span>个</div>
+    </a-alert>
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <template slot="changeNum" slot-scope="text, record">
+        {{ text||'0' }}
+      </template>
+    </s-table>
+  </a-card>
+
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { getOffPartnerGoldLog, exportOffPartnerGoldLog, getQueryStatistic } from '@/api/offPartnerGoldLog.js'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      loading: false,
+      form: this.$form.createForm(this),
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 16 }
+      },
+      // 将默认当天时间日期回显在时间选择框中
+      queryOrderDate: [
+        moment(getDate.getRecentday().starttime, this.dateFormat),
+        moment(getDate.getRecentday().endtime, this.dateFormat)
+      ],
+      dateFormat: 'YYYY-MM-DD',
+      // 查询参数
+      queryParam: {
+        beginDate: null, // 开始时间
+        endDate: null, // 结束时间
+        officialPartnerName: '' //  用户手机
+      },
+      optionData: [],
+      orderTotal: 0,	// 总单数
+      amountTotal: 0,	// 总金额
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '商户名称', dataIndex: 'officialPartnerName', align: 'center' },
+        { title: '收取乐豆个数', scopedSlots: { customRender: 'changeNum' }, dataIndex: 'changeNum', width: 200, align: 'center' }
+        // { title: '交易时间', dataIndex: 'createDate', width: 200, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        const searchData = Object.assign(parameter, this.queryParam)
+        if (this.queryOrderDate && this.queryOrderDate.length) {
+          searchData.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
+          searchData.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
+        } else {
+          searchData.beginDate = ''
+          searchData.endDate = ''
+        }
+        return getOffPartnerGoldLog(searchData).then(res => {
+          if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+            }
+            this.getListTotal()
+            return res.data
+          }
+        })
+      }
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.handleReset()
+    })
+  },
+  methods: {
+    moment,
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 导出
+    handleExport () {
+      const params = {
+        officialPartnerName: this.queryParam.officialPartnerName
+      }
+      if (this.queryOrderDate && this.queryOrderDate.length) {
+        params.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
+        params.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
+      } else {
+        params.beginDate = ''
+        params.endDate = ''
+      }
+      if (!params.beginDate && !params.endDate) {
+        this.$message.error('请先选择需要导出的交易时间区间再进行导出!')
+        return
+      }
+      // 判断两个时间段是否相差m个月  第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
+      if (moment(params.endDate).diff(moment(params.beginDate), 'months', true) > 3) {
+        this.$message.error('单次最多只能导出3个月的数据,请缩小查询区间后再进行导出!')
+      }
+      this.loading = true
+      exportOffPartnerGoldLog(params).then(res => {
+        this.loading = false
+        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()
+    },
+    // 查询
+    refresh () {
+      this.$refs.table.refresh(true)
+    },
+    // 合计
+    getListTotal () {
+      const params = {
+        officialPartnerName: this.queryParam.officialPartnerName,
+        beginDate: this.queryParam.beginDate,
+        endDate: this.queryParam.endDate
+      }
+      if (this.queryOrderDate && this.queryOrderDate.length) {
+        params.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
+        params.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
+      } else {
+        params.beginDate = ''
+        params.endDate = ''
+      }
+      getQueryStatistic(params).then(res => {
+        if (res.status == 200) {
+          if (res.data) {
+            this.orderTotal = res.data.dataCount || 0
+            this.amountTotal = res.data.dataSum || 0
+          } else {
+            this.orderTotal = 0
+            this.amountTotal = 0
+          }
+        }
+      })
+    },
+    // 重置
+    handleReset () {
+      this.queryOrderDate = [
+        moment(getDate.getRecentday().starttime, this.dateFormat),
+        moment(getDate.getRecentday().endtime, this.dateFormat)
+      ]
+      this.queryParam.officialPartnerName = ''
+      this.$refs.table.refresh(true)
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .leduQuery-table-page-search-wrapper{
+    .leduQuery-searchForm{
+      .ant-form-inline .ant-form-item{
+        width: 100%;
+      }
+      // 搜索框的下间距
+      .ant-form-item {
+      	margin-bottom: 10px;
+      }
+      .handle-btn{
+        margin-top: 4px;
+      }
+      .serach-btn{
+        margin-right: 10px;
+      }
+    }
+    .export-btn{
+      background-color: #ff9900;
+      border-color: #ff9900;
+      color: #fff;
+      margin-left: 10px;
+    }
+    .export-btn.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger), .export-btn.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger){
+      color: #fff;
+      border-color: #ff9900;
+    }
+  }
+</style>

+ 246 - 0
src/views/market/GoodsLogistics.vue

@@ -0,0 +1,246 @@
+<template>
+  <a-modal
+    centered
+    class="modalBox"
+    :footer="null"
+    :maskClosable="false"
+    title="发货"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="1000">
+    <a-form
+      id="logistics-form"
+      :form="form"
+      ref="form"
+      v-bind="formItemLayout"
+      @submit="handleSubmit">
+      <h4>物流信息:</h4>
+      <a-form-item label="快递公司" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-select
+          id="logistics-expressName"
+          allowClear
+          v-decorator="[
+            'formData.expressName',
+            { initialValue: formData.expressName,
+              rules: [{ required: true, message: '请选择快递公司' }] },
+          ]"
+          placeholder="请选择快递公司"
+        >
+          <a-select-option v-for="(item,index) in expressCompany" :key="index" :value="item.expressName">
+            {{ item.expressName }}
+          </a-select-option>
+        </a-select>
+      </a-form-item>
+      <a-form-item label="运单编号" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-input
+          id="logistics-expressNum"
+          :maxLength="30"
+          v-decorator="[
+            'formData.expressNum',
+            { initialValue: formData.expressNum, getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入运单编号' }] }
+          ]"
+          placeholder="请输入运单编号(最多30个字符)"
+          allowClear />
+      </a-form-item>
+      <h4>收货人信息:</h4>
+      <a-form-item label="收货人姓名" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-input
+          id="network-edit-name"
+          :maxLength="30"
+          v-decorator="[
+            'formData.name',
+            { initialValue: formData.name, getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入收货人姓名' }] }
+          ]"
+          placeholder="请输入收货人姓名(最多30个字符)"
+          allowClear />
+      </a-form-item>
+      <a-form-item label="收货人电话" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+        <a-input
+          id="network-edit-name"
+          :maxLength="30"
+          v-decorator="[
+            'formData.name',
+            { initialValue: formData.name, getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入收货人电话' }] }
+          ]"
+          placeholder="请输入收货人电话"
+          allowClear />
+      </a-form-item>
+      <a-form-item label="省市区" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" required style="margin: 0;">
+        <a-row :gutter="20">
+          <!-- 地址 -->
+          <a-col span="8">
+            <a-form-item>
+              <a-select id="network-edit-provinceCode" @change="getCityList" v-decorator="['formData.provinceCode', { initialValue: formData.provinceCode, rules: [{ required: true, message: '请选择省' }] }]" placeholder="请选择省">
+                <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col span="8">
+            <a-form-item prop="cityCode">
+              <a-select id="network-edit-cityCode" v-decorator="['formData.cityCode', { initialValue: formData.cityCode, rules: [{ required: true, message: '请选择市' }] }]" @change="getAreaList" placeholder="请选择市">
+                <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col span="8">
+            <a-form-item prop="districtCode">
+              <a-select id="network-edit-districtCode" v-decorator="['formData.districtCode', { initialValue: formData.districtCode, rules: [{ required: true, message: '请选择区' }] }]" @change="areaCharged" placeholder="请选择区/县">
+                <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form-item>
+      <a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="详细地址">
+        <a-input
+          id="network-edit-address"
+          :maxLength="30"
+          v-decorator="[
+            'formData.address',
+            { initialValue: formData.address, getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入详细地址' }] }
+          ]"
+          placeholder="请输入详细地址(最多30个字符)"
+          allowClear />
+      </a-form-item>
+      <a-form-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+        <a-button type="primary" html-type="submit" id="logistics-submit" style="margin-right: 15px">保存</a-button>
+        <a-button @click="isShow=false" style="margin-left: 15px" id="logistics-close">取消</a-button>
+      </a-form-item>
+    </a-form>
+  </a-modal>
+</template>
+
+<script>
+import { VSelect } from '@/components'
+import { stationSave, stationFind, getProvince, getCityByPro, getDistrictByCity } from '@/api/station'
+import { expressCompanyQuery } from '@/api/order'
+export default {
+  name: 'GoodsLogistics',
+  components: { VSelect },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      form: this.$form.createForm(this),
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 16 }
+      },
+      formData: {
+        expressName: undefined, //  快递公司
+        expressNum: '', //  运单编号
+        provinceCode: undefined, //  省
+        provinceName: '',
+        cityCode: undefined, // 市
+        cityName: '',
+        districtCode: undefined, // 区
+        districtName: '',
+        address: '' //  详细地址
+      },
+      addrProvinceList: [], //  省下拉
+      addrCityList: [], //  市下拉
+      addrDistrictList: [], //  区下拉
+      isShow: this.openModal, //  是否填写物流信息
+      expressCompany: [] //  快递公司
+    }
+  },
+  mounted () {
+    this.getExpressCompany()
+  },
+  methods: {
+    // 获取省列表'
+    getProvinceList () {
+      getProvince().then(res => {
+        if (res.status == 200) {
+          this.addrProvinceList = res.data || []
+        } else {
+          this.addrProvinceList = []
+        }
+      })
+    },
+    // 获取城市列表
+    getCityList (val) {
+      this.addrCityList = []
+      this.addrDistrictList = []
+      this.form.setFieldsValue({ 'formData.cityCode': undefined })
+      this.form.setFieldsValue({ 'formData.districtCode': undefined })
+      this.form.setFieldsValue({ 'formData.address': '' })
+      this.getCityListRequest(val)
+    },
+    getCityListRequest (val) {
+      getCityByPro({
+        id: val
+      }).then(res => {
+        if (res.status == 200) {
+          this.addrCityList = res.data || []
+        } else {
+          this.addrCityList = []
+        }
+      })
+    },
+    // 获取区县列表
+    getAreaList (val) {
+      this.addrDistrictList = []
+      this.form.setFieldsValue({ 'formData.districtCode': undefined })
+      this.form.setFieldsValue({ 'formData.address': '' })
+      this.getAreaListRequest(val)
+    },
+    getAreaListRequest (val) {
+      getDistrictByCity({
+        id: val
+      }).then(res => {
+        if (res.status == 200) {
+          this.addrDistrictList = res.data || []
+        } else {
+          this.addrDistrictList = []
+        }
+      })
+    },
+    // 区县变更
+    areaCharged (val) {
+      this.form.setFieldsValue({ 'formData.address': '' })
+    },
+    //  物流信息  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          this.$emit('submit', values.formData)
+        }
+      })
+    },
+    //  获取快递公司
+    getExpressCompany () {
+      expressCompanyQuery({}).then(res => {
+        if (res.status == 200) {
+          this.expressCompany = res.data
+        } else {
+          this.expressCompany = []
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (val) {
+      if (!val) {
+        this.$emit('close')
+      } else {
+        this.getProvinceList()
+        this.form.resetFields()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+</style>

+ 353 - 0
src/views/market/addlotterySetModal.vue

@@ -0,0 +1,353 @@
+<template>
+  <div>
+    <a-modal
+      v-model="isShow"
+      @cancle="isShow = false"
+      :footer="null"
+      width="80%"
+      :centered="true"
+      wrapClassName="addLottery-modal"
+      :title="titleText">
+      <a-form-model
+        ref="ruleForm"
+        :model="form"
+        :layout="formLayout"
+        :rules="rules"
+        :label-col="labelCol"
+        :wrapper-col="wrapperCol"
+      >
+        <h3 class="form-titles">基础设置</h3>
+        <a-row :gutter="48">
+          <a-col :span="6">
+            <a-form-model-item ref="name" label="活动名称" prop="name">
+              <a-input id="addLottery-time" v-model="form.name" allowClear :maxLength="15" placeholder="15个字以内"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item ref="time" label="活动时间" prop="time">
+              <a-range-picker
+                id="addLottery-time"
+                v-model="form.time"
+                allowClear
+                format="YYYY-MM-DD"
+                :placeholder="['开始时间','结束时间']"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item ref="cjRc" label="抽奖人次" prop="cjRc">
+              <a-input-number
+                id="addLottery-cjRc"
+                style="width: 50%;margin-right: 20px;"
+                v-model="form.cjRc"
+                :disabled="form.bxCjRc"
+                :min="0"
+                :max="999999"
+                :precision="0"
+                placeholder="请输入抽奖人次(0~999999)"
+                allowClear />
+              <a-checkbox @change="bxCjRcChange" v-model="form.bxCjRc">
+                不限
+              </a-checkbox>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item ref="price" label="付费抽奖规则" prop="price">
+              每次抽奖需要支付
+              <a-input-number
+                id="addLottery-cjgz"
+                style="width: 30%;margin-right: 5px;"
+                v-model="form.price"
+                :min="0"
+                :max="999999"
+                :precision="0"
+                placeholder="请输入乐豆数(0~999999)"
+                allowClear />
+              乐豆
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+
+        <a-row :gutter="48">
+          <a-col :span="8">
+            <a-form-model-item ref="jpDesc" label="奖品说明" prop="jpDesc">
+              <a-input v-model="form.jpDesc" allowClear :maxLength="100" placeholder="请输入奖品说明,100字以内" type="textarea" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item ref="jpTj" label="抽奖条件" prop="jpTj">
+              <a-input v-model="form.jpTj" allowClear :maxLength="100" placeholder="请输入抽奖条件,100字以内" type="textarea" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item ref="cjDesc" label="抽奖说明" prop="cjDesc">
+              <a-input v-model="form.cjDesc" allowClear :maxLength="100" placeholder="请输入抽奖说明,100字以内" type="textarea" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+
+        <h3 class="form-titles">奖品设置</h3>
+        <a-row :gutter="48">
+          <a-col :span="24">
+            <div class="form-item">
+              <div style="margin-right: 10px;"><span class="red">*</span>请选择转盘类型</div>
+              <a-select style="width: 300px;" @change="zpTypeChange" v-model="form.zpType" placeholder="请选择转盘类型">
+                <a-select-option value="5">
+                  五等分
+                </a-select-option>
+                <a-select-option value="6">
+                  六等分
+                </a-select-option>
+              </a-select>
+            </div>
+            <div class="form-item" v-for="(item, index) in form.jpList" :key="index">
+              <div style="margin-right: 10px;"><span class="red">*</span> 奖品{{ index+1 }}</div>
+              <a-select style="width: 120px;margin-right: 5px;" v-model="item.jpType" placeholder="请选择奖品类型">
+                <a-select-option value="0">
+                  送实物
+                </a-select-option>
+                <a-select-option value="1">
+                  送乐豆
+                </a-select-option>
+                <a-select-option value="2">
+                  未中奖
+                </a-select-option>
+              </a-select>
+              <a-input style="width: 200px;margin-right: 5px;" v-model="item.name" placeholder="请输入奖品名称,10个字以内"/>
+              <a-select style="width: 120px;margin-right: 5px;" v-model="item.isZj" placeholder="是否中奖">
+                <a-select-option value="1">
+                  是
+                </a-select-option>
+                <a-select-option value="0">
+                  否
+                </a-select-option>
+              </a-select>
+              <a-input-number
+                style="width: 150px;margin-right: 5px;"
+                v-model="item.glv"
+                :min="0"
+                :max="100"
+                :precision="2"
+                placeholder="请输入中奖概率(%)"
+                allowClear />
+              <a-input-number
+                style="width: 150px;margin-right: 5px;"
+                v-model="item.nums"
+                :min="0"
+                :max="999999"
+                :precision="0"
+                placeholder="请输入奖品数量"
+                allowClear />
+              <Upload
+                class="upload"
+                v-model="item.image"
+                ref="homeImage"
+                :fileSize="0.25"
+                listType="picture-card">
+              </Upload>
+              <span class="upload-desc">请上传奖品图片,300*300px,0.25MB 以内。</span>
+            </div>
+          </a-col>
+        </a-row>
+
+        <a-row :gutter="48">
+          <a-col :span="12">
+            <div class="form-item">
+              <div style="margin-right: 10px;"><span class="red">*</span>中奖限制:</div>
+              <a-select mode="multiple" style="width: 300px;" v-model="form.zjXz" placeholder="请选择中奖限制">
+                <a-select-option value="5">
+                  中奖后抽奖XXX次内不能再次中奖
+                </a-select-option>
+                <a-select-option value="6">
+                  每天最多可中奖XXX次
+                </a-select-option>
+                <a-select-option value="6">
+                  每人最多可中奖XXX次
+                </a-select-option>
+              </a-select>
+            </div>
+            <div class="form-item">
+              <div v-for="(item,index) in form.zjXz" :key="index">
+                <a-input-number
+                  style="width: 150px;margin-right: 5px;"
+                  v-model="item.nums"
+                  :min="0"
+                  :max="100"
+                  :precision="2"
+                  placeholder="请输入中奖概率(%)"
+                  allowClear />
+              </div>
+            </div>
+          </a-col>
+          <a-col :span="12">
+            <div class="form-item">
+              <div style="margin-right: 10px;"><span class="red">*</span>赠送抽奖次数规则:</div>
+              <a-select mode="multiple" style="width: 300px;" v-model="form.cjGz" placeholder="请选择">
+                <a-select-option value="5">
+                  新用户登录送抽奖
+                </a-select-option>
+                <a-select-option value="6">
+                  用户首次投递送抽奖
+                </a-select-option>
+                <a-select-option value="6">
+                  分享给好友或朋友圈送抽奖
+                </a-select-option>
+                <a-select-option value="6">
+                  3个月内无投递记录送抽奖
+                </a-select-option>
+              </a-select>
+            </div>
+          </a-col>
+        </a-row>
+
+        <div class="form-item" style="justify-content:center;padding: 50px 20px 20px;">
+          <a-button type="primary" @click="onSubmit">
+            保存
+          </a-button>
+          <a-button style="margin-left: 10px;" @click="cansel">
+            取消
+          </a-button>
+        </div>
+      </a-form-model>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { VSelect, Upload } from '@/components'
+export default {
+  name: 'AddlotterySetModal',
+  components: {
+    VSelect,
+    Upload
+  },
+  props: {
+    showEditModal: {
+      type: Boolean,
+      default: false
+    },
+    itemId: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      isShow: this.showEditModal,
+      titleText: '新增活动',
+      formLayout: 'vertical',
+      labelCol: {},
+      wrapperCol: {},
+      form: {
+        name: '',
+        time: [],
+        cjRc: '',
+        bxCjRc: false,
+        price: '',
+        jpDesc: '',
+        jpTj: '',
+        cjDesc: '',
+        zpType: undefined,
+        jpList: [],
+        zjXz: [],
+        cjGz: []
+      },
+      rules: {
+        name: [{ required: true, message: '请输入活动名称', trigger: 'blur' }],
+        time: [{ required: true, message: '请选择活动时间', trigger: 'blur' }],
+        cjRc: [{ required: true, message: '请输入抽奖人次', trigger: 'blur' }],
+        price: [{ required: true, message: '请输入付费抽奖规则', trigger: 'blur' }],
+        jpDesc: [{ required: true, message: '请输入奖品说明', trigger: 'blur' }],
+        jpTj: [{ required: true, message: '请输入抽奖条件', trigger: 'blur' }],
+        cjDesc: [{ required: true, message: '请输入抽奖说明', trigger: 'blur' }]
+      }
+    }
+  },
+  methods: {
+    // 不限人次
+    bxCjRcChange (e) {
+      console.log(e)
+      if (e.target.checked) {
+        this.form.cjRc = ''
+      }
+    },
+    // 选择转盘类型
+    zpTypeChange (val) {
+      console.log(val)
+      const _this = this
+      for (let i = 0; i < val; i++) {
+        _this.form.jpList[i] = {
+          jpType: undefined,
+          name: '',
+          isZj: '0',
+          glv: '',
+          nums: '',
+          image: ''
+        }
+      }
+    },
+    // 保存
+    onSubmit () {
+      this.$refs.ruleForm.validate(valid => {
+        console.log(this.form)
+        if (valid) {
+          console.log('valid submit!!')
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    },
+    // 取消
+    cansel () {
+      this.isShow = false
+    },
+    // 编辑获取数据
+    getPageInfo () {
+
+    }
+  },
+  watch: {
+    showEditModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    isShow (val) {
+      if (!val) {
+        this.$emit('close')
+      } else {
+        this.$refs.ruleForm.resetFields()
+      }
+    },
+    itemId (newValue, oldValue) {
+      if (newValue && this.isShow) {
+        this.titleText = '编辑'
+        this.getPageInfo(newValue)
+      } else {
+        this.titleText = '新增'
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .addLottery-modal{
+    .form-titles{
+      border-bottom: 1px solid #eee;
+      padding-bottom: 10px;
+      margin-bottom: 20px;
+    }
+    .form-item{
+      display: flex;
+      align-items: center;
+      padding: 5px;
+    }
+    .upload-desc{
+      font-size: 12px;
+      margin-left: 10px;
+    }
+    .red{
+      color: red;
+    }
+  }
+</style>

+ 265 - 0
src/views/market/lotterySettings.vue

@@ -0,0 +1,265 @@
+<template>
+  <a-card :bordered="false" class="lotterySet-page-info">
+    <!-- 搜索框 -->
+    <div class="lotterySet-search">
+      <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="20">
+          <a-col :span="6">
+            <a-form-item label="活动名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input
+                allowClear
+                v-model="searchData.name"
+                :maxLength="30"
+                placeholder="请输入活动名称"
+                id="lotterySet-name" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="4">
+            <a-form-item label="状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select
+                code="ENABLE_FLAG"
+                v-model="searchData.state"
+                allowClear
+                placeholder="请选择状态"
+                id="lotterySet-enable-state"></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-button class="handle-btn serach-btn" style="margin-right: 10px;" type="primary" @click="$refs.table.refresh(true)" id="lotterySet-refresh">查询</a-button>
+            <a-button class="handle-btn" @click="resetForm" id="lotterySet-resetForm">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <div class="add">
+      <a-button
+        type="primary"
+        icon="plus"
+        class="addBtn"
+        @click="showModal"
+        id="lotterySet-showModal"
+      >新增</a-button>
+    </div>
+    <!-- table列表 -->
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <span slot="action" slot-scope="text, record">
+        <a-icon
+          type="edit"
+          id="lotterySet-handleEdit"
+          title="编辑"
+          class="actionBtn icon-blues"
+          @click="handleEdit(record)" />
+      </span>
+      <span slot="state" slot-scope="text, record">
+        <a-switch
+          checkedChildren="启用"
+          unCheckedChildren="禁用"
+          id="lotterySet-changeFlagHandle"
+          :checked="record.state == 1 ? true : false"
+          @change="changeFlagHandle(text, record)" />
+        <!-- <span v-if="!$hasPermissions('B_lotterySet_enable')">--</span> -->
+      </span>
+      </span>
+    </s-table>
+    <addlotterySetModal
+      :itemId="itemId"
+      :itemData="itemData"
+      :showEditModal="showEditModal"
+      @refresh="$refs.table.refresh(true)"
+      @close="cancel"></addlotterySetModal>
+  </a-card>
+</template>
+
+<script>
+import {
+  Upload,
+  STable,
+  VSelect
+} from '@/components'
+import addlotterySetModal from './addlotterySetModal.vue'
+import {
+  getGoodsClassList,
+  changeGoodsStatus
+} from '@/api/shopSetting.js'
+
+export default {
+  components: {
+    STable,
+    Upload,
+    VSelect,
+    addlotterySetModal
+  },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: { span: 7 },
+        wrapperCol: { span: 17 }
+      },
+      searchData: {
+        name: ''
+      },
+      showEditModal: false, // 默认关闭弹窗
+      itemId: null, // 编辑行id
+	    itemData: {}, // 编辑行数据
+      formLayout: 'horizontal',
+      form: this.$form.createForm(this),
+      // 表头
+      columns: [{
+        title: '序号',
+        dataIndex: 'no',
+        width: 60,
+        align: 'center'
+      },
+      {
+        title: '创建时间',
+        width: 100,
+        dataIndex: 'creatDate',
+        align: 'center'
+      },
+      {
+        title: '活动名称',
+        width: 100,
+        dataIndex: 'name',
+        align: 'center'
+      },
+      {
+        title: '活动时间',
+        width: 100,
+        dataIndex: 'goldLimit',
+        align: 'center'
+      },
+      {
+        title: '状态',
+        width: 100,
+        dataIndex: 'state',
+        align: 'center',
+        scopedSlots: {
+          customRender: 'state'
+        }
+      },
+      {
+        title: '操作',
+        align: 'center',
+        width: 100,
+        scopedSlots: {
+          customRender: 'action'
+        }
+      }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return getGoodsClassList(
+          Object.assign(parameter, this.searchData)
+        ).then(res => {
+          const no = (res.data.pageNo - 1) * res.data.pageSize
+          if (res.status == 200) {
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+            }
+            return res.data
+          }
+        })
+      }
+    }
+  },
+  beforeCreate () {
+    this.form = this.$form.createForm(this, {
+      name: 'validate_other'
+    })
+  },
+  methods: {
+    showModal () {
+      this.itemId = null
+	    this.itemData = {}
+      this.showEditModal = true
+    },
+    // 编辑
+    handleEdit (record) {
+      this.itemId = record.id
+	    this.itemData = record
+      this.showEditModal = true
+    },
+    // 重置
+    resetForm () {
+      this.searchData.name = ''
+      this.$refs.table.refresh(true)
+    },
+    //
+    cancel () {
+      this.itemId = null
+      this.showEditModal = false
+    },
+    // 更改启用禁用状态
+    changeFlagHandle (text, record) {
+      console.log(text)
+      const _this = this
+      const _data = {
+        id: record.id,
+        flag: record.state == 1 ? '0' : '1'
+      }
+      if (record.state == 1) {
+        this.$confirm({
+          title: '提示',
+          centered: true,
+          content: '商品分类被禁用后,该分类将不在显示给用户,确定禁用吗?',
+          okText: '确定',
+          cancelText: '取消',
+          onOk () {
+            changeGoodsStatus(_data).then(res => {
+              if (res.status == 200) {
+                _this.$message.success(res.message)
+                _this.$refs.table.refresh()
+              }
+            })
+          }
+        })
+      } else {
+        changeGoodsStatus(_data).then(res => {
+          if (res.status == 200) {
+            _this.$message.success(res.message)
+            _this.$refs.table.refresh()
+          } else {
+            record.state = !record.state
+          }
+        })
+      }
+    },
+    beforeRouteEnter (to, from, next) {
+      next(vm => {
+        vm.resetForm()
+      })
+    }
+  }
+}
+</script>
+
+<style lang="less">
+	.lotterySet-page-info{
+		.lotterySet-search{
+		  .ant-form-inline .ant-form-item{
+		    width: 100%;
+		  }
+		  // 搜索框的下间距
+		  .ant-form-item {
+		  	margin-bottom: 10px;
+		  }
+		  .handle-btn{
+		    margin-top: 4px;
+		  }
+		  .serach-btn{
+		    margin-right: 10px;
+		  }
+		}
+		.addBtn {
+			margin-bottom: 20px;
+		}
+	}
+
+</style>

+ 194 - 0
src/views/market/winingRecord.vue

@@ -0,0 +1,194 @@
+<template>
+  <a-card :bordered="false" class="winRecord-table-page-search-wrapper">
+    <div class="winRecord-searchForm">
+      <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="20">
+          <a-col :span="6">
+            <a-form-item label="中奖时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-range-picker
+                id="winRecord-time"
+                v-model="time"
+                :format="dateFormat"
+                :placeholder="['开始时间','结束时间']"
+                :disabledDate="disabledDate"
+                @change="onChange" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="奖品名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input id="winRecord-customerMobile" allowClear :maxLength="11" v-model="queryParam.customerMobile" placeholder="请输入奖品名称" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="4">
+            <a-form-item label="状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select
+                v-model="queryParam.orderState"
+                ref="orderState"
+                id="winRecord-status"
+                code="ORDER_STATE"
+                placeholder="请选择状态"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-button class="handle-btn serach-btn" id="winRecord-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button class="handle-btn" type="" id="winRecord-btn-reset" @click="handleReset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-icon
+          type="rocket"
+          id="winRecord-sendGood"
+          title="发货"
+          class="actionBtn icon-blues"
+          @click="sendGood(record)" />
+        <a-icon
+          type="eye"
+          id="winRecord-handleView"
+          title="详情"
+          class="actionBtn icon-green"
+          @click="handleView(record)" />
+
+      </template>
+    </s-table>
+    <!-- 物流信息 -->
+    <GoodsLogistics :openModal="openModal" @submit="handleSubmit" @close="openModal=false" />
+  </a-card>
+
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import GoodsLogistics from './GoodsLogistics.vue'
+import getDate from '@/libs/getDate.js'
+import moment from 'moment'
+import { orderList } from '@/api/order'
+export default {
+  name: 'WinRecord',
+  components: { STable, VSelect, GoodsLogistics },
+  data () {
+    return {
+      openModal: false, //  是否填写物流信息
+      formItemLayout: {
+        labelCol: { span: 7 },
+        wrapperCol: { span: 17 }
+      },
+      // 查询参数
+      queryParam: {
+        beginDate: null, // 开始时间
+        endDate: null, // 结束时间
+        customerMobile: '', //  用户手机
+        orderSn: '', //  订单编号
+        orderState: null // 订单状态
+      },
+      loading: false, // 导出loading
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '中奖时间', dataIndex: 'orderTime', width: 200, align: 'center' },
+        { title: '活动名称', dataIndex: 'customerMobile', align: 'center' },
+        { title: '奖品', dataIndex: 'orderSn', width: 200, align: 'center' },
+        { title: '中奖用户', dataIndex: 'customerMobile', width: 200, align: 'center' },
+        { title: '状态', dataIndex: 'orderStateDictValue', width: 200, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        const searchData = Object.assign(parameter, this.queryParam)
+        if (this.time && this.time.length) {
+          searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
+          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+        } else {
+          searchData.beginDate = ''
+          searchData.endDate = ''
+        }
+        return orderList(searchData).then(res => {
+          if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
+            for (let i = 0; i < res.data.list.length; i++) {
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
+              _item.status = _item.status + '' === '1'
+            }
+            return res.data
+          }
+        })
+      },
+      // 将默认当天时间日期回显在时间选择框中
+      time: [
+        moment(getDate.getToday().starttime, this.dateFormat),
+        moment(getDate.getToday().endtime, this.dateFormat)
+      ],
+      dateFormat: 'YYYY-MM-DD'
+    }
+  },
+  methods: {
+    moment,
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 创建时间change
+    onChange (dates, dateStrings) {
+      if ((dates, dateStrings)) {
+        this.queryParam.beginDate = dateStrings[0]
+        this.queryParam.endDate = dateStrings[1]
+      }
+    },
+    // 重置
+    handleReset () {
+      this.queryParam.beginDate = getDate.getToday().starttime
+      this.queryParam.endDate = getDate.getToday().endtime
+      this.time = [
+        moment(getDate.getToday().starttime, this.dateFormat),
+        moment(getDate.getToday().endtime, this.dateFormat)
+      ]
+      this.queryParam.customerMobile = ''
+      this.queryParam.orderSn = ''
+      this.queryParam.orderState = null
+      this.$refs.table.refresh(true)
+    },
+    //  查看物流详情
+    handleView (row) {
+      this.$router.push({ path: `/order/orderManage/detail/${row.id}` })
+    },
+    // 发货
+    sendGood () {
+      this.openModal = true
+    },
+    // 提交发货
+    handleSubmit () {
+
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .winRecord-table-page-search-wrapper{
+    .winRecord-searchForm{
+      .ant-form-inline .ant-form-item{
+        width: 100%;
+      }
+      // 搜索框的下间距
+      .ant-form-item {
+      	margin-bottom: 10px;
+      }
+      .handle-btn{
+        margin-top: 4px;
+      }
+      .serach-btn{
+        margin-right: 10px;
+      }
+    }
+  }
+</style>

+ 77 - 58
src/views/releaseRecord/releaseRecordList.vue

@@ -53,9 +53,7 @@
                 :showSearch="true"
                 option-filter-prop="children"
                 :filter-option="filterOption"
-                @focus="handleFocus"
-                @blur="handleBlur"
-                @change="handleChange">
+              >
                 <a-select-option v-for="item in optionData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-item>
@@ -73,9 +71,9 @@
               </div>
             </a-form-item>
           </a-col>
-        </a-row>
-        <a-row :gutter="20">
-
+          <a-col :span="4">
+            <a-button class="export-btn" id="releaseRecordList-export" v-hasPermission="'B_exportDeliveryLog'" :loading="loading" @click="handleExport">导出</a-button>
+          </a-col>
         </a-row>
       </a-form>
     </div>
@@ -130,13 +128,14 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import { getDeliveryLogList, getDeliveryLogTotal, stationList } from '@/api/releaseRecord.js'
+import { getDeliveryLogList, getDeliveryLogTotal, stationList, exportDeliveryLog } from '@/api/releaseRecord.js'
 import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 export default {
   components: { STable, VSelect },
   data () {
     return {
+      loading: false,
       form: this.$form.createForm(this),
       formItemLayout: {
         labelCol: { span: 4 },
@@ -231,57 +230,78 @@ export default {
         this.queryParam.endDate = dateStrings[1]
       }
     },
-    handleChange (value) {
-      console.log(`selected ${value}`)
-    },
-    handleBlur () {
-      console.log('blur')
-    },
-    handleFocus () {
-      console.log('focus')
-    },
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
+    // 导出
+    handleExport () {
+      const params = this.queryParam
+      if (this.queryOrderDate && this.queryOrderDate.length) {
+        params.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
+        params.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
+      } else {
+        params.beginDate = ''
+        params.endDate = ''
+      }
+      if (!params.beginDate && !params.endDate) {
+        this.$message.error('请先选择需要导出的投放时间区间再进行导出!')
+        return
+      }
+      // 判断两个时间段是否相差m个月  第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
+      if (moment(params.endDate).diff(moment(params.beginDate), 'months', true) > 3) {
+        this.$message.error('单次最多只能导出3个月的数据,请缩小查询区间后再进行导出!')
+      }
+      this.loading = true
+      exportDeliveryLog(params).then(res => {
+        this.loading = false
+        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()
+    },
     // 查询
     refresh () {
-      // const isONull = this.queryParam.goldNumStart === null
-      // const isOEmpty = this.queryParam.goldNumStart === ''
-      // const isOZero = this.queryParam.goldNumStart === 0
       const isTNull = this.queryParam.goldNumEnd === null
       const isTEmpty = this.queryParam.goldNumEnd === ''
-	  const isRNull = this.queryParam.rubbishWeightEnd === null
-	  const isREmpty = this.queryParam.rubbishWeightEnd === ''
-      // const isTZero = this.queryParam.goldNumEnd === 0
-      //    //  第一个为空(可为null可为空字符)第二个不为空
-      //    //  第一个不为空第二个为空(可为null可为空字符)
-      //    //  第一个大于第二个
-	  if ((this.queryParam.goldNumStart > this.queryParam.goldNumEnd) && !(isTNull || isTEmpty)) {
-	    this.$message.error('请输入正确的查询范围!')
-	    return
-	  }
-	  if ((this.queryParam.rubbishWeightStart > this.queryParam.rubbishWeightEnd) && !(isRNull || isREmpty)) {
-	    this.$message.error('请输入正确的查询范围!')
-	    return
-	  }
-	  this.queryParam.goldNumStart = this.queryParam.goldNumStart > 999999999 ? 999999999 : this.queryParam.goldNumStart
-	  this.queryParam.goldNumEnd = this.queryParam.goldNumEnd > 999999999 ? 999999999 : this.queryParam.goldNumEnd
-	  this.queryParam.rubbishWeightStart = this.queryParam.rubbishWeightStart > 999999999 ? 999999999 : this.queryParam.rubbishWeightStart
-	  this.queryParam.rubbishWeightEnd = this.queryParam.rubbishWeightEnd > 999999999 ? 999999999 : this.queryParam.rubbishWeightEnd
-	  this.$refs.table.refresh(true)
+      const isRNull = this.queryParam.rubbishWeightEnd === null
+      const isREmpty = this.queryParam.rubbishWeightEnd === ''
+      //  第一个为空(可为null可为空字符)第二个不为空
+      //  第一个不为空第二个为空(可为null可为空字符)
+      //  第一个大于第二个
+      if ((this.queryParam.goldNumStart > this.queryParam.goldNumEnd) && !(isTNull || isTEmpty)) {
+        this.$message.error('请输入正确的查询范围!')
+        return
+      }
+      if ((this.queryParam.rubbishWeightStart > this.queryParam.rubbishWeightEnd) && !(isRNull || isREmpty)) {
+        this.$message.error('请输入正确的查询范围!')
+        return
+      }
+      this.queryParam.goldNumStart = this.queryParam.goldNumStart > 999999999 ? 999999999 : this.queryParam.goldNumStart
+      this.queryParam.goldNumEnd = this.queryParam.goldNumEnd > 999999999 ? 999999999 : this.queryParam.goldNumEnd
+      this.queryParam.rubbishWeightStart = this.queryParam.rubbishWeightStart > 999999999 ? 999999999 : this.queryParam.rubbishWeightStart
+      this.queryParam.rubbishWeightEnd = this.queryParam.rubbishWeightEnd > 999999999 ? 999999999 : this.queryParam.rubbishWeightEnd
+      this.$refs.table.refresh(true)
     },
     // 获取合作商数据
     getStationList () {
-		  stationList().then(res => {
-			  console.log(res, '-----合作商')
-			  if (res.status == 200) {
-				  this.optionData = res.data || []
-			  }
-		  })
+      stationList().then(res => {
+        if (res.status == 200) {
+          this.optionData = res.data || []
+        }
+      })
     },
-
     // 合计
     getListTotal () {
       const params = {
@@ -310,28 +330,27 @@ export default {
             this.orderTotal = res.data.totalNum || 0
             this.amountTotal = res.data.goldNum || 0
           } else {
-			  this.orderTotal = 0
-			  this.amountTotal = 0
-		  }
+            this.orderTotal = 0
+            this.amountTotal = 0
+          }
         }
       })
     },
     // 重置
     handleReset () {
-      // this.queryOrderDate = undefined
-	  this.queryOrderDate = [
-	    moment(getDate.getRecentday().starttime, this.dateFormat),
-	    moment(getDate.getRecentday().endtime, this.dateFormat)
-	  ],
+      this.queryOrderDate = [
+        moment(getDate.getRecentday().starttime, this.dateFormat),
+        moment(getDate.getRecentday().endtime, this.dateFormat)
+      ]
       this.queryParam.customerMobile = ''
       this.queryParam.srcDeviceCode = ''
       this.queryParam.stationNo = undefined
-	  this.queryParam.rubbishType = '' // 投放类型
-	  this.queryParam.goldNumStart = '' // 兑换最小值
-	  this.queryParam.goldNumEnd = '' // 兑换最大值
+      this.queryParam.rubbishType = '' // 投放类型
+      this.queryParam.goldNumStart = '' // 兑换最小值
+      this.queryParam.goldNumEnd = '' // 兑换最大值
       this.queryParam.rubbishWeightStart = ''// 投放重量最小值
-	  this.queryParam.rubbishWeightEnd = '' // 投放重量最大值
-	  this.queryParam.deliveryWay = '' // 投放方式
+      this.queryParam.rubbishWeightEnd = '' // 投放重量最大值
+      this.queryParam.deliveryWay = '' // 投放方式
       this.$refs.table.refresh(true)
     }
   }

+ 1 - 1
vue.config.js

@@ -108,7 +108,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.16.103:8301/gc-admin/',
+        // target: 'http://192.168.16.105:8301/gc-admin/',
         target: 'https://lese.test.sxzxyj.net/gc-admin/',
         ws: false,
         changeOrigin: true,