diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts
index 6e5f737b3..64fa7a581 100644
--- a/src/utils/disposition/defaultButtons.ts
+++ b/src/utils/disposition/defaultButtons.ts
@@ -235,6 +235,20 @@ export function defaultDeselectAllBtn(option: any) {
hasPermi: ''
})
}
+// form表单-保存按钮
+export function formSureBtn(option: any) {
+ return __defaultBtnOption(option, {
+ label: t(`ts.确定`).replace('ts.', ''),
+ name: 'sure',
+ hide: false,
+ type: 'primary',
+ icon: 'ep:select',
+ color: '',
+ float: 'right',
+ hasPermi: ''
+ })
+}
+
// form表单-保存按钮
export function formSaveBtn(option: any) {
return __defaultBtnOption(option, {
diff --git a/src/views/wms/inventoryManage/balance/index.vue b/src/views/wms/inventoryManage/balance/index.vue
index e7a9443a3..5424d1a18 100644
--- a/src/views/wms/inventoryManage/balance/index.vue
+++ b/src/views/wms/inventoryManage/balance/index.vue
@@ -76,7 +76,23 @@
/>
-
+ //
+
+
+
{
const BASE_URL = getJmreportBaseUrl()
const labelType = ref('') // 标签类别 采购还是制造等
-
+const labelPointFormRef = ref()
+const detatableData1 = ref([])
const handlePoint = async (row) => {
- console.log(2333)
- tableObject.loading = true
- //获取类型
- // await getLabelType(row,false)
- await getLabelDetailPage(row, false)
+ await getLabelDetailPage(row,false)
+ labelPointFormRef.value.open('create', row, null, 'createLabel') //创建标签页面 createLabel 标题
}
const searchTableRef = ref()
-
const getLabelDetailPage = async (row, useToPackingNumber) => {
////英泰项目没有包装号 所以只能通过物料号,批次,到库位代码去查询对应的包装
let defaultParams = {
moduleName: 'move',
recordNumber: '',
itemCode: row.itemCode,
+ packQty: row.packQty,
batch: row.batch
}
const { tableObject: tableObjectPrint, tableMethods } = useTable({
@@ -335,13 +351,21 @@ const getLabelDetailPage = async (row, useToPackingNumber) => {
// 获得表格的各种操作
const { getList: getListPrint } = tableMethods
await getListPrint()
- console.log('tableObjectPrint', tableObjectPrint)
tableObject.loading = false
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
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 = ''
}
}
+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 () => {
getList()
diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
index 41d128832..081aa73be 100644
--- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
+++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
@@ -1775,16 +1775,32 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive([
- {
- label: '包装号',
- field: 'number',
- sort: 'custom',
- isSearch: true,
- table: {
- fixed: 'left'
- },
- },
+ // {
+ // label: '包装号',
+ // field: 'number',
+ // sort: 'custom',
+ // isSearch: true,
+ // table: {
+ // },
+ // tableForm: {
+ // disabled: true
+ // }
+ // },
{
label: '物料代码',
field: 'itemCode',
@@ -1792,21 +1808,48 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive