This commit is contained in:
闫晓茹 2022-11-10 17:07:30 +08:00
parent 03c1545347
commit 3838aa3447
5 changed files with 69 additions and 56 deletions

View File

@ -884,9 +884,11 @@ export default {
if(this.imgone !=this.form.goodsPictureUrl ){ if(this.imgone !=this.form.goodsPictureUrl ){
obj.pictureUrlList.push(this.form.goodsPictureUrl); obj.pictureUrlList.push(this.form.goodsPictureUrl);
} }
updatePicture(obj).then((res) => { if (obj.pictureUrlList.length > 0) {
console.log(res); updatePicture(obj).then((res) => {
}); console.log(res);
});
}
this.open = false; this.open = false;
this.reset(); this.reset();
this.StationName = "请选择所属护理站"; this.StationName = "请选择所属护理站";
@ -1031,6 +1033,7 @@ export default {
this.StationName = row.nurseStationName; this.StationName = row.nurseStationName;
getGoodsInfo(id).then((response) => { getGoodsInfo(id).then((response) => {
this.form = response.data[0]; this.form = response.data[0];
this.imgone = this.form.goodsPictureUrl;
if (response.data[0].goodAttributeDetailsLists) { if (response.data[0].goodAttributeDetailsLists) {
this.goodDetailsLists = response.data[0].goodAttributeDetailsLists; this.goodDetailsLists = response.data[0].goodAttributeDetailsLists;
} }

View File

@ -296,9 +296,11 @@ export default {
if(this.imgone !=this.form.goodsCategoryPicture ){ if(this.imgone !=this.form.goodsCategoryPicture ){
obj.pictureUrlList.push(this.form.goodsCategoryPicture); obj.pictureUrlList.push(this.form.goodsCategoryPicture);
} }
updatePicture (obj).then((res) => { if (obj.pictureUrlList.length > 0) {
console.log(res); updatePicture(obj).then((res) => {
}); console.log(res);
});
}
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
@ -346,6 +348,7 @@ export default {
const id = row.id || this.ids; const id = row.id || this.ids;
getGoodsCategory(id).then((response) => { getGoodsCategory(id).then((response) => {
this.form = response.data; this.form = response.data;
this.imgone = this.form.goodsCategoryPicture;
this.open = true; this.open = true;
this.title = "修改商品分类信息"; this.title = "修改商品分类信息";
console.log(this.form); console.log(this.form);

View File

@ -34,7 +34,10 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="商品用途" prop="goodsPurpose"> <el-form-item label="商品用途" prop="goodsPurpose">
<el-select v-model="queryParams.goodsPurpose" placeholder="请选择商品用途"> <el-select
v-model="queryParams.goodsPurpose"
placeholder="请选择商品用途"
>
<el-option <el-option
v-for="item in goods" v-for="item in goods"
:key="item.value" :key="item.value"
@ -177,7 +180,6 @@
v-hasPermi="['system:operateGoodInfo:remove']" v-hasPermi="['system:operateGoodInfo:remove']"
>删除</el-button >删除</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -237,7 +239,6 @@
" "
>{{ StationName }}</el-button >{{ StationName }}</el-button
> >
</el-form-item> </el-form-item>
<el-form-item label="商品分类名称" prop="goodsCategoryId"> <el-form-item label="商品分类名称" prop="goodsCategoryId">
<el-select <el-select
@ -376,7 +377,7 @@
:visible.sync="innerVisible" :visible.sync="innerVisible"
width="1000px" width="1000px"
append-to-body append-to-body
:before-close="addcancel" :before-close="addcancel"
> >
<el-form <el-form
ref="queryForm" ref="queryForm"
@ -488,12 +489,14 @@ import editor from "@/components/Editor";
import { getListByUser } from "@/api/system/userlist.js"; import { getListByUser } from "@/api/system/userlist.js";
import stationAcatar from "../stationAvatar/index.vue"; import stationAcatar from "../stationAvatar/index.vue";
import baseurl from "@/api/baseurl.js"; import baseurl from "@/api/baseurl.js";
export default { export default {
components: { stationAcatar, editor }, components: { stationAcatar, editor },
name: "OperateGoodsInfo", name: "OperateGoodsInfo",
data() { data() {
return { return {
imgone:"", imgone: "",
imageUrl: "", // imageUrl: "", //
value: "", value: "",
datas: null, datas: null,
@ -694,12 +697,14 @@ export default {
cancel() { cancel() {
console.log(this.form); console.log(this.form);
var obj = { pictureUrlList: [] }; var obj = { pictureUrlList: [] };
if(this.imgone !=this.form.goodsPictureUrl ){ if (this.imgone!= this.form.goodsPictureUrl) {
obj.pictureUrlList.push(this.form.goodsPictureUrl); obj.pictureUrlList.push(this.form.goodsPictureUrl);
} }
updatePicture(obj).then((res) => { if (obj.pictureUrlList.length > 0) {
console.log(res); updatePicture(obj).then((res) => {
}); console.log(res);
});
}
this.open = false; this.open = false;
this.reset(); this.reset();
this.StationName = "请选择所属护理站"; this.StationName = "请选择所属护理站";
@ -718,7 +723,7 @@ export default {
]; ];
}, },
clickinnerVisible() { clickinnerVisible() {
this.innerVisible = true this.innerVisible = true;
}, },
nurseclick(row) { nurseclick(row) {
console.log(this.form); console.log(this.form);
@ -727,9 +732,9 @@ export default {
this.StationName = row.nurseStationName; this.StationName = row.nurseStationName;
this.innerVisible = false; this.innerVisible = false;
}, },
handleQuery2(){ handleQuery2() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.info() this.info();
}, },
// getList2(){ // getList2(){
// getListByUser(this.nurseStationqueryParams).then((res) => { // getListByUser(this.nurseStationqueryParams).then((res) => {
@ -737,20 +742,18 @@ export default {
// this.nurseStationlist = res.rows; // this.nurseStationlist = res.rows;
// }); // });
// }, // },
resetQuery2() { resetQuery2() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.getListByUserquery={ (this.getListByUserquery = {
pageNum:1, pageNum: 1,
pageSize:10 pageSize: 10,
}, }),
this.handleQuery2(); this.handleQuery2();
}, },
addcancel() { addcancel() {
this.innerVisible = false; this.innerVisible = false;
// this.innerVisiblexg = false; // this.innerVisiblexg = false;
this.resetQuery2(); this.resetQuery2();
}, },
// //
@ -805,28 +808,29 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.nurseStationId="" this.nurseStationId = "";
this.title = "商品基本信息"; this.title = "商品基本信息";
// this.nurseName = ""; // this.nurseName = "";
this.StationName = "请选择所属护理站"; this.StationName = "请选择所属护理站";
this.goodDetailsLists = [ this.goodDetailsLists = [
{ {
attributePitureUrl: "", attributePitureUrl: "",
goodsPrice: "", goodsPrice: "",
goodsStock: "", goodsStock: "",
sort: "", sort: "",
ids: 9999999, ids: 9999999,
}, },
]; ];
this.open = true; this.open = true;
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.goodsInfoId || this.ids; const id = row.goodsInfoId || this.ids;
this.StationName = row.nurseStationName; this.StationName = row.nurseStationName;
getGoodsInfo(id).then((response) => { getGoodsInfo(id).then((response) => {
this.form = response.data[0]; this.form = response.data[0];
this.imgone = this.form.goodsPictureUrl;
if (response.data[0].goodAttributeDetailsLists) { if (response.data[0].goodAttributeDetailsLists) {
this.goodDetailsLists = response.data[0].goodAttributeDetailsLists; this.goodDetailsLists = response.data[0].goodAttributeDetailsLists;
} }
@ -837,7 +841,7 @@ export default {
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
console.log(this.form); console.log(this.form);
console.log(this.goodDetailsLists); console.log(this.goodDetailsLists);
this.form.goodAttributeDetailsLists = []; this.form.goodAttributeDetailsLists = [];
this.form.goodDetailsLists = this.goodDetailsLists; this.form.goodDetailsLists = this.goodDetailsLists;
@ -858,7 +862,7 @@ export default {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.StationName = "请选择所属护理站"; this.StationName = "请选择所属护理站";
this.open = false; this.open = false;
this.getList(); this.getList();
}); });
} }
@ -880,7 +884,7 @@ export default {
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList); // console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
}); });
}) })
.catch(() => { }); .catch(() => {});
}, },
// handleDelete(row) { // handleDelete(row) {
// const ids = row.id || this.ids; // const ids = row.id || this.ids;

View File

@ -853,15 +853,17 @@ export default {
cancel() { cancel() {
console.log(this.form); console.log(this.form);
var obj = { pictureUrlList: [] }; var obj = { pictureUrlList: [] };
if(this.imgone !=this.form.stationIntroducePcitureUrl ){ if(this.imgone!=this.form.stationIntroducePcitureUrl ){
obj.pictureUrlList.push(this.form.stationIntroducePcitureUrl); obj.pictureUrlList.push(this.form.stationIntroducePcitureUrl);
} }
if(this.imgtwo !=this.form.stationPictureUrl ){ if(this.imgtwo!=this.form.stationPictureUrl ){
obj.pictureUrlList.push(this.form.stationPictureUrl); obj.pictureUrlList.push(this.form.stationPictureUrl);
} }
updatePicture(obj).then((res) => { if (obj.pictureUrlList.length > 0) {
console.log(res); updatePicture(obj).then((res) => {
}); console.log(res);
});
}
this.open = false; this.open = false;
this.reset(); this.reset();
this.value3 = ""; this.value3 = "";
@ -972,6 +974,8 @@ export default {
getStation(id).then((response) => { getStation(id).then((response) => {
console.log(response); console.log(response);
this.form = response.data; this.form = response.data;
this.imgone = this.form.stationIntroducePcitureUrl;
this.imgtwo = this.form.stationPictureUrl;
this.looknurseStationLabel = response.data.nurseStationLabel; this.looknurseStationLabel = response.data.nurseStationLabel;
console.log(this.list); console.log(this.list);
this.open = true; this.open = true;

View File

@ -728,7 +728,7 @@ export default {
data() { data() {
return { return {
imageUrl: "", imageUrl: "",
img1:"", imgone:"",
// //
upload: { upload: {
// //
@ -776,11 +776,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}, },
pictureList: {
pictureUrlList: [
],
},
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -1010,12 +1006,14 @@ export default {
cancel() { cancel() {
console.log(this.form.nurseStationItem); console.log(this.form.nurseStationItem);
var obj = { pictureUrlList: [] }; var obj = { pictureUrlList: [] };
if (this.img1 != this.form.nurseStationItem.itemPictureUrl) { if (this.imgone!= this.form.nurseStationItem.itemPictureUrl) {
obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl); obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl);
} }
updatePicture(obj).then((res) => { if (obj.pictureUrlList.length > 0) {
console.log(res); updatePicture(obj).then((res) => {
}); console.log(res);
});
}
this.open = false; this.open = false;
this.reset(); this.reset();
@ -1126,11 +1124,12 @@ export default {
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();s
const id = row.id || this.ids; const id = row.id || this.ids;
getNurseItem(id).then((response) => { getNurseItem(id).then((response) => {
console.log(response); console.log(response);
this.form = response.data; this.form = response.data;
this.imgone = this.form.nurseStationItem.itemPictureUrl;
if (this.form.nurseStationItemPrices == []) { if (this.form.nurseStationItemPrices == []) {
var obj = { var obj = {
serveDurationUnit: "", serveDurationUnit: "",