xkwg 4 lat temu
rodzic
commit
1d1d12f3bf

+ 114 - 17
src/views/business/purchase/components/detail/index.vue

@@ -1,30 +1,124 @@
 <template>
-  <!-- 采购详情-->
-  <a-modal class="custom-detail"
-           title="详情"
-           v-model:visible="visible"
-           @cancel="cancel"
-           width="890px">
-    <template #footer>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading"
-                @click="submit">关闭</a-button>
-    </template>
-
-  </a-modal>
+    <!-- 采购详情-->
+    <a-modal class="custom-detail"
+             title="详情"
+             v-model:visible="visible"
+             @cancel="cancel"
+             width="890px">
+        <template #footer>
+            <a-button key="submit"
+                      type="primary"
+                      :loading="loading"
+                      @click="submit">关闭
+            </a-button>
+        </template>
+        <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">{{ 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="销售方">
+                            <span class="white">{{ formatValue(selectedRow.enumdicname) }}</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"
+                    :form="form"
+                    @submit="handleSearch">
+                <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"
+                    :form="form"
+                    @submit="handleSearch">
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="升贴水">
+                            <span class="white">{{ formatValue(selectedRow.pricemove) }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+            </a-form>
+        </fieldset>
+    </a-modal>
 </template>
 
 <script lang="ts">
-import { defineComponent, ref } from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
+import {defineComponent, PropType, ref} from 'vue';
+import {closeModal} from '@/common/setup/modal/index';
+import {Ermcp3ContractRsp} from "@/services/go/ermcp/spot-contract/interface";
+import {formatValue} from "@/common/methods";
+import {Ermcp3SellBuyContract} from "@/services/go/ermcp/purchase/interface";
+import {getPriceTypeName} from "@/views/business/purchase/setup";
 
 export default defineComponent({
     name: 'purchase_pending-detail',
     components: {},
+    props: {
+        selectedRow: {
+            type: Object as PropType<Ermcp3SellBuyContract>,
+            default: {},
+        },
+    },
     setup() {
-        const { visible, cancel } = closeModal('detail');
+        const {visible, cancel} = closeModal('detail');
         const loading = ref<boolean>(false);
+
         function submit() {
             loading.value = true;
             setTimeout(() => {
@@ -32,11 +126,14 @@ export default defineComponent({
                 cancel();
             }, 2000);
         }
+
         return {
             visible,
             cancel,
             submit,
             loading,
+            formatValue,
+            getPriceTypeName,
         };
     },
 });

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

@@ -26,7 +26,7 @@
       </a-table>
     </contextMenu>
     <!-- 详情 -->
-    <Detail />
+    <Detail :selectedRow="selectedRow" />
     <!-- 采购点价登记 -->
     <SomePrice />
   </div>