huangbin 4 년 전
부모
커밋
c55e27c985

+ 195 - 123
src/views/business/purchase/components/settlement/index.vue

@@ -96,129 +96,201 @@
               ref="formRef"
               :model="formState"
               :rules="rules">
-              <a-checkbox-group class="commonCheckboxGroup">
-                <a-row>
-                  <a-col :span="12">
-                    <a-form-item class="relative">
-                      <template #label>
-                        <a-checkbox value="交收量" v-model:checked="checkedObj.qty" @change="()=>checkedObj.qty = !checkedObj.qty">交收量</a-checkbox>
-                      </template>
-                      <a-form-item class="relative" v-if="checkedObj.qty" name="ReckonRealQty">
-                        <a-input-number  v-model:value="formState.ReckonRealQty" class="dialogInput" style="width: 200px" placeholder="请输入交收量" suffix="单位"/>
-                        <div class="tip mt10"><span>待交收量:{{selectedRow.unsureqty}}吨</span><a class="blue fr" @click="formState.ReckonRealQty=selectedRow.unsureqty">全部登记</a></div>
-                      </a-form-item>
-                      <a-form-item class="relative" v-else>
-                        <a-input-number disabled class="dialogInput" style="width: 200px" placeholder="请输入交收量" suffix="单位" />
-                        <div class="tip mt10"><span class="fl">未定价量:--吨</span><a class="blue fr">全部登记</a></div>
-                      </a-form-item>
+        <a-checkbox-group class="commonCheckboxGroup">
+          <a-row>
+            <a-col :span="12">
+              <a-form-item class="relative">
+                <template #label>
+                  <a-checkbox value="交收量"
+                              v-model:checked="checkedObj.qty"
+                              @change="()=>checkedObj.qty = !checkedObj.qty">交收量</a-checkbox>
+                </template>
+                <a-form-item class="relative"
+                             v-if="checkedObj.qty"
+                             name="ReckonRealQty">
+                  <a-input-number v-model:value="formState.ReckonRealQty"
+                                  class="dialogInput"
+                                  style="width: 200px"
+                                  placeholder="请输入交收量"
+                                  suffix="单位" />
+                  <div class="tip mt10"><span>待交收量:{{selectedRow.unsureqty}}吨</span><a class="blue fr"
+                       @click="formState.ReckonRealQty=selectedRow.unsureqty">全部登记</a></div>
+                </a-form-item>
+                <a-form-item class="relative"
+                             v-else>
+                  <a-input-number disabled
+                                  class="dialogInput"
+                                  style="width: 200px"
+                                  placeholder="请输入交收量"
+                                  suffix="单位" />
+                  <div class="tip mt10"><span class="fl">未定价量:--吨</span><a class="blue fr">全部登记</a></div>
+                </a-form-item>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item class="relative">
+                <template #label>
+                  <a-checkbox value="其他费用"
+                              v-model:checked="checkedObj.amount"
+                              @change="()=>checkedObj.amount = !checkedObj.amount">其他费用</a-checkbox>
+                </template>
+                <a-form-item v-if="checkedObj.amount"
+                             name="ReckonOtherAmount">
+                  <a-input-number v-model:value="formState.ReckonOtherAmount"
+                                  class="dialogInput"
+                                  style="width: 200px"
+                                  placeholder="请输入其他费用"
+                                  suffix="元" />
+                </a-form-item>
+                <a-form-item v-else>
+                  <a-input-number readonly
+                                  class="dialogInput"
+                                  style="width: 200px"
+                                  placeholder="请输入其他费用"
+                                  suffix="元" />
+                </a-form-item>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12"
+                   class="mt10">
+              <a-form-item class="relative">
+                <template #label>
+                  <a-checkbox value="调整保证金"
+                              v-model:checked="checkedObj.margin"
+                              @change="()=>checkedObj.margin = !checkedObj.margin">调整保证金</a-checkbox>
+                </template>
+                <a-form-item class="relative"
+                             v-if="checkedObj.margin">
+                  <a-radio-group class="commonRadioGroup"
+                                 v-model:value="checkedObj.adjustMargin">
+                    <a-row style="width: 200px">
+                      <a-col :span="12">
+                        <a-radio :value="1">追加</a-radio>
+                      </a-col>
+                      <a-col :span="12">
+                        <a-radio :value="2">退还</a-radio>
+                      </a-col>
+                    </a-row>
+                  </a-radio-group>
+                  <div class="tip mt10">
+                    <a-form-item name="AddMargin"
+                                 v-if="checkedObj.adjustMargin === 1">
+                      <a-input-number v-model:value="formState.AddMargin"
+                                      class="dialogInput"
+                                      style="width: 200px;"
+                                      placeholder="请输入调整保证金"
+                                      suffix="元" />
                     </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                    <a-form-item class="relative">
