Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

xkwg 4 gadi atpakaļ
vecāks
revīzija
6d1a36342e
49 mainītis faili ar 793 papildinājumiem un 490 dzēšanām
  1. 8 6
      src/assets/styles/mixin.less
  2. 12 1
      src/services/go/ermcp/purchase/interface.ts
  3. 6 5
      src/services/proto/contract/interface.ts
  4. 4 4
      src/services/proto/hedgeplan/interface.ts
  5. 1 0
      src/views/business/plan/components/add/index.vue
  6. 92 95
      src/views/business/plan/components/audit/index.vue
  7. 1 0
      src/views/business/plan/components/delete/index.vue
  8. 1 0
      src/views/business/plan/components/detail/index.vue
  9. 1 0
      src/views/business/plan/components/modify/index.vue
  10. 1 0
      src/views/business/plan/components/recommit/index.vue
  11. 1 0
      src/views/business/purchase/components/detail/index.vue
  12. 14 28
      src/views/business/purchase/components/funds/index.vue
  13. 21 0
      src/views/business/purchase/components/funds/setup.ts
  14. 13 27
      src/views/business/purchase/components/invoice/index.vue
  15. 19 0
      src/views/business/purchase/components/invoice/setup.ts
  16. 36 37
      src/views/business/purchase/components/settlement/index.vue
  17. 34 0
      src/views/business/purchase/components/settlement/setup.ts
  18. 166 187
      src/views/business/purchase/components/someprice/index.vue
  19. 21 0
      src/views/business/purchase/components/someprice/setup.ts
  20. 1 0
      src/views/business/purchase/components/storage/index.vue
  21. 6 2
      src/views/business/purchase/list/pending/index.vue
  22. 1 0
      src/views/business/sell/components/detail/index.vue
  23. 1 0
      src/views/business/sell/components/funds/index.vue
  24. 1 0
      src/views/business/sell/components/invoice/index.vue
  25. 1 0
      src/views/business/sell/components/settlement/index.vue
  26. 1 0
      src/views/business/sell/components/someprice/index.vue
  27. 1 0
      src/views/business/sell/components/storage/index.vue
  28. 1 0
      src/views/information/account_info/compoments/cancel/index.vue
  29. 1 0
      src/views/information/account_info/compoments/check/index.vue
  30. 1 0
      src/views/information/account_info/compoments/delete/index.vue
  31. 1 0
      src/views/information/account_info/compoments/recover/index.vue
  32. 1 0
      src/views/information/custom/compoments/cancel/index.vue
  33. 1 0
      src/views/information/custom/compoments/check/index.vue
  34. 1 0
      src/views/information/custom/compoments/delete/index.vue
  35. 1 0
      src/views/information/custom/compoments/recover/index.vue
  36. 1 0
      src/views/information/goods/components/recover/index.vue
  37. 3 3
      src/views/information/spot-contract/components/finish/index.vue
  38. 1 0
      src/views/information/spot-contract/components/modify/index.vue
  39. 1 0
      src/views/information/spot-contract/components/resubmit/index.vue
  40. 1 1
      src/views/information/spot-contract/list/finished/index.vue
  41. 1 0
      src/views/information/spot-contract/list/performance/index.vue
  42. 56 75
      src/views/information/spot-contract/list/unsubmitted/index.vue
  43. 1 1
      src/views/manage/business-review/components/filterTable/index.vue
  44. 1 1
      src/views/manage/finance-review/components/filterTable/index.vue
  45. 1 1
      src/views/manage/inventory-review/components/filterTable/index.vue
  46. 1 1
      src/views/setting/logout/index.vue
  47. 1 1
      src/views/setting/notice/index.vue
  48. 65 5
      swagger-to-ts/swagger.ts
  49. 186 9
      swagger-to-ts/swagger.txt

+ 8 - 6
src/assets/styles/mixin.less

@@ -555,12 +555,7 @@
       padding: 0 10px;
     }
   }
