Browse Source

筛选导出api补充

master
chenfang 9 months ago
parent
commit
19ab4206b6
  1. 8
      src/api/wms/scrapJobMain/index.ts
  2. 8
      src/api/wms/scrapRecordMain/index.ts
  3. 16
      src/api/wms/strategy/index.ts
  4. 16
      src/views/wms/basicDataManage/strategySetting/strategy/purchaseReceiptStrategy/AddForm.vue

8
src/api/wms/scrapJobMain/index.ts

@ -70,7 +70,13 @@ export const deleteScrapJobMain = async (id: number) => {
// 导出报废出库任务主 Excel
export const exportScrapJobMain = async (params) => {
return await request.download({ url: `/wms/scrap-job-main/export-excel`, params })
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/scrap-job-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/scrap-job-main/export-excel`, params })
}
}
// 下载用户导入模板

8
src/api/wms/scrapRecordMain/index.ts

@ -56,7 +56,13 @@ export const deleteScrapRecordMain = async (id: number) => {
// 导出报废出库记录主 Excel
export const exportScrapRecordMain = async (params) => {
return await request.download({ url: `/wms/scrap-record-main/export-excel`, params })
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/scrap-record-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/scrap-record-main/export-excel`, params })
}
}
// 下载用户导入模板

16
src/api/wms/strategy/index.ts

@ -12,7 +12,13 @@ export interface StrategyVO {
// 查询策略列表
export const getStrategyPage = async (params) => {
return await request.get({ url: `/wms/strategy/page`, params })
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/strategy/senior', data })
} else {
return await request.get({ url: `/wms/strategy/page`, params })
}
}
// 查询策略详情
@ -37,5 +43,11 @@ export const deleteStrategy = async (id: number) => {
// 导出策略 Excel
export const exportStrategy = async (params) => {
return await request.download({ url: `/wms/strategy/export-excel`, params })
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/strategy/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/strategy/export-excel`, params })
}
}

16
src/views/wms/basicDataManage/strategySetting/strategy/purchaseReceiptStrategy/AddForm.vue

@ -126,6 +126,9 @@
<div class="title">规则配置</div>
<el-row gutter="10">
<el-col :span="24">
<el-form-item label="不拆分">
<el-switch v-model="formData.configuration.NotGroup" active-value="TRUE" inactive-value="FALSE" chang = "changeGroup"/>
</el-form-item>
<!-- 按零件拆分 -->
<el-form-item label="按零件拆分">
<el-switch v-model="formData.configuration.ByItem" active-value="TRUE" inactive-value="FALSE"/>
@ -161,6 +164,7 @@ import { getSupplierList } from '@/api/wms/supplier'
import * as RuleApi from '@/api/wms/rule'
import { object } from 'vue-types'
import { isString } from '@/utils/is'
import { log } from 'console';
const { t } = useI18n() //
const message = useMessage() //
@ -188,6 +192,8 @@ const formData = ref({
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' }
],
configuration: {
//
NotGroup: 'FALSE',
//
ByItem: 'FALSE',
//
@ -276,6 +282,14 @@ const changeSupplierType = (e) => {
getFormSupplierList()
}
const changeGroup = () =>{
console.log(formData.configuration.NotGroup.value);
if(formData.configuration.NotGroup.value = "TRUE"){
formData.configuration.ByItem.value = "FALSE"
formData.configuration.ByLocation.value = "FALSE"
formData.configuration.ByContainer.value = "FALSE"
}
}
getFormSupplierList()
/** 打开弹窗 */
@ -416,6 +430,8 @@ const resetForm = () => {
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' }
],
configuration: {
//
NotGroup: 'FALSE',
//
ByItem: 'FALSE',
//

Loading…
Cancel
Save