wangfukang 3 years ago
parent
commit
6c6ced7f3d
  1. 3
      pages/billing/addUser.vue
  2. 87
      pages/index/order.vue
  3. 6
      pages/index/peopleList.vue
  4. 344
      pages/inventory/gategory.vue
  5. 226
      pages/inventory/gategoryLow.vue
  6. 74
      pages/inventory/inventory.vue

3
pages/billing/addUser.vue

@ -53,8 +53,7 @@
address: '',
province: '',
city: '',
area: '',
id: ''
area: ''
},
// 单选数据源
sexs: [{

87
pages/index/order.vue

@ -5,28 +5,44 @@
<uni-search-bar class="uni-mt-10" radius="5" placeholder="输入客户名称/销售人员搜索" cancelButton="none"
@confirm="searchList" />
</view>
<u-alert description="点击可跳转至销售单" type="primary"></u-alert>
<!-- <u-alert description="点击列表可跳转至销售单" type="primary"></u-alert> -->
<view class="u-transition" style="display:flex;background: #ecf5ff;width: 100%;color: #5fd9ee;height: 80rpx;line-height: 80rpx;padding-left: 20rpx;">
<view>点击列表可跳转至销售单</view>
<!-- <view @tap.stop="printCodeBtn" class="dayin-text" v-if="btnStatus">打印商品码</view>
<view @tap.stop="printCodeBtn" class="dayin-text" v-else>取消操作</view> -->
</view>
<view class="ulList" v-if="inventoryList.length > 0" style="overflow: scroll;margin-top:300rpx;">
<ul>
<li v-for="item in inventoryList" @tap="gotoDetail(item.id)">
<uni-card :title="item.userName == null ?'暂无':item.userName" :sub-title="item.createTime == null ?'暂无':item.createTime" :extra="'数量:'+(item.productCount == null ?'暂无':item.productCount)"
:thumbnail="item.saleDetailDTOList[0].productPicture">
<view class="uni-body"><text class="cardText">销售员:</text> {{item.createByName == null ?'暂无':item.createByName}}</view>
<view class="uni-body"> <text class="cardText"> 营业额:</text> <text class="priceText">
{{item.realAmount == null ?'暂无':item.realAmount}} </text> <text decode class="cardText">
{{'&nbsp;&nbsp;&nbsp;&nbsp; 欠款: '}} </text> <text class="priceText">{{item.noEarn == null ?'暂无':item.noEarn}}
</text></view>
<view class="uni-body"> <text class="cardText">
订单状态:</text>{{item.status == 0 ?'待抢单' :item.status == 1 ?'待取货':item.status == 2 ?'作废' :item.status == 3 ?'待送达' :item.status == 4 ?'已完成' :item.status == 5 ?'下游客户待退货' :item.status == 00 ?'退货待抢单' :item.status == 01 ?'退货待取货' :item.status == 03 ?'退货待送达' :item.status == 04 ?'待确认退货' :item.status == 6 ?'待配货' :'挂单'}}
</view>
<view class="floatRight" v-if="item.status == 6" @tap.stop="goSaleGoods(item)">去开单</view>
<view class="floatRight" style="color: red;width: 150rpx;" @tap.stop="delItemModal(item)" v-if="item.status == 6">删除订单</view>
</uni-card>
</li>
<ul :style="{'margin-bottom':btnStatus==false?'160rpx':''}">
<li v-for="item in inventoryList">
<checkbox-group @change="checkboxChange">
<label class="uni-list-cell uni-list-cell-pd" >
<checkbox v-if="btnStatus==false" :value="item" style="float: left;width: 60rpx;line-height: 300rpx;margin: 0 20rpx;" />
<view :style="{width:btnStatus==false?'95%':'100%'}" @tap="gotoDetail(item.id)">
<uni-card :title="item.userName == null ?'暂无':item.userName" :sub-title="item.createTime == null ?'暂无':item.createTime" :extra="'数量:'+(item.productCount == null ?'暂无':item.productCount)"
:thumbnail="item.saleDetailDTOList[0].productPicture">
<view class="uni-body"><text class="cardText">销售员:</text> {{item.createByName == null ?'暂无':item.createByName}}</view>
<view class="uni-body"> <text class="cardText"> 营业额:</text> <text class="priceText">
{{item.realAmount == null ?'暂无':item.realAmount}} </text> <text decode class="cardText">
{{'&nbsp;&nbsp;&nbsp;&nbsp; 欠款: '}} </text> <text class="priceText">{{item.noEarn == null ?'暂无':item.noEarn}}
</text></view>
<view class="uni-body"> <text class="cardText">
订单状态:</text>{{item.status == 0 ?'待抢单' :item.status == 1 ?'待取货':item.status == 2 ?'作废' :item.status == 3 ?'待送达' :item.status == 4 ?'已完成' :item.status == 5 ?'下游客户待退货' :item.status == 00 ?'退货待抢单' :item.status == 01 ?'退货待取货' :item.status == 03 ?'退货待送达' :item.status == 04 ?'待确认退货' :item.status == 6 ?'待配货' :'挂单'}}
</view>
<view class="floatRight" v-if="item.status == 6" @tap.stop="goSaleGoods(item)">去开单</view>
<view class="floatRight" style="color: red;width: 150rpx;" @tap.stop="delItemModal(item)" v-if="item.status == 6">删除订单</view>
</uni-card>
</view>
</label>
</checkbox-group>
</li>
<u-loadmore :status="status" />
</ul>
<u-loadmore :status="status" />
</view>
<u-empty v-else mode="order" margin-top="200"></u-empty>
<u-empty v-else mode="order" margin-top="200"></u-empty>
<!-- <view class="order-bottom" v-if="btnStatus==false">
<button>批量打印商品码</button>
</view> -->
</view>
</template>
@ -41,7 +57,8 @@
page: 1,
totalPages: 0,
// type:'',
range:[]
range:[],
btnStatus:true
};
},
onLoad(options) {
@ -125,6 +142,13 @@
url: '/pages/inventory/goodsList1'
})
},
//点击打印按钮
printCodeBtn(){
this.btnStatus = !this.btnStatus
},
// checkboxChange(e){
// console.log(JSON.parse(e.detail.value))
// },
delItemModal(item) {
let that = this;
@ -173,6 +197,13 @@
}
.uni-searchbar{
padding: 20rpx 0 !important;
}
.dayin-text{
flex: 1;
text-align: right;
padding-right: 20rpx;
text-decoration: underline;
color: blue;
}
.ulList {
@ -197,5 +228,21 @@
}
}
}
}
.order-bottom{
background: #fff;
height: 120rpx;
width: 100%;
position: fixed;
bottom:0;
button{
width: 90%;
height: 80rpx;
margin: 0 auto;
background: #088FEB;
color: #fff;
margin-top: 20rpx;
}
}
</style>

