Bläddra i källkod

修改新增现货合同

huangbin 4 år sedan
förälder
incheckning
477cc0974c
1 ändrade filer med 7 tillägg och 4 borttagningar
  1. 7 4
      src/views/information/spot-contract/components/add/index.vue

+ 7 - 4
src/views/information/spot-contract/components/add/index.vue

@@ -10,11 +10,11 @@
     <template #footer>
       <a-button key="submit"
                 class="cancelBtn"
-                @click="submit">保存草稿</a-button>
+                @click="submit(1)">保存草稿</a-button>
       <a-button key="submit"
                 type="primary"
                 :loading="loading"
-                @click="submit">提交审核</a-button>
+                @click="submit(2)">提交审核</a-button>
     </template>
     <a-form class="inlineForm"
             ref="formRef"
@@ -421,6 +421,7 @@ import { getGoodsList } from '@/services/bus/goods';
 import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
 import { ValidateErrorEntity } from 'ant-design-vue/lib/form/interface';
 import { FormState } from './interface';
+import moment from 'moment';
 
 export default defineComponent({
     name: 'add-spot-contract',
@@ -446,7 +447,7 @@ export default defineComponent({
             WrStandardID: [{ required: true, validator: v_WrStandard, trigger: 'blur' }],
             SpotGoodsBrandID: [{ required: true, validator: v_SpotGoodsBrand, trigger: 'blur' }],
             GoodsID: [{ required: true, validator: v_Goods, trigger: 'blur' }],
-            ConvertFactor: [{ required: true, message: '请选择品类', trigger: 'blur' }],
+            // ConvertFactor: [{ required: true, message: '请选择品类', trigger: 'blur' }],
             SpotGoodsDesc: [{ required: true, message: '请输入商品规格', trigger: 'blur' }],
             PriceType: [{ required: true, validator: v_PriceType, trigger: 'blur' }],
             CurrencyID: [{ required: true, validator: v_Currency, trigger: 'blur' }],
@@ -462,11 +463,13 @@ export default defineComponent({
         const { deliveryDate, priceDate, disabledDate } = handleDate();
         // 现货商品列表
         const goodsList = ref<Goods[]>([]);
-        function submit() {
+        function submit(OperateType: number) {
             formRef.value
                 .validate()
                 .then(() => {
                     const param = toRaw(formState);
+                    console.log('deliveryDate', moment(deliveryDate.value[0], 'YYYY/MM/DD'));
+                    console.log('priceDate', priceDate);
                     console.log('values', formState);
                 })
                 .catch((error: ValidateErrorEntity<FormState>) => {