Handlepan.vue 9.24 KB
<template>
	<div class="eibs-tab">

		<c-col :span="24">
			<span style="margin-left:20px">正常发票</span>
		</c-col>

		<c-col :span="20">
			<div style="padding: 0 20px">
				<el-table  :data="model.imgInvmod.invrep.zcinvlst" style="width: 100%">
					<el-table-column prop="repflg" label="替换" sortable min-width="100">
						<template slot-scope="scope">
							<c-checkbox v-model="scope.row.repflg" disabled style="margin-right: 30px;" @change="changeFlg(scope.row)" true-label="X" false-label="" ></c-checkbox>
						</template>
						
					</el-table-column>
					<el-table-column prop="invcod" label="发票代码" sortable min-width="100">
					</el-table-column>
					<el-table-column prop="invnum" label="发票号码" sortable min-width="100">
					</el-table-column>
					<el-table-column prop="monstatus" label="发票监控状态" sortable min-width="160">
						<template slot-scope="scope">
							{{getLabel(dbCodes.monsta,scope.row.monstatus)}}
						</template>
					</el-table-column>
					<el-table-column prop="hantyp" label="处理状态" sortable min-width="100">
						<template slot-scope="scope">
							{{getLabel(hantyp,scope.row.hantyp)}}
						</template>
					</el-table-column>
					<el-table-column prop="handat" label="处理时间" sortable min-width="100">
					</el-table-column>
					<el-table-column prop="CMAIL7" label="处理用户" sortable min-width="100">
					</el-table-column>
					<el-table-column prop="invdat" label="开票日期" sortable min-width="100">
					</el-table-column>
					<el-table-column prop="amountin" label="发票占用金额" sortable min-width="150">
					</el-table-column>
					<el-table-column prop="amounttax" label="价税合计" sortable min-width="100">
					</el-table-column>
				</el-table>
			</div>
		</c-col>
		<!-- <c-col :span="4">
			<div style="margin-top: 50px; margin-left: 20px">
				<span style="margin-right:10px">替换</span>
			<c-button size="small" type="primary" @click="selectAll('tz')">全选</c-button>
			<c-button size="small" type="primary" @click="clearAll('tz')">清空</c-button>
			</div>
		</c-col> -->

		<c-col :span="24">
			<span style="margin-left:20px">异常发票</span>
		</c-col>

		<c-col :span="20">
			<div style="padding: 0 20px">
				<el-table  :data="model.imgInvmod.invrep.fzcinvlst" style="width: 100%">
					<el-table-column prop="repflg" label="替换" sortable min-width="100">
						<template slot-scope="scope">
							<c-checkbox v-model="scope.row.repflg" style="margin-right: 30px;" @change="changeFlg(scope.row)" true-label="X" false-label="" ></c-checkbox>
						</template>
					</el-table-column>
					<el-table-column prop="ignflg" label="忽略" sortable min-width="100">
						<template slot-scope="scope">
							<c-checkbox v-model="scope.row.ignflg" style="margin-right: 30px;" true-label="X" false-label="" ></c-checkbox>
						</template>
					</el-table-column>
					<el-table-column prop="invcod" label="发票代码" sortable min-width="100">
					</el-table-column>
					<el-table-column prop="invnum" label="发票号码" sortable min-width="100">
					</el-table-column>
					<el-table-column prop="monstatus" label="发票监控状态" sortable min-width="160">
						<template slot-scope="scope">
							{{getLabel(dbCodes.monsta,scope.row.monstatus)}}
						</template>
					</el-table-column>
					<el-table-column prop="hantyp" label="处理状态" sortable min-width="100">
						<template slot-scope="scope">
							{{getLabel(hantyp,scope.row.hantyp)}}
						</template>
					</el-table-column>
					<el-table-column prop="handat" label="处理时间" sortable min-width="100">
					</el-table-column>
					<el-table-column prop="CMAIL7" label="处理用户" sortable min-width="100">
					</el-table-column>
					<el-table-column prop="invdat" label="开票日期" sortable min-width="100">
					</el-table-column>
					<el-table-column prop="amountin" label="发票占用金额" sortable min-width="150">
					</el-table-column>
					<el-table-column prop="amounttax" label="价税合计" sortable min-width="100">
					</el-table-column>
				</el-table>
			</div>
		</c-col>
		<c-col :span="4">
			<div style="margin-top: 30px; margin-left: 20px">
				<span style="margin-right:10px">替换</span>
			<c-button size="small" type="primary" @click="selectAll('ty')">全选</c-button>
			<c-button size="small" type="primary" @click="clearAll('ty')">清空</c-button>
			
			</div>
			<div style="margin-top: 20px; margin-left: 20px">
				<span style="margin-right:10px">忽略</span>
			<c-button size="small" type="primary" @click="selectAll('hy')">全选</c-button>
			<c-button size="small" type="primary" @click="clearAll('hy')">清空</c-button>
			</div>
		</c-col>

		<c-col :span="24">
			<span style="margin-left:20px">重复核验/重复监控</span>
		</c-col>

		<c-col :span="20">
			<div style="padding: 0 20px">
				<el-table  :data="model.imgInvmod.invrep.cfinvlst" style="width: 100%">
					<el-table-column prop="repflg" label="替换" sortable min-width="100">
						<template slot-scope="scope">
							<c-checkbox v-model="scope.row.repflg" style="margin-right: 30px;" @change="changeFlg(scope.row)" true-label="X" false-label="" ></c-checkbox>
						</template>
					</el-table-column>
					<el-table-column prop="ignflg" label="忽略" sortable min-width="100">
						<template slot-scope="scope">
							<c-checkbox v-model="scope.row.ignflg" style="margin-right: 30px;" true-label="X" false-label="" ></c-checkbox>
						</template>
					</el-table-column>
					<el-table-column prop="invcod" label="发票代码" sortable min-width="100">
					</el-table-column>
					<el-table-column prop="invnum" label="发票号码" sortable min-width="100">
					</el-table-column>
					<el-table-column prop="monstatus" label="发票监控状态" sortable min-width="160">
						<template slot-scope="scope">
							{{getLabel(dbCodes.monsta,scope.row.monstatus)}}
						</template>
					</el-table-column>
					<el-table-column prop="hantyp" label="处理状态" sortable min-width="100">
						<template slot-scope="scope">
							{{getLabel(hantyp,scope.row.hantyp)}}
						</template>
					</el-table-column>
					<el-table-column prop="handat" label="处理时间" sortable min-width="100">
					</el-table-column>
					<el-table-column prop="CMAIL7" label="处理用户" sortable min-width="100">
					</el-table-column>
					<el-table-column prop="invdat" label="开票日期" sortable min-width="100">
					</el-table-column>
					<el-table-column prop="amountin" label="发票占用金额" sortable min-width="150">
					</el-table-column>
					<el-table-column prop="amounttax" label="价税合计" sortable min-width="100">
					</el-table-column>
				</el-table>
			</div>
		</c-col>
		<c-col :span="4">
			<div style="margin-top: 30px; margin-left: 20px">
				<span style="margin-right:10px">替换</span>
			<c-button size="small" type="primary" @click="selectAll('tc')">全选</c-button>
			<c-button size="small" type="primary" @click="clearAll('tc')">清空</c-button>
			
			</div>
			<div style="margin-top: 20px; margin-left: 20px">
				<span style="margin-right:10px">忽略</span>
			<c-button size="small" type="primary" @click="selectAll('hc')">全选</c-button>
			<c-button size="small" type="primary" @click="clearAll('hc')">清空</c-button>
			</div>
		</c-col>

		<c-col :span="12">
			<el-form-item label="被替换发票占用总金额" style="margin-top:20px" prop="totalamountin">
				<c-input-currency v-model="totalamountin" :precision="2"  disabled ></c-input-currency>
			</el-form-item>
		</c-col>
	</div>