6
pages/index/peopleList.vue

@ -76,7 +76,7 @@
</view>
</view>
<!--快递、拉包工 -->
<view class="" v-if="popleType== 'kdName' || popleType== 'lbgName'">
<view class="" v-if="popleType== 'kdName' || popleType== 'lbgName' || popleType== 'kdyName'">
<view class="list-1" :style="{height:popleType == 'kdName'?'75rpx':'120rpx'}" style="display: flex;position: relative;" @tap="clickList(item)" v-for="item in popleList" :key="item">
<view class="name-tel">
<text style="line-height: 75rpx;">{{item.companyName}}</text>
@ -188,7 +188,7 @@
} else {
this.popleList = [...this.popleList, ...res.result.content]
}
this.totalPages = res.result.pages
this.totalPages = res.result.number
}else{
this.tui.toast(res.message)
}
@ -319,7 +319,7 @@
} else {
this.popleList = [...this.popleList, ...res.result.content]
}
this.totalPages = res.result.pages
this.totalPages = res.result.totalPages
}else{
this.tui.toast(res.message)
}

344
pages/inventory/gategory.vue

@ -25,6 +25,38 @@
<uni-popup-dialog ref="inputClose" mode="input" :title="dialogTit" :value="inputVal" placeholder="请输入名称"
cancelText="删除" @confirm="dialogInputConfirm" @close="dialogDel">
</uni-popup-dialog>
</uni-popup>
<!-- 添加分类弹出层 -->
<uni-popup ref="addTypeDialog" background-color="#fff">
<view class="add-popup-content">
<view class="add-popup-title">
<text>新增分类</text>
<uni-icons @tap='close' type="closeempty" color='red' size="16"
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons>
</view>
<view class="add-popup-container">
<view>
<text style="color:red;font-size:22rpx;">*您可以点击默认项快捷添加分类,如没有想要的快捷项,可以手动输入</text>
</view>
<textarea name="" id="" style="width: 100%;border: 1px solid #eee;height: 80rpx;padding: 12px;margin:20rpx 0;" v-model="typeText"
placeholder="请输入分类名称"></textarea>
<ul>
<li v-for="(item,index) in defaultList" :key="index">
<view class="title-fur">
<view class="name">{{item.name}}</view>
</view>
<view class="content-fur">
<view class="content-low" :class="item1.checked?'checked':''" v-for="(item1,index1) in item.list" :key="index1"
@tap.stop="addMultipleType(item,item1.type,index1)">{{item1.type}}</view>
</view>
</li>
</ul>
<view class="add-popup-bottom">
<view class="add-popup-btn" @tap="dialogInputConfirm(typeText)">确认</view>
</view>
</view>
</view>
</uni-popup>
<!-- 查看商品库存弹出层 -->
<uni-popup ref="carPopup" background-color="#fff">
@ -79,7 +111,139 @@
isOpenId: '',
delType: '',
goodsList: [],
dialogTit: '输入分类名'
dialogTit: '输入分类名',
typeText:'',
defaultList:[{
name:'颜色',
list:[{
type:'白色',
checked:false,
},{
type:'黑色',
checked:false,
},{
type:'浅蓝',
checked:false,
},{
type:'蓝色',
checked:false,
},{
type:'灰色',
checked:false,
},{
type:'咖色',
checked:false,
},{
type:'紫色',
checked:false,
},{
type:'红色',
checked:false,
},{
type:'米色',
checked:false,
},{
type:'均色',
checked:false,
}]
},{
name:'通用尺码',
list:[{
type:'XS',
checked:false
},{
type:'S',
checked:false,
},{
type:'M',
checked:false,
},{
type:'L',
checked:false,
},{
type:'XL',
checked:false,
},{
type:'XXL',
checked:false,
},{
type:'XXXL',
checked:false,
},{
type:'XXXXL',
checked:false,
},{
type:'均码',
checked:false,
}]
},{
name:'尺码',
list:[{
type:'25码',
checked:false
},{
type:'26码',
checked:false
},{
type:'27码',
checked:false
},{
type:'28码',
checked:false
},{
type:'29码',
checked:false
},{
type:'30码',
checked:false
},{
type:'31码',
checked:false
},{
type:'32码',
checked:false
},{
type:'33码',
checked:false
},{
type:'34码',
checked:false
},{
type:'35码',
checked:false
},{
type:'36码',
checked:false
},{
type:'37码',
checked:false
},{
type:'38码',
checked:false
},{
type:'39码',
checked:false
},{
type:'40码',
checked:false
},{
type:'41码',
checked:false
},{
type:'42码',
checked:false
},{
type:'43码',
checked:false
},{
type:'44码',
checked:false
},{
type:'45码',
checked:false
}]
}],
multipleList:[]
}
},
computed: {
@ -124,7 +288,7 @@
this.inputVal = '';
this.isOpenId = item;
this.dialogTit = '输入分类名'
this.$refs.inputDialog.open()
this.$refs.addTypeDialog.open('bottom')
} else if (type == 'attrEdit') {
this.inputVal = item.attributeName;
this.editItem = item;
@ -178,13 +342,6 @@
dialogInputConfirm(e) {
switch (this.typeModel) {
case 'add':
if (e == "") {
uni.showToast({
title: "不能为空",
icon: 'none'
})
return;
}
for (let i = 0; i < this.indexList.length; i++) {
if (this.indexList[i].categoryName == e) {
uni.showToast({
@ -193,24 +350,33 @@
})
return
}
}
this.tui.request("/app/productCategory/save", "post", {
categoryName: e
}, false, true).then((res) => {
if (res.code == 200) {
this.getGategoryList()
uni.showToast({
title: "添加成功",
icon: 'none'
})
} else {
uni.showToast({
title: "添加失败",
icon: 'none'
})
}
}).catch((res) => {})
}
if(e != '' && this.multipleList == ''){
this.tui.request("/app/productCategory/save", "post", {
categoryName: e
}, false, true).then((res) => {
if (res.code == 200) {
this.tui.toast("添加成功")
setTimeout(res=> {
this.getGategoryList()
this.$refs.addTypeDialog.close()
},2000)
} else {
this.tui.toast("添加失败")
}
}).catch((res) => {})
}else if(e != '' && this.multipleList != ''){
this.tui.toast("暂无法使用")
setTimeout(res=> {
this.getGategoryList()
this.$refs.addTypeDialog.close()
},1000)
}else{
this.tui.toast("请选择分类后进行添加!")
}
this.$refs.addTypeDialog.val = ''
break;
case 'edit':
this.tui.request("/app/productCategory/edit", "post", {
@ -276,7 +442,60 @@
uni.navigateTo({
url: '/pages/inventory/gategoryLow?id=' + id
})
}
},
//选择多个规格保存
addMultipleType(item,item1,index){
console.log(item);
console.log(item1);
item.list[index].checked = !item.list[index].checked
var list = []
if(this.multipleList == ''){
console.log("首次");
list.push(item1)
var data = {
name:item.name,
list: list
}
this.multipleList.push(data)
}else{
for(var i=0;i<this.multipleList.length;i++){
if(this.multipleList[i].name == item.name){ //同种分类
console.log("同分类");
for(var m=0;m<this.multipleList[i].list.length;m++){
if(this.multipleList[i].list[m] == item1){ //规格相同
console.log("同规格");
this.multipleList[i].list.splice(m,1)
console.log(this.multipleList);
return;
}else{ //规格不同
if(m+1 == this.multipleList[i].list.length){
console.log("不同规格");
this.multipleList[i].list.push(item1)
console.log(this.multipleList);
return;
}
}
}
}else{ //不同分类
if(this.multipleList.length == i+1){
console.log("不同分类");
list.push(item1)
var data = {
name:item.name,
list: list
}
this.multipleList.push(data)
console.log(this.multipleList);
return;
}
}
}
}
console.log(this.multipleList);
},
}
}
</script>
@ -356,7 +575,10 @@
margin: 150rpx auto 0;
}
.checked{
background: #60F3FF;
color: #fff;
}
.card-list ul {}
.card-list li {
@ -449,5 +671,69 @@
margin: 0 auto;
background: linear-gradient(90deg, #60F3FF, #088FEB);
border-radius: 70rpx;
}
.add-popup-content {
align-items: center;
justify-content: center;
padding: 15px;
width: 100%;
height: 1300rpx;
background-color: #fff;
}
.add-popup-title {
font-size: 36rpx;
font-weight: bold;
text-align: center;
position: relative;
}
.add-popup-container {
margin-top: 20rpx;
}
.add-popup-bottom {
display: flex;
height: 80rpx;
color: #fff;
line-height: 80rpx;
margin-top: 50rpx;
}
.add-popup-btn {
flex: 1;
text-align: center;
background: linear-gradient(90deg, #60F3FF, #088FEB);
}
.title-fur {
width: 95%;
height: 70rpx;
margin: 0 auto;
border-bottom: 1px solid #eee;
.name {
font-size: 30rpx;
width: 50%;
float: left;
height: 70rpx;
line-height: 70rpx;
}
}
.content-fur {
padding-bottom: 25rpx;
}
.content-low {
width: auto;
border: 1px solid #eee;
display: inline-block;
min-width: 90rpx;
padding: 5rpx;
font-size: 35rpx;
text-align: center;
color: #777;
margin: 20rpx 0 0 20rpx;
}
</style>

226
pages/inventory/gategoryLow.vue

@ -30,38 +30,6 @@
@confirm="dialogInputConfirm" @close="dialogClose">
</uni-popup-dialog>
</uni-popup>
<!-- 添加分类弹出层 -->
<uni-popup ref="addTypeDialog" background-color="#fff">
<view class="add-popup-content">
<view class="add-popup-title">
<text>新增分类</text>
<uni-icons @tap='close' type="closeempty" color='red' size="16"
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons>
</view>
<view class="add-popup-container">
<view>
<text style="color:red;font-size:22rpx;">*您可以点击默认项快捷添加分类,如没有想要的快捷项,可以手动输入</text>
</view>
<textarea name="" id="" style="width: 100%;border: 1px solid #eee;height: 80rpx;padding: 12px;margin:20rpx 0;" v-model="typeText"
placeholder="请输入分类名称"></textarea>
<ul>
<li v-for="(item,index) in defaultList" :key="index">
<view class="title-fur">
<view class="name">{{item.name}}</view>
</view>
<view class="content-fur">
<view class="content-low" :class="item1.checked?'checked':''" v-for="(item1,index1) in item.list" :key="index1"
@tap.stop="addMultipleType(item,item1.type,index1)">{{item1.type}}</view>
</view>
</li>
</ul>
<view class="add-popup-bottom">
<view class="add-popup-btn" @tap="dialogInputConfirm(typeText)">确认</view>
</view>
</view>
</view>
</uni-popup>
<!-- 查看商品库存弹出层 -->
<uni-popup ref="carPopup" background-color="#fff">
<view class="popup-content" style="height:auto !important;">
@ -120,140 +88,7 @@
showList: {},
dialogTit: '输入分类名',
categoryId: '',
goodsList: [],
typeText:'',
// type: 'center',
defaultList:[{
name:'颜色',
list:[{
type:'白色',
checked:false,
},{
type:'黑色',
checked:false,
},{
type:'浅蓝',
checked:false,
},{
type:'蓝色',
checked:false,
},{
type:'灰色',
checked:false,
},{
type:'咖色',
checked:false,
},{
type:'紫色',
checked:false,
},{
type:'红色',
checked:false,
},{
type:'米色',
checked:false,
},{
type:'均色',
checked:false,
}]
},{
name:'通用尺码',
list:[{
type:'XS',
checked:false
},{
type:'S',
checked:false,
},{
type:'M',
checked:false,
},{
type:'L',
checked:false,
},{
type:'XL',
checked:false,
},{
type:'XXL',
checked:false,
},{
type:'XXXL',
checked:false,
},{
type:'XXXXL',
checked:false,
},{
type:'均码',
checked:false,
}]
},{
name:'尺码',
list:[{
type:'25码',
checked:false
},{
type:'26码',
checked:false
},{
type:'27码',
checked:false
},{
type:'28码',
checked:false
},{
type:'29码',
checked:false
},{
type:'30码',
checked:false
},{
type:'31码',
checked:false
},{
type:'32码',
checked:false
},{
type:'33码',
checked:false
},{
type:'34码',
checked:false
},{
type:'35码',
checked:false
},{
type:'36码',
checked:false
},{
type:'37码',
checked:false
},{
type:'38码',
checked:false
},{
type:'39码',
checked:false
},{
type:'40码',
checked:false
},{
type:'41码',
checked:false
},{
type:'42码',
checked:false
},{
type:'43码',
checked:false
},{
type:'44码',
checked:false
},{
type:'45码',
checked:false
}]
}],
multipleList:[]
goodsList: []
}
},
computed: {
@ -374,59 +209,6 @@
}
}).catch((res) => {})
})
},
//选择多个规格保存
addMultipleType(item,item1,index){
console.log(item);
console.log(item1);
item.list[index].checked = !item.list[index].checked
var list = []
if(this.multipleList == ''){
console.log("首次");
list.push(item1)
var data = {
name:item.name,
list: list
}
this.multipleList.push(data)
}else{
for(var i=0;i<this.multipleList.length;i++){
if(this.multipleList[i].name == item.name){ //同种分类
console.log("同分类");
for(var m=0;m<this.multipleList[i].list.length;m++){
if(this.multipleList[i].list[m] == item1){ //规格相同
console.log("同规格");
this.multipleList[i].list.splice(m,1)
console.log(this.multipleList);
return;
}else{ //规格不同
if(m+1 == this.multipleList[i].list.length){
console.log("不同规格");
this.multipleList[i].list.push(item1)
console.log(this.multipleList);
return;
}
}
}
}else{ //不同分类
if(this.multipleList.length == i+1){
console.log("不同分类");
list.push(item1)
var data = {
name:item.name,
list: list
}
this.multipleList.push(data)
console.log(this.multipleList);
return;
}
}
}
}
console.log(this.multipleList);
},
// 获取属性值
getProductAttributeValue(index) {
@ -455,9 +237,9 @@
this.isOpenId = item;
if (type == 'add') {
this.dialogTit = '输入分类名'
} else if (type == 'attrAdd') {
this.$refs.addTypeDialog.open('bottom')
return;
} else if (type == 'attrAdd') {
this.dialogTit = '输入分类名'
// this.$refs.addTypeDialog.open('bottom')
} else if (type == 'attrValAdd') {
this.dialogTit = '输入属性值'
}

74
pages/inventory/inventory.vue

@ -27,22 +27,29 @@
</view>
</view>
<view class="title-right" @tap.stop="onGridClick('0')">
<!-- <view class="title-right" @tap.stop="onGridClick('0')">
<view class="title-right-top title-btn">
分类管理
</view>
<view class="title-right-bottom title-btn" @tap.stop="onGridClick('2')">
新增商品
</view>
<view class="title-right-bottom title-btn"
@tap.stop="onGridClick('1')">
新增入库
</view>
</view> -->
<view class="title-right">
<view class="title-right-top title-btn" @tap.stop="onGridClick('1')">
新增入库
</view>
<view class="title-right-bottom title-btn" @tap.stop="onGridClick('3')">
更多
</view>
</view>
</view>
<view class="search">
<uni-search-bar class="uni-mt-10" radius="5" placeholder="商品名称/货号/供应商" cancelButton="none" @confirm="search" />
<view class="title-right-bottom title-btn"
style="width:22%;float: left;height:75rpx;line-height: 75rpx;margin-top:5px;"
@tap.stop="onGridClick('1')">
新增入库
</view>
</view>
<view class="content-box">
<view class="content-left">
@ -85,7 +92,23 @@
</view>
</view>
</view>
<!-- 弹出输入框 -->
<uni-popup ref="payDialog" background-color="#fff">
<view class="popup-pay-content">
<view class="popup-pay-title">
<text>请选择</text>
</view>
<view class="popup-pay-container" @tap="onGridClick('0')">
<text style="display: inline-block">分类管理</text>
</view>
<view class="popup-pay-container" @tap="onGridClick('2')">
<text style="display: inline-block">新增商品</text>
</view>
<view class="popup-pay-container" @tap="onGridClick('4')">
<text style="display: inline-block">批量打印商品码</text>
</view>
</view>
</uni-popup>
</view>
</template>
@ -223,7 +246,7 @@
this.searchName = e.value
this.getShareList()
},
//点击头部 分类管理 和 新增入库 按钮
//点击头部 更多 和 新增入库 按钮
onGridClick(target) {
if (target == '0') {
uni.navigateTo({
@ -233,10 +256,16 @@
uni.navigateTo({
url: '/pages/inventory/addinventory'
})
} else {
} else if (target == '2') {
uni.navigateTo({
url: "/pages/inventory/addGoods"
})
}else if(target == '3'){
this.$refs.payDialog.open('center')
}else{
uni.navigateTo({
url: "/pages/inventory/batchPrint"
})
}
}
},
@ -434,5 +463,32 @@
line-height: 140rpx;
color: #777;
background: #eee;
}
.popup-pay-content {
align-items: center;
justify-content: center;
padding: 15px;
width: 500rpx;
height: auto;
background-color: #fff;
}
.popup-pay-title {
font-size: 36rpx;
font-weight: bold;
text-align: center;
position: relative;
}
.popup-pay-container {
margin-top: 20rpx;
height: 100rpx;
border-radius: 10px;
background: #088FEB;
line-height: 100rpx;
text-align: center;
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
color: #fff;
}
</style>
Loading…
Cancel
Save