import addInfoModal from '../control/copy-bill-modal.vue';
export default {
  execute: function (bill, param) {
    if (param) {
      let component = null;
      let name = GMS.$hideContainer.addComponent(addInfoModal, {}, function (c) {
        component = c;
        c.bill = bill;
        c.selectBill = bill.curForm.name;
        let obj = bill.getBuillData(param.param);
        if (obj.id) {
          c.billId = obj.id;
          setTimeout(() => {
            c.getNewBillId();
          }, 1000)
          c.modal_visible = true;
        } else {
          GAMS.Common.messagePrompt('请在单据中录入数据');
        }
      });
    } else {
      GAMS.Common.messagePrompt('缺少参数');
    }
  }
}