绿满眶商城微信小程序-uniapp
zxl
2 天以前 c8cef398fbf1f9b63dbf23637ef520b421515dc9
pages/order/afterSales/afterSalesDetail.vue
@@ -61,8 +61,7 @@
              " type="text" input-align="right" :disabled="true" />
          </u-form-item>
          <view v-if="
              applyInfo.accountType === 'BANK_TRANSFER' &&
              applyInfo.applyRefundPrice != 0">
              applyInfo.accountType === 'BANK_TRANSFER'">
            <u-form-item label="银行开户行" :label-width="150">
              <u-input v-model="form.bankDepositName" type="text" input-align="right" placeholder="请输入银行开户行" />
            </u-form-item>
@@ -108,6 +107,7 @@
import { upload } from "@/api/common.js";
import { checkBankno } from "@/utils/Foundation";
import storage from "@/utils/storage.js";
import { getSessionId, userAction } from "@/api/userAction.js";
export default {
  component: {
    city,
@@ -169,13 +169,47 @@
        refundWay: "",
        serviceType: "", //申请类型
      },
     pageSessionNo:"",
    sendOnShow:false,
     actionParam:{
              sessionId:'',
              actionType:"PAGE",
              joinType:"SELF",
              pageCode:"REFUND_ORDER",
              pageParams:"{}",
              pageStatus:"JOIN",
              pageType:"DETAIL"
           }
    };
  },
  onUnload() {
    let param = Object.assign({}, this.actionParam);
    if (this.sendOnShow)return
    param.pageStatus = "LEAVE"
    userAction(param)
  },
  onHide() {
    this.startHidenTime = Date.now()
    let param = Object.assign({}, this.actionParam);
    this.sendOnShow = true;
    param.pageStatus = "LEAVE"
    userAction(param)
  },
   onShow() {
      getSessionId().then(res=>{
            this.pageSessionNo = res.data.data
            this.actionParam.sessionId = this.pageSessionNo
            if(this.pageSessionNo){
            let param = Object.assign({}, this.actionParam);
               userAction(param)
            }
      })
   },
  /**
   * 判断当前内容并生成数据
   */
  onLoad(options) {
   this.actionParam.pageParams = JSON.stringify(options)
    let navTitle = "申请售后";
    this.form.serviceType = "RETURN_GOODS";
    if (options.value == 1) {
@@ -312,42 +346,42 @@
      console.log(this.form.accountType)
      if (this.form.accountType == "BANK_TRANSFER") {
        // 银行开户行校验
        if (this.$u.test.isEmpty(this.form.bankDepositName)) {
          this.$refs.uToast.show({
            title: "请输入 银行开户行",
            type: "error",
          });
          return false;
        }
        // 银行开户名校验
        if (this.$u.test.isEmpty(this.form.bankAccountName)) {
          this.$refs.uToast.show({
            title: "请输入 银行开户名",
            type: "error",
          });
          return false;
        }
        // 银行账号校验
        if (this.$u.test.isEmpty(this.form.bankAccountNumber)) {
          this.$refs.uToast.show({
            title: "请输入 银行账号",
            type: "error",
          });
          return false;
        } else if (this.$u.test.chinese(this.form.bankAccountName) === false) {
          this.$refs.uToast.show({
            title: "银行开户名输入错误",
            type: "error",
          });
          return false;
        } else if (this.$u.test.chinese(this.form.bankDepositName) === false) {
          this.$refs.uToast.show({
            title: "银行开户行输入错误",
            type: "error",
          });
          return false;
        }
        // // 银行开户行校验
        // if (this.$u.test.isEmpty(this.form.bankDepositName)) {
        //   this.$refs.uToast.show({
        //     title: "请输入 银行开户行",
        //     type: "error",
        //   });
        //   return false;
        // }
        // // 银行开户名校验
        // if (this.$u.test.isEmpty(this.form.bankAccountName)) {
        //   this.$refs.uToast.show({
        //     title: "请输入 银行开户名",
        //     type: "error",
        //   });
        //   return false;
        // }
        // // 银行账号校验
        // if (this.$u.test.isEmpty(this.form.bankAccountNumber)) {
        //   this.$refs.uToast.show({
        //     title: "请输入 银行账号",
        //     type: "error",
        //   });
        //   return false;
        // } else if (this.$u.test.chinese(this.form.bankAccountName) === false) {
        //   this.$refs.uToast.show({
        //     title: "银行开户名输入错误",
        //     type: "error",
        //   });
        //   return false;
        // } else if (this.$u.test.chinese(this.form.bankDepositName) === false) {
        //   this.$refs.uToast.show({
        //     title: "银行开户行输入错误",
        //     type: "error",
        //   });
        //   return false;
        // }
      }
      return true;