-  .paddingDialog {
-      .ant-modal-content {
-          .ant-modal-body {
-              padding: 24px;
-          }
-      }
+  .paddingDialog,.fieldsetDialog {
       .formFieldSet {
         legend {
             width: auto;
@@ -572,6 +567,13 @@
           }
       }
   }
+  .paddingDialog {
+    .ant-modal-content {
+        .ant-modal-body {
+            padding: 24px;
+        }
+    }
+  }
   // 上传
   .upload {
     display: inline-flex;

+ 12 - 1
src/services/go/ermcp/purchase/interface.ts

@@ -13,17 +13,21 @@ export interface SellBuyContractReq {
  * 查询合同返回
  */
 export interface Ermcp3SellBuyContract {
+    accountid: string;//期货账户id
     accountname: string;//账户名称
     attachment: string;//附件
     audittime: string;//审核时间
+    biztype: number;//业务类型 1-套保 2-套利
     brandname: string;//品牌名称
     contracctstatus: number;//合同状态- number;
     //:未提交 1:待审核 2:执行中 3:正常完结 4:审核拒绝 5:异常完结 6:已撤回
     contractmargin: number;//合同保证金
     contractno: string;//合同编号
-    contracttype: number;//合同类型 1-采购, -2-销售
+    contracttype: number;//合同类型 1-采购, -1-销售
     convertfactor: number;//标仓系数(品类)
     createtime: string;//创建时间
+    currencyid: number;//币种id
+    currencyname: string;//币种名称
     daikaiamount: number;//应收(开)票额
     deliveryenddate: string;//交割结束日
     deliverygoodscode: string;//现货品种代码
@@ -38,6 +42,8 @@ export interface Ermcp3SellBuyContract {
     invoiceamount: number;//已开票额
     loanamount: number;//贷款总额=已定价额+调整金额
     margin: number;//保证金
+    meruserid: number;//跟单员id
+    meruserlogincode: string;//跟单员登录代码
     nickname: string;//账户昵称
     payamount: number;//已收付额(收款或付款)
     preinvoiceamount: number;//预收(开)票额
@@ -55,11 +61,16 @@ export interface Ermcp3SellBuyContract {
     reckonotheramount: number;//其它费用
     reckonrealqty: number;//已确定量
     remark: string;//备注
+    saleuserid: number;//业务员id
+    saleuserlogincode: string;//业务员登录代码
     spotcontractid: string;//合同ID
     spotgoodsbrandid: number;//现货品牌ID(DGFactoryItem表的ID)
     spotgoodsdesc: string;//商品型号(商品规格)
     startdate: string;//点价开始日
     totalamount: number;//合计总额
+    tradeuserid: number;//交易员id
+    tradeuserlogincode: string;//交易员登录代码
+    tradeusername: string;//交易员名称
     unpayamount: number;//应收付款额(应支付或应收款)
     unpricedqty: number;//未定价量
     unsureqty: number;//未确定量

+ 6 - 5
src/services/proto/contract/interface.ts

@@ -19,7 +19,7 @@ export interface ErmcpContractOperateApplyRsp {
 export interface ErmcpContractOperateApplyInfo {
     OperateApplyType: number // uint32 操作申请类型-1:点价2:结算3:款项4:发票
     RelatedID: number // uint64 现货合同ID(602+Unix秒时间戳(10位)+xxxxxx)
-    DetailJson : Uint8Array // bytes 明细JSON
+    DetailJson: Uint8Array // bytes 明细JSON
     AttachUrl?: Uint8Array // bytes 附件
 }
 
@@ -52,27 +52,28 @@ export interface ContractOperateApplyInfo {
 
 /*********************************** 这里有一堆用于登记的请求结构 ************************************/
 // 点价登记
-export interface SomePriceReq{
+export interface SomePriceReq {
     PricedPrice: number;
     PricedQty: number;
 }
 
 // 交收登记
-export interface SettlementReq{
+export interface SettlementReq {
     ReckonRealQty?: number  // 交收量
     ReckonOtherAmount?: number // 其它费用
     AddMargin?: number // 追加保证金
     DecMargin?: number // 减少保证金
     ReckonAdjustAmount?: number // 调整金额
+    Remark?: string
 }
 
 // 款项登记
-export interface FundsReq{
+export interface FundsReq {
     PayAmount: number
     DeductAmount: number
 }
 
 // 发票登记
-export interface InvoiceReq{
+export interface InvoiceReq {
     InvoiceAmount: number
 }

+ 4 - 4
src/services/proto/hedgeplan/interface.ts

@@ -14,7 +14,7 @@ export interface ErmcpHedgePlanReq {
     ApplySrc?: number // int32 申请来源 - 1:管理端 2:终端
     ApplyId?: number // uint64 申请人
     Remark?: string // string 计划备注
-    OperateType: number // int32 操作类型-1:保存草稿2:提交申请
+    OperateType?: number // int32 操作类型-1:保存草稿2:提交申请
 
     WRStandardID?: number; // uint64 现货品类ID
     AccountID?: number; // uint64 期货账户ID(默认为0,也可不传)
@@ -27,7 +27,7 @@ export interface ErmcpHedgePlanReq {
 }
 
 // 套保计划响应 0 29 165
-export interface  ErmcpHedgePlanRsp {
+export interface ErmcpHedgePlanRsp {
     RetCode: number // int32 返回码
     RetDesc: string // string 描述信息
 }
@@ -45,7 +45,7 @@ export interface HedgePlanOperateReq {
 }
 
 // 套保计划操作响应 0 18 3
-export interface  HedgePlanOperateRsp {
+export interface HedgePlanOperateRsp {
     RetCode: number; // int32 返回码
     RetDesc: string; // string 描述信息
     HedgePlanID: number; // uint64 套保计划ID(601+Unix秒时间戳(10位)+xxxxxx)
@@ -55,7 +55,7 @@ export interface  HedgePlanOperateRsp {
 }
 
 // 套保计划信息 0 18 1
-export interface  HedgePlanInfo {
+export interface HedgePlanInfo {
     HedgePlanNo: string; // string 套保计划编号
     ContractType: number; // int32 计划类型-1:采购-1:销售
     AreaUserID: number; // uint32 机构ID

+ 1 - 0
src/views/business/plan/components/add/index.vue

@@ -3,6 +3,7 @@
   <a-modal class="commonModal"
            title="新增套保计划"
            v-model:visible="visible"
+           centered
            @cancel="cancel"
            width="890px">
     <template #footer>

+ 92 - 95
src/views/business/plan/components/audit/index.vue

@@ -1,8 +1,9 @@
 <template>
   <!-- 审核计划-->
-  <a-modal class="commonModal warehouse-disable"
+  <a-modal class="commonModal fieldsetDialog warehouse-disable"
            title="审核计划"
            v-model:visible="visible"
+           centered
            @cancel="cancel"
            width="890px">
     <template #footer>
@@ -13,89 +14,90 @@
                 type="primary"
                 :loading="loading"
                 @click="pass">审核通过</a-button>
-        <a-button key="submit"
-                  type="primary"
-                  :loading="loading"
-                  @click="refuse">审核拒绝</a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="refuse">审核拒绝</a-button>
     </template>
+     <a-form class="inlineForm"
+              :form="form"
+              @submit="handleSearch">
       <fieldset class="formFieldSet">
-          <legend>基本信息</legend>
-          <a-form class="inlineForm"
-                  :form="form"
-                  @submit="handleSearch">
-              <a-row :gutter="24">
-                  <a-col :span="12">
-                      <a-form-item label="计划类型">
-                          <span class="white">{{ getPlanContractType(selectedRow.contracttype) }}</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="计划名称">
-                          <span class="white">{{ formatValue(selectedRow.hedgeplanno) }}</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.deliverygoodsname) }}</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="标仓系数">
-                          <span class="white">{{ formatValue(selectedRow.convertfactor) }}</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.planqty) }}</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="备注">
-                          <span class="white">{{ formatValue(selectedRow.remark) }}</span>
-                      </a-form-item>
-                  </a-col>
-              </a-row>
-          </a-form>
-      </fieldset>
-      <fieldset class="formFieldSet">
-          <legend>其它信息</legend>
-          <a-row :gutter="24">
-              <a-col :span="12">
-                  <a-form-item label="交易用户">
-                      <span class="white">{{ formatValue(selectedRow.tradeusername) }}</span>
-                  </a-form-item>
-              </a-col>
-              <a-col :span="12">
-                  <a-form-item label="结算币种">
-                      <span class="white">{{ formatValue(selectedRow.currencyname) }}</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.remark) }}</span>
-                  </a-form-item>
-              </a-col>
-          </a-row>
-      </fieldset>
+        <legend>基本信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="计划类型">
+              <span class="white">{{ getPlanContractType(selectedRow.contracttype) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="计划名称">
+              <span class="white">{{ formatValue(selectedRow.hedgeplanno) }}</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.deliverygoodsname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="标仓系数">
+              <span class="white">{{ formatValue(selectedRow.convertfactor) }}</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.planqty) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="备注">
+              <span class="white">{{ formatValue(selectedRow.remark) }}</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="交易用户">
+            <span class="white">{{ formatValue(selectedRow.tradeusername) }}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="结算币种">
+            <span class="white">{{ formatValue(selectedRow.currencyname) }}</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.remark) }}</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </fieldset>
+    </a-form>
   </a-modal>
 </template>
 
 <script lang="ts">
-import {defineComponent, PropType, ref} from 'vue';
+import { defineComponent, PropType, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
-import {Modal} from "ant-design-vue";
-import {ErmcpHedgePlanReq} from "@/services/proto/hedgeplan/interface";
-import Long from "long";
-import {changeStatus} from "@/views/business/plan/components/setup";
-import {Ermcp3HedgePlan} from "@/services/go/ermcp/plan/interface";
-import {getPlanContractType} from "@/views/business/plan/setup";
-import {formatValue} from "@/common/methods";
+import { Modal } from 'ant-design-vue';
+import { ErmcpHedgePlanReq } from '@/services/proto/hedgeplan/interface';
+import Long from 'long';
+import { changeStatus } from '@/views/business/plan/components/setup';
+import { Ermcp3HedgePlan } from '@/services/go/ermcp/plan/interface';
+import { getPlanContractType } from '@/views/business/plan/setup';
+import { formatValue } from '@/common/methods';
 
 export default defineComponent({
     name: 'plan_audit_audit',
@@ -119,16 +121,14 @@ export default defineComponent({
                     const params: ErmcpHedgePlanReq = {
                         HedgePlanID: Long.fromString(props.selectedRow.hedgeplanid),
                         OperateType: 4,
-                        Remark: '通过'
-                    }
+                        Remark: '通过',
+                    };
                     changeStatus(params, 4, loading)
-                        .then(res => {
-                            cancel()
-                            context.emit('refresh')
-                        })
-                        .catch(err => {
-
+                        .then((res) => {
+                            cancel();
+                            context.emit('refresh');
                         })
+                        .catch((err) => {});
                 },
                 onCancel() {
                     console.log('Cancel');
@@ -136,7 +136,7 @@ export default defineComponent({
             });
         }
         // 审核拒绝
-        function refuse(){
+        function refuse() {
             Modal.confirm({
                 title: '是否确认审核拒绝',
                 okText: '审核拒绝',
@@ -145,15 +145,13 @@ export default defineComponent({
                     const params: ErmcpHedgePlanReq = {
                         HedgePlanID: Long.fromString(props.selectedRow.hedgeplanid),
                         OperateType: 5,
-                    }
+                    };
                     changeStatus(params, 5, loading)
-                        .then(res => {
-                            cancel()
-                            context.emit('refresh')
-                        })
-                        .catch(err => {
-
+                        .then((res) => {
+                            cancel();
+                            context.emit('refresh');
                         })
+                        .catch((err) => {});
                 },
                 onCancel() {
                     console.log('Cancel');
@@ -168,13 +166,12 @@ export default defineComponent({
             pass,
             getPlanContractType,
             formatValue,
-
         };
     },
 });
 </script>
 
 <style lang="less">
-.arehouse-disable {
+.warehouse-disable {
 }
 </style>

+ 1 - 0
src/views/business/plan/components/delete/index.vue

@@ -2,6 +2,7 @@
   <!-- 删除计划-->
   <a-modal class="plan_uncommitted_delete"
            title="删除计划"
+           centered
            v-model:visible="visible"
            @cancel="cancel"
            width="890px">

+ 1 - 0
src/views/business/plan/components/detail/index.vue

@@ -3,6 +3,7 @@
     <a-modal class="add-custom custom-detail"
              title="套保计划详情"
              v-model:visible="visible"
+             centered
              @cancel="cancel"
              width="890px">
         <template #footer>

+ 1 - 0
src/views/business/plan/components/modify/index.vue

@@ -3,6 +3,7 @@
   <a-modal class="commonModal modify-custom"
            title="修改计划"
            v-if="visible"
+           centered
            v-model:visible="visible"
            @cancel="cancel"
            width="890px">

+ 1 - 0
src/views/business/plan/components/recommit/index.vue

@@ -3,6 +3,7 @@
   <a-modal class="plan-recommit"
            title="重新提交"
            v-model:visible="visible"
+           centered
            @cancel="cancel"
            width="890px">
     <template #footer>

+ 1 - 0
src/views/business/purchase/components/detail/index.vue

@@ -3,6 +3,7 @@
   <a-modal class="commonModal paddingDialog purchase-detail"
            title="详情"
            v-model:visible="visible"
+           centered
            @cancel="cancel"
            width="890px">
     <template #footer>

+ 14 - 28
src/views/business/purchase/components/funds/index.vue

@@ -3,6 +3,7 @@
   <a-modal class="commonModal paddingDialog funds"
            :title="selectedRow.contracttype===1? '采购合同-款项登记': '销售合同-款项登记'"
            v-model:visible="visible"
+           centered
            @cancel="cancel"
            width="890px">
     <template #footer>
@@ -87,7 +88,7 @@
       <a-form class="inlineForm"
               ref="formRef"
               :model="formState"
-              :rules="formStateRules">
+              :rules="rules">
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="点价价格"
@@ -152,8 +153,9 @@ 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, InvoiceReq } from '@/services/proto/contract/interface';
+import { fundsReq, invoiceReq } from '@/views/business/purchase/components/setup';
+import { handleForm } from './setup';
 
 export default defineComponent({
     name: 'purchase_pending_funds',
@@ -164,41 +166,25 @@ export default defineComponent({
             default: {},
         },
     },
-    setup(props,context) {
+    setup(props, context) {
         const { visible, cancel } = closeModal('purchase_pending_funds');
         const loading = ref<boolean>(false);
-        const formRef = ref();
-        const formState = reactive({ PricedPrice: 0, PricedQty: 0 });
-        const numberIstrue = (rule: any, value: any) => {
-            if (!value) {
-                return Promise.reject(new Error('请输入正确的值'));
-            } else {
-                return Promise.resolve();
-            }
-        };
-        const formStateRules = {
-            PricedPrice: [{ required: true, validator: numberIstrue, trigger: 'blur', type: 'number' }],
-            PricedQty: [{ required: true, validator: numberIstrue, trigger: 'blur', type: 'number' }],
-        };
+        const { rules, formState, formRef } = handleForm();
         function submit() {
             const wrapEl = unref(formRef);
             wrapEl.validate().then(() => {
                 loading.value = true;
-                const params : FundsReq = {
+                const params: FundsReq = {
                     PayAmount: 98,
-                    DeductAmount: 90
-                }
+                    DeductAmount: 90,
+                };
                 // 发出发票登记
-                fundsReq(
-                    props.selectedRow.spotcontractid,
-                    params,
-                    loading)
+                fundsReq(props.selectedRow.spotcontractid, params, loading)
                     .then(() => {
                         cancel();
-                        context.emit('refresh')
+                        context.emit('refresh');
                     })
-                    .catch((err) => {
-                    });
+                    .catch((err) => {});
             });
         }
 
@@ -210,7 +196,7 @@ export default defineComponent({
             formRef,
             formState,
             formatValue,
-            formStateRules,
+            rules,
             getPriceTypeName,
         };
     },

+ 21 - 0
src/views/business/purchase/components/funds/setup.ts

@@ -0,0 +1,21 @@
+import { reactive, ref, UnwrapRef } from "vue";
+/**
+ * 表单
+ * @returns 
+ */
+export function handleForm() {
+    interface FormState {
+        PayAmount: number | null
+        DeductAmount: number | null
+    }
+    const formRef = ref();
+    const formState: UnwrapRef<FormState> = reactive({
+        PayAmount: null,
+        DeductAmount: null,
+    })
+    const rules = {
+        // PricedPrice: [{ required: true, message: '请输入点价价格', trigger: 'blur', type: 'number' }],
+        // PricedQty: [{ required: true, message: '请输入点价数量', trigger: 'blur', type: 'number' }],
+    }
+    return { rules, formState, formRef }
+}

+ 13 - 27
src/views/business/purchase/components/invoice/index.vue

@@ -3,6 +3,7 @@
   <a-modal class="commonModal paddingDialog invoice"
            :title="selectedRow.contracttype===1? '采购合同-发票登记': '销售合同-发票登记'"
            v-model:visible="visible"
+           centered
            @cancel="cancel"
            width="890px">
     <template #footer>
@@ -87,7 +88,7 @@
       <a-form class="inlineForm"
               ref="formRef"
               :model="formState"
-              :rules="formStateRules">
+              :rules="rules">
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="点价价格"
@@ -152,8 +153,9 @@ 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 {InvoiceReq, SettlementReq} from "@/services/proto/contract/interface";
-import {invoiceReq, settlementReq} from "@/views/business/purchase/components/setup";
+import { InvoiceReq, SettlementReq } from '@/services/proto/contract/interface';
+import { invoiceReq, settlementReq } from '@/views/business/purchase/components/setup';
+import { handleForm } from './setup';
 
 export default defineComponent({
     name: 'purchase_pending_invoice',
@@ -164,40 +166,24 @@ export default defineComponent({
             default: {},
         },
     },
-    setup(props,context) {
+    setup(props, context) {
         const { visible, cancel } = closeModal('purchase_pending_invoice');
         const loading = ref<boolean>(false);
-        const formRef = ref();
-        const formState = reactive({ PricedPrice: 0, PricedQty: 0 });
-        const numberIstrue = (rule: any, value: any) => {
-            if (!value) {
-                return Promise.reject(new Error('请输入正确的值'));
-            } else {
-                return Promise.resolve();
-            }
-        };
-        const formStateRules = {
-            PricedPrice: [{ required: true, validator: numberIstrue, trigger: 'blur', type: 'number' }],
-            PricedQty: [{ required: true, validator: numberIstrue, trigger: 'blur', type: 'number' }],
-        };
+        const { rules, formState, formRef } = handleForm();
         function submit() {
             const wrapEl = unref(formRef);
             wrapEl.validate().then(() => {
                 loading.value = true;
-                const params : InvoiceReq = {
+                const params: InvoiceReq = {
                     InvoiceAmount: 123,
-                }
+                };
                 // 发出发票登记
-                invoiceReq(
-                    props.selectedRow.spotcontractid,
-                    params,
-                    loading)
+                invoiceReq(props.selectedRow.spotcontractid, params, loading)
                     .then(() => {
                         cancel();
-                        context.emit('refresh')
+                        context.emit('refresh');
                     })
-                    .catch((err) => {
-                    });
+                    .catch((err) => {});
             });
         }
 
@@ -209,7 +195,7 @@ export default defineComponent({
             formRef,
             formState,
             formatValue,
-            formStateRules,
+            rules,
             getPriceTypeName,
         };
     },

+ 19 - 0
src/views/business/purchase/components/invoice/setup.ts

@@ -0,0 +1,19 @@
+import { reactive, ref, UnwrapRef } from "vue";
+/**
+ * 表单
+ * @returns 
+ */
+export function handleForm() {
+    interface FormState {
+        InvoiceAmount: number | null
+    }
+    const formRef = ref();
+    const formState: UnwrapRef<FormState> = reactive({
+        InvoiceAmount: null,
+    })
+    const rules = {
+        // PricedPrice: [{ required: true, message: '请输入点价价格', trigger: 'blur', type: 'number' }],
+        // PricedQty: [{ required: true, message: '请输入点价数量', trigger: 'blur', type: 'number' }],
+    }
+    return { rules, formState, formRef }
+}

+ 36 - 37
src/views/business/purchase/components/settlement/index.vue

@@ -3,6 +3,7 @@
   <a-modal class="commonModal paddingDialog settlement"
            :title="selectedRow.contracttype===1? '采购合同-交收登记': '销售合同-交收登记'"
            v-model:visible="visible"
+           centered
            @cancel="cancel"
            width="890px">
     <template #footer>
@@ -75,8 +76,23 @@
             </a-form-item>
           </a-col>
           <a-col :span="12">
-            <a-form-item label="已点均价">
-              <span class="white">{{ formatValue(selectedRow.pricedavg) }}</span>
+            <a-form-item label="调整金额">
+              <span class="white">{{ selectedRow.reckonadjustamount + selectedRow.currencyname }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="已交收量">
+              <span class="white">{{ selectedRow.reckonrealqty + selectedRow.enumdicname }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="保证金">
+              <span class="white">{{ 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-row>
@@ -87,7 +103,7 @@
       <a-form class="inlineForm"
               ref="formRef"
               :model="formState"
-              :rules="formStateRules">
+              :rules="rules">
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="点价价格"
@@ -144,16 +160,14 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, reactive, ref, unref } from 'vue';
+import { defineComponent, PropType, ref, unref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { formatValue } 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 {settlementReq} from "@/views/business/purchase/components/setup";
-import {SettlementReq} from "@/services/proto/contract/interface";
+import { settlementReq } from '@/views/business/purchase/components/setup';
+import { SettlementReq } from '@/services/proto/contract/interface';
+import { handleForm } from './setup';
 
 export default defineComponent({
     name: 'purchase_pending_settlement',
@@ -164,45 +178,30 @@ export default defineComponent({
             default: {},
         },
     },
-    setup(props,context) {
+    setup(props, context) {
         const { visible, cancel } = closeModal('purchase_pending_settlement');
         const loading = ref<boolean>(false);
-        const formRef = ref();
-        const formState = reactive({ PricedPrice: 0, PricedQty: 0 });
-        const numberIstrue = (rule: any, value: any) => {
-            if (!value) {
-                return Promise.reject(new Error('请输入正确的值'));
-            } else {
-                return Promise.resolve();
-            }
-        };
-        const formStateRules = {
-            PricedPrice: [{ required: true, validator: numberIstrue, trigger: 'blur', type: 'number' }],
-            PricedQty: [{ required: true, validator: numberIstrue, trigger: 'blur', type: 'number' }],
-        };
+
+        const { rules, formState, formRef, checkedObj } = handleForm();
+
         function submit() {
             const wrapEl = unref(formRef);
             wrapEl.validate().then(() => {
                 loading.value = true;
-
-                const params : SettlementReq = {
-                    ReckonRealQty: 10,  // 交收量
-                    ReckonOtherAmount: 11,// 其它费用
+                const params: SettlementReq = {
+                    ReckonRealQty: 10, // 交收量
+                    ReckonOtherAmount: 11, // 其它费用
                     AddMargin: 12, // 追加保证金
                     // DecMargin: number // 减少保证金
-                    ReckonAdjustAmount: 13 // 调整金额
-                }
+                    ReckonAdjustAmount: 13, // 调整金额
+                };
                 // 发出交收请求
-                settlementReq(
-                    props.selectedRow.spotcontractid,
-                    params,
-                    loading)
+                settlementReq(props.selectedRow.spotcontractid, params, loading)
                     .then(() => {
                         cancel();
-                        context.emit('refresh')
+                        context.emit('refresh');
                     })
-                    .catch((err) => {
-                    });
+                    .catch((err) => {});
             });
         }
 
@@ -214,7 +213,7 @@ export default defineComponent({
             formRef,
             formState,
             formatValue,
-            formStateRules,
+            rules,
             getPriceTypeName,
         };
     },

+ 34 - 0
src/views/business/purchase/components/settlement/setup.ts

@@ -0,0 +1,34 @@
+import { reactive, ref, UnwrapRef } from "vue";
+/**
+ * 表单
+ * @returns 
+ */
+export function handleForm() {
+    interface FormState {
+        ReckonRealQty?: number | null // 交收量
+        ReckonOtherAmount?: number | null // 其它费用
+        AddMargin?: number | null // 追加保证金
+        ReckonAdjustAmount?: number | null // 调整金额
+        Remark: string
+    }
+    // 是否选中数据
+    const checkedObj = reactive({
+        ReckonRealQty: false,
+        ReckonOtherAmount: false,
+        AddMargin: false,
+        ReckonAdjustAmount: false,
+    })
+    const formRef = ref();
+    const formState: UnwrapRef<FormState> = reactive({
+        ReckonRealQty: null, // 交收量
+        ReckonOtherAmount: null, // 其它费用
+        AddMargin: null, // 追加保证金
+        ReckonAdjustAmount: null, // 调整金额
+        Remark: ''
+    })
+    const rules = {
+        // PricedPrice: [{ required: true, message: '请输入点价价格', trigger: 'blur', type: 'number' }],
+        // PricedQty: [{ required: true, message: '请输入点价数量', trigger: 'blur', type: 'number' }],
+    }
+    return { rules, formState, formRef, checkedObj }
+}

+ 166 - 187
src/views/business/purchase/components/someprice/index.vue

@@ -1,161 +1,162 @@
 <template>
-    <!-- 点价登记-->
-    <a-modal class="commonModal someprice"
-             :title="selectedRow.contracttype===1? '采购合同-点价登记': '销售合同-点价登记'"
-             v-model:visible="visible"
-             @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="定价.
+  <!-- 点价登记-->
+  <a-modal class="commonModal someprice"
+           :title="selectedRow.contracttype===1? '采购合同-点价登记': '销售合同-点价登记'"
+           v-model:visible="visible"
+           @cancel="cancel"
+           centered
+           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="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">{{ formatValue(selectedRow.qty + selectedRow.enumdicname) }}</span>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="合同暂定价">
-                            <span class="white">{{ formatValue(selectedRow.price) }}</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.goodsname) }}</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.pricedqty + selectedRow.enumdicname }}</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-form>
-        </fieldset>
-        <fieldset class="formFieldSet">
-            <legend>本次点价信息</legend>
-            <a-form class="inlineForm"
-                    ref="formRef"
-                    :model="formState"
-                    :rules="formStateRules">
-                <a-row :gutter="24">
-                    <a-col :span="12">
-                        <a-form-item label="点价价格"
-                                     name="PricedPrice">
-                            <a-input-number class="dialogInput"
-                                            style="width: 200px"
-                                            v-model:value="formState.PricedPrice"
-                                            :min="0"
-                                            placeholder="请输入点价价格"/>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="升贴水">
-                            <span class="white">{{ formatValue(selectedRow.pricemove) }}</span>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
+              <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">{{ formatValue(selectedRow.qty + selectedRow.enumdicname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="合同暂定价">
+              <span class="white">{{ formatValue(selectedRow.price) }}</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.goodsname) + selectedRow.currencyname }}</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.pricedqty + selectedRow.enumdicname }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="已点均价">
+              <span class="white">{{ formatValue(selectedRow.pricedavg)  + 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="点价价格"
+                         name="PricedPrice">
+              <a-input-number class="dialogInput"
+                              style="width: 200px"
+                              v-model:value="formState.PricedPrice"
+                              :min="0"
+                              placeholder="请输入点价价格" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="升贴水">
+              <span class="white">{{ formatValue(selectedRow.pricemove) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
 
-                <a-row :gutter="24">
-                    <a-col :span="12">
-                        <a-form-item label="商品价格">
-                            <span class="white">{{
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="商品价格">
+              <span class="white">{{
                                     Number(selectedRow.pricemove) + Number(formState.PricedPrice)
                                 }}</span>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="点价数量"
-                                     class="relative"
-                                     name="PricedQty">
-                            <a-input-number class="dialogInput"
-                                            style="width: 200px"
-                                            v-model:value="formState.PricedQty"
-                                            :min="0"
-                                            :max="selectedRow.unpricedqty"
-                                            placeholder="请输入点价数量"/>
-                            <div class="tip">
-                                <span>未定价量<span
-                                    class="white">{{ selectedRow.unpricedqty }}{{ selectedRow.enumdicname }}</span> </span>
-                                <a class="blue ml10"
-                                   @click="formState.PricedQty = selectedRow.unpricedqty"> 全部登记</a>
-                            </div>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="点价数量"
+                         class="relative"
+                         name="PricedQty">
+              <a-input-number class="dialogInput"
+                              style="width: 200px"
+                              v-model:value="formState.PricedQty"
+                              :min="0"
+                              :max="selectedRow.unpricedqty"
+                              placeholder="请输入点价数量" />
+              <div class="tip">
+                <span>未定价量<span class="white">{{ selectedRow.unpricedqty }}{{ selectedRow.enumdicname }}</span> </span>
+                <a class="blue ml10"
+                   @click="formState.PricedQty = selectedRow.unpricedqty"> 全部登记</a>
+              </div>
+            </a-form-item>
+          </a-col>
+        </a-row>
 
-                <a-row :gutter="24">
-                    <a-col :span="12">
-                        <a-form-item label="点价金额">
-                            <span class="white">{{
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="点价金额">
+              <span class="white">{{
                                     (Number(selectedRow.pricemove) + Number(formState.PricedPrice)) * formState.PricedQty
-                                }}</span>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </a-form>
-        </fieldset>
-    </a-modal>
+                                }}{{selectedRow.currencyname}}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </fieldset>
+  </a-modal>
 </template>
 
 <script lang="ts">
-import {defineComponent, PropType, reactive, ref, unref} from 'vue';
-import {closeModal} from '@/common/setup/modal/index';
-import {formatValue} from '@/common/methods';
-import {Ermcp3SellBuyContract} from '@/services/go/ermcp/purchase/interface';
-import {getPriceTypeName} from '@/views/business/purchase/setup';
-import {SomePriceReq} from "@/services/proto/contract/interface";
-import {somePriceReq} from "@/views/business/purchase/components/setup";
+import { defineComponent, PropType, reactive, ref, unref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { formatValue } from '@/common/methods';
+import { Ermcp3SellBuyContract } from '@/services/go/ermcp/purchase/interface';
+import { getPriceTypeName } from '@/views/business/purchase/setup';
+import { SomePriceReq } from '@/services/proto/contract/interface';
+import { somePriceReq } from '@/views/business/purchase/components/setup';
+import { handleForm } from './setup';
 
 export default defineComponent({
     name: 'purchase_pending_someprice',
@@ -167,46 +168,25 @@ export default defineComponent({
         },
     },
     setup(props, context) {
-        const {visible, cancel} = closeModal('purchase_pending_someprice');
+        const { visible, cancel } = closeModal('purchase_pending_someprice');
         const loading = ref<boolean>(false);
-        const formRef = ref();
-        const formState = reactive({PricedPrice: 0, PricedQty: 0});
-
-        const numberIstrue = (rule: any, value: any) => {
-            if (!value) {
-                return Promise.reject(new Error('请输入正确的值'));
-            } else {
-                return Promise.resolve();
-            }
-        };
-        const formStateRules = {
-            PricedPrice: [{required: true, validator: numberIstrue, trigger: 'blur', type: 'number'}],
-            PricedQty: [{required: true, validator: numberIstrue, trigger: 'blur', type: 'number'}],
-        };
-
+        const { rules, formState, formRef } = handleForm();
         function submit() {
             const wrapEl = unref(formRef);
             wrapEl.validate().then(() => {
-                    loading.value = true;
-
-                    const params: SomePriceReq = {
-                        PricedPrice: Number(formState.PricedPrice),
-                        PricedQty:  Number(formState.PricedQty)
-                    }
-                    // 发出点价请求
-                    somePriceReq(
-                        props.selectedRow.spotcontractid,
-                        params, loading)
-                        .then(res => {
-                            cancel()
-                            context.emit('refresh')
-                        })
-                        .catch(err => {
-
-                        })
-                }
-
-            );
+                loading.value = true;
+                const params: SomePriceReq = {
+                    PricedPrice: Number(formState.PricedPrice),
+                    PricedQty: Number(formState.PricedQty),
+                };
+                // 发出点价请求
+                somePriceReq(props.selectedRow.spotcontractid, params, loading)
+                    .then((res) => {
+                        cancel();
+                        context.emit('refresh');
+                    })
+                    .catch((err) => {});
+            });
         }
 
         return {
@@ -217,12 +197,11 @@ export default defineComponent({
             formRef,
             formState,
             formatValue,
-            formStateRules,
+            rules,
             getPriceTypeName,
         };
     },
-})
-;
+});
 </script>
 
 <style lang="less">

+ 21 - 0
src/views/business/purchase/components/someprice/setup.ts

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

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

@@ -3,6 +3,7 @@
   <a-modal class="commonModal"
            title="入库登记"
            v-model:visible="visible"
+           centered
            @cancel="cancel"
            width="890px">
     <template #footer>

+ 6 - 2
src/views/business/purchase/list/pending/index.vue

@@ -20,9 +20,11 @@
       </a-table>
     </contextMenu>
     <!-- 详情 -->
-    <Detail :selectedRow="selectedRow" @refresh="queryTable"/>
+    <Detail :selectedRow="selectedRow"
+            @refresh="queryTable" />
     <!-- 采购点价登记 -->
-    <SomePrice :selectedRow="selectedRow" @refresh="queryTable"/>
+    <SomePrice :selectedRow="selectedRow"
+               @refresh="queryTable" />
   </div>
 </template>
 
@@ -45,6 +47,8 @@ export default defineComponent({
         const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
         // 表格事件
         const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3SellBuyContract>({});
+        console.log('selectedRow', selectedRow);
+
         // 表格操作按钮列表
         const { commonBtn, forDataBtn } = getBtnList('purchase_pending', true);
         // 表格列表数据

+ 1 - 0
src/views/business/sell/components/detail/index.vue

@@ -4,6 +4,7 @@
            title="详情"
            v-model:visible="visible"
            @cancel="cancel"
+           centered
            width="890px">
     <template #footer>
       <a-button key="submit"

+ 1 - 0
src/views/business/sell/components/funds/index.vue

@@ -3,6 +3,7 @@
   <a-modal class="custom-detail"
            title="款项登记"
            v-model:visible="visible"
+           centered
            @cancel="cancel"
            width="890px">
     <template #footer>

+ 1 - 0
src/views/business/sell/components/invoice/index.vue

@@ -3,6 +3,7 @@
   <a-modal class="custom-detail"
            title="发票登记"
            v-model:visible="visible"
+           centered
            @cancel="cancel"
            width="890px">
     <template #footer>

+ 1 - 0
src/views/business/sell/components/settlement/index.vue

@@ -4,6 +4,7 @@
            title="交收登记"
            v-model:visible="visible"
            @cancel="cancel"
+           centered
            width="890px">
     <template #footer>
       <a-button key="submit"

+ 1 - 0
src/views/business/sell/components/someprice/index.vue

@@ -4,6 +4,7 @@
            title="点价登记"
            v-model:visible="visible"
            @cancel="cancel"
+           centered
            width="890px">
     <template #footer>
       <a-button key="submit"

+ 1 - 0
src/views/business/sell/components/storage/index.vue

@@ -4,6 +4,7 @@
            title="出库登记"
            v-model:visible="visible"
            @cancel="cancel"
+           centered
            width="890px">
     <template #footer>
       <a-button key="submit"

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

@@ -4,6 +4,7 @@
            title="撤销客户资料"
            v-model:visible="visible"
            @cancel="cancel"
+           centered
            width="890px">
     <template #footer>
       <a-button key="submit"

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

@@ -4,6 +4,7 @@
            title="审核客户资料"
            v-model:visible="visible"
            @cancel="cancel"
+           centered
            width="890px">
     <template #footer>
       <a-button key="submit"

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

@@ -4,6 +4,7 @@
              title="删除客户资料"
              v-model:visible="visible"
              @cancel="cancel"
+             centered
              width="890px">
         <template #footer>
             <a-button key="submit"

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

@@ -4,6 +4,7 @@
              title="恢复客户资料"
              v-model:visible="visible"
              @cancel="cancel"
+             centered
              width="890px">
         <template #footer>
             <a-button key="submit"

+ 1 - 0
src/views/information/custom/compoments/cancel/index.vue

@@ -4,6 +4,7 @@
            title="撤销客户资料"
            v-model:visible="visible"
            @cancel="cancel"
+           centered
            width="890px">
     <template #footer>
       <a-button key="submit"

+ 1 - 0
src/views/information/custom/compoments/check/index.vue

@@ -4,6 +4,7 @@
            title="审核客户资料"
            v-model:visible="visible"
            @cancel="cancel"
+           centered
            width="890px">
     <template #footer>
       <a-button key="submit"

+ 1 - 0
src/views/information/custom/compoments/delete/index.vue

@@ -4,6 +4,7 @@
              title="删除客户资料"
              v-model:visible="visible"
              @cancel="cancel"
+             centered
              width="890px">
         <template #footer>
             <a-button key="submit"

+ 1 - 0
src/views/information/custom/compoments/recover/index.vue

@@ -4,6 +4,7 @@
              title="恢复客户资料"
              v-model:visible="visible"
              @cancel="cancel"
+             centered
              width="890px">
         <template #footer>
             <a-button key="submit"

+ 1 - 0
src/views/information/goods/components/recover/index.vue

@@ -4,6 +4,7 @@
              title="恢复客户资料"
              v-model:visible="visible"
              @cancel="cancel"
+             centered
              width="890px">
         <template #footer>
             <a-button key="submit"

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

@@ -181,12 +181,11 @@ import { formatTime, formatValue } from '@/common/methods';
 import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
 import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
 import { orderContractOperateControl } from '@/views/information/spot-contract/components/setup';
-import { message, Modal } from 'ant-design-vue';
+import { Modal } from 'ant-design-vue';
 import { SpotContractOperateReq } from '@/services/proto/spotcontract/interface';
-import Long from 'long';
 
 export default defineComponent({
-    name: 'spot-contract-detail',
+    name: 'spot-contract-finish',
     components: {},
     props: {
         selectedRow: {
@@ -199,6 +198,7 @@ export default defineComponent({
         const maskClosableFlag = ref<boolean>(false);
         const loading = ref<boolean>(false);
         function submit() {
+            context.emit('refresh');
             Modal.confirm({
                 title: '是否确认完结',
                 okText: '确认完结',

+ 1 - 0
src/views/information/spot-contract/components/modify/index.vue

@@ -5,6 +5,7 @@
            v-if="visible"
            v-model:visible="visible"
            @cancel="cancel"
+           centered
            width="890px">
     <template #footer>
       <a-button key="submit"

+ 1 - 0
src/views/information/spot-contract/components/resubmit/index.vue

@@ -4,6 +4,7 @@
            title="重新提交现货合同"
            v-model:visible="visible"
            @cancel="cancel"
+           centered
            width="890px">
     <template #footer>
       <a-button key="submit"

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

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

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

@@ -99,6 +99,7 @@ export default defineComponent({
             getPriceTypeName,
             getContractStatusName,
             getContractTypeName,
+            queryTable,
         };
     },
 });

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

@@ -1,84 +1,65 @@
 <template>
-    <!-- 现货合同: 未提交-->
-    <div class="spot-contract-not-commit"
-         :loading="loading">
-        <filterCustomTable @search="search">
-            <BtnList :btnList="commonBtn"/>
-        </filterCustomTable>
-        <contextMenu :contextMenuList="forDataBtn">
-            <a-table :columns="columns"
-                     class="topTable hiddenFirstCol"
-                     :pagination="false"
-                     :expandedRowKeys="expandedRowKeys"
-                     :customRow="Rowclick"
-                     rowKey="key"
-                     :data-source="tableList">
-                <!-- 额外的展开行 -->
-                <template #expandedRowRender="{  }">
-                    <BtnList :btnList="forDataBtn"/>
-                </template>
-                <!-- <template #userinfotype="{ text }">
+  <!-- 现货合同: 未提交-->
+  <div class="spot-contract-not-commit"
+       :loading="loading">
+    <filterCustomTable @search="search">
+      <BtnList :btnList="commonBtn" />
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns"
+               class="topTable hiddenFirstCol"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :data-source="tableList">
+        <!-- 额外的展开行 -->
+        <template #expandedRowRender="{  }">
+          <BtnList :btnList="forDataBtn" />
+        </template>
+        <!-- <template #userinfotype="{ text }">
                   <a>{{ text === '2' ? '企业' : '个人'}}</a>
                 </template> -->
-                <template #biztype="{ text }">
-                    <a>{{ getBizTypeName(text) }}</a>
-                </template>
+        <template #biztype="{ text }">
+          <a>{{ getBizTypeName(text) }}</a>
+        </template>
 
-                <template #pricetype="{ text }">
-                    <a>{{ getPriceTypeName(text) }}</a>
-                </template>
+        <template #pricetype="{ text }">
+          <a>{{ getPriceTypeName(text) }}</a>
+        </template>
 
-                <template #contracctstatus="{ text }">
-                    <a>{{ getContractStatusName(text) }}</a>
-                </template>
+        <template #contracctstatus="{ text }">
+          <a>{{ getContractStatusName(text) }}</a>
+        </template>
 
-                <template #contracttype="{ text }">
-                    <a>{{ getContractTypeName(text) }}</a>
-                </template>
-            </a-table>
-        </contextMenu>
-        <!-- 新增现货合同 -->
-        <AddSpotContract  @refresh="queryTable"/>
-        <!-- 现货合同: 详情 -->
-        <SpotContractDeatil :selectedRow="selectedRow"
-                            @refresh="queryTable"/>
-        <!-- 现货合同: 修改 -->
-        <ModifySpotContract :selectedRow="selectedRow"
-                            @refresh="queryTable"/>
-        <!-- 现货合同: 删除 -->
-        <DeleteSpotContract :selectedRow="selectedRow"
-                            @refresh="queryTable"/>
-        <!-- 现货合同: 重新提交 -->
-        <ResubmitSpotContract/>
-    </div>
+        <template #contracttype="{ text }">
+          <a>{{ getContractTypeName(text) }}</a>
+        </template>
+      </a-table>
+    </contextMenu>
+    <!-- 新增现货合同 -->
+    <AddSpotContract @refresh="queryTable" />
+    <!-- 现货合同: 详情 -->
+    <SpotContractDeatil :selectedRow="selectedRow"
+                        @refresh="queryTable" />
+    <!-- 现货合同: 修改 -->
+    <ModifySpotContract :selectedRow="selectedRow"
+                        @refresh="queryTable" />
+    <!-- 现货合同: 删除 -->
+    <DeleteSpotContract :selectedRow="selectedRow"
+                        @refresh="queryTable" />
+    <!-- 现货合同: 重新提交 -->
+    <ResubmitSpotContract :selectedRow="selectedRow"
+                          @refresh="queryTable" />
+  </div>
 </template>
 
 <script lang="ts">
-import {
-    defineComponent,
-    initData,
-    getTableColumns,
-    getTableEvent,
-    getBtnList,
-    contextMenu,
-    BtnList
-} from '@/common/export/table';
-import {
-    AddSpotContract,
-    SpotContractDeatil,
-    filterCustomTable,
-    ModifySpotContract,
-    DeleteSpotContract,
-    ResubmitSpotContract
-} from '../../components';
+import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
+import { AddSpotContract, SpotContractDeatil, filterCustomTable, ModifySpotContract, DeleteSpotContract, ResubmitSpotContract } from '../../components';
 
-import {queryTableList, getFilterTableCB, Ermcp3ContractRsp} from '../index';
-import {
-    getBizTypeName,
-    getContractStatusName,
-    getContractTypeName,
-    getPriceTypeName
-} from "@/views/information/spot-contract/setup";
+import { queryTableList, getFilterTableCB, Ermcp3ContractRsp } from '../index';
+import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
 
 export default defineComponent({
     name: 'spot-contract-not-commit',
@@ -94,13 +75,13 @@ export default defineComponent({
     },
     setup() {
         // 表头数据
-        const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
+        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
         // 表格事件
-        const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<Ermcp3ContractRsp>({});
+        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3ContractRsp>({});
         // 表格操作按钮列表
-        const {commonBtn, forDataBtn} = getBtnList('spot_contract_unsubmitted', true);
+        const { commonBtn, forDataBtn } = getBtnList('spot_contract_unsubmitted', true);
         // 表格列表数据
-        const {loading, tableList, queryTable} = queryTableList(1);
+        const { loading, tableList, queryTable } = queryTableList(1);
 
         // 查询
         function search(value: any) {

+ 1 - 1
src/views/manage/business-review/components/filterTable/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 过滤客户资料表格 -->
-  <div>
+  <div class="filterTable">
     <FilterOption :selectList="selectList"
                   :inputList="inputList"
                   :fixedBtnList="fixedBtnList" />

+ 1 - 1
src/views/manage/finance-review/components/filterTable/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 过滤客户资料表格 -->
-  <div>
+  <div class="filterTable">
     <FilterOption :selectList="selectList"
                   :inputList="inputList"
                   :fixedBtnList="fixedBtnList" />

+ 1 - 1
src/views/manage/inventory-review/components/filterTable/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 过滤客户资料表格 -->
-  <div>
+  <div class="filterTable">
     <FilterOption :selectList="selectList"
                   :inputList="inputList"
                   :fixedBtnList="fixedBtnList" />

+ 1 - 1
src/views/setting/logout/index.vue

@@ -1,5 +1,5 @@
 <template>
-    <a-modal class="logout" v-model:visible="visible" @cancel="cancel" width="890px" :footer="null">
+    <a-modal class="logout" v-model:visible="visible" @cancel="cancel" width="890px" centered :footer="null">
         <div>logout</div>
         <div>logout</div>
         <div>logout</div>

+ 1 - 1
src/views/setting/notice/index.vue

@@ -1,5 +1,5 @@
 <template>
-    <a-modal class="notice" v-model:visible="visible" @cancel="cancel" width="890px" :footer="null">
+    <a-modal class="notice" v-model:visible="visible" @cancel="cancel" width="890px" centered :footer="null">
         <a-tabs v-model:activeKey="activeKey">
             <a-tab-pane key="1">
                 <template #tab>

+ 65 - 5
swagger-to-ts/swagger.ts

@@ -1,7 +1,67 @@
 export interface Name{
-remark	:string;//Remark
-tabelmenu	:string;//列表菜单
-tablekey	:string;//列表Key
-tablename	:string;//列表名称
-tabletype	:number;//列表类型 - 1:管理端 2:终端
+accountid	:string;//期货账户id
+accountname	:string;//账户名称
+attachment	:string;//附件
+audittime	:string;//审核时间
+biztype	:number;//业务类型 1-套保 2-套利
+brandname	:string;//品牌名称
+contracctstatus	:number;//合同状态- number;
+//:未提交 1:待审核 2:执行中 3:正常完结 4:审核拒绝 5:异常完结 6:已撤回
+contractmargin	:number;//合同保证金
+contractno	:string;//合同编号
+contracttype	:number;//合同类型 1-采购, -1-销售
+convertfactor	:number;//标仓系数(品类)
+createtime	:string;//创建时间
+currencyid	:number;//币种id
+currencyname	:string;//币种名称
+daikaiamount	:number;//应收(开)票额
+deliveryenddate	:string;//交割结束日
+deliverygoodscode	:string;//现货品种代码
+deliverygoodsid	:number;//现货商品ID
+deliverygoodsname	:string;//现货品种名称
+deliverystartdate	:string;//交割开始日
+enddate	:string;//点价结束日
+enumdicname	:string;//单位名称
+goodscode	:string;//点价商品代码
+goodsid	:number;//点价商品ID
+goodsname	:string;//点价商品名称
+invoiceamount	:number;//已开票额
+loanamount	:number;//贷款总额=已定价额+调整金额
+margin	:number;//保证金
+meruserid	:number;//跟单员id
+meruserlogincode	:string;//跟单员登录代码
+nickname	:string;//账户昵称
+payamount	:number;//已收付额(收款或付款)
+preinvoiceamount	:number;//预收(开)票额
+prepayamount	:number;//预收付额
+price	:number;//价格
+pricedamount	:number;//已定价额
+pricedavg	:number;//已点均价
+pricedqty	:number;//已定价量
+pricemove	:number;//升贴水
+pricetype	:number;//定价类型 - 1:一口价 2:点价 3:暂定价
+producttype	:number;//产品类型 - 1:标准仓单 2:等标 3:非标
+qty	:number;//合同量
+reckonadjustamount	:number;//调整金额
+reckonedamount	:number;//实际已收付额(已确定额,已收付总额-已退款总额)
+reckonotheramount	:number;//其它费用
+reckonrealqty	:number;//已确定量
+remark	:string;//备注
+saleuserid	:number;//业务员id
+saleuserlogincode	:string;//业务员登录代码
+spotcontractid	:string;//合同ID
+spotgoodsbrandid	:number;//现货品牌ID(DGFactoryItem表的ID)
+spotgoodsdesc	:string;//商品型号(商品规格)
+startdate	:string;//点价开始日
+totalamount	:number;//合计总额
+tradeuserid	:number;//交易员id
+tradeuserlogincode	:string;//交易员登录代码
+tradeusername	:string;//交易员名称
+unpayamount	:number;//应收付款额(应支付或应收款)
+unpricedqty	:number;//未定价量
+unsureqty	:number;//未确定量
+userid	:number;//机构ID
+wrstandardcode	:string;//品类代码
+wrstandardid	:number;//品类ID
+wrstandardname	:string;//品类名称
 }

+ 186 - 9
swagger-to-ts/swagger.txt

@@ -1,16 +1,193 @@
 {
+accountid	string
+期货账户id
+
+accountname	string
+账户名称
+
+attachment	string
+附件
+
+audittime	string
+审核时间
+
+biztype	integer
+业务类型 1-套保 2-套利
+
+brandname	string
+品牌名称
+
+contracctstatus	integer
+合同状态- 0:未提交 1:待审核 2:执行中 3:正常完结 4:审核拒绝 5:异常完结 6:已撤回
+
+contractmargin	number
+合同保证金
+
+contractno	string
+合同编号
+
+contracttype	integer
+合同类型 1-采购, -1-销售
+
+convertfactor	number
+标仓系数(品类)
+
+createtime	string
+创建时间
+
+currencyid	integer
+币种id
+
+currencyname	string
+币种名称
+
+daikaiamount	number
+应收(开)票额
+
+deliveryenddate	string
+交割结束日
+
+deliverygoodscode	string
+现货品种代码
+
+deliverygoodsid	integer
+现货商品ID
+
+deliverygoodsname	string
+现货品种名称
+
+deliverystartdate	string
+交割开始日
+
+enddate	string
+点价结束日
+
+enumdicname	string
+单位名称
+
+goodscode	string
+点价商品代码
+
+goodsid	integer
+点价商品ID
+
+goodsname	string
+点价商品名称
+
+invoiceamount	number
+已开票额
+
+loanamount	number
+贷款总额=已定价额+调整金额
+
+margin	number
+保证金
+
+meruserid	integer
+跟单员id
+
+meruserlogincode	string
+跟单员登录代码
+
+nickname	string
+账户昵称
+
+payamount	number
+已收付额(收款或付款)
+
+preinvoiceamount	number
+预收(开)票额
+
+prepayamount	number
+预收付额
+
+price	number
+价格
+
+pricedamount	number
+已定价额
+
+pricedavg	number
+已点均价
+
+pricedqty	number
+已定价量
+
+pricemove	number
+升贴水
+
+pricetype	integer
+定价类型 - 1:一口价 2:点价 3:暂定价
+
+producttype	integer
+产品类型 - 1:标准仓单 2:等标 3:非标
+
+qty	number
+合同量
+
+reckonadjustamount	number
+调整金额
+
+reckonedamount	number
+实际已收付额(已确定额,已收付总额-已退款总额)
+
+reckonotheramount	number
+其它费用
+
+reckonrealqty	number
+已确定量
+
 remark	string
-Remark
+备注
+
+saleuserid	integer
+业务员id
+
+saleuserlogincode	string
+业务员登录代码
+
+spotcontractid	string
+合同ID
+
+spotgoodsbrandid	integer
+现货品牌ID(DGFactoryItem表的ID)
+
+spotgoodsdesc	string
+商品型号(商品规格)
+
+startdate	string
+点价开始日
+
+totalamount	number
+合计总额
+
+tradeuserid	integer
+交易员id
+
+tradeuserlogincode	string
+交易员登录代码
+
+tradeusername	string
+交易员名称
+
+unpayamount	number
+应收付款额(应支付或应收款)
+
+unpricedqty	number
+未定价量
+
+unsureqty	number
+未确定量
 
-tabelmenu	string
-列表菜单
+userid	integer
+机构ID
 
-tablekey*	string
-列表Key
+wrstandardcode	string
+品类代码
 
-tablename	string
-列表名称
+wrstandardid	integer
+品类ID
 
-tabletype	integer
-列表类型 - 1:管理端 2:终端
+wrstandardname	string
+品类名称
 }