Procházet zdrojové kódy

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

huangbin před 4 roky
rodič
revize
9de99b63be

+ 13 - 0
src/assets/styles/mixin.less

@@ -429,6 +429,10 @@
             position: absolute;
             font-size: 14px;
             color: @m-grey1;
+            width: 100%;
+            div:nth-child(2){
+                margin-top: -10px;
+            }
         }
         .ant-form-item-control {
             width: 200px;
@@ -609,6 +613,12 @@
         cursor: pointer;
     }
 }
+.fl {
+    float: left;
+}
+.fr {
+    float: right;
+}
 .ml10 {
     margin-left: 10px;
 }
@@ -630,6 +640,9 @@
 .mt30 {
     margin-top: 30px;
 }
+.mb40 {
+    margin-bottom: 40px !important;
+}
 .grey {
     color: @m-grey2;
 }

+ 1 - 1
src/services/proto/delivery/interface.ts

@@ -57,7 +57,7 @@ export interface ErmsMiddelGoodsEditRsp {
 // 现货品种停用请求 0 29 129
 export interface DeliveryGoodsCancelReq {
     wrstandardid: string; // uint64 现货商品ID
-    isvalid: number; // int32 是否有效 - 0:无效 1:有效
+    isvalid?: number; // int32 是否有效 - 0:无效 1:有效
 }
 // 现货品种停用响应 0 29 130
 export interface DeliveryGoodsCancelRsp {

+ 41 - 59
src/views/business/purchase/components/invoice/index.vue

@@ -34,7 +34,7 @@
         </a-row>
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item :label="selectedRow.contracttype===1? '采购方': '销售方'">
+            <a-form-item :label="'销售方'">
               <span class="white">{{ formatValue(selectedRow.accountname) }}</span>
             </a-form-item>
           </a-col>
@@ -44,97 +44,79 @@
             </a-form-item>
           </a-col>
         </a-row>
+      </a-form>
+    </fieldset>
+    <fieldset class="formFieldSet">
+      <legend>已登记信息</legend>
+      <a-form class="inlineForm">
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="合同签署量">
-              <span class="white">{{ formatValue(selectedRow.qty + selectedRow.enumdicname) }}</span>
+            <a-form-item label="贷款总额">
+              <span class="white">499999000.00元</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
-            <a-form-item label="合同暂定价">
-              <span class="white">{{ formatValue(selectedRow.price) }}</span>
+            <a-form-item label="保证金">
+              <span class="white">1000000元</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 label="其他费用">
+              <span class="white">500.00元</span>
             </a-form-item>
           </a-col>
-        </a-row>
-      </a-form>
-    </fieldset>
-    <fieldset class="formFieldSet">
-      <legend>已登记信息</legend>
-      <a-form class="inlineForm">
-        <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="已定价量">
-              <span class="white">{{ selectedRow.pricedqty + selectedRow.enumdicname }}</span>
+            <a-form-item label="合计总额">
+              <span class="white">505990500.00元</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
-            <a-form-item label="已点均价">
-              <span class="white">{{ formatValue(selectedRow.pricedavg) }}</span>
+            <a-form-item label="已支付额 ">
+              <span class="white">500.00元</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="已收票额">
+              <span class="white">505990500.00元</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-item label="预收票额">
+              <span class="white">--</span>
             </a-form-item>
           </a-col>
         </a-row>
       </a-form>
     </fieldset>
     <fieldset class="formFieldSet">
-      <legend>本次点价信息</legend>
+      <legend>本次发票信息</legend>
       <a-form class="inlineForm"
               ref="formRef"
               :model="formState"
               :rules="rules">
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="点价价格"
+            <a-form-item label="收票金额"
+                         class="relative mb40"
                          name="PricedPrice">
-              <a-input-number class="dialogInput"
-                              style="width: 200px"
-                              v-model:value="formState.PricedPrice"
-                              :min="0"
-                              placeholder="请输入点价价格" />
-            </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">{{ Number(selectedRow.pricemove) + Number(formState.PricedPrice) }}</span>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="点价数量"
-                         name="PricedQty"
-                         class="relative">
-              <a-input-number class="dialogInput"
+              <a-input class="dialogInput"
                               style="width: 200px"
-                              v-model:value="formState.PricedQty"
-                              :min="0"
-                              :max="selectedRow.unpricedqty"
-                              placeholder="请输入点价数量" />
+                              suffix="元"
+                              placeholder="请输入收票金额" />
               <div class="tip">
-                <span>未定价量<span class="white">{{selectedRow.unpricedqty}}{{selectedRow.enumdicname}} </span></span>
-                <a class="blue ml10"
-                   @click="formState.PricedQty = selectedRow.unpricedqty"> 全部登记</a>
+                <div>应收票额:4090500.00元</div>
+                <div><a class="blue fr">全部登记</a></div>
               </div>
             </a-form-item>
           </a-col>
-        </a-row>
-
-        <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="点价金额">
-              <span class="white">{{( Number(selectedRow.pricemove) + Number(formState.PricedPrice)) * formState.PricedQty }}</span>
+            <a-form-item label="发票附件" class="mb40">
+              <div class="upload">
+                <a-upload action="">
+                  <a-button class="uploadBtn">上传</a-button>
+                </a-upload>
+                <div class="look">查看附件</div>
+              </div>
             </a-form-item>
           </a-col>
         </a-row>

+ 1 - 1
src/views/business/purchase/components/settlement/index.vue

@@ -104,7 +104,7 @@
                   <a-checkbox value="交收量">交收量</a-checkbox>
                 </template>
                 <a-input class="dialogInput" placeholder="请输入交收量" suffix="单位"/>
-                <div class="tip"><span>未定价量:40吨</span><a class="blue">全部登记</a></div>
+                <div class="tip"><span>未定价量:40吨</span><a class="blue fr">全部登记</a></div>
               </a-form-item>
             </a-col>
             <a-col :span="12">

+ 8 - 3
src/views/information/goods/components/disable/index.vue

@@ -117,27 +117,32 @@ import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { formatValue } from '@/common/methods';
 import { getStatusName } from '@/views/information/custom/setup';
 import { Modal } from 'ant-design-vue';
+import {stopDeliveryGoods} from "@/views/information/goods/components/setup";
+import {ErmcpDeliveryGoodsDetailEx} from "@/services/go/ermcp/goodsInfo/interface";
 
 export default defineComponent({
     name: 'custom-disable',
     components: {},
     props: {
         selectedRow: {
-            type: Object as PropType<QueryCustomInfoType>,
+            type: Object as PropType<ErmcpDeliveryGoodsDetailEx>,
             default: {},
         },
     },
     setup(props) {
         const { visible, cancel } = closeModal('goods_info_spot_normal_disable');
         const maskClosableFlag = ref<boolean>(false);
-        const { loading, ModifyUserInfo } = updateUserAccount();
+        const loading = ref<boolean>(false);
         function submit() {
             Modal.confirm({
                 title: '是否确认停用客户资料',
                 okText: '确认停用',
                 cancelText: '取消',
                 onOk() {
-                    ModifyUserInfo(props.selectedRow.userid, 6);
+                    stopDeliveryGoods(props.selectedRow.data.deliverygoodsid.toString(), loading)
+                    .then(res => {
+                        cancel()
+                    })
                 },
                 onCancel() {
                     console.log('Cancel');

+ 1 - 1
src/views/information/goods/components/rightSpot/index.vue

@@ -113,7 +113,7 @@
       </a-collapse>
     </div>
     <Modify :selctedDeliveryGoods="selctedDeliveryGoods" />
-    <Disable />
+    <Disable :selctedDeliveryGoods="selctedDeliveryGoods" />
     <SpotDetail />
   </div>
 </template>

+ 41 - 0
src/views/information/goods/components/setup.ts

@@ -0,0 +1,41 @@
+import {DeliveryGoodsSign} from "@/views/information/goods/setup";
+import {commonResultInfo, getRequestResultInfo} from "@/common/methods/request";
+import {hedgePlanReq} from "@/services/proto/hedgeplan";
+import {deliveryGoodsCancel} from "@/services/proto/delivery";
+import {DeliveryGoodsCancelReq} from "@/services/proto/delivery/interface";
+import {Ref} from "vue";
+
+/**
+ * 现货品种停用请求
+ * @param req
+ * @param loading
+ */
+export function stopDeliveryGoods(wrstandardid: string, loading: Ref<boolean>) :Promise<string>{
+    const sign = getRequestResultInfo(DeliveryGoodsSign, 0)  // 接口请求后的返回提示 这里统一进行管理
+    const result = deliveryGoodsCancel(reqDeliveryGoodsBuilder(wrstandardid, 0))
+    return commonResultInfo(result, sign, loading)
+}
+
+/**
+ * 现货品种恢复请求
+ * @param req
+ * @param loading
+ */
+export function resumeDeliveryGoods(wrstandardid: string, loading: Ref<boolean>) :Promise<string>{
+    const sign = getRequestResultInfo(DeliveryGoodsSign, 1)  // 接口请求后的返回提示 这里统一进行管理
+    const result = deliveryGoodsCancel(reqDeliveryGoodsBuilder(wrstandardid, 1))
+    return commonResultInfo(result, sign, loading)
+}
+
+
+/**
+ * 这里组装请求
+ * @param wrstandardid
+ * @param type 0: 停用 1: 恢复
+ */
+export function reqDeliveryGoodsBuilder(wrstandardid: string, type: number) :DeliveryGoodsCancelReq{
+    return {
+        wrstandardid: wrstandardid,
+        isvalid: type
+    } as DeliveryGoodsCancelReq
+}

+ 10 - 0
src/views/information/goods/setup.ts

@@ -1,6 +1,7 @@
 import { getThirdMenuData } from '@/common/setup/table/button';
 import { MenuList } from '@/services/go/ermcp/goodsInfo/interface';
 import { Ref, ref } from 'vue';
+import {ResultInfo} from "@/common/methods/request";
 
 interface MenuType {
     menuList: Ref<MenuList[]>;
@@ -25,3 +26,12 @@ export function getInitMenuData(code: 'goods_info_spot' | 'goods_info_hedge'): M
     return { menuList, menuMap }
 }
 
+
+
+/************** 接口请求相关提示 ****************/
+
+// 停用提示
+export const DeliveryGoodsSign = new Map<number, ResultInfo>([
+    [0, ['停用现货品种成功', '停用现货品种失败:']],
+    [1, ['恢复现货品种成功', '恢复现货品种失败:']],
+])