|
|
@@ -306,6 +306,13 @@ export default {
|
|
|
* 点击保存或支付
|
|
|
*/
|
|
|
async jobPeriodSettle(action) {
|
|
|
+ if (this.returnMoney < 0 || this.detail.work_hour.work_rate > 100) {
|
|
|
+ this.$message({
|
|
|
+ message: '退还金额不能小于0 且 结算比例不能大于100',
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
let res = await this.$post('/api/admin/job/job_period_settle', {
|
|
|
// 云端工作周期id(int)
|
|
|
period_id: this.period_id,
|
|
|
@@ -327,15 +334,24 @@ export default {
|
|
|
is_use_deposit: this.is_use_deposit ? 1 : 0,
|
|
|
person_service_fee_rate: this.detail.rate.origin_person_service_fee_rate,
|
|
|
})
|
|
|
- // console.log(res)
|
|
|
if(!res) return
|
|
|
- this.$message({
|
|
|
- message: '成功',
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- setTimeout(() => {
|
|
|
- location.reload()
|
|
|
- }, 1000)
|
|
|
+ if (res.status > 0) {
|
|
|
+ this.$message({
|
|
|
+ message: res.info,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ setTimeout(() => {
|
|
|
+ location.reload()
|
|
|
+ }, 1000)
|
|
|
+ } else {
|
|
|
+ if (!res.info) {
|
|
|
+ console.log(res)
|
|
|
+ }
|
|
|
+ this.$message({
|
|
|
+ message: res.info ? res.info : '接口返回数据异常',
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* 获取数据
|