护理站商品更改护理站弹框,更改护理站耗材,订单页面加滚动条

This commit is contained in:
闫晓茹 2022-11-09 17:40:03 +08:00
parent 41fa600413
commit a75e091bd5
3 changed files with 215 additions and 325 deletions

View File

@ -34,7 +34,7 @@
/>
</el-form-item>
<el-form-item label="商品用途" prop="goodsPurpose">
<el-select v-model="queryParams.goodsPurpose" placeholder="请选择">
<el-select v-model="queryParams.goodsPurpose" placeholder="请选择商品用途">
<el-option
v-for="item in goods"
:key="item.value"
@ -78,7 +78,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:goodsInfo:add']"
v-hasPermi="['system:operateGoodInfo:add']"
>新增</el-button
>
</el-col>
@ -90,33 +90,11 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:goodsInfo:edit']"
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"
@ -188,7 +166,7 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:goodsInfo:edit']"
v-hasPermi="['system:operateGoodInfo:edit']"
>修改</el-button
>
<el-button
@ -196,17 +174,10 @@
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:goodsInfo:remove']"
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>
@ -236,40 +207,37 @@
v-model="form.goodsName"
placeholder="请输入商品名称"
max="40"
style="width: 210px; margin-left: 10px"
style="width: 210px"
/>
</el-form-item>
<!-- <el-form-item label="护理站名称" prop="nurseStationName">
<el-select
v-model="queryParams.id"
clearable
placeholder="请选择护理站"
v-loadmore="loadMore"
<el-form-item label="护理站名称" prop="nurseStationId">
<el-button
type=""
@click="clickinnerVisible"
v-if="StationName == '请选择所属护理站'"
style="
width: 200px;
text-align: left;
height: 36px;
color: #c0c4cc;
overflow: hidden;
"
>{{ StationName }}</el-button
>
<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="护理站名称">
<el-select
style="width: 210px"
v-model="form.nurseStationId"
clearable
placeholder="请选择护理站"
<el-button
type=""
@click="clickinnerVisible"
v-else
style="
width: 200px;
text-align: left;
height: 36px;
padding-left: -10px;
overflow: hidden;
"
>{{ StationName }}</el-button
>
<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
@ -286,17 +254,13 @@
>
</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; margin-left: 10px"
placeholder="请选择商品用途"
style="width: 210px"
>
<el-option
v-for="item in goods"
@ -406,172 +370,126 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 查看商品详情 -->
<!-- <el-dialog
<!-- 新增护理站名称弹框 -->
<el-dialog
:title="title"
:visible.sync="open2"
:visible.sync="innerVisible"
width="1000px"
append-to-body
:before-close="addcancel"
>
<el-form
ref="form"
:model="form"
ref="queryForm"
:model="nurseStationqueryParams"
:rules="rules"
label-width="120px"
label-width="80px"
: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"
label="护理站编码"
prop="nurseStationCode"
label-width="120"
>
<textarea
style="margin-left: 30px"
v-model="form.goodsRemark"
name=""
id=""
cols="130"
rows="10"
:disabled="true"
></textarea>
<el-input
v-model="nurseStationqueryParams.nurseStationCode"
placeholder="请输入护理站编码"
clearable
/>
</el-form-item>
<el-form-item
label="护理站名称"
prop="nurseStationName"
label-width="120"
>
<el-input
v-model="nurseStationqueryParams.nurseStationName"
placeholder="请输入护理站名称"
clearable
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery2"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery2"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table :data="nurseStationlist" @cell-dblclick="nurseclick">
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
v-if="nurseStationId == scope.row.id"
circle
@click="nurseclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="nurseclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="nurseStationCode"
label="护理站编码"
align="center"
>
</el-table-column>
<el-table-column
property="nurseStationName"
label="护理站名称"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column>
<div slot="footer" class="dialog-footer">
<el-button @click="open2 = false">确定</el-button>
</div>
</el-dialog> -->
<el-table-column property="phone" label="联系电话" align="center">
</el-table-column>
<el-table-column
property="address"
label="护理站地址"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column>
</el-table>
<pagination
v-show="nursetotal > 0"
:total="nursetotal"
:page.sync="nurseStationqueryParams.pageNum"
:limit.sync="nurseStationqueryParams.pageSize"
@pagination="handleQuery2"
/>
</el-dialog>
</div>
</template>
<script>
import {
listGoodsInfo,
getGoodsInfo,
delGoodsInfo,
addGoodsInfo,
updateGoodsInfo,
goodsInfoList,
listStation,
goodsCategory,
editGoodsWhetherShelf,
} from "@/api/system/goodsInfo";
} 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: "GoodsInfo",
name: "OperateGoodsInfo",
data() {
return {
imageUrl: "", //
@ -600,6 +518,10 @@ export default {
//
open: false,
// open2: false,
innerVisible: false,
StationName: "请选择所属护理站",
nursetotal: 0,
nurseStationId: null,
goods: [
{
value: "BUSINESS",
@ -628,6 +550,10 @@ export default {
id: null,
whetherShelf: null,
},
nurseStationqueryParams: {
pageNum: 1,
pageSize: 10,
},
queryParams: {
id: null,
pageNum: 1,
@ -636,7 +562,7 @@ export default {
nurseStationId: null,
goodsCategoryId: null,
goodsName: null,
goodsCode: null,
// goodsCode: null,
whetherShelf: null,
shelfTime: null,
goodsPictureUrl: null,
@ -661,7 +587,7 @@ export default {
{ required: true, message: "请选择商品分类名称", trigger: "blur" },
],
nurseStationId: [
{ required: true, message: "请选择护理站名称", trigger: "blur" },
{ required: true, message: "请选择所属护理站", trigger: "blur" },
],
goodsPurpose: [
{ required: true, message: "请选择商品用途", trigger: "blur" },
@ -678,6 +604,7 @@ export default {
created() {
this.getList();
this.info();
this.getList2();
},
methods: {
upwhetherShelf(row) {
@ -720,12 +647,6 @@ export default {
this.loading = false;
});
},
// list() {
// listStation().then((res) => {
// console.log(res);
// this.nurseStationlist = res.data;
// });
// },
//
addgoodAttributeDetail() {
console.log(this.goodDetailsLists);
@ -769,6 +690,7 @@ export default {
cancel() {
this.open = false;
this.reset();
this.StationName = "请选择所属护理站";
this.goodDetailsLists = [
{
attributeName: "",
@ -782,16 +704,43 @@ export default {
],
},
];
// this.goodDetailsLists = [{
// attributeName: "",
// attributePitureUrl: "",
// goodsPrice: "",
// goodsStock: "",
// sort: "",
// ids: 1,
// }]
},
clickinnerVisible() {
this.innerVisible = true
},
nurseclick(row) {
console.log(this.form);
console.log(row);
this.form.nurseStationId = row.id;
this.StationName = row.nurseStationName;
this.innerVisible = false;
},
handleQuery2(){
this.queryParams.pageNum = 1;
this.getList2()
},
getList2(){
getListByUser(this.nurseStationqueryParams).then((res) => {
this.nursetotal = res.total;
this.nurseStationlist = res.rows;
});
},
resetQuery2() {
this.resetForm("queryForm");
this.nurseStationqueryParams={
pageNum:1,
pageSize:10
},
this.handleQuery2();
},
addcancel() {
this.innerVisible = false;
// this.innerVisiblexg = false;
this.resetQuery2();
},
//
reset() {
this.form = {
@ -800,7 +749,7 @@ export default {
nurseStationId: null,
goodsCategoryId: null,
goodsName: null,
goodsCode: null,
// goodsCode: null,
whetherShelf: null,
shelfTime: null,
goodsPictureUrl: null,
@ -844,22 +793,26 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.nurseStationId=""
this.title = "商品基本信息";
this.goodDetailsLists = [
{
attributePitureUrl: "",
goodsPrice: "",
goodsStock: "",
sort: "",
ids: 9999999,
},
];
// this.nurseName = "";
this.StationName = "请选择所属护理站";
this.goodDetailsLists = [
{
attributePitureUrl: "",
goodsPrice: "",
goodsStock: "",
sort: "",
ids: 9999999,
},
];
this.open = true;
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.goodsInfoId || this.ids;
this.StationName = row.nurseStationName;
getGoodsInfo(id).then((response) => {
this.form = response.data[0];
if (response.data[0].goodAttributeDetailsLists) {
@ -869,20 +822,10 @@ export default {
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.form);
console.log(this.goodDetailsLists);
this.form.goodAttributeDetailsLists = [];
this.form.goodDetailsLists = this.goodDetailsLists;
@ -897,10 +840,13 @@ export default {
this.getList();
});
} else {
// this.nurseStationId=this.form.nurseStationId
addGoodsInfo(this.form).then((response) => {
console.log(this.form);
this.$modal.msgSuccess("新增成功");
this.open = false;
this.StationName = "请选择所属护理站";
this.open = false;
this.getList();
});
}
@ -922,7 +868,7 @@ export default {
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
});
})
.catch(() => {});
.catch(() => { });
},
// handleDelete(row) {
// const ids = row.id || this.ids;

View File

@ -190,6 +190,7 @@
:model="query"
:rules="rules"
label-width="120px"
class="orderInfo"
>
<el-form-item label="订单编号" prop="orderNo">
<el-input
@ -429,17 +430,10 @@
v-model="querynursePersonname.nursePersonName"
placeholder="请输入姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="手机号" prop="phone" label-width="120">
<el-input
v-model="querynursePersonname.phone"
placeholder="请输入手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item>
<el-button
type="primary"
@ -596,12 +590,6 @@ export default {
pageNum: 1,
pageSize: 10,
},
// querynursePerson: {
// nursePersonName: null,
// phone: null,
// pageNum: 1,
// pageSize: 10,
// },
querynursePersonname: {
orderNo: "",
nursePersonName: null,
@ -609,8 +597,7 @@ export default {
departmentName: null,
pageNum: 1,
pageSize: 10,
// detailsId: "",
// nursePersonName: null,
},
query: [],
//
@ -800,9 +787,11 @@ export default {
},
};
</script>
<style scoped>
/* ::v-deep .el-dialog__body {
height: 500px;
::v-deep .orderInfo{
height: 350px;
overflow-y: scroll;
} */
}
</style>

View File

@ -285,6 +285,7 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 添加护理站耗材信息对话框 -->
<el-dialog
:title="title"
@ -403,51 +404,6 @@
></el-button>
</div>
</el-form>
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="所属护理站" prop="nurseStationId">
<el-button
style="width: 360px; text-align: left; height: 36px; color: #c0c4cc"
@click="open2 = true"
v-if="nurseStationName == '请选择所属护理站'"
>
{{ nurseStationName }}
</el-button>
<el-button
style="width: 360px; text-align: left; height: 36px"
@click="open2 = true"
v-else
>
{{ nurseStationName }}
</el-button>
</el-form-item>
<el-form-item label="耗材包编号" prop="consumableCode">
<el-input
v-model="form.consumableCode"
placeholder="请输入耗材包编号"
/>
</el-form-item>
<el-form-item label="耗材包详情" prop="consumableDetail">
<el-input
v-model="form.consumableDetail"
placeholder="请输入服务项目耗材包详情"
/>
</el-form-item>
<el-form-item label="耗材包单位" prop="consumableUnit">
<el-input
v-model="form.consumableUnit"
placeholder="请输入耗材包单位"
/>
</el-form-item>
<el-form-item label="耗材包价格" prop="consumablePrice">
<el-input
v-model="form.consumablePrice"
placeholder="请输入耗材包价格"
/>
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input v-model="form.sort" placeholder="请输入排序" />
</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>
@ -577,11 +533,11 @@
@keyup.enter.native="handleQuery2"
/>
</el-form-item>
<el-form-item label="护理站编" prop="nurseStationCode">
<el-form-item label="护理站编" prop="nurseStationCode">
<el-input
style="width: 180px"
v-model="getListByUserquery.nurseStationCode"
placeholder="请输入护理站编"
placeholder="请输入护理站编"
clearable
@keyup.enter.native="handleQuery2"
/>
@ -625,19 +581,19 @@
></el-button>
</template>
</el-table-column>
<el-table-column
label="护理站编码"
align="center"
prop="nurseStationCode"
/>
<el-table-column
label="护理站名称"
align="center"
prop="nurseStationName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="护理站编号"
align="center"
prop="nurseStationCode"
/>
<el-table-column label="护理站经度" align="center" prop="longitude" />
<el-table-column label="护理站纬度" align="center" prop="latitude" />
<el-table-column label="联系电话" align="center" prop="phone" />
<el-table-column
label="护理站地址"
@ -645,8 +601,7 @@
prop="address"
:show-overflow-tooltip="true"
/>
<el-table-column label="负责人" align="center" prop="dutyPerson" />
<el-table-column label="负责人电话" align="center" prop="dutyPhone" />
</el-table>
<pagination