chenfang 1 year ago
parent
commit
569676db4a
  1. 140
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

140
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -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> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -82,6 +104,8 @@ import { SupplierdeliverRequestMain,SupplierdeliverRequestMainRules,Supplierdeli
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain'
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
// import * as PackageApi from '@/api/wms/package'
// import * as BarbasicApi from '@/api/wms/barbasic'
// //
defineOptions({ name: 'SupplierdeliverRequestMain' }) defineOptions({ name: 'SupplierdeliverRequestMain' })
@ -209,7 +233,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} else if (val == 'point') { // } else if (val == 'point') { //
handlePoint(row.number) handlePoint(row)
} else if (val == 'documentPrint') { // } else if (val == 'documentPrint') { //
handleDocumentPrint(row.id) 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 BASE_URL = 'http://dev.ccwin-in.com:25110'
const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken())
// //
const handlePoint = async (number) => { const handlePoint = async (row) => {
window.open(src.value+'&number='+number) tableObject.params = {
//console.log(number); 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) => { const handleDocumentPrint = async (id) => {
window.open(src1.value+'&id='+id) window.open(documentSrc.value+'&id='+id)
//console.log(number);
} }
/** /**

Loading…
Cancel
Save