This commit is contained in:
Vergil
2020-02-10 18:00:02 +08:00
12 changed files with 341 additions and 487 deletions

View File

@@ -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
}
})
}

View File

@@ -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
}
})

View File

@@ -41,13 +41,19 @@
}
//单击表格行变色
.el-table__body tr.current-row>td{
background-color: rgb(216,229,245) !important;
background-color: #d8e5f6 !important;
/* color: #f19944; */ /* 设置文字颜色,可以选择不设置 */
}
//聚焦表格行变色
.hover-row td{
background: RGB(236 245 255)!important;
//background: RGB(236 245 255)!important;
background: red!important;
}
.el-table--enable-row-hover .el-table__body tr:hover>td{
background-color: #d8e5f6 !important;
}
//.el-table tbody tr:hover>td { background-color: RED }
//表格行颜色9745
//.el-table td, .is-leaf{
// background-color: rgb(255, 255, 255);

View File

@@ -140,6 +140,13 @@ el-card{
.el-table{
margin: 3px 0px;
}
.el-table td.gutter,.el-table th.gutter{
width: 15px;
border-right-width: 0;
border-bottom-width: 0;
padding: 0;
background: white;
}s
.block{
margin-bottom: 3px;
}
@@ -198,10 +205,16 @@ el-card{
}
}
//登录页login输入框上串所以屏蔽
//.el-input__inner:focus {
// border: 1px solid #1b55a0!important;
// height: 29px;
//}
.el-input__inner:focus {
border: 1px solid #2A71CB!important;
//height: 29px;
}
.el-input__inner{
border: 1px solid red
}
.el-textarea__inner, .el-radio__inner, .el-input__inner{
border: 1px solid #676767 !important
}
//.el-input--small .el-input__inner {
// height: 29px;
//}

View File

@@ -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">

View File

