|
@@ -412,23 +412,35 @@ export default {
|
|
|
}
|
|
|
this.editForm.items = JSON.stringify(this.invoiceList)
|
|
|
this.editForm.totalAmount = this.totalCost
|
|
|
- this.$axios.post("/expense-sheet/add", this.editForm)
|
|
|
+ // 获取新的票据编号
|
|
|
+ this.$axios.post("/expense-sheet/getNextCode", {})
|
|
|
.then(res => {
|
|
|
if(res.code == "ok") {
|
|
|
- this.$toast.success('填报成功')
|
|
|
- this.editForm = {
|
|
|
- ownerId: '',
|
|
|
- createDate: '',
|
|
|
- ticketNum: 0,
|
|
|
- type: 0,
|
|
|
- remark: ''
|
|
|
- }
|
|
|
- this.invoiceList = []
|
|
|
- this.uploader = []
|
|
|
+ this.editForm.code = res.data
|
|
|
+ // 提交
|
|
|
+ this.$axios.post("/expense-sheet/add", this.editForm)
|
|
|
+ .then(res => {
|
|
|
+ if(res.code == "ok") {
|
|
|
+ this.$toast.success('填报成功')
|
|
|
+ this.editForm = {
|
|
|
+ ownerId: '',
|
|
|
+ createDate: '',
|
|
|
+ ticketNum: 0,
|
|
|
+ type: 0,
|
|
|
+ remark: ''
|
|
|
+ }
|
|
|
+ this.invoiceList = []
|
|
|
+ this.uploader = []
|
|
|
+ } else {
|
|
|
+ this.$toast.fail('获取失败');
|
|
|
+ }
|
|
|
+ }).catch(err=> {this.$toast.clear();console.log(err)});
|
|
|
} else {
|
|
|
this.$toast.fail('获取失败');
|
|
|
}
|
|
|
}).catch(err=> {this.$toast.clear();console.log(err)});
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
// #endregion
|
|
|
|