|
|
@@ -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 { formatTime } from '@/common/methods/format';
|
|
|
import moment from 'moment';
|
|
|
|
|
|
export default defineComponent({
|
|
|
@@ -468,8 +469,22 @@ export default defineComponent({
|
|
|
.validate()
|
|
|
.then(() => {
|
|
|
const param = toRaw(formState);
|
|
|
- console.log('deliveryDate', moment(deliveryDate.value[0], 'YYYY/MM/DD'));
|
|
|
- console.log('priceDate', priceDate);
|
|
|
+
|
|
|
+ // 交收期
|
|
|
+ const dDate = deliveryDate.value;
|
|
|
+ if (dDate.length) {
|
|
|
+ const DeliveryStartDate = formatTime(dDate[0], 'd') + '00:00:00';
|
|
|
+ const DeliveryEndDate = formatTime(dDate[1], 'd') + '00:00:00';
|
|
|
+ Object.assign(param, { DeliveryStartDate, DeliveryEndDate });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 点价期
|
|
|
+ const pDate = priceDate.value;
|
|
|
+ if (pDate.length && param.PriceType !== 1) {
|
|
|
+ const StartDate = formatTime(dDate[0], 'd') + '00:00:00';
|
|
|
+ const EndDate = formatTime(dDate[1], 'd') + '00:00:00';
|
|
|
+ Object.assign(param, { StartDate, EndDate });
|
|
|
+ }
|
|
|
console.log('values', formState);
|
|
|
})
|
|
|
.catch((error: ValidateErrorEntity<FormState>) => {
|