This commit is contained in:
liushuai
2019-09-19 19:52:46 +08:00
parent faab73c1fa
commit aef7132f40
49 changed files with 733 additions and 585 deletions

View File

@@ -2,19 +2,19 @@
<div class="app-container">
<el-card>
<span>发票号:</span>
<el-input v-model="invoiceNum" placeholder="发票号" size="small" clearable/>
<span>供应商:</span>
<el-input v-model="invoiceNum" placeholder="发票号" size="small" style="margin: 3px 0" clearable/>
<span style="margin-left: 10px">供应商:</span>
<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>
<span>传送人:</span>
<el-select v-model="transmitValue" placeholder="传送人" size="small" filterable clearable style="width:100px">
<span style="margin-left: 10px">传送人:</span>
<el-select v-model="transmitValue" placeholder="传送人" size="small" filterable clearable style="width:200px">
<el-option
v-for="item in selectPerson1"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>接收人:</span>
<el-select v-model="recipientValue" placeholder="接收人" size="small" filterable clearable style="width:100px">
<span style="margin-left: 10px">接收人:</span>
<el-select v-model="recipientValue" placeholder="接收人" size="small" filterable clearable style="width:200px">
<el-option
v-for="item in selectPerson"
:key="item.value"
@@ -32,11 +32,33 @@
size="small"
icon="el-icon-circle-plus-outline"
style="margin-left: 10px"
@click="addTable1()"></el-button>
@click="addTable1()"></el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" size="mini" style="max-height: 400px" height="400px" stripe border>
<el-table v-loading="" :data="tableData1" size="mini" style="margin-top: 3px" height="750px" stripe border highlight-current-row @expand-change="searchTable02">
<el-table-column type="expand" label="详情">
<template slot-scope="scope">
<el-table :data="gridData" class="subTableHeader" stripe border size="mini" show-summary style="width: 40%">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="采购单号">
<template slot-scope="scope">
{{ scope.row.采购单号 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="采购单名称">
<template slot-scope="scope">
{{ scope.row.采购单名称 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="总价" prop="总价">
<template slot-scope="scope">
{{ scope.row.总价 }}
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column align="center" label="发票号" min-width="120px">
<template slot-scope="scope">
{{ scope.row.发票号 }}
@@ -52,7 +74,7 @@
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="供应商" min-width="200px">
<el-table-column align="center" label="供应商" min-width="200px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
@@ -67,45 +89,33 @@
{{ scope.row.接收人姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注" min-width="200px">
<el-table-column align="center" label="备注" >
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="350px">
<el-table-column align="center" label="操作" fixed="right" width="150px">
<template slot-scope="scope">
<el-popover placement="right" width="450" trigger="click">
<el-table :data="gridData" stripe size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="采购单号">
<template slot-scope="scope">
{{ scope.row.采购单号 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="采购单名称">
<template slot-scope="scope">
{{ scope.row.采购单名称 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="总价" prop="总价">
<template slot-scope="scope">
{{ scope.row.总价 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" @click="searchTable02(scope.row)">查看详情</el-button>
</el-popover>
<el-button
type="primary"
size="mini"
icon="el-icon-edit"
style="margin-left: 10px"
@click="editTable1(scope.row)">编辑</el-button>
<el-button
type="danger"
size="mini"
icon="el-icon-delete"
@click="deleteTable1(scope.row)">删除</el-button>
<el-tooltip effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button
type="text"
size="mini"
icon="el-icon-edit-outline"
style="margin-left: 10px"
@click="editTable1(scope.row)"/>
</div>
</el-tooltip>
<el-tooltip effect="dark" content="删除" placement="top">
<div style="display: inline-block">
<el-button
type="text"
size="mini"
icon="el-icon-delete"
style="margin-left: 20px"
@click="deleteTable1(scope.row)"/>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
@@ -122,7 +132,7 @@
</div>
</el-card>
<el-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="25%">
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="25%">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px">
<el-form-item label="供应商名称" prop="供应商名称">
<el-input v-model="form1.供应商名称" size="small" readonly>
@@ -130,7 +140,7 @@
</el-input>
</el-form-item>
<el-form-item label="采购单号" prop="contractNum">
<el-select :disabled="title1==='编辑'" v-model="form1.contractNum" placeholder="采购单号" size="small" multiple filterable clearable>
<el-select :disabled="title1==='编辑备料发票'" v-model="form1.contractNum" placeholder="采购单号" size="small" multiple filterable clearable>
<el-option
v-for="item in contractNums"
:key="item.value"
@@ -168,11 +178,11 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
<el-button v-show="title1==='增加'" size="small" type="primary" @click="submitAdd1('form1')">确定</el-button>
<el-button v-show="title1==='编辑'" size="small" type="primary" @click="submitEdit1('form1')">确定</el-button>
<el-button v-show="title1==='新增备料发票'" size="small" type="primary" @click="submitAdd1('form1')">确定</el-button>
<el-button v-show="title1==='编辑备料发票'" size="small" type="primary" @click="submitEdit1('form1')">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible" title="供应商选择" center style="min-height: 300px">
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible" title="选择供应商" center style="min-height: 300px;width: 100%">
<el-form ref="form1" :model="form1" label-position="left" label-width="90px" class="searchForm">
<el-row>
<el-col :span="12">
@@ -258,7 +268,7 @@
@click="emptySupplierDetail">清空</el-button>
</el-col>
</el-row>
<el-table :data="tableData01" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="200px" border @row-click="showSupplierDetail">
<el-table :data="tableData01" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="300px" border stripe highlight-current-row @row-click="showSupplierDetail">
<el-table-column align="center" label="供应商名称" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
@@ -486,7 +496,7 @@ export default {
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.title1 = '增加'
this.title1 = '新增备料发票'
this.dialogVisible1 = true
this.form1.供应商名称 = ''
this.form1.供应商流水号 = ''
@@ -523,7 +533,7 @@ export default {
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.title1 = '编辑'
this.title1 = '编辑备料发票'
console.log(row)
this.dialogVisible1 = true
this.form1.contractNum = (row.采购计划流水号.split(',')).map(Number)
@@ -592,7 +602,7 @@ export default {
<style scoped>
.el-card{
margin-bottom: 15px;
/*margin-bottom: 15px;*/
}
.el-date-editor{
width:150px;
@@ -603,11 +613,27 @@ export default {
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
span{margin: 10px 0px;
}
.searchForm .el-form-item{
margin-top: 1px;
margin-bottom: 1px;
}
</style>
<style lang="scss">
.subTableHeader {
th {
background: #8ff4ea !important;
color: black;
}
tr.el-table__row td {
background-color: #d8e5f6 !important;
}
tr.el-table__row.el-table__row--striped td {
background: #e9f0f9 !important;
}
}
</style>