Browse Source

其他设置导出

master
zhang_li 1 year ago
parent
commit
4a958c4d56
  1. 7
      src/api/wms/carrier/index.ts
  2. 7
      src/api/wms/owner/index.ts
  3. 7
      src/api/wms/shift/index.ts
  4. 7
      src/api/wms/team/index.ts
  5. 1
      src/views/wms/basicDataManage/labelManage/package/index.vue
  6. 2
      src/views/wms/basicDataManage/orderManage/carrier/index.vue
  7. 2
      src/views/wms/basicDataManage/orderManage/owner/index.vue
  8. 2
      src/views/wms/basicDataManage/orderManage/shift/index.vue
  9. 2
      src/views/wms/basicDataManage/orderManage/team/index.vue
  10. 105
      src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue
  11. 100
      src/views/wms/basicDataManage/strategySetting/rule/index.vue
  12. 3
      src/views/wms/basicDataManage/strategySetting/rule/rule.data.ts

7
src/api/wms/carrier/index.ts

@ -54,7 +54,12 @@ export const deleteCarrier = async (id: number) => {
// 导出承运商 Excel
export const exportCarrier = async (params) => {
return await request.download({ url: `/wms/carrier/export-excel`, params })
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/carrier/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/carrier/export-excel`, params })
}
}
// 下载用户导入模板

7
src/api/wms/owner/index.ts

@ -54,7 +54,12 @@ export const deleteOwner = async (id: number) => {
// 导出货主 Excel
export const exportOwner = async (params) => {
return await request.download({ url: `/wms/owner/export-excel`, params })
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/owner/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/owner/export-excel`, params })
}
}
// 下载用户导入模板

7
src/api/wms/shift/index.ts

@ -46,7 +46,12 @@ export const deleteShift = async (id: number) => {
// 导出班次 Excel
export const exportShift = async (params) => {
return await request.download({ url: `/wms/shift/export-excel`, params })
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/shift/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/shift/export-excel`, params })
}
}
// 下载用户导入模板

7
src/api/wms/team/index.ts

@ -44,7 +44,12 @@ export const deleteTeam = async (id: number) => {
// 导出班组 Excel
export const exportTeam = async (params) => {
return await request.download({ url: `/wms/team/export-excel`, params })
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/team/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/team/export-excel`, params })
}
}
// 下载用户导入模板

1
src/views/wms/basicDataManage/labelManage/package/index.vue

@ -253,6 +253,5 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await PackageApi.importTemplate()
})
</script>

2
src/views/wms/basicDataManage/orderManage/carrier/index.vue