-                      <template #label>
-                          <a-checkbox value="其他费用"  v-model:checked="checkedObj.amount" @change="()=>checkedObj.amount = !checkedObj.amount">其他费用</a-checkbox>
-                      </template>
-                      <a-form-item v-if="checkedObj.amount" name="ReckonOtherAmount">
-                        <a-input-number v-model:value="formState.ReckonOtherAmount" class="dialogInput" style="width: 200px" placeholder="请输入其他费用" suffix="元"/>
-                      </a-form-item>
-                      <a-form-item v-else>
-                        <a-input-number readonly class="dialogInput" style="width: 200px" placeholder="请输入其他费用" suffix="元"/>
-                      </a-form-item>
+                    <a-form-item name="DecMargin"
+                                 v-else>
+                      <a-input-number v-model:value="formState.DecMargin"
+                                      class="dialogInput"
+                                      style="width: 200px;"
+                                      placeholder="请输入调整保证金"
+                                      suffix="元" />
                     </a-form-item>
-                  </a-col>
-                  <a-col :span="12" class="mt10">
-                    <a-form-item class="relative">
-                      <template #label>
-                          <a-checkbox value="调整保证金" v-model:checked="checkedObj.margin" @change="()=>checkedObj.margin = !checkedObj.margin">调整保证金</a-checkbox>
-                      </template>
-                      <a-form-item class="relative" v-if="checkedObj.margin">
-                          <a-radio-group class="commonRadioGroup"  v-model:value="checkedObj.adjustMargin">
-                            <a-row style="width: 200px">
-                              <a-col :span="12">
-                                <a-radio :value="1">追加</a-radio>
-                              </a-col>
-                              <a-col :span="12">
-                                <a-radio :value="2">退还</a-radio>
-                              </a-col>
-                            </a-row>
-                          </a-radio-group>
-                      <div class="tip mt10">
-                        <a-form-item  name="AddMargin"  v-if="checkedObj.adjustMargin === 1">
-                            <a-input-number v-model:value="formState.AddMargin" class="dialogInput" style="width: 200px;" placeholder="请输入调整保证金" suffix="元"/> 
-                        </a-form-item >
-                        <a-form-item  name="DecMargin" v-else>
-                            <a-input-number  v-model:value="formState.DecMargin" class="dialogInput" style="width: 200px;" placeholder="请输入调整保证金" suffix="元" /> 
-                        </a-form-item >
-                      </div>
-                      </a-form-item >
-                      <a-form-item class="relative" v-else>
-                          <a-radio-group class="commonRadioGroup" disabled>
-                            <a-row style="width: 200px">
-                              <a-col :span="12">
-                                <a-radio :value="1">追加</a-radio>
-                              </a-col>
-                              <a-col :span="12">
-                                <a-radio :value="2">退还</a-radio>
-                              </a-col>
-                            </a-row>
-                          </a-radio-group>
-                      <div class="tip mt10">
-                        <a-input-number disabled class="dialogInput" style="width: 200px;" placeholder="请输入调整保证金" suffix="元"/>
-                      </div>
-                      </a-form-item>
-                    </a-form-item >
-                  </a-col>
-                  <a-col :span="12" class="mt10">
-                    <a-form-item class="relative">
-                      <template #label>
-                        <a-checkbox value="调整金额" v-model:checked="checkedObj.justAmount" @change="()=>checkedObj.justAmount = !checkedObj.justAmount">调整金额</a-checkbox>
-                      </template>
-                      <a-form-item class="relative" v-if="checkedObj.justAmount">
-                          <a-radio-group class="commonRadioGroup" v-model:value="checkedObj.adjustAmount">
-                            <a-row style="width: 200px">
-                              <a-col :span="12">
-                                <a-radio :value="1" @focus="()=>{formState.ReckonAdjustAmount  ?formState.ReckonAdjustAmount= Math.abs(formState.ReckonAdjustAmount):0}">增加</a-radio>
-                              </a-col>
-                              <a-col :span="12">
-                                <a-radio :value="2" @focus="()=>{formState.ReckonAdjustAmount  ?formState.ReckonAdjustAmount= -1* Math.abs(formState.ReckonAdjustAmount):0}">减少</a-radio>
-                              </a-col>
-                            </a-row>
-                          </a-radio-group>
-                          <div class="tip mt10">
-                              <a-form-item  name="ReckonAdjustAmount">
-                                  <a-input-number v-model:value="formState.ReckonAdjustAmount" @change="formState.ReckonAdjustAmount= Math.abs(formState.ReckonAdjustAmount)" class="dialogInput" style="width: 200px;" placeholder="请输入调整金额" suffix="元" v-if="checkedObj.adjustAmount===1"/>
-                                  <a-input-number v-model:value="formState.ReckonAdjustAmount" @change="formState.ReckonAdjustAmount= -1*Math.abs(formState.ReckonAdjustAmount)" class="dialogInput" style="width: 200px;" placeholder="请输入调整金额" suffix="元" v-else/>
-                              </a-form-item >
-                          </div>
-                      </a-form-item>
-                      <a-form-item class="relative" v-else>
-                        <a-radio-group class="commonRadioGroup" disabled>
-                          <a-row style="width: 200px">
-                            <a-col :span="12">
-                              <a-radio :value="1">增加</a-radio>
-                            </a-col>
-                            <a-col :span="12">
-                              <a-radio :value="2">减少</a-radio>
-                            </a-col>
-                          </a-row>
-                        </a-radio-group>
-                        <div class="tip mt10">
-                          <a-input-number disabled class="dialogInput" style="width: 200px;" placeholder="请输入调整金额" suffix="元"/>
-                        </div>
-                      </a-form-item>
+                  </div>
+                </a-form-item>
+                <a-form-item class="relative"
+                             v-else>
+                  <a-radio-group class="commonRadioGroup"
+                                 disabled>
+                    <a-row style="width: 200px">
+                      <a-col :span="12">
+                        <a-radio :value="1">追加</a-radio>
+                      </a-col>
+                      <a-col :span="12">
+                        <a-radio :value="2">退还</a-radio>
+                      </a-col>
+                    </a-row>
+                  </a-radio-group>
+                  <div class="tip mt10">
+                    <a-input-number disabled
+                                    class="dialogInput"
+                                    style="width: 200px;"
+                                    placeholder="请输入调整保证金"
+                                    suffix="元" />
+                  </div>
+                </a-form-item>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12"
+                   class="mt10">
+              <a-form-item class="relative">
+                <template #label>
+                  <a-checkbox value="调整金额"
+                              v-model:checked="checkedObj.justAmount"
+                              @change="()=>checkedObj.justAmount = !checkedObj.justAmount">调整金额</a-checkbox>
+                </template>
+                <a-form-item class="relative"
+                             v-if="checkedObj.justAmount">
+                  <a-radio-group class="commonRadioGroup"
+                                 v-model:value="checkedObj.adjustAmount">
+                    <a-row style="width: 200px">
+                      <a-col :span="12">
+                        <a-radio :value="1"
+                                 @focus="()=>{formState.ReckonAdjustAmount  ?formState.ReckonAdjustAmount= Math.abs(formState.ReckonAdjustAmount):0}">增加</a-radio>
+                      </a-col>
+                      <a-col :span="12">
+                        <a-radio :value="2"
+                                 @focus="()=>{formState.ReckonAdjustAmount  ?formState.ReckonAdjustAmount= -1* Math.abs(formState.ReckonAdjustAmount):0}">减少</a-radio>
+                      </a-col>
+                    </a-row>
+                  </a-radio-group>
+                  <div class="tip mt10">
+                    <a-form-item name="ReckonAdjustAmount">
+                      <a-input-number v-model:value="formState.ReckonAdjustAmount"
+                                      @change="formState.ReckonAdjustAmount= Math.abs(formState.ReckonAdjustAmount)"
+                                      class="dialogInput"
+                                      style="width: 200px;"
+                                      placeholder="请输入调整金额"
+                                      suffix="元"
+                                      v-if="checkedObj.adjustAmount===1" />
+                      <a-input-number v-model:value="formState.ReckonAdjustAmount"
+                                      @change="formState.ReckonAdjustAmount= -1*Math.abs(formState.ReckonAdjustAmount)"
+                                      class="dialogInput"
+                                      style="width: 200px;"
+                                      placeholder="请输入调整金额"
+                                      suffix="元"
+                                      v-else />
                     </a-form-item>
