<template>
|
<el-col
|
v-if="ButtonList != null && ButtonList.length > 0"
|
:span="24"
|
class="toolbar"
|
style="padding-bottom: 0px"
|
>
|
<el-form :inline="true" @submit.native.prevent ref="SearchForm">
|
<el-form-item>
|
<el-input-number
|
v-model="SearchInfo.Id"
|
placeholder="编号"
|
size="small"
|
controls-position="right"
|
></el-input-number>
|
</el-form-item>
|
<el-form-item>
|
<el-input
|
v-model="SearchInfo.QuoteCode"
|
placeholder="采购编号"
|
size="small"
|
controls-position="right"
|
style="width:100px"
|
></el-input>
|
</el-form-item>
|
<el-form-item label="起始时间" prop="StartTime">
|
<el-date-picker
|
v-model="SearchInfo.StartTime"
|
type="datetime"
|
placeholder="请选择"
|
align="right"
|
style="width:200px"
|
:disabled="SearchDisable.StartTime"
|
></el-date-picker>
|
</el-form-item>
|
<el-form-item label="结束时间" prop="EndTime">
|
<el-date-picker
|
v-model="SearchInfo.EndTime"
|
type="datetime"
|
placeholder="请选择"
|
align="right"
|
style="width:200px"
|
:disabled="SearchDisable.EndTime"
|
></el-date-picker>
|
</el-form-item>
|
<!-- 这个就是当前页面内,所有的btn列表 -->
|
<el-form-item v-for="item in ButtonList" v-bind:key="item.id">
|
<!-- 这里触发点击事件 -->
|
<el-button
|
:type="
|
item.Func &&
|
(item.Func.toLowerCase().indexOf('handledel') != -1 ||
|
item.Func.toLowerCase().indexOf('stop') != -1)
|
? 'danger'
|
: 'primary'
|
"
|
v-if="!item.IsHide"
|
@click="CallBack(item)"
|
>{{ item.name }}</el-button
|
>
|
</el-form-item>
|
</el-form>
|
</el-col>
|
</template>
|
<script>
|
export default {
|
name: "SearchBar",
|
data() {
|
return {};
|
},
|
props: ["ButtonList", "SearchInfo", "Params", "SearchDisable"], //接受父组件传值
|
methods: {
|
CallBack(Item) {
|
this.$emit("CallBack", Item, this); //将值传给父组件
|
},
|
},
|
mounted() {
|
this.$emit("OnLoad", this);
|
},
|
};
|
</script>
|