Browse Source

完善采购渠道

master
yunuo970428 1 year ago
parent
commit
ecda21d255
  1. 9
      anrui-scm/anrui-scm-ui/src/api/purchasingchannels/purchasingchannels.js
  2. 4
      anrui-scm/anrui-scm-ui/src/views/purchasingchannels/caigouqudaoselected.vue
  3. 27
      anrui-scm/anrui-scm-ui/src/views/purchasingchannels/caigouqudaotobeselected.vue

9
anrui-scm/anrui-scm-ui/src/api/purchasingchannels/purchasingchannels.js

@ -18,5 +18,14 @@ export default {
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 作废
cancel: function(data) {
return request({
url: '/scm/v1/scmpurchasechannel/cancel',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
}
}

4
anrui-scm/anrui-scm-ui/src/views/purchasingchannels/caigouqudaoselected.vue

@ -356,10 +356,10 @@ export default {
this.init()
},
tobeSelect() {
if (this.sids.length === 1) {
if (this.sids.length > 0) {
this.dialogVisible = true
} else {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' })
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行操作' })
return
}
},

27
anrui-scm/anrui-scm-ui/src/views/purchasingchannels/caigouqudaotobeselected.vue

@ -185,6 +185,13 @@ export default {
btnKey: 'tobeSelect',
btnLabel: '选择'
},
{
type: 'danger',
size: 'small',
icon: '',
btnKey: 'doCancellation',
btnLabel: '作废'
},
{
type: 'info',
size: 'small',
@ -284,6 +291,9 @@ export default {
case 'tobeSelect':
this.tobeSelect()
break
case 'doCancellation':
this.doCancellation()
break
case 'doClose':
this.doClose()
break
@ -353,11 +363,22 @@ export default {
})
},
tobeSelect() {
if (this.sids.length === 1) {
if (this.sids.length > 0) {
this.dialogVisible = true
} else {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' })
return
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行操作' })
}
},
doCancellation() {
if (this.sids.length > 0) {
req.cancel(this.sids).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '作废成功' })
this.getList()
}
})
} else {
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行操作' })
}
},
changeOrgDept(value) {

Loading…
Cancel
Save