This commit is contained in:
faiz 2024-06-25 10:32:43 +08:00
parent 4cb91b32d0
commit e6d0eacf5a
4 changed files with 70 additions and 19 deletions

View File

@ -1,4 +1,5 @@
build/*.js build/*.js
src/assets src/assets
src
public public
dist dist

19
admin/src/api/order.js Normal file
View File

@ -0,0 +1,19 @@
import request from '@/utils/request'
export function orderBack(data) {
return request({
url: '/admin/order/back',
method: 'post',
data
})
}
// 获取qa详情
export function getQaDetail(city_id) {
return request({
url: 'admin/qa/getQaDetail',
method: 'get',
params: {
city_id
}
})
}

View File

@ -124,7 +124,6 @@
size="800px" size="800px"
direction="rtl" direction="rtl"
:modal="false" :modal="false"
:before-close="handleClose"
> >
<div v-clickoutside="handleClose" class="drawer"> <div v-clickoutside="handleClose" class="drawer">
<el-button v-if="QaShow" type="success" @click="drawer = false"> </el-button> <el-button v-if="QaShow" type="success" @click="drawer = false"> </el-button>

View File

@ -75,7 +75,7 @@
<el-table-column align="center" fixed width="200" label="操作"> <el-table-column align="center" fixed width="200" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="success" size="small" icon="el-icon-refresh" @click="onCirculation(scope.row)"> <el-button type="success" size="small" icon="el-icon-refresh" @click="onCirculation(scope.row)">
流转出 {{ scope.row.backs&&scope.row.backs.status==0?'流转中':'流转出' }}
</el-button> </el-button>
<el-button :type="types[scope.row.order_status]" size="small" icon="el-icon-edit" @click="onInfo(scope.row)"> <el-button :type="types[scope.row.order_status]" size="small" icon="el-icon-edit" @click="onInfo(scope.row)">
跟进 跟进
@ -203,7 +203,7 @@
<el-col :span="3">大人</el-col> <el-col :span="3">大人</el-col>
<el-col :span="5"><el-input v-model="item.personnel.adult" name="adult" placeholder="大人" /></el-col> <el-col :span="5"><el-input v-model="item.personnel.adult" name="adult" placeholder="大人" /></el-col>
<el-col :span="3">老人</el-col> <el-col :span="3">老人</el-col>
<el-col :span="5"><el-input v-model="item.personnel.old" name="adult" placeholder="老人" /></el-col> <el-col :span="5"><el-input v-model="item.personnel.old" name="old" placeholder="老人" /></el-col>
<el-col :span="3">小孩</el-col> <el-col :span="3">小孩</el-col>
<el-col :span="5"><el-input v-model="item.personnel.child" name="child" placeholder="小孩" /></el-col> <el-col :span="5"><el-input v-model="item.personnel.child" name="child" placeholder="小孩" /></el-col>
</el-row> </el-row>
@ -355,16 +355,16 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="申请转出订单" :visible.sync="dialog3Visible"> <el-dialog title="申请转出订单" :visible.sync="applyVisible">
<el-form label-width="160px" :model="item3"> <el-form label-width="160px" :model="item3" :rules="rules" ref="ruleForm">
<el-form-item label="标题:"> <el-form-item label="标题:">
<el-input v-model="item3.product_name" disabled /> <el-input v-model="item3.product_name" disabled />
</el-form-item> </el-form-item>
<el-form-item label="订单号:"> <el-form-item label="订单号:">
<el-input v-model="item3.sn" disabled /> <el-input v-model="item3.sn" disabled />
</el-form-item> </el-form-item>
<el-form-item label="流转对象:" style="width: 600px;"> <el-form-item label="流转对象:" style="width: 600px;" prop="flowObj">
<el-select v-model="value" placeholder="请选择" @change="onChange2"> <el-select v-model="item3.flowObj" placeholder="请选择" @change="onChange2">
<el-form-item style="display: inline-flex;text-align: left;width: 770px;"> <el-form-item style="display: inline-flex;text-align: left;width: 770px;">
<el-option <el-option
v-for="item in adminList" v-for="item in adminList"
@ -378,7 +378,9 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="onCirculationSave(value)"> </el-button> <!-- scope.row.backs&&scope.row.backs.status==2? -->
<el-button v-if="item3.backs&&item3.backs.status==0" type="primary" @click="onCancel(item3.flowObj)"> </el-button>
<el-button v-else type="primary" @click="onCirculationSave(item3.flowObj)"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -388,7 +390,7 @@
<script> <script>
// import Pagination from '@/components/Pagination' // import Pagination from '@/components/Pagination'
import Pagination from '@/components/PaginationFixed' import Pagination from '@/components/PaginationFixed'
import {orderBack} from '@/api/order'
export default { export default {
name: 'Orderlist', name: 'Orderlist',
components: { Pagination }, components: { Pagination },
@ -421,15 +423,22 @@ export default {
dialogVisible: false, dialogVisible: false,
dialog2Visible: false, dialog2Visible: false,
dialog3Visible: false, applyVisible: false,
oss: {}, oss: {},
item3: { item3: {
sn: null, sn: null,
backs:null,
flowObj:'',
os: null // 12 3 os: null // 12 3
}, },
os_arr: { 1: '美团', 2: '快手', 3: '抖音' }, os_arr: { 1: '美团', 2: '快手', 3: '抖音' },
adminList: [], adminList: [],
form: {} form: {},
rules:{
flowObj: [
{ required: true, message: '请选择活动区域', trigger: 'change' }
],
}
} }
}, },
created() { created() {
@ -485,6 +494,9 @@ export default {
}) })
}, },
resetForm(formName) {
this.$refs[formName].resetFields();
},
getAdminList() { getAdminList() {
this.$axios.get('/admin/admin/index', { params: { limit: 100, status: 1, is_order: 1 }}).then(response => { this.$axios.get('/admin/admin/index', { params: { limit: 100, status: 1, is_order: 1 }}).then(response => {
this.adminList = response.data.data this.adminList = response.data.data
@ -493,18 +505,38 @@ export default {
}) })
}, },
onCirculation(item) { onCirculation(item) {
this.dialog3Visible = true this.applyVisible = true
this.item3 = { ...item, os: Number(item.os) } this.item3 = { ...item, os: Number(item.os) }
this.resetForm('ruleForm')
}, },
//
onCirculationSave(to_admin_id) { onCirculationSave(to_admin_id) {
this.$axios.post('/admin/order/back', { sn: this.item3.sn, os: this.item3.os, to_admin_id: to_admin_id }).then(res => { this.$refs.ruleForm.validate((valid) => {
this.dialog3Visible = false if (valid) {
this.item = {} orderBack({ sn: this.item3.sn, os: this.item3.os, to_admin_id: to_admin_id }).then((res)=>{
this.applyVisible = false
this.getList() this.getList()
console.log(this.dialog3Visible)
}).catch(err => {
}) })
} else {
return false;
}
});
},
//
onCancel() {
this.$refs.ruleForm.validate((valid) => {
if(valid){
this.$axios.post('/admin/order/backcancel', { id: this.item3.id }).then(res => {
this.applyVisible = false
this.getList()
}).catch(err => {
console.log(err)
})
}else{
return false
}
});
}, },
onBack() { onBack() {
this.$axios.post('/admin/order/back', this.item).then(res => { this.$axios.post('/admin/order/back', this.item).then(res => {