|
@@ -32,14 +32,16 @@
|
|
|
v-model="dataForm.productName"
|
|
|
filterable
|
|
|
remote
|
|
|
+ :remote-method="productRemoteQuery"
|
|
|
clearable
|
|
|
+ :loading="loading"
|
|
|
placeholder="请选择"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in materialList"
|
|
|
- :key="item.materialId"
|
|
|
- :label="item.materialName"
|
|
|
- :value="item.materialName"
|
|
|
+ :key="item.productId"
|
|
|
+ :label="item.productName"
|
|
|
+ :value="item.productId"
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -212,12 +214,13 @@
|
|
|
ref="addOrUpdate"
|
|
|
v-if="addOrUpdateVisible"
|
|
|
@onChose="onChose"
|
|
|
+ @refreshDataList="search"
|
|
|
></process-add-or-update>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getMaterialList } from '@/api/material'
|
|
|
+import { getProductList } from '@/api/product'
|
|
|
import {getList} from '@/api/process'
|
|
|
import ProcessAddOrUpdate from './process-add-or-update.vue'
|
|
|
export default {
|
|
@@ -229,6 +232,7 @@ export default {
|
|
|
detailVisible: false,
|
|
|
noteChangeVisible: false,
|
|
|
attachVisible: false,
|
|
|
+ loading: false,
|
|
|
materialList: [],
|
|
|
dataForm: {},
|
|
|
dataList: [],
|
|
@@ -239,7 +243,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
- this.getMaterialList()
|
|
|
+ this.getProductList()
|
|
|
},
|
|
|
mounted () {},
|
|
|
activated () {},
|
|
@@ -251,13 +255,18 @@ export default {
|
|
|
this.noteChangeVisible = false
|
|
|
this.attachVisible = false
|
|
|
},
|
|
|
- getMaterialList () {
|
|
|
- getMaterialList().then(({ data }) => {
|
|
|
+ async getProductList (productName) {
|
|
|
+ await getProductList({current: 1, size: 100, productName: productName}).then(({ data }) => {
|
|
|
if (data && data.code === '200') {
|
|
|
this.materialList = data.data.records
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ async productRemoteQuery (inputVal) {
|
|
|
+ this.loading = true
|
|
|
+ await this.getProductList(inputVal)
|
|
|
+ this.loading = false
|
|
|
+ },
|
|
|
search () {
|
|
|
this.pageIndex = 1
|
|
|
this.getDataList()
|