chenrui 3 kuukautta sitten
vanhempi
commit
ea3ff08dc2

+ 1 - 1
public/version.json

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

+ 10 - 1
src/api/storeAccount.js

@@ -24,7 +24,7 @@ export const storeAccountCount = (params) => {
   })
 }
 
-// 修配易码通-商城  客户账户  记录列表   有分页
+// 修配易码通-商城  客户账户  清零记录、交易流水列表   有分页
 export const storeAccountDetailList = (params) => {
   const url = `/storeAccount/querydetailPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
@@ -47,3 +47,12 @@ export const storeAccountSetZero = (params) => {
     method: 'post'
   })
 }
+
+// 修配易码通-商城  交易流水 统计
+export const storeAccountDetailCount = (params) => {
+  return axios({
+    url: '/storeAccount/queryDetailSum',
+    data: params,
+    method: 'post'
+  })
+}

+ 48 - 24
src/views/numsGoodsShelves/customerAccount/clearRecordModal.vue

@@ -4,7 +4,7 @@
     class="clearRecord-modal edit-search-modal"
     :footer="null"
     :maskClosable="false"
-    :title="'清零记录'+titName+')'"
+    :title="'清零记录'+ titName"
     v-model="isShow"
     @cancel="isShow = false"
     width="55%">
@@ -19,27 +19,22 @@
             id="clearRecord-form"
             @keyup.enter.native="$refs.table.refresh(true)" >
             <a-row :gutter="5">
-              <a-col :md="8" :sm="24">
+              <a-col :md="10" :sm="24">
                 <a-form-item label="清零时间">
                   <rangeDate id="clearRecord-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="clearRecord-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
-                </a-form-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="8" :sm="24">
                 <a-form-item label="清零对象">
                   <v-select
-                    v-model="queryParam.promoType"
-                    id="clearRecord-promoType"
-                    code="SHOP_PROMO_PROMO_STATE"
+                    v-model="queryParam.accountType"
+                    id="clearRecord-accountType"
+                    code="STORE_ACCOUNT_TYPE"
                     placeholder="请选择清零对象"
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24" style="margin-bottom: 10px">
+              <a-col :md="6" :sm="24" style="margin-bottom: 10px">
                 <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>
@@ -54,7 +49,7 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :scroll="{ y: tableHeight }"
+          :scroll="{ y: 300 }"
           :defaultLoadData="false"
           bordered>
         </s-table>
@@ -88,31 +83,38 @@ export default {
     const _this = this
     return {
       spinning: false,
+      disabled: false, // 查询、重置按钮是否可操作
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {// label 样式设置
         labelCol: { span: 3 },
         wrapperCol: { span: 20 }
       },
-      titName: '西安店1', // 弹窗标题
+      titName: null, // 弹窗标题
+      time: [], // 清零时间
+      rowInfo: null, // 回显行数据
       // 查询条件
       queryParam: {
-        beginDate: undefined, // 交易开始时间
-        endDate: undefined, // 交易结束时间
-        productCode: '', // 关联单号
-        promoType: undefined // 交易类型
+        beginDate: undefined, // 清零开始时间
+        endDate: undefined, // 清零结束时间
+        accountType: 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) ? _this.toThousands(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: 'no', width: '8%', align: 'center' },
+        { title: '清零时间', dataIndex: 'createDate', width: '23%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '金额(¥)', dataIndex: 'tradeAmount', width: '23%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '清零对象', dataIndex: 'accountTypeDictValue', width: '23%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作人', dataIndex: 'operatorName', width: '23%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
+        const params = Object.assign(parameter, this.queryParam)
+        params.storeAccountSn = this.rowInfo.storeAccountSn
+        params.storeSn = this.rowInfo.storeSn
+        params.shelfSn = this.rowInfo.shelfSn
+        params.bizType = 'ZERO'
         this.disabled = true
         this.spinning = true
-        return storeAccountDetailList(Object.assign(parameter, this.queryParam)).then(res => {
+        return storeAccountDetailList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -129,6 +131,28 @@ export default {
     }
   },
   methods: {
+    //  清零时间  change
+    dateChange (date) {
+      this.time = date
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
+    },
+    // 初始化加载标题和表格内容
+    pageInit (record) {
+      this.titName = '(' + record.customerName + ')' || ''
+      this.rowInfo = record
+      this.$nextTick(() => {
+        this.resetSearchForm()
+      })
+    },
+    resetSearchForm () {
+      this.time = []
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.beginDate = undefined
+      this.queryParam.endDate = undefined
+      this.queryParam.accountType = undefined
+      this.$refs.table.refresh(true)
+    }
   },
   watch: {
     //  父页面传过来的弹框状态

+ 23 - 24
src/views/numsGoodsShelves/customerAccount/list.vue

@@ -26,10 +26,10 @@
       <div class="table-operator" style="margin-bottom:10px;">
         <div class="alert-message">
           总充值:<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.usedRecharge || totalData.usedRecharge==0) ? toThousands(totalData.usedRecharge) : '--' }}</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.usedDeduction || totalData.usedDeduction==0) ? toThousands(totalData.usedDeduction) : '--' }}</strong>;
           抵扣余额:<strong>{{ totalData&&(totalData.giveBalance || totalData.giveBalance==0) ? toThousands(totalData.giveBalance) : '--' }}</strong>;
         </div>
       </div>
@@ -68,11 +68,11 @@
       </s-table>
     </a-spin>
     <!-- 交易流水 -->
-    <transaction-flow-modal :modalType="modalType" :openModal="openFlowModal" @close="openFlowModal=false"></transaction-flow-modal>
+    <transaction-flow-modal :modalType="modalType" :itemInfo="itemInfo" :openModal="openFlowModal" @close="openFlowModal=false"></transaction-flow-modal>
     <!-- 清零 -->
-    <zero-clearing-modal :openModal="openZeroClearModal" @close="openZeroClearModal=false"></zero-clearing-modal>
+    <zero-clearing-modal ref="zeroClearModal" :openModal="openZeroClearModal" @ok="$refs.table.refresh(true)" @close="openZeroClearModal=false"></zero-clearing-modal>
     <!-- 清零记录 -->
-    <clear-record-modal :openModal="openClearRecordModal" @close="openClearRecordModal=false"></clear-record-modal>
+    <clear-record-modal ref="clearRecordModal" :openModal="openClearRecordModal" @close="openClearRecordModal=false"></clear-record-modal>
   </a-card>
 </template>
 
@@ -100,15 +100,15 @@ export default {
       queryParam: {
         shelfSn: undefined, // 货架sn
         customerSn: undefined, // 关联客户sn
-        customerEntity: { // 关联客户名称
-          customerName: undefined
-        }
+        customerName: undefined// 关联客户名称
       },
+      time: [],
       modalType: '1',
       openFlowModal: false, // 打开 交易流水弹窗
       openZeroClearModal: false, // 打开 清零弹窗
       openClearRecordModal: false, // 打开 清零记录弹窗
       totalData: null, // 统计数据
+      itemInfo: null, // 当前行数据
       // 列定义
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
@@ -149,29 +149,36 @@ export default {
       storeAccountCount(val).then(res => {
         if (res.status == 200) {
           this.totalData = res.data
+        } else {
+          this.totalData = null
         }
       })
     },
     // 交易流水  1 充值余额  2抵扣余额
     handleFlow (row, type) {
       this.modalType = type
+      this.itemInfo = row
       this.openFlowModal = true
     },
-    // 设置/修改
+    // 打开清零记录弹窗
     handleClearRecord (row) {
+      this.$refs.clearRecordModal.pageInit(row)
       this.openClearRecordModal = true
     },
-    // 跳转到货架设置页面
-    handleOkToSet (data) {
-      this.$router.push({ path: `/numsGoodsShelves/shelfSet/set/${data.shelfSn}` })
+    // 打开清零弹窗
+    handleZeroClear (record) {
+      this.$refs.zeroClearModal.pageInit(record)
+      this.$nextTick(() => {
+        this.openZeroClearModal = true
+      })
     },
     // 选择关联客户
     custChange (obj, row) {
       if (row) {
         this.queryParam.customerSn = row && row.customerSn || undefined
-        this.queryParam.customerEntity.customerName = undefined
+        this.queryParam.customerName = undefined
       } else {
-        this.queryParam.customerEntity.customerName = obj || undefined
+        this.queryParam.customerName = obj || undefined
         this.queryParam.customerSn = undefined
       }
     },
@@ -210,14 +217,7 @@ export default {
         }
       })
     },
-    // 打开清零弹框
-    handleZeroClear (record) {
-      this.openZeroClearModal = true
-    },
-    // 确定注销
-    handleCommonOk () {
-      this.updateState(this.nowData)
-    },
+
     // 更改货架状态
     updateState (params) {
       this.spinning = true
@@ -236,9 +236,8 @@ export default {
     resetSearchForm () {
       this.queryParam.shelfSn = undefined
       this.queryParam.customerSn = undefined
-      this.queryParam.customerEntity.customerName = undefined
+      this.queryParam.customerName = undefined
       this.$refs.custList.resetForm()
-      this.queryParam.finishFlag = undefined
       this.$refs.table.refresh(true)
     },
     // 计算表格高度

+ 50 - 61
src/views/numsGoodsShelves/customerAccount/transactionFlowModal.vue

@@ -1,6 +1,6 @@
 <template>
   <a-drawer
-    :title="'交易流水('+titInfo+')'"
+    :title="'交易流水('+itemInfo.customerName+(modalType==1?':充值金额':':抵扣金额')+')'"
     placement="right"
     :visible="isShow"
     width="80%"
@@ -19,23 +19,23 @@
           :model="queryParam"
           @keyup.enter.native="$refs.table.refresh(true)"
           id="transactionFlow-form">
-          <a-row :gutter="5">
-            <a-col :md="6" :sm="24">
+          <a-row :gutter="5" type="flex" justify="center" align="center">
+            <a-col :md="8" :sm="24">
               <a-form-model-item label="交易时间">
                 <rangeDate id="transactionFlow-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="transactionFlow-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+                <a-input id="transactionFlow-bizNo" v-model.trim="queryParam.bizNo" 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="transactionFlow-promoType"
-                  code="SHOP_PROMO_PROMO_STATE"
+                  v-model="queryParam.bizType"
+                  id="transactionFlow-bizType"
+                  code="STORE_ACCOUNT_BIZ_TYPE"
                   placeholder="请选择交易类型"
                   allowClear></v-select>
               </a-form-model-item>
@@ -50,10 +50,10 @@
       <!-- 统计 -->
       <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>;
+          充值金额:<strong>{{ totalData&&(totalData.rechargeAmount || totalData.rechargeAmount==0) ? toThousands(totalData.rechargeAmount) : '--' }}</strong>;
+          销售金额:<strong>{{ totalData&&(totalData.salesAmount || totalData.salesAmount==0) ? toThousands(totalData.salesAmount) : '--' }}</strong>;
+          退款金额:<strong>{{ totalData&&(totalData.refundAmount || totalData.refundAmount==0) ? toThousands(totalData.refundAmount) : '--' }}</strong>;
+          清零金额:<strong>{{ totalData&&(totalData.zeroAmount || totalData.zeroAmount==0) ? toThousands(totalData.zeroAmount) : '--' }}</strong>;
         </div>
       </div>
       <!-- 列表 -->
@@ -80,8 +80,7 @@ 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'
+import { storeAccountDetailList, storeAccountDetailCount } from '@/api/storeAccount' // 接口api
 export default {
   name: 'TransactionFlowModal',
   components: { STable, VSelect, productType, productBrand, rangeDate },
@@ -95,35 +94,46 @@ export default {
     modalType: { // 1是充值交易流水  2是补贴交易流水
       type: String,
       default: '1'
+    },
+    itemInfo: {// 当前行回显数据
+      type: Object,
+      default: () => {
+        return {}
+      }
     }
   },
   data () {
+    const _this = this
     return {
       spinning: false,
       isShow: this.openModal, //  是否打开弹框
       tableHeight: 0, // 表格高度
       totalData: null, // 统计数据
-      titInfo: '西安店1:充值金额',
-      time: [],
+      time: [], // 交易时间
       // 查询条件
       queryParam: {
         beginDate: undefined, // 交易开始时间
         endDate: undefined, // 交易结束时间
-        productCode: '', // 关联单号
-        promoType: undefined // 交易类型
+        bizNo: '', // 关联单号
+        bizType: 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 : '--') } }
+        { title: '交易时间', dataIndex: 'tradeDate', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单号', dataIndex: 'bizNo', width: '24%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '金额(¥)', dataIndex: 'tradeAmount', width: '24%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '交易类型', dataIndex: 'bizTypeDictValue', width: '24%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
+        const params = Object.assign(parameter, this.queryParam)
+        params.storeAccountSn = this.itemInfo.storeAccountSn
+        params.storeSn = this.itemInfo.storeSn
+        params.shelfSn = this.itemInfo.shelfSn
+        params.bizType = this.modalType == 1 ? 'RECHARGE' : 'GIVE'
         this.disabled = true
         this.spinning = true
-        return stockOutDetailList(Object.assign(parameter, this.queryParam)).then(res => {
+        return storeAccountDetailList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -131,6 +141,7 @@ export default {
             for (var i = 0; i < data.length; i++) {
               data[i].no = no + i + 1
             }
+            this.getCount(params)
             this.disabled = false
           }
           this.spinning = false
@@ -145,46 +156,25 @@ export default {
       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 => {
+    // 统计
+    getCount (ajaxData) {
+      storeAccountDetailCount(ajaxData).then(res => {
         if (res.status == 200) {
-          this.categoryOptions = res.data || []
+          this.totalData = res.data || []
+        } else {
+          this.totalData = null
         }
-        _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 () {
-
+      this.time = []
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.beginDate = undefined
+      this.queryParam.endDate = undefined
+      this.queryParam.bizNo = undefined
+      this.queryParam.bizType = undefined
+      this.$refs.table.refresh(true)
     }
   },
   watch: {
@@ -192,15 +182,14 @@ export default {
     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()
+        this.$nextTick(() => {
+          this.resetSearchForm()
+        })
       }
     }
   }

+ 28 - 22
src/views/numsGoodsShelves/customerAccount/zeroClearingModal.vue

@@ -4,16 +4,16 @@
     class="zero-clearing-modal"
     :footer="null"
     :maskClosable="false"
-    :title="'清零'+titName+')'"
+    :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>
+      <div class="mainContent" v-if="conInfo">
+        <a-checkbox-group v-model="accountType" id="zero-clearing-checkbox">
+          <a-checkbox value="RECHARGE" id="zero-clearing-checkbox1">清空{{ (conInfo.rechargeBalance||conInfo.rechargeBalance==0)?toThousands(conInfo.rechargeBalance):'--' }}元【充值余额】</a-checkbox>
           <br />
-          <a-checkbox value="2" id="zero-clearing-checkbox2">清空50.00元【补贴余额】</a-checkbox>
+          <a-checkbox value="GIVE" id="zero-clearing-checkbox2">清空{{ (conInfo.giveBalance||conInfo.giveBalance==0)?toThousands(conInfo.giveBalance):'--' }}元【补贴余额】</a-checkbox>
         </a-checkbox-group>
         <div style="margin-top:10px;">注意:请慎重操作,一旦清空,不可变更</div>
       </div>
@@ -37,39 +37,49 @@ export default {
       //  弹框显示状态
       type: Boolean,
       default: false
-    },
-    itemSn: {
-      type: String,
-      default: ''
     }
   },
   data () {
     return {
-      spinning: false,
+      spinning: false, // 页面加载loading
       isShow: this.openModal, //  是否打开弹框
-      titName: '西安店1',
-      chooseType: undefined// 清空目标
+      titName: '', // 弹窗标题
+      accountType: undefined, // 清空目标
+      conInfo: null // 回显数据内容
     }
   },
   methods: {
     // 清零保存
     handleSave () {
       const _this = this
-      if (!_this.chooseType) {
+      if (!_this.accountType) {
         _this.$message.waining('请选择清空目标')
         return
       }
+      const ajaxData = _this.accountType.map(con => {
+        const obj = {
+          accountType: con,
+          tradeAmount: con === 'RECHARGE' ? '-' + _this.conInfo.rechargeBalance : '-' + _this.conInfo.giveBalance,
+          storeAccountSn: _this.conInfo.storeAccountSn,
+          storeSn: _this.conInfo.storeSn,
+          shelfSn: _this.conInfo.shelfSn
+        }
+        return obj
+      })
       _this.spinning = true
-      storeAccountSetZero({ type: _this.chooseType }).then(res => {
+      storeAccountSetZero(ajaxData).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
           _this.$emit('ok', res.data)
-          setTimeout(() => {
-            _this.isShow = false
-          }, 300)
+          _this.isShow = false
         }
         _this.spinning = false
       })
+    },
+    // 初始化  获取页面回显数据
+    pageInit (row) {
+      this.titName = '(' + row.customerName + ')' || ''
+      this.conInfo = row
     }
   },
   watch: {
@@ -81,11 +91,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
-        this.$refs.ruleForm.resetFields()
-      } else {
-        if (this.mainContent && this.mainContent.length) {
-          this.form.remarks = this.mainContent
-        }
+        this.accountType = undefined
       }
     }
   }

+ 4 - 4
src/views/promotionManagement/rechargeSettings/list.vue

@@ -56,8 +56,8 @@
             v-if="$hasPermissions('B_customer_customerInfo_enable')"
             checkedChildren="启用"
             unCheckedChildren="禁用"
-            v-model="record.state"
-            @change="handleOpenOrClose(record)"/>
+            :checked="record.state==1?true:false"
+            @change="handleStatus(record)"/>
           <span v-else :style="{color:(record.state==1?'#00aa00':'#999')}"> {{ record.state==1? '已启用': '已禁用' }} </span>
         </template>
         <!-- 操作 -->
@@ -165,9 +165,9 @@ export default {
       this.$refs.table.refresh(true)
     },
     // 状态  启用禁用
-    handleOpenOrClose (row) {
+    handleStatus (row) {
       const _this = this
-      const tipWord = row.state == 1 ? '禁用' : '启用' + '后,易码通' + row.state == 1 ? '不可以' : '可以' + '看到该充值规则'
+      const tipWord = (row.state == 1 ? '禁用' : '启用') + '后,易码通' + (row.state == 1 ? '不可以' : '可以') + '看到该充值规则'
       this.$confirm({
         title: '提示',
         content: tipWord,

+ 2 - 2
vue.config.js

@@ -209,8 +209,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.113:8550/qpls-md',
-        target: 'https://p.iscm.360arrow.com/qpls-md',
+        target: 'http://192.168.2.113:8550/qpls-md',
+        // target: 'https://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,