|
@@ -138,11 +138,19 @@
|
|
|
<el-button v-if="hasPermission('finance:invoice:add')" type="primary" icon="el-icon-plus"
|
|
<el-button v-if="hasPermission('finance:invoice:add')" type="primary" icon="el-icon-plus"
|
|
|
@click="start()">新建</el-button>
|
|
@click="start()">新建</el-button>
|
|
|
<!-- <el-button v-if="hasPermission('finance:invoice:del')" type="danger" size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.invoiceTable && $refs.invoiceTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
|
|
<!-- <el-button v-if="hasPermission('finance:invoice:del')" type="danger" size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.invoiceTable && $refs.invoiceTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <el-button v-if="hasPermission('finance:invoice:importInvoiceBatch')" type="primary"
|
|
|
|
|
+ @click="projectImport()" plain>批量收款导入</el-button>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<el-switch v-if="hasPermission('cw_finance:invoice:dd_notice')" v-model="dingNoticeEnabled"
|
|
<el-switch v-if="hasPermission('cw_finance:invoice:dd_notice')" v-model="dingNoticeEnabled"
|
|
|
inline-prompt
|
|
inline-prompt
|
|
|
style="margin-left: 10px;--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
|
|
style="margin-left: 10px;--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
|
|
|
active-value="1" inactive-value="0" active-text="接收钉钉通知" inactive-text="不接收钉钉通知"
|
|
active-value="1" inactive-value="0" active-text="接收钉钉通知" inactive-text="不接收钉钉通知"
|
|
|
:before-change="beforeChangeDingNotice" @change="changeDingNotice" />
|
|
:before-change="beforeChangeDingNotice" @change="changeDingNotice" />
|
|
|
|
|
+
|
|
|
</template>
|
|
</template>
|
|
|
</vxe-toolbar>
|
|
</vxe-toolbar>
|
|
|
<div class="jp-table-body">
|
|
<div class="jp-table-body">
|
|
@@ -171,7 +179,7 @@
|
|
|
scope.row.no }}</el-link>
|
|
scope.row.no }}</el-link>
|
|
|
</template>
|
|
</template>
|
|
|
</vxe-column>
|
|
</vxe-column>
|
|
|
- <vxe-column min-width="150" title="发票号" align="center" field="number"></vxe-column>
|
|
|
|
|
|
|
+ <vxe-column min-width="180" title="发票号" align="center" field="number"></vxe-column>
|
|
|
<vxe-column min-width="150" title="实际开票单位/个人" align="center"
|
|
<vxe-column min-width="150" title="实际开票单位/个人" align="center"
|
|
|
field="billingWorkplaceReal"></vxe-column>
|
|
field="billingWorkplaceReal"></vxe-column>
|
|
|
<vxe-column min-width="150" title="经办人" align="center" field="operator"></vxe-column>
|
|
<vxe-column min-width="150" title="经办人" align="center" field="operator"></vxe-column>
|
|
@@ -276,6 +284,9 @@
|
|
|
<ProgramForm ref="programForm"></ProgramForm>
|
|
<ProgramForm ref="programForm"></ProgramForm>
|
|
|
<user-select1 ref="userSelect1" @doSubmit="selectUser1"></user-select1>
|
|
<user-select1 ref="userSelect1" @doSubmit="selectUser1"></user-select1>
|
|
|
<user-select2 ref="userSelect2" @doSubmit="selectUser2"></user-select2>
|
|
<user-select2 ref="userSelect2" @doSubmit="selectUser2"></user-select2>
|
|
|
|
|
+ <InvoiceListImport ref="invoiceListImport" @refreshDataList="refreshList"></InvoiceListImport>
|
|
|
|
|
+ <InvoiceListImport ref="invoiceListImport" @refreshDataList="refreshList" @import-error="handleImportError"></InvoiceListImport>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -296,6 +307,7 @@ import ProgramPageForm from '@/views/finance/invoice/ProgramPageForm'
|
|
|
import UserSelect1 from '@/views/utils/UserTreeSelect'
|
|
import UserSelect1 from '@/views/utils/UserTreeSelect'
|
|
|
import UserSelect2 from '@/views/utils/UserTreeSelect'
|
|
import UserSelect2 from '@/views/utils/UserTreeSelect'
|
|
|
import { ElMessageBox } from 'element-plus'
|
|
import { ElMessageBox } from 'element-plus'
|
|
|
|
|
+import InvoiceListImport from './InvoiceListImport'
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -351,6 +363,7 @@ export default {
|
|
|
// this.userService = new UserService()
|
|
// this.userService = new UserService()
|
|
|
},
|
|
},
|
|
|
components: {
|
|
components: {
|
|
|
|
|
+ InvoiceListImport,
|
|
|
InvoiceForm,
|
|
InvoiceForm,
|
|
|
UserSelect,
|
|
UserSelect,
|
|
|
SelectUserTree,
|
|
SelectUserTree,
|
|
@@ -375,6 +388,41 @@ export default {
|
|
|
this.refreshList()
|
|
this.refreshList()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ // 收款记录导入
|
|
|
|
|
+ projectImport() {
|
|
|
|
|
+ this.$refs.invoiceListImport.init()
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ handleImportError(data) {
|
|
|
|
|
+ console.log("父页面收到错误:", data);
|
|
|
|
|
+
|
|
|
|
|
+ // 用 async 包裹,彻底解决 ElementUI 弹框乱触发问题!
|
|
|
|
|
+ this.$nextTick(async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ await this.$confirm('导入数据存在问题,是否下载错误详情文件?', '提示', {
|
|
|
|
|
+ confirmButtonText: '是',
|
|
|
|
|
+ cancelButtonText: '否',
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ distinguishCancelAndClose: true // 关键:区分取消和关闭
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // ========== 点 【是】 才会走这里 ==========
|
|
|
|
|
+ console.log("用户确认下载,文件名:", data.excelFileName);
|
|
|
|
|
+
|
|
|
|
|
+ this.financeInvoiceService.downloadImportResult(data.excelFileName).then(res => {
|
|
|
|
|
+ this.$utils.downloadExcel(res, '发票导入错误结果.xlsx');
|
|
|
|
|
+ this.$message.success('文件下载成功!');
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ this.$message.error('下载失败');
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ // ========== 点 【否】 或 关闭 走这里 ==========
|
|
|
|
|
+ this.$message.info('已取消下载');
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
showHide() {
|
|
showHide() {
|
|
|
if (this.showHideItem === false) {
|
|
if (this.showHideItem === false) {
|
|
|
this.showHideItem = true
|
|
this.showHideItem = true
|