|
@@ -74,7 +74,7 @@
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
import { defineComponent, PropType, ref } from 'vue';
|
|
import { defineComponent, PropType, ref } from 'vue';
|
|
|
import Drawer from '@/common/components/drawer/index.vue';
|
|
import Drawer from '@/common/components/drawer/index.vue';
|
|
|
-import {WrPerformancePlan, WrPosition} from '@/services/go/wrtrade/interface';
|
|
|
|
|
|
|
+import { WrPerformancePlan, WrPosition } from '@/services/go/wrtrade/interface';
|
|
|
import { ModalEnum } from '@/common/constants/modalNameEnum';
|
|
import { ModalEnum } from '@/common/constants/modalNameEnum';
|
|
|
import { _closeModal } from '@/common/setup/modal/modal';
|
|
import { _closeModal } from '@/common/setup/modal/modal';
|
|
|
import { handleForm } from './setup';
|
|
import { handleForm } from './setup';
|
|
@@ -82,10 +82,12 @@ import { validateAction } from '@/common/setup/form';
|
|
|
import { FormState } from './interface';
|
|
import { FormState } from './interface';
|
|
|
import UploadImg from '@/common/components/uploadImg/index.vue';
|
|
import UploadImg from '@/common/components/uploadImg/index.vue';
|
|
|
import { getUploadImg } from '@/common/setup/upload';
|
|
import { getUploadImg } from '@/common/setup/upload';
|
|
|
-import {PerformanceDelayApplyReq} from "@/services/proto/performance/interface";
|
|
|
|
|
-import {getUserId} from "@/services/bus/account";
|
|
|
|
|
-import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
|
|
|
|
|
-import {performanceContractedApply, performanceDelayApply} from "@/services/proto/performance";
|
|
|
|
|
|
|
+import { PerformanceDelayApplyReq } from '@/services/proto/performance/interface';
|
|
|
|
|
+import { getUserId } from '@/services/bus/account';
|
|
|
|
|
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
|
|
+import { performanceContractedApply, performanceDelayApply } from '@/services/proto/performance';
|
|
|
|
|
+import { BuyOrSell } from '@/common/constants/enumCommon';
|
|
|
|
|
+import { handlePerformancePlanStep } from '../setup';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: ModalEnum.performance_information_buy_performance_breach_contract,
|
|
name: ModalEnum.performance_information_buy_performance_breach_contract,
|
|
@@ -96,12 +98,17 @@ export default defineComponent({
|
|
|
type: Object as PropType<WrPerformancePlan>,
|
|
type: Object as PropType<WrPerformancePlan>,
|
|
|
default: {},
|
|
default: {},
|
|
|
},
|
|
},
|
|
|
|
|
+ buyOrSell: {
|
|
|
|
|
+ type: Number as PropType<BuyOrSell>,
|
|
|
|
|
+ default: BuyOrSell.buy,
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
setup(props, context) {
|
|
setup(props, context) {
|
|
|
const { visible, cancel } = _closeModal(context);
|
|
const { visible, cancel } = _closeModal(context);
|
|
|
const loading = ref<boolean>(false);
|
|
const loading = ref<boolean>(false);
|
|
|
const { rules, formState, formRef } = handleForm();
|
|
const { rules, formState, formRef } = handleForm();
|
|
|
const { uploadImgAction, uploadImgList, handleImg } = getUploadImg();
|
|
const { uploadImgAction, uploadImgList, handleImg } = getUploadImg();
|
|
|
|
|
+ const { performancePlanStep } = handlePerformancePlanStep(props.selectedRow);
|
|
|
function submit() {
|
|
function submit() {
|
|
|
validateAction<FormState>(formRef, formState).then((param) => {
|
|
validateAction<FormState>(formRef, formState).then((param) => {
|
|
|
// 违约申请
|
|
// 违约申请
|
|
@@ -109,15 +116,12 @@ export default defineComponent({
|
|
|
PerformancePlanStepID: props.selectedRow.curstepid,
|
|
PerformancePlanStepID: props.selectedRow.curstepid,
|
|
|
delaydays: 2,
|
|
delaydays: 2,
|
|
|
applicant: getUserId(),
|
|
applicant: getUserId(),
|
|
|
- applyremark: param.remark
|
|
|
|
|
|
|
+ applyremark: param.remark,
|
|
|
};
|
|
};
|
|
|
debugger;
|
|
debugger;
|
|
|
requestResultLoadingAndInfo(performanceContractedApply, paramReq, loading, ['违约成功', '违约失败:']).then(() => {
|
|
requestResultLoadingAndInfo(performanceContractedApply, paramReq, loading, ['违约成功', '违约失败:']).then(() => {
|
|
|
cancel(true);
|
|
cancel(true);
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
return {
|
|
return {
|