Ver Fonte

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL

li.shaoyi há 2 anos atrás
pai
commit
b18cc13e38

+ 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 () => {

+ 15 - 7
src/packages/pc/views/account/sign/components/sign/index.vue

@@ -77,13 +77,21 @@ const onCancel = (isRefresh = false) => {
 }
 
 const formSubmit = () => {
-    onSubmit().then(() => {
-        ElMessage.success(bankInfo ? '签约信息修改成功' : '签约提交成功,请耐心等待审核。')
-        onCancel(true)
-    }).catch((err) => {
-        const { getErrorInfoByCode } = useErrorInfoStore()
-        ElMessage(getErrorInfoByCode(Number(err)) ?? '')
-    })
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            if (formData.CusBankID) {
+                onSubmit().then(() => {
+                    ElMessage.success(bankInfo ? '签约信息修改成功' : '签约提交成功,请耐心等待审核。')
+                    onCancel(true)
+                }).catch((err) => {
+                    const { getErrorInfoByCode } = useErrorInfoStore()
+                    ElMessage(getErrorInfoByCode(Number(err)) ?? '')
+                })
+            } else {
+                ElMessage.error('未签约')
+            }
+        }
+    })  
 }
 
 </script>

+ 0 - 0
src/packages/pc/views/auth/register/index.vue


+ 1 - 1
src/packages/pc/views/footer/capital/summary/deposit/index.vue

@@ -1,7 +1,7 @@
 <!-- 资金信息-资金汇总-充值 -->
 <template>
     <app-drawer title="充值" :width="500" v-model:show="show" :loading="loading" :refresh="refresh">
-        <el-form ref="formRef" class="el-form--vertical" label-width="100px" label-position="left" :model="formData"
+        <el-form ref="formRef" class="el-form--vertical" label-width="100px" :model="formData"
             :rules="formRules">
             <el-form-item prop="Amount" label="充值金额">
                 <el-input-number placeholder="请输入" :max="9999999999" :precision="2" v-model="formData.Amount"

+ 16 - 11
src/packages/pc/views/footer/goods/position/components/delivery/index.vue

@@ -97,18 +97,23 @@ const onCancel = (isRefresh = false) => {
 }
 
 const onSubmit = () => {
-    const { marketid, goodsid, goodscode, buyorsell } = props.selectedRow
-    /// 市场ID
-    formData.Header = { MarketID: marketid, GoodsID: goodsid }
-    formData.GoodsCode = goodscode
-    formData.GoodsID = goodsid
-    formData.BuyOrSell = buyorsell
-    formSubmit().then(() => {
-        ElMessage.success('交收成功')
-        onCancel(true)
-    }).catch((err) => {
-        ElMessage.error('交收失败:' + err)
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            const { marketid, goodsid, goodscode, buyorsell } = props.selectedRow
+            /// 市场ID
+            formData.Header = { MarketID: marketid, GoodsID: goodsid }
+            formData.GoodsCode = goodscode
+            formData.GoodsID = goodsid
+            formData.BuyOrSell = buyorsell
+            formSubmit().then(() => {
+                ElMessage.success('交收成功')
+                onCancel(true)
+            }).catch((err) => {
+                ElMessage.error('交收失败:' + err)
+            })
+        }
     })
+    
 }
 
 </script>

+ 22 - 18
src/packages/pc/views/footer/goods/position/components/transfer/index.vue

