Browse Source

Merge branch 'dev/v1.1.1_tsz' of jianyu/web into feature/v1.1.1

汤世哲 4 months ago
parent
commit
c9151260db

+ 13 - 1
apps/mobile/src/assets/js/productLink.js

@@ -12,6 +12,18 @@ export const productLinks = {
       app: '/jyapp/front/dataExport/toOrderDetail'
     }
   },
+  bidCreditRepoetLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_bidcreditreport',
+      h5: '/jyapp/pay/checkout_bidcreditreport',
+      app: '/jyapp/pay/checkout_bidcreditreport'
+    },
+    orderDetail: {
+      wx: '/front/wx_bidcreditreport/wxToOrderDetail',
+      h5: '/jyapp/front/bidcreditreport/toOrderDetail',
+      app: '/jyapp/front/bidcreditreport/toOrderDetail'
+    }
+  },
   // VIP订阅
   vipSubLink: {
     pay: {
@@ -225,7 +237,7 @@ export const productLinks = {
       app: '/jyapp/common/enterpriseAnalysis/orderDetail'
     }
   },
-  //产品类型:业主采购分析报告下载包
+  // 产品类型:业主采购分析报告下载包
   ownerAnalysisLink: {
     pay: {
       wx: '/weixin/pay/checkout_ownerAnalysis',

+ 16 - 25
apps/mobile/src/views/create-order/components/creditreport/ProductionCard.vue

@@ -87,7 +87,10 @@
 import { mapActions, mapGetters, mapMutations } from 'vuex'
 import { Field, Form } from 'vant'
 import { debounce } from '@/utils/utils'
+import { mixinHeader } from '@/utils/mixins/header'
+import { openAppOrWxPage } from '@/utils'
 import { creditReportEntSearch } from '@/api/modules/'
+import orderActivityHelper from '@/utils/mixins/modules/order-activity-helper'
 
 export default {
   name: 'CreditReportProductionCard',
@@ -95,15 +98,16 @@ export default {
     [Form.name]: Form,
     [Field.name]: Field
   },
+  mixins: [mixinHeader, orderActivityHelper],
   data() {
     return {
       pageLayoutConf: {
-        title: '投标企业信用报告',
+        title: '购买投标企业信用报告',
       },
       conf: {
         productName: '投标企业信用报告',
         productId: 150,
-        linkKey: 'creditReportLink',
+        linkKey: 'bidCreditRepoetLink',
       },
       info: {
         company: '',
@@ -112,32 +116,18 @@ export default {
         email: ''
       },
       entList: [],
-      companyList: [],
-      entNameValid: false,
-      companyNameValid: false,
-      emailValid: false
+      companyList: []
     }
   },
   computed: {
-    ...mapGetters('createOrder', ['productExtend', 'productId']),
-    allFiledValid() {
-      return this.entNameValid && this.companyNameValid && this.emailValid
-    }
-  },
-  watch: {
-    allFiledValid(newval) {
-      this.updateCanNextMap({
-        spec: newval
-      })
-    }
+    ...mapGetters('createOrder', ['productExtend', 'productId'])
   },
-
   mounted() {
     this.updatePayAmount()
   },
   methods: {
     ...mapActions('createOrder', ['setProductInfo']),
-    ...mapMutations('createOrder', ['updateCanNextMap']),
+    ...mapMutations('createOrder'),
     async updatePayAmount() {
       const { productId } = this.conf
       this.setProductInfo({
@@ -148,6 +138,13 @@ export default {
       })
     },
     async onSubmit(pre, next) {
+      // 校验输入框是否全部填写完成,如果没有则不提交订单
+      let validBool = false
+      await this.$refs.formRef.validate().then((valid) => {
+        validBool = !valid
+      })
+      if (!validBool)
+        return
       const payload = {
         product: pre.productName,
         productId: pre.productSpecId,
@@ -206,12 +203,6 @@ export default {
           this.info.company = ''
         }
       }
-      // 校验表单字段是否成功
-      this.$refs.formRef.validate(fieldName).then((valid) => {
-        this[`${fieldName}Valid`] = valid
-      }).catch((err) => {
-        console.log(err, 'err')
-      })
     },
     // 获取公司联想数据
     getCompany: debounce(function (val, type) {