This commit is contained in:
liushuai
2020-03-27 17:21:28 +08:00
parent d968be25f2
commit 9078070157
10 changed files with 288 additions and 115 deletions

View File

@@ -103,12 +103,12 @@
{{ scope.row.合同类型 === 1 ? scope.row.已到货数量 : scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="合计" align="center" min-width="80" prop="合计">
<el-table-column label="合计(元)" align="center" min-width="100" prop="合计">
<template slot-scope="scope">
{{ (parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="单价" align="center" min-width="80" prop="单价">
<el-table-column label="单价(元)" align="center" min-width="100" prop="单价">
<template slot-scope="scope">
{{ parseFloat(scope.row.单价||0).toFixed(2) }}
</template>
@@ -220,6 +220,29 @@ export default {
} else {
sums[index] = '0'
}
} else if (index === 5) {
for (let i = 0; i < data.length; i++) {
if (!data[i].到货数量) {
data[i].到货数量 = 0
}
if (!data[i].已到货数量) {
data[i].已到货数量 = 0
}
}
const values = data.map(item => Number(parseInt(item['数量'])) * Number(parseInt(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] = Number(sums[index]).toFixed(2) + ' 元'
} else {
sums[index] = '0.00'
}
}
})
return sums

View File

@@ -416,7 +416,7 @@ export default {
showtable02: true,
showtable03: false,
supperiler: '',
disabled: false,
disabled: true,
contractType: '采购合同',
invoiceNum: '',
total1: 0,
@@ -506,6 +506,7 @@ export default {
this.dialogVisible1 = true
},
searchTable1() {
this.disabled = true
this.tableData2 = []
let check1, check2, check3
this.invoiceNum ? check1 = 1 : check1 = 0

View File

@@ -23,7 +23,7 @@
end-placeholder="结束日期"/>
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
<el-button type="warning" size="small" icon="el-icon-goods" plain style="" @click="requestFund">请款</el-button>
<el-checkbox v-model="searchAll" style="margin-left: 50px">查询全部</el-checkbox>
<!-- <el-checkbox v-model="searchAll" style="margin-left: 50px">查询全部</el-checkbox>-->
<el-button type="success" size="small" icon="el-icon-download" plain style="float: right; margin-right: 20px;" @click="exportExcel">导出</el-button>
</div>
<!--<h3>请款表</h3>-->
@@ -259,7 +259,7 @@ import { getNowTime, timeToStamp } from '@/utils/tool'
export default {
data() {
return {
searchAll: false,
searchAll: true,
selectContents: [],
getDate: null,
tableData0: [],

View File

@@ -135,11 +135,16 @@
<!-- {{ scope.row.采购合同名称 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="采购合同号" prop="采购合同编号" align="center" width="150" show-overflow-tooltip>
<el-table-column label="采购合同号" prop="采购合同编号" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="创建时间" prop="创建时间" align="center" width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.操作时间 ? scope.row.操作时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column label="合同审核" prop="审核情况内容" align="center" width="80">
<template slot-scope="scope">
<span v-if="scope.row.审核情况内容==='未审核'">未审核</span>
@@ -160,12 +165,12 @@
<!-- <el-tag v-if="scope.row.审批情况内容==='不通过审批'" type="danger" size="small">未通过</el-tag>-->
</template>
</el-table-column>
<el-table-column label="未审核原因" align="center" width="120" show-overflow-tooltip>
<el-table-column label="未审核原因" align="center" width="110" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.未通过审核原因 ? scope.row.未通过审核原因 : '—' }}
</template>
</el-table-column>
<el-table-column label="未审批原因" align="center" width="130" show-overflow-tooltip>
<el-table-column label="未审批原因" align="center" width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.未通过原因 ? scope.row.未通过原因 : '—' }}
</template>
@@ -190,7 +195,7 @@
{{ scope.row.欠款金额 }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" width="110" show-overflow-tooltip>
<el-table-column label="审批时间" align="center" width="90" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.审批时间 ? scope.row.审批时间.split(' ')[0] : '-' }}
</template>
@@ -533,7 +538,8 @@ export default {
欠款金额: response.data.rows[i].欠款金额,
采购员流水号: response.data.rows[i].采购员流水号,
采购合同流水号: response.data.rows[i].采购合同流水号,
审批时间: response.data.rows[i].审批时间
审批时间: response.data.rows[i].审批时间,
操作时间: response.data.rows[i].操作时间
})
}
}

View File

@@ -111,12 +111,12 @@
{{ scope.row.不合格数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="到货状态" width="90px">
<template slot-scope="scope">
<span v-if="Number(scope.row.到货数量) >= Number(scope.row.采购数量)">已到货</span>
<span v-else>未到货</span>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="到货状态" width="90px">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="Number(scope.row.到货数量) >= Number(scope.row.采购数量)">已到货</span>-->
<!-- <span v-else>未到货</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" label="供应商" prop="供应商名称" min-width="150px" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.供应商名称 || scope.row.离线合同供应商名称 || '—' }}
@@ -137,6 +137,16 @@
{{ scope.row.备注 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购日期" min-width="100px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.采购时间 ? scope.row.采购时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="分配日期" width="100px">
<template slot-scope="scope">
{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="下达时间" min-width="100px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.操作日期 ? scope.row.操作日期.split(' ')[0] : '-' }}
@@ -159,7 +169,7 @@
<el-table v-loading="loading1" :data="tableData1" size="mini" height="700px" border stripe @sort-change="sortChange1">
<el-table-column align="center" label="采购状态" prop="询价状态编号" width="90px">
<template slot-scope="scope">
<el-tag v-if="!scope.row.人员编号" type="primary" size="small">未分配</el-tag>
<span v-if="!scope.row.人员编号" type="primary" size="small">未分配</span>
<span v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</span>
<span v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</span>
<span v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</span>
@@ -170,7 +180,7 @@
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" prop="组号" width="70px" sortable="custom">
<el-table-column align="center" label="组号" prop="组号" width="80px" sortable="custom">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
@@ -215,13 +225,13 @@
{{ scope.row.不合格数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="到货状态" width="90px">
<template slot-scope="scope">
<span v-if="Number(scope.row.到货数量) >= Number(scope.row.采购数量)">已到货</span>
<span v-else-if="0 < Number(scope.row.到货数量) < Number(scope.row.采购数量)">部分到货</span>
<span v-else>未到货</span>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="到货状态" width="90px">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="Number(scope.row.到货数量) >= Number(scope.row.采购数量)">已到货</span>-->
<!-- <span v-else-if="0 < Number(scope.row.到货数量) < Number(scope.row.采购数量)">部分到货</span>-->
<!-- <span v-else>未到货</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" label="供应商" prop="供应商名称" min-width="150px" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.供应商名称 || scope.row.离线合同供应商名称 || '—' }}
@@ -242,6 +252,16 @@
{{ scope.row.备注 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购日期" min-width="100px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.采购时间 ? scope.row.采购时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="分配日期" min-width="100px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="下达时间" min-width="100px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.操作日期 ? scope.row.操作日期.split(' ')[0] : '-' }}
@@ -275,7 +295,7 @@
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" prop="组号" width="70px" sortable="custom">
<el-table-column align="center" label="组号" prop="组号" width="80px" sortable="custom">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
@@ -327,12 +347,12 @@
{{ scope.row.不合格数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="到货状态" width="90px">
<template slot-scope="scope">
<span v-if="Number(scope.row.到货数量) >= Number(scope.row.采购数量)">已到货</span>
<span v-else>未到货</span>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="到货状态" width="90px">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="Number(scope.row.到货数量) >= Number(scope.row.采购数量)">已到货</span>-->
<!-- <span v-else>未到货</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" label="供应商" prop="供应商名称" min-width="100px" show-overflow-tooltip sortable="custom">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.供应商名称 || '—' }}
@@ -353,6 +373,16 @@
{{ scope.row.备注 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购日期" min-width="100px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.采购时间 ? scope.row.采购时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="分配日期" min-width="100px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="下达时间" min-width="100px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.操作日期 ? scope.row.操作日期.split(' ')[0] : '-' }}
@@ -670,7 +700,9 @@ export default {
采购数量: Number(response.data.result[i].询价状态编号) === 1 && response.data.result[i].人员编号 !== '' ? '—' : response.data.result[i].数量 || response.data.result[i].离线采购数量 || '—',
到货数量: Number(response.data.result[i].询价状态编号) === 1 && response.data.result[i].人员编号 !== '' ? '—' : response.data.result[i].已到货数量 || response.data.result[i].离线到货数量 || '—',
不合格数量: response.data.result[i].不合格数量,
操作日期: response.data.result[i].操作日期
任务分配时间: response.data.result[i].任务分配时间,
操作日期: response.data.result[i].操作日期,
采购时间: response.data.result[i].采购时间
})
}
}
@@ -742,7 +774,9 @@ export default {
采购数量: Number(response.data.result[i].询价状态编号) === 1 && response.data.result[i].人员编号 !== '' ? '—' : response.data.result[i].数量 || response.data.result[i].离线采购数量 || '—',
到货数量: Number(response.data.result[i].询价状态编号) === 1 && response.data.result[i].人员编号 !== '' ? '—' : response.data.result[i].已到货数量 || response.data.result[i].离线到货数量 || '—',
不合格数量: response.data.result[i].不合格数量,
操作日期: response.data.result[i].操作日期
操作日期: response.data.result[i].操作日期,
采购时间: response.data.result[i].采购时间,
任务分配时间: response.data.result[i].任务分配时间
})
}
}

View File

@@ -506,7 +506,7 @@
size="small"
icon="el-icon-menu"
style="margin-left: 10px"
@click="executeReturn2">分配</el-button>
@click="allocateTask2">分配</el-button>
</el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="打回制造部重新分配" placement="top">
<el-button
@@ -514,7 +514,7 @@
size="small"
icon="el-icon-back"
style="margin-left: 50px"
@click="allocateTask2">打回</el-button>
@click="executeReturn2">打回</el-button>
</el-tooltip>
<!--<el-button type="primary" size="small" icon="el-icon-menu" style="margin-left: 10px" @click="allocateTask2">分配</el-button>-->
<!--<el-button type="danger" size="small" icon="el-icon-back" style="margin-left: 10px" @click="executeReturn2">打回</el-button>-->
@@ -761,6 +761,8 @@ export default {
basic: [],
groupAndPart: [],
groupAndPartBasic: [],
partNumber: [],
partNumberBasic: [],
pageCurrent0: 1,
pageSize0: 50,
total0: 0,
@@ -993,17 +995,21 @@ export default {
handleSelectionChange1(val) { // 标准件和外购件多选
this.standardAndPurchase = []
this.groupAndPart = []
this.partNumber = []
for (let i = 0; i < val.length; i++) {
this.standardAndPurchase.push(val[i].标准件和外购件流水号)
this.groupAndPart.push(val[i].组件零件流水号)
this.partNumber.push(val[i].零件数量)
}
},
handleSelectionChange2(val) { // 基本件多选
this.basic = []
this.groupAndPartBasic = []
this.partNumberBasic = []
for (let i = 0; i < val.length; i++) {
this.basic.push(val[i].基本件流水号)
this.groupAndPartBasic.push(val[i].组件零件基本件流水号)
this.partNumberBasic.push(val[i].零件数量)
}
},
selectable(row) { // 多选禁用
@@ -1099,7 +1105,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
executeReturn1(this.standardAndPurchase, this.groupAndPart).then(response => {
executeReturn1(this.standardAndPurchase, this.groupAndPart, this.partNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable0()
@@ -1123,7 +1129,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
executeReturn2(this.basic, this.groupAndPartBasic).then(response => {
executeReturn2(this.basic, this.groupAndPartBasic, this.partNumberBasic).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable2()