报废及制造采购导出
This commit is contained in:
@@ -54,14 +54,14 @@ export function editTime(CutCode, StartTime, FinishTime) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editStop(CutCode, temp) {
|
||||
export function editSpare(CutCode, number, reason, time) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_零件工艺计划_修改停产',
|
||||
param: '工艺计划流水号=' + CutCode + '=string&批次零件状态=' + temp + '=string'
|
||||
name: '车间生产管理工艺_零件工艺计划_报废零件_增加数据',
|
||||
param: '工艺计划流水号=' + CutCode + '&报废数量=' + number + '&报废原因=' + reason + '&报废时间=' + time
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -77,14 +77,14 @@ export function TableDta2Select(CutCode, currentPage2, pageSize2) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editA(CutCodebefore, Number, startCut) {
|
||||
export function editA(CutCodebefore, Number) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_零件工艺计划_增加数据_补投',
|
||||
param: '工艺计划流水号_补投前=' + CutCodebefore + '=string&批次数量=' + Number + '=string&开始工序=' + startCut + '=string'
|
||||
name: '车间生产管理工艺_零件工艺计划_报废零件_补投',
|
||||
param: '工艺计划流水号=' + CutCodebefore + '&补投数量=' + Number
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -24,14 +24,14 @@ export function initBuyer() {
|
||||
})
|
||||
}
|
||||
// 采购合同查询
|
||||
export function searchTable1(pageCurrent, pageSize, check1, start, end, check2, contract, check3, name, check4, supplier, check5, approval) {
|
||||
export function searchTable1(pageCurrent, pageSize, check1, start, end, check2, contract, check4, supplier, check5, approval) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_合同_查询数据',
|
||||
param: '时间段_check=' + check1 + '&开始时间=' + start + '=datetime&结束时间=' + end + '=datetime&采购合同流水号_check=' + check2 + '&采购合同流水号=' + contract + '&人员编号_check=' + check3 + '&人员编号=' + name + '&供应商名称_check=' + check4 + '&供应商名称=' + supplier + '&审批情况流水号_check=' + check5 + '&审批情况流水号=' + approval,
|
||||
param: '时间段_check=' + check1 + '&开始时间=' + start + '=datetime&结束时间=' + end + '=datetime&采购合同流水号_check=' + check2 + '&采购合同流水号=' + contract + '&供应商名称_check=' + check4 + '&供应商名称=' + supplier + '&审批情况流水号_check=' + check5 + '&审批情况流水号=' + approval,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="width: 57%">
|
||||
<el-card style="width: 58%">
|
||||
<div slot="header">
|
||||
<el-row>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable style="width: 120px" @change="machineChange">
|
||||
|
||||
@@ -21,124 +21,64 @@
|
||||
<!--:value="item.value"/>-->
|
||||
<!--</el-select>-->
|
||||
<span>机床图号:</span>
|
||||
<el-select v-model="machineNameValue" placeholder="机床号" style="margin-right: 10px; width: 150px" size="small" filterable clearable @change="machineChange">
|
||||
<el-select v-model="machineNameValue" placeholder="机床图号" style="margin-right: 10px; width: 150px" size="small" filterable clearable @change="machineChange">
|
||||
<el-option
|
||||
v-for="item in machineName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" plain style="margin-left: 15px" @click="total1=0;pageSize1 = 10000;pageCurrent1 = 1;searchData1()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" plain style="margin-left: 15px" @click="total=0;pageSize = 20;pageCurrent = 1;searchData1()">查询</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 15px">
|
||||
<el-table
|
||||
v-loading="listLoading2"
|
||||
:data="tableData2"
|
||||
style="width: 100%;max-height: 400px;"
|
||||
stripe
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
border
|
||||
@row-click="searchSpareParts">
|
||||
<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.停产零件种类 }}
|
||||
</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.已加工工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <div class="block" style="margin-top: 10px">-->
|
||||
<!-- <el-pagination-->
|
||||
<!-- :current-page="pageCurrent1"-->
|
||||
<!-- :page-sizes="[10, 20, 30, 40]"-->
|
||||
<!-- :page-size="pageSize1"-->
|
||||
<!-- :total="total1"-->
|
||||
<!-- layout="total, sizes, prev, pager, next, jumper"-->
|
||||
<!-- @size-change="handleSizeChange1"-->
|
||||
<!-- @current-change="handleCurrentChange1"/>-->
|
||||
<!-- </div>-->
|
||||
</el-card>
|
||||
<!-- <el-card style="margin-top: 15px">-->
|
||||
<!-- <el-row>-->
|
||||
<!-- <span>组号:</span>-->
|
||||
<!-- <el-select v-model="GroupNumValue" placeholder="组号" style="margin-right: 10px;width: 150px" size="small" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in GroupNum"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- <span>零件图号:</span>-->
|
||||
<!-- <el-input v-model="PartDrawingNumber" placeholder="零件图号" size="small" clearable style="width:150px"/>-->
|
||||
<!-- <el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="total=0;pageSize = 10;pageCurrent = 1;searchData()">查询</el-button>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </el-card>-->
|
||||
<el-row>
|
||||
<el-col style="width: 60%">
|
||||
<el-card style="margin-top: 15px">
|
||||
<el-card style="margin-top: 15px;width: 960px">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
stripe
|
||||
size="mini"
|
||||
height="460"
|
||||
size="small"
|
||||
height="660"
|
||||
highlight-current-row
|
||||
border
|
||||
@row-click="searchProcedure">
|
||||
<el-table-column align="center" label="组号" width="50px">
|
||||
border>
|
||||
<el-table-column align="center" label="机床图号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="组号" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件图号" min-width="100px">
|
||||
<el-table-column align="center" label="零件图号" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件名称" min-width="70px">
|
||||
<el-table-column align="center" label="零件名称" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件数量">
|
||||
<el-table-column align="center" label="报废数量" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.投产数量 }}
|
||||
{{ 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.停产时间 }}
|
||||
{{ scope.row.报废时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="停产原因">
|
||||
<el-table-column align="center" label="报废原因" width="180px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.停产原因 }}
|
||||
{{ scope.row.报废原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="已完成工时">
|
||||
<el-table-column align="center" label="报废工时" width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.加工工时 }}
|
||||
{{ scope.row.报废工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -153,71 +93,17 @@
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col style="width: 40%">
|
||||
<el-card style="margin-top: 15px">
|
||||
<el-table
|
||||
v-loading="listLoading1"
|
||||
:data="tableData1"
|
||||
style="width: 100%;"
|
||||
stripe
|
||||
size="mini"
|
||||
height="500px"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="工序" width="50">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序顺序 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="工艺名称" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="工艺要求" width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺要求 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="单件定额" width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单件定额工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="准结定额" width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.准结定额工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="工序进度" width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序状态 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="完成工时" width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchMachine, searchGroupNum, searchTable, searchTable1, searchTable2 } from '@/api/ManufacturingCenter/DiscardedPartsInquiry'
|
||||
import { searchMachine, searchTable1, searchTable2 } from '@/api/ManufacturingCenter/DiscardedPartsInquiry'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 1000000,
|
||||
total1: 0,
|
||||
list: [],
|
||||
check3: '',
|
||||
PartDrawingNumber: '',
|
||||
@@ -260,73 +146,17 @@ export default {
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.GroupNum = []
|
||||
this.GroupNumValue = ''
|
||||
searchGroupNum(this.machineNameValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
this.searchData1()
|
||||
},
|
||||
searchData1() {
|
||||
this.listLoading2 = true
|
||||
this.listLoading = true
|
||||
if (this.machineNameValue !== '' && this.machineNameValue !== null) {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
searchTable2(this.check1, this.machineNameValue, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
searchTable2(this.check1, this.machineNameValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response)
|
||||
this.tableData2 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
this.listLoading2 = false
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchData1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchData1()
|
||||
},
|
||||
searchSpareParts(row) {
|
||||
this.tableData1 = []
|
||||
this.machineValue = row.机床流水号
|
||||
this.initGroup()
|
||||
},
|
||||
initGroup() {
|
||||
this.GroupNum = []
|
||||
this.GroupNumValue = ''
|
||||
searchGroupNum(this.machineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
this.searchData()
|
||||
},
|
||||
searchData() {
|
||||
this.listLoading = true
|
||||
this.tableData1 = []
|
||||
if (this.GroupNumValue !== '' && this.GroupNumValue !== null) {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
if (this.PartDrawingNumber !== '' && this.PartDrawingNumber !== null) {
|
||||
this.check3 = 1
|
||||
} else {
|
||||
this.check3 = 0
|
||||
}
|
||||
searchTable(this.entryNameValue, this.machineValue, this.check2, this.GroupNumValue, this.check3, this.PartDrawingNumber, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.listLoading = false
|
||||
@@ -335,11 +165,11 @@ export default {
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchData()
|
||||
this.searchData1()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchData()
|
||||
this.searchData1()
|
||||
},
|
||||
searchProcedure(row) {
|
||||
this.listLoading1 = true
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-row>
|
||||
<el-col style="width: 690px">
|
||||
<el-card style="width: 690px">
|
||||
<el-col style="width: 850px">
|
||||
<el-card style="width: 850px">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
@@ -41,7 +41,7 @@
|
||||
highlight-current-row
|
||||
border
|
||||
stripe
|
||||
style="width: 810px; text-align: center"
|
||||
style="width: 850px; text-align: center"
|
||||
@current-change="fetchTableData2">
|
||||
<el-table-column
|
||||
align="center"
|
||||
@@ -70,6 +70,24 @@
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.批次数量 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="province4"
|
||||
label="报废数量"
|
||||
width="80px"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.报废数量 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="province4"
|
||||
label="补投数量"
|
||||
width="80px"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.补投数量 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="province5"
|
||||
@@ -198,21 +216,21 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-card>
|
||||
<div style="margin-top: 10px">报废后,将重新补投两种零件,一种是接着加工(执行原来的加工计划),另一种是从第一序重新加工(重新制定零件的加工计划),补投的零件号后加B</div>
|
||||
<div style="margin-top: 10px; display: block">
|
||||
<span>补投接着加工零件数量</span>
|
||||
<el-input v-model="inputA" auto-complete="off" style="width: 100px" size="small"/>
|
||||
<span>开始工序</span>
|
||||
<el-input v-model="inputB" :disabled="true" auto-complete="off" style="width: 100px" size="small"/>
|
||||
<el-button type="primary" plain size="small" @click="editA">补投接着生产零件</el-button>
|
||||
</div>
|
||||
<div style="margin-top: 10px">报废后,补投的零件号后加B+报废次数</div>
|
||||
<!--<div style="margin-top: 10px; display: block">-->
|
||||
<!--<span>补投接着加工零件数量</span>-->
|
||||
<!--<el-input v-model="inputA" auto-complete="off" style="width: 100px" size="small"/>-->
|
||||
<!--<span>开始工序</span>-->
|
||||
<!--<el-input v-model="inputB" :disabled="true" auto-complete="off" style="width: 100px" size="small"/>-->
|
||||
<!--<el-button type="primary" plain size="small" @click="editA">补投接着生产零件</el-button>-->
|
||||
<!--</div>-->
|
||||
<!--<div style="margin-left: 800px; display: block">>>>><el-button type="success" size="small" style="margin-left: 40px" @click="goToCapacityBalance()">制定计划</el-button></div>-->
|
||||
<div style="margin-top: 10px; display: block">
|
||||
<span>补投重新加工零件数量</span>
|
||||
<el-input v-model="inputC" auto-complete="off" style="width: 100px" size="small" />
|
||||
<el-input-number v-model="inputC" :step="1" :min="0" :max="spareNumber-SupplementationNumber" style="width: 100px" size="small" />
|
||||
<span>开始工序</span>
|
||||
<el-input v-model="inputD" :disabled="true" auto-complete="off" style="width: 100px" size="small"/>
|
||||
<el-button type="primary" size="small" plain @click="editB">补投重新生产零件</el-button>
|
||||
<el-button :disabled="spareNumber-SupplementationNumber===0" type="primary" size="small" plain @click="editB">补投重新生产零件</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card v-show="false">
|
||||
@@ -249,59 +267,41 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogeditVisible" :title="title" width="400px" center >
|
||||
<el-form ref="form" :model="form" label-position="left">
|
||||
<el-form-item label="零件号" label-width="100px" style="width: 299px ; display: inline-block; text-align: left" size="small">
|
||||
<el-input v-model="form.input1" :disabled="true" auto-complete="off" style="margin-left: 20px"/>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogeditVisible" :title="title" :close-on-click-modal="false" width="400px" center >
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left">
|
||||
<el-form-item label="零件号" label-width="80px" style="width: 299px ; display: inline-block; text-align: left;margin-left: 20px" size="small">
|
||||
<el-input v-model="form.input1" :disabled="true" auto-complete="off" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="停产原因" label-width="100px" prop="reason" style="width: 299px ; display: inline-block; text-align: left" size="small">
|
||||
<el-input v-model="form2.reason" auto-complete="off" style="margin-left: 20px"/>
|
||||
<el-form-item label="报废数量" prop="报废数量" label-width="100px" style="width: 299px ; display: inline-block; text-align: left" size="small">
|
||||
<el-input-number v-model="form2.报废数量" :step="1" :min="0" :max="PCNumber" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="停产时间" label-width="120px" prop="time" style="width: 299px ; display: inline-block; text-align: left" size="small">
|
||||
<el-form-item label="报废原因" prop="报废原因" label-width="100px" style="width: 299px ; display: inline-block; text-align: left" size="small">
|
||||
<el-input v-model="form2.报废原因" auto-complete="off" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报废时间" prop="报废时间" label-width="100px" style="width: 299px ; display: inline-block; text-align: left" size="small">
|
||||
<el-date-picker
|
||||
v-model="form2.time"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="false" label="零件状态" label-width="123px" style="margin-bottom: 18px; display: inline-block" prop="input2">
|
||||
<el-radio-group v-model="radio" fill="#B2DFEE" boolean @change="remark()">
|
||||
<el-radio-button label="正常生产"/>
|
||||
<el-radio-button label="停止生产"/>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="false" label="开始时间" label-width="120px" style="margin-bottom: 18px; display: inline-block">
|
||||
<el-date-picker
|
||||
v-model="input3"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="false" label="结束时间" label-width="120px" style="margin-bottom: 18px; display: inline-block">
|
||||
<el-date-picker
|
||||
v-model="input4"
|
||||
v-model="form2.报废时间"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
style="width: 200px"
|
||||
placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="margin-right: 60px;margin-top: 10px">
|
||||
<el-button style="margin-left: 35%" @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="submit('form')">确定</el-button>
|
||||
<el-button style="margin-left: 35%" @click="callOff('form2')">取消</el-button>
|
||||
<el-button type="primary" @click="submit('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogeditVisible1" title="停产记录" width="400px" center>
|
||||
<el-form ref="form2" :model="form2" label-position="left">
|
||||
<el-form-item label="停产原因" label-width="100px" style="width: 299px ; display: inline-block; text-align: left" size="small">
|
||||
<el-input v-model="form2.reason" auto-complete="off"/>
|
||||
<el-form-item label="报废原因" label-width="100px" style="width: 299px ; display: inline-block; text-align: left" size="small">
|
||||
<el-input v-model="form2.报废原因" auto-complete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="停产时间" label-width="100px" style="width: 299px ; display: inline-block; text-align: left" size="small">
|
||||
<el-form-item label="报废时间" label-width="100px" style="width: 299px ; display: inline-block; text-align: left" size="small">
|
||||
<el-date-picker
|
||||
v-model="form2.time"
|
||||
v-model="form2.报废时间"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
@@ -317,7 +317,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MachineDrawingSelect, TeamSelect, TableDataSelect, editTime, editStop, TableDta2Select, editA, editchar } from '@/api/ManufacturingCenter/SparePartsForScrap'
|
||||
import { MachineDrawingSelect, TeamSelect, TableDataSelect, editSpare, TableDta2Select, editA } from '@/api/ManufacturingCenter/SparePartsForScrap'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -331,6 +331,9 @@ export default {
|
||||
TeamValue: '', // 组号
|
||||
Team: [], // 组号下拉框
|
||||
title: '',
|
||||
PCNumber: '', // 批次数量
|
||||
spareNumber: '', // 报废数量
|
||||
SupplementationNumber: '', // 补投数量
|
||||
currentPage1: 1,
|
||||
pageSize1: 40,
|
||||
total1: null,
|
||||
@@ -364,8 +367,14 @@ export default {
|
||||
input2: ''
|
||||
},
|
||||
form2: {
|
||||
reason: '',
|
||||
time: ''
|
||||
报废数量: '',
|
||||
报废原因: '',
|
||||
报废时间: ''
|
||||
},
|
||||
rules: {
|
||||
报废时间: [{ required: true, message: '请选择报废时间', trigger: 'change' }],
|
||||
报废数量: [{ required: true, message: '请输入报废数量', trigger: 'blur' }],
|
||||
报废原因: [{ required: true, message: '请输入报废原因', trigger: 'blur' }]
|
||||
},
|
||||
radio: '',
|
||||
input3: '', // 开始时间
|
||||
@@ -407,7 +416,11 @@ export default {
|
||||
if (row) {
|
||||
this.disabled = false
|
||||
this.judge = row.批次零件状态
|
||||
this.spareNumber = row.报废数量
|
||||
this.inputC = 0
|
||||
this.SupplementationNumber = row.补投数量
|
||||
this.CutCodeBefore = row.工艺计划流水号
|
||||
console.log(this.CutCodeBefore, 222)
|
||||
TableDta2Select(row.工艺计划流水号, this.currentPage2, this.pageSize2).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
@@ -451,46 +464,36 @@ export default {
|
||||
this.pageSize2 = 10
|
||||
},
|
||||
handleEdit(row) {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.remark1 = ''
|
||||
this.remark2 = ''
|
||||
this.form2.reason = ''
|
||||
this.PCNumber = parseInt(row.批次数量)
|
||||
console.log(this.Number, 111)
|
||||
this.title = row.零件名称
|
||||
this.form2.time = new Date()
|
||||
this.dialogeditVisible = true
|
||||
this.form.input1 = row.零件图号
|
||||
if (row.批次零件状态 === '2') {
|
||||
this.radio = '停止生产'
|
||||
} else if (row.批次零件状态 === '1') {
|
||||
this.radio = '正常生产'
|
||||
}
|
||||
this.input3 = row.机加工开始时间
|
||||
this.input4 = row.机加工结束时间
|
||||
this.code = row.工艺计划流水号
|
||||
},
|
||||
async chaEdit() {
|
||||
this.radio === '正常生产' ? this.temp = '1' : this.temp = '2'
|
||||
const Time = await editTime(this.code, this.input3, this.input4)
|
||||
const Char = await editchar(this.remark1, this.remark2, this.code)
|
||||
const Stop = await editStop(this.code, 2)
|
||||
if (Time.data[0].result === '1' && Char.data[0].result === '1' && Stop.data[0].result === '1') {
|
||||
this.dialogeditVisible = false
|
||||
this.$message.success('信息更新成功')
|
||||
this.fetchTableData()
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
},
|
||||
// 提交添加或者修改
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.chaEdit()
|
||||
editSpare(this.code, this.form2.报废数量, this.form2.报废原因, this.form2.报废时间).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('报废成功')
|
||||
this.dialogeditVisible = false
|
||||
this.fetchTableData()
|
||||
} else {
|
||||
this.$message.success('报废失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重置表单
|
||||
callOff(formName) {
|
||||
this.form = {}
|
||||
this.dialogeditVisible = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
@@ -507,8 +510,8 @@ export default {
|
||||
} else { this.$message.warning('请选择停产零件') }
|
||||
},
|
||||
editB() {
|
||||
if (this.judge === '2') {
|
||||
editA(this.CutCodeBefore, this.inputC, this.inputD).then(response => {
|
||||
if (this.spareNumber - this.SupplementationNumber > 0) {
|
||||
editA(this.CutCodeBefore, this.inputC).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('补投成功')
|
||||
this.fetchTableData()
|
||||
|
||||
@@ -13,12 +13,21 @@
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!--<span>采购员:</span>-->
|
||||
<el-input v-model="buyerName" placeholder="请双击选择" size="small" clearable @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<!--<span>供应商:</span>-->
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
style="width:250px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<!--<span>审批情况:</span>-->
|
||||
<el-select v-model="approvalValue" placeholder="审批情况" size="small" clearable>
|
||||
<el-select v-model="approvalValue" placeholder="审批情况" size="small" clearable style="margin-left: 10px">
|
||||
<el-option
|
||||
v-for="item in approval"
|
||||
:key="item.value"
|
||||
@@ -26,10 +35,17 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="success"
|
||||
type="primary"
|
||||
size="small"
|
||||
plain
|
||||
icon="el-icon-search"
|
||||
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
@click="searchTable1()">导出合同报表</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
@@ -41,7 +57,7 @@
|
||||
size="mini"
|
||||
border
|
||||
style="width: 100%"
|
||||
height="700px"
|
||||
height="500px"
|
||||
highlight-current-row
|
||||
@row-click="searchTable2">
|
||||
<el-table-column label="采购合同号" align="center">
|
||||
@@ -59,7 +75,7 @@
|
||||
{{ scope.row.规定到货时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center">
|
||||
<el-table-column label="供应商" align="center" width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
@@ -69,16 +85,21 @@
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" align="center">
|
||||
<el-table-column label="总金额(元)" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.含税总金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预付款" align="center">
|
||||
<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">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批情况内容 }}
|
||||
@@ -91,8 +112,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="warning" plain size="mini" @click="exportTable()">打印</el-button>
|
||||
<el-button type="danger" plain size="mini" @click="Disable(scope.row)">打回</el-button>
|
||||
<el-button type="text" plain size="mini" icon="el-icon-printer" @click="exportTable()">打印</el-button>
|
||||
<el-button type="text" plain size="mini" icon="el-icon-back" @click="Disable(scope.row)">打回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -387,6 +408,7 @@ export default {
|
||||
value: 3,
|
||||
label: '未审批'
|
||||
}],
|
||||
startTime: '',
|
||||
采购合同名称: '',
|
||||
规定到货时间: '',
|
||||
操作日期: '',
|
||||
@@ -463,19 +485,15 @@ export default {
|
||||
searchTable1() {
|
||||
this.textarea = ``
|
||||
this.loading1 = true
|
||||
if (this.startEndDate === '' || this.startEndDate === null || this.startEndDate[0] === '' || this.startEndDate[1] === '') {
|
||||
this.check1 = 0
|
||||
this.startEndDate = ''
|
||||
} else { this.check1 = 1 }
|
||||
this.startTime ? this.check1 = 1 : (this.check1 = 0, this.startTime = '')
|
||||
this.contractNumValue ? this.check2 = 1 : this.check2 = 0
|
||||
this.buyerName ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName ? this.check4 = 1 : this.check4 = 0
|
||||
if (this.approvalValue === '' || this.approvalValue === 0) {
|
||||
this.check5 = 0
|
||||
} else {
|
||||
this.check5 = 1
|
||||
}
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.buyerValue, this.check4, this.supplierName, this.check5, this.approvalValue).then(response => {
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startTime[0], this.startTime[1], this.check2, this.contractNumValue, this.check4, this.supplierName, this.check5, this.approvalValue).then(response => {
|
||||
this.loading1 = false
|
||||
console.log(response.data.rows)
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-card style="width: 47%">
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
|
||||
<el-select v-model="projectValue" placeholder="项目名称" size="small" style="width: 180px" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
@@ -10,45 +10,48 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="success"
|
||||
type="primary"
|
||||
size="small"
|
||||
plain
|
||||
icon="el-icon-search"
|
||||
style="margin-left:10px"
|
||||
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
@click="searchTable1()">查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
style="margin-left:10px"
|
||||
@click="searchTable1()">导出项目采购明细</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-card style="width: 47%">
|
||||
<el-table v-loading="" :data="tableData2" :summary-method="getSummaries1" show-summary border style="width: 100%;max-height: 700px;" height="700px">
|
||||
<el-table-column label="项目名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="100">
|
||||
<el-table-column label="零件名称" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="100">
|
||||
<el-table-column label="图号或型号" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料或规格" align="center" min-width="100">
|
||||
<el-table-column label="材料或规格" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 ? scope.row.材料 : scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="100">
|
||||
<el-table-column label="数量" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" min-width="100">
|
||||
<el-table-column label="单价(元)" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="小计(元)" align="center" min-width="100" prop="金额">
|
||||
<el-table-column label="小计(元)" align="center" width="100" prop="金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.金额 }}
|
||||
</template>
|
||||
@@ -111,39 +114,11 @@ export default {
|
||||
this.$message.error('请选择项目')
|
||||
}
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 4) {
|
||||
sums[index] = '合计'
|
||||
return
|
||||
} else if (index === 5) {
|
||||
const values = data.map(item => Number(item['金额']))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return Number(prev) + Number(curr)
|
||||
} else {
|
||||
return Number(prev)
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ' 元(未税)'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
} else if (index === 6) {
|
||||
sums[index] = parseInt(parseInt(sums[5]) * 1.16 * 100) / 100 + ' 元(含税)'
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
getSummaries1(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 4) {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计'
|
||||
return
|
||||
} else if (index === 5) {
|
||||
@@ -157,12 +132,10 @@ export default {
|
||||
return Number(prev)
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ' 元(未税)'
|
||||
sums[index] += ' 元(含税)'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
} else if (index === 6) {
|
||||
sums[index] = parseInt(parseInt(sums[5]) * 1.16 * 100) / 100 + ' 元(含税)'
|
||||
}
|
||||
})
|
||||
return sums
|
||||
|
||||
Reference in New Issue
Block a user