Commit c2628601 by wangzhihui

积分接口对接

1 parent fe721437
......@@ -78,4 +78,25 @@ export function deductOrderPage(data) {
export function cancelDeduct(data) {
data.method = `dj.api.smartcarlife.staff.score.cancel.deduct`
return request(data)
}
// 积分审批列表同步
export function refreshData(data) {
data.method = `dj.api.smartcarlife.staff.motivation.page.sync`
return request(data)
}
//查询指定订单的操作记录
export function getOperationRecord(data) {
data.method = `dj.api.smartcarlife.staff.motivation.order.operation`
return request(data)
}
//根据订单号查询剩余积分
// export function getScoreByscore(data) {
// data.method = `dj.api.smartcarlife.staff.motivation.order.score`
// return request(data)
// }
//获取到总积分
export function getOrderByScore(data) {
data.method = `dj.api.smartcarlife.staff.motivation.order.score`
return request(data)
}
\ No newline at end of file
......@@ -148,7 +148,6 @@ export default {
this.financialObj.goodsTypeGroupRules[this.editableTabsValue]
.expenseCategoryRules
)
console.log(filterObj)
const obj = {
trafficSide: filterObj
}
......@@ -315,9 +314,8 @@ export default {
item.expenseCategoryTypeRules
)
})
this.financialObj = data
this.initSettleTimeObj()
console.log(this.financialObj, 76666)
console.log(this.financialObj, 555555555)
},
initSettleTimeObj() {
const { settleTimeType, settleTime } = this.financialObj
......
......@@ -127,16 +127,17 @@
>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-col :span="8" v-if="detailInfo.status == '已审核'">
<el-form-item label="退款类型:" class="halfItem">
{{ detailInfo.status }}
{{ detailInfo.refundType?detailInfo.refundType==1?'全部退款':'部分退款':'-' }}
</el-form-item></el-col
>
<el-col :span="8">
<el-col :span="8" v-if="detailInfo.status == '已审核'">
<el-form-item label="订单总积分:" class="halfItem">
{{ detailInfo.status }}
</el-form-item></el-col
{{ detailInfo.addScore? detailInfo.addScore:'-' }}
</el-form-item>
</el-col
>
</el-row>
</el-form>
......@@ -165,15 +166,15 @@
</div>
<div v-else class="empty">暂无记录</div>
</div>
<div class="examine-record">
<div class="examine-record" v-if="detailInfo.status == '已审核'">
<div class="title">操作记录</div>
<div
class="record-div"
v-if="detailInfo.operationList && detailInfo.operationList.length > 0"
v-if="operationList && operationList.length > 0"
>
<div
class="record-div-d"
v-for="(item, index) in detailInfo.operationList"
v-for="(item, index) in operationList"
:key="index"
>
<div class="div-operator">操作人:{{ item.operator }}</div>
......@@ -209,7 +210,7 @@
<script>
import { Util, deepClone } from "@/common/util"
import { getPointDetail } from "@api/point"
import { getPointDetail ,getOperationRecord,getOrderByScore} from "@api/point"
export default {
name: "DetailDialog",
props: {
......@@ -255,6 +256,7 @@ export default {
},
detailInfo: {},
operationList:[],
loading: false,
imgVisible: false,
photoList: [],
......@@ -284,11 +286,32 @@ export default {
: "错单"
: "--"
this.detailInfo = res
this.getScore()
this.getOrderOperateData()
this.photoList = res.attachments ? res.attachments.split(",") : []
}
})
},
getScore() {
getOrderByScore({
orderCode: this.detailInfo.orderCode
}).then((res) => {
console.log(res)
this.detailInfo.addScore = res.addScore
this.$set(this.detailInfo,'addScore',res.addScore)
console.log(this.detailInfo)
})
},
getOrderOperateData(){
let params={
orderCode:this.detailInfo.orderCode,
operationType:1
}
getOperationRecord(params).then(res=>{
console.log(res)
this.operationList=res
})
},
handleEnlargeImg(url) {
this.imgVisible = !this.imgVisible
this.imgList = url
......
......@@ -27,9 +27,6 @@
>
</el-tab-pane>
</el-tabs>
<!-- <el-button type="primary" size="mini" @click="handleExport">
导出
</el-button> -->
<div>
<span style="margin-right: 10px"
><auth-button category="Button" :show-btn-ids="['9140105']"
......@@ -67,11 +64,14 @@
:show-btn-ids="['9140101']"
v-if="scope.scope.status == 0 && scope.scope.supervisorAudit == 1"
/>
<!-- v-if="
<auth-button
v-if="
scope.scope.status == 1 &&
scope.scope.pointsRefundAvailable == 'Y'
" -->
<auth-button :data="scope.scope" :show-btn-ids="['9140104']" />
"
:data="scope.scope"
:show-btn-ids="['9140104']"
/>
</span>
</div>
</d2-table>
......@@ -116,7 +116,10 @@ import {
getShopMerchantList,
pointCheck,
exportFile,
markAsRefunded
markAsRefunded,
refreshData,
getOrderByScore,
getOperationRecord
} from "@api/point"
export default {
name: "PointList",
......@@ -140,7 +143,7 @@ export default {
}
return {
show: true,
handleFormRef: 'handleFormRef',
handleFormRef: "handleFormRef",
refundVisible: false,
activeName: "4",
tabPaneList: [
......@@ -162,7 +165,7 @@ export default {
},
{
label: "未兑换",
name: "3"
name: "-1"
}
],
statusEnum: {
......@@ -610,16 +613,32 @@ export default {
//标记退款
handleRefund(data) {
this.refundVisible = true
this.refundForm.id = data.id
this.refundForm.orderCode = data.orderCode
this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退),
this.refundForm.refundPoints = 10000
this.refundForm.maXPoints =10000
if(data.operator==true){
//对应订单若操作过一次部分退款,则后续进来后只能选择“部分退款”,全部退款默认置灰不可选
this.refundFormData[0].optionList[0].isDisabled=true
}
this.updateDisable()
this.refundForm.integralIncome = data.integralIncome //当前积分能抵扣的最大值
this.getScore()
//
// this.refundForm.refundPoints = 10000
//
// if(data.operator==true){
// //对应订单若操作过一次部分退款,则后续进来后只能选择“部分退款”,全部退款默认置灰不可选
// this.refundFormData[0].optionList[0].isDisabled=true
// }
// this.updateDisable()
},
getScore() {
getOrderByScore({
orderCode: this.refundForm.orderCode
}).then((res) => {
this.refundForm.refundPoints = res.addScore //最大积分
this.refundForm.maXPoints = res.addScore //最大积分
if (this.refundForm.refundPoints == this.refundForm.integralIncome) {
this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退),
} else {
this.refundForm.refundType = 2
this.refundFormData[0].optionList[0].isDisabled = true
}
this.updateDisable()
})
},
updateDisable() {
let disabled = this.refundForm.refundType == 2 ? false : true
......@@ -637,8 +656,8 @@ export default {
if (valid) {
markAsRefunded({
orderCode: this.refundForm.orderCode,
refundType:this.refundForm.refundType,
refundPoints:this.refundForm.refundPoints
refundType: this.refundForm.refundType,
refundPoints: this.refundForm.refundPoints
}).then((res) => {
if (res) {
this.$message.success("退款成功!")
......@@ -652,21 +671,23 @@ export default {
},
//刷新
handleRefresh() {
let params = {
...this.searchFormSearch,
...this.$refs.pointTable.page
}
this.$confirm("确定需要刷新并同步订单信息", "", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
callback: (action) => {
// if (action == "confirm") {
// markAsRefunded({
// orderCode: data.orderCode
// }).then((res) => {
// if (res) {
// this.$message.success("订单信息已同步完成!")
// this.handleSearch()
// }
// })
// }
if (action == "confirm") {
refreshData(params).then((res) => {
if (res) {
this.$message.success("订单信息已同步完成!")
this.handleSearch()
}
})
}
}
})
},
......
......@@ -50,8 +50,9 @@ export default {
staffName: "",
staffPhone: "",
merchantId: "",
withdrawalTime:[],
rewardTime:[]
rewardTime:[],
reviewTime:[],
successTime:[]
},
searchFormSearch:{
......@@ -95,14 +96,14 @@ export default {
// },
{
label: "积分付款时间",
name: "rewardTime",
name: "reviewTime",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
},
{
label: "积分到账时间",
name: "withdrawalTime",
name: "successTime",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
......@@ -212,20 +213,33 @@ export default {
"YYYY-MM-DD"
) + " 23:59:59"
}
if (this.searchFormSearch.withdrawalTime&&this.searchFormSearch.withdrawalTime.length) {
if (this.searchFormSearch.reviewTime&&this.searchFormSearch.reviewTime.length) {
this.searchFormSearch.reviewBeginTime =
Util.dateFormate(
this.searchFormSearch.reviewTime[0],
"YYYY-MM-DD"
) + " 00:00:00"
this.searchFormSearch.reviewEndTime =
Util.dateFormate(
this.searchFormSearch.reviewTime[1],
"YYYY-MM-DD"
) + " 23:59:59"
}
if (this.searchFormSearch.successTime&&this.searchFormSearch.successTime.length) {
this.searchFormSearch.withdrawalBeginTime =
Util.dateFormate(
this.searchFormSearch.withdrawalTime[0],
this.searchFormSearch.successBeginTime[0],
"YYYY-MM-DD"
) + " 00:00:00"
this.searchFormSearch.withdrawalEndTime =
Util.dateFormate(
this.searchFormSearch.withdrawalTime[1],
this.searchFormSearch.successEndTime[1],
"YYYY-MM-DD"
) + " 23:59:59"
}
delete this.searchFormSearch.rewardTime
delete this.searchFormSearch.withdrawalTime
delete this.searchFormSearch.successTime
delete this.searchFormSearch.reviewTime
resolve()
})
},
......@@ -237,8 +251,9 @@ export default {
staffName: "",
staffPhone: "",
merchantId: "",
withdrawalTime:[],
rewardTime:[]
rewardTime:[],
reviewTime:[],
successTime:[]
}
this.searchFormSearch={}
this.$refs.pointTable.refreshTable(true, true)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!