Commit 9726fdd5 authored by yaya's avatar yaya

feat: 完成结款

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