结算积分
This commit is contained in:
parent
09c4fb088d
commit
79bd7a92e7
|
@ -39,3 +39,11 @@ export function settlementList(data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function settlementDeal(data) {
|
||||
return request({
|
||||
url: '/api/convenience/fingertipIntegral/settlementDeal',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -53,6 +53,24 @@
|
|||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300px" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.dealStatus != '0'"
|
||||
type="primary"
|
||||
size="mini"
|
||||
style="font-size:12px;padding:10px 20px"
|
||||
@click="handleEdit(scope.row)"
|
||||
>处理</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.invoiceStatus != '1'"
|
||||
type="success"
|
||||
size="mini"
|
||||
style="font-size:12px;padding:10px 20px;border-radius:21px"
|
||||
@click="handleDelivery(scope.row)"
|
||||
>交付发票</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
@ -62,12 +80,50 @@
|
|||
:limit.sync="listQuery.size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<el-dialog
|
||||
class="dialog"
|
||||
title="积分结算"
|
||||
append-to-body
|
||||
center
|
||||
width="364px"
|
||||
:visible.sync="diaVisible"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
:close="closeDia"
|
||||
>
|
||||
<div class="preview-container">
|
||||
<el-form
|
||||
ref="form"
|
||||
label-position="left"
|
||||
label-width="100px"
|
||||
:rules="rules"
|
||||
:model="form"
|
||||
>
|
||||
<el-form-item label="结算状态" prop="dealStatus">
|
||||
<el-radio v-model="form.dealStatus" :label="0">兑换</el-radio>
|
||||
<el-radio v-model="form.dealStatus" :label="1">不兑换</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
type="textarea"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="default" @click="closeDia">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { settlementList } from '@/api/fingertipIntegral'
|
||||
import { settlementList, settlementDeal } from '@/api/fingertipIntegral'
|
||||
export default {
|
||||
components: { Pagination },
|
||||
filters: {
|
||||
|
@ -126,7 +182,16 @@ export default {
|
|||
label: '已收',
|
||||
value: '1'
|
||||
}
|
||||
]
|
||||
],
|
||||
|
||||
diaVisible: false,
|
||||
form: {
|
||||
dealStatus: 0,
|
||||
remark: undefined
|
||||
},
|
||||
rules: {
|
||||
dealStatus: [{ required: true, message: '请选择', trigger: 'change' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -148,6 +213,55 @@ export default {
|
|||
// this.pageSize = res.d.pageSize
|
||||
})
|
||||
},
|
||||
handleEdit(item) {
|
||||
this.form = {
|
||||
id: item.id,
|
||||
dealStatus: 0,
|
||||
remark: undefined,
|
||||
invoiceStatus: item.invoiceStatus
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
const formEl = this.$refs['form']
|
||||
if (formEl) formEl.clearValidate()
|
||||
this.diaVisible = true
|
||||
})
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
settlementDeal(this.form).then(() => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '操作成功!'
|
||||
})
|
||||
this.closeDia()
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
closeDia() {
|
||||
this.diaVisible = false
|
||||
},
|
||||
handleDelivery(item) {
|
||||
this.$confirm('是否交付发票?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
settlementDeal({
|
||||
id: item.id,
|
||||
dealStatus: item.dealStatus,
|
||||
invoiceStatus: 1
|
||||
}).then(() => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '操作成功!'
|
||||
})
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSearch() {
|
||||
const { listQuery } = this
|
||||
this.listQuery.lastPageIndex = 1
|
||||
|
|
Loading…
Reference in New Issue