|
|
@ -72,7 +72,29 @@ |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm ref="importFormRef" url="/wms/supplierdeliver-request-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|
|
|
<ImportForm ref="importFormRef" url="/wms/supplierdeliver-request-main/import" :importTemplateData="importTemplateData" |
|
|
|
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> |
|
|
|
|
|
|
|
<!-- 打印 --> |
|
|
|
<el-dialog v-model="dialogVisible " :title="dialogTitle" width="60%" > |
|
|
|
<Table |
|
|
|
:columns="detailListTableColumns" |
|
|
|
:data="detatableData.tableList" |
|
|
|
:loading="detatableData.loading" |
|
|
|
:pagination="{ |
|
|
|
total: detatableData.total |
|
|
|
}" |
|
|
|
v-model:pageSize="detatableData.pageSize" |
|
|
|
v-model:currentPage="detatableData.currentPage" |
|
|
|
v-model:sort="detatableData.sort" |
|
|
|
> |
|
|
|
<template #batch="{row}"> |
|
|
|
<el-input v-model="row.batch">{{ row.batch }}</el-input> |
|
|
|
</template> |
|
|
|
</Table> |
|
|
|
<el-button @click="closeDialog">关闭</el-button> |
|
|
|
<el-button @click="print">打印</el-button> |
|
|
|
</el-dialog> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
@ -82,6 +104,8 @@ import { SupplierdeliverRequestMain,SupplierdeliverRequestMainRules,Supplierdeli |
|
|
|
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' |
|
|
|
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
// import * as PackageApi from '@/api/wms/package' |
|
|
|
// import * as BarbasicApi from '@/api/wms/barbasic' |
|
|
|
|
|
|
|
// 供应商发货申请 |
|
|
|
defineOptions({ name: 'SupplierdeliverRequestMain' }) |
|
|
@ -209,7 +233,7 @@ const buttonTableClick = async (val, row) => { |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
|
handleDelete(row.id) |
|
|
|
} else if (val == 'point') { // 标签打印 |
|
|
|
handlePoint(row.number) |
|
|
|
handlePoint(row) |
|
|
|
} else if (val == 'documentPrint') { // 单据打印 |
|
|
|
handleDocumentPrint(row.id) |
|
|
|
} |
|
|
@ -257,19 +281,119 @@ const handleExport = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//打印 |
|
|
|
const {tableObject: detatableData,tableMethods: detatableMethods} =useTable({ |
|
|
|
getListApi: SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage |
|
|
|
}) |
|
|
|
|
|
|
|
const { getList:getDetailList } = detatableMethods |
|
|
|
|
|
|
|
const detailTableColumns = ref(SupplierdeliverRequestDetail.allSchemas.tableColumns) |
|
|
|
const detailListTableColumns = detailTableColumns.value.filter(item => item.label != '操作'&& item.label != '创建者'&&item.label != '创建时间'&&item.label != '最后更新者'&&item.label != '最后更新时间') |
|
|
|
const dialogVisible = ref(false) |
|
|
|
const isShow = ref(false) |
|
|
|
const dialogTitle = ref('') |
|
|
|
const closeDialog = () =>{ |
|
|
|
dialogVisible.value =false |
|
|
|
isShow.value = false |
|
|
|
} |
|
|
|
|
|
|
|
const BASE_URL = 'http://dev.ccwin-in.com:25110' |
|
|
|
const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken()) |
|
|
|
// 标签打印 |
|
|
|
const handlePoint = async (number) => { |
|
|
|
window.open(src.value+'&number='+number) |
|
|
|
//console.log(number); |
|
|
|
const handlePoint = async (row) => { |
|
|
|
tableObject.params = { |
|
|
|
masterId: row.id, |
|
|
|
} |
|
|
|
await getDetailList() |
|
|
|
dialogVisible.value = true |
|
|
|
dialogTitle.value = row.number + '单据号' |
|
|
|
} |
|
|
|
|
|
|
|
const print = async() => { |
|
|
|
//向包装表里插入数据 |
|
|
|
// const packageArray:any= ref([]) |
|
|
|
// let packageObject = { |
|
|
|
// itemCode: '', |
|
|
|
// itemName: '', |
|
|
|
// itemDesc1: '', |
|
|
|
// itemDesc2: '', |
|
|
|
// batch: '', |
|
|
|
// altBatch: '', |
|
|
|
// produceDate: '', |
|
|
|
// validityDays: '', |
|
|
|
// expireDate: '', |
|
|
|
// uom: '', |
|
|
|
// qty: '', |
|
|
|
// altUom: '', |
|
|
|
// altQty: '', |
|
|
|
// convertRate: '', |
|
|
|
// stdPackQty: '', |
|
|
|
// stdPackUnit: '', |
|
|
|
// toWarehouseCode: '', |
|
|
|
// toDockCode: '', |
|
|
|
// toLocationCode: '', |
|
|
|
// supplierCode: '', |
|
|
|
// supplierItemCode: '', |
|
|
|
// poNumber: '', |
|
|
|
// poLine: '', |
|
|
|
// rpNumber: '', |
|
|
|
// asnNumber: '', |
|
|
|
// } |
|
|
|
// //获取主表数据 |
|
|
|
// await SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage({ |
|
|
|
// number: detatableData.tableList[0].number |
|
|
|
// }).then(res => { |
|
|
|
// detatableData.tableList.forEach(item => { |
|
|
|
// packageObject.itemCode=item.itemCode |
|
|
|
// packageObject.itemName=item.itemName |
|
|
|
// packageObject.itemDesc1=item.itemDesc1 |
|
|
|
// packageObject.itemDesc2=item.itemDesc2 |
|
|
|
// packageObject.batch=item.batch |
|
|
|
// packageObject.altBatch=item.altBatch |
|
|
|
// packageObject.produceDate=item.produceDate |
|
|
|
// packageObject.expireDate=item.expireDate |
|
|
|
// packageObject.uom=item.uom |
|
|
|
// packageObject.qty=item.qty |
|
|
|
// packageObject.stdPackQty=item.stdPackQty |
|
|
|
// packageObject.stdPackUnit=item.stdPackUnit |
|
|
|
// packageObject.convertRate=item.convertRate |
|
|
|
// packageObject.poNumber=item.poNumber |
|
|
|
// packageObject.poLine=item.poLine |
|
|
|
// packageObject.supplierCode=res.list[0].supplierCode |
|
|
|
// packageObject.rpNumber=res.list[0].ppNumber |
|
|
|
// packageArray.value.push(packageObject) |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
// const barBasicArray:any =ref([]) |
|
|
|
// let barBasicObject = { |
|
|
|
// type: '', |
|
|
|
// template: '', |
|
|
|
// status: '', |
|
|
|
// relateNumber: '', |
|
|
|
// barcodeString: '', |
|
|
|
// printTimes: '', |
|
|
|
// lastPrintTime: '', |
|
|
|
// lastPrintUserId: '', |
|
|
|
// lastPrintUserName: '', |
|
|
|
// } |
|
|
|
// // 获取返回的包装号更新标签表 |
|
|
|
// await PackageApi.createPackage(JSON.parse(JSON.stringify(packageArray.value))).then(res => { |
|
|
|
// res.list.forEach(item => { |
|
|
|
// barBasicObject.type = 'PurchaseLabel' |
|
|
|
// barBasicObject.relateNumber = item.number |
|
|
|
// barBasicObject.status = 'NEW' |
|
|
|
// barBasicArray.value.push(barBasicObject) |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
// await BarbasicApi.createBarbasic(JSON.parse(JSON.stringify(barBasicArray.value))) |
|
|
|
window.open(src.value+'&number='+detatableData.tableList[0].number) |
|
|
|
} |
|
|
|
|
|
|
|
// 单据打印 |
|
|
|
const src1 = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken()) |
|
|
|
const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken()) |
|
|
|
const handleDocumentPrint = async (id) => { |
|
|
|
window.open(src1.value+'&id='+id) |
|
|
|
//console.log(number); |
|
|
|
window.open(documentSrc.value+'&id='+id) |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -340,4 +464,4 @@ onMounted(async () => { |
|
|
|
getList() |
|
|
|
importTemplateData.templateUrl = await SupplierdeliverRequestMainApi.importTemplate() |
|
|
|
}) |
|
|
|
</script> |
|
|
|
</script> |