export default {
  execute: function (bill, param) {
    const curbill = bill.dom || bill
    // bill.deleteSubData(param.param.tableName,bill.getSubFocus(),true)
    const imageTable = curbill.getSubData(param.param.tableName)
    const imageTableObj = imageTable[curbill.getSubFocus()]
    const imageId = imageTableObj.getValue('imageId')
    const targetSubTable = curbill.getSubData(param.param.targetTableName)
    if (targetSubTable instanceof Array) {
      for (let i = targetSubTable.length - 1; i >= 0; --i) {
        const tableObj = targetSubTable[i]
        const invoiceId = tableObj.getValue('imageId')
        if (invoiceId == imageId) {
          curbill.deleteSubData(param.param.targetTableName, i, true)
        }
      }
    }
    curbill.deleteSubData(param.param.tableName, curbill.getSubFocus(), true)
  }
}