@ -195,7 +195,7 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await CarrierApi.exportCarrier(setSearchParams)
const data = await CarrierApi.exportCarrier(tableObject.params)
download.excel(data, '承运商.xls')
} catch {
} finally {

2
src/views/wms/basicDataManage/orderManage/owner/index.vue

@ -195,7 +195,7 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await OwnerApi.exportOwner(setSearchParams)
const data = await OwnerApi.exportOwner(tableObject.params)
download.excel(data, '货主.xls')
} catch {
} finally {

2
src/views/wms/basicDataManage/orderManage/shift/index.vue

@ -195,7 +195,7 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await ShiftApi.exportShift(setSearchParams)
const data = await ShiftApi.exportShift(tableObject.params)
download.excel(data, '班次.xls')
} catch {
} finally {

2
src/views/wms/basicDataManage/orderManage/team/index.vue

@ -195,7 +195,7 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await TeamApi.exportTeam(setSearchParams)
const data = await TeamApi.exportTeam(tableObject.params)
download.excel(data, '班组.xls')
} catch {
} finally {

105
src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue

@ -1,18 +1,22 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Configurationsetting.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="Configurationsetting.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:route-name="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Configurationsetting.allSchemas"
/>
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:route-name="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Configurationsetting.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
@ -27,23 +31,23 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #strategyType="{row}">
<template #strategyType="{ row }">
<el-button type="primary" link @click="openDetail(row, '策略类型', row.strategyType)">
<span>{{ formatter(row.strategyType) }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event, row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
:rules="ConfigurationsettingRules"
:formAllSchemas="Configurationsetting.allSchemas"
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ConfigurationsettingRules"
:formAllSchemas="Configurationsetting.allSchemas"
:apiUpdate="ConfigurationsettingApi.updateConfigurationsetting"
:apiCreate="ConfigurationsettingApi.createConfigurationsetting"
:isBusiness="false"
@ -53,7 +57,12 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="Configurationsetting.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/configurationsetting/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/wms/configurationsetting/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
</template>
<script setup lang="ts">
@ -62,7 +71,7 @@ import * as ConfigurationsettingApi from '@/api/wms/configurationsetting'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import { Configurationsetting, ConfigurationsettingRules } from './configurationsetting.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
@ -91,12 +100,12 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:configurationsetting:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:configurationsetting:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:configurationsetting:export'}), //
defaultButtons.defaultFreshBtn(null),//
defaultButtons.defaultAddBtn({ hasPermi: 'wms:configurationsetting:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:configurationsetting:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:configurationsetting:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -107,34 +116,42 @@ const HeadButttondata = [
// },
]
//
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:configurationsetting:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:configurationsetting:delete'}), //
defaultButtons.mainListEditBtn({ hasPermi: 'wms:configurationsetting:update' }), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:configurationsetting:delete' }) //
]
// -
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
// const res = await ConfigurationsettingApi.getItempackaging(row.id)
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
}
}
@ -144,6 +161,18 @@ const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType, data) => {
if (formType === 'create') {
await ConfigurationsettingApi.createConfigurationsetting(data)
message.success(t('common.createSuccess'))
} else {
await ConfigurationsettingApi.updateConfigurationsetting(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
@ -203,12 +232,12 @@ const searchFormClick = (searchData) => {
}
getList() //
}
const formatter = (type)=>{
let str = getStrDictOptions(DICT_TYPE.STRATEGY_TYPE).filter(item=>type==item.value)[0].label;
return str
const formatter = (type) => {
let str = getStrDictOptions(DICT_TYPE.STRATEGY_TYPE).filter((item) => type == item.value)[0].label
return str
}
/** 初始化 **/
onMounted(async() => {
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ConfigurationsettingApi.importTemplate()
})

100
src/views/wms/basicDataManage/strategySetting/rule/index.vue

@ -1,18 +1,22 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Rule.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="Rule.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:route-name="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Rule.allSchemas"
/>
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:route-name="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Rule.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
@ -27,23 +31,23 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #strategyCode="{row}">
<template #strategyCode="{ row }">
<el-button type="primary" link @click="openDetail(row, '策略代码', row.strategyCode)">
<span>{{ row.strategyCode }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event, row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
:rules="RuleRules"
:formAllSchemas="Rule.allSchemas"
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="RuleRules"
:formAllSchemas="Rule.allSchemas"
:apiUpdate="RuleApi.updateRule"
:apiCreate="RuleApi.createRule"
:isBusiness="false"
@ -53,7 +57,12 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="Rule.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/rule/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/wms/rule/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
</template>
<script setup lang="ts">
@ -62,7 +71,7 @@ import * as RuleApi from '@/api/wms/rule'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import { Rule, RuleRules } from './rule.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
@ -90,12 +99,12 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:rule:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:rule:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:rule:export'}), //
defaultButtons.defaultFreshBtn(null),//
defaultButtons.defaultAddBtn({ hasPermi: 'wms:rule:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:rule:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:rule:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -106,34 +115,42 @@ const HeadButttondata = [
// },
]
//
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:rule:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:rule:delete'}), //
defaultButtons.mainListEditBtn({ hasPermi: 'wms:rule:update' }), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:rule:delete' }) //
]
// -
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
// const res = await RuleApi.getItempackaging(row.id)
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
}
}
@ -143,6 +160,18 @@ const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType, data) => {
if (formType === 'create') {
await RuleApi.createRule(data)
message.success(t('common.createSuccess'))
} else {
await RuleApi.updateRule(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
@ -204,8 +233,7 @@ const searchFormClick = (searchData) => {
}
/** 初始化 **/
onMounted(async() => {
onMounted(async () => {
getList()
importTemplateData.templateUrl = await RuleApi.importTemplate()
})
</script>

3
src/views/wms/basicDataManage/strategySetting/rule/rule.data.ts

@ -14,6 +14,7 @@ export const Rule = useCrudSchemas(reactive<CrudSchema[]>([
width: 150,
fixed: 'left'
},
isSearch:true
},
{
label: '优先级',
@ -36,6 +37,7 @@ export const Rule = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch:true
},
{
label: '名称',
@ -44,6 +46,7 @@ export const Rule = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch:true
},
{
label: '条件',

Loading…
Cancel
Save