瀏覽代碼

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

li.shaoyi 2 年之前
父節點
當前提交
18d32caeb0
共有 30 個文件被更改,包括 429 次插入42 次删除
  1. 302 0
      src/packages/mobile/assets/themes/global/global.css
  2. 4 0
      src/packages/mobile/assets/themes/global/global.less
  3. 1 1
      src/packages/mobile/views/order/delivery/components/offline/detail/Index.vue
  4. 2 2
      src/packages/mobile/views/order/delivery/components/offline/list/Index.vue
  5. 1 1
      src/packages/mobile/views/order/delivery/components/online/detail/Index.vue
  6. 1 1
      src/packages/mobile/views/order/delivery/components/spot/detail/Index.vue
  7. 1 1
      src/packages/mobile/views/order/delivery/components/spot/list/Index.vue
  8. 1 1
      src/packages/mobile/views/order/list/components/goodsorder/detail/Index.vue
  9. 5 5
      src/packages/mobile/views/order/list/components/listingorder/detail/Index.vue
  10. 3 3
      src/packages/mobile/views/order/list/components/listingorder/history/Index.vue
  11. 3 3
      src/packages/mobile/views/order/list/components/listingorder/list/Index.vue
  12. 2 2
      src/packages/mobile/views/order/list/components/listingtrade/detail/Index.vue
  13. 1 1
      src/packages/mobile/views/order/list/components/listingtrade/history/Index.vue
  14. 1 1
      src/packages/mobile/views/order/list/components/listingtrade/list/Index.vue
  15. 36 2
      src/packages/mobile/views/order/list/components/transferorder/detail/Index.vue
  16. 1 1
      src/packages/mobile/views/order/list/components/transfertrade/detail/Index.vue
  17. 1 1
      src/packages/mobile/views/order/position/components/goods/close/Index.vue
  18. 1 1
      src/packages/mobile/views/order/position/components/goods/delivery/Index.vue
  19. 2 1
      src/packages/mobile/views/order/position/components/goods/list/Index.vue
  20. 1 1
      src/packages/mobile/views/order/position/components/presale/detail/Index.vue
  21. 1 1
      src/packages/mobile/views/order/position/components/spot/list/Index.vue
  22. 1 1
      src/packages/mobile/views/order/position/components/spot/listing/Index.vue
  23. 1 1
      src/packages/mobile/views/order/position/components/spot/pickup/Index.vue
  24. 1 1
      src/packages/mobile/views/order/position/components/transfer/delivery/trade/Index.vue
  25. 1 1
      src/packages/mobile/views/order/position/components/transfer/detail/Index.vue
  26. 2 2
      src/packages/mobile/views/order/position/components/transfer/listing/Index.vue
  27. 9 0
      src/packages/sbyj/router/index.ts
  28. 5 5
      src/packages/sbyj/views/home/index.vue
  29. 23 0
      src/types/proto/trade.d.ts
  30. 15 1
      src/utils/vant/index.ts

+ 302 - 0
src/packages/mobile/assets/themes/global/global.css

