const mixins = require('@/mixins/index.js')
Page({
  mixins: [mixins],
  /**
   * 页面的初始数据
   */
  data: {
    cardList: [{name:'main'},{name:'main2'},{name:'items',title:'预付单据'},{name:'items2',title:'应付单据'},{name:'file'}],
    contentObj: {
      main: [
        { code: 'remarks', type: 'textarea', title: ' 供应商编码' },
        { code: 'staffId', name: 'staffName', type: 'drop', required: true, dropType: 'staff', title: '业务类型' },
        { code: 'staffId', name: 'staffName', type: 'drop', required: false, dropType: 'staff', title: '业务员' },
        { code: 'staffId', name: 'staffName', type: 'drop', required: false, dropType: 'staff', title: '业务部门' },



     

      ],

      main2:[
        { code: 'staffId', name: 'staffName', type: 'drop', required: true, dropType: 'staff', title: '付款人' },
        { code: 'staffId', name: 'staffName', type: 'drop', required: false, dropType: 'staff', title: '付款部门' },
        { code: 'collectAmount', type: 'number', title: '本次付款', required: true },
        { code: 'collectAmount', type: 'number', title: '付款优惠', required: false },
        { code: 'staffId', name: 'staffName', type: 'drop', required: false, dropType: 'staff', title: '付款类型' },
      ],
      items:[{ code: 'remarks', type: 'textarea', title: '预付单号' },{ code: 'collectAmount', type: 'number', title: '核销金额', required: false },{ code: 'collectAmount', type: 'number', title: '核销总额', required: false }],
      items2:[{ code: 'remarks', type: 'textarea', title: '应付单号' },{ code: 'collectAmount', type: 'number', title: '核销金额', required: false },{ code: 'collectAmount', type: 'number', title: '核销总额', required: false }],
      file:[{ code: 'remarks', type: 'textarea', title: '备注' }, { code: 'file', type: 'uploader', title: '附件' }]
    },
  },
  getData() {

  },

  toCustomers() {
    wx.navigateTo({
      url: '../../selecting-customers/selecting-customers',
    })
  },

  openSingle(e) {
    let key = e.currentTarget.dataset.key
    if (key === 'payment-type') {
      // wx.navigateTo({
      //   url: '../../document-list/document-list',
      // })
    }
  },
  toDocumentList() {
    wx.navigateTo({
      url: '../../document-list/document-list',
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

  },

})