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
|
* @returns
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ export default {
|
||||||
* 重置
|
* 重置
|
||||||
*/
|
*/
|
||||||
reset() {
|
reset() {
|
||||||
this.query = { ...this.resetQuery }
|
this.query.paymentMethod = ''
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { addCreditBuyer } from '@/api/credit'
|
import { addCreditBuyer, editCreditBuyer } from '@/api/credit'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// eslint-disable-next-line vue/require-prop-types
|
// eslint-disable-next-line vue/require-prop-types
|
||||||
|
|
@ -131,8 +131,12 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
if (!this.form.shopId) { this.form.shopId = localStorage.getItem('shopId') }
|
if (!this.form.shopId) { this.form.shopId = localStorage.getItem('shopId') }
|
||||||
// eslint-disable-next-line no-unused-vars, prefer-const
|
let res
|
||||||
let res = await addCreditBuyer(this.form)
|
if (!this.form.id) {
|
||||||
|
res = await addCreditBuyer(this.form)
|
||||||
|
} else {
|
||||||
|
res = await editCreditBuyer(this.form)
|
||||||
|
}
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '成功',
|
title: '成功',
|
||||||
message: `${this.form.id ? '编辑' : '添加'}成功`,
|
message: `${this.form.id ? '编辑' : '添加'}成功`,
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button type="primary" @click="getTableData()">
|
<el-button type="primary" @click="search">
|
||||||
查询
|
查询
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -119,7 +119,10 @@ export default {
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
search() {
|
||||||
|
this.tableData.page = 1
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 获取挂账人列表
|
* 获取挂账人列表
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,13 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<template>
|
<template>
|
||||||
<el-form-item>
|
<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-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<el-form-item>
|
<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-button @click="resetHandle">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -161,6 +161,10 @@ export default {
|
||||||
// this.tbShopCategoryGet()
|
// this.tbShopCategoryGet()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
search() {
|
||||||
|
this.query.page = 1
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 获取明细数据
|
* 获取明细数据
|
||||||
*/
|
*/
|
||||||
|
|
@ -172,6 +176,7 @@ export default {
|
||||||
let params = {
|
let params = {
|
||||||
page: this.query.page,
|
page: this.query.page,
|
||||||
size: this.query.size,
|
size: this.query.size,
|
||||||
|
status: this.query.status,
|
||||||
creditBuyerId: this.query.creditBuyerId
|
creditBuyerId: this.query.creditBuyerId
|
||||||
}
|
}
|
||||||
if (this.query.createdAt.length > 0) {
|
if (this.query.createdAt.length > 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue