Browse Source

修改bug

chenrui 4 months ago
parent
commit
0738262b12

+ 0 - 0
public/templ/产品补贴金额导入模板.xlsx → public/templ/产品抵扣金额导入模板.xlsx


+ 1 - 1
public/version.json

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

+ 49 - 0
src/api/storeAccount.js

@@ -0,0 +1,49 @@
+import { axios } from '@/utils/request'
+
+// 修配易码通-商城  客户账户 列表  有分页
+export const storeAccountList = (params) => {
+  const url = `/storeAccount/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+
+// 修配易码通-商城  客户账户 统计
+export const storeAccountCount = (params) => {
+  return axios({
+    url: '/storeAccount/querySum',
+    data: params,
+    method: 'post'
+  })
+}
+
+// 修配易码通-商城  客户账户  记录列表   有分页
+export const storeAccountDetailList = (params) => {
+  const url = `/storeAccount/querydetailPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+
+// 修配易码通-商城  客户账户   清零
+export const storeAccountSetZero = (params) => {
+  return axios({
+    url: '/storeAccount/setZero',
+    data: params,
+    method: 'post'
+  })
+}

+ 15 - 15
src/config/router.config.js

@@ -422,7 +422,7 @@ export const asyncRouterMap = [
       // 修配易码通-数字货架
       // 修配易码通-数字货架
       {
       {
         path: '/numsGoodsShelves',
         path: '/numsGoodsShelves',
-        redirect: '/numsGoodsShelves/shelfSet',
+        redirect: '/numsGoodsShelves/approveStore',
         component: PageView,
         component: PageView,
         meta: {
         meta: {
           title: '修配易码通-数字货架',
           title: '修配易码通-数字货架',
@@ -821,12 +821,12 @@ export const asyncRouterMap = [
       // 修配易码通-商城
       // 修配易码通-商城
       {
       {
         path: '/yimatongMall',
         path: '/yimatongMall',
-        redirect: '/numsGoodsShelves/shelfSet',
+        redirect: '/numsGoodsShelves/withdrawalManagementNew',
         component: PageView,
         component: PageView,
         meta: {
         meta: {
           title: '修配易码通-商城',
           title: '修配易码通-商城',
           icon: 'hdd',
           icon: 'hdd',
-          permission: 'M_numsGoodsShelves'
+          permission: 'M_yimatongMall'
         },
         },
         children: [
         children: [
           {
           {
@@ -836,8 +836,8 @@ export const asyncRouterMap = [
             component: BlankLayout,
             component: BlankLayout,
             meta: {
             meta: {
               title: '提现管理',
               title: '提现管理',
-              icon: 'monitor'
-              // permission: 'M_withdrawalManagementNewList'
+              icon: 'monitor',
+              permission: 'M_withdrawalManagementNewList'
             },
             },
             hideChildrenInMenu: true,
             hideChildrenInMenu: true,
             children: [
             children: [
@@ -848,8 +848,8 @@ export const asyncRouterMap = [
                 meta: {
                 meta: {
                   title: '提现管理列表',
                   title: '提现管理列表',
                   icon: 'monitor',
                   icon: 'monitor',
-                  hidden: true
-                  // permission: 'M_withdrawalManagementNewList'
+                  hidden: true,
+                  permission: 'M_withdrawalManagementNewList'
                 }
                 }
               }
               }
             ]
             ]
@@ -911,8 +911,8 @@ export const asyncRouterMap = [
             component: BlankLayout,
             component: BlankLayout,
             meta: {
             meta: {
               title: '线上支付账单',
               title: '线上支付账单',
-              icon: 'monitor'
-              // permission: 'M_onlinePayInvoiceList'
+              icon: 'monitor',
+              permission: 'M_onlinePayInvoiceList'
             },
             },
             hideChildrenInMenu: true,
             hideChildrenInMenu: true,
             children: [
             children: [
@@ -923,8 +923,8 @@ export const asyncRouterMap = [
                 meta: {
                 meta: {
                   title: '线上支付账单',
                   title: '线上支付账单',
                   icon: 'monitor',
                   icon: 'monitor',
-                  hidden: true
-                  // permission: 'M_onlinePayInvoiceList'
+                  hidden: true,
+                  permission: 'M_onlinePayInvoiceList'
                 }
                 }
               },
               },
               {
               {
@@ -935,8 +935,8 @@ export const asyncRouterMap = [
                   title: '线上支付明细',
                   title: '线上支付明细',
                   icon: 'monitor',
                   icon: 'monitor',
                   hidden: true,
                   hidden: true,
-                  replaceTab: true
-                  // permission: 'M_onlinePayInvoiceDetail'
+                  replaceTab: true,
+                  permission: 'M_onlinePayInvoiceDetail'
                 }
                 }
               }
               }
             ]
             ]
@@ -3233,7 +3233,7 @@ export const asyncRouterMap = [
             name: 'customerInfo',
             name: 'customerInfo',
             component: BlankLayout,
             component: BlankLayout,
             meta: {
             meta: {
-              title: '客户与供应商',
+              title: '客户管理',
               icon: 'idcard',
               icon: 'idcard',
               permission: 'M_customerInfoList'
               permission: 'M_customerInfoList'
             },
             },
@@ -3244,7 +3244,7 @@ export const asyncRouterMap = [
                 name: 'customerInfoList',
                 name: 'customerInfoList',
                 component: () => import(/* webpackChunkName: "customerManagement" */ '@/views/customerManagement/customerInfo/list.vue'),
                 component: () => import(/* webpackChunkName: "customerManagement" */ '@/views/customerManagement/customerInfo/list.vue'),
                 meta: {
                 meta: {
-                  title: '客户与供应商列表',
+                  title: '客户管理列表',
                   icon: 'idcard',
                   icon: 'idcard',
                   hidden: true,
                   hidden: true,
                   permission: 'M_customerInfoList'
                   permission: 'M_customerInfoList'

+ 34 - 42
src/views/numsGoodsShelves/customerAccount/clearRecordModal.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <a-modal
   <a-modal
     centered
     centered
-    class="edit-remark-modal edit-search-modal"
+    class="clearRecord-modal edit-search-modal"
     :footer="null"
     :footer="null"
     :maskClosable="false"
     :maskClosable="false"
     :title="'清零记录('+titName+')'"
     :title="'清零记录('+titName+')'"
@@ -16,31 +16,32 @@
             ref="ruleForm"
             ref="ruleForm"
             layout="inline"
             layout="inline"
             :model="queryParam"
             :model="queryParam"
+            id="clearRecord-form"
             @keyup.enter.native="$refs.table.refresh(true)" >
             @keyup.enter.native="$refs.table.refresh(true)" >
             <a-row :gutter="5">
             <a-row :gutter="5">
               <a-col :md="8" :sm="24">
               <a-col :md="8" :sm="24">
                 <a-form-item label="清零时间">
                 <a-form-item label="清零时间">
-                  <rangeDate id="rechargeList-time" ref="rangeDate" :value="time" @change="dateChange" />
+                  <rangeDate id="clearRecord-time" ref="rangeDate" :value="time" @change="dateChange" />
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
               <a-col :md="6" :sm="24">
               <a-col :md="6" :sm="24">
                 <a-form-item label="关联单号">
                 <a-form-item label="关联单号">
-                  <a-input id="chooseShelf-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+                  <a-input id="clearRecord-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
               <a-col :md="6" :sm="24">
               <a-col :md="6" :sm="24">
                 <a-form-item label="清零对象">
                 <a-form-item label="清零对象">
                   <v-select
                   <v-select
                     v-model="queryParam.promoType"
                     v-model="queryParam.promoType"
-                    id="rechargeList-promoType"
+                    id="clearRecord-promoType"
                     code="SHOP_PROMO_PROMO_STATE"
                     code="SHOP_PROMO_PROMO_STATE"
                     placeholder="请选择清零对象"
                     placeholder="请选择清零对象"
                     allowClear></v-select>
                     allowClear></v-select>
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
               <a-col :md="4" :sm="24" style="margin-bottom: 10px">
               <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-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="clearRecord-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="clearRecord-reset">重置</a-button>
               </a-col>
               </a-col>
             </a-row>
             </a-row>
           </a-form>
           </a-form>
@@ -58,7 +59,7 @@
           bordered>
           bordered>
         </s-table>
         </s-table>
         <div class="btn-cont">
         <div class="btn-cont">
-          <a-button id="edit-remark-modal-close" @click="isShow = false">关闭</a-button>
+          <a-button id="clearRecord-modal-close" @click="isShow = false">关闭</a-button>
         </div>
         </div>
       </a-spin>
       </a-spin>
     </div>
     </div>
@@ -71,9 +72,9 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 // 接口
 // 接口
-import { onlinePayUpdateRemark } from '@/api/sales'
+import { storeAccountDetailList } from '@/api/storeAccount' // 接口api
 export default {
 export default {
-  name: 'EditRemarkModal',
+  name: 'ClearRecordModal',
   components: { STable, VSelect, rangeDate },
   components: { STable, VSelect, rangeDate },
   mixins: [commonMixin],
   mixins: [commonMixin],
   props: {
   props: {
@@ -84,14 +85,15 @@ export default {
     }
     }
   },
   },
   data () {
   data () {
+    const _this = this
     return {
     return {
       spinning: false,
       spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
-      formItemLayout: {
+      formItemLayout: {// label 样式设置
         labelCol: { span: 3 },
         labelCol: { span: 3 },
         wrapperCol: { span: 20 }
         wrapperCol: { span: 20 }
       },
       },
-      titName: '西安店1',
+      titName: '西安店1', // 弹窗标题
       // 查询条件
       // 查询条件
       queryParam: {
       queryParam: {
         beginDate: undefined, // 交易开始时间
         beginDate: undefined, // 交易开始时间
@@ -102,36 +104,31 @@ export default {
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '清零时间', dataIndex: 'stockBatchNo', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
         { 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: 'warehouseLocationName', width: '24%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '清零对象', dataIndex: 'outQty', width: '24%', align: 'center', customRender: function (text) { return 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 || '--' } }
         { title: '操作人', dataIndex: 'outQty1', width: '24%', align: 'center', customRender: function (text) { return text || '--' } }
-      ]
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return storeAccountDetailList(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: {
   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: {
   watch: {
     //  父页面传过来的弹框状态
     //  父页面传过来的弹框状态
@@ -142,11 +139,6 @@ export default {
     isShow (newValue, oldValue) {
     isShow (newValue, oldValue) {
       if (!newValue) {
       if (!newValue) {
         this.$emit('close')
         this.$emit('close')
-        this.$refs.ruleForm.resetFields()
-      } else {
-        if (this.mainContent && this.mainContent.length) {
-          this.form.remarks = this.mainContent
-        }
       }
       }
     }
     }
   }
   }
@@ -154,7 +146,7 @@ export default {
 </script>
 </script>
 
 
 <style lang="less">
 <style lang="less">
-.edit-remark-modal {
+.clearRecord-modal {
 	.ant-modal-body {
 	.ant-modal-body {
 		padding: 20px 40px 24px;
 		padding: 20px 40px 24px;
 	}
 	}

+ 55 - 32
src/views/numsGoodsShelves/customerAccount/list.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <a-card size="small" :bordered="false" class="shelfSetList-wrap jg-page-wrap">
+  <a-card size="small" :bordered="false" class="storeAccount-wrap jg-page-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
       <div ref="tableSearch" class="table-page-search-wrapper">
@@ -7,17 +7,17 @@
           <a-row :gutter="15">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-item label="货架名称">
               <a-form-item label="货架名称">
-                <shelfSList v-model="queryParam.shelfSn" id="shelfSetList-shelfName"></shelfSList>
+                <shelfSList v-model="queryParam.shelfSn" id="storeAccount-shelfName"></shelfSList>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-item label="关联客户">
               <a-form-item label="关联客户">
-                <custList ref="custList" id="shelfSetList-custList" @change="custChange" :isEnabled="true"></custList>
+                <custList ref="custList" id="storeAccount-custList" @change="custChange" :isEnabled="true"></custList>
               </a-form-item>
               </a-form-item>
             </a-col>
             </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 :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeAccount-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="storeAccount-reset">重置</a-button>
             </a-col>
             </a-col>
           </a-row>
           </a-row>
         </a-form>
         </a-form>
@@ -25,12 +25,12 @@
       <!-- 统计 -->
       <!-- 统计 -->
       <div class="table-operator" style="margin-bottom:10px;">
       <div class="table-operator" style="margin-bottom:10px;">
         <div class="alert-message">
         <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>;
+          总充值:<strong>{{ totalData&&(totalData.totalRecharge || totalData.totalRecharge==0) ? toThousands(totalData.totalRecharge) : '--' }}</strong>;
+          已用充值:<strong>{{ totalData&&(totalData.totalCategory || totalData.totalCategory==0) ? toThousands(totalData.totalCategory) : '--' }}</strong>;
+          充值余额:<strong>{{ totalData&&(totalData.rechargeBalance || totalData.rechargeBalance==0) ? toThousands(totalData.rechargeBalance) : '--' }}</strong>;
+          总抵扣:<strong>{{ totalData&&(totalData.totalGive || totalData.totalGive==0) ? toThousands(totalData.totalGive) : '--' }}</strong>;
+          已用抵扣:<strong>{{ totalData&&(totalData.paymentAmount || totalData.paymentAmount==0) ? toThousands(totalData.paymentAmount) : '--' }}</strong>;
+          抵扣余额:<strong>{{ totalData&&(totalData.giveBalance || totalData.giveBalance==0) ? toThousands(totalData.giveBalance) : '--' }}</strong>;
         </div>
         </div>
       </div>
       </div>
       <!-- 列表 -->
       <!-- 列表 -->
@@ -45,11 +45,21 @@
         :scroll="{ y: tableHeight }"
         :scroll="{ y: tableHeight }"
         :defaultLoadData="false"
         :defaultLoadData="false"
         bordered>
         bordered>
+        <!-- 充值余额 -->
+        <template slot="rechargeBalance" slot-scope="text, record">
+          <span class="table-td-link" :id="'storeAccount-recharge'+record.id" v-if="$hasPermissions('B_salesDetail')" @click="handleFlow(record,'1')">{{ (record.rechargeBalance||record.rechargeBalance==0)?toThousands(record.rechargeBalance):'--' }}</span>
+          <span v-else>{{ (record.rechargeBalance||record.rechargeBalance==0)?toThousands(record.rechargeBalance):'--' }}</span>
+        </template>
+        <!-- 抵扣余额 -->
+        <template slot="giveBalance" slot-scope="text, record">
+          <span class="table-td-link" :id="'storeAccount-give'+record.id" v-if="$hasPermissions('B_salesDetail')" @click="handleFlow(record,'2')">{{ (record.giveBalance||record.giveBalance==0)?toThousands(record.giveBalance):'--' }}</span>
+          <span v-else>{{ (record.giveBalance||record.giveBalance==0)?toThousands(record.giveBalance):'--' }}</span>
+        </template>
         <!-- 操作 -->
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
         <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="'storeAccount-clearRecord'+record.id" size="small" type="link" class="button-primary" @click="handleClearRecord(record)">清零记录</a-button>
           <a-button
           <a-button
-            :id="'shelfSetList-cancel-'+record.id"
+            :id="'storeAccount-ZeroClear-'+record.id"
             size="small"
             size="small"
             type="link"
             type="link"
             class="button-error"
             class="button-error"
@@ -69,16 +79,17 @@
 <script>
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { commonMixin } from '@/utils/mixin'
 // 组件
 // 组件
-import { STable, VSelect } from '@/components'
+import { STable } from '@/components'
 import custList from '@/views/common/custList.vue' // 客户列表组件
 import custList from '@/views/common/custList.vue' // 客户列表组件
 import shelfSList from '@/views/common/shelfList' // 货架列表组件
 import shelfSList from '@/views/common/shelfList' // 货架列表组件
 import transactionFlowModal from './transactionFlowModal.vue' // 交易流水弹框
 import transactionFlowModal from './transactionFlowModal.vue' // 交易流水弹框
-import zeroClearingModal from './zeroClearingModal.vue' // 交易流水弹框
+import zeroClearingModal from './zeroClearingModal.vue' // 清零弹框
 import clearRecordModal from './clearRecordModal.vue' // 清零记录弹框
 import clearRecordModal from './clearRecordModal.vue' // 清零记录弹框
 // 接口
 // 接口
-import { shelfList, modifFinishFlag, shelfModifState } from '@/api/shelf' // 接口api
+import { storeAccountList, storeAccountCount } from '@/api/storeAccount' // 接口api
+
 export default {
 export default {
-  components: { STable, VSelect, custList, shelfSList, transactionFlowModal, zeroClearingModal, clearRecordModal },
+  components: { STable, custList, shelfSList, transactionFlowModal, zeroClearingModal, clearRecordModal },
   mixins: [commonMixin],
   mixins: [commonMixin],
   data () {
   data () {
     const _this = this
     const _this = this
@@ -86,36 +97,36 @@ export default {
       spinning: false, // loading
       spinning: false, // loading
       tableHeight: 0, // 表格高度
       tableHeight: 0, // 表格高度
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
-      showTip: false, // 注销弹框
       queryParam: {
       queryParam: {
         shelfSn: undefined, // 货架sn
         shelfSn: undefined, // 货架sn
         customerSn: undefined, // 关联客户sn
         customerSn: undefined, // 关联客户sn
-        finishFlag: undefined, // 是否完成设置
         customerEntity: { // 关联客户名称
         customerEntity: { // 关联客户名称
           customerName: undefined
           customerName: undefined
         }
         }
       },
       },
       modalType: '1',
       modalType: '1',
-      openFlowModal: true, // 打开 交易流水弹窗
+      openFlowModal: false, // 打开 交易流水弹窗
       openZeroClearModal: false, // 打开 清零弹窗
       openZeroClearModal: false, // 打开 清零弹窗
       openClearRecordModal: false, // 打开 清零记录弹窗
       openClearRecordModal: false, // 打开 清零记录弹窗
+      totalData: null, // 统计数据
       // 列定义
       // 列定义
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { 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: '创建时间', dataIndex: 'createDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '货架名称', dataIndex: 'shelfName', width: '23%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '关联客户', dataIndex: 'customerName', width: '23%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总充值', dataIndex: 'totalRecharge', width: '12%', align: 'right', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text, 2) : '--' } },
+        { title: '总抵扣', dataIndex: 'totalGive', width: '12%', align: 'right', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text, 2) : '--' } },
+        { title: '充值余额', dataIndex: 'rechargeBalance', width: '12%', align: 'right', scopedSlots: { customRender: 'rechargeBalance' } },
+        { title: '抵扣余额', dataIndex: 'giveBalance', width: '12%', align: 'right', scopedSlots: { customRender: 'giveBalance' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '16%', align: 'center' }
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '16%', align: 'center' }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
         this.spinning = true
         this.spinning = true
-        return shelfList(Object.assign(parameter, this.queryParam)).then(res => {
+        const params = Object.assign(parameter, this.queryParam)
+        return storeAccountList(params).then(res => {
           let data
           let data
           if (res.status == 200) {
           if (res.status == 200) {
             data = res.data
             data = res.data
@@ -123,17 +134,29 @@ export default {
             for (var i = 0; i < data.list.length; i++) {
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
               data.list[i].no = no + i + 1
             }
             }
+            this.getCount(params)
             this.disabled = false
             this.disabled = false
           }
           }
           this.spinning = false
           this.spinning = false
           return data
           return data
         })
         })
-      },
-      openModal: false, // 新增编辑弹框
-      nowData: null // 当前操作行数据
+      }
     }
     }
   },
   },
   methods: {
   methods: {
+    // 统计
+    getCount (val) {
+      storeAccountCount(val).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        }
+      })
+    },
+    // 交易流水  1 充值余额  2抵扣余额
+    handleFlow (row, type) {
+      this.modalType = type
+      this.openFlowModal = true
+    },
     // 设置/修改
     // 设置/修改
     handleClearRecord (row) {
     handleClearRecord (row) {
       this.openClearRecordModal = true
       this.openClearRecordModal = true

+ 9 - 7
src/views/numsGoodsShelves/customerAccount/transactionFlowModal.vue

@@ -4,6 +4,7 @@
     placement="right"
     placement="right"
     :visible="isShow"
     :visible="isShow"
     width="80%"
     width="80%"
+    id="transaction-flow-modal"
     :get-container="false"
     :get-container="false"
     :wrap-style="{ position: 'absolute' }"
     :wrap-style="{ position: 'absolute' }"
     @close="isShow = false"
     @close="isShow = false"
@@ -16,31 +17,32 @@
           class="form-model-con"
           class="form-model-con"
           layout="inline"
           layout="inline"
           :model="queryParam"
           :model="queryParam"
-          @keyup.enter.native="$refs.table.refresh(true)" >
+          @keyup.enter.native="$refs.table.refresh(true)"
+          id="transactionFlow-form">
           <a-row :gutter="5">
           <a-row :gutter="5">
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="交易时间">
               <a-form-model-item label="交易时间">
-                <rangeDate id="rechargeList-time" ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate id="transactionFlow-time" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="关联单号">
               <a-form-model-item label="关联单号">
-                <a-input id="chooseShelf-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+                <a-input id="transactionFlow-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="交易类型">
               <a-form-model-item label="交易类型">
                 <v-select
                 <v-select
                   v-model="queryParam.promoType"
                   v-model="queryParam.promoType"
-                  id="rechargeList-promoType"
+                  id="transactionFlow-promoType"
                   code="SHOP_PROMO_PROMO_STATE"
                   code="SHOP_PROMO_PROMO_STATE"
                   placeholder="请选择交易类型"
                   placeholder="请选择交易类型"
                   allowClear></v-select>
                   allowClear></v-select>
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col flex="auto" style="margin-bottom: 10px;">
             <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-button type="primary" @click="$refs.table.refresh(true)" id="transactionFlow-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" id="transactionFlow-reset">重置</a-button>
             </a-col>
             </a-col>
           </a-row>
           </a-row>
         </a-form-model>
         </a-form-model>
@@ -81,7 +83,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import { stockOutDetailList } from '@/api/stockOut'
 import { stockOutDetailList } from '@/api/stockOut'
 import { queryExtList } from '@/api/shopProduct'
 import { queryExtList } from '@/api/shopProduct'
 export default {
 export default {
-  name: 'SubsidyAddModal',
+  name: 'TransactionFlowModal',
   components: { STable, VSelect, productType, productBrand, rangeDate },
   components: { STable, VSelect, productType, productBrand, rangeDate },
   mixins: [commonMixin],
   mixins: [commonMixin],
   props: {
   props: {

+ 16 - 20
src/views/numsGoodsShelves/customerAccount/zeroClearingModal.vue

@@ -28,7 +28,7 @@
 <script>
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { commonMixin } from '@/utils/mixin'
 // 接口
 // 接口
-import { onlinePayUpdateRemark } from '@/api/sales'
+import { storeAccountSetZero } from '@/api/storeAccount'
 export default {
 export default {
   name: 'ZeroClearingModal',
   name: 'ZeroClearingModal',
   mixins: [commonMixin],
   mixins: [commonMixin],
@@ -48,31 +48,27 @@ export default {
       spinning: false,
       spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
       titName: '西安店1',
       titName: '西安店1',
-      chooseType: undefined
+      chooseType: undefined// 清空目标
     }
     }
   },
   },
   methods: {
   methods: {
-    //  保存
+    // 清零保存
     handleSave () {
     handleSave () {
       const _this = this
       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
+      if (!_this.chooseType) {
+        _this.$message.waining('请选择清空目标')
+        return
+      }
+      _this.spinning = true
+      storeAccountSetZero({ type: _this.chooseType }).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$emit('ok', res.data)
+          setTimeout(() => {
+            _this.isShow = false
+          }, 300)
         }
         }
+        _this.spinning = false
       })
       })
     }
     }
   },
   },

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

@@ -66,12 +66,14 @@
             size="small"
             size="small"
             type="link"
             type="link"
             class="button-primary"
             class="button-primary"
+            v-if="record.state==0"
             @click="handleEdit(record)"
             @click="handleEdit(record)"
             :id="'rechargeList-editBtn-'+record.id">编辑</a-button>
             :id="'rechargeList-editBtn-'+record.id">编辑</a-button>
           <a-button
           <a-button
             size="small"
             size="small"
             type="link"
             type="link"
             class="button-error"
             class="button-error"
+            v-if="record.state==0"
             :id="'rechargeList-delBtn-'+record.id"
             :id="'rechargeList-delBtn-'+record.id"
             @click="handleDel(record)">删除</a-button>
             @click="handleDel(record)">删除</a-button>
         </template>
         </template>

+ 5 - 5
src/views/promotionManagement/subsidizedProducts/chooseImportModal.vue

@@ -104,8 +104,8 @@ export default {
         { title: '产品编码', dataIndex: 'productCode', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productCode', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品名称', dataIndex: 'productName', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原售价', dataIndex: 'shopProductPrice', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '原售价', dataIndex: 'shopProductPrice', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '补贴金额', dataIndex: 'subsidyAmount', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '补贴后售价', dataIndex: 'subsidyedPrice', width: '14%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        { title: '抵扣金额', dataIndex: 'subsidyAmount', width: '14%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '抵扣后售价', dataIndex: 'subsidyedPrice', width: '14%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ],
       ],
       loadData: [],
       loadData: [],
       // 错误项
       // 错误项
@@ -114,8 +114,8 @@ export default {
         { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品名称', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原售价', dataIndex: 'shopProductPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '原售价', dataIndex: 'shopProductPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '补贴金额', dataIndex: 'subsidyAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '补贴后售价', dataIndex: 'subsidyedPrice', width: '20%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '抵扣金额', dataIndex: 'subsidyAmount', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '抵扣后售价', dataIndex: 'subsidyedPrice', width: '20%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '备注', scopedSlots: { customRender: 'errorMsg' }, width: '10%', align: 'center' }
         { title: '备注', scopedSlots: { customRender: 'errorMsg' }, width: '10%', align: 'center' }
       ],
       ],
       unLoadData: [],
       unLoadData: [],
@@ -155,7 +155,7 @@ export default {
         return
         return
       }
       }
       _this.spinning = true
       _this.spinning = true
-      hdExportExcel(exportImportDetailError, _this.paramsData.errorList, '补贴金额错误项', function () {
+      hdExportExcel(exportImportDetailError, _this.paramsData.errorList, '抵扣金额错误项', function () {
         _this.spinning = false
         _this.spinning = false
       })
       })
     }
     }

+ 6 - 6
src/views/promotionManagement/subsidizedProducts/editModal.vue

@@ -10,7 +10,7 @@
     :width="500">
     :width="500">
     <a-spin :spinning="spinning" tip="Loading...">
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="subsidyEdit-form">
       <div class="subsidyEdit-form">
-        <span class="subsidyRequired">*</span>补贴金额<a-input-number
+        <span class="subsidyRequired">*</span>抵扣金额<a-input-number
           id="subsidyEdit-subsidyAmount"
           id="subsidyEdit-subsidyAmount"
           v-model.trim="subsidyAmount"
           v-model.trim="subsidyAmount"
           style="width: 40%;margin:0 10px;"
           style="width: 40%;margin:0 10px;"
@@ -37,13 +37,13 @@ export default {
       type: Boolean,
       type: Boolean,
       default: false
       default: false
     },
     },
-    itemSn: {// 补贴产品sn
+    itemSn: {// 抵扣产品sn
       type: Array,
       type: Array,
       default: () => {
       default: () => {
         return []
         return []
       }
       }
     },
     },
-    itemAmount: {// 补贴金额
+    itemAmount: {// 抵扣金额
       type: [Number, String],
       type: [Number, String],
       default: ''
       default: ''
     }
     }
@@ -52,7 +52,7 @@ export default {
     return {
     return {
       spinning: false,
       spinning: false,
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
-      subsidyAmount: undefined// 补贴金额
+      subsidyAmount: undefined// 抵扣金额
     }
     }
   },
   },
   methods: {
   methods: {
@@ -60,7 +60,7 @@ export default {
     handleSave () {
     handleSave () {
       const _this = this
       const _this = this
       if (!_this.subsidyAmount) {
       if (!_this.subsidyAmount) {
-        _this.$message.warning('请输入补贴金额!')
+        _this.$message.warning('请输入抵扣金额!')
         return
         return
       }
       }
       _this.spinning = true
       _this.spinning = true
@@ -100,7 +100,7 @@ export default {
       if (!newValue) {
       if (!newValue) {
         this.$emit('close')
         this.$emit('close')
       } else {
       } else {
-        // 单行编辑时,补贴金额数据回显
+        // 单行编辑时,抵扣金额数据回显
         this.subsidyAmount = this.itemAmount || undefined
         this.subsidyAmount = this.itemAmount || undefined
       }
       }
     }
     }

+ 1 - 1
src/views/promotionManagement/subsidizedProducts/importGuideModal.vue

@@ -92,7 +92,7 @@ export default {
       uploadParams: { // 上传参数
       uploadParams: { // 上传参数
         savePathType: 'local'
         savePathType: 'local'
       },
       },
-      filePath: location.protocol + '//' + location.host + '/templ/产品补贴金额导入模板.xlsx' // 下载模板
+      filePath: location.protocol + '//' + location.host + '/templ/产品抵扣金额导入模板.xlsx' // 下载模板
     }
     }
   },
   },
   methods: {
   methods: {

+ 5 - 5
src/views/promotionManagement/subsidizedProducts/list.vue

@@ -151,8 +151,8 @@ export default {
       openEditModal: false, // 打开编辑弹窗
       openEditModal: false, // 打开编辑弹窗
       rowSelectionInfo: null, // 批量编辑、删除  选择数据
       rowSelectionInfo: null, // 批量编辑、删除  选择数据
       openGuideModal: false, // 导入弹窗
       openGuideModal: false, // 导入弹窗
-      itemId: null, // 当前行补贴产品sn
-      itemAmount: null, // 当前行补贴金额
+      itemId: null, // 当前行抵扣产品sn
+      itemAmount: null, // 当前行抵扣金额
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', align: 'center', width: '50px' },
         { title: '序号', dataIndex: 'no', align: 'center', width: '50px' },
         { title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -163,8 +163,8 @@ export default {
         { title: '产品分类', align: 'center', width: '15%', scopedSlots: { customRender: 'productType' } },
         { title: '产品分类', align: 'center', width: '15%', scopedSlots: { customRender: 'productType' } },
         { title: '商城类目', scopedSlots: { customRender: 'categoryName' }, width: '13%', align: 'center' },
         { title: '商城类目', scopedSlots: { customRender: 'categoryName' }, width: '13%', align: 'center' },
         { title: '原售价', dataIndex: 'shopProductPrice', width: '11%', align: 'right', customRender: text => { return (text || text == 0) ? _this.toThousands(text) : '--' } },
         { title: '原售价', dataIndex: 'shopProductPrice', width: '11%', align: 'right', customRender: text => { return (text || text == 0) ? _this.toThousands(text) : '--' } },
-        { title: '补贴金额', dataIndex: 'subsidyAmount', align: 'right', width: '11%', customRender: text => { return (text || text == 0) ? _this.toThousands(text) : '--' } },
-        { title: '补贴后售价', dataIndex: 'subsidyedPrice', align: 'right', width: '11%', customRender: text => { return (text || text == 0) ? _this.toThousands(text) : '--' } },
+        { title: '抵扣金额', dataIndex: 'subsidyAmount', align: 'right', width: '11%', customRender: text => { return (text || text == 0) ? _this.toThousands(text) : '--' } },
+        { title: '抵扣后售价', dataIndex: 'subsidyedPrice', align: 'right', width: '11%', customRender: text => { return (text || text == 0) ? _this.toThousands(text) : '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '11%', align: 'center' }
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '11%', align: 'center' }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
@@ -199,7 +199,7 @@ export default {
     rowSelectionFun (obj) {
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
       this.rowSelectionInfo = obj || null
     },
     },
-    // 新增补贴产品   确定导入产品
+    // 新增抵扣产品   确定导入产品
     subsidyAddOk (list) {
     subsidyAddOk (list) {
       this.spinning = true
       this.spinning = true
       subsidizedProductSave(list).then(res => {
       subsidizedProductSave(list).then(res => {

+ 3 - 3
src/views/promotionManagement/subsidizedProducts/subsidyAddModal.vue

@@ -57,7 +57,7 @@
       </div>
       </div>
       <div class="subsidyAdd-modal-table">
       <div class="subsidyAdd-modal-table">
         <div class="table-operator">
         <div class="table-operator">
-          <span class="subsidyRequired">*</span>产品补贴<a-input-number
+          <span class="subsidyRequired">*</span>产品抵扣<a-input-number
             id="subsidyAdd-name"
             id="subsidyAdd-name"
             v-model.trim="subsidyAmount"
             v-model.trim="subsidyAmount"
             style="width: 20%;margin:0 10px;"
             style="width: 20%;margin:0 10px;"
@@ -135,7 +135,7 @@ export default {
         productTypeSn3: '', //  产品三级分类
         productTypeSn3: '', //  产品三级分类
         categorySn: undefined // 商城类目
         categorySn: undefined // 商城类目
       },
       },
-      subsidyAmount: undefined, // 产品补贴
+      subsidyAmount: undefined, // 产品抵扣
       rowSelectionInfo: null, // 已选产品
       rowSelectionInfo: null, // 已选产品
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -198,7 +198,7 @@ export default {
         return
         return
       }
       }
       if (!this.subsidyAmount) {
       if (!this.subsidyAmount) {
-        this.$message.info('产品补贴不能为空')
+        this.$message.info('产品抵扣金额不能为空')
         return
         return
       }
       }
       const newList = this.rowSelectionInfo.selectedRows.map(item => {
       const newList = this.rowSelectionInfo.selectedRows.map(item => {