From 8c4908bb74fdb6dc01e2ef44a023c1e0f2a6687d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com>
Date: Fri, 11 Nov 2022 10:34:10 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8A=A4=E7=90=86=E7=AB=99?=
=?UTF-8?q?=E6=9D=83=E9=99=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/OperateGoodsInfo/index.vue | 365 +++++---------------
src/views/system/order/index.vue | 97 +++++-
2 files changed, 171 insertions(+), 291 deletions(-)
diff --git a/src/views/system/OperateGoodsInfo/index.vue b/src/views/system/OperateGoodsInfo/index.vue
index f8236fc..58dc005 100644
--- a/src/views/system/OperateGoodsInfo/index.vue
+++ b/src/views/system/OperateGoodsInfo/index.vue
@@ -8,6 +8,21 @@
v-show="showSearch"
label-width="100px"
>
+
+
+
+
+
+
-
+
修改
-
-
+
删除
-
@@ -266,20 +251,6 @@
"
>{{ StationName }}
-
-
@@ -448,7 +414,7 @@
label-width="120"
>
@@ -509,157 +475,13 @@
-
-
@@ -669,21 +491,21 @@ import {
delGoodsInfo,
addGoodsInfo,
updateGoodsInfo,
+ updatePicture,
goodsInfoList,
goodsCategory,
editGoodsWhetherShelf,
- updatePicture,
} 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 {
- imgone:"",
+ imgone: "",
imageUrl: "", //商品图片
value: "",
datas: null,
@@ -699,6 +521,8 @@ export default {
showSearch: true,
// 总条数
total: 0,
+ total2: 0,
+
// 商品基本信息表格数据
goodsInfoList: [],
// 护理站列表
@@ -742,7 +566,7 @@ export default {
id: null,
whetherShelf: null,
},
- nurseStationqueryParams: {
+ getListByUserquery: {
pageNum: 1,
pageSize: 10,
},
@@ -754,7 +578,7 @@ export default {
nurseStationId: null,
goodsCategoryId: null,
goodsName: null,
- goodsCode: null,
+ // goodsCode: null,
whetherShelf: null,
shelfTime: null,
goodsPictureUrl: null,
@@ -796,7 +620,7 @@ export default {
created() {
this.getList();
this.info();
- this.getList2()
+ // this.getList2();
},
methods: {
upwhetherShelf(row) {
@@ -882,7 +706,7 @@ export default {
cancel() {
console.log(this.form);
var obj = { pictureUrlList: [] };
- if(this.imgone !=this.form.goodsPictureUrl ){
+ if (this.imgone!= this.form.goodsPictureUrl) {
obj.pictureUrlList.push(this.form.goodsPictureUrl);
}
if (obj.pictureUrlList.length > 0) {
@@ -906,19 +730,9 @@ export default {
],
},
];
-
-
- // this.goodDetailsLists = [{
- // attributeName: "",
- // attributePitureUrl: "",
- // goodsPrice: "",
- // goodsStock: "",
- // sort: "",
- // ids: 1,
- // }]
},
clickinnerVisible() {
- this.innerVisible = true
+ this.innerVisible = true;
},
nurseclick(row) {
console.log(this.form);
@@ -927,39 +741,30 @@ export default {
this.StationName = row.nurseStationName;
this.innerVisible = false;
},
- handleQuery2(){
- this.queryParams.pageNum = 1;
- this.getList2()
+ handleQuery2() {
+ this.getListByUserquery.pageNum = 1;
+ this.info();
},
- 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();
-
- },
- // getList2() {
- // // 护理站名称
- // this.loading = true;
- // getListByUser(this.nurseStationqueryParams).then((res) => {
+ // getList2(){
+ // getListByUser(this.nurseStationqueryParams).then((res) => {
// this.nursetotal = res.total;
// this.nurseStationlist = res.rows;
// });
// },
+ resetQuery2() {
+ this.resetForm("queryForm");
+ (this.getListByUserquery = {
+ pageNum: 1,
+ pageSize: 10,
+ }),
+ this.handleQuery2();
+ },
+ addcancel() {
+ this.innerVisible = false;
+ // this.innerVisiblexg = false;
+ this.resetQuery2();
+ },
+
// 表单重置
reset() {
this.form = {
@@ -968,7 +773,7 @@ export default {
nurseStationId: null,
goodsCategoryId: null,
goodsName: null,
- goodsCode: null,
+ // goodsCode: null,
whetherShelf: null,
shelfTime: null,
goodsPictureUrl: null,
@@ -999,8 +804,19 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
- // if(this.nurseStationlist2)
- this.resetForm("queryForm");
+ if (this.nurseStationlist[0].isAdmin == '1') {
+ this.resetForm("queryForm");
+ this.queryParams = {
+ pageNum: 1,
+ pageSize: 10
+ }
+ } else {
+ this.queryParams.pageNum = 1;
+ this.queryParams.pageSize = 10
+ this.queryParams.goodsName = null
+ this.queryParams.goodsCategoryName = null
+ this.queryParams.goodsPurpose = null
+ }
this.handleQuery();
},
// 多选框选中数据
@@ -1013,26 +829,26 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
- this.nurseStationId=""
+ this.nurseStationId = "";
this.title = "商品基本信息";
// this.nurseName = "请选择护理员";
this.StationName = "请选择所属护理站";
- this.goodDetailsLists = [
- {
- attributePitureUrl: "",
- goodsPrice: "",
- goodsStock: "",
- sort: "",
- ids: 9999999,
- },
- ];
+ 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;
+ this.StationName = row.nurseStationName;
getGoodsInfo(id).then((response) => {
this.form = response.data[0];
this.imgone = this.form.goodsPictureUrl;
@@ -1043,18 +859,7 @@ 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);
@@ -1156,10 +961,14 @@ export default {
this.goodsCategorylist = res.rows;
});
getListByUser(this.getListByUserquery).then((res) => {
- this.nurseStationlist2 = res.rows;
if (res.rows[0].isAdmin == "1") {
+ this.nurseStationlist = res.rows;
+ this.total2 = res.total;
} else {
- this.queryParams.id = res.rows[0].id;
+ this.total2 = res.total;
+ this.nurseStationlist = res.rows;
+ this.queryParams.nurseStationId = res.rows[0].id;
+ this.handleQuery();
}
});
},
diff --git a/src/views/system/order/index.vue b/src/views/system/order/index.vue
index 414fde0..f8f43e0 100644
--- a/src/views/system/order/index.vue
+++ b/src/views/system/order/index.vue
@@ -8,6 +8,21 @@
v-show="showSearch"
label-width="100px"
>
+
+
+
+
+
+
待派单
待完成未完成
服务完成
-
+
-
+