发票结算审批

This commit is contained in:
chenjianan
2019-03-05 10:22:15 +08:00
parent 5e3582a728
commit 70ec28997f
5 changed files with 392 additions and 35 deletions

View File

@@ -0,0 +1,51 @@
import request from '@/utils/request'
// 根据条件查发票结算申请单
export function searchTable1(...group) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_发票结算申请单_查询数据',
param: `时间段_check=${group[0]}&开始日期=${group[1]}&结束日期=${group[2]}&是否提交=1`,
Pagination: group[3] + '&' + group[4]
}
})
}
// 发票结算申请单明细列表
export function searchTable2(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_发票结算申请单明细_查询数据',
param: `发票结算申请单流水号=${num}`
}
})
}
// 入库单明细查询
export function searchInboundCardDetail(data1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_采购入库单_入库单明细_查询数据',
param: '采购入库单流水号=' + data1
}
})
}
// 执行审批
export function excuteApprove(...data) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_发票结算申请单_执行审批',
param: `发票结算申请单流水号=${data[0]}&人员编号=${data[1]}&审批代号=${data[2]}`
}
})
}

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1551698748547" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2829" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M896 928H128c-17.6 0-32-14.4-32-32s14.4-32 32-32h768c17.6 0 32 14.4 32 32s-14.4 32-32 32z m0-128H128c-17.6 0-32-14.4-32-32V608c0-52.8 43.2-96 96-96h204.8c-6.4-38.4-25.6-75.2-52.8-107.2-36.8-41.6-56-94.4-56-148.8 0-60.8 24-118.4 68.8-161.6 44.8-43.2 102.4-64 164.8-62.4C636.8 36.8 734.4 136 736 251.2c1.6 57.6-20.8 113.6-59.2 156.8-27.2 28.8-43.2 64-49.6 104H832c52.8 0 96 43.2 96 96v160c0 17.6-14.4 32-32 32z m-736-64h704V608c0-17.6-14.4-32-32-32H592c-17.6 0-32-14.4-32-32 0-67.2 24-131.2 68.8-179.2 28.8-30.4 43.2-70.4 43.2-112-1.6-83.2-70.4-153.6-153.6-156.8-44.8-1.6-86.4 14.4-116.8 44.8-32 30.4-49.6 72-49.6 115.2 0 38.4 14.4 76.8 40 105.6 46.4 52.8 72 116.8 72 182.4 0 17.6-14.4 32-32 32H192c-17.6 0-32 14.4-32 32v128z" p-id="2830"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -7,19 +7,19 @@ export const wsuri = `ws://192.168.1.231:61101//WebMoudule//websocket`
export const name = `OP8888` export const name = `OP8888`
// 创建axios实例 // 创建axios实例
export const readFile = `http://192.168.1.231:8411/webpage/file/` // invoice export const readFile = `http://localhost:8411/webpage/file/` // invoice
export const readImg = `http://192.168.1.231:8411/webpage/img/` // delivery/MS/performancebond export const readImg = `http://192.168.1.231:8411/webpage/img/` // delivery/MS/performancebond
export const upload = `http://192.168.1.231:8411/submit/uploadFile.ashx` // ContractInformationManagement export const upload = `http://192.168.1.231:8411/submit/uploadFile.ashx` // ContractInformationManagement
export const upload2 = `http://192.168.1.231:8411/submit/upload2.ashx` // delivery export const upload2 = `http://192.168.1.231:8411/submit/upload2.ashx` // delivery
export const upload3 = `http://192.168.1.231:8411/submit/upload3.ashx` // performancebond export const upload3 = `http://192.168.1.231:8411/submit/upload3.ashx` // performancebond
export const uploadInvoiceScan = `http://192.168.1.231:8411/submit/uploadInvoiceScan.ashx` // invoice export const uploadInvoiceScan = `http://localhost:8411/submit/uploadInvoiceScan.ashx` // invoice
export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // ContractInformationManagement export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // ContractInformationManagement
const service = axios.create({ const service = axios.create({
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`, // baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`, // baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`, // baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`, // baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`, baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`, // baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`, // baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间git timeout: 1500000 // 请求超时时间git

View File

@@ -64,42 +64,42 @@
</el-table-column> </el-table-column>
<el-table-column label="采购审批" align="center" min-width="60"> <el-table-column label="采购审批" align="center" min-width="60">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 ? scope.row.姓名 : '未审批' }} {{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审批时间" align="center" min-width="110"> <el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.审批时间 ? scope.row.审批时间 : '—' }} {{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="生产审批" align="center" min-width="60"> <el-table-column label="生产审批" align="center" min-width="60">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 ? scope.row.姓名 : '未审批' }} {{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审批时间" align="center" min-width="110"> <el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.审批时间 ? scope.row.审批时间 : '—' }} {{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="财务审批" align="center" min-width="60"> <el-table-column label="财务审批" align="center" min-width="60">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 ? scope.row.姓名 : '未审批' }} {{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审批时间" align="center" min-width="110"> <el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.审批时间 ? scope.row.审批时间 : '—' }} {{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总经理审批" align="center" min-width="70"> <el-table-column label="总经理审批" align="center" min-width="70">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 ? scope.row.姓名 : '未审批' }} {{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审批时间" align="center" min-width="110"> <el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.审批时间 ? scope.row.审批时间 : '—' }} {{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="300"> <el-table-column label="操作" align="center" width="300">
@@ -705,6 +705,11 @@ export default {
if (this.group2.length === 0) { if (this.group2.length === 0) {
this.$message.warning('请选择入库单') this.$message.warning('请选择入库单')
} else { } else {
this.$confirm('此操作将移除入库单, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const group = [] const group = []
for (let i = 0; i < this.group2.length; i++) { for (let i = 0; i < this.group2.length; i++) {
group.push(this.group2[i].发票结算申请单明细流水号组) group.push(this.group2[i].发票结算申请单明细流水号组)
@@ -718,6 +723,12 @@ export default {
}) })
} else { this.$message.error('移除失败') } } else { this.$message.error('移除失败') }
}) })
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
} }
} }
} }

