修改
This commit is contained in:
@@ -47,18 +47,11 @@ export function submit2(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getDevices() {
|
||||
export function query2(params) {
|
||||
return request({
|
||||
url: 'api/dailyplan/getDevices',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getCapacitytes(params) {
|
||||
return request({
|
||||
url: 'api/dailyplan/getCapacitytes',
|
||||
url: 'api/dailyplan/query2',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export default { add, edit, del, importExcel, getCapacitytes, submit, getDevices, submit2 }
|
||||
export default { add, edit, del, importExcel, query2, submit, submit2 }
|
||||
|
||||
132
mes/qd/src/views/wms/pdm/produce/dailyplan/StructIvt4.vue
Normal file
132
mes/qd/src/views/wms/pdm/produce/dailyplan/StructIvt4.vue
Normal file
@@ -0,0 +1,132 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<span slot="title" class="dialog-footer">
|
||||
<div class="crud-opts2">
|
||||
<span class="el-dialog__title2">日计划重排</span>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
||||
<el-button slot="left" type="primary" @click="submit">保存</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
<!-- 搜索 -->
|
||||
<el-row>
|
||||
</el-row>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableDtl"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="plan_code" label="日计划编码" width="120" />
|
||||
<el-table-column :formatter="seriesFormat" min-width="80" prop="product_series_id" label="系列产线" />
|
||||
<el-table-column prop="device_code" label="关键设备" width="100" />
|
||||
<el-table-column prop="planstart_date" label="计划开始日期" width="100" />
|
||||
<el-table-column prop="plan_org_name" label="申报单位" width="100" />
|
||||
<el-table-column prop="workorder_type" label="计划类型" :formatter="workorder_typeFormat" min-width="120" />
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="120"/>
|
||||
<el-table-column prop="old_mark" label="牌号" />
|
||||
<el-table-column :formatter="seriesFormat" min-width="80" prop="mater_product_series" label="产品系列" />
|
||||
<el-table-column prop="product_weight" label="生产重量(kg)" :formatter="crud.formatNum3" min-width="120" />
|
||||
<el-table-column prop="planend_date" label="计划结束日期" width="100" />
|
||||
<el-table-column prop="plan_finish_date" label="交货日期" width="100" />
|
||||
<el-table-column prop="day_num" label="提前天数" width="90" :formatter="crud.formatNum0" />
|
||||
<el-table-column :formatter="stateFormat" min-width="80" prop="status" label="状态" />
|
||||
<el-table-column prop="create_time" label="创建时间" width="140px" />
|
||||
<el-table-column prop="create_name" label="创建人" width="100" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { header } from '@crud/crud'
|
||||
import dailyplan from '@/api/wms/pdm/dailyplan'
|
||||
import crudseriesProcessRoute from '@/api/wms/pdm/seriesProcessRoute'
|
||||
|
||||
export default {
|
||||
name: 'StructIvt4',
|
||||
mixins: [header()],
|
||||
dicts: ['product_mode', 'workorder_type2', 'planstatus'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
tableDtl: [],
|
||||
cxjList: [],
|
||||
XLList: [],
|
||||
queryrow: { },
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue, oldValue) {
|
||||
this.queryrow = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
crudseriesProcessRoute.getXLlist2().then(res => {
|
||||
this.XLList = res
|
||||
})
|
||||
this.queryStruct()
|
||||
},
|
||||
queryStruct() {
|
||||
dailyplan.query2(this.queryrow).then(res => {
|
||||
this.tableDtl = res
|
||||
})
|
||||
},
|
||||
stateFormat(row) {
|
||||
return this.dict.label.planstatus[row.status]
|
||||
},
|
||||
workorder_typeFormat(row) {
|
||||
return this.dict.label.workorder_type2[row.workorder_type]
|
||||
},
|
||||
seriesFormat(row) {
|
||||
for (const item of this.XLList) {
|
||||
if (item.id === row.product_series) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
this.rows = this.$refs.table.data
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('StructIvtClosed', this.rows)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -179,6 +179,7 @@
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<StructIvt4 :dialog-show.sync="structshow" :rowmst="crud.query" @StructIvtClosed="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -186,6 +187,7 @@
|
||||
import producetask from '@/api/wms/pdm/producetask'
|
||||
import dailyplan from '@/api/wms/pdm/dailyplan'
|
||||
import AddDialog from '@/views/wms/pdm/produce/dailyplan/AddDialog'
|
||||
import StructIvt4 from '@/views/wms/pdm/produce/dailyplan/StructIvt4'
|
||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -197,12 +199,11 @@ import workorder from '@/api/wms/pdm/workorder'
|
||||
import crudseriesProcessRoute from '@/api/wms/pdm/seriesProcessRoute'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
import crudProducetask from '@/api/wms/pdm/producetask'
|
||||
|
||||
export default {
|
||||
name: 'dailyplan',
|
||||
dicts: ['product_mode', 'workorder_type2', 'planstatus'],
|
||||
components: { crudOperation, rrOperation, udOperation, AddDialog, pagination },
|
||||
components: { crudOperation, rrOperation, udOperation, AddDialog, pagination, StructIvt4 },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -229,6 +230,7 @@ export default {
|
||||
del: ['admin', 'workorder:del']
|
||||
},
|
||||
dialogVisible: false,
|
||||
structshow: false,
|
||||
save_flag: true,
|
||||
sub_flag: true,
|
||||
Depts: [],
|
||||
@@ -299,21 +301,15 @@ export default {
|
||||
}
|
||||
},
|
||||
save() {
|
||||
this.checkrows = this.$refs.table.data
|
||||
if (this.checkrows.length === 0) {
|
||||
this.crud.notify('重排记录数不能为0!')
|
||||
return false
|
||||
}
|
||||
if(this.crud.query.device_id === '' || this.crud.query.device_id === undefined ){
|
||||
if (this.crud.query.device_id === '' || this.crud.query.device_id === undefined) {
|
||||
this.crud.notify('请先选择关键设备!')
|
||||
return false
|
||||
}
|
||||
/* dailyplan.submit2({ query: this.crud.query, rows: this.checkrows} ).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.querytable()
|
||||
})*/
|
||||
this.crud.notify('操作成功!')
|
||||
this.querytable()
|
||||
if (this.crud.query.status !== '01' || this.crud.query.status === undefined) {
|
||||
this.crud.notify('重排只能选择生成状态记录!')
|
||||
return false
|
||||
}
|
||||
this.structshow = true
|
||||
},
|
||||
downdtl() {
|
||||
crud.downloadLoading = true
|
||||
|
||||
Reference in New Issue
Block a user