@@ -21,203 +21,89 @@
<!--: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-card style="margin-top: 15px;width: 960px">
<el-table
v-loading="listLoading2"
:data="tableData2"
style="width: 100%;max-height: 400px;"
v-loading="listLoading"
:data="tableData"
style="width: 100%"
stripe
size="mini"
size="small"
height="660"
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="机床图号">
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="停产零件种类">
<el-table-column align="center" label="组号" width="80px">
<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="140px">
<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="120px">
<template slot-scope="scope">
{{ scope.row.已加工工时 }}
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="报废数量" width="70px">
<template slot-scope="scope">
{{ scope.row.报废数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="报废时间" width="100px">
<template slot-scope="scope">
{{ scope.row.报废时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="报废原因" width="180px">
<template slot-scope="scope">
{{ scope.row.报废原因 }}
</template>
</el-table-column>
<el-table-column align="center" label="报废工时" width="90px">
<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>-->
<div class="block" style="margin-top: 10px">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</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-table
v-loading="listLoading"
:data="tableData"
style="width: 100%"
stripe
size="mini"
height="460"
highlight-current-row
border
@row-click="searchProcedure">
<el-table-column align="center" label="组号" width="50px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件图号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件名称" min-width="70px">
<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="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@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

View File

@@ -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()

View File

@@ -1,11 +1,11 @@
<template>
<div class="app-container">
<el-card>
<el-card style="">
<div v-if="Number(token)===2" style="width:100%">
<el-divider content-position="right">
<el-button type="text" @click="searchUnallocatePartNumber">刷新</el-button> | 待分配零件数
</el-divider>
<el-row>
<el-row >
<el-col v-for="(machine,index) in machines" :key="index" style="width: 200px">
<el-card shadow="hover" class="sudoku_item" style="height:80px;width: 90%" @click.native="clickCard(machine.项目流水号, machine.机床流水号)">
<el-badge :value="machine.未分配零件数">
@@ -66,6 +66,7 @@
placeholder="物料类别"
size="small"
clearable
style="width: 120px"
@change="searchMaterialVariety">
<el-option
v-for="item in MaterialCategory"
@@ -77,6 +78,7 @@
v-model="MaterialVarietyValue"
placeholder="物料品种"
size="small"
style="width: 120px"
clearable>
<el-option
v-for="item in MaterialVariety"
@@ -87,39 +89,47 @@
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px;" @click="pageCurrent0=1;pageSize0=50;total0=0;searchTable0()">查询</el-button>
<el-radio v-model="radio" label="1" style="margin-left: 10px" @change="pageCurrent0=1;pageSize0=50;total0=0;searchTable0()">未分配</el-radio>
<el-radio v-model="radio" label="2" style="margin-left: 10px" @change="pageCurrent0=1;pageSize0=50;total0=0;searchTable0()">已分配</el-radio>
<div style="float:right;">
<span style="margin-left: 0">采购员:</span>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-tooltip :open-delay="1000" effect="dark" content="选择采购员后,将物料分配给所选的采购员" placement="top">
<el-button
type="warning"
size="small"
icon="el-icon-menu"
plain
style="margin-left: 10px"
@click="allocateTask1">分配</el-button>
</el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="退回勾选的未分配的物料至车间" placement="top">
<el-button
type="danger"
size="small"
icon="el-icon-back"
plain
style="margin-left: 10px"
@click="executeReturn1">退回</el-button>
</el-tooltip>
</div>
<!--<div style="float:right;">-->
<!--<span style="margin-left: 0">采购员:</span>-->
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px;margin-left: 140px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-tooltip :open-delay="1000" effect="dark" content="选择采购员后,将物料分配给所选的采购员" placement="top">
<el-button
type="primary"
size="small"
icon="el-icon-menu"
style="margin-left: 10px"
@click="allocateTask1">分配</el-button>
</el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="退回勾选的未分配的物料至车间" placement="top">
<el-button
type="danger"
size="small"
icon="el-icon-back"
style="margin-left: 10px"
@click="executeReturn1">打回</el-button>
</el-tooltip>
<!--</div>-->
</el-row>
<el-row style="margin-bottom: 10px">
<el-table v-loading="loading" :data="tableData0" size="mini" height="800px" border stripe @selection-change="handleSelectionChange1">
<el-table
v-loading="loading"
:data="tableData0"
:header-cell-style="{fontFamily:'MicrosoftYaHeiUI',fontSize:'14px',fontWeight:200}"
size="mini"
height="800px"
style="width: 1285px"
border
stripe
highlight-current-row
@selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable" align="center" type="selection"/>
<el-table-column align="center" label="采购情况" prop="询价状态编号" min-width="100px">
<el-table-column align="center" label="采购状态" prop="询价状态编号" min-width="100px" width="80px">
<template slot-scope="scope">
<span v-if="scope.row.人员编号===''" type="primary" size="small">未分配</span>
<span v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</span>
@@ -127,57 +137,57 @@
<span v-if="parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</span>
</template>
</el-table-column>
<el-table-column align="center" prop="物料名称" label="名称" min-width="180px">
<el-table-column align="center" prop="物料名称" label="名称" min-width="180px" width="160px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" prop="物料规格" label="规格" min-width="300">
<el-table-column align="center" prop="物料规格" label="规格" min-width="300" width="150px">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" prop="物料型号" label="图号或型号" min-width="150px">
<el-table-column align="center" prop="物料型号" label="图号或型号" min-width="150px" width="150px">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="数量" min-width="80px">
<el-table-column align="center" label="数量" min-width="80px" width="80px">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" prop="项目名称" min-width="100px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" prop="机床图号" label="机床图号" min-width="100px">
<!--<el-table-column align="center" label="项目名称" prop="项目名称" min-width="100px" width="140px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.项目名称 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column align="center" prop="机床图号" label="机床图号" min-width="100px" width="120px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" min-width="80px">
<el-table-column align="center" label="组号" min-width="80px" width="70px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" prop="物料类别" label="物料类别" min-width="100px">
<el-table-column align="center" prop="物料类别" label="物料类别" min-width="100px" width="80px">
<template slot-scope="scope">
{{ scope.row.物料类别 }}
</template>
</el-table-column>
<el-table-column align="center" prop="物料品种" label="物料品种" min-width="100px">
<el-table-column align="center" prop="物料品种" label="物料品种" min-width="100px" 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="备注" min-width="100px" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column align="center" prop="供货商" label="供货商" min-width="100px">
<el-table-column align="center" prop="供货商" label="供货商" min-width="100px" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
@@ -267,6 +277,7 @@
placeholder="物料类别"
size="small"
clearable
style="width: 120px"
@change="searchMaterialVariety">
<el-option
v-for="item in MaterialCategory"
@@ -278,6 +289,7 @@
v-model="MaterialVarietyValue"
placeholder="物料品种"
size="small"
style="width: 120px"
clearable>
<el-option
v-for="item in MaterialVariety"
@@ -288,81 +300,73 @@
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px;" @click="pageCurrent1=1;pageSize1=50;total1=0;searchTable1()">查询</el-button>
<el-radio v-model="radio" label="1" style="margin-left: 10px" @change="pageCurrent1=1;pageSize1=50;total1=0;searchTable1()">未分配</el-radio>
<el-radio v-model="radio" label="2" style="margin-left: 10px" @change="pageCurrent1=1;pageSize1=50;total1=0;searchTable1()">已分配</el-radio>
<div style="float:right;">
<span style="margin-left: 0">采购员:</span>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="primary" size="small" icon="el-icon-menu" style="margin-left: 10px" @click="allocateTask1">分配</el-button>
<el-button type="danger" size="small" icon="el-icon-back" style="margin-left: 10px" @click="executeReturn1">退回</el-button>
</div>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px;margin-left: 120px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="primary" size="small" icon="el-icon-menu" style="margin-left: 10px" @click="allocateTask1">分配</el-button>
<el-button type="danger" size="small" icon="el-icon-back" style="margin-left: 10px" @click="executeReturn1">打回</el-button>
</el-row>
<el-row style="margin-bottom: 10px">
<el-table v-loading="loading" :data="tableData1" size="mini" height="800px" border stripe @selection-change="handleSelectionChange1">
<el-table v-loading="loading" :data="tableData1" size="mini" height="800px" style="width: 1255px" border stripe @selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable" align="center" type="selection"/>
<el-table-column align="center" prop="询价状态编号" label="采购情况" min-width="100px">
<el-table-column align="center" prop="询价状态编号" label="采购状态" min-width="100px" width="80px">
<template slot-scope="scope">
<el-tag v-if="scope.row.人员编号===''" type="primary" size="small">未分配</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
<el-tag v-if="parseInt(scope.row.采购状态编号)===3" type="info" 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" type="info" size="small">已采购</span>
</template>
</el-table-column>
<el-table-column align="center" prop="物料名称" label="名称" min-width="180px">
<el-table-column align="center" prop="物料名称" label="名称" min-width="180px" width="160" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" prop="物料规格" label="规格" min-width="300">
<el-table-column align="center" prop="物料规格" label="规格" min-width="300" width="150px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" prop="物料型号" label="图号或型号" min-width="150px">
<el-table-column align="center" prop="物料型号" label="图号或型号" min-width="150px" width="150px">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="数量" min-width="80px">
<el-table-column align="center" label="数量" min-width="80px" width="80px">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column align="center" prop="项目名称" label="项目名称" min-width="100px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" prop="机床图号" label="机床图号" min-width="100px">
<el-table-column align="center" prop="机床图号" label="机床图号" min-width="100px" width="100px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" min-width="80px">
<el-table-column align="center" label="组号" min-width="80px" width="70px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" prop="物料类别" label="物料类别" min-width="100px">
<el-table-column align="center" prop="物料类别" label="物料类别" min-width="100px" width="80px">
<template slot-scope="scope">
{{ scope.row.物料类别 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料品种" prop="物料品种" min-width="100px">
<el-table-column align="center" label="物料品种" prop="物料品种" min-width="100px" width="100px">
<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="备注" min-width="100px" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column align="center" prop="供货商" label="供货商" min-width="100px">
<el-table-column align="center" prop="供货商" label="供货商" min-width="100px" width="100px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
@@ -447,23 +451,20 @@
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px;" @click="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()">查询</el-button>
<el-radio v-model="radio" label="1" style="margin-left: 10px" @change="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()">未分配</el-radio>
<el-radio v-model="radio" label="2" style="margin-left: 10px" @change="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()">已分配</el-radio>
<div style="float:right">
<span style="margin-left: 0">采购员:</span>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<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>
</div>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<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>
</el-row>
<el-row style="margin-bottom: 10px">
<el-table v-loading="loading" :data="tableData2" size="mini" height="800px" border stripe @selection-change="handleSelectionChange2">
<el-table v-loading="loading" :data="tableData2" size="mini" height="800px" style="width: 1520px" border stripe @selection-change="handleSelectionChange2">
<el-table-column :selectable="selectable" align="center" type="selection"/>
<el-table-column align="center" prop="询价状态编号" label="采购情况" min-width="80px">
<el-table-column align="center" prop="询价状态编号" label="采购状态" min-width="80px" width="80px">
<template slot-scope="scope">
<el-tag v-if="scope.row.人员编号===''" type="primary" size="small">未分配</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</el-tag>
@@ -471,17 +472,17 @@
<el-tag v-if="parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column align="center" prop="零件图号" label="图号" min-width="120px">
<el-table-column align="center" prop="零件图号" label="图号" min-width="120px" width="180px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" prop="零件名称" label="名称" width="180px">
<el-table-column align="center" prop="零件名称" label="名称" width="140px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" prop="规格" label="规格" width="250px">
<el-table-column align="center" prop="规格" label="规格" width="150px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.规格 }}
</template>
@@ -496,27 +497,27 @@
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column align="center" prop="项目名称" label="项目名称" min-width="100px">
<el-table-column align="center" prop="项目名称" label="项目名称" min-width="100px" width="140px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" prop="机床图号" label="机床图号" min-width="100px">
<el-table-column align="center" prop="机床图号" label="机床图号" min-width="100px" width="120px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" prop="组号" label="组号" min-width="80px">
<el-table-column align="center" prop="组号" label="组号" min-width="80px" width="70px">
<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="备注" min-width="100px" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column align="center" prop="供货商" label="供货商" min-width="100px">
<el-table-column align="center" prop="供货商" label="供货商" min-width="100px" width="190" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
@@ -1147,4 +1148,20 @@ export default {
line-height: 46px;
}
}
/*.el-table td.gutter,.el-table th.gutter{*/
/*width: 15px;*/
/*border-right-width: 0;*/
/*border-bottom-width: 0;*/
/*padding: 0;*/
/*background: red;*/
/*}*/
</style>
<style>
/*.el-table td.gutter,.el-table th.gutter{*/
/*width: 15px;*/
/*border-right-width: 0;*/
/*border-bottom-width: 0;*/
/*padding: 0;*/
/*background: white;*/
/*}*/
</style>

View File

@@ -945,10 +945,10 @@ export default {
})
},
searchTable5(row) {
console.log(row)
this.excle_row = row
console.log(this.userId, this.id)
this.disable = row.是否关联
console.log(this.disable)
this.tableData6 = []
this.到货单流水号 = row.到货单流水号
this.ArrivalOrderNumber = row.到货单流水号

View File

@@ -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"
@@ -31,6 +40,12 @@
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>
@@ -43,7 +58,7 @@
border
stripe
style="width: 100%"
height="700px"
height="500px"
highlight-current-row
@row-click="searchTable2">
<el-table-column label="采购合同号" align="center">
@@ -61,7 +76,7 @@
{{ scope.row.规定到货时间 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" show-overflow-tooltip>
<el-table-column label="供应商" align="center" width="200px">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
@@ -71,16 +86,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.审批情况内容 }}
@@ -93,12 +113,8 @@
</el-table-column>
<el-table-column label="操作" align="center" min-width="100px">
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-printer" @click="exportTable()">打印</el-button>
<el-tooltip :open-delay="1000" effect="dark" content="打回" placement="top">
<div style="display: inline-block">
<el-button type="text" size="mini" style="margin-left: 10px" icon="el-icon-delete" @click="Disable(scope.row)"/>
</div>
</el-tooltip>
<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>
@@ -393,6 +409,7 @@ export default {
value: 3,
label: '未审批'
}],
startTime: '',
采购合同名称: '',
规定到货时间: '',
操作日期: '',
@@ -469,19 +486,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++) {

View File

@@ -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"
@@ -15,41 +15,43 @@
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-table v-loading="" :data="tableData2" :summary-method="getSummaries1" show-summary border stripe 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-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" 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>
@@ -112,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) {
@@ -158,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

View File

@@ -235,7 +235,7 @@ export default {
}
input {
background: transparent;
border: 0;
border: 1px;
-webkit-appearance: none;
border-radius: 0;
padding: 12px 5px 12px 15px;