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
157 lines
4.1 KiB
<template>
|
|
<div class="app-container">
|
|
<div class="listconadd" style="padding: 20px;">
|
|
<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>
|
|
<td>
|
|
<el-input
|
|
v-model="makeUp.brandName"
|
|
style="width: 300px"
|
|
disabled
|
|
></el-input>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>占比名称</td>
|
|
<td>
|
|
<el-input
|
|
v-model="makeUp.typeName"
|
|
style="width: 300px"
|
|
></el-input>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>占比百分比</td>
|
|
<td>
|
|
<el-input
|
|
v-model="makeUp.proportion"
|
|
style="width: 300px"
|
|
></el-input>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div style="margin-top: 20px; text-align: center">
|
|
<el-button type="primary" @click="save()">添加</el-button>
|
|
</div>
|
|
</el-dialog>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {selectBrandList,save} from '@/api/Zhj/inquireStatistics/index.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
tableLoading: false,
|
|
dialogTitle: "",
|
|
tableData: [],
|
|
editDialog:false,
|
|
makeUp:{
|
|
brandSid:'',
|
|
brandName:'',
|
|
typeName:'',
|
|
proportion:'',
|
|
},
|
|
ruleForm: {
|
|
time: '',
|
|
data:{
|
|
salesAmount:'',
|
|
purchase:'',
|
|
salesDishes:''
|
|
}
|
|
},
|
|
};
|
|
},
|
|
mounted() {
|
|
selectBrandList().then((res)=>{
|
|
this.ListName = res.data
|
|
this.tableData=res.data
|
|
})
|
|
},
|
|
created() {
|
|
this.getPageList()
|
|
},
|
|
methods: {
|
|
resetSearch() {
|
|
// 重置
|
|
this.queryParams = {
|
|
total: 0, // 默认数据总数
|
|
current: 1, // 默认开始页面
|
|
size: 10, // 每页的数据条数
|
|
params: {
|
|
StoreName: "",
|
|
brandName:'',
|
|
fromTime: "",
|
|
endTime: "",
|
|
},
|
|
};
|
|
this.getPageList();
|
|
},
|
|
getPageList() {
|
|
|
|
},
|
|
save(){
|
|
save(this.makeUp).then((res)=>{
|
|
|
|
})
|
|
},
|
|
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:''
|
|
}
|
|
}
|
|
}
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style scoped="scoped" >
|
|
|
|
</style>
|
|
|