Commit 9726fdd5 authored by yaya's avatar yaya

feat: 完成结款

parent d4179fa0
...@@ -119,3 +119,10 @@ export function exportUserBillDetail(data) { ...@@ -119,3 +119,10 @@ export function exportUserBillDetail(data) {
data data
}) })
} }
export function finishSettlement(data) {
return request({
url: '/sysFinance/finishSettlement',
method: 'post',
data
})
}
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
</template> </template>
<script> <script>
import { MessageBox } from 'element-ui'
import { finishSettlement } from '@/api/business/order' import { finishSettlement } from '@/api/business/order'
import { uploadPath } from '@/api/business/storage' import { uploadPath } from '@/api/business/storage'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
...@@ -89,24 +88,15 @@ export default { ...@@ -89,24 +88,15 @@ export default {
} }
if (this.fianceItem.billId) { if (this.fianceItem.billId) {
const params = { billId: this.fianceItem.billId, voucher: this.finishForm.images[0] } const params = { billId: this.fianceItem.billId, voucher: this.finishForm.images[0] }
this.$refs.cancel.validate((valid) => {
if (valid) {
finishSettlement(params) finishSettlement(params)
.then(response => { .then(response => {
this.$notify.success({ this.$notify.success({
message: '操作成功' message: '操作成功'
}) })
this.cancelForm = {} this.finishForm = {}
this.$emit('refreshItem', this.fianceItem.billId) this.$emit('refreshItem', this.fianceItem.billId)
}) })
.catch(response => { .catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
this.$emit('refreshItem', this.fianceItem.billId)
})
}
}) })
} }
}, },
......
...@@ -273,7 +273,7 @@ export default { ...@@ -273,7 +273,7 @@ export default {
} }
}, },
handleFinishSuccess(billId) { handleFinishSuccess(billId) {
this.list = this.list.filter((item) => { this.list = this.list.map((item) => {
if (item.billId === billId) { if (item.billId === billId) {
item.state = 1 item.state = 1
return item return item
......
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