This commit is contained in:
liushuai
2020-03-25 17:57:28 +08:00
parent b032a43809
commit ff3a340570
11 changed files with 300 additions and 278 deletions

View File

@@ -2,7 +2,7 @@
<div class="app-container">
<el-card>
<!-- <span>发票号:</span>-->
<el-input v-model="invoiceNum" placeholder="票号\供应商" size="small" clearable/>
<el-input v-model="invoiceNum" placeholder="票号\供应商" size="small" clearable/>
<el-button type="primary" size="small" plain icon="el-icon-search" style="margin-left:10px" @click="tableData2=[];total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
<el-button type="distribution" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="createOrder()">到票</el-button>
</el-card>
@@ -47,12 +47,12 @@
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="票号" prop="发票号" align="center" width="130">
<el-table-column label="票号" prop="发票号" align="center" width="130">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</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">
{{ scope.row.发票金额 }}
</template>
@@ -128,8 +128,8 @@
<el-card>
<h4 style="margin: 5px;display: inline-block;width: 150px;">到票结算申请单明</h4>
<span>票号</span>
<el-input v-model="invoiceNumber" size="small" placeholder="请选择票结算申请单" readonly/>
<span>票号</span>
<el-input v-model="invoiceNumber" size="small" placeholder="请选择票结算申请单" readonly/>
<el-button :disabled="disabled" type="distribution" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="addInStoreRecord()">追加入库记录</el-button>
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini">
<el-table-column label="名称" align="center" width="150">
@@ -188,20 +188,20 @@
<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="110px">
<el-row>
<el-col :span="12">
<el-form-item label="票号" prop="invoiceNum">
<el-input v-model="form1.invoiceNum" size="small" placeholder="票号"/>
<el-form-item label="票号" prop="invoiceNum">
<el-input v-model="form1.invoiceNum" size="small" placeholder="票号"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="票金额(元)" prop="money">
<el-input v-positive="'float'" v-model="form1.money" type="float" size="small" placeholder="票金额"/>
<el-form-item label="票金额(元)" prop="money">
<el-input v-positive="'float'" v-model="form1.money" type="float" size="small" placeholder="票金额"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="供应商" prop="supplierValue">
<el-select v-model="form1.supplierValue" :disabled="title1 === '编辑票结算申请单'" placeholder="供应商" filterable size="small">
<el-select v-model="form1.supplierValue" :disabled="title1 === '编辑票结算申请单'" placeholder="供应商" filterable size="small">
<el-option
v-for="item in supplier"
:key="item.value"
@@ -231,7 +231,7 @@
<el-row v-if="false">
<el-col :span="12">
<el-form-item label="是否费用类">
<el-input v-model="form1.isCost" size="small" placeholder="是否费用类票"/>
<el-input v-model="form1.isCost" size="small" placeholder="是否费用类票"/>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -258,14 +258,14 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
<el-button v-if="title1 === '创建票结算申请单'" size="small" type="primary" @click="submitAdd1()">确定</el-button>
<el-button v-if="title1 === '创建票结算申请单'" size="small" type="primary" @click="submitAdd1()">确定</el-button>
<el-button v-else size="small" type="primary" @click="submitEdit()">确定</el-button>
</div>
</el-dialog>
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="900px">
<span>供应商</span>
<el-input v-model="supplierName" size="small" placeholder="请选择供应商票" style="margin: 0 5px 10px 0;" readonly/>
<el-input v-model="supplierName" size="small" placeholder="请选择供应商票" style="margin: 0 5px 10px 0;" readonly/>
<el-radio-group v-show="false" v-model="contractType" size="small" @change="searchTable01()">
<el-radio label="采购合同" border/>
<el-radio label="离线合同" border/>
@@ -412,10 +412,10 @@ export default {
},
rules1: {
invoiceNum: [
{ required: true, message: '请输入票号' }
{ required: true, message: '请输入票号' }
],
money: [
{ required: true, message: '请输入票金额' }
{ required: true, message: '请输入票金额' }
],
supplierValue: [
{ required: true, message: '请选择供应商' }
@@ -465,7 +465,7 @@ export default {
this.form1.tax = ''
this.form1.isCost = ''
this.form1.remark = ''
this.title1 = '创建票结算申请单'
this.title1 = '创建票结算申请单'
this.dialogVisible1 = true
},
searchTable1() {
@@ -530,7 +530,7 @@ export default {
this.form1.isCost = row.是否费用类
this.form1.remark = row.备注
this.form1.applyOrderNum = row.发票结算申请单流水号
this.title1 = '编辑票结算申请单'
this.title1 = '编辑票结算申请单'
this.dialogVisible1 = true
},
handleDelete(row) {
@@ -557,7 +557,7 @@ export default {
async searchPic(row, i) {
},
warningExceed() {
this.$message.error('仅可上传一张票')
this.$message.error('仅可上传一张票')
},
beforeUpload(file) { // 上传前检测
const isJPG = /^image\/.*/.test(file.type)
@@ -591,7 +591,7 @@ export default {
},
submitApply(row) {
if (this.tableData2.length === 0) {
this.$message.warning('票结算申请明细为空!')
this.$message.warning('票结算申请明细为空!')
} else {
this.$confirm('确认提交申请吗?', '提示', {
confirmButtonText: '确定',
@@ -630,7 +630,7 @@ export default {
this.title2 = '追加入库单'
this.dialogVisible2 = true
} else {
this.$message.error('请选择票!')
this.$message.error('请选择票!')
}
},
searchTable01() {

View File

@@ -7,51 +7,51 @@
<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>
<h4 style="margin-top: 5px">票结算申请单</h4>
<h4 style="margin: 5px">票结算申请单</h4>
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%" height="330" size="mini" @row-click="searchTable2">
<el-table-column label="展开" align="center" type="expand" >
<template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand">
<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" type="expand" >-->
<!-- <template slot-scope="scope">-->
<!-- <el-form label-position="left" inline class="demo-table-expand">-->
<!-- <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="200">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="票号" align="center" min-width="118">
<el-table-column label="票号" align="center" min-width="118">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column label="票金额" align="center" min-width="70">
<el-table-column label="票金额(元)" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.发票金额 }}
</template>
@@ -63,10 +63,10 @@
</el-table-column>
<el-table-column label="申请时间" align="center" min-width="140">
<template slot-scope="scope">
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
{{ scope.row.申请时间 ? scope.row.申请时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="采购审批" align="center" min-width="60">
<el-table-column label="采购审批" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
</template>
@@ -76,7 +76,7 @@
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="财务审批" align="center" min-width="60">
<el-table-column label="财务审批" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
</template>
@@ -86,7 +86,7 @@
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="总经理审批" align="center" min-width="70">
<el-table-column label="总经理审批" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>
@@ -116,9 +116,9 @@
</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/>
<h4 style="margin: 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">
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">

View File

@@ -2,7 +2,7 @@
<div class="app-container">
<el-card>
<el-row>
<el-input v-model="invoiceNum" placeholder="票号" size="small" style="margin: 3px 0;width: 140px" clearable/>
<el-input v-model="invoiceNum" placeholder="票号" size="small" style="margin: 3px 0;width: 140px" clearable/>
<el-input v-show="false" v-model="supplierName0" placeholder="供应商" size="small" style="width:140px;margin-left: 10px" clearable @focus="fetchData"/>
<el-select v-model="gongyingshangValue" placeholder="供应商" style="width: 180px;margin-left: 10px" size="small" filterable clearable @change="searchTable1">
<el-option
@@ -41,7 +41,7 @@
style="width: 180px"
type="date"
placeholder="选择日期"/>
<el-tooltip :open-delay="1200" effect="dark" content="查询外购备料发票信息" placement="top">
<el-tooltip :open-delay="1200" effect="dark" content="查询外购备料信息" placement="top">
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=30;searchTable1()">查询</el-button>
</el-tooltip>
<el-button class="button111" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addTable1()">到票</el-button>
@@ -64,26 +64,21 @@
<span v-else-if="Number(scope.row.是否请款) === 1" type="primary" size="mini">已请款</span>
</template>
</el-table-column>
<el-table-column align="center" label="票号" width="110px">
<el-table-column align="center" label="票号" width="110px">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column align="center" label="票时间" prop="开票时间" width="100px">
<el-table-column align="center" label="票时间" prop="开票时间" width="100px">
<template slot-scope="scope">
{{ scope.row.开票时间 | formatTime }}
</template>
</el-table-column>
<el-table-column align="center" label="票金额(元)" width="110px">
<el-table-column align="center" label="票金额(元)" width="110px">
<template slot-scope="scope">
{{ scope.row.开票金额.toFixed(2) }}
</template>
</el-table-column>
<el-table-column align="center" label="到货金额(元)" width="110px">
<template slot-scope="scope">
{{ Number(scope.row.到货金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column align="center" label="供应商" prop="供应商名称" min-width="190px" width="190px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
@@ -147,7 +142,7 @@
</el-card>
<el-card style="float: left;margin-left: 5px">
<el-table :data="gridData" :header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}" :summary-method="getSummaries" class="subTableHeader" show-summary border size="mini" style="width: 100%">
<el-table-column width="55" align="center" type="index" label="序号"/>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column label="到货单编号" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.到货单编号 }}
@@ -191,8 +186,8 @@
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="票号">
<el-input v-model="form1.Number" size="small" placeholder="票号"/>
<el-form-item label="票号">
<el-input v-model="form1.Number" size="small" placeholder="票号"/>
</el-form-item>
<el-form-item label="到票时间" prop="invoiceTime">
<el-date-picker v-model="form1.invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/>
@@ -243,8 +238,8 @@
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="票号" prop="money">
<el-input v-model="form1.Number" size="small" placeholder="票号"/>
<el-form-item label="票号" prop="money">
<el-input v-model="form1.Number" size="small" placeholder="票号"/>
</el-form-item>
<el-form-item label="到票时间" prop="invoiceTime">
<el-date-picker v-model="form1.invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/>
@@ -504,15 +499,6 @@ export default {
this.$message.success('增加成功')
this.dialogVisible1 = false
this.searchTable1()
this.gongyingshang = []
getGongyingshang().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.gongyingshang.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商
})
}
})
} else {
this.$message.error('增加失败')
}
@@ -567,15 +553,6 @@ export default {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchTable1()
this.gongyingshang = []
getGongyingshang().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.gongyingshang.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商
})
}
})
} else { this.$message.error('删除失败') }
})
}).catch(() => {
@@ -612,7 +589,6 @@ export default {
if (response.data[0].result === '1') {
this.$message.success('关联成功')
this.dialogVisible = false
this.searchTable1()
searchInvoiceDetail(this.发票流水号).then(response => {
this.gridData = response.data
})
@@ -621,15 +597,15 @@ export default {
}
},
deleteTable10(row) {
this.$confirm('确认取消关联吗?', '提示', {
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteInvoiceMX(row.发票明细流水号, row.到货单流水号).then(response => {
console.log(response.data)
if (response.data[0].result === '1') {
this.$message.success('取消成功')
this.searchTable1()
searchInvoiceDetail(this.发票流水号).then(response => {
this.gridData = response.data
})
@@ -667,6 +643,7 @@ export default {
xhr.responseType = 'blob'
xhr.onload = function() {
if (xhr.status === 200) {
console.log(xhr, 1111)
const name = xhr.getResponseHeader('content-disposition').split('=')[1]
cb(xhr.response, name)
}