Browse Source

号口品创建标签

intex_online20241228
张立 3 months ago
parent
commit
898b42ba51
  1. 15
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  2. 12
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
  3. 56
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

15
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -195,6 +195,7 @@ import * as ConfigApi from '@/api/infra/config'
import { usePageLoading } from '@/hooks/web/usePageLoading'
import {exportProductreceiptRequestMainPredict} from "@/api/wms/productreceiptRequestMain";
import * as ItemPackageApi from "@/api/wms/itempackage";
import * as ruleApi from '@/api/wms/rule/index'
const { loadStart, loadDone } = usePageLoading()
//
//
@ -481,6 +482,7 @@ const butttondata = (row, $index) => {
]
}
let toManagementPrecision = ref('')
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') {
@ -622,6 +624,19 @@ const buttonTableClick = async (val, row) => {
return
}
})
ruleApi.getManagementPrecision({
itemCodes: [item['itemCode']],
locationCode: item.toLocationCode
}).then((res) => {
toManagementPrecision.value = res[0].ManagementPrecision
})
if ( toManagementPrecision.value == 'BY_BATCH') {
// row['fromBatchFormItemType'] = 'FormDate'
row['disabled_batch'] = false
} else {
// row['fromBatchFormItemType'] = ''
row['disabled_batch'] = true
}
})
} else if (val == 'mainHandle') {
//

12
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

@ -1727,8 +1727,11 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
tableForm: {
disabled: true
}
disabled: true,
placeholder: '请选择从批次',
valueFormat: 'YYYYMMDD',
format: 'YYYYMMDD',
},
},
{
label: '数量',
@ -2131,6 +2134,9 @@ export const ProductreceiptRequestLabelRules = reactive({
],
productionLineCodePackage: [
{ required: true, message: '请选择生产线', trigger: 'change' }
]
],
batch: [
{ required: true, message: '请选择生产线', trigger: ['change','blur'] }
],
})

56
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -818,20 +818,50 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
return
}
// window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(','))
await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => {
console.log(res)
if (labelType.value == 'cg') {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res)
} else {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res)
}
}).catch(err => {
console.log(err)
message.error('创建标签失败')
let array = []//
let array1 = []//
let packingNumbers = []
val.forEach((item,index) => {
packingNumbers.push(item.number)
if (item.itemType == '可采购') {
array.push(item)
}
if (item.itemType == '可制造') {
array1.push(item)
}
})
if (array.length>0) {
await PackageApi.getPrintingLableId({packingNumbers:array.map(item1=>item1.number)}).then(res => {
console.log(res)
window.open(BASE_URL + '/jmreport/view/1016234988731322368?token=' + getAccessToken()+'&id=' + res)
}).catch(err => {
console.log(err)
message.error('创建标签失败')
})
}
if (array1.length > 0) {
await PackageApi.batchPrintingLable(array1.map(item1=>item1.number).join(',')).then(res => {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value + '&asn_number=' + res)
}).catch(err => {
console.log(err)
message.error('创建标签失败')
})
}
// await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => {
// console.log(res)
// if (labelType.value == 'cg') {
// const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
// window.open(src.value+'&asn_number='+res)
// } else {
// const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
// window.open(src.value+'&asn_number='+res)
// }
// }).catch(err => {
// console.log(err)
// message.error('')
// })
}
const getDefaultWorkshopCode = async () => {
const data = await ConfigApi.getConfigPage({

Loading…
Cancel
Save