提交 3c2cb2b2 authored 作者: lihuihui's avatar lihuihui

update: 发票管理,项目列表开发完毕

上级 509a164d
...@@ -6,3 +6,13 @@ import httpRequest from '@/utils/axios' ...@@ -6,3 +6,13 @@ import httpRequest from '@/utils/axios'
export function getInvoiceList(params) { export function getInvoiceList(params) {
return httpRequest.get('/api/finance/v1/invoices/list', { params }).then({}) return httpRequest.get('/api/finance/v1/invoices/list', { params }).then({})
} }
// 获取支付过滤条件
export function getCondition(params) {
return httpRequest.get('/api/finance/v1/payments/condition', { params })
}
// 分配发票跟进人
export function assignSales(data) {
return httpRequest.post('/api/finance/v1/invoices/assign-sales', data, {})
}
<template> <template>
<div> <div>
<el-dialog title="分配票据跟进人" center :visible.sync="visible" :before-close="modalClose"> <el-dialog title="分配票据跟进人" center v-bind="$attrs" v-on="$listeners">
<el-form :model="form"> <el-form :model="form">
<el-form-item label="票据跟进人"> <el-form-item label="票据跟进人">
<el-select v-model="form.region" placeholder="请选择活动区域"> <el-select v-model="form.value" placeholder="请选择活动区域">
<el-option label="区域一" value="shanghai"></el-option> <el-option
<el-option label="区域二" value="beijing"></el-option> v-for="(item, index) in options"
:key="index"
:label="item.user_name"
:value="item.user_id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="$emit('dialogHide')">取 消</el-button> <el-button @click="$emit('update:visible', false)">取 消</el-button>
<el-button type="primary" @click="$emit('dialogHide')">确 定</el-button> <el-button type="primary" @click="assignSales">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { assignSales } from '../api'
export default { export default {
props: { props: {
visible: { options: { type: Array },
type: Boolean, invoicesIds: { type: Array }
default: false
}
}, },
data() { data() {
return { return {
form: { form: {
name: '', value: ''
region: '',
date1: '',
date2: '',
delivery: false,
type: [],
resource: '',
desc: ''
} }
} }
}, },
methods: { methods: {
modalClose() { modalClose() {
this.$emit('update:visible', false) this.$emit('update:visible', false)
},
assignSales() {
const ids = this.invoicesIds.map(item => item.id)
const params = {
invoices_id: ids.join(','),
sales_rep_user_id: this.form.value
}
assignSales(params).then(res => {
this.$emit('update:visible', false)
this.$emit('success')
})
} }
} }
} }
......
...@@ -216,6 +216,7 @@ export default { ...@@ -216,6 +216,7 @@ export default {
], ],
moreFilters: [ moreFilters: [
{ {
prop: 'sales_rep_user_id',
label: '跟进人', label: '跟进人',
type: 'select', type: 'select',
placeholder: '跟进人', placeholder: '跟进人',
...@@ -226,6 +227,7 @@ export default { ...@@ -226,6 +227,7 @@ export default {
remote: true remote: true
}, },
{ {
prop: 'invoice_type',
label: '发票类型', label: '发票类型',
type: 'select', type: 'select',
placeholder: '发票类型', placeholder: '发票类型',
......
<template> <template>
<div> <div>
<app-card style="max-width: 100%"> <app-card style="max-width: 100%">
<app-list v-bind="tableOptions" ref="list" @selection-change="handleSelectionChange"> <app-list v-bind="tableOptions" ref="list">
<template v-slot:table-x="{ row }"> <template v-slot:table-x="{ row }">
<router-link :to="{ name: 'invoiceView', params: { id: row.id } }"> <router-link :to="{ name: 'invoiceView', params: { id: row.id } }">
<el-button type="text">查看</el-button> <el-button type="text">查看</el-button>
...@@ -94,22 +94,6 @@ export default { ...@@ -94,22 +94,6 @@ export default {
] ]
} }
} }
},
methods: {
beforeRequest(params, isReset) {
// 重置
if (isReset) {
params.price_min = ''
params.price_max = ''
}
params.status = this.activeName === '0' ? '' : this.activeName
params.price_zone = `${params.price_min || ''},${params.price_max || ''}`
return params
},
// 选择
handleSelectionChange(value) {
this.multipleSelection = value
}
} }
} }
</script> </script>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论