Commit 50cf5a9a authored by menglingjun's avatar menglingjun

fix: 查询条件

parent fce1a236
......@@ -24,6 +24,18 @@
</a-select>
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="是否统计" :labelCol="{span: 8}" :wrapperCol="{span: 16}">
<a-select placeholder="请选择状态" v-model="query.statisticsStatus" :allowClear="true">
<a-select-option value=1>
</a-select-option>
<a-select-option value=0>
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
</div>
</a-form>
......@@ -41,9 +53,6 @@
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: updateSelect}"
bordered
>
<!-- <template v-for="">-->
<!-- </template>-->
<div slot="title" slot-scope="data">
<span class="cust-title">
<a-icon type="hdd"/> 工资管理列表{{ data.none }}
......@@ -94,6 +103,13 @@
v-model='record.charge'
></a-input-number>
</span>
<span slot="orderNumber" slot-scope="text, record,index" :key="record.id">
<a-input-number
style="width: 80px"
@change="e=>handleOrderChange(e, index)"
v-model='record.orderNumber'
></a-input-number>
</span>
</a-table>
</div>
......@@ -118,6 +134,13 @@ const columns = [
align: 'center',
scopedSlots: {customRender: 'statisticsStatus'}
},
{
title: '排序号',
width: 100,
dataIndex: 'orderNumber',
align: 'center',
scopedSlots: {customRender: 'orderNumber'}
},
{title: '项目款项(RMB)', dataIndex: 'charge', align: 'right', scopedSlots: {customRender: 'wages'}},
{title: '操作', key: 'operation', width: 150, scopedSlots: {customRender: 'action'}, align: 'center'}
]
......@@ -131,6 +154,7 @@ export default {
query: {
name: "",
status: "",
statisticsStatus: "",
order: "",
sort: "",
page: 1,
......@@ -161,6 +185,7 @@ export default {
this.query.page = 1
this.query.name = "";
this.query.status = "";
this.query.statisticsStatus = "";
this.loadData();
},
......@@ -179,12 +204,17 @@ export default {
getPage(this.query).then(res => {
if (res && res.code == SYS_CONST.REQUEST.SUCCEED) {
let respData = res.data
console.log(respData)
let list = respData.list
for (let i = 0; i < list.length; i++) {
if (!list[i].charge) {
list[i].charge = 0
}
if (!list[i].orderNumber){
list[i].orderNumber = 0
}
list[i].orgCharge = respData.list[i].charge
list[i].orgOrderNumber = respData.list[i].orderNumber
}
this.dataSource = list;
this.total = respData.total
......@@ -202,6 +232,15 @@ export default {
this.dataSource = newData;
}
},
handleOrderChange(value, index) {
const newData = [...this.dataSource];
const target = newData[index];
if (target) {
target.orderNumber = value;
newData[index].changed = target.orgOrderNumber != target.orderNumber
this.dataSource = newData;
}
},
changeStatisticsStatus(record, index) {
updateStatus(record.id).then(response => {
if (response && response.code == SYS_CONST.REQUEST.SUCCEED) {
......@@ -217,6 +256,7 @@ export default {
let saveData = {
id: a[index].id,
charge: a[index].charge,
orderNumber: a[index].orderNumber,
}
saveProjectCharge(saveData).then(resp => {
if (resp && resp.code == SYS_CONST.REQUEST.SUCCEED) {
......
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