huangbin 4 gadi atpakaļ
vecāks
revīzija
8aa41ff70e

+ 78 - 44
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_bargain/components/bargain_detail/index.vue

@@ -9,13 +9,22 @@
       <a-form class="inlineForm dialogForm">
         <div class="formBar">
           <a-table :columns="columns"
-                   class="dialogTable dialogTable2"
+                   class="dialogTable dialogTable2 expandLeftTable"
                    :pagination="false"
                    :expandIcon="expandIcon"
+                   :expandedRowKeys="expandedRowKeys"
                    :loading="loading"
+                   :customRow="Rowclick"
                    :expandIconAsCell="false"
-                   rowKey="applyprice"
+                   rowKey="key"
                    :data-source="tableList">
+            <!-- 额外的展开行 -->
+            <template #expandedRowRender="{ record }">
+              <BtnList :btnList="handleBtnList(record)"
+                       class="btn-list-sticky"
+                       :record="record"
+                       @click="action" />
+            </template>
             <template #applystatus="{ text }">
               <span>{{ getBarmaginApplyStatus(text) }}</span>
             </template>
@@ -23,20 +32,12 @@
         </div>
         <a-row :gutter="24"
                type="flex"
-               justify="center"
-               v-if="isShowBtn()">
+               justify="center">
           <a-col :span="24"
                  class="fixedBtns">
             <a-form-item class="btnCenter">
               <a-button class="cancelBtn"
-                        v-if="isMy()"
-                        @click="cancelAction">撤销</a-button>
-              <template v-else>
-                <a-button class="listedBtn ml10"
-                          @click="submit">确认</a-button>
-                <a-button class="ml10 cancelBtn"
-                          @click="refuse">拒绝</a-button>
-              </template>
+                        @click="cancel">取消</a-button>
             </a-form-item>
           </a-col>
         </a-row>
@@ -46,45 +47,56 @@
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, ref } from 'vue';
-import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
+import { BtnListType } from '@/common/components/btnList/interface';
 import Drawer from '@/common/components/drawer/index.vue';
-import { QueryWrPositionReq, QueryWrTradeBargainApplyReq, QueryWrTradeBargainApplyQsp, WrPosition } from '@/services/go/wrtrade/interface';
-import { getUserId } from '@/services/bus/account';
+import { getBarmaginApplyStatus } from '@/common/constants/enumsName';
+import { BtnList, ModalEnum, queryTableList } from '@/common/export/commonTable';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { hdWROrder } from '@/services/proto/warehousetrade';
-import { v4 as uuidv4 } from 'uuid';
-import moment from 'moment';
-import { ModalEnum } from '@/common/constants/modalNameEnum';
-import { queryTableList } from '@/common/setup/table';
-import { queryQueryWrTradeBargainApply } from '@/services/go/wrtrade';
-import { getSpotWarrantBargainDetailColumns } from '../../setup';
-import { wrBargainNoAgree, wrBargainBack } from '@/services/proto/WrBargain';
 import { _closeModal } from '@/common/setup/modal/modal';
+import { getTableEvent } from '@/common/setup/table';
+import { expandIcon } from '@/common/setup/table/clolumn';
+import { queryQueryWrTradeBargainApply } from '@/services/go/wrtrade';
+import { QueryWrTradeBargainApplyQsp, QueryWrTradeBargainApplyReq, WrOrderDetail } from '@/services/go/wrtrade/interface';
+import { wrBargainBack, wrBargainNoAgree } from '@/services/proto/WrBargain';
 import { WrBargainBackReq, WrBargainNoAgreeReq } from '@/services/proto/WrBargain/interface';
 import Long from 'long';
-import { getBarmaginApplyStatus } from '@/common/constants/enumsName';
+import { defineComponent, PropType, ref } from 'vue';
+import { getSpotWarrantBargainDetailColumns } from '../../setup';
 
 export default defineComponent({
     name: ModalEnum.spot_warrant_bargain_detail,
-    components: { Drawer },
+    components: { Drawer, BtnList },
     emits: ['cancel', 'update'],
     props: {
         selectedRow: {
-            type: Object as PropType<QueryWrTradeBargainApplyQsp>,
+            type: Object as PropType<QueryWrTradeBargainApplyQsp | WrOrderDetail>,
             default: {},
         },
+        isMy: {
+            type: Boolean,
+            default: true,
+        },
     },
     setup(props, context) {
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList<QueryWrTradeBargainApplyQsp>();
         const { visible, cancel } = _closeModal(context);
-        const { wrbargainid } = props.selectedRow;
         const param: QueryWrTradeBargainApplyReq = {
-            haswr: 0,
+            haswr: 1,
             wrtradeorderid: props.selectedRow.wrtradeorderid,
         };
-        // 判断是否有 待确认 状态的 数据,如果有需要显示操作按钮,没就无操作按钮
+        queryTable(queryQueryWrTradeBargainApply, param).then((res) => {
+            const arr = res.map((el) => {
+                return Object.assign(el, { key: el.wrbargainid });
+            });
+            // 时间 倒序排序
+            tableList.value = arr.sort((a, b) => {
+                const time1 = new Date(a.applytime).getTime();
+                const time2 = new Date(b.applytime).getTime();
+                return time2 - time1;
+            });
+        });
+
         function isShowBtn() {
             let result = false;
             tableList.value.forEach((el) => {
@@ -94,19 +106,37 @@ export default defineComponent({
             });
             return result;
         }
-        queryTable(queryQueryWrTradeBargainApply, param).then((res) => {
-            // 时间 倒序排序
-            tableList.value = res.sort((a, b) => {
-                const time1 = new Date(a.applytime).getTime();
-                const time2 = new Date(b.applytime).getTime();
-                return time2 - time1;
-            });
-        });
         // 我对别人的 => 撤销
         // 别人对我的 => 确认、拒绝
-        const { isMy, getColums } = getSpotWarrantBargainDetailColumns(props.selectedRow);
+        const { getColums, isMy } = getSpotWarrantBargainDetailColumns(props.isMy);
+        function handleBtnList(record: QueryWrTradeBargainApplyQsp) {
+            const result = ref<BtnListType[]>([]);
+            if (isMy()) {
+                result.value = [{ lable: '撤销', code: 'cancel', className: 'btnDanger' }];
+            } else {
+                result.value = [
+                    { lable: '确认', code: 'submit', className: 'operBtn' },
+                    { lable: '拒绝', code: 'refuse', className: 'btnDanger' },
+                ];
+            }
+            return record.applystatus === 1 ? result.value : [];
+        }
+        function action({ code }: BtnListType, { wrbargainid }: QueryWrTradeBargainApplyQsp) {
+            switch (code) {
+                case 'cancel':
+                    cancelAction(wrbargainid);
+                    break;
+                case 'submit':
+                    submit(wrbargainid);
+                    break;
+                case 'refuse':
+                    refuse(wrbargainid);
+                    break;
+            }
+        }
+
         // 确认
-        function submit() {
+        function submit(wrbargainid: string) {
             const param: WrBargainNoAgreeReq = {
                 WrBargainID: Long.fromString(wrbargainid),
                 Status: 1,
@@ -116,7 +146,7 @@ export default defineComponent({
             });
         }
         // 拒绝
-        function refuse() {
+        function refuse(wrbargainid: string) {
             const param: WrBargainNoAgreeReq = {
                 WrBargainID: Long.fromString(wrbargainid),
                 Status: 2,
@@ -126,7 +156,7 @@ export default defineComponent({
             });
         }
         // 撤销
-        function cancelAction() {
+        function cancelAction(wrbargainid: string) {
             const param: WrBargainBackReq = {
                 WrBargainID: Long.fromString(wrbargainid),
             };
@@ -135,17 +165,21 @@ export default defineComponent({
             });
         }
         return {
-            visible: true,
+            visible,
             columns: getColums(),
             loading,
             tableList,
             isMy,
             submit,
             refuse,
-            cancel,
             cancelAction,
+            cancel,
             getBarmaginApplyStatus,
             isShowBtn,
+            handleBtnList,
+            action,
+            expandIcon,
+            ...getTableEvent<QueryWrTradeBargainApplyQsp>(),
         };
     },
 });

+ 2 - 4
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_bargain/setup.ts

@@ -1,5 +1,3 @@
-import { getUserId } from "@/services/bus/account";
-import { QueryWrTradeBargainApplyQsp } from "@/services/go/wrtrade/interface";
 
 export function getSpotWarrantBargainColumns() {
     const columns = [
@@ -25,7 +23,7 @@ export function getSpotWarrantBargainColumns() {
     })
 }
 
-export function getSpotWarrantBargainDetailColumns(selectedRow: QueryWrTradeBargainApplyQsp) {
+export function getSpotWarrantBargainDetailColumns(is: boolean) {
     const columns = [
         { title: '数量', key: 'applyqty', dataIndex: 'applyqty', align: 'center' },
         { title: '价格', key: 'applyprice', dataIndex: 'applyprice', align: 'center' },
@@ -33,7 +31,7 @@ export function getSpotWarrantBargainDetailColumns(selectedRow: QueryWrTradeBarg
         { title: '状态', key: 'applystatus', dataIndex: 'applystatus', align: 'center', slots: { customRender: 'applystatus' } },
     ];
     function isMy() {
-        return selectedRow.userid === getUserId();
+        return is
     }
     function getColums() {
         return isMy() ? columns : [...columns, { title: '议价人', key: 'username', dataIndex: 'username', align: 'center' }]

+ 281 - 296
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/components/listed/index.vue

@@ -1,304 +1,289 @@
 <template>
-    <!-- 预售仓单 现货明细 挂牌 -->
-    <Drawer
-        :title="'挂牌'"
-        :placement="'right'"
-        class="delistingBottom650"
-        :visible="visible"
-        @cancel="cancel"
-    >
-        <div class="listed">
-            <div class="condition">
-                <a-button class="conditionBtn">{{selectedRow.deliverygoodsname}}</a-button>
-                <a-button class="conditionBtn">{{selectedRow.wrtypename}}</a-button>
-                <a-button class="conditionBtn">{{selectedRow.warehousename}}</a-button>
-            </div>
+  <!-- 预售仓单 现货明细 挂牌 -->
+  <Drawer :title="'挂牌'"
+          :placement="'right'"
+          class="delistingBottom650"
+          :visible="visible"
+          @cancel="cancel">
+    <div class="listed">
+      <div class="condition">
+        <a-button class="conditionBtn">{{selectedRow.deliverygoodsname}}</a-button>
+        <a-button class="conditionBtn">{{selectedRow.wrtypename}}</a-button>
+        <a-button class="conditionBtn">{{selectedRow.warehousename}}</a-button>
+      </div>
 
-            <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
-                <div class="formBar">
-                    <a-row :gutter="24">
-                        <a-col :span="12">
-                            <a-form-item label="挂牌方式" name="WRPriceType">
-                                <a-select
-                                    class="inlineFormSelect"
-                                    default-value="1"
-                                    v-model:value="formState.WRPriceType"
-                                    style="width: 140px"
-                                >
-                                    <a-select-option :value="1">一口价</a-select-option>
-                                    <a-select-option :value="2">浮动价</a-select-option>
-                                    <a-select-option :value="3">贸易圈</a-select-option>
-                                </a-select>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12" v-if="isFixed()">
-                            <a-form-item label="挂牌价" name="FixedPrice">
-                                <a-input-number
-                                    class="dialogInput"
-                                    :min="0"
-                                    style="width: 140px"
-                                    v-model:value="formState.FixedPrice"
-                                    placeholder="请输入挂牌价"
-                                />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12" v-if="isBlocs()">
-                            <a-form-item label="挂牌价格" name="FixedPrice" class="inputIconBox">
-                                <a-input-number
-                                    class="commonInput"
-                                    style="width: 140px"
-                                    :min="0"
-                                    v-model:value="formState.FixedPrice"
-                                />
-                                <a-checkbox class="commonCheckbox" v-model:checked="priceCheck">可议价</a-checkbox>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12" v-if="isFloat()">
-                            <a-form-item label="基差" name="PriceMove">
-                                <a-input-number
-                                    class="commonInput"
-                                    v-model:value="formState.PriceMove"
-                                    style="width: 140px"
-                                />
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="12">
-                            <a-form-item label="挂牌数量" name="OrderQty">
-                                <a-input-number
-                                    class="dialogInput"
-                                    style="width: 140px !important"
-                                    :min="0"
-                                    v-model:value="formState.OrderQty"
-                                    placeholder="请输入挂牌数量"
-                                />
-                                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
-                                <a-checkbox
-                                    class="commonCheckbox"
-                                    v-if="isBlocs()"
-                                    v-model:checked="numCheck"
-                                >整单</a-checkbox>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12" v-if="!numCheck">
-                            <a-form-item label="起摘数量" class="relative" name="DelistMinQty">
-                                <a-input-number
-                                    class="commonInput"
-                                    :min="0"
-                                    v-model:value="formState.DelistMinQty"
-                                    style="width: 140px !important"
-                                />
-                                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
-                                <div class="tip">
-                                    <span>最小单位:</span>
-                                    <span>{{selectedRow.minivalue}}{{selectedRow.enumdicname}}</span>
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="12" class="mt-20">
-                            <a-form-item>
-                                <a-slider
-                                    v-model:value="formState.OrderQty"
-                                    ::min="0"
-                                    :max="selectedRow.enableqty"
-                                    class="formSlider"
-                                    style="width: 140px;"
-                                />
-                                <div class="unit">
-                                    <span>0</span>
-                                    <span>{{selectedRow.enableqty}}{{selectedRow.enumdicname}}</span>
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12">&nbsp;</a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="12">
-                            <a-form-item label="交收月" name="DeliveryMonth">
-                                <a-month-picker
-                                    style="width: 140px"
-                                    v-model:value="formState.DeliveryMonth"
-                                    :allowClear="false"
-                                    class="commonDatePicker dialogDatePicker"
-                                />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12">
-                            <a-form-item>&nbsp;</a-form-item>
-                        </a-col>
-                    </a-row>
-                    <template v-if="isBlocs()">
-                        <a-row :gutter="24">
-                            <a-col :span="12">
-                                <a-form-item label="履约保证金" name="margin">
-                                    <a-input-number
-                                        class="commonInput"
-                                        v-model:value="formState.margin"
-                                        :min="0"
-                                        style="width: 140px"
-                                    />
-                                    <span class="input-enumdicname">%</span>
-                                </a-form-item>
-                            </a-col>
-                            <a-col :span="12">
-                                <a-form-item label="挂牌有效期" name="vidaliteTime" class="inputIconBox">
-                                    <a-date-picker
-                                        style="width: 140px"
-                                        v-model:value="formState.vidaliteTime"
-                                        :allowClear="false"
-                                        class="commonDatePicker dialogDatePicker"
-                                    />
-                                </a-form-item>
-                            </a-col>
-                        </a-row>
-                        <a-row :gutter="24">
-                            <a-col :span="12">
-                                <a-form-item label="履约方式" class="inputIconBox">
-                                    <span
-                                        :class="['clickBox', formState.permanceTempName ? 'white' : '']"
-                                        style="width: 140px"
-                                        @click="openPermance"
-                                    >{{formState.permanceTempName ? formState.permanceTempName : '选择履约模板'}}</span>
-                                    <svg
-                                        class="icon svg-icon"
-                                        aria-hidden="true"
-                                        @click="openPermance"
-                                    >
-                                        <use xlink:href="#icon-moban" />
-                                    </svg>
-                                </a-form-item>
-                            </a-col>
-                            <a-col :span="12">
-                                <a-form-item label="指定朋友" class="inputIconBox">
-                                    <span
-                                        :class="['clickBox', getFriendLength() ? 'white' : '']"
-                                        style="width: 140px"
-                                        @click="openFriend"
-                                    >{{getFriendLength() ? `已选${getFriendLength() }人` : '选择朋友'}}</span>
-                                    <svg
-                                        class="icon svg-icon"
-                                        aria-hidden="true"
-                                        @click="openFriend"
-                                    >
-                                        <use xlink:href="#icon-pengyou1" />
-                                    </svg>
-                                    <a-checkbox
-                                        class="commonCheckbox"
-                                        v-model:checked="friendCheck"
-                                        @change="limiteFriends"
-                                    >不限</a-checkbox>
-                                </a-form-item>
-                            </a-col>
-                        </a-row>
-                    </template>
-                    <a-row :gutter="24" v-if="isFloat()">
-                        <a-col :span="24">
-                            <a-form-item label="行情商品" name="goodsid">
-                                <!-- <a-select class="inlineFormSelect"
+      <a-form class="inlineForm dialogForm"
+              ref="formRef"
+              :model="formState"
+              :rules="rules">
+        <div class="formBar">
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="挂牌方式"
+                           name="WRPriceType">
+                <a-select class="inlineFormSelect"
+                          default-value="1"
+                          v-model:value="formState.WRPriceType"
+                          style="width: 140px">
+                  <a-select-option :value="1">一口价</a-select-option>
+                  <a-select-option :value="2">浮动价</a-select-option>
+                  <a-select-option :value="3">贸易圈</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12"
+                   v-if="isFixed()">
+              <a-form-item label="挂牌价"
+                           name="FixedPrice">
+                <a-input-number class="dialogInput"
+                                :min="0"
+                                style="width: 140px"
+                                v-model:value="formState.FixedPrice"
+                                placeholder="请输入挂牌价" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12"
+                   v-if="isBlocs()">
+              <a-form-item label="挂牌价格"
+                           name="FixedPrice"
+                           class="inputIconBox">
+                <a-input-number class="commonInput"
+                                style="width: 140px"
+                                :min="0"
+                                v-model:value="formState.FixedPrice" />
+                <a-checkbox class="commonCheckbox"
+                            v-model:checked="priceCheck">可议价</a-checkbox>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12"
+                   v-if="isFloat()">
+              <a-form-item label="基差"
+                           name="PriceMove">
+                <a-input-number class="commonInput"
+                                v-model:value="formState.PriceMove"
+                                style="width: 140px" />
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="挂牌数量"
+                           name="OrderQty">
+                <a-input-number class="dialogInput"
+                                style="width: 140px !important"
+                                :min="0"
+                                v-model:value="formState.OrderQty"
+                                placeholder="请输入挂牌数量" />
+                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
+                <a-checkbox class="commonCheckbox"
+                            v-if="isBlocs()"
+                            v-model:checked="numCheck">整单</a-checkbox>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12"
+                   v-if="!numCheck">
+              <a-form-item label="起摘数量"
+                           class="relative"
+                           name="DelistMinQty">
+                <a-input-number class="commonInput"
+                                :min="0"
+                                v-model:value="formState.DelistMinQty"
+                                style="width: 140px !important" />
+                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
+                <div class="tip">
+                  <span>最小单位:</span>
+                  <span>{{selectedRow.minivalue}}{{selectedRow.enumdicname}}</span>
+                </div>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12"
+                   class="mt-20">
+              <a-form-item>
+                <a-slider v-model:value="formState.OrderQty"
+                          ::min="0"
+                          :max="selectedRow.enableqty"
+                          class="formSlider"
+                          style="width: 140px;" />
+                <div class="unit">
+                  <span>0</span>
+                  <span>{{selectedRow.enableqty}}{{selectedRow.enumdicname}}</span>
+                </div>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">&nbsp;</a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="交收月"
+                           name="DeliveryMonth">
+                <a-month-picker style="width: 140px"
+                                v-model:value="formState.DeliveryMonth"
+                                :allowClear="false"
+                                class="commonDatePicker dialogDatePicker" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item>&nbsp;</a-form-item>
+            </a-col>
+          </a-row>
+          <template v-if="isBlocs()">
+            <a-row :gutter="24">
+              <a-col :span="12">
+                <a-form-item label="履约保证金"
+                             name="margin">
+                  <a-input-number class="commonInput"
+                                  v-model:value="formState.margin"
+                                  :min="0"
+                                  style="width: 140px" />
+                  <span class="input-enumdicname">%</span>
+                </a-form-item>
+              </a-col>
+              <a-col :span="12">
+                <a-form-item label="挂牌有效期"
+                             name="vidaliteTime"
+                             class="inputIconBox">
+                  <a-date-picker style="width: 140px"
+                                 v-model:value="formState.vidaliteTime"
+                                 :allowClear="false"
+                                 class="commonDatePicker dialogDatePicker" />
+                </a-form-item>
+              </a-col>
+            </a-row>
+            <a-row :gutter="24">
+              <a-col :span="12">
+                <a-form-item label="履约方式"
+                             class="inputIconBox">
+                  <span :class="['clickBox', formState.permanceTempName ? 'white' : '']"
+                        style="width: 140px"
+                        @click="openPermance">{{formState.permanceTempName ? formState.permanceTempName : '选择履约模板'}}</span>
+                  <svg class="icon svg-icon"
+                       aria-hidden="true"
+                       @click="openPermance">
+                    <use xlink:href="#icon-moban" />
+                  </svg>
+                </a-form-item>
+              </a-col>
+              <a-col :span="12">
+                <a-form-item label="指定朋友"
+                             class="inputIconBox">
+                  <span :class="['clickBox', getFriendLength() ? 'white' : '']"
+                        style="width: 140px"
+                        @click="openFriend">{{getFriendLength() ? `已选${getFriendLength() }人` : '选择朋友'}}</span>
+                  <svg class="icon svg-icon"
+                       aria-hidden="true"
+                       @click="openFriend">
+                    <use xlink:href="#icon-pengyou1" />
+                  </svg>
+                  <a-checkbox class="commonCheckbox"
+                              v-model:checked="friendCheck"
+                              @change="limiteFriends">不限</a-checkbox>
+                </a-form-item>
+              </a-col>
+            </a-row>
+          </template>
+          <a-row :gutter="24"
+                 v-if="isFloat()">
+            <a-col :span="24">
+              <a-form-item label="行情商品"
+                           name="goodsid">
+                <!-- <a-select class="inlineFormSelect"
                           style="width: 135px"
                           placeholder="请择交易所">
                                 </a-select>-->
-                                <a-select
-                                    class="inlineFormSelect ml5"
-                                    @change="handleGoodsGroups"
-                                    style="width: 135px"
-                                    v-model:value="formState.goodsgroupid"
-                                    placeholder="请选择商品"
-                                >
-                                    <a-select-option
-                                        v-for="item in goodsGroup"
-                                        :value="item.goodsgroupid"
-                                        :key="item.goodsgroupid"
-                                    >{{item.goodsgroupname}}</a-select-option>
-                                </a-select>
-                                <a-select
-                                    class="inlineFormSelect ml5"
-                                    style="width: 135px"
-                                    @change="handleGoodsChange"
-                                    v-model:value="formState.goodsid"
-                                    placeholder="请选择合约"
-                                >
-                                    <a-select-option
-                                        v-for="item in goodsList"
-                                        :value="item.goodsid"
-                                        :key="item.goodsid"
-                                    >{{item.goodsname}}</a-select-option>
-                                </a-select>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="24" v-if="isFloat()" class="relative">
-                            <a-form-item :label="'估算金额'">
-                                <span class="white ml8">{{getWrMoney()}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="isFixed()" class="relative">
-                            <a-form-item :label="'挂牌金额'">
-                                <span class="white ml8">{{getWrMoney()}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="isBlocs()" class="relative">
-                            <a-form-item :label="'挂牌金额'">
-                                <span class="white ml8">{{getMoney()}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="getWrMargin() && !isBlocs()">
-                            <a-form-item :label="getWrMargin() ? '履约保证金' : ''">
-                                <span class="white ml8">{{getWrMargin()}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="isBlocs()">
-                            <a-form-item label="履约保证金">
-                                <span class="white ml8">{{getMargin()}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="可用资金">
-                                <span class="white ml8">{{getCanUseMoney(handleSelectedAccount())}}</span>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                </div>
-                <a-row :gutter="24">
-                    <a-col :span="24" class="fixedBtns">
-                        <a-form-item class="btnCenter">
-                            <a-button
-                                class="listedBtn"
-                                :loading="loading"
-                                :disabled="loading"
-                                @click="submit"
-                            >卖出</a-button>
-                            <a-button
-                                class="ml10 cancelBtn"
-                                :loading="loading"
-                                :disabled="loading"
-                                @click="cancel"
-                            >取消</a-button>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </a-form>
+                <a-select class="inlineFormSelect ml5"
+                          @change="handleGoodsGroups"
+                          style="width: 135px"
+                          v-model:value="formState.goodsgroupid"
+                          placeholder="请选择商品">
+                  <a-select-option v-for="item in goodsGroup"
+                                   :value="item.goodsgroupid"
+                                   :key="item.goodsgroupid">{{item.goodsgroupname}}
+                  </a-select-option>
+                </a-select>
+                <a-select class="inlineFormSelect ml5"
+                          style="width: 135px"
+                          @change="handleGoodsChange"
+                          v-model:value="formState.goodsid"
+                          placeholder="请选择合约">
+                  <a-select-option v-for="item in goodsList"
+                                   :value="item.goodsid"
+                                   :key="item.goodsid">{{item.goodsname}}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="24"
+                   v-if="isFloat()"
+                   class="relative">
+              <a-form-item :label="'估算金额'">
+                <span class="white ml8">{{getWrMoney()}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="isFixed()"
+                   class="relative">
+              <a-form-item :label="'挂牌金额'">
+                <span class="white ml8">{{getWrMoney()}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="isBlocs()"
+                   class="relative">
+              <a-form-item :label="'挂牌金额'">
+                <span class="white ml8">{{getMoney()}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="getWrMargin() && !isBlocs()">
+              <a-form-item :label="getWrMargin() ? '履约保证金' : ''">
+                <span class="white ml8">{{getWrMargin()}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="isBlocs()">
+              <a-form-item label="履约保证金">
+                <span class="white ml8">{{getMargin()}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="可用资金">
+                <span class="white ml8">{{getCanUseMoney(handleSelectedAccount())}}</span>
+              </a-form-item>
+            </a-col>
+          </a-row>
         </div>
-    </Drawer>
-    <!-- 选择朋友 -->
-    <Friend
-        v-if="showFriend"
-        :friends="formState.friends"
-        :position="'bottom'"
-        @cancel="chooseFriend"
-        @update="chooseFriend"
-    />
-    <!-- 选择履约模板 -->
-    <Permance
-        v-if="showPermance"
-        :position="'bottom'"
-        @cancel="choosePermance"
-        @update="choosePermance"
-    />
+        <a-row :gutter="24">
+          <a-col :span="24"
+                 class="fixedBtns">
+            <a-form-item class="btnCenter">
+              <a-button class="listedBtn"
+                        :loading="loading"
+                        :disabled="loading"
+                        @click="submit">卖出</a-button>
+              <a-button class="ml10 cancelBtn"
+                        :loading="loading"
+                        :disabled="loading"
+                        @click="cancel">取消</a-button>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+  </Drawer>
+  <!-- 选择朋友 -->
+  <Friend v-if="showFriend"
+          :friends="formState.friends"
+          :position="'bottom'"
+          @cancel="chooseFriend"
+          @update="chooseFriend" />
+  <!-- 选择履约模板 -->
+  <Permance v-if="showPermance"
+            :position="'bottom'"
+            @cancel="choosePermance"
+            @update="choosePermance" />
 </template>
 
 <script lang="ts">
@@ -384,7 +369,7 @@ export default defineComponent({
                 validateAction<ListingForm>(formRef, formState).then((res) => {
                     const wrGoodsInfo: WRGoodsInfo = {
                         GoodsID: props.selectedRow.deliverygoodsid as number, // uint32 配置商品ID
-                        GoodsCode: props.selectedRow.deliverygoodscode, // string 配置商品代码
+                        GoodsCode: findGoodsCode(res.goodsid as number) as string, // string 配置商品代码
                         PriceFactor: 1, // double 商品价格系数
                         PriceMove: 0, // double 商品升贴水值
                         WeightRatio: 1, // double 商品重量系数

+ 2 - 1
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_pending_order/index.vue

@@ -38,6 +38,7 @@
   <component :is="componentId"
              v-if="componentId"
              :selectedRow="selectedRow"
+             :isMy="false"
              @cancel="closeComponent"></component>
 </template>
 
@@ -61,7 +62,7 @@ export default defineComponent({
         BtnList,
         [ModalEnum.pre_sale_warehouse_receipt_pending_order_cancel_order]: defineAsyncComponent(() => import('./components/cancle/index.vue')),
         detail: defineAsyncComponent(() => import('./components/detail/index.vue')),
-        spot_warrant_pending_order_bargain_order: defineAsyncComponent(() => import('@/views/order/spot_warran/components/spot_warrant_bargain/components/bargain_detail/index.vue')),
+        pre_sale_warehouse_receipt_pending_order_bargain_order: defineAsyncComponent(() => import('@/views/order/spot_warran/components/spot_warrant_bargain/components/bargain_detail/index.vue')),
     },
     setup() {
         // 表格列表数据