From f00d5b0665cbe609457188087aa922d15d80af59 Mon Sep 17 00:00:00 2001 From: shidongli Date: Thu, 26 Oct 2023 14:09:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E8=AE=A2=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86+=E5=81=A5=E5=BA=B7=E5=92=A8=E8=AF=A2=E8=AE=A2?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/goodsOrder/index.vue | 6 +- src/views/system/goodsOrder/indexjs.js | 13 + src/views/system/healthorder/index.vue | 600 ++++++++++++++++++++++++ src/views/system/healthorder/indexjs.js | 444 ++++++++++++++++++ 4 files changed, 1060 insertions(+), 3 deletions(-) create mode 100644 src/views/system/healthorder/index.vue create mode 100644 src/views/system/healthorder/indexjs.js diff --git a/src/views/system/goodsOrder/index.vue b/src/views/system/goodsOrder/index.vue index caafc62..92274fd 100644 --- a/src/views/system/goodsOrder/index.vue +++ b/src/views/system/goodsOrder/index.vue @@ -8,13 +8,13 @@ v-show="showSearch" label-width="90px" > - + - + diff --git a/src/views/system/goodsOrder/indexjs.js b/src/views/system/goodsOrder/indexjs.js index b07a1fb..ca4177f 100644 --- a/src/views/system/goodsOrder/indexjs.js +++ b/src/views/system/goodsOrder/indexjs.js @@ -104,6 +104,7 @@ export default { queryParams: { pageNum: 1, pageSize: 10, + buySource:'SHOPPING_MALL', nurseStationId: null, patientId: null, orderNo: null, @@ -312,6 +313,7 @@ export default { this.queryParams = { pageNum: 1, pageSize: 10, + buySource:'SHOPPING_MALL', nurseStationId: null, patientId: null, orderNo: null, @@ -355,6 +357,17 @@ export default { this.queryParams = { pageNum: 1, pageSize: 10, + buySource:'SHOPPING_MALL', + nurseStationId: null, + patientId: null, + orderNo: null, + orderStatus: null, + totalPrice: null, + receiver: null, + receiveAddress: null, + phone: null, + orderTime: null, + orderChannel: null, }; this.handleQuery(); }, diff --git a/src/views/system/healthorder/index.vue b/src/views/system/healthorder/index.vue new file mode 100644 index 0000000..02e3cbb --- /dev/null +++ b/src/views/system/healthorder/index.vue @@ -0,0 +1,600 @@ + + + + + + + + \ No newline at end of file diff --git a/src/views/system/healthorder/indexjs.js b/src/views/system/healthorder/indexjs.js new file mode 100644 index 0000000..d73f177 --- /dev/null +++ b/src/views/system/healthorder/indexjs.js @@ -0,0 +1,444 @@ +import { + listGoodsOrder, + getGoodsOrder, + delGoodsOrder, + addGoodsOrder, + updateGoodsOrder, + getGoodsOrderlist, + goodsOrderRefundinfo, + editExpressNo, + goodsOrderrefund, + weChatRefundOrderApply, +} from "@/api/system/goodsOrder"; +import { getListByUser } from "@/api/system/userlist.js"; +export default { + name: "GoodsOrder", + data() { + return { + baseurl: process.env.VUE_APP_BASE_API, + // 查看商品信息 + innerorder: false, + // 查看物流信息 + innerlogistics: false, + // 确认退款 + innerrefund: false, + orderList: [], + refundlist: [], + orderTypelist: [{ + value: "INTEGRAL_EXCHANGE", + label: "积分兑换", + }, + { + value: "DIRECT_BUY", + label: "直接购买", + }, { + value: "HEALTH_CONSULTATION", + label: "健康咨询", + } + ], + ratelist: {}, //评分list + orderStatuslist: [{ + value: "WAIT_PAY", + label: "待付款", + }, + { + value: "PAY", + label: "待发货", + }, + { + value: "WAIT_RECEIVED_GOODS", + label: "待收货", + }, + { + value: "RECEIVED_GOODS", + label: "待评价", + }, + { + value: "EVALUATED", + label: "交易完成", + }, + { + value: "CANCEL", + label: "已取消", + }, + { + value: "WAIT_RETURNED_GOODS", + label: "待退货", + }, + { + value: "RETURNED_GOODS", + label: "已退货", + }, + { + value: "WAIT_REFUND", + label: "退款中", + }, + { + value: "REFUNDED", + label: "退款成功", + }, + ], + // 遮罩层 + loading: true, + // 选中数组 + ids: [], + // 非单个禁用 + single: true, + // 非多个禁用 + multiple: true, + // 显示搜索条件 + showSearch: true, + // 总条数 + total: 0, + //护理站 + stationtotal: 0, + nurseStationlist: [], + nurseStationshow: false, + // 商品订单表格数据 + goodsOrderList: [], + // 弹出层标题 + title: "", + // 是否显示弹出层 + open: false, + // 查询参数 + queryParams: { + pageNum: 1, + pageSize: 10, + buySource:'HEALTH_CONSULTATION', + nurseStationId: null, + patientId: null, + orderNo: null, + orderStatus: null, + totalPrice: null, + receiver: null, + receiveAddress: null, + phone: null, + orderTime: null, + orderChannel: null, + }, + queryexpressNo: { + id: "", + expressNo: null, + }, + //权限查询 + getListByUserquery: { + pageNum: 1, + pageSize: 10, + }, + refundinfo: { + id: "", + }, + // 表单参数 + form: {}, + // 表单校验 + rules: {}, + }; + }, + created() { + this.getList(); + }, + methods: { + clicknurseStationshow() { + this.nurseStationshow = false; + }, + //护理站重置 + stationcancel() { + this.getListByUserquery = { + pageNum: 1, + pageSize: 10, + }; + this.info(); + }, + //护理站页面选择护理站 + choicestationid(item) { + this.queryParams.nurseStationName = item.nurseStationName; + this.queryParams.nurseStationId = item.id; + this.nurseStationshow = false; + }, + //页面所属护理站 + ParamsStation(item) { + this.info(); + this.nurseStationshow = true + }, + //护理站权限列表 + info() { + getListByUser(this.getListByUserquery).then((res) => { + this.nurseStationlist = res.rows; + this.stationtotal = res.total; + }); + }, + // 退款类型 + refundTypeStatus(refundType) { + switch (refundType) { + case "REFUND_MONEY_GOODS": + return "退款退货"; + case "ONLY_REFUND_MONEY": + return "仅退款"; + default: + break; + } + }, + // 订单状态 + orderStatusinfo(orderStatus) { + switch (orderStatus) { + case "WAIT_PAY": + return "待付款"; + case "PAY": + return "待发货"; + case "WAIT_RECEIVED_GOODS": + return "待收货"; + case "RECEIVED_GOODS": + return "待评价"; + case "EVALUATED": + return "交易完成"; + case "WAIT_RETURNED_GOODS": + return "待退货"; + case "RETURNED_GOODS": + return "已退货"; + case "WAIT_REFUND": + return "退款中"; + case "REFUNDED": + return "退款成功"; + case "CANCEL": + return "已取消"; + default: + break; + } + }, + // 下单方式 + orderChannelinfo(orderChannel) { + switch (orderChannel) { + case "MOBILE_APP": + return "手机APP"; + case "WECHAT_APPLET": + return "微信小程序"; + case "ALI_PAY_APPLET": + return "支付宝小程序"; + default: + break; + } + }, + // 购买来源 + buySourceinfo(buySource) { + switch (buySource) { + case "NURSE_STATION": + return "护理站"; + case "SHOPPING_MALL": + return "商城"; + case "HEALTH_CONSULTATION": + return "健康咨询"; + default: + break; + } + }, + /** 查询商品订单列表 */ + getList() { + this.loading = true; + listGoodsOrder(this.queryParams).then((response) => { + this.goodsOrderList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + // 查看商品信息 + seeOrder(row) { + const id = row.orderNo; + getGoodsOrderlist(id).then((res) => { + this.orderList = res.data; + this.innerorder = true; + this.ratelist = {} + if (row.orderStatus == 'EVALUATED') { + this.ratelist = res.data.orderEvaluatePictureInfoList + } else {} + }); + }, + // 查看录入物流单号弹框 + seelogistics(row) { + // this.queryexpressNo.id = row.id; + this.queryexpressNo = JSON.parse(JSON.stringify(row)); + this.innerlogistics = true; + }, + // 确定按钮 + searchlogistics() { + editExpressNo(this.queryexpressNo).then((res) => { + if (res.code == 200) { + this.$modal.msgSuccess("录入成功"); + } + this.queryexpressNo.expressNo = ""; + this.getList(); + this.innerlogistics = false; + }); + }, + // 取消按钮 + cencellogistics() { + this.innerlogistics = false; + this.queryexpressNo.expressNo = ""; + }, + // 确认退款 + refund(id) { + goodsOrderRefundinfo(id).then((res) => { + this.refundlist = res.data; + this.innerrefund = true; + // this.getList(); + }); + }, + //确认退款 确定按钮 + submitRefundOrder() { + var obj = {}; + obj.orderType = this.refundlist.orderType; + obj.orderNo = this.refundlist.goOrderNo; + obj.refundReason = this.refundlist.dictLabel; + obj.refundPrice = this.refundlist.godTotalPrice; + obj.remark = this.refundlist.refundReasonRemark; + obj.goodsStatus = this.refundlist.orderStatus; + weChatRefundOrderApply(obj).then((res) => { + if (res.code == 200) { + this.$modal.msgSuccess("退款有延迟,请耐心等待"); + } + this.getList(); + this.innerrefund = false; + }); + }, + // 取消按钮 + cancel() { + this.open = false; + this.reset(); + }, + //退款取消按钮 + refundcancel() { + this.innerrefund = false; + }, + // 表单重置 + reset() { + this.queryParams = { + pageNum: 1, + pageSize: 10, + buySource:'HEALTH_CONSULTATION', + nurseStationId: null, + patientId: null, + orderNo: null, + orderStatus: null, + totalPrice: null, + receiver: null, + receiveAddress: null, + phone: null, + orderTime: null, + orderChannel: null, + }; + this.form = { + id: null, + nurseStationId: null, + patientId: null, + orderNo: null, + totalPrice: null, + receiver: null, + receiveAddress: null, + phone: null, + orderTime: null, + orderChannel: null, + remark: null, + delFlag: null, + createBy: null, + createTime: null, + updateBy: null, + updateTime: null, + orderStatus: "", + }; + this.resetForm("queryParams"); + }, + /** 搜索按钮操作 */ + handleQuery() { + this.queryParams.pageNum = 1; + this.getList(); + }, + /** 重置按钮操作 */ + resetQuery() { + this.resetForm("queryForm"); + this.queryParams = { + pageNum: 1, + pageSize: 10, + buySource:'HEALTH_CONSULTATION', + nurseStationId: null, + patientId: null, + orderNo: null, + orderStatus: null, + totalPrice: null, + receiver: null, + receiveAddress: null, + phone: null, + orderTime: null, + orderChannel: null, + }; + this.handleQuery(); + }, + // 多选框选中数据 + handleSelectionChange(selection) { + this.ids = selection.map((item) => item.id); + this.single = selection.length !== 1; + this.multiple = !selection.length; + }, + /** 新增按钮操作 */ + handleAdd() { + this.reset(); + this.open = true; + this.title = "添加商品订单"; + }, + /** 修改按钮操作 */ + handleUpdate(row) { + this.reset(); + const id = row.id || this.ids; + getGoodsOrder(id).then((response) => { + this.form = response.data; + this.open = true; + this.title = "修改商品订单"; + }); + }, + /** 提交按钮 */ + submitForm() { + this.$refs["form"].validate((valid) => { + if (valid) { + if (this.form.id != null) { + updateGoodsOrder(this.form).then((response) => { + if (response.code == 200) { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + } + }); + } else { + addGoodsOrder(this.form).then((response) => { + if (response.code == 200) { + 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.$modal.msgSuccess("删除成功"); + }) + .catch(() => {}); + }, + /** 导出按钮操作 */ + handleExport() { + this.download( + "system/goodsOrder/export", { + ...this.queryParams, + }, + `goodsOrder_${new Date().getTime()}.xlsx` + ); + }, + }, +}; \ No newline at end of file