#
whycq
2023-12-02 178d0ee433ecee57bbd57804cc29c593f3de7829
pages/business/goBusiness/modiReimburseOnlineDetl.vue
@@ -197,7 +197,8 @@
                  updateTime: '',
                  updateUserName: ''
               },
            fixtype: 'modi'
            fixtype: 'modi',
            businessId: 0
         }
      },
      onLoad(option) {
@@ -210,9 +211,9 @@
            if (data.data == 'add') {
               _this.title = '添加报销审批'
               _this.fixtype = 'add'
               _this.form[0].hide = false
            }
            if (data.data == 'modi') {
               // _this.title = '添加报销审批'
               _this.form[1].value = data.detl.list.templateName
               _this.reimburseId2 = data.detl.list.id
               for (let k in _this.reimburseIds[0]) {
@@ -224,6 +225,12 @@
               _this.form[0].value = data.detl.list.orderId$
               _this.getOrderId(data.detl.list.orderId$)
               _this.tableData = data.detl.list.detl
            }
            // 出差申请报销
            if (data.data == 'add2') {
               _this.title = '添加报销审批'
               _this.fixtype = 'add2'
               _this.businessId = data.detl.id
            }
         })
         
@@ -312,7 +319,7 @@
            }
            
            for (let element of this.orderIdList) {
               if(element.value == this.orderId) {
               if(element.value == this.form[0].value) {
                  param.orderId = element.id + ''
               }
            }
@@ -326,10 +333,6 @@
            }
            param.reimburseId = this.reimburseId2
            param.reimburseOnlineDetls = this.tableData
            // if (param.reimburseId == null || param.reimburseId === '') {
            //    uni.showToast({title: '报销类型不能为空', icon: "none", position: 'top'})
            //    return
            // }
            if (param.checkData == '') {
               uni.showToast({title: '是否冲账不能为空', icon: "none", position: 'top'})
               return
@@ -340,6 +343,9 @@
            }
            console.log(param);
            if (this.fixtype == 'add') {
               this.formAdd(param)
            } else if (this.fixtype == 'add2') {
               param['businessId'] = this.businessId
               this.formAdd(param)
            } else {
               this.formModi(param)
@@ -371,10 +377,9 @@
               data: JSON.stringify(param),
               method: 'POST',
               success(res) {
                  console.log(res);
                  res = res.data
                  if (res.code === 200) {
                     uni.navigateBack({})
                     uni.navigateBack({delta:2})
                  } else if(res.code === 500) {
                     uni.showToast({title: res.msg, icon: "none", position: 'top'})
                  }