@@ -0,0 +1,302 @@
+[class*='g-image'] {
+  position: relative;
+  object-fit: cover;
+  overflow: hidden;
+}
+[class*='g-image']:before {
+  content: '';
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+  background: #fff url("~@mobile/assets/images/avatar.png") no-repeat center;
+  background-size: cover;
+}
+.g-price-up {
+  color: #ff3333;
+}
+.g-price-normal {
+  color: #333333;
+}
+.g-price-down {
+  color: #0baf1f;
+}
+.g-form__container {
+  display: flex;
+  flex-direction: column;
+  padding-bottom: 0.32rem;
+  /* 父元素的第一个子元素 */
+  /* 相邻兄弟元素 */
+}
+.g-form__container .van-cell-group--inset:first-of-type {
+  margin-top: 0.32rem;
+}
+.g-form__container .van-cell-group--inset + .van-cell-group--inset {
+  margin-top: 0.24rem;
+}
+.g-form__container .van-field .van-stepper {
+  display: flex;
+  align-items: center;
+  width: 100%;
+}
+.g-form__container .van-field .van-stepper__input {
+  flex: 1;
+}
+.g-form__footer {
+  display: flex;
+  align-items: center;
+}
+.g-form__footer:empty {
+  display: none;
+}
+.g-form__footer.inset {
+  gap: 0.2rem;
+  padding: 0.2rem 0.32rem;
+}
+.g-flex {
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+}
+.g-flex--row {
+  flex-direction: row;
+}
+.g-flex__body {
+  flex: 1;
+  overflow-y: auto;
+  -webkit-overflow-scrolling: touch;
+}
+.g-flex__footer {
+  margin-top: auto;
+}
+.g-color--up {
+  color: var(--color-up);
+}
+.g-color--down {
+  color: var(--color-down);
+}
+.g-block--bg {
+  background: #fff url('../../images/block-bg.png') no-repeat center bottom;
+  background-size: 100%;
+}
+/* 导航列表 */
+.g-navmenu .app-iconfont {
+  height: 100%;
+}
+.g-navmenu .app-iconfont__icon {
+  font-size: 0.32rem;
+  margin-right: 0.24rem;
+}
+/* 商品列表 */
+.g-goods-list {
+  padding: 0.2rem;
+}
+.g-goods-list .goods {
+  background-color: #fff;
+  border-radius: 0.12rem;
+  overflow: hidden;
+}
+.g-goods-list .goods-image {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  min-height: 2.4rem;
+  font-size: 0;
+}
+.g-goods-list .goods-info {
+  padding: 0.2rem;
+}
+.g-goods-list .goods-info__title {
+  font-size: 0.26rem;
+  margin-bottom: 0.1rem;
+}
+.g-goods-list .goods-info__price {
+  color: #f2270c;
+}
+.g-goods-list .goods-info__price .unit {
+  font-size: 0.24rem;
+}
+.g-goods-list .goods-info__price .integer {
+  font-size: 0.3rem;
+}
+/* 订单列表 */
+.g-order-list {
+  padding: 0.2rem;
+  padding-bottom: 0;
+}
+.g-order-list__box {
+  background-color: #fff;
+  border-radius: 0.16rem;
+  padding: 0.24rem;
+}
+.g-order-list__box:not(:first-child) {
+  margin-top: 0.2rem;
+}
+.g-order-list__titlebar {
+  display: flex;
+  justify-content: space-between;
+  margin-bottom: 0.2rem;
+}
+.g-order-list__titlebar .left h4 {
+  font-weight: bold;
+}
+.g-order-list__titlebar .left span {
+  font-size: 0.24rem;
+  color: #999;
+}
+.g-order-list__titlebar .right {
+  font-size: 0.24rem;
+  color: #999;
+}
+.g-order-list__content {
+  font-size: 0.24rem;
+}
+.g-order-list__content ul {
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: space-between;
+}
+.g-order-list__content ul li {
+  display: flex;
+  justify-content: space-between;
+  line-height: 0.4rem;
+  width: calc(50% - .24rem);
+}
+.g-order-list__content ul li span:first-child {
+  color: #999;
+  white-space: nowrap;
+  padding-right: 0.24rem;
+}
+.g-order-list__btnbar {
+  display: flex;
+  justify-content: flex-end;
+  gap: 0.16rem;
+  margin-top: 0.2rem;
+}
+.g-order-list__btnbar .van-button {
+  width: 1.6rem;
+  border-width: 1px;
+}
+.g-detail__buy {
+  background-color: #fff;
+}
+.g-detail__buy .topic {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  color: #fff;
+  background-image: linear-gradient(to right, #ee0a24, #ff6034);
+  padding: 0.2rem 0.24rem;
+}
+.g-detail__buy .topic-left .price-text {
+  font-size: 0.24rem;
+}
+.g-detail__buy .topic-left .price-integer {
+  font-size: 0.44rem;
+}
+.g-detail__buy .topic-right {
+  display: flex;
+  flex-direction: column;
+  font-size: 0.24rem;
+}
+.g-detail__buy .title {
+  font-size: 0.3rem;
+  font-weight: bold;
+  line-height: 0.48rem;
+  padding: 0.24rem;
+  padding-bottom: 0;
+}
+.g-detail__buy .title .van-tag {
+  font-weight: normal;
+}
+.g-detail__buy .title span {
+  margin-right: 0.1rem;
+}
+.g-detail__buy .qty {
+  font-size: 0.24rem;
+  color: #999;
+  padding: 0.1rem 0.24rem 0 0.24rem;
+}
+.g-detail__buy .info {
+  background-color: #fff;
+  padding: 0.2rem;
+}
+.g-detail__buy .info ul {
+  display: flex;
+  flex-wrap: wrap;
+  font-size: 0.26rem;
+}
+.g-detail__buy .info ul li {
+  display: flex;
+  justify-content: space-between;
+  width: 50%;
+  padding: 0.08rem 0.24rem;
+}
+.g-detail__buy .info ul li span:first-child {
+  color: #999;
+}
+.g-detail__desc {
+  background-color: #fff;
+  margin-top: 0.24rem;
+}
+.g-detail__footer {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  height: 0.88rem;
+  background-color: #fff;
+}
+.g-detail__footer .price {
+  padding-left: 0.32rem;
+}
+.g-detail__footer .price-text,
+.g-detail__footer .price-unit {
+  font-size: 0.24rem;
+}
+.g-detail__footer .price-unit {
+  color: #f2270c;
+}
+.g-detail__footer .price-integer {
+  font-size: 0.32rem;
+  color: #f2270c;
+}
+.g-detail__footer .submit {
+  align-self: stretch;
+  display: flex;
+  margin-left: auto;
+}
+.g-detail__footer .submit-button {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 100%;
+  min-width: 2rem;
+  font-weight: bold;
+  color: #fff;
+  padding: 0 0.48rem;
+}
+.g-detail__footer .submit-button.warning {
+  background-image: linear-gradient(to right, #ffd01e, #ff8917);
+  background-color: #ff8a17;
+}
+.g-detail__footer .submit-button.danger {
+  background-image: linear-gradient(to right, #ff6034, #ee0a24);
+  background-color: #ee270a;
+}
+.van-dialog__message {
+  font-size: 0.28rem;
+  line-height: 0.44rem;
+}
+.van-tabs--list {
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+}
+.van-tabs--list .van-tabs__content {
+  flex: 1;
+  overflow-y: auto;
+}
+.van-tabs--list .van-tabs__content .van-tab__panel {
+  height: 100%;
+}

+ 4 - 0
src/packages/mobile/assets/themes/global/global.less

@@ -19,6 +19,10 @@
     color: #ff3333;
 }
 
+.g-price-normal {
+    color: #333333;
+}
+
 .g-price-down {
     color: #0baf1f;
 }

+ 1 - 1
src/packages/mobile/views/order/delivery/components/offline/detail/Index.vue

@@ -7,7 +7,7 @@
             </template>
             <div class="g-form__container">
                 <CellGroup title="线下交收单信息">
-                    <Cell title="商品代码/名称" :value="selectedRow.goodsnamedisplay" />
+                    <Cell title="商品代码/名称" :value="selectedRow.goodscode+'/'+selectedRow.goodsnamedisplay" />
                     <Cell title="交收方向" :value="selectedRow.buyorselldisplay" />
                     <Cell title="交收数量" :value="selectedRow.deliveryqty" />
                     <Cell title="交收价格" :value="selectedRow.deliveryprice" />

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

@@ -24,11 +24,11 @@
                         </li>
                         <li>
                             <span>交收价格</span>
-                            <span>{{ item.deliveryprice }}</span>
+                            <span>{{ item.orderstatus === 1 ? '--' : item.deliveryprice }}</span>
                         </li>
                         <li>
                             <span>交收货款</span>
-                            <span>{{ item.deliveryamount }}</span>
+                            <span>{{ item.orderstatus === 1 ? '--' : item.deliveryamount }}</span>
                         </li>
                         <li>
                             <span>交收信息</span>

+ 1 - 1
src/packages/mobile/views/order/delivery/components/online/detail/Index.vue

@@ -7,7 +7,7 @@
             </template>
             <div class="g-form__container">
                 <CellGroup title="线上交收单信息">
-                    <Cell title="商品代码/名称" :value="selectedRow.wrtypename" />
+                    <Cell title="商品名称" :value="selectedRow.wrtypename" />
                     <Cell title="交收数量" :value="selectedRow.deliveryqty" />
                     <Cell title="订货价" :value="selectedRow.xdeliveryprice" />
                     <Cell title="升贴水" :value="selectedRow.deliverypricemove" />

+ 1 - 1
src/packages/mobile/views/order/delivery/components/spot/detail/Index.vue

@@ -7,7 +7,7 @@
             </template>
             <div class="g-form__container">
                 <CellGroup title="提货信息">
-                    <Cell title="商品代码/名称" :value="selectedRow.wrstandardname" />
+                    <Cell title="商品代码/名称" :value="selectedRow.wrstandardcode+'/'+selectedRow.wrstandardname" />
                     <Cell title="仓库" :value="selectedRow.warehousename" />
                     <Cell title="提货数量" :value="selectedRow.qty" />
                     <Cell title="提货方式" :value="selectedRow.appointmentmodeldisplay" />

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

@@ -6,7 +6,7 @@
             <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
                 <div class="g-order-list__titlebar">
                     <div class="left">
-                        <h4>{{ item.wrstandardname }}</h4>
+                        <h4>{{ item.wrstandardcode }}/{{ item.wrstandardname }}</h4>
                         <span>{{ item.warehousename }}</span>
                     </div>
                     <div class="right">

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

@@ -29,7 +29,7 @@
 import { shallowRef, PropType } from 'vue'
 import AppModal from '@/components/base/modal/index.vue'
 import { CellGroup, Cell, Button } from 'vant'
-import { getBuyOrSellName, getWRTradeOrderStatusName, getBuildTypeName, getListingSelectTypeName } from '@/constants/order'
+import { getBuyOrSellName, getWRTradeOrderStatusName, getBuildTypeName } from '@/constants/order'
 import { formatDate, formatDecimal } from '@/filters'
 import { useCancelOrder } from '@/business/trade'
 import { dialog, fullloading } from '@/utils/vant'

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

@@ -7,14 +7,14 @@
             </template>
             <div v-if="props" class="order-detail__container g-form__container">
                 <CellGroup title="挂牌委托信息">
-                    <Cell title="商品代码/名称" :value="selectedRow.deliverygoodscode + '/' + selectedRow.deliverygoodsname" />
+                    <Cell title="商品代码/名称" :value="selectedRow.wrstandardcode + '/' + selectedRow.wrstandardname" />
                     <Cell title="仓库" :value="selectedRow.warehousename" />
-                    <Cell title="仓库" :value="getWrTradeTypeName(selectedRow.wrtradetype)" />
+                    <Cell title="类型" :value="getWrTradeTypeName(selectedRow.wrtradetype)" />
                     <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
                     <Cell title="委托价格" :value="formatDecimal(selectedRow.fixedprice)" />
-                    <Cell title="委托数量" :value="formatDecimal(selectedRow.orderqty)" />
-                    <Cell title="成交数量" :value="formatDecimal(selectedRow.tradeqty)" />
-                    <Cell title="撤销数量" :value="formatDecimal(selectedRow.cancelqty)" />
+                    <Cell title="委托数量" :value="selectedRow.orderqty" />
+                    <Cell title="成交数量" :value="selectedRow.tradeqty" />
+                    <Cell title="撤销数量" :value="selectedRow.cancelqty" />
                     <Cell title="委托时间" :value="formatDate(selectedRow.ordertime)" />
                     <Cell title="委托状态" :value="getWRTradeOrderStatusName(selectedRow.wrtradeorderstatus)" />
                     <Cell title="委托单号" :value="selectedRow.wrtradeorderid" />

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

@@ -12,7 +12,7 @@
                     <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
                         <div class="g-order-list__titlebar">
                             <div class="left">
-                                <h4>{{ item.deliverygoodscode }}/{{ item.deliverygoodsname }}</h4>
+                                <h4>{{ item.wrstandardcode }}/{{ item.wrstandardname }}</h4>
                                 <span>{{ item.warehousename }}</span>
                             </div>
                             <div class="right">
@@ -31,7 +31,7 @@
                                 </li>
                                 <li>
                                     <span>挂牌数量:</span>
-                                    <span>{{ formatDecimal(item.orderqty) }}</span>
+                                    <span>{{ item.orderqty }}</span>
                                 </li>
                                 <li>
                                     <span>挂牌价格:</span>
@@ -39,7 +39,7 @@
                                 </li>
                                 <li>
                                     <span>成交数量:</span>
-                                    <span>{{ formatDecimal(item.tradeqty) }}</span>
+                                    <span>{{ item.tradeqty }}</span>
                                 </li>
                             </ul>
                         </div>

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

@@ -6,7 +6,7 @@
             <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
                 <div class="g-order-list__titlebar">
                     <div class="left">
-                        <h4>{{ item.deliverygoodscode }}/{{ item.deliverygoodsname }}</h4>
+                        <h4>{{ item.wrstandardcode }}/{{ item.wrstandardname }}</h4>
                         <span>{{ item.warehousename }}</span>
                     </div>
                     <div class="right">
@@ -25,7 +25,7 @@
                         </li>
                         <li>
                             <span>挂牌数量</span>
-                            <span>{{ formatDecimal(item.orderqty) }}</span>
+                            <span>{{ item.orderqty }}</span>
                         </li>
                         <li>
                             <span>挂牌价格</span>
@@ -33,7 +33,7 @@
                         </li>
                         <li>
                             <span>成交数量</span>
-                            <span>{{ formatDecimal(item.tradeqty) }}</span>
+                            <span>{{ item.tradeqty }}</span>
                         </li>
                     </ul>
                 </div>

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

@@ -7,7 +7,7 @@
             </template>
             <div v-if="props" class="order-detail__container g-form__container">
                 <CellGroup title="挂牌成交信息">
-                    <Cell title="商品代码/名称" :value="selectedRow.deliverygoodscode + '/' + selectedRow.deliverygoodsname" />
+                    <Cell title="商品代码/名称" :value="selectedRow.wrstandardcode + '/' + selectedRow.wrstandardname" />
                     <Cell title="仓库" :value="selectedRow.warehousename" />
                     <Cell title="类型" :value="getWrTradeTypeName(selectedRow.wrtradetype)" />
                     <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
@@ -15,7 +15,7 @@
                     <Cell title="成交数量" :value="formatDecimal(selectedRow.tradeqty)" />
                     <Cell title="成交金额" :value="formatDecimal(selectedRow.tradeqty * selectedRow.tradeprice)" />
                     <Cell title="成交时间" :value="formatDate(selectedRow.tradetime)" />
-                    <Cell title="对手方" :value="selectedRow.matchaccountid" />
+                    <Cell title="对手方" :value="selectedRow.matchusername" />
                     <Cell title="成交单号" :value="selectedRow.wrtradedetailid" />
                 </CellGroup>
             </div>

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

@@ -12,7 +12,7 @@
                     <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
                         <div class="g-order-list__titlebar">
                             <div class="left">
-                                <h4>{{ item.deliverygoodscode }}/{{ item.deliverygoodsname }}</h4>
+                                <h4>{{ item.wrstandardcode }}/{{ item.wrstandardname }}</h4>
                                 <span>{{ item.warehousename }}</span>
                             </div>
                         </div>

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

@@ -6,7 +6,7 @@
             <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
                 <div class="g-order-list__titlebar">
                     <div class="left">
-                        <h4>{{ item.deliverygoodscode }}/{{ item.deliverygoodsname }}</h4>
+                        <h4>{{ item.wrstandardcode }}/{{ item.wrstandardname }}</h4>
                         <span>{{ item.warehousename }}</span>
                     </div>
                     <div class="right">

+ 36 - 2
src/packages/mobile/views/order/list/components/transferorder/detail/Index.vue

@@ -7,7 +7,7 @@
             </template>
             <div class="g-form__container">
                 <CellGroup title="转让委托信息">
-                    <Cell title="商品代码/名称" :value="selectedRow.goodsname" />
+                    <Cell title="商品代码/名称" :value="`${selectedRow.goodscode}/${selectedRow.goodsname}`" />
                     <Cell title="转让数量" :value="selectedRow.orderqty" />
                     <Cell title="转让价" :value="selectedRow.orderprice" />
                     <Cell title="订货价" :value="selectedRow.presaleprice" />
@@ -17,6 +17,9 @@
                     <Cell title="委托单号" :value="selectedRow.orderid" />
                 </CellGroup>
             </div>
+            <template #footer v-if="[3, 7].includes(selectedRow.orderstatus)">
+                <Button type="primary" block round @click="onCancelSumit(selectedRow)">撤销</Button>
+            </template>
         </app-view>
     </app-modal>
 </template>
@@ -26,6 +29,9 @@ import { shallowRef, PropType } from 'vue'
 import { CellGroup, Cell } from 'vant'
 import AppModal from '@/components/base/modal/index.vue'
 import { getOrderStatusName } from '@/constants/order'
+import { dialog, fullloading } from '@/utils/vant'
+import { useCancelOrder } from '@/business/trade'
+import { EOperateType } from '@/constants/client'
 
 defineProps({
     selectedRow: {
@@ -35,9 +41,37 @@ defineProps({
 })
 
 const showModal = shallowRef(true)
+// 是否刷新父组件数据
+const refresh = shallowRef(false)
+const { cancelSubmit, formData } = useCancelOrder()
+
+// 撤销
+const onCancelSumit = (row: Model.MineTradeOrdersRsp) => {
+    dialog({
+        message: '是否撤销该委托单?',
+        showCancelButton: true,
+    }).then(() => {
+        formData.Header = {
+            MarketID: row.marketid,
+            GoodsID: row.goodsid
+        }
+        formData.OldOrderId = row.orderid
+        formData.OperateType = EOperateType.OPERATETYPE_ORDERCANCEL
+
+        fullloading((hideLoading) => {
+            cancelSubmit().then(() => {
+                hideLoading('撤销成功')
+                closed(true)
+            }).catch((err) => {
+                hideLoading(err, 'fail')
+            })
+        })
+    })
+}
 
 // 关闭弹窗
-const closed = () => {
+const closed = (isRefresh = false) => {
+    refresh.value = isRefresh
     showModal.value = false
 }
 

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

@@ -7,7 +7,7 @@
             </template>
             <div class="g-form__container">
                 <CellGroup title="转让成交信息">
-                    <Cell title="商品代码/名称" :value="selectedRow.goodsname" />
+                    <Cell title="商品代码/名称" :value="`${selectedRow.goodscode}/${selectedRow.goodsname}`" />
                     <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
                     <Cell title="转让数量" :value="selectedRow.tradeqty" />
                     <Cell title="转让价" :value="selectedRow.tradeprice" />

+ 1 - 1
src/packages/mobile/views/order/position/components/goods/close/Index.vue

@@ -7,7 +7,7 @@
             </template>
             <div v-if="props" class="order-detail__container g-form__container">
                 <CellGroup title="持仓信息">
-                    <Cell title="商品代码/名称" :value="selectedRow.goodscode + '/' + selectedRow.goodsname" />
+                    <Cell title="商品代码/名称" :value="`${selectedRow.goodscode}/${selectedRow.goodsname}`" />
                     <Cell title="持仓方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
                     <Cell title="持仓金额" :value="formatDecimal(selectedRow.curholderamount)" />
                     <Cell title="持仓数量" :value="formatDecimal(selectedRow.curpositionqty)" />

+ 1 - 1
src/packages/mobile/views/order/position/components/goods/delivery/Index.vue

@@ -7,7 +7,7 @@
             </template>
             <div v-if="props" class="order-detail__container g-form__container">
                 <CellGroup title="持仓信息">
-                    <Cell title="商品代码/名称" :value="selectedRow.goodscode + '/' + selectedRow.goodsname" />
+                    <Cell title="商品代码/名称" :value="`${selectedRow.goodscode}/${selectedRow.goodsname}`" />
                     <Cell title="持仓方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
                     <Cell title="持仓金额" :value="formatDecimal(selectedRow.marketamount)" />
                     <Cell title="持仓数量" :value="formatDecimal(selectedRow.curpositionqty)" />

+ 2 - 1
src/packages/mobile/views/order/position/components/goods/list/Index.vue

@@ -40,7 +40,7 @@
                         </li>
                         <li>
                             <span>参考损益</span>
-                            <span :class="closepl(item) ? 'g-price-up' : 'g-price-down'">{{ formatDecimal(closepl(item))
+                            <span :class="getAmountColor(closepl(item))">{{ formatDecimal(closepl(item))
                             }}</span>
                         </li>
                     </ul>
@@ -67,6 +67,7 @@ import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import { getBuyOrSellName, BuyOrSell } from '@/constants/order'
 import { formatDecimal, handleNumberValue } from '@/filters'
 import { useUserStore, useFuturesStore } from '@/stores'
+import { getAmountColor } from '@/utils/vant';
 
 const componentMap = new Map<string, unknown>([
     ['close', defineAsyncComponent(() => import('../close/Index.vue'))],

+ 1 - 1
src/packages/mobile/views/order/position/components/presale/detail/Index.vue

@@ -7,7 +7,7 @@
             </template>
             <div class="g-form__container">
                 <CellGroup title="预售持仓信息">
-                    <Cell title="商品代码/名称" :value="selectedRow.goodsname + '/' + selectedRow.goodscode" />
+                    <Cell title="商品代码/名称" :value="`${selectedRow.goodscode}/${selectedRow.goodsname}`" />
                     <Cell title="发售方" :value="selectedRow.sellname" />
                     <Cell title="开始日期" :value="formatDate(selectedRow.starttime)" />
                     <Cell title="结束日期" :value="formatDate(selectedRow.endtime)" />

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

@@ -6,7 +6,7 @@
             <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
                 <div class="g-order-list__titlebar">
                     <div class="left">
-                        <h4>{{ item.wrstandardname }}</h4>
+                        <h4>{{ item.wrstandardcode }}/{{ item.wrstandardname }}</h4>
                         <span>{{ item.warehousename }}</span>
                     </div>
                 </div>

+ 1 - 1
src/packages/mobile/views/order/position/components/spot/listing/Index.vue

@@ -7,7 +7,7 @@
             </template>
             <Form ref="formRef" class="g-form__container" @submit="onSubmit">
                 <CellGroup title="现货持仓信息" inset>
-                    <Cell title="商品代码/名称" :value="selectedRow.wrstandardname" />
+                    <Cell title="商品代码/名称" :value="`${selectedRow.wrstandardcode}/${selectedRow.wrstandardname}`" />
                     <Cell title="仓库" :value="selectedRow.warehousename" />
                     <Cell title="库存量" :value="selectedRow.qty" />
                     <Cell title="冻结量" :value="selectedRow.freezerqty" />

+ 1 - 1
src/packages/mobile/views/order/position/components/spot/pickup/Index.vue

@@ -8,7 +8,7 @@
                 </template>
                 <Form ref="formRef" class="g-form__container" @submit="onSubmit">
                     <CellGroup title="现货持仓信息" inset>
-                        <Cell title="商品代码/名称" :value="selectedRow.wrstandardname" />
+                        <Cell title="商品代码/名称" :value="`${selectedRow.wrstandardcode}/${selectedRow.wrstandardname}`" />
                         <Cell title="仓库" :value="selectedRow.warehousename" />
                         <Cell title="库存量" :value="selectedRow.qty" />
                         <Cell title="冻结量" :value="selectedRow.freezerqty" />

+ 1 - 1
src/packages/mobile/views/order/position/components/transfer/delivery/trade/Index.vue

@@ -6,7 +6,7 @@
             </template>
             <Form ref="formRef" class="g-form__container" @submit="onSubmit">
                 <CellGroup inset>
-                    <Cell title="商品代码/名称" :value="detail.wrstandardcode + '/' + detail.wrstandardname" />
+                    <Cell title="商品代码/名称" :value="`${detail.wrstandardcode}/${detail.wrstandardname}`" />
                     <Cell title="仓库" :value="detail.warehousename" />
                     <Cell title="升贴水" :value="discount.toFixed(2)" />
                     <Cell title="数量" :value="detail.avalidqty" />

+ 1 - 1
src/packages/mobile/views/order/position/components/transfer/detail/Index.vue

@@ -7,7 +7,7 @@
             </template>
             <div class="g-form__container">
                 <CellGroup title="转让持仓信息">
-                    <Cell title="商品代码/名称" :value="selectedRow.goodscode + '/' + selectedRow.goodsname" />
+                    <Cell title="商品代码/名称" :value="`${selectedRow.goodscode}/${selectedRow.goodsname}`" />
                     <Cell title="持仓金额" :value="selectedRow.buycurholderamount" />
                     <Cell title="持仓数量" :value="selectedRow.buycurpositionqty" />
                     <Cell title="冻结数量" :value="selectedRow.buyfrozenqty" />

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

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

+ 9 - 0
src/packages/sbyj/router/index.ts

@@ -45,11 +45,17 @@ const routes: Array<RouteRecordRaw> = [
             path: 'market',
             name: 'home-market',
             component: () => import('../views/market/list/index.vue'),
+            meta: {
+              ignoreAuth: true,
+            },
           },
           {
             path: 'news',
             name: 'home-news',
             component: () => import('../views/news/list/index.vue'),
+            meta: {
+              ignoreAuth: true,
+            },
           },
           {
             path: 'mine',
@@ -146,6 +152,9 @@ const routes: Array<RouteRecordRaw> = [
         path: '',
         name: 'market-list',
         component: () => import('../views/market/list/index.vue'),
+        meta: {
+          ignoreAuth: true,
+        },
       },
       {
         path: 'detail',

+ 5 - 5
src/packages/sbyj/views/home/index.vue

@@ -60,11 +60,8 @@ const tabList: Tabbar[] = [
 const onTabClick = (index: number) => {
   const { name } = tabList[index]
   cssTransition.value = false
-
-  if (name === 'home-index' || loginStore.token) {
-    currentTab.value = index
-    routerTo(name, true)
-  } else {
+  
+  if (name === 'home-mine') {
     fullloading((hideLoading) => {
       userLogin(true).then(() => {
         currentTab.value = index
@@ -75,6 +72,9 @@ const onTabClick = (index: number) => {
         hideLoading()
       })
     }, '加载中...')
+  } else {
+    currentTab.value = index
+    routerTo(name, true)
   }
 }
 

+ 23 - 0
src/types/proto/trade.d.ts

@@ -600,5 +600,28 @@ declare global {
             ApplyID: number; // 申请ID
             ClientTicket: string; // 客户端流水号
         }
+
+        // 补充定金接口请求
+        interface SupplementDepositReq {
+            Header?: IMessageHead; // 消息头
+		    TradeID: number; // 成交单号,必填
+            BuyOrSell: number; // 买卖方向,必填
+            UserID: number; // 用户ID,必填
+            AccountID: number; // 交易账号,必填
+            RestockDeposit: number; // 补充定金,必填
+            MarketID: number; // 市场ID,必填
+            ClientSerialNo: string; // 客户端流水号
+            ClientType: number; // 终端类型
+        }
+// 补充定金接口响应
+interface SupplementDepositRsp {
+	Header?: IMessageHead; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+		optional uint64 TradeID = 4; // 成交单号,必填
+		optional uint32 UserID = 5; // 用户ID,必填
+		optional uint64 AccountID = 6; // 交易账号,必填
+		optional string ClientSerialNo = 7; // 客户端流水号
+}
     }
 }

+ 15 - 1
src/utils/vant/index.ts

@@ -64,4 +64,18 @@ export function dialog(options: string | DialogOptions) {
         })
     }
     return showDialog(options)
-}
+}
+
+/**
+ * 对应数值取得颜色
+ * @param 数值 
+ */
+export const getAmountColor = (num: number) => {
+    if (num === 0.0) {
+        return 'g-price-normal'
+    } else if(num > 0.0) {
+        return 'g-price-up'
+    } else {
+        return 'g-price-down'
+    }
+}