li.shaoyi il y a 2 mois
Parent
commit
a7509d60e5

+ 4 - 4
src/packages/pc/components/base/table/index.vue

@@ -19,8 +19,8 @@
         @expand-change="onRowClick" @select="onSelect" @select-all="onSelect" border>
         <!-- 展开行 -->
         <el-table-column type="expand" v-if="$slots.expand">
-          <template #default="{ row, $index }">
-            <slot name="expand" :row="row" :index="$index"></slot>
+          <template #default="{ row, index }">
+            <slot name="expand" :row="row" :index="index"></slot>
           </template>
         </el-table-column>
         <!-- 选择列 -->
@@ -33,8 +33,8 @@
           <el-table-column :align="item.align ?? 'center'" :min-width="120" :width="item.width"
             :label="t(item.formatLabel?.() ?? item.label)" :prop="item.field" :fixed="item.fixed || false"
             :sortable="item.sortable" :show-overflow-tooltip="item.field !== 'operate'" v-if="item.show ?? true">
-            <template #default="{ row, $index }">
-              <slot :name="item.field" :row="row" :value="row[item.field]" :index="$index">
+            <template #default="{ row, index }">
+              <slot :name="item.field" :row="row" :value="row[item.field]" :index="index">
                 <span :class="item.className">{{ handleValue(row, item) }}</span>
               </slot>
             </template>

+ 0 - 1
src/packages/pc/views/admin/user/index.vue

