Merge branch 'master' of http://60.204.229.151:20080/chenkangxu/merchant-web
This commit is contained in:
commit
dd5a2e46c9
|
@ -52,6 +52,18 @@ export const mer_admin = {
|
||||||
getProductCategory: () => {
|
getProductCategory: () => {
|
||||||
return $http.get(`/merchant-api/product/category/list?shopId=${JSON.parse(sessionStorage.getItem('userInfo')).shopId}`);
|
return $http.get(`/merchant-api/product/category/list?shopId=${JSON.parse(sessionStorage.getItem('userInfo')).shopId}`);
|
||||||
},
|
},
|
||||||
|
//上架或下架
|
||||||
|
putOnShelvesProducts: (data) => {
|
||||||
|
return $http.post(`/merchant-api/product/batch/update/status`, data);
|
||||||
|
},
|
||||||
|
//批量删除商品
|
||||||
|
BatchDeleteProducts: (data) => {
|
||||||
|
return $http.post(`/merchant-api/product/batch/delete`, data);
|
||||||
|
},
|
||||||
|
//打折扣
|
||||||
|
setDiscounts: (data) => {
|
||||||
|
return $http.post(`merchant-api/activity/save`, data);
|
||||||
|
},
|
||||||
//获取销售单位
|
//获取销售单位
|
||||||
getSaleUnit: (data) => {
|
getSaleUnit: (data) => {
|
||||||
return $http.request({ url: `/merchant-api/product/unit/list`, method: 'get', params: data });
|
return $http.request({ url: `/merchant-api/product/unit/list`, method: 'get', params: data });
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
placeholder="商品搜索"
|
placeholder="商品搜索"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="$refs.oTable.reload()"
|
<el-button type="primary" @click="$refs.oTable.reload()"
|
||||||
>查询</el-button
|
>查询</el-button
|
||||||
|
@ -92,6 +91,7 @@ export default {
|
||||||
border: true,
|
border: true,
|
||||||
height: "auto",
|
height: "auto",
|
||||||
"row-id": "id",
|
"row-id": "id",
|
||||||
|
"show-overflow": false,
|
||||||
},
|
},
|
||||||
productFilterType: "SALE",
|
productFilterType: "SALE",
|
||||||
selectList: [],
|
selectList: [],
|
||||||
|
@ -112,6 +112,7 @@ export default {
|
||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
console.log("111");
|
||||||
this.$api.mer_admin.BatchDeleteProducts(integers).then((res) => {
|
this.$api.mer_admin.BatchDeleteProducts(integers).then((res) => {
|
||||||
this.$refs.oTable.reload();
|
this.$refs.oTable.reload();
|
||||||
});
|
});
|
||||||
|
|
|
@ -187,16 +187,7 @@ export default {
|
||||||
productIntroducePhoto: "",
|
productIntroducePhoto: "",
|
||||||
productPhotoList: [],
|
productPhotoList: [],
|
||||||
productPlace: "",
|
productPlace: "",
|
||||||
productSpecificationList: [
|
productSpecificationList: [],
|
||||||
{
|
|
||||||
attributeValue: "默认",
|
|
||||||
costPrice: 20,
|
|
||||||
salePrice: 30,
|
|
||||||
stockNum: 10,
|
|
||||||
weight: 1,
|
|
||||||
volume: 0.3,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
productUnit: "",
|
productUnit: "",
|
||||||
productVideo: "",
|
productVideo: "",
|
||||||
shelfLife: "",
|
shelfLife: "",
|
||||||
|
@ -657,9 +648,10 @@ export default {
|
||||||
v-model={this.place}
|
v-model={this.place}
|
||||||
onChange={change}
|
onChange={change}
|
||||||
options={this.$api.mer_admin.getCityOptions()}
|
options={this.$api.mer_admin.getCityOptions()}
|
||||||
{...{
|
props={{
|
||||||
props: {
|
props: {
|
||||||
checkStrictly: true,
|
label: "name",
|
||||||
|
value: "name",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
clearable
|
clearable
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
:modalHandles="modalHandles"
|
:modalHandles="modalHandles"
|
||||||
>
|
>
|
||||||
<obj-table-plus
|
<obj-table-plus
|
||||||
v-show="tableData.length > 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"
|
||||||
|
@ -86,7 +86,7 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
modalCols() {
|
modalCols() {
|
||||||
if (this.tableData.length == 1) {
|
if (this.modalData.specType == 0) {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: "价格",
|
label: "价格",
|
||||||
|
@ -154,7 +154,7 @@ export default {
|
||||||
type: "primary",
|
type: "primary",
|
||||||
submit: true,
|
submit: true,
|
||||||
handle: debounce(() => {
|
handle: debounce(() => {
|
||||||
if (this.tableData.length == 1) {
|
if (this.modalData.specType == 0) {
|
||||||
this.$api.mer_admin
|
this.$api.mer_admin
|
||||||
.saveProductBase(this.modalData)
|
.saveProductBase(this.modalData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
|
@ -91,7 +91,6 @@ export default {
|
||||||
//监控对象数据
|
//监控对象数据
|
||||||
tableData: [],
|
tableData: [],
|
||||||
//表格属性
|
//表格属性
|
||||||
//表格属性
|
|
||||||
tableProp: {
|
tableProp: {
|
||||||
height: "auto",
|
height: "auto",
|
||||||
border: true,
|
border: true,
|
||||||
|
@ -399,6 +398,8 @@ export default {
|
||||||
disabled: () => this.tableData.length <= 0,
|
disabled: () => this.tableData.length <= 0,
|
||||||
// submit: true,
|
// submit: true,
|
||||||
handle: () => {
|
handle: () => {
|
||||||
|
let volume = "" //重量
|
||||||
|
let weight = "" //体积
|
||||||
let salePrice = ""; //价格范围
|
let salePrice = ""; //价格范围
|
||||||
let stockNum = ""; //库存范围
|
let stockNum = ""; //库存范围
|
||||||
let minSalePrice = Math.min.apply(
|
let minSalePrice = Math.min.apply(
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
:modalHandles="modalHandles"
|
:modalHandles="modalHandles"
|
||||||
>
|
>
|
||||||
<obj-table-plus
|
<obj-table-plus
|
||||||
v-show="tableData.length > 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"
|
||||||
|
@ -86,7 +86,7 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
modalCols() {
|
modalCols() {
|
||||||
if (this.tableData.length == 1) {
|
if (this.modalData.specType == 0) {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: "库存",
|
label: "库存",
|
||||||
|
@ -154,7 +154,7 @@ export default {
|
||||||
type: "primary",
|
type: "primary",
|
||||||
submit: true,
|
submit: true,
|
||||||
handle: debounce(() => {
|
handle: debounce(() => {
|
||||||
if (this.tableData.length == 1) {
|
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