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
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 })
}
}
// 下载用户导入模板
export const importTemplate = () => {

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

@ -54,8 +54,13 @@ 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 })
}
}
// 下载用户导入模板
export const importTemplate = () => {

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

@ -46,8 +46,13 @@ 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 })
}
}
// 下载用户导入模板
export const importTemplate = () => {

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

@ -44,8 +44,13 @@ 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 })
}
}
// 下载用户导入模板
export const importTemplate = () => {

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 {

57
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>
<!-- 列表头部 -->
@ -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">
@ -96,7 +105,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'wms:configurationsetting:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -109,16 +118,22 @@ 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)
}
}
@ -126,15 +141,17 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({ hasPermi: 'wms:configurationsetting:update' }), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:configurationsetting:delete'}), //
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()
@ -204,7 +233,7 @@ const searchFormClick = (searchData) => {
getList() //
}
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
}
/** 初始化 **/

56
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>
<!-- 列表头部 -->
@ -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">
@ -95,7 +104,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'wms:rule:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -108,16 +117,22 @@ 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)
}
}
@ -125,15 +140,17 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({ hasPermi: 'wms:rule:update' }), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:rule:delete'}), //
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()
@ -206,6 +235,5 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
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