Compare commits
No commits in common. "ffda9f2af2487be3c1afedc36c70290a8627cda2" and "71b86f2bc57d003de0a87e4f985d527dc5dd2b5f" have entirely different histories.
ffda9f2af2
...
71b86f2bc5
|
@ -80,7 +80,7 @@ export default {
|
||||||
components: { AddOrUpdate, AddPrice, addStock, AddDiscount },
|
components: { AddOrUpdate, AddPrice, addStock, AddDiscount },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeName: "在售",
|
activeName: "出售中",
|
||||||
dataList: [],
|
dataList: [],
|
||||||
formInline: {
|
formInline: {
|
||||||
user: "",
|
user: "",
|
||||||
|
@ -171,18 +171,11 @@ export default {
|
||||||
title: "商品图",
|
title: "商品图",
|
||||||
field: "productPhotoList",
|
field: "productPhotoList",
|
||||||
align: "center",
|
align: "center",
|
||||||
width: "80px",
|
width: "160px",
|
||||||
type: "jsx",
|
type: "jsx",
|
||||||
render: ({ row }) => {
|
render: ({ row }) => {
|
||||||
if (row.productPhotoList.length > 0) {
|
if (row.productPhotoList.length > 0) {
|
||||||
return (
|
return <el-image src={row.productPhotoList[0].url}></el-image>;
|
||||||
<el-image
|
|
||||||
preview-src-list={row.productPhotoList.map((item) => {
|
|
||||||
return item.url;
|
|
||||||
})}
|
|
||||||
src={row.productPhotoList[0].url}
|
|
||||||
></el-image>
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
return <span>暂无商品图</span>;
|
return <span>暂无商品图</span>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { debounce, cloneDeep } from "lodash";
|
import { debounce, cloneDeep } from "lodash";
|
||||||
import { Divider } from "element-ui";
|
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
|
@ -110,21 +109,13 @@ export default {
|
||||||
type: "jsx",
|
type: "jsx",
|
||||||
render: () => {
|
render: () => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<el-input
|
||||||
<el-input-number
|
type="number"
|
||||||
min={0}
|
min={0}
|
||||||
max={9.9}
|
max={9.9}
|
||||||
v-model={this.modalData.discount}
|
v-model={this.modalData.discount}
|
||||||
></el-input-number>
|
placeholder="请输入≤9.9数字 如:8折=售价*0.8"
|
||||||
<span> 提示: 请输入≤9.9数字 如:8折=售价*0.8</span>
|
></el-input>
|
||||||
</div>
|
|
||||||
// <el-input
|
|
||||||
// type="number"
|
|
||||||
// min={0}
|
|
||||||
// max={9.9}
|
|
||||||
// v-model={this.modalData.discount}
|
|
||||||
// placeholder="请输入≤9.9数字 如:8折=售价*0.8"
|
|
||||||
// ></el-input>
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -137,16 +128,14 @@ export default {
|
||||||
type: "jsx",
|
type: "jsx",
|
||||||
render: () => {
|
render: () => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<el-input
|
||||||
<el-input-number
|
type="number"
|
||||||
|
step={1}
|
||||||
min={1}
|
min={1}
|
||||||
max={99}
|
max={99}
|
||||||
v-model={this.modalData.limitCount}
|
v-model={this.modalData.limitCount}
|
||||||
step={1}
|
placeholder="请输入≤99数字 超出数量以原价购买"
|
||||||
step-strictly
|
></el-input>
|
||||||
></el-input-number>
|
|
||||||
<span> 提示: 请输入≤99数字 超出数量以原价购买</span>
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
:modalHandles="modalHandles"
|
:modalHandles="modalHandles"
|
||||||
>
|
>
|
||||||
<obj-table-plus
|
<obj-table-plus
|
||||||
v-show="specType == 1"
|
v-show="modalData.specType == 1"
|
||||||
style="height: calc(100vh - 120px - 240px)"
|
style="height: calc(100vh - 120px - 240px)"
|
||||||
slot="dialog__after"
|
slot="dialog__after"
|
||||||
ref="oTable"
|
ref="oTable"
|
||||||
|
@ -50,7 +50,6 @@ export default {
|
||||||
width: "60%",
|
width: "60%",
|
||||||
},
|
},
|
||||||
modalData: {},
|
modalData: {},
|
||||||
specType: "",
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -80,18 +79,14 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
init(row) {
|
init(row) {
|
||||||
this.specType = row.specType;
|
this.modalData = row;
|
||||||
this.modalData = {
|
|
||||||
id: row.id,
|
|
||||||
productSpecificationList: row.productSpecificationList,
|
|
||||||
};
|
|
||||||
this.tableData = row.productSpecificationList;
|
this.tableData = row.productSpecificationList;
|
||||||
console.log(this.modalData);
|
console.log(this.modalData);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
modalCols() {
|
modalCols() {
|
||||||
if (this.specType == 0) {
|
if (this.modalData.specType == 0) {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: "价格",
|
label: "价格",
|
||||||
|
@ -159,7 +154,7 @@ export default {
|
||||||
type: "primary",
|
type: "primary",
|
||||||
submit: true,
|
submit: true,
|
||||||
handle: debounce(() => {
|
handle: debounce(() => {
|
||||||
if (this.specType == 0) {
|
if (this.modalData.specType == 0) {
|
||||||
this.$api.mer_admin
|
this.$api.mer_admin
|
||||||
.saveProductBase(this.modalData)
|
.saveProductBase(this.modalData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
:modalHandles="modalHandles"
|
:modalHandles="modalHandles"
|
||||||
>
|
>
|
||||||
<obj-table-plus
|
<obj-table-plus
|
||||||
v-show="specType == 1"
|
v-show="modalData.specType == 1"
|
||||||
style="height: calc(100vh - 120px - 240px)"
|
style="height: calc(100vh - 120px - 240px)"
|
||||||
slot="dialog__after"
|
slot="dialog__after"
|
||||||
ref="oTable"
|
ref="oTable"
|
||||||
|
@ -50,7 +50,6 @@ export default {
|
||||||
width: "60%",
|
width: "60%",
|
||||||
},
|
},
|
||||||
modalData: {},
|
modalData: {},
|
||||||
specType: "",
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -80,18 +79,14 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
init(row) {
|
init(row) {
|
||||||
this.specType = row.specType;
|
this.modalData = row;
|
||||||
this.modalData = {
|
|
||||||
id: row.id,
|
|
||||||
productSpecificationList: row.productSpecificationList,
|
|
||||||
};
|
|
||||||
this.tableData = row.productSpecificationList;
|
this.tableData = row.productSpecificationList;
|
||||||
console.log(this.modalData);
|
console.log(this.modalData);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
modalCols() {
|
modalCols() {
|
||||||
if (this.specType == 0) {
|
if (this.modalData.specType == 0) {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: "库存",
|
label: "库存",
|
||||||
|
@ -159,7 +154,7 @@ export default {
|
||||||
type: "primary",
|
type: "primary",
|
||||||
submit: true,
|
submit: true,
|
||||||
handle: debounce(() => {
|
handle: debounce(() => {
|
||||||
if (this.specType == 0) {
|
if (this.modalData.specType == 0) {
|
||||||
this.$api.mer_admin
|
this.$api.mer_admin
|
||||||
.saveProductBase(this.modalData)
|
.saveProductBase(this.modalData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
Loading…
Reference in New Issue