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