代码更新
This commit is contained in:
@@ -11,6 +11,16 @@
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="设备类别">
|
||||
<treeselect
|
||||
v-model="query.material_type_id"
|
||||
:load-options="loadClass"
|
||||
:options="classes"
|
||||
style="width: 200px;"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="所属库区">
|
||||
<el-cascader
|
||||
placeholder="所属库区"
|
||||
@@ -67,9 +77,10 @@
|
||||
<el-table-column prop="sect_name" label="库区名称" />
|
||||
<el-table-column prop="material_code" label="物料编码" width="130px" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_name" label="名称" width="130px" show-overflow-tooltip/>
|
||||
<el-table-column prop="class_name" label="物料分类" width="130px" show-overflow-tooltip/>
|
||||
<el-table-column prop="sparepart_only_id" label="备件唯一码" width="130px" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_model" label="型号" />
|
||||
<el-table-column prop="material_spec" label="技术规格" />
|
||||
<el-table-column prop="material_model" label="型号" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="技术规格" show-overflow-tooltip />
|
||||
<el-table-column prop="pcsn" label="批次" />
|
||||
<el-table-column prop="ivt_qty" label="库存数" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" />
|
||||
@@ -92,11 +103,15 @@ import crudSectattr from '@/api/wms/basedata/st/sectattr'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
import {getLodop} from "@/assets/js/lodop/LodopFuncs";
|
||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
|
||||
const defaultForm = { stockrecord_id: null, sparepart_only_id: null, material_id: null, pcsn: null, stor_id: null, stor_name: null, struct_id: null, struct_code: null, struct_name: null, ivt_qty: null, qty_unit_id: null, qty_unit_name: null, instorage_time: null }
|
||||
export default {
|
||||
name: 'Deviceivtquery',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -117,6 +132,9 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
sects: [],
|
||||
classes: [],
|
||||
class_idStr: null,
|
||||
materOpt_code: '23',
|
||||
permission: {
|
||||
}
|
||||
}
|
||||
@@ -125,6 +143,15 @@ export default {
|
||||
crudSectattr.getSect({ 'is_attachment': '1' }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
const param = {
|
||||
'materOpt_code': this.materOpt_code
|
||||
}
|
||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||
this.class_idStr = res.class_idStr
|
||||
this.crud.query.class_idStr = this.class_idStr
|
||||
this.crud.toQuery()
|
||||
this.queryClassId()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
@@ -185,6 +212,34 @@ export default {
|
||||
|
||||
this.crud.notify('打印成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
},
|
||||
loadClass({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
setTimeout(() => {
|
||||
callback()
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
},
|
||||
queryClassId() {
|
||||
const param = {
|
||||
'class_idStr': this.class_idStr
|
||||
}
|
||||
crudClassstandard.queryClassById(param).then(res => {
|
||||
this.classes = res.content.map(obj => {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user