-                  </a-col>
-                  <a-col :span="24">
-                    <a-form-item label="备注"
-                                class="relative mt20 pl40">
-                      <a-input class="dialogInput"
-                                      style="width: 600px"
-                                      placeholder="请输入备注信息" v-model:value="formState.Remark"/>
-                    </a-form-item>
-                  </a-col>
-                </a-row>
-              </a-checkbox-group>
-              <a-form-item name="IsChecked"></a-form-item>
+                  </div>
+                </a-form-item>
+                <a-form-item class="relative"
+                             v-else>
+                  <a-radio-group class="commonRadioGroup"
+                                 disabled>
+                    <a-row style="width: 200px">
+                      <a-col :span="12">
+                        <a-radio :value="1">增加</a-radio>
+                      </a-col>
+                      <a-col :span="12">
+                        <a-radio :value="2">减少</a-radio>
+                      </a-col>
+                    </a-row>
+                  </a-radio-group>
+                  <div class="tip mt10">
+                    <a-input-number disabled
+                                    class="dialogInput"
+                                    style="width: 200px;"
+                                    placeholder="请输入调整金额"
+                                    suffix="元" />
+                  </div>
+                </a-form-item>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="备注"
+                           class="relative mt20 pl40">
+                <a-input class="dialogInput"
+                         style="width: 600px"
+                         placeholder="请输入备注信息"
+                         v-model:value="formState.Remark" />
+              </a-form-item>
+            </a-col>
+          </a-row>
+        </a-checkbox-group>
+        <a-form-item name="IsChecked"></a-form-item>
       </a-form>
     </fieldset>
   </a-modal>
