Browse Source

完善销售单

master
yunuo970428 6 months ago
parent
commit
169ddd9c16
  1. 22
      yxt-as-ui/src/views/operation/salesticket/salesticket.vue

22
yxt-as-ui/src/views/operation/salesticket/salesticket.vue

@ -158,6 +158,7 @@ export default {
tableKey: 0,
list: [],
sids: [], // SIDs
multipleSelection: [],
FormLoading: false,
listLoading: false,
//
@ -224,6 +225,7 @@ export default {
},
// sid
handleSelectionChange(row) {
this.multipleSelection = row
const aa = []
row.forEach(element => {
aa.push(element.sid)
@ -326,14 +328,18 @@ export default {
},
toSettle() {
if (this.sids.length === 1) {
req.settle(this.sids[0]).then((res) => {
if (res.success) {
this.viewState = 5
this.$refs['divSettle'].showAdd({ sid: this.sids[0] })
} else {
this.$message({ showClose: true, type: 'error', message: res.msg })
}
})
if (this.multipleSelection[0].state !== '已结算') {
req.settle(this.sids[0]).then((res) => {
if (res.success) {
this.viewState = 5
this.$refs['divSettle'].showAdd({ sid: this.sids[0] })
} else {
this.$message({ showClose: true, type: 'error', message: res.msg })
}
})
} else {
this.$message({ showClose: true, type: 'error', message: '请选择单据状态为未结算的进行操作' })
}
} else {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' })
}

Loading…
Cancel
Save