Compare commits

...

2 Commits

Author SHA1 Message Date
余同学 ffda9f2af2 Merge branch 'master' of http://60.204.229.151:20080/chenkangxu/merchant-web 2024-08-21 18:01:01 +08:00
余同学 84d9a2a44c 商品折扣 2024-08-21 18:00:55 +08:00
4 changed files with 54 additions and 26 deletions

View File

@ -80,7 +80,7 @@ export default {
components: { AddOrUpdate, AddPrice, addStock, AddDiscount },
data() {
return {
activeName: "出售中",
activeName: "在售",
dataList: [],
formInline: {
user: "",
@ -171,11 +171,18 @@ export default {
title: "商品图",
field: "productPhotoList",
align: "center",
width: "160px",
width: "80px",
type: "jsx",
render: ({ row }) => {
if (row.productPhotoList.length > 0) {
return <el-image src={row.productPhotoList[0].url}></el-image>;
return (
<el-image
preview-src-list={row.productPhotoList.map((item) => {
return item.url;
})}
src={row.productPhotoList[0].url}
></el-image>
);
} else {
return <span>暂无商品图</span>;
}

View File

@ -29,6 +29,7 @@
</template>
<script>
import { debounce, cloneDeep } from "lodash";
import { Divider } from "element-ui";
export default {
components: {},
data() {
@ -109,13 +110,21 @@ export default {
type: "jsx",
render: () => {
return (
<el-input
type="number"
<div>
<el-input-number
min={0}
max={9.9}
v-model={this.modalData.discount}
placeholder="请输入≤9.9数字 如:8折=售价*0.8"
></el-input>
></el-input-number>
<span> 提示 请输入9.9数字 :8=售价*0.8</span>
</div>
// <el-input
// type="number"
// min={0}
// max={9.9}
// v-model={this.modalData.discount}
// placeholder="9.9 :8=*0.8"
// ></el-input>
);
},
},
@ -128,14 +137,16 @@ export default {
type: "jsx",
render: () => {
return (
<el-input
type="number"
step={1}
<div>
<el-input-number
min={1}
max={99}
v-model={this.modalData.limitCount}
placeholder="请输入≤99数字 超出数量以原价购买"
></el-input>
step={1}
step-strictly
></el-input-number>
<span> 提示 请输入99数字 超出数量以原价购买</span>
</div>
);
},
},

View File

@ -9,7 +9,7 @@
:modalHandles="modalHandles"
>
<obj-table-plus
v-show="modalData.specType == 1"
v-show="specType == 1"
style="height: calc(100vh - 120px - 240px)"
slot="dialog__after"
ref="oTable"
@ -50,6 +50,7 @@ export default {
width: "60%",
},
modalData: {},
specType: "",
};
},
methods: {
@ -79,14 +80,18 @@ export default {
};
},
init(row) {
this.modalData = row;
this.specType = row.specType;
this.modalData = {
id: row.id,
productSpecificationList: row.productSpecificationList,
};
this.tableData = row.productSpecificationList;
console.log(this.modalData);
},
},
computed: {
modalCols() {
if (this.modalData.specType == 0) {
if (this.specType == 0) {
return [
{
label: "价格",
@ -154,7 +159,7 @@ export default {
type: "primary",
submit: true,
handle: debounce(() => {
if (this.modalData.specType == 0) {
if (this.specType == 0) {
this.$api.mer_admin
.saveProductBase(this.modalData)
.then((res) => {

View File

@ -9,7 +9,7 @@
:modalHandles="modalHandles"
>
<obj-table-plus
v-show="modalData.specType == 1"
v-show="specType == 1"
style="height: calc(100vh - 120px - 240px)"
slot="dialog__after"
ref="oTable"
@ -50,6 +50,7 @@ export default {
width: "60%",
},
modalData: {},
specType: "",
};
},
methods: {
@ -79,14 +80,18 @@ export default {
};
},
init(row) {
this.modalData = row;
this.specType = row.specType;
this.modalData = {
id: row.id,
productSpecificationList: row.productSpecificationList,
};
this.tableData = row.productSpecificationList;
console.log(this.modalData);
},
},
computed: {
modalCols() {
if (this.modalData.specType == 0) {
if (this.specType == 0) {
return [
{
label: "库存",
@ -154,7 +159,7 @@ export default {
type: "primary",
submit: true,
handle: debounce(() => {
if (this.modalData.specType == 0) {
if (this.specType == 0) {
this.$api.mer_admin
.saveProductBase(this.modalData)
.then((res) => {