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

View File

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

View File

@ -34,7 +34,10 @@
/>
</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"
@ -177,7 +180,6 @@
v-hasPermi="['system:operateGoodInfo:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
@ -237,7 +239,6 @@
"
>{{ StationName }}</el-button
>
</el-form-item>
<el-form-item label="商品分类名称" prop="goodsCategoryId">
<el-select
@ -376,7 +377,7 @@
:visible.sync="innerVisible"
width="1000px"
append-to-body
:before-close="addcancel"
:before-close="addcancel"
>
<el-form
ref="queryForm"
@ -488,12 +489,14 @@ 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,
@ -694,12 +697,14 @@ 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);
}
updatePicture(obj).then((res) => {
console.log(res);
});
if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => {
console.log(res);
});
}
this.open = false;
this.reset();
this.StationName = "请选择所属护理站";
@ -718,7 +723,7 @@ export default {
];
},
clickinnerVisible() {
this.innerVisible = true
this.innerVisible = true;
},
nurseclick(row) {
console.log(this.form);
@ -727,9 +732,9 @@ export default {
this.StationName = row.nurseStationName;
this.innerVisible = false;
},
handleQuery2(){
handleQuery2() {
this.queryParams.pageNum = 1;
this.info()
this.info();
},
// getList2(){
// getListByUser(this.nurseStationqueryParams).then((res) => {
@ -737,20 +742,18 @@ export default {
// this.nurseStationlist = res.rows;
// });
// },
resetQuery2() {
resetQuery2() {
this.resetForm("queryForm");
this.getListByUserquery={
pageNum:1,
pageSize:10
},
this.handleQuery2();
(this.getListByUserquery = {
pageNum: 1,
pageSize: 10,
}),
this.handleQuery2();
},
addcancel() {
addcancel() {
this.innerVisible = false;
// this.innerVisiblexg = false;
this.resetQuery2();
},
//
@ -805,28 +808,29 @@ 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;
if (response.data[0].goodAttributeDetailsLists) {
this.goodDetailsLists = response.data[0].goodAttributeDetailsLists;
}
@ -837,7 +841,7 @@ export default {
/** 提交按钮 */
submitForm() {
console.log(this.form);
console.log(this.form);
console.log(this.goodDetailsLists);
this.form.goodAttributeDetailsLists = [];
this.form.goodDetailsLists = this.goodDetailsLists;
@ -858,7 +862,7 @@ export default {
this.$modal.msgSuccess("新增成功");
this.StationName = "请选择所属护理站";
this.open = false;
this.open = false;
this.getList();
});
}
@ -880,7 +884,7 @@ export default {
// console.log('this.OrderDetailsList :>> ', this.OrderDetailsList);
});
})
.catch(() => { });
.catch(() => {});
},
// handleDelete(row) {
// const ids = row.id || this.ids;

View File

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

View File

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