Browse Source

隐藏按钮

master
chenfang 11 months ago
parent
commit
12f817be0a
  1. 6
      src/api/wms/productionMain/index.ts
  2. 48
      src/views/wms/productionManage/productionplan/productionMain/index.vue

6
src/api/wms/productionMain/index.ts

@ -109,9 +109,9 @@ export const resetting = (id) => {
}
// 创建备料计划/制品收货申请
export const generateRequest = (number) => {
return request.post({ url: '/wms/production-main/generateRequest?number=' + number })
}
// export const generateRequest = (number) => {
// return request.post({ url: '/wms/production-main/generateRequest?number=' + number })
// }

48
src/views/wms/productionManage/productionplan/productionMain/index.vue

@ -215,16 +215,16 @@ const butttondata = (row) => {
defaultButtons.mainListPlanResBtn({hide:isShowMainButton(row,['4']),hasPermi:'wms:production-main:resetting'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:update'}), //
// defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:delete'}), //
{
label: '生成备料计划/收货申请',
name: 'scbljh',
hide: isShowMainButton(row,['6']),
type: 'primary',
icon: 'Select',
hasPermi:'wms:production-main:publish',
link: true, //
color: ''
},
// {
// label: '/',
// name: 'scbljh',
// hide: isShowMainButton(row,['6']),
// type: 'primary',
// icon: 'Select',
// hasPermi:'wms:production-main:publish',
// link: true, //
// color: ''
// },
]
}
@ -325,19 +325,21 @@ const buttonTableClick = async (val, row) => {
tableObject.loading = false
console.log(err)
})
} else if(val == 'scbljh') {
if (row.available == 'FALSE') return message.warning('当前数据:【不可用】')
await message.confirm('确认要生成备料计划/收货申请吗?')
tableObject.loading = true
await ProductionMainApi.generateRequest(row.number).then(() => {
message.success(t('common.createSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'edit') { //
}
// else if(val == 'scbljh') {
// if (row.available == 'FALSE') return message.warning('')
// await message.confirm('/')
// tableObject.loading = true
// await ProductionMainApi.generateRequest(row.number).then(() => {
// message.success(t('common.createSuccess'))
// tableObject.loading = false
// getList()
// }).catch(err => {
// tableObject.loading = false
// console.log(err)
// })
// }
else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)

Loading…
Cancel
Save