Browse Source

缺陷:HL-5048,HL-5049.补充修复:装配完工收货的原料信息查询菜单功能添加导出

hella_online_20240819
ljlong_2630 3 months ago
parent
commit
ef5c80a0c0
  1. 15
      src/api/wms/mesRawMaterialConsumptionInfo/index.ts
  2. 11
      src/api/wms/rawMaterialConsumptionInfo/index.ts
  3. 20
      src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/index.vue
  4. 24
      src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/index.vue

15
src/api/wms/mesRawMaterialConsumptionInfo/index.ts

@ -44,3 +44,18 @@ export const getMesRawMaterialConsumptionInfoPage = async (params) => {
} }
export const exportAssemblyMaterialUsageMes = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/productreceipt-detailb/getAssemblyMaterialUsageMesSeniorExport`, data })
}else{
return await request.download({ url: `/wms/productreceipt-detailb/assemblyMaterialUsageMesExport`, params })
}
}

11
src/api/wms/rawMaterialConsumptionInfo/index.ts

@ -44,3 +44,14 @@ export const getRawMaterialConsumptionInfoPage = async (params) => {
} }
export const exportAssemblyMaterialUsage = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/backflush-record-detailb/getAssemblyMaterialUsageSeniorExport`, data })
}else{
return await request.download({ url: `/wms/backflush-record-detailb/assemblyMaterialUsageExport`, params })
}
}

20
src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/index.vue

@ -56,6 +56,8 @@ const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref([...MesRawMaterialConsumptionInfo.allSchemas.tableColumns]) const tableColumns = ref([...MesRawMaterialConsumptionInfo.allSchemas.tableColumns])
/** 列表导出按钮操作 */
const exportLoading = ref(false) //
const mesModelVisible = ref(false) const mesModelVisible = ref(false)
const { tableObject: tableObject, tableMethods: tableMethods } =useTable({ const { tableObject: tableObject, tableMethods: tableMethods } =useTable({
getListApi: MesRawMaterialConsumptionInfoApi.getMesRawMaterialConsumptionInfoPage getListApi: MesRawMaterialConsumptionInfoApi.getMesRawMaterialConsumptionInfoPage
@ -70,7 +72,7 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
// defaultButtons.defaultExportBtn({hasPermi:'wms:productreceipt-record-main:export'}), // defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -79,7 +81,7 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'export') { // if (val == 'export') { //
// handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({ searchFormClick({
@ -95,6 +97,20 @@ const buttonBaseClick = (val, item) => {
} }
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await MesRawMaterialConsumptionInfoApi.exportAssemblyMaterialUsageMes(tableObject.params)
download.excel(data, '装配完工原料信息.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {

24
src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/index.vue

@ -51,11 +51,13 @@ defineOptions({ name: 'RawMaterialConsumptionInfo' })
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([...RawMaterialConsumptionInfo.allSchemas.tableColumns]) const tableColumns = ref([...RawMaterialConsumptionInfo.allSchemas.tableColumns])
/** 列表导出按钮操作 */
const exportLoading = ref(false) //
const mesModelVisible = ref(false) const mesModelVisible = ref(false)
const { tableObject: tableObject, tableMethods: tableMethods } =useTable({ const { tableObject: tableObject, tableMethods: tableMethods } =useTable({
getListApi: RawMaterialConsumptionInfoApi.getRawMaterialConsumptionInfoPage getListApi: RawMaterialConsumptionInfoApi.getRawMaterialConsumptionInfoPage
@ -70,7 +72,7 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
// defaultButtons.defaultExportBtn({hasPermi:'wms:productreceipt-record-main:export'}), // defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -80,7 +82,7 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'export') { // if (val == 'export') { //
// handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({ searchFormClick({
@ -89,7 +91,7 @@ const buttonBaseClick = (val, item) => {
} else { } else {
getList() getList()
} }
} else if (val == 'filtrate') { // }else if (val == 'filtrate') { //
} else { // } else { //
console.log('其他按钮', item) console.log('其他按钮', item)
} }
@ -104,6 +106,20 @@ const searchFormClick = (searchData) => {
getList() // getList() //
} }
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await RawMaterialConsumptionInfoApi.exportAssemblyMaterialUsage(tableObject.params)
download.excel(data, '装配完工原料信息.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

Loading…
Cancel
Save