You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

157 lines
4.1 KiB

2 years ago
<template>
<div class="app-container">
<div class="listconadd" style="padding: 20px;">
2 years ago
<el-table v-loading="tableLoading" :default-sort = "{prop: 'date', order: 'descending'}" :data="tableData" border style="width: 100%" >
<el-table-column label="序号" width="55px" type="index" align="center"></el-table-column>
<el-table-column prop="enpName" label="厂家" align="center">
</el-table-column>
<el-table-column prop="name" label="品牌" align="center" >
</el-table-column>
<el-table-column prop="enpName" label="厂家" align="center">
</el-table-column>
<el-table-column fixed="right" width="200px" label="明细信息" align="center">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
@click="purchase(scope.row)"
>
修改
</el-button>
<el-button
type="primary"
size="mini"
@click="addList(scope.row)"
>
添加
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!-- 添加食品占比 -->
<el-dialog
:title="dialogTitle + '食品占比'"
:visible.sync="editDialog"
width="40%"
>
<table class="e-table" cellspacing="0">
<tr>
<td>品牌名称</td>
2 years ago
<td>
2 years ago
<el-input
v-model="makeUp.brandName"
style="width: 300px"
disabled
></el-input>
2 years ago
</td>
</tr>
<tr>
2 years ago
<td>占比名称</td>
2 years ago
<td>
<el-input
2 years ago
v-model="makeUp.typeName"
2 years ago
style="width: 300px"
></el-input>
</td>
</tr>
<tr>
2 years ago
<td>占比百分比</td>
2 years ago
<td>
<el-input
2 years ago
v-model="makeUp.proportion"
2 years ago
style="width: 300px"
></el-input>
</td>
</tr>
</table>
2 years ago
<div style="margin-top: 20px; text-align: center">
<el-button type="primary" @click="save()">添加</el-button>
</div>
</el-dialog>
2 years ago
</div>
2 years ago
</template>
2 years ago
<script>
2 years ago
import {selectBrandList,save} from '@/api/Zhj/inquireStatistics/index.js'
2 years ago
export default {
2 years ago
data() {
return {
tableLoading: false,
2 years ago
dialogTitle: "",
tableData: [],
editDialog:false,
makeUp:{
brandSid:'',
2 years ago
brandName:'',
typeName:'',
2 years ago
proportion:'',
2 years ago
},
2 years ago
ruleForm: {
time: '',
data:{
salesAmount:'',
purchase:'',
salesDishes:''
}
},
2 years ago
};
},
mounted() {
selectBrandList().then((res)=>{
this.ListName = res.data
2 years ago
this.tableData=res.data
2 years ago
})
},
created() {
2 years ago
this.getPageList()
2 years ago
},
methods: {
resetSearch() {
// 重置
this.queryParams = {
total: 0, // 默认数据总数
current: 1, // 默认开始页面
size: 10, // 每页的数据条数
params: {
StoreName: "",
brandName:'',
fromTime: "",
endTime: "",
},
};
2 years ago
this.getPageList();
},
getPageList() {
},
save(){
save(this.makeUp).then((res)=>{
})
2 years ago
},
2 years ago
addList(row){
this.dialogTitle = "销售";
this.editDialog = true;
console.log(row);
this.makeUp.brandName = row.name
this.makeUp.brandSid = row.sid
},
resetForm() {
this.ruleForm= {
time: '',
data:{
salesAmount:'',
purchase:'',
salesDishes:''
}
}
}
2 years ago
},
};
2 years ago
</script>
2 years ago
<style scoped="scoped" >
2 years ago
2 years ago
</style>