Sfoglia il codice sorgente

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

marymelisa 4 anni fa
parent
commit
ba79d8ce07
46 ha cambiato i file con 2066 aggiunte e 550 eliminazioni
  1. 7 0
      src/common/constants/buttonType.ts
  2. 3 4
      src/common/setup/table/button.ts
  3. 3 2
      src/services/go/ermcp/account/index.ts
  4. 1 0
      src/services/go/ermcp/account/interface.ts
  5. 1 1
      src/services/go/ermcp/warehouse-info/index.ts
  6. 1 6
      src/views/business/purchase/components/funds/index.vue
  7. 1 2
      src/views/business/purchase/components/storage/index.vue
  8. 205 197
      src/views/business/sell/components/funds/index.vue
  9. 22 0
      src/views/business/sell/components/funds/setup.ts
  10. 145 114
      src/views/business/sell/components/invoice/index.vue
  11. 10 5
      src/views/business/sell/components/settlement/index.vue
  12. 9 4
      src/views/business/sell/components/someprice/index.vue
  13. 194 6
      src/views/business/sell/components/storage/index.vue
  14. 24 0
      src/views/business/sell/components/storage/setup.ts
  15. 1 0
      src/views/information/account_info/compoments/add-business/index.vue
  16. 219 0
      src/views/information/account_info/compoments/add-managers-permission/index.vue
  17. 54 47
      src/views/information/account_info/compoments/add-managers/index.vue
  18. 1 11
      src/views/information/account_info/compoments/cancel-business/index.vue
  19. 116 0
      src/views/information/account_info/compoments/cancel-managers/index.vue
  20. 50 29
      src/views/information/account_info/compoments/cancel-trader/index.vue
  21. 1 11
      src/views/information/account_info/compoments/detail-business/index.vue
  22. 81 0
      src/views/information/account_info/compoments/detail-managers/index.vue
  23. 1 0
      src/views/information/account_info/compoments/detail-trader/index.vue
  24. 1 0
      src/views/information/account_info/compoments/interface.ts
  25. 1 11
      src/views/information/account_info/compoments/locked-business/index.vue
  26. 116 0
      src/views/information/account_info/compoments/locked-managers/index.vue
  27. 1 0
      src/views/information/account_info/compoments/locked-trader/index.vue
  28. 156 0
      src/views/information/account_info/compoments/managers-permission/index.vue
  29. 68 56
      src/views/information/account_info/compoments/modify-managers/index.vue
  30. 203 0
      src/views/information/account_info/compoments/modify-traders-self/index.vue
  31. 4 0
      src/views/information/account_info/compoments/modify-traders-self/interface.ts
  32. 19 0
      src/views/information/account_info/compoments/modify-traders-self/setup.ts
  33. 1 9
      src/views/information/account_info/compoments/modify-traders/index.vue
  34. 1 1
      src/views/information/account_info/compoments/reset-business/index.vue
  35. 127 0
      src/views/information/account_info/compoments/reset-managers/index.vue
  36. 1 1
      src/views/information/account_info/compoments/reset-trader/index.vue
  37. 3 0
      src/views/information/account_info/compoments/setup.ts
  38. 1 11
      src/views/information/account_info/compoments/unlocked-business/index.vue
  39. 116 0
      src/views/information/account_info/compoments/unlocked-managers/index.vue
  40. 1 0
      src/views/information/account_info/compoments/unlocked-trader/index.vue
  41. 72 12
      src/views/information/account_info/list/account_info_manager/index.vue
  42. 1 1
      src/views/information/account_info/list/account_info_manager/setup.ts
  43. 17 3
      src/views/information/account_info/list/account_info_trade/index.vue
  44. 2 2
      src/views/manage/inventory-review/components/checkoutAudit/index.vue
  45. 2 2
      src/views/manage/inventory-review/components/checkoutCancel/index.vue
  46. 2 2
      src/views/manage/inventory-review/components/checkoutDetail/index.vue

+ 7 - 0
src/common/constants/buttonType.ts

