Jelajahi Sumber

commit 现货合同详情

xkwg 4 tahun lalu
induk
melakukan
d719fef3e8

+ 11 - 27
src/views/information/custom/compoments/detail/index.vue

@@ -17,7 +17,7 @@
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="客户类型">
-            <span class="white">{{ detail.userinfotype === '2' ? '企业' : '个人' }}</span>
+            <span class="white">{{ selectedRow.userinfotype === '2' ? '企业' : '个人' }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
@@ -29,31 +29,31 @@
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="企业简称">
-            <span class="white">{{ detail.nickname }}</span>
+            <span class="white">{{ formatValue(selectedRow.nickname) }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="证件类型">
-            <span class="white">{{ detail.cardtypename }}</span>
+            <span class="white">{{ formatValue(selectedRow.cardtypename) }}</span>
           </a-form-item>
         </a-col>
       </a-row>
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="法定代表人">
-            <span class="white">{{ detail.legalpersonname }}</span>
+            <span class="white">{{ formatValue(selectedRow.legalpersonname) }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="证件号码">
-            <span class="white">{{ detail.cardnum }}</span>
+            <span class="white">{{ formatValue(selectedRow.cardnum) }}</span>
           </a-form-item>
         </a-col>
       </a-row>
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="纳税人识别号">
-            <span class="white">{{ detail.taxpayernum }}</span>
+            <span class="white">{{ formatValue(selectedRow.taxpayernum) }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
@@ -67,19 +67,19 @@
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="联系人">
-            <span class="white">{{ detail.contactname }}</span>
+            <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
           <a-form-item label="联系人手机号">
-            <span class="white">{{ detail.mobile }}</span>
+            <span class="white">{{ formatValue(selectedRow.mobile) }}</span>
           </a-form-item>
         </a-col>
       </a-row>
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="联系电话">
-            <span class="white">{{ detail.telphone }}</span>
+            <span class="white">{{ formatValue(selectedRow.telphone) }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
@@ -91,14 +91,14 @@
       <a-row :gutter="24">
         <a-col :span="24">
           <a-form-item label="通讯地址">
-            <span class="white">{{ detail.address }}</span>
+            <span class="white">{{ selectedRow.address }}</span>
           </a-form-item>
         </a-col>
       </a-row>
       <a-row :gutter="24">
         <a-col :span="24">
           <a-form-item label="备注">
-            <span class="white">{{ detail.remark }}</span>
+            <span class="white">{{ selectedRow.remark }}</span>
           </a-form-item>
         </a-col>
       </a-row>
@@ -127,21 +127,6 @@ export default defineComponent({
         console.log('props', props.selectedRow);
 
         const { visible, cancel } = closeModal('detail');
-        const detail = reactive({
-            nickname: props.selectedRow.nickname || '--',
-            userinfotype: props.selectedRow.userinfotype || '--',
-            customername: props.selectedRow.customername || '--',
-            cardtypename: props.selectedRow.cardtypename || '--',
-            legalpersonname: props.selectedRow.legalpersonname || '--',
-            cardnum: props.selectedRow.cardnum || '--',
-            taxpayernum: props.selectedRow.taxpayernum || '--',
-            contactname: props.selectedRow.contactname || '--',
-            mobile: props.selectedRow.mobile || '--',
-            telphone: props.selectedRow.telphone || '--',
-            status: getStatusName(props.selectedRow.status) || '--',
-            address: props.selectedRow.address || '--',
-            remark: props.selectedRow.remark || '--',
-        });
         const loading = ref<boolean>(false);
         function submit() {
             loading.value = true;
@@ -155,7 +140,6 @@ export default defineComponent({
             cancel,
             submit,
             loading,
-            detail,
             formatValue,
             getStatusName,
         };

+ 198 - 106
src/views/information/spot-contract/components/detail/index.vue

@@ -1,118 +1,206 @@
 <template>
-  <!-- 现货合同详情-->
-  <a-modal class="add-custom 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-form class="inlineForm"
-            :form="form"
-            @submit="handleSearch">
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="客户类型">
-            <span class="white">企业</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="企业名称">
-            <span class="white">深圳市前海矿业有限公司</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="企业简称">
-            <span class="white">前海矿业</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="证件类型">
-            <span class="white">营业执照</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="法定代表人">
-            <span class="white">李顺利</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="证件号码">
-            <span class="white">4328648236492432</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="纳税人识别号">
-            <span class="white">57465736DR46456</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="营业执照">
-            <div class="upload">
-              <a class="blue">查看附件</a>
-            </div>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="联系人">
-            <span class="white">王平</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="联系人手机号">
-            <span class="white">13745653421</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="联系电话">
-            <span class="white">0755-34342544</span>
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="状态">
-            <span class="green">正常</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="24">
-          <a-form-item label="通讯地址">
-            <span class="white">广东省深圳市南山区前海街道路平路1324号</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="24">
-          <a-form-item label="备注">
-            <span class="white">深圳市前海矿业有限公司</span>
-          </a-form-item>
-        </a-col>
-      </a-row>
-    </a-form>
-  </a-modal>
+    <!-- 现货合同详情-->
+    <a-modal class="add-custom 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 class="white">
+            基本信息
+        </a>
+        <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">{{ formatValue(selectedRow.contractno) }}</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.biztype) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="采购方">
+                        <span class="white">{{ formatValue(selectedRow.buyusername) }}</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.sellusername) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="合同附件">
+                        <span class="white">{{ formatValue(selectedRow.contracctstatus) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="状态">
+                        <span class="white">{{ formatValue(getContractStatusName(selectedRow.contracctstatus)) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+        </a-form>
+        <a class="white">
+            现货信息
+        </a>
+        <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.deliverygoodsname) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="品类">
+                        <span class="white">{{ formatValue(selectedRow.wrstandardname) }}</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.brandname) }}</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.spotgoodsdesc) }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+        </a-form>
+        <a class="white">
+            价格信息
+        </a>
+        <a-form class="inlineForm"
+                :form="form"
+                @submit="handleSearch">
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="定价类型">
+                        <span class="white">{{ getPriceTypeName(formatValue(selectedRow.pricetype)) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="数量">
+                        <span class="white">{{ formatValue(selectedRow.qty) }}</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.goodscode) }}</span>
+                    </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">{{ formatValue(formatTime(selectedRow.startdate, "d") + '--' + formatTime(selectedRow.enddate, "d")) }}</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="交收期">
+                        <span class="white">{{ formatValue(formatTime(selectedRow.deliverystartdate, "d") + '--' + formatTime(selectedRow.deliveryenddate), "d") }}</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+        </a-form>
+        <a class="white">
+            其它信息
+        </a>
+        <a-form class="inlineForm"
+                :form="form"
+                @submit="handleSearch">
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="保证金">
+                        <span class="white">企业</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="业务员">
+                        <span class="white">深圳市前海矿业有限公司</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="跟单员">
+                        <span class="white">前海矿业</span>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="12">
+                    <a-form-item label="期货账户">
+                        <span class="white">营业执照</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+            <a-row :gutter="24">
+                <a-col :span="12">
+                    <a-form-item label="备注">
+                        <span class="white">李顺利</span>
+                    </a-form-item>
+                </a-col>
+            </a-row>
+        </a-form>
+    </a-modal>
 </template>
 
 <script lang="ts">
-import { defineComponent, ref } from 'vue';
+import {defineComponent, PropType, reactive, ref} from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
+import {QueryCustomInfoType} from "@/services/go/ermcp/customInfo/interface";
+import {Ermcp3ContractRsp} from "@/services/go/ermcp/spot-contract/interface";
+import {getStatusName} from "@/views/information/custom/setup";
+import {getContractStatusName, getPriceTypeName} from "@/views/information/spot-contract/setup";
+import {formatValue, formatTime} from "@/common/methods/format";
 
 export default defineComponent({
     name: 'spot-contract-detail',
     components: {},
+    props: {
+        selectedRow: {
+            type: Object as PropType<Ermcp3ContractRsp>,
+            default: {},
+        },
+    },
     setup() {
         const { visible, cancel } = closeModal('detail');
         const loading = ref<boolean>(false);
@@ -128,6 +216,10 @@ export default defineComponent({
             cancel,
             submit,
             loading,
+            formatValue,
+            getContractStatusName,
+            getPriceTypeName,
+            formatTime
         };
     },
 });

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

@@ -23,7 +23,7 @@
       </a-table>
     </contextMenu>
     <!-- 现货合同: 详情 -->
-    <SpotContractDeatil />
+    <SpotContractDeatil  :selectedRow="selectedRow" />
     <!-- 现货合同: 审核 -->
     <Check />
     <!-- 现货合同: 撤销 -->

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

@@ -25,7 +25,7 @@
     <!-- 新增现货合同 -->
     <AddSpotContract />
     <!-- 现货合同: 详情 -->
-    <SpotContractDeatil />
+    <SpotContractDeatil  :selectedRow="selectedRow" />
   </div>
 </template>
 

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

@@ -23,7 +23,7 @@
       </a-table>
     </contextMenu>
     <!-- 现货合同: 详情 -->
-    <SpotContractDeatil />
+    <SpotContractDeatil  :selectedRow="selectedRow" />
     <!-- 现货合同: 正常完结 -->
     <Finish />
   </div>

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

@@ -25,7 +25,7 @@
     <!-- 新增现货合同 -->
     <AddSpotContract />
     <!-- 现货合同: 详情 -->
-    <SpotContractDeatil />
+    <SpotContractDeatil  :selectedRow="selectedRow" />
     <!-- 现货合同: 修改 -->
     <ModifySpotContract />
     <!-- 现货合同: 删除 -->

+ 50 - 0
src/views/information/spot-contract/setup.ts

@@ -0,0 +1,50 @@
+/**
+ * 现货合同状态返回
+ * @param state
+ * //合同状态 - number;
+ //:未提交 1:待审核 2:执行中 3:正常完结 4:审核拒绝 5:异常完结 6:已撤回
+ */
+export function getContractStatusName(state: number) : string{
+    let result : string = "--";
+    switch (state){
+        case 1:
+            result = "待审核";
+            break
+        case 2:
+            result = "执行中";
+            break
+        case 3:
+            result = "正常完结";
+            break
+        case 4:
+            result = "审核拒绝";
+            break
+        case 5:
+            result = "异常完结";
+            break
+        case 6:
+            result = "已撤回";
+            break
+    }
+    return result
+}
+
+/**
+ * 定价类型返回 - 1:一口价 2:点价 3:暂定价
+ * @param state
+ */
+export function getPriceTypeName(state: number) : string{
+    let result : string = "--";
+    switch (state){
+        case 1:
+            result = "一口价";
+            break
+        case 2:
+            result = "点价";
+            break
+        case 3:
+            result = "暂定价";
+            break
+    }
+    return result
+}