@@ -85,7 +85,6 @@ const { dataList: selectList } = useRequest(queryOrganSelect, {
 })
 
 const tableColumns = shallowRef<Model.TableColumn[]>([
-    { field: 'autoid', label: 'ID' },
     { field: 'logincode', label: 'admin.user.logincode' },
     { field: 'username', label: 'admin.user.username' },
     { field: 'areaName', label: 'admin.user.areaName' },

+ 52 - 0
src/packages/pc/views/base/marketsection/components/delete/index.vue

@@ -0,0 +1,52 @@
+<!-- 基础数据管理-市场板块设置-删除 -->
+<template>
+    <app-drawer :title="t('common.alert')" v-model:show="show" :loading="loading" :refresh="refresh">
+        <div class="g-text-message">是否删除该板块的配置信息?</div>
+        <template #footer>
+            <el-button @click="onCancel(false)">{{ t('operation.cancel') }}</el-button>
+            <el-button type="primary" @click="onSubmit">{{ t('operation.confirm') }}</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import { ElMessage } from 'element-plus'
+import { deleteMarketSet } from '@/services/api/base'
+import { i18n } from '@/stores'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+
+const props = defineProps({
+    record: {
+        type: Object as PropType<Base.MarketSetRsp>,
+        required: true
+    }
+})
+
+const t = i18n.global.t
+const show = shallowRef(true)
+const refresh = shallowRef(false)
+const loading = shallowRef(false)
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+
+const onSubmit = () => {
+    loading.value = true
+    deleteMarketSet({
+        data: {
+            marketsectionid: props.record.marketsectionid
+        }
+    }).then(() => {
+        ElMessage.success(t('common.tips5'))
+        onCancel(true)
+    }).catch((err) => {
+        ElMessage.error(t('common.tips6') + err)
+        onCancel()
+    }).finally(() => {
+        loading.value = false
+    })
+}
+</script>

+ 79 - 0
src/packages/pc/views/base/marketsection/components/details/index.vue

@@ -0,0 +1,79 @@
+<!-- 基础数据管理-市场板块设置-详情 -->
+<template>
+    <app-drawer title="详情" width="960" v-model:show="show">
+        <app-table-details title="板块信息" :data="data" :label-width="160" :cell-props="detailProps" :column="2">
+            <!-- 图片 -->
+            <template #pictureurl="{ value }">
+                <el-image style="width: 200px; height: 100px" :src="getFirstPathFullUrl(value)" fit="contain"
+                    v-if="value" />
+                <span v-else>{{ handleNoneValue() }}</span>
+            </template>
+        </app-table-details>
+        <app-table :data="data?.configs" :columns="tableColumns">
+            <template #headerLeft>
+                <b>包含市场</b>
+            </template>
+        </app-table>
+        <template #footer>
+            <el-button @click="onCancel">{{ t('operation.close') }}</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import { ElMessage } from 'element-plus'
+import { handleNoneValue, getFirstPathFullUrl } from '@/filters'
+import { useRequest } from '@/hooks/request'
+import { marketSetDetail } from '@/services/api/base'
+import { i18n } from '@/stores'
+import { CellProp } from '@pc/components/base/table-details/types'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+import AppTableDetails from '@pc/components/base/table-details/index.vue'
+import AppTable from '@pc/components/base/table/index.vue'
+
+const props = defineProps({
+    record: {
+        type: Object as PropType<Base.MarketSetRsp>,
+        required: true
+    }
+})
+
+const t = i18n.global.t
+const show = shallowRef(true)
+
+const { data } = useRequest(marketSetDetail, {
+    defaultParams: {
+        marketsectionid: props.record.marketsectionid
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const detailProps = shallowRef<CellProp[]>([
+    { prop: 'marketsectionname', label: '名称(中文)' },
+    { prop: 'marketsectionnameen', label: 'Name(英文)' },
+    { prop: 'marketsectionnamezhtw', label: '名稱(繁体)' },
+    { prop: 'marketsectionnameth', label: 'ชื่อ(泰文)' },
+    { prop: 'marketsectionnamevi', label: 'Tên(越南语)' },
+    { prop: 'orderindex', label: '排序' },
+    { prop: 'pictureurl', label: '图片' },
+    { prop: 'modifytimestr', label: '更新时间' },
+    { prop: 'modifiername', label: '操作人' },
+])
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'orderindex', label: '顺序' },
+    { field: 'displayname', label: '名称(中文)' },
+    { field: 'displaynameen', label: 'Name(英文)' },
+    { field: 'displaynamezhtw', label: '名稱(繁体)' },
+    { field: 'displaynameth', label: 'ชื่อ(泰文)' },
+    { field: 'displaynamevi', label: 'Tên(越南语)' },
+    { field: 'marketnames', label: '市场名称' },
+])
+
+const onCancel = () => {
+    show.value = false
+}
+</script>

+ 199 - 0
src/packages/pc/views/base/marketsection/components/edit/index.vue

@@ -0,0 +1,199 @@
+<!-- 管理员管理-管理员管理-编辑 -->
+<template>
+    <app-drawer title="编辑" width="900" v-model:show="show" :refresh="refresh" :loading="loading">
+        <el-form ref="formRef" class="el-form--horizontal" label-width="auto" :model="formData" :rules="formRules"
+            :show-message="false">
+            <el-form-item label="名称(中文)" prop="marketsectionname">
+                <el-input v-model="formData.marketsectionname" maxlength="50" :placeholder="t('common.pleaseenter')" />
+            </el-form-item>
+            <el-form-item label="Name(英文)" prop="marketsectionnameen">
+                <el-input v-model="formData.marketsectionnameen" maxlength="50"
+                    :placeholder="t('common.pleaseenter')" />
+            </el-form-item>
+            <el-form-item label="名稱(繁体)" prop="marketsectionnamezhtw">
+                <el-input v-model="formData.marketsectionnamezhtw" maxlength="50"
+                    :placeholder="t('common.pleaseenter')" />
+            </el-form-item>
+            <el-form-item label="ชื่อ(泰文)" prop="marketsectionnameth">
+                <el-input v-model="formData.marketsectionnameth" maxlength="50"
+                    :placeholder="t('common.pleaseenter')" />
+            </el-form-item>
+            <el-form-item label="Tên(越南语)" prop="marketsectionnamevi">
+                <el-input v-model="formData.marketsectionnamevi" maxlength="50"
+                    :placeholder="t('common.pleaseenter')" />
+            </el-form-item>
+            <el-form-item label="排序" prop="orderindex">
+                <el-input-number v-model="formData.orderindex" :placeholder="t('common.pleaseenter')" :min="0" />
+            </el-form-item>
+            <el-form-item label="图片(90*90)" prop="pictureurl">
+                <app-upload v-model="uploadFiles" :file-types="['image']" :type-message="t('common.tips21')"
+                    :max-size="uploadConfig.maxFileSize" />
+            </el-form-item>
+            <el-form-item class="el-form-item--row" label="包含市场">
+                <app-table :data="tableList" :columns="tableColumns">
+                    <template #headerLeft>
+                        <el-button icon="Plus" plain @click="openComponent('TradeMode')">新增</el-button>
+                    </template>
+                    <!-- 操作 -->
+                    <template #operate="{ index }">
+                        <el-button icon="Delete" size="small" plain circle @click="deleteMarket(index)" />
+                    </template>
+                </app-table>
+            </el-form-item>
+        </el-form>
+        <template #footer>
+            <el-button @click="onCancel(false)">{{ t('operation.cancel') }}</el-button>
+            <el-button type="primary" @click="onSubmit">{{ t('operation.submit') }}</el-button>
+        </template>
+        <component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ record }" @submit="updateMarket"
+            @closed="closeComponent" v-if="componentId" />
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { ref, PropType, onMounted, defineAsyncComponent } from 'vue'
+import { ElMessage, FormInstance, FormRules, UploadUserFile } from 'element-plus'
+import { parseFilePaths, extractFilePaths } from '@/filters'
+import { uploadConfig } from '@/constants/common'
+import { useRequest } from '@/hooks/request'
+import { useComponent } from '@/hooks/component'
+import { delMarket, marketSetDetail } from '@/services/api/base'
+import { i18n } from '@/stores'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+import AppUpload from '@pc/components/base/upload/index.vue'
+import AppTable from '@pc/components/base/table/index.vue'
+
+const props = defineProps({
+    record: {
+        type: Object as PropType<Base.MarketSetRsp>
+    }
+})
+
+const componentMap = new Map<string, unknown>([
+    ['TradeMode', defineAsyncComponent(() => import('./trademode.vue'))], // 新增市场
+])
+
+const t = i18n.global.t
+const formRef = ref<FormInstance>()
+const show = ref(true)
+const refresh = ref(false)
+const uploadFiles = ref<UploadUserFile[]>([])
+const tableList = ref<Base.MarketSetDetailRsp['configs']>([])
+
+const formData = ref<Base.DelMarketReq>({
+    list: [],
+    marketsectionname: '',
+    marketsectionnameen: '',
+    marketsectionnameth: '',
+    marketsectionnamevi: '',
+    marketsectionnamezhtw: '',
+    orderindex: 1,
+    pictureurl: ''
+})
+
+const tableColumns = ref<Model.TableColumn[]>([
+    { field: 'orderindex', label: '顺序' },
+    { field: 'displayname', label: '名称(中文)' },
+    { field: 'displaynameen', label: 'Name(英文)' },
+    { field: 'displaynamezhtw', label: '名稱(繁体)' },
+    { field: 'displaynameth', label: 'ชื่อ(泰文)' },
+    { field: 'displaynamevi', label: 'Tên(越南语)' },
+    { field: 'marketnames', label: '市场名称' },
+    { field: 'operate', label: '操作', fixed: 'right' }
+])
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent()
+
+const { loading, run } = useRequest(marketSetDetail, {
+    manual: true,
+    onSuccess: ((res) => {
+        const data = res.data
+
+        formData.value = {
+            list: [],
+            marketsectionid: props.record?.marketsectionid,
+            marketsectionname: data.marketsectionname,
+            marketsectionnameen: data.marketsectionnameen,
+            marketsectionnameth: data.marketsectionnameth,
+            marketsectionnamevi: data.marketsectionnamevi,
+            marketsectionnamezhtw: data.marketsectionnamezhtw,
+            orderindex: data.orderindex,
+            pictureurl: data.pictureurl,
+        }
+
+        tableList.value = data.configs
+        uploadFiles.value = parseFilePaths(data.pictureurl)
+    }),
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+// 表单验证规则
+const formRules: FormRules = {
+    marketsectionname: [{ required: true }],
+    marketsectionnameen: [{ required: true }],
+    marketsectionnamezhtw: [{ required: true }],
+    marketsectionnameth: [{ required: true }],
+    marketsectionnamevi: [{ required: true }],
+    orderindex: [{ required: true }],
+}
+
+// 更新数据
+const updateMarket = (data: Base.MarketSetDetailRsp['configs'][number]) => {
+    if (!tableList.value.some((e) => e.trademode === data.trademode)) {
+        tableList.value.push(data)
+    } else {
+        ElMessage.warning('已存在相同交易模式')
+    }
+}
+
+// 删除市场
+const deleteMarket = (index: number) => {
+    tableList.value.splice(index, 1)
+}
+
+const onSubmit = () => {
+    const rawData = { ...formData.value }
+
+    rawData.pictureurl = extractFilePaths(uploadFiles.value)
+    rawData.list = tableList.value.map((e) => ({
+        displayname: e.displayname,
+        displaynameen: e.displaynameen,
+        displaynameth: e.displaynameth,
+        displaynamevi: e.displaynamevi,
+        displaynamezhtw: e.displaynamezhtw,
+        marketids: e.marketids,
+        orderindex: e.orderindex,
+        trademode: e.trademode,
+    }))
+
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            loading.value = true
+            delMarket({
+                data: rawData
+            }).then(() => {
+                ElMessage.success(t('common.tips3'))
+                onCancel(true)
+            }).catch((err) => {
+                ElMessage.error(t('common.tips4') + err)
+            }).finally(() => {
+                loading.value = false
+            })
+        }
+    })
+}
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+
+onMounted(() => {
+    const marketsectionid = props.record?.marketsectionid
+    if (marketsectionid) {
+        run({ marketsectionid })
+    }
+})
+</script>

