|
@@ -9,15 +9,7 @@
|
|
|
<el-input v-model="dataForm.materialName" placeholder="请输入名称" clearable/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="类别">
|
|
|
- <el-cascader
|
|
|
- v-model="selectedCateIds"
|
|
|
- :options="optionsCate"
|
|
|
- :props="{ expandTrigger: 'hover'}"
|
|
|
- :show-all-levels="true"
|
|
|
- popper-class="my-cascader"
|
|
|
- clearable
|
|
|
- >
|
|
|
- </el-cascader>
|
|
|
+ <material-type-component v-model.lazy="dataForm.materialTypeId" :type-id.sync="dataForm.materialTypeId"></material-type-component>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button @click="getDataList()">查询</el-button>
|
|
@@ -150,9 +142,11 @@
|
|
|
import StockDetails from './stock-details'
|
|
|
import StockAddOrUpdate from './stock-add-or-update'
|
|
|
import NoticeChangeSetting from './stock-notice-change-setting'
|
|
|
+import MaterialTypeComponent from '@/views/modules/common/material-type-component.vue'
|
|
|
export default {
|
|
|
name: 'stock',
|
|
|
components: {
|
|
|
+ MaterialTypeComponent,
|
|
|
StockAddOrUpdate,
|
|
|
StockDetails,
|
|
|
NoticeChangeSetting
|
|
@@ -176,29 +170,19 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
activated () {
|
|
|
- this.getCate()
|
|
|
+ // this.getCate()
|
|
|
this.getDataList()
|
|
|
},
|
|
|
methods: {
|
|
|
async init () {
|
|
|
this.visible = true
|
|
|
+ // this.getCate()
|
|
|
this.getDataList()
|
|
|
},
|
|
|
onChose () {
|
|
|
this.addOrUpdateVisible = false
|
|
|
this.detailVisible = false
|
|
|
},
|
|
|
- // 获取类别
|
|
|
- getCate () {
|
|
|
- this.$http({
|
|
|
- url: this.$http.adornUrl('/biz-service/stock-mg-ctl/listCategory'),
|
|
|
- method: 'get'
|
|
|
- }).then(({data}) => {
|
|
|
- if (data && data.code === '200') {
|
|
|
- this.optionsCate = data.data
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 获取数据列表
|
|
|
getDataList () {
|
|
|
this.dataListLoading = true
|
|
@@ -209,7 +193,7 @@ export default {
|
|
|
'current': this.pageIndex,
|
|
|
'size': this.pageSize,
|
|
|
'materialName': this.dataForm.materialName,
|
|
|
- 'materialTypeId': this.selectedCateIds ? this.selectedCateIds[this.selectedCateIds.length - 1] : ''
|
|
|
+ 'materialTypeId': this.dataForm.materialTypeId
|
|
|
})
|
|
|
}).then(({data}) => {
|
|
|
if (data && data.code === '200') {
|