main
bibi 3 years ago
parent 87049e2c51
commit 6113c85c7b

@ -0,0 +1,58 @@
import httpService from "@/request"
// 任务列表
export function taskList(params) {
return httpService({
url: `/user/taskRelease/list`,
method: 'get',
params: params,
})
}
// 置顶
export function topTask(params) {
return httpService({
url: `/user/taskRelease/topTask`,
method: 'get',
params: params,
})
}
// 取消
export function cancelTask(params) {
return httpService({
url: `/user/taskRelease/cancel`,
method: 'get',
params: params,
})
}
// 撤回
export function withdrawTask(params) {
return httpService({
url: `/user/taskRelease/withdraw`,
method: 'get',
params: params,
})
}
// 确认
export function confirmTask(params) {
return httpService({
url: `/user/taskRelease/confirm`,
method: 'get',
params: params,
})
}
// 获取任务设置
export function getSetting(params) {
return httpService({
url: `/user/settingTaskRelease/getSetting`,
method: 'get',
params: params,
})
}
// 保存任务设置
export function Setting(params) {
return httpService({
url: `/user/settingTaskRelease/setting`,
method: 'post',
data: params,
})
}

@ -0,0 +1,45 @@
<template>
<a-cascader
:options="cityList"
placeholder="请选择"
:field-names="{
label: 'name',
value: 'id',
children: 'cityList',
}"
@change="change"
style="width: 60%"
></a-cascader>
</template>
<script>
import store from "@/store";
export default {
data(){
return{
cityList:[]
}
},
methods: {
change(data){
this.$emit('onchange',data)
}
},
mounted() {
if(store.getters.getCity.length===0){
this.$axios({
method:'get',
url:process.env.VUE_APP_URL+'manage/city/allCity',//apicommunityCode
}).then((response) =>{
this.cityList = response.data.data
this.setCity(response.data.data);
}).catch((error) =>{
console.log(error) //
})
}
}
};
</script>
<style>
</style>

@ -0,0 +1,34 @@
<template>
<div>
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
<img alt="example" style="width: 100%" :src="previewImage" />
</a-modal>
</div>
</template>
<script>
export default {
props:{
previewVisible:{
type:Boolean,
default:false,
},
previewImage:{
type:String,
}
},
data() {
return{
}
},
methods:{
handleCancel() {
this.$emit('handleCancel')
},
}
}
</script>
<style>
</style>

@ -0,0 +1,68 @@
<template>
<div>
<a-upload
:action="`${$upload}`"
accept='.jpg,.JPG,.png,.PNG,.jpeg,.JPEG'
list-type="picture-card"
:headers="uploadHeaders"
:file-list="fileList"
@preview="handlePreview"
@change="handleChange"
>
<div v-if="fileList.length < 1">
<a-icon type="plus" />
<div class="ant-upload-text">上传图片</div>
</div>
</a-upload>
<imgModal :previewVisible='previewVisible' :previewImage='previewImage' @handleCancel='handleCancel'/>
</div>
</template>
<script>
import imgModal from "./imgModal.vue"
function getBase64(file) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
import store from "@/store";
export default {
components:{
imgModal
},
data() {
return{
previewVisible: false,
previewImage: '',
fileList: [],
uploadHeaders: {
"admin-login-token": store.getters.getToken
}
}
},
methods:{
async handlePreview(file) {
if (!file.url && !file.preview) {
file.preview = await getBase64(file.originFileObj);
}
this.previewImage = file.url || file.preview;
this.previewVisible = true;
},
handleCancel(){
this.previewVisible = false;
},
handleChange({ fileList }) {
this.fileList = fileList
if(fileList[0].status==='done'){
this.$emit('handleChange',fileList)
}
},
}
};
</script>
<style>
</style>

@ -21,8 +21,13 @@ const communityCode = store.getters.getCommunityCode;
Vue.prototype.$baseUrl = process.env.VUE_APP_URL + communityCode + '/manage' Vue.prototype.$baseUrl = process.env.VUE_APP_URL + communityCode + '/manage'
Vue.config.productionTip = false Vue.config.productionTip = false
import commonTable from './components/table' import commonTable from './components/table'
import commonUpload from './components/upload/index.vue'
import allCity from './components/allCity/index.vue'
// 注册组件 // 注册组件
Vue.component('commonTable', commonTable) Vue.component('commonTable', commonTable)
Vue.component('commonUpload', commonUpload)
Vue.component('allCity', allCity)
new Vue({ new Vue({
render: h => h(App), render: h => h(App),

@ -12,10 +12,10 @@ export default {
install(Vue) { install(Vue) {
Vue.mixin({ Vue.mixin({
computed: { computed: {
...mapGetters(['getToken','getCommunityCode','getSelectedKeys', 'getOpenKeys']) ...mapGetters(['getToken','getCommunityCode','getSelectedKeys', 'getOpenKeys','getCity'])
}, },
methods: { methods: {
...mapActions(['setToken','setCommunityCode','setSelectedKeys', 'setOpenKeys']) ...mapActions(['setToken','setCommunityCode','setSelectedKeys', 'setOpenKeys','setCity'])
} }
}) })
} }

@ -6,4 +6,33 @@
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /LittleBeeSaas/src/router/operation.js * @FilePath: /LittleBeeSaas/src/router/operation.js
*/ */
export default [] export default [
{
path: '/TaskManage',
name: "TaskManage",
title: "任务管理",
icon: 'home',
hide: false,
component: resolve => require(['@/views/Operation/TaskManage'], resolve),
redirect: '/TaskManage/TaskList',
meta: {title: '任务管理'},
children: [
{
path: '/TaskManage/TaskList',
name: "TaskList",
title: "任务列表",
hide: false,
component: resolve => require(['@/views/Operation/TaskManage/_taskList'], resolve),
meta: {title: '任务列表'},
},
{
path: '/TaskManage/TaskSet',
name: "TaskSet",
title: "任务设置",
hide: false,
component: resolve => require(['@/views/Operation/TaskManage/_taskSet'], resolve),
meta: {title: '任务设置'},
},
]
},
]

@ -19,6 +19,9 @@ const actions = {
setOpenKeys: ({commit}, log) => { setOpenKeys: ({commit}, log) => {
commit('setOpenKeys', log) commit('setOpenKeys', log)
}, },
setCity: ({commit}, log) => {
commit('setCity', log)
},
} }
export default actions export default actions

@ -19,6 +19,9 @@ const getters = {
getCommunityCode(state) { getCommunityCode(state) {
return state.communityCode return state.communityCode
}, },
getCity(state) {
return state.cityList
},
} }
export default getters export default getters

@ -25,6 +25,9 @@ const mutations = {
state.communityCode = log; state.communityCode = log;
sessionStorage.setItem('communityCode', log); sessionStorage.setItem('communityCode', log);
}, },
setCity (state, data) { // 设置参数
state.cityList = data
}
} }
export default mutations export default mutations

@ -11,5 +11,6 @@ const state = {
openKeys: JSON.parse(sessionStorage.getItem('openKeys')) || [], openKeys: JSON.parse(sessionStorage.getItem('openKeys')) || [],
token: sessionStorage.getItem('token') || "", token: sessionStorage.getItem('token') || "",
communityCode: sessionStorage.getItem('communityCode') || "", communityCode: sessionStorage.getItem('communityCode') || "",
cityList:[]
} }
export default state export default state

@ -279,6 +279,7 @@ export default {
pager.current = pagination.current; pager.current = pagination.current;
pager.pageSize = pagination.pageSize; pager.pageSize = pagination.pageSize;
this.pagination = pager; this.pagination = pager;
this.getData()
}, },
sendRole(data) { sendRole(data) {
this.form.manageUserId = data.id; this.form.manageUserId = data.id;

@ -23,7 +23,7 @@ export const columns = [
dataIndex: "leaseRate", dataIndex: "leaseRate",
width: "20%", width: "20%",
customRender:function(leaseRate){ customRender:function(leaseRate){
return leaseRate+'%' return ( leaseRate*100 )+'%'
} }
}, },
{ {
@ -31,7 +31,7 @@ export const columns = [
dataIndex: "occupancyRate", dataIndex: "occupancyRate",
width: "20%", width: "20%",
customRender:function(occupancyRate){ customRender:function(occupancyRate){
return occupancyRate+'%' return ( occupancyRate*100 )+'%'
} }
}, },
{ {

@ -128,9 +128,9 @@
房屋类型 房屋类型
<a-divider></a-divider> <a-divider></a-divider>
<!-- tags --> <!-- tags -->
<span v-for="item in typeList" :key="item.id"> <span v-for="item,index in typeList" :key="item.id">
<a-input <a-input
v-if="item.show" v-if="item.show===true"
ref="input" ref="input"
type="text" type="text"
size="small" size="small"
@ -141,7 +141,7 @@
/> />
<a-tag <a-tag
v-else closable @close="delType(item.id)" v-else closable @close="delType(item.id)"
@click="editInput(item)" > @click="editInput(item,index)" >
{{item.name}} {{item.name}}
</a-tag> </a-tag>
</span> </span>
@ -299,12 +299,13 @@ export default {
}, },
// input // input
editInput(obj,i) { editInput(obj,i) {
// this.$set(obj,'show',false)
obj.show = true; // v-if show = trueinput obj.show = true; // v-if show = trueinput
this.$nextTick(()=>{ //nextTickrefs.inputundefineddom console.log(this.typeList);
console.log(this.$refs.input[0]);//V-IFinputrefs.input10index // this.$nextTick(function(){ //nextTickrefs.inputundefineddom
console.log(this.$refs.input[0].focus());//$refs.input[0].focus()undefinedfunction // console.log(this.$refs.input[0]);
this.$refs.input[0].focus() // // this.$refs.input[0].focus() //
}) // })
}, },
// //
async editType(item){ async editType(item){
@ -357,6 +358,7 @@ export default {
pager.current = pagination.current; pager.current = pagination.current;
pager.pageSize = pagination.pageSize; pager.pageSize = pagination.pageSize;
this.pagination = pager; this.pagination = pager;
this.getData()
}, },
del(ids) { del(ids) {
this.$confirm({ this.$confirm({

@ -257,6 +257,7 @@ export default {
pager.current = pagination.current; pager.current = pagination.current;
pager.pageSize = pagination.pageSize; pager.pageSize = pagination.pageSize;
this.pagination = pager; this.pagination = pager;
this.getData()
}, },
Actions(data) { Actions(data) {
console.log(data); console.log(data);

@ -241,7 +241,7 @@ export default {
}, },
created() { created() {
this.keyupEnter(); this.keyupEnter();
this.getCity() this.getAllCity()
}, },
watch: { watch: {
communityCode:{ communityCode:{
@ -251,12 +251,13 @@ export default {
} }
}, },
methods: { methods: {
getCity(){ getAllCity(){
this.$axios({ this.$axios({
method:'get', method:'get',
url:process.env.VUE_APP_URL+'manage/city/allCity',//apicommunityCode url:process.env.VUE_APP_URL+'manage/city/allCity',//apicommunityCode
}).then((response) =>{ }).then((response) =>{
this.cityList = response.data.data this.cityList = response.data.data
this.setCity(response.data.data);
}).catch((error) =>{ }).catch((error) =>{
console.log(error) // console.log(error) //
}) })
@ -278,6 +279,7 @@ export default {
// //
onChange(data){ onChange(data){
this.getCommunity(data[2]) this.getCommunity(data[2])
this.communityCode=undefined
}, },
// //
filter(inputValue, path) { filter(inputValue, path) {

@ -0,0 +1,166 @@
export const pagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}
export const searchForm = {
status:undefined,
rewardType: undefined,
type: undefined,
keyword:''
}
export const columns = [
{
title: "任务单号",
width: "12%",
dataIndex: "code",
},
{
title: "创建人名称",
width: "5%",
dataIndex: "createName",
},
{
title: "任务状态",
width: "4%",
dataIndex: "status",
customRender: function (status) {
switch (status) {
case 1:
return '已发布'
case 2:
return '已接取'
case 3:
return '服务中'
case 4:
return '待确认'
case 5:
return '已完成'
case 6:
return '已评价'
case 9:
return '已取消'
}
}
},
{
title: "类型",
width: "4%",
dataIndex: "type",
customRender: function (type) {
switch (type) {
case 1:
return '跑腿'
case 2:
return '家政'
case 3:
return '维修'
case 4:
return '家教'
case 9:
return '其他'
}
}
},
{
title: "备注",
width: "8%",
dataIndex: "remarks",
},
{
title: "接单人名称",
width: "5%",
dataIndex: "receiverName",
},
{
title: "可接单开始时间",
width: "10%",
dataIndex: "readyStartTime",
},
{
title: "可接单结束时间",
width: "10%",
dataIndex: "readyEndTime",
},
{
title: "服务人员",
width: "4%",
dataIndex: "servicePersonnel",
customRender: function (servicePersonnel) {
switch (servicePersonnel) {
case 1:
return '住户'
case 2:
return '物业'
}
}
},
{
title: "联系人",
width: "4%",
dataIndex: "contact",
},
{
title: "报酬类型",
width: "4%",
dataIndex: "rewardType",
customRender: function (rewardType) {
switch (rewardType) {
case 1:
return '赏金'
case 2:
return '积分'
}
}
},
{
title: "报酬数",
width: "4%",
dataIndex: "reward",
},
{
title: "创建时间",
width: "8%",
dataIndex: "createDate",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "300",
fixed: "right",
scopedSlots: { customRender: "action" },
},
]
export const options = {
rewardType: [
{
id: 1,
name:'赏金'
},
{
id: 2,
name:'积分'
},
],
type: [
{
id:1, name:'跑腿'
},
{
id:2, name:'家政'
},
{
id:3, name:'维修'
},
{
id:4, name:'家教'
},
{
id:9, name:'其他'
},
]
}

@ -0,0 +1,213 @@
<template>
<div>
<div class="cardTitle">
<a-space size="large">
<span>任务列表</span>
<a-radio-group
v-model="activeName"
button-style="solid"
@change="tabsChange"
>
<a-radio-button value="0"> 全部 </a-radio-button>
<a-radio-button value="1"> 已发布 </a-radio-button>
<a-radio-button value="2"> 已接取 </a-radio-button>
<a-radio-button value="3"> 服务中 </a-radio-button>
<a-radio-button value="4"> 待确认 </a-radio-button>
<a-radio-button value="5"> 已完成 </a-radio-button>
<a-radio-button value="6"> 已评价 </a-radio-button>
<a-radio-button value="9"> 已取消 </a-radio-button>
</a-radio-group>
</a-space>
</div>
<div class="search-box">
<a-row>
<a-col :span="20">
<a-space size="large">
<a-select placeholder="报酬类型" v-model="searchForm.rewardType" style="width: 200px" >
<a-select-option v-for="item in options.rewardType" :key="item.id" :value="item.id">{{item.name}}</a-select-option>
</a-select>
<a-select placeholder="类型" v-model="searchForm.type" style="width: 200px" >
<a-select-option v-for="item in options.type" :key="item.id" :value="item.id">{{item.name}}</a-select-option>
</a-select>
<a-input placeholder="关键字" v-model="searchForm.keyword" style="width: 200px" />
<a-button type="primary" @click='getData'> </a-button>
<a-button @click='reset'> </a-button>
</a-space>
</a-col>
</a-row>
</div>
<div class="main">
<div style="margin-bottom: 16px">
<!-- 批量操作 -->
<a-select
type="primary"
v-model="activeAction"
:disabled="!hasSelected"
:loading="loading"
style="width: 120px"
@change="Actions"
placeholder="请选择操作"
>
批量
<a-select-option v-for="item in ActionsList" :key="item.value">
{{ item.label }}
</a-select-option>
</a-select>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
<!-- 表格 -->
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 2500 }"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: selectionChoosed,
}"
:row-key="
(record, index) => {
return index;
}
"
>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" v-if='row.status===1' @click="top(row)"></a>
<a class="ant-dropdown-link" v-if='row.status===2||row.status===3' @click="withdraw(row)"></a>
<a class="ant-dropdown-link" v-if='row.status===4' @click="confirm(row)"></a>
<a class="ant-dropdown-link" @click="cancel(row)" v-if='row.status<4'>取消</a>
</a-space>
</span>
</a-table>
</div>
</div>
</template>
<script>
import { pagination, searchForm, columns, options } from "./depend/config";
import {
taskList,
topTask,
cancelTask,
withdrawTask,
confirmTask,
} from "@/api/operation/task";
export default {
data() {
return {
activeName: "0",
pagination,
searchForm,
activeAction: undefined,
loading: false,
// index
selectedRowKeys: [],
tableChoosed: [],
//
columns,options,
//
tableData: [],
ActionsList: [],
};
},
mounted() {
this.getData();
},
methods: {
async getData() {
let res = await taskList({
pageNum: this.pagination.current,
size: this.pagination.pageSize,
status: this.searchForm.status,
rewardType: this.searchForm.rewardType,
type: this.searchForm.type,
keyword: this.searchForm.keyword,
});
this.tableData = res.data.rows;
this.pagination.total = res.data.total;
},
tabsChange(e) {
if(e.target.value === '0'){
this.searchForm.status =undefined
this.getData();
}
this.searchForm.status = e.target.value;
this.getData();
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
Actions(data) {
console.log(data);
this.activeAction = undefined;
},
reset(){
this.searchForm = {
rewardType: undefined,
type: undefined,
keyword:''
}
this.getData()
},
selectionChoosed(data) {
console.log(data);
this.tableChoosed = data;
},
async top(data) {
let res = await topTask({ taskId: data.id });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
async cancel(data) {
let res = await cancelTask({ taskId: data.id });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
async confirm(data) {
let res = await confirmTask({ taskId: data.id });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
async withdraw(data) {
let res = await withdrawTask({ taskId: data.id });
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
};
</script>
<style lang="less" scoped>
</style>

@ -0,0 +1,18 @@
export const set = {
taskEnable: undefined,
releaseEnable: undefined,
releaseFreeTime: undefined,
releaseDeductType: undefined,
releaseTimeoutInterval: undefined,
releaseTimeoutValue: undefined,
releaseTimeoutMax: undefined,
releaseReturnType: undefined,
ordersEnable: undefined,
ordersFreeTime: undefined,
ordersDeductType: undefined,
ordersTimeoutInterval: undefined,
ordersTimeoutValue: undefined,
ordersTimeoutMax: undefined,
ordersReturnType: undefined,
serviceConfirmTime: undefined,
}

@ -0,0 +1,168 @@
<template>
<div>
<div class="cardTitle">任务设置</div>
<a-form-model
:model="set"
:label-col="labelCol"
title="基本设置"
:wrapper-col="wrapperCol"
>
<a-form-model-item label="任务发布">
<a-radio-group v-model="set.taskEnable" button-style="solid">
<a-radio-button :value="true"> 开启 </a-radio-button>
<a-radio-button :value="false"> 关闭 </a-radio-button>
</a-radio-group>
<div>设置关闭后用户将无法在APP上发布任务</div>
</a-form-model-item>
<a-form-model-item label="取消订单设置——发布者">
<a-space>
<a-checkbox v-model="set.releaseEnable" />
<span :class="[set.releaseEnable===false?'disabled':'']"
>被接单后发布者在<a-input :disabled='set.releaseEnable===false' v-model="set.releaseFreeTime"></a-input
>分钟内可以免费取消订单超过时间时支付违约金</span
>
</a-space>
</a-form-model-item>
<a-form-model-item label="发布者违约金计算方式">
<a-radio-group v-model="set.releaseDeductType" :disabled='set.releaseEnable===false' button-style="solid">
<a-radio-button :value="1"> 百分比扣除 </a-radio-button>
<a-radio-button :value="2"> 固定金额 </a-radio-button>
</a-radio-group>
<!-- 发布者-百分比扣除 -->
<div v-if="set.releaseDeductType === 1" :class="[set.releaseEnable===false?'disabled':'']">
在免费取消时限后取消订单每过<a-input :disabled='set.releaseEnable===false'
v-model="set.releaseTimeoutInterval"
></a-input
>分钟扣除报酬<a-input v-model="set.releaseTimeoutValue" :disabled='set.releaseEnable===false'></a-input>%
的违约金/积分单次任务扣除上限为<a-input :disabled='set.releaseEnable===false'
v-model="set.releaseTimeoutMax"
></a-input
>%
<div>计时方式为0 &lt;X 设定时间X为取消订单时间</div>
<div>
设定时间为5分钟则00:01至05:00期间可免费取消05:01至10:00期间扣除
</div>
</div>
<div v-else-if="set.releaseDeductType === 2" :class="[set.releaseEnable===false?'disabled':'']">
每过<a-input v-model="set.releaseTimeoutInterval" :disabled='set.releaseEnable===false'></a-input>
<a-input v-model="set.releaseTimeoutValue" :disabled='set.releaseEnable===false'></a-input>
个单位的违约金/积分单次任务扣除上限为<a-input :disabled='set.releaseEnable===false'
v-model="set.releaseTimeoutMax"
></a-input
>个单位
<div>计时方式为0 &lt;X 设定时间X为取消订单时间</div>
<div>
设定时间为5分钟则00:01至05:00期间可免费取消05:01至10:00期间扣除
</div>
</div>
</a-form-model-item>
<a-form-model-item label="扣除发布者违约金后">
<a-radio-group v-model="set.releaseReturnType" :disabled='set.releaseEnable===false' button-style="solid">
<a-radio-button :value="1"> 返还至帮手 </a-radio-button>
<a-radio-button :value="2"> 不做返还 </a-radio-button>
</a-radio-group>
</a-form-model-item>
<!-- 帮手 -->
<a-form-model-item label="取消订单设置——帮手">
<a-space>
<a-checkbox v-model="set.ordersEnable" />
<span :class="[set.ordersEnable===false?'disabled':'']"
>被接单后帮手在<a-input :disabled='set.ordersEnable===false' v-model="set.ordersFreeTime"></a-input
>分钟内可以免费取消订单超过时间时支付违约金</span
>
</a-space>
</a-form-model-item>
<a-form-model-item label="帮手违约金计算方式">
<a-radio-group v-model="set.ordersDeductType" :disabled='set.ordersEnable===false' button-style="solid">
<a-radio-button :value="1"> 百分比扣除 </a-radio-button>
<a-radio-button :value="2"> 固定金额 </a-radio-button>
</a-radio-group>
<!-- 帮手-百分比扣除 -->
<div v-if="set.ordersDeductType === 1" :class="[set.ordersEnable===false?'disabled':'']">
在免费取消时限后取消订单每过<a-input :disabled='set.ordersEnable===false'
v-model="set.ordersTimeoutInterval"
></a-input
>分钟扣除报酬<a-input v-model="set.ordersTimeoutValue" :disabled='set.ordersEnable===false'></a-input>%
的违约金/积分单次任务扣除上限为<a-input :disabled='set.ordersEnable===false'
v-model="set.ordersTimeoutMax"
></a-input
>%
<div>计时方式为0 &lt;X 设定时间X为取消订单时间</div>
<div>
设定时间为5分钟则00:01至05:00期间可免费取消05:01至10:00期间扣除
</div>
</div>
<!-- 帮手-固定 -->
<div v-else-if="set.ordersDeductType === 2" :class="[set.ordersEnable===false?'disabled':'']">
每过<a-input v-model="set.ordersTimeoutInterval" :disabled='set.ordersEnable===false'></a-input>
<a-input v-model="set.ordersTimeoutValue" :disabled='set.ordersEnable===false'></a-input>
个单位的违约金/积分单次任务扣除上限为<a-input :disabled='set.ordersEnable===false'
v-model="set.ordersTimeoutMax"
></a-input
>个单位
<div>计时方式为0 &lt;X 设定时间X为取消订单时间</div>
<div>
设定时间为5分钟则00:01至05:00期间可免费取消05:01至10:00期间扣除
</div>
</div>
</a-form-model-item>
<a-form-model-item label="扣除帮手违约金后">
<a-radio-group v-model="set.ordersReturnType" :disabled='set.ordersEnable===false' button-style="solid">
<a-radio-button :value="1"> 返还至发布者 </a-radio-button>
<a-radio-button :value="2"> 不做返还 </a-radio-button>
</a-radio-group>
</a-form-model-item>
<a-form-model-item label="服务后自动确认完成时间">
待确认后<a-input v-model="set.serviceConfirmTime"></a-input
>自动确认完成任务
</a-form-model-item>
<a-form-model-item :wrapper-col="{ span: 14, offset: 4 }">
<a-button type="primary" @click="onSubmit"> </a-button>
<a-button style="margin-left: 10px" @click="getData"> </a-button>
</a-form-model-item>
</a-form-model>
</div>
</template>
<script>
import { set } from "./depend/config";
import { getSetting, Setting } from "@/api/operation/task";
export default {
data() {
return {
set,
labelCol: { span: 4 },
wrapperCol: { span: 14 },
};
},
mounted() {
this.getData();
},
methods: {
async getData() {
let res = await getSetting();
this.set = res.data;
},
async onSubmit() {
let res = await Setting(this.set);
if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
},
},
};
</script>
<style lang="less" scoped>
/deep/.ant-input {
width: 73px;
display: inline;
margin: 0 5px 0 5px;
}
.disabled{
color: #00000040;
}
</style>

@ -0,0 +1,13 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
}
</script>
<style>
</style>
Loading…
Cancel
Save