+ 117 - 0
src/packages/pc/views/base/marketsection/components/edit/trademode.vue

@@ -0,0 +1,117 @@
+<template>
+    <app-drawer title="新增" width="480" v-model:show="show">
+        <el-form ref="formRef" class="el-form--vertical" label-width="auto" :model="formData" :rules="formRules">
+            <el-form-item label="名称(中文)" prop="displayname" :show-message="false">
+                <el-input v-model="formData.displayname" maxlength="50" :placeholder="t('common.pleaseenter')" />
+            </el-form-item>
+            <el-form-item label="Name(英文)" prop="displaynameen" :show-message="false">
+                <el-input v-model="formData.displaynameen" maxlength="50" :placeholder="t('common.pleaseenter')" />
+            </el-form-item>
+            <el-form-item label="名稱(繁体)" prop="displaynamezhtw" :show-message="false">
+                <el-input v-model="formData.displaynamezhtw" maxlength="50" :placeholder="t('common.pleaseenter')" />
+            </el-form-item>
+            <el-form-item label="ชื่อ(泰文)" prop="displaynameth" :show-message="false">
+                <el-input v-model="formData.displaynameth" maxlength="50" :placeholder="t('common.pleaseenter')" />
+            </el-form-item>
+            <el-form-item label="Tên(越南语)" prop="displaynamevi" :show-message="false">
+                <el-input v-model="formData.displaynamevi" maxlength="50" :placeholder="t('common.pleaseenter')" />
+            </el-form-item>
+            <el-form-item label="交易模式" prop="trademode" :show-message="false">
+                <el-select v-model="formData.trademode" :empty-values="[0]" :value-on-clear="0"
+                    @change="tradeModeChange">
+                    <template v-for="item in dataList" :key="item.trademode">
+                        <el-option :label="item.trademodename" :value="item.trademode" />
+                    </template>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="市场名称" prop="marketids" v-if="selectedTradeMode">
+                <el-checkbox-group v-model="checkedMarkets" @change="updateFormData">
+                    <template v-for="item in selectedTradeMode.results" :key="item.marketid">
+                        <el-checkbox name="marketids" :label="item.marketname" :value="item" />
+                    </template>
+                </el-checkbox-group>
+            </el-form-item>
+            <el-form-item label="顺序" prop="orderindex" :show-message="false">
+                <el-input-number v-model="formData.orderindex" :placeholder="t('common.pleaseenter')" :min="0" />
+            </el-form-item>
+        </el-form>
+        <template #footer>
+            <el-button @click="onCancel">取消</el-button>
+            <el-button type="primary" @click="onSubmit">保存</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { ref, computed, toRaw } from 'vue'
+import { FormInstance, FormRules } from 'element-plus'
+import { useRequest } from '@/hooks/request'
+import { querytrademodes } from '@/services/api/base'
+import { i18n } from '@/stores'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+
+const emit = defineEmits(['submit'])
+
+const t = i18n.global.t
+const formRef = ref<FormInstance>()
+const show = ref(true)
+const checkedMarkets = ref<Base.TradeModesRsp['results']>([])
+
+const formData = ref<Base.MarketSetDetailRsp['configs'][number]>({
+    displayname: '',
+    displaynameen: '',
+    displaynameth: '',
+    displaynamevi: '',
+    displaynamezhtw: '',
+    marketids: '',
+    marketnames: '',
+    orderindex: 1,
+    trademode: 0
+})
+
+const { dataList } = useRequest(querytrademodes)
+
+const selectedTradeMode = computed(() => dataList.value.find((e) => e.trademode === formData.value.trademode))
+
+// 表单验证规则
+const formRules: FormRules = {
+    displayname: [{ required: true }],
+    displaynameen: [{ required: true }],
+    displaynamezhtw: [{ required: true }],
+    displaynameth: [{ required: true }],
+    displaynamevi: [{ required: true }],
+    trademode: [{ required: true, validator: (rule, value) => !!value }],
+    marketids: [{ required: true, message: '请选择市场' }],
+    orderindex: [{ required: true }],
+}
+
+const tradeModeChange = () => {
+    checkedMarkets.value = []
+    formData.value.marketids = ''
+}
+
+const updateFormData = () => {
+    const [marketids, marketnames] = checkedMarkets.value.reduce<[number[], string[]]>((acc, curr) => {
+        acc[0].push(curr.marketid)
+        acc[1].push(curr.marketname)
+        return acc
+    }, [[], []])
+
+    formData.value.marketids = marketids.join(',')
+    formData.value.marketnames = marketnames.join(',')
+    formRef.value?.validateField('marketids')
+}
+
+const onSubmit = () => {
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            emit('submit', toRaw(formData.value))
+            onCancel()
+        }
+    })
+}
+
+const onCancel = () => {
+    show.value = false
+}
+</script>

