
export default {
  execute: function (bill, param) {
    if (bill) {
      let postData = {
        actions: "bill.Basic.quickSave"
      }
      bill.setControlsSate(param["_control_name_"], 'enable',false)
      bill.executeServerAction(postData, function (code, data) {
        bill.setControlsSate(param["_control_name_"], 'enable',true)
        if (code === 200) {
          const id = data.content.billData.id
          GMS.vbus.$emit('change-form-state', { state: 'readOnly', billId: id})
          GMS.$hideContainer.$Message.success('暂存成功');
        } else if (code === 201) {
          GMS.$hideContainer.$Message.error(data.message);
        } else if (code === 202) {
          GMS.$hideContainer.$Message.error("暂存单据异常请联系管理员");
        }
      })
    }
  } 
}