This commit is contained in:
曹辉 2022-11-08 17:10:11 +08:00
parent 91a3f508b4
commit a9b303d28e
7 changed files with 674 additions and 537 deletions

View File

@ -19,14 +19,14 @@ export function getGoodsOrder(id) {
// 查看商品详细信息 // 查看商品详细信息
export function getGoodsOrderlist(id) { export function getGoodsOrderlist(id) {
return request({ return request({
url: `/system/goodsOrder/goodsOrderByOrder`+`?orderNo=${id}`, url: `/system/goodsOrder/goodsOrderByOrder` + `?orderNo=${id}`,
method: 'get' method: 'get'
}) })
} }
// 退款 // 退款
export function goodsOrderRefundinfo(id) { export function goodsOrderRefundinfo(id) {
return request({ return request({
url: `/system/goodsOrder/goodsOrderRefund`+`?goodsOrderId=${id}`, url: `/system/goodsOrder/goodsOrderRefund` + `?goodsOrderId=${id}`,
method: 'get', method: 'get',
}) })
} }
@ -41,7 +41,6 @@ export function editExpressNo(data) {
} }
// 退款确定按钮 // 退款确定按钮
export function weChatRefundOrderApply(data) { export function weChatRefundOrderApply(data) {
return request({ return request({
url: '/nurseApp/weChatPayment/weChatRefundOrderApply', url: '/nurseApp/weChatPayment/weChatRefundOrderApply',
@ -74,4 +73,4 @@ export function delGoodsOrder(id) {
url: '/system/goodsOrder/' + id, url: '/system/goodsOrder/' + id,
method: 'delete' method: 'delete'
}) })
} }

View File

@ -11,7 +11,7 @@ export function appointmentOrderDetailsList(query) {
export function Detailed(id) { export function Detailed(id) {
return request({ return request({
url: `/system/appointmentOrderDetails/Detailed`+`?orderNo=${id}`, url: `/system/appointmentOrderDetails/Detailed` + `?orderNo=${id}`,
method: 'get', method: 'get',
}) })
@ -19,7 +19,7 @@ export function Detailed(id) {
//删除 //删除
export function deldetailed(appointmentOrderId) { export function deldetailed(appointmentOrderId) {
return request({ return request({
url: '/system/appointmentOrder/'+appointmentOrderId, url: '/system/appointmentOrder/' + appointmentOrderId,
method: 'post', method: 'post',
}) })
@ -45,10 +45,9 @@ export function dispatchsubmit(data) {
// 确认取消订单 // 确认取消订单
export function confirmCancel(data) { export function confirmCancel(appointmentOrderId) {
return request({ return request({
url: '/system/appointmentOrder/confirmCancel', url: `/system/appointmentOrder/confirmCancel?appointmentOrderId=${appointmentOrderId}`,
method: 'post', method: 'post'
data: data
}) })
} }

View File

@ -375,6 +375,7 @@
:visible.sync="innerVisible" :visible.sync="innerVisible"
width="1000px" width="1000px"
append-to-body append-to-body
:before-close="innerVisiblecancel"
> >
<el-form <el-form
ref="queryForm" ref="queryForm"
@ -466,11 +467,7 @@
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column <el-table-column property="phone" label="联系电话" align="center">
property="phone"
label="联系电话"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="address" property="address"
@ -745,6 +742,10 @@ export default {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.getList(); this.getList();
}, },
innerVisiblecancel() {
this.innerVisible = false;
this.addresetQuery();
},
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
if (this.nurseStationlist[0].isAdmin == "1") { if (this.nurseStationlist[0].isAdmin == "1") {

View File

@ -66,8 +66,47 @@
/> />
<el-table-column label="订单状态" align="center" prop="orderStatus"> <el-table-column label="订单状态" align="center" prop="orderStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button type="primary" v-if="scope.row.orderStatus=='WAIT_PAY'" style="background-color:red;border:none">待付款</el-button> --> <!-- {{ orderStatus(scope.row.orderStatus) }} -->
{{ orderStatus(scope.row.orderStatus) }} <el-button v-if="scope.row.orderStatus == 'WAIT_PAY'"
>待付款</el-button
>
<el-button type="primary" v-if="scope.row.orderStatus == 'PAY'"
>已付款</el-button
>
<el-button type="danger" v-if="scope.row.orderStatus == 'CANCEL'"
>已取消</el-button
>
<el-button
type="primary"
v-if="scope.row.orderStatus == 'WAIT_RECEIVED_GOODS'"
>待收货</el-button
>
<el-button
type="primary"
v-if="scope.row.orderStatus == 'RECEIVED_GOODS'"
>已收货</el-button
>
<el-button type="success" v-if="scope.row.orderStatus == 'COMPLETE'"
>服务完成</el-button
>
<el-button
type="warning"
v-if="scope.row.orderStatus == 'WAIT_REFUND'"
>退款中</el-button
>
<el-button
type="warning"
v-if="scope.row.orderStatus == 'WAIT_RETURNED_GOODS'"
>待退货</el-button
>
<el-button type="danger" v-if="scope.row.orderStatus == 'REFUNDED'"
>退款成功</el-button
>
<el-button
type="danger"
v-if="scope.row.orderStatus == 'RETURNED_GOODS'"
>已退货</el-button
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="订单总金额" align="center" prop="totalPrice" /> <el-table-column label="订单总金额" align="center" prop="totalPrice" />
@ -88,6 +127,46 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注信息" align="center" prop="remark" /> <el-table-column label="备注信息" align="center" prop="remark" />
<el-table-column label="录入物流单号" align="center" prop="remark">
<template slot-scope="scope">
<el-button
v-if="scope.row.orderStatus == 'WAIT_RECEIVED_GOODS'&&scope.row.expressNo"
size="mini"
type="text"
icon="el-icon-edit"
@click="seelogistics(scope.row)"
v-hasPermi="['system:nurseType:edit']"
>修改物流单号</el-button
>
<el-button
v-if="scope.row.orderStatus == 'WAIT_RECEIVED_GOODS'&&scope.row.expressNo==''"
size="mini"
type="text"
icon="el-icon-edit"
@click="seelogistics(scope.row)"
v-hasPermi="['system:nurseType:edit']"
>录入物流单号</el-button
>
<el-button
v-if="scope.row.orderStatus == 'WAIT_RECEIVED_GOODS'&&scope.row.expressNo==null"
size="mini"
type="text"
icon="el-icon-edit"
@click="seelogistics(scope.row)"
v-hasPermi="['system:nurseType:edit']"
>录入物流单号</el-button
>
<el-button
v-if="scope.row.orderStatus != 'WAIT_RECEIVED_GOODS'"
size="mini"
type="text"
icon="el-icon-edit"
disabled
v-hasPermi="['system:nurseType:edit']"
>不可录入物流单号</el-button
>
</template>
</el-table-column>
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
@ -102,24 +181,7 @@
v-hasPermi="['system:nurseType:edit']" v-hasPermi="['system:nurseType:edit']"
>查看商品信息</el-button >查看商品信息</el-button
> >
<el-button
v-if="scope.row.orderStatus == 'PAY'"
size="mini"
type="text"
icon="el-icon-edit"
@click="seelogistics(scope.row.id)"
v-hasPermi="['system:nurseType:edit']"
>录入物流单号</el-button
>
<!-- <el-button
v-if="scope.row.orderStatus == 'WAIT_REFUND'"
size="mini"
type="text"
icon="el-icon-edit"
@click="refund(scope.row.id)"
v-hasPermi="['system:nurseType:edit']"
>确认退款</el-button
> -->
<el-button <el-button
v-if="scope.row.orderStatus == 'WAIT_REFUND'" v-if="scope.row.orderStatus == 'WAIT_REFUND'"
size="mini" size="mini"
@ -129,35 +191,18 @@
v-hasPermi="['system:nurseType:edit']" v-hasPermi="['system:nurseType:edit']"
>确认退款</el-button >确认退款</el-button
> >
<!-- <el-button <el-button
v-else v-else
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="seelogistics(scope.row)" disabled
v-hasPermi="['system:nurseType:edit']" v-hasPermi="['system:nurseType:edit']"
>确认退款</el-button >确认退款</el-button
> -->
<!-- <el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:goodsOrder:edit']"
>修改</el-button
> >
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:goodsOrder:remove']"
>删除</el-button
> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
@ -274,7 +319,7 @@
style="width: 240px" style="width: 240px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="购买来源" prop="orderChannel"> <el-form-item label="购买来源" prop="orderChannel">
<el-input <el-input
:value="orderChannelinfo(orderList.orderChannel)" :value="orderChannelinfo(orderList.orderChannel)"
clearable clearable
@ -336,14 +381,12 @@
</el-table> --> </el-table> -->
</el-form> </el-form>
</el-dialog> </el-dialog>
<!-- 查看物流信息弹框 --> <!-- 查看物流信息弹框 -->
<el-dialog <el-dialog
title="录入物流单号" title="录入物流单号"
:visible.sync="innerlogistics" :visible.sync="innerlogistics"
append-to-body append-to-body
width="500px" width="500px"
style="margin-top: 10%"
> >
<el-form <el-form
:model="queryexpressNo" :model="queryexpressNo"
@ -351,33 +394,50 @@
size="small" size="small"
:inline="true" :inline="true"
v-show="showSearch" v-show="showSearch"
label-width="68px" label-width="100px"
> >
<el-form-item label="收货人" prop="receiver">
<el-input
style="width: 230px"
v-model="queryexpressNo.receiver"
placeholder=""
clearable
disabled
/>
</el-form-item>
<el-form-item label="手机号" prop="phone">
<el-input
style="width: 230px"
v-model="queryexpressNo.phone"
placeholder=""
clearable
disabled
/>
</el-form-item>
<el-form-item label="收货地址" prop="receiveAddress">
<el-input
v-model="queryexpressNo.receiveAddress"
style="width: 230px"
type="textarea"
:rows="5"
placeholder=""
disabled
clearable
/>
</el-form-item>
<el-form-item label="物流单号" prop="orderNo"> <el-form-item label="物流单号" prop="orderNo">
<el-input <el-input
v-model="queryexpressNo.expressNo" v-model="queryexpressNo.expressNo"
style="width: 230px"
placeholder="请输入物流单号" placeholder="请输入物流单号"
clearable clearable
@keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="searchlogistics()"
>确认</el-button
>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="cencellogistics"
>取消</el-button
>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cencellogistics"> </el-button>
<el-button type="primary" @click="searchlogistics"> </el-button>
</div>
</el-dialog> </el-dialog>
<!-- 退款弹框 --> <!-- 退款弹框 -->
<el-dialog <el-dialog
@ -385,7 +445,6 @@
:visible.sync="innerrefund" :visible.sync="innerrefund"
append-to-body append-to-body
width="700px" width="700px"
style="margin-top: 10%"
> >
<el-form <el-form
:model="refundlist" :model="refundlist"
@ -400,7 +459,6 @@
v-model="refundlist.goodsName" v-model="refundlist.goodsName"
placeholder="" placeholder=""
clearable clearable
@keyup.enter.native="handleQuery"
disabled disabled
/> />
</el-form-item> </el-form-item>
@ -416,32 +474,25 @@
v-model="refundlist.dictLabel" v-model="refundlist.dictLabel"
placeholder="" placeholder=""
clearable clearable
@keyup.enter.native="handleQuery"
disabled disabled
/> />
</el-form-item> </el-form-item>
<el-form-item label="退款金额" prop="godTotalPrice"> <el-form-item label="退款金额" prop="godTotalPrice">
<el-input <el-input
v-model="refundlist.godTotalPrice" v-model="refundlist.godTotalPrice"
placeholder="" placeholder=""
clearable clearable
@keyup.enter.native="handleQuery"
disabled disabled
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="补充描述和凭证" prop="refundReasonRemark">
label="补充描述和凭证"
prop="refundReasonRemark"
label-width="110px"
>
<el-input <el-input
style="width: 300px"
v-model="refundlist.refundReasonRemark" v-model="refundlist.refundReasonRemark"
placeholder="" placeholder=""
clearable clearable
@keyup.enter.native="handleQuery"
type="textarea" type="textarea"
:rows="2" :rows="5"
disabled disabled
/> />
<!-- <textarea cols="50" rows="10" v-model="refundlist.refundReasonRemark"> <!-- <textarea cols="50" rows="10" v-model="refundlist.refundReasonRemark">
@ -453,23 +504,7 @@
></editor> --> ></editor> -->
</el-form-item> </el-form-item>
<el-form-item> <el-form-item> </el-form-item>
<!--
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="searchlogistics()"
>确认</el-button
>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="cencellogistics"
>取消</el-button
> -->
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="refundcancel"> </el-button> <el-button @click="refundcancel"> </el-button>
@ -532,7 +567,18 @@
</template> </template>
<script> <script>
import { listGoodsOrder, getGoodsOrder, delGoodsOrder, addGoodsOrder, updateGoodsOrder, getGoodsOrderlist, goodsOrderRefundinfo, editExpressNo, goodsOrderrefund, weChatRefundOrderApply } from "@/api/system/goodsOrder"; import {
listGoodsOrder,
getGoodsOrder,
delGoodsOrder,
addGoodsOrder,
updateGoodsOrder,
getGoodsOrderlist,
goodsOrderRefundinfo,
editExpressNo,
goodsOrderrefund,
weChatRefundOrderApply,
} from "@/api/system/goodsOrder";
export default { export default {
name: "GoodsOrder", name: "GoodsOrder",
@ -584,7 +630,6 @@ export default {
value: "RETURNED_GOODS", value: "RETURNED_GOODS",
label: "已退货", label: "已退货",
}, },
], ],
// //
loading: true, loading: true,
@ -629,8 +674,7 @@ export default {
// //
form: {}, form: {},
// //
rules: { rules: {},
}
}; };
}, },
created() { created() {
@ -638,7 +682,6 @@ export default {
}, },
methods: { methods: {
// 退 // 退
refundTypeStatus(refundType) { refundTypeStatus(refundType) {
switch (refundType) { switch (refundType) {
case "REFUND_MONEY_GOODS": case "REFUND_MONEY_GOODS":
@ -675,9 +718,9 @@ export default {
} }
}, },
// //
orderChannelinfo(orderChannel){ orderChannelinfo(orderChannel) {
switch (orderChannel) { switch (orderChannel) {
case "MOBILE_APP": case "MOBILE_APP":
return "手机APP"; return "手机APP";
case "WECHAT_APPLET": case "WECHAT_APPLET":
return "微信小程序"; return "微信小程序";
@ -686,127 +729,122 @@ orderChannelinfo(orderChannel){
default: default:
break; break;
} }
}, },
// //
buySourceinfo(buySource){ buySourceinfo(buySource) {
switch (buySource) { switch (buySource) {
case "NURSE_STATION": case "NURSE_STATION":
return "护理站"; return "护理站";
case "SHOPPING_MALL": case "SHOPPING_MALL":
return "商城"; return "商城";
default: default:
break; break;
} }
}, },
/** 查询商品订单列表 */ /** 查询商品订单列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listGoodsOrder(this.queryParams).then(response => { listGoodsOrder(this.queryParams).then((response) => {
this.goodsOrderList = response.rows; this.goodsOrderList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },
// //
seeOrder(row) { seeOrder(row) {
console.log(row); console.log(row);
const id = row.orderNo; const id = row.orderNo;
getGoodsOrderlist(id).then(res => { getGoodsOrderlist(id).then((res) => {
this.orderList = res.data this.orderList = res.data;
this.innerorder = true this.innerorder = true;
}) });
}, },
// //
seelogistics(id) { seelogistics(row) {
// console.log(id); // console.log(id);
this.queryexpressNo.id = id // this.queryexpressNo.id = row.id;
console.log(this.queryexpressNo) this.queryexpressNo = JSON.parse(JSON.stringify(row));
this.innerlogistics = true this.innerlogistics = true;
},
}, //
// searchlogistics() {
searchlogistics() { console.log(this.queryexpressNo);
console.log(this.queryexpressNo) editExpressNo(this.queryexpressNo).then((res) => {
editExpressNo(this.queryexpressNo).then(res => { if (res.code == 200) {
if(res.code == 200){
this.$modal.msgSuccess("录入成功"); this.$modal.msgSuccess("录入成功");
} }
this.queryexpressNo.expressNo = "" this.queryexpressNo.expressNo = "";
this.innerlogistics = false this.innerlogistics = false;
console.log(res) this.getList();
});
}) },
}, //
// cencellogistics() {
cencellogistics() { this.innerlogistics = false;
this.innerlogistics = false this.queryexpressNo.expressNo = "";
this.queryexpressNo.expressNo = "" },
}, // 退
// 退 refund(id) {
refund(id) { console.log(id);
console.log(id); goodsOrderRefundinfo(id).then((res) => {
goodsOrderRefundinfo(id).then(res => { this.refundlist = res.data;
this.refundlist = res.data; console.log(this.refundlist);
console.log(this.refundlist) this.innerrefund = true;
this.innerrefund = true });
}) },
}, //退
//退 submitRefundOrder() {
submitRefundOrder() { var obj = {};
console.log(this.refundlist) obj.orderNo = this.refundlist.goOrderNo;
var obj = {} obj.refundReason = this.refundlist.dictLabel;
obj.orderNo = this.refundlist.goOrderNo obj.refundPrice = this.refundlist.godTotalPrice;
obj.refundReason = this.refundlist.dictLabel obj.remark = this.refundlist.refundReasonRemark;
obj.refundPrice = this.refundlist.godTotalPrice obj.goodsStatus = this.refundlist.orderStatus;
obj.remark = this.refundlist.refundReasonRemark weChatRefundOrderApply(obj).then((res) => {
obj.goodsStatus = this.refundlist.orderStatus if (res.code == 200) {
weChatRefundOrderApply(obj).then(res => {
if(res.code == 200){
this.$modal.msgSuccess("退款成功"); this.$modal.msgSuccess("退款成功");
} }
// console.log(obj) // console.log(obj)
this.innerrefund = false this.innerrefund = false;
}) });
},
// refund(id){
// console.log(id);
// this.$confirm('退?', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// this.refundinfo.id=id
// goodsOrderrefund(this.refundinfo).then((res) => {
// this.$message({
// type: 'success',
// message: '退'
// });
// this.getList();
// });
}, // }).catch(() => {
// refund(id){ // this.$message({
// console.log(id); // type: 'info',
// this.$confirm('退?', '', { // message: '退'
// confirmButtonText: '', // });
// cancelButtonText: '', // });
// type: 'warning' // },
// }).then(() => { //
// this.refundinfo.id=id cancel() {
// goodsOrderrefund(this.refundinfo).then((res) => { this.open = false;
// this.$message({ this.reset();
// type: 'success', },
// message: '退'
// });
// this.getList();
// });
// }).catch(() => { //退
// this.$message({ refundcancel() {
// type: 'info', this.innerrefund = false;
// message: '退' },
// }); //
// }); reset() {
this.queryParams = {
// },
//
cancel() {
this.open = false;
this.reset();
},
//退
refundcancel() {
this.innerrefund = false
},
//
reset() {
this.queryParams={
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
nurseStationId: null, nurseStationId: null,
@ -819,112 +857,120 @@ reset() {
phone: null, phone: null,
orderTime: null, orderTime: null,
orderChannel: null, orderChannel: null,
} };
this.form = { this.form = {
id: null, id: null,
nurseStationId: null, nurseStationId: null,
patientId: null, patientId: null,
orderNo: null, orderNo: null,
totalPrice: null, totalPrice: null,
receiver: null, receiver: null,
receiveAddress: null, receiveAddress: null,
phone: null, phone: null,
orderTime: null, orderTime: null,
orderChannel: null, orderChannel: null,
remark: null, remark: null,
delFlag: null, delFlag: null,
createBy: null, createBy: null,
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
orderStatus: "", orderStatus: "",
}; };
this.resetForm("queryParams"); this.resetForm("queryParams");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.reset(); this.reset();
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1 this.single = selection.length !== 1;
this.multiple = !selection.length this.multiple = !selection.length;
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加商品订单"; this.title = "添加商品订单";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id || this.ids const id = row.id || this.ids;
getGoodsOrder(id).then(response => { getGoodsOrder(id).then((response) => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改商品订单"; this.title = "修改商品订单";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
updateGoodsOrder(this.form).then(response => { updateGoodsOrder(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList();
});
} else {
addGoodsOrder(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除商品订单编号为"' + ids + '"的数据项?')
.then(function () {
return delGoodsOrder(ids);
})
.then(() => {
this.getList(); this.getList();
}); this.$modal.msgSuccess("删除成功");
} else { })
addGoodsOrder(this.form).then(response => { .catch(() => {});
this.$modal.msgSuccess("新增成功"); },
this.open = false; /** 导出按钮操作 */
this.getList(); handleExport() {
}); this.download(
} "system/goodsOrder/export",
} {
}); ...this.queryParams,
}, },
/** 删除按钮操作 */ `goodsOrder_${new Date().getTime()}.xlsx`
handleDelete(row) { );
const ids = row.id || this.ids; },
this.$modal.confirm('是否确认删除商品订单编号为"' + ids + '"的数据项?').then(function () { // orderStatus(code) {
return delGoodsOrder(ids); // var obj = {
}).then(() => { // WAIT_PAY: "",
this.getList(); // PAY: "",
this.$modal.msgSuccess("删除成功"); // CANCEL: "",
}).catch(() => { }); // WAIT_RECEIVED_GOODS: "",
}, // RECEIVED_GOODS: "",
/** 导出按钮操作 */ // WAIT_REFUND: "退",
handleExport() { // REFUNDED: "退",
this.download('system/goodsOrder/export', { // WAIT_RETURNED_GOODS: "退",
...this.queryParams // RETURNED_GOODS: "退",
}, `goodsOrder_${new Date().getTime()}.xlsx`) // };
}, // return obj[code];
orderStatus(code) { // },
var obj = { },
WAIT_PAY: '待付款',
PAY: '已付款',
CANCEL: '已取消',
WAIT_RECEIVED_GOODS: '待收货',
RECEIVED_GOODS: '已收货',
WAIT_REFUND: '退款中',
REFUNDED: '已退款',
WAIT_RETURNED_GOODS: '待退货',
RETURNED_GOODS: '已退货',
}
return obj[code]
}
}
}; };
</script> </script>

