liudan 10 months ago
parent 2da5869dd6
commit e9e90596a8
  1. 16
      api/StoreManagerCenter.js
  2. 17
      api/newFun.js
  3. 83
      pages/news/goods/batchdel.vue
  4. 138
      pages/news/goods/del.vue
  5. 25
      pages/news/goods/list.vue
  6. 37
      pages/news3/sendOutGoods.vue
  7. 249
      pages/news3/shopOrder.vue
  8. 16
      pages/user/index.vue

@ -0,0 +1,16 @@
import request from '@/utils/request'
// api地址
const api = {
storeGoodsList:'storeKeeper/list',
delGoods:'storeKeeper/delete'
}
// 店主--商品列表
export function storeGoodsList(param) {
return request.get(api.storeGoodsList, { ...param })
}
//店主--删除/批量删除
export function delGoods(param) {
return request.post(api.delGoods, { ...param })
}

@ -132,3 +132,20 @@ export const storeKeeperList = (param) => {
export const storeKeeperDetail = (shopId) => {
return request.get('shop/detail', { shopId })
}
// 店长 删除/批量删除
export const delGoods = (param) => {
return request.post('storeKeeper/delete', param)
}
//店长 商品订单
export const shopOrderList = (param) => {
return request.get('storeKeeper/orderList', param)
}
//店长--发货
export const sendGoods = (param) => {
return request.post('storeKeeper/delivery', param)
}
//店长==物流列表
export const wuliuList = (param) => {
return request.post('storeKeeper/expressAll', param)
}

@ -2,47 +2,56 @@
<view class="goods">
<view class="search">
<view class="box">
<image src="/static/news/icon-search.png"></image>
<input type="search" placeholder="搜索订单" />
<!-- <image src="/static/news/icon-search.png"></image>
<input type="search" placeholder="搜索订单" /> -->
<u-search height="50" @search="getListAfter" @custom="getListAfter" placeholder="商品名称/编码" v-model="keyword"></u-search>
</view>
</view>
<view class="goods-bd">
<view class="li" v-for="i in 2" :key="i">
<view class="li" v-for="(i,index) in list" :key="index">
<view class="b">
<view class="item">
<view class="pic">
<image mode="aspectFill" src="@/static/home/phone.jpg" />
<image mode="aspectFill" :src="i.goods_image"/>
</view>
<!-- 此层wrap在此为必写的否则可能会出现标题定位错误 -->
<view class="info">
<view class="title">荣耀畅玩 40 Plus 全网通5G版 绿8GB+128GB</view>
<view class="title">{{i.goods_name}}</view>
<view class="sku">
16GB128GB
{{i.selling_point}}
</view>
<view class="fd">
<view class="price"><text>1120</text></view>
<view class="kc">库存20</view>
<view class="price"><text>{{i.goods_price_max}}</text></view>
<view class="kc">库存{{i.stock_total}}</view>
</view>
</view>
</view>
</view>
<view class="a">
<view class="status">商品状态上架中</view>
<view class="btn">删除</view>
<view class="status">商品状态{{i.status==10?'上架':i.status==20?'下架':'未知'}}</view>
<view class="btn" @click.prevent="delHandle(i)">删除</view>
</view>
</view>
</view>
<view class="goods-fd">
<view class="c" @click="toPage()">批量删除</view>
</view>
<u-toast ref="uToast" />
<u-modal v-model="show" content="确定删除此商品吗" :show-cancel-button="true" @cancel="show=false" @confirm="delConfirm"></u-modal>
</view>
</template>
<script>
import * as newFunApi from '@/api/newFun'
export default {
data() {
return {
show:false,
list: [],
keyword: "",
total: 1,
pageNum: 1,
selected:{},
};
},
methods: {
@ -50,8 +59,60 @@
uni.navigateTo({
url: "/pages/news/goods/del"
})
},
getListAfter(){
this.list = [];
this.getList()
},
async getList() {
uni.showLoading({
title:"加载中"
})
let {status, message, data} = await newFunApi.storeKeeperList({
goodsNo: "",
page: this.pageNum,
listType: "all",
goodsName: this.keyword
});
if(status == 200){
uni.hideLoading();
this.list = this.list.concat(data.list.data)
this.total = data.list.total
}
},
async delConfirm(){
console.log(this.selected)
let goodsIds = []
goodsIds.push(this.selected.goods_id)
console.log(goodsIds)
let {status, message, data} = await newFunApi.delGoods({
goodsIds:goodsIds
});
if(status == 200){
uni.hideLoading();
this.$refs.uToast.show({
title: message,
type: 'success'
})
this.getListAfter()
}
},
delHandle(item){
this.selected=item;
this.show = true
},
},
onReady() {
this.getList();
},
onReachBottom() {
if(this.list.length <= this.total){
this.pageNum ++;
this.getList();
}
},
}
</script>

