curd外协付款
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
|
||||
// 查询表格数据
|
||||
export function searchtable(check1, ManufacturerAbbreviation, check2, starttime, endTime, pageCurrent, pageSize) {
|
||||
console.log(state.state.user.id, 22222)
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
|
||||
@@ -5,6 +5,10 @@ Created by hedekun
|
||||
import { type } from './tool' // type判断传入值的类型,比typeof更详细
|
||||
export default {
|
||||
install(Vue) {
|
||||
Vue.prototype.exportExcel_NPOI = function(url, type, name, data) {
|
||||
console.log(url, type, name, data, 1111111111)
|
||||
// this.download(`${url}?param=${data}`)
|
||||
}
|
||||
Vue.prototype.CreateData = function(type, name, data, pageSize, pageList) {
|
||||
var paramStr = ''
|
||||
var paramarray = []
|
||||
@@ -268,3 +272,40 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// function download(url) {
|
||||
// getBlob(url, function(blob, filename) {
|
||||
// var filename1 = decodeURIComponent(filename)
|
||||
// saveAs(blob, filename1)
|
||||
// })
|
||||
// }
|
||||
//
|
||||
// function decodeUtf8(bytes) { var encoded = ""; for (var i = 0; i < bytes.length; i++) { encoded += '%' + bytes[i].toString(16); } return decodeURIComponent(encoded); }
|
||||
//
|
||||
// function getBlob(url, cb) {
|
||||
// var xhr = new XMLHttpRequest()
|
||||
// xhr.open('GET', url, true)
|
||||
// xhr.responseType = 'blob'
|
||||
// xhr.onload = function() {
|
||||
// if (xhr.status === 200) {
|
||||
// var name = decodeUtf8(xhr.getResponseHeader('content-disposition').split('=')[1])
|
||||
// }
|
||||
// }
|
||||
// xhr.send()
|
||||
// }
|
||||
//
|
||||
// function saveAs(blob, filename = '下载文件.xls') {
|
||||
// if (window.navigator.msSaveOrOpenBlob) {
|
||||
// navigator.msSaveBlob(blob, filename)
|
||||
// } else {
|
||||
// var link = document.createElement('a')
|
||||
// var body = document.querySelector('body')
|
||||
// link.href = window.URL.createObjectURL(blob)
|
||||
// link.download = filename
|
||||
// link.style.display = 'none'
|
||||
// body.appendChild(link)
|
||||
// link.click()
|
||||
// body.removeChild(link)
|
||||
// window.URL.revokeObjectURL(link.href)
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<el-input v-model="ManufacturerName" size="small" placeholder="外协厂家" clearable style="width:200px"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" @click="pageCurrent=1;pageSize=20;getParts()">查询</el-button>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="tableData" size="mini" stripe height="500" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="rowClick">
|
||||
<el-table v-loading="loading" :data="tableData" size="mini" highlight-current-row height="500" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="rowClick">
|
||||
<el-table-column label="厂家" prop="外协厂家名称" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协厂家名称 }}
|
||||
@@ -20,7 +20,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="到票金额" align="center" width="130px" prop="开票金额">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.开票金额).toFixed(2) }}
|
||||
{{ scope.row.开票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款金额" align="center">
|
||||
@@ -53,36 +53,24 @@
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-table v-loading="loading2" :data="tableData2" size="mini" stripe height="500" style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="厂家" prop="外协厂家名称" align="center" width="230px">
|
||||
<el-row>
|
||||
<span style="margin-top: 10px">开票明细:</span>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd()">新增</el-button>
|
||||
</el-row>
|
||||
<el-table v-loading="loading2" :data="tableData2" size="mini" stripe height="500" style="width: 100%" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="发票号" prop="外协厂家名称" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协厂家名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外协金额" prop="总价" align="center" width="200px">
|
||||
<el-table-column label="开票金额" prop="总价" align="center" width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到票金额" align="center" width="130px" prop="开票金额">
|
||||
<el-table-column label="开票时间" align="center" width="130px" prop="开票金额">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.开票金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款金额" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付金额" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" plain class="el-icon-edit" @click="handleChange1(scope.$index, scope.row, 'form');param = 1">编辑</el-button>
|
||||
<el-button size="mini" type="danger" plain class="el-icon-delete" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
{{ scope.row.开票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -99,38 +87,21 @@
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-table v-loading="loading3" :data="tableData3" size="mini" stripe height="500" style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="厂家" prop="外协厂家名称" align="center" width="230px">
|
||||
<el-row>
|
||||
<span style="margin-top: 10px">付款明细:</span>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd()">新增</el-button>
|
||||
</el-row>
|
||||
<el-table v-loading="loading3" :data="tableData3" size="mini" stripe height="500" style="width: 100%" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="付款金额" prop="外协厂家名称" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协厂家名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外协金额" prop="总价" align="center" width="200px">
|
||||
<el-table-column label="付款时间" prop="总价" align="center" width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到票金额" align="center" width="130px" prop="开票金额">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.开票金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款金额" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付金额" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" plain class="el-icon-edit" @click="handleChange1(scope.$index, scope.row, 'form');param = 1">编辑</el-button>
|
||||
<el-button size="mini" type="danger" plain class="el-icon-delete" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
@@ -146,7 +117,7 @@
|
||||
</el-col>
|
||||
</el-card>
|
||||
|
||||
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="700px">
|
||||
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="700px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="90px" class="demo-ruleForm">
|
||||
<el-row v-show="title1==='到票'">
|
||||
<el-col :span="12">
|
||||
@@ -205,7 +176,7 @@ export default {
|
||||
ManufacturerName: '', // 外协厂家
|
||||
外协厂家流水号: '',
|
||||
title1: '',
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible1: false,
|
||||
form: {
|
||||
外协厂家: '',
|
||||
发票号: '',
|
||||
@@ -314,7 +285,7 @@ export default {
|
||||
this.form.接收时间 = ''
|
||||
this.form.备注 = ''
|
||||
this.form.外协厂家 = ''
|
||||
this.dialogFormVisible = true
|
||||
this.dialogFormVisible1 = true
|
||||
},
|
||||
// 增加确定
|
||||
editType() {
|
||||
@@ -330,7 +301,7 @@ export default {
|
||||
this.$message.error('信息增加失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.dialogFormVisible1 = false
|
||||
},
|
||||
// 编辑打开
|
||||
handleChange1(index, row, formName) {
|
||||
@@ -342,7 +313,7 @@ export default {
|
||||
this.form.接收人 = row.接收人
|
||||
this.form.接收时间 = row.接收时间
|
||||
this.form.备注 = row.备注
|
||||
this.dialogFormVisible = true
|
||||
this.dialogFormVisible1 = true
|
||||
this.title1 = '编辑'
|
||||
this.CoManufacturerFlowNumber1 = row.id
|
||||
},
|
||||
@@ -360,7 +331,7 @@ export default {
|
||||
this.$message.error('信息修改失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.dialogFormVisible1 = false
|
||||
},
|
||||
// 提交添加或者修改
|
||||
submit(formName) {
|
||||
@@ -378,7 +349,7 @@ export default {
|
||||
},
|
||||
// 重置表单
|
||||
callOff(formName) {
|
||||
this.dialogFormVisible = false
|
||||
this.dialogFormVisible1 = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 删除
|
||||
|
||||
Reference in New Issue
Block a user