Browse Source

商品支持多列表独立排序,评测可不需要商品

master
1304317391@qq.com 2 years ago
parent
commit
61d8d39da0
  1. 8
      src/api/bxg/yxStoreOrder.js
  2. 26
      src/views/bxg/shop/goods/form.vue
  3. 35
      src/views/bxg/shop/order/index.vue
  4. 16
      src/views/bxg/yxEvaluation/index.vue

8
src/api/bxg/yxStoreOrder.js

@ -22,6 +22,14 @@ export function edit(data) {
data
})
}
//订单通过审核
export function check(data) {
return request({
url: '/bxg/api/ordercheck',
method: 'put',
data
})
}
export function updateDelivery(data) {
return request({

26
src/views/bxg/shop/goods/form.vue

@ -368,7 +368,7 @@
</el-table>
</el-form-item>
</el-col>
<el-col v-bind="grid">
<el-col :span="12">
<el-form-item label="商品状态:">
<el-radio-group v-model="formValidate.is_show" >
<el-radio :label="1" class="radio">上架</el-radio>
@ -376,7 +376,7 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col v-bind="grid">
<el-col :span="12">
<el-form-item label="热卖单品:">
<el-radio-group v-model="formValidate.is_hot" >
<el-radio :label="1" class="radio">开启</el-radio>
@ -384,7 +384,7 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col v-bind="grid">
<el-col :span="12">
<el-form-item label="猜你喜欢:">
<el-radio-group v-model="formValidate.is_benefit" >
<el-radio :label="1" class="radio">开启</el-radio>
@ -392,7 +392,12 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col v-bind="grid">
<el-col :span="12">
<el-form-item label="猜你喜欢排序:">
<el-input-number :min="0" v-model="formValidate.benefit_sort" placeholder="请输入排序" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="精品推荐:">
<el-radio-group v-model="formValidate.is_best" >
<el-radio :label="1" class="radio">开启</el-radio>
@ -400,7 +405,12 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col v-bind="grid">
<el-col :span="12">
<el-form-item label="精品推荐排序:">
<el-input-number :min="0" v-model="formValidate.best_sort" placeholder="请输入排序" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="首发新品:">
<el-radio-group v-model="formValidate.is_new" >
<el-radio :label="1" class="radio">开启</el-radio>
@ -408,7 +418,7 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="12">
<el-form-item label="参与榜单:">
<el-radio-group v-model="formValidate.is_hot_list" >
<el-radio :label="1" class="radio">开启</el-radio>
@ -529,6 +539,8 @@ export default {
is_show: 1,
is_hot: 0,
is_benefit: 0,
benefit_sort:0,
best_sort:0,
is_best: 0,
is_new: 0,
is_hot_list:0,
@ -863,7 +875,7 @@ export default {
getInfo(id).then(async res => {
let data = res.productInfo;
if(data){
// console.log('data11111',data)
console.log('data11111',data)
let cate_id = parseInt(data.cate_id) || 0;
let brand_id = parseInt(data.brand_id) || 0;
this.attrs = data.items || [];

35
src/views/bxg/shop/order/index.vue

@ -12,6 +12,9 @@
<el-tab-pane name="1">
<span slot="label"><i class="el-icon-refrigerator"></i> 未发货</span>
</el-tab-pane>
<el-tab-pane name="5">
<span slot="label"><i class="el-icon-refrigerator"></i> 拣货中</span>
</el-tab-pane>
<el-tab-pane name="2">
<span slot="label"><i class="el-icon-truck"></i> 待收货</span>
</el-tab-pane>
@ -36,7 +39,7 @@
<el-select v-model="query.type" clearable placeholder="类型" class="filter-item" style="width: 130px">
<el-option v-for="item in queryTypeOptions" :key="item.key" :label="item.display_name" :value="item.key" />
</el-select>
<el-select v-model="orderType"
<el-select v-model="orderType" multiple
clearable placeholder="订单类型" class="filter-item" style="width: 130px">
<el-option
v-for="item in typeOptions"
@ -179,6 +182,14 @@
v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']"
size="mini"
type="primary"
@click="check(scope.row)"
>
通过审核</el-button>
<el-button
v-if="scope.row._status == 8"
v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']"
size="mini"
type="primary"
@click="edit(scope.row)"
>
去发货</el-button>
@ -268,7 +279,7 @@
<script>
import checkPermission from '@/utils/permission'
import initData from '@/mixins/crud'
import { del } from '@/api/bxg/yxStoreOrder'
import {check, del, edit} from '@/api/bxg/yxStoreOrder'
import eForm from './form'
import eDetail from './detail1'
import eRefund from './refund'
@ -285,7 +296,7 @@
return {
delLoading: false,
status: '-9',
orderType: 0,
orderType: ['0'],
createTime: '',
checkList: [],
printChecked: false,
@ -354,12 +365,13 @@
beforeInit() {
this.url = 'bxg/api/yxStoreOrder'
const sort = 'id,desc'
console.log('this.orderType',this.orderType)
this.params = {
page: this.page,
size: this.size,
sort: sort,
orderStatus: this.status,
orderType: this.orderType,
orderType: this.orderType.length==0?[0]:this.orderType,
createTime: this.createTime,
listContent: this.listContent
}
@ -391,6 +403,21 @@
this.isAdd = true
this.$refs.form.dialog = true
},
check(data){
this.loading=true
check(data).then(res => {
this.$notify({
title: '操作成功',
type: 'success',
duration: 2500
})
this.loading = false
this.handleOrder()
}).catch(err => {
this.loading = false
console.log(err.response.data.message)
})
},
edit(data) {
this.isAdd = false
const _this = this.$refs.form

16
src/views/bxg/yxEvaluation/index.vue

@ -15,6 +15,7 @@
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="250px">
<el-form-item label="关联商品:" prop="product">
<el-cascader
clearable
style="width:370px"
ref="cascader"
v-model="product"
@ -184,9 +185,9 @@ export default {
// videoInput: [
// { required: true, message: '', trigger: 'blur' }
// ],
product: [
{ required: true, message: '评测关联商品不能为空', trigger: 'blur' }
],
// product: [
// { required: true, message: '', trigger: 'blur' }
// ],
synopsis: [
{ required: true, message: '评测介绍不能为空', trigger: 'blur' }
],
@ -294,9 +295,14 @@ export default {
this.form.videoInput=''
},
change(val){
this.form.product=val[1]
if(val.length==0){
console.log('val',val)
this.form.product=0
}else {
this.form.product=val[1]
}
console.log('选的子级',this.form.product)
// })
},
async getInfo(){
//

Loading…
Cancel
Save