Commit ab49a5f5 by guibin

Merge branch 'master' of https://git.rokedata.com/dws/dwsproject

parents bbf327f5 852cd7dc
...@@ -59,6 +59,7 @@ class ProductIncomeExpenseIframe(http.Controller): ...@@ -59,6 +59,7 @@ class ProductIncomeExpenseIframe(http.Controller):
type_str = _self.jsonrequest.get("type_str", False) # income收入/expenditure支出 type_str = _self.jsonrequest.get("type_str", False) # income收入/expenditure支出
machinery_type = _self.jsonrequest.get("machinery_type", False) machinery_type = _self.jsonrequest.get("machinery_type", False)
customer = _self.jsonrequest.get("customer", False) customer = _self.jsonrequest.get("customer", False)
abstract = _self.jsonrequest.get("abstract", False)
domain = [] domain = []
if start_date and end_date: if start_date and end_date:
domain.append(("business_date", ">=", start_date)) domain.append(("business_date", ">=", start_date))
...@@ -69,6 +70,8 @@ class ProductIncomeExpenseIframe(http.Controller): ...@@ -69,6 +70,8 @@ class ProductIncomeExpenseIframe(http.Controller):
domain.append(("machinery_type", "=", machinery_type)) domain.append(("machinery_type", "=", machinery_type))
if customer: if customer:
domain.append(("customer", "ilike", 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, data_list = _self.env["roke.product.income.expense"].sudo().search(domain, limit=limit,
offset=(page - 1) * limit, offset=(page - 1) * limit,
order="business_date desc, create_date desc") order="business_date desc, create_date desc")
...@@ -109,6 +112,7 @@ class ProductIncomeExpenseIframe(http.Controller): ...@@ -109,6 +112,7 @@ class ProductIncomeExpenseIframe(http.Controller):
type_str = kwargs.get("type_str", False) # income收入/expenditure支出 type_str = kwargs.get("type_str", False) # income收入/expenditure支出
machinery_type = kwargs.get("machinery_type", False) machinery_type = kwargs.get("machinery_type", False)
customer = kwargs.get("customer", False) customer = kwargs.get("customer", False)
abstract = kwargs.get("abstract", False)
domain = [] domain = []
if start_date and end_date: if start_date and end_date:
domain.append(("business_date", ">=", start_date)) domain.append(("business_date", ">=", start_date))
...@@ -119,6 +123,8 @@ class ProductIncomeExpenseIframe(http.Controller): ...@@ -119,6 +123,8 @@ class ProductIncomeExpenseIframe(http.Controller):
domain.append(("machinery_type", "=", machinery_type)) domain.append(("machinery_type", "=", machinery_type))
if customer: if customer:
domain.append(("customer", "ilike", 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_list = _self.env["roke.product.income.expense"].sudo().search(domain, order="business_date desc, create_date desc")
data = [] data = []
for v in data_list: for v in data_list:
......
...@@ -77,6 +77,8 @@ ...@@ -77,6 +77,8 @@
<div style="display: flex;justify-content: flex-end; text-align: right; margin-bottom: 5px;"> <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-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 v-for="item in select_options" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
...@@ -89,12 +91,10 @@ ...@@ -89,12 +91,10 @@
</el-option> </el-option>
</el-select> </el-select>
<el-input style="width: 15%;" v-model="customer_value" placeholder="请填写客户名称" <el-input style="width: 15%;" v-model="customer_value" placeholder="请填写客户名称" @change="select_change"></el-input>
@change="select_change"></el-input>
<el-date-picker class="margin_sty" v-model="datePickerValue" type="daterange" range-separator="至" <el-date-picker class="margin_sty" v-model="datePickerValue" type="daterange" range-separator="至" start-placeholder="开始日期"
start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="datePickerChange">
@change="datePickerChange">
</el-date-picker> </el-date-picker>
<el-button type="primary" @click="export_click">导出</el-button> <el-button type="primary" @click="export_click">导出</el-button>
...@@ -249,6 +249,7 @@ ...@@ -249,6 +249,7 @@
select_value: '', select_value: '',
machinery_type_value: '', machinery_type_value: '',
customer_value: '', customer_value: '',
abstract_value: '',
edit_state: false, edit_state: false,
edit_list: [] edit_list: []
}; };
...@@ -379,6 +380,7 @@ ...@@ -379,6 +380,7 @@
end_date: this.datePickerValue[1], end_date: this.datePickerValue[1],
type_str: this.select_value, type_str: this.select_value,
machinery_type: this.machinery_type_value, machinery_type: this.machinery_type_value,
abstract: this.abstract_value,
customer: this.customer_value customer: this.customer_value
} }
axios.request({ axios.request({
...@@ -469,6 +471,7 @@ ...@@ -469,6 +471,7 @@
formData.append("end_date", this.datePickerValue[1]); formData.append("end_date", this.datePickerValue[1]);
formData.append("type_str", this.select_value); formData.append("type_str", this.select_value);
formData.append("machinery_type", this.machinery_type_value); formData.append("machinery_type", this.machinery_type_value);
formData.append("abstract", this.abstract_value);
formData.append("customer", this.customer_value); formData.append("customer", this.customer_value);
axios.post("/roke/product/product_income_expense/export", axios.post("/roke/product/product_income_expense/export",
formData, formData,
...@@ -540,6 +543,7 @@ ...@@ -540,6 +543,7 @@
this.select_value = '' this.select_value = ''
this.machinery_type_value = '' this.machinery_type_value = ''
this.customer_value = '' this.customer_value = ''
this.abstract_value = ''
this.datePickerValue = '' this.datePickerValue = ''
this.getDataList() this.getDataList()
} else { } 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