This commit is contained in:
linfso 2024-11-17 18:05:59 +08:00
parent 11d0c0c607
commit e628629289

View File

@ -2,33 +2,92 @@
<div >
<el-form ref="form" :model="form" size="mini" :rules="rules" label-width="80px">
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
<el-col :span="24">
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
<el-col :span="12">
<el-form-item label="开票抬头" prop="companyTaxNo">
<span slot="label">
<span style="color: red">开票抬头</span>
</span>
<CustomerInvoiceInfoPicker v-model="form.companyTaxNo" placeholder="开票抬头" @onChange="onCustomerInvoiceInSelect" > </CustomerInvoiceInfoPicker>
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.companyTaxNo">
<div style="padding: 10px;
color: #6f6f6f;
font-size: 14px;
font-weight: 600;
border: 1px solid #eff0f4;
border-radius: 5px;">
<div> <span style="color: blue">开票抬头:</span>{{ form.companyTaxNo }} {{ form.companyName }}</div>
<div> <span style="color: blue">开票地址:</span>{{ form.companyAddress }} {{ form.companyTel }} </div>
<div> <span style="color: blue">开票银行:</span>{{ form.bankName }} {{ form.bankAccNo }}</div>
</div>
</el-col>
</el-row>
<el-col :span="24">
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
<el-col :span="12">
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
<el-col :span="24">
<el-form-item label="开票抬头" prop="companyTaxNo">
<span slot="label">
<span style="color: red">开票抬头</span>
</span>
<CustomerInvoiceInfoPicker v-model="form.companyTaxNo" placeholder="开票抬头" @onChange="onCustomerInvoiceInSelect" > </CustomerInvoiceInfoPicker>
</el-form-item>
</el-col>
<el-col :span="24">
</el-col>
</el-row>
</el-col>
<el-col :span="12" style="padding-left: 10px;">
<div v-if="form.companyTaxNo" style="padding: 10px;
color: #6f6f6f;
font-size: 14px;
font-weight: 600;
border: 1px solid #eff0f4;
border-radius: 5px;">
<div> <span style="color: blue">开票抬头:</span>{{ form.companyTaxNo }} {{ form.companyName }}</div>
<div> <span style="color: blue">开票地址:</span>{{ form.companyAddress }} {{ form.companyTel }} </div>
<div> <span style="color: blue">开票银行:</span>{{ form.bankName }} {{ form.bankAccNo }}</div>
</div>
</el-col>
</el-row>
</el-col>
<el-col :span="24">
<el-form-item label="最近开票" prop="latestOpenBill" >
<!-- <div>最近开票</div> -->
<div>
<XdTable
max-height="280px"
v-loading="lastestLoading"
border
size="mini"
storageName="latest_invoiceRecordList_apply_main1"
:data="lastestInvoiceRecordList"
:queryParams="latestQueryParams"
:total="lastestTotal"
:showRightButton="false"
:showOperateButton="false"
:showStatInfo="false"
:showPagination="false"
@queryTable="latestGetList"
@row-dblclick="handleLatestBillDbClick"
>
<el-table-column label="序号" align="center" width="55">
<template slot-scope="scope">
<span v-text="getIndex(scope.$index)"> </span>
</template>
</el-table-column>
<el-table-column :label="$t('申请时间')" align="center" prop="applyDate" width="170" />
<el-table-column :label="$t('开票抬头')" align="center" prop="companyName" width="170" :show-overflow-tooltip="true" />
<el-table-column :label="$t('申请金额')" align="center" prop="applyMoney" width="100" />
<el-table-column :label="$t('开票状态')" align="center" prop="invoiceStatus" width="100" >
<template slot-scope="scope">
<el-tag v-if="scope.row.invoiceStatus=='0'" type="info">未开票</el-tag>
<el-tag v-if="scope.row.invoiceStatus=='1'" type="warning">开票中</el-tag>
<el-tag v-if="scope.row.invoiceStatus=='2'" type="success">已开票</el-tag>
<el-tag v-if="scope.row.invoiceStatus=='3'" type="error">开票失败</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('审核状态')" align="center" prop="blAudit" width="100" >
<template slot-scope="scope">
<el-tag v-if="scope.row.blAudit=='0'" type="info">未审核</el-tag>
<el-tag el-tag v-if="scope.row.blAudit=='1'" type="success">审核通过</el-tag>
<el-tag v-if="scope.row.blAudit=='2'" type="error">审核不通过</el-tag>
</template>
</el-table-column>
</XdTable>
</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="开票账单" prop="settleBillNo">
@ -38,6 +97,7 @@
<el-input v-model="form.settleBillName" rows="2" type="textarea" placeholder="" disabled />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="开票单号" prop="openBillScope" >
@ -195,6 +255,7 @@
</el-form>
<div style="text-align: center;margin-bottom: 10px;">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button type="primary" @click="submitFormAndContinue">保存并继续开票</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
@ -202,8 +263,9 @@
</template>
<script>
import {listEmisSettleSubBill,listHasOpenInvoiceMap} from "@/api/emis/emisSettleSubBill";
import { addEmisSettleInvoiceRecord } from "@/api/emis/emisSettleInvoiceRecord";
import { listEmisSettleInvoiceRecord,addEmisSettleInvoiceRecord } from "@/api/emis/emisSettleInvoiceRecord";
import CustomerInvoiceInfoPicker from '@/views/emis/EmisBaseTools/CustomerInvoiceInfoPicker.vue';
import { parseTime,genJsSeqNo } from "@/utils/custom";
@ -227,6 +289,16 @@ export default {
// 遮罩层
loading: false,
lastestLoading: false,
lastestInvoiceRecordList:[],
lastestTotal:0,
latestQueryParams:{
pageNum: 1,
pageSize: 5,
settleBillNo: null,
companyTaxNo: null,
},
isPreventReClick:false,
// 表单参数
form: {},
@ -275,8 +347,26 @@ export default {
methods: {
initData() {
this.reset();
this.form.openBillScope='1';
this.changeOpenBillScope();
this.latestGetList();
},
latestGetList(){
this.lastestLoading = true;
this.latestQueryParams.settleBillNo=this.form.settleBillNo;
this.latestQueryParams.companyTaxNo=this.form.companyTaxNo;
listEmisSettleInvoiceRecord(this.latestQueryParams).then(response => {
this.lastestInvoiceRecordList = response.rows;
this.lastestTotal = response.total;
this.lastestLoading = false;
});
},
handleLatestBillDbClick(){
},
async handleCalcFeeItem(row){
let totalFee=Number(0);
@ -495,6 +585,8 @@ export default {
this.form.recieveAddress=item.recieveAddress;
this.form.email=item.email;
this.latestGetList();
},
// 取消按钮
cancel() {
@ -567,7 +659,10 @@ export default {
this.resetForm("form");
},
/** 提交按钮 */
submitForm() {
submitFormAndContinue(){
this.submitForm(true)
},
submitForm(isContinue) {
this.$refs["form"].validate(valid => {
if (valid) {
@ -581,20 +676,28 @@ export default {
// this.$emit("on-changed");
// });
} else {
// this.form.applySeqNo=genJsSeqNo();
// this.form.applyDate = parseTime(new Date());
addEmisSettleInvoiceRecord(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
let empName=this.$store.getters.empName;
let message=empName+" 提交了开票申请,请及时开票!";
this.noticeToEmpUser("padmin,88888042,88888047,88888034,88888059,88888083",message);
this.$emit("on-changed");
if(isContinue){
this.form.openBillScope='1';
this.changeOpenBillScope();
this.latestGetList();
}else{
this.$emit("on-changed");
}
});
}
}
});
},
getIndex($index) {
return (this.latestQueryParams.pageNum - 1) * this.latestQueryParams.pageSize + $index + 1
},
}
};