View File

@ -58,22 +58,54 @@
:data="OrderDetailsList" :data="OrderDetailsList"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column label="所属护理站" align="center" prop="nurseStationName" /> <el-table-column
label="所属护理站"
align="center"
prop="nurseStationName"
/>
<el-table-column label="会员名称" align="center" prop="patientName" /> <el-table-column label="会员名称" align="center" prop="patientName" />
<el-table-column label="订单编号" align="center" prop="orderNo" /> <el-table-column label="订单编号" align="center" prop="orderNo" />
<el-table-column label="护理项目名称" align="center" prop="nurseItemName" /> <el-table-column
<el-table-column label="订单总金额" align="center" prop="totalPrice" /> label="护理项目名称"
align="center"
prop="nurseItemName"
/>
<el-table-column label="订单总金额" align="center" prop="totalPrice" />
<el-table-column label="订单状态" align="center" prop="orderStatus"> <el-table-column label="订单状态" align="center" prop="orderStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.orderStatus=='WAIT_PAY'">待付款</el-button> <el-button v-if="scope.row.orderStatus == 'WAIT_PAY'"
<el-button type="primary" v-if="scope.row.orderStatus=='PAY'">已付款</el-button> >待付款</el-button
<el-button type="primary" v-if="scope.row.orderStatus=='WAIT_DISPATCH'">待派单</el-button> >
<el-button type="primary" v-if="scope.row.orderStatus=='NOT_FINISH'">待完成</el-button> <el-button type="primary" v-if="scope.row.orderStatus == 'PAY'"
<el-button type="success" v-if="scope.row.orderStatus=='COMPLETE'">服务完成</el-button> >已付款</el-button
<el-button type="warning" v-if="scope.row.orderStatus=='WAIT_REFUND'">退款中</el-button> >
<el-button type="warning" v-if="scope.row.orderStatus=='WAIT_RETURNED_GOODS'">待退货</el-button> <el-button
<el-button type="danger" v-if="scope.row.orderStatus=='CANCEL'">已取消</el-button> type="primary"
<el-button type="danger" v-if="scope.row.orderStatus=='REFUNDED'">退款成功</el-button> v-if="scope.row.orderStatus == 'WAIT_DISPATCH'"
>待派单</el-button
>
<el-button type="primary" v-if="scope.row.orderStatus == 'NOT_FINISH'"
>待完成</el-button
>
<el-button type="success" v-if="scope.row.orderStatus == 'COMPLETE'"
>服务完成</el-button
>
<el-button
type="warning"
v-if="scope.row.orderStatus == 'WAIT_REFUND'"
>退款中</el-button
>
<el-button
type="warning"
v-if="scope.row.orderStatus == 'WAIT_RETURNED_GOODS'"
>待退货</el-button
>
<el-button type="danger" v-if="scope.row.orderStatus == 'CANCEL'"
>已取消</el-button
>
<el-button type="danger" v-if="scope.row.orderStatus == 'REFUNDED'"
>退款成功</el-button
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="下单时间" align="center" prop="createTime" /> <el-table-column label="下单时间" align="center" prop="createTime" />
@ -97,14 +129,33 @@
icon="el-icon-s-promotion" icon="el-icon-s-promotion"
@click="dispatch(scope.row)" @click="dispatch(scope.row)"
v-hasPermi="['system:nurseType:edit']" v-hasPermi="['system:nurseType:edit']"
v-if="scope.row.orderStatus=='WAIT_DISPATCH'" v-if="scope.row.orderStatus == 'WAIT_DISPATCH'"
>派单</el-button
>
<el-button
size="mini"
type="text"
disabled
icon="el-icon-s-promotion"
@click="dispatch(scope.row)"
v-else
>派单</el-button >派单</el-button
> >
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-error" icon="el-icon-error"
@click="cencel(scope.row.appointmentOrderId)" v-if="scope.row.orderStatus == 'WAIT_REFUND'"
@click="cencel(scope.row)"
v-hasPermi="['system:nurseType:edit']"
>取消预约</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-error"
v-else
disabled
v-hasPermi="['system:nurseType:edit']" v-hasPermi="['system:nurseType:edit']"
>取消预约</el-button >取消预约</el-button
> >
@ -132,124 +183,112 @@
:visible.sync="innerVisible4" :visible.sync="innerVisible4"
append-to-body append-to-body
width="1048px" width="1048px"
class="orderInfo"
> >
<el-form <el-form
:inline="true" :inline="true"
ref="form" ref="form"
:model="form" :model="query"
:rules="rules" :rules="rules"
label-width="120px" label-width="120px"
> >
<div v-for="(item, index) in query" :key="index"> <el-form-item label="订单编号" prop="orderNo">
<el-form-item label="订单编号" prop="orderNo"> <el-input
<el-input v-model="query.orderNo"
v-model="item.orderNo" :disabled="true"
:disabled="true" style="width: 190px"
style="width: 190px" />
/> </el-form-item>
</el-form-item> <el-form-item label="订单状态" prop="orderStatus">
<el-form-item label="订单状态" prop="orderStatus"> <el-input
<el-input :value="switchOrderStatus(query.orderStatus)"
:value="switchOrderStatus(item.orderStatus)" disabled
disabled style="width: 150px"
style="width: 150px"
>
</el-input>
</el-form-item>
<el-form-item label="护理站名称" prop="nurseStationName">
<el-input
v-model="item.nurseStationName"
clearable
@keyup.enter.native="handleQuery"
:disabled="true"
style="width: 240px"
/>
</el-form-item>
<el-form-item label="订单数量" prop="orderCount">
<el-input
v-model="item.orderCount"
clearable
@keyup.enter.native="handleQuery"
:disabled="true"
style="width: 190px"
/>
</el-form-item>
<el-form-item label="护理项目名称" prop="nurseItemName">
<el-input
v-model="item.nurseItemName"
clearable
@keyup.enter.native="handleQuery"
:disabled="true"
style="width: 150px"
/>
</el-form-item>
<el-form-item label="服务时间" prop="time">
<el-input
v-model="item.time"
clearable
@keyup.enter.native="handleQuery"
:disabled="true"
style="width: 240px"
/>
</el-form-item>
<el-form-item label="护理项目时长" prop="itemServeDurationUnit">
<el-input
v-model="item.itemServeDurationUnit"
clearable
@keyup.enter.native="handleQuery"
:disabled="true"
style="width: 190px"
/>
</el-form-item>
<el-form-item label="护理项目价格" prop="nurseItemPrice">
<el-input
v-model="item.nurseItemPrice"
clearable
@keyup.enter.native="handleQuery"
:disabled="true"
style="width: 150px"
/>
</el-form-item>
<el-form-item label="服务地址" prop="serviceAddress">
<el-input
v-model="item.serviceAddress"
clearable
@keyup.enter.native="handleQuery"
:disabled="true"
style="width: 240px"
/>
</el-form-item>
<el-table
:data="item.appointmentOrderConsumableList"
align="center"
style="margin: 10px 0 20px 0; padding-bottom: 20px"
> >
<el-table-column </el-input>
prop="orderConsumableName" </el-form-item>
label="耗材包名称" <el-form-item label="护理站名称" prop="nurseStationName">
width="200" <el-input
align="center" v-model="query.nurseStationName"
> clearable
</el-table-column> :disabled="true"
<el-table-column style="width: 240px"
prop="orderConsumableCount" />
label="耗材包数量" </el-form-item>
width="200" <el-form-item label="订单数量" prop="orderCount">
align="center" <el-input
> v-model="query.orderCount"
</el-table-column> clearable
<el-table-column :disabled="true"
prop="orderConsumablePrice" style="width: 190px"
label="耗材包价格" />
width="200" </el-form-item>
align="center" <el-form-item label="护理项目名称" prop="nurseItemName">
> <el-input
</el-table-column> v-model="query.nurseItemName"
</el-table> clearable
</div> :disabled="true"
style="width: 150px"
/>
</el-form-item>
<el-form-item label="服务时间" prop="time">
<el-input
v-model="query.time"
clearable
:disabled="true"
style="width: 240px"
/>
</el-form-item>
<el-form-item label="护理项目时长" prop="itemServeDurationUnit">
<el-input
v-model="query.itemServeDurationUnit"
clearable
:disabled="true"
style="width: 190px"
/>
</el-form-item>
<el-form-item label="护理项目价格" prop="nurseItemPrice">
<el-input
v-model="query.nurseItemPrice"
clearable
:disabled="true"
style="width: 150px"
/>
</el-form-item>
<el-form-item label="服务地址" prop="serviceAddress">
<el-input
v-model="query.serviceAddress"
clearable
:disabled="true"
style="width: 240px"
/>
</el-form-item>
<el-table
:data="query.appointmentOrderConsumableList"
align="center"
style="margin: 10px 0 20px 0; padding-bottom: 20px"
>
<el-table-column
prop="orderConsumableName"
label="耗材包名称"
width="200"
align="center"
>
</el-table-column>
<el-table-column
prop="orderConsumableCount"
label="耗材包数量"
width="200"
align="center"
>
</el-table-column>
<el-table-column
prop="orderConsumablePrice"
label="耗材包价格"
width="200"
align="center"
>
</el-table-column>
</el-table>
</el-form> </el-form>
</el-dialog> </el-dialog>
<!-- 派单弹框 --> <!-- 派单弹框 -->
@ -260,12 +299,12 @@
width="500px" width="500px"
height="100px" height="100px"
> >
<el-form ref="form" :model="form" :rules="rules" label-width="150px"> <el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-form-item label="护理员姓名" prop="nursePersonName"> <el-form-item label="护理员姓名" prop="nursePersonName">
<el-button <el-button
type="" type=""
v-if="nurseName == '请选择护理员'" v-if="nurseName == '请选择护理员'"
style="width: 200px; text-align: left; height: 36px; color: #c0c4cc" style="width: 300px; text-align: left; height: 36px; color: #c0c4cc"
@click="clicknursePersonName()" @click="clicknursePersonName()"
>{{ nurseName }}</el-button >{{ nurseName }}</el-button
> >
@ -274,7 +313,7 @@
@click="clicknursePersonName()" @click="clicknursePersonName()"
v-else v-else
style=" style="
width: 362px; width: 300px;
text-align: left; text-align: left;
height: 36px; height: 36px;
padding-left: -10px; padding-left: -10px;
@ -300,6 +339,78 @@
<!-- <el-button @click="cancel"> </el-button> --> <!-- <el-button @click="cancel"> </el-button> -->
</div> </div>
</el-dialog> </el-dialog>
<!-- 取消预约 -->
<el-dialog
title="取消预约"
:visible.sync="innerrefund"
append-to-body
width="900px"
>
<el-form :inline="true" :rules="rules" label-width="120px">
<el-form-item label="护理站名称" prop="nurseStationName">
<el-input
style="width: 260px"
v-model="query.nurseStationName"
clearable
:disabled="true"
/>
</el-form-item>
<el-form-item label="护理项目名称" prop="nurseItemName">
<el-input
v-model="query.nurseItemName"
style="width: 260px"
clearable
:disabled="true"
/>
</el-form-item>
<el-form-item label="服务时间" prop="time">
<el-input
v-model="query.time"
style="width: 260px"
clearable
:disabled="true"
/>
</el-form-item>
<el-form-item label="护理时长" prop="itemServeDurationUnit">
<el-input
v-model="query.itemServeDurationUnit"
clearable
style="width: 260px"
:disabled="true"
/>
</el-form-item>
<el-form-item label="订单状态" prop="orderStatus">
<el-input
:value="switchOrderStatus(query.orderStatus)"
style="width: 260px"
disabled
>
</el-input>
</el-form-item>
<el-form-item label="总金额" prop="nurseItemPrice">
<el-input
v-model="query.nurseItemPrice"
clearable
style="width: 260px"
:disabled="true"
/>
</el-form-item>
<el-form-item label="服务地址" prop="serviceAddress">
<el-input
style="width: 260px"
v-model="query.serviceAddress"
clearable
type="textarea"
:rows="5"
:disabled="true"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button> </el-button>
<el-button type="primary" @click="ordercacenl"> </el-button>
</div>
</el-dialog>
<!-- 姓名弹框 --> <!-- 姓名弹框 -->
<el-dialog <el-dialog
:visible.sync="nursePersonNameinfo" :visible.sync="nursePersonNameinfo"
@ -342,11 +453,11 @@
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="dispatchlist"> <el-table :data="dispatchlist" @cell-dblclick="nursePersonclick">
<el-table-column label="请选择" width="70" align="center"> <el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="primary" type="primary"
style="width: 15px; height: 15px; overflow: hidden" style="width: 15px; height: 15px; overflow: hidden"
v-if="nursePersonid == scope.row.nurseStationPersonId" v-if="nursePersonid == scope.row.nurseStationPersonId"
circle circle
@ -416,8 +527,8 @@ import {
deldetailed, deldetailed,
getPerson, getPerson,
dispatchsubmit, dispatchsubmit,
confirmCancel
} from "@/api/system/order"; } from "@/api/system/order";
import { weChatRefundOrderApply } from "@/api/system/goodsOrder";
export default { export default {
name: "order", name: "order",
data() { data() {
@ -444,6 +555,7 @@ export default {
// //
loading: true, loading: true,
innerVisible4: false, innerVisible4: false,
innerrefund: false,
// //
innerdispatch: false, innerdispatch: false,
// //
@ -461,15 +573,14 @@ export default {
total: 0, total: 0,
// //
OrderDetailsList: [], OrderDetailsList: [],
OrderDetailsLists: [],
dispatchlist: [], dispatchlist: [],
nurseName: "请选择护理员", nurseName: "请选择护理员",
nursePersonid: "", nursePersonid: "",
// querynursecencel:{ // querynursecencel:{
// appointmentOrderId:"", // appointmentOrderId:"",
// }, // },
appointmentOrderId:"", appointmentOrderId: "",
nurseStationPersonId :"", nurseStationPersonId: "",
total2: 0, total2: 0,
// //
title: "", title: "",
@ -492,8 +603,8 @@ export default {
// pageSize: 10, // pageSize: 10,
// }, // },
querynursePersonname: { querynursePersonname: {
orderNo:"", orderNo: "",
nursePersonName:null, nursePersonName: null,
nursePersonType: null, nursePersonType: null,
departmentName: null, departmentName: null,
pageNum: 1, pageNum: 1,
@ -502,7 +613,6 @@ export default {
// nursePersonName: null, // nursePersonName: null,
}, },
query: [], query: [],
// //
form: {}, form: {},
// //
@ -513,6 +623,18 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
//
ordercacenl() {
var obj = {
orderNo: this.query.orderNo,
refundReason: this.query.cancelAppointmentReason,
refundPrice: this.query.totalPrice,
goodsStatus: this.query.orderStatus,
};
weChatRefundOrderApply(obj).then((res) => {
console.log(res);
});
},
switchOrderStatus(orderStatus) { switchOrderStatus(orderStatus) {
switch (orderStatus) { switch (orderStatus) {
case "WAIT_PAY": case "WAIT_PAY":
@ -538,26 +660,23 @@ export default {
e.serviceDate + "-" + e.serviceStartTime + "-" + e.serviceEndTime; e.serviceDate + "-" + e.serviceStartTime + "-" + e.serviceEndTime;
} }
}); });
this.OrderDetailsLists = res.data; this.query = res.data[0];
this.query = res.data;
this.innerVisible4 = true; this.innerVisible4 = true;
console.log(this.query); console.log(this.query);
}); });
}, },
// //
dispatch(row) { dispatch(row) {
console.log(row) console.log(row);
this.querynursePersonname.orderNo = row.orderNo this.querynursePersonname.orderNo = row.orderNo;
console.log(this.querynursePersonname.orderNo); console.log(this.querynursePersonname.orderNo);
// console.log(row) // console.log(row)
this.nurseName = "请选择护理员"; this.nurseName = "请选择护理员";
this.innerdispatch = true; this.innerdispatch = true;
this.nursePersonid ="" this.nursePersonid = "";
}, },
// //
clicknursePersonName() { clicknursePersonName() {
// console.log(this.dispatchlist);
getPerson(this.querynursePersonname).then((res) => { getPerson(this.querynursePersonname).then((res) => {
this.dispatchlist = res.rows; this.dispatchlist = res.rows;
this.total2 = res.total; this.total2 = res.total;
@ -567,72 +686,40 @@ export default {
}, },
// //
submitForm() { submitForm() {
// console.log(this.querynursePersonname) let params = {
// var obj = {} nurseStationPersonId: this.nursePersonid,
// obj.nurseStationPersonId = nurseStationPersonId orderNo: this.querynursePersonname.orderNo,
// obj.orderNo = this.querynursePersonname.orderNo };
let params={
nurseStationPersonId:this.nursePersonid,
orderNo:this.querynursePersonname.orderNo
}
dispatchsubmit(params).then((res) => { dispatchsubmit(params).then((res) => {
if(res.code == 200){ if (res.code == 200) {
this.$modal.msgSuccess("派单成功"); this.$modal.msgSuccess("派单成功");
} }
this.nurseName = "请选择护理员";
this.innerdispatch = false; this.innerdispatch = false;
this.getList();
this.nurseName = "请选择护理员";
// this.nursePersonid ="" // this.nursePersonid =""
});
})
}, },
// //
nursePersonclick(row) { nursePersonclick(row) {
this.nursePersonid = row.nurseStationPersonId this.nursePersonid = row.nurseStationPersonId;
this.nurseName = row.nursePersonName this.nurseName = row.nursePersonName;
this.nursePersonNameinfo = false; this.nursePersonNameinfo = false;
console.log(row) console.log(row);
}, },
//
// cencel(appointmentOrderId) { cencel(row) {
// confirmCancel(appointmentOrderId).then((res) => { Detailed(row.orderNo).then((res) => {
// // this.nurseName=""; res.data.forEach((e) => {
// // this.innerdispatch = false; if (e.serviceDate) {
e.time =
// }) e.serviceDate + "-" + e.serviceStartTime + "-" + e.serviceEndTime;
// console.log(appointmentOrderId)
// },
// console.log(row.appointmentOrderId)
// this.appointmentOrderId = row.appointmentOrderId
// console.log('row :>> ', this.querynursecencel.appointmentOrderId);
// obj.appointmentOrderId=row.appointmentOrderId
//
cencel(appointmentOrderId) {
this.$confirm(
'是否确认取消订单',
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
console.log(appointmentOrderId)
let params={
appointmentOrderId:appointmentOrderId
} }
confirmCancel(params).then((res) => { });
this.$message.success("取消成功"); this.query = res.data[0];
// this.getList(); this.innerrefund = true;
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList); });
}); },
})
.catch(() => { });
},
/** 查询护理类型信息列表 */ /** 查询护理类型信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -674,7 +761,7 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
resetQuery2() { resetQuery2() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery2(); this.handleQuery2();
}, },
@ -696,7 +783,6 @@ export default {
deldetailed(row.appointmentOrderId).then((res) => { deldetailed(row.appointmentOrderId).then((res) => {
this.$message.success("删除成功"); this.$message.success("删除成功");
this.getList(); this.getList();
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
}); });
}) })
.catch(() => {}); .catch(() => {});

View File

@ -403,6 +403,7 @@
:visible.sync="innerVisible" :visible.sync="innerVisible"
width="1000px" width="1000px"
append-to-body append-to-body
:before-close="addcancel"
> >
<el-form <el-form
ref="queryForm" ref="queryForm"
@ -526,6 +527,7 @@
:visible.sync="innerVisiblexg" :visible.sync="innerVisiblexg"
width="1000px" width="1000px"
append-to-body append-to-body
:before-close="addcancel"
> >
<el-form <el-form
ref="queryForm" ref="queryForm"
@ -822,11 +824,7 @@
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="phone" label="联系电话" align="center">
property="phone"
label="联系电话"
align="center"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
@ -1460,6 +1458,12 @@ export default {
// this.nurseStationlist() // this.nurseStationlist()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
addcancel() {
this.innerVisible = false;
this.innerVisiblexg = false;
this.resetQuery2();
this.resetQuery3();
},
resetQuery2() { resetQuery2() {
this.nurseStationqueryParams = { this.nurseStationqueryParams = {
pageNum: 1, pageNum: 1,

View File

@ -1026,9 +1026,11 @@ export default {
// }, // },
// //
handleQuery2() { handleQuery2() {
console.log(this.nurseStationqueryParams); this.getListByUserquery.pageNum = 1;
this.nurseStationqueryParams.pageNum = 1; getListByUser(this.getListByUserquery).then((res) => {
this.info(); this.nurseStationlist = res.rows;
this.total3 = res.total;
});
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
sresetQuery() { sresetQuery() {