#
whycq
2023-11-22 3913b3c5c8cde03f8c92d1c738d28c4a9bae7e55
pages/business/goBusiness/reimburseOnlineDetl.vue
@@ -16,113 +16,119 @@
         </view>
      </view>
      
      <view class="main-box">
         <view class="box" v-for="item in list">
            <view class="box-title">报销明细</view>
            <scroll-view class="box-scroll" scroll-x="true" >
               <view class="scroll-head">
                  <view class="scroll-item scroll-head">
                     <view class="item-content">事由</view>
                  </view>
                  <view class="scroll-item scroll-head">
                     <view class="item-content">费用类型</view>
                  </view>
                  <view class="scroll-item scroll-head">
                     <view class="item-content">税率</view>
                  </view>
                  <view class="scroll-item scroll-head">
                     <view class="item-content">未税本币金额</view>
                  </view>
                  <view class="scroll-item scroll-head">
                     <view class="item-content">未税金额</view>
                  </view>
                  <view class="scroll-item scroll-head">
                     <view class="item-content">税额</view>
                  </view>
                  <view class="scroll-item scroll-head">
                     <view class="item-content">发票金额</view>
                  </view>
                  <view class="scroll-item scroll-head">
                     <view class="item-content">发票本币金额</view>
                  </view>
                  <view class="scroll-item scroll-head">
                     <view class="item-content">报销比例</view>
                  </view>
                  <view class="scroll-item scroll-head">
                     <view class="item-content">报销金额</view>
                  </view>
                  <view class="scroll-item scroll-head">
                     <view class="item-content">报销本币金额</view>
                  </view>
                  <view class="scroll-item scroll-head">
                     <view class="item-content">出纳确认金额</view>
                  </view>
                  <view class="scroll-item scroll-head">
                     <view class="item-content">列支人员</view>
                  </view>
                  <view class="scroll-item scroll-head">
                     <view class="item-content">列支部门</view>
                  </view>
                  <view class="scroll-item scroll-head">
                     <view class="item-content">更新日期</view>
                  </view>
                  <view class="scroll-item scroll-head">
                     <view class="item-content-last">更新人员名字</view>
                  </view>
               </view>
               <view style="border-top: 1px solid #e7e7e7;" v-for="(item, index) in onlineDetl" :key="index">
                  <view class="scroll-item">
                     <view class="item-content">{{item.occupation}}</view>
                  </view>
                  <view class="scroll-item">
                     <view class="item-content">{{item.expenseType$}}</view>
                  </view>
                  <view class="scroll-item">
                     <view class="item-content">{{item.taxRate}}</view>
                  </view>
                  <view class="scroll-item">
                     <view class="item-content">{{item.untaxedAmountInLocalCurrency}}</view>
                  </view>
                  <view class="scroll-item">
                     <view class="item-content">{{item.untaxedAmount}}</view>
                  </view>
                  <view class="scroll-item">
                     <view class="item-content">{{item.taxAmount}}</view>
                  </view>
                  <view class="scroll-item">
                     <view class="item-content">{{item.invoiceValue}}</view>
                  </view>
                  <view class="scroll-item">
                     <view class="item-content">{{item.invoiceAmountInLocalCurrency}}</view>
                  </view>
                  <view class="scroll-item">
                     <view class="item-content">{{item.reimbursementRatio}}</view>
                  </view>
                  <view class="scroll-item">
                     <view class="item-content">{{item.reimbursementAmount}}</view>
                  </view>
                  <view class="scroll-item">
                     <view class="item-content">{{item.reimbursementAmountInLocalCurrency}}</view>
                  </view>
                  <view class="scroll-item">
                     <view class="item-content">{{item.cashierConfirmationAmount}}</view>
                  </view>
                  <view class="scroll-item">
                     <view class="item-content">{{item.userId$}}</view>
                  </view>
                  <view class="scroll-item">
                     <view class="item-content">{{item.deptId$}}</view>
                  </view>
                  <view class="scroll-item">
                     <view class="item-content">{{item.updateTime}}</view>
                  </view>
                  <view class="scroll-item">
                     <view class="item-content-last">{{item.updateUserName}}</view>
                  </view>
               </view>
               <view style="height: 10rpx;"></view>
            </scroll-view>
            <view style="width: 100%; overflow-x: scroll;border: 1px solid #bebebe;">
               <table cellpadding="0" cellspacing="0">
                  <thead>
                     <tr style="background-color: #949494;color: #FFF;">
                        <td class="scroll-item">
                           <view class="item-content">事由</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">费用类型</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">税率</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">未税本币金额</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">未税金额</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">税额</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">发票金额</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">发票本币金额</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">报销比例</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">报销金额</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">报销本币金额</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">出纳确认金额</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">列支人员</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">列支部门</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">更新日期</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content-last">更新人员名字</view>
                        </td>
                     </tr>
                  </thead>
                  <tbody>
                     <tr v-for="(item,index) in onlineDetl">
                        <td class="scroll-item">
                           <view class="item-content">{{item.occupation}}</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">{{item.expenseType$}}</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">{{item.taxRate}}</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">{{item.untaxedAmountInLocalCurrency}}</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">{{item.untaxedAmount}}</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">{{item.taxAmount}}</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">{{item.invoiceValue}}</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">{{item.invoiceAmountInLocalCurrency}}</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">{{item.reimbursementRatio}}</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">{{item.reimbursementAmount}}</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">{{item.reimbursementAmountInLocalCurrency}}</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">{{item.cashierConfirmationAmount}}</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">{{item.userId$}}</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">{{item.deptId$}}</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content">{{item.updateTime}}</view>
                        </td>
                        <td class="scroll-item">
                           <view class="item-content-last">{{item.updateUserName}}</view>
                        </td>
                     </tr>
                  </tbody>
               </table>
            </view>
         </view>
      </view>
