Przeglądaj źródła

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

huangbin 4 lat temu
rodzic
commit
aa0eb164b6

+ 2 - 1
src/assets/styles/mixin.less

@@ -772,7 +772,8 @@
     .ant-input {
         background: @m-grey21;
         border-color: @m-grey14;
-        padding: 0 8px;
+        padding: 4px 8px;
+        .rounded-corners(3px);
         .ant-calendar-range-picker-input {
             color: @m-white0;
             font-size: 14px;

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

@@ -32,6 +32,7 @@ export function QueryAccMgrTaaccount(): Promise<ErmcpTaAccountEx> {
 }
 
 /**
+ * 业务员 跟单员 接口querytype 传1 业务员roletype 22 跟单员roletype23 交易用户接口querytype 传2
  * 信息 - 账户管理 - (业务账户, 交易账户, 管理账户)
  * 查询账户管理登录账号(账户管理/登录账号) /Ermcp/QueryAccMgrLoginUser
  * @param querytype 查询类型 1-业务账户 2-交易账户 3-管理账户

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

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

+ 13 - 2
src/views/information/spot-contract/components/add/index.vue

@@ -242,6 +242,7 @@
                  v-if="formState.PriceType === 3">
             <a-form-item label="暂定价">
               <a-input class="dialogInput suffixGrey"
+                       style="width: 200px"
                        :suffix="payCurrencyUnit"
                        placeholder="请输入暂定价" />
             </a-form-item>
@@ -278,6 +279,7 @@
                 <a-range-picker v-model:value="priceDate"
                                 class="commonPicker"
                                 :disabled-date="disabledDate"
+                                style="width: 200px"
                                 :show-time="{hideDisabledOptions: true}"
                                 format="YYYY-MM-DD" />
               </a-form-item>
@@ -286,6 +288,7 @@
               <a-form-item label="交收期">
                 <a-range-picker v-model:value="deliveryDate"
                                 class="commonPicker"
+                                style="width: 200px"
                                 :disabled-date="disabledDate"
                                 :show-time="{hideDisabledOptions: true}"
                                 format="YYYY-MM-DD" />
@@ -401,7 +404,7 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, ref, toRaw } from 'vue';
+import {defineComponent, PropType, ref, toRaw} from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { initData } from '@/common/methods';
 import { handleFromState, handleContract, handlevalidate, handleDeliveryGoods, handleAmout, handlePrice, handleDate, addContractReq } from './setup';
@@ -411,11 +414,18 @@ import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
 import { ValidateErrorEntity } from 'ant-design-vue/lib/form/interface';
 import { FormState } from './interface';
 import { formatTime } from '@/common/methods/format';
+import {Ermcp3ContractRsp} from "@/services/go/ermcp/spot-contract/interface";
 
 export default defineComponent({
     name: 'add-spot-contract',
     components: {},
-    setup() {
+    props: {
+        selectedRow: {
+            type: Object as PropType<Ermcp3ContractRsp>,
+            default: {},
+        },
+    },
+    setup(props,context) {
         const { visible, cancel } = closeModal('spot_contract_btn_add');
         const { loading, sendReq } = addContractReq();
 
@@ -482,6 +492,7 @@ export default defineComponent({
 
                     sendReq(param, OperateType)
                         .then((res) => {
+                            context.emit('refresh');
                             cancel();
                         })
                         .catch((err) => {});

+ 1 - 1
src/views/information/spot-contract/components/add/setup.ts

@@ -88,7 +88,7 @@ export function addContractReq() {
             ContractMargin: form.ContractMargin as number, //         合同保证金
 
             Amount: [1, 3].includes(form.PriceType) ? Number(form.Price) * Number(form.Qty) : 0, //    金额
-            PriceMove: form.PriceMove as number, //  升贴水
+            PriceMove: Number(form.PriceMove as number), //  升贴水
 
             StartDate: form.StartDate, //                       点价开始时间
             EndDate: form.EndDate, //                           点价结束时间

+ 46 - 8
src/views/information/spot-contract/components/check/index.vue

@@ -10,7 +10,7 @@
      <template #footer>
        <a-button key="submit"
                 class="cancelBtn"
-                @click="cancel">审核拒绝</a-button>
+                @click="refuse">审核拒绝</a-button>
         <a-button key="submit"
                 type="primary"
                 :loading="loading"
@@ -226,6 +226,8 @@ import {
 } from "@/views/information/spot-contract/setup";
 import {Ermcp3ContractRsp} from "@/services/go/ermcp/spot-contract/interface";
 import {formatTime, formatValue} from "@/common/methods";
+import {changeOrderContract, OrderContractControl} from "@/views/information/spot-contract/components/setup";
+import {Modal} from "ant-design-vue";
 
 export default defineComponent({
     name: 'spot-contract-detail',
@@ -236,16 +238,51 @@ export default defineComponent({
             default: {},
         },
     },
-    setup() {
+    setup(props, context) {
         const { visible, cancel } = closeModal('spot_contract_btn_check');
-        const loading = ref<boolean>(false);
+        const  { loading, orderContractState } = changeOrderContract()
         const maskClosableFlag = ref<boolean>(false);
         function submit() {
-            loading.value = true;
-            setTimeout(() => {
-                loading.value = false;
-                cancel();
-            }, 2000);
+            Modal.confirm({
+                title: '是否确认审核通过',
+                okText: '确认审核通过',
+                cancelText: '取消',
+                onOk() {
+                    // 审核通过
+                    orderContractState(props.selectedRow.spotcontractid, 4)
+                        .then(res => {
+                            cancel()
+                            context.emit('refresh')
+                        })
+                        .catch(err => {
+
+                        })
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
+        }
+        function refuse(){
+            Modal.confirm({
+                title: '是否确认审核拒绝',
+                okText: '确认审核拒绝',
+                cancelText: '取消',
+                onOk() {
+                    // 审核拒绝
+                    OrderContractControl().orderContractState(props.selectedRow.spotcontractid, 4)
+                        .then(res => {
+                            cancel()
+                            context.emit('refresh')
+                        })
+                        .catch(err => {
+
+                        })
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
         }
         return {
             visible,
@@ -259,6 +296,7 @@ export default defineComponent({
             getContractStatusName,
             formatTime,
             getPriceTypeName,
+            refuse,
         };
     },
 });

+ 3 - 4
src/views/information/spot-contract/components/delete/index.vue

@@ -188,7 +188,7 @@ import {
     getPriceTypeName
 } from "@/views/information/spot-contract/setup";
 import {message, Modal} from "ant-design-vue";
-import {OrderContractControl} from "@/views/information/spot-contract/components/setup";
+import {changeOrderContract, OrderContractControl} from "@/views/information/spot-contract/components/setup";
 
 export default defineComponent({
     name: 'delete-spot-contract',
@@ -201,17 +201,16 @@ export default defineComponent({
     },
     setup(props, context) {
         const { visible, cancel } = closeModal('spot_contract_btn_delete');
-        const {loading, orderContractState} = OrderContractControl()
+        const  { loading, orderContractState } = changeOrderContract()
         const maskClosableFlag = ref<boolean>(false);
         function submit() {
-            loading.value = true;
             Modal.confirm({
                 title: '是否确认删除',
                 okText: '确认删除',
                 cancelText: '取消',
                 onOk() {
                     // 删除客户资料
-                    orderContractState(props.selectedRow.spotcontractid, 1)
+                    orderContractState(props.selectedRow.spotcontractid, 3)
                         .then(res => {
                             // 通知上层  刷新数据
                             context.emit('refresh');

+ 8 - 4
src/views/information/spot-contract/components/setup.ts

@@ -24,14 +24,18 @@ export function changeOrderContract() {
      */
     function orderContractState(id: string, type: number, info?: GldSpotContractInfo): Promise<string> {
         loading.value = true
-        const reqs: GldErmcpSpotContractOperateReq = {
-            SpotContractID: Number(id),
+        const reqs: GldErmcpSpotContractOperateReq = info === undefined ? {
+            SpotContractID: Long.fromString(id),
+            OperateType: type,
+            Remark: '',
+        } : {
+            SpotContractID: Long.fromString(id),
             OperateType: type,
             Remark: '',
             Info: info,
         }
-        const sign = getRequestResultInfo(GldContractStateSign, type)  // 接口请求后的返回提示 这里统一进行管理
 
+        const sign = getRequestResultInfo(GldContractStateSign, type)  // 接口请求后的返回提示 这里统一进行管理
         return orderContract(reqs)
             .then(res => {
                 message.success(sign[0])
@@ -69,7 +73,7 @@ export function OrderContractControl() {
                 return Promise.resolve(sign[0])
             })
             .catch(err => {
-                message.error(sign[1])
+                message.error(sign[1] + err)
                 return Promise.reject(sign[1] + err)
             }).finally(() => {
                 loading.value = false

+ 1 - 1
src/views/information/spot-contract/list/unsubmitted/index.vue

@@ -38,7 +38,7 @@
             </a-table>
         </contextMenu>
         <!-- 新增现货合同 -->
-        <AddSpotContract/>
+        <AddSpotContract  @refresh="queryTable"/>
         <!-- 现货合同: 详情 -->
         <SpotContractDeatil :selectedRow="selectedRow"
                             @refresh="queryTable"/>

+ 4 - 1
src/views/information/spot-contract/setup.ts

@@ -2,13 +2,16 @@
  * 现货合同状态返回
  * @param state
  * //合同状态 - number;
- //:未提交 1:待审核 2:执行中 3:正常完结 4:审核拒绝 5:异常完结 6:已撤回
+ //0:未提交 1:待审核 2:执行中 3:正常完结 4:审核拒绝 5:异常完结 6:已撤回
  */
 import {ResultInfo} from "@/common/methods/request/interface";
 
 export function getContractStatusName(state: number): string {
     let result = "--";
     switch (state) {
+        case 0:
+            result = "未提交";
+            break;
         case 1:
             result = "待审核";
             break