This commit is contained in:
liushuai
2020-02-12 16:46:13 +08:00
247 changed files with 4818 additions and 1288 deletions

View File

@@ -139,7 +139,7 @@
</el-table-column>
</el-table>
<el-button
class="button111"
type="distribution"
size="small"
style="margin-top:10px"
@click="calculateContractSum">计算合同总额</el-button>
@@ -158,7 +158,7 @@
:value="item.value"/>
</el-select>
<el-button
class="button111"
type="distribution"
size="small"
style="margin-left: 7.5%; margin-top: 10px"
@click="doneContract">生成采购合同</el-button>
@@ -744,21 +744,4 @@ export default {
margin-bottom: 5px;
}
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>

View File

@@ -83,7 +83,7 @@
<!--<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>-->
<!--</el-tooltip>-->
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="searchTable2">查询</el-button>
<el-button class="button111" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addPurchaseOrder">新增</el-button>
<el-button type="distribution" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addPurchaseOrder">新增</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="向选择的采购计划里添加采购零件" placement="top">
<el-button type="primary" plain size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入</el-button>
</el-tooltip>
@@ -907,21 +907,4 @@ export default {
top: 5px;
}
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>

View File

@@ -4,7 +4,7 @@
<span>发票号:</span>
<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 class="button111" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="createOrder()">创建</el-button>
<el-button type="distribution" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="createOrder()">创建</el-button>
</el-card>
<el-card>
@@ -130,7 +130,7 @@
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">发票结算申请单明细</h4>
<span>发票号</span>
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
<el-button :disabled="disabled" class="button111" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="addInStoreRecord()">追加入库记录</el-button>
<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">
<template slot-scope="scope">
@@ -765,21 +765,4 @@ export default {
margin: 0;
}
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>

View File