@@ -130,25 +136,18 @@
         <view class="box">
            <view class="box-title">流程动态</view>
            <u-steps :current="1" direction="column">
               <u-steps-item title="开始 2023-11-09 13:30:54" desc="张芬创建了审批">
               </u-steps-item>
               <u-steps-item title="部门经理审核 2023-11-09 13:31:42" desc="部门经理张芬审批通过">
               </u-steps-item>
               <u-steps-item title="俞晓审核" desc="">
               </u-steps-item>
               <u-steps-item title="周春松审核" desc="">
               </u-steps-item>
               <u-steps-item title="罗萍审核" desc="">
               </u-steps-item>
               <u-steps-item title="俞晓审核" desc="">
               </u-steps-item>
               <u-steps-item :title="`${item.title} ${item.time ? item.time : ''}`" :desc="item.msg" v-for="item in steps" />
            </u-steps>
         </view>
      </view>
      <view style="height: 100rpx;">
      </view>
      <view class="floor">
         <view class="wran">删除</view>
         <view class="default">编辑</view>
         <view class="default" @click="modiReimburse()">编辑</view>
         <view class="primary" @click="submit()">审批</view>
      </view>
   </view>
@@ -158,6 +157,7 @@
   export default {
      data() {
         return {
            steps: [],
            list: [{
               templateName: '项目未完成',
               checkData: '否',
@@ -166,7 +166,7 @@
               name$: '浙江天成自控股份有限公司',
               status$: '未完成',
               settle$: '等待节点3审核',
               detl: '报销明细',
               // detl: '报销明细',
               updateUserId$: '张芬',
               updateTime$: '2023-11-09 13:31:42'
            }, ],
@@ -199,10 +199,10 @@
                  label: "进度",
                  attribute: "settle$",
               },
               {
                  label: "报销明细",
                  attribute: "detl",
               },
               // {
               //    label: "报销明细",
               //    attribute: "detl",
               // },
               {
                  label: "更新人员",
                  attribute: "updateUserId$",
@@ -214,7 +214,7 @@
            ],
            onlineDetl: [
               {
                  occupation: '123',
                  occupation: 'CRMREIMBURSE1699507854268',
                  expenseType$: '1',
                  taxRate: '0.0',
                  untaxedAmountInLocalCurrency: '1.1',
@@ -234,7 +234,81 @@
            ]
         }
      },
      onLoad(option) {
         let _this = this
         _this.list = []
         const eventChannel = this.getOpenerEventChannel();
         eventChannel.on('busunessDetl', function(data) {
            _this.list.push(data.data)
            _this.getTableData(data.data.id)
            _this.getSetps(data.data.id)
         })
      },
      methods: {
         // 审批
         submit() {
            let _this = this,param = {planld: 13}
            uni.request({
               url: `${_this.baseUrl}/reimburseOnline/approval2/auth`,
               header: {
                  'token': uni.getStorageSync('token'),
                  'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'
               },
               method: 'POST',
               sslVerify: false,
               data: { planId: 13 },
               success(res) {
                  res = res.data
                  if (res.code === 200) {
                  } else if (res.code === 500) {
                     uni.showToast({title: res.msg, icon: "none", position: 'top'})
                  }
               }
            })
         },
         getSetps(id) {
            let _this = this
            uni.request({
               url: `${_this.baseUrl}/reimburseOnline/${id}/auth`,
               header: { 'token': uni.getStorageSync('token') },
               success(res) {
                  res = res.data
                  _this.steps = JSON.parse(res.data.settleMsg)
               }
            })
         },
         getTableData(id) {
            let _this = this
            uni.request({
               url: `${_this.baseUrl}/reimburseOnlineDetl/list/auth`,
               header: { 'token': uni.getStorageSync('token') },
               data: {order_id: id},
               success(res) {
                  res = res.data
                  if (res.code === 200) {
                     _this.onlineDetl = res.data.records
                  }
               }
            })
         },
         modiReimburse() {
            let _this = this
            _this.list[0]['detl'] = _this.onlineDetl
            uni.navigateTo({
               url: '/pages/business/goBusiness/modiReimburseOnlineDetl',
               success: function(res) {
                  res.eventChannel.emit('reimburseOnlineDetl', {
                     data: 'modi',
                     detl: {list: _this.list[0]}
                  })
               }
            })
         },
         back() {
            uni.navigateBack({})
         },
@@ -320,28 +394,26 @@
      margin-bottom: 10rpx;
   }
   .scroll-head {
      /* height: 50rpx; */
      /* line-height: 50rpx; */
      /* padding: rpx; */
      background-color: #949494;
      color: #fff;
      width: auto;
   }
   .scroll-item {
      display: inline-block;
      width: 150rpx;
      padding: 10rpx;
      text-align: center;
      /* border-right: 1px solid #007dea; */
   }
   
   .item-content {
      min-width: 150rpx;
      height: 30rpx;
      line-height: 30rpx;
      padding-right: 10rpx;
      border-right: 1px solid #d3d3d3;
   }
   .item-content-last {
      height: 30rpx;
      min-width: 150rpx;
      line-height: 30rpx;
   }