feat(goods): 商品排序
This commit is contained in:
parent
d764b7b3eb
commit
bc14abd776
|
@ -460,22 +460,7 @@ export function waresMove(params) {
|
|||
params
|
||||
})
|
||||
}
|
||||
// 商品置顶
|
||||
export function waresTop(params) {
|
||||
return request({
|
||||
url: '/sale/manage/wares/floating-roof',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 商品置底
|
||||
export function waresBottom(params) {
|
||||
return request({
|
||||
url: '/sale/manage/wares/botton-up',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 邮费模板列表
|
||||
export function postageList(params) {
|
||||
return request({
|
||||
|
@ -678,7 +663,6 @@ export function repurchaseType(params) {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
// 计算商品业绩
|
||||
export function computePrice(data) {
|
||||
return request({
|
||||
|
@ -769,3 +753,11 @@ export function get_sort(params) {
|
|||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function getMaxSortNum(params) {
|
||||
return request({
|
||||
url: 'sale/manage/wares/getMaxSortNum',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
|
|
@ -361,18 +361,23 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商品排序" prop="sortStatus">
|
||||
<el-select
|
||||
v-model="form.sortStatus"
|
||||
clearable
|
||||
>
|
||||
<el-form-item label="商品排序" prop="sort">
|
||||
<!-- <el-select v-model="form.sortStatus" clearable>
|
||||
<el-option
|
||||
v-for="item in sortList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<el-input-number
|
||||
v-model="form.sort"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
:placeholder="'请输入'"
|
||||
:max="99999"
|
||||
:controls="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col v-show="form.specialArea == 3" :span="8">
|
||||
|
|
|
@ -544,6 +544,12 @@
|
|||
width="160"
|
||||
label="下架时间"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="sort"
|
||||
width="120"
|
||||
label="商品排序"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="time"
|
||||
|
@ -590,26 +596,7 @@
|
|||
{{ $t("审核") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnHeng">
|
||||
<div
|
||||
v-hasButtons="['GoodsListTop']"
|
||||
type="text"
|
||||
size="small"
|
||||
style="color: #c73030"
|
||||
@click="topEdit(scope.row.pkWares)"
|
||||
>
|
||||
{{ '置顶' }}
|
||||
</div>
|
||||
<div
|
||||
v-hasButtons="['GoodsListBottom']"
|
||||
type="text"
|
||||
size="small"
|
||||
style="color: #c73030"
|
||||
@click="topEdit1(scope.row.pkWares)"
|
||||
>
|
||||
置底
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnHeng" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -864,24 +851,7 @@ export default {
|
|||
this.getDataList()
|
||||
})
|
||||
},
|
||||
topEdit(id) {
|
||||
api
|
||||
.waresTop({
|
||||
waresId: id
|
||||
})
|
||||
.then((res) => {
|
||||
this.getDataList()
|
||||
})
|
||||
},
|
||||
topEdit1(id) {
|
||||
api
|
||||
.waresBottom({
|
||||
waresId: id
|
||||
})
|
||||
.then((res) => {
|
||||
this.getDataList()
|
||||
})
|
||||
},
|
||||
|
||||
// 获取列表
|
||||
getDataList() {
|
||||
this.loading = true
|
||||
|
|
|
@ -345,18 +345,23 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商品排序" prop="sortStatus">
|
||||
<el-select
|
||||
v-model="form.sortStatus"
|
||||
clearable
|
||||
>
|
||||
<el-form-item label="商品排序" prop="sort">
|
||||
<!-- <el-select v-model="form.sortStatus" clearable>
|
||||
<el-option
|
||||
v-for="item in sortList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<el-input-number
|
||||
v-model="form.sort"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
:placeholder="'请输入'"
|
||||
:max="99999"
|
||||
:controls="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col v-show="form.specialArea == 3" :span="8">
|
||||
|
@ -1156,9 +1161,17 @@ export default {
|
|||
|
||||
// 获取级差列表
|
||||
this.getRangeList()
|
||||
this.getMaxSortNum()
|
||||
},
|
||||
methods: {
|
||||
isLocals,
|
||||
getMaxSortNum() {
|
||||
api.getMaxSortNum().then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$set(this.form, 'sort', res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
getOther() {
|
||||
api.get_sort().then((res) => {
|
||||
this.sortList = res.data
|
||||
|
|
Loading…
Reference in New Issue