Browse Source

供应商发货申请 文档格式化

master
陈薪名 12 months ago
parent
commit
35c02b30e9
  1. 887
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

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

@ -13,16 +13,16 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{ <Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
total: tableObject.total total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" }" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"> v-model:sort="tableObject.sort">
<template #number="{row}"> <template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event, row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -38,8 +38,7 @@
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="SupplierdeliverRequestMain.allSchemas" <Detail ref="detailRef" :isBasic="false" :allSchemas="SupplierdeliverRequestMain.allSchemas"
:detailAllSchemas="SupplierdeliverRequestDetail.allSchemas" :detailAllSchemas="SupplierdeliverRequestDetail.allSchemas" :detailAllSchemasRules="SupplierdeliverRequestDetailRules"
:detailAllSchemasRules="SupplierdeliverRequestDetailRules"
:apiCreate="SupplierdeliverRequestDetailApi.createSupplierdeliverRequestDetail" :apiCreate="SupplierdeliverRequestDetailApi.createSupplierdeliverRequestDetail"
:apiUpdate="SupplierdeliverRequestDetailApi.updateSupplierdeliverRequestDetail" :apiUpdate="SupplierdeliverRequestDetailApi.updateSupplierdeliverRequestDetail"
:apiPage="SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage" :apiPage="SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage"
@ -47,18 +46,16 @@
@searchTableSuccessDetail="searchTableSuccessDetail" /> @searchTableSuccessDetail="searchTableSuccessDetail" />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/supplierdeliver-request-main/import" <ImportForm ref="importFormRef" url="/wms/supplierdeliver-request-main/import" :importTemplateData="importTemplateData"
:importTemplateData="importTemplateData" @success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" @success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
:mode="2" />
<!-- 打印 --> <!-- 打印 -->
<el-dialog v-model="dialogVisible " :title="dialogTitle" width="60%"> <el-dialog v-model="dialogVisible" :title="dialogTitle" width="60%">
<Table :columns="detailListTableColumns" :data="detatableData.tableList" :loading="detatableData.loading" <Table :columns="detailListTableColumns" :data="detatableData.tableList" :loading="detatableData.loading" :pagination="{
:pagination="{ total: detatableData.total
total: detatableData.total }" v-model:pageSize="detatableData.pageSize" v-model:currentPage="detatableData.currentPage"
}" v-model:pageSize="detatableData.pageSize" v-model:currentPage="detatableData.currentPage"
v-model:sort="detatableData.sort"> v-model:sort="detatableData.sort">
<template #batch="{row}"> <template #batch="{ row }">
<el-input v-model="row.batch">{{ row.batch }}</el-input> <el-input v-model="row.batch">{{ row.batch }}</el-input>
</template> </template>
</Table> </Table>
@ -70,449 +67,449 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import { SupplierdeliverRequestMain, SupplierdeliverRequestMainRules, SupplierdeliverRequestDetail, SupplierdeliverRequestDetailRules } from './supplierdeliverRequestMain.data' import { SupplierdeliverRequestMain, SupplierdeliverRequestMainRules, SupplierdeliverRequestDetail, SupplierdeliverRequestDetailRules } from './supplierdeliverRequestMain.data'
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 PackageApi from '@/api/wms/package'
// import * as BarbasicApi from '@/api/wms/barbasic' // import * as BarbasicApi from '@/api/wms/barbasic'
// //
defineOptions({ name: 'SupplierdeliverRequestMain' }) defineOptions({ name: 'SupplierdeliverRequestMain' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(SupplierdeliverRequestMain.allSchemas.tableColumns) const tableColumns = ref(SupplierdeliverRequestMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} else { } else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierdeliver-request-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:supplierdeliver-request-main:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
}
}
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '3', '4']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierdeliver-request-main:update' }), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:supplierdeliver-request-main:delete' }), //
defaultButtons.mainListPointBtn(null), //
defaultButtons.mainListDocumentPrintBtn(null), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainPurPlanOpe') { //
handleOpe(row.id)
} else if (val == 'mainPurPlanClo') {//
handleClo(row.id)
} else if (val == 'mainPlanSub') { //
handleSub(row.id)
} else if (val == 'mainPlanApp') { //
handleApp(row.id)
} else if (val == 'mainPlanTur') { //
handleTur(row.id)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'point') { //
handlePoint(row)
} else if (val == 'documentPrint') { //
handleDocumentPrint(row.id)
} }
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierdeliver-request-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:supplierdeliver-request-main:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} }
}
/** 添加/修改操作 */
const formRef = ref() //
const openForm = async (type : string, row ?: number) => { const isShowMainButton = (row, val) => {
tableData.value = [] // if (val.indexOf(row.status) > -1) {
formRef.value.open(type, row) return false
} } else {
return true
/** 详情操作 */
const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
/** 删除按钮操作 */
const handleDelete = async (id : number) => {
try {
//
await message.delConfirm()
//
await SupplierdeliverRequestMainApi.deleteSupplierdeliverRequestMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch { }
}
/** 关闭按钮操作 */
const handleClo = async (id : number) => {
try {
//
await message.confirm('是否关闭所选中数据?')
//
await SupplierdeliverRequestMainApi.cloSupplierdeliverRequestMain(id)
message.success(t('关闭成功!'))
//
await getList()
} catch { }
}
/** 打开按钮操作 */
const handleOpe = async (id : number) => {
try {
//
await message.confirm('是否打开所选中数据?')
//
await SupplierdeliverRequestMainApi.opeSupplierdeliverRequestMain(id)
message.success(t('打开成功!'))
//
await getList()
} catch { }
}
/** 提交审批按钮操作 */
const handleSub = async (id : number) => {
try {
//
await message.confirm('是否提交审批所选中数据?')
//
await SupplierdeliverRequestMainApi.subSupplierdeliverRequestMain(id)
message.success(t('提交审批成功!'))
//
await getList()
} catch { }
}
/** 审批通过按钮操作 */
const handleApp = async (id : number) => {
try {
//
await message.confirm('是否审批通过所选中数据?')
//
await SupplierdeliverRequestMainApi.appSupplierdeliverRequestMain(id)
message.success(t('审批通过成功!'))
//
await getList()
} catch { }
} }
}
/** 驳回按钮操作 */
const handleTur = async (id : number) => { // -
try { const butttondata = (row) => {
// return [
await message.confirm('是否驳回所选中数据?') defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
// defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '3', '4']) }), //
await SupplierdeliverRequestMainApi.rejSupplierdeliverRequestMain(id) defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
message.success(t('驳回成功!')) defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
// defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
await getList() defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierdeliver-request-main:update' }), //
} catch { } defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:supplierdeliver-request-main:delete' }), //
defaultButtons.mainListPointBtn(null), //
defaultButtons.mainListDocumentPrintBtn(null), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainPurPlanOpe') { //
handleOpe(row.id)
} else if (val == 'mainPurPlanClo') {//
handleClo(row.id)
} else if (val == 'mainPlanSub') { //
handleSub(row.id)
} else if (val == 'mainPlanApp') { //
handleApp(row.id)
} else if (val == 'mainPlanTur') { //
handleTur(row.id)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'point') { //
handlePoint(row)
} else if (val == 'documentPrint') { //
handleDocumentPrint(row.id)
} }
}
/** 导出按钮操作 */
const exportLoading = ref(false) // /** 添加/修改操作 */
const handleExport = async () => { const formRef = ref()
try { const openForm = async (type: string, row?: number) => {
// tableData.value = [] //
await message.exportConfirm() formRef.value.open(type, row)
// }
exportLoading.value = true
const data = await SupplierdeliverRequestMainApi.exportSupplierdeliverRequestMain(setSearchParams) /** 详情操作 */
download.excel(data, '供应商发货申请主.xls') const detailRef = ref()
} catch { const openDetail = (row: any, titleName: any, titleValue: any) => {
} finally { detailRef.value.openDetail(row, titleName, titleValue)
exportLoading.value = false }
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await SupplierdeliverRequestMainApi.deleteSupplierdeliverRequestMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch { }
}
/** 关闭按钮操作 */
const handleClo = async (id: number) => {
try {
//
await message.confirm('是否关闭所选中数据?')
//
await SupplierdeliverRequestMainApi.cloSupplierdeliverRequestMain(id)
message.success(t('关闭成功!'))
//
await getList()
} catch { }
}
/** 打开按钮操作 */
const handleOpe = async (id: number) => {
try {
//
await message.confirm('是否打开所选中数据?')
//
await SupplierdeliverRequestMainApi.opeSupplierdeliverRequestMain(id)
message.success(t('打开成功!'))
//
await getList()
} catch { }
}
/** 提交审批按钮操作 */
const handleSub = async (id: number) => {
try {
//
await message.confirm('是否提交审批所选中数据?')
//
await SupplierdeliverRequestMainApi.subSupplierdeliverRequestMain(id)
message.success(t('提交审批成功!'))
//
await getList()
} catch { }
}
/** 审批通过按钮操作 */
const handleApp = async (id: number) => {
try {
//
await message.confirm('是否审批通过所选中数据?')
//
await SupplierdeliverRequestMainApi.appSupplierdeliverRequestMain(id)
message.success(t('审批通过成功!'))
//
await getList()
} catch { }
}
/** 驳回按钮操作 */
const handleTur = async (id: number) => {
try {
//
await message.confirm('是否驳回所选中数据?')
//
await SupplierdeliverRequestMainApi.rejSupplierdeliverRequestMain(id)
message.success(t('驳回成功!'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await SupplierdeliverRequestMainApi.exportSupplierdeliverRequestMain(setSearchParams)
download.excel(data, '供应商发货申请主.xls')
} catch {
} finally {
exportLoading.value = false
} }
}
//
const { tableObject: detatableData, tableMethods: detatableMethods } = useTable({ //
getListApi: SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage const { tableObject: detatableData, tableMethods: detatableMethods } = useTable({
}) getListApi: SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage
})
const { getList: getDetailList } = detatableMethods
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 detailTableColumns = ref(SupplierdeliverRequestDetail.allSchemas.tableColumns)
const dialogVisible = ref(false) const detailListTableColumns = detailTableColumns.value.filter(item => item.label != '操作' && item.label != '创建者' && item.label != '创建时间' && item.label != '最后更新者' && item.label != '最后更新时间')
const isShow = ref(false) const dialogVisible = ref(false)
const dialogTitle = ref('') const isShow = ref(false)
const closeDialog = () => { const dialogTitle = ref('')
const closeDialog = () => {
dialogVisible.value = false
isShow.value = false
}
/** 生成标签按钮操作 */
const genLabel = async () => {
try {
//
await message.confirm('是否为此数据生成标签?')
//
await SupplierdeliverRequestMainApi.genLabel(genLabelId.value)
dialogVisible.value = false dialogVisible.value = false
isShow.value = false isShow.value = false
message.success(t('生成标签成功!'))
//
await getList()
} catch { }
}
const BASE_URL = 'http://dev.ccwin-in.com:25110'
const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken())
const genLabelId = ref();
//
const handlePoint = async (row) => {
tableObject.params = {
masterId: row.id,
} }
await getDetailList()
/** 生成标签按钮操作 */ dialogVisible.value = true
const genLabel = async () => { dialogTitle.value = row.number + '单据号'
try { genLabelId.value = row.number
// }
await message.confirm('是否为此数据生成标签?')
// const print = async () => {
await SupplierdeliverRequestMainApi.genLabel(genLabelId.value) //
dialogVisible.value = false // const packageArray:any= ref([])
isShow.value = false // let packageObject = {
message.success(t('生成标签成功!')) // itemCode: '',
// // itemName: '',
await getList() // itemDesc1: '',
} catch { } // itemDesc2: '',
} // batch: '',
// altBatch: '',
const BASE_URL = 'http://dev.ccwin-in.com:25110' // produceDate: '',
const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken()) // validityDays: '',
const genLabelId=ref(); // expireDate: '',
// // uom: '',
const handlePoint = async (row) => { // qty: '',
tableObject.params = { // altUom: '',
masterId: row.id, // altQty: '',
} // convertRate: '',
await getDetailList() // stdPackQty: '',
dialogVisible.value = true // stdPackUnit: '',
dialogTitle.value = row.number + '单据号' // toWarehouseCode: '',
genLabelId.value = row.number // toDockCode: '',
} // toLocationCode: '',
// supplierCode: '',
const print = async () => { // supplierItemCode: '',
// // poNumber: '',
// const packageArray:any= ref([]) // poLine: '',
// let packageObject = { // rpNumber: '',
// itemCode: '', // asnNumber: '',
// itemName: '', // }
// itemDesc1: '', // //
// itemDesc2: '', // await SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage({
// batch: '', // number: detatableData.tableList[0].number
// altBatch: '', // }).then(res => {
// produceDate: '', // detatableData.tableList.forEach(item => {
// validityDays: '', // packageObject.itemCode=item.itemCode
// expireDate: '', // packageObject.itemName=item.itemName
// uom: '', // packageObject.itemDesc1=item.itemDesc1
// qty: '', // packageObject.itemDesc2=item.itemDesc2
// altUom: '', // packageObject.batch=item.batch
// altQty: '', // packageObject.altBatch=item.altBatch
// convertRate: '', // packageObject.produceDate=item.produceDate
// stdPackQty: '', // packageObject.expireDate=item.expireDate
// stdPackUnit: '', // packageObject.uom=item.uom
// toWarehouseCode: '', // packageObject.qty=item.qty
// toDockCode: '', // packageObject.stdPackQty=item.stdPackQty
// toLocationCode: '', // packageObject.stdPackUnit=item.stdPackUnit
// supplierCode: '', // packageObject.convertRate=item.convertRate
// supplierItemCode: '', // packageObject.poNumber=item.poNumber
// poNumber: '', // packageObject.poLine=item.poLine
// poLine: '', // packageObject.supplierCode=res.list[0].supplierCode
// rpNumber: '', // packageObject.rpNumber=res.list[0].ppNumber
// asnNumber: '', // packageArray.value.push(packageObject)
// } // })
// // // })
// await SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage({ // const barBasicArray:any =ref([])
// number: detatableData.tableList[0].number // let barBasicObject = {
// }).then(res => { // type: '',
// detatableData.tableList.forEach(item => { // template: '',
// packageObject.itemCode=item.itemCode // status: '',
// packageObject.itemName=item.itemName // relateNumber: '',
// packageObject.itemDesc1=item.itemDesc1 // barcodeString: '',
// packageObject.itemDesc2=item.itemDesc2 // printTimes: '',
// packageObject.batch=item.batch // lastPrintTime: '',
// packageObject.altBatch=item.altBatch // lastPrintUserId: '',
// packageObject.produceDate=item.produceDate // lastPrintUserName: '',
// packageObject.expireDate=item.expireDate // }
// packageObject.uom=item.uom // //
// packageObject.qty=item.qty // await PackageApi.createPackage(JSON.parse(JSON.stringify(packageArray.value))).then(res => {
// packageObject.stdPackQty=item.stdPackQty // res.list.forEach(item => {
// packageObject.stdPackUnit=item.stdPackUnit // barBasicObject.type = 'PurchaseLabel'
// packageObject.convertRate=item.convertRate // barBasicObject.relateNumber = item.number
// packageObject.poNumber=item.poNumber // barBasicObject.status = 'NEW'
// packageObject.poLine=item.poLine // barBasicArray.value.push(barBasicObject)
// packageObject.supplierCode=res.list[0].supplierCode // })
// packageObject.rpNumber=res.list[0].ppNumber // })
// packageArray.value.push(packageObject) // await BarbasicApi.createBarbasic(JSON.parse(JSON.stringify(barBasicArray.value)))
// }) window.open(src.value + '&number=' + detatableData.tableList[0].number)
// }) }
// const barBasicArray:any =ref([])
// let barBasicObject = { //
// type: '', const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken())
// template: '', const handleDocumentPrint = async (id) => {
// status: '', window.open(documentSrc.value + '&id=' + id)
// relateNumber: '', }
// barcodeString: '',
// printTimes: '', /**
// lastPrintTime: '', * tableForm方法
// lastPrintUserId: '', */
// lastPrintUserName: '', const tableFormKeys = {}
// } SupplierdeliverRequestDetail.allSchemas.tableFormColumns.forEach(item => {
// //
// await PackageApi.createPackage(JSON.parse(JSON.stringify(packageArray.value))).then(res => { tableFormKeys[item.field] = item.default ? item.default : ''
// res.list.forEach(item => { })
// barBasicObject.type = 'PurchaseLabel' const tableData = ref([])
// barBasicObject.relateNumber = item.number
// barBasicObject.status = 'NEW' //
// barBasicArray.value.push(barBasicObject) const handleAddTable = () => {
// }) tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
// }) }
// await BarbasicApi.createBarbasic(JSON.parse(JSON.stringify(barBasicArray.value))) //
window.open(src.value + '&number=' + detatableData.tableList[0].number) const handleDeleteTable = (item, index) => {
} tableData.value.splice(index, 1)
}
//
const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken()) //
const handleDocumentPrint = async (id) => { const submitForm = async (formType, data) => {
window.open(documentSrc.value + '&id=' + id) data.subList = tableData.value //
} try {
if (formType === 'create') {
/** await SupplierdeliverRequestMainApi.createSupplierdeliverRequestMain(data)
* tableForm方法 message.success(t('common.createSuccess'))
*/ } else {
const tableFormKeys = {} await SupplierdeliverRequestMainApi.updateSupplierdeliverRequestMain(data)
SupplierdeliverRequestDetail.allSchemas.tableFormColumns.forEach(item => { message.success(t('common.updateSuccess'))
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
await SupplierdeliverRequestMainApi.createSupplierdeliverRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await SupplierdeliverRequestMainApi.updateSupplierdeliverRequestMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
} }
} formRef.value.dialogVisible = false
//
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商发货申请主导入模版.xls'
})
//
const importSuccess = () => {
getList() getList()
} finally {
formRef.value.formLoading = false
} }
}
//
const searchFormClick = (searchData) => { /** 导入 */
tableObject.params = { const importFormRef = ref()
isSearch: true, const handleImport = () => {
filters: searchData.filters importFormRef.value.open()
} }
getList() //
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商发货申请主导入模版.xls'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
} }
getList() //
/** 初始化 **/ }
onMounted(async () => {
getList() /** 初始化 **/
importTemplateData.templateUrl = await SupplierdeliverRequestMainApi.importTemplate() onMounted(async () => {
}) getList()
importTemplateData.templateUrl = await SupplierdeliverRequestMainApi.importTemplate()
})
</script> </script>

Loading…
Cancel
Save