|
@ -21,7 +21,7 @@ |
|
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
<!-- 列表 --> |
|
|
<ContentWrap > |
|
|
<ContentWrap > |
|
|
<Table |
|
|
<Table v-clientTable |
|
|
:columns="tableColumns" |
|
|
:columns="tableColumns" |
|
|
:data="tableObject.tableList" |
|
|
:data="tableObject.tableList" |
|
|
:loading="tableObject.loading" |
|
|
:loading="tableObject.loading" |
|
@ -147,6 +147,10 @@ |
|
|
</template> |
|
|
</template> |
|
|
</BasicForm> |
|
|
</BasicForm> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 标签打印 --> |
|
|
|
|
|
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
@ -159,7 +163,8 @@ import { |
|
|
SupplierdeliverRequestMainRules, |
|
|
SupplierdeliverRequestMainRules, |
|
|
SupplierdeliverRequestDetail, |
|
|
SupplierdeliverRequestDetail, |
|
|
SupplierdeliverRequestDetailRules, |
|
|
SupplierdeliverRequestDetailRules, |
|
|
SupplierdeliverRequestDetailLabel |
|
|
SupplierdeliverRequestDetailLabel, |
|
|
|
|
|
SupplierdeliverRequestPackage |
|
|
} from './supplierdeliverRequestMain.data' |
|
|
} from './supplierdeliverRequestMain.data' |
|
|
import { SupplierdeliverInspectionDetail} from '../supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data' |
|
|
import { SupplierdeliverInspectionDetail} from '../supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data' |
|
|
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' |
|
|
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' |
|
@ -168,6 +173,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail' |
|
|
import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail' |
|
|
import * as ItembasicApi from '@/api/wms/itembasic' |
|
|
import * as ItembasicApi from '@/api/wms/itembasic' |
|
|
import * as SupplierdeliverInspectionDetailApi from '@/api/wms/supplierdeliverInspectionDetail' |
|
|
import * as SupplierdeliverInspectionDetailApi from '@/api/wms/supplierdeliverInspectionDetail' |
|
|
|
|
|
import * as PackageApi from '@/api/wms/package' |
|
|
import { PurchasePlanDetail } from '../purchasePlanMain/purchasePlanMain.data' |
|
|
import { PurchasePlanDetail } from '../purchasePlanMain/purchasePlanMain.data' |
|
|
import { addDay } from '@/utils/formatTime' |
|
|
import { addDay } from '@/utils/formatTime' |
|
|
|
|
|
|
|
@ -752,8 +758,60 @@ const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) |
|
|
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) |
|
|
|
|
|
|
|
|
// 标签打印 |
|
|
// 标签打印 |
|
|
|
|
|
const searchTableRef = ref() |
|
|
const labelPrint = async (row) => { |
|
|
const labelPrint = async (row) => { |
|
|
window.open(src.value + '&asn_number=' + row.asnNumber) |
|
|
tableObject.loading = true |
|
|
|
|
|
const subTableDFata = await PackageApi.getLabel(row.masterId) |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
const tableObject1 = { |
|
|
|
|
|
// 当前页 |
|
|
|
|
|
currentPage: 1, |
|
|
|
|
|
// 导出加载中 |
|
|
|
|
|
exportLoading: false, |
|
|
|
|
|
// 加载中 |
|
|
|
|
|
loading: false, |
|
|
|
|
|
// 页数 |
|
|
|
|
|
pageSize: subTableDFata.length, |
|
|
|
|
|
params:null, |
|
|
|
|
|
// 排序 |
|
|
|
|
|
sort: { |
|
|
|
|
|
order: '', // 排序规则 |
|
|
|
|
|
prop: '' // 排序字段 |
|
|
|
|
|
}, |
|
|
|
|
|
// 总条数 |
|
|
|
|
|
total: subTableDFata.length, |
|
|
|
|
|
// 表格数据 |
|
|
|
|
|
tableList: subTableDFata, |
|
|
|
|
|
currentRow:null |
|
|
|
|
|
} |
|
|
|
|
|
console.log("标签打印",subTableDFata,tableObject1,SupplierdeliverRequestPackage.allSchemas) |
|
|
|
|
|
|
|
|
|
|
|
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns |
|
|
|
|
|
|
|
|
|
|
|
tableColumns.forEach((item) => { |
|
|
|
|
|
item.width = item.table?.width || 150 |
|
|
|
|
|
}) |
|
|
|
|
|
searchTableRef.value.openData("采购收货记录单号",tableObject1,{tableColumns},true) |
|
|
|
|
|
|
|
|
|
|
|
// window.open(src.value + '&asn_number=' + row.asnNumber) |
|
|
|
|
|
} |
|
|
|
|
|
// 批量打印 |
|
|
|
|
|
const searchTableSuccess1 = async (formField, searchField, val, formRef, type, row) => { |
|
|
|
|
|
let rows:any = [] |
|
|
|
|
|
val.forEach(item=>{ |
|
|
|
|
|
rows = [...rows,...item.selectionRows.map(item1=>item1.id)] |
|
|
|
|
|
}) |
|
|
|
|
|
if(rows.length == 0){ |
|
|
|
|
|
message.warning("请先选择要打印的数据!") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
await PackageApi.batchPrintingLable(rows.join(',')).then(res => { |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
window.open(src.value + '&asn_number=' + res) |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
message.error('创建标签失败') |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const print = async () => { |
|
|
const print = async () => { |
|
|