@@ -105,25 +105,29 @@ const onCancel = (isRefresh = false) => {
 }
 
 const onCloseSumit = () => {
-    const { marketid, goodsid, buyorsell } = props.selectedRow
-    /// 市场ID
-    formData.Header = { GoodsID: goodsid }
-    formData.MarketID = marketid
-    formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
-    formData.BuyOrSell = buyorsell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy
-    formData.GoodsID = goodsid
-    formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTINGTHENLISTING
-    formData.DelistingType = EDelistingType.DELISTINGTYPE_PRICE
-    formData.BuildType = EBuildType.BUILDTYPE_CLOSE
-    formData.TimevalidType = EValidType.VALIDTYPE_DR
-    formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            const { marketid, goodsid, buyorsell } = props.selectedRow
+            /// 市场ID
+            formData.Header = { GoodsID: goodsid }
+            formData.MarketID = marketid
+            formData.PriceMode = EPriceMode.PRICEMODE_LIMIT
+            formData.BuyOrSell = buyorsell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy
+            formData.GoodsID = goodsid
+            formData.ListingSelectType = EListingSelectType.LISTINGSELECTTYPE_DELISTINGTHENLISTING
+            formData.DelistingType = EDelistingType.DELISTINGTYPE_PRICE
+            formData.BuildType = EBuildType.BUILDTYPE_CLOSE
+            formData.TimevalidType = EValidType.VALIDTYPE_DR
+            formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
 
-    formSubmit().then(() => {
-        ElMessage.success('挂牌成功')
-        onCancel(true)
-    }).catch((err) => {
-        ElMessage.error('挂牌失败:' + err)
-    })
+            formSubmit().then(() => {
+                ElMessage.success('挂牌成功')
+                onCancel(true)
+            }).catch((err) => {
+                ElMessage.error('挂牌失败:' + err)
+            })
+        }
+    })  
 }
 
 const onRadioChange = (value: number) => {

+ 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(() => {

+ 11 - 7
src/packages/pc/views/footer/performance/components/delay/index.vue

@@ -52,15 +52,19 @@ const onCancel = (isRefresh = false) => {
 }
 
 const onSubmit = () => {
-    /// 当前步骤ID
-    formData.value.PerformancePlanStepID = props.selectedRow.curstepid
     formRef.value?.validate((valid) => {
         if (valid) {
-            formSubmit().then(() => {
-                ElMessage.success('提交成功')
-                onCancel(true)
-            }).catch((err) => {
-                ElMessage.error('提交失败:' + err)
+             /// 当前步骤ID
+            formData.value.PerformancePlanStepID = props.selectedRow.curstepid
+            formRef.value?.validate((valid) => {
+                if (valid) {
+                    formSubmit().then(() => {
+                        ElMessage.success('提交成功')
+                        onCancel(true)
+                    }).catch((err) => {
+                        ElMessage.error('提交失败:' + err)
+                    })
+                }
             })
         }
     })

+ 20 - 16
src/packages/pc/views/footer/performance/components/edit/index.vue

@@ -139,26 +139,30 @@ const onCancel = (isRefresh = false) => {
 }
 
 const onSubmit = () => {
-    /// PerformancePlanID
-    formData.value.PerformancePlanID = props.selectedRow.performanceplanid
-    /// Json String
-    const json = {
-        ContactInfo: `${Contract.value}`,
-        ReceiveInfo: `${Receive.value}`,
-        ReceiptInfo: `${Receipt.value}`
-    }
-    formData.value.ContactInfo = JSON.stringify(json)
-
     formRef.value?.validate((valid) => {
         if (valid) {
-            formSubmit().then(() => {
-                ElMessage.success('提交成功')
-                onCancel(true)
-            }).catch((err) => {
-                ElMessage.error('提交失败:' + err)
+            /// PerformancePlanID
+            formData.value.PerformancePlanID = props.selectedRow.performanceplanid
+            /// Json String
+            const json = {
+                ContactInfo: `${Contract.value}`,
+                ReceiveInfo: `${Receive.value}`,
+                ReceiptInfo: `${Receipt.value}`
+            }
+            formData.value.ContactInfo = JSON.stringify(json)
+
+            formRef.value?.validate((valid) => {
+                if (valid) {
+                    formSubmit().then(() => {
+                        ElMessage.success('提交成功')
+                        onCancel(true)
+                    }).catch((err) => {
+                        ElMessage.error('提交失败:' + err)
+                    })
+                }
             })
         }
-    })
+    })       
 }
 
 onMounted(() => {

+ 16 - 12
src/packages/pc/views/footer/spot/position/components/listing/index.vue

@@ -81,18 +81,22 @@ const onCancel = (isRefresh = false) => {
 }
 
 const formSubmit = () => {
-    const { wrstandardid, subnum, deliverygoodsid, ladingbillid = '0', wrfactortypeid = '0' } = props.selectedRow ?? {}
-    formData.WRStandardID = wrstandardid
-    formData.DeliveryGoodsID = deliverygoodsid
-    formData.LadingBillId = ladingbillid
-    formData.WRFactorTypeId = wrfactortypeid
-    formData.SubNum = subnum
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            const { wrstandardid, subnum, deliverygoodsid, ladingbillid = '0', wrfactortypeid = '0' } = props.selectedRow ?? {}
+            formData.WRStandardID = wrstandardid
+            formData.DeliveryGoodsID = deliverygoodsid
+            formData.LadingBillId = ladingbillid
+            formData.WRFactorTypeId = wrfactortypeid
+            formData.SubNum = subnum
 
-    listingSubmit().then(() => {
-        ElMessage.success('挂牌成功')
-        onCancel(true)
-    }).catch((err) => {
-        ElMessage.error('挂牌失败:' + err)
-    })
+            listingSubmit().then(() => {
+                ElMessage.success('挂牌成功')
+                onCancel(true)
+            }).catch((err) => {
+                ElMessage.error('挂牌失败:' + err)
+            })
+        }
+    })   
 }
 </script>

+ 9 - 5
src/packages/pc/views/footer/spot/position/components/pickup/index.vue

@@ -200,11 +200,15 @@ const onCancel = (isRefresh = false) => {
 }
 
 const onSubmit = () => {
-    applySubmit().then(() => {
-        ElMessage.success('提货申请成功')
-        onCancel(true)
-    }).catch((err) => {
-        ElMessage.error('提货申请失败:' + err)
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            applySubmit().then(() => {
+                ElMessage.success('提货申请成功')
+                onCancel(true)
+            }).catch((err) => {
+                ElMessage.error('提货申请失败:' + err)
+            })
+        }
     })
 }