This commit is contained in:
liushuai
2020-03-23 17:59:00 +08:00
parent cb61a19abe
commit 94e5561fdf
20 changed files with 942 additions and 527 deletions

View File

@@ -2,7 +2,7 @@
<div class="app-container">
<el-card>
<el-input v-model="billNames" clearable filterable size="small" placeholder="供应商或合同编号" style="width: 200px;margin: 5px"/>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 120px">
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 120px" clearable>
<el-option
v-for="item in person"
:key="item.value"
@@ -21,14 +21,14 @@
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=50;searchTable1()">查询</el-button>
<el-radio v-model="radio" label="1" style="margin: 0 0 0 10px">全部</el-radio>
<el-radio v-model="radio" label="2" style="margin: 0 0 0 10px">通过</el-radio>
<el-radio v-model="radio" label="3" style="margin: 0 0 0 10px">未过</el-radio>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=50;searchTable1()">查询</el-button>
<el-button type="success" size="small" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;margin-right: 20px;float: right" plain @click="exportTable('')">导出</el-button>
</el-card>
<el-card style="margin-top: 5px">
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row>
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row @row-click="searchTable2">
<el-table-column label="采购合同编号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
@@ -97,7 +97,7 @@
</div>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="合同审批通知" center style="min-height: 300px;" width="1000px">
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="合同审批通知" center style="min-height: 300px;" width="370px">
<div style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
</el-dialog>
</div>

View File

