更新
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<el-card>
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<el-input v-model="supplierNameValue" size="small" placeholder="外协厂家零件图号表单号项目名称" style="width: 220px" clearable/>
|
||||
<el-date-picker v-model="timer" type="daterange" value-format="yyyy-MM-dd" size="small" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期"/>
|
||||
<el-date-picker v-model="timer" type="daterange" value-format="yyyy-MM-dd" size="small" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 240px"/>
|
||||
<el-select v-model="MaterialsValue" placeholder="外协状态" filterable size="small" style="width: 120px" clearable>
|
||||
<el-option
|
||||
v-for="item in Materials"
|
||||
@@ -12,11 +12,11 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button icon="el-icon-search" type="primary" size="small" plain @click="pageCurrent = 1;pageSize = 50;getTableData()">查询</el-button>
|
||||
<el-button type="primary" class="el-icon-download" size="small" style="margin: 10px 0 0 10px" plain @click="exportExcel">导出</el-button>
|
||||
<el-button type="success" class="el-icon-download" size="small" style="margin: 10px 0 0 10px" plain @click="exportExcel">导出</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" border stripe size="mini" height="700" style="width: 1210px">
|
||||
<el-table v-loading="loading" :data="tableData" border stripe size="mini" height="650" style="width: 1350px">
|
||||
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||
<el-table-column label="外协状态" align="center" width="90px">
|
||||
<template slot-scope="scope">
|
||||
@@ -49,19 +49,29 @@
|
||||
{{ 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" width="160px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协厂家名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外协单号" align="center" width="200">
|
||||
<el-table-column label="外协单号" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.表单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外协日期" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.任务下达日期.substr(0,10) }}
|
||||
{{ scope.row.任务下达日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -76,7 +86,7 @@
|
||||
@current-change="handleCurrentChanges"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-card v-show="false">
|
||||
<div id="myChart1" :style="{width: '100%', height: '400px', margin: 'auto'}"/>
|
||||
</el-card>
|
||||
</div>
|
||||
@@ -85,7 +95,6 @@
|
||||
<script>
|
||||
import { searchTable, getprocedure, search1 } from '@/api/Outsourcing/OutsourcingPartsQuery'
|
||||
import echarts from 'echarts'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -103,6 +112,7 @@ export default {
|
||||
}],
|
||||
tableData: [],
|
||||
procedure: [],
|
||||
procedureTime: [],
|
||||
pageCurrent: 1,
|
||||
pageSize: 50,
|
||||
tableData1: []
|
||||
@@ -119,7 +129,6 @@ export default {
|
||||
}))
|
||||
},
|
||||
exportExcel() {
|
||||
this.tableData1 = []
|
||||
let check, check1, check2
|
||||
this.supplierNameValue ? check = 1 : check = 0
|
||||
if (this.MaterialsValue !== '' && this.MaterialsValue !== null) {
|
||||
@@ -135,49 +144,21 @@ export default {
|
||||
} else {
|
||||
check2 = 1
|
||||
}
|
||||
searchTable(check, this.supplierNameValue, check1, this.MaterialsValue, check2, this.timer[0], this.timer[1], 100000000, this.pageCurrent).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData1.push({
|
||||
到货状态: response.data.rows[i].到货状态 === '0' ? '未到' : '已到',
|
||||
项目名称: response.data.rows[i].项目名称,
|
||||
零件图号: response.data.rows[i].零件图号,
|
||||
零件名称: response.data.rows[i].零件名称,
|
||||
批次数量: response.data.rows[i].批次数量,
|
||||
外协厂家名称: response.data.rows[i].外协厂家名称,
|
||||
表单号: response.data.rows[i].表单号,
|
||||
工艺计划流水号: response.data.rows[i].工艺计划流水号,
|
||||
单件是否外协: response.data.rows[i].单件是否外协,
|
||||
任务下达日期: response.data.rows[i].任务下达日期 ? response.data.rows[i].任务下达日期.split(' ')[0] : '',
|
||||
外协工序: ''
|
||||
})
|
||||
}
|
||||
for (let i = 0; i < this.tableData1.length; i++) {
|
||||
getprocedure(this.tableData1[i].工艺计划流水号, this.tableData1[i].单件是否外协).then(response => {
|
||||
this.procedure[i] = ''
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
this.procedure[i] = this.procedure[i] + ' ' + response.data[j].工艺名称简称
|
||||
}
|
||||
this.tableData1[i].外协工序 = this.procedure[i]
|
||||
})
|
||||
}
|
||||
}).then(() => {
|
||||
setTimeout(this.exportExcel1, 500)
|
||||
})
|
||||
},
|
||||
exportExcel1() {
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['外协状态', '项目名称', '零件图号', '零件名称', '数量', '外协工序', '外协厂家', '外协单号', '外协日期']
|
||||
const filterVal = ['到货状态', '项目名称', '零件图号', '零件名称', '批次数量', '外协工序', '外协厂家名称', '表单号', '任务下达日期']
|
||||
const list = this.tableData1
|
||||
const data = this.formatJson(filterVal, list)
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: '外协零件表',
|
||||
autoWidth: true,
|
||||
bookType: 'xlsx'
|
||||
})
|
||||
})
|
||||
var param = []
|
||||
param[0] = ['外协厂家_check', check]
|
||||
param[1] = ['外协厂家', this.supplierNameValue]
|
||||
param[2] = ['外协状态_check', check1]
|
||||
param[3] = ['外协状态', this.MaterialsValue]
|
||||
param[4] = ['时间_check', check2]
|
||||
if (check2 === 0) {
|
||||
param[5] = ['开始时间', '']
|
||||
param[6] = ['结束时间', '']
|
||||
} else {
|
||||
param[5] = ['开始时间', this.timer[0]]
|
||||
param[6] = ['结束时间', this.timer[1]]
|
||||
}
|
||||
var Data = this.CreateData('2001', '报表_车间生产管理_外协零件_查询数据_新', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
},
|
||||
getTableData() {
|
||||
this.tableData = []
|
||||
@@ -198,22 +179,7 @@ export default {
|
||||
check2 = 1
|
||||
}
|
||||
searchTable(check, this.supplierNameValue, check1, this.MaterialsValue, check2, this.timer[0], this.timer[1], this.pageSize, this.pageCurrent).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData.push({
|
||||
到货状态: response.data.rows[i].到货状态,
|
||||
项目名称: response.data.rows[i].项目名称,
|
||||
零件图号: response.data.rows[i].零件图号,
|
||||
零件名称: response.data.rows[i].零件名称,
|
||||
批次数量: response.data.rows[i].批次数量,
|
||||
外协厂家名称: response.data.rows[i].外协厂家名称,
|
||||
表单号: response.data.rows[i].表单号,
|
||||
工艺计划流水号: response.data.rows[i].工艺计划流水号,
|
||||
单件是否外协: response.data.rows[i].单件是否外协,
|
||||
任务下达日期: response.data.rows[i].任务下达日期,
|
||||
外协工序: ''
|
||||
})
|
||||
}
|
||||
this.getProcedure(this.tableData)
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
@@ -222,10 +188,13 @@ export default {
|
||||
for (let i = 0; i < row.length; i++) {
|
||||
getprocedure(row[i].工艺计划流水号, row[i].单件是否外协).then(response => {
|
||||
this.procedure[i] = ''
|
||||
this.procedureTime[i] = 0
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
this.procedure[i] = this.procedure[i] + ' ' + response.data[j].工艺名称简称
|
||||
this.procedureTime[i] = parseInt(this.procedureTime[i]) + parseInt(response.data[j].单件定额工时) * row[i].批次数量 + parseInt(response.data[j].准结定额工时)
|
||||
}
|
||||
this.tableData[i].外协工序 = this.procedure[i]
|
||||
this.tableData[i].外协工时 = this.procedureTime[i]
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="width: 1050px">
|
||||
<el-row style="width: 1020px">
|
||||
<el-row style="width: 720px">
|
||||
<el-card style="margin-bottom: 5px">
|
||||
<el-row>
|
||||
<el-input v-model="ManufacturerName" size="small" placeholder="外协厂家" clearable style="width:200px"/>
|
||||
<el-date-picker
|
||||
@@ -15,9 +15,10 @@
|
||||
style="width:250px;margin-left: 5px;margin-top: 10px;margin-bottom: 10px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-button type="primary" class="el-icon-search" style="margin-left: 20px" size="small" plain @click="pageCurrent=1;pageSize=50;getParts()">查询</el-button>
|
||||
<el-button type="primary" class="el-icon-search" style="margin-left: 20px" size="small" plain @click="getParts()">查询</el-button>
|
||||
<el-button type="success" plain class="el-icon-download" style="margin-left: 30px" size="small" @click="exportExcel">导出</el-button>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="tableData" size="mini" highlight-current-row height="300" style="width: 690px;" border element-loading-text="拼命加载中" @row-click="rowClick">
|
||||
<el-table v-loading="loading" :data="tableData" size="mini" highlight-current-row height="300" style="width: 690px;margin-bottom: 10px" border element-loading-text="拼命加载中" @row-click="rowClick">
|
||||
<el-table-column label="厂家" prop="外协厂家名称" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协厂家名称 }}
|
||||
@@ -44,25 +45,16 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading"
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[50, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-col style="width: 520px">
|
||||
</el-card>
|
||||
</el-row>
|
||||
<el-col style="width: 520px">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span style="margin-top: 10px">开票明细:</span>
|
||||
<el-button type="distribution" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd1('form1')">开票</el-button>
|
||||
</el-row>
|
||||
<el-table v-loading="loading2" :data="tableData2" size="mini" stripe height="400" style="width: 100%" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="发票号" prop="发票号" align="center" width="160px">
|
||||
<el-table-column label="发票号" prop="发票号" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
@@ -72,7 +64,7 @@
|
||||
{{ scope.row.开票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开票日期" align="center" width="100px" prop="开票日期">
|
||||
<el-table-column label="开票日期" align="center" width="90px" prop="开票日期">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票时间 }}
|
||||
</template>
|
||||
@@ -95,8 +87,10 @@
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col style="width: 350px">
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col style="width: 370px;margin-left: 5px">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span style="margin-top: 10px">付款明细:</span>
|
||||
<el-button type="distribution" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd2('form2')">付款</el-button>
|
||||
@@ -130,13 +124,13 @@
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-card>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" :title="title1" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules" label-position="left" label-width="120px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-form-item label="发票号" prop="发票号" >
|
||||
<el-form-item label="到票票号" prop="发票号" >
|
||||
<el-input v-model="form1.发票号" placeholder="发票号" style="width:200px" clearable size="small"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
@@ -257,11 +251,10 @@ export default {
|
||||
var check2
|
||||
this.startTime ? check2 = 1 : (check2 = 0, this.startTime = '')
|
||||
this.ManufacturerName ? check = 1 : check = 0
|
||||
searchtable(check, this.ManufacturerName, check2, this.startTime[0], this.startTime[1], this.pageCurrent, this.pageSize).then(response => {
|
||||
searchtable(check, this.ManufacturerName, check2, this.startTime[0], this.startTime[1]).then(response => {
|
||||
this.loading = false
|
||||
if (response.data.rows.length !== 0) {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
if (response.data.length !== 0) {
|
||||
this.tableData = response.data
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -320,7 +313,7 @@ export default {
|
||||
}
|
||||
if (this.外协厂家流水号) {
|
||||
this.param1 = 1
|
||||
this.title1 = '新增发票'
|
||||
this.title1 = '新增到票'
|
||||
this.form1.发票号 = ''
|
||||
this.form1.开票时间 = ''
|
||||
this.form1.开票金额 = ''
|
||||
@@ -482,6 +475,29 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
exportExcel() {
|
||||
if (this.tableData.length !== 0) {
|
||||
var check
|
||||
var check2
|
||||
this.startTime ? check2 = 1 : (check2 = 0, this.startTime = '')
|
||||
this.ManufacturerName ? check = 1 : check = 0
|
||||
var param = []
|
||||
param[0] = ['外协厂家_check', check]
|
||||
param[1] = ['外协厂家', this.machineNameValue]
|
||||
param[2] = ['时间_check', check2]
|
||||
if (check2 === 0) {
|
||||
param[3] = ['开始时间', '']
|
||||
param[4] = ['结束时间', '']
|
||||
} else {
|
||||
param[3] = ['开始时间', this.startTime[0]]
|
||||
param[4] = ['结束时间', this.startTime[1]]
|
||||
}
|
||||
var Data = this.CreateData('2001', '报表_车间生产管理工艺_外协付款_查询', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
} else {
|
||||
this.$message.warning('暂无数据')
|
||||
}
|
||||
},
|
||||
callOff2(formName) {
|
||||
this.dialogFormVisible2 = false
|
||||
this.$refs[formName].resetFields()
|
||||
@@ -512,16 +528,6 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.getParts()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.getParts()
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageCurrent2 = 1
|
||||
this.pageSize2 = val
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-input v-model="partNumber" size="small" placeholder="零件号" clearable style="width:160px"/>
|
||||
<el-input v-model="partNumber" size="small" placeholder="零件号" clearable style="width:160px;margin-top: 3px"/>
|
||||
<el-button type="primary" size="mini" icon="el-icon-search" style="margin-left:20px" plain @click="getList()">查询</el-button>
|
||||
<el-button type="danger" plain size="mini" icon="el-icon-caret-right" style="float: right;margin-right:10px" @click="getBack()">打回车间</el-button>
|
||||
<el-table v-loading="loading1" ref="multipleTable" :data="List1" border size="mini" stripe highlight-current-row height="265" style="width: 100%;margin-top: 20px" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading1" ref="multipleTable" :data="List1" border size="mini" stripe highlight-current-row height="265" style="width: 100%;margin-top: 3px" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column label="项目名称" prop="项目名称" align="center" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
@@ -34,11 +34,11 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-col :span="8">
|
||||
<el-col style="margin-right: 5px; width: 500px">
|
||||
<el-input v-model="manufacturers" size="small" placeholder="外协厂家或表单号" style="width:160px" clearable @keyup.enter.native="fetchData()"/>
|
||||
<el-button type="primary" size="mini" icon="el-icon-search" style="margin-left:10px" plain @click="fetchData()">查询</el-button>
|
||||
<el-checkbox v-model="isChecked" size="small" label="历史"/>
|
||||
<el-button type="distribution" size="mini" plain icon="el-icon-circle-plus-outline" style="margin-left:1px" @click="handleAdd()">新增</el-button>
|
||||
<el-button type="distribution" size="mini" plain icon="el-icon-circle-plus-outline" style="margin-left:1px" @click="handleAdd()">外协任务</el-button>
|
||||
<el-table v-loading="loading2" :data="List" highlight-current-row height="550" size="mini" border @row-click="searchProcess" >
|
||||
<el-table-column label="表单号" prop="表单号" align="center" min-width="155px">
|
||||
<template slot-scope="scope">
|
||||
@@ -58,10 +58,10 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-col :span="15" style="float: right">
|
||||
<div>
|
||||
<el-button type="warning" size="mini" icon="el-icon-arrow-down" style="margin-top:3px" plain @click="getSpareParts">选入零件</el-button>
|
||||
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;float: right" plain @click="exportTable('RWD')">导出任务单</el-button>
|
||||
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;margin-right: 20px;float: right" plain @click="exportTable('RWD')">导出任务单</el-button>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="成交" placement="top">
|
||||
<el-button type="success" size="mini" icon="el-icon-upload2" style="margin-left:10px;margin-top: 3px;float: right" plain @click="Deal">提交</el-button>
|
||||
</el-tooltip>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<div class="app-container">
|
||||
<el-col :span="10">
|
||||
<el-card>
|
||||
<span>厂家:</span>
|
||||
<el-input v-model="manufacturers" size="small" placeholder="厂家或外协任务单号" style="width:160px" clearable @keyup.enter.native="pageSize=20;pageList=1;fetchData()"/>
|
||||
<el-button type="primary" size="mini" icon="el-icon-search" style="margin-left:10px" plain @click="pageSize=10;pageList=1;fetchData()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
Reference in New Issue
Block a user