|
|
@@ -3,8 +3,6 @@ import { getGoodsUnitEnumItemName } from "@/common/constants/enumsName";
|
|
|
import { commonResultInfo, getRequestResultInfo } from "@/common/methods/request";
|
|
|
import { validateCommon } from "@/common/setup/validate";
|
|
|
import APP from '@/services';
|
|
|
-import { QueryAccMgrLoginUser } from "@/services/go/ermcp/account";
|
|
|
-import { ErmcpLoginUser } from "@/services/go/ermcp/account/interface";
|
|
|
import { QueryCustomInfo } from "@/services/go/ermcp/customInfo";
|
|
|
import { QueryCustomInfoType } from "@/services/go/ermcp/customInfo/interface";
|
|
|
import { QueryDeliveryGoods } from "@/services/go/ermcp/goodsInfo";
|
|
|
@@ -20,7 +18,6 @@ import { RuleObject } from "ant-design-vue/lib/form/interface";
|
|
|
import Long from 'long';
|
|
|
import moment, { Moment } from "moment";
|
|
|
import { reactive, ref, Ref, UnwrapRef } from "vue";
|
|
|
-import { Value } from "./check/interface";
|
|
|
import { FormState } from './interface';
|
|
|
|
|
|
|
|
|
@@ -66,72 +63,6 @@ export function orderContractOperateControl(reqs: SpotContractOperateReq, loadin
|
|
|
return commonResultInfo(result, sign, loading)
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * 处理 /账号列表: 交易用户 业务员 跟单员
|
|
|
- * @returns
|
|
|
- */
|
|
|
-export function handleAccountManager() {
|
|
|
- // 交易用户
|
|
|
- const traderList = ref<Value[]>([])
|
|
|
- function getRoleList() {
|
|
|
- QueryAccMgrLoginUser(2).then(res => {
|
|
|
- const set = new Set<number>([])
|
|
|
- traderList.value.length = 0;
|
|
|
- res.forEach(e => {
|
|
|
- const { roleid, rolename, accountstatus } = e;
|
|
|
- if (accountstatus === 4) { // 账户的状态 - 4 正常
|
|
|
- if (!set.has(roleid)) { // 去重
|
|
|
- set.add(roleid)
|
|
|
- traderList.value.push({ id: roleid, name: rolename })
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- }).catch(err => message.error(err))
|
|
|
- }
|
|
|
- // 处理 跟单员 / 业务员 列表
|
|
|
- function handleList(el: ErmcpLoginUser, type: string, set: Set<number>): Value | null {
|
|
|
- const { loginstatus, userid, accountname, logincode, roletype } = el;
|
|
|
- let result = null
|
|
|
- if (loginstatus === 1) {// 登录账户状态 - 1:正常
|
|
|
- if (roletype.includes(type)) { // 过滤角色类型
|
|
|
- if (!set.has(userid)) { // 去重
|
|
|
- set.add(userid)
|
|
|
- result = { id: userid, name: `${accountname}-${logincode}` }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return result
|
|
|
- }
|
|
|
- // 业务员
|
|
|
- const businesserList = ref<Value[]>([])
|
|
|
- // 跟单员
|
|
|
- const merchandiserList = ref<Value[]>([])
|
|
|
- function getBusinesserList() {
|
|
|
- QueryAccMgrLoginUser(1).then(res => {
|
|
|
- const bSet = new Set<number>([]);
|
|
|
- const mSet = new Set<number>([]);
|
|
|
- const list: ErmcpLoginUser[] = []
|
|
|
- res.forEach(e => {
|
|
|
- // eslint-disable-next-line prefer-spread
|
|
|
- list.push.apply(list, e.userlist)
|
|
|
- })
|
|
|
- list.forEach(el => {
|
|
|
- // 业务员
|
|
|
- const b = handleList(el, '22', bSet)
|
|
|
- if (b) {
|
|
|
- businesserList.value.push(b)
|
|
|
- }
|
|
|
- // 跟单员
|
|
|
- const m = handleList(el, '23', mSet)
|
|
|
- if (m) {
|
|
|
- merchandiserList.value.push(m)
|
|
|
- }
|
|
|
- })
|
|
|
- }).catch(err => message.error(err))
|
|
|
- }
|
|
|
- return { traderList, businesserList, merchandiserList, getRoleList, getBusinesserList }
|
|
|
-}
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* 新增和修改的表单数据
|