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. 91
      src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue
  11. 86
      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 // 导出承运商 Excel
export const exportCarrier = async (params) => { 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 // 导出货主 Excel
export const exportOwner = async (params) => { 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 // 导出班次 Excel
export const exportShift = async (params) => { 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 // 导出班组 Excel
export const exportTeam = async (params) => { 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 () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await PackageApi.importTemplate()
}) })
</script> </script>

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

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

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

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

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

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

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

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

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

@ -1,18 +1,22 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="Configurationsetting.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search
:schema="Configurationsetting.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead <TableHead
:HeadButttondata="HeadButttondata" :HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick" @button-base-click="buttonBaseClick"
:route-name="routeName" :route-name="routeName"
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="Configurationsetting.allSchemas" :allSchemas="Configurationsetting.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
@ -27,13 +31,13 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #strategyType="{row}"> <template #strategyType="{ row }">
<el-button type="primary" link @click="openDetail(row, '策略类型', row.strategyType)"> <el-button type="primary" link @click="openDetail(row, '策略类型', row.strategyType)">
<span>{{ formatter(row.strategyType) }}</span> <span>{{ formatter(row.strategyType) }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event, row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -41,7 +45,7 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
@success="getList" @success="formsSuccess"
:rules="ConfigurationsettingRules" :rules="ConfigurationsettingRules"
:formAllSchemas="Configurationsetting.allSchemas" :formAllSchemas="Configurationsetting.allSchemas"
:apiUpdate="ConfigurationsettingApi.updateConfigurationsetting" :apiUpdate="ConfigurationsettingApi.updateConfigurationsetting"
@ -53,7 +57,12 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="Configurationsetting.allSchemas" /> <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> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -91,12 +100,12 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:configurationsetting:create'}), // defaultButtons.defaultAddBtn({ hasPermi: 'wms:configurationsetting:create' }), //
defaultButtons.defaultImportBtn({hasPermi:'wms:configurationsetting:import'}), // defaultButtons.defaultImportBtn({ hasPermi: 'wms:configurationsetting:import' }), //
defaultButtons.defaultExportBtn({hasPermi:'wms:configurationsetting:export'}), // defaultButtons.defaultExportBtn({ hasPermi: 'wms:configurationsetting:export' }), //
defaultButtons.defaultFreshBtn(null),// defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null) //
// { // {
// label: '', // label: '',
// name: 'zdy', // name: 'zdy',
@ -109,32 +118,40 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') {
//
openForm('create') openForm('create')
} else if (val == 'import') { // } else if (val == 'import') {
//
handleImport() handleImport()
} else if (val == 'export') { // } else if (val == 'export') {
//
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') {
//
getList() getList()
} else if (val == 'filtrate') { // } else if (val == 'filtrate') {
} else { // //
} else {
//
console.log('其他按钮', item) console.log('其他按钮', item)
} }
} }
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:configurationsetting:update'}), // defaultButtons.mainListEditBtn({ hasPermi: 'wms:configurationsetting:update' }), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:configurationsetting:delete'}), // defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:configurationsetting:delete' }) //
] ]
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') {
//
// const res = await ConfigurationsettingApi.getItempackaging(row.id) // const res = await ConfigurationsettingApi.getItempackaging(row.id)
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') {
//
handleDelete(row.id) handleDelete(row.id)
} }
} }
@ -144,6 +161,18 @@ const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row) 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() const detailRef = ref()
@ -203,12 +232,12 @@ const searchFormClick = (searchData) => {
} }
getList() // getList() //
} }
const formatter = (type)=>{ const formatter = (type) => {
let str = getStrDictOptions(DICT_TYPE.STRATEGY_TYPE).filter(item=>type==item.value)[0].label; let str = getStrDictOptions(DICT_TYPE.STRATEGY_TYPE).filter((item) => type == item.value)[0].label
return str return str
} }
/** 初始化 **/ /** 初始化 **/
onMounted(async() => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await ConfigurationsettingApi.importTemplate() importTemplateData.templateUrl = await ConfigurationsettingApi.importTemplate()
}) })

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

@ -1,18 +1,22 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="Rule.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search
:schema="Rule.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead <TableHead
:HeadButttondata="HeadButttondata" :HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick" @button-base-click="buttonBaseClick"
:route-name="routeName" :route-name="routeName"
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="Rule.allSchemas" :allSchemas="Rule.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
@ -27,13 +31,13 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #strategyCode="{row}"> <template #strategyCode="{ row }">
<el-button type="primary" link @click="openDetail(row, '策略代码', row.strategyCode)"> <el-button type="primary" link @click="openDetail(row, '策略代码', row.strategyCode)">
<span>{{ row.strategyCode }}</span> <span>{{ row.strategyCode }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event, row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -41,7 +45,7 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
@success="getList" @success="formsSuccess"
:rules="RuleRules" :rules="RuleRules"
:formAllSchemas="Rule.allSchemas" :formAllSchemas="Rule.allSchemas"
:apiUpdate="RuleApi.updateRule" :apiUpdate="RuleApi.updateRule"
@ -53,7 +57,12 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="Rule.allSchemas" /> <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> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -90,12 +99,12 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:rule:create'}), // defaultButtons.defaultAddBtn({ hasPermi: 'wms:rule:create' }), //
defaultButtons.defaultImportBtn({hasPermi:'wms:rule:import'}), // defaultButtons.defaultImportBtn({ hasPermi: 'wms:rule:import' }), //
defaultButtons.defaultExportBtn({hasPermi:'wms:rule:export'}), // defaultButtons.defaultExportBtn({ hasPermi: 'wms:rule:export' }), //
defaultButtons.defaultFreshBtn(null),// defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null) //
// { // {
// label: '', // label: '',
// name: 'zdy', // name: 'zdy',
@ -108,32 +117,40 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') {
//
openForm('create') openForm('create')
} else if (val == 'import') { // } else if (val == 'import') {
//
handleImport() handleImport()
} else if (val == 'export') { // } else if (val == 'export') {
//
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') {
//
getList() getList()
} else if (val == 'filtrate') { // } else if (val == 'filtrate') {
} else { // //
} else {
//
console.log('其他按钮', item) console.log('其他按钮', item)
} }
} }
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:rule:update'}), // defaultButtons.mainListEditBtn({ hasPermi: 'wms:rule:update' }), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:rule:delete'}), // defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:rule:delete' }) //
] ]
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') {
//
// const res = await RuleApi.getItempackaging(row.id) // const res = await RuleApi.getItempackaging(row.id)
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') {
//
handleDelete(row.id) handleDelete(row.id)
} }
} }
@ -143,6 +160,18 @@ const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row) 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() const detailRef = ref()
@ -204,8 +233,7 @@ const searchFormClick = (searchData) => {
} }
/** 初始化 **/ /** 初始化 **/
onMounted(async() => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await RuleApi.importTemplate()
}) })
</script> </script>

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

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

Loading…
Cancel
Save