|  | @@ -27,7 +27,7 @@
 | 
											
												
													
														|  |            />
 |  |            />
 | 
											
												
													
														|  |          </div>
 |  |          </div>
 | 
											
												
													
														|  |          <div class="page-title">货物运输申请</div>
 |  |          <div class="page-title">货物运输申请</div>
 | 
											
												
													
														|  | -        <!-- <el-button @click="submit">test</el-button> -->
 |  | 
 | 
											
												
													
														|  | 
 |  | +        <!-- <el-button @click="redirectToCRM">test</el-button> -->
 | 
											
												
													
														|  |        </div>
 |  |        </div>
 | 
											
												
													
														|  |        <el-form
 |  |        <el-form
 | 
											
												
													
														|  |          ref="mainForm"
 |  |          ref="mainForm"
 | 
											
										
											
												
													
														|  | @@ -398,6 +398,7 @@
 | 
											
												
													
														|  |              <el-button
 |  |              <el-button
 | 
											
												
													
														|  |                size="large"
 |  |                size="large"
 | 
											
												
													
														|  |                type="primary"
 |  |                type="primary"
 | 
											
												
													
														|  | 
 |  | +              :disabled="submited"
 | 
											
												
													
														|  |                :loading="loading"
 |  |                :loading="loading"
 | 
											
												
													
														|  |                @click="checkForm(mainForm)"
 |  |                @click="checkForm(mainForm)"
 | 
											
												
													
														|  |              >
 |  |              >
 | 
											
										
											
												
													
														|  | @@ -795,8 +796,6 @@ request
 | 
											
												
													
														|  |  const limitNumber = function (e: any, obj: any, key: string) {
 |  |  const limitNumber = function (e: any, obj: any, key: string) {
 | 
											
												
													
														|  |    if (e) {
 |  |    if (e) {
 | 
											
												
													
														|  |      obj[key] = Math.round(Number(e))
 |  |      obj[key] = Math.round(Number(e))
 | 
											
												
													
														|  | -  } else {
 |  | 
 | 
											
												
													
														|  | -    obj[key] = 1
 |  | 
 | 
											
												
													
														|  |    }
 |  |    }
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  const resetFileInput = function () {
 |  |  const resetFileInput = function () {
 | 
											
										
											
												
													
														|  | @@ -856,6 +855,7 @@ const checkForm = function (formEl: FormInstance | undefined) {
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |    })
 |  |    })
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  | 
 |  | +const submited = ref(false)
 | 
											
												
													
														|  |  const submit = function () {
 |  |  const submit = function () {
 | 
											
												
													
														|  |    // 接口
 |  |    // 接口
 | 
											
												
													
														|  |    const d: any = {
 |  |    const d: any = {
 | 
											
										
											
												
													
														|  | @@ -1076,14 +1076,16 @@ const submit = function () {
 | 
											
												
													
														|  |        id: 'Table-1718950612643',
 |  |        id: 'Table-1718950612643',
 | 
											
												
													
														|  |        value: {
 |  |        value: {
 | 
											
												
													
														|  |          children: form.value.goods.map((g) => {
 |  |          children: form.value.goods.map((g) => {
 | 
											
												
													
														|  | -          setTimeout(() => {
 |  | 
 | 
											
												
													
														|  | -            ElNotification({
 |  | 
 | 
											
												
													
														|  | -              duration: 0,
 |  | 
 | 
											
												
													
														|  | -              type: 'warning',
 |  | 
 | 
											
												
													
														|  | -              title: '注意',
 |  | 
 | 
											
												
													
														|  | -              message: `${g.name} 发货数量${g.number}大于可发货数量${g.quantity}`,
 |  | 
 | 
											
												
													
														|  | -            })
 |  | 
 | 
											
												
													
														|  | -          }, 0)
 |  | 
 | 
											
												
													
														|  | 
 |  | +          if (g.number > g.quantity) {
 | 
											
												
													
														|  | 
 |  | +            setTimeout(() => {
 | 
											
												
													
														|  | 
 |  | +              ElNotification({
 | 
											
												
													
														|  | 
 |  | +                duration: 0,
 | 
											
												
													
														|  | 
 |  | +                type: 'warning',
 | 
											
												
													
														|  | 
 |  | +                title: '注意',
 | 
											
												
													
														|  | 
 |  | +                message: `${g.name} 发货数量${g.number}大于可发货数量${g.quantity}`,
 | 
											
												
													
														|  | 
 |  | +              })
 | 
											
												
													
														|  | 
 |  | +            }, 0)
 | 
											
												
													
														|  | 
 |  | +          }
 | 
											
												
													
														|  |            return {
 |  |            return {
 | 
											
												
													
														|  |              list: [
 |  |              list: [
 | 
											
												
													
														|  |                {
 |  |                {
 | 
											
										
											
												
													
														|  | @@ -1139,8 +1141,12 @@ const submit = function () {
 | 
											
												
													
														|  |            duration: 0,
 |  |            duration: 0,
 | 
											
												
													
														|  |            type: 'success',
 |  |            type: 'success',
 | 
											
												
													
														|  |            title: '任务已成功处理',
 |  |            title: '任务已成功处理',
 | 
											
												
													
														|  | -          message: '本页面将自动关闭',
 |  | 
 | 
											
												
													
														|  | 
 |  | +          message: '本页面将自动跳转CRM',
 | 
											
												
													
														|  |          })
 |  |          })
 | 
											
												
													
														|  | 
 |  | +        setTimeout(() => {
 | 
											
												
													
														|  | 
 |  | +          redirectToCRM()
 | 
											
												
													
														|  | 
 |  | +        }, 3500)
 | 
											
												
													
														|  | 
 |  | +        submited.value = true
 | 
											
												
													
														|  |        } else {
 |  |        } else {
 | 
											
												
													
														|  |          ElNotification({
 |  |          ElNotification({
 | 
											
												
													
														|  |            duration: 0,
 |  |            duration: 0,
 | 
											
										
											
												
													
														|  | @@ -1154,6 +1160,9 @@ const submit = function () {
 | 
											
												
													
														|  |        loading.value = false
 |  |        loading.value = false
 | 
											
												
													
														|  |      })
 |  |      })
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  | 
 |  | +const redirectToCRM = () => {
 | 
											
												
													
														|  | 
 |  | +  window.location.replace(import.meta.env.VITE_CRM_PATH)
 | 
											
												
													
														|  | 
 |  | +}
 | 
											
												
													
														|  |  const getLogoPath = function () {
 |  |  const getLogoPath = function () {
 | 
											
												
													
														|  |    return new URL('/assets/logo@2x.png', import.meta.url).href
 |  |    return new URL('/assets/logo@2x.png', import.meta.url).href
 | 
											
												
													
														|  |  }
 |  |  }
 |