Browse Source

生产计划 生产备料计划和制品收货拆分按钮

hella_online_20240829
陈薪名 4 months ago
parent
commit
75ffc33aeb
  1. 10
      src/api/wms/productionMain/index.ts
  2. 31
      src/views/wms/productionManage/productionplan/productionMain/index.vue
  3. 2
      src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts
  4. 28
      src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue
  5. 2
      src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts
  6. 28
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue
  7. 2
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts
  8. 28
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue
  9. 2
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts

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

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

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

@ -253,7 +253,7 @@ const butttondata = (row,$index) => {
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',
@ -262,6 +262,16 @@ const butttondata = (row,$index) => {
link: true, // link: true, //
color: '' color: ''
}, },
{
label: '生成收货申请',
name: 'scshsq',
hide: isShowMainButton(row,['6']),
type: 'primary',
icon: 'Select',
hasPermi:'wms:production-main:publish',
link: true, //
color: ''
},
] ]
} }
@ -364,9 +374,21 @@ const buttonTableClick = async (val, row) => {
}) })
} else if(val == 'scbljh') { } else if(val == 'scbljh') {
if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') if (row.available == 'FALSE') return message.warning('当前数据:【不可用】')
await message.confirm('确认要生成备料计划/收货申请吗?') await message.confirm('确认要生成备料计划吗?')
tableObject.loading = true
await ProductionMainApi.generatePreparetoissue(row.number).then(() => {
message.success(t('common.createSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if(val == 'scshsq') {
if (row.available == 'FALSE') return message.warning('当前数据:【不可用】')
await message.confirm('确认要生成收货申请吗?')
tableObject.loading = true tableObject.loading = true
await ProductionMainApi.generateRequest(row.number).then(() => { await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => {
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -374,7 +396,8 @@ const buttonTableClick = async (val, row) => {
tableObject.loading = false tableObject.loading = false
console.log(err) console.log(err)
}) })
} else if (val == 'edit') { // }
if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.masterId) handleDelete(row.masterId)

2
src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts

@ -558,7 +558,7 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false, isDetail: false,
isForm: false , isForm: false ,
table: { table: {
width: 220, width: 260,
fixed: 'right' fixed: 'right'
}, },
} }

28
src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue

@ -246,7 +246,7 @@ const butttondata = (row,$index) => {
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',
@ -255,6 +255,16 @@ const butttondata = (row,$index) => {
link: true, // link: true, //
color: '' color: ''
}, },
{
label: '生成收货申请',
name: 'scshsq',
hide: isShowMainButton(row,['6']),
type: 'primary',
icon: 'Select',
hasPermi:'wms:production-main:publish',
link: true, //
color: ''
},
] ]
} }
@ -357,9 +367,21 @@ const buttonTableClick = async (val, row) => {
}) })
} else if(val == 'scbljh') { } else if(val == 'scbljh') {
if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') if (row.available == 'FALSE') return message.warning('当前数据:【不可用】')
await message.confirm('确认要生成备料计划/收货申请吗?') await message.confirm('确认要生成备料计划吗?')
tableObject.loading = true
await ProductionMainApi.generatePreparetoissue(row.number).then(() => {
message.success(t('common.createSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if(val == 'scshsq') {
if (row.available == 'FALSE') return message.warning('当前数据:【不可用】')
await message.confirm('确认要生成收货申请吗?')
tableObject.loading = true tableObject.loading = true
await ProductionMainApi.generateRequest(row.number).then(() => { await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => {
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
tableObject.loading = false tableObject.loading = false
getList() getList()

2
src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts

@ -557,7 +557,7 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false, isDetail: false,
isForm: false , isForm: false ,
table: { table: {
width: 220, width: 260,
fixed: 'right' fixed: 'right'
}, },
} }

28
src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue

@ -246,7 +246,7 @@ const butttondata = (row,$index) => {
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',
@ -255,6 +255,16 @@ const butttondata = (row,$index) => {
link: true, // link: true, //
color: '' color: ''
}, },
{
label: '生成收货申请',
name: 'scshsq',
hide: isShowMainButton(row,['6']),
type: 'primary',
icon: 'Select',
hasPermi:'wms:production-main:publish',
link: true, //
color: ''
},
] ]
} }
@ -357,9 +367,21 @@ const buttonTableClick = async (val, row) => {
}) })
} else if(val == 'scbljh') { } else if(val == 'scbljh') {
if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') if (row.available == 'FALSE') return message.warning('当前数据:【不可用】')
await message.confirm('确认要生成备料计划/收货申请吗?') await message.confirm('确认要生成备料计划吗?')
tableObject.loading = true
await ProductionMainApi.generatePreparetoissue(row.number).then(() => {
message.success(t('common.createSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if(val == 'scshsq') {
if (row.available == 'FALSE') return message.warning('当前数据:【不可用】')
await message.confirm('确认要生成收货申请吗?')
tableObject.loading = true tableObject.loading = true
await ProductionMainApi.generateRequest(row.number).then(() => { await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => {
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
tableObject.loading = false tableObject.loading = false
getList() getList()

2
src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts

@ -549,7 +549,7 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false, isDetail: false,
isForm: false , isForm: false ,
table: { table: {
width: 220, width: 260,
fixed: 'right' fixed: 'right'
}, },
} }

28
src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue

@ -246,7 +246,7 @@ const butttondata = (row,$index) => {
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',
@ -255,6 +255,16 @@ const butttondata = (row,$index) => {
link: true, // link: true, //
color: '' color: ''
}, },
{
label: '生成收货申请',
name: 'scshsq',
hide: isShowMainButton(row,['6']),
type: 'primary',
icon: 'Select',
hasPermi:'wms:production-main:publish',
link: true, //
color: ''
},
] ]
} }
@ -357,9 +367,21 @@ const buttonTableClick = async (val, row) => {
}) })
} else if(val == 'scbljh') { } else if(val == 'scbljh') {
if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') if (row.available == 'FALSE') return message.warning('当前数据:【不可用】')
await message.confirm('确认要生成备料计划/收货申请吗?') await message.confirm('确认要生成备料计划吗?')
tableObject.loading = true
await ProductionMainApi.generatePreparetoissue(row.number).then(() => {
message.success(t('common.createSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if(val == 'scshsq') {
if (row.available == 'FALSE') return message.warning('当前数据:【不可用】')
await message.confirm('确认要生成收货申请吗?')
tableObject.loading = true tableObject.loading = true
await ProductionMainApi.generateRequest(row.number).then(() => { await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => {
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
tableObject.loading = false tableObject.loading = false
getList() getList()

2
src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts

@ -550,7 +550,7 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false, isDetail: false,
isForm: false , isForm: false ,
table: { table: {
width: 220, width: 260,
fixed: 'right' fixed: 'right'
}, },
} }

Loading…
Cancel
Save