批量延迟开票功能
This commit is contained in:
parent
5f2005252d
commit
ad8a43fc1e
@ -61,3 +61,21 @@ export function auditCenterPass(id) {
|
|||||||
data: {}
|
data: {}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量延迟开票
|
||||||
|
export function batchDelayInvoice(ids) {
|
||||||
|
console.log('延迟开票ids batchDelayInvoice:', ids);
|
||||||
|
return request({
|
||||||
|
url: 'emis/emisSettleInvoiceRecord/batchDelayInvoice/' + ids,
|
||||||
|
method: 'post',
|
||||||
|
data: {}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//取消延迟开票
|
||||||
|
export function cancelBatchDelayInvoice(ids) {
|
||||||
|
return request({
|
||||||
|
url: 'emis/emisSettleInvoiceRecord/batchCancelDelayInvoice/' + ids,
|
||||||
|
method: 'post',
|
||||||
|
data: {}
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -175,6 +175,26 @@
|
|||||||
v-hasPermi="['emis:emisSettleInvoiceRecord:export']"
|
v-hasPermi="['emis:emisSettleInvoiceRecord:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple || !selectedAllNotInvoiced"
|
||||||
|
@click="handleBatchDelay"
|
||||||
|
v-hasPermi="['emis:emisSettleInvoiceRecord:delay']"
|
||||||
|
>批量发票延期</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
size="mini"
|
||||||
|
:disabled="single || !selectedAllNotInvoiced"
|
||||||
|
@click="handleBatchCancel"
|
||||||
|
v-hasPermi="['emis:emisSettleInvoiceRecord:cancelDelay']"
|
||||||
|
>取消发票延期</el-button>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -287,7 +307,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { auditCenterNoPass,auditCenterPass,listEmisSettleInvoiceRecord, getEmisSettleInvoiceRecord, delEmisSettleInvoiceRecord, addEmisSettleInvoiceRecord, updateEmisSettleInvoiceRecord } from "@/api/emis/emisSettleInvoiceRecord";
|
import { auditCenterNoPass,auditCenterPass,listEmisSettleInvoiceRecord, getEmisSettleInvoiceRecord, delEmisSettleInvoiceRecord, addEmisSettleInvoiceRecord, updateEmisSettleInvoiceRecord, batchDelayInvoice, cancelBatchDelayInvoice } from "@/api/emis/emisSettleInvoiceRecord";
|
||||||
import OpenBillForm from '@/views/emis/emisSettleInvoiceRecord/OpenBillForm';
|
import OpenBillForm from '@/views/emis/emisSettleInvoiceRecord/OpenBillForm';
|
||||||
import { listEmisSettleInvoiceChRecord } from "@/api/emis/emisSettleInvoiceChRecord";
|
import { listEmisSettleInvoiceChRecord } from "@/api/emis/emisSettleInvoiceChRecord";
|
||||||
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
|
||||||
@ -341,6 +361,7 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
dateTimeRange: [],
|
dateTimeRange: [],
|
||||||
|
selectedAllNotInvoiced:false, //选中数据全是未开票
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -496,6 +517,8 @@ export default {
|
|||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map(item => item.id)
|
||||||
this.single = selection.length!==1
|
this.single = selection.length!==1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
|
//判断选中数据是否全是未开票
|
||||||
|
this.selectedAllNotInvoiced = selection.every(item => item.invoiceStatus === '0');
|
||||||
},
|
},
|
||||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||||
handleSortChange(column) {
|
handleSortChange(column) {
|
||||||
@ -768,6 +791,30 @@ export default {
|
|||||||
dateTimeChange(value){
|
dateTimeChange(value){
|
||||||
this.dateTimeRange=value;
|
this.dateTimeRange=value;
|
||||||
},
|
},
|
||||||
|
handleBatchDelay() {
|
||||||
|
if (this.selectedAllNotInvoiced) {
|
||||||
|
this.$modal.confirm('是否确认延迟开票?').then(()=> {
|
||||||
|
return batchDelayInvoice(this.ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("延迟开票成功");
|
||||||
|
}).catch(() => { });
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError("只能选未开票的记录");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleBatchCancel(row){
|
||||||
|
if(this.selectedAllNotInvoiced){
|
||||||
|
this.$modal.confirm('是否确认取消延迟开票?').then(()=> {
|
||||||
|
return cancelBatchDelayInvoice(this.ids.join(','));
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("取消延迟开票成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError("只能选未开票的记录");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user