Browse Source

其他设置导出

master
zhang_li 1 year ago
parent
commit
4a958c4d56
  1. 5
      src/api/wms/carrier/index.ts
  2. 5
      src/api/wms/owner/index.ts
  3. 5
      src/api/wms/shift/index.ts
  4. 5
      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. 75
      src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue
  11. 72
      src/views/wms/basicDataManage/strategySetting/rule/index.vue
  12. 3
      src/views/wms/basicDataManage/strategySetting/rule/rule.data.ts

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

@ -54,7 +54,12 @@ export const deleteCarrier = async (id: number) => {
// 导出承运商 Excel
export const exportCarrier = async (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 })
}
}
// 下载用户导入模板

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

@ -54,7 +54,12 @@ export const deleteOwner = async (id: number) => {
// 导出货主 Excel
export const exportOwner = async (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 })
}
}
// 下载用户导入模板

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

@ -46,7 +46,12 @@ export const deleteShift = async (id: number) => {
// 导出班次 Excel
export const exportShift = async (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 })
}
}
// 下载用户导入模板

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

@ -44,7 +44,12 @@ export const deleteTeam = async (id: number) => {
// 导出班组 Excel
export const exportTeam = async (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 {

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

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Configurationsetting.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="Configurationsetting.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -27,13 +31,13 @@
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>
@ -41,7 +45,7 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
@success="formsSuccess"
:rules="ConfigurationsettingRules"
:formAllSchemas="Configurationsetting.allSchemas"
:apiUpdate="ConfigurationsettingApi.updateConfigurationsetting"
@ -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">
@ -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',
@ -109,32 +118,40 @@ 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;
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()
})

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

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Rule.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="Rule.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -27,13 +31,13 @@
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>
@ -41,7 +45,7 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="getList"
@success="formsSuccess"
:rules="RuleRules"
:formAllSchemas="Rule.allSchemas"
:apiUpdate="RuleApi.updateRule"
@ -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">
@ -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',
@ -108,32 +117,40 @@ 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