Commit c2628601 by wangzhihui

积分接口对接

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