Commit c7b1671e by cwq0219

订单管理

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