|
@@ -6,6 +6,7 @@
|
|
|
width="1100px"
|
|
|
@close="onClose"
|
|
|
>
|
|
|
+ <search @searchActive="searchActive" :placeholder="placeholder"></search>
|
|
|
<div>
|
|
|
<tablelayout :layout="tablecols" :data="productsList" :custom="true" :checkbox="true" height="calc(100vh - 452px)" @checkboxCallBack="checkboxCallBack">
|
|
|
<template v-slot:customcol="scope">
|
|
@@ -31,6 +32,7 @@
|
|
|
|
|
|
<script>
|
|
|
import tablelayout from '@/components/table/index2'
|
|
|
+import search from './search'
|
|
|
export default {
|
|
|
name: "add",
|
|
|
props:["plm_technicalinfoid"],
|
|
@@ -38,6 +40,7 @@ export default {
|
|
|
return {
|
|
|
drawer:false,
|
|
|
add:false,
|
|
|
+ placeholder:'商品名称',
|
|
|
form:{
|
|
|
itemid:''
|
|
|
},
|
|
@@ -51,11 +54,20 @@ export default {
|
|
|
tablecols:[],
|
|
|
tableHieght:420,
|
|
|
selected:0,
|
|
|
- total:0
|
|
|
+ total:0,
|
|
|
+ params:{
|
|
|
+ "id": 20220923140602,
|
|
|
+ "content": {
|
|
|
+ "where": {
|
|
|
+ "condition": ""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
components:{
|
|
|
- tablelayout
|
|
|
+ tablelayout,
|
|
|
+ search
|
|
|
},
|
|
|
mounted() {
|
|
|
|
|
@@ -73,14 +85,7 @@ export default {
|
|
|
this.form.itemid=''
|
|
|
},
|
|
|
async productsData(){
|
|
|
- const res = await this.$api.requested({
|
|
|
- "id": 20220923140602,
|
|
|
- "content": {
|
|
|
- "where": {
|
|
|
- "condition": ""
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
+ const res = await this.$api.requested(this.params)
|
|
|
console.log(res)
|
|
|
this.productsList = res.data
|
|
|
this.total = res.total
|
|
@@ -111,7 +116,11 @@ export default {
|
|
|
this.drawer = false
|
|
|
this.$emit('addSuccess')
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ searchActive(data) {
|
|
|
+ this.params.content.where.condition = data
|
|
|
+ this.productsData()
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|