This commit is contained in:
liushuai
2019-05-20 12:02:49 +08:00
17 changed files with 2527 additions and 52 deletions

View File

@@ -32,15 +32,13 @@
</el-col>
<el-col style="width: 290px">
<span>工艺员</span>
<el-select v-model="personValue" placeholder="工艺员" size="small" clearable>
<el-select v-model="personValue" placeholder="工艺员" size="small" clearable style="width: 100px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-col>
<el-col style="width: 290px">
<el-button type="success" size="small" style="margin-left: 10px" icon="el-icon-search" @click="pageCurrent=1;pageSize=10;total=0;searchData()">查询</el-button>
</el-col>
</el-row>
@@ -81,6 +79,9 @@
</div>
</el-card>
<el-card v-if="tableData2.length">
<div slot="header">
<el-button v-show="true" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">在制零件工艺调整</el-button>
</div>
<table class="tg">
<tr>
<td class="tg-x61c" colspan="4" rowspan="2">江苏高精</td>
@@ -151,7 +152,8 @@
</template>
<script>
import { initMachineProject, searchgroup, initPerson, search, searchtable1 } from '@/api/ManufacturingCenter/PartWorkCraftSelect_rdlc'
import { initMachineProject, searchgroup, initPerson, search, searchtable1,
returnEdit } from '@/api/ManufacturingCenter/PartWorkCraftSelect_rdlc'
export default {
data() {
@@ -187,6 +189,33 @@ export default {
this.searchData()
},
methods: {
returnEdit() { // 在制零件工艺修改
if (this.partNumValue === '' || this.partNumValue === null) {
this.$message.error('请选择零件')
} else {
this.$confirm(`此操作会将 ${this.零件图号} 打回至未编制状态, 是否继续?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
returnEdit(this.partNumValue).then(response => {
if (response.data[0].result === '1') {
this.$message.success('打回成功')
this.partNumValue = ''
this.tableData = []
this.tableData2 = []
} else {
this.$message.error('打回失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
}
},
fetchData() {
initMachineProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
@@ -227,12 +256,13 @@ export default {
this.personValue ? check4 = 1 : check4 = 0
search(this.pageCurrent, this.pageSize, check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.PrNum, check4, this.personValue).then(response => {
this.tableData = response.data.rows
console.log(response)
this.total = response.data.total
this.loading = false
})
},
click(row) {
this.partNumValue = row.工艺计划流水号
this.零件图号 = row.零件图号
searchtable1(row.工艺计划流水号).then(response => {
this.tableData2 = response.data
})

File diff suppressed because it is too large Load Diff

View File

@@ -48,6 +48,7 @@
type="date"
placeholder="选择日期"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=10;total = 0">查询</el-button>
<el-button type="warning" class="el-icon-download" size="small" style="margin: 10px 0 0 10px" @click="exportExcel">导出</el-button>
</el-row>
</el-card>
@@ -309,7 +310,7 @@
</div>
</template>
<script>
import { getNames, getMachines, getGroups, getTable, getTable2 } from '@/api/ManufacturingCenter/ProcessingStatus'
import { getNames, getMachines, getGroups, getTable, getTable2, getExport } from '@/api/ManufacturingCenter/ProcessingStatus'
export default {
data() {
@@ -384,6 +385,33 @@ export default {
this.getTableData()
},
methods: {
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => {
return v[j]
}))
},
exportExcel() {
if (!this.Group) {
this.$message.warning('请选择分组')
return
}
getExport(this.Group).then(res => {
console.log(res.data)
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['图号及规格', '制品名称', '计划数', '材料', '当前工序名']
const filterVal = ['零件图号_零件工艺计划', '零件名称', '批次数量', '材料', '工艺名称']
const list = res.data
const data = this.formatJson(filterVal, list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '加工进度表',
autoWidth: true,
bookType: 'xlsx'
})
})
})
},
// 查询供应商名称
fetchData() {
this.projects = []

View File

@@ -431,7 +431,7 @@
@current-change="handleCurrentChange1"/>
<div style="float:right">
<el-button type="primary" size="small" style="margin:5px 10px 10px 10px" @click="Discharge">虚拟排产</el-button>
<el-button :disabled="listLoading1" type="primary" size="small" style="margin:5px 10px 10px 10px" @click="Plan" >确定零件计划</el-button>
<el-button v-if="可以确定零件计划" type="primary" size="small" style="margin:5px 10px 10px 10px" @click="Plan" >确定零件计划</el-button>
<el-button type="danger" size="small" icon="el-icon-upload2" style="float:right;margin:5px 50px 10px 10px" @click="allOut">全部选出</el-button>
</div>
</div>
@@ -620,6 +620,7 @@ export default {
directives: { elDragDialog },
data() {
return {
可以确定零件计划: false,
bianliang1: [],
count: 0,
是否扫描: false,
@@ -1226,6 +1227,12 @@ export default {
this.计划日期.push(response.data[i].计划日期)
}
})
this.可以确定零件计划 = true
for (let i = 0; i < this.planDate.length; i++) {
for (let j = 0; j < this.planDate[i].length; j++) {
this.可以确定零件计划 = this.可以确定零件计划 && !!this.planDate[i][j]
}
}
})
}
} else {
@@ -1435,6 +1442,7 @@ export default {
this.bianliang1.push(this.tableData1[i].工艺计划流水号)
}
discharge(this.bianliang1).then(response => {
console.log(response.data)
this.Selection1()
})
},