View File

@@ -2,38 +2,261 @@
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<span>申请时间:</span> <span>申请时间:</span>
<el-date-picker v-model="date1" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择日期"/>&nbsp;~ <el-date-picker v-model="date1" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始日期"/>&nbsp;~
<el-date-picker v-model="date2" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择日期"/> <el-date-picker v-model="date2" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择结束日期"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button> <el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
</el-card> </el-card>
<el-card> <el-card>
登录角色采购部负责人生产部负责人财务部负责人总经理 <h4 style="margin-top: 5px">发票结算申请单</h4>
表1 <el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 330px;overflow:auto" size="mini" @row-click="searchTable2">
发票结算申请单点击查看发票附件信息 及表2点击审批通过/不通过原因审批时间 <el-table-column type="expand">
表2 <template slot-scope="scope">
采购入库单列表点击查询表3 <el-form label-position="left" inline class="demo-table-expand">
表3 <el-row>
采购入库单明细表 <el-col :span="6">
<viewer>
<img :src="scope.row.scanSrc" alt="发票扫描件" height="120px">
</viewer>
</el-col>
<el-col :span="6">
<el-form-item label="已付款项">
<span>{{ scope.row.已付款项 }}</span>
</el-form-item><br>
<el-form-item label="尚欠金额">
<span>{{ scope.row.尚欠金额 }}</span>
</el-form-item><br>
<el-form-item label="备注">
<span>{{ scope.row.备注 }}</span>
</el-form-item><br>
</el-col>
<el-col :span="6">
<el-form-item label="是否费用类发票">
<span>{{ scope.row.是否费用类 }}</span>
</el-form-item><br>
<el-form-item label="税额">
<span>{{ scope.row.税额 }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
</el-table-column>
<el-table-column label="发票号" align="center" min-width="90">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column label="发票金额" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.发票金额 }}
</template>
</el-table-column>
<el-table-column label="申请人" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="采购审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="生产审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="财务审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="总经理审批" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button :disabled="false" type="primary" size="mini" @click="excuteApprove(scope.row)">审批</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-card>
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">采购入库单</h4>
<span>发票号</span>
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable3">
<el-table-column label="入库单号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.入库单号 }}
</template>
</el-table-column>
<el-table-column label="入库日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.入库日期 }}
</template>
</el-table-column>
<el-table-column label="仓库" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.仓库 }}
</template>
</el-table-column>
<el-table-column label="合同编号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.合同编号 }}
</template>
</el-table-column>
<el-table-column label="合同名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.合同名称 }}
</template>
</el-table-column>
<el-table-column label="到货日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.到货日期 }}
</template>
</el-table-column>
<el-table-column label="业务号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.业务号 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.供应商 }}
</template>
</el-table-column>
<el-table-column label="业务员" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.业务员 }}
</template>
</el-table-column>
<el-table-column label="业务类型" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.业务类型 }}
</template>
</el-table-column>
<el-table-column label="采购类型" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购类型 }}
</template>
</el-table-column>
<el-table-column label="入库类型" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.入库类型 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
<h4>采购入库单明细</h4>
<el-table :data="tableData3" border style="width: 100%;max-height: 250px;" height="250px" size="mini">
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.型号 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100" prop="数量">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="本币单价" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.本币单价 }}
</template>
</el-table-column>
<el-table-column label="本币金额" align="center" min-width="100" prop="sum">
<template slot-scope="scope">
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
</template>
</el-table-column>
</el-table>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import {} from '@/api/PurchasingCenter/InvoiceSettlementApprove' import { searchTable1, searchTable2, searchInboundCardDetail, excuteApprove } from '@/api/PurchasingCenter/InvoiceSettlementApprove'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { readFile } from '@/utils/request'
import request from '@/utils/request'
export default { export default {
name: '', // 发票结算审批 name: '', // 发票结算审批
data() { data() {
return { return {
date1: '', date1: '',
date2: '', date2: '',
tableData1: [],
total1: 0, total1: 0,
pageCurrent1: 1, pageCurrent1: 1,
pageSize1: 10 pageSize1: 10,
invoiceNumber: '',
tableData2: [],
tableData3: []
} }
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
'token',
'sidebar', 'sidebar',
'name', 'name',
'id' // 人员编号 'id' // 人员编号
@@ -45,8 +268,76 @@ export default {
}, },
methods: { methods: {
fetchData() { fetchData() {
console.log(this.token)
}, },
searchTable1() {} searchTable1() {
this.date1 && this.date2 ? this.check1 = 1 : (this.check1 = 0, this.date1 = '', this.date2 = '')
searchTable1(this.check1, this.date1, this.date2, this.pageCurrent1, this.pageSize1).then(response => {
this.tableData1 = response.data.rows
this.tableData1.map(v => {
this.$set(v, 'scanSrc', '')
return v
})
for (let i = 0; i < response.data.rows.length; i++) {
this.tableData1[i].scanSrc = this.searchPic(response.data.rows[i], i)
}
this.total1 = response.data.total
})
},
async searchPic(row, i) {
const { data } = await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票结算申请单流水号}`
}
})
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
excuteApprove(row) {
this.$confirm('确认审批签字?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
excuteApprove(row.发票结算申请单流水号, this.id, this.token).then(response => {
if (response.data[0].result === '审批成功') {
this.$message.success('审批成功')
this.searchTable1()
} else if (response.data[0].result === '已完成审批') {
this.$message.warning('已完成审批,不可重复审批')
} else { this.$message.error('审批失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消审批'
})
})
},
searchTable2(row) {
console.log(row)
this.invoiceNumber = row.发票号
searchTable2(row.发票结算申请单流水号).then(response => {
this.tableData2 = response.data
})
},
searchTable3(row) {
console.log(row)
searchInboundCardDetail(row.采购入库单流水号).then(response => {
this.tableData3 = response.data
})
}
} }
} }
</script> </script>
@@ -64,4 +355,7 @@ export default {
span{ span{
margin: 10px 0 10px 10px; margin: 10px 0 10px 10px;
} }
#expandTable .el-form-item{
margin: 0;
}
</style> </style>