@@ -0,0 +1,236 @@
<template>
<div class="app-container">
<el-card>
<el-select v-model="projectValue" filterable clearable size="small" style="margin-right:10px;width: 150px" placeholder="项目名称" @change="typeChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="machineValue" clearable filterable size="small" style="margin-right:10px;width: 150px" placeholder="机床名称">
<el-option
v-for="item in machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button size="small" type="primary" icon="el-icon-search" style="margin: 0 0 0 10px" plain @click="searchTable()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-download" style="margin: 0 0 0 10px" plain @click="exportExcel()">导出</el-button>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" highlight-current-row show-summary border style="width: 1510px;" size="mini" height="700">
<el-table-column label="跟单号" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.跟单号 }}
</template>
</el-table-column>
<el-table-column label="工序" align="center" width="50">
<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="80">
<template slot-scope="scope">
{{ scope.row.计划数量 }}
</template>
</el-table-column>
<el-table-column label="计划准结(分)" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.计划准备工时 }}
</template>
</el-table-column>
<el-table-column label="单件定额(分)" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.单件计划工时 }}
</template>
</el-table-column>
<el-table-column label="计划工时(分)" align="center" prop="计划工时" width="110">
<template slot-scope="scope">
{{ scope.row.计划工时 }}
</template>
</el-table-column>
<el-table-column label="计划完成" align="center" width="110">
<template slot-scope="scope">
{{ 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="110">
<template slot-scope="scope">
{{ scope.row.修补工时 }}
</template>
</el-table-column>
<el-table-column label="单件加工工时(分)" align="center" prop="加工工时" width="140">
<template slot-scope="scope">
{{ scope.row.修补单件工时 }}
</template>
</el-table-column>
<el-table-column label="加工工时(分)" align="center" prop="加工工时" width="110">
<template slot-scope="scope">
{{ scope.row.完成工时 }}
</template>
</el-table-column>
<el-table-column label="扫码工时(分)" align="center" prop="扫码工时" width="110">
<template slot-scope="scope">
{{ scope.row.扫码工时 }}
</template>
</el-table-column>
<el-table-column label="工时比值" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.工时比值 }}
</template>
</el-table-column>
<el-table-column label="加工完成" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.加工完成时间 }}
</template>
</el-table-column>
<el-table-column label="图号及规格" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.图号及规格 }}
</template>
</el-table-column>
<el-table-column label="制品名称" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.制品名称 }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-sizes="[50, 100, 200, 300]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</div>
</template>
<script>
import { initProject, initMachine, searchatabledata } from '@/api/ManufacturingCenter/ContractDetailsInquiry'
export default {
data() {
return {
project: [],
projectValue: '', // 项目名称
machineValue: '', // 机床名称
machine: [],
loading: false,
part: [], // 分組
partValue: '',
specificationValue: '', // 规格型号
totalProcessingHours: '', // 加工总工时
totalPlannedHours: '', // 计划总工时
tableData: [], // 详情表
total: 0, // 总条数
pageSize: 50, // 每页显示条数
pageCurrent: 1 // 后台获取页
}
},
created() {
this.fetchData()
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
},
// 查询按钮
typeChange() {
this.machineValue = ''
this.machine = []
initMachine(this.projectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
// 分页查询
searchTable() {
this.tableData = []
if (this.machineValue) {
this.loading = true
searchatabledata(this.projectValue, this.machineValue, this.pageCurrent, this.pageSize).then(response => {
this.loading = false
if (response.data.result.length !== 0) {
for (let i = 0; i < response.data.result.length; i++) {
this.tableData.push({
跟单号: 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].计划日期.split(' ')[0],
加工数量: response.data.result[i].完成数量,
加工准备工时: response.data.result[i].修补准结工时,
加工工时: response.data.result[i].设备工时,
扫码工时: response.data.result[i].扫码工时,
辅助工时: response.data.result[i].辅助工时,
工时比值: Number(response.data.result[i].计划工时) === 0 ? 0 : Math.round(response.data.result[i].完成工时 / Number(response.data.result[i].计划工时) * 100) / 100.00,
加工日期: 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].零件名称
})
}
}
this.total = parseInt(response.data.output[0].ItemCount)
})
} else {
this.$message.warning('请选择要查询的机床')
}
},
exportExcel() {
if (this.tableData.length === 0) {
this.$message.warning('请查询出要导出的数据')
return
}
var param = []
param[0] = ['项目流水号', this.projectValue]
param[1] = ['机床流水号', this.machineValue]
param[2] = ['PageCurrent', 1]
param[3] = ['PageSize', 999999]
param[4] = ['PageCount', '1111', 'int', '1']
param[5] = ['ItemCount', '1111', 'int', '1']
var Data = this.CreateData('2001', '报表_机床工时统计_查询', param)
this.exportExcel_NPOI(Data)
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}
</script>
<style scoped>
</style>

View File

@@ -53,11 +53,16 @@
{{ scope.row.类别 }}
</template>
</el-table-column>
<el-table-column align="center" label="计划完成时间">
<el-table-column align="center" label="计划完成">
<template slot-scope="scope">
{{ scope.row.计划完成时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="实际完成">
<template slot-scope="scope">
{{ scope.row.机加工实际完成时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="入库时间">
<template slot-scope="scope">
{{ scope.row.入库时间 }}
@@ -122,7 +127,7 @@
</el-table-column>
<el-table-column align="center" label="采购时间">
<template slot-scope="scope">
采购时间
{{ scope.row.创建日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="到货数量">
@@ -130,11 +135,6 @@
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.已到货数量 || scope.row.离线到货数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="到货时间">
<template slot-scope="scope">
到货时间
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
@@ -175,16 +175,21 @@
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="技术下达数量">
<el-table-column align="center" label="投产数量">
<template slot-scope="scope">
{{ scope.row.零件数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="合同采购数量">
<el-table-column align="center" label="采购数量">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.数量 || scope.row.离线采购数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购时间">
<template slot-scope="scope">
{{ scope.row.创建日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="到货数量">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.已到货数量 || scope.row.离线到货数量 || '—' }}
@@ -255,11 +260,6 @@
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.已到货数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="到货时间">
<template slot-scope="scope">
到货时间
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
@@ -503,6 +503,9 @@ export default {
if (response.data.rows[i].计划完成时间 !== '') {
response.data.rows[i].计划完成时间 = response.data.rows[i].计划完成时间.split(' ', 2)[0]
}
if (response.data.rows[i].机加工实际完成时间 !== '') {
response.data.rows[i].机加工实际完成时间 = response.data.rows[i].机加工实际完成时间.split(' ', 2)[0]
}
}
this.tableData = response.data.rows
this.total = parseInt(response.data.total)

View File

@@ -51,6 +51,11 @@
<el-card>
<el-table v-loading="loading" :data="tableData" size="mini" height="740" style="width: 750px" border stripe highlight-current-row @selection-change="handleSelectionChange" @row-click="click">
<el-table-column type="selection" align="center" width="50"/>
<el-table-column label="进程" prop="进程" align="center" width="95px">
<template slot-scope="scope">
{{ scope.row.进程 }}
</template>
</el-table-column>
<el-table-column label="机床号" prop="机床图号" align="center" width="95px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
@@ -86,6 +91,16 @@
{{ scope.row.工艺完成 }}
</template>
</el-table-column>
<el-table-column label="分配时间" prop="分配时间" align="center" width="85px">
<template slot-scope="scope">
{{ scope.row.工艺分配时间 ? scope.row.工艺分配时间.split( ' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="下达时间" prop="下达时间" align="center" width="85px">
<template slot-scope="scope">
{{ scope.row.操作时间 .split( ' ')[0] }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination

View File

@@ -171,8 +171,10 @@ export default {
},
// 查询表格数据
searchTable() {
if (this.machineNameValue) {
if (this.machineNameValue || this.partName || this.outTime) {
this.loading = true
let check
this.machineNameValue ? check = 1 : check = 0
if (this.partName !== '' && this.partName !== null) {
this.partNamecheck = true
} else {
@@ -181,13 +183,13 @@ export default {
let check7, check8
this.outTime ? check7 = 1 : (check7 = 0, this.outTime = '')
this.all === false ? check8 = 0 : check8 = 1
searchtable(this.machineNameValue, this.partNamecheck, this.partName, check7, this.outTime[0], this.outTime[1], check8, this.pageCurrent, this.pageSize).then(response => {
searchtable(check, this.machineNameValue, this.partNamecheck, this.partName, check7, this.outTime[0], this.outTime[1], check8, this.pageCurrent, this.pageSize).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false
})
} else {
this.$message.warning('请先选择机床')
this.$message.warning('请输入筛选条件')
}
},
tableRowClassName({ row }) {

View File

@@ -1,8 +1,15 @@
<template>
<div class="app-container">
<el-card>
<el-input v-model="billNames" clearable filterable size="small" placeholder="供应商或合同编号" style="width: 200px;margin: 5px"/>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 120px">
<!-- <el-input v-model="billNames" clearable filterable size="small" placeholder="供应商或合同编号" style="width: 200px;margin: 5px"/>-->
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" style="margin-left: 5px" clearable @change="totalSum=0;totalPay=0;totalDebt=0;">
<el-option
v-for="item in supplier"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 120px" clearable>
<el-option
v-for="item in person"
:key="item.value"
@@ -21,14 +28,14 @@
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=50;searchTable1()">查询</el-button>
<el-radio v-model="radio" label="1" style="margin: 0 0 0 10px">全部</el-radio>
<el-radio v-model="radio" label="2" style="margin: 0 0 0 10px">通过</el-radio>
<el-radio v-model="radio" label="3" style="margin: 0 0 0 10px">未过</el-radio>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=50;searchTable1()">查询</el-button>
<el-button type="success" size="small" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;margin-right: 20px;float: right" plain @click="exportTable('')">导出</el-button>
</el-card>
<el-card style="margin-top: 5px">
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row>
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row @row-click="searchTable2">
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
@@ -83,7 +90,7 @@
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="请款信息明细" center width="800px">
<el-table :data="gridData1" border highlight-current-row size="mini" height="300px">
<el-table :data="gridData1" border highlight-current-row size="mini">
<el-table-column min-width="150" align="center" label="合同编号">
<template slot-scope="scope">
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
@@ -110,7 +117,7 @@
</template>
<script>
import { initBuyer, searchTable1, searchTable2 } from '@/api/ManufacturingCenter/RequestApprovalQuery'
import { initBuyer, searchTable1, searchTable2, searchSupplier } from '@/api/ManufacturingCenter/RequestApprovalQuery'
import { mapGetters } from 'vuex'
export default {
@@ -118,6 +125,8 @@ export default {
return {
radio: '1',
billNames: '',
supplier: [],
supplierValue: '',
person: [],
personValue: '',
dateRange: '',
@@ -141,8 +150,20 @@ export default {
created() {
this.fetchData()
this.searchTable1()
this.searchSupplier()
},
methods: {
searchSupplier() {
this.supplier = []
searchSupplier().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.supplier.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商流水号
})
}
})
},
fetchData() {
this.person = []
initBuyer().then(response => {
@@ -157,10 +178,10 @@ export default {
searchTable1() {
this.loading1 = true
var check1, check2, check3
this.billNames ? check1 = 1 : check1 = 0
this.supplierValue ? check1 = 1 : check1 = 0
this.dateRange ? check2 = 1 : (check2 = 0, this.dateRange = '')
this.personValue ? check3 = 1 : check3 = 0
searchTable1(this.radio, check1, this.billNames, check2, this.dateRange[0], this.dateRange[1], check3, this.personValue, this.pageCurrent1, this.pageSize1).then(response => {
searchTable1(this.radio, check1, this.supplierValue, check2, this.dateRange[0], this.dateRange[1], check3, this.personValue, this.pageCurrent1, this.pageSize1).then(response => {
console.log(response.data)
this.loading1 = false
this.tableData1 = response.data.rows
@@ -169,13 +190,13 @@ export default {
},
exportTable() {
var check1, check2, check3
this.billNames ? check1 = 1 : check1 = 0
this.supplierValue ? check1 = 1 : check1 = 0
this.dateRange ? check2 = 1 : (check2 = 0, this.dateRange = '')
this.personValue ? check3 = 1 : check3 = 0
var param = []
param[0] = ['查询全部', this.radio]
param[1] = ['供应商名称_check', check1]
param[2] = ['供应商名称', this.billNames]
param[2] = ['供应商名称', this.supplierValue]
param[3] = ['时间段_check', check2]
if (check2 === 0) {
param[4] = ['开始时间', '']

View File

@@ -131,8 +131,17 @@
</el-col>
</el-row>
<el-dialog :visible.sync="dialogVisible1" :close-on-click-modal="false" class="dialog3" title="编辑" center width="500px">
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible1" :close-on-click-modal="false" class="dialog3" title="编辑" center width="500px">
<el-form ref="form1" :model="form1" label-position="right" label-width="160px">
<el-form-item label="零件图号:">
<span style="font-size: 20px">{{ partNumber }}</span>
</el-form-item>
<el-form-item label="零件名称:">
<span style="font-size: 20px">{{ partName }}</span>
</el-form-item>
<el-form-item label="工艺名称:">
<span style="font-size: 20px">{{ procedure }}</span>
</el-form-item>
<el-form-item label="完成数量:" prop="完成数量">
<el-input-number :min="0" :max="剩余数量" v-model="form1.完成数量" style="width: 200px" @change="timeChange()"/>
</el-form-item>
@@ -171,6 +180,9 @@ export default {
loading: false,
tableData2: [], // 工序统计表
loading2: false,
partNumber: '',
partName: '',
procedure: '',
pageCurrent: 1,
pageSize: 10000,
total: 0,
@@ -249,6 +261,9 @@ export default {
this.form1.备注 = row.备注
this.加工时间 = this.form1.录入工时
this.form1.完成数量 = row.完成数量
this.procedure = row.工艺名称
this.partName = row.零件名称
this.partNumber = row.零件图号
this.timeChange()
this.dialogVisible1 = true
})
@@ -308,5 +323,23 @@ export default {
</script>
<style scoped>
.el-form--label-left >>> .el-form-item__label {
text-align: right;
}
>>>.el-dialog--center .el-dialog__body {
text-align: initial;
padding: 20px 30px 20px
}
>>>.el-dialog__header {
padding: 20px 20px 0px;
}
>>>.el-dialog__footer {
padding: 0px 20px 20px;
/*text-align: right;*/
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
>>>.el-form-item {
margin-bottom: 13px;
}
</style>

View File

@@ -1,7 +1,7 @@
<template>
<div>
<el-row>
<el-col style="width: 610px">
<el-col style="width: 630px">
<el-card style="height: 680px">
<el-row style="margin-top: 5px">
<el-input v-model="Parts" placeholder="零件图号" size="small" style="width: 170px" clearable @keyup.enter.native="pageCurrent=1;getParts()"/>
@@ -25,11 +25,6 @@
{{ scope.row.图号及规格 }}
</template>
</el-table-column>
<el-table-column label="图号及规格" show-overflow-tooltip align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.图号及规格 }}
</template>
</el-table-column>
<el-table-column label="制品名称" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}