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. 57
      src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue
  11. 56
      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,8 +54,13 @@ export const deleteCarrier = async (id: number) => {
// 导出承运商 Excel // 导出承运商 Excel
export const exportCarrier = async (params) => { 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 }) return await request.download({ url: `/wms/carrier/export-excel`, params })
} }
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {

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

@ -54,8 +54,13 @@ export const deleteOwner = async (id: number) => {
// 导出货主 Excel // 导出货主 Excel
export const exportOwner = async (params) => { 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 }) return await request.download({ url: `/wms/owner/export-excel`, params })
} }
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {

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

@ -46,8 +46,13 @@ export const deleteShift = async (id: number) => {
// 导出班次 Excel // 导出班次 Excel
export const exportShift = async (params) => { 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 }) return await request.download({ url: `/wms/shift/export-excel`, params })
} }
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {

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

@ -44,8 +44,13 @@ export const deleteTeam = async (id: number) => {
// 导出班组 Excel // 导出班组 Excel
export const exportTeam = async (params) => { 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 }) return await request.download({ url: `/wms/team/export-excel`, params })
} }
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {

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 {

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

@ -1,7 +1,11 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="Configurationsetting.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search
:schema="Configurationsetting.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</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">
@ -96,7 +105,7 @@ const HeadButttondata = [
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,16 +118,22 @@ 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)
} }
} }
@ -126,15 +141,17 @@ const buttonBaseClick = (val, 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()
@ -204,7 +233,7 @@ 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
} }
/** 初始化 **/ /** 初始化 **/

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

@ -1,7 +1,11 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="Rule.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search
:schema="Rule.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</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">
@ -95,7 +104,7 @@ const HeadButttondata = [
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,16 +117,22 @@ 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)
} }
} }
@ -125,15 +140,17 @@ const buttonBaseClick = (val, 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()
@ -206,6 +235,5 @@ 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