diff --git a/config/index.js b/config/index.js index eb173e0..411c9e3 100644 --- a/config/index.js +++ b/config/index.js @@ -46,7 +46,7 @@ module.exports = { } }, // Various Dev Server settingsss - host: "192.168.31.193", // can be overwritten by process.env.HOST + host: "192.168.31.194", // can be overwritten by process.env.HOST port: 3000, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: false, errorOverlay: true, diff --git a/src/pages/eashier/service/service.vue b/src/pages/eashier/service/service.vue index a1b4192..807f4f6 100644 --- a/src/pages/eashier/service/service.vue +++ b/src/pages/eashier/service/service.vue @@ -389,6 +389,7 @@ export default { rowRecList: [], copyPayList: [], routeNumber: null, + copyAccountList:[] }; }, methods: { @@ -664,10 +665,22 @@ export default { this.sumAmont(); }, openRec(row) { - this.recForm = JSON.parse(JSON.stringify(row)); - this.rowRecList = JSON.parse(JSON.stringify(row.rechargeAccountList)); - this.editProIndex = row.index; - //conslole.log( this.editProIndex) +   /* +       第二次进来row.rechargeAccountList会被不知名清空 +       第一次进来的时候给copyAccountList赋值,因为具有缓存效果不会被清空,当row.rechargeAccountList为空数组的时候,将copyAccountList赋值给rowRecList +      */ +      if(!this.copyAccountList.length){ +        this.copyAccountList = row.rechargeAccountList +      } +      this.recForm = JSON.parse(JSON.stringify(row)); +      if(!row.rechargeAccountList.length){ +        // 数据为空,重新赋值浅拷贝一份 +        this.rowRecList = [...this.copyAccountList] +      }else{ +        // 数组存在直接赋值 +        this.rowRecList = JSON.parse(JSON.stringify(row.rechargeAccountList)); +      } +      this.editProIndex = row.index; }, recashData(v) { this.list = v.list;