Handy_Cao 2 tahun lalu
induk
melakukan
7f70374f57

+ 1 - 1
src/business/performance/index.ts

@@ -15,7 +15,7 @@ export function usePerformanceContractedApply(buyorsell: number) {
     const loading = shallowRef(false)
 
     const formData = ref<Partial<Proto.PerformanceContractedApplyReq>>({
-        BreachType: buyorsell+1
+        BreachType: buyorsell+1,
     })
 
     const formSubmit = async () => {

+ 3 - 2
src/packages/pc/views/footer/performance/components/contracted/index.vue

@@ -38,7 +38,7 @@ const props = defineProps({
     }
 })
 
-const { loading, formData, formSubmit } = usePerformanceContractedApply(props.selectedRow.buyaccountid)
+const { loading, formData, formSubmit } = usePerformanceContractedApply(props.selectedRow.buyorsell)
 const show = ref(true)
 const refresh = ref(false)
 const formRef = ref<FormInstance>()
@@ -57,7 +57,7 @@ const formRules: FormRules = {
 }
 
 const onUploadChange = (file: { filePath: string }) => {
-    formData.Attachment = file.filePath
+    formData.value.Attachment = file.filePath
     formRef.value?.validateField('Attachment')
 }
 
@@ -67,6 +67,7 @@ const onCancel = (isRefresh = false) => {
 }
 
 const onSubmit = () => {
+    formData.value.PerformancePlanID = props.selectedRow.performanceplanid
     formRef.value?.validate((valid) => {
         if (valid) {
             formSubmit().then(() => {