Merge branch 'gh' of https://e.coding.net/g-cphe0354/yinshoukeguanliduan/management into test
This commit is contained in:
commit
b06afa15fe
|
|
@ -38,6 +38,18 @@ export function addCreditBuyer(data) {
|
|||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑挂账人
|
||||
* @returns
|
||||
*/
|
||||
export function editCreditBuyer(data) {
|
||||
return request({
|
||||
url: '/api/credit/buyer',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 还款
|
||||
* @returns
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ export default {
|
|||
* 重置
|
||||
*/
|
||||
reset() {
|
||||
this.query = { ...this.resetQuery }
|
||||
this.query.paymentMethod = ''
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { addCreditBuyer } from '@/api/credit'
|
||||
import { addCreditBuyer, editCreditBuyer } from '@/api/credit'
|
||||
|
||||
export default {
|
||||
// eslint-disable-next-line vue/require-prop-types
|
||||
|
|
@ -131,8 +131,12 @@ export default {
|
|||
try {
|
||||
this.loading = true
|
||||
if (!this.form.shopId) { this.form.shopId = localStorage.getItem('shopId') }
|
||||
// eslint-disable-next-line no-unused-vars, prefer-const
|
||||
let res = await addCreditBuyer(this.form)
|
||||
let res
|
||||
if (!this.form.id) {
|
||||
res = await addCreditBuyer(this.form)
|
||||
} else {
|
||||
res = await editCreditBuyer(this.form)
|
||||
}
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: `${this.form.id ? '编辑' : '添加'}成功`,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button type="primary" @click="getTableData()">
|
||||
<el-button type="primary" @click="search">
|
||||
查询
|
||||
</el-button>
|
||||
</div>
|
||||
|
|
@ -119,7 +119,10 @@ export default {
|
|||
this.getTableData()
|
||||
},
|
||||
methods: {
|
||||
|
||||
search() {
|
||||
this.tableData.page = 1
|
||||
this.getTableData()
|
||||
},
|
||||
/**
|
||||
* 获取挂账人列表
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@
|
|||
</el-form-item>
|
||||
<template>
|
||||
<el-form-item>
|
||||
<el-select v-model="query.status" placeholder="全部状态" style="width: 140px;">
|
||||
<el-select v-model="query.status" placeholder="全部状态" clearable style="width: 140px;">
|
||||
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||
<el-button type="primary" @click="search">查询</el-button>
|
||||
<el-button @click="resetHandle">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
|
@ -161,6 +161,10 @@ export default {
|
|||
// this.tbShopCategoryGet()
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
this.query.page = 1
|
||||
this.getTableData()
|
||||
},
|
||||
/**
|
||||
* 获取明细数据
|
||||
*/
|
||||
|
|
@ -172,6 +176,7 @@ export default {
|
|||
let params = {
|
||||
page: this.query.page,
|
||||
size: this.query.size,
|
||||
status: this.query.status,
|
||||
creditBuyerId: this.query.creditBuyerId
|
||||
}
|
||||
if (this.query.createdAt.length > 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue