|
|
|
@ -0,0 +1,133 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="list-container">
|
|
|
|
|
<el-form ref="refsForm" v-loading="state.loading" label-width="150px" :model="state.form" :rules="state.rules">
|
|
|
|
|
<el-form-item label="订单创建超过" prop="orderPayExpire">
|
|
|
|
|
<el-input-number v-model="state.form.orderPayExpire" :clearable="false" :controls="false" :min="1" />
|
|
|
|
|
<div class="unit">分</div>
|
|
|
|
|
<p>未付款,订单自动关闭</p>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="订单发货超过" prop="automaticReceipt">
|
|
|
|
|
<el-input-number v-model="state.form.automaticReceipt" :clearable="false" :controls="false" :min="1" />
|
|
|
|
|
<p class="unit">天</p>
|
|
|
|
|
<p>未收货,订单自动完成</p>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="订单完成超过" prop="afterSalesExpire">
|
|
|
|
|
<el-input-number v-model="state.form.afterSalesExpire" :clearable="false" :controls="false" :min="1" />
|
|
|
|
|
<p class="unit">天</p>
|
|
|
|
|
<p>自动结束交易,不能申请售后</p>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="订单完成超过" prop="automaticPraise">
|
|
|
|
|
<el-input-number v-model="state.form.automaticPraise" :clearable="false" :controls="false" :min="1" />
|
|
|
|
|
<p class="unit">天</p>
|
|
|
|
|
<p>自动五星好评</p>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="售后申请超过" prop="afterSalesApplicationExpire">
|
|
|
|
|
<el-input-number
|
|
|
|
|
v-model="state.form.afterSalesApplicationExpire"
|
|
|
|
|
:clearable="false"
|
|
|
|
|
:controls="false"
|
|
|
|
|
:min="1"
|
|
|
|
|
/>
|
|
|
|
|
<p class="unit">天</p>
|
|
|
|
|
<p>商家未处理,自动通过审核</p>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="退货订单超过" prop="merchantReceiptExpire">
|
|
|
|
|
<el-input-number
|
|
|
|
|
v-model="state.form.merchantReceiptExpire"
|
|
|
|
|
:clearable="false"
|
|
|
|
|
:controls="false"
|
|
|
|
|
:min="1"
|
|
|
|
|
/>
|
|
|
|
|
<p class="unit">天</p>
|
|
|
|
|
<p>未填写物流,自动取消售后</p>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="填写退货物流超过" prop="returnGoodsExpire">
|
|
|
|
|
<el-input-number v-model="state.form.returnGoodsExpire" :clearable="false" :controls="false" :min="1" />
|
|
|
|
|
<p class="unit">天</p>
|
|
|
|
|
<p>商家未处理,自动通过退货</p>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" @click="handleUpdate">提交</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
const store = useStore();
|
|
|
|
|
const refsForm = ref(null);
|
|
|
|
|
const state = reactive({
|
|
|
|
|
loading: false,
|
|
|
|
|
form: {
|
|
|
|
|
orderPayExpire: 30,
|
|
|
|
|
automaticReceipt: 7,
|
|
|
|
|
afterSalesExpire: 15,
|
|
|
|
|
automaticPraise: 7,
|
|
|
|
|
afterSalesApplicationExpire: 7,
|
|
|
|
|
merchantReceiptExpire: 7,
|
|
|
|
|
returnGoodsExpire: 7,
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
orderPayExpire: [{ required: true, message: '订单创建超时自动关闭不能为空' }],
|
|
|
|
|
automaticReceipt: [{ required: true, message: '订单发货超时自动完成不能为空' }],
|
|
|
|
|
afterSalesExpire: [{ required: true, message: '订单完成超时自动结束交易不能为空' }],
|
|
|
|
|
automaticPraise: [{ required: true, message: '订单完成超时自动五星好评不能为空' }],
|
|
|
|
|
afterSalesApplicationExpire: [{ required: true, message: '售后申请超时自动审核通过不能为空' }],
|
|
|
|
|
merchantReceiptExpire: [{ required: true, message: '退货订单填写物流超时自动取消售后不能为空' }],
|
|
|
|
|
returnGoodsExpire: [{ required: true, message: '填写退货物流超时自动通过退货不能为空' }],
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
const handleSearch = async () => {
|
|
|
|
|
state.loading = true;
|
|
|
|
|
let res = await store.dispatch('orderConfig/search');
|
|
|
|
|
Object.assign(state.form, res);
|
|
|
|
|
state.loading = false;
|
|
|
|
|
};
|
|
|
|
|
handleSearch();
|
|
|
|
|
const handleUpdate = async () => {
|
|
|
|
|
state.loading = true;
|
|
|
|
|
try {
|
|
|
|
|
await proxy.$validate(refsForm);
|
|
|
|
|
await store.dispatch('orderConfig/update', state.form);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
console.info('取消保存', e);
|
|
|
|
|
}
|
|
|
|
|
state.loading = false;
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
.list-container {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.el-form {
|
|
|
|
|
:deep(.el-form-item__content) {
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
.el-input-number {
|
|
|
|
|
width: 60px;
|
|
|
|
|
input {
|
|
|
|
|
border-top-right-radius: 0;
|
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.unit {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0 @layout-space;
|
|
|
|
|
background: #f1f1f1;
|
|
|
|
|
border-top-right-radius: 4px;
|
|
|
|
|
border-bottom-right-radius: 4px;
|
|
|
|
|
position: relative;
|
|
|
|
|
left: -1px;
|
|
|
|
|
box-shadow: 0 0 0 1px #dcdfe6 inset;
|
|
|
|
|
}
|
|
|
|
|
p {
|
|
|
|
|
min-width: max-content;
|
|
|
|
|
margin-left: @layout-space;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|