浏览代码

迭代54页面

chenrui 3 月之前
父节点
当前提交
ab67b38cfa

二进制
public/templ/产品补贴金额导入模板.xlsx


+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1739782256753
+  "version": 1741253647527
 }

+ 20 - 0
src/components/index.less

@@ -409,6 +409,26 @@
     }
   }
 }
+// modal弹窗查询样式
+.edit-search-modal{
+  .table-page-search-wrapper{
+    margin-bottom: 6px;
+    .ant-form.ant-form-inline .ant-form-item .ant-input, .ant-form.ant-form-inline .ant-form-item .ant-select-selection{
+      border:0;
+      box-shadow: none !important;
+    }
+    .ant-form.ant-form-inline .ant-form-item{
+      border:1px solid #dadada;
+      border-radius: 3px;
+      overflow: hidden;
+      margin-bottom: 10px!important;
+      .ant-form-item-label{
+        padding-left: 11px;
+        padding-right: 0!important;
+      }
+    }
+  }
+}
 // 确认框居中
 .confirm-center{
   .ant-modal-confirm-body > .anticon + .ant-modal-confirm-title + .ant-modal-confirm-content{

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

@@ -879,6 +879,31 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/numsGoodsShelves/customerAccount',
+            redirect: '/numsGoodsShelves/customerAccount/list',
+            name: 'customerAccount',
+            component: BlankLayout,
+            meta: {
+              title: '客户账户',
+              icon: 'monitor'
+              // permission: 'M_customerAccountList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'customerAccountList',
+                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/customerAccount/list.vue'),
+                meta: {
+                  title: '客户账户列表',
+                  icon: 'monitor',
+                  hidden: true
+                  // permission: 'M_customerAccountList'
+                }
+              }
+            ]
+          },
           {
             path: '/numsGoodsShelves/easyPassShopping',
             redirect: '/numsGoodsShelves/easyPassShopping/index',
@@ -3547,6 +3572,31 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/promotionManagement/rechargeSettings',
+            redirect: '/promotionManagement/rechargeSettings/list',
+            name: 'rechargeSettings',
+            component: BlankLayout,
+            meta: {
+              title: '充值设置',
+              icon: 'contacts'
+              // permission: 'M_rechargeSettingsList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'rechargeSettingsList',
+                component: () => import(/* webpackChunkName: "promotionManagement" */ '@/views/promotionManagement/rechargeSettings/list.vue'),
+                meta: {
+                  title: '充值设置',
+                  icon: 'contacts',
+                  hidden: true
+                  // permission: 'M_rechargeSettingsList'
+                }
+              }
+            ]
+          },
           {
             path: '/promotionManagement/couponDetails',
             redirect: '/promotionManagement/couponDetails/list',

+ 166 - 0
src/views/numsGoodsShelves/customerAccount/clearRecordModal.vue

@@ -0,0 +1,166 @@
+<template>
+  <a-modal
+    centered
+    class="edit-remark-modal edit-search-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="'清零记录('+titName+')'"
+    v-model="isShow"
+    @cancel="isShow = false"
+    width="55%">
+    <div ckass="jg-drawer-wrap">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 搜索条件 -->
+        <div ref="searchBox" class="table-page-search-wrapper">
+          <a-form
+            ref="ruleForm"
+            layout="inline"
+            :model="queryParam"
+            @keyup.enter.native="$refs.table.refresh(true)" >
+            <a-row :gutter="5">
+              <a-col :md="8" :sm="24">
+                <a-form-item label="创建时间">
+                  <rangeDate id="rechargeList-time" ref="rangeDate" :value="time" @change="dateChange" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="关联单号">
+                  <a-input id="chooseShelf-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="清零对象">
+                  <v-select
+                    v-model="queryParam.promoType"
+                    id="rechargeList-promoType"
+                    code="SHOP_PROMO_PROMO_STATE"
+                    placeholder="请选择清零对象"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24" style="margin-bottom: 10px">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="shelfSetList-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="shelfSetList-reset">重置</a-button>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+        </s-table>
+        <div class="btn-cont">
+          <a-button id="edit-remark-modal-close" @click="isShow = false">关闭</a-button>
+        </div>
+      </a-spin>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 组件
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+// 接口
+import { onlinePayUpdateRemark } from '@/api/sales'
+export default {
+  name: 'EditRemarkModal',
+  components: { STable, VSelect, rangeDate },
+  mixins: [commonMixin],
+  props: {
+    openModal: {
+      //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {
+        labelCol: { span: 3 },
+        wrapperCol: { span: 20 }
+      },
+      titName: '西安店1',
+      // 查询条件
+      queryParam: {
+        beginDate: undefined, // 交易开始时间
+        endDate: undefined, // 交易结束时间
+        productCode: '', // 关联单号
+        promoType: undefined // 交易类型
+      },
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '时间', dataIndex: 'stockBatchNo', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '金额(¥)', dataIndex: 'warehouseLocationName', width: '24%', align: 'right', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '清零对象', dataIndex: 'outQty', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作人', dataIndex: 'outQty1', width: '24%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+    }
+  },
+  methods: {
+    //  保存
+    handleSave () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const form = JSON.parse(JSON.stringify(_this.form))
+          form.salesBillSn = _this.itemSn
+          _this.spinning = true
+          onlinePayUpdateRemark(form).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              setTimeout(() => {
+                _this.$emit('ok', res.data)
+              }, 1000)
+              _this.isShow = false
+            }
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.$refs.ruleForm.resetFields()
+      } else {
+        if (this.mainContent && this.mainContent.length) {
+          this.form.remarks = this.mainContent
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+.edit-remark-modal {
+	.ant-modal-body {
+		padding: 20px 40px 24px;
+	}
+	.btn-cont {
+		text-align: center;
+		margin: 35px 0 10px;
+	}
+}
+</style>

+ 258 - 0
src/views/numsGoodsShelves/customerAccount/list.vue

@@ -0,0 +1,258 @@
+<template>
+  <a-card size="small" :bordered="false" class="shelfSetList-wrap jg-page-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="货架名称">
+                <shelfSList v-model="queryParam.shelfSn" id="shelfSetList-shelfName"></shelfSList>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="关联客户">
+                <custList ref="custList" id="shelfSetList-custList" @change="custChange" :isEnabled="true"></custList>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="shelfSetList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="shelfSetList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 统计 -->
+      <div class="table-operator" style="margin-bottom:10px;">
+        <div class="alert-message">
+          总充值:<strong>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong>;
+          已用充值:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '--' }}</strong>;
+          充值余额:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
+          总补贴:<strong>{{ totalData&&(totalData.totalAmount || totalData.totalAmount==0) ? toThousands(totalData.totalAmount) : '--' }}</strong>;
+          已用补贴:<strong>{{ totalData&&(totalData.paymentAmount || totalData.paymentAmount==0) ? toThousands(totalData.paymentAmount) : '--' }}</strong>;
+          补贴余额:<strong>{{ totalData&&(totalData.refundingAmount || totalData.refundingAmount==0) ? toThousands(totalData.refundingAmount) : '--' }}</strong>;
+        </div>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button id="shelfSetList-setView" size="small" type="link" class="button-primary" @click="handleClearRecord(record)">清零记录</a-button>
+          <a-button
+            :id="'shelfSetList-cancel-'+record.id"
+            size="small"
+            type="link"
+            class="button-error"
+            @click="handleZeroClear(record)">清零</a-button>
+        </template>
+      </s-table>
+    </a-spin>
+    <!-- 交易流水 -->
+    <transaction-flow-modal :modalType="modalType" :openModal="openFlowModal" @close="openFlowModal=false"></transaction-flow-modal>
+    <!-- 清零 -->
+    <zero-clearing-modal :openModal="openZeroClearModal" @close="openZeroClearModal=false"></zero-clearing-modal>
+    <!-- 清零记录 -->
+    <clear-record-modal :openModal="openClearRecordModal" @close="openClearRecordModal=false"></clear-record-modal>
+  </a-card>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 组件
+import { STable, VSelect } from '@/components'
+import custList from '@/views/common/custList.vue' // 客户列表组件
+import shelfSList from '@/views/common/shelfList' // 货架列表组件
+import transactionFlowModal from './transactionFlowModal.vue' // 交易流水弹框
+import zeroClearingModal from './zeroClearingModal.vue' // 交易流水弹框
+import clearRecordModal from './clearRecordModal.vue' // 清零记录弹框
+// 接口
+import { shelfList, modifFinishFlag, shelfModifState } from '@/api/shelf' // 接口api
+export default {
+  components: { STable, VSelect, custList, shelfSList, transactionFlowModal, zeroClearingModal, clearRecordModal },
+  mixins: [commonMixin],
+  data () {
+    const _this = this
+    return {
+      spinning: false, // loading
+      tableHeight: 0, // 表格高度
+      disabled: false, //  查询、重置按钮是否可操作
+      showTip: false, // 注销弹框
+      queryParam: {
+        shelfSn: undefined, // 货架sn
+        customerSn: undefined, // 关联客户sn
+        finishFlag: undefined, // 是否完成设置
+        customerEntity: { // 关联客户名称
+          customerName: undefined
+        }
+      },
+      modalType: '1',
+      openFlowModal: true, // 打开 交易流水弹窗
+      openZeroClearModal: false, // 打开 清零弹窗
+      openClearRecordModal: false, // 打开 清零记录弹窗
+      // 列定义
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '创建时间', dataIndex: 'customerName', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '货架名称', dataIndex: 'customerEntity1', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '关联客户', dataIndex: 'customerEntity.customerName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总充值', dataIndex: 'customerName1', width: '13%', align: 'right', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text, 2) : '--' } },
+        { title: '总补贴', dataIndex: 'customerName2', width: '13%', align: 'right', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text, 2) : '--' } },
+        { title: '充值余额', dataIndex: 'customerName3', width: '13%', align: 'right', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text, 2) : '--' } },
+        { title: '补贴余额', dataIndex: 'customerName4', width: '13%', align: 'right', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text, 2) : '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '16%', align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return shelfList(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
+        })
+      },
+      openModal: false, // 新增编辑弹框
+      nowData: null // 当前操作行数据
+    }
+  },
+  methods: {
+    // 设置/修改
+    handleClearRecord (row) {
+      this.openClearRecordModal = true
+    },
+    // 跳转到货架设置页面
+    handleOkToSet (data) {
+      this.$router.push({ path: `/numsGoodsShelves/shelfSet/set/${data.shelfSn}` })
+    },
+    // 选择关联客户
+    custChange (obj, row) {
+      if (row) {
+        this.queryParam.customerSn = row && row.customerSn || undefined
+        this.queryParam.customerEntity.customerName = undefined
+      } else {
+        this.queryParam.customerEntity.customerName = obj || undefined
+        this.queryParam.customerSn = undefined
+      }
+    },
+    // 是否设置完成更改
+    changeStatus (record) {
+      const params = {
+        shelfSn: record.shelfSn,
+        finishFlag: record.finishFlag == 1 ? '0' : '1'
+      }
+      this.spinning = true
+      modifFinishFlag(params).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.$refs.table.refresh()
+          this.spinning = false
+        } else {
+          this.spinning = false
+        }
+      })
+    },
+    // 启用禁用
+    enableShelf (record) {
+      const params = {
+        shelfSn: record.shelfSn,
+        state: record.state == 'ENABLE' ? 'DISABLED' : 'ENABLE'
+      }
+      const _this = this
+      _this.$confirm({
+        title: '提示',
+        content: <div style="text-align:center;">是否{(record.state == 'ENABLE' ? '停用' : '启用') + record.shelfName}</div>,
+        centered: true,
+        closable: true,
+        class: 'confirm-center',
+        onOk () {
+          _this.updateState(params)
+        }
+      })
+    },
+    // 打开清零弹框
+    handleZeroClear (record) {
+      this.openZeroClearModal = true
+    },
+    // 确定注销
+    handleCommonOk () {
+      this.updateState(this.nowData)
+    },
+    // 更改货架状态
+    updateState (params) {
+      this.spinning = true
+      shelfModifState(params).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.$refs.table.refresh()
+          this.spinning = false
+        } else {
+          this.spinning = false
+        }
+        this.showTip = false
+      })
+    },
+    // 重置列表查询
+    resetSearchForm () {
+      this.queryParam.shelfSn = undefined
+      this.queryParam.customerSn = undefined
+      this.queryParam.customerEntity.customerName = undefined
+      this.$refs.custList.resetForm()
+      this.queryParam.finishFlag = undefined
+      this.$refs.table.refresh(true)
+    },
+    // 计算表格高度
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 240
+    },
+    // 初始化页面
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  }
+}
+</script>

+ 228 - 0
src/views/numsGoodsShelves/customerAccount/transactionFlowModal.vue

@@ -0,0 +1,228 @@
+<template>
+  <a-drawer
+    :title="'交易流水('+titInfo+')'"
+    placement="right"
+    :visible="isShow"
+    width="80%"
+    :get-container="false"
+    :wrap-style="{ position: 'absolute' }"
+    @close="isShow = false"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="searchBox" class="table-page-search-wrapper">
+        <a-form-model
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :model="queryParam"
+          @keyup.enter.native="$refs.table.refresh(true)" >
+          <a-row :gutter="5">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="交易时间">
+                <rangeDate id="rechargeList-time" ref="rangeDate" :value="time" @change="dateChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="关联单号">
+                <a-input id="chooseShelf-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="交易类型">
+                <v-select
+                  v-model="queryParam.promoType"
+                  id="rechargeList-promoType"
+                  code="SHOP_PROMO_PROMO_STATE"
+                  placeholder="请选择交易类型"
+                  allowClear></v-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col flex="auto" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" id="chooseShelf-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" id="chooseShelf-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+      <!-- 统计 -->
+      <div class="table-operator" style="margin-bottom: 10px;">
+        <div class="alert-message">
+          总{{ modalType=='1'?'充值':'补贴' }}:<strong>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong>;
+          已用{{ modalType=='1'?'充值':'补贴' }}:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? totalData.totalCategory : '--' }}</strong>;
+          {{ modalType=='1'?'充值':'补贴' }}余额:<strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong>;
+          清零余额:<strong>{{ totalData&&(totalData.refundingAmount || totalData.refundingAmount==0) ? toThousands(totalData.refundingAmount) : '--' }}</strong>;
+        </div>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+      </s-table>
+    </a-spin>
+  </a-drawer>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+// 组件
+import productType from '@/views/common/productType.js'
+import productBrand from '@/views/common/productBrand.js'
+import rangeDate from '@/views/common/rangeDate.vue'
+// 接口
+import { stockOutDetailList } from '@/api/stockOut'
+import { queryExtList } from '@/api/shopProduct'
+export default {
+  name: 'SubsidyAddModal',
+  components: { STable, VSelect, productType, productBrand, rangeDate },
+  mixins: [commonMixin],
+  props: {
+    openModal: {
+      //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    modalType: { // 1是充值交易流水  2是补贴交易流水
+      type: String,
+      default: '1'
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      tableHeight: 0, // 表格高度
+      totalData: null, // 统计数据
+      titInfo: '西安店1:充值金额',
+      time: [],
+      // 查询条件
+      queryParam: {
+        beginDate: undefined, // 交易开始时间
+        endDate: undefined, // 交易结束时间
+        productCode: '', // 关联单号
+        promoType: undefined // 交易类型
+      },
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '交易时间', dataIndex: 'stockBatchNo', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单号', dataIndex: 'putBizTypeDictValue', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '金额(¥)', dataIndex: 'warehouseLocationName', width: '24%', align: 'right', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '交易类型', dataIndex: 'outQty', width: '24%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return stockOutDetailList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    //  交易时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    // 计算表格高度
+    setTableH () {
+      this.$nextTick(() => {
+        const searchBoxH = this.$refs.searchBox.offsetHeight
+        this.tableHeight = window.innerHeight - searchBoxH - 235
+      })
+    },
+    // 获取产品类目列表
+    getCategoryList () {
+      const _this = this
+      _this.spinning = true
+      queryExtList({}).then(res => {
+        if (res.status == 200) {
+          this.categoryOptions = res.data || []
+        }
+        _this.spinning = false
+      })
+    },
+    // 关闭弹框
+    cansel () {
+      this.isShow = false
+      this.baseData = null
+    },
+    // 查询列表
+    getData (row) {
+      this.baseData = row
+      this.$nextTick(() => {
+        this.$refs.table.refresh(true)
+      })
+    },
+    // 批量添加
+    handlePlAdd () {
+      if (this.selectTotal) {
+        this.$emit('plAdd', this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || [])
+      } else {
+        this.$message.info('请选择产品')
+      }
+    },
+    resetSearchForm () {
+
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      } else {
+        this.setTableH()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+.outIndetail-modal {
+	.ant-drawer-body {
+		padding: 10px 20px;
+    .outIndetail-modal-table{
+      padding: 20px 0 0;
+    }
+    .baseInfo{
+      line-height: 24px;
+      font-size: 14px;
+    }
+	}
+}
+.table-operator{
+  .subsidyRequired{
+    margin-right: 5px;
+    color:#ED1c24;
+  }
+}
+
+</style>

+ 118 - 0
src/views/numsGoodsShelves/customerAccount/zeroClearingModal.vue

@@ -0,0 +1,118 @@
+<template>
+  <a-modal
+    centered
+    class="zero-clearing-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="'清零('+titName+')'"
+    v-model="isShow"
+    @cancel="isShow = false"
+    :width="450">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="mainContent">
+        <a-checkbox-group v-model="chooseType" id="zero-clearing-checkbox">
+          <a-checkbox value="1" id="zero-clearing-checkbox1">清空600.00元【充值余额】</a-checkbox>
+          <br />
+          <a-checkbox value="2" id="zero-clearing-checkbox2">清空50.00元【补贴余额】</a-checkbox>
+        </a-checkbox-group>
+        <div style="margin-top:10px;">注意:请慎重操作,一旦清空,不可变更</div>
+      </div>
+      <div class="btn-cont">
+        <a-button id="zero-clearing-modal-cancel" @click="isShow = false" style="margin-right: 15px;">取消</a-button>
+        <a-button type="primary" id="zero-clearing-modal-save" @click="handleSave">保存</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 接口
+import { onlinePayUpdateRemark } from '@/api/sales'
+export default {
+  name: 'ZeroClearingModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: {
+      //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemSn: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      titName: '西安店1',
+      chooseType: undefined
+    }
+  },
+  methods: {
+    //  保存
+    handleSave () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const form = JSON.parse(JSON.stringify(_this.form))
+          form.salesBillSn = _this.itemSn
+          _this.spinning = true
+          onlinePayUpdateRemark(form).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              setTimeout(() => {
+                _this.$emit('ok', res.data)
+              }, 1000)
+              _this.isShow = false
+            }
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.$refs.ruleForm.resetFields()
+      } else {
+        if (this.mainContent && this.mainContent.length) {
+          this.form.remarks = this.mainContent
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+.zero-clearing-modal {
+	.ant-modal-body {
+		padding: 40px 40px 24px;
+	}
+  .mainContent{
+    width: 65%;
+    margin:0 auto;
+    .ant-checkbox-group{
+      .ant-checkbox-wrapper{
+        margin-bottom:10px;
+      }
+    }
+  }
+	.btn-cont {
+		text-align: center;
+		margin: 35px 0 10px;
+	}
+}
+</style>

+ 174 - 0
src/views/promotionManagement/rechargeSettings/editModal.vue

@@ -0,0 +1,174 @@
+<template>
+  <a-modal
+    centered
+    class="subsidyEditModal-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="itemSn?'编辑':'新增'"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="750">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="edit-remark-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-form-model-item label="充值规则" prop="remarks">
+          <div>
+            充值<a-input-number
+              id="subsidyEditModal-name"
+              v-model.trim="form.num"
+              style="width: 35%;margin:0 10px;"
+              :max="999999"
+              :precision="2"
+              placeholder="请输入"/>元,送<a-input-number
+                id="subsidyEditModal-name"
+                v-model.trim="form.num1"
+                style="width: 35%;margin:0 10px;"
+                :max="999999"
+                :precision="2"
+                placeholder="请输入"/>元补贴
+          </div>
+        </a-form-model-item>
+        <a-form-model-item label="备注" prop="remarks">
+          <a-textarea
+            :autosize="{minRows: 5, maxRows: 5}"
+            id="subsidyEditModal-remarks"
+            :maxLength="100"
+            v-model="form.remarks"
+            placeholder="请输入备注(最多100个字符)"
+            allowClear />
+        </a-form-model-item>
+        <div class="tipWord">注意:请设置【补贴产品】</div>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="subsidyEditModal-save" @click="handleSave">保存</a-button>
+        <a-button id="subsidyEditModal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { jxsorgRelationSave } from '@/api/jxsorg'
+export default {
+  name: 'RechargeEditModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemSn: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {// form表单中label设置
+        labelCol: { span: 3 },
+        wrapperCol: { span: 18 }
+      },
+      // 提交数据
+      form: {
+        dealerSn: undefined, // 客户sn
+        changeAmount: undefined, // 调账金额
+        remark: undefined// 备注
+      },
+      // 必填项判断
+      rules: {
+        changeAmount: [{ required: true, message: '请输入调账金额', trigger: 'blur' },
+          { pattern: /^(?!0$).+/, message: '调账金额不能为0', trigger: 'blur' }
+        ]
+      }
+    }
+  },
+  methods: {
+    //  保存
+    handleSave () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.spinning = true
+          jxsorgRelationSave(_this.form).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$emit('ok')
+              setTimeout(function () {
+                _this.isShow = false
+                _this.spinning = false
+              }, 300)
+            } else {
+              _this.spinning = false
+            }
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    // 中心店 change
+    resetForm (obj) {
+      this.$refs.ruleForm.resetFields()
+      this.form.childSnList = undefined
+      this.$refs.orgList.resetForm()
+      this.$refs.orgMultipleList.resetForm()
+    },
+    // 配送店  change
+    orgMultipleChange (obj) {
+      const _this = this
+      this.form.childSnList = []
+      obj.map(item => {
+        _this.form.childSnList.push(item.key || undefined)
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    },
+    itemSn (newValue, oldValue) {
+      if (this.isShow && newValue) {
+        this.getDetail()
+      }
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .bindEdit-modal{
+    /deep/.ant-modal-body {
+    	padding: 40px 40px 24px;
+    }
+    .bindEdit-form{
+      text-align: center;
+    }
+    .subsidyRequired{
+      margin-right: 5px;
+      color:#ED1c24;
+    }
+    .btn-cont {
+    	text-align: center;
+    	margin: 50px 0 10px;
+    }
+  }
+  .tipWord{
+    margin:-10px 0  0 48px;
+    color:gray;
+  }
+</style>

+ 262 - 0
src/views/promotionManagement/rechargeSettings/list.vue

@@ -0,0 +1,262 @@
+<template>
+  <a-card size="small" :bordered="false" class="jg-page-wrap rechargeList-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)" id="rechargeList-form">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="创建时间">
+                <rangeDate id="rechargeList-time" ref="rangeDate" :value="time" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="充值规则">
+                <a-input id="rechargeList-promoName" v-model.trim="queryParam.promoName" allowClear placeholder="请输入充值规则"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="状态">
+                <v-select
+                  v-model="queryParam.promoType"
+                  ref="sourceType"
+                  id="rechargeList-promoType"
+                  code="SHOP_PROMO_PROMO_STATE"
+                  placeholder="请选择状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="rechargeList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="rechargeList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator-nobor">
+        <a-button id="rechargeList-add" type="primary" class="button-error" @click="openEditModal=true">新增</a-button>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 状态 -->
+        <template slot="statusBox" slot-scope="text, record">
+          <a-switch
+            :id="'rechargeList-switch-'+record.id"
+            v-if="$hasPermissions('B_customer_customerInfo_enable')"
+            checkedChildren="启用"
+            unCheckedChildren="禁用"
+            v-model="record.enabledFlag"
+            @change="changeFlagHandle(text, record)"/>
+          <span v-else :style="{color:(record.enabledFlag==1?'#00aa00':'#999')}"> {{ record.enabledFlag==1? '已启用': '已禁用' }} </span>
+        </template>
+        <!-- 操作 -->
+        <!-- state  HAVE_RELEASE 已开启 IS_OVER已结束 IS_CLOSE 已关闭 NOT_RELEASE 未开启 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-primary"
+            @click="handleOpenOrClose(record,'1')"
+            :id="'rechargeList-editBtn-'+record.id">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            :id="'rechargeList-delBtn-'+record.id"
+            @click="handleDel(record)">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
+    <!-- 新增/编辑 -->
+    <recharge-edit-modal v-drag :itemSn="itemId" :openModal="openEditModal" @ok="$refs.table.refresh(true)" @close="openEditModal = false" />
+  </a-card>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 组件
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import rechargeEditModal from './editModal.vue'
+// 接口
+import { shopPromoList, openOrCloseActive } from '@/api/shopPromo'
+export default {
+  name: 'RechargeSettingsList',
+  components: { STable, VSelect, rangeDate, rechargeEditModal },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      tableHeight: 0, // 表格高度
+      openDescModal: false, // 促销展示弹窗
+      time: [], // 创建时间
+      //  查询条件
+      queryParam: {
+        beginDate: undefined, // 发布开始时间
+        endDate: undefined, // 发布结束时间
+        promoName: '', //  充值规则
+        promoState: undefined// 状态
+      },
+      openEditModal: false, // 新增/编辑弹窗
+      itemId: null, // id值
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '充值规则', dataIndex: 'promoName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '备注', dataIndex: 'desc', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '状态', scopedSlots: { customRender: 'statusBox' }, width: '15%', align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return shopPromoList(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
+        })
+      }
+    }
+  },
+  methods: {
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    // 状态  启用禁用
+    handleOpenOrClose (row, val) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '促销活动一旦' + (val == '1' ? '开启' : '关闭') + ',客户' + (val == '1' ? '可' : '无法') + '参与活动。确认' + (val == '1' ? '开启' : '关闭') + '吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          openOrCloseActive({ promoSn: row.promoSn, dealerOpenState: val }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
+    //  删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确定删除【买2000.00元送100.00元】的充值规则吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          jxsorgRelationDel({ sn: row.orgSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+            _this.spinning = false
+          })
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.time = []
+      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.beginDate = undefined
+      this.queryParam.endDate = undefined
+      this.queryParam.promoName = ''
+      this.queryParam.promoType = undefined
+      this.queryParam.promoState = undefined
+      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 - 243
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  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">
+  .rechargeList-wrap{
+    .red{
+      color: #ed1c24;
+    }
+    .green{
+      color: #19be6b;
+    }
+    .font1{
+     color:#39f;
+    }
+    .desc{
+      width: 100%;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      display: -webkit-box;
+      -webkit-line-clamp: 3;
+      -webkit-box-orient: vertical;
+    }
+  }
+</style>

+ 7 - 1
src/views/promotionManagement/subsidizedProducts/editModal.vue

@@ -10,7 +10,13 @@
     :width="500">
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="bindEdit-form">
-        <span class="subsidyRequired">*</span>产品补贴<a-input style="width: 40%;margin:0 10px;" id="chooseShelf-name" v-model.trim="num" allowClear placeholder="请输入"/>元
+        <span class="subsidyRequired">*</span>产品补贴<a-input-number
+          id="chooseShelf-name"
+          v-model.trim="num"
+          style="width: 40%;margin:0 10px;"
+          :max="999999"
+          :precision="2"
+          placeholder="请输入"/>元
       </div>
       <div class="btn-cont">
         <a-button id="bindEdit-modal-back" @click="isShow = false" style="margin-right: 15px;">取消</a-button>

+ 2 - 3
src/views/promotionManagement/subsidizedProducts/list.vue

@@ -84,7 +84,7 @@
             type="link"
             class="button-primary"
             @click="handleEdit(record)"
-            :id="'productInfoList-edit-'+record.productSn"
+            :id="'subsidizedProducts-btn-edit-'+record.productSn"
           >
             编辑
           </a-button>
@@ -94,7 +94,7 @@
             type="link"
             class="button-error"
             @click="handleDel(record)"