@@ -33,6 +33,7 @@ export interface ButtonType {
 
     account_info_trade_btn_add: string; // 交易账户 新增
     account_info_trade_btn_modify: string; // 交易账户 修改
+    account_info_trade_btn_modify_self: string; // 交易账户 修改
     account_info_trade_btn_locked: string; // 交易账户 锁定
     account_info_trade_btn_unlocked: string; // 交易账户 解锁
     account_info_trade_btn_reset: string; // 交易账户 重置密码
@@ -40,6 +41,12 @@ export interface ButtonType {
 
     account_info_manager_btn_add: string; // 管理账户 新增
     account_info_manager_btn_modify: string; // 管理账户 修改
+    account_info_manager_btn_permission: string; // 管理账户 权限设置
+    account_info_manager_btn_permission_add: string; // 管理账户 新增
+    account_info_manager_btn_reset: string; // 管理账户 重置密码
+    account_info_manager_btn_locked: string; // 管理账户 锁定
+    account_info_manager_btn_unlocked: string; // 管理账户 解锁
+    account_info_manager_btn_logout: string; // 管理账户 注销
 
     account_info_futures_btn_add: string; // 期货账户 新增
     account_info_futures_btn_modify: string; // 期货账户 修改

+ 3 - 4
src/common/setup/table/button.ts

@@ -34,7 +34,7 @@ export function getThirdMenuData(): OperationTabMenu[] {
     return data;
 }
 
-export function handleBtnList(list: OperationTabMenu | undefined, menuType: keyof ButtonListKey, hasDetail: boolean) {
+export function handleBtnList(list: OperationTabMenu | undefined, menuType: keyof ButtonListKey, hasDetail: boolean, commonName: string[] = ['新增']) {
     const commonBtn = ref<BtnList[]>([]); // 通用按钮列表,不用选中数据才显示
     const forDataBtn = ref<BtnList[]>([]); // 针对数据按钮列表,选中某条数据才显示
     if (list && list.children) {
@@ -43,7 +43,6 @@ export function handleBtnList(list: OperationTabMenu | undefined, menuType: keyo
             if (type === 2) { // 按钮类型
                 const { openAction } = openModal(code as keyof ModalName);
                 const item = { lable: title, callback: openAction, className: getClassName(code) }
-                const commonName = ['新增'] // 目前通用的按钮只要新增,需要添加其它的时候需要往这里添加
                 if (commonName.includes(title)) { // 
                     commonBtn.value.push(item)
                 } else {
@@ -68,8 +67,8 @@ export function handleBtnList(list: OperationTabMenu | undefined, menuType: keyo
  * @param hasDetail 操作按钮是否需要详情按钮(详情按钮服务 不配置)
  * @returns 
  */
-export function getBtnList(menuType: keyof ButtonListKey, hasDetail: boolean) {
+export function getBtnList(menuType: keyof ButtonListKey, hasDetail: boolean, commonName: string[] = ['新增']) {
     const data = getThirdMenuData()
     const list = data.find((e) => e.code === menuType);
-    return handleBtnList(list, menuType, hasDetail)
+    return handleBtnList(list, menuType, hasDetail, commonName)
 }

+ 3 - 2
src/services/go/ermcp/account/index.ts

@@ -60,9 +60,10 @@ export function QueryFuturesCompany(): Promise<ErmcpFuturesCompany> {
  * @param roleid  角色id(可多个,逗号隔开)
  * @constructor
  */
-export function QueryAccMgrRoleMenu(roleid: string): Promise<ErmcpRoleMenuEx> {
+export function QueryAccMgrRoleMenu(roleid?: string): Promise<ErmcpRoleMenuEx[]> {
     const userid = getUserId()
-    return commonSearch_go('/Ermcp/QueryAccMgrRoleMenu', { roleid, userid }).catch((err) => {
+    const param = roleid ? { roleid, userid } : { userid }
+    return commonSearch_go('/Ermcp/QueryAccMgrRoleMenu', param).catch((err) => {
         throw new Error(`查询账户管理角色详情: ${err.message}`);
     });
 }

+ 1 - 0
src/services/go/ermcp/account/interface.ts

@@ -93,6 +93,7 @@ export interface ErmcpLoginUser{
 }
 
 export interface ErmcpLoginUserEx{
+    mobile: string; // 手机号
     accountstatus: number; //  账户的状态 - 1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:停用(注销) 7:注销(删除)
     querytype: number;  // 查询类型 1-业务账户 2-交易账户 3-管理账户
     roleid:  number; // 角色id(交易账户->用户id)

+ 1 - 1
src/services/go/ermcp/warehouse-info/index.ts

@@ -35,7 +35,7 @@ export function QueryAreaStock(userid: number): Promise<Ermcp3AreaStock[]> {
  * @param spotcontractid 合同ID
  * @constructor
  */
-export function QueryAreaStockApply(spotcontractid: number): Promise<Ermcp3AreaStockApplySum[]> {
+export function QueryAreaStockApply(spotcontractid: string): Promise<Ermcp3AreaStockApplySum[]> {
     return commonSearch_go('/Ermcp3/QueryAreaStockApplySum', { spotcontractid }).catch((err) => {
         throw new Error(`查询已登记出入库信息(入库登记/已入库信息): ${err.message}`);
     });

+ 1 - 6
src/views/business/purchase/components/funds/index.vue

@@ -168,13 +168,8 @@ import { closeModal } from '@/common/setup/modal/index';
 import { formatValue, initData } from '@/common/methods';
 import { Ermcp3SellBuyContract } from '@/services/go/ermcp/purchase/interface';
 import { getPriceTypeName } from '@/views/business/purchase/setup';
-import { operationContractReq } from '@/services/proto/contract';
-import { message } from 'ant-design-vue';
-import { objectToUint8Array } from '@/utils/objHandle';
-import { FundsReq, InvoiceReq } from '@/services/proto/contract/interface';
-import { fundsReq, invoiceReq } from '@/views/business/purchase/components/setup';
+import { fundsReq } from '@/views/business/purchase/components/setup';
 import { handleForm } from './setup';
-import { QueryMiddleGoodsChange } from '@/services/go/ermcp/goodsInfo';
 
 export default defineComponent({
     name: 'purchase_pending_funds',

+ 1 - 2
src/views/business/purchase/components/storage/index.vue

@@ -166,8 +166,7 @@ export default defineComponent({
         const DGList = ref<Ermcp3AreaStockApplySum[]>([]);
         watchEffect(() => {
             if (visible.value) {
-                const id = Long.fromString(props.selectedRow.spotcontractid);
-                QueryAreaStockApply(Number(props.selectedRow.spotcontractid))
+                QueryAreaStockApply(props.selectedRow.spotcontractid)
                     .then((res) => {
                         DGList.value = res.filter((e) => e.inouttype === 1);
                     })

+ 205 - 197
src/views/business/sell/components/funds/index.vue

@@ -1,214 +1,222 @@
 <template>
-  <!-- 款项登记-->
-  <a-modal class="custom-detail"
-           title="款项登记"
-           v-model:visible="visible"
-           centered
-           @cancel="cancel"
-           width="890px">
-    <template #footer>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading"
-                @click="submit">关闭</a-button>
-    </template>
-      <fieldset class="formFieldSet">
-          <legend>合同基本信息</legend>
-          <a-form class="inlineForm">
-              <a-row :gutter="24">
-                  <a-col :span="12">
-                      <a-form-item label="合同编号">
-                          <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="定价类型">
-                          <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</span>
-                      </a-form-item>
-                  </a-col>
-              </a-row>
-              <a-row :gutter="24">
-                  <a-col :span="12">
-                      <a-form-item :label="selectedRow.contracttype===1? '采购方': '销售方'">
-                          <span class="white">{{ formatValue(selectedRow.accountname) }}</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="现货品种">
-                          <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
-                      </a-form-item>
-                  </a-col>
-              </a-row>
-              <a-row :gutter="24">
-                  <a-col :span="12">
-                      <a-form-item label="暂定价货款总额">
-                          <span class="white">{{ selectedRow.pricetype === 3 ? formatValue(selectedRow.loanamount) : 0 }}</span>
-                      </a-form-item>
-                  </a-col>
-              </a-row>
-          </a-form>
-      </fieldset>
+    <!-- 款项登记-->
+    <a-modal class="commonModal paddingDialog funds"
+             title="款项登记"
+             v-model:visible="visible"
+             centered
+             @cancel="cancel"
+             width="890px">
+        <template #footer>
+            <a-button key="submit"
+                      class="cancelBtn"
+                      @click="cancel">取消
+            </a-button>
+            <a-button key="submit"
+                      type="primary"
+                      :loading="loading"
+                      @click="submit">款项登记
+            </a-button>
+        </template>
+        <fieldset class="formFieldSet">
+            <legend>合同基本信息</legend>
+            <a-form class="inlineForm">
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="合同编号">
+                            <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                        <a-form-item label="定价类型">
+                            <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="销售方">
+                            <span class="white">{{ formatValue(selectedRow.accountname) }}</span>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                        <a-form-item label="现货品种">
+                            <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="暂定价货款总额">
+                            <span class="white">{{ selectedRow.pricetype === 3 ? formatValue(selectedRow.loanamount) : 0 }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+            </a-form>
+        </fieldset>
 
-      <fieldset class="formFieldSet">
-          <legend>已登记信息</legend>
-          <a-form class="inlineForm">
-              <a-row :gutter="24">
-                  <a-col :span="12">
-                      <a-form-item label="已定价额">
-                          <span class="white">{{ selectedRow.pricedamount }}</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="调整金额">
-                          <span class="white">{{ selectedRow.reckonadjustamount }}</span>
-                      </a-form-item>
-                  </a-col>
-              </a-row>
+        <fieldset class="formFieldSet">
+            <legend>已登记信息</legend>
+            <a-form class="inlineForm">
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="已定价额">
+                            <span class="white">{{ selectedRow.pricedamount }}</span>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                        <a-form-item label="调整金额">
+                            <span class="white">{{ selectedRow.reckonadjustamount }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
 
-              <a-row :gutter="24">
-                  <a-col :span="12">
-                      <a-form-item label="货款总额">
-                          <span class="white">{{ selectedRow.pricedamount + selectedRow.reckonadjustamount }}</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="保证金">
-                          <span class="white">{{ selectedRow.margin }}</span>
-                      </a-form-item>
-                  </a-col>
-              </a-row>
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="货款总额">
+                            <span class="white">{{ selectedRow.pricedamount + selectedRow.reckonadjustamount }}</span>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                        <a-form-item label="保证金">
+                            <span class="white">{{ selectedRow.margin }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
 
-              <a-row :gutter="24">
-                  <a-col :span="12">
-                      <a-form-item label="其他费用">
-                          <span class="white">{{ selectedRow.reckonotheramount }}</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="合计总额">
-                          <span class="white">{{ formatValue(selectedRow.pricedavg) }}</span>
-                      </a-form-item>
-                  </a-col>
-              </a-row>
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="其他费用">
+                            <span class="white">{{ selectedRow.reckonotheramount }}</span>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                        <a-form-item label="合计总额">
+                            <span class="white">{{ formatValue(selectedRow.totalamount) }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
 
-              <a-row :gutter="24">
-                  <a-col :span="12">
-                      <a-form-item label="已支付额">
-                          <span class="white">{{ selectedRow.payamount }}</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="预计款额">
-                          <span class="white">{{ selectedRow.prepayamount }}</span>
-                      </a-form-item>
-                  </a-col>
-              </a-row>
-          </a-form>
-      </fieldset>
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="已支付额">
+                            <span class="white">{{ selectedRow.payamount }}</span>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                        <a-form-item label="预计款额">
+                            <span class="white">{{ selectedRow.prepayamount }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+            </a-form>
+        </fieldset>
 
-      <fieldset class="formFieldSet">
-          <legend>本次款项信息</legend>
-          <a-form class="inlineForm"
-                  ref="formRef"
-                  :model="formState"
-                  :rules="rules">
-              <a-row :gutter="24">
-                  <a-col :span="12">
-                      <a-form-item label="应付款额"
-                                   name="unpayamount">
-                          <span class="white">10000000.00元</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="款项类型">
-                          <a-radio-group class="commonRadioGroup"  v-model:value="formState.payType" >
-                              <a-radio :value="1">付款申请</a-radio>
-                              <a-radio :value="2">退款通知</a-radio>
-                          </a-radio-group>
-                      </a-form-item>
-                  </a-col>
-              </a-row>
-              <a-row :gutter="24">
-                  <a-col :span="12">
-                      <a-form-item label="登记金额" name="Amount">
-                          <a-input-number class="dialogInput"
-                                          style="width: 200px"
-                                          suffix="元"
-                                          type="number"
-                                          placeholder="请输入登记金额"
-                                          v-model:value="formState.Amount" />
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="24">
-                      <a-form-item label="备注"
-                                   name="PricedQty"
-                                   class="relative">
-                          <a-input class="dialogInput"
-                                   style="width: 608px"
-                                   placeholder="请输入备注信息"
-                                   v-model:value="formState.Remark"/>
-                      </a-form-item>
-                  </a-col>
-              </a-row>
-          </a-form>
-      </fieldset>
-  </a-modal>
+        <fieldset class="formFieldSet">
+            <legend>本次款项信息</legend>
+            <a-form class="inlineForm"
+                    ref="formRef"
+                    :model="formState"
+                    :rules="rules">
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="应付款额"
+                                     name="unpayamount">
+                            <span class="white">{{selectedRow.unpayamount}}</span>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                        <a-form-item label="款项类型">
+                            <a-radio-group class="commonRadioGroup"
+                                           v-model:value="formState.payType">
+                                <a-radio :value="1">付款申请</a-radio>
+                                <a-radio :value="2">退款通知</a-radio>
+                            </a-radio-group>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="登记金额"
+                                     name="Amount">
+                            <a-input-number class="dialogInput"
+                                            style="width: 200px"
+                                            suffix="元"
+                                            type="number"
+                                            placeholder="请输入登记金额"
+                                            v-model:value="formState.Amount"/>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="24">
+                        <a-form-item label="备注"
+                                     name="PricedQty"
+                                     class="relative">
+                            <a-input class="dialogInput"
+                                     style="width: 608px"
+                                     placeholder="请输入备注信息"
+                                     v-model:value="formState.Remark"/>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+            </a-form>
+        </fieldset>
+    </a-modal>
 </template>
 
 <script lang="ts">
-import {defineComponent, PropType, ref, unref} from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
-import {Ermcp3SellBuyContract} from "@/services/go/ermcp/purchase/interface";
-import {formatValue} from "@/common/methods";
-import {getPriceTypeName} from "@/views/business/purchase/setup";
-import {handleForm} from "@/views/business/purchase/components/funds/setup";
-import {fundsReq} from "@/views/business/purchase/components/setup";
+    import {defineComponent, PropType, reactive, ref, unref, watch, watchEffect} from 'vue';
+    import {closeModal} from '@/common/setup/modal/index';
+    import {formatValue, initData} from '@/common/methods';
+    import {Ermcp3SellBuyContract} from '@/services/go/ermcp/purchase/interface';
+    import {getPriceTypeName} from '@/views/business/purchase/setup';
+    import {fundsReq} from '@/views/business/purchase/components/setup';
+    import {handleForm} from './setup';
 
-export default defineComponent({
-    name: 'sell_pending_funds',
-    components: {},
-    props: {
-        selectedRow: {
-            type: Object as PropType<Ermcp3SellBuyContract>,
-            default: {},
+    export default defineComponent({
+        name: 'sell_pending_funds',
+        components: {},
+        props: {
+            selectedRow: {
+                type: Object as PropType<Ermcp3SellBuyContract>,
+                default: {},
+            },
         },
-    },
-    setup(props, context) {
-        const { visible, cancel } = closeModal('sell_pending_funds');
-        const loading = ref<boolean>(false);
-        const { rules, formState, formRef } = handleForm();
+        setup(props, context) {
+            const {visible, cancel} = closeModal('sell_pending_funds');
+            const loading = ref<boolean>(false);
+            const {rules, formState, formRef} = handleForm();
 
-        function submit() {
-            console.log(props.selectedRow)
-            const wrapEl = unref(formRef);
-            wrapEl.validate().then(() => {
-                loading.value = true
-                const params:any = {}
-                if(formState.payType === 1){
-                    params.PayAmount = Number(formState.Amount)
-                }else {
-                    params.DeductAmount = Number(formState.Amount)
-                }
-                // 发出发票登记
-                fundsReq(props.selectedRow.spotcontractid, params, loading,formState.Remark)
-                    .then(() => {
+            function submit() {
+                console.log(props.selectedRow);
+                const wrapEl = unref(formRef);
+                wrapEl.validate().then(() => {
+                    loading.value = true;
+                    const params: any = {};
+                    if (formState.payType === 1) {
+                        params.PayAmount = Number(formState.Amount);
+                    } else {
+                        params.DeductAmount = Number(formState.Amount);
+                    }
+                    // 发出发票登记
+                    fundsReq(props.selectedRow.spotcontractid, params, loading, formState.Remark).then(() => {
                         cancel();
                         context.emit('refresh');
-                    })
-            });
-        }
-        return {
-            visible,
-            cancel,
-            submit,
-            loading,
-            formState,
-            formatValue,
-            rules,
-            getPriceTypeName,
-        };
-    },
-});
+                    });
+                });
+            }
+
+            return {
+                visible,
+                cancel,
+                submit,
+                loading,
+                formState,
+                formatValue,
+                formRef,
+                rules,
+                getPriceTypeName,
+            };
+        },
+    });
 </script>
 
 <style lang="less">

+ 22 - 0
src/views/business/sell/components/funds/setup.ts

@@ -0,0 +1,22 @@
+import { reactive, ref, UnwrapRef } from "vue";
+/**
+ * 表单
+ * @returns 
+ */
+export function handleForm() {
+    interface FormState {
+        payType: number 
+        Amount: number | null
+        Remark:String
+    }
+    const formRef = ref();
+    const formState: UnwrapRef<FormState> = reactive({
+        payType: 1,
+        Amount: null,
+        Remark:''
+    })
+    const rules = {
+        Amount: [{ required: true, message: '请输入登记价格', trigger: 'blur', type: 'number' }],
+    }
+    return { rules, formState, formRef }
+}

+ 145 - 114
src/views/business/sell/components/invoice/index.vue

@@ -1,130 +1,141 @@
 <template>
   <!-- 发票登记-->
-  <a-modal class="custom-detail"
-           title="发票登记"
+  <a-modal class="commonModal paddingDialog invoice"
+           :title="selectedRow.contracttype===1? '采购合同-发票登记': '销售合同-发票登记'"
            v-model:visible="visible"
            centered
            @cancel="cancel"
            width="890px">
     <template #footer>
       <a-button key="submit"
+                class="cancelBtn"
+                @click="cancel">取消
+      </a-button>
+      <a-button key="submit"
                 type="primary"
                 :loading="loading"
-                @click="submit">关闭</a-button>
+                @click="submit">发票登记
+      </a-button>
     </template>
-      <fieldset class="formFieldSet">
-          <legend>合同基本信息</legend>
-          <a-form class="inlineForm">
-              <a-row :gutter="24">
-                  <a-col :span="12">
-                      <a-form-item label="合同编号">
-                          <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="定价类型">
-                          <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</span>
-                      </a-form-item>
-                  </a-col>
-              </a-row>
-              <a-row :gutter="24">
-                  <a-col :span="12">
-                      <a-form-item :label="'销售方'">
-                          <span class="white">{{ formatValue(selectedRow.accountname) }}</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="现货品种">
-                          <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
-                      </a-form-item>
-                  </a-col>
-              </a-row>
-          </a-form>
-      </fieldset>
-      <fieldset class="formFieldSet">
-          <legend>已登记信息</legend>
-          <a-form class="inlineForm">
-              <a-row :gutter="24">
-                  <a-col :span="12">
-                      <a-form-item label="贷款总额">
-                          <span class="white">499999000.00元</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="保证金">
-                          <span class="white">1000000元</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="其他费用">
-                          <span class="white">500.00元</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="合计总额">
-                          <span class="white">505990500.00元</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="已支付额 ">
-                          <span class="white">500.00元</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="已收票额">
-                          <span class="white">505990500.00元</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="24">
-                      <a-form-item label="预收票额">
-                          <span class="white">--</span>
-                      </a-form-item>
-                  </a-col>
-              </a-row>
-          </a-form>
-      </fieldset>
-      <fieldset class="formFieldSet">
-          <legend>本次发票信息</legend>
-          <a-form class="inlineForm"
-                  ref="formRef"
-                  :model="formState"
-                  :rules="rules">
-              <a-row :gutter="24">
-                  <a-col :span="12">
-                      <a-form-item label="收票金额"
-                                   class="relative mb40"
-                                   name="PricedPrice">
-                          <a-input class="dialogInput"
-                                   style="width: 200px"
-                                   suffix="元"
-                                   placeholder="请输入收票金额" />
-                          <div class="tip">
-                              <div>应收票额:4090500.00元</div>
-                              <div><a class="blue fr">全部登记</a></div>
-                          </div>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="发票附件" class="mb40">
-                          <div class="upload">
-                              <a-upload action="">
-                                  <a-button class="uploadBtn">上传</a-button>
-                              </a-upload>
-                              <div class="look">查看附件</div>
-                          </div>
-                      </a-form-item>
-                  </a-col>
-              </a-row>
-          </a-form>
-      </fieldset>
+    <fieldset class="formFieldSet">
+      <legend>合同基本信息</legend>
+      <a-form class="inlineForm">
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="合同编号">
+              <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="定价类型">
+              <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item :label="'销售方'">
+              <span class="white">{{ formatValue(selectedRow.accountname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="现货品种">
+              <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </fieldset>
+    <fieldset class="formFieldSet">
+      <legend>已登记信息</legend>
+      <a-form class="inlineForm">
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="贷款总额">
+              <span class="white">{{ formatValue(selectedRow.loanamount) + selectedRow.currencyname }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="保证金">
+              <span class="white">{{ formatValue(selectedRow.margin) + selectedRow.currencyname }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="其他费用">
+              <span class="white">{{ selectedRow.reckonotheramount + selectedRow.currencyname }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="合计总额">
+              <span class="white">{{ selectedRow.totalamount + selectedRow.currencyname }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="已支付额 ">
+              <span class="white">{{ selectedRow.payamount + selectedRow.currencyname }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="已收票额">
+              <span class="white">{{ selectedRow.invoiceamount + selectedRow.currencyname }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-item label="预收票额">
+              <span class="white">{{ selectedRow.preinvoiceamount + selectedRow.currencyname }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </fieldset>
+    <fieldset class="formFieldSet">
+      <legend>本次发票信息</legend>
+      <a-form class="inlineForm"
+              ref="formRef"
+              :model="formState"
+              :rules="rules">
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="收票金额"
+                         class="relative mb40"
+                         name="InvoiceAmount">
+              <a-input-number v-model:value="formState.InvoiceAmount"
+                              class="dialogInput"
+                              style="width: 200px"
+                              suffix="元"
+                              placeholder="请输入收票金额" />
+              <div class="tip">
+                <div>应收票额:{{ selectedRow.invoiceamount }} {{ selectedRow.currencyname }}</div>
+                <div><a class="blue fr">全部登记</a></div>
+              </div>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="发票附件"
+                         class="mb40">
+              <div class="upload">
+                <a-upload action="">
+                  <a-button class="uploadBtn">上传</a-button>
+                </a-upload>
+                <div class="look">查看附件</div>
+              </div>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </fieldset>
   </a-modal>
 </template>
 
 <script lang="ts">
-import {defineComponent, PropType, ref} from 'vue';
+import { defineComponent, PropType, ref, unref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
-import {Ermcp3SellBuyContract} from "@/services/go/ermcp/purchase/interface";
-import {getPriceTypeName} from "@/views/business/purchase/setup";
+import { Ermcp3SellBuyContract } from '@/services/go/ermcp/purchase/interface';
+import { getPriceTypeName } from '@/views/business/purchase/setup';
+import { formatValue } from '@/common/methods';
+import { handleForm } from '@/views/business/purchase/components/invoice/setup';
+import { InvoiceReq } from '@/services/proto/contract/interface';
+import { invoiceReq } from '@/views/business/purchase/components/setup';
 
 export default defineComponent({
     name: 'sell_pending_invoice',
@@ -135,18 +146,38 @@ export default defineComponent({
             default: {},
         },
     },
-    setup(props) {
+    setup(props, context) {
         const { visible, cancel } = closeModal('sell_pending_invoice');
         const loading = ref<boolean>(false);
+        const { rules, formState, formRef } = handleForm();
+
         function submit() {
-            loading.value = true
-            props
+            console.log(props.selectedRow);
+            const wrapEl = unref(formRef);
+            wrapEl.validate().then(() => {
+                loading.value = true;
+                const params: InvoiceReq = {
+                    InvoiceAmount: formState.InvoiceAmount!,
+                };
+                // 发出发票登记
+                invoiceReq(props.selectedRow.spotcontractid, params, loading)
+                    .then(() => {
+                        cancel();
+                        context.emit('refresh');
+                    })
+                    .catch((err) => {});
+            });
         }
+
         return {
             visible,
             cancel,
             submit,
             loading,
+            formRef,
+            formState,
+            formatValue,
+            rules,
             getPriceTypeName,
         };
     },

+ 10 - 5
src/views/business/sell/components/settlement/index.vue

@@ -1,16 +1,21 @@
 <template>
   <!-- 交收登记-->
-  <a-modal class="custom-detail"
+  <a-modal  class="commonModal paddingDialog settlement"
            title="交收登记"
            v-model:visible="visible"
            @cancel="cancel"
            centered
            width="890px">
     <template #footer>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading"
-                @click="submit">关闭</a-button>
+        <a-button key="submit"
+                  class="cancelBtn"
+                  @click="cancel">取消
+        </a-button>
+        <a-button key="submit"
+                  type="primary"
+                  :loading="loading"
+                  @click="submit">交收登记
+        </a-button>
     </template>
       <fieldset class="formFieldSet">
           <legend>合同基本信息</legend>

+ 9 - 4
src/views/business/sell/components/someprice/index.vue

@@ -7,10 +7,15 @@
            centered
            width="890px">
     <template #footer>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading"
-                @click="submit">关闭</a-button>
+        <a-button key="submit"
+                  class="cancelBtn"
+                  @click="cancel">取消
+        </a-button>
+        <a-button key="submit"
+                  type="primary"
+                  :loading="loading"
+                  @click="submit">点价登记
+        </a-button>
     </template>
       <fieldset class="formFieldSet">
           <legend>合同基本信息</legend>

+ 194 - 6
src/views/business/sell/components/storage/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 出库登记-->
-  <a-modal class="custom-detail"
+  <a-modal class="commonModal"
            title="出库登记"
            v-model:visible="visible"
            @cancel="cancel"
@@ -8,32 +8,220 @@
            width="890px">
     <template #footer>
       <a-button key="submit"
+                class="cancelBtn"
+                @click="cancel">取消
+      </a-button>
+      <a-button key="submit"
                 type="primary"
                 :loading="loading"
-                @click="submit">关闭</a-button>
+                @click="submit">出库登记
+      </a-button>
     </template>
-
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <fieldset class="formFieldSet">
+        <legend>合同基本信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="合同编号">
+              <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item :label="selectedRow.contracttype===1? '采购方': '销售方'">
+              <span class="white">{{ formatValue(selectedRow.accountname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="现货品种">
+              <span class="white">{{formatValue(selectedRow.deliverygoodsname)}}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="合同签署量">
+              <span class="white">{{formatValue(selectedRow.qty)}}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+      <fieldset class="formFieldSet">
+        <legend>已登记信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12"
+                 v-for="(item, i) in DGList"
+                 :key="i">
+            <a-form-item label="已入库量">
+              <span class="white">{{item.wrstandardname}} + {{item.brandname}}</span>
+            </a-form-item>
+          </a-col>
+          <!-- <a-col :span="12">
+                      <a-form-item label="已入库量2">
+                        <span class="white">品类2+品牌2(66吨)</span>
+                      </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                      <a-form-item label="已入库量3">
+                        <span class="white">品类3+品牌3(1000吨)</span>
+                      </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                      <a-form-item label="已入库量4">
+                        <span class="white">品类4+品牌4(5吨)</span>
+                      </a-form-item>
+                    </a-col> -->
+        </a-row>
+      </fieldset>
+      <fieldset class="formFieldSet">
+        <legend>本次入库信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="品类">
+              <a-select class="inlineFormSelect"
+                        style="width: 200px"
+                        placeholder="请选择品类"
+                        v-model:value="selectedRow.wrstandardid"
+                        readonly>
+                <a-select-option v-for="option in gmlist"
+                                 :key="option.wrstandardid"
+                                 :value="option.wrstandardid">{{option.wrstandardname}}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="品牌"
+                         name="SpotGoodsBrandID">
+              <a-select class="inlineFormSelect"
+                        style="width: 200px"
+                        placeholder="请选择品牌"
+                        v-model:value="formState.SpotGoodsBrandID">
+                <a-select-option v-for="option in gblist"
+                                 :key="option.brandid"
+                                 :value="option.brandid">{{option.brandname}}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="出库仓库"
+                         name="WarehouseInfo">
+              <a-select class="inlineFormSelect"
+                        style="width: 200px"
+                        placeholder="请选择入库仓库"
+                        v-model:value="formState.WarehouseInfo">
+                <a-select-option v-for="option in wareHouseList"
+                                 :key="option.autoid"
+                                 :value="option.autoid">{{option.warehousename}}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="出库数量"
+                         name="Qty">
+              <a-input-number class="dialogInput"
+                              style="width: 200px"
+                              suffix="单位"
+                              placeholder="请输入出库数量"
+                              v-model:value="formState.Qty">
+              </a-input-number>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+    </a-form>
   </a-modal>
 </template>
 
 <script lang="ts">
-import { defineComponent, ref } from 'vue';
+import { defineComponent, PropType, ref, unref, watchEffect } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
+import { Ermcp3SellBuyContract } from '@/services/go/ermcp/purchase/interface';
+import { ERMCPAreaInOutStockApplyReq } from '@/services/proto/warehouse/interface';
+import { QueryAreaStockApply, QueryWareHouse } from '@/services/go/ermcp/warehouse-info/index';
+import * as Long from 'long';
+import { formatValue } from '@/common/methods';
+import { handleForm } from './setup';
+import APP from '@/services';
+import { initData } from '@/common/methods';
+import { ErmcpWareHouseInfo } from '@/views/information/warehouse-info/list';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { message } from 'ant-design-vue';
+import { Ermcp3AreaStockApplySum } from '@/services/go/ermcp/warehouse-info/interface';
+import { ermcpInOutStockApplyReq } from '@/services/proto/warehouse';
 
 export default defineComponent({
     name: 'sell_pending_storage',
     components: {},
-    setup() {
+    props: {
+        selectedRow: {
+            type: Object as PropType<Ermcp3SellBuyContract>,
+            default: {},
+        },
+    },
+    setup(props, context) {
         const { visible, cancel } = closeModal('sell_pending_storage');
+        const { rules, formState, formRef } = handleForm();
         const loading = ref<boolean>(false);
+        const wareHouseList = ref<ErmcpWareHouseInfo[]>([]);
+        const gblist = ref<[]>([]);
+        const gmlist = ref<[]>([]);
+        const DGList = ref<Ermcp3AreaStockApplySum[]>([]);
+        watchEffect(() => {
+            if (visible.value) {
+                QueryAreaStockApply(props.selectedRow.spotcontractid)
+                    .then((res) => {
+                        DGList.value = res.filter((e) => e.inouttype === 1);
+                    })
+                    .catch((err) => message.error(err));
+            }
+        });
+        initData(() => {
+            const deliverygoods = APP.get('DeliveryGoodsList').find((x: any) => x.deliverygoodsid === props.selectedRow.deliverygoodsid);
+            gblist.value = deliverygoods && deliverygoods.gblist;
+            gmlist.value = deliverygoods && deliverygoods.gmlist;
+            // 查询仓库信息
+            QueryWareHouse('1').then((res) => {
+                wareHouseList.value = res;
+            });
+        });
+
         function submit() {
-            cancel();
+            console.log(props.selectedRow);
+            console.log(wareHouseList);
+            const wrapEl = unref(formRef);
+            wrapEl.validate().then(() => {
+                const params: ERMCPAreaInOutStockApplyReq = {
+                    InOutType: 6, //  5:采购入库 6:销售出库 7:生产入库 8:生产出库
+                    WRStandardID: props.selectedRow.wrstandardid, //品类ID
+                    SpotGoodsBrandID: formState.SpotGoodsBrandID || 0, //现货品牌ID(DGFactoryItem表的ID)
+                    DeliveryGoodsID: props.selectedRow.deliverygoodsid, //现货商品ID
+                    SpotContractID: Long.fromString(props.selectedRow.spotcontractid), //合同ID
+                    WarehouseInfo: formState.WarehouseInfo || 0, // uint64 现货仓库ID
+                    Qty: formState.Qty || 0, // double 数量t
+                    ApplyRemark: '', // string 申请备注
+                };
+                requestResultLoadingAndInfo(ermcpInOutStockApplyReq, params, loading, ['出库登记成功', '出库登记失败:']).then(() => {
+                    context.emit('refresh');
+                    cancel();
+                });
+            });
         }
         return {
             visible,
             cancel,
             submit,
             loading,
+            formatValue,
+            rules,
+            formState,
+            formRef,
+            wareHouseList,
+            gblist,
+            gmlist,
+            DGList,
         };
     },
 });

+ 24 - 0
src/views/business/sell/components/storage/setup.ts

@@ -0,0 +1,24 @@
+import { reactive, ref, UnwrapRef } from "vue";
+/**
+ * 表单
+ * @returns 
+ */
+export function handleForm() {
+    interface FormState {
+        SpotGoodsBrandID: number | null // 品牌
+        WarehouseInfo: number | null // 入库仓库
+        Qty: number | null // 入库数量
+    }
+    const formRef = ref();
+    const formState: UnwrapRef<FormState> = reactive({
+        SpotGoodsBrandID: null, // 品牌
+        WarehouseInfo:  null, // 入库仓库
+        Qty: null, // 入库数量
+    })
+    const rules = {
+        SpotGoodsBrandID: [{ required: true, message: '请选择品牌', trigger: 'blur', type: 'number' }],
+        WarehouseInfo: [{ required: true, message: '请选择入库仓库', trigger: 'blur', type: 'number' }],
+        Qty: [{ required: true, message: '请输入入库数量', trigger: 'blur', type: 'number' }],
+    }
+    return { rules, formState, formRef }
+}

+ 1 - 0
src/views/information/account_info/compoments/add-business/index.vue

@@ -111,6 +111,7 @@ export default defineComponent({
                     const reqParam = {
                         operatetype: 1,
                     };
+                    delete param.userid;
                     Object.assign(reqParam, param);
                     requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['新增账户成功', '新增账户失败:']).then(() => {
                         cancel();

+ 219 - 0
src/views/information/account_info/compoments/add-managers-permission/index.vue

@@ -0,0 +1,219 @@
+<template>
+  <!-- 新增角色 -->
+  <a-modal class="commonModal add-powers"
+           title="新增角色"
+           v-model:visible="visible"
+           @cancel="cancel"
+           centered
+           :maskClosable="false"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">完成</a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="模板名称"
+                       name="">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     placeholder="请输入模板名称" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="24">
+          <a-form-item label="权限功能"
+                       name="">
+          </a-form-item>
+        </a-col>
+        <a-col :span="24">
+          <div class="powerTable">
+            <a-checkbox-group class="commonCheckboxGroup"
+                              v-for="(item, i) in tableList"
+                              :key="i + '0'">
+              <div class="powerRow">
+                <div class="powerLeft">
+                  <a-checkbox :value="item.Menu.resourcecode">{{item.Menu.resourcename}}</a-checkbox>
+                </div>
+                <template v-for="(sub, j) in item.SubMenu"
+                          :key="j + '1'">
+                  <div class="powerMiddle">
+                    <div>
+                      <a-checkbox :value="sub.Menu.resourcecode">{{sub.Menu.resourcename}}</a-checkbox>
+                    </div>
+                  </div>
+                  <div class="powerRight">
+                    <div>
+                      <a-checkbox v-for="(subNext, l) in sub.SubMenu"
+                                  :key="l + '3'"
+                                  :value="subNext.Menu.resourcecode">{{subNext.Menu.resourcename}}</a-checkbox>
+                    </div>
+                  </div>
+                </template>
+              </div>
+            </a-checkbox-group>
+          </div>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { closeModal } from '@/common/setup/modal/index';
+import { defineComponent, ref, PropType, watchEffect } from 'vue';
+import { handleBusinessForm } from '../setup';
+import { ErmcpLoginUserEx, ErmcpRoleMenuEx } from '@/services/go/ermcp/account/interface';
+import { validateAction } from '@/common/setup/form';
+import { BusinessFormState } from '../interface';
+import { LoginaccountOperateReq, LoginTaaccount } from '@/services/proto/accountinfo/interface';
+import { queryResultLoadingAndInfo, requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { loginAccountOperate } from '@/services/proto/accountinfo';
+import { QueryAccMgrRoleMenu } from '@/services/go/ermcp/account';
+
+export default defineComponent({
+    name: 'account_info_manager_btn_permission_add',
+    setup(props, context) {
+        // 控制关闭弹窗
+        const { visible, cancel } = closeModal('account_info_manager_btn_permission_add');
+        const { rules, formState, formRef } = handleBusinessForm();
+        const loading = ref<boolean>(false);
+        const tableList = ref<ErmcpRoleMenuEx[]>([]);
+        watchEffect(() => {
+            if (visible.value) {
+                queryResultLoadingAndInfo(QueryAccMgrRoleMenu, loading).then((res) => {
+                    tableList.value = res;
+                });
+            }
+        });
+        function submit() {
+            validateAction<BusinessFormState>(formRef, formState).then((res) => {
+                const reqParam: LoginaccountOperateReq = {
+                    operatetype: 3, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
+                    logincode: res.logincode, // string 登录账号
+                    accountname: res.accountname, // string 账户名称
+                    password: res.password, // string 登录密码(明文)
+                    mobile: res.mobile, // string 手机号码(明文)
+                    roleids: [Number(res.userid)], // uint64 账号角色
+                    logintaaccounts: [], // LoginTaaccount 期货账户(勾选交易员必填)
+                };
+                requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['新增成功', '新增失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
+                });
+            });
+        }
+        return {
+            formState,
+            rules,
+            formRef,
+            visible,
+            cancel,
+            submit,
+            loading,
+            tableList,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.add-business-info {
+}
+.add-traders {
+}
+.add-managers {
+}
+.add-powers {
+    .powerTable {
+        width: 100%;
+        height: 100%;
+        border: 3px solid @m-grey11;
+        background-color: @m-black12;
+        font-size: 14px;
+        color: @m-white0;
+        .flex;
+        flex-direction: column;
+        .ant-checkbox-group.commonCheckboxGroup .ant-checkbox-wrapper {
+            width: 90px;
+            span + span {
+                margin-right: 0;
+            }
+        }
+        .powerRow {
+            width: 100%;
+            display: inline-flex;
+            border-bottom: 3px solid @m-grey11;
+            div {
+                align-self: center;
+                align-items: center;
+            }
+            .powerLeft {
+                width: 84px;
+                padding: 0 8px;
+            }
+            .powerMiddle {
+                width: 130px;
+                .flex;
+                flex-direction: column;
+                div {
+                    width: 100%;
+                    height: 40px;
+                    line-height: 40px;
+                    padding: 0 8px;
+                    border: 3px solid @m-grey11;
+                    border-top: 0;
+                }
+                div:last-child {
+                    border-bottom: 0;
+                }
+            }
+            .powerRight {
+                flex: 1;
+                .flex;
+                flex-direction: column;
+                div {
+                    width: 100%;
+                    height: 40px;
+                    line-height: 40px;
+                    padding: 0 8px;
+                    justify-content: flex-start;
+                    border-bottom: 3px solid @m-grey11;
+                }
+                div:last-child {
+                    border-bottom: 0;
+                }
+            }
+        }
+    }
+}
+.add-futures {
+}
+.add-futures-son {
+}
+.add-arbitrage {
+    .ant-checkbox-group.commonCheckboxGroup .ant-checkbox-wrapper {
+        width: 100px;
+        span + span {
+            margin-right: 0;
+        }
+    }
+    .ant-checkbox-group.autoWidth {
+        width: 520px;
+        .ant-checkbox-wrapper {
+            width: auto;
+        }
+    }
+    .checkboxGroupItem {
+        .ant-row {
+            margin-bottom: 10px;
+        }
+    }
+}
+</style
+>;

+ 54 - 47
src/views/information/account_info/compoments/add-managers/index.vue

@@ -20,42 +20,49 @@
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="账户权限"
-                       name="">
+                       name="userid">
             <a-select class="inlineFormSelect"
                       style="width: 200px"
+                      v-model:value="formState.userid"
                       placeholder="请选择账户权限">
-              <a-select-option value="权限一">权限一</a-select-option>
+              <a-select-option v-for="(item, index) in tableList"
+                               :key="index"
+                               :value="item.roleid">{{item.rolename}}</a-select-option>
             </a-select>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="账户名称"
-                       name="">
+                       name="logincode">
             <a-input class="dialogInput"
                      style="width: 200px"
+                     v-model:value="formState.logincode"
                      placeholder="请输入账户名称" />
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="登录账号"
-                       name="">
+                       name="accountname">
             <a-input class="dialogInput"
                      style="width: 200px"
+                     v-model:value="formState.accountname"
                      placeholder="请输入登录账号" />
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="登录密码"
-                       name="">
+                       name="password">
             <a-input-password class="dialogInput"
                               style="width: 200px"
+                              v-model:value="formState.password"
                               placeholder="请输入登录密码" />
           </a-form-item>
         </a-col>
         <a-col :span="24">
           <a-form-item label="手机号码"
-                       name="">
+                       name="mobile">
             <a-input class="dialogInput"
+                     v-model:value="formState.mobile"
                      style="width: 200px"
                      placeholder="请输入手机号码" />
           </a-form-item>
@@ -67,55 +74,55 @@
 
 <script lang="ts">
 import { closeModal } from '@/common/setup/modal/index';
-import { initData } from '@/common/methods/index';
-import { defineComponent, ref, reactive, toRaw, UnwrapRef } from 'vue';
-import { AllEnums } from '@/services/go/commonService/interface';
-import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
+import { defineComponent, ref, PropType } from 'vue';
+import { handleBusinessForm } from '../setup';
+import { ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
+import { validateAction } from '@/common/setup/form';
+import { BusinessFormState } from '../interface';
+import { LoginaccountOperateReq, LoginTaaccount } from '@/services/proto/accountinfo/interface';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { loginAccountOperate } from '@/services/proto/accountinfo';
 
 export default defineComponent({
-    name: 'add-custom',
+    name: 'account_info_manager_btn_add',
     components: {},
-    setup() {
+    props: {
+        tableList: {
+            default: [],
+            type: Array as PropType<ErmcpLoginUserEx[]>,
+        },
+    },
+    setup(props, context) {
         // 控制关闭弹窗
         const { visible, cancel } = closeModal('account_info_manager_btn_add');
-        // 证件类型
-        // const cardTypeList = ref<AllEnums[]>(getCardType());
-        // // 表单
-        // const formRef = ref();
-        // const formState: UnwrapRef<FormState> = reactive(initFormState());
-        // const rules = {
-        //     userinfotype: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
-        //     customername: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
-        //     nickname: [{ required: true, message: '请输入企业简称', trigger: 'blur' }],
-        //     cardtype: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
-        // };
-        // // 下单方法
-        // const { loading, applyAction } = handleApply();
-        // function isPersonal(): boolean {
-        //     return formState.userinfotype === '1';
-        // }
-        // function submit() {
-        //     formRef.value
-        //         .validate()
-        //         .then(() => {
-        //             const param = toRaw(formState);
-        //             applyAction(param);
-        //             console.log('values', formState);
-        //         })
-        //         .catch((error: ValidateErrorEntity<FormState>) => {
-        //             console.log('error', error);
-        //         });
-        // }
+        const { rules, formState, formRef } = handleBusinessForm();
+        const loading = ref<boolean>(false);
+
+        function submit() {
+            validateAction<BusinessFormState>(formRef, formState).then((res) => {
+                const reqParam: LoginaccountOperateReq = {
+                    operatetype: 3, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
+                    logincode: res.logincode, // string 登录账号
+                    accountname: res.accountname, // string 账户名称
+                    password: res.password, // string 登录密码(明文)
+                    mobile: res.mobile, // string 手机号码(明文)
+                    roleids: [Number(res.userid)], // uint64 账号角色
+                    logintaaccounts: [], // LoginTaaccount 期货账户(勾选交易员必填)
+                };
+                requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['新增成功', '新增失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
+                });
+            });
+        }
         return {
-            // formState,
-            // rules,
-            // formRef,
-            // cardTypeList,
-            // isPersonal,
+            formState,
+            rules,
+            formRef,
             visible,
             cancel,
-            // submit,
-            // loading,
+            submit,
+            loading,
         };
     },
 });

+ 1 - 11
src/views/information/account_info/compoments/cancel-business/index.vue

@@ -35,22 +35,12 @@
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="登录密码"
-                       name="">
-            <a-input-password class="dialogInput"
-                              style="width: 200px"
-                              value="2323423"
-                              v-model:value="formState.password"
-                              readonly />
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
           <a-form-item label="手机号码"
                        name="">
             <span class="white">{{formState.mobile}}</span>
           </a-form-item>
         </a-col>
-        <a-col :span="24">
+        <a-col :span="12">
           <a-form-item label="账户角色"
                        name="userinfotype">
             <a-checkbox-group class="commonCheckboxGroup"

+ 116 - 0
src/views/information/account_info/compoments/cancel-managers/index.vue

@@ -0,0 +1,116 @@
+<template>
+  <!-- 管理员账号注销-->
+  <a-modal class="add-custom custom-detail"
+           title="管理员账号注销"
+           v-model:visible="visible"
+           centered
+           :maskClosable="maskClosableFlag"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="cancel">取消
+      </a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">注销
+      </a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="账户权限"
+                       name="userid">
+            <span class="white">{{selectedData.rolename}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="账户名称"
+                       name="logincode">
+            <span class="white">{{selectedData.logincode}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="登录账号"
+                       name="accountname">
+            <span class="white">{{selectedData.loginname}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="手机号码"
+                       name="mobile">
+            <span class="white">{{selectedData.mobile}}</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
+import { Modal } from 'ant-design-vue';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import {LoginaccountOperateReq} from "@/services/proto/accountinfo/interface";
+import {loginAccountOperate} from "@/services/proto/accountinfo";
+
+export default defineComponent({
+    name: 'account_info_manager_btn_logout',
+    components: {},
+    props: {
+        selectedData: {
+            type: Object as PropType<ErmcpLoginUser>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = closeModal('account_info_manager_btn_logout');
+        const loading = ref<boolean>(false);
+        function submit() {
+            Modal.confirm({
+                title: '是否确认注销该账户',
+                okText: '确认注销',
+                cancelText: '取消',
+                onOk() {
+                    let reqParam: LoginaccountOperateReq = {
+                        userid: props.selectedData.userid,
+                        loginid: props.selectedData.loginid,
+                        operatetype: 7, // 5: 锁定 6:解锁
+                        logintaaccounts: [],
+                    };
+                    requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['账户注销成功', '账户注销失败:']).then(() => {
+                        cancel();
+                        context.emit('refresh');
+                    });
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
+        }
+        return {
+            visible,
+            cancel,
+            maskClosableFlag: false,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.custom-detail {
+    .ant-form.inlineForm {
+        margin-top: 20px;
+    }
+}
+</style>;

+ 50 - 29
src/views/information/account_info/compoments/cancel-trader/index.vue

@@ -23,44 +23,55 @@
             :model="formState">
       <a-row :gutter="24">
         <a-col :span="12">
-          <a-form-item label="登录账号"
+          <a-form-item label="所属用户"
                        name="">
-            <span class="white">{{formState.accountname}}</span>
+            <span class="white">{{rolename}}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="账户名称"
-                       name="">
-            <span class="white">{{formState.logincode}}</span>
+                       name="logincode">
+            <a-input class="dialogInput"
+                     readonly
+                     style="width: 200px"
+                     v-model:value="formState.logincode"
+                     placeholder="请输入账户名称" />
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="登录密码"
-                       name="">
-            <a-input-password class="dialogInput"
-                              style="width: 200px"
-                              value="2323423"
-                              v-model:value="formState.password"
-                              readonly />
+          <a-form-item label="登录账号"
+                       name="accountname">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     readonly
+                     v-model:value="formState.accountname"
+                     placeholder="请输入登录账号" />
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="手机号码"
-                       name="">
-            <span class="white">{{formState.mobile}}</span>
+                       name="mobile">
+            <a-input class="dialogInput"
+                     v-model:value="formState.mobile"
+                     style="width: 200px"
+                     readonly
+                     placeholder="请输入手机号码" />
           </a-form-item>
         </a-col>
         <a-col :span="24">
-          <a-form-item label="账户角色"
-                       name="userinfotype">
+          <a-form-item label="授权期货账户"
+                       class="checkboxGroupItem"
+                       name="logintaaccounts">
             <a-checkbox-group class="commonCheckboxGroup"
-                              v-model:value="formState.roleids">
+                              v-model:value="formState.logintaaccounts">
               <a-row>
-                <a-col :span="12">
-                  <a-checkbox :value="22">业务员</a-checkbox>
-                </a-col>
-                <a-col :span="12">
-                  <a-checkbox :value="23">跟单员</a-checkbox>
+                <a-col :span="12"
+                       v-for="(item, index) in selectedData.acclist"
+                       :key="index">
+                  <a-checkbox disabled
+                              :value="item.accountid">
+                    {{item.accountname}}/{{item.accountid}}
+                  </a-checkbox>
                 </a-col>
               </a-row>
             </a-checkbox-group>
@@ -78,8 +89,8 @@ import { Modal } from 'ant-design-vue';
 import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { loginAccountOperate } from '@/services/proto/accountinfo';
-import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
-import { handleBusinessForm } from '../setup';
+import { ErmcpLoginUser, ErmcpLoginUserEx, ErmcpTaAccount } from '@/services/go/ermcp/account/interface';
+import { handleBusinessForm, handleRoleName } from '../setup';
 import { mergeTwoObj } from '@/utils/objHandle';
 
 export default defineComponent({
@@ -87,8 +98,16 @@ export default defineComponent({
     components: {},
     props: {
         selectedData: {
-            default: {},
             type: Object as PropType<ErmcpLoginUser>,
+            default: {},
+        },
+        tableList: {
+            type: Array as PropType<ErmcpLoginUserEx[]>,
+            default: [],
+        },
+        accountList: {
+            default: [],
+            type: Object as PropType<ErmcpTaAccount[]>,
         },
     },
     setup(props, context) {
@@ -96,9 +115,14 @@ export default defineComponent({
         const { visible, cancel } = closeModal('account_info_trade_btn_logout');
         const loading = ref<boolean>(false);
         const { formState } = handleBusinessForm();
+        const { rolename, getRoleName } = handleRoleName();
         watchEffect(() => {
             if (visible.value) {
-                mergeTwoObj(formState, props.selectedData);
+                const { selectedData, tableList } = props;
+                mergeTwoObj(formState, selectedData);
+                getRoleName(tableList, selectedData);
+                formState.logintaaccounts = selectedData.acclist.map((e) => e.accountid);
+                formState.accountname = props.selectedData.loginname;
             }
         });
         function submit() {
@@ -126,10 +150,7 @@ export default defineComponent({
 
         return {
             formState,
-            // rules,
-            // formRef,
-            // cardTypeList,
-            // isPersonal,
+            rolename,
             visible,
             cancel,
             submit,

+ 1 - 11
src/views/information/account_info/compoments/detail-business/index.vue

@@ -28,22 +28,12 @@
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="登录密码"
-                       name="">
-            <a-input-password class="dialogInput"
-                              style="width: 200px"
-                              value="2323423"
-                              v-model:value="formState.password"
-                              readonly />
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
           <a-form-item label="手机号码"
                        name="">
             <span class="white">{{formState.mobile}}</span>
           </a-form-item>
         </a-col>
-        <a-col :span="24">
+        <a-col :span="12">
           <a-form-item label="账户角色"
                        name="userinfotype">
             <a-checkbox-group class="commonCheckboxGroup"

+ 81 - 0
src/views/information/account_info/compoments/detail-managers/index.vue

@@ -0,0 +1,81 @@
+<template>
+  <!-- 账号详情-->
+  <a-modal class="add-custom custom-detail"
+           title="账号详情"
+           v-model:visible="visible"
+           centered
+           :maskClosable="maskClosableFlag"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                @click="cancel">关闭</a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="账户权限"
+                       name="userid">
+            <span class="white">{{selectedData.rolename}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="账户名称"
+                       name="logincode">
+            <span class="white">{{selectedData.logincode}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="登录账号"
+                       name="accountname">
+            <span class="white">{{selectedData.loginname}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="手机号码"
+                       name="mobile">
+            <span class="white">{{selectedData.mobile}}</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
+
+export default defineComponent({
+    name: 'detail-managers',
+    components: {},
+    props: {
+        selectedData: {
+            type: Object as PropType<ErmcpLoginUser>,
+            default: {},
+        },
+    },
+    setup() {
+        const { visible, cancel } = closeModal('detail');
+
+        return {
+            visible,
+            cancel,
+            maskClosableFlag: false,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.custom-detail {
+    .ant-form.inlineForm {
+        margin-top: 20px;
+    }
+}
+</style>;

+ 1 - 0
src/views/information/account_info/compoments/detail-trader/index.vue

@@ -110,6 +110,7 @@ export default defineComponent({
                 mergeTwoObj(formState, selectedData);
                 getRoleName(tableList, selectedData);
                 formState.logintaaccounts = selectedData.acclist.map((e) => e.accountid);
+                formState.accountname = props.selectedData.loginname;
             }
         });
         return {

+ 1 - 0
src/views/information/account_info/compoments/interface.ts

@@ -1,6 +1,7 @@
 
 export interface BusinessFormState {
     logincode: string // 登录账号
+    userid: string | undefined// 登录账号
     accountname: string // 账户名称
     password: string // 登录密码(明文)
     mobile?: string // 手机号码(明文)

+ 1 - 11
src/views/information/account_info/compoments/locked-business/index.vue

@@ -29,22 +29,12 @@
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="登录密码"
-                       name="">
-            <a-input-password class="dialogInput"
-                              style="width: 200px"
-                              value="2323423"
-                              v-model:value="formState.password"
-                              readonly />
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
           <a-form-item label="手机号码"
                        name="">
             <span class="white">{{formState.mobile}}</span>
           </a-form-item>
         </a-col>
-        <a-col :span="24">
+        <a-col :span="12">
           <a-form-item label="账户角色"
                        name="userinfotype">
             <a-checkbox-group class="commonCheckboxGroup"

+ 116 - 0
src/views/information/account_info/compoments/locked-managers/index.vue

@@ -0,0 +1,116 @@
+<template>
+  <!-- 管理员账号锁定-->
+  <a-modal class="add-custom custom-detail"
+           title="管理员账号锁定"
+           v-model:visible="visible"
+           centered
+           :maskClosable="maskClosableFlag"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="cancel">取消
+      </a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">锁定
+      </a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="账户权限"
+                       name="userid">
+            <span class="white">{{selectedData.rolename}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="账户名称"
+                       name="logincode">
+            <span class="white">{{selectedData.logincode}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="登录账号"
+                       name="accountname">
+            <span class="white">{{selectedData.loginname}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="手机号码"
+                       name="mobile">
+            <span class="white">{{selectedData.mobile}}</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
+import { Modal } from 'ant-design-vue';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import {LoginaccountOperateReq} from "@/services/proto/accountinfo/interface";
+import {loginAccountOperate} from "@/services/proto/accountinfo";
+
+export default defineComponent({
+    name: 'account_info_manager_btn_locked',
+    components: {},
+    props: {
+        selectedData: {
+            type: Object as PropType<ErmcpLoginUser>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = closeModal('account_info_manager_btn_locked');
+        const loading = ref<boolean>(false);
+        function submit() {
+            Modal.confirm({
+                title: '是否确认锁定该账户',
+                okText: '确认锁定',
+                cancelText: '取消',
+                onOk() {
+                    let reqParam: LoginaccountOperateReq = {
+                        userid: props.selectedData.userid,
+                        loginid: props.selectedData.loginid,
+                        operatetype: 5, // 5: 锁定 6:解锁
+                        logintaaccounts: [],
+                    };
+                    requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['账户锁定成功', '账户锁定失败:']).then(() => {
+                        cancel();
+                        context.emit('refresh');
+                    });
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
+        }
+        return {
+            visible,
+            cancel,
+            maskClosableFlag: false,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.custom-detail {
+    .ant-form.inlineForm {
+        margin-top: 20px;
+    }
+}
+</style>;

+ 1 - 0
src/views/information/account_info/compoments/locked-trader/index.vue

@@ -116,6 +116,7 @@ export default defineComponent({
                 mergeTwoObj(formState, selectedData);
                 getRoleName(tableList, selectedData);
                 formState.logintaaccounts = selectedData.acclist.map((e) => e.accountid);
+                formState.accountname = props.selectedData.loginname;
             }
         });
         function submit() {

+ 156 - 0
src/views/information/account_info/compoments/managers-permission/index.vue

@@ -0,0 +1,156 @@
+<template>
+  <!-- 权限设置 -->
+  <a-modal class="commonModal add-powers"
+           title="权限设置"
+           v-model:visible="visible"
+           @cancel="cancel"
+           :loading="loading"
+           centered
+           :maskClosable="false"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="cancel">完成</a-button>
+    </template>
+    <a-table :columns="columns"
+             :data-source="tableList"
+             :pagination="false">
+    </a-table>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { closeModal } from '@/common/setup/modal/index';
+import { defineComponent, ref, watchEffect } from 'vue';
+import { ErmcpRole } from '@/services/go/ermcp/account/interface';
+import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { QueryAccMgrRole } from '@/services/go/ermcp/account';
+
+export default defineComponent({
+    name: 'account_info_manager_btn_permission',
+    setup() {
+        // 控制关闭弹窗
+        const { visible, cancel } = closeModal('account_info_manager_btn_permission');
+        const loading = ref<boolean>(false);
+        const columns = [
+            { title: '角色名称', dataIndex: 'rolename', key: 'rolename' },
+            { title: '创建人', dataIndex: 'modifiername', key: 'modifiername' },
+            { title: '创建时间', dataIndex: 'modifytime', key: 'modifytime' },
+            { title: '状态', dataIndex: 'rolestatus', key: 'rolestatus' },
+        ];
+        const tableList = ref<ErmcpRole[]>([]);
+        watchEffect(() => {
+            if (visible.value) {
+                queryResultLoadingAndInfo(QueryAccMgrRole, loading).then((res) => {
+                    tableList.value = res;
+                });
+            }
+        });
+        return {
+            visible,
+            cancel,
+            loading,
+            tableList,
+            columns,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.add-business-info {
+}
+.add-traders {
+}
+.add-managers {
+}
+.add-powers {
+    .powerTable {
+        width: 100%;
+        height: 100%;
+        border: 3px solid @m-grey11;
+        background-color: @m-black12;
+        font-size: 14px;
+        color: @m-white0;
+        .flex;
+        flex-direction: column;
+        .ant-checkbox-group.commonCheckboxGroup .ant-checkbox-wrapper {
+            width: 90px;
+            span + span {
+                margin-right: 0;
+            }
+        }
+        .powerRow {
+            width: 100%;
+            display: inline-flex;
+            border-bottom: 3px solid @m-grey11;
+            div {
+                align-self: center;
+                align-items: center;
+            }
+            .powerLeft {
+                width: 84px;
+                padding: 0 8px;
+            }
+            .powerMiddle {
+                width: 130px;
+                .flex;
+                flex-direction: column;
+                div {
+                    width: 100%;
+                    height: 40px;
+                    line-height: 40px;
+                    padding: 0 8px;
+                    border: 3px solid @m-grey11;
+                    border-top: 0;
+                }
+                div:last-child {
+                    border-bottom: 0;
+                }
+            }
+            .powerRight {
+                flex: 1;
+                .flex;
+                flex-direction: column;
+                div {
+                    width: 100%;
+                    height: 40px;
+                    line-height: 40px;
+                    padding: 0 8px;
+                    justify-content: flex-start;
+                    border-bottom: 3px solid @m-grey11;
+                }
+                div:last-child {
+                    border-bottom: 0;
+                }
+            }
+        }
+    }
+}
+.add-futures {
+}
+.add-futures-son {
+}
+.add-arbitrage {
+    .ant-checkbox-group.commonCheckboxGroup .ant-checkbox-wrapper {
+        width: 100px;
+        span + span {
+            margin-right: 0;
+        }
+    }
+    .ant-checkbox-group.autoWidth {
+        width: 520px;
+        .ant-checkbox-wrapper {
+            width: auto;
+        }
+    }
+    .checkboxGroupItem {
+        .ant-row {
+            margin-bottom: 10px;
+        }
+    }
+}
+</style
+>;

+ 68 - 56
src/views/information/account_info/compoments/modify-managers/index.vue

@@ -20,42 +20,41 @@
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="账户权限"
-                       name="">
+                       name="userid">
             <a-select class="inlineFormSelect"
                       style="width: 200px"
+                      v-model:value="formState.userid"
                       placeholder="请选择账户权限">
-              <a-select-option value="权限一">权限一</a-select-option>
+              <a-select-option v-for="(item, index) in tableList"
+                               :key="index"
+                               :value="item.roleid">{{item.rolename}}</a-select-option>
             </a-select>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="账户名称"
-                       name="">
+                       name="logincode">
             <a-input class="dialogInput"
                      style="width: 200px"
+                     v-model:value="formState.logincode"
                      placeholder="请输入账户名称" />
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="登录账号"
-                       name="">
+                       name="accountname">
             <a-input class="dialogInput"
                      style="width: 200px"
+                     readonly
+                     v-model:value="formState.accountname"
                      placeholder="请输入登录账号" />
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="登录密码"
-                       name="">
-            <a-input-password class="dialogInput"
-                              style="width: 200px"
-                              placeholder="请输入登录密码" />
-          </a-form-item>
-        </a-col>
-        <a-col :span="24">
           <a-form-item label="手机号码"
-                       name="">
+                       name="mobile">
             <a-input class="dialogInput"
+                     v-model:value="formState.mobile"
                      style="width: 200px"
                      placeholder="请输入手机号码" />
           </a-form-item>
@@ -67,55 +66,68 @@
 
 <script lang="ts">
 import { closeModal } from '@/common/setup/modal/index';
-import { initData } from '@/common/methods/index';
-import { defineComponent, ref, reactive, toRaw, UnwrapRef } from 'vue';
-import { AllEnums } from '@/services/go/commonService/interface';
-import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
+import { defineComponent, ref, PropType, watchEffect } from 'vue';
+import { handleBusinessForm } from '../setup';
+import { validateAction } from '@/common/setup/form';
+import { BusinessFormState } from '../interface';
+import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { loginAccountOperate } from '@/services/proto/accountinfo';
+import { ErmcpLoginUser, ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
+import { mergeTwoObj } from '@/utils/objHandle';
+import {getUID} from "echarts/types/src/util/component";
+import {getUserId} from "@/services/bus/account";
 
 export default defineComponent({
-    name: 'add-custom',
-    components: {},
-    setup() {
+    name: 'account_info_manager_btn_modify',
+    props: {
+        tableList: {
+            default: [],
+            type: Array as PropType<ErmcpLoginUserEx[]>,
+        },
+        selectedData: {
+            type: Object as PropType<ErmcpLoginUser>,
+            default: {},
+        },
+    },
+    setup(props, context) {
         // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_business_btn_modify');
-        // 证件类型
-        // const cardTypeList = ref<AllEnums[]>(getCardType());
-        // // 表单
-        // const formRef = ref();
-        // const formState: UnwrapRef<FormState> = reactive(initFormState());
-        // const rules = {
-        //     userinfotype: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
-        //     customername: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
-        //     nickname: [{ required: true, message: '请输入企业简称', trigger: 'blur' }],
-        //     cardtype: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
-        // };
-        // // 下单方法
-        // const { loading, applyAction } = handleApply();
-        // function isPersonal(): boolean {
-        //     return formState.userinfotype === '1';
-        // }
-        // function submit() {
-        //     formRef.value
-        //         .validate()
-        //         .then(() => {
-        //             const param = toRaw(formState);
-        //             applyAction(param);
-        //             console.log('values', formState);
-        //         })
-        //         .catch((error: ValidateErrorEntity<FormState>) => {
-        //             console.log('error', error);
-        //         });
-        // }
+        const { visible, cancel } = closeModal('account_info_manager_btn_modify');
+        const { rules, formState, formRef } = handleBusinessForm();
+        const loading = ref<boolean>(false);
+        watchEffect(() => {
+            if (visible.value) {
+                mergeTwoObj(formState, props.selectedData);
+                formState.accountname = props.selectedData.loginname;
+            }
+        });
+        function submit() {
+            validateAction<BusinessFormState>(formRef, formState).then((res) => {
+                const reqParam: LoginaccountOperateReq = {
+                    operatetype: 4, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
+                    logincode: res.logincode, // string 登录账号
+                    accountname: res.accountname, // string 账户名称
+                    loginid: props.selectedData.loginid,
+                    userid: getUserId(),
+                    password: '', // string 登录密码(明文)
+                    mobile: res.mobile, // string 手机号码(明文)
+                    roleids: [Number(res.userid)], // uint64 账号角色
+                    logintaaccounts: [], // LoginTaaccount 期货账户(勾选交易员必填)
+                };
+                requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['修改成功', '修改失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
+                });
+            });
+        }
         return {
-            // formState,
-            // rules,
-            // formRef,
-            // cardTypeList,
-            // isPersonal,
+            formState,
+            rules,
+            formRef,
             visible,
             cancel,
-            // submit,
-            // loading,
+            submit,
+            loading,
         };
     },
 });

+ 203 - 0
src/views/information/account_info/compoments/modify-traders-self/index.vue

@@ -0,0 +1,203 @@
+<template>
+  <!-- 修改交易用户 -->
+  <a-modal class="commonModal add-traders"
+           title="修改交易用户"
+           v-model:visible="visible"
+           @cancel="cancel"
+           centered
+           :maskClosable="false"
+           width="890px">
+    <template #footer>
+        <a-button key="cancel"
+                  type="primary"
+                  @click="cancel">取消</a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">修改</a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="用户名称"
+                       name="rolename">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     v-model:value="formState.rolename"
+                     placeholder="请输入账户名称" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="手机号码"
+                       name="mobile">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     v-model:value="formState.mobile"
+                     placeholder="请输入登录账号" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { closeModal } from '@/common/setup/modal/index';
+import { defineComponent, ref, PropType, watchEffect } from 'vue';
+import { ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
+import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { loginAccountOperate } from '@/services/proto/accountinfo';
+import { handleForm } from './setup';
+import { mergeTwoObj } from '@/utils/objHandle';
+import { validateAction } from '@/common/setup/form';
+import { FormState } from './interface';
+import {getLongTypeLoginID} from "@/services/bus/login";
+
+export default defineComponent({
+    name: 'account_info_trade_btn_modify_self',
+    props: {
+        selectedData: {
+            type: Object as PropType<ErmcpLoginUserEx>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        // 控制关闭弹窗
+        const { visible, cancel } = closeModal('account_info_trade_btn_modify_self');
+        const loading = ref<boolean>(false);
+        const { rules, formState, formRef } = handleForm();
+        watchEffect(() => {
+            if (visible.value) {
+                const { selectedData } = props;
+                mergeTwoObj(formState, selectedData);
+                console.log('selectedData', selectedData);
+            }
+        });
+        function submit() {
+            validateAction<FormState>(formRef, formState).then((res) => {
+                const reqParam: LoginaccountOperateReq = {
+                    operatetype: 2, // uint32 操作类型-1:新增 2:修改 3:新增管理员 4:修改管理员 5:锁定 6:解锁 7:注销 8:恢复 9:重置密码 10:新增登录帐号 11:停用用户 12:恢复用户 13:修改用户信息
+                    userid: props.selectedData.roleid,
+                    roleids: [24],
+                    logintaaccounts: [],
+                    mobile: res.mobile, // string 手机号码(明文)
+                    accountname: res.rolename
+                };
+                requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['修改成功', '修改失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
+                });
+            });
+        }
+        return {
+            formState,
+            rules,
+            formRef,
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.add-business-info {
+}
+.add-traders {
+}
+.add-managers {
+}
+.add-powers {
+    .powerTable {
+        width: 100%;
+        height: 100%;
+        border: 3px solid @m-grey11;
+        background-color: @m-black12;
+        font-size: 14px;
+        color: @m-white0;
+        .flex;
+        flex-direction: column;
+        .ant-checkbox-group.commonCheckboxGroup .ant-checkbox-wrapper {
+            width: 90px;
+            span + span {
+                margin-right: 0;
+            }
+        }
+        .powerRow {
+            width: 100%;
+            display: inline-flex;
+            border-bottom: 3px solid @m-grey11;
+            div {
+                align-self: center;
+                align-items: center;
+            }
+            .powerLeft {
+                width: 84px;
+                padding: 0 8px;
+            }
+            .powerMiddle {
+                width: 130px;
+                .flex;
+                flex-direction: column;
+                div {
+                    width: 100%;
+                    height: 40px;
+                    line-height: 40px;
+                    padding: 0 8px;
+                    border: 3px solid @m-grey11;
+                    border-top: 0;
+                }
+                div:last-child {
+                    border-bottom: 0;
+                }
+            }
+            .powerRight {
+                flex: 1;
+                .flex;
+                flex-direction: column;
+                div {
+                    width: 100%;
+                    height: 40px;
+                    line-height: 40px;
+                    padding: 0 8px;
+                    justify-content: flex-start;
+                    border-bottom: 3px solid @m-grey11;
+                }
+                div:last-child {
+                    border-bottom: 0;
+                }
+            }
+        }
+    }
+}
+.add-futures {
+}
+.add-futures-son {
+}
+.add-arbitrage {
+    .ant-checkbox-group.commonCheckboxGroup .ant-checkbox-wrapper {
+        width: 100px;
+        span + span {
+            margin-right: 0;
+        }
+    }
+    .ant-checkbox-group.autoWidth {
+        width: 520px;
+        .ant-checkbox-wrapper {
+            width: auto;
+        }
+    }
+    .checkboxGroupItem {
+        .ant-row {
+            margin-bottom: 10px;
+        }
+    }
+}
+</style
+>;

+ 4 - 0
src/views/information/account_info/compoments/modify-traders-self/interface.ts

@@ -0,0 +1,4 @@
+export interface FormState {
+    rolename: string; // 角色名称(交易账户->用户名称)
+    mobile: string; // 手机号
+}

+ 19 - 0
src/views/information/account_info/compoments/modify-traders-self/setup.ts

@@ -0,0 +1,19 @@
+import { reactive, ref, UnwrapRef } from "vue";
+import { FormState } from "./interface";
+
+/**
+ * 表单
+ * @returns 
+ */
+export function handleForm() {
+    const formRef = ref();
+    const formState: UnwrapRef<FormState> = reactive({
+        rolename: '',
+        mobile: '',
+    })
+    const rules = {
+        rolename: [{ required: true, message: '请输入用户名称', trigger: 'blur' }],
+        mobile: [{ required: true, message: '请输入手机号码', trigger: 'blur' }],
+    }
+    return { rules, formState, formRef }
+}

+ 1 - 9
src/views/information/account_info/compoments/modify-traders/index.vue

@@ -43,15 +43,6 @@
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="登录密码"
-                       name="password">
-            <a-input-password class="dialogInput"
-                              style="width: 200px"
-                              v-model:value="formState.password"
-                              placeholder="请输入登录密码" />
-          </a-form-item>
-        </a-col>
-        <a-col :span="24">
           <a-form-item label="手机号码"
                        name="mobile">
             <a-input class="dialogInput"
@@ -122,6 +113,7 @@ export default defineComponent({
                 mergeTwoObj(formState, selectedData);
                 getRoleName(tableList, selectedData);
                 formState.logintaaccounts = selectedData.acclist.map((e) => e.accountid);
+                formState.accountname = props.selectedData.loginname;
             }
         });
         function submit() {

+ 1 - 1
src/views/information/account_info/compoments/reset-business/index.vue

@@ -87,7 +87,7 @@ export default defineComponent({
         const loading = ref<boolean>(false);
         watchEffect(() => {
             if (visible.value) {
-                formState.accountname = props.selectedData.accountname;
+                formState.accountname = props.selectedData.loginname;
             }
         });
 

+ 127 - 0
src/views/information/account_info/compoments/reset-managers/index.vue

@@ -0,0 +1,127 @@
+<template>
+  <!-- 重置管理员账户密码 -->
+  <a-modal class="add-custom"
+           title="重置管理员账户密码"
+           v-model:visible="visible"
+           @cancel="cancel"
+           centered
+           :maskClosable="false"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">完成
+      </a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="登录账号"
+                       name="accountname">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     readonly
+                     v-model:value="formState.accountname"
+                     placeholder="请输入登录账号" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="原密码"
+                       name="oldPassword">
+            <a-input-password class="dialogInput"
+                              style="width: 200px"
+                              v-model:value="formState.oldPassword"
+                              placeholder="请输入原密码" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="新密码"
+                       name="password">
+            <a-input-password class="dialogInput"
+                              style="width: 200px"
+                              v-model:value="formState.password"
+                              placeholder="请输入8到20个字符的新密码" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="确认新密码"
+                       name="comfirePassword">
+            <a-input-password class="dialogInput"
+                              style="width: 200px"
+                              v-model:value="formState.comfirePassword"
+                              placeholder="请再次确认新密码" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { closeModal } from '@/common/setup/modal/index';
+import { defineComponent, ref, PropType, watchEffect } from 'vue';
+import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
+import { ResetPasswordFormState } from '../interface';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { loginAccountOperate } from '@/services/proto/accountinfo';
+import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
+import { validateAction } from '@/common/setup/form';
+import { handlePasswordForm } from '../setup';
+
+export default defineComponent({
+    name: 'account_info_manager_btn_reset',
+    props: {
+        selectedData: {
+            default: {},
+            type: Object as PropType<ErmcpLoginUser>,
+        },
+    },
+    setup(props, context) {
+        // 控制关闭弹窗
+        const { visible, cancel } = closeModal('account_info_manager_btn_reset');
+        const { rules, formState, formRef } = handlePasswordForm();
+        const loading = ref<boolean>(false);
+        watchEffect(() => {
+            if (visible.value) {
+                formState.accountname = props.selectedData.loginname;
+            }
+        });
+
+        function submit() {
+            validateAction<ResetPasswordFormState>(formRef, formState).then((res) => {
+                let reqParam: LoginaccountOperateReq = {
+                    userid: props.selectedData.userid,
+                    loginid: props.selectedData.loginid,
+                    operatetype: 7, // 5: 锁定 6:解锁
+                    logintaaccounts: [],
+                    password: res.password,
+                };
+                requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['重置登录账户密码成功', '重置登录账户密码失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
+                });
+            });
+        }
+
+        return {
+            formState,
+            rules,
+            formRef,
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.add-custom {
+}
+</style
+>;

+ 1 - 1
src/views/information/account_info/compoments/reset-trader/index.vue

@@ -87,7 +87,7 @@ export default defineComponent({
         const loading = ref<boolean>(false);
         watchEffect(() => {
             if (visible.value) {
-                formState.accountname = props.selectedData.accountname;
+                formState.accountname = props.selectedData.loginname;
             }
         });
 

+ 3 - 0
src/views/information/account_info/compoments/setup.ts

@@ -11,6 +11,7 @@ export function handleBusinessForm() {
     const formRef = ref();
     const formState: UnwrapRef<BusinessFormState> = reactive({
         logincode: '',
+        userid: undefined,
         accountname: '',
         password: '',
         mobile: '',
@@ -21,6 +22,8 @@ export function handleBusinessForm() {
         logincode: [{ required: true, message: '请输入登录账号', trigger: 'blur' }],
         accountname: [{ required: true, message: '请输入账户名称', trigger: 'blur' }],
         password: [{ required: true, message: '请输入账户密码', trigger: 'blur' }],
+        mobile: [{ required: true, message: '请输入手机号码', trigger: 'blur' }],
+        userid: [{ required: true, message: '请输入账户权限' }],
         roleids: [{ required: true, message: '请选择账号角色', trigger: 'change', type: 'array', }],
         logintaaccounts: [{ required: true, message: '请选择期货账户', trigger: 'change', type: 'array', }],
     }

+ 1 - 11
src/views/information/account_info/compoments/unlocked-business/index.vue

@@ -29,22 +29,12 @@
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="登录密码"
-                       name="">
-            <a-input-password class="dialogInput"
-                              style="width: 200px"
-                              value="2323423"
-                              v-model:value="formState.password"
-                              readonly />
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
           <a-form-item label="手机号码"
                        name="">
             <span class="white">{{formState.mobile}}</span>
           </a-form-item>
         </a-col>
-        <a-col :span="24">
+        <a-col :span="12">
           <a-form-item label="账户角色"
                        name="userinfotype">
             <a-checkbox-group class="commonCheckboxGroup"

+ 116 - 0
src/views/information/account_info/compoments/unlocked-managers/index.vue

@@ -0,0 +1,116 @@
+<template>
+  <!-- 管理员账号解锁-->
+  <a-modal class="add-custom custom-detail"
+           title="管理员账号解锁"
+           v-model:visible="visible"
+           centered
+           :maskClosable="maskClosableFlag"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="cancel">取消
+      </a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">解锁
+      </a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="账户权限"
+                       name="userid">
+            <span class="white">{{selectedData.rolename}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="账户名称"
+                       name="logincode">
+            <span class="white">{{selectedData.logincode}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="登录账号"
+                       name="accountname">
+            <span class="white">{{selectedData.loginname}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="手机号码"
+                       name="mobile">
+            <span class="white">{{selectedData.mobile}}</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
+import { Modal } from 'ant-design-vue';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import {LoginaccountOperateReq} from "@/services/proto/accountinfo/interface";
+import {loginAccountOperate} from "@/services/proto/accountinfo";
+
+export default defineComponent({
+    name: 'account_info_manager_btn_unlocked',
+    components: {},
+    props: {
+        selectedData: {
+            type: Object as PropType<ErmcpLoginUser>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = closeModal('account_info_manager_btn_unlocked');
+        const loading = ref<boolean>(false);
+        function submit() {
+            Modal.confirm({
+                title: '是否确认解锁该账户',
+                okText: '确认解锁',
+                cancelText: '取消',
+                onOk() {
+                    let reqParam: LoginaccountOperateReq = {
+                        userid: props.selectedData.userid,
+                        loginid: props.selectedData.loginid,
+                        operatetype: 6, // 5: 锁定 6:解锁
+                        logintaaccounts: [],
+                    };
+                    requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['账户解锁成功', '账户解锁失败:']).then(() => {
+                        cancel();
+                        context.emit('refresh');
+                    });
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
+        }
+        return {
+            visible,
+            cancel,
+            maskClosableFlag: false,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.custom-detail {
+    .ant-form.inlineForm {
+        margin-top: 20px;
+    }
+}
+</style>;

+ 1 - 0
src/views/information/account_info/compoments/unlocked-trader/index.vue

@@ -116,6 +116,7 @@ export default defineComponent({
                 mergeTwoObj(formState, selectedData);
                 getRoleName(tableList, selectedData);
                 formState.logintaaccounts = selectedData.acclist.map((e) => e.accountid);
+                formState.accountname = props.selectedData.loginname;
             }
         });
         function submit() {

+ 72 - 12
src/views/information/account_info/list/account_info_manager/index.vue

@@ -11,7 +11,10 @@
         </svg>
         {{getUserName()}}
       </span>
+      <a-button @click="openPermission">权限设置</a-button>
+      <a-button @click="openAddPermission">新增</a-button>
     </div>
+
     <a-collapse class="spotCollapse"
                 v-for="(item, i) in tableList"
                 :key="i + '11'"
@@ -33,38 +36,67 @@
           <a-row class="headRow">
             <a-col :span="12">{{item.rolename}}({{item.userlist.length}})</a-col>
             <a-col :span="12">
-              <BtnList :btnList="commonBtn" />
+              <BtnList :selectedData="item"
+                       :btnList="commonBtn"
+                       @onClick="openAction" />
             </a-col>
           </a-row>
         </template>
         <a-collapse class="busyCollapse"
+                    v-for="(sub, i) in item.userlist"
+                    :key="i + '11'"
                     :bordered="false">
           <a-collapse-panel :show-arrow="false">
             <template #header>
-              <a-row class="contRow"
-                     v-for="(sub, i) in item.userlist"
-                     :key="i + '11'">
-                <a-col :span="12">{{sub.accountname}}-{{sub.logincode}}</a-col>
+              <a-row class="contRow">
+                <a-col :span="12">{{sub.loginname}}-{{sub.logincode}}</a-col>
                 <a-col :span="12">{{getLoginStatusEnumItemName(sub.loginstatus)}}</a-col>
               </a-row>
             </template>
-            <BtnList :btnList="forDataBtn" />
+            <BtnList :btnList="sub.btnList"
+                     :selectedData="sub"
+                     @onClick="moreOptenAction" />
           </a-collapse-panel>
         </a-collapse>
       </a-collapse-panel>
     </a-collapse>
-    <Add />
+    <Add @refresh="handleBtnAction"
+         :tableList="tableList" />
+    <Modify :tableList="tableList"
+            @refresh="handleBtnAction"
+            :selectedData="moreModelData" />
+    <Cancel @refresh="handleBtnAction"
+            :selectedData="moreModelData" />
+    <Locked @refresh="handleBtnAction"
+            :selectedData="moreModelData" />
+    <Unlocked @refresh="handleBtnAction"
+              :selectedData="moreModelData" />
+    <Reset @refresh="handleBtnAction"
+           :selectedData="moreModelData" />
+    <Detail :selectedData="moreModelData" />
+    <AddPermission />
+    <Permission />
   </div>
 </template>
 
 <script lang="ts">
 import { defineComponent, initData, getBtnList, contextMenu, BtnList } from '@/common/export/table';
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
-import { ref } from 'vue';
-import { getAccountStatus } from '../setup';
+import { getLoginStatusEnumItemName } from '@/common/constants/enumsName';
+import { getAccountStatus, handleModalData, handleTableList } from '../setup';
 import { queryTableList } from './setup';
 import { getUserName } from '@/services/bus/user';
 import Add from '../../compoments/add-managers/index.vue';
+import Modify from '../../compoments/modify-managers/index.vue';
+import Detail from '../../compoments/detail-managers/index.vue';
+import Cancel from '../../compoments/cancel-managers/index.vue';
+import Locked from '../../compoments/locked-managers/index.vue';
+import Unlocked from '../../compoments/unlocked-managers/index.vue';
+import Reset from '../../compoments/reset-managers/index.vue';
+import AddPermission from '../../compoments/add-managers-permission/index.vue';
+import Permission from '../../compoments/managers-permission/index.vue';
+import { ErmcpLoginUser, ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
+import { openModal } from '@/common/setup/modal';
 
 export default defineComponent({
     name: 'account_info_manager',
@@ -73,12 +105,32 @@ export default defineComponent({
         BtnList,
         filterCustomTable,
         Add,
+        Modify,
+        Detail,
+        Cancel,
+        Locked,
+        Unlocked,
+        Reset,
+        AddPermission,
+        Permission,
     },
     setup() {
         const { loading, tableList, queryTable } = queryTableList();
-        const { commonBtn, forDataBtn } = getBtnList('account_info_manager', true);
+        const { commonBtn, forDataBtn } = getBtnList('account_info_manager', true, ['新增']);
+        // 新增弹窗
+        const { selectedData: addModelData, openAction } = handleModalData<ErmcpLoginUserEx>();
+        // 修改 重置密码、详情等弹窗
+        const { selectedData: moreModelData, openAction: moreOptenAction } = handleModalData<ErmcpLoginUser>();
+        // 处理根据状态显示对应按钮
+        function handleBtnAction() {
+            handleTableList(queryTable, tableList, forDataBtn.value);
+        }
+        // 新增角色
+        const { openAction: openAddPermission } = openModal('account_info_manager_btn_permission_add');
+        // 权限设置列表
+        const { openAction: openPermission } = openModal('account_info_manager_btn_permission');
         initData(() => {
-            queryTable();
+            handleBtnAction();
         });
 
         // 查询
@@ -92,6 +144,14 @@ export default defineComponent({
             tableList,
             getAccountStatus,
             getUserName,
+            getLoginStatusEnumItemName,
+            addModelData,
+            openAction,
+            moreModelData,
+            moreOptenAction,
+            handleBtnAction,
+            openAddPermission,
+            openPermission,
         };
     },
 });
@@ -99,7 +159,7 @@ export default defineComponent({
 
 <style lang="less">
 .account_info_manager {
-  .tltLeft {
+    .tltLeft {
         padding-left: 12px;
     }
     .btn-list {

+ 1 - 1
src/views/information/account_info/list/account_info_manager/setup.ts

@@ -9,7 +9,7 @@ export function queryTableList() {
     // 表格数据
     const tableList = ref<ErmcpLoginUserEx[]>([]);
     function queryTable() {
-        queryResultLoadingAndInfo(QueryAccMgrLoginUser, loading, 3)
+        return queryResultLoadingAndInfo(QueryAccMgrLoginUser, loading, 3)
             .then(res => tableList.value = res)
     }
     return { loading, tableList, queryTable }

+ 17 - 3
src/views/information/account_info/list/account_info_trade/index.vue

@@ -31,7 +31,10 @@
       <a-collapse-panel>
         <template #header>
           <a-row class="headRow">
-            <a-col :span="12">{{item.rolename}}({{item.userlist.length}})</a-col>
+            <a-col :span="12">
+              {{item.rolename}}({{item.userlist.length}})
+              <a-button @click.stop="modifySelfClick(item)">修改</a-button>
+            </a-col>
             <a-col :span="12">
               <BtnList :selectedData="item"
                        :btnList="commonBtn"
@@ -46,7 +49,7 @@
           <a-collapse-panel :show-arrow="false">
             <template #header>
               <a-row class="contRow">
-                <a-col :span="12">{{sub.rolename}}</a-col>
+                <a-col :span="12">{{sub.loginname}}-{{sub.logincode}}</a-col>
                 <a-col :span="12">{{getRoleTypeName(sub.rolestatus)}}</a-col>
               </a-row>
             </template>
@@ -83,7 +86,8 @@
     <Detail :selectedData="moreModelData"
             :accountList="accountList"
             :tableList="tableList" />
-
+    <ModifySelf @refresh="handleBtnAction"
+                :selectedData="addModelData" />
   </div>
 </template>
 
@@ -100,11 +104,13 @@ import Unlocked from '../../compoments/unlocked-trader/index.vue';
 import Cancel from '../../compoments/cancel-trader/index.vue';
 import Reset from '../../compoments/reset-trader/index.vue';
 import Detail from '../../compoments/detail-trader/index.vue';
+import ModifySelf from '../../compoments/modify-traders-self/index.vue';
 import { handleModalData, handleTableList } from '../setup';
 import { ErmcpLoginUser, ErmcpLoginUserEx, ErmcpTaAccount, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
 import { ref } from 'vue';
 import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { QueryAccMgrTaaccount } from '@/services/go/ermcp/account';
+import { openModal } from '@/common/setup/modal';
 
 export default defineComponent({
     name: 'account_info_trade',
@@ -119,6 +125,7 @@ export default defineComponent({
         Cancel,
         Reset,
         Detail,
+        ModifySelf,
     },
     setup() {
         const { loading, tableList, queryTable } = queryTableList();
@@ -131,6 +138,12 @@ export default defineComponent({
         function handleBtnAction() {
             handleTableList(queryTable, tableList, forDataBtn.value);
         }
+        // 修改交易用户
+        const { openAction: openModifySelf } = openModal('account_info_trade_btn_modify_self');
+        function modifySelfClick(value: ErmcpLoginUserEx) {
+            Object.assign(addModelData, value);
+            openModifySelf();
+        }
         // 授权期货账户
         const accountList = ref<ErmcpTaAccount[]>([]);
 
@@ -163,6 +176,7 @@ export default defineComponent({
             moreOptenAction,
             handleBtnAction,
             accountList,
+            modifySelfClick,
         };
     },
 });

+ 2 - 2
src/views/manage/inventory-review/components/checkoutAudit/index.vue

@@ -86,14 +86,14 @@
             </a-form-item>
           </a-col>
           <a-col :span="12">
-            <a-form-item label="库仓库">
+            <a-form-item label="库仓库">
               <span class="white">{{ formatValue(selectedRow.warehousename) }}</span>
             </a-form-item>
           </a-col>
         </a-row>
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="库数量">
+            <a-form-item label="库数量">
               <span class="white">{{ formatValue(selectedRow.qty) + getGoodsUnitEnumItemName(selectedRow.unitid) }}</span>
             </a-form-item>
           </a-col>

+ 2 - 2
src/views/manage/inventory-review/components/checkoutCancel/index.vue

@@ -86,14 +86,14 @@
             </a-form-item>
           </a-col>
           <a-col :span="12">
-            <a-form-item label="库仓库">
+            <a-form-item label="库仓库">
               <span class="white">{{ formatValue(selectedRow.warehousename) }}</span>
             </a-form-item>
           </a-col>
         </a-row>
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="库数量">
+            <a-form-item label="库数量">
               <span class="white">{{ formatValue(selectedRow.qty) + getGoodsUnitEnumItemName(selectedRow.unitid) }}</span>
             </a-form-item>
           </a-col>

+ 2 - 2
src/views/manage/inventory-review/components/checkoutDetail/index.vue

@@ -75,14 +75,14 @@
             </a-form-item>
           </a-col>
           <a-col :span="12">
-            <a-form-item label="库仓库">
+            <a-form-item label="库仓库">
               <span class="white">{{ formatValue(selectedRow.warehousename) }}</span>
             </a-form-item>
           </a-col>
         </a-row>
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="库数量">
+            <a-form-item label="库数量">
               <span class="white">{{ formatValue(selectedRow.qty) + getGoodsUnitEnumItemName(selectedRow.unitid) }}</span>
             </a-form-item>
           </a-col>