更新
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<!--<span>供应商:</span>-->
|
||||
<el-input v-model="supperiler" placeholder="供应商或发票号" size="small" clearable @change="searchTable1()"/>
|
||||
<el-input v-model="supperiler" placeholder="供应商或到票号" size="small" clearable @change="searchTable1()"/>
|
||||
<!--<span>发票号:</span>-->
|
||||
<!--<el-input v-model="invoiceNum" placeholder="发票号" size="small" clearable/>-->
|
||||
<!-- <el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left:10px" @click="tableData2=[];total1=0;pageCurrent1=1;pageSize1=100000;searchTable1()">查询</el-button>-->
|
||||
@@ -49,12 +49,12 @@
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发票号" prop="发票号" align="center" min-width="90">
|
||||
<el-table-column label="到票号" prop="发票号" align="center" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发票金额(元)" align="center" width="110">
|
||||
<el-table-column label="到票金额(元)" align="center" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票金额 }}
|
||||
</template>
|
||||
@@ -174,13 +174,13 @@
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" 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" class="editWorkTime" size="small" placeholder="发票金额" type="number" @blur="changeToFixde"/>
|
||||
<el-form-item label="到票金额(元)" prop="money">
|
||||
<el-input v-positive="'float'" v-model="form1.money" class="editWorkTime" size="small" placeholder="到票金额" type="number" @blur="changeToFixde"/>
|
||||
<!--<el-input v-model="form1.money" size="small" placeholder="发票金额"/>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -188,7 +188,7 @@
|
||||
<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"
|
||||
@@ -218,7 +218,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item v-show="false" 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">
|
||||
@@ -245,17 +245,17 @@
|
||||
</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-model="contractType" size="small" @change="searchTable01()">
|
||||
<el-radio label="采购合同" border/>
|
||||
<el-radio label="离线合同" border/>
|
||||
<el-radio label="采购合同" border @click="showtable02 = true,showtable03 = false"/>
|
||||
<el-radio label="离线合同" border @click="showtable03 = true,showtable02 = false"/>
|
||||
</el-radio-group>
|
||||
<el-table :data="tableData01" border highlight-current-row style="width: 100%;max-height: 250px;" height="200px" size="mini" @row-click="searchTable02">
|
||||
<el-table-column label="供应商" align="center" min-width="200">
|
||||
@@ -274,7 +274,45 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table ref="multipleTable" :data="tableData02" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table v-show="showtable02" ref="multipleTable" :data="tableData02" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
|
||||
<el-table-column label="名称" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购数量" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到货数量" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到票数量" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到票数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本次到票数量" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.本次到票数量" :min="0" :max="scope.row.已到货数量 - scope.row.到票数量" size="mini" controls-position="right" style="width: 100%;"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-show="showtable03" ref="multipleTable" :data="tableData03" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
|
||||
<el-table-column label="名称" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
@@ -308,7 +346,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="本次到票数量" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.本次到票数量" :min="0" :max="(scope.row.已到货数量||scope.row.到货数量)-scope.row.到票数量" size="mini" controls-position="right" style="width: 100%;"/>
|
||||
<el-input-number v-model="scope.row.本次到票数量" :min="0" :max="(scope.row.已到货数量 ||scope.row.到货数量)-scope.row.到票数量" size="mini" controls-position="right" style="width: 100%;"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -329,6 +367,8 @@ export default {
|
||||
name: '', // 发票结算申请
|
||||
data() {
|
||||
return {
|
||||
showtable02: true,
|
||||
showtable03: false,
|
||||
supperiler: '',
|
||||
disabled: false,
|
||||
contractType: '采购合同',
|
||||
@@ -360,7 +400,7 @@ export default {
|
||||
},
|
||||
rules1: {
|
||||
invoiceNum: [
|
||||
{ required: true, message: '请输入发票号' }
|
||||
{ required: true, message: '请输入到票号' }
|
||||
],
|
||||
money: [
|
||||
{ required: true, message: '请输入开票金额' }
|
||||
@@ -373,6 +413,7 @@ export default {
|
||||
limit: 1,
|
||||
tableData01: [],
|
||||
tableData02: [],
|
||||
tableDara03: [],
|
||||
inboundCardNumber: '', // 入库单号
|
||||
group: [] // 发票结算申请单明细流水号组
|
||||
}
|
||||
@@ -415,10 +456,11 @@ export default {
|
||||
this.form1.tax = ''
|
||||
this.form1.isCost = ''
|
||||
this.form1.remark = ''
|
||||
this.title1 = '发票结算申请'
|
||||
this.title1 = '到票结算申请'
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
searchTable1() {
|
||||
this.tableData2 = []
|
||||
let check1, check2
|
||||
this.invoiceNum ? check1 = 1 : check1 = 0
|
||||
this.supperiler ? check2 = 1 : check2 = 0
|
||||
@@ -482,7 +524,7 @@ export default {
|
||||
this.form1.isCost = row.是否费用类
|
||||
this.form1.remark = row.备注
|
||||
this.form1.applyOrderNum = row.发票结算申请单流水号
|
||||
this.title1 = '编辑发票结算申请单'
|
||||
this.title1 = '编辑到票结算申请单'
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
handleDelete(row) {
|
||||
@@ -543,7 +585,7 @@ export default {
|
||||
},
|
||||
submitApply(row) {
|
||||
if (this.tableData2.length === 0) {
|
||||
this.$message.warning('发票结算申请明细为空!')
|
||||
this.$message.warning('到票结算申请明细为空!')
|
||||
} else {
|
||||
this.$confirm('确认提交申请吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
@@ -581,12 +623,13 @@ export default {
|
||||
this.title2 = '追加入库'
|
||||
this.dialogVisible2 = true
|
||||
} else {
|
||||
this.$message.error('请选择发票!')
|
||||
this.$message.error('请选择到票!')
|
||||
}
|
||||
},
|
||||
searchTable01() {
|
||||
this.tableData01 = []
|
||||
this.tableData02 = []
|
||||
this.tableData03 = []
|
||||
if (this.contractType === '采购合同') {
|
||||
searchPurchase(this.supplierValue).then(response => {
|
||||
this.tableData01 = response.data
|
||||
@@ -603,6 +646,7 @@ export default {
|
||||
},
|
||||
searchTable02(row) {
|
||||
this.tableData02 = []
|
||||
this.tableData03 = []
|
||||
if (this.contractType === '采购合同') {
|
||||
searchPurchaseDetail(row.采购合同流水号).then(response => {
|
||||
response.data.map(data => {
|
||||
@@ -616,7 +660,7 @@ export default {
|
||||
response.data.map(data => {
|
||||
this.$set(data, '本次到票数量', 0)
|
||||
data.本次到票数量 = data.到货数量 - data.到票数量
|
||||
this.tableData02.push(data)
|
||||
this.tableData03.push(data)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user