优化
This commit is contained in:
@@ -154,6 +154,16 @@
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column
|
||||
min-width="125"
|
||||
label="操作"
|
||||
align="center"
|
||||
fixed="right"
|
||||
>
|
||||
<template scope="scope">
|
||||
<el-button :disabled="scope.row.is_proc==='2'" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55" />
|
||||
<el-table-column prop="plan_month" label="计划月份" />
|
||||
@@ -164,7 +174,6 @@
|
||||
<el-table-column prop="old_mark" min-width="100" label="牌号" />
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="150"/>
|
||||
<el-table-column :formatter="seriesFormat" min-width="80" prop="product_series" label="系列" />
|
||||
<el-table-column prop="product_type_name" label="生产方式" />
|
||||
<el-table-column prop="fact_weight" label="生产重量Kg" :formatter="crud.formatNum0" min-width="95" />
|
||||
<el-table-column prop="standard_weight" label="每批重量Kg" width="95" :formatter="crud.formatNum0"/>
|
||||
<el-table-column prop="pcsn_num" label="批数" :formatter="pcsn_num_format"/>
|
||||
@@ -176,6 +185,7 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDialog :dialog-show.sync="changeShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -184,6 +194,7 @@ import producetask from '@/api/wms/pdm/producetask'
|
||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import AddDialog from '@/views/wms/pdm/produce/mouthtask/AddDialog'
|
||||
import pagination from '@crud/Pagination'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { mapGetters } from 'vuex'
|
||||
@@ -194,12 +205,17 @@ import Date from '@/utils/datetime'
|
||||
export default {
|
||||
name: 'mouthtask',
|
||||
dicts: ['product_mode', 'is_proc2'],
|
||||
components: { pagination, crudOperation, rrOperation },
|
||||
components: { pagination, crudOperation, rrOperation, AddDialog },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '月计划管理',
|
||||
url: 'api/producetask/mouthtask',
|
||||
permission: {
|
||||
add: ['admin', 'producetask:add'],
|
||||
edit: ['admin', 'producetask:edit'],
|
||||
del: ['admin', 'producetask:del']
|
||||
},
|
||||
idField: 'plan_id',
|
||||
sort: '',
|
||||
query:{ nowstart_date: new Date(), captemplate_id: '',is_proc: '1'},
|
||||
@@ -217,6 +233,8 @@ export default {
|
||||
dialogVisible: false,
|
||||
save_flag: true,
|
||||
sub_flag: true,
|
||||
changeShow: false,
|
||||
mstrow: {},
|
||||
Depts: [],
|
||||
Devices: [],
|
||||
Capacitytes: [],
|
||||
@@ -256,6 +274,9 @@ export default {
|
||||
}
|
||||
return true
|
||||
},
|
||||
canUd(row) {
|
||||
return row.is_proc !== '2'
|
||||
},
|
||||
checkboxT(row) {
|
||||
return row.is_proc === '1'
|
||||
},
|
||||
@@ -286,6 +307,10 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
handleEdit(index, row) {
|
||||
this.changeShow = true
|
||||
this.mstrow = row
|
||||
},
|
||||
save() {
|
||||
if(this.crud.query.captemplate_id === '' || this.crud.query.captemplate_id === undefined ){
|
||||
this.crud.notify('请先选择排产模板!')
|
||||
|
||||
Reference in New Issue
Block a user