|
@ -71,6 +71,8 @@ |
|
|
:detailAllSchemasRules="InventorymoveRecordDetailRules" |
|
|
:detailAllSchemasRules="InventorymoveRecordDetailRules" |
|
|
:apiPage="InventorymoveRecordDetailApi.getInventorymoveRecordDetailPage" |
|
|
:apiPage="InventorymoveRecordDetailApi.getInventorymoveRecordDetailPage" |
|
|
/> |
|
|
/> |
|
|
|
|
|
<!-- 标签打印 --> |
|
|
|
|
|
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccessLabel" /> |
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
|
<ImportForm ref="importFormRef" url="/wms/inventorymove-record-main/importMove" :importTemplateData="importTemplateData" |
|
|
<ImportForm ref="importFormRef" url="/wms/inventorymove-record-main/importMove" :importTemplateData="importTemplateData" |
|
|
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :fromInventoryStatus= "fromInventoryStatus" :toInventoryStatus="toInventoryStatus" /> |
|
|
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :fromInventoryStatus= "fromInventoryStatus" :toInventoryStatus="toInventoryStatus" /> |
|
@ -80,6 +82,14 @@ |
|
|
import download from '@/utils/download' |
|
|
import download from '@/utils/download' |
|
|
import { InventorymoveRecordMain,InventorymoveRecordMainRules,InventorymoveRecordDetail,InventorymoveRecordDetailRules } from './inventorymoveRecordMain.data' |
|
|
import { InventorymoveRecordMain,InventorymoveRecordMainRules,InventorymoveRecordDetail,InventorymoveRecordDetailRules } from './inventorymoveRecordMain.data' |
|
|
import { InventorymoveRequestMain,InventorymoveRequestMainRules,InventorymoveRequestDetail,InventorymoveRequestDetailRules } from './inventorymoveRecordRequestMain.data' |
|
|
import { InventorymoveRequestMain,InventorymoveRequestMainRules,InventorymoveRequestDetail,InventorymoveRequestDetailRules } from './inventorymoveRecordRequestMain.data' |
|
|
|
|
|
import { |
|
|
|
|
|
SupplierdeliverRequestPackage |
|
|
|
|
|
} from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data' |
|
|
|
|
|
|
|
|
|
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
|
|
|
|
|
|
|
|
import * as PackageApi from '@/api/wms/package' |
|
|
|
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
import * as InventorymoveRequestMainApi from '@/api/wms/inventorymoveRequestMain' |
|
|
import * as InventorymoveRequestMainApi from '@/api/wms/inventorymoveRequestMain' |
|
|
import * as InventorymoveRecordMainApi from '@/api/wms/inventorymoveRecordMain' |
|
|
import * as InventorymoveRecordMainApi from '@/api/wms/inventorymoveRecordMain' |
|
|
import * as InventorymoveRecordDetailApi from '@/api/wms/inventorymoveRecordDetail' |
|
|
import * as InventorymoveRecordDetailApi from '@/api/wms/inventorymoveRecordDetail' |
|
@ -165,17 +175,77 @@ const openForm =async (type: string, row?: number) => { |
|
|
formRef.value.open(type, row) |
|
|
formRef.value.open(type, row) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const butttondata = (row,$index) => { |
|
|
const butttondata = (row,$index) => { |
|
|
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 |
|
|
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 |
|
|
if(findIndex>-1&&findIndex<$index){ |
|
|
if(findIndex>-1&&findIndex<$index){ |
|
|
return [] |
|
|
return [] |
|
|
} |
|
|
} |
|
|
return [] |
|
|
return [ |
|
|
|
|
|
defaultButtons.mainListPointBtn(null), // 标签打印 |
|
|
|
|
|
] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
|
|
if (val == 'point') { // 标签打印 |
|
|
|
|
|
labelPrint(row) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
const BASE_URL = getJmreportBaseUrl() |
|
|
|
|
|
// 标签打印 |
|
|
|
|
|
const searchTableRef = ref() |
|
|
|
|
|
const labelType = ref('') // 标签类别 采购还是制造等 |
|
|
|
|
|
const labelPrint = async (row) => { |
|
|
|
|
|
tableObject.loading = true |
|
|
|
|
|
//获取类型 |
|
|
|
|
|
let resType = await PackageApi.getPackagePage({ |
|
|
|
|
|
requestNumber: row.number |
|
|
|
|
|
}) |
|
|
|
|
|
if(resType.list.length > 0){ |
|
|
|
|
|
if (resType.list[0].productionLineCode != null) { |
|
|
|
|
|
labelType.value = 'zz' |
|
|
|
|
|
} else { |
|
|
|
|
|
labelType.value = 'cg' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
const defaultParams = {'moduleName':'productreceipt_predict','tableName':'record_productreceipt_main','recordNumber':row.number} |
|
|
|
|
|
const {tableObject:tableObjectPrint ,tableMethods} = useTable({ |
|
|
|
|
|
defaultParams, |
|
|
|
|
|
getListApi: PackageApi.getLabelDetailPage // 分页接口 |
|
|
|
|
|
}) |
|
|
|
|
|
// 获得表格的各种操作 |
|
|
|
|
|
const { getList:getListPrint } = tableMethods |
|
|
|
|
|
getListPrint() |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns |
|
|
|
|
|
tableColumns.forEach((item) => { |
|
|
|
|
|
item.width = item.table?.width || 150 |
|
|
|
|
|
}) |
|
|
|
|
|
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true) |
|
|
|
|
|
} |
|
|
|
|
|
// 批量打印--预生产收货 |
|
|
|
|
|
const searchTableSuccessLabel = async (formField, searchField, val, formRef, type, row) => { |
|
|
|
|
|
console.log('批量打印',val) |
|
|
|
|
|
|
|
|
|
|
|
if(val.length == 0){ |
|
|
|
|
|
message.warning("请先选择要打印的数据!") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
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 { wsCache } = useCache() |
|
|
const { wsCache } = useCache() |
|
|