|
@ -76,7 +76,23 @@ |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 标签打印 --> |
|
|
<!-- 标签打印 --> |
|
|
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccessLabel" /> |
|
|
// <SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccessLabel" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<BasicForm |
|
|
|
|
|
ref="labelPointFormRef" |
|
|
|
|
|
@success="getList" |
|
|
|
|
|
:tableAllSchemas="SupplierdeliverRequestPackage.allSchemas" |
|
|
|
|
|
:tableFormRules="SupplierdeliverRequestPackageRules" |
|
|
|
|
|
:tableData="detatableData1" |
|
|
|
|
|
:isBusiness="true" |
|
|
|
|
|
:isShowButton="false" |
|
|
|
|
|
@searchTableSuccess="searchTableSuccessLabel" |
|
|
|
|
|
:isShowReduceButton="false" |
|
|
|
|
|
@clearInput="clearInput" |
|
|
|
|
|
:footButttondata="footButttondata" |
|
|
|
|
|
@footButtonClick="footButtonClick" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
|
<ImportForm |
|
|
<ImportForm |
|
@ -103,8 +119,10 @@ import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
import { |
|
|
import { |
|
|
SupplierdeliverRequestPackage |
|
|
SupplierdeliverRequestPackage, |
|
|
|
|
|
SupplierdeliverRequestPackageRules |
|
|
} from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data' |
|
|
} from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data' |
|
|
|
|
|
console.log(222,SupplierdeliverRequestPackage) |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
// 库存余额 |
|
|
// 库存余额 |
|
|
defineOptions({ name: 'Balance' }) |
|
|
defineOptions({ name: 'Balance' }) |
|
@ -309,23 +327,21 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
|
|
|
|
|
|
const BASE_URL = getJmreportBaseUrl() |
|
|
const BASE_URL = getJmreportBaseUrl() |
|
|
const labelType = ref('') // 标签类别 采购还是制造等 |
|
|
const labelType = ref('') // 标签类别 采购还是制造等 |
|
|
|
|
|
const labelPointFormRef = ref() |
|
|
|
|
|
const detatableData1 = ref([]) |
|
|
const handlePoint = async (row) => { |
|
|
const handlePoint = async (row) => { |
|
|
console.log(2333) |
|
|
await getLabelDetailPage(row,false) |
|
|
tableObject.loading = true |
|
|
labelPointFormRef.value.open('create', row, null, 'createLabel') //创建标签页面 createLabel 标题 |
|
|
//获取类型 |
|
|
|
|
|
// await getLabelType(row,false) |
|
|
|
|
|
await getLabelDetailPage(row, false) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const searchTableRef = ref() |
|
|
const searchTableRef = ref() |
|
|
|
|
|
|
|
|
const getLabelDetailPage = async (row, useToPackingNumber) => { |
|
|
const getLabelDetailPage = async (row, useToPackingNumber) => { |
|
|
////英泰项目没有包装号 所以只能通过物料号,批次,到库位代码去查询对应的包装 |
|
|
////英泰项目没有包装号 所以只能通过物料号,批次,到库位代码去查询对应的包装 |
|
|
let defaultParams = { |
|
|
let defaultParams = { |
|
|
moduleName: 'move', |
|
|
moduleName: 'move', |
|
|
recordNumber: '', |
|
|
recordNumber: '', |
|
|
itemCode: row.itemCode, |
|
|
itemCode: row.itemCode, |
|
|
|
|
|
packQty: row.packQty, |
|
|
batch: row.batch |
|
|
batch: row.batch |
|
|
} |
|
|
} |
|
|
const { tableObject: tableObjectPrint, tableMethods } = useTable({ |
|
|
const { tableObject: tableObjectPrint, tableMethods } = useTable({ |
|
@ -335,13 +351,21 @@ const getLabelDetailPage = async (row, useToPackingNumber) => { |
|
|
// 获得表格的各种操作 |
|
|
// 获得表格的各种操作 |
|
|
const { getList: getListPrint } = tableMethods |
|
|
const { getList: getListPrint } = tableMethods |
|
|
await getListPrint() |
|
|
await getListPrint() |
|
|
console.log('tableObjectPrint', tableObjectPrint) |
|
|
|
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns |
|
|
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns |
|
|
tableColumns.forEach((item) => { |
|
|
tableColumns.forEach((item) => { |
|
|
item.width = item.table?.width || 150 |
|
|
item.width = item.table?.width || 150 |
|
|
}) |
|
|
}) |
|
|
searchTableRef.value.openData('标签信息', tableObjectPrint, { tableColumns }, true) |
|
|
detatableData1.value = tableObjectPrint.tableList |
|
|
|
|
|
detatableData1.value.forEach(item => { |
|
|
|
|
|
if (!item.batch) { |
|
|
|
|
|
item.batch = formatDate(new Date(),'YYYYMMDD') |
|
|
|
|
|
item['disabled_batch'] = false |
|
|
|
|
|
} else { |
|
|
|
|
|
item['disabled_batch'] = true |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
// searchTableRef.value.openData('标签信息', tableObjectPrint, { tableColumns }, true) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 批量打印--预生产收货 |
|
|
// 批量打印--预生产收货 |
|
@ -440,6 +464,44 @@ const changeTabs = (item) => { |
|
|
apiPage.value = '' |
|
|
apiPage.value = '' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
const footButttondata = ref([ |
|
|
|
|
|
defaultButtons.formSureBtn(null), // 确定 |
|
|
|
|
|
defaultButtons.formCloseBtn(null) // BOM关闭 |
|
|
|
|
|
]) |
|
|
|
|
|
const footButtonClick = async (val) => { |
|
|
|
|
|
if (val == 'sure') { |
|
|
|
|
|
const validateForm = await labelPointFormRef.value.tableFormRef.validateForm() |
|
|
|
|
|
// console.log(11,detatableData1.value) |
|
|
|
|
|
if (!validateForm) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
pointLabel() |
|
|
|
|
|
} else if (val == 'close') { |
|
|
|
|
|
labelPointFormRef.value.dialogVisible = false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
const pointLabel = async () => { |
|
|
|
|
|
const array =detatableData1.value.map(item=>{ |
|
|
|
|
|
return { |
|
|
|
|
|
packingNumber:item.number, |
|
|
|
|
|
batch: item.batch, |
|
|
|
|
|
printQty:item.printQty, |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
console.log(array) |
|
|
|
|
|
const isHave = detatableData1.value.find(item => parseFloat(item.printQty) <= 0) |
|
|
|
|
|
if(isHave){ |
|
|
|
|
|
message.error(`物料号${isHave.itemCode}打印数量不可以为0`) |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
await PackageApi.batchPrintingLable({pointParams:array}).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('创建标签失败') |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|