const Constants = require('@/utils/Constants.js');
import Dialog from '@/dist/dialog/dialog.js';
const mixins = require('@/mixins/index.js')
const app = getApp()
Page({
  mixins: [mixins],
  /**
   * 页面的初始数据
   */
  data: {
    routeObjName: 'cusReceiptPayment',
    cardList: ['main'],
    contentObj: {
      main: [
        { code: 'cusName', type: 'str', title: mixins.$t('cusName'),readonly: true, },
        { code: 'cusPhone', type: 'str', title: mixins.$t('cusPhone'),readonly: true, },
        { code: 'addressFull', type: 'textarea', title: mixins.$t('adddressFull'),readonly: true, },
        { code: 'sumAmtRec', type: 'number', title: mixins.$t("amountCollected"), readonly: true },
        // { code: 'sumAmtRec', type: 'number', title: mixins.$t("cusReturnCollection"), readonly: true },
      
        { code: 'remarks', type: 'textarea', title: mixins.$t("remarks"), readonly: false },
        { code: 'file', type: 'uploader', title: mixins.$t("uploader") }
      ],
    },


  },
  /**
   * @desc : 给表单赋值
   * @date : 2024/2/1 15:49
   * @author : 于继渤
   */
  setValuesByEdit(data) {
    console.log(data)
    this.setData({
      formData:JSON.stringify(data)
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  loadInit(options) {
    if (this.data.item.rpType == '收付款类型-退收款') {
      let contentObj = this.data.contentObj
      contentObj.main[3].title =  mixins.$t("cusReturnCollectionAmt")
      this.setData({
        contentObj:contentObj
      })
    }
  },

  
})