Ver Fonte

重新提交现货合同

huangbin há 4 anos atrás
pai
commit
ce5a4b6e6e

+ 6 - 4
src/common/setup/user/index.ts

@@ -22,13 +22,15 @@ export function handlerManagerList(loading: Ref<boolean>, type: 1 | 2 | 3, isFil
      * @param code 
      * @returns 
      */
-    function findManagerName(code: string, arr?: ErmcpLoginUserEx[]) {
-        let result = code
+    function findManagerName(id: number, arr?: ErmcpLoginUserEx[]) {
+        console.log('dd', id, arr);
+
+        let result = '--'
         const temp = arr ? arr : tableList.value
         temp.forEach(el => {
             el.userlist.forEach(e => {
-                const { accountname, logincode } = e
-                if (logincode === code) {
+                const { accountname, logincode, loginid } = e
+                if (loginid === id) {
                     result = `${accountname}-${logincode}`
                 }
             })

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

@@ -468,6 +468,8 @@ export default defineComponent({
         const goodsList = ref<Goods[]>([]);
         watchEffect(() => {
             if (visible.value) {
+                console.log('merchandiserList', merchandiserList);
+
                 queryCustomList();
                 getDeliveryGoods();
                 queryTradeManager();

+ 9 - 1
src/views/information/spot-contract/components/delete/index.vue

@@ -16,7 +16,8 @@
                 :loading="loading"
                 @click="submit">确认删除</a-button>
     </template>
-    <InfoDetail :selectedRow="selectedRow" />
+    <InfoDetail :selectedRow="selectedRow"
+                :businessManager="businessManager" />
   </a-modal>
 </template>
 
@@ -28,6 +29,7 @@ import { Modal } from 'ant-design-vue';
 import { orderContractControl } from '@/views/information/spot-contract/components/setup';
 import { GldErmcpSpotContractOperateReq } from '@/services/proto/spotcontract/interface';
 import InfoDetail from '../infoDetail/index.vue';
+import { ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
 
 export default defineComponent({
     name: 'delete-spot-contract',
@@ -39,11 +41,17 @@ export default defineComponent({
             type: Object as PropType<Ermcp3ContractRsp>,
             default: {},
         },
+        businessManager: {
+            type: Array as PropType<ErmcpLoginUserEx[]>,
+            default: [],
+        },
     },
     setup(props, context) {
         const { visible, cancel } = closeModal('spot_contract_btn_delete');
         const loading = ref<boolean>(false);
         const maskClosableFlag = ref<boolean>(false);
+        console.log('selectedRow', props.selectedRow);
+
         // 获取 业务账户
         function submit() {
             Modal.confirm({

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

@@ -21,6 +21,7 @@
       </a-tab-pane>
     </a-tabs>
     <InfoDetail :selectedRow="selectedRow"
+                :businessManager="businessManager"
                 v-if="activeKey == 1" />
     <div class="tableDatas"
          v-else>

+ 9 - 4
src/views/information/spot-contract/components/infoDetail/index.vue

@@ -130,21 +130,21 @@
         </a-col>
         <a-col :span="12">
           <a-form-item label="业务员">
-            <span class="white">{{ formatValue(findManagerName(selectedRow.saleuserlogincode, businessManager) ) }}</span>
+            <span class="white">{{ formatValue(findManagerName(selectedRow.saleuserid, businessManager) ) }}</span>
           </a-form-item>
         </a-col>
       </a-row>
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="跟单员">
-            <span class="white">{{ formatValue(findManagerName(selectedRow.meruserlogincode, businessManager) ) }}</span>
+            <span class="white">{{ formatValue(findManagerName(selectedRow.meruserid, businessManager) ) }}</span>
           </a-form-item>
         </a-col>
-        <a-col :span="12">
+        <!-- <a-col :span="12">
           <a-form-item label="期货账户">
             <span class="white">{{ formatValue(selectedRow.accountid) }}</span>
           </a-form-item>
-        </a-col>
+        </a-col> -->
       </a-row>
       <a-row :gutter="24">
         <a-col :span="12">
@@ -163,6 +163,7 @@ import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
 import { formatTime, formatValue } from '@/common/methods';
 import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
 import { handlerManagerList } from '@/common/setup/user';
+import { ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
 
 export default defineComponent({
     name: 'spot-contract-info-detail',
@@ -172,6 +173,10 @@ export default defineComponent({
             type: Object as PropType<Ermcp3ContractRsp>,
             default: {},
         },
+        businessManager: {
+            type: Array as PropType<ErmcpLoginUserEx[]>,
+            default: [],
+        },
     },
     setup(props, context) {
         const loading = ref<boolean>(false);

+ 14 - 8
src/views/information/spot-contract/components/modify/index.vue

@@ -393,9 +393,11 @@
         </a-row>
         <a-row :gutter="24">
           <a-col :span="24">
-            <a-form-item label="备注">
+            <a-form-item label="备注"
+                         name="Remark">
               <a-input class="dialogInput"
                        style="width: 608px"
+                       v-model:value="formState.Remark"
                        placeholder="请输入备注" />
             </a-form-item>
           </a-col>
@@ -406,13 +408,11 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, onMounted, PropType, ref, toRaw, watchEffect } from 'vue';
+import { defineComponent, PropType, ref, watchEffect } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
-import { initData } from '@/common/methods';
 import { getUserName, getUsrId } from '@/services/bus/user';
 import { getGoodsList } from '@/services/bus/goods';
 import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
-import { ValidateErrorEntity } from 'ant-design-vue/lib/form/interface';
 import { FormState } from '../interface';
 import { formatTime } from '@/common/methods/format';
 import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
@@ -465,8 +465,8 @@ export default defineComponent({
         watchEffect(() => {
             // // formState.ContractAttachment = props.selectedRow.attachment
             // formState.ContractAttachment = new Uint8Array()
-            // formState.SpotGoodsBrandID = +props.selectedRow.spotcontractid
             if (visible.value) {
+                contractChange(formState.ContractType);
                 queryCustomList();
                 getDeliveryGoods();
                 goodsList.value = getGoodsList();
@@ -476,12 +476,18 @@ export default defineComponent({
                 });
                 queryTradeManager();
                 mergeTwoObj(formState, props.selectedRow);
-                const { deliverygoodsid, qty, price } = props.selectedRow;
-                deliverygoodsid && deliveryGoodsChange(deliverygoodsid);
+                const { deliverygoodsid, qty, price, wrstandardid, spotgoodsbrandid } = props.selectedRow;
+                if (deliverygoodsid) {
+                    deliveryGoodsChange(deliverygoodsid);
+                    if (wrstandardid) {
+                        WrStandardChange(wrstandardid);
+                        formState.WrStandardID = wrstandardid;
+                        formState.SpotGoodsBrandID = spotgoodsbrandid;
+                    }
+                }
                 formState.Qty = qty.toString();
                 formState.Price = price.toString();
                 formState.CurrencyID = props.selectedRow.currencyid;
-                contractChange(formState.ContractType);
             }
         });
         function submit() {

+ 2 - 2
src/views/information/spot-contract/list/checkpending/index.vue

@@ -50,12 +50,12 @@
         </template>
         <!-- 业务员 -->
         <template #saleuserlogincode="{ record }">
-          <a>{{ findManagerName(record.saleuserlogincode) }}</a>
+          <a>{{ findManagerName(record.saleuserid) }}</a>
         </template>
 
         <!-- 跟单员 -->
         <template #meruserlogincode="{ record }">
-          <a>{{ findManagerName(record.meruserlogincode) }}</a>
+          <a>{{ findManagerName(record.meruserid) }}</a>
         </template>
 
       </a-table>

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

@@ -50,12 +50,12 @@
 
         <!-- 业务员 -->
         <template #saleuserlogincode="{ record }">
-          <a>{{ findManagerName(record.saleuserlogincode) }}</a>
+          <a>{{ findManagerName(record.saleuserid) }}</a>
         </template>
 
         <!-- 跟单员 -->
         <template #meruserlogincode="{ record }">
-          <a>{{ findManagerName(record.meruserlogincode) }}</a>
+          <a>{{ findManagerName(record.meruserid) }}</a>
         </template>
 
       </a-table>

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

@@ -50,12 +50,12 @@
         </template>
         <!-- 业务员 -->
         <template #saleuserlogincode="{ record }">
-          <a>{{ findManagerName(record.saleuserlogincode) }}</a>
+          <a>{{ findManagerName(record.saleuserid) }}</a>
         </template>
 
         <!-- 跟单员 -->
         <template #meruserlogincode="{ record }">
-          <a>{{ findManagerName(record.meruserlogincode) }}</a>
+          <a>{{ findManagerName(record.meruserid) }}</a>
         </template>
       </a-table>
     </contextMenu>

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

@@ -50,12 +50,12 @@
         </template>
         <!-- 业务员 -->
         <template #saleuserlogincode="{ record }">
-          <a>{{ findManagerName(record.saleuserlogincode) }}</a>
+          <a>{{ findManagerName(record.saleuserid) }}</a>
         </template>
 
         <!-- 跟单员 -->
         <template #meruserlogincode="{ record }">
-          <a>{{ findManagerName(record.meruserlogincode) }}</a>
+          <a>{{ findManagerName(record.meruserid) }}</a>
         </template>
       </a-table>
     </contextMenu>