Commit c7b1671e by cwq0219

订单管理

1 parent 809e196c
......@@ -77,4 +77,28 @@ const examineDetailApi = params => {
})
}
export default { getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, addDeliveryApi, examineDetailApi }
\ No newline at end of file
// 退款审核 - 提交
const examineAllowApi = params => {
params.method = `${defaultPath}orderRefund.allow`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 确认收货
const confirmReceiptGoodsApi = params => {
params.method = `${defaultPath}order.refund.confirmReceiptGoods`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, addDeliveryApi, examineDetailApi, examineAllowApi, confirmReceiptGoodsApi }
\ No newline at end of file
......@@ -78,7 +78,7 @@ html {
.marketing .wechat-container {
width: 375px;
margin-right: 45px;
margin-left: 32px;
background: #ffffff;
position: relative;
}
......
......@@ -2,12 +2,6 @@
<template>
<div class="home-set marketing p-t-20">
<div class="container edit-container flex">
<div class="wechat-container">
<div class="wechat-box">
<img class="w-100-per" src="./images/home-set-head.png" />
<img class="w-100-per" src="./images/home-set-footer.png" />
</div>
</div>
<div class="home-set-form flex-grow">
<div v-for="(item, index) in externalFormList" :key="index">
<p class="edit-sub-title">{{ item.title }}</p>
......@@ -67,6 +61,12 @@
</glsx-combi-form>
</div>
</div>
<div class="wechat-container">
<div class="wechat-box">
<img class="w-100-per" src="./images/home-set-head.png" />
<img class="w-100-per" src="./images/home-set-footer.png" />
</div>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" @click="handleConfirm">确定</el-button>
......
......@@ -43,7 +43,7 @@
<el-button type="text" @click="handleDetail(scope.scope)">查看订单</el-button>
<el-button v-if="scope.scope.deliveryType == 1 && scope.scope.orderStatus == 14" type="text" @click="handleWriteOff(scope.scope)">订单核销</el-button>
<el-button v-if="scope.scope.deliveryType == 2 && scope.scope.orderStatus == 13" type="text" @click="handleExpressInfo(scope.scope)">输入快递信息</el-button>
<!-- <el-button v-if="scope.scope.orderStatus == 6" type="text" @click="handleExamine(scope.scope)">退款审核</el-button> -->
<el-button v-if="scope.scope.orderStatus == 6" type="text" @click="handleExamine(scope.scope)">退款审核</el-button>
<el-button v-if="scope.scope.orderStatus == 9" type="text" @click="handleReceiving(scope.scope)">确认收货</el-button>
</div>
</GLTable>
......@@ -60,15 +60,58 @@
</glsx-combi-form>
</glsx-dialog>
<!-- 退款审核 -->
<!-- <glsx-dialog v-if="isExamineVisible" title="退款审核" :isVisible.sync="isExamineVisible" @confirmDialog="handleExamineConfirm" @closeDialog="handleExamineClose">
<glsx-combi-form ref="examineRef" labelWidth="140px" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="examineForm" :formData="examineFormData" :formRules="examineRules">
</glsx-combi-form>
</glsx-dialog> -->
<!-- 确认收获 -->
<!-- <glsx-dialog v-if="isReceivingVisible" title="确认收货" :isVisible.sync="isReceivingVisible" @confirmDialog="handleReceivingConfirm" @closeDialog="handleReceivingClose">
<glsx-combi-form ref="receivingRef" labelWidth="140px" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="receivingForm" :formData="receivingFormData" :formRules="receivingRules">
</glsx-combi-form>
</glsx-dialog> -->
<glsx-dialog v-if="isExamineVisible" title="退款审核" width="50%" :isVisible.sync="isExamineVisible" @confirmDialog="handleExamineConfirm" @closeDialog="handleExamineClose">
<el-form label-width="140px">
<el-form-item label="售后类型">
<span>{{orderInfo.refundTypeName}}</span>
</el-form-item>
<el-form-item label="申请金额">
<span>{{orderInfo.refundPrice}}</span>
</el-form-item>
<el-form-item label="申请时间">
<span>{{orderInfo.createdDateStr}}</span>
</el-form-item>
<el-form-item label="申请描述">
<span>{{orderInfo.remark || '-'}}</span>
</el-form-item>
<el-form-item v-if="orderInfo.imgUrls">
<img class="img-60" v-for="(item, index) in orderInfo.imgUrls" :key="index" :src="item"/>
</el-form-item>
<el-form-item label="审核是否通过">
<el-radio-group v-model="examineForm.isAllowed">
<el-radio label="1">审核通过</el-radio>
<el-radio label="2">审核不通过</el-radio>
</el-radio-group>
</el-form-item>
<template v-if="orderInfo.refundType == 1 && examineForm.isAllowed == '1'">
<glsx-combi-form ref="examineRef" labelWidth="140px" defaultWidth="320px" :isBlock="true" :formRef="editChildRef" :formObj="examineForm" :formData="examineFormData" :formRules="examineRules">
</glsx-combi-form>
</template>
</el-form>
</glsx-dialog>
<!-- 确认收货 -->
<glsx-dialog v-if="isReceivingVisible" title="确认收货" width="50%" :isVisible.sync="isReceivingVisible" @confirmDialog="handleReceivingConfirm" @closeDialog="handleReceivingClose">
<el-form label-width="140px">
<el-form-item label="售后类型">
<span>{{orderInfo.refundTypeName}}</span>
</el-form-item>
<el-form-item label="申请金额">
<span>{{orderInfo.refundPrice}}</span>
</el-form-item>
<el-form-item label="申请时间">
<span>{{orderInfo.createdDateStr}}</span>
</el-form-item>
<el-form-item label="申请描述">
<span>{{orderInfo.remark || '-'}}</span>
</el-form-item>
<el-form-item label="快递公司">
<span>{{orderInfo.deliveryCompany}}</span>
</el-form-item>
<el-form-item label="快递单号">
<span>{{orderInfo.deliveryNumber}}</span>
</el-form-item>
</el-form>
</glsx-dialog>
</div>
</template>
......@@ -217,36 +260,47 @@ export default {
],
// 退款审核
isExamineVisible: false,
orderInfo: {},
examineForm: {
examineCode: ''
isAllowed: '1',
contactAddress: '',
contactName: '',
contactPhone: ''
},
examineRules: {
examineCode: [{ required: true, message: '核销码是必填项', trigger: 'change' }]
contactAddress: [{ required: true, message: '退货地址是必填项', trigger: 'change' }],
contactName: [{ required: true, message: '联系人是必填项', trigger: 'change' }],
contactPhone: [{ required: true, message: '手机号是必填项', trigger: 'change' },
{
validator: (rule, value, callback) => {
let phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/;
return phoneReg.test(value) ? callback() : callback(new Error('请输入正确的联系号码'))
},
trigger: 'blur'
}]
},
examineFormData: [
{
label: '核销码',
name: 'examineCode',
label: '退货地址',
name: 'contactAddress',
type: 'input',
maxlength: 32
}
],
// 确认收获
isReceivingVisible: false,
receivingForm: {
receivingCode: ''
},
receivingRules: {
receivingCode: [{ required: true, message: '核销码是必填项', trigger: 'change' }]
},
receivingFormData: [
maxlength: 50
},
{
label: '核销码',
name: 'receivingCode',
label: '联系人',
name: 'contactName',
type: 'input',
maxlength: 32
maxlength: 10
},
{
label: '手机号',
name: 'contactPhone',
type: 'input',
maxlength: 11
}
],
// 确认收获
isReceivingVisible: false,
// 表格
getListApi: this.$apis.orderManage.getListApi,
tableParams: {
......@@ -282,7 +336,7 @@ export default {
label: '支付总价',
prop: 'payPrice',
formatter: cellValue => {
return '¥' + cellValue.payPrice
return cellValue.payPrice || '-'
}
},
{
......@@ -313,7 +367,11 @@ export default {
baseData: {
orderStatusList: orderManageStatusList,
orderSourceList: orderSourceList,
deliveryTypeList: deliveryTypeList
deliveryTypeList: deliveryTypeList,
refundTypeList: [
{ confId: '1', confName: '退款退货' },
{ confId: '2', confName: '我要退款(无需退货)' }
]
}
}
},
......@@ -437,7 +495,7 @@ export default {
},
handleExpressInfo(row) {
this.handleExpressClose()
this.isExpressVisible = !this.isExpressVisible
this.orderCode = row.orderCode
},
// 输入快递信息 - end
......@@ -472,7 +530,7 @@ export default {
},
handleWriteOff(row) {
this.handleWriteOffClose()
this.isWriteOffVisible = !this.isWriteOffVisible
this.orderCode = row.orderCode
},
// 订单核销 - end
......@@ -481,36 +539,55 @@ export default {
handleExamineClose() {
this.isExamineVisible = !this.isExamineVisible
this.orderCode = ''
this.orderInfo = {}
this.examineForm = {
examineCode: ''
isAllowed: '1',
contactAddress: '',
contactName: '',
contactPhone: ''
}
},
handleExamineConfirm() {
this.$refs.examineRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.examineForm)
params.orderCode = this.orderCode
this.$apis.orderManage.examineApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error',
customClass: 'message-Z-zinde'
})
if (res.code == '0') {
this.handleExamineClose()
this.handleSearch()
}
})
submitExamine(params) {
this.$apis.orderManage.examineAllowApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error',
customClass: 'message-Z-zinde'
})
if (res.code == '0') {
this.handleExamineClose()
this.handleSearch()
}
})
},
handleExamineConfirm() {
var params = {
id: this.orderInfo.id
}
if(this.orderInfo.refundType == 1 && this.examineForm.isAllowed == '1') {
this.$refs.examineRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
params = this.$common.utils.deepClone(this.examineForm)
params.id = this.orderInfo.id
params.isAllowed = true
this.submitExamine(params)
}
})
} else {
params.isAllowed = this.examineForm.isAllowed == '1'
this.submitExamine(params)
}
},
handleExamine(row) {
// this.handleExamineClose()
this.orderCode = row.orderCode
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode, id: row.id }).then(res => {
this.examineForm = res || {}
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => {
this.orderInfo = res || {}
this.orderInfo.refundTypeName = [1,2].includes(this.orderInfo.refundType) ? this.baseData.refundTypeList.find(item => item.confId == (this.orderInfo.refundType + '')).confName : '-'
this.orderInfo.createdDateStr = this.orderInfo.createdDate ? dayjs(this.orderInfo.createdDate).format('YYYY-MM-DD HH:mm:ss') : '-'
this.isExamineVisible = !this.isExamineVisible
})
},
// 退款审核 - end
......@@ -519,34 +596,33 @@ export default {
handleReceivingClose() {
this.isReceivingVisible = !this.isReceivingVisible
this.orderCode = ''
this.receivingForm = {
receivingCode: ''
}
this.orderInfo = {}
},
handleReceivingConfirm() {
this.$refs.receivingRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.receivingForm)
params.orderCode = this.orderCode
this.$apis.orderManage.receivingApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error',
customClass: 'message-Z-zinde'
})
if (res.code == '0') {
this.handleReceivingClose()
this.handleSearch()
}
})
var params = {
id: this.orderInfo.id
}
this.$apis.orderManage.confirmReceiptGoodsApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error',
customClass: 'message-Z-zinde'
})
if (res.code == '0') {
this.handleReceivingClose()
this.handleSearch()
}
})
},
handleReceiving(row) {
this.handleReceivingClose()
this.orderCode = row.orderCode
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => {
this.orderInfo = res || {}
this.orderInfo.refundTypeName = [1,2].includes(this.orderInfo.refundType) ? this.baseData.refundTypeList.find(item => item.confId == (this.orderInfo.refundType + '')).confName : '-'
this.orderInfo.createdDateStr = this.orderInfo.createdDate ? dayjs(this.orderInfo.createdDate).format('YYYY-MM-DD HH:mm:ss') : '-'
this.isReceivingVisible = !this.isReceivingVisible
})
},
// 确认收货 - end
......
......@@ -36,7 +36,7 @@
<el-form label-width="100px" :inline="true">
<el-row v-for="(item, index) in afterInfoDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label">
<span class="detail-txt ellipsis-1" :title="orderRefund[subItem.name]">{{orderRefund[subItem.name]}}</span>
<span class="detail-txt ellipsis-1" :title="orderRefund[subItem.name]">{{orderRefund[subItem.name] || '-'}}</span>
</el-form-item>
</el-row>
</el-form>
......@@ -178,7 +178,7 @@ export default {
this.detailForm = res
this.orderRefund = res.orderRefund || null
if(this.orderRefund) {
this.orderRefund.refundTypeName = this.baseData.refundTypeList.map(item => item.confId).includes(res.refundType + '') ? this.baseData.refundTypeList.find(item => item.confId == res.refundType).confName : '-'
this.orderRefund.refundTypeName = this.baseData.refundTypeList.map(item => item.confId).includes(res.orderRefund.refundType + '') ? this.baseData.refundTypeList.find(item => item.confId == res.orderRefund.refundType).confName : '-'
this.orderRefund.createdDateStr = dayjs(this.orderRefund.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
this.orderGoods = res.orderGoods || []
......@@ -202,6 +202,9 @@ export default {
.marketing.order-detail .el-form--inline .el-form-item__content {
height: 30px;
}
.marketing.order-detail .flex {
justify-content: flex-start;
}
.detail-txt {
display: inline-block;
width: 220px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!