+ 74 - 1
src/packages/pc/views/base/marketsection/index.vue

@@ -1,7 +1,80 @@
 <!-- 基础数据管理-市场板块设置 -->
 <template>
-    <app-view></app-view>
+    <app-view>
+        <template #header>
+            <app-filter :option="filterOption" />
+        </template>
+        <app-table :data="dataList" :columns="tableColumns" :loading="loading">
+            <template #headerLeft>
+                <app-operation :data-list="getActionButtons(['base_marketsection_add'])" @click="openComponent" />
+            </template>
+            <!-- 创建时间 -->
+            <template #modifytimestr="{ value }">
+                {{ formatDate(value) }}
+            </template>
+            <!-- 操作 -->
+            <template #operate="{ row }">
+                <app-operation size="small"
+                    :data-list="getActionButtons(['base_marketsection_details', 'base_marketsection_modify', 'base_marketsection_delete'])"
+                    @click="(code: string) => openComponent(code, row)" circle />
+            </template>
+            <template #footer>
+                <app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex"
+                    @change="onSearch" />
+            </template>
+        </app-table>
+        <component :is="componentMap.get(componentId)" v-bind="{ record }" @closed="closeComponent"
+            v-if="componentId" />
+    </app-view>
 </template>
 
 <script lang="ts" setup>