-            :id="'productInfoList-detail-'+record.productSn"
+            :id="'subsidizedProducts-btn-del-'+record.productSn"
           >
             删除
           </a-button>
@@ -259,7 +259,6 @@ export default {
     // 初始化
     pageInit () {
       const _this = this
-      _this.getCategoryList()
       _this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })

+ 9 - 11
src/views/promotionManagement/subsidizedProducts/subsidyAddModal.vue

@@ -46,16 +46,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="商城类目">
-                <a-cascader
-                  id="promoProducts-category"
-                  expandTrigger="hover"
-                  :changeOnSelect="true"
-                  :fieldNames="fieldNames"
-                  :options="categoryOptions"
-                  placeholder="请选择商城类目"
-                  @change="changeProductsCategory"
-                  allowClear
-                  v-model="category"/>
+                <mallCategory id="subsidizedProducts-category" @change="changeProductsCategory" v-model="category"></mallCategory>
               </a-form-item>
             </a-col>
             <a-col flex="auto" style="margin-bottom: 10px;">
@@ -65,7 +56,14 @@
           </a-row>
         </a-form-model>
         <div class="table-operator">
-          <span class="subsidyRequired">*</span>产品补贴<a-input style="width: 20%;margin:0 10px;" id="chooseShelf-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入"/>元
+          <span class="subsidyRequired">*</span>产品补贴<a-input-number
+            id="chooseShelf-name"
+            v-model.trim="queryParam.productName"
+            style="width: 20%;margin:0 10px;"
+            :max="999999"
+            :precision="2"
+            :step="1"
+            placeholder="请输入"/>元
           <a-button id="chooseShelf-handlePlAdd" style="margin:0 10px;" type="primary" @click="handlePlAdd">批量添加</a-button>
           <span v-if="selectTotal">已选{{ selectTotal }}项</span>
         </div>