修改
This commit is contained in:
parent
b648465c51
commit
f1ef5133a7
@ -1,3 +1,3 @@
|
||||
var baseurl = "http://192.168.16.30:8080";
|
||||
var baseurl = "http://192.168.16.76:8080";
|
||||
|
||||
export default baseurl
|
||||
61
src/api/system/OperateGoodsInfo.js
Normal file
61
src/api/system/OperateGoodsInfo.js
Normal file
@ -0,0 +1,61 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询商品基本信息列表
|
||||
export function goodsInfoList(query) {
|
||||
return request({
|
||||
url: '/system/operateGoodInfo/goodsInfoList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询商品基本信息详细
|
||||
export function getGoodsInfo(id) {
|
||||
return request({
|
||||
url: `/system/operateGoodInfo/goodsDetails?` + `goodsInfoId=${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增商品基本信息
|
||||
export function addGoodsInfo(data) {
|
||||
return request({
|
||||
url: '/system/operateGoodInfo/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询商品分类列表
|
||||
export function goodsCategory(query) {
|
||||
return request({
|
||||
url: '/system/goodsCategory/list ',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 修改商品基本信息
|
||||
export function updateGoodsInfo(data) {
|
||||
return request({
|
||||
url: '/system/operateGoodInfo/edit',
|
||||
method: 'POST',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 修改上架下架状态
|
||||
// system/goodsInfo/editGoodsWhetherShelf
|
||||
export function editGoodsWhetherShelf(data) {
|
||||
return request({
|
||||
url: '/system/operateGoodInfo/editGoodsWhetherShelf',
|
||||
method: 'post',
|
||||
data: data
|
||||
|
||||
})
|
||||
}
|
||||
// 删除商品基本信息
|
||||
export function delGoodsInfo(goodsInfoId) {
|
||||
return request({
|
||||
url: '/system/operateGoodInfo/' + goodsInfoId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
995
src/views/system/OperateGoodsInfo/index.vue
Normal file
995
src/views/system/OperateGoodsInfo/index.vue
Normal file
@ -0,0 +1,995 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
<el-input
|
||||
v-model="queryParams.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="商品分类名称" prop="goodsCategoryName">
|
||||
<el-input
|
||||
v-model="queryParams.goodsCategoryName"
|
||||
placeholder="请输入商品分类名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="queryParams.nurseStationName"
|
||||
placeholder="请输入护理站名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品用途" prop="goodsPurpose">
|
||||
<el-select v-model="queryParams.goodsPurpose" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in goods"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否上架" prop="whetherShelf">
|
||||
<el-select v-model="queryParams.whetherShelf" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:operateGoodInfo:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:operateGoodInfo:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:goodsInfo:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:goodsInfo:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="goodsInfoList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
label="所属护理站"
|
||||
align="center"
|
||||
prop="nurseStationName"
|
||||
/>
|
||||
<el-table-column label="商品编码" align="center" prop="goodsCode" />
|
||||
<el-table-column
|
||||
label="商品名称"
|
||||
align="center"
|
||||
prop="goodsName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="商品分类名称"
|
||||
align="center"
|
||||
prop="goodsCategoryName"
|
||||
/>
|
||||
|
||||
<el-table-column label="商品用途" align="center" prop="goodsPurpose">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.goodsPurpose == "BUSINESS" ? "买卖" : "" }}
|
||||
{{ scope.row.goodsPurpose == "LEASE" ? "租赁" : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上架状态" align="center" prop="whetherShelf">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.whetherShelf"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
@change="upwhetherShelf(scope.row)"
|
||||
>
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="上架时间"
|
||||
align="center"
|
||||
prop="shelfTime"
|
||||
width="180"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.whetherShelf">{{ scope.row.shelfTime }}</div>
|
||||
<div v-else></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>chaxun
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:operateGoodInfo:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:operateGoodInfo:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-search"
|
||||
@click="reference(scope.row)"
|
||||
v-hasPermi="['system:goodsInfo:remove']"
|
||||
>查询商品信息</el-button
|
||||
> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 添加或修改商品基本信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="1200px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
<el-input
|
||||
v-model="form.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
max="40"
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称">
|
||||
<el-select
|
||||
style="width: 210px"
|
||||
v-model="form.nurseStationId"
|
||||
clearable
|
||||
placeholder="请选择护理站"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in nurseStationlist"
|
||||
:key="item.id"
|
||||
:label="item.nurseStationName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类名称" prop="goodsCategoryId">
|
||||
<el-select
|
||||
style="width: 210px"
|
||||
v-model="form.goodsCategoryId"
|
||||
clearable
|
||||
placeholder="请选择商品分类名称"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in goodsCategorylist"
|
||||
:key="item.id"
|
||||
:label="item.goodsCategoryName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-input
|
||||
v-model="form.goodsCategoryName"
|
||||
placeholder="请输入商品分类名称"
|
||||
style="width: 210px"
|
||||
/> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="商品用途" prop="goodsPurpose">
|
||||
<el-select
|
||||
v-model="form.goodsPurpose"
|
||||
placeholder="请选择"
|
||||
style="width: 210px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in goods"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品度量单位" prop="goodsUnit">
|
||||
<el-input
|
||||
v-model="form.goodsUnit"
|
||||
placeholder="请输入商品度量单位"
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品图片" prop="goodsPictureUrl">
|
||||
<stationAcatar
|
||||
@imgUrl="imgUrl"
|
||||
:img="form.goodsPictureUrl"
|
||||
:type="'goodsPictureUrl'"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-table
|
||||
ref="goodDetailsLists"
|
||||
:data="goodDetailsLists"
|
||||
label-width="50px"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
<el-table-column label="商品属性名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.attributeName"
|
||||
maxlength="40"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品单价" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.goodsPrice"
|
||||
type="number"
|
||||
oninput=" if(value.length>7){value=value.slice(0,7)}"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.goodsStock"
|
||||
type="number"
|
||||
oninput="if(value.length>9){value=value.slice(0,9)}"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="显示顺序" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.attributeDetailsSort"
|
||||
type="number"
|
||||
oninput=" if(value.length>9){value=value.slice(0,9)}"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品属性图片" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<stationAcatar
|
||||
@imgUrl="attributePitureUrl"
|
||||
@item="attributePitureitem"
|
||||
:img="scope.row.attributePitureUrl"
|
||||
:type="'attributePitureUrl'"
|
||||
:item="scope.row"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="addgoodAttributeDetail"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="delgoodAttributeDetail(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-form-item
|
||||
label="商品概述"
|
||||
prop="goodsRemark"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
<editor
|
||||
:min-height="100"
|
||||
style="width: 90%; margin: 0 auto"
|
||||
v-model="form.goodsRemark"
|
||||
></editor>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 查看商品详情 -->
|
||||
<!-- <el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open2"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
<el-input
|
||||
v-model="form.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
style="width: 210px"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-select
|
||||
style="width: 210px"
|
||||
clearable
|
||||
v-model="form.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in nurseStationlist"
|
||||
:key="item.nurseStationId"
|
||||
:label="item.nurseStationName"
|
||||
:value="item.nurseStationId"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类名称" prop="goodsCategoryName">
|
||||
<el-select
|
||||
style="width: 210px"
|
||||
v-model="form.goodsCategoryId"
|
||||
clearable
|
||||
placeholder="请选择商品分类名称"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in goodsCategorylist"
|
||||
:key="item.id"
|
||||
:label="item.goodsCategoryName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="商品用途" prop="goodsPurpose">
|
||||
<el-select
|
||||
v-model="form.goodsPurpose"
|
||||
placeholder="请选择"
|
||||
style="width: 210px"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in goods"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品度量单位" prop="goodsUnit">
|
||||
<el-input
|
||||
v-model="form.goodsUnit"
|
||||
placeholder="请输入商品度量单位"
|
||||
style="width: 210px"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品图片" prop="goodsPictureUrl">
|
||||
<img
|
||||
:src="form.goodsPictureUrl"
|
||||
alt=""
|
||||
style="width: 150px; height: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-table
|
||||
ref="goodDetailsLists"
|
||||
:data="goodDetailsLists"
|
||||
label-width="50px"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
<el-table-column
|
||||
label="商品属性名称"
|
||||
align="center"
|
||||
prop="attributeName"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品单价" align="center" prop="goodsPrice">
|
||||
</el-table-column>
|
||||
<el-table-column label="库存" align="center" prop="goodsStock">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="显示顺序"
|
||||
align="center"
|
||||
prop="attributeDetailsSort"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品属性图片" align="center">
|
||||
<template slot-scope="scope">
|
||||
<img
|
||||
:src="scope.row.attributePitureUrl"
|
||||
alt=""
|
||||
style="width: 100px; height: 100px"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-form-item
|
||||
label="商品概述"
|
||||
prop="goodsRemark"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
<textarea
|
||||
style="margin-left: 30px"
|
||||
v-model="form.goodsRemark"
|
||||
name=""
|
||||
id=""
|
||||
cols="130"
|
||||
rows="10"
|
||||
:disabled="true"
|
||||
></textarea>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="open2 = false">确定</el-button>
|
||||
</div>
|
||||
</el-dialog> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getGoodsInfo,
|
||||
delGoodsInfo,
|
||||
addGoodsInfo,
|
||||
updateGoodsInfo,
|
||||
goodsInfoList,
|
||||
goodsCategory,
|
||||
editGoodsWhetherShelf,
|
||||
} from "@/api/system/OperateGoodsInfo";
|
||||
import editor from "@/components/Editor";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import baseurl from "@/api/baseurl.js";
|
||||
export default {
|
||||
components: { stationAcatar, editor },
|
||||
name: "OperateGoodsInfo",
|
||||
data() {
|
||||
return {
|
||||
imageUrl: "", //商品图片
|
||||
value: "",
|
||||
datas: null,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 商品基本信息表格数据
|
||||
goodsInfoList: [],
|
||||
// 护理站列表
|
||||
nurseStationlist: [],
|
||||
// 查询商品分类列表
|
||||
goodsCategorylist: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// open2: false,
|
||||
goods: [
|
||||
{
|
||||
value: "BUSINESS",
|
||||
label: "买卖",
|
||||
},
|
||||
{
|
||||
value: "LEASE",
|
||||
label: "租赁",
|
||||
},
|
||||
],
|
||||
options: [
|
||||
{
|
||||
value: 0,
|
||||
label: "否",
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: "是",
|
||||
},
|
||||
],
|
||||
// goodAttributeDetailsLists:[],
|
||||
goodDetailsLists: [],
|
||||
ids: 9999999,
|
||||
// 查询参数
|
||||
shangjia: {
|
||||
id: null,
|
||||
whetherShelf: null,
|
||||
},
|
||||
queryParams: {
|
||||
id: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
storeInfoId: null,
|
||||
nurseStationId: null,
|
||||
goodsCategoryId: null,
|
||||
goodsName: null,
|
||||
goodsCode: null,
|
||||
whetherShelf: null,
|
||||
shelfTime: null,
|
||||
goodsPictureUrl: null,
|
||||
goodsRemark: null,
|
||||
goodsUnit: null,
|
||||
goodsPurpose: null,
|
||||
sort: null,
|
||||
},
|
||||
//权限查询
|
||||
getListByUserquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
goodsName: [
|
||||
{ required: true, message: "请输入商品名称", trigger: "blur" },
|
||||
],
|
||||
goodsCategoryId: [
|
||||
{ required: true, message: "请选择商品分类名称", trigger: "blur" },
|
||||
],
|
||||
nurseStationId: [
|
||||
{ required: true, message: "请选择护理站名称", trigger: "blur" },
|
||||
],
|
||||
goodsPurpose: [
|
||||
{ required: true, message: "请选择商品用途", trigger: "blur" },
|
||||
],
|
||||
goodsUnit: [
|
||||
{ required: true, message: "请输入商品度量单位", trigger: "blur" },
|
||||
],
|
||||
goodsPictureUrl: [
|
||||
{ required: true, message: "请输入选择图片", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.info();
|
||||
},
|
||||
methods: {
|
||||
upwhetherShelf(row) {
|
||||
console.log(row);
|
||||
if (row.whetherShelf == false) {
|
||||
var obj = {
|
||||
id: row.goodsInfoId,
|
||||
whetherShelf: 0,
|
||||
};
|
||||
} else if (row.whetherShelf == true) {
|
||||
var obj = {
|
||||
id: row.goodsInfoId,
|
||||
whetherShelf: 1,
|
||||
};
|
||||
}
|
||||
editGoodsWhetherShelf(obj).then((res) => {
|
||||
console.log(obj);
|
||||
if (obj.whetherShelf == 0) {
|
||||
this.$modal.msgSuccess("已修改上架状态为未上架");
|
||||
} else {
|
||||
this.$modal.msgSuccess("已修改上架状态为上架");
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
/** 查询商品基本信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
goodsInfoList(this.queryParams).then((response) => {
|
||||
response.rows.forEach((e) => {
|
||||
if (e.whetherShelf == 1) {
|
||||
e.whetherShelf = true;
|
||||
} else if (e.whetherShelf == 0) {
|
||||
e.whetherShelf = false;
|
||||
}
|
||||
});
|
||||
this.goodsInfoList = response.rows;
|
||||
console.log(this.goodsInfoList);
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// list() {
|
||||
// listStation().then((res) => {
|
||||
// console.log(res);
|
||||
// this.nurseStationlist = res.data;
|
||||
// });
|
||||
// },
|
||||
// 添加
|
||||
addgoodAttributeDetail() {
|
||||
console.log(this.goodDetailsLists);
|
||||
if (this.goodDetailsLists.length == 5) {
|
||||
this.$message.error("最多只能5条");
|
||||
} else {
|
||||
this.ids++;
|
||||
var obj = {
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
ids: this.ids,
|
||||
};
|
||||
this.goodDetailsLists.push(obj);
|
||||
}
|
||||
},
|
||||
// 删除
|
||||
delgoodAttributeDetail(item) {
|
||||
console.log(item);
|
||||
if (item.ids && !item.attributeDetailsId) {
|
||||
if (this.goodDetailsLists.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
this.goodDetailsLists = this.goodDetailsLists.filter(
|
||||
(e) => e.ids != item.ids
|
||||
);
|
||||
}
|
||||
} else if (!item.ids && item.attributeDetailsId) {
|
||||
if (this.goodDetailsLists.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
this.goodDetailsLists = this.goodDetailsLists.filter(
|
||||
(e) => e.attributeDetailsId != item.attributeDetailsId
|
||||
);
|
||||
}
|
||||
}
|
||||
console.log(this.goodDetailsLists);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
this.goodDetailsLists = [
|
||||
{
|
||||
attributeName: "",
|
||||
goodAttributeDetailsLists: [
|
||||
{
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
// this.goodDetailsLists = [{
|
||||
// attributeName: "",
|
||||
// attributePitureUrl: "",
|
||||
// goodsPrice: "",
|
||||
// goodsStock: "",
|
||||
// sort: "",
|
||||
// ids: 1,
|
||||
// }]
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
storeInfoId: null,
|
||||
nurseStationId: null,
|
||||
goodsCategoryId: null,
|
||||
goodsName: null,
|
||||
goodsCode: null,
|
||||
whetherShelf: null,
|
||||
shelfTime: null,
|
||||
goodsPictureUrl: null,
|
||||
goodsRemark: null,
|
||||
goodsUnit: null,
|
||||
goodsPurpose: null,
|
||||
sort: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
};
|
||||
this.goodDetailsLists = [
|
||||
{
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
ids: 9999999,
|
||||
},
|
||||
];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
console.log(selection);
|
||||
this.ids = selection.map((item) => item.goodsInfoId);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.title = "商品基本信息";
|
||||
this.goodDetailsLists = [
|
||||
{
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
ids: 9999999,
|
||||
},
|
||||
];
|
||||
this.open = true;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.goodsInfoId || this.ids;
|
||||
getGoodsInfo(id).then((response) => {
|
||||
this.form = response.data[0];
|
||||
if (response.data[0].goodAttributeDetailsLists) {
|
||||
this.goodDetailsLists = response.data[0].goodAttributeDetailsLists;
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "修改商品基本信息";
|
||||
});
|
||||
},
|
||||
// reference(row) {
|
||||
// getGoodsInfo(row.goodsInfoId).then((response) => {
|
||||
// response.data[0].goodsPictureUrl =
|
||||
// baseurl + response.data[0].goodsPictureUrl;
|
||||
// this.form = response.data[0];
|
||||
// response.data[0].goodAttributeDetailsLists.forEach((e) => {
|
||||
// e.attributePitureUrl = baseurl + e.attributePitureUrl;
|
||||
// });
|
||||
// this.goodDetailsLists = response.data[0].goodAttributeDetailsLists;
|
||||
// this.open2 = true;
|
||||
// });
|
||||
// },
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.goodDetailsLists);
|
||||
this.form.goodAttributeDetailsLists = [];
|
||||
this.form.goodDetailsLists = this.goodDetailsLists;
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.goodsInfoId != null) {
|
||||
this.form.id = this.form.goodsInfoId;
|
||||
updateGoodsInfo(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addGoodsInfo(this.form).then((response) => {
|
||||
console.log(this.form);
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
console.log("row :>> ", row);
|
||||
this.$confirm("是否确认删除订单信息的数据项?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
delGoodsInfo(row.goodsInfoId).then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// handleDelete(row) {
|
||||
// const ids = row.id || this.ids;
|
||||
// this.$modal
|
||||
// .confirm("是否确认删除?")
|
||||
// .then(function () {
|
||||
// return delGoodsInfo(ids);
|
||||
// })
|
||||
// .then(() => {
|
||||
// this.getList();
|
||||
// this.$modal.msgSuccess("删除成功");
|
||||
// })
|
||||
// .catch(() => {});
|
||||
// },
|
||||
// /** 导出按钮操作 */
|
||||
// handleExport() {
|
||||
// this.download(
|
||||
// "system/goodsInfo/export",
|
||||
// {
|
||||
// ...this.queryParams,
|
||||
// },
|
||||
// `goodsInfo_${new Date().getTime()}.xlsx`
|
||||
// );
|
||||
// },
|
||||
imgUrl(imgUrl) {
|
||||
console.log(imgUrl);
|
||||
this.form.goodsPictureUrl = imgUrl;
|
||||
},
|
||||
attributePitureUrl(imgUrl) {
|
||||
console.log(imgUrl);
|
||||
// this.form.attributePitureUrl = imgUrl;
|
||||
},
|
||||
attributePitureitem(item) {
|
||||
let items = JSON.parse(item);
|
||||
if (items.ids && !items.id) {
|
||||
this.goodDetailsLists.forEach((e) => {
|
||||
if (e.ids == items.ids) {
|
||||
e.attributePitureUrl = items.attributePitureUrl;
|
||||
}
|
||||
});
|
||||
} else if (!items.ids && items.attributeDetailsId) {
|
||||
this.goodDetailsLists.forEach((e) => {
|
||||
if (e.attributeDetailsId == items.attributeDetailsId) {
|
||||
e.attributePitureUrl = items.attributePitureUrl;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
//权限列表
|
||||
info() {
|
||||
goodsCategory().then((res) => {
|
||||
console.log(this.form);
|
||||
this.goodsCategorylist = res.rows;
|
||||
});
|
||||
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++;
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
res.rows.forEach((e) => {
|
||||
this.nurseStationlist.push(e);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
|
||||
@ -626,7 +626,6 @@ export default {
|
||||
},
|
||||
index: "",
|
||||
stationid: "",
|
||||
nursename: "",
|
||||
innerVisible: false,
|
||||
};
|
||||
},
|
||||
@ -639,11 +638,8 @@ export default {
|
||||
// add点击护理站名称
|
||||
nurseclick(row) {
|
||||
console.log(row);
|
||||
this.nursename = row.nurseStationName;
|
||||
this.stationid = row.id;
|
||||
this.form.nurseStationId = row.id;
|
||||
this.innerVisible = false;
|
||||
this.form.nursename = row.nurseStationName;
|
||||
this.form.nurseStationDepartmentList[this.index].nurseStationName =
|
||||
row.nurseStationName;
|
||||
this.form.nurseStationDepartmentList[this.index].nurseStationId = row.id;
|
||||
|
||||
@ -236,12 +236,11 @@
|
||||
v-model="form.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
max="40"
|
||||
style="width: 210px"
|
||||
style="width: 210px; margin-left: 10px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<!-- <el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-select
|
||||
style="width:210px"
|
||||
v-model="queryParams.id"
|
||||
clearable
|
||||
placeholder="请选择护理站"
|
||||
@ -255,7 +254,7 @@
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="护理站名称">
|
||||
<el-select
|
||||
style="width: 210px"
|
||||
@ -265,9 +264,9 @@
|
||||
>
|
||||
<el-option
|
||||
v-for="item in nurseStationlist"
|
||||
:key="item.nurseStationId"
|
||||
:key="item.id"
|
||||
:label="item.nurseStationName"
|
||||
:value="item.nurseStationId"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="客户" prop="patientName" style="margin-left:-4%">
|
||||
<el-form-item label="客户" prop="patientName" style="margin-left: -4%">
|
||||
<el-input
|
||||
v-model="queryParams.patientName"
|
||||
placeholder="请输入客户"
|
||||
@ -53,8 +53,6 @@
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="OrderDetailsList"
|
||||
@ -64,10 +62,15 @@
|
||||
<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 == "WAIT_DISPATCH" ? "待派单" : "" }}
|
||||
{{ scope.row.orderStatus == "NOT_FINISH" ? "未完成" : "" }}
|
||||
{{ scope.row.orderStatus == "COMPLETE" ? "服务完成" : "" }}
|
||||
<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="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="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>
|
||||
</el-table-column>
|
||||
<el-table-column label="下单时间" align="center" prop="createTime" />
|
||||
@ -119,8 +122,6 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
||||
<!-- 查看弹框 -->
|
||||
<el-dialog
|
||||
title="查看订单信息"
|
||||
@ -136,90 +137,87 @@
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
>
|
||||
|
||||
<div v-for="(item, index) in query" :key="index">
|
||||
<el-form-item label="订单编号" prop="orderNo">
|
||||
<el-input
|
||||
v-model="item.orderNo"
|
||||
:disabled="true"
|
||||
style="width: 190px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-input
|
||||
:value="switchOrderStatus(item.orderStatus)"
|
||||
disabled
|
||||
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="orderNo">
|
||||
<el-input
|
||||
v-model="item.orderNo"
|
||||
:disabled="true"
|
||||
style="width: 190px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-input
|
||||
:value="switchOrderStatus(item.orderStatus)"
|
||||
disabled
|
||||
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="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-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"
|
||||
@ -258,7 +256,7 @@
|
||||
width="500px"
|
||||
height="100px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
|
||||
<el-form-item label="护理员姓名" prop="nursePersonName">
|
||||
<el-button
|
||||
type=""
|
||||
@ -414,7 +412,7 @@ import {
|
||||
deldetailed,
|
||||
getPerson,
|
||||
dispatchsubmit,
|
||||
confirmCancel
|
||||
confirmCancel,
|
||||
} from "@/api/system/order";
|
||||
export default {
|
||||
name: "order",
|
||||
@ -463,8 +461,8 @@ export default {
|
||||
dispatchlist: [],
|
||||
nurseName: "请选择护理员",
|
||||
nursePersonid: "",
|
||||
querynursecencel:{
|
||||
appointmentOrderId:"",
|
||||
querynursecencel: {
|
||||
appointmentOrderId: "",
|
||||
},
|
||||
// total2: 0,
|
||||
// 弹出层标题
|
||||
@ -492,9 +490,7 @@ export default {
|
||||
nursePersonName: null,
|
||||
nursePersonType: null,
|
||||
departmentName: null,
|
||||
|
||||
},
|
||||
|
||||
query: [],
|
||||
|
||||
// 表单参数
|
||||
@ -523,30 +519,26 @@ export default {
|
||||
},
|
||||
// 查看
|
||||
seeLook(row) {
|
||||
this.innerVisible = true;
|
||||
const id = row.orderNo;
|
||||
// console.log(row);
|
||||
Detailed(id).then((res) => {
|
||||
res.data.forEach((e) => {
|
||||
if (e.serviceDate) {
|
||||
e.time =
|
||||
e.serviceDate +
|
||||
"-" +
|
||||
e.serviceStartTime +
|
||||
"-" +
|
||||
e.serviceEndTime
|
||||
e.serviceDate + "-" + e.serviceStartTime + "-" + e.serviceEndTime;
|
||||
}
|
||||
} );
|
||||
});
|
||||
this.OrderDetailsLists = res.data;
|
||||
this.query = res.data;
|
||||
this.innerVisible4 = true;
|
||||
console.log(this.query);
|
||||
});
|
||||
},
|
||||
|
||||
// 派单
|
||||
dispatch(row) {
|
||||
console.log(row)
|
||||
this.querynursePersonname.detailsId = row.detailsId
|
||||
console.log(row);
|
||||
this.querynursePersonname.detailsId = row.detailsId;
|
||||
console.log(this.querynursePersonname.detailsId);
|
||||
// console.log(row)
|
||||
this.nurseName = "请选择护理员";
|
||||
@ -564,23 +556,21 @@ export default {
|
||||
},
|
||||
// 姓名弹框确定按钮
|
||||
submitForm() {
|
||||
console.log(this.dispatchlist)
|
||||
var obj = {}
|
||||
obj.id = this.nursePersonid
|
||||
obj.nurseStationPersonId = this.querynursePersonname.detailsId
|
||||
console.log(this.dispatchlist);
|
||||
var obj = {};
|
||||
obj.id = this.nursePersonid;
|
||||
obj.nurseStationPersonId = this.querynursePersonname.detailsId;
|
||||
dispatchsubmit(obj).then((res) => {
|
||||
this.nurseName = "请选择护理员";
|
||||
this.innerdispatch = false;
|
||||
|
||||
})
|
||||
});
|
||||
},
|
||||
// 选择姓名按钮
|
||||
nursePersonclick(row) {
|
||||
this.nursePersonid = row.id
|
||||
this.nurseName = row.nursePersonName
|
||||
this.nursePersonid = row.id;
|
||||
this.nurseName = row.nursePersonName;
|
||||
this.nursePersonNameinfo = false;
|
||||
console.log(row)
|
||||
|
||||
console.log(row);
|
||||
},
|
||||
// 确认取消预约
|
||||
// cencel(appointmentOrderId) {
|
||||
@ -593,27 +583,22 @@ export default {
|
||||
// },
|
||||
|
||||
cencel(row) {
|
||||
console.log('row :>> ', this.querynursecencel.appointmentOrderId);
|
||||
this.querynursecencel.appointmentOrderId = row.appointmentOrderId
|
||||
console.log("row :>> ", this.querynursecencel.appointmentOrderId);
|
||||
this.querynursecencel.appointmentOrderId = row.appointmentOrderId;
|
||||
// obj.appointmentOrderId=row.appointmentOrderId
|
||||
this.$confirm(
|
||||
'是否确认取消订单',
|
||||
"提示",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
this.$confirm("是否确认取消订单", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
confirmCancel(this.querynursecencel).then((res) => {
|
||||
this.$message.success("取消成功");
|
||||
this.getList();
|
||||
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 查询护理类型信息列表 */
|
||||
getList() {
|
||||
@ -665,15 +650,11 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
// console.log('row :>> ', row);
|
||||
this.$confirm(
|
||||
'是否确认删除订单信息的数据项?',
|
||||
"提示",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
this.$confirm("是否确认删除订单信息的数据项?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
deldetailed(row.appointmentOrderId).then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user