@@ -24,7 +24,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent4=1;pageSize4=10;total4=0;searchTable4()">查询</el-button>
<el-button class="button111" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addArrivalOrder">新增到货单</el-button>
<el-button type="distribution" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addArrivalOrder">新增到货单</el-button>
</div>
</el-card>
<el-card style="width: 45%;float: left">
@@ -501,7 +501,6 @@
import { searchPurchaseOrder, searchMateriel, addMateriel, searchArriveOrder, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, searchTable5,
searchSupplier, deleteArrivalMX, EditArrivalOrderMX, AddArrivalOrderMX, deleteMateriel, searchTable6, searchLxPurchaseOrder, searchLxMateriel } from '@/api/WorkshopProcurement/NewArrivalList.js'
import { mapGetters } from 'vuex'
import { ExcelWaiGou } from '@/utils/request'
export default {
data() {
return {
@@ -644,7 +643,10 @@ export default {
到货金额组: [],
getRowKeys(row) {
return row.采购计划明细流水号
}
},
sup: '',
num: '',
num2: ''
}
},
computed: {
@@ -945,9 +947,10 @@ export default {
})
},
searchTable5(row) {
console.log(row)
this.sup = row.供应商名称
this.num1 = row.到货单流水号
this.num2 = row.到货单编号
this.excle_row = row
console.log(this.userId, this.id)
this.disable = row.是否关联
this.tableData6 = []
this.到货单流水号 = row.到货单流水号
@@ -1098,7 +1101,6 @@ export default {
},
handleSelectionChange(val) {
this.arrest = val
console.log(this.arrest)
},
// 选入
addMateriel() {
@@ -1161,60 +1163,20 @@ export default {
})
},
downloadExcel() {
const _ExcelWaiGou = ExcelWaiGou
this.download(`${_ExcelWaiGou}?type=Excel_NewArrivalList&folename=外购单&rec1=${this.excle_row.到货单流水号}&rec2=${this.excle_row.到货单流水号}&rec3=${this.excle_row.到货单流水号}&rec4=${this.excle_row.到货单流水号}`)
},
/**
* 下载
* @param {String} url 目标文件地址
* @param {String} filename 想要保存的文件名称
*/
download(url) {
this.getBlob(url, function(blob, filename) {
saveAs(blob, filename)
})
},
getBlob(url, cb) {
var xhr = new XMLHttpRequest()
xhr.open('GET', url, true)
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)
}
}
xhr.send()
var param = []
param[0] = ['到货单流水号', this.num1]
param[1] = ['编号', this.num2]
param[2] = ['供应商', this.sup]
var Data = this.CreateData('12', '报表_备料管理_到货单明细查询', param)
this.exportExcel_NPOI(Data)
}
}
}
/**
* 保存
* @param {Blob} blob
* @param {String} filename 想要保存的文件名称
*/
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
// fix Firefox
link.style.display = 'none'
body.appendChild(link)
link.click()
body.removeChild(link)
window.URL.revokeObjectURL(link.href)
}
}
</script>
<style scoped>
.el-table__footer-wrapper tbody td, .el-table__header-wrapper tbody td {
/* background-color: #7eaced; */
background-color: #e9f0f9;
font-weight: bold;
color: black;
}
@@ -1254,26 +1216,9 @@ function saveAs(blob, filename = '下载文件.xls') {
</style>
<style>
.el-table__footer-wrapper tbody td, .el-table__header-wrapper tbody td {
background-color: #F5F7FA;
background-color: #e9f0f9;
font-weight: bold;
color: black;
}
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>

View File

@@ -678,21 +678,4 @@ export default {
margin: 0
}
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>

View File

@@ -2,25 +2,23 @@
<div class="app-container">
<el-card>
<el-row>
<span>发票号:</span>
<el-input v-model="invoiceNum" placeholder="发票号" size="small" style="margin: 3px 0;width: 180px" clearable/>
<span>供应商:</span>
<el-input v-show="false" v-model="supplierName0" placeholder="供应商" size="small" style="width:130px" clearable @focus="fetchData"/>
<el-select v-model="gongyingshangValue" placeholder="供应商" style="width: 180px" size="small" filterable clearable @change="searchTable1">
<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
v-for="item in gongyingshang"
:key="item.value"
:label="item.label"
:value="item.value"/>
:value="item.value"
size="mini"/>
</el-select>
<span v-show="true" class="demonstration">时间段:</span>
<span v-show="false" class="demonstration">时间段:</span>
<el-date-picker
v-model="dateRange"
:picker-options="pickerOptions"
size="small"
type="daterange"
align="center"
style="width: 300px;margin: 3px 0"
style="width: 240px;margin: 3px 10px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
@@ -46,10 +44,10 @@
<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>
<el-button type="distribution" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addTable1()">到票</el-button>
</el-row>
</el-card>
<el-card style="width: 58%;float: left">
<el-card style="float: left">
<el-table
:data="tableData1"
size="mini"
@@ -59,50 +57,51 @@
border
highlight-current-row
@row-click="searchTable02">
<el-table-column align="center" label="发票状态" width="80px">
<el-table-column align="center" label="进程" width="70px">
<template slot-scope="scope">
<span v-if="Number(scope.row.是否请款) === 0" type="warning" size="mini">未请款</span>
<span v-else-if="Number(scope.row.是否请款) === 1" type="primary" size="mini">已请款</span>
</template>
</el-table-column>
<el-table-column align="center" label="发票号" width="120px">
<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">
<template slot-scope="scope">
{{ scope.row.开票时间 }}
{{ scope.row.开票时间 | formatTime }}
</template>
</el-table-column>
<el-table-column align="center" label="开票金额" width="80px">
<el-table-column align="center" label="开票金额(元)" width="100px">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
{{ scope.row.开票金额.toFixed(2) }}
</template>
</el-table-column>
<el-table-column align="center" label="供应商" prop="供应商名称" min-width="200px" show-overflow-tooltip>
<el-table-column align="center" label="供应商" prop="供应商名称" min-width="190px" width="190px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注" >
<el-table-column align="center" label="备注" width="100px" >
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="300px">
<el-table-column align="center" label="操作" width="210px">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="关联到货单" placement="top">
<div style="display: inline-block">
<el-tooltip :open-delay="1200" effect="dark" content="到货单" placement="top" style="margin-left: 0">
<div style="display: inline-block;margin-left: 0px">
<el-button
:disabled="Number(scope.row.是否请款)===1"
type="text"
size="mini"
icon="el-icon-share"
@click="aboutArrival(scope.row)">关联到货单</el-button>
style="margin-left: -15px"
@click="aboutArrival(scope.row)">到货单</el-button>
</div>
</el-tooltip>
<el-button type="text" size="mini" icon="el-icon-download" style="margin-left:10px" @click="downloadExcel(scope.row)">导出</el-button>
<el-button type="text" size="mini" icon="el-icon-download" style="margin-left:8px" @click="downloadExcel(scope.row)">导出</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button
@@ -110,7 +109,7 @@
type="text"
size="mini"
icon="el-icon-edit-outline"
style="margin-left: 20px"
style="margin-left: 10px"
@click="editTable1(scope.row)"/>
</div>
</el-tooltip>
@@ -121,14 +120,14 @@
type="text"
size="mini"
icon="el-icon-delete"
style="margin-left: 20px"
style="margin-left: 10px"
@click="deleteTable1(scope.row)"/>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<div class="block" style="margin-top: 0px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
@@ -140,10 +139,10 @@
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-card style="float: left;width: 41.3%;margin-left: 5px">
<el-table :data="gridData" class="subTableHeader" show-summary border size="mini" style="width: 100%">
<el-card style="float: left;margin-left: 5px">
<el-table :data="gridData" :summary-method="getSummaries" class="subTableHeader" show-summary border size="mini" style="width: 100%">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column label="到货单编号" align="center">
<el-table-column label="到货单编号" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.到货单编号 }}
</template>
@@ -153,12 +152,12 @@
{{ scope.row.日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="金额" align="center" width="80" prop="到货金额">
<el-table-column label="金额(元)" align="center" width="120" prop="到货金额">
<template slot-scope="scope">
{{ scope.row.到货金额.toFixed(2) }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="操作">
<el-table-column min-width="100" width="60" align="center" label="操作">
<template slot-scope="scope">
<el-tooltip effect="dark" content="取消关联" placement="top">
<div style="display: inline-block">
@@ -257,7 +256,6 @@
<script>
import { searchInvoice, addInvoice, editInvoice, deleteInvoice, searchSupplier, searchInvoiceDetail, searchArriveOrder, addMateriel, deleteInvoiceMX, getGongyingshang } from '@/api/WorkshopProcurement/OutsourcingMaterialsInvoice'
import { mapGetters } from 'vuex'
import { ExcelDownLoad } from '@/utils/request'
export default {
name: '', // 发票交接单
@@ -347,6 +345,31 @@ export default {
this.searchTable1()
},
methods: {
getSummaries(param) { // 合计
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
} else if (index === 3) {
const values = data.map(item => Number(parseFloat(item['到货金额'])))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = sums[index].toFixed(2) + ' 元'
} else {
sums[index] = 'N/A'
}
}
})
return sums
},
fetchData() {
searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => {
for (let i = 0; i < response.data.length; i++) {
@@ -557,8 +580,13 @@ export default {
})
},
downloadExcel(row) {
const _ExcelDownLoad = ExcelDownLoad
this.download(`${_ExcelDownLoad}?Fapiao=${row.发票流水号}&name=${row.供应商名称}`)
var param = []
param[0] = ['发票流水号', row.发票流水号]
param[1] = ['供应商', row.供应商名称]
var Data = this.CreateData('12', '报表_备料管理_发票明细_查询数据', param)
this.exportExcel_NPOI(Data)
// const _ExcelDownLoad = ExcelDownLoad
// this.download(`${_ExcelDownLoad}?Fapiao=${row.发票流水号}&name=${row.供应商名称}`)
},
/**
* 下载
@@ -631,34 +659,17 @@ function saveAs(blob, filename = '下载文件.xls') {
<style lang="scss">
.subTableHeader {
th {
background: #8ff4ea !important;
color: black;
background: #7eaced !important;
color: #FFFFFF;
}
tr.el-table__row td {
background-color: #d8e5f6 !important;
background-color: #ffffff !important;
}
tr.el-table__row.el-table__row--striped td {
background: #e9f0f9 !important;
background-color: #e9f0f9;
}
}
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>

View File

@@ -29,7 +29,7 @@
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=30;total1=0;searchTable1()">查询</el-button>
<el-button class="button111" size="small" icon="el-icon-goods" style="" @click="requestFund">新增请款</el-button>
<el-button type="distribution" size="small" icon="el-icon-goods" style="" @click="requestFund">新增请款</el-button>
</el-card>
<el-row>
<el-col style="width: 1200px">
@@ -442,20 +442,4 @@ export default {
margin-bottom: 5px;
}
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>

View File

@@ -27,7 +27,7 @@
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
</el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="对选择的请款任务创建请款申请" placement="top">
<el-button class="button111" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
<el-button type="distribution" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
</el-tooltip>
</el-col>
</el-card>
@@ -424,21 +424,3 @@ export default {
}
}
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>

View File

@@ -18,7 +18,7 @@
:value="item.value"/>
</el-select>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchContractDetail">查询明细</el-button>
<el-button class="button111" style="margin: 10px" size="small" icon="el-icon-circle-check" @click="submitInStorage">确认到货</el-button>
<el-button type="distribution" style="margin: 10px" size="small" icon="el-icon-circle-check" @click="submitInStorage">确认到货</el-button>
</el-card>
<el-card>
<el-table ref="multipleTable" :data="table1" border stripe size="mini" highlight-current-row style="width: 100%;margin-bottom: 5px" @selection-change="handleSelectionChange">
@@ -213,21 +213,3 @@ export default {
margin-bottom: 5px;
}
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>