lsw hace 9 meses
padre
commit
cfbc8718f5

+ 11 - 4
admin-ui/src/views/work/pay/cash_out.vue

@@ -22,13 +22,20 @@
     <el-table :data="response.rows" border height="calc(100vh - 235px)">
       <el-table-column type="index" label="序号" align="center" width="80" />
       <el-table-column label="提现编号" align="center" prop="nums" />
-      <el-table-column label="提现方式" align="center" width="160">
+      <el-table-column label="提现方式" align="center" width="130">
         <template slot-scope="scope">
           <span class="icon" v-if="scope.row.way == 0">&#xe66b; 提现到银行卡</span>
           <span class="icon" v-else>&#xe620; 提现到微信</span>
         </template>
       </el-table-column>
-      <el-table-column label="提现金额" align="center" prop="money" width="160" />
+      <el-table-column label="提现金额" align="center" prop="money" width="130" />
+      <el-table-column label="手续费" align="center" prop="serviceMoney" width="130" />
+      <el-table-column label="提现费率(%)" align="center" prop="rate" width="130" />
+      <el-table-column label="实际到账" align="center" prop="money" width="130">
+        <template slot-scope="scope">
+          {{ (scope.row.money - scope.row.serviceMoney).toFixed(2) }}
+        </template>
+      </el-table-column>
       <el-table-column label="提现状态" align="center" width="110">
         <template slot-scope="scope">
           <el-tag type="info" v-if="scope.row.state == 0">待确认</el-tag>
@@ -104,10 +111,10 @@ export default {
     },
     op(tag, row) {
       if (tag == 'detail') {
-        this.iframe({ obj: edit, param: { id: row.id, detail: true }, title: '提现详情', width: '35%', height: '60%' });
+        this.iframe({ obj: edit, param: { id: row.id, detail: true }, title: '提现详情', width: '35%', height: '80%' });
       }
       if (tag == 'edit') {
-        this.iframe({ obj: edit, param: { id: row.id }, title: '提现确认', width: '35%', height: '60%' });
+        this.iframe({ obj: edit, param: { id: row.id }, title: '提现确认(以实际到账为准)', width: '35%', height: '80%' });
       }
     }
   }

+ 15 - 8
admin-ui/src/views/work/pay/edit.vue

@@ -21,10 +21,17 @@
         </div>
       </el-form>
       <el-form ref="form" disabled :model="form" :rules="rules" label-width="120px">
-        <el-form-item label="提现金额" prop="money">
-          <el-input type="number" v-model="form.money">
-            <template slot="append">元</template>
-          </el-input>
+        <el-form-item label="提现金额(元)" prop="money">
+          <el-input type="number" v-model="form.money" />
+        </el-form-item>
+        <el-form-item label="手续费(元)">
+          <el-input v-model="form.serviceMoney" />
+        </el-form-item>
+        <el-form-item label="提现费率(%)">
+          <el-input v-model="form.rate" />
+        </el-form-item>
+        <el-form-item label="实际到账(元)">
+          <el-input :value="(form.money - form.serviceMoney).toFixed(2)" />
         </el-form-item>
         <div class="opp" v-if="form.updateTime">
           <span>操作人:{{ form.updateBy }},</span>
@@ -36,7 +43,7 @@
     </div>
     <div class="mfooter" v-if="!param.detail">
       <el-button type="primary" @click="submitForm(1)">确认转账</el-button>
-      <el-button type="danger" @click="submitForm(2)">不通过</el-button>
+      <el-button type="danger" @click="submitForm(2)">不通过(退款)</el-button>
       <el-button @click="$layer.close(layerid)">取 消</el-button>
     </div>
   </div>