@@ -291,8 +363,8 @@ export default defineComponent({
 
 <style lang="less">
 .settlement {
-  .has-error .ant-form-explain {
-    padding-left: 40px;
-  }
+    .has-error .ant-form-explain {
+        padding-left: 40px;
+    }
 }
 </style>;

+ 12 - 14
src/views/information/account_info/compoments/detail-futures/index.vue

@@ -16,9 +16,9 @@
             :model="formState">
       <a-row :gutter="24">
         <a-col :span="12">
-          <a-form-item label="所属户"
-                       name="">
-            <span class="white">{{rolename}}</span>
+          <a-form-item label="所属期货账户"
+                       name="userinfotype">
+            <span class="white">{{selectedData.mainAcc.accountname}}/{{selectedData.mainAcc.hedgeaccountcode}}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
@@ -85,8 +85,8 @@
 import { defineComponent, PropType, ref, watchEffect } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { mergeTwoObj } from '@/utils/objHandle';
-import { handleBusinessForm, handleRoleName } from '../setup';
-import { ErmcpLoginUser, ErmcpLoginUserEx, ErmcpTaAccount } from '@/services/go/ermcp/account/interface';
+import { handleBusinessForm } from '../add-child-futures/setup';
+import { ErmcpLoginUser, ErmcpLoginUserEx, ErmcpTaAccount, ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
 import { handlerManagerList } from '@/common/setup/user';
 import { handleTradeTemplate } from '../add-child-futures/setup';
 
@@ -95,12 +95,12 @@ export default defineComponent({
     components: {},
     props: {
         selectedData: {
-            type: Object as PropType<ErmcpLoginUser>,
+            type: Object as PropType<ErmcpTaAccountEx>,
             default: {},
         },
-        tableList: {
-            type: Array as PropType<ErmcpLoginUserEx[]>,
-            default: [],
+        secondeData: {
+            type: Object as PropType<ErmcpTaAccountEx>,
+            default: {},
         },
         accountList: {
             default: [],
@@ -110,19 +110,17 @@ export default defineComponent({
     setup(props) {
         const { visible, cancel } = closeModal('detail');
         const { formState } = handleBusinessForm();
-        const { rolename, getRoleName } = handleRoleName();
         const loading = ref<boolean>(false);
                 // 交易用户
         const { tableList, queryTable } = handlerManagerList(loading, 2);
         // 交易模板
         const { marginList, feeList, queryTemplate } = handleTradeTemplate();
         watchEffect(() => {
-            if (visible.value) {
-              console.log('selectedData', props.selectedData);
+            if (visible.value && props.secondeData) {
+              console.log('selectedData', props.secondeData);
                queryTable();
                 queryTemplate();
-                const { selectedData, tableList } = props;
-                mergeTwoObj(formState, selectedData);
+                mergeTwoObj(formState, props.secondeData);
                 // getRoleName(tableList, selectedData);
                 // formState.logintaaccounts = selectedData.acclist.map((e) => e.accountid);
                 // formState.accountname = props.selectedData.loginname;

+ 25 - 13
src/views/information/account_info/list/account_info_futures/index.vue

@@ -35,9 +35,8 @@
           <a-row class="headRow">
             <a-col :span="12">{{item.mainAcc.accountname}} {{ '-' + item.mainAcc.hedgeaccountcode}} ({{item.subacclist.length}})</a-col>
             <a-col :span="12">
-              <BtnList :selectedData="item"
-                       :btnList="secondBtn"
-                       @onClick="openAction" />
+              <BtnList :btnList="secondBtn"
+                       @onClick="secondeClick(item)" />
             </a-col>
           </a-row>
         </template>
@@ -52,25 +51,25 @@
                 <a-col :span="12">{{getAccountStatus(sub.tradestatus)}}</a-col>
               </a-row>
             </template>
-            <BtnList :selectedData="sub"
-                     :btnList="thirdBtn"
-                     @onClick="moreOptenAction" />
+            <BtnList :btnList="thirdBtn"
+                     @onClick="thirdClick(item, sub)" />
           </a-collapse-panel>
         </a-collapse>
       </a-collapse-panel>
     </a-collapse>
     <Add @refresh="queryTable" />
-    <AddChild :selectedData="addModelData"
+    <AddChild :selectedData="firstData"
               @refresh="queryTable" />
-    <Modify :selectedData="addModelData"
+    <Modify :selectedData="firstData"
             @refresh="queryTable" />
     <ModifyChild @refresh="queryTable"
-                 :selectedData="moreModelData" />
-    <Detail :selectedData="moreModelData" />
+                 :selectedData="firstData" />
+    <Detail :selectedData="firstData"
+            :secondeData="secondeData" />
     <Cancel @refresh="queryTable"
-            :selectedData="moreModelData" />
+            :selectedData="firstData" />
     <Credit @refresh="queryTable"
-            :selectedData="moreModelData" />
+            :selectedData="firstData" />
   </div>
 </template>
 
@@ -88,6 +87,7 @@ import Detail from '../../compoments/detail-futures/index.vue';
 import Cancel from '../../compoments/cancel-futures/index.vue';
 import Credit from '../../compoments/credit-futures/index.vue';
 import { ErmcpTaAccountEx } from '@/services/go/ermcp/account/interface';
+import { ref } from 'vue';
 
 export default defineComponent({
     name: 'account_info_futures',
@@ -114,7 +114,15 @@ export default defineComponent({
         initData(() => {
             queryTable();
         });
-
+        const firstData = ref<ErmcpTaAccountEx | null>(null)
+        const secondeData = ref<ErmcpTaAccountEx | null>(null)
+        function secondeClick(item: ErmcpTaAccountEx) {
+          firstData.value = item
+        }
+        function thirdClick(item: ErmcpTaAccountEx, sub: ErmcpTaAccountEx) {
+          firstData.value = item
+          secondeData.value = sub
+        }
         // 查询
         function search(value: any) {}
 
@@ -122,7 +130,11 @@ export default defineComponent({
             addModelData,
             openAction,
             moreModelData,
+            firstData,
+            secondeData,
             moreOptenAction,
+            secondeClick,
+            thirdClick,
             loading,
             search,
             tableList,