商品信息 登录背景
This commit is contained in:
parent
5fdf9aa60b
commit
285e492f5d
@ -9,20 +9,37 @@ export function listGoodsOrder(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询商品订单详细
|
||||
// 查询商品订单
|
||||
export function getGoodsOrder(id) {
|
||||
return request({
|
||||
url: '/system/goodsOrder/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查看商品详细信息
|
||||
export function getGoodsOrderlist(id) {
|
||||
return request({
|
||||
url: `/system/goodsOrder/goodsOrderByOrder`+`?orderNo=${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 退款
|
||||
export function goodsOrderRefundinfo(id) {
|
||||
return request({
|
||||
url: `/system/goodsOrder/goodsOrderRefund`+`?goodsOrderId=${id}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 物流信息
|
||||
export function editExpressNo(data) {
|
||||
return request({
|
||||
url: '/system/goodsOrder/editExpressNo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增商品订单
|
||||
export function addGoodsOrder(data) {
|
||||
return request({
|
||||
|
||||
BIN
src/assets/images/bg.png
Normal file
BIN
src/assets/images/bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
@ -35,7 +35,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '幼儿园体质检测管理系统',
|
||||
title: '泉医到家护理站管理平台',
|
||||
logo: logoImg
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,6 +196,7 @@ export default {
|
||||
width: 33%;
|
||||
height: 38px;
|
||||
float: right;
|
||||
margin-right: 30px;
|
||||
img {
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
@ -216,4 +217,18 @@ export default {
|
||||
.login-code-img {
|
||||
height: 38px;
|
||||
}
|
||||
// .el-button{
|
||||
// background-image: linear-gradient(to right , #90C8DF, #4CA8CD);
|
||||
// border-radius: -33px;
|
||||
// border: none;
|
||||
// height: 50px;
|
||||
// color: #FFFFFF;
|
||||
// border-radius: 20px;
|
||||
|
||||
// }
|
||||
// .el-button--primary {
|
||||
// color: #FFFFFF;
|
||||
// // background-color: #1890ff;
|
||||
// // border-color: #1890ff;
|
||||
// }
|
||||
</style>
|
||||
|
||||
@ -151,7 +151,7 @@ export default {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background-image: url("../assets/images/login-background.jpg");
|
||||
background-image: url("../assets/images/bg.png");
|
||||
background-size: cover;
|
||||
}
|
||||
.title {
|
||||
|
||||
262
src/views/system/goodsCategoryAcatar/index.vue
Normal file
262
src/views/system/goodsCategoryAcatar/index.vue
Normal file
@ -0,0 +1,262 @@
|
||||
<template>
|
||||
<div>
|
||||
<div
|
||||
class="user-info-head"
|
||||
@click="editCropper()"
|
||||
style="width: 100px; height: 100px"
|
||||
>
|
||||
<img
|
||||
v-if="options.img"
|
||||
v-bind:src="options.img"
|
||||
title="点击上传头像"
|
||||
style="width: 100px; height: 100px; line-height: 100px"
|
||||
/>
|
||||
<i
|
||||
v-else
|
||||
class="el-icon-plus avatar-uploader-icon"
|
||||
style="
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
"
|
||||
></i>
|
||||
</div>
|
||||
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="openimg"
|
||||
width="800px"
|
||||
append-to-body
|
||||
@opened="modalOpened"
|
||||
@close="closeDialog"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :xs="24" :md="12" :style="{ height: '350px' }">
|
||||
<vue-cropper
|
||||
ref="cropper"
|
||||
:img="options.img"
|
||||
:info="true"
|
||||
:autoCrop="options.autoCrop"
|
||||
:autoCropWidth="options.autoCropWidth"
|
||||
:autoCropHeight="options.autoCropHeight"
|
||||
:fixedBox="options.fixedBox"
|
||||
@realTime="realTime"
|
||||
v-if="visible"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :xs="24" :md="12" :style="{ height: '350px' }">
|
||||
<div class="avatar-upload-preview">
|
||||
<img :src="previews.url" :style="previews.img" />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<br />
|
||||
<el-row>
|
||||
<el-col :lg="2" :md="2">
|
||||
<el-upload
|
||||
action="#"
|
||||
:http-request="requestUpload"
|
||||
:show-file-list="false"
|
||||
:before-upload="beforeUpload"
|
||||
>
|
||||
<el-button size="small">
|
||||
选择
|
||||
<i class="el-icon-upload el-icon--right"></i>
|
||||
</el-button>
|
||||
</el-upload>
|
||||
</el-col>
|
||||
<el-col :lg="{ span: 1, offset: 2 }" :md="2">
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
size="small"
|
||||
@click="changeScale(1)"
|
||||
></el-button>
|
||||
</el-col>
|
||||
<el-col :lg="{ span: 1, offset: 1 }" :md="2">
|
||||
<el-button
|
||||
icon="el-icon-minus"
|
||||
size="small"
|
||||
@click="changeScale(-1)"
|
||||
></el-button>
|
||||
</el-col>
|
||||
<el-col :lg="{ span: 1, offset: 1 }" :md="2">
|
||||
<el-button
|
||||
icon="el-icon-refresh-left"
|
||||
size="small"
|
||||
@click="rotateLeft()"
|
||||
></el-button>
|
||||
</el-col>
|
||||
<el-col :lg="{ span: 1, offset: 1 }" :md="2">
|
||||
<el-button
|
||||
icon="el-icon-refresh-right"
|
||||
size="small"
|
||||
@click="rotateRight()"
|
||||
></el-button>
|
||||
</el-col>
|
||||
<el-col :lg="{ span: 2, offset: 6 }" :md="2">
|
||||
<el-button type="primary" size="small" @click="uploadImg()"
|
||||
>提 交</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { VueCropper } from "vue-cropper";
|
||||
import baseurl from "@/api/baseurl.js";
|
||||
import { updateNurseStationHeads, posts } from "@/api/system/stationAvatar.js";
|
||||
|
||||
export default {
|
||||
components: { VueCropper },
|
||||
|
||||
props: {
|
||||
img: {
|
||||
inputName: String,
|
||||
required: true,
|
||||
},
|
||||
type: {
|
||||
inputName: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
imageUrl: "",
|
||||
types: "",
|
||||
// 是否显示弹出层
|
||||
openimg: false,
|
||||
// 是否显示cropper
|
||||
visible: false,
|
||||
// 弹出层标题
|
||||
title: "上传头像",
|
||||
options: {
|
||||
img: null, //裁剪图片的地址
|
||||
autoCrop: true, // 是否默认生成截图框
|
||||
autoCropWidth: 200, // 默认生成截图框宽度
|
||||
autoCropHeight: 200, // 默认生成截图框高度
|
||||
fixedBox: true, // 固定截图框大小 不允许改变
|
||||
},
|
||||
previews: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.types = this.type;
|
||||
if (this.img == null) {
|
||||
this.options.img = null;
|
||||
} else if (this.img == "") {
|
||||
this.options.img = null;
|
||||
} else {
|
||||
this.options.img = baseurl + this.img;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
img: {
|
||||
handler(newimg, oldimg) {
|
||||
if (this.img == null) {
|
||||
this.options.img = null;
|
||||
} else if (this.img == "") {
|
||||
this.options.img = null;
|
||||
} else {
|
||||
this.options.img = baseurl + this.img;
|
||||
}
|
||||
},
|
||||
},
|
||||
type: {
|
||||
handler(newimg, oldimg) {
|
||||
this.types = this.type;
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 编辑头像
|
||||
editCropper() {
|
||||
this.openimg = true;
|
||||
},
|
||||
// 打开弹出层结束时的回调
|
||||
modalOpened() {
|
||||
this.visible = true;
|
||||
},
|
||||
// 覆盖默认的上传行为
|
||||
requestUpload() {},
|
||||
// 向左旋转
|
||||
rotateLeft() {
|
||||
this.$refs.cropper.rotateLeft();
|
||||
},
|
||||
// 向右旋转
|
||||
rotateRight() {
|
||||
this.$refs.cropper.rotateRight();
|
||||
},
|
||||
// 图片缩放
|
||||
changeScale(num) {
|
||||
num = num || 1;
|
||||
this.$refs.cropper.changeScale(num);
|
||||
},
|
||||
// 上传预处理
|
||||
beforeUpload(file) {
|
||||
if (file.type.indexOf("image/") == -1) {
|
||||
this.$modal.msgError(
|
||||
"文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
||||
);
|
||||
} else {
|
||||
const reader = new FileReader();
|
||||
reader.readAsDataURL(file);
|
||||
reader.onload = () => {
|
||||
this.options.img = reader.result;
|
||||
};
|
||||
}
|
||||
},
|
||||
// 上传图片
|
||||
uploadImg() {
|
||||
// console.log(this.types);
|
||||
this.$refs.cropper.getCropBlob((data) => {
|
||||
let formData = new FormData();
|
||||
formData.append("file", data);
|
||||
formData.append("type", this.types);
|
||||
updateNurseStationHeads(formData).then((response) => {
|
||||
this.options.img = baseurl + response.imgUrl;
|
||||
this.$emit("imgUrl", response.imgUrl);
|
||||
this.openimg = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
// 实时预览
|
||||
realTime(data) {
|
||||
this.previews = data;
|
||||
},
|
||||
// 关闭窗口
|
||||
closeDialog() {
|
||||
this.imgs = "";
|
||||
this.visible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.user-info-head {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
height: 120px;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.user-info-head:hover:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
color: #eee;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
font-size: 24px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
cursor: pointer;
|
||||
line-height: 110px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
</style>
|
||||
@ -8,22 +8,6 @@
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<!-- <el-form-item label="护理站id" prop="nurseStationId">
|
||||
<el-input
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请输入护理站id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员id" prop="patientId">
|
||||
<el-input
|
||||
v-model="queryParams.patientId"
|
||||
placeholder="请输入会员id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="订单编号" prop="orderNo">
|
||||
<el-input
|
||||
v-model="queryParams.orderNo"
|
||||
@ -32,14 +16,6 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="订单总金额" prop="totalPrice">
|
||||
<el-input
|
||||
v-model="queryParams.totalPrice"
|
||||
placeholder="请输入订单总金额"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="收货人" prop="receiver">
|
||||
<el-input
|
||||
v-model="queryParams.receiver"
|
||||
@ -48,38 +24,20 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="收货地址" prop="receiveAddress">
|
||||
<el-input
|
||||
v-model="queryParams.receiveAddress"
|
||||
placeholder="请输入收货地址"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select
|
||||
v-model="queryParams.orderStatus"
|
||||
placeholder="请选择订单状态"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in orderStatuslist"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="联系电话" prop="phone">
|
||||
<el-input
|
||||
v-model="queryParams.phone"
|
||||
placeholder="请输入联系电话"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="下单时间" prop="orderTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.orderTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择下单时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="下班方式,手机App:MOBILE_APP,微信小程序:WECHAT_APPLET,支付宝小程序:ALI_PAY_APPLET" prop="orderChannel">
|
||||
<el-input
|
||||
v-model="queryParams.orderChannel"
|
||||
placeholder="请输入下班方式,手机App:MOBILE_APP,微信小程序:WECHAT_APPLET,支付宝小程序:ALI_PAY_APPLET"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -100,22 +58,18 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键id" align="center" prop="id" />
|
||||
<el-table-column label="护理站id" align="center" prop="nurseStationId" />
|
||||
<el-table-column label="会员id" align="center" prop="patientId" /> -->
|
||||
<el-table-column label="订单编号" align="center" prop="orderNo" />
|
||||
<el-table-column label="订单状态" align="center" prop="orderStatus">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.orderStatus == "WAIT_PAY" ? "待付款" : "" }}
|
||||
{{ scope.row.orderStatus == "PAY" ? "已付款" : "" }}
|
||||
{{ scope.row.orderStatus == "CANCEL" ? "已取消" : "" }}
|
||||
{{ scope.row.orderStatus == "WAIT_RECEIVED" ? "待收货" : "" }}
|
||||
{{ scope.row.orderStatus == "RECEIVED" ? "已收货" : "" }}
|
||||
{{ scope.row.orderStatus == "WAIT_REFUND" ? "待退款" : "" }}
|
||||
|
||||
{{ scope.row.orderStatus == "WAIT_RECEIVED_GOODS" ? "待收货" : "" }}
|
||||
{{ scope.row.orderStatus == "RECEIVED_GOODS" ? "已收货" : "" }}
|
||||
{{ scope.row.orderStatus == "WAIT_REFUND" ? "退款中" : "" }}
|
||||
{{ scope.row.orderStatus == "REFUNDED" ? "已退款" : "" }}
|
||||
{{ scope.row.orderStatus == "WAIT_RETURNED" ? "待退货" : "" }}
|
||||
{{ scope.row.orderStatus == "RETURNED" ? "已退货" : "" }}
|
||||
{{ scope.row.orderStatus == "WAIT_RETURNED_GOODS" ? "待退货" : "" }}
|
||||
{{ scope.row.orderStatus == "RETURNED_GOODS" ? "已退货" : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单总金额" align="center" prop="totalPrice" />
|
||||
@ -128,11 +82,8 @@
|
||||
prop="orderTime"
|
||||
width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
label="下单方式"
|
||||
align="center"
|
||||
prop="orderChannel"
|
||||
> <template slot-scope="scope">
|
||||
<el-table-column label="下单方式" align="center" prop="orderChannel">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.orderChannel == "MOBILE_APP" ? "手机APP" : "" }}
|
||||
{{ scope.row.orderChannel == "WECHAT_APPLET" ? "微信小程序" : "" }}
|
||||
{{ scope.row.orderChannel == "ALI_PAY_APPLET" ? "支付宝" : "" }}
|
||||
@ -145,14 +96,50 @@
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="seeOrder(scope.row)"
|
||||
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
|
||||
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
|
||||
v-else
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="seelogistics(scope.row)"
|
||||
v-hasPermi="['system:nurseType:edit']"
|
||||
>确认退款</el-button
|
||||
> -->
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -180,145 +167,320 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 查看弹框 -->
|
||||
<!-- 查看商品信息弹框 -->
|
||||
<el-dialog
|
||||
title="查看订单信息"
|
||||
:visible.sync="innerorder"
|
||||
append-to-body
|
||||
width="1048px"
|
||||
>
|
||||
<el-table
|
||||
:data="orderList"
|
||||
align="center"
|
||||
style="margin: 10px 0 20px 0; padding-bottom: 20px"
|
||||
>
|
||||
<el-table-column
|
||||
prop="orderNo"
|
||||
label="订单编号"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="receiveAddress"
|
||||
label="地址"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="receiver"
|
||||
label="收货人"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="phone"
|
||||
label="手机号"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="goodsName"
|
||||
label="商品名称"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="goodsAttributeName"
|
||||
label="商品属性"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="goodsPrice"
|
||||
label="商品价格"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
:data="orderList"
|
||||
align="center"
|
||||
style="margin: 10px 0 20px 0; padding-bottom: 20px"
|
||||
>
|
||||
<el-table-column
|
||||
prop="orderNo"
|
||||
label="订单编号"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="receiveAddress"
|
||||
label="地址"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="receiver"
|
||||
label="收货人"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column prop="phone" label="手机号" width="120" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="goodsName"
|
||||
label="商品名称"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="goodsAttributeName"
|
||||
label="商品属性"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="goodsPrice"
|
||||
label="商品价格"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<!-- 添加或修改商品订单对话框 -->
|
||||
<!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="护理站id" prop="nurseStationId">
|
||||
|
||||
<!-- 查看物流信息弹框 -->
|
||||
<el-dialog
|
||||
title="查看物流信息"
|
||||
:visible.sync="innerlogistics"
|
||||
append-to-body
|
||||
width="500px"
|
||||
style="margin-top: 10%"
|
||||
>
|
||||
<el-form
|
||||
:model="queryexpressNo"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="物流单号" prop="orderNo">
|
||||
<el-input
|
||||
v-model="form.nurseStationId"
|
||||
placeholder="请输入护理站id"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员id" prop="patientId">
|
||||
<el-input v-model="form.patientId" placeholder="请输入会员id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单编号" prop="orderNo">
|
||||
<el-input v-model="form.orderNo" placeholder="请输入订单编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单总金额" prop="totalPrice">
|
||||
<el-input v-model="form.totalPrice" placeholder="请输入订单总金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收货人" prop="receiver">
|
||||
<el-input v-model="form.receiver" placeholder="请输入收货人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收货地址" prop="receiveAddress">
|
||||
<el-input
|
||||
v-model="form.receiveAddress"
|
||||
placeholder="请输入收货地址"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入联系电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="下单时间" prop="orderTime">
|
||||
<el-date-picker
|
||||
v-model="queryexpressNo.expressNo"
|
||||
placeholder="请输入物流单号"
|
||||
clearable
|
||||
v-model="form.orderTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择下单时间"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="searchlogistics()"
|
||||
>确认</el-button
|
||||
>
|
||||
</el-date-picker>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="cencellogistics"
|
||||
>取消</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<!-- 退款弹框 -->
|
||||
<el-dialog
|
||||
title="退款信息"
|
||||
:visible.sync="innerrefund"
|
||||
append-to-body
|
||||
width="700px"
|
||||
style="margin-top: 10%"
|
||||
>
|
||||
<el-form
|
||||
:model="refundlist"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="110px"
|
||||
>
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
<el-input
|
||||
v-model="refundlist.goodsName"
|
||||
placeholder=""
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退款类型" prop="refundType">
|
||||
<el-input
|
||||
:value="refundTypeStatus(refundlist.refundType)"
|
||||
disabled
|
||||
style="width: 205px"
|
||||
/>
|
||||
<!-- <el-input
|
||||
v-model="refundlist.refundType"
|
||||
placeholder=""
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="退款原因" prop="dictLabel">
|
||||
<el-input
|
||||
v-model="refundlist.dictLabel"
|
||||
placeholder=""
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="退款金额" prop="godTotalPrice">
|
||||
<el-input
|
||||
v-model="refundlist.godTotalPrice"
|
||||
placeholder=""
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="下班方式,手机App:MOBILE_APP,微信小程序:WECHAT_APPLET,支付宝小程序:ALI_PAY_APPLET"
|
||||
prop="orderChannel"
|
||||
label="补充描述和凭证"
|
||||
prop="refundReasonRemark"
|
||||
label-width="110px"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.orderChannel"
|
||||
placeholder="请输入下班方式,手机App:MOBILE_APP,微信小程序:WECHAT_APPLET,支付宝小程序:ALI_PAY_APPLET"
|
||||
v-model="refundlist.refundReasonRemark"
|
||||
placeholder=""
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
disabled
|
||||
/>
|
||||
<!-- <textarea cols="50" rows="10" v-model="refundlist.refundReasonRemark">
|
||||
</textarea> -->
|
||||
<!-- <editor
|
||||
:min-height="70"
|
||||
style="width: 90%; margin: 0 auto"
|
||||
v-model="refundlist.refundReasonRemark"
|
||||
|
||||
></editor> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="备注信息" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注信息" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否删除,0:否,1:是" prop="delFlag">
|
||||
<el-input
|
||||
v-model="form.delFlag"
|
||||
placeholder="请输入是否删除,0:否,1:是"
|
||||
/>
|
||||
<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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="refundcancel">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 查看物流详细信息弹框 -->
|
||||
<!-- <el-dialog
|
||||
title="查看订单信息"
|
||||
:visible.sync="innerlogisticsinfo"
|
||||
append-to-body
|
||||
width="1048px"
|
||||
>
|
||||
<el-table
|
||||
:data="orderList"
|
||||
align="center"
|
||||
style="margin: 10px 0 20px 0; padding-bottom: 20px"
|
||||
>
|
||||
<el-table-column
|
||||
prop="orderNo"
|
||||
label="订单编号"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="receiver"
|
||||
label="收货人"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column prop="phone" label="手机号" width="120" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="goodsName"
|
||||
label="商品名称"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="goodsAttributeName"
|
||||
label="商品属性"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="goodsPrice"
|
||||
label="商品价格"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listGoodsOrder, getGoodsOrder, delGoodsOrder, addGoodsOrder, updateGoodsOrder,getGoodsOrderlist} from "@/api/system/goodsOrder";
|
||||
import { listGoodsOrder, getGoodsOrder, delGoodsOrder, addGoodsOrder, updateGoodsOrder, getGoodsOrderlist, goodsOrderRefundinfo, editExpressNo, goodsOrderrefund } from "@/api/system/goodsOrder";
|
||||
|
||||
export default {
|
||||
name: "GoodsOrder",
|
||||
data() {
|
||||
return {
|
||||
innerorder:false,
|
||||
orderList:[],
|
||||
// 查看商品信息
|
||||
innerorder: false,
|
||||
// 查看物流信息
|
||||
innerlogistics: false,
|
||||
// 确认退款
|
||||
innerrefund: false,
|
||||
orderList: [],
|
||||
refundlist: [],
|
||||
orderStatuslist: [
|
||||
{
|
||||
value: "WAIT_PAY",
|
||||
label: "待付款",
|
||||
},
|
||||
{
|
||||
value: "PAY",
|
||||
label: "已付款",
|
||||
},
|
||||
{
|
||||
value: "CANCEL",
|
||||
label: "已取消",
|
||||
},
|
||||
{
|
||||
value: "WAIT_RECEIVED_GOODS",
|
||||
label: "待收货",
|
||||
},
|
||||
|
||||
{
|
||||
value: "RECEIVED_GOODS",
|
||||
label: "已收货",
|
||||
},
|
||||
{
|
||||
value: "WAIT_REFUND",
|
||||
label: "退款中",
|
||||
},
|
||||
{
|
||||
value: "REFUNDED",
|
||||
label: "已退款",
|
||||
},
|
||||
{
|
||||
value: "WAIT_RETURNED_GOODS",
|
||||
label: "待退货",
|
||||
},
|
||||
{
|
||||
value: "RETURNED_GOODS",
|
||||
label: "已退货",
|
||||
},
|
||||
|
||||
],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@ -352,6 +514,13 @@ export default {
|
||||
orderTime: null,
|
||||
orderChannel: null,
|
||||
},
|
||||
queryexpressNo: {
|
||||
id: "",
|
||||
expressNo: null,
|
||||
},
|
||||
refundinfo: {
|
||||
id: "",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
@ -363,6 +532,18 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 退款类型
|
||||
// refundTypeStatus(refundlist.refundType)
|
||||
refundTypeStatus(refundType) {
|
||||
switch (refundType) {
|
||||
case "REFUND_MONEY_GOODS":
|
||||
return "退款退货";
|
||||
case "ONLY_REFUND_MONEY":
|
||||
return "仅退款";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
/** 查询商品订单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
@ -372,20 +553,81 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
seeOrder(row){
|
||||
// 查看商品信息
|
||||
seeOrder(row) {
|
||||
console.log(row);
|
||||
this.innerorder=true
|
||||
this.innerorder = true
|
||||
const id = row.orderNo;
|
||||
getGoodsOrderlist(id).then(res =>{
|
||||
this.orderList=[res.data]
|
||||
getGoodsOrderlist(id).then(res => {
|
||||
this.orderList = [res.data]
|
||||
})
|
||||
|
||||
},
|
||||
// 查看录入物流单号弹框
|
||||
seelogistics(id) {
|
||||
// console.log(id);
|
||||
this.queryexpressNo.id = id
|
||||
console.log(this.queryexpressNo)
|
||||
this.innerlogistics = true
|
||||
|
||||
},
|
||||
// 确定按钮
|
||||
searchlogistics() {
|
||||
console.log(this.queryexpressNo)
|
||||
editExpressNo(this.queryexpressNo).then(res => {
|
||||
this.queryexpressNo.expressNo = ""
|
||||
this.innerlogistics = false
|
||||
console.log(res)
|
||||
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cencellogistics() {
|
||||
this.innerlogistics = false
|
||||
this.queryexpressNo.expressNo = ""
|
||||
},
|
||||
// 确认退款
|
||||
refund(id) {
|
||||
console.log(id);
|
||||
this.innerrefund = true
|
||||
goodsOrderRefundinfo(id).then(res => {
|
||||
this.refundlist = res.data;
|
||||
console.log(this.refundlist)
|
||||
})
|
||||
},
|
||||
// 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(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消退款'
|
||||
// });
|
||||
// });
|
||||
|
||||
// },
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
//退款取消按钮
|
||||
refundcancel() {
|
||||
this.innerrefund = false
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
|
||||
@ -113,10 +113,10 @@
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -130,7 +130,7 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:station:add']"
|
||||
>新增</el-button
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -201,11 +201,12 @@
|
||||
label="护理站名称"
|
||||
align="center"
|
||||
prop="nurseStationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="护理站类型" align="center" prop="nurseTypeName">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="looktype(scope.row)"
|
||||
>查看</el-button
|
||||
>查看</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -214,7 +215,7 @@
|
||||
<span>{{ scope.row.sysAreaVOList[0].cityName }}-</span>
|
||||
<span>{{ scope.row.sysAreaVOList[0].streetName }}</span> -->
|
||||
</el-table-column>
|
||||
<el-table-column label="护理站地址" align="center" prop="address" />
|
||||
<el-table-column label="护理站地址" align="center" prop="address" :show-overflow-tooltip="true"/>
|
||||
<!-- <el-table-column
|
||||
label="护理站简介"
|
||||
align="center"
|
||||
@ -477,7 +478,7 @@
|
||||
placeholder="排序不可输入小数点"
|
||||
type="number"
|
||||
min="0"
|
||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+0)} if(value.length>10){value=value.slice(0,10)}"
|
||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+0)} if(value.length>8){value=value.slice(0,8)}"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站总概述" prop="nurseStationDescription">
|
||||
@ -541,13 +542,13 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="addnurseStationLabelList"
|
||||
>新增</el-button
|
||||
>新增</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="delnurseStationLabelList(scope.row)"
|
||||
>删除</el-button
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -588,7 +589,7 @@
|
||||
:underline="false"
|
||||
style="font-size: 12px; vertical-align: baseline"
|
||||
@click="importTemplate"
|
||||
>下载模板</el-link
|
||||
>下载模板</el-link
|
||||
>
|
||||
</div>
|
||||
</el-upload>
|
||||
@ -936,6 +937,61 @@
|
||||
nurseStationName: null,
|
||||
nurseStationType: null,
|
||||
|
||||
agencyIntroduce: null,
|
||||
nurseStationDescription: null,
|
||||
longitude: null,
|
||||
latitude: null,
|
||||
phone: null,
|
||||
address: null,
|
||||
dutyPerson: null,
|
||||
dutyPhone: null,
|
||||
stationPictureUrl: null,
|
||||
stationIntroducePcitureUrl: null,
|
||||
sort: null,
|
||||
nurseStationLabelList: [],
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
liststationinfo() {
|
||||
listStation(this.queryParams).then((response) => {
|
||||
response.rows.forEach((e) => {
|
||||
if (e.sysAreaVOList == []) {
|
||||
} else if (e.sysAreaVOList == null) {
|
||||
} else if (!e.sysAreaVOList) {
|
||||
} else if (e.sysAreaVOList.length == 0) {
|
||||
} else if (e.sysAreaVOList.length > 0) {
|
||||
e.area =
|
||||
e.sysAreaVOList[0].provinceName +
|
||||
"-" +
|
||||
e.sysAreaVOList[0].cityName +
|
||||
"-" +
|
||||
e.sysAreaVOList[0].regionName +
|
||||
"-" +
|
||||
e.sysAreaVOList[0].streetName;
|
||||
}
|
||||
});
|
||||
this.stationList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
this.loading = true;
|
||||
this.queryParams.pageNum = 1;
|
||||
this.liststationinfo();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
areaCode: null,
|
||||
userId: null,
|
||||
nurseStationCode: null,
|
||||
nurseStationName: null,
|
||||
nurseStationType: null,
|
||||
agencyIntroduce: null,
|
||||
nurseStationDescription: null,
|
||||
longitude: null,
|
||||
@ -945,288 +1001,233 @@
|
||||
dutyPerson: null,
|
||||
dutyPhone: null,
|
||||
stationPictureUrl: null,
|
||||
stationIntroducePcitureUrl: null,
|
||||
sort: null,
|
||||
nurseStationLabelList: [],
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
liststationinfo() {
|
||||
listStation(this.queryParams).then((response) => {
|
||||
response.rows.forEach((e) => {
|
||||
if (e.sysAreaVOList == []) {
|
||||
} else if (e.sysAreaVOList == null) {
|
||||
} else if (!e.sysAreaVOList) {
|
||||
} else if (e.sysAreaVOList.length == 0) {
|
||||
} else if (e.sysAreaVOList.length > 0) {
|
||||
e.area =
|
||||
e.sysAreaVOList[0].provinceName +
|
||||
"-" +
|
||||
e.sysAreaVOList[0].cityName +
|
||||
"-" +
|
||||
e.sysAreaVOList[0].regionName +
|
||||
"-" +
|
||||
e.sysAreaVOList[0].streetName;
|
||||
}
|
||||
});
|
||||
this.stationList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
this.loading = true;
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
} else {
|
||||
console.log(1);
|
||||
// this.queryParams.nurseStationCode = null;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.pageNum = 1;
|
||||
this.liststationinfo();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
areaCode: null,
|
||||
userId: null,
|
||||
nurseStationCode: null,
|
||||
nurseStationName: null,
|
||||
nurseStationType: null,
|
||||
agencyIntroduce: null,
|
||||
nurseStationDescription: null,
|
||||
longitude: null,
|
||||
latitude: null,
|
||||
phone: null,
|
||||
address: null,
|
||||
dutyPerson: null,
|
||||
dutyPhone: null,
|
||||
stationPictureUrl: null,
|
||||
sort: null,
|
||||
};
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
} else {
|
||||
console.log(1);
|
||||
// this.queryParams.nurseStationCode = null;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.nurseStationType = 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.value3 = "";
|
||||
this.value2 = "";
|
||||
this.value1 = "";
|
||||
this.value = "";
|
||||
this.open = true;
|
||||
this.looknurseStationLabel = [
|
||||
{
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
},
|
||||
];
|
||||
this.title = "添加护理站信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.loading = true;
|
||||
const id = row.id || this.ids;
|
||||
getStation(id)
|
||||
.then((response) => {
|
||||
this.resid = response.data.nurseStationList.id;
|
||||
this.form = response.data.nurseStationList;
|
||||
if (
|
||||
!this.form.nurseStationType ||
|
||||
this.form.nurseStationType == null ||
|
||||
this.form.nurseStationType.length == 0
|
||||
) {
|
||||
} else {
|
||||
this.nurseStationType2 = this.form.nurseStationType.split(",");
|
||||
this.form.nurseStationType = this.nurseStationType2;
|
||||
this.queryParams.nurseStationType = 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.value3 = "";
|
||||
this.value2 = "";
|
||||
this.value1 = "";
|
||||
this.value = "";
|
||||
this.open = true;
|
||||
this.looknurseStationLabel = [
|
||||
{
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
},
|
||||
];
|
||||
this.title = "添加护理站信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.loading = true;
|
||||
const id = row.id || this.ids;
|
||||
getStation(id)
|
||||
.then((response) => {
|
||||
this.resid = response.data.nurseStationList.id;
|
||||
this.form = response.data.nurseStationList;
|
||||
if (
|
||||
!this.form.nurseStationType ||
|
||||
this.form.nurseStationType == null ||
|
||||
this.form.nurseStationType.length == 0
|
||||
) {
|
||||
} else {
|
||||
this.nurseStationType2 = this.form.nurseStationType.split(",");
|
||||
this.form.nurseStationType = this.nurseStationType2;
|
||||
}
|
||||
// this.form.nurseStationLabelList = [];
|
||||
this.title = "修改护理站信息";
|
||||
getSubordinateRegions(response.data.sysAreaVOList.streetCode).then(
|
||||
(res) => {
|
||||
if (res.data) {
|
||||
this.value = String(res.data.provinceCode);
|
||||
this.value1 = res.data.cityName;
|
||||
this.value2 = res.data.regionName;
|
||||
this.value3 = res.data.streetName;
|
||||
console.log(typeof this.value);
|
||||
}
|
||||
}
|
||||
// this.form.nurseStationLabelList = [];
|
||||
this.title = "修改护理站信息";
|
||||
getSubordinateRegions(response.data.sysAreaVOList.streetCode).then(
|
||||
(res) => {
|
||||
if (res.data) {
|
||||
this.value = String(res.data.provinceCode);
|
||||
this.value1 = res.data.cityName;
|
||||
this.value2 = res.data.regionName;
|
||||
this.value3 = res.data.streetName;
|
||||
console.log(typeof this.value);
|
||||
}
|
||||
}
|
||||
);
|
||||
})
|
||||
.then(() => {
|
||||
this.looknurseStationLabel = [];
|
||||
getLabelList(this.resid).then((res) => {
|
||||
this.looknurseStationLabel = res;
|
||||
if (this.looknurseStationLabel.length == 0) {
|
||||
var obj = {
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
};
|
||||
this.looknurseStationLabel.push(obj);
|
||||
} else if (this.looknurseStationLabel == []) {
|
||||
var obj = {
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
};
|
||||
this.looknurseStationLabel.push(obj);
|
||||
} else if (this.looknurseStationLabel == null) {
|
||||
var obj = {
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
};
|
||||
this.looknurseStationLabel.push(obj);
|
||||
}
|
||||
// console.log(this.form);
|
||||
// console.log(this.form.nurseStationLabelList);
|
||||
// this.form.nurseStationLabelList = obj;
|
||||
);
|
||||
})
|
||||
.then(() => {
|
||||
this.looknurseStationLabel = [];
|
||||
getLabelList(this.resid).then((res) => {
|
||||
this.looknurseStationLabel = res;
|
||||
if (this.looknurseStationLabel.length == 0) {
|
||||
var obj = {
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
};
|
||||
this.looknurseStationLabel.push(obj);
|
||||
} else if (this.looknurseStationLabel == []) {
|
||||
var obj = {
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
};
|
||||
this.looknurseStationLabel.push(obj);
|
||||
} else if (this.looknurseStationLabel == null) {
|
||||
var obj = {
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
};
|
||||
this.looknurseStationLabel.push(obj);
|
||||
}
|
||||
// console.log(this.form);
|
||||
// console.log(this.form.nurseStationLabelList);
|
||||
// this.form.nurseStationLabelList = obj;
|
||||
|
||||
// res.rows.forEach((e) => {
|
||||
// this.form.nurseStationLabelList.push(e);
|
||||
// });
|
||||
});
|
||||
this.open = true;
|
||||
this.loading = false;
|
||||
console.log(this.form);
|
||||
// res.rows.forEach((e) => {
|
||||
// this.form.nurseStationLabelList.push(e);
|
||||
// });
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.nurseStationLabelList = this.looknurseStationLabel;
|
||||
this.form.nurseStationType = this.nurseStationType2;
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.areaCode = Number(this.form.areaCode);
|
||||
this.form.nurseStationType = this.nurseStationType2.join(",");
|
||||
if (this.form.id != null) {
|
||||
updateStation(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = true;
|
||||
this.loading = false;
|
||||
console.log(this.form);
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.nurseStationLabelList = this.looknurseStationLabel;
|
||||
this.form.nurseStationType = this.nurseStationType2;
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.areaCode = Number(this.form.areaCode);
|
||||
this.form.nurseStationType = this.nurseStationType2.join(",");
|
||||
if (this.form.id != null) {
|
||||
updateStation(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addStation(this.form).then((response) => {
|
||||
if (response.code) {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addStation(this.form).then((response) => {
|
||||
if (response.code) {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.form.nurseStationType = obj;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm("是否确认删除此护理站信息?")
|
||||
.then(function () {
|
||||
return delStation(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/station/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`station_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handledata() {
|
||||
this.upload.title = "用户导入";
|
||||
this.upload.open = true;
|
||||
},
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
this.download(
|
||||
"/system/station/downloadTemplate?fileType=nurseStation",
|
||||
{},
|
||||
`护理站信息导入模板.xlsx`
|
||||
);
|
||||
},
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.open = false;
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
"</div>",
|
||||
"导入结果",
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
);
|
||||
this.getList();
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
//权限列表
|
||||
info() {
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
} else {
|
||||
this.total2 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.id = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
}
|
||||
});
|
||||
},
|
||||
//滑动下拉框
|
||||
loadMore() {
|
||||
var a = Math.ceil(this.total2 / 10);
|
||||
if (this.nurseStationlist.length + 1 >= this.total2) {
|
||||
} else {
|
||||
if (this.getListByUserquery.pageNum >= a) {
|
||||
} else {
|
||||
this.getListByUserquery.pageNum++;
|
||||
console.log(this.getListByUserquery.pageNum);
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
console.log(res);
|
||||
res.rows.forEach((e) => {
|
||||
this.nurseStationlist.push(e);
|
||||
});
|
||||
} else {
|
||||
this.form.nurseStationType = obj;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm("是否确认删除此护理站信息?")
|
||||
.then(function () {
|
||||
return delStation(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/station/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`station_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handledata() {
|
||||
this.upload.title = "用户导入";
|
||||
this.upload.open = true;
|
||||
},
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
this.download(
|
||||
"/system/station/downloadTemplate?fileType=nurseStation",
|
||||
{},
|
||||
`护理站信息导入模板.xlsx`
|
||||
);
|
||||
},
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.open = false;
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
"</div>",
|
||||
"导入结果",
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
);
|
||||
this.getList();
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
//权限列表
|
||||
info() {
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
} else {
|
||||
this.total2 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.id = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
}
|
||||
});
|
||||
},
|
||||
//滑动下拉框
|
||||
loadMore() {
|
||||
var a = Math.ceil(this.total2 / 10);
|
||||
if (this.nurseStationlist.length + 1 >= this.total2) {
|
||||
} else {
|
||||
if (this.getListByUserquery.pageNum >= a) {
|
||||
} else {
|
||||
this.getListByUserquery.pageNum++;
|
||||
console.log(this.getListByUserquery.pageNum);
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
console.log(res);
|
||||
res.rows.forEach((e) => {
|
||||
this.nurseStationlist.push(e);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user