Browse Source

BUG修改

master
yejiaxing 11 months ago
parent
commit
4fee1e86f8
  1. 2
      src/api/wms/supplierdeliverRequestMain/index.ts
  2. 5
      src/api/wms/supplierinvoiceRequestDetail/index.ts
  3. 24
      src/api/wms/supplierinvoiceRequestMain/index.ts
  4. 596
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  5. 279
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

2
src/api/wms/supplierdeliverRequestMain/index.ts

@ -88,7 +88,7 @@ export const genLabel = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/genLabel?id=` + id }) return await request.post({ url: `/wms/supplierdeliver-request-main/genLabel?id=` + id })
} }
// 生成记录 // 生成记录
export const genRecordsSupplierdeliverRequestMain = async (id) => { export const genRecordsSupplierinvoiceRequestMain = async (id) => {
return await request.post({ url: `/wms/supplierdeliver-request-main/genRecords?id=` + id }) return await request.post({ url: `/wms/supplierdeliver-request-main/genRecords?id=` + id })
} }
// 导出供应商发货申请主 Excel // 导出供应商发货申请主 Excel

5
src/api/wms/supplierinvoiceRequestDetail/index.ts

@ -34,6 +34,11 @@ export const getSupplierinvoiceRequestDetailPage = async (params) => {
} }
} }
// 查询供应商发票申请主详情
export const getPoNumber = async (params) => {
return await request.get({ url: `/wms/supplierinvoice-request-detail/getPoNumber`, params})
}
// 查询供应商发票申请子详情 // 查询供应商发票申请子详情
export const getSupplierinvoiceRequestDetail = async (id: number) => { export const getSupplierinvoiceRequestDetail = async (id: number) => {
return await request.get({ url: `/wms/supplierinvoice-request-detail/get?id=` + id }) return await request.get({ url: `/wms/supplierinvoice-request-detail/get?id=` + id })

24
src/api/wms/supplierinvoiceRequestMain/index.ts

@ -56,6 +56,30 @@ export const deleteSupplierinvoiceRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/supplierinvoice-request-main/delete?id=` + id }) return await request.delete({ url: `/wms/supplierinvoice-request-main/delete?id=` + id })
} }
// 打开供应商发货申请主
export const opeSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/open?id=` + id })
}
// 关闭供应商发货申请主
export const cloSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/close?id=` + id })
}
// 提交审批供应商发货申请主
export const subSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/sub?id=` + id })
}
// 审批通过供应商发货申请主
export const appSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/app?id=` + id })
}
// 驳回供应商发货申请主
export const rejSupplierinvoiceRequestMain = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/rej?id=` + id })
}
// 生成记录
export const genRecordsSupplierinvoiceRequestMain = async (id) => {
return await request.post({ url: `/wms/supplierinvoice-request-main/genRecords?id=` + id })
}
// 导出供应商发票申请主 Excel // 导出供应商发票申请主 Excel
export const exportSupplierinvoiceRequestMain = async (params) => { export const exportSupplierinvoiceRequestMain = async (params) => {
return await request.download({ url: `/wms/supplierinvoice-request-main/export-excel`, params }) return await request.download({ url: `/wms/supplierinvoice-request-main/export-excel`, params })

596
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -1,32 +1,21 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="SupplierinvoiceRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="SupplierinvoiceRequestMain.allSchemas.searchSchema" @search="setSearchParams"
@reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead <TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
:HeadButttondata="HeadButttondata" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
@button-base-click="buttonBaseClick" :allSchemas="SupplierinvoiceRequestMain.allSchemas" />
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SupplierinvoiceRequestMain.allSchemas"
/>
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table <Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
: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:sort="tableObject.sort">
v-model:currentPage="tableObject.currentPage"
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>
@ -39,277 +28,344 @@
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm ref="formRef" @success="getList" :rules="SupplierinvoiceRequestMainRules"
ref="formRef" :formAllSchemas="SupplierinvoiceRequestMain.allSchemas" :searchTableParams="searchTableParams"
@success="getList" :tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas" :tableFormRules="SupplierinvoiceRequestDetailRules"
:rules="SupplierinvoiceRequestMainRules" :tableData="tableData" :apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain"
:formAllSchemas="SupplierinvoiceRequestMain.allSchemas" :apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain" :isBusiness="true"
:searchTableParams="searchTableParams" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess"
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas" @submitForm="submitForm" />
:tableFormRules="SupplierinvoiceRequestDetailRules"
:tableData="tableData"
:apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain"
:apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail ref="detailRef" :isBasic="false" :allSchemas="SupplierinvoiceRequestMain.allSchemas"
ref="detailRef"
:isBasic="false"
:allSchemas="SupplierinvoiceRequestMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas" :detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:detailAllSchemasRules="SupplierinvoiceRequestDetailRules" :detailAllSchemasRules="SupplierinvoiceRequestDetailRules" :searchTableParams="searchTableParams"
:searchTableParams="searchTableParams"
:apiCreate="SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail" :apiCreate="SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail"
:apiUpdate="SupplierinvoiceRequestDetailApi.updateSupplierinvoiceRequestDetail" :apiUpdate="SupplierinvoiceRequestDetailApi.updateSupplierinvoiceRequestDetail"
:apiPage="SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage" :apiPage="SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage"
:apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail" :apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail" :Echo="Echo" />
:Echo="Echo"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { SupplierinvoiceRequestMain,SupplierinvoiceRequestMainRules,SupplierinvoiceRequestDetail,SupplierinvoiceRequestDetailRules } from './supplierinvoiceRequestMain.data' import { SupplierinvoiceRequestMain, SupplierinvoiceRequestMainRules, SupplierinvoiceRequestDetail, SupplierinvoiceRequestDetailRules } from './supplierinvoiceRequestMain.data'
import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain' import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail' import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as SupplierApi from '@/api/wms/supplier' import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '../../../basicDataManage/supplierManage/supplier/supplier.data' import { Supplier } from '../../../basicDataManage/supplierManage/supplier/supplier.data'
defineOptions({ name: 'SupplierinvoiceRequestMain' }) defineOptions({ name: 'SupplierinvoiceRequestMain' })
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(SupplierinvoiceRequestMain.allSchemas.tableColumns) const tableColumns = ref(SupplierinvoiceRequestMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
// //
const searchTableParams = ref([ const searchTableParams = ref([
{ {
formField: 'supplierCode', formField: 'supplierCode',
searchTableTitle: '供应商信息', searchTableTitle: '供应商信息',
searchTableAllSchemas: Supplier.allSchemas, searchTableAllSchemas: Supplier.allSchemas,
searchTablePage: SupplierApi.getSupplierPage searchTablePage: SupplierApi.getSupplierPage
}
])
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
if (type == 'tableForm') {
//
//row[formField] = val[0][searchField]
//row['poLine'] = val[0]['poLine']
//row['batch'] = val[0]['toBatch']
//row['altBatch'] = val[0]['altBatch']
//row['itemCode'] = val[0]['itemCode']
//row['itemName'] = val[0]['itemName']
//row['itemDesc1'] = val[0]['itemDesc1']
//row['itemDesc2'] = val[0]['itemDesc2']
//row['projectCode'] = val[0]['projectCode']
//row['qty'] = val[0]['qty']
//row['uom'] = val[0]['uom']
} else {
const setV = {}
setV[formField] = val[0][searchField]
//setV['ppNumber'] = val[0]['ppNumber']
//setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV)
} }
])
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
if (formField == 'poNumber') {
row['poNumber'] = val[0]['poNumber']
row['poLine'] = val[0]['poLine']
row['itemCode'] = val[0]['itemCode']
}
} else {
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: SupplierinvoiceRequestMainApi.getSupplierinvoiceRequestMainPage //
}) })
}
// //
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] const { getList, setSearchParams } = tableMethods
const Echo = []
//
const { tableObject, tableMethods } = useTable({ const HeadButttondata = [
getListApi: SupplierinvoiceRequestMainApi.getSupplierinvoiceRequestMainPage // defaultButtons.defaultAddBtn({ hasPermi: 'wms:supplierinvoice-request-main:create' }), //
}) defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierinvoice-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
// defaultButtons.defaultFilterBtn(null), //
const { getList, setSearchParams } = tableMethods defaultButtons.defaultSetBtn(null), //
// {
// // label: '',
const HeadButttondata = [ // name: 'zdy',
defaultButtons.defaultAddBtn({hasPermi:'wms:supplierinvoice-request-main:create'}), // // hide: false,
// type: 'primary',
defaultButtons.defaultExportBtn({hasPermi:'wms:supplierinvoice-request-main:export'}), // // icon: 'Select',
defaultButtons.defaultFreshBtn(null), // // color: ''
defaultButtons.defaultFilterBtn(null), // // },
defaultButtons.defaultSetBtn(null), // ]
// {
// label: '', //
// name: 'zdy', const buttonBaseClick = (val, item) => {
// hide: false, if (val == 'add') { //
// type: 'primary', openForm('create')
// icon: 'Select', } else if (val == 'import') { //
// color: '' handleImport()
// }, } else if (val == 'export') { //
] handleExport()
} else if (val == 'refresh') { //
// getList()
const buttonBaseClick = (val, item) => { } else if (val == 'filtrate') { //
if (val == 'add') { // } else { //
openForm('create') console.log('其他按钮', item)
} else if (val == 'import') { // }
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
} }
}
//
// const isShowMainButton = (row, val) => {
const isShowMainButton = (row,val) => { if (val.indexOf(row.status) > -1) {
if (val.indexOf(row.status) > -1) { return false
return false } else {
} else { return true
return true }
} }
}
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-request-main:update'}), // defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierinvoice-request-main:update' }), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-request-main:delete'}), // //
{
label: '处理',
name: 'genRecords',
hide: isShowMainButton(row, ['3']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-request-main:delete'}), //
] ]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} }
}
/** 添加/修改操作 */
const formRef = ref() // -
const openForm =async (type: string, row?: number) => { const buttonTableClick = async (val, row) => {
tableData.value = [] // if (val == 'mainPurPlanOpe') { //
formRef.value.open(type, row) handleOpe(row.id)
} } else if (val == 'mainPurPlanClo') {//
handleClo(row.id)
/** 详情操作 */ } else if (val == 'mainPlanSub') { //
const detailRef = ref() handleSub(row.id)
const openDetail = (row: any, titleName: any, titleValue: any) => { } else if (val == 'mainPlanApp') { //
detailRef.value.openDetail(row, titleName, titleValue) handleApp(row.id)
} } else if (val == 'mainPlanTur') { //
handleTur(row.id)
/** 删除按钮操作 */ } else if (val == 'genRecords') { //
const handleDelete = async (id: number) => { genRecords(row.id)
try { } else if (val == 'edit') { //
// openForm('update', row)
await message.delConfirm() } else if (val == 'delete') { //
// handleDelete(row.id)
await SupplierinvoiceRequestMainApi.deleteSupplierinvoiceRequestMain(id) }
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await SupplierinvoiceRequestMainApi.exportSupplierinvoiceRequestMain(setSearchParams)
download.excel(data, '供应商发票申请主.xlsx')
} catch {
} finally {
exportLoading.value = false
} }
}
/** 添加/修改操作 */
/** const formRef = ref()
* tableForm方法 const openForm = async (type : string, row ?: number) => {
*/ tableData.value = [] //
const tableFormKeys = {} formRef.value.open(type, row)
SupplierinvoiceRequestDetail.allSchemas.tableFormColumns.forEach(item => { }
tableFormKeys[item.field] = item.default ? item.default : ''
}) /** 详情操作 */
const tableData = ref([]) const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
// detailRef.value.openDetail(row, titleName, titleValue)
const handleAddTable = () => { }
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
} /** 删除按钮操作 */
// const handleDelete = async (id : number) => {
const handleDeleteTable = (item, index) => { try {
tableData.value.splice(index, 1) //
} await message.delConfirm()
//
// await SupplierinvoiceRequestMainApi.deleteSupplierinvoiceRequestMain(id)
const submitForm = async (formType, data) => { message.success(t('common.delSuccess'))
data.subList = tableData.value // //
try { await getList()
if (formType === 'create') { } catch { }
await SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain(data) }
message.success(t('common.createSuccess'))
} else { /** 关闭按钮操作 */
await SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain(data) const handleClo = async (id : number) => {
message.success(t('common.updateSuccess')) try {
//
await message.confirm('是否关闭所选中数据?')
//
await SupplierinvoiceRequestMainApi.cloSupplierinvoiceRequestMain(id)
message.success(t('关闭成功!'))
//
await getList()
} catch { }
}
/** 打开按钮操作 */
const handleOpe = async (id : number) => {
try {
//
await message.confirm('是否打开所选中数据?')
//
await SupplierinvoiceRequestMainApi.opeSupplierinvoiceRequestMain(id)
message.success(t('打开成功!'))
//
await getList()
} catch { }
}
/** 提交审批按钮操作 */
const handleSub = async (id : number) => {
try {
//
await message.confirm('是否提交审批所选中数据?')
//
await SupplierinvoiceRequestMainApi.subSupplierinvoiceRequestMain(id)
message.success(t('提交审批成功!'))
//
await getList()
} catch { }
}
/** 审批通过按钮操作 */
const handleApp = async (id : number) => {
try {
//
await message.confirm('是否审批通过所选中数据?')
//
await SupplierinvoiceRequestMainApi.appSupplierinvoiceRequestMain(id)
message.success(t('审批通过成功!'))
//
await getList()
} catch { }
}
/** 驳回按钮操作 */
const handleTur = async (id : number) => {
try {
//
await message.confirm('是否驳回所选中数据?')
//
await SupplierinvoiceRequestMainApi.rejSupplierinvoiceRequestMain(id)
message.success(t('驳回成功!'))
//
await getList()
} catch { }
}
/** 处理按钮操作 */
const genRecords = async (id : number) => {
try {
//
await message.confirm('是否处理所选中数据?')
//
await SupplierinvoiceRequestMainApi.genRecordsSupplierinvoiceRequestMain(id)
message.success(t('处理成功!'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await SupplierinvoiceRequestMainApi.exportSupplierinvoiceRequestMain(setSearchParams)
download.excel(data, '供应商发票申请主.xlsx')
} catch {
} finally {
exportLoading.value = false
} }
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
} }
}
// /**
const searchFormClick = (searchData) => { * tableForm方法
tableObject.params = { */
isSearch: true, const tableFormKeys = {}
filters: searchData.filters SupplierinvoiceRequestDetail.allSchemas.tableFormColumns.forEach(item => {
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)
} }
getList() //
}
/** 初始化 **/ //
onMounted(async () => { const submitForm = async (formType, data) => {
getList() data.subList = tableData.value //
}) try {
if (formType === 'create') {
await SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script> </script>

279
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -3,20 +3,21 @@ import { dateFormatter } from '@/utils/formatTime'
import * as SupplierApi from '@/api/wms/supplier' import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
const recordTypeList = [{ label:'收货单号', value:'1' },{ label:'退货单号', value:'2' },{ label:'索赔单号', value:'3' }] const recordTypeList = [{ label: '收货单号', value: '1' }, { label: '退货单号', value: '2' }, { label: '索赔单号', value: '3' }]
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as supplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain' import * as supplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import * as supplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = { const queryParams = {
pageSize:10, pageSize: 10,
pageNo:1, pageNo: 1,
code:'PurchaseInvoiceRequest' code: 'PurchaseInvoiceRequest'
} }
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{} const requestsettingData = data?.list[0] || {}
// 获取当前操作人的部门 // 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore() const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept const userDept = userStore.userSelfInfo.dept
@ -25,26 +26,26 @@ const userDept = userStore.userSelfInfo.dept
* @returns {Array} * @returns {Array}
*/ */
export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '供应商代码', label: '供应商代码',
field: 'supplierCode', field: 'supplierCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isSearch: true, isSearch: true,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题 searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法 searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法
} }
} }
}, },
{ {
label: '调增金额', label: '调增金额',
field: 'adjustAmount', field: 'adjustAmount',
@ -76,8 +77,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}, },
form: { form: {
value: 'SupplierInvoice', value: 'SupplierInvoice',
componentProps:{ componentProps: {
disabled:true, disabled: true,
} }
} }
}, },
@ -130,8 +131,8 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
}, },
form: { form: {
value: userDept.name, value: userDept.name,
componentProps:{ componentProps: {
disabled:true, disabled: true,
} }
}, },
}, },
@ -232,7 +233,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE', activeValue: 'TRUE',
disabled:true, disabled: true,
} }
} }
}, },
@ -252,7 +253,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE', activeValue: 'TRUE',
disabled:true, disabled: true,
} }
} }
}, },
@ -272,7 +273,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE', activeValue: 'TRUE',
disabled:true, disabled: true,
} }
} }
}, },
@ -292,7 +293,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: { componentProps: {
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE', activeValue: 'TRUE',
disabled:true, disabled: true,
} }
} }
}, },
@ -333,6 +334,78 @@ export const SupplierinvoiceRequestMainRules = reactive({
] ]
}) })
/**
* @returns {Array}
*/
export const SupplierinvoiceRequestDetailaa = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '订单行',
field: 'poNumber'
},
{
label: '订单行',
field: 'poLine'
},
{
label: '物品代码',
field: 'itemCode'
},
{
label: '货主代码',
field: 'ownerCode'
},
{
label: '批次',
field: 'batch'
},
{
label: '单价',
field: 'singlePrice',
form: {
component: 'InputNumber',
}
},
{
label: '金额',
field: 'amount',
form: {
component: 'InputNumber',
}
},
{
label: '备注',
field: 'remark',
},
{
label: '创建时间',
field: 'createTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isTableForm: false,
isForm: false
},
{
label: '创建者',
field: 'creator',
isTableForm: false,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 150,
fixed: 'right'
},
isTableForm: false,
}
]))
/** /**
* @returns {Array} * @returns {Array}
*/ */
@ -349,55 +422,103 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
initOptions: recordTypeList, initOptions: recordTypeList,
}, },
}, },
{
label: '单号',
field: 'requesNumber',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择单号',
searchField: 'number',
searchTitle: '单号信息',
searchAllSchemas: SupplierinvoiceRequestMain.allSchemas,
searchPage: supplierinvoiceRequestMainApi.getNumber,
searchCondition: [{
key: 'supplierCode',
value: 'supplierCode',
isMainValue: true
},
{
key: 'recordType',
value: 'recordType',
isMainValue: true
}]
}
},
{
label: '货主代码',
field: 'ownerCode'
},
{ {
label: '批次', label: '单号',
field: 'batch' field: 'recordNumber',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择单号',
searchField: 'number',
searchTitle: '单号信息',
searchAllSchemas: SupplierinvoiceRequestMain.allSchemas,
searchPage: supplierinvoiceRequestMainApi.getNumber,
searchCondition: [{
key: 'supplierCode',
value: 'supplierCode',
isMainValue: true
},
{
key: 'recordType',
value: 'recordType',
isMainValue: true
}]
}
}, },
{ {
label: '订单号', label: '订单号',
field: 'poNumber' field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '订单号信息',
searchAllSchemas: SupplierinvoiceRequestDetailaa.allSchemas,
searchPage: supplierinvoiceRequestDetailApi.getPoNumber
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '订单号信息',
searchAllSchemas: SupplierinvoiceRequestDetailaa.allSchemas,
searchPage: supplierinvoiceRequestDetailApi.getPoNumber,
searchCondition: [
{
key: 'number',
value: 'recordNumber',
isMainValue: true
}
,
{
key: 'recordType',
value: 'recordType',
isMainValue: true
}]
}
}, },
{ {
label: '订单行', label: '订单行',
field: 'poLine' field: 'poLine',
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '物品代码',
field: 'itemCode',
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '货主代码',
field: 'ownerCode'
},
{
label: '批次',
field: 'batch'
}, },
{
label: '物品代码',
field: 'itemCode'
},
{ {
label: '单价', label: '单价',
field: 'singlePrice', field: 'singlePrice',
@ -438,12 +559,12 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
label: '操作', label: '操作',
field: 'action', field: 'action',
isDetail: false, isDetail: false,
isForm: false , isForm: false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'
}, },
isTableForm:false, isTableForm: false,
} }
])) ]))

Loading…
Cancel
Save