Commit ea6214c4 by zhangmengjie

23.4.11

parent 5dfcc466
...@@ -8,14 +8,22 @@ export function listGET(query) { ...@@ -8,14 +8,22 @@ export function listGET(query) {
params: query params: query
}) })
} }
// 订单列表驳回 // 生成支付订单
export function createPayPOST(data) { export function createPayPOST(data) {
return request({ return request({
url: '/xinrenli/order/refund', url: '/xinrenli/order/createPay',
method: 'post', method: 'post',
data: data data: data
}) })
} }
// 生成退款订单
export function refundGET(query) {
return request({
url: '/xinrenli/order/refund',
method: 'get',
params: query
})
}
// 订单列表详情 // 订单列表详情
export function particularsGET(query) { export function particularsGET(query) {
return request({ return request({
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</el-form-item> </el-form-item>
<!-- <quillEditor></quillEditor> --> <!-- <quillEditor></quillEditor> -->
</el-form> </el-form>
<el-button type="primary" :disabled="disabled" @click="onSubmit">确认修改</el-button> <el-button type="primary" @click="onSubmit">{{btn}}</el-button>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -37,6 +37,9 @@ export default { ...@@ -37,6 +37,9 @@ export default {
title: { title: {
type: String type: String
}, },
btn: {
type: String
},
disabled:{ disabled:{
type:Boolean, type:Boolean,
default:false default:false
...@@ -59,8 +62,7 @@ export default { ...@@ -59,8 +62,7 @@ export default {
currentInfo:{}, currentInfo:{},
rules: { rules: {
title: [ title: [
{ required: true, message: '请输入活动名称', trigger: 'blur' }, { required: true, message: '请输入活动名称', trigger: 'blur' }
{ min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
], ],
content: [ content: [
{ required: true, message: '请填写活动形式', trigger: 'blur' } { required: true, message: '请填写活动形式', trigger: 'blur' }
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<!-- 其他 --> <!-- 其他 -->
<comindex :dialogVisibl="dialogVisible" @visivie='visivie' :control="control"></comindex> <comindex :dialogVisibl="dialogVisible" @visivie='visivie' :control="control"></comindex>
<!-- 修改 详情 --> <!-- 修改 详情 -->
<commodify ref="refModify" :disabled="disabled" :title="title" :dialogVisibl="dialogVi" @diaisibl="diaisibl" <commodify ref="refModify" :disabled="disabled" :title="title" :btn="btn" :dialogVisibl="dialogVi" @diaisibl="diaisibl"
@onSubmit="onSubmit"> @onSubmit="onSubmit">
</commodify> </commodify>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
...@@ -71,7 +71,8 @@ export default { ...@@ -71,7 +71,8 @@ export default {
control: '', control: '',
total: 0, total: 0,
value1: '', value1: '',
title: '修改订单', title: '动态发布',
btn:'确认发布',
options: [{ options: [{
value: '选项1', value: '选项1',
label: '黄金糕' label: '黄金糕'
...@@ -181,16 +182,19 @@ export default { ...@@ -181,16 +182,19 @@ export default {
// 修改详情 // 修改详情
modify(sta, val) { modify(sta, val) {
if (val == '1') { if (val == '1') {
this.title = '修改订单' this.title = '动态修改'
this.btn = '确定修改'
this.$refs['refModify'].articles(sta.id) this.$refs['refModify'].articles(sta.id)
this.disabled = false this.disabled = false
} else if (val == '2') { } else if (val == '2') {
this.$refs['refModify'].articles(sta.id) this.$refs['refModify'].articles(sta.id)
this.disabled = true this.disabled = true
this.title = '订单详情' this.title = '动态详情'
this.btn = '返回'
} else if (val == '3') { } else if (val == '3') {
this.$refs['refModify'].form = {} this.$refs['refModify'].form = {}
this.title = '新增订单' this.title = '动态发布'
this.btn = '确认发布'
} }
this.dialogVi = true this.dialogVi = true
...@@ -216,7 +220,7 @@ export default { ...@@ -216,7 +220,7 @@ export default {
onSubmit(val) { onSubmit(val) {
console.log(val, 'val=========') console.log(val, 'val=========')
console.log(this.title,'ppppppppppppppp') console.log(this.title,'ppppppppppppppp')
if (this.title == '新增订单') { if (this.title == '动态发布') {
articlePOST({ ...this.$refs['refModify'].form }).then((res) => { articlePOST({ ...this.$refs['refModify'].form }).then((res) => {
this.$refs['refModify'].form.content = '' this.$refs['refModify'].form.content = ''
this.$refs['refModify'].form.title = '' this.$refs['refModify'].form.title = ''
...@@ -224,7 +228,7 @@ export default { ...@@ -224,7 +228,7 @@ export default {
this.dialogVi = false this.dialogVi = false
this.artic() this.artic()
}) })
} else if (this.title == '修改订单') { } else if (this.title == '动态修改') {
articlePUT({ ...this.$refs['refModify'].form }).then((res) => { articlePUT({ ...this.$refs['refModify'].form }).then((res) => {
this.$refs['refModify'].form.content = '' this.$refs['refModify'].form.content = ''
this.$refs['refModify'].form.title = '' this.$refs['refModify'].form.title = ''
...@@ -232,6 +236,8 @@ export default { ...@@ -232,6 +236,8 @@ export default {
this.dialogVi = false this.dialogVi = false
this.artic() this.artic()
}) })
}else if(this.title == '动态详情'){
this.dialogVi = false
} }
} }
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</audio> </audio>
</div> </div>
<!-- 沟通后金额 --> <!-- 沟通后金额 -->
<div v-if="control == '4'"> <div v-if="control == '4' || control == '9' ">
<el-form :model="form"> <el-form :model="form">
<el-form-item label="沟通后金额"> <el-form-item label="沟通后金额">
<el-input class="delInput" type='number' v-model="form.money" placeholder="请输入沟通后金额"></el-input> <el-input class="delInput" type='number' v-model="form.money" placeholder="请输入沟通后金额"></el-input>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<span v-if="control == '4' || control == '5'" slot="footer" class="dialog-footer"> <span v-if="control == '4' || control == '5' || control == '9' " slot="footer" class="dialog-footer">
<el-button type="primary" @click="clickDialog">确 定</el-button> <el-button type="primary" @click="clickDialog">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
...@@ -89,6 +89,16 @@ export default { ...@@ -89,6 +89,16 @@ export default {
this.title = '' this.title = ''
} else if (st == '5') { } else if (st == '5') {
this.title = '订单驳回' this.title = '订单驳回'
}else if(st == '9'){
this.title = '生成退款订单'
if (self.dialogVisibl) {
this.bindex.forEach(element => {
if(self.idt == element.id){
self.form.money = element.dataName
console.log(self.form.money,element.dataName,'element.dataName')
}
});
}
} }
}, },
bindex(st, old) { bindex(st, old) {
......
...@@ -73,8 +73,10 @@ ...@@ -73,8 +73,10 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="150"> <el-table-column label="操作" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.status == 0 || scope.row.status == 5" @click="imageCaption(scope.row, '4')" <el-button v-if="scope.row.status == 0 " @click="imageCaption(scope.row, '4')"
type="text" size="small">生成支付订单</el-button> type="text" size="small">生成支付订单</el-button>
<el-button v-if="scope.row.status == 5" @click="imageCaption(scope.row, '9')"
type="text" size="small">生成退款订单</el-button>
<el-button v-if="scope.row.status == 0" type="text" size="small" <el-button v-if="scope.row.status == 0" type="text" size="small"
@click="imageCaption(scope.row, '5')">驳回</el-button> @click="imageCaption(scope.row, '5')">驳回</el-button>
<el-button v-if="scope.row.status == 0 || scope.row.status == 2" type="text" size="small" <el-button v-if="scope.row.status == 0 || scope.row.status == 2" type="text" size="small"
...@@ -97,26 +99,28 @@ ...@@ -97,26 +99,28 @@
<script> <script>
import comindex from './components/index' import comindex from './components/index'
import commodify from './components/modify' import commodify from './components/modify'
import { listGET, createPayPOST } from '@/api/orderform/index' import { listGET, createPayPOST ,refundGET} from '@/api/orderform/index'
export default { export default {
name: "orderform", name: "orderform",
filters: { filters: {
filtersList(val) { filtersList(val) {
switch (val) { switch (val) {
case 0: case 0:
return '已发布' return '待审核'
case 1: case 1:
return '已驳回' return '已驳回'
case 2: case 2:
return '待支付' return '已通过'
case 3: case 3:
return '已接单' return '待完成'
case 4: case 4:
return '已完成' return '已完成'
case 5: case 5:
return '退款中' return '待退款'
case 6: case 6:
return '已退款' return '已退款'
case 7:
return '已取消'
} }
} }
}, },
...@@ -130,25 +134,28 @@ export default { ...@@ -130,25 +134,28 @@ export default {
title: '修改订单', title: '修改订单',
options: [{ options: [{
value: '0', value: '0',
label: '已发布' label: '待审核'
}, { }, {
value: '1', value: '1',
label: '已驳回' label: '已驳回'
}, { }, {
value: '2', value: '2',
label: '待支付' label: '已通过'
}, { }, {
value: '3', value: '3',
label: '已接单' label: '待完成'
}, { }, {
value: '4', value: '4',
label: '已完成' label: '已完成'
}, { }, {
value: '5', value: '5',
label: '退款中' label: '待退款'
}, { }, {
value: '6', value: '6',
label: '已退款' label: '已退款'
}, {
value: '7',
label: '已取消'
}], }],
disabled: false, disabled: false,
particulars: {}, particulars: {},
...@@ -284,6 +291,11 @@ export default { ...@@ -284,6 +291,11 @@ export default {
this.control = val this.control = val
this.dialogVisible = true this.dialogVisible = true
break; break;
case '9':
this.id = sta.id
this.control = val
this.dialogVisible = true
break;
} }
}, },
cc(index) { cc(index) {
...@@ -337,6 +349,18 @@ export default { ...@@ -337,6 +349,18 @@ export default {
this.listth() this.listth()
} }
}) })
}else if (this.control == '9') {
var params = {
refundeAmount: this.$refs['refIndex'].form.money,
orderId: this.id
}
refundGET(params).then((res) => {
if (res.code == 200) {
this.$refs['refIndex'].form.money = ''
this.dialogVisible = false
this.listth()
}
})
} }
}, },
// 详情 修改 弹窗关闭 // 详情 修改 弹窗关闭
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment