Kaynağa Gözat

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL

li.shaoyi 2 yıl önce
ebeveyn
işleme
3213e29902

+ 1 - 1
src/packages/mobile/views/ballot/detail/Index.vue

@@ -31,7 +31,7 @@
                         <span>{{ earnest }}</span>
                     </li>
                     <li>
-                        <span>转让比例</span>
+                        <span>转让定金</span>
                         <span>{{ parsePercent(detail.transferdepositratio) }}</span>
                     </li>
                 </ul>

+ 24 - 18
src/packages/mobile/views/goods/detail/components/listing/Index.vue

@@ -220,25 +220,31 @@ const onRadioChange = (value: number) => {
 
 // 提交挂牌
 const onSubmit = () => {
-    const { marketid = 0, goodsid = 0 } = quote.value ?? {}
-    /// 获取对应的市场ID
-    formData.MarketID = marketid
-    formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
-    formData.GoodsID = goodsid
-    formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTINGTHENLISTING
-    formData.DelistingType = EDelistingType.DELISTINGTYPE_PRICE
-    formData.BuildType = EBuildType.BUILDTYPE_OPEN
-    formData.TimevalidType = EValidType.VALIDTYPE_DR
-    formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
-    formData.BuildType = props.buildType
-    formData.OrderQty = orderQty.value / agreeunit.value // 数量÷合约乘数
+    dialog({
+        message: '确认要提交吗?',
+        showCancelButton: true,
+    }).then(() => {
 
-    fullloading((hideLoading) => {
-        formSubmit().then(() => {
-            hideLoading()
-            dialog('挂牌提交成功。').then(() => closed(true))
-        }).catch((err) => {
-            hideLoading(err, 'fail')
+        const { marketid = 0, goodsid = 0 } = quote.value ?? {}
+        /// 获取对应的市场ID
+        formData.MarketID = marketid
+        formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
+        formData.GoodsID = goodsid
+        formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTINGTHENLISTING
+        formData.DelistingType = EDelistingType.DELISTINGTYPE_PRICE
+        formData.BuildType = EBuildType.BUILDTYPE_OPEN
+        formData.TimevalidType = EValidType.VALIDTYPE_DR
+        formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
+        formData.BuildType = props.buildType
+        formData.OrderQty = orderQty.value / agreeunit.value // 数量÷合约乘数
+
+        fullloading((hideLoading) => {
+            formSubmit().then(() => {
+                hideLoading()
+                dialog('提交成功。').then(() => closed(true))
+            }).catch((err) => {
+                hideLoading(err, 'fail')
+            })
         })
     })
 }

+ 1 - 1
src/packages/mobile/views/goods/list/Index.vue

@@ -107,7 +107,7 @@ const tableList = computed(() => {
             ask: handleNumberValue(ask),
             askvolume: handleNumberValue(askvolume),
             last: handleNumberValue(last),
-            rise: handleNumberValue(rise?.toFixed(item.decimalplace)),
+            rise: rise?.toFixed(item.decimalplace),
             change: parsePercent(change),
             opened: handleNumberValue(opened),
             presettle: handleNumberValue(presettle),

+ 29 - 23
src/packages/mobile/views/goods/trade/components/delisting/index.vue

@@ -162,29 +162,35 @@ const onRadioChange = (value: number) => {
 
 // 提交摘牌
 const onSubmit = () => {
-    const { goodsid, orderid, orderprice, buyorsell } = props.selectedRow
-    const { marketid = 0 } = quote.value ?? {}
-
-    /// 获取对应的市场ID
-    formData.MarketID = marketid
-    formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
-    formData.RelatedID = orderid
-    formData.OrderPrice = orderprice
-    formData.BuyOrSell = buyorsell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy
-    formData.GoodsID = goodsid
-    formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTING
-    formData.DelistingType = EDelistingType.DELISTINGTYPE_SELECTED
-    formData.BuildType = EBuildType.BUILDTYPE_OPEN
-    formData.TimevalidType = EValidType.VALIDTYPE_DR
-    formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
-    formData.OrderQty = orderQty.value / agreeunit.value // 数量÷合约乘数
-
-    fullloading((hideLoading) => {
-        formSubmit().then(() => {
-            hideLoading()
-            dialog('摘牌提交成功。').then(() => closed(true))
-        }).catch((err) => {
-            hideLoading(err, 'fail')
+    dialog({
+        message: '确认要提交吗?',
+        showCancelButton: true,
+    }).then(() => {
+
+        const { goodsid, orderid, orderprice, buyorsell } = props.selectedRow
+        const { marketid = 0 } = quote.value ?? {}
+
+        /// 获取对应的市场ID
+        formData.MarketID = marketid
+        formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
+        formData.RelatedID = orderid
+        formData.OrderPrice = orderprice
+        formData.BuyOrSell = buyorsell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy
+        formData.GoodsID = goodsid
+        formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTING
+        formData.DelistingType = EDelistingType.DELISTINGTYPE_SELECTED
+        formData.BuildType = EBuildType.BUILDTYPE_OPEN
+        formData.TimevalidType = EValidType.VALIDTYPE_DR
+        formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
+        formData.OrderQty = orderQty.value / agreeunit.value // 数量÷合约乘数
+
+        fullloading((hideLoading) => {
+            formSubmit().then(() => {
+                hideLoading()
+                dialog('摘牌提交成功。').then(() => closed(true))
+            }).catch((err) => {
+                hideLoading(err, 'fail')
+            })
         })
     })
 }

+ 0 - 1
src/packages/mobile/views/order/list/components/goodsorder/detail/Index.vue

@@ -10,7 +10,6 @@
                     <Cell title="商品代码/名称" :value="selectedRow.goodscode + '/' + selectedRow.goodsname" />
                     <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
                     <Cell title="类型" :value="getBuildTypeName(selectedRow.buildtype)" />
-                    <Cell title="挂摘类型" :value="getListingSelectTypeName(selectedRow.listingselecttype)" />
                     <Cell title="委托数量" :value="selectedRow.orderqty" />
                     <Cell title="委托价格" :value="formatDecimal(selectedRow.orderprice)" />
                     <Cell title="成交数量" :value="selectedRow.tradeqty" />

+ 1 - 1
src/packages/mobile/views/order/list/components/listingorder/list/Index.vue

@@ -16,7 +16,7 @@
                 <div class="g-order-list__content">
                     <ul>
                         <li>
-                            <span>委托时间</span>
+                            <span>委托日期</span>
                             <span>{{ formatDate(item.ordertime, 'YYYY-MM-DD') }}</span>
                         </li>
                         <li>

+ 2 - 2
src/packages/mobile/views/order/list/components/listingtrade/history/Index.vue

@@ -19,8 +19,8 @@
                         <div class="g-order-list__content">
                             <ul>
                                 <li>
-                                    <span>成交时间:</span>
-                                    <span>{{ formatDate(item.tradedate) }}</span>
+                                    <span>成交日期:</span>
+                                    <span>{{ formatDate(item.tradedate, 'YYYY-MM-DD') }}</span>
                                 </li>
                                 <li>
                                     <span>方向:</span>

+ 2 - 2
src/packages/mobile/views/order/list/components/listingtrade/list/Index.vue

@@ -16,8 +16,8 @@
                 <div class="g-order-list__content">
                     <ul>
                         <li>
-                            <span>成交时间</span>
-                            <span>{{ formatDate(item.tradedate) }}</span>
+                            <span>成交日期</span>
+                            <span>{{ formatDate(item.tradedate, 'YYYY-MM-DD') }}</span>
                         </li>
                         <li>
                             <span>成交数量</span>

+ 1 - 1
src/packages/mobile/views/order/list/components/pricingtrade/detail/Index.vue

@@ -10,7 +10,7 @@
                     <Cell title="商品代码/名称" :value="selectedRow.goodscode+'/'+selectedRow.goodsname"/>
                     <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
                     <Cell title="类型" :value="getBuildTypeName(selectedRow.buildtype)" />
-                    <Cell title="成交数量" :value="formatDecimal(selectedRow.tradeqty)" />
+                    <Cell title="成交数量" :value="selectedRow.tradeqty" />
                     <Cell title="成交价格" :value="formatDecimal(selectedRow.tradeprice)" />
                     <Cell title="手续费" :value="formatDecimal(selectedRow.charge)" />
                     <Cell title="平仓损益" :value="formatDecimal(selectedRow.closepl)" />

+ 1 - 1
src/packages/mobile/views/order/list/components/pricingtrade/list/Index.vue

@@ -29,7 +29,7 @@
                         </li>
                         <li>
                             <span>成交数量</span>
-                            <span>{{ formatDecimal(item.tradeqty) }}</span>
+                            <span>{{ item.tradeqty }}</span>
                         </li>
                         <li>
                             <span>平仓盈亏</span>

+ 2 - 2
src/packages/mobile/views/order/performance/components/breach/Index.vue

@@ -11,7 +11,7 @@
                     <Cell title="当前步骤" :value="selectedRow.curstepname" />
                     <Field name="ApplyRemark" label="备注" v-model="formData.ApplyRemark" maxlength="50" type="textarea" rows="2" autosize show-word-limit placeholder="请输入备注"
                         :rules="formRules.ApplyRemark" />
-                    <Field name="Attachment" label="附件" :rules="formRules.Attachment" is-link>
+                    <Field name="Attachment" label="附件" :rules="formRules.Attachment" is-link @click-input="onUploadSuccess">
                         <template #input>
                             <app-uploader @success="onUploadSuccess" />
                         </template>
@@ -74,7 +74,7 @@ const contracted = () => {
         showCancelButton: true,
     }).then(() => {
         /// PerformancePlanID
-        formData.value.PerformancePlanID = Number(props.selectedRow.performanceplanid)
+        formData.value.PerformancePlanID = props.selectedRow.performanceplanid
         /// loding....
         fullloading((hideLoading) => {
             formSubmit().then(() => {

+ 1 - 2
src/packages/mobile/views/order/performance/components/detail/Index.vue

@@ -86,7 +86,7 @@ const formRules: { [key in keyof Proto.PerformanceDelayApplyReq | 'remark' ]?: F
 
 const { loading } = useRequest(queryWrPerformancePlanStep, {
     params: {
-        planid: Number(props.selectedRow.performanceplanid)
+        planid: props.selectedRow.performanceplanid
     },
     onSuccess: (res) => {
         datelist.value.push(...res.data)
@@ -104,7 +104,6 @@ const showConfirm = (showDelay: boolean) => {
 
 const toConfirm = () => {
     const { curstepid } = props.selectedRow
-    console.log(props.selectedRow)
     if (showDays.value === true) { /// 延期
         /// 市场ID
         formData.value.PerformancePlanStepID = curstepid

+ 102 - 18
src/packages/mobile/views/order/performance/components/modify/Index.vue

@@ -3,39 +3,34 @@
     <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
         <app-view class="g-form">
             <template #header>
-                <app-navbar title="信息修改" @back="closed" />
+                <app-navbar :title="selectedRow.buyorsell === 0 ? '买方信息' : '卖方信息'" @back="closed" />
             </template>
             <Form ref="formRef" class="g-form__container" @submit="formSubmit">
                 <CellGroup title="履约信息">
-                    <Field name="ContactInfo" v-model="formData.ContactInfo" autosize label="联络信息" type="textarea"
-                        placeholder="请输入联络信息" />
-                    <Field name="ReceiveInfo" v-model="formData.ContactInfo" autosize label="收货地址" type="textarea"
-                        placeholder="请输入收货地址">
-                        <template #button>
-                            <Button icon="plus" size="small" type="primary" />
-                        </template>
-                    </Field>
-                    <Field name="ReceiptInfo" v-model="formData.ContactInfo" autosize label="发票信息" type="textarea"
-                        placeholder="请输入发票信息">
-                        <template #button>
-                            <Button icon="plus" size="small" type="primary" />
-                        </template>
-                    </Field>
+                    <Field name="Contract" label="联络信息" type="textarea" autosize v-model="Contract" placeholder="请输入联络信息" :rules="formRules.Contract" />
+                    <Field name="Receive" label="收货地址" type="textarea" autosize v-model="Receive" :rules="formRules.Receive" placeholder="请输入收货地址" right-icon="add-o" @click-right-icon="showContact = true" />
+                    <Field name="Receipt" label="发票信息" type="textarea" autosize v-model="Receipt" placeholder="必填" :rules="formRules.Receipt" right-icon="add-o" @click-right-icon="showReceipt = true" />
                 </CellGroup>
             </Form>
             <template #footer>
-                <Button type="primary" block round @click="contracted">申请违约</Button>
+                <Button type="primary" block round @click="contracted">修改信息</Button>
             </template>
         </app-view>
+        <app-contact v-model:show="showContact" @change="contactChange" />
+        <app-receipt v-model:show="showReceipt" @change="receiptChange" />
     </app-modal>
 </template>
 
 <script lang="ts" setup>
 import { shallowRef, PropType } from 'vue'
-import { CellGroup, Button, Field, Form, FormInstance } from 'vant'
+import { CellGroup, Button, Field, Form, FormInstance, FieldRule } from 'vant'
 import { dialog, fullloading } from '@/utils/vant'
 import { usePerformanceModifyContact } from '@/business/performance'
+
 import AppModal from '@/components/base/modal/index.vue'
+import AppContact from '@mobile/components/modules/contact/index.vue'
+import AppReceipt from '@mobile/components/modules/receipt/index.vue'
+import { getReceiptTypeName } from '@/constants/receipt'
 
 const showModal = shallowRef(true)
 // 是否刷新父组件数据
@@ -50,6 +45,81 @@ const props = defineProps({
 
 const { formData, formSubmit } = usePerformanceModifyContact()
 const formRef = shallowRef<FormInstance>()
+const showContact = shallowRef(false) // 显示联系人选择列表
+const showReceipt = shallowRef(false) // 显示发票选择列表
+
+const Contract = shallowRef('') // 联系人嘻嘻
+const Receive = shallowRef('') // 收货地址信息
+const Receipt = shallowRef('') // 发票信息
+
+// 表单验证规则
+const formRules: { [key in keyof Proto.PerformanceModifyContactReq | 'Contract' | 'Receive' | 'Receipt']?: FieldRule[] } = {
+    Receive: [{
+        required: true,
+        message: '请输入收货地址信息',
+    }],
+    Receipt: [{
+        required: true,
+        message: '请输入发票信息',
+    }],
+    Contract: [{
+        required: true,
+        message: '请输入联络信息',
+    }],
+}
+
+// 选择联系信息
+const contactChange = (item: Model.UserReceiveInfoRsp) => {
+    Receive.value = ''
+    Receive.value += '姓名:' + item.receivername + '\n'
+    Receive.value += '电话:' + item.phonenum + '\n'
+    const { provincename, cityname, districtname, address } = item
+    Receive.value += '地址:' + provincename + cityname + districtname + address
+}
+
+// 选择发票信息
+const receiptChange = (item: Model.WrUserReceiptInfoRsp) => {
+    /// 清空数据
+    Receipt.value = ""
+    Object.entries(item).forEach(([key, value]) => {
+        if (value !== '') {
+            switch (key) {
+                case 'receipttype': {
+                    Receipt.value += '发票类型:' + getReceiptTypeName(Number(value)) + '\n'
+                    break
+                }
+                case 'username': {
+                    Receipt.value += '发票抬头:' + value + '\n'
+                    break
+                }
+                case 'taxpayerid': {
+                    Receipt.value += '税号:' + value + '\n'
+                    break
+                }
+                case 'receiptbank': {
+                    Receipt.value += '开户银行:' + value + '\n'
+                    break
+                }
+                case 'receiptaccount': {
+                    Receipt.value += '银行账号:' + value + '\n'
+                    break
+                }
+                case 'address': {
+                    Receipt.value += '企业地址:' + value + '\n'
+                    break
+                }
+                case 'contactinfo': {
+                    Receipt.value += '企业电话:' + value + '\n'
+                    break
+                }
+                case 'email': {
+                    Receipt.value += '邮箱:' + value + '\n'
+                    break
+                }
+            }
+        }
+    })
+}
 
 const contracted = () => {
     dialog({
@@ -58,6 +128,13 @@ const contracted = () => {
     }).then(() => {
         /// PerformancePlanID
         formData.value.PerformancePlanID = props.selectedRow.performanceplanid
+        /// Json String
+        const json =  {
+            ContactInfo: '${Contract.value}',
+            ReceiveInfo: '${Receive.value}',
+            ReceiptInfo: `${Receipt.value}`
+        }
+        formData.value.ContactInfo= JSON.stringify(json)
         /// loding....
         fullloading((hideLoading) => {
             formSubmit().then(() => {
@@ -73,7 +150,14 @@ const contracted = () => {
 /// 关闭弹窗
 const closed = (isRefresh = false) => {
     refresh.value = isRefresh
-    showModal.value = false
+    if (showContact.value) {
+        showContact.value = false
+    } else if (showReceipt.value) {
+        showReceipt.value = false
+    } else {
+        refresh.value = isRefresh
+        showModal.value = false
+    }
 }
 
 // 暴露组件属性给父组件调用

+ 5 - 0
src/packages/mobile/views/order/position/components/transfer/listing/Index.vue

@@ -7,6 +7,11 @@
             </template>
             <Form ref="formRef" class="g-form__container" @submit="onSubmit">
                 <CellGroup inset>
+                    <Field label="名称/代码">
+                        <template #input>
+                            <span>{{ selectedRow.goodsname }}/{{ selectedRow.goodscode }}</span>
+                        </template>
+                    </Field>
                     <Field label="预售价">
                         <template #input>
                             <span>{{ selectedRow.presaleprice }}</span>

+ 8 - 0
src/packages/mobile/views/transfer/list/Index.vue

@@ -9,6 +9,12 @@
                 <span>{{ row.goodsname }}</span>
                 <span class="text-small">{{ row.goodscode }}</span>
             </template>
+            <template #last="{ row }">
+                <span :class="row.lastColor">{{ row.last }}</span>
+            </template>
+            <template #ask="{ row }">
+                <span :class="row.askColor">{{ row.ask }}</span>
+            </template>
         </app-list>
     </app-view>
 </template>
@@ -27,6 +33,8 @@ const futuresStore = useFuturesStore()
 const dataList = computed(() => {
     const list = futuresStore.quoteList.filter((e) => e.marketid === 49201)
     return list.map((e) => ({
+        lastColor: e.lastColor,
+        askColor: e.askColor,
         goodscode: e.goodscode,
         goodsid: e.goodsid,
         goodsname: e.goodsname,

+ 1 - 1
src/stores/modules/futures.ts

@@ -64,7 +64,7 @@ export const useFuturesStore = defineStore(() => {
 
             const rise = last ? last - presettle : 0   // 涨跌额/涨跌: 最新价 - 昨结价
             const change = presettle ? rise / presettle : 0 // 涨跌幅/幅度: (最新价 - 昨结价) / 昨结价
-            const amplitude = last ? (highest - lowest) / last : 0 // 振幅: (最高价 - 最低价 ) / 最新价
+            const amplitude = presettle ? (highest - lowest) / presettle : 0 // 振幅: (最高价 - 最低价 ) / 最新价
 
             // 处理行情价格颜色
             const handleColor = (value: number) => {

+ 1 - 1
src/types/model/performance.d.ts

@@ -214,7 +214,7 @@ declare namespace Model {
     /// 查询履约信息详情
     interface WrPerformancePlanStepReq {
         /// 履约计划id(performanceplanid)
-        planid: number
+        planid: string
         /// 当前步骤id
         curstepid?: number
     }

+ 1 - 1
src/types/proto/performance.d.ts

@@ -7,7 +7,7 @@ declare global {
             /// MessageHead 消息头
             Header?: IMessageHead;
             /// uint64 履约计划ID
-            PerformancePlanID?: number;
+            PerformancePlanID?: string;
             /// uint32 违约方类型
             BreachType?: number;
             /// uint64 违约申请人