@ -2,60 +2,162 @@
<view class="goods">
<view class="search">
<view class="box">
<image src="/static/news/icon-search.png"></image>
<input type="search" placeholder="搜索订单" />
<!-- <image src="/static/news/icon-search.png"></image>
<input type="search" placeholder="搜索订单" /> -->
<u-search height="50" @search="getListAfter" @custom="getListAfter" placeholder="商品名称/编码" v-model="keyword"></u-search>
</view>
</view>
<view class="goods-bd">
<view class="li" v-for="i in 2" :key="i">
<view class="li" v-for="(i,index) in list" :key="index">
<view class="b">
<view class="item">
<view class="select">
<image mode="aspectFill" v-if="true" src="@/static/invoice/select.png" />
<view class="select" @click="selectItem(i,index)">
<image mode="aspectFill" v-if="!i.checked" src="@/static/invoice/select.png" />
<image mode="aspectFill" v-else src="@/static/invoice/select-on.png" />
</view>
<view class="pic">
<image mode="aspectFill" src="@/static/home/phone.jpg" />
<image mode="aspectFill" :src="i.goods_image" />
</view>
<!-- 此层wrap在此为必写的否则可能会出现标题定位错误 -->
<view class="info">
<view class="title">荣耀畅玩 40 Plus 全网通5G版 绿8GB+128GB</view>
<view class="title">{{i.goods_name}}</view>
<view class="sku">
16GB128GB
{{i.selling_point}}
</view>
<view class="fd">
<view class="price"><text>1120</text></view>
<view class="kc">库存20</view>
<view class="price"><text>{{i.goods_price_max}}</text></view>
<view class="kc">库存{{i.stock_total}}</view>
</view>
</view>
</view>
</view>
<view class="a">
<view class="status">商品状态上架中</view>
<view class="status">商品状态{{i.status==10?'上架':i.status==20?'下架':'未知'}}</view>
</view>
</view>
</view>
<view class="goods-fd">
<view class="a">
<image mode="aspectFill" v-if="true" src="@/static/invoice/select.png" />
<view class="a" @click="checkedAllHandle">
<image mode="aspectFill" v-if="!checkedAll" src="@/static/invoice/select.png" />
<image mode="aspectFill" v-else src="@/static/invoice/select-on.png" />全选
</view>
<view class="b"><text>0</text>件商品</view>
<view class="c">删除</view>
<view class="b"><text>{{checkedList.length}}</text>件商品</view>
<view class="c" @click="show=true">删除</view>
</view>
<u-toast ref="uToast" />
<u-modal v-model="show" content="确定删除选中商品吗" :show-cancel-button="true" @cancel="show=false" @confirm="delConfirm"></u-modal>
</view>
</template>
<script>
import * as newFunApi from '@/api/newFun'
export default {
data() {
return {
list: [],
keyword: "",
total: 0,
pageNum: 1,
checkedAll:false,
checkedList:[],
show:false,
};
},
// watch:{
// list:{
// deep:true,
// handler:function(){
// }
// }
// },
methods: {
selectItem(item,index){
if(this.list[index].checked){//
if(this.checkedList.indexOf(item.goods_id)!=-1){
this.checkedList.splice(this.checkedList.indexOf(item.goods_id), 1);
}
this.list[index].checked = false
}else{//
if(this.checkedList.indexOf(item.goods_id)==-1){
this.checkedList.push(item.goods_id)
}
this.list[index].checked = true
}
if (this.list.length == this.checkedList.length) {
this.checkedAll = true;
} else {
this.checkedAll = false;
}
},
checkedAllHandle(){
this.checkedList=[]
if(this.checkedAll){
this.checkedAll = false
this.list.forEach(item=>{
item.checked = false;
})
}else{
this.checkedAll = true;
this.list.forEach(item=>{
this.checkedList.push(item.goods_id)
item.checked = true
})
}
},
getListAfter(){
this.checkedList=[];
this.list = [];
this.getList()
},
async getList() {
uni.showLoading({
title:"加载中"
})
let {status, message, data} = await newFunApi.storeKeeperList({
goodsNo: "",
page: this.pageNum,
listType: "all",
goodsName: this.keyword
});
if(status == 200){
uni.hideLoading();
this.list = this.list.concat(data.list.data)
this.total = data.list.total
}
},
async delConfirm(){
let {status, message, data} = await newFunApi.delGoods({
goodsIds:this.checkedList
});
if(status == 200){
uni.hideLoading();
this.$refs.uToast.show({
title: message,
type: 'success'
})
this.getListAfter()
}
},
delHandle(item){
this.selected=item;
this.show = true
},
},
onReady() {
this.getListAfter();
},
onReachBottom() {
if(this.list.length <= this.total){
this.pageNum ++;
this.getList();
}
},
}
</script>
@ -94,10 +196,10 @@
color: #ED2B00;
padding: 0 10rpx;
}
font-size: 28rpx;
font-size: 26rpx;
font-weight: 400;
color: #A2A2A2;
margin-right: 20rpx;
margin-right: 16rpx;
}
.c{
width: 408rpx;

@ -2,32 +2,33 @@
<view class="goods">
<view class="search">
<view class="box">
<image src="/static/news/icon-search.png" @click="getList()"></image>
<input v-model="keyword" type="search" placeholder="商品名称/编码" />
<!-- <image src="/static/news/icon-search.png" @click="getList()"></image>
<input v-model="keyword" type="search" placeholder="商品名称/编码" /> -->
<u-search height="50" @search="getListAfter" @custom="getListAfter" placeholder="商品名称/编码" v-model="keyword"></u-search>
</view>
</view>
<view class="goods-bd">
<view class="li" v-for="i in 2" :key="i">
<view class="li" v-for="(i,index) in list" :key="index">
<view class="b">
<view class="item">
<view class="pic">
<image mode="aspectFill" src="@/static/home/phone.jpg" />
<image mode="aspectFill" :src="i.goods_image" />
</view>
<!-- 此层wrap在此为必写的否则可能会出现标题定位错误 -->
<view class="info">
<view class="title">荣耀畅玩 40 Plus 全网通5G版 绿8GB+128GB</view>
<view class="title">{{i.goods_name}}</view>
<view class="sku">
16GB128GB
{{i.selling_point}}
</view>
<view class="fd">
<view class="price"><text>1120</text></view>
<view class="kc">库存20</view>
<view class="price"><text>{{i.goods_price_max}}</text></view>
<view class="kc">库存{{i.stock_total}}</view>
</view>
</view>
</view>
</view>
<view class="a">
<view class="status">商品状态上架中</view>
<view class="status">商品状态{{i.status==10?'上架':i.status==20?'下架':'未知'}}</view>
</view>
</view>
</view>
@ -49,12 +50,16 @@
this.getList();
},
onReachBottom() {
if(this.articleList.length <= this.total){
if(this.list.length <= this.total){
this.pageNum ++;
this.getList();
}
},
methods: {
getListAfter(){
this.list = [];
this.getList()
},
/**
* 获取列表
*/

@ -3,23 +3,24 @@
<view class="dispatchContent">
<view class="orderNum">
订单号7868867676878676876
订单号{{orderInfo.order_no}}
</view>
<view class="dispatchItem">
<image src="/static/news3/filter.png" mode="aspectFill"></image>
<view class="dispatchItem" v-for="item in orderInfo.goods">
<image :src="item.goods_image" mode="aspectFill"></image>
<view class="right">
<view class="title">
联想小新笔记本电脑2023年新款
{{item.goods_name}}
</view>
<view class="subTitle">
16GB128GB
<view class="subTitle" v-for="p in item.goods_props" :key="p.group">
{{p.group.name}}:{{p.value.name}}
</view>
<view class="num">
x1
x{{item.total_num}}
</view>
<view class="price">
<text style="font-size: 26upx;">¥</text>
<text>288</text>
<text>{{item.total_price}}</text>
</view>
</view>
</view>
@ -36,7 +37,7 @@
</view>
<u-icon name="arrow-right" color="#C3C3C3" size="28"></u-icon>
</view> -->
<u-field @click="showAction" v-model="wuliu"
<u-field @click="wuliuShow=true" v-model="wuliu"
:disabled="true" label="物流公司" placeholder="请选择物流公司"
right-icon="arrow-down-fill"
>
@ -79,13 +80,29 @@ export default{
}
],
wuliu:'',
codeNum:''
codeNum:'',
orderInfo:{},
expressList:[],
}
},
methods:{
showAction(){
this.wuliuShow = true;
},
async getWuliuList(){
let {status, message, data} = await newFunApi.wuliuList();
if(status == 200){
uni.hideLoading();
this.expressList = data.list
}
},
},
onLoad(option){
console.log(option)
this.orderInfo = JSON.parse(option.item)
console.log(this.orderInfo)
this.getWuliuList()
}
}
</script>

