This commit is contained in:
liushuai
2020-03-09 09:28:04 +08:00
parent 6714e10d90
commit 28177e7cd4
23 changed files with 1145 additions and 983 deletions

View File

@@ -35,11 +35,11 @@
</el-card>
<el-card>
<el-col :span="8">
<el-input v-model="manufacturers" size="small" placeholder="外协厂家" style="width:160px" clearable @keyup.enter.native="pageSize=20;pageList=1;fetchData()" @clear="pageSize=20;pageList=1;fetchData()"/>
<el-button type="primary" size="mini" icon="el-icon-search" style="margin-left:10px" plain @click="pageSize=20;pageList=1;fetchData()">查询</el-button>
<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="primary" size="mini" 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="450" size="mini" border @row-click="searchProcess" >
<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">
{{ scope.row.表单号 }}
@@ -57,27 +57,16 @@
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
v-show="!loading2"
:current-page="currentPage"
:page-sizes="[20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-col>
<el-col :span="16">
<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-tooltip :open-delay="1200" effect="dark" content="成交" placement="top">
<el-button type="success" size="mini" icon="el-icon-success" style="margin-left:10px;margin-top: 3px;float: right" plain @click="Deal">提交</el-button>
<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>
<el-tooltip :open-delay="1200" effect="dark" content="核对价格信息后确定" placement="top">
<el-button type="success" size="mini" icon="el-icon-edit" style="margin-left:10px;margin-top: 3px;float: right" plain @click="confirmPrice">保存</el-button>
<el-button type="success" size="mini" icon="el-icon-tickets" style="margin-left:10px;margin-top: 3px;float: right" plain @click="confirmPrice">保存</el-button>
</el-tooltip>
</div>
<el-table v-loading="loading" :data="List3" :summary-method="getSummaries" height="488" size="mini" show-summary border>
@@ -103,7 +92,7 @@
</el-table-column>
<el-table-column label="外协价格" align="center" width="130px">
<template slot-scope="scope">
<el-input v-model="scope.row.加工价格_成交" size="small"/>
<el-input v-positive="'float'" v-model="scope.row.加工价格_成交" type="float" size="small"/>
</template>
</el-table-column>
<el-table-column label="机加工开始时间" align="center" width="150px">
@@ -284,29 +273,18 @@ export default {
])
},
created() {
this.fetchData()
this.getList()
},
methods: {
// 初始化查询
fetchData() {
this.ManufacturerName = []
initOutHelp().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.ManufacturerName.push({
label: response.data[i].外协厂家名称,
value: response.data[i].外协厂家流水号
})
}
})
this.loading2 = true
this.List = []
this.List3 = []
this.Number = ''
this.manufacturers ? this.num1 = 1 : this.num1 = 0
getTable(this.num1, this.manufacturers, this.isChecked, this.currentPage, this.pageSize).then(response => {
this.total = parseInt(response.data.total)
this.List = response.data.rows
getTable(this.num1, this.manufacturers, this.isChecked).then(response => {
this.List = response.data
})
this.loading2 = false
},
@@ -326,6 +304,15 @@ export default {
},
// 查询未选入零件
getList() {
this.ManufacturerName = []
initOutHelp().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.ManufacturerName.push({
label: response.data[i].外协厂家名称,
value: response.data[i].外协厂家流水号
})
}
})
this.partNumber ? this.check = 1 : this.check = 0
this.loading1 = true
this.List1 = []
@@ -349,7 +336,19 @@ export default {
this.Number = row.外协加工任务单流水号
this.ManufactorNumber = row.外协厂家流水号
getParts(row.外协加工任务单流水号).then(response => {
this.List3 = response.data
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.List3.push({
外协加工任务单明细流水号: response.data[i].外协加工任务单明细流水号,
加工价格_成交: response.data[i].加工价格_成交.toFixed(2),
机加工开始时间: response.data[i].机加工开始时间,
零件图号: response.data[i].零件图号,
零件名称: response.data[i].零件名称,
批次数量: response.data[i].批次数量,
外协工序: response.data[i].外协工序
})
}
}
this.loading = false
})
},
@@ -429,9 +428,11 @@ export default {
message: '信息添加成功',
type: 'success'
})
this.dialogFormVisible = false
this.title = ''
this.manufacturers = this.form.表单号
console.log(this.manufacturers, 111111)
this.fetchData()
this.dialogFormVisible = false
} else {
this.$message.error('信息添加失败')
}
@@ -451,7 +452,7 @@ export default {
},
// 删除任务单
handleDelete(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
this.$confirm('该表单外协任务将释放', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -499,6 +500,7 @@ export default {
this.List3 = []
getParts(this.Number).then(response => {
this.List3 = response.data
this.getList()
this.loading = false
})
})
@@ -574,7 +576,7 @@ export default {
},
// 移除
handleDelete1(row) {
this.$confirm('此操作将移除该行, 是否继续?', '提示', {
this.$confirm('确定取消该条外协任务吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'