Commit 6fd41d42 by 夏超

[fix] 玖姿前端问题

parent 60a51a54
......@@ -52,6 +52,7 @@ class ProductIncomeExpenseIframe(http.Controller):
type_str = _self.jsonrequest.get("type_str", False) # income收入/expenditure支出
machinery_type = _self.jsonrequest.get("machinery_type", False)
customer = _self.jsonrequest.get("customer", False)
abstract = _self.jsonrequest.get("abstract", False)
domain = []
if start_date and end_date:
domain.append(("business_date", ">=", start_date))
......@@ -62,6 +63,8 @@ class ProductIncomeExpenseIframe(http.Controller):
domain.append(("machinery_type", "=", machinery_type))
if customer:
domain.append(("customer", "ilike", customer))
if abstract:
domain.append(("abstract", "ilike", abstract))
data_list = _self.env["roke.product.income.expense"].sudo().search(domain, limit=limit,
offset=(page - 1) * limit,
order="business_date desc, create_date desc")
......@@ -102,6 +105,7 @@ class ProductIncomeExpenseIframe(http.Controller):
type_str = kwargs.get("type_str", False) # income收入/expenditure支出
machinery_type = kwargs.get("machinery_type", False)
customer = kwargs.get("customer", False)
abstract = kwargs.get("abstract", False)
domain = []
if start_date and end_date:
domain.append(("business_date", ">=", start_date))
......@@ -112,6 +116,8 @@ class ProductIncomeExpenseIframe(http.Controller):
domain.append(("machinery_type", "=", machinery_type))
if customer:
domain.append(("customer", "ilike", customer))
if abstract:
domain.append(("abstract", "ilike", abstract))
data_list = _self.env["roke.product.income.expense"].sudo().search(domain, order="business_date desc, create_date desc")
data = []
for v in data_list:
......
......@@ -77,6 +77,8 @@
<div style="display: flex;justify-content: flex-end; text-align: right; margin-bottom: 5px;">
<el-input style="width: 15%;" v-model="abstract_value" placeholder="请填写摘要信息" @change="select_change"></el-input>
<el-select v-model="select_value" clearable placeholder="请选择收支类型" @change="select_change">
<el-option v-for="item in select_options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
......@@ -224,6 +226,7 @@
}],
select_value: '',
machinery_type_value: '',
abstract_value: '',
customer_value:''
};
},
......@@ -271,6 +274,7 @@
end_date: this.datePickerValue[1],
type_str: this.select_value,
machinery_type: this.machinery_type_value,
abstract: this.abstract_value,
customer:this.customer_value
}
axios.request({
......@@ -344,6 +348,7 @@
formData.append("end_date", this.datePickerValue[1]);
formData.append("type_str", this.select_value);
formData.append("machinery_type", this.machinery_type_value);
formData.append("abstract", this.abstract_value);
formData.append("customer", this.customer_value);
axios.post("/roke/product/product_income_expense/export",
formData,
......@@ -415,6 +420,7 @@
this.select_value = ''
this.machinery_type_value = ''
this.customer_value = ''
this.abstract_value = ''
this.datePickerValue = ''
this.getDataList()
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment