Browse Source

重新生成标签

master_hella_20240701
zhaoxuebing 5 months ago
parent
commit
585e87a9c7
  1. 4
      src/api/wms/supplierdeliverRequestMain/index.ts
  2. 6
      src/locales/en-US.ts
  3. 7
      src/locales/zh-CN.ts
  4. 43
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  5. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

4
src/api/wms/supplierdeliverRequestMain/index.ts

@ -121,3 +121,7 @@ export const importTemplate = () => {
return request.download({ url: '/wms/supplierdeliver-request-main/get-import-template' })
}
// 删除之前的包装和标签
export const deleteOldLabels = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/deleteOldLabels?id=` + id })
}

6
src/locales/en-US.ts

@ -768,6 +768,7 @@ export default {
:'m',
:'㎡',
:'Generate label',
:'Regenerate label',
:'Create label',
1:'Packing Specification1',
2:'Package Specification2',
@ -1131,8 +1132,9 @@ export default {
:'Today',
:'Please enter the reason for rejection',
'驳回原因不能为空,且不超过60字':'The reason for rejection cannot be empty and cannot exceed 60 words',
:'Batch release'
:'Batch release',
'重新生成标签会删除上次生成的标签,是否确认继续?':'Regenerating labels will delete the last generated label. Are you sure you want to continue?',
'确 认':'Confirm'
},

7
src/locales/zh-CN.ts

@ -768,6 +768,7 @@ export default {
:'米',
:'平方米',
:'生成标签',
:'重新生成标签',
:'创建标签',
1:'包装规格1',
2:'包装规格2',
@ -1131,9 +1132,9 @@ export default {
:'今日',
:'请输入驳回原因',
'驳回原因不能为空,且不超过60字':'驳回原因不能为空,且不超过60字',
:'批量发布'
:'批量发布',
'重新生成标签会删除上次生成的标签,是否确认继续?':'重新生成标签会删除上次生成的标签,是否确认继续?',
'确 认':'确 认',
},
}

43
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -422,6 +422,19 @@ const isShowMainButtonLabel = (row, val) => {
}
}
//
const isReGenLabelShowMainButtonLabel = (row, val) => {
if (val.indexOf(row.status) > -1) {
if(row.labelStatus == '1'){
return true
}else{
return false
}
} else {
return true
}
}
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
@ -449,6 +462,16 @@ const butttondata = (row,$index) => {
hasPermi: 'wms:supplierdeliver-request-main:genLabels',
link: true //
},
{
label: t('ts.重新生成标签'),
name: 'ressbq',
hide: isReGenLabelShowMainButtonLabel(row, ['3']),
type: 'primary',
icon: '',
color: '',
hasPermi: 'wms:supplierdeliver-request-main:genLabels',
link: true //
},
defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','8']),hasPermi: 'wms:supplierdeliver-request-main:printLabel' }), //
//defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3','8']) }), //
//
@ -503,6 +526,26 @@ const buttonTableClick = async (val, row) => {
genLabelId.value = row.masterId
await getDetailList()
formLabelRef.value.open('create', row, null,'createLabel')// createLabel
} else if( val == 'ressbq'){
console.log("重新生成标签")
ElMessageBox.confirm(t('ts.重新生成标签会删除上次生成的标签,是否确认继续?'), '提示', {
confirmButtonText: t('ts.确 认'),
cancelButtonText: t('ts.取 消')
}).then(() => {
SupplierdeliverRequestMainApi.deleteOldLabels(row.masterId).then(async res =>{
if(res){
//
detatableData.params = {
masterId:row.masterId
}
genLabelId.value = row.masterId
await getDetailList()
formLabelRef.value.open('create', row, null,'createLabel')// createLabel
}
})
}).catch(() => {
console.info('操作取消')
})
} else if (val == 'point') {
//
labelPrint(row)

2
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

@ -507,7 +507,7 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
isDetail: false,
isForm: false,
table: {
width: 350,
width: 450,
fixed: 'right'
},
}

Loading…
Cancel
Save