</template>
<script>
import event from "../event";
import Api from '~/service/Api';
export default {
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [event],
  data() {
    return {
			dbCodes: {
				monsta: [],
			},
				hantyp:[
				{ 'label': '已处理被替换', 'value': 'A' },
        { 'label': '已忽略', 'value': 'B' },
        { 'label': '未处理', 'value': 'C' },
			],
		};
	},
	computed:{
		totalamountin(){
			let total = 0
			if(this.model.imgInvmod.invrep.zcinvlst.length > 0){
				this.model.imgInvmod.invrep.zcinvlst.forEach(item =>{
					if(item.repflg == 'X'){
						total = total + Number(item.amountin)
					}
				})
			}
			if(this.model.imgInvmod.invrep.fzcinvlst.length > 0){
				this.model.imgInvmod.invrep.fzcinvlst.forEach(item =>{
					if(item.repflg == 'X'){
						total = total + Number(item.amountin)
					}
				})
			}
			if(this.model.imgInvmod.invrep.cfinvlst.length > 0){
				this.model.imgInvmod.invrep.cfinvlst.forEach(item =>{
					if(item.repflg == 'X'){
						total = total + Number(item.amountin)
					}
				})
			}
			this.model.imgInvmod.invrep.totalamountin = total
			return total
		}
	},
	methods: {
			async getdbCode(dbCode, codeNam) {
			let params = {
				codeType: dbCode,
				uil: 'EN'
			}
			let rtnmsg = await Api.post("/manager/dic/listDicInfo", params)
			if (rtnmsg.respCode === SUCCESS) {
				let srvtxt = rtnmsg.data.map(item => ({
					value: item.codeValue,
					label: item.codeName
				}));
				this.dbCodes[codeNam] = srvtxt
			}
		},
		getLabel(list, id) {
			if (id != '' && Array.isArray(list) && list.length != 0) {
				return !list.find(item => item['value'] == id) ? id : list.find(item => item['value'] == id)['label']
			}
		},
	},
	created() {},
	mounted() {
    this.getdbCode("monsta", "monsta");
  },
};
</script>
<style>
</style>