Browse Source

隐藏按钮

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

Loading…
Cancel
Save