修改
This commit is contained in:
parent
dd5ff2ec04
commit
7c96ddade7
@ -214,7 +214,7 @@
|
||||
@click="clickinnerVisible"
|
||||
v-if="StationName == '请选择所属护理站'"
|
||||
style="
|
||||
width: 200px;
|
||||
width: 210px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
color: #c0c4cc;
|
||||
@ -227,10 +227,9 @@
|
||||
@click="clickinnerVisible"
|
||||
v-else
|
||||
style="
|
||||
width: 200px;
|
||||
width: 210px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
padding-left: -10px;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ StationName }}</el-button
|
||||
@ -269,11 +268,20 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="商品度量单位" prop="goodsUnit">
|
||||
<el-input
|
||||
max="8"
|
||||
v-model="form.goodsUnit"
|
||||
placeholder="请输入商品度量单位"
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品顺序" prop="sort">
|
||||
<el-input
|
||||
max="8"
|
||||
v-model.number="form.sort"
|
||||
placeholder="请输入商品顺序"
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品图片" prop="goodsPictureUrl">
|
||||
<stationAcatar
|
||||
@imgUrl="imgUrl"
|
||||
@ -298,7 +306,6 @@
|
||||
<el-table-column label="商品单价" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
|
||||
v-model="scope.row.goodsPrice"
|
||||
type="number"
|
||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+3)} if(value.length>7){value=value.slice(0,7)}"
|
||||
@ -316,7 +323,7 @@
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="显示顺序" align="center">
|
||||
<el-table-column label="商品属性顺序" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.attributeDetailsSort"
|
||||
@ -356,7 +363,7 @@
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
<editor
|
||||
@imgs="imgs"
|
||||
@imgs="imgs"
|
||||
:min-height="100"
|
||||
style="width: 90%; margin: 0 auto"
|
||||
v-model="form.goodsRemark"
|
||||
|
||||
@ -20,7 +20,6 @@ export default {
|
||||
return {
|
||||
imgsurl: { pictureUrlList: [] },
|
||||
imgone: "",
|
||||
|
||||
imageUrl: "", //商品图片
|
||||
value: "",
|
||||
datas: null,
|
||||
@ -124,7 +123,11 @@ export default {
|
||||
{ required: true, message: "请输入商品度量单位", trigger: "blur" },
|
||||
],
|
||||
goodsPictureUrl: [
|
||||
{ required: true, message: "请输入选择图片", trigger: "blur" },
|
||||
{ required: true, message: "请选择图片", trigger: "blur" },
|
||||
],
|
||||
sort: [
|
||||
{ required: true, message: "请输入商品顺序", trigger: "blur" },
|
||||
|
||||
],
|
||||
},
|
||||
homestation: null,
|
||||
@ -138,7 +141,7 @@ export default {
|
||||
imgs(item) {
|
||||
this.imgsurl.pictureUrlList.push(item);
|
||||
// console.log(this.imgsurl)
|
||||
},
|
||||
},
|
||||
upwhetherShelf(row) {
|
||||
console.log(row);
|
||||
if (row.whetherShelf == false) {
|
||||
@ -180,20 +183,19 @@ export default {
|
||||
},
|
||||
// 添加
|
||||
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);
|
||||
}
|
||||
// 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) {
|
||||
@ -231,8 +233,8 @@ export default {
|
||||
}
|
||||
if (this.imgsurl.pictureUrlList.length > 0) {
|
||||
updatePicture(this.imgsurl).then((res) => {});
|
||||
}
|
||||
this.imgsurl={pictureUrlList:[]};
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
this.open = false;
|
||||
this.reset();
|
||||
this.StationName = "请选择所属护理站";
|
||||
@ -393,7 +395,7 @@ export default {
|
||||
if (this.imgone != this.form.goodsPictureUrl) {
|
||||
obj.pictureUrlList.push(this.imgone);
|
||||
}
|
||||
this.imgsurl={pictureUrlList:[]};
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {
|
||||
console.log(res);
|
||||
@ -406,9 +408,9 @@ export default {
|
||||
});
|
||||
} else {
|
||||
this.form.goodDetailsLists.forEach(e => {
|
||||
e.goodsPrice = Number(e.goodsPrice)
|
||||
})
|
||||
// this.nurseStationId=this.form.nurseStationId
|
||||
e.goodsPrice = Number(e.goodsPrice)
|
||||
})
|
||||
// this.nurseStationId=this.form.nurseStationId
|
||||
addGoodsInfo(this.form).then((response) => {
|
||||
console.log(this.form);
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
@ -482,4 +484,4 @@ export default {
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user