rev:增加规格统计分页,修改排产顺序,设备最后规格记录;
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="querySpecVisible"
|
||||
class="edit-form"
|
||||
width="75%"
|
||||
>
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
<el-card class="box-card" shadow="never">
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item label="规格:">
|
||||
<el-select
|
||||
v-model="query.material_id"
|
||||
class="filter-item"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="选择规格"
|
||||
size="small"
|
||||
style="width: 220px"
|
||||
@change="materialSelectSpec(query.material_id)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in selectSpecOptions"
|
||||
:key="item.material_id"
|
||||
:label="item.material_spec"
|
||||
:value="item.material_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<div class="table-container" style="width: 100%">
|
||||
<el-table :data="crud.data">
|
||||
<el-table-column label="工序" prop="workprocedure_name"></el-table-column>
|
||||
<el-table-column label="规格" prop="material_spec"></el-table-column>
|
||||
<el-table-column label="计划开机数" prop="device_count"></el-table-column>
|
||||
<el-table-column label="开始生产时间" prop="start_time"></el-table-column>
|
||||
<el-table-column label="订单交期" prop="plandeliver_date"></el-table-column>
|
||||
<el-table-column label="工单号" prop="workorder_no"></el-table-column>
|
||||
<el-table-column label="工单数" prop="workorder_count"></el-table-column>
|
||||
<el-table-column label="生产总数" prop="plan_qty"></el-table-column>
|
||||
</el-table>
|
||||
<pagination/>
|
||||
</div>
|
||||
<div style="margin-bottom: 40px;"></div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudProduceshiftorder from '@/views/wms/product_manage/workorder/produceshiftorder'
|
||||
|
||||
export default {
|
||||
name: 'SpecStatisticDialog',
|
||||
components: { rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '规格统计',
|
||||
url: 'api/produceWorkorder/queryStatisticsSpec',
|
||||
sort: 'start_time',
|
||||
crudMethod: { ...crudProduceshiftorder },
|
||||
optShow: {}
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
data() {
|
||||
return {
|
||||
selectSpecOptions: [],
|
||||
material_spec: null,
|
||||
querySpecVisible: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getSpecOptions()
|
||||
},
|
||||
methods: {
|
||||
async materialSelectSpec(material_id) {
|
||||
try {
|
||||
debugger
|
||||
console.log(material_id)
|
||||
this.crud.toQuery()
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
getSpecOptions() {
|
||||
debugger
|
||||
// 查询规格统计下拉框
|
||||
crudProduceshiftorder.specOptionsSelect().then(res => {
|
||||
this.selectSpecOptions = res.content
|
||||
})
|
||||
},
|
||||
async openQuerySpec() {
|
||||
try {
|
||||
this.crud.toQuery()
|
||||
this.querySpecVisible = true
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" rel="stylesheet/scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -139,14 +139,13 @@
|
||||
</el-dialog>
|
||||
<!-- 规格弹窗 -->
|
||||
<el-dialog
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
:before-close="handleClose"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="editSpecVisible"
|
||||
width="96%"
|
||||
>
|
||||
<div style="display: flex; height:800px;flex-direction: column;">
|
||||
|
||||
|
||||
<div style="display: flex; align-items: center;">
|
||||
<label style="margin-right: 10px;">规格:</label>
|
||||
<el-select
|
||||
@@ -299,6 +298,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fullscreenLoading: false,
|
||||
tabs: [
|
||||
{ label: '激光下料' },
|
||||
{ label: '旋压下料' },
|
||||
@@ -405,6 +405,7 @@ export default {
|
||||
},
|
||||
//规格提交
|
||||
submitTransfer() {
|
||||
this.fullscreenLoading = true
|
||||
const transferList = this.$refs.transfer.rightTableData
|
||||
const params = {
|
||||
'transferList': transferList,
|
||||
@@ -412,22 +413,23 @@ export default {
|
||||
tabIndex: this.tabIndex
|
||||
}
|
||||
crudProduceshiftorder.submitAdjustWorkOrder(params).then(res => {
|
||||
this.queryDeviceLists(this.tabIndex)
|
||||
//this.editSpecVisible = false
|
||||
this.fullscreenLoading = false
|
||||
this.$parent.success()
|
||||
this.openMaterialSpec(this.device_code_select, this.selectedValue, this.sort)
|
||||
this.queryDeviceLists(this.tabIndex)
|
||||
this.editSpecVisible = false
|
||||
//this.openMaterialSpec(this.device_code_select, this.selectedValue, this.sort)
|
||||
})
|
||||
},
|
||||
//点击规格
|
||||
async openMaterialSpec(deviceCode, selectedValue, sort) {
|
||||
try {
|
||||
debugger
|
||||
if (selectedValue !== '') {
|
||||
this.selectedValue = selectedValue
|
||||
}
|
||||
if (sort !== '') {
|
||||
this.sort = sort
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
const queryParam = { tabIndex: this.tabIndex }
|
||||
const res = await crudProduceshiftorder.queryAdjustWorkOrder(queryParam)
|
||||
const content = res.content
|
||||
@@ -437,13 +439,12 @@ export default {
|
||||
}
|
||||
return acc
|
||||
}, [])
|
||||
debugger
|
||||
if (selectedValue !== '' || this.sort !== '') {
|
||||
if (this.selectedValue !== '') {
|
||||
debugger
|
||||
this.editSpecVisible = true
|
||||
this.tableData1 = content.filter(item => item.material_spec === this.selectedValue).sort((a, b) => a[this.sort] - b[this.sort])
|
||||
this.$nextTick(() => {
|
||||
this.fullscreenLoading = false
|
||||
this.$refs.transfer.leftTableData = content.filter(item => item.material_spec === this.selectedValue).sort((a, b) => a[this.sort] - b[this.sort])
|
||||
this.$refs.transfer.$emit('initData', content.filter(item => item.NO !== 999 && item.device_code === this.device_code_select).sort((a, b) => a[this.sort] - b[this.sort]))
|
||||
})
|
||||
@@ -455,6 +456,7 @@ export default {
|
||||
this.editSpecVisible = true
|
||||
this.tableData1 = content.sort((a, b) => a[this.sort] - b[this.sort])
|
||||
this.$nextTick(() => {
|
||||
this.fullscreenLoading = false
|
||||
this.$refs.transfer.leftTableData = content.sort((a, b) => a[this.sort] - b[this.sort])
|
||||
this.$refs.transfer.$emit('initData', content.filter(item => item.NO !== 999 && item.device_code === this.device_code_select).sort((a, b) => a[this.sort] - b[this.sort]))
|
||||
})
|
||||
@@ -464,7 +466,7 @@ export default {
|
||||
this.$refs.transfer.pageSize = 20
|
||||
this.$refs.transfer.totalSize = this.tableData1.length
|
||||
} catch (err) {
|
||||
debugger
|
||||
this.fullscreenLoading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
@@ -568,26 +570,26 @@ export default {
|
||||
|
||||
//点击规格统计
|
||||
specStatistic() {
|
||||
this.queryMaterialSpec()
|
||||
// this.queryMaterialSpec()
|
||||
this.querySpecVisible = true
|
||||
},
|
||||
//点击规格统计
|
||||
async queryMaterialSpec() {
|
||||
try {
|
||||
const queryParam = { orderBy: 'start_time' }
|
||||
const res = await crudProduceshiftorder.queryStatisticsSpec(queryParam)
|
||||
const content = res.content
|
||||
this.materialSpecData = content
|
||||
this.selectSpecOptions = content.reduce((acc, currentItem) => {
|
||||
if (!acc.some(item => item.material_spec === currentItem.material_spec)) {
|
||||
acc.push(currentItem)
|
||||
}
|
||||
return acc
|
||||
}, [])
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// async queryMaterialSpec() {
|
||||
// try {
|
||||
// const queryParam = { orderBy: 'start_time' }
|
||||
// const res = await crudProduceshiftorder.queryStatisticsSpec(queryParam)
|
||||
// const content = res.content
|
||||
// this.materialSpecData = content
|
||||
// this.selectSpecOptions = content.reduce((acc, currentItem) => {
|
||||
// if (!acc.some(item => item.material_spec === currentItem.material_spec)) {
|
||||
// acc.push(currentItem)
|
||||
// }
|
||||
// return acc
|
||||
// }, [])
|
||||
// } catch (err) {
|
||||
// console.log(err)
|
||||
// }
|
||||
// },
|
||||
//点击人员
|
||||
async openPersonButton(deviceCode) {
|
||||
this.device_code_select = deviceCode
|
||||
|
||||
@@ -172,11 +172,11 @@
|
||||
<template slot-scope="{ row }">
|
||||
<span
|
||||
:style="{
|
||||
color: row.aps_workorder_no === '999' || row.aps_workorder_no == '0' ? '' : 'orange',
|
||||
fontWeight: row.aps_workorder_no === '999' || row.aps_workorder_no == '0' ? 'normal' : 'bold'
|
||||
color: row.aps_workorder_no === 999 || row.aps_workorder_no == 0 ? '' : 'orange',
|
||||
fontWeight: row.aps_workorder_no === 999 || row.aps_workorder_no == 0 ? 'normal' : 'bold'
|
||||
}"
|
||||
>
|
||||
{{ row.aps_workorder_no === '999' || row.aps_workorder_no == '0' ? '未调整' : row.aps_workorder_no }}
|
||||
{{ row.aps_workorder_no === 999 || row.aps_workorder_no == 0 ? '未调整' : row.aps_workorder_no }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -276,51 +276,9 @@
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
|
||||
<!-- 规格统计 -->
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="querySpecVisible"
|
||||
class="edit-form"
|
||||
width="75%"
|
||||
>
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
<el-select
|
||||
v-model="material_spec"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="选择规格"
|
||||
remote
|
||||
style="width: 140px; margin-bottom: 10px;margin-top: 10px;"
|
||||
@change="materialSelectSpec"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in selectSpecOptions"
|
||||
:key="item.material_spec"
|
||||
:label="item.material_spec"
|
||||
:value="item.material_spec"
|
||||
/>
|
||||
</el-select>
|
||||
<div class="table-container" style="width: 100%">
|
||||
<el-table :data="materialSpecData">
|
||||
<el-table-column label="工序" prop="workprocedure_name"></el-table-column>
|
||||
<el-table-column label="规格" prop="material_spec"></el-table-column>
|
||||
<el-table-column label="计划开机数" prop="device_count"></el-table-column>
|
||||
<el-table-column label="开始生产时间" prop="start_time"></el-table-column>
|
||||
<el-table-column label="订单交期" prop="plandeliver_date"></el-table-column>
|
||||
<el-table-column label="工单号" prop="workorder_no"></el-table-column>
|
||||
<el-table-column label="工单数" prop="workorder_count"></el-table-column>
|
||||
<el-table-column label="生产总数" prop="plan_qty"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin-bottom: 40px;"></div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<SpecStatisticDialog ref="SpecStatisticDialog" :dialog-show.sync="querySpecVisible" @closeDialog="resetQuery"/>
|
||||
<!-- 排产调整弹窗 -->
|
||||
<adjustDialog ref="adjustDialog"/>
|
||||
|
||||
</div>
|
||||
<MaterDtl
|
||||
:dialog-show.sync="materialShow"
|
||||
@@ -364,6 +322,7 @@ import UploadDialog from '@/views/wms/product_manage/workorder/UploadDialog'
|
||||
import ReplaceDeviceDialog from '@/views/wms/product_manage/workorder/ReplaceDeviceDialog'
|
||||
import adjustDialog from '@/views/wms/product_manage/workorder/adjustDialog'
|
||||
import SaleOrder from '@/views/wms/pcs/saleorder/index.vue'
|
||||
import SpecStatisticDialog from '@/views/wms/product_manage/workorder/SpecStatisticDialog.vue'
|
||||
|
||||
const defaultForm = {
|
||||
workorder_id: null,
|
||||
@@ -406,6 +365,7 @@ const defaultForm = {
|
||||
export default {
|
||||
name: 'AdjustShiftorder',
|
||||
components: {
|
||||
SpecStatisticDialog,
|
||||
SaleOrder,
|
||||
AddDialog,
|
||||
pagination,
|
||||
@@ -523,11 +483,10 @@ export default {
|
||||
},
|
||||
//点击规格统计
|
||||
specStatistic() {
|
||||
this.queryMaterialSpec()
|
||||
this.querySpecVisible = true
|
||||
this.$refs.SpecStatisticDialog.openQuerySpec()
|
||||
},
|
||||
//点击规格统计
|
||||
async queryMaterialSpec() {
|
||||
async queryMaterialSpec1() {
|
||||
try {
|
||||
const queryParam = { orderBy: 'start_time' }
|
||||
const res = await crudProduceshiftorder.queryStatisticsSpec(queryParam)
|
||||
@@ -543,16 +502,6 @@ export default {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
//规格统计下拉框
|
||||
async materialSelectSpec(selectedValue) {
|
||||
const queryParam = { material: selectedValue, orderBy: 'start_time' }
|
||||
try {
|
||||
const res = await crudProduceshiftorder.queryStatisticsSpec(queryParam)
|
||||
this.materialSpecData = res.content
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
databaseUploadApi() {
|
||||
},
|
||||
changeEvent1(device) {
|
||||
@@ -783,6 +732,9 @@ export default {
|
||||
return true
|
||||
}
|
||||
},
|
||||
resetQuery() {
|
||||
this.crud.resetQuery()
|
||||
},
|
||||
// 新增编辑给form表单物料相关信息赋值
|
||||
setMaterValue(row) {
|
||||
debugger
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -217,11 +217,20 @@ export function getWorkOrderplanQty(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function specOptionsSelect(data) {
|
||||
return request({
|
||||
url: '/api/produceWorkorder/specOptionsSelect',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
addRows,
|
||||
edit,
|
||||
del,
|
||||
specOptionsSelect,
|
||||
submits,
|
||||
report,
|
||||
reportApprove,
|
||||
|
||||
Reference in New Issue
Block a user