@ -3,64 +3,65 @@
<view class="head-info">
<!-- 搜索 -->
<view class="searchContent">
<u-input v-model="searchText" placeholder="输入订单编号/收件人名字/电话商品名称"/>
<u-icon name="search" class="search"></u-icon>
<view class="filter" @click="getFilterHandle">
<u-search height="50" @search="getListAfter" @custom="getListAfter" placeholder="输入订单编号/收件人名字/电话商品名称" v-model="keyword"></u-search>
<!-- <u-input v-model="keyword" placeholder="输入订单编号/收件人名字/电话商品名称"/> -->
<!-- <u-icon name="search" class="search"></u-icon> -->
<!-- <view class="filter" @click="getFilterHandle">
<image src="/static/news3/filter.png" mode="widthFix"></image>
<text>筛选</text>
</view>
</view> -->
</view>
</view>
<!-- 分类列表 -->
<view class="container">
<view class="classify-list">
<view class="list" v-for="(item,index) in classList"
:class="{'action':classifyShow==index}"
:class="{'action':classifyShow==item.id}"
@click="onClassify(item,index)"
:key="index">
<text>{{item.name}}</text>
<text class="line" v-show="classifyShow==index"></text>
<text class="line" v-show="classifyShow==item.id"></text>
</view>
</view>
</view>
<view class="shopContent">
<view class="shopItem" v-for="(item,index) in goodsList" :key="index">
<view class="orderInfo">
<text>订单号{{item.orderNum}}</text>
<text class="statusText">{{getLable(item.status)}}</text>
<text>订单号{{item.order_no}}</text>
<text class="statusText">{{item.state_text}}</text>
</view>
<view class="shopItemInfo" v-for="(p,i) in item.children" :key="i">
<image :src="p.image"></image>
<view class="shopItemInfo" v-for="(p,i) in item.goods" :key="i">
<image :src="p.goods_image"></image>
<view class="priceCon">
<text class="num">x{{p.num}}</text>
<text class="num">x{{p.total_num}}</text>
<view class="priceText">
<text style="font-size: 26upx;">¥</text>
<text>{{p.price}}</text>
<text>{{p.total_price}}</text>
</view>
</view>
</view>
<view class="totalNum">
<text>含运费¥{{item.yunfei}}</text>
<text>含运费¥{{item.third_money}}</text>
<text>共计</text>
<text>¥{{item.total}}</text>
<text>¥{{item.total_price}}</text>
</view>
<view class="remark">
<view class="remarkTitle">
收件人姓名 {{item.phone}}
收件人姓名 {{item.address?item.address.name:''}}
</view>
<view class="remarkContent">
{{item.remark}}
</view>
</view>
<view class="btnGroup">
<view class="btn info" v-show="item.status==2||item.status==1">修改地址</view>
<view class="btn primary" v-show="item.status==2||item.status==1">修改价格</view>
<view class="btn primary" v-show="item.status==2">发货</view>
<view class="btn info" v-show="item.status==23">拒绝</view>
<view class="btn primary" v-show="item.status==3">同意</view>
<view class="btn info" v-show="item.status==4||item.status==6">删除订单</view>
<view class="btn info" @click="afterSale=true" v-show="item.status==7">转至售后</view>
<view class="btn primary" v-show="item.status==7">修改物流</view>
<view class="btn info" v-show="item.state_text=='待发货'||item.state_text=='待付款'">修改地址</view>
<view class="btn primary" v-show="item.state_text=='待发货'||item.state_text=='待付款'">修改价格</view>
<view class="btn primary" v-show="item.state_text=='待发货'" @click="goJump('/pages/news3/sendOutGoods',item)">发货</view>
<view class="btn info" v-show="item.state_text=='refund'">拒绝</view>
<view class="btn primary" v-show="item.state_text=='refund'">同意</view>
<view class="btn info" v-show="item.state_text=='cancel'||item.state_text=='complete'">删除订单</view>
<view class="btn info" @click="afterSale=true" v-show="item.state_text=='receipt'">转至售后</view>
<view class="btn primary" v-show="item.state_text=='receipt'">修改物流</view>
</view>
</view>
</view>
@ -152,75 +153,42 @@
<script>
import afterSale from './components/afterSales.vue'
import * as newFunApi from '@/api/newFun'
export default {
components:{afterSale},
data(){
return{
searchText:'',
classifyShow: 0,
classifyShow: 'all',
classList: [
{
id: 0,
id: 'all',
name: '全部',
},{
id: 1,
id: 'delivery',
name: '待发货',
},{
id: 2,
id: 'receipt',
name: '待验收',
},{
id: 3,
name: '售后订单',
id: 'pay',
name: '待付款',
},{
id: 4,
id: 'complete',
name: '已完成',
},{
id: 5,
name: '已退款',
id: 'refund',
name: '售后订单',
},{
id: 'apply_cancel',
name: '待取消',
},{
id: 6,
name: '已删除',
id: 'cancel',
name: '已取消',
},
],
goodsList:[
{
orderNum:7868867676878676876,
status:7,
total:5000,
yunfei:5,
name:'收件人姓名',
phone:'188989988900',
remark:'这里是备注',
children:[
{image:'/static/news3/filter.png',num:1,price:2500},
{image:'/static/news3/filter.png',num:1,price:2500},
]
},{
orderNum:7868867676878676876,
status:2, //
total:5000,
yunfei:5,
name:'收件人姓名',
phone:'188989988900',
remark:'这里是备注',
children:[
{image:'/static/news3/filter.png',num:1,price:2500},
{image:'/static/news3/filter.png',num:1,price:2500},
]
},{
orderNum:7868867676878676876,
status:3, //
total:5000,
yunfei:5,
name:'收件人姓名',
phone:'188989988900',
remark:'这里是备注',
children:[
{image:'/static/news3/filter.png',num:1,price:2500},
{image:'/static/news3/filter.png',num:1,price:2500},
]
},
],
show:false,
timeShow:false,
@ -239,46 +207,43 @@ export default {
payIndex:0,
startTime:null,
endTime:null,
classList: [
{
id: 0,
name: '全部',
},{
id: 1,
name: '待付款',
},{
id: 2,
name: '待发货',
},{
id: 3,
name: '售后订单',
},{
id: 4,
name: '已退款',
},{
id: 5,
name: '已完成',
},{
id: 6,
name: '已删除',
},
{
id: 7,
name: '待收货',
}
],
pageNum:1,
keyword: "",
total: 1,
pageNum: 1,
// classList: [
// {
// id: 0,
// name: '',
// },{
// id: 1,
// name: '',
// },{
// id: 2,
// name: '',
// },{
// id: 3,
// name: '',
// },{
// id: 4,
// name: '退',
// },{
// id: 5,
// name: '',
// },{
// id: 6,
// name: '',
// },
// {
// id: 7,
// name: '',
// }
// ],
}
},
onReady() {
// uni.setNavigationBarTitle({
// title: '',
// })
// uni.setNavigationBarColor({
// frontColor: '#ffffff',
// backgroundColor: '#fe3b0f',
// })
this.getList()
},
onLoad() {
@ -291,17 +256,69 @@ export default {
},
methods:{
getLable(val){
let arr = this.classList.filter(item=>{
return val==item.id
async getList() {
uni.showLoading({
title:"加载中"
})
return arr[0].name
let {status, message, data} = await newFunApi.shopOrderList({
dataType: this.classifyShow,
page: this.pageNum,
searchValue: this.keyword
});
if(status == 200){
uni.hideLoading();
this.goodsList = this.goodsList.concat(data.list.data)
this.total = data.list.total
}
},
sendGoodsHandle(){
// let params={
// "orderId": 10004,
// "form": {
// "deliveryMethod": 10,
// "packGoodsData": [
// {
// "orderGoodsId": 10004,
// "deliveryNum": 1
// }
// ],
// "expressId": 10005,
// "expressNo": "222",
// "syncMpWeixinShipping": 1
// }
// }
// let {status, message, data} = await newFunApi.sendGoods({
// dataType: this.classifyShow,
// page: this.pageNum,
// searchValue: this.keyword
// });
// if(status == 200){
// uni.hideLoading();
// this.goodsList = this.goodsList.concat(data.list.data)
// this.total = data.list.total
// }
},
goJump(path,value){
uni.navigateTo({
url: path+'?item='+JSON.stringify(value),
})
},
getListAfter(){
this.goodsList = [];
this.getList()
},
getLable(val){
// let arr = this.classList.filter(item=>{
// return val==item.id
// })
// return arr[0].name
},
onSearch(){
uni.navigateTo({url:''})
},
onClassify(item,index){
this.classifyShow = index;
this.classifyShow = item.id;
this.getListAfter()
},
setResourceIndex(index){
this.sourceIndex = index;
@ -318,7 +335,13 @@ export default {
this.$refs.afterSales.afterSale = true;
}
},
onReachBottom() {
if(this.goodsList.length <= this.total){
this.pageNum ++;
this.getList();
}
},
};
</script>

@ -92,19 +92,20 @@
src="https://lanhu.oss-cn-beijing.aliyuncs.com/FigmaDDSSlicePNG734520a67fe8e1d927b6d6e351bd2ade.png"
class="thumbnail_4"></image>
</view>
<view class="grounding" v-if="userInfo.user_type==1">
<view class="image-text_2">
<!-- v-if="userInfo.user_type==1" -->
<view class="grounding">
<view class="image-text_2" @click="goJump('/pages/news/goods/oneGrounding')">
<image src="/static/user/shelf.png" class="label_1"></image>
<view class="text-group_2">
<text lines="1" class="text_7">2</text>
<text lines="1" class="text_8">一键上架</text>
</view>
</view>
<view class="box_3">
<view class="box_3" @click="goJump('/pages/news/goods/batchdel')">
<image src="/static/user/deal.png" class="image_4"></image>
<text lines="1" class="text_9">删除商品</text>
</view>
<view class="image-text_4">
<view class="image-text_4" @click="goJump('/pages/news/goods/list')">
<image src="/static/user/search.png" class="label_3"></image>
<text lines="1" class="text-group_4">商品查询</text>
</view>
@ -163,7 +164,7 @@
<view class="goodsManage">
<view class="manageTitle">
<text lines="1" class="text_5 titleLeft">商品订单</text>
<text lines="1" class="text_6 titleRight" @click="goOrder">查看全部</text>
<text lines="1" class="text_6 titleRight" @click="goJump('/pages/news3/shopOrder')">查看全部</text>
<image
src="https://lanhu.oss-cn-beijing.aliyuncs.com/FigmaDDSSlicePNG734520a67fe8e1d927b6d6e351bd2ade.png"
class="thumbnail_4"></image>
@ -545,6 +546,11 @@
url: "/pages/news/recycling/orderList?type=" + type
})
},
goJump(path){
uni.navigateTo({
url: path
})
},
goLogin() {
//
uni.navigateTo({

Loading…
Cancel
Save