瀏覽代碼

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

huangbin 4 年之前
父節點
當前提交
169bd7b58d

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

@@ -418,6 +418,10 @@
     }
     .relative.ant-form-item {
         position: relative;
+        // .itemTip {
+        //     position: absolute;
+        //     color: @m-grey1;
+        // }
         .tip {
             position: absolute;
             font-size: 14px;

+ 18 - 18
src/services/proto/spotcontract/interface.ts

@@ -33,8 +33,8 @@ export interface GldSpotContractInfo {
     BuyUserID: number // uint64 采购方ID
     SellUserID: number // uint64 客户ID
     SignDate: string // string 签订日期
-    ContractAttachment: Uint8Array // bytes 合同附件
-    ContractMargin: number // double 合同保证金
+    ContractAttachment?: Uint8Array // bytes 合同附件
+    ContractMargin?: number // double 合同保证金
     DeliveryGoodsID: number  // uint64 现货品种ID
     WrStandardID: number  // uint64 现货商品ID
     ProductType: number  // uint32 产品类型-1:标准仓单2:等标3:非标
@@ -48,20 +48,20 @@ export interface GldSpotContractInfo {
     DeliveryEndDate: string // string 交收期(结束)
     GoodsID: number // uint64 点价合约ID-0:为现货,其它为期货商品合约ID[2:点价3:暂定价]
     PriceMove: number// double 升贴水[2:点价3:暂定价]
-    StartDate: string // string 点价开始日期[2:点价3:暂定价]
-    EndDate: string // string 点价结束日期[2:点价3:暂定价]
-    PointDesc: string // string 点价备注[2:点价3:暂定价]
-    DeliveryDesc: string  // string 交收方式
-    MerUserID: number // uint64 跟单员ID
-    TradeUserID: number // uint64 交易员ID
-    PricedQty: number // double 已定价量
-    PricedAmount: number // double 已定价金额
+    StartDate?: string // string 点价开始日期[2:点价3:暂定价]
+    EndDate?: string // string 点价结束日期[2:点价3:暂定价]
+    PointDesc?: string // string 点价备注[2:点价3:暂定价]
+    DeliveryDesc?: string  // string 交收方式
+    MerUserID?: number // uint64 跟单员ID
+    TradeUserID?: number // uint64 交易员ID
+    PricedQty?: number // double 已定价量
+    PricedAmount?: number // double 已定价金额
     SpotGoodsBrandID: number // uint64 现货品牌ID
-    Remark: string // string 合同备注
-    SaleUserID: number // uint64 业务员ID
-    AccountID: number // uint64 期货账户ID
-    BizType: number // uint32 业务类型 - 1:套保 2:套利
-    CurrencyID: number // 结算币种ID
+    Remark?: string // string 合同备注
+    SaleUserID?: number // uint64 业务员ID
+    AccountID?: number // uint64 期货账户ID
+    BizType?: number // uint32 业务类型 - 1:套保 2:套利
+    CurrencyID: string // 结算币种ID
 }
 
 //现货合同操作请求  (一部分操作用这个借口)
@@ -78,7 +78,7 @@ export interface SpotContractInfo {
     UserID: number; // uint32 机构ID
     BuyUserID: number; // uint32 采购方ID
     SellUserID: number; // uint32 客户ID
-    SignDate: string; // string 签订日期
+    SignDate?: string; // string 签订日期
     ContractAttachment: Uint8Array; // bytes 合同附件
     ContractMargin: number; // double 合同保证金
     DeliveryGoodsID: number; // uint32 现货品种ID
@@ -90,8 +90,8 @@ export interface SpotContractInfo {
     Qty: number; // double 数量
     Price: number; // double 价格暂定价[1:一口价、3:暂定价]
     Amount: number; // double 金额[1:一口价、3:暂定价]
-    DeliveryStartDate: string; // string 交收期(开始)
-    DeliveryEndDate: string; // string 交收期(结束)
+    DeliveryStartDate?: string; // string 交收期(开始)
+    DeliveryEndDate?: string; // string 交收期(结束)
     GoodsID: number; // uint32 点价合约ID-0:为现货,其它为期货商品合约ID[2:点价3:暂定价]
     PriceMove: number; // double 升贴水[2:点价3:暂定价]
     StartDate: string; // string 点价开始日期[2:点价3:暂定价]

+ 9 - 7
src/views/business/purchase/components/funds/index.vue

@@ -1,13 +1,13 @@
 <template>
     <!-- 款项登记-->
-    <a-modal class="custom-detail add-custom "
+    <a-modal class="commonModal paddingDialog funds"
              :title="selectedRow.contracttype===1? '采购合同-款项登记': '销售合同-款项登记'"
              v-model:visible="visible"
              @cancel="cancel"
              width="890px">
         <template #footer>
             <a-button key="submit"
-                      type="primary"
+                      class="cancelBtn"
                       @click="cancel">取消
             </a-button>
             <a-button key="submit"
@@ -91,7 +91,7 @@
                 <a-row :gutter="24">
                     <a-col :span="12">
                         <a-form-item label="点价价格"  name="PricedPrice">
-                            <a-input-number id="dialogInput"  style="width: 200px" v-model:value="formState.PricedPrice" :min="0" placeholder="请输入点价价格"/>
+                            <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">
@@ -108,10 +108,12 @@
                         </a-form-item>
                     </a-col>
                     <a-col :span="12">
-                        <a-form-item label="点价数量" name="PricedQty">
-                            <a-input-number id="dialogInput"  style="width: 200px" v-model:value="formState.PricedQty" :min="0" :max="selectedRow.unpricedqty" placeholder="请输入点价数量"/>
-                            <span class="white">未定价量{{selectedRow.unpricedqty}}{{selectedRow.enumdicname}} </span>
-                            <span class="white" @click="formState.PricedQty = selectedRow.unpricedqty"> 全部登记</span>
+                        <a-form-item label="点价数量" name="PricedQty" class="relative">
+                            <a-input-number class="dialogInput"  style="width: 200px" v-model:value="formState.PricedQty" :min="0" :max="selectedRow.unpricedqty" 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>
                         </a-form-item>
                     </a-col>
                 </a-row>

+ 9 - 7
src/views/business/purchase/components/invoice/index.vue

@@ -1,13 +1,13 @@
 <template>
     <!-- 发票登记-->
-    <a-modal class="custom-detail add-custom "
+    <a-modal class="commonModal paddingDialog invoice"
              :title="selectedRow.contracttype===1? '采购合同-发票登记': '销售合同-发票登记'"
              v-model:visible="visible"
              @cancel="cancel"
              width="890px">
         <template #footer>
             <a-button key="submit"
-                      type="primary"
+                      class="cancelBtn"
                       @click="cancel">取消
             </a-button>
             <a-button key="submit"
@@ -91,7 +91,7 @@
                 <a-row :gutter="24">
                     <a-col :span="12">
                         <a-form-item label="点价价格"  name="PricedPrice">
-                            <a-input-number id="dialogInput"  style="width: 200px" v-model:value="formState.PricedPrice" :min="0" placeholder="请输入点价价格"/>
+                            <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">
@@ -108,10 +108,12 @@
                         </a-form-item>
                     </a-col>
                     <a-col :span="12">
-                        <a-form-item label="点价数量" name="PricedQty">
-                            <a-input-number id="dialogInput"  style="width: 200px" v-model:value="formState.PricedQty" :min="0" :max="selectedRow.unpricedqty" placeholder="请输入点价数量"/>
-                            <span class="white">未定价量{{selectedRow.unpricedqty}}{{selectedRow.enumdicname}} </span>
-                            <span class="white" @click="formState.PricedQty = selectedRow.unpricedqty"> 全部登记</span>
+                        <a-form-item label="点价数量" name="PricedQty" class="relative">
+                            <a-input-number class="dialogInput"  style="width: 200px" v-model:value="formState.PricedQty" :min="0" :max="selectedRow.unpricedqty" 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>
                         </a-form-item>
                     </a-col>
                 </a-row>

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

@@ -1,13 +1,13 @@
 <template>
     <!-- 交收登记-->
-    <a-modal class="custom-detail add-custom "
+    <a-modal class="commonModal paddingDialog settlement"
              :title="selectedRow.contracttype===1? '采购合同-交收登记': '销售合同-交收登记'"
              v-model:visible="visible"
              @cancel="cancel"
              width="890px">
         <template #footer>
             <a-button key="submit"
-                      type="primary"
+                      class="cancelBtn"
                       @click="cancel">取消
             </a-button>
             <a-button key="submit"
@@ -91,7 +91,7 @@
                 <a-row :gutter="24">
                     <a-col :span="12">
                         <a-form-item label="点价价格"  name="PricedPrice">
-                            <a-input-number id="dialogInput"  style="width: 200px" v-model:value="formState.PricedPrice" :min="0" placeholder="请输入点价价格"/>
+                            <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">
@@ -108,10 +108,12 @@
                         </a-form-item>
                     </a-col>
                     <a-col :span="12">
-                        <a-form-item label="点价数量" name="PricedQty">
-                            <a-input-number id="dialogInput"  style="width: 200px" v-model:value="formState.PricedQty" :min="0" :max="selectedRow.unpricedqty" placeholder="请输入点价数量"/>
-                            <span class="white">未定价量{{selectedRow.unpricedqty}}{{selectedRow.enumdicname}} </span>
-                            <span class="white" @click="formState.PricedQty = selectedRow.unpricedqty"> 全部登记</span>
+                        <a-form-item label="点价数量" class="relative" name="PricedQty">
+                            <a-input-number class="dialogInput"  style="width: 200px" v-model:value="formState.PricedQty" :min="0" :max="selectedRow.unpricedqty" 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>
                         </a-form-item>
                     </a-col>
                 </a-row>

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

@@ -122,7 +122,7 @@
                               :min="0"
                               :max="selectedRow.unpricedqty"
                               placeholder="请输入点价数量" />
-              <div class="itemTip">
+              <div class="tip">
                   <span>未定价量<span class="white">{{selectedRow.unpricedqty}}{{selectedRow.enumdicname}}</span> </span>
                   <a class="blue ml10" @click="formState.PricedQty = selectedRow.unpricedqty"> 全部登记</a>
               </div>
@@ -238,10 +238,6 @@ export default defineComponent({
             padding: 24px;
         }
     }
-    .itemTip {
-        position: absolute;
-        color: @m-grey1;
-    }
     legend {
         width: auto;
         margin-left: 20px;

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

@@ -1,6 +1,6 @@
 <template>
   <!-- 入库登记-->
-  <a-modal class="custom-detail"
+  <a-modal class="commonModal"
            title="入库登记"
            v-model:visible="visible"
            @cancel="cancel"

+ 22 - 2
src/views/information/spot-contract/components/add/index.vue

@@ -415,7 +415,15 @@
 import { defineComponent, ref, toRaw } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { initData } from '@/common/methods';
-import { handleFromState, handleContract, handlevalidate, handleDeliveryGoods, handlePrice, handleDate } from './setup';
+import {
+    handleFromState,
+    handleContract,
+    handlevalidate,
+    handleDeliveryGoods,
+    handlePrice,
+    handleDate,
+    addContractReq
+} from './setup';
 import { getUserName } from '@/services/bus/user';
 import { getGoodsList } from '@/services/bus/goods';
 import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
@@ -428,7 +436,7 @@ export default defineComponent({
     components: {},
     setup() {
         const { visible, cancel } = closeModal('spot_contract_btn_add');
-        const loading = ref<boolean>(false);
+        const {loading, sendReq} = addContractReq();
 
         // 表单
         const formRef = ref();
@@ -469,6 +477,10 @@ export default defineComponent({
                 .then(() => {
                     const param = toRaw(formState);
 
+                    // console.log('deliveryDate', moment(deliveryDate.value[0], 'YYYY/MM/DD'));
+                    // console.log('priceDate', priceDate);
+                    // console.log('values', formState);
+
                     // 交收期
                     const dDate = deliveryDate.value;
                     if (dDate.length) {
@@ -486,6 +498,14 @@ export default defineComponent({
                         Object.assign(param, { StartDate, EndDate });
                     }
                     console.log('values', formState);
+
+                    sendReq(param, OperateType)
+                        .then(res =>{
+                            cancel()
+                        })
+                        .catch(err =>{
+
+                        })
                 })
                 .catch((error: ValidateErrorEntity<FormState>) => {
                     console.log('error', error);

+ 3 - 3
src/views/information/spot-contract/components/add/interface.ts

@@ -22,12 +22,12 @@ export interface FormState {
     PriceMove: number | null// double 升贴水[2:点价3:暂定价]
     GoodsID: number | undefined // uint64 点价合约ID-0:为现货,其它为期货商品合约ID[2:点价3:暂定价]
     // PriceMove: number// double 升贴水[2:点价3:暂定价]
-    // StartDate: string // string 点价开始日期[2:点价3:暂定价]
-    // EndDate: string // string 点价结束日期[2:点价3:暂定价]
+    StartDate: string // string 点价开始日期[2:点价3:暂定价]
+    EndDate: string // string 点价结束日期[2:点价3:暂定价]
     // PointDesc: string // string 点价备注[2:点价3:暂定价]
     // DeliveryDesc: string  // string 交收方式
     MerUserID: number | undefined // uint64 跟单员ID
-    // TradeUserID: number // uint64 交易员ID
+    TradeUserID: number // uint64 交易员ID
     // PricedQty: number // double 已定价量
     // PricedAmount: number // double 已定价金额
     SpotGoodsBrandID: number | undefined // uint64 现货品牌ID

+ 127 - 25
src/views/information/spot-contract/components/add/setup.ts

@@ -1,14 +1,19 @@
-import { validateCommon } from '@/common/setup/validate';
-import { getItemEnum } from '@/services/bus/allEnum';
-import { QueryCustomInfo } from '@/services/go/ermcp/customInfo';
-import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-import { QueryDeliveryGoods, QueryDeliveryGoodsDetail } from '@/services/go/ermcp/goodsInfo';
-import { Ermcp3Brand, Ermcp3Wrstandard, ErmcpDeliveryGoodsRsp } from '@/services/go/ermcp/goodsInfo/interface';
-import { message } from 'ant-design-vue';
-import { RuleObject } from 'ant-design-vue/lib/form/interface';
-import moment, { Moment } from 'moment';
-import { reactive, ref, UnwrapRef } from 'vue';
-import { FormState } from "./interface";
+import {validateCommon} from '@/common/setup/validate';
+import {getItemEnum} from '@/services/bus/allEnum';
+import {QueryCustomInfo} from '@/services/go/ermcp/customInfo';
+import {QueryCustomInfoType} from '@/services/go/ermcp/customInfo/interface';
+import {QueryDeliveryGoods, QueryDeliveryGoodsDetail} from '@/services/go/ermcp/goodsInfo';
+import {Ermcp3Brand, Ermcp3Wrstandard, ErmcpDeliveryGoodsRsp} from '@/services/go/ermcp/goodsInfo/interface';
+import {message} from 'ant-design-vue';
+import {RuleObject} from 'ant-design-vue/lib/form/interface';
+import moment, {Moment} from 'moment';
+import {reactive, ref, UnwrapRef} from 'vue';
+import {FormState} from "./interface";
+import {changeOrderContract} from "@/views/information/spot-contract/components/setup";
+import {GldErmcpSpotContractOperateReq, GldSpotContractInfo} from "@/services/proto/spotcontract/interface";
+import {getServerTime} from "@/services/go/commonService";
+import APP from "@/services";
+import {orderContract} from "@/services/proto/spotcontract";
 
 export function handleFromState() {
     const formState: UnwrapRef<FormState> = reactive({
@@ -36,23 +41,89 @@ export function handleFromState() {
         Remark: '', // string 合同备注
         CurrencyID: undefined, // 结算币种ID
         GoodsID: undefined, // uint64 点价合约ID-0:为现货,其它为期货商品合约ID[2:点价3:暂定价]
-        PriceMove: null// double 升贴水[2:点价3:暂定价]
+        PriceMove: null,// double 升贴水[2:点价3:暂定价]
+        StartDate: '', //                       点价开始时间
+        EndDate: '', //                           点价结束时间
+        TradeUserID: 0, //           交易员ID
     })
     // 业务类型
     const businessType = [
-        { key: 1, value: '套保' },
-        { key: 2, value: '套利' },
+        {key: 1, value: '套保'},
+        {key: 2, value: '套利'},
     ];
-    return { formState, businessType }
+    return {formState, businessType}
 }
+
+/**
+ * 新增现货合同 表单提交
+ */
+export function addContractReq() {
+    const {loading, orderContractState} = changeOrderContract()
+    /**
+     * @param form 表单信息
+     *  @Param type  1: 保存草稿  2: 提交申请
+     */
+    function sendReq(form: FormState, type: number): Promise<string> {
+        const info: GldSpotContractInfo = {
+            UserID: APP.get('userAccount').memberuserid,//  机构ID
+            ProductType: 1, //                              产品类型 产品类型-1:标准仓单2:等标3:非标
+            ContractNo: form.ContractNo,      //            现货合同编号
+            ContractType: form.ContractType, //             现货合同类型-1:采购-1:销售
+            BuyUserID: form.BuyUserID, //                   采购方ID
+            SellUserID: form.SellUserID,//                  客户ID
+            DeliveryGoodsID: form.DeliveryGoodsID as number,//   现货品种ID
+            WrStandardID: form.WrStandardID as number,//         品类ID
+            SpotGoodsBrandID: form.SpotGoodsBrandID as number,// 品牌ID
+            ConvertFactor: form.ConvertFactor as number, //      标仓系数
+            SpotGoodsDesc: form.SpotGoodsDesc, //                商品规格
+            PriceType: form.PriceType,//                         定价类型
+            CurrencyID: (form.CurrencyID as number).toString(),//结算币种
+            Qty: form.Qty as number, //                     数量
+            Price: form.Price as number, //                 价格
+            TradeDate: moment().format("YYYYMMDD"),//             交易日
+            SignDate: moment().format("YYYY-MM-DD HH:mm:ss"), //  签订日期
+            // 以上必填
+            // 以下选填
+            BizType: form.BizType, //                       业务类型 - 1:套保 2:套利
+            Remark: form.Remark,  //       合同备注
+            // ContractAttachment: ,  // 合同附件
+            ContractMargin: form.ContractMargin as number, //         合同保证金
+
+            Amount: [1,3].includes(form.PriceType)  ? Number(form.Price) * Number(form.Qty) : 0, //    金额
+            PriceMove: form.PriceMove as number, //  升贴水
+
+            StartDate: form.StartDate, //                       点价开始时间
+            EndDate: form.EndDate, //                           点价结束时间
+            DeliveryStartDate: form.DeliveryStartDate,//        交收期开始
+            DeliveryEndDate: form.DeliveryEndDate, //           交收期结束
+
+            GoodsID: form.GoodsID as number, //               点价合约ID-0:为现货,其它为期货商品合约ID[2:点价3:暂定价]
+
+            // MerUserID: form.MerUserID, //             跟单员ID
+            // TradeUserID: form.TradeUserID, //           交易员ID
+            // SaleUserID: form.SaleUserID,//             业务员id
+        }
+        debugger
+        return orderContractState('0', type, info)
+            .then(res => {
+                return Promise.resolve(res);
+            })
+            .catch(err => {
+                return Promise.reject(err);
+            })
+    }
+
+    return {loading, sendReq}
+}
+
 /**
  * 合同类型
  */
 export function handleContract() {
     // 合同类型
     const contractType = [
-        { key: 1, value: '采购' },
-        { key: -1, value: '销售' },
+        {key: 1, value: '采购'},
+        {key: -1, value: '销售'},
     ];
     const isSell = ref<boolean>(false)  // true => 销售 false => 采购
     /**
@@ -61,7 +132,9 @@ export function handleContract() {
     function contractChange(value: number) {
         isSell.value = value === 1 ? false : true;
     }
+
     const customList = ref<QueryCustomInfoType[]>([])
+
     function queryCustomList() {
         QueryCustomInfo(3)
             .then((res) => {
@@ -72,7 +145,8 @@ export function handleContract() {
                 message.error(err);
             })
     }
-    return { contractType, isSell, contractChange, customList, queryCustomList }
+
+    return {contractType, isSell, contractChange, customList, queryCustomList}
 }
 
 /**
@@ -83,44 +157,54 @@ export function handlevalidate(formState: UnwrapRef<FormState>) {
     async function v_ContractType(rule: RuleObject, value: number) {
         return validateCommon(value, '请选择合同类型')
     }
+
     // 验证业务类型
     async function v_BizType(rule: RuleObject, value: number) {
         return validateCommon(value, '请选择业务类型')
     }
+
     // 验证业务类型
     async function v_BuyUser(rule: RuleObject, value: number) {
         return validateCommon(value, '请选择采购方')
     }
+
     // 验证业务类型
     async function v_SellUser(rule: RuleObject, value: number) {
         return validateCommon(value, '请选择销售方')
     }
+
     // 验证现货品种
     async function v_DeliveryGoods(rule: RuleObject, value: number) {
         return validateCommon(value, '请选择现货品种')
     }
+
     // 验证品类
     async function v_WrStandard(rule: RuleObject, value: number) {
         const errorInfo = formState.DeliveryGoodsID ? '请选择品类' : '请先选择现货品种'
         return validateCommon(value, errorInfo)
     }
+
     // 验证品牌
     async function v_SpotGoodsBrand(rule: RuleObject, value: number) {
         const errorInfo = formState.DeliveryGoodsID ? '请选择品牌' : '请先选择现货品种'
         return validateCommon(value, errorInfo)
     }
+
     // 验证定价类型
     async function v_PriceType(rule: RuleObject, value: number) {
         return validateCommon(value, '请选择定价类型')
     }
+
     // 验证结算币种
     async function v_Currency(rule: RuleObject, value: number) {
         return validateCommon(value, '请选择结算币种')
     }
+
     // 验证点价合约
     async function v_Goods(rule: RuleObject, value: number) {
         return validateCommon(value, '请选择点价合约')
     }
+
     return {
         v_ContractType, v_BizType, v_BuyUser, v_SellUser, v_DeliveryGoods, v_WrStandard,
         v_SpotGoodsBrand, v_PriceType, v_Currency, v_Goods
@@ -147,6 +231,7 @@ export function handleDeliveryGoods(formState: UnwrapRef<FormState>) {
             message.error(err)
         })
     }
+
     // 切换现货商品
     function deliveryGoodsChange(value: number | undefined) {
         if (value !== undefined) {
@@ -156,6 +241,7 @@ export function handleDeliveryGoods(formState: UnwrapRef<FormState>) {
             gmlist.value.length = 0
         }
     }
+
     // 查询现货商品详情
     function getDeliveryGoodsDetail(deliverygoodsid: number) {
         QueryDeliveryGoodsDetail(deliverygoodsid).then(res => {
@@ -168,7 +254,9 @@ export function handleDeliveryGoods(formState: UnwrapRef<FormState>) {
             message.error(err)
         })
     }
+
     const numberUnit = ref<string>('')
+
     // 品类变更
     function WrStandardChange(value: number) {
         const obj = gmlist.value.find((e) => e.wrstandardid === value);
@@ -182,7 +270,17 @@ export function handleDeliveryGoods(formState: UnwrapRef<FormState>) {
             }
         }
     }
-    return { deliveryGoodsList, gblist, gmlist, numberUnit, WrStandardChange, getDeliveryGoods, getDeliveryGoodsDetail, deliveryGoodsChange }
+
+    return {
+        deliveryGoodsList,
+        gblist,
+        gmlist,
+        numberUnit,
+        WrStandardChange,
+        getDeliveryGoods,
+        getDeliveryGoodsDetail,
+        deliveryGoodsChange
+    }
 }
 
 /**
@@ -191,15 +289,16 @@ export function handleDeliveryGoods(formState: UnwrapRef<FormState>) {
 export function handlePrice(formState: UnwrapRef<FormState>) {
     // 定价类型
     const priceType = [
-        { key: 1, value: '一口价' },
-        { key: 2, value: '点价' },
-        { key: 3, value: '暂定价' },
+        {key: 1, value: '一口价'},
+        {key: 2, value: '点价'},
+        {key: 3, value: '暂定价'},
     ];
     // 币种
     const payCurrency = getItemEnum('paycurrency')
     console.log('payCurrency', payCurrency);
     // 目前写死,获取枚举信息里面没有 单位名称,后期进行优化
     const payCurrencyUnit = ref<string>('元')
+
     // 切换币种
     function parCurrencyChange(value: number) {
         const obj = payCurrency.find(e => e.enumdicid === value)
@@ -207,7 +306,8 @@ export function handlePrice(formState: UnwrapRef<FormState>) {
 
         // payCurrencyUnit.value = obj?.enumdicname
     }
-    return { priceType, payCurrency, payCurrencyUnit, parCurrencyChange }
+
+    return {priceType, payCurrency, payCurrencyUnit, parCurrencyChange}
 }
 
 export function handleAddAction() {
@@ -224,9 +324,11 @@ export function handleDate() {
     const deliveryDate = ref<Moment[]>([])
     // 点价期
     const priceDate = ref<Moment[]>([]);
+
     function disabledDate(current: Moment) {
         // Can not select days before today and today
         return current && current < moment().endOf('day');
     }
-    return { deliveryDate, priceDate, disabledDate }
-}
+
+    return {deliveryDate, priceDate, disabledDate}
+}