| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- const _Http = getApp().globalData.http;
- Component({
- properties: {
- disabled: {
- type: Boolean
- }
- },
- data: {
- list: [],
- sys_enterpriseid: "",
- "content": {
- "nocache": true,
- "pageNumber": 1,
- "pageTotal": 1,
- "total": null,
- "type": 1,
- "where": {
- "condition": ""
- }
- }
- },
- lifetimes: {
- attached: function () {
- getApp().globalData.Language.getLanguagePackage(this)
- }
- },
- methods: {
- getList(id, init) {
- let content = this.data.content;
- content.sys_enterpriseid = id;
- if (init) content.pageNumber = 1
- _Http.basic({
- "id": "20221022165803",
- content
- }).then(res => {
- console.log("银行卡信息", res)
- if (res.code != '1') return wx.showToast({
- title: res.data,
- icon: "none"
- })
- this.setData({
- list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
- "content.pageNumber": res.pageNumber + 1,
- "content.pageSize": res.pageSize,
- "content.pageTotal": res.pageTotal,
- "content.total": res.total,
- sys_enterpriseid: id
- });
- })
- },
- addOffers() {
- wx.navigateTo({
- url: '/packageA/setclient/modules/bankcard/update?sys_enterpriseid=' + this.data.sys_enterpriseid,
- })
- },
- /* 修改总数 */
- changeTotal() {
- this.setData({
- "content.total": this.data.content.total - 1
- })
- },
- deleteItem({
- detail
- }) {
- _Http.basic({
- "id": 20221022165903,
- "content": {
- "sys_enterprise_bankids": [detail.sys_enterprise_bankid]
- }
- }).then(res => {
- console.log("删除", res)
- wx.showToast({
- title: res.code == '1' ? getApp().globalData.Language.getMapText('删除成功') : res.msg,
- icon: "none",
- mask: true
- })
- if (res.code == '1') this.setData({
- list: this.data.list.filter(v => v.sys_enterprise_bankid != detail.sys_enterprise_bankid),
- "content.total": this.data.content.total - 1
- })
- })
- }
- }
- })
|