You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

404 lines
15 KiB

<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div v-show="viewState == 1">
<button-bar view-title="发票内部接收管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content">
<div class="switch_btn">
<el-button :class="{btn_style:viewState === 1}">待接收</el-button>
<el-button class="" @click="handleClick">已接收</el-button>
</div>
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="合同编号">
<el-input v-model="listQuery.params.contractNo" clearable placeholder="" class="addinputw"></el-input>
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" clearable placeholder="" class="addinputw"></el-input>
</el-form-item>
<!-- <el-form-item label="开票单位">-->
<!-- <el-input v-model="listQuery.params.customerName" clearable placeholder="" class="addinputw"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="开票类型">-->
<!-- <el-select v-model="listQuery.params.payTypeKey" class="filter-item" clearable placeholder="请选择">-->
<!-- <el-option v-for="item in payType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="开票名称">-->
<!-- <el-input v-model="listQuery.params.customerName" clearable placeholder="" class="addinputw"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="发票号">-->
<!-- <el-input v-model="listQuery.params.customerName" clearable placeholder="" class="addinputw"></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="移交部门">
<el-input v-model="listQuery.params.transferDept" clearable placeholder="" class="addinputw"></el-input>
</el-form-item>
<el-form-item label="移交人">
<el-input v-model="listQuery.params.transferName" clearable placeholder="" class="addinputw"></el-input>
</el-form-item>
<el-form-item label="创建日期">
<el-date-picker v-model="listQuery.params.receiveTimeStart" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
<span style="padding: 0 8px">至</span>
<el-date-picker v-model="listQuery.params.receiveTimeEnd" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">待接收资料列表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column width="50" type="selection" align="center"/>
<el-table-column fixed label="序号" width="60" type="index" :index="indexMethod" align="center"/>
<el-table-column fixed label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toEdit(scope.row)">确认</el-button>
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="合同编号" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.contractNo }}</span>
</template>
</el-table-column>
<el-table-column label="车架号" align="center" width="180">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="开票单位" align="center" width="180">
<template slot-scope="scope">
<span>{{ scope.row.invoiceTitle }}</span>
</template>
</el-table-column>
<el-table-column label="开票类型" align="center" width="180">
<template slot-scope="scope">
<span>{{ scope.row.invoiceType }}</span>
</template>
</el-table-column>
<el-table-column label="开票名称" align="center" width="180">
<template slot-scope="scope">
<span>{{ scope.row.invoicingName }}</span>
</template>
</el-table-column>
<el-table-column label="开票金额" align="center" width="180">
<template slot-scope="scope">
<span>{{ scope.row.invoiceAmount }}</span>
</template>
</el-table-column>
<el-table-column label="发票号" align="center" width="180">
<template slot-scope="scope">
<span>{{ scope.row.invoiceNo }}</span>
</template>
</el-table-column>
<el-table-column label="移交部门" align="center" width="180">
<template slot-scope="scope">
<span>{{ scope.row.transferDept }}</span>
</template>
</el-table-column>
<el-table-column label="移交人" align="center" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.transferName }}</span>
</template>
</el-table-column>
<el-table-column label="移交备注" align="center" width="180">
<template slot-scope="scope">
<span>{{ scope.row.transferRemarks }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
<!-- End 列表页面 -->
<!-- 已接收列表 -->
<Internalinvoicereceive v-show="viewState == 2" ref="divYiJieShou"/>
<!-- 发票内部接收确认 -->
<InternalinvoicereceiveAdd v-show="viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList"/>
<!-- 批量确认 -->
<el-dialog :visible.sync="dialogVisible" width="70%">
<el-form :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="24">
<div class="span-sty">接收发票的车架号</div>
<el-form-item><span class="addinputInfo">{{ formobj.vinNo }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">接收说明</div>
<el-form-item><el-input v-model="formobj.receiveRemarks" class="addinputInfo addinputw" clearable placeholder="若为邮寄发票,请写明快递公司、快递单号"/></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty" style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center"><span class="icon">*</span>接收附件</div>
<el-form-item> <upload ref="uploadImg" class="addinputInfo" v-model="image_list1" :accept="accept" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/></el-form-item>
</el-col>
</el-row>
</el-form>
<div style="text-align: center;padding-top: 5px">
<el-button size="small" type="primary" @click="handleConfirm">确认</el-button>
<el-button size="small" @click="dialogVisible = false">关闭</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { pagerList, confirmRecords } from '@/api/fapiaoneibujieshou/Internalinvoicereceive'
import { typeValues } from '@/api/dictcommons/dictcommons'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import InternalinvoicereceiveAdd from './InternalinvoicereceiveAdd'
import Internalinvoicereceive from './Internalinvoicereceive'
import upload from '@/components/uploadFile/upload'
export default {
name: 'fapiaoneibudaijieshou',
components: {
Pagination,
pageye,
ButtonBar,
InternalinvoicereceiveAdd,
Internalinvoicereceive,
upload
},
data() {
return {
viewState: 1,
btndisabled: false,
dialogVisible: false,
accept: '.jpg,.jpeg,.png,.JPG,.JPEG',
image_list1: [],
btnList: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'batchConfirmation',
btnLabel: '批量确认'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
// 查询条件 -----------
tableKey: 0,
list: [],
sids: [],
payType_list: [],
FormLoading: false,
listLoading: false,
listQuery: {
params: {
contractNo: '',
createTimeStart: '',
createtimeEnd: '',
menuUrl: '',
orgPath: '',
receiveTimeEnd: '',
receiveTimeStart: '',
roleSid: '',
transferDept: '',
transferName: '',
type: 0,
userSid: '',
vinNo: ''
},
current: 1,
size: 10,
total: 0
},
formobj: {
receiveRemarks: '',
vinNo: '',
orgPath: '',
receiveFilesList: [],
sidsList: [],
userSid: ''
}
}
},
created() {
// 初始化变量
this.init()
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
// 搜索条件效果
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'batchConfirmation':
this.batchConfirmation()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
init() {
typeValues({ type: 'invoiceType' }).then((res) => {
if (res.success) {
this.payType_list = res.data
}
})
},
// 序号
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
handleSelectionChange(row) {
const aa = []
const bb = []
row.forEach((element) => {
aa.push(element.sid)
bb.push(element.vinNo)
})
this.sids = aa
this.formobj.vinNo = bb.join(',')
console.log('sids', this.sids)
},
// 查询列表信息
getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
pagerList(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
handleClick() {
this.viewState = 2
this.$refs['divYiJieShou'].init()
},
// 查询按钮
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
this.listQuery = {
params: {
contractNo: '',
customerName: '',
menuUrl: '',
orgPath: '',
payTypeKey: '',
type: '1',
userSid: ''
},
current: 1,
size: 10,
total: 0
}
this.getList()
},
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
resetState() {
this.viewState = 1
},
batchConfirmation() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行批量确认操作' })
return
} else {
this.formobj = {
receiveRemarks: '',
vinNo: '',
orgPath: '',
receiveFilesList: [],
sidsList: [],
userSid: ''
}
this.dialogVisible = true
}
},
handleConfirm() {
if (this.image_list1.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请上传接收附件' })
return
}
for (var i = 0; i< this.image_list1.length; i++) {
this.formobj.receiveFilesList.push(this.image_list1[i].url)
}
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.formobj.userSid = window.sessionStorage.getItem('userSid')
this.formobj.sidsList = this.sids
confirmRecords(this.formobj).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '操作成功' })
this.getList()
}
})
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.btn_style {
background-color: #018ad2;
color: white;
font-weight: 600;
}
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>