Bladeren bron

Merge remote-tracking branch 'origin/master'

yu.jie 4 jaren geleden
bovenliggende
commit
a35136f2be

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

@@ -29,6 +29,7 @@ export interface ButtonType {
     account_info_business_btn_reset: string; // 业务账户 重置密码
     account_info_business_btn_locked: string; // 业务账户 锁定
     account_info_business_btn_cancel: string; // 业务账户 注销
+    account_info_business_btn_unlocked: string; // 业务账户 解锁
 
     account_info_trade_btn_add: string; // 交易账户 新增
     account_info_trade_btn_modify: string; // 交易账户 修改

+ 0 - 0
src/common/methods/form/index.ts → src/common/setup/form/index.ts


+ 0 - 0
src/common/methods/form/validateAction.ts → src/common/setup/form/validateAction.ts


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

@@ -104,7 +104,7 @@
                               suffix="元"
                               placeholder="请输入收票金额" />
               <div class="tip">
-                <div>应收票额:{{ formState.InvoiceAmount + selectedRow.currencyname }}</div>
+                <div>应收票额:{{ selectedRow.invoiceamount }} {{ selectedRow.currencyname }}</div>
                 <div><a class="blue fr">全部登记</a></div>
               </div>
             </a-form-item>
@@ -152,6 +152,7 @@ export default defineComponent({
         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;

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

@@ -89,7 +89,7 @@ import { ErmcpLoginUserEx, ErmcpTaAccount } from '@/services/go/ermcp/account/in
 import { queryTableList } from '../../list/account_info_futures/setup';
 import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { handleBusinessForm } from '../setup';
-import { validateAction } from '@/common/methods/form';
+import { validateAction } from '@/common/setup/form';
 import { BusinessFormState } from '../interface';
 
 export default defineComponent({

+ 113 - 58
src/views/information/account_info/compoments/cancel-business/index.vue

@@ -11,78 +11,133 @@
       <a-button key="submit"
                 type="primary"
                 :loading="loading"
-                @click="submit">注销
+                @click="cancel">取消
       </a-button>
       <a-button key="submit"
                 type="primary"
                 :loading="loading"
-                @click="cancel">关闭
+                @click="submit">注销
       </a-button>
     </template>
-
+    <a-form class="inlineForm"
+            :model="formState">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="登录账号"
+                       name="">
+            <span class="white">{{formState.accountname}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="账户名称"
+                       name="">
+            <span class="white">{{formState.logincode}}</span>
+          </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-form-item label="账户角色"
+                       name="userinfotype">
+            <a-checkbox-group class="commonCheckboxGroup"
+                              v-model:value="formState.roleids">
+              <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>
+              </a-row>
+            </a-checkbox-group>
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
   </a-modal>
 </template>
 
 <script lang="ts">
-import {closeModal} from '@/common/setup/modal/index';
-import {initData} from '@/common/methods/index';
-import {defineComponent, ref, reactive, toRaw, UnwrapRef, PropType} from 'vue';
-import {AllEnums} from '@/services/go/commonService/interface';
-import {RuleObject, ValidateErrorEntity} from 'ant-design-vue/es/form/interface';
-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 { closeModal } from '@/common/setup/modal/index';
+import { defineComponent, ref, PropType, watchEffect } from 'vue';
+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 { mergeTwoObj } from '@/utils/objHandle';
 
 export default defineComponent({
-  name: 'add-custom',
-  components: {},
-  props: {
-    selectedData: {
-      default: {},
-      type: Object as PropType<ErmcpLoginUser>,
-    },
-  },
-  setup(props, context) {
-    // 控制关闭弹窗
-    const {visible, cancel} = closeModal('account_info_business_btn_cancel');
-    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');
-          });
+    name: 'account_info_business_btn_cancel',
+    components: {},
+    props: {
+        selectedData: {
+            default: {},
+            type: Object as PropType<ErmcpLoginUser>,
         },
-        onCancel() {
-          console.log('Cancel');
-        },
-      });
-    }
+    },
+    setup(props, context) {
+        // 控制关闭弹窗
+        const { visible, cancel } = closeModal('account_info_business_btn_cancel');
+        const loading = ref<boolean>(false);
+        const { formState } = handleBusinessForm();
+        watchEffect(() => {
+            if (visible.value) {
+                mergeTwoObj(formState, props.selectedData);
+                // roletype	:string;//角色类型(逗号隔开,如22,23), 22:业务员 23:跟单员 24:交易员
+                formState.roleids = props.selectedData.roletype.split(',').map((e) => +e);
+            }
+        });
+        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 {
-      // formState,
-      // rules,
-      // formRef,
-      // cardTypeList,
-      // isPersonal,
-      visible,
-      cancel,
-      submit,
-      // loading,
-    };
-  },
+        return {
+            formState,
+            // rules,
+            // formRef,
+            // cardTypeList,
+            // isPersonal,
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
 });
 </script>
 

+ 70 - 19
src/views/information/account_info/compoments/locked-business/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 修改业务账户 -->
+  <!-- 锁定业务账户 -->
   <a-modal class="add-custom"
            title="锁定业务账户"
            v-model:visible="visible"
@@ -13,19 +13,68 @@
                 :loading="loading"
                 @click="submit">锁定</a-button>
     </template>
-
+    <a-form class="inlineForm"
+            :model="formState">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="登录账号"
+                       name="">
+            <span class="white">{{formState.accountname}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="账户名称"
+                       name="">
+            <span class="white">{{formState.logincode}}</span>
+          </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-form-item label="账户角色"
+                       name="userinfotype">
+            <a-checkbox-group class="commonCheckboxGroup"
+                              v-model:value="formState.roleids">
+              <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>
+              </a-row>
+            </a-checkbox-group>
+          </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, reactive, toRaw, UnwrapRef, PropType} from 'vue';
-import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
-import {loginAccountOperate} from "@/services/proto/accountinfo";
-import {LoginaccountOperateReq} from "@/services/proto/accountinfo/interface";
-import {ErmcpLoginUser} from "@/services/go/ermcp/account/interface";
-import { Modal} from 'ant-design-vue';
-
+import { defineComponent, ref, PropType, watchEffect } from 'vue';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { loginAccountOperate } from '@/services/proto/accountinfo';
+import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
+import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
+import { Modal } from 'ant-design-vue';
+import { mergeTwoObj } from '@/utils/objHandle';
+import { handleBusinessForm } from '../setup';
 
 export default defineComponent({
     name: 'add-custom',
@@ -40,8 +89,15 @@ export default defineComponent({
         // 控制关闭弹窗
         const { visible, cancel } = closeModal('account_info_business_btn_locked');
         const loading = ref<boolean>(false);
+        const { formState } = handleBusinessForm();
+        watchEffect(() => {
+            if (visible.value) {
+                mergeTwoObj(formState, props.selectedData);
+                // roletype	:string;//角色类型(逗号隔开,如22,23), 22:业务员 23:跟单员 24:交易员
+                formState.roleids = props.selectedData.roletype.split(',').map((e) => +e);
+            }
+        });
         function submit() {
-
             Modal.confirm({
                 title: '是否确认锁定该账户',
                 okText: '确认锁定',
@@ -50,9 +106,9 @@ export default defineComponent({
                     let reqParam: LoginaccountOperateReq = {
                         userid: props.selectedData.userid,
                         loginid: props.selectedData.loginid,
-                        operatetype: 5,  // 5: 锁定 6:解锁
+                        operatetype: 5, // 5: 锁定 6:解锁
                         logintaaccounts: [],
-                    }
+                    };
                     requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['账户锁定成功', '账户锁定失败:']).then(() => {
                         cancel();
                         context.emit('refresh');
@@ -64,16 +120,11 @@ export default defineComponent({
             });
         }
         return {
-            // formState,
-            // rules,
-            // formRef,
-            // cardTypeList,
-            // isPersonal,
+            formState,
             visible,
             cancel,
             submit,
-            // submit,
-            // loading,
+            loading,
         };
     },
 });

+ 137 - 0
src/views/information/account_info/compoments/unlocked-business/index.vue

@@ -0,0 +1,137 @@
+<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"
+            :model="formState">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="登录账号"
+                       name="">
+            <span class="white">{{formState.accountname}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="账户名称"
+                       name="">
+            <span class="white">{{formState.logincode}}</span>
+          </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-form-item label="账户角色"
+                       name="userinfotype">
+            <a-checkbox-group class="commonCheckboxGroup"
+                              v-model:value="formState.roleids">
+              <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>
+              </a-row>
+            </a-checkbox-group>
+          </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 { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { loginAccountOperate } from '@/services/proto/accountinfo';
+import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
+import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
+import { Modal } from 'ant-design-vue';
+import { mergeTwoObj } from '@/utils/objHandle';
+import { handleBusinessForm } from '../setup';
+
+export default defineComponent({
+    name: 'account_info_business_btn_unlocked',
+    components: {},
+    props: {
+        selectedData: {
+            default: {},
+            type: Object as PropType<ErmcpLoginUser>,
+        },
+    },
+    setup(props, context) {
+        // 控制关闭弹窗
+        const { visible, cancel } = closeModal('account_info_business_btn_unlocked');
+        const loading = ref<boolean>(false);
+        const { formState } = handleBusinessForm();
+        watchEffect(() => {
+            if (visible.value) {
+                mergeTwoObj(formState, props.selectedData);
+                // roletype	:string;//角色类型(逗号隔开,如22,23), 22:业务员 23:跟单员 24:交易员
+                formState.roleids = props.selectedData.roletype.split(',').map((e) => +e);
+            }
+        });
+        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 {
+            formState,
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.add-custom {
+}
+</style
+>;

+ 15 - 8
src/views/information/account_info/list/account_info_business/index.vue

@@ -57,15 +57,18 @@
         </a-collapse>
       </a-collapse-panel>
     </a-collapse>
-    <Add @refresh="queryTable"
+    <Add @refresh="handleTableList"
          :roleid="addModelData.roleid" />
     <Modify :selectedData="moreModelData"
-            @refresh="queryTable" />
+            @refresh="handleTableList" />
     <Reset :selectedData="moreModelData"
-           @refresh="queryTable" />
+           @refresh="handleTableList" />
     <Locked :selectedData="moreModelData"
-            @refresh="queryTable" />
-    <Cancel />
+            @refresh="handleTableList" />
+    <Unlocked :selectedData="moreModelData"
+              @refresh="handleTableList" />
+    <Cancel :selectedData="moreModelData"
+            @refresh="handleTableList" />
     <Detail :selectedData="moreModelData" />
   </div>
 </template>
@@ -81,6 +84,7 @@ import Reset from '../../compoments/reset-business/index.vue';
 import Locked from '../../compoments/locked-business/index.vue';
 import Cancel from '../../compoments/cancel-business/index.vue';
 import Detail from '../../compoments/business-detail/index.vue';
+import Unlocked from '../../compoments/unlocked-business/index.vue';
 import { ErmcpLoginUser, ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
 import { getUserName } from '@/services/bus/user';
 import { handleModalData } from '../setup';
@@ -97,6 +101,7 @@ export default defineComponent({
         Locked,
         Cancel,
         Detail,
+        Unlocked,
     },
     setup() {
         const { loading, tableList, queryTable } = queryTableList();
@@ -105,8 +110,7 @@ export default defineComponent({
         const { selectedData: addModelData, openAction } = handleModalData<ErmcpLoginUserEx>();
         // 修改 重置密码、详情等弹窗
         const { selectedData: moreModelData, openAction: moreOptenAction } = handleModalData<ErmcpLoginUser>();
-
-        initData(() => {
+        function handleTableList() {
             queryTable().then(() => {
                 tableList.value.forEach((el) => {
                     // 过滤无效
@@ -126,6 +130,9 @@ export default defineComponent({
                     Object.assign(el, { userlist: arr });
                 });
             });
+        }
+        initData(() => {
+            handleTableList();
         });
         // 查询
         function search(value: any) {}
@@ -136,7 +143,7 @@ export default defineComponent({
             search,
             tableList,
             getLoginStatusEnumItemName,
-            queryTable,
+            handleTableList,
             moreModelData,
             getUserName,
             openAction,

+ 3 - 0
src/views/information/spot-contract/components/add/index.vue

@@ -544,5 +544,8 @@ export default defineComponent({
 
 <style lang="less">
 .add-spot-contract {
+  .ant-upload-list-item-name{
+    padding: 0 20PX;
+  }
 }
 </style>;