+import { shallowRef } from 'vue'
+import { ElMessage } from 'element-plus'
+import { formatDate } from '@/filters'
+import { useRequest } from '@/hooks/request'
+import { useDataFilter } from '@/hooks/datatable-v2'
+import { useOperation } from '@/hooks/operation'
+import { queryMarketSet } from '@/services/api/base'
+import AppTable from '@pc/components/base/table/index.vue'
+import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
+import AppPagination from '@pc/components/base/pagination/index.vue'
+import AppOperation from '@pc/components/base/operation/index.vue'
+
+const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Base.MarketSetRsp>({
+    onClose: () => onSearch()
+})
+
+const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryMarketSet, {
+    defaultParams: {
+        pageNum: 1,
+        pageSize: 20
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
+const tableColumns = shallowRef<Model.TableColumn[]>([
+    { field: 'marketsectionname', label: '板块名称' },
+    { field: 'orderindex', label: '显示排序' },
+    { field: 'modifytimestr', label: '修改时间' },
+    { field: 'modifiername', label: '操作人' },
+    { field: 'operate', label: '操作', fixed: 'right' }
+])
+
+const { filterOption, getQueryParams, resetFilters } = useDataFilter<Base.MarketSetReq>({
+    filters: [
+        { label: '板块', field: 'marketsectionname' }
+    ],
+    buttons: [
+        { label: '查询', className: 'el-button--primary', onClick: () => onSearch() },
+        { label: '重置', className: 'el-button--primary', onClick: () => resetFilters() }
+    ]
+})
+
+const onSearch = (clear = false) => {
+    const qs = getQueryParams(clear)
+    run(qs)
+}
 </script>

+ 29 - 29
src/services/api/base/index.ts

@@ -9,13 +9,6 @@ export function queryError(options: CommonFetchOptions<{ request: Base.ErrorReq;
 }
 
 /**
- * 基础数据管理-->市场板块设置-->获取列表
- */
-export function queryMarketSet(options: CommonFetchOptions<{ request: Base.MarketSetReq; response: Base.MarketSetRsp[]; }> = {}) {
-    return httpClient.commonRequest('/setup/queryMarketSet', 'get', options)
-}
-
-/**
  * 基础数据管理-->系统参数管理-->获取列表
  */
 export function queryParam(options: CommonFetchOptions<{ request: Base.ParamReq; response: Base.ParamRsp[]; }> = {}) {
@@ -25,57 +18,64 @@ export function queryParam(options: CommonFetchOptions<{ request: Base.ParamReq;
 /**
  * 基础数据管理-->终端图片管理-->获取列表
  */
-export function querypicture(options: CommonFetchOptions<{ request: Base.PictureReq; response: Base.PictureRsp[]; }> = {}) {
+export function querypicture(options: CommonFetchOptions<{ request: Base.PictureReq; response: Base.PictureRsp[]; }>) {
     return httpClient.commonRequest('/setup/querypicture', 'get', options)
 }
 
 /**
- * 基础数据管理-->市场板块设置-->新增初始化市场
+ * 基础数据管理-->终端图片管理-->详情
  */
-export function querytrademodes(options: CommonFetchOptions<{ response: Member.Markets; }> = {}) {
-    return httpClient.commonRequest('/setup/querytrademodes', 'get', options)
+export function pictureDetail(options: CommonFetchOptions<{ request: Base.PictureDetailReq; response: Base.PictureDetailRsp; }>) {
+    return httpClient.commonRequest('/setup/pictureDetail', 'get', options)
 }
 
 /**
- * 基础数据管理-->终端图片管理-->详情
+ * 基础数据管理-->终端图片管理-->新增,修改
  */
-export function pictureDetail(options: CommonFetchOptions<{ request: Base.PictureDetailReq; response: Base.PictureDetailRsp; }> = {}) {
-    return httpClient.commonRequest('/setup/pictureDetail', 'get', options)
+export function delPicture(options: CommonFetchOptions<{ request: Base.DelPictureReq }>) {
+    return httpClient.commonRequest('/setup/dealpicture', 'post', options)
 }
 
 /**
- * 基础数据管理-->市场板块设置-->详情
+ * 基础数据管理-->终端图片管理-->删除
  */
-export function marketSetDetail(options: CommonFetchOptions<{ request: Base.MarketSetDetailReq; response: Base.MarketSetDetailRsp; }> = {}) {
-    return httpClient.commonRequest('/setup/marketSetDetail', 'get', options)
+export function deletePicture(options: CommonFetchOptions<{ request: Base.DeletePictureReq }>) {
+    return httpClient.commonRequest('/setup/deletepicture', 'get', options)
 }
 
 /**
- * 基础数据管理-->市场板块设置-->新增,修改
+ * 基础数据管理-->市场板块设置-->获取列表
  */
-export function delMarket(options: CommonFetchOptions<{ request: Base.DelMarketReq }> = {}) {
-    return httpClient.commonRequest('/setup/delmarket', 'post', options)
+export function queryMarketSet(options: CommonFetchOptions<{ request: Base.MarketSetReq; response: Base.MarketSetRsp[]; }>) {
+    return httpClient.commonRequest('/setup/queryMarketSet', 'get', options)
 }
 
 /**
- * 基础数据管理-->终端图片管理-->删除
+ * 基础数据管理-->市场板块设置-->新增初始化市场
  */
-export function deletePicture(options: CommonFetchOptions<{ request: Base.DeletePictureReq }> = {}) {
-    return httpClient.commonRequest('/setup/deletepicture', 'get', options)
+export function querytrademodes(options: CommonFetchOptions<{ request: Base.TradeModesReq; response: Base.TradeModesRsp; }>) {
+    return httpClient.commonRequest('/setup/querytrademodes', 'get', options)
 }
 
 /**
- * 基础数据管理-->市场板块设置-->删除
+ * 基础数据管理-->市场板块设置-->详情
  */
-export function deleteMarketSet(options: CommonFetchOptions<{ request: Base.DeleteMarketSetReq }> = {}) {
-    return httpClient.commonRequest('/setup/deletemarketSet', 'get', options)
+export function marketSetDetail(options: CommonFetchOptions<{ request: Base.MarketSetDetailReq; response: Base.MarketSetDetailRsp; }>) {
+    return httpClient.commonRequest('/setup/marketSetDetail', 'get', options)
 }
 
 /**
- * 基础数据管理-->终端图片管理-->新增,修改
+ * 基础数据管理-->市场板块设置-->新增,修改
  */
-export function delPicture(options: CommonFetchOptions<{ request: Base.DelPictureReq }> = {}) {
-    return httpClient.commonRequest('/setup/dealpicture', 'post', options)
+export function delMarket(options: CommonFetchOptions<{ request: Base.DelMarketReq }>) {
+    return httpClient.commonRequest('/setup/delmarket', 'post', options)
+}
+
+/**
+ * 基础数据管理-->市场板块设置-->删除
+ */
+export function deleteMarketSet(options: CommonFetchOptions<{ request: Base.DeleteMarketSetReq }>) {
+    return httpClient.commonRequest('/setup/deletemarketSet', 'get', options)
 }
 
 /**

+ 42 - 24
src/types/model/base.d.ts

@@ -34,9 +34,9 @@ declare namespace Base {
         // 
         marketsectionname?: string
         // 页码
-        pageNum?: number
+        pageNum: number
         // 页大小
-        pageSize?: number
+        pageSize: number
     }
 
     /** 基础数据管理-->市场板块设置-->获取列表 回应 */
@@ -190,9 +190,11 @@ declare namespace Base {
             displaynameen: string
             displaynameth: string
             displaynamevi: string
-            displaynamezh_tw: string
+            displaynamezhtw: string
+            marketids: string;
             marketnames: string
             orderindex: number
+            trademode: number;
         }[]
         i18nconfigs: {
             langcode: string
@@ -203,7 +205,7 @@ declare namespace Base {
         marketsectionnameen: string
         marketsectionnameth: string
         marketsectionnamevi: string
-        marketsectionnamezh_tw: string
+        marketsectionnamezhtw: string
         // 操作人
         modifiername: string
         // 更新时间
@@ -214,28 +216,27 @@ declare namespace Base {
         pictureurl: string
     }
 
+    /** 基础数据管理-->市场板块设置-->新增初始化市场 请求 */
+    interface TradeModesReq {
+        editmarketsectionid?: number;
+        selectedmarketids?: string;
+    }
+
+    /** 基础数据管理-->市场板块设置-->新增初始化市场 响应 */
+    interface TradeModesRsp {
+        results: {
+            marketid: number;
+            marketname: string;
+        }[];
+        trademode: number;
+        trademodename: string;
+    }
+
     /** 基础数据管理-->市场板块设置-->新增,修改 请求 */
     interface DelMarketReq {
-        list?: {
-            // Name(英文)名称(中文)
-            displayname: string
-            // Name(英文) Name(英文)
-            displaynameen: string
-            // Name(英文)Tên(泰文)
-            displaynameth: string
-            // Name(英文)Tên(越南语)
-            displaynamevi: string
-            // Name(英文)Tên(繁体)
-            displaynamezhtw: string
-            // Name(英文)交易模式
-            marketids: string
-            // Name(英文)排序
-            orderindex: number
-            // 
-            trademode: number
-        }[]
+        list: DelMarketList[]
         // 
-        marketsectionid: number
+        marketsectionid?: number
         // 名称(中文)
         marketsectionname: string
         // Name(英文)
@@ -250,8 +251,25 @@ declare namespace Base {
         orderindex: number
         // 图片(90*90)
         pictureurl: string
+    }
+
+    interface DelMarketList {
+        // Name(英文)名称(中文)
+        displayname: string
+        // Name(英文) Name(英文)
+        displaynameen: string
+        // Name(英文)Tên(泰文)
+        displaynameth: string
+        // Name(英文)Tên(越南语)
+        displaynamevi: string
+        // Name(英文)Tên(繁体)
+        displaynamezhtw: string
+        // Name(英文)交易模式
+        marketids: string
+        // Name(英文)排序
+        orderindex: number
         // 
-        remark: string
+        trademode: number
     }
 
     /** 基础数据管理-->终端图片管理-->删除 请求 */