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

Loading…
Cancel
Save