@@ -78,14 +85,14 @@ export default {
     submitForm(state) {
       this.$refs['form'].validate((valid) => {
         if (valid) {
-          this.$prompt(state == 1 ? '确认已转账到 ' + this.user.bankAccount + ' 银行账户? 该操作不可撤销!' : '确认驳回提现', {
+          this.$prompt(state == 1 ? '确认已转账到 ' + this.user.bankAccount + ' 银行账户? 该操作不可撤销!' : '确认驳回提现(退款)', {
             type: 'warning',
             showInput: state == 1 ? false : true,
             inputType: 'textarea',
-            inputPlaceholder: '充值失败',
+            inputPlaceholder: '提现不通过原因',
             inputValidator: (value) => {
               if (!value && state == 2) {
-                return '请输入充值失败原因';
+                return '请输入驳回原因';
               }
             }
           }).then(({ value }) => {

+ 1 - 1
admin-ui/src/views/work/position/index.vue

@@ -41,7 +41,7 @@
       <el-table-column label="工作类型" align="center" prop="type">
         <template slot-scope="scope">
           <el-tag type="success" v-if="scope.row.type == 0">全职</el-tag>
-          <el-tag type="warning" v-if="scope.row.type == 1">兼职</el-tag>
+          <el-tag v-if="scope.row.type == 1">兼职</el-tag>
         </template>
       </el-table-column>
       <el-table-column label="职位分类" align="center" prop="positionName" width="120" />

+ 15 - 3
app/pages/user/money/index.vue

@@ -75,7 +75,15 @@
 					</view>
 					<view class="item" v-if="item.type == 2">
 						<text class="tt">提现金额</text>
-						<text class="la">¥{{ (item.money + item.serviceMoney).toFixed(2) }}</text>
+						<text class="la">¥{{ item.money }}</text>
+					</view>
+					<view class="item" v-if="item.type == 3">
+						<text class="tt">收入金额</text>
+						<text class="la">¥{{ item.money }}</text>
+					</view>
+					<view class="item" v-if="item.type == 4">
+						<text class="tt">兼职金额</text>
+						<text class="la">¥{{ item.money }}</text>
 					</view>
 					<view class="item" v-if="item.serviceMoney">
 						<text class="tt">服务费</text>
@@ -91,7 +99,7 @@
 					</view>
 					<view class="item" v-if="item.type == 2">
 						<text class="tt">实际到账</text>
-						<text class="la">¥{{ item.money }}</text>
+						<text class="la">¥{{ (item.money - item.serviceMoney).toFixed(2) }}</text>
 					</view>
 					<view class="item">
 						<text class="tt">操作状态</text>
@@ -100,10 +108,14 @@
 						<text class="la" v-if="item.state == 1 && item.type == 1" style="color: #4caf50">支出成功</text>
 						<text class="la" v-if="item.state == 0 && item.type == 2" style="color: #f44336">提现审核中...</text>
 						<text class="la" v-if="item.state == 1 && item.type == 2" style="color: #4caf50">提现成功</text>
-						<text class="la" v-if="item.state == 1 && item.type == 3" style="color: #4caf50">兼职收入</text>
+						<text class="la" v-if="item.state == 1 && item.type == 3" style="color: #4caf50">入账成功</text>
 						<text class="la" v-if="item.state == 2 && item.type == 2" style="color: #f44336">提现失败,退回余额</text>
 						<text class="la" v-if="item.state == 1 && item.type == 4" style="color: #4caf50">退款成功</text>
 					</view>
+					<view class="item" v-if="item.msg">
+						<text class="tt">失败原因</text>
+						<text class="la" style="color: #f44336">{{ item.msg }}</text>
+					</view>
 					<view class="item">
 						<text class="tt">创建时间</text>
 						<text class="la">{{ item.createTime }}</text>

+ 1 - 1
app/pages/user/resume/application/receive/list.vue

@@ -27,7 +27,7 @@
 				<view class="f" v-if="item.state == 0">待处理</view>
 				<view class="f" v-if="item.state == 1 && item.isAccept == 0 && item.isExpire == 0">等待对方同意接单 {{ item.countdown }}</view>
 				<view class="f" v-if="item.state == 1 && item.isAccept == 0 && item.isExpire == 1">对方超时未操作(已过期)</view>
-				<view class="f br" v-if="item.state == 1 && item.isAccept == 1">对方同意接单</view>
+				<view class="f br agree" v-if="item.state == 1 && item.isAccept == 1">对方同意接单</view>
 				<view class="f danger" v-if="item.state == 1 && item.isAccept == 2">对方已拒绝</view>
 			</view>
 		</view>

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/PayServiceImpl.java

@@ -81,7 +81,7 @@ public class PayServiceImpl extends ServiceImpl<PayMapper, Pay> implements IPayS
         //保存提现记录
         Pay pay = new Pay();
         pay.setUserId(AppUtil.getUser().getId());
-        pay.setMoney(dto.getRealMoney());
+        pay.setMoney(dto.getMoney());
         pay.setState(0);
         pay.setType(2);
         pay.setServiceMoney(serviceMoney);
@@ -94,7 +94,7 @@ public class PayServiceImpl extends ServiceImpl<PayMapper, Pay> implements IPayS
             throw new ServerException("提现申请失败,请联系平台");
         }
         //更新账户余额
-        user.setMoney(user.getMoney().subtract(pay.getMoney()));
+        user.setMoney(user.getMoney().subtract(dto.getMoney()));
         if (!userService.updateById(user)) {
             throw new ServerException("更新账户余额失败,请联系平台");
         }

+ 0 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/PositionServiceImpl.java

@@ -132,8 +132,6 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
             BigDecimal serviceMoney = platform.getPartTimeService().divide(new BigDecimal("100")).multiply(salary).setScale(2, RoundingMode.HALF_UP);
             //计算总费用
             BigDecimal totalMoney = serviceMoney.add(salary).setScale(2, RoundingMode.HALF_UP);
-            System.out.println("serviceMoney:" + serviceMoney);
-            System.out.println("totalMoney:" + totalMoney);
             if (totalMoney.compareTo(user.getMoney()) > 0) {
                 return AjaxResult.error(8080, "余额不足请先充值");
             }

+ 8 - 6
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/ResumeDeliverServiceImpl.java

@@ -104,15 +104,16 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
         if (resumeDeliver == null || !resumeDeliver.getUserId().equals(AppUtil.getUser().getId())) {
             return AjaxResult.error("面试不存在或非法操作");
         }
-        resumeDeliver.setIsAccept(dto.getIsAccept());
         //兼职接单成功,把兼职设置成进行中...
-        if (dto.getIsAccept() == 1 && resumeDeliver.getType() == 1) {
+        if (resumeDeliver.getType() == 1 && resumeDeliver.getIsAccept() == 0 && dto.getIsAccept() == 1) {
+            System.out.println("zzzzz");
             String key = CacheConstants.APP_DELIVER + resumeDeliver.getId() + "-" + AppUtil.getUser().getId();
-   /*         if (redisCache.getCacheObject(key) == null) {
+            if (redisCache.getCacheObject(key) == null) {
                 resumeDeliver.setIsExpire(1);
                 updateById(resumeDeliver);
                 return AjaxResult.error("抱歉你的兼职邀请已经超时无效了");
-            }*/
+            }
+            redisCache.deleteObject(key);
             Position position = new Position();
             position.setId(resumeDeliver.getPositionId());
             position.setComplete(1);
@@ -120,6 +121,7 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
                 throw new ServiceException("更新兼职信息失败");
             }
         }
+        resumeDeliver.setIsAccept(dto.getIsAccept());
         if (!updateById(resumeDeliver)) {
             throw new ServiceException("接受或拒绝面试邀请失败");
         }
@@ -159,7 +161,7 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
         if (resumeDeliver == null || !resumeDeliver.getEnterpriseId().equals(AppUtil.getUser().getId()) || resumeDeliver.getType() == 0) {
             return AjaxResult.error("简历不存在或非法操作");
         }
-        if(resumeDeliver.getIsExpire()==1){
+        if (resumeDeliver.getIsExpire() == 1) {
             return AjaxResult.error("对方超时未操作(已过期)");
         }
         List<ResumeDeliver> list = selectList(new ResumeDeliver().setPositionId(resumeDeliver.getPositionId()).setState(1).setIsExpire(0));
@@ -182,7 +184,7 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
         }
         //用户的接单信息缓存起来60分钟,超时无效。
         String key = CacheConstants.APP_DELIVER + resumeDeliver.getId() + "-" + resumeDeliver.getUserId();
-        redisCache.setCacheObject(key, resumeDeliver, 1, TimeUnit.MINUTES);
+        redisCache.setCacheObject(key, resumeDeliver, 60, TimeUnit.MINUTES);
         sendMessage(resumeDeliver);
         return AjaxResult.success();
     }