代码更新
This commit is contained in:
@@ -28,19 +28,20 @@
|
||||
:load-options="loadClass"
|
||||
style="width: 200px;"
|
||||
placeholder="请选择"
|
||||
:disabled="crud.status.view > 0"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="BOM编码" prop="device_bom_code">
|
||||
<el-input v-model="form.device_bom_code" style="width: 250px;" />
|
||||
<el-input v-model="form.device_bom_code" style="width: 250px;" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="BOM名称" prop="material_name">
|
||||
<el-input v-model="form.material_name" style="width: 250px;" />
|
||||
<el-input v-model="form.material_name" style="width: 250px;" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -65,6 +66,7 @@
|
||||
type="primary"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="crud.status.view > 0"
|
||||
@click="putMaterial"
|
||||
>
|
||||
添加物料
|
||||
@@ -106,20 +108,20 @@
|
||||
:controls="false"
|
||||
:precision="0"
|
||||
:min="0"
|
||||
:disabled="scope.row.edit"
|
||||
:disabled="crud.status.view > 0"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="base_unit_id_name" label="单位" align="center" />
|
||||
<el-table-column prop="dtl_remark" label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.dtl_remark" class="input-with-select"/>
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.dtl_remark" class="input-with-select" :disabled="crud.status.view > 0" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="delRow(scope.$index, form.tableData)" />
|
||||
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="delRow(scope.$index, form.tableData)" :disabled="crud.status.view > 0" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -222,6 +224,15 @@ export default {
|
||||
this.form.tableData = res
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
debugger
|
||||
const data = {
|
||||
'device_bom_id': this.form.device_bom_id
|
||||
}
|
||||
crudDevicebom.getDtl(data).then(res => {
|
||||
this.form.tableData = res
|
||||
})
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
|
||||
@@ -67,7 +67,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="class_name" label="设备分类" />
|
||||
<el-table-column prop="device_bom_code" label="BOM编码" />
|
||||
<el-table-column prop="device_bom_code" label="BOM编码">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.device_bom_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_name" label="BOM名称" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<BomDialog :dialog-show.sync="bomShow" :is-single="true" @tableChanged2="tableChanged2"/>
|
||||
<BomDialog :dialog-show.sync="bomShow" :is-single="true" :open-param="openBom" @tableChanged2="tableChanged2"/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@@ -137,6 +137,7 @@ export default {
|
||||
fileBom: [],
|
||||
fileBomJson: null,
|
||||
fileBomindex: null,
|
||||
openBom: null,
|
||||
bomShow: false,
|
||||
dialogVisible: false
|
||||
}
|
||||
@@ -192,6 +193,7 @@ export default {
|
||||
this.bomShow = true
|
||||
this.nowindex = index
|
||||
this.nowrow = row
|
||||
this.openBom = row
|
||||
},
|
||||
tableChanged2(row) {
|
||||
debugger
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form
|
||||
:inline="true"
|
||||
@@ -76,7 +77,8 @@ export default {
|
||||
return CRUD({
|
||||
title: '备件Bom',
|
||||
url: 'api/devicerepairmst/queryBom',
|
||||
crudMethod: { ...crudDevicerepairmst }, optShow: {}})
|
||||
crudMethod: { ...crudDevicerepairmst }, optShow: {},
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
props: {
|
||||
@@ -87,6 +89,9 @@ export default {
|
||||
isSingle: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -94,6 +99,7 @@ export default {
|
||||
dialogVisible: false,
|
||||
tableRadio: null,
|
||||
checkrow: null,
|
||||
material_id: null,
|
||||
rows: [],
|
||||
XLList: []
|
||||
}
|
||||
@@ -106,6 +112,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
debugger
|
||||
this.material_id = this.openParam.material_id
|
||||
this.query.material_id = this.material_id
|
||||
this.crud.toQuery()
|
||||
},
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
},
|
||||
|
||||
@@ -179,6 +179,7 @@ export default {
|
||||
this.form1 = this.openParam.form
|
||||
this.form1.tableData = this.openParam.tabData
|
||||
this.form1.devicerecord_id = null
|
||||
this.form1.device_code = null
|
||||
this.form1.repair_plan_code = null
|
||||
this.form1.repair_plan_name = null
|
||||
},
|
||||
|
||||
@@ -145,6 +145,7 @@ const defaultForm = {
|
||||
devicerecord_id: null,
|
||||
maintenancecycle: null,
|
||||
plan_start_date: null,
|
||||
device_code: null,
|
||||
remark: null,
|
||||
tableData: []
|
||||
}
|
||||
|
||||
@@ -180,6 +180,7 @@ export default {
|
||||
this.form1 = this.openParam.form
|
||||
this.form1.tableData = this.openParam.tabData
|
||||
this.form1.devicerecord_id = null
|
||||
this.form1.device_code = null
|
||||
this.form1.maint_plan_code = null
|
||||
this.form1.maint_plan_name = null
|
||||
},
|
||||
@@ -223,7 +224,7 @@ export default {
|
||||
},
|
||||
tableChanged2(row) {
|
||||
this.form1.devicerecord_id = row.devicerecord_id
|
||||
this.form.device_code = row.device_code
|
||||
this.form1.device_code = row.device_code
|
||||
},
|
||||
delRow(index, rows) {
|
||||
rows.splice(index, 1)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="设备">
|
||||
<el-form-item label="保养项目">
|
||||
<el-input
|
||||
v-model="query.maint_item_code"
|
||||
clearable
|
||||
|
||||
Reference in New Issue
Block a user