li.shaoyi 1 yıl önce
ebeveyn
işleme
4980e5c81d

+ 1 - 1
public/language/zh-cn.json

@@ -1,5 +1,5 @@
 {
     "app": {
-        "name": "多元世纪管理系统"
+        "name": "MTP管理系统"
     }
 }

+ 28 - 0
src/constants/order.ts

@@ -0,0 +1,28 @@
+/**
+ * 买卖方向
+ */
+export enum BuyOrSell {
+    Buy = 0, // 买
+    Sell = 1, // 卖
+}
+
+/**
+ * 获取买卖方向列表
+ * @returns 
+ */
+export function getBuyOrSellList() {
+    return [
+        { label: '买', value: BuyOrSell.Buy },
+        { label: '卖', value: BuyOrSell.Sell },
+    ]
+}
+
+/**
+ * 获取买卖方向名称
+ * @param value 
+ * @returns 
+ */
+export function getBuyOrSellName(value?: number) {
+    const item = getBuyOrSellList().find((e) => e.value === value)
+    return item?.label ?? value
+}

+ 1 - 1
src/packages/pc/components/layouts/header/index.vue

@@ -46,7 +46,7 @@ import { useGlobalStore } from '@/stores'
 import { useAdmin } from '@/business/admin'
 import eventBus from '@/services/bus'
 
-const { admin, logout } = useAdmin();
+const { admin } = useAdmin();
 const globalStore = useGlobalStore()
 const fullScreen = ref(false);
 

+ 1 - 1
src/packages/pc/components/modules/select-bank/index.vue

@@ -9,7 +9,7 @@
 </template>
 
 <script lang="ts" setup>
-import { onMounted, computed, shallowRef, toRaw, PropType, watch } from 'vue'
+import { computed, shallowRef, toRaw, PropType, watch } from 'vue'
 import { ElMessage } from 'element-plus'
 import { useRequest } from '@/hooks/request'
 import { getBankInfoByCusBank } from '@/services/api/bank'

+ 3 - 3
src/packages/pc/views/auth/login/index.vue

@@ -15,9 +15,9 @@
           </template>
         </el-input>
       </el-form-item>
-      <el-form-item>
+      <!-- <el-form-item>
         <el-checkbox label="记住账号" v-model="remember"></el-checkbox>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item>
         <el-button class="submit" type="primary" :loading="loading" @click="formSubmit">
           <span v-if="loading">正在登录</span>
@@ -45,7 +45,7 @@ const router = useRouter()
 const menuStore = useRouterStore()
 const formRef = shallowRef<FormInstance>()
 const loading = shallowRef(false)
-const remember = shallowRef(false) // 记住账号
+//const remember = shallowRef(false) // 记住账号
 const verifyImage = shallowRef('') // 验证码图片
 
 const formRules: FormRules = {

+ 11 - 35
src/packages/pc/views/investor/manage/user/components/details/index.vue

@@ -10,18 +10,6 @@
                     {{ newData.userAccountDetailVo.accountName }}
                 </p>
             </template>
-            <!-- 是否实名 -->
-            <template #isAuth="{ value }">
-                {{ hasauthEnum.getEnumTypeName(value) }}
-            </template>
-            <!-- 状态 -->
-            <template #accountStatus="{ value }">
-                {{ areastatusEnum.getEnumTypeName(value) }}
-            </template>
-            <!-- 变更状态 -->
-            <template #modifyStatus="{ value }">
-                {{ modifystatusEnum.getEnumTypeName(value) }}
-            </template>
             <!-- 开户方式 -->
             <template #openMode>
                 {{ oldData?.userinfoDetailVo.openMode }}
@@ -34,10 +22,6 @@
         </app-table-details>
         <app-table-details title="个人资料" :data="oldData?.userinfoDetailVo" :label-width="160" :cell-props="detailProps2"
             :column="2" v-if="oldData?.userinfoDetailVo.userinfoType === 1">
-            <!-- 证件类型 -->
-            <template #cardTypeId="{ value }">
-                {{ certypepersonEnum.getEnumTypeName(value) }}
-            </template>
             <!-- 证件照正面 -->
             <template #cardFrontPhotoUrl="{ value }">
                 <el-image :src="value" fit="cover" lazy style="width: 128px; height: 72px" />
@@ -53,14 +37,6 @@
         </app-table-details>
         <app-table-details title="企业资料" :data="oldData?.userinfoDetailVo" :label-width="160" :cell-props="detailProps3"
             :column="2" v-else>
-            <!-- 企业性质 -->
-            <template #biznature="{ value }">
-                {{ biznatureEnum.getEnumTypeName(value) }}
-            </template>
-            <!-- 证件类型 -->
-            <template #cardtype="{ value }">
-                {{ certypecompanyEnum.getEnumTypeName(value) }}
-            </template>
             <!-- 营业执照 -->
             <template #cardfrontphotourl="{ value }">
                 <el-image :src="value" fit="cover" lazy style="width: 128px; height: 72px" />
@@ -86,7 +62,7 @@
 
 <script lang="ts" setup>
 import { ref, PropType } from 'vue'
-import { handleNoneValue } from '@/filters'
+import { handleNoneValue, formatDate } from '@/filters'
 import { decryptAES } from '@/services/crypto'
 import { useEnum } from '@/hooks/enum'
 import { useRequest } from '@/hooks/request'
@@ -175,20 +151,20 @@ const detailProps1: CellProp[] = [
     { prop: 'memberUserName', label: '所属会员:' },
     { prop: 'parentUserName', label: '所属机构:' },
     { prop: 'openMode', label: '开户方式:' },
-    { prop: 'createTime', label: '开户时间:' },
+    { prop: 'createTime', label: '开户时间:', formatValue: (val) => formatDate(val) },
     { prop: 'createName', formatLabel: () => oldData.value?.userinfoDetailVo.openMode === 1 ? '开户人' : '申请人' },
-    { prop: 'accountStatus', label: '机构状态:', show: !hideField },
-    { prop: 'modifyStatus', label: '变更状态:' },
-    { prop: 'isAuth', label: '是否认证:' },
-    { prop: 'modifyTime', label: '修改时间:' },
+    { prop: 'accountStatus', label: '机构状态:', formatValue: (val) => areastatusEnum.getEnumTypeName(val), show: !hideField },
+    { prop: 'modifyStatus', label: '变更状态:', formatValue: (val) => modifystatusEnum.getEnumTypeName(val) },
+    { prop: 'isAuth', label: '是否认证:', formatValue: (val) => hasauthEnum.getEnumTypeName(val) },
+    { prop: 'modifyTime', label: '修改时间:', formatValue: (val) => formatDate(val) },
     { prop: 'modifyName', label: '修改人:' },
-    { prop: 'auditTime', label: '审核时间:', show: !hideField },
+    { prop: 'auditTime', label: '审核时间:', formatValue: (val) => formatDate(val), show: !hideField },
     { prop: 'auditAccountName', label: '审核人:', show: !hideField },
     { prop: 'modifyRemark', label: '变更审核备注:', show: hideField },
 ]
 
 const detailProps2: CellProp[] = [
-    { prop: 'cardTypeId', label: '证件类型:' },
+    { prop: 'cardTypeId', label: '证件类型:', formatValue: (val) => certypepersonEnum.getEnumTypeName(val) },
     { prop: 'cardNum', label: '证件号码:' },
     { prop: 'company', label: '所属公司:' },
     { prop: 'sex', label: '性别:' },
@@ -203,12 +179,12 @@ const detailProps2: CellProp[] = [
     { prop: 'remark', label: '备注:' },
 ]
 
-const detailProps3 = [
+const detailProps3: CellProp[] = [
     { prop: 'needInvoice', label: '是否需要发票:' },
-    { prop: 'cardTypeId', label: '证件类型:' },
+    { prop: 'cardTypeId', label: '证件类型:', formatValue: (val) => certypecompanyEnum.getEnumTypeName(val) },
     { prop: 'cardNum', label: '证件号码:' },
     { prop: 'customerName', label: '企业名称:' },
-    { prop: 'bizNature', label: '企业性质:' },
+    { prop: 'bizNature', label: '企业性质:', formatValue: (val) => biznatureEnum.getEnumTypeName(val) },
     { prop: 'legalPersonName', label: '法人姓名:' },
     { prop: 'contactName', label: '联系人:' },
     { prop: 'sex', label: '性别:' },

+ 8 - 19
src/packages/pc/views/investor/manage/user/index.vue

@@ -9,18 +9,6 @@
                 <app-operation :data-list="getFilteredButtons(['investor_manage_user_export'])"
                     @click="openComponent" />
             </template>
-            <!-- 是否实名 -->
-            <template #isAuth="{ value }">
-                {{ hasauthEnum.getEnumTypeName(value) }}
-            </template>
-            <!-- 状态 -->
-            <template #accountStatus="{ value }">
-                {{ areastatusEnum.getEnumTypeName(value) }}
-            </template>
-            <!-- 变更状态 -->
-            <template #modifyStatus="{ value }">
-                {{ modifystatusEnum.getEnumTypeName(value) }}
-            </template>
             <!-- 操作 -->
             <template #operate="{ row }">
                 <app-operation size="small" :data-list="handleOperateButtons(row)"
@@ -39,6 +27,7 @@
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { ElMessage } from 'element-plus'
+import { formatDate } from '@/filters'
 import { useEnum } from '@/hooks/enum'
 import { useRequest } from '@/hooks/request'
 import { useDataFilter } from '@/hooks/datatable'
@@ -79,13 +68,13 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'memberUserName', label: '所属会员' },
     { field: 'parentName', label: '所属机构' },
     { field: 'refereeName', label: '推荐人' },
-    { field: 'isAuth', label: '是否实名' },
-    { field: 'accountStatus', label: '状态' },
-    { field: 'modifyStatus', label: '变更状态' },
-    { field: 'createTime', label: '开户时间' },
-    { field: 'modifyTime', label: '最后更新时间' },
-    { field: 'auditTime', label: '审核时间' },
-    { field: 'cancelTime', label: '销户时间' },
+    { field: 'isAuth', label: '是否实名', formatValue: (val) => hasauthEnum.getEnumTypeName(val) },
+    { field: 'accountStatus', label: '状态', formatValue: (val) => areastatusEnum.getEnumTypeName(val) },
+    { field: 'modifyStatus', label: '变更状态', formatValue: (val) => modifystatusEnum.getEnumTypeName(val) },
+    { field: 'createTime', label: '开户时间', formatValue: (val) => formatDate(val) },
+    { field: 'modifyTime', label: '最后更新时间', formatValue: (val) => formatDate(val) },
+    { field: 'auditTime', label: '审核时间', formatValue: (val) => formatDate(val) },
+    { field: 'cancelTime', label: '销户时间', formatValue: (val) => formatDate(val) },
     { field: 'operate', label: '操作', fixed: 'right' }
 ])
 

+ 4 - 3
src/packages/pc/views/query/order/order/components/details/index.vue

@@ -25,6 +25,7 @@
 import { shallowRef, PropType, computed } from 'vue'
 import { ElMessage } from 'element-plus'
 import { formatDate, parsePercent, parseTenThousand } from '@/filters'
+import { getBuyOrSellName } from '@/constants/order'
 import { useEnum } from '@/hooks/enum'
 import { useRequest } from '@/hooks/request'
 import { queryCommissionSheetDetail } from '@/services/api/order'
@@ -75,7 +76,7 @@ const detailProps1 = computed<CellProp[]>(() => {
         { prop: 'listingselecttype', label: '挂牌点选类型:', show: isTradeMode16 },
         { prop: 'delistingtype', label: '摘牌类型:', show: isTradeMode16 },
         { prop: 'buildtype', label: '委托类型:', formatValue: (val) => buildtypeEnum.getEnumTypeName(val) },
-        { prop: 'buyorsell', label: '方向:' },
+        { prop: 'buyorsell', label: '方向:', formatValue: (val) => getBuyOrSellName(val) },
         { prop: 'orderprice', label: '委托价格:', show: !isTradeMode18Or26 },
         { prop: 'optiontype', label: '期权类型:', show: isTradeMode18Or26 },
         { prop: 'orderprice', label: '行权价:', show: isTradeMode18Or26 },
@@ -120,13 +121,13 @@ const detailProps2 = computed<CellProp[]>(() => {
         },
         {
             prop: 'openexchagechargevalue',
-            label: '开仓交易所手续费设置值',
+            label: '开仓交易所手续费设置值',
             formatValue: (val) => marginalgorithm ? marginalgorithm === 1 ? parseTenThousand(val) : val : '',
             show: isBuildType1Or3
         },
         {
             prop: 'openmemberchargevalue',
-            label: '开仓会员手续费设置值',
+            label: '开仓会员手续费设置值',
             formatValue: (val) => marginalgorithm ? marginalgorithm === 1 ? parseTenThousand(val) : val : '',
             show: isBuildType1Or3
         },

+ 2 - 1
src/packages/pc/views/query/order/order/index.vue

@@ -27,6 +27,7 @@
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { ElMessage } from 'element-plus'
+import { getBuyOrSellName } from '@/constants/order'
 import { useEnum } from '@/hooks/enum'
 import { useMarket } from '@/hooks/market'
 import { useRequest } from '@/hooks/request'
@@ -66,7 +67,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'accountNameId', label: '账户' },
     { field: 'goodsCodeName', label: '商品代码/名称' },
     { field: 'buildType', label: '单据类型', formatValue: (val) => getEnumTypeName(val) },
-    { field: 'buyOrSell', label: '方向' },
+    { field: 'buyOrSell', label: '方向', formatValue: (val) => getBuyOrSellName(val) },
     { field: 'orderPrice', label: '委托价格' },
     { field: 'orderQty', label: '委托数量' },
     { field: 'tradeQty', label: '成交数量' },

+ 2 - 1
src/packages/pc/views/query/order/position/components/details/index.vue

@@ -12,6 +12,7 @@
 import { shallowRef, PropType, computed } from 'vue'
 import { ElMessage } from 'element-plus'
 import { formatDate } from '@/filters'
+import { getBuyOrSellName } from '@/constants/order'
 import { useRequest } from '@/hooks/request'
 import { queryPositionSheetDetail } from '@/services/api/order'
 import { CellProp } from '@pc/components/base/table-details/types'
@@ -54,7 +55,7 @@ const detailProps = computed<CellProp[]>(() => {
         { prop: 'marketname', label: '市场:' },
         { prop: 'goodsname', label: '商品:', formatValue: (val) => val && `${val}/${goodscode}` },
         { prop: 'optiontype', label: '期权类型:', show: isTradeMode18Or26 },
-        { prop: 'buyorsell', label: '方向:' },
+        { prop: 'buyorsell', label: '方向:', formatValue: (val) => getBuyOrSellName(val) },
         { prop: 'holderdays', label: 'T+N:', show: !isTradeMode18Or26 },
         { prop: 'tradetime', label: '交易时间:', formatValue: (val) => formatDate(val) },
         { prop: 'openprice', label: '建仓价格:', show: !isTradeMode18Or26 },

+ 3 - 2
src/packages/pc/views/query/order/position/index.vue

@@ -28,6 +28,7 @@
 import { shallowRef } from 'vue'
 import { ElMessage } from 'element-plus'
 import { formatDate } from '@/filters'
+import { getBuyOrSellList, getBuyOrSellName } from '@/constants/order'
 import { useMarket } from '@/hooks/market'
 import { useRequest } from '@/hooks/request'
 import { useDataFilter } from '@/hooks/datatable'
@@ -64,7 +65,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'tradedate', label: '交易日' },
     { field: 'accountNameId', label: '账户' },
     { field: 'goodsCodeName', label: '商品代码/名称' },
-    { field: 'buyorsell', label: '方向' },
+    { field: 'buyorsell', label: '方向', formatValue: (val) => getBuyOrSellName(val) },
     { field: 'openqty', label: '订立数量' },
     { field: 'openprice', label: '订立价格' },
     { field: 'tradeamount', label: '订立金额' },
@@ -109,7 +110,7 @@ filterOptons.selectList = [
     {
         key: 'buyOrSell',
         label: '方向',
-        options: [],
+        options: getBuyOrSellList(),
     }
 ]
 

+ 2 - 1
src/packages/pc/views/query/order/positionsumm/index.vue

@@ -22,6 +22,7 @@
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { ElMessage } from 'element-plus'
+import { getBuyOrSellName } from '@/constants/order'
 import { useMarket } from '@/hooks/market'
 import { useRequest } from '@/hooks/request'
 import { useDataFilter } from '@/hooks/datatable'
@@ -65,7 +66,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'sellcuravgprice', label: '卖持仓均价' },
     { field: 'sellFloatPL', label: '持仓损益(卖)' },
     { field: 'qty', label: '净持仓量' },
-    { field: 'buyorsell', label: '净持仓方向' },
+    { field: 'buyorsell', label: '净持仓方向', formatValue: (val) => getBuyOrSellName(val) },
     { field: 'floatPL', label: '持仓损益(总)' }
 ])
 

+ 3 - 2
src/packages/pc/views/query/order/trade/components/details/index.vue

@@ -18,6 +18,7 @@
 import { shallowRef, PropType, computed } from 'vue'
 import { ElMessage } from 'element-plus'
 import { formatDate, parseTenThousand } from '@/filters'
+import { getBuyOrSellName } from '@/constants/order'
 import { useEnum } from '@/hooks/enum'
 import { useRequest } from '@/hooks/request'
 import { queryContractSheetDetailDetail } from '@/services/api/order'
@@ -65,7 +66,7 @@ const detailProps1 = computed<CellProp[]>(() => {
         { prop: 'marketname', label: '市场:' },
         { prop: 'goodsname', label: '商品:', formatValue: (val) => val && `${val}/${goodscode}` },
         { prop: 'buildtype', label: '成交单类型:', formatValue: (val) => tradetype3 === 1 && val === 3 ? '执行交割' : buildtypeEnum.getEnumTypeName(val) },
-        { prop: 'buyorsell', label: '方向:' },
+        { prop: 'buyorsell', label: '方向:', formatValue: (val) => getBuyOrSellName(val) },
         { prop: 'tradeprice', label: '成交价格:', show: !isTradeMode18Or26 },
         { prop: 'optiontype', label: '类型:', show: isTradeMode18Or26 },
         { prop: 'isconfirmexercise', label: '是否确认行权:', show: isTradeMode18Or26 },
@@ -175,7 +176,7 @@ const tableColumns = computed<Model.TableColumn[]>(() => {
 
     return [
         { field: 'opentradeid', label: '关联建仓成交单号' },
-        { field: 'buyorsell', label: '方向' },
+        { field: 'buyorsell', label: '方向', formatValue: (val) => getBuyOrSellName(val) },
         { field: 'openprice', label: '建仓价格', show: !isTradeMode18Or26 },
         { field: 'holderprice', label: '持仓价格', show: !isTradeMode18Or26 },
         { field: 'closeprice', label: '平仓价格', show: isTradeMode18Or26 },

+ 3 - 2
src/packages/pc/views/query/order/trade/index.vue

@@ -28,6 +28,7 @@
 import { shallowRef } from 'vue'
 import { ElMessage } from 'element-plus'
 import { formatDate } from '@/filters'
+import { getBuyOrSellList, getBuyOrSellName } from '@/constants/order'
 import { useEnum } from '@/hooks/enum'
 import { useMarket } from '@/hooks/market'
 import { useRequest } from '@/hooks/request'
@@ -65,7 +66,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { field: 'currentname', label: '账户' },
     { field: 'membername', label: '所属会员' },
     { field: 'goodsCodeName', label: '商品代码/名称' },
-    { field: 'buyorsell', label: '方向' },
+    { field: 'buyorsell', label: '方向', formatValue: (val) => getBuyOrSellName(val) },
     { field: 'buildtype', label: '类型', formatValue: (val) => buildtypeEnum.getEnumTypeName(val) },
     { field: 'tradetype', label: '成交类别' },
     { field: 'tradeprice', label: '成交价格' },
@@ -104,7 +105,7 @@ filterOptons.selectList = [
     {
         key: 'buyOrSell',
         label: '方向',
-        options: [],
+        options: getBuyOrSellList(),
     },
     {
         key: 'buildType',