|
|
@ -1,64 +1,110 @@ |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<div class="listconadd" style="padding: 20px;"> |
|
|
|
<table class="e-table" > |
|
|
|
<tr> |
|
|
|
<td>品牌</td> |
|
|
|
<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-select v-model="tableData.brandName" placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="{item,i} in ListName" |
|
|
|
:key="i" |
|
|
|
:label="item.name" |
|
|
|
:value="item.name" |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<el-input |
|
|
|
v-model="makeUp.brandName" |
|
|
|
style="width: 300px" |
|
|
|
disabled |
|
|
|
></el-input> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td>教师姓名</td> |
|
|
|
<td>占比名称</td> |
|
|
|
<td> |
|
|
|
<el-input |
|
|
|
v-model="makeUp.typeName" |
|
|
|
style="width: 300px" |
|
|
|
></el-input> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td>教师工号</td> |
|
|
|
<td>占比百分比</td> |
|
|
|
<td> |
|
|
|
<el-input |
|
|
|
v-model="makeUp.proportion" |
|
|
|
style="width: 300px" |
|
|
|
></el-input> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 20px; text-align: center"> |
|
|
|
<el-button type="primary" @click="save()">添加</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import {listPage,selectBrandList} from '@/api/Zhj/inquireStatistics/index.js' |
|
|
|
import {selectBrandList,save} from '@/api/Zhj/inquireStatistics/index.js' |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
tableLoading: false, |
|
|
|
tableData: { |
|
|
|
sid:'', |
|
|
|
dialogTitle: "", |
|
|
|
tableData: [], |
|
|
|
editDialog:false, |
|
|
|
makeUp:{ |
|
|
|
brandSid:'', |
|
|
|
brandName:'', |
|
|
|
typeName:'', |
|
|
|
proportion:'' |
|
|
|
proportion:'', |
|
|
|
}, |
|
|
|
ListName:[] |
|
|
|
ruleForm: { |
|
|
|
time: '', |
|
|
|
data:{ |
|
|
|
salesAmount:'', |
|
|
|
purchase:'', |
|
|
|
salesDishes:'' |
|
|
|
} |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
selectBrandList().then((res)=>{ |
|
|
|
this.ListName = res.data |
|
|
|
this.tableData=res.data |
|
|
|
}) |
|
|
|
}, |
|
|
|
created() { |
|
|
|
|
|
|
|
this.getPageList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
resetSearch() { |
|
|
@ -74,14 +120,38 @@ export default { |
|
|
|
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" > |
|
|
|
.my-tabs { |
|
|
|
margin-top: 10px; |
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|
|