新增商品列表
This commit is contained in:
@@ -23,20 +23,20 @@
|
||||
<el-input v-model="form.productIds" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
|
||||
<el-button type="primary" @click="addProductClick">+添加商品
|
||||
<el-button type="primary" @click="addProduct">+添加商品
|
||||
<el-dialog title="选择商品" :visible.sync="productClick">
|
||||
<el-table :data="productList.content" style="width: 100%;">
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column property="name" label="商品信息" width="150"></el-table-column>
|
||||
<el-table-column property="lowPrice" label="售价" width="200"></el-table-column>
|
||||
<el-table-column property="address" label="地址"></el-table-column>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column property="name" label="商品信息" width="150" />
|
||||
<el-table-column property="lowPrice" label="售价" width="200" />
|
||||
<el-table-column property="address" label="地址" />
|
||||
</el-table>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addProduct">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</el-button>
|
||||
|
||||
<el-form-item label="创建时间">
|
||||
@@ -79,7 +79,7 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import {addProduct} from '@/api/tbProductGroup'
|
||||
import { addProduct } from '@/api/tbProductGroup'
|
||||
|
||||
const defaultForm = { id: null, name: null, merchantId: null, shopId: null, pic: null, isShow: null, detail: null, style: null, sort: null, productIds: null, createdAt: null, updatedAt: null }
|
||||
export default {
|
||||
@@ -103,9 +103,9 @@ export default {
|
||||
isShow: [
|
||||
{ required: true, message: '是否显示:1显示 0不显示不能为空', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
productList:[],
|
||||
productClick:false
|
||||
},
|
||||
productList: [],
|
||||
productClick: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -113,10 +113,10 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
addProductClick(data){
|
||||
this.productClick = true;
|
||||
addProduct(data).then(res=>{
|
||||
this.productList=res;
|
||||
addProduct(data) {
|
||||
this.productClick = true
|
||||
addProduct(data).then(res => {
|
||||
this.productList = res
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user