wangfukang 2 years ago
parent
commit
f8d141a314
  1. BIN
      pages/.DS_Store
  2. 94
      pages/billing/addUser.vue
  3. 98
      pages/billing/changeGoods1.vue
  4. 7
      pages/index/checkShop.vue
  5. 1754
      pages/index/customAndSupplierProductDetail.vue
  6. 85
      pages/index/index.vue
  7. 74
      pages/index/shareStyle.vue
  8. 2
      pages/index/uparrears.vue
  9. 180
      pages/index/waitStorage.vue
  10. 743
      pages/index/waitStorageDetail.vue
  11. 1452
      pages/inventory/changeGoods1.vue
  12. 8283
      pages/inventory/goodsList1.vue
  13. 110
      pages/inventory/inventory.vue
  14. 42
      pages/inventory/inventoryDetail.vue
  15. 20
      pages/login/login.vue

BIN
pages/.DS_Store

Binary file not shown.

94
pages/billing/addUser.vue

@ -4,7 +4,7 @@
<view class="formBox">
<uni-forms ref="form" :modelValue="formData" :rules="rules" labelWidth="170rpx">
<uni-forms-item label="名称" name="consigneeName">
<uni-easyinput type="text" v-model="formData.consigneeName" placeholder="请输入名称" />
<uni-easyinput type="text" @blur="selectRepeat" v-model="formData.consigneeName" placeholder="请输入名称" />
<button @tap="getUserPhone">通讯录导入</button>
</uni-forms-item>
<uni-forms-item label="手机号码" name="consigneeMobile">
@ -130,8 +130,9 @@
this.formData.city = data.city
this.formData.province = data.province
this.formData.id = data.id
this.formData.consigneeMobile = data.consigneeMobile || data.phone
this.formData.consigneeName = data.consigneeName || data.name
this.formData.consigneeMobile = data.consigneeMobile || data.phone || ""
console.log(this.formData.consigneeMobile)
this.formData.consigneeName = data.consigneeName || data.name || ""
}
},
@ -164,6 +165,39 @@
this.showPrice = false
this.keyboardNum = ''
},
selectRepeat(e){
var that = this;
let url,data
if(this.popleType == 'khName'){
url = '/app/customer/findByUserName'
data = {
userName: e.detail.value,
}
}else if(this.popleType == 'gysName'){
url = '/app/supplier/getbySupplierName'
data = {
supplierName: e.detail.value
}
}
this.tui.request(url, "post", data, false, true).then((res) => {
if (res.code == 200) {
if(res.result.length > 0){
uni.showModal({
title: "提示",
content: "已经存在相同名称,是否继续添加?",
success: function(res) {
if (res.cancel) {
that.formData.consigneeName = ""
that.$forceUpdate()
}
}
})
}
} else {
}
})
},
del() {
this.delShow = true;
},
@ -322,13 +356,24 @@
uni.showToast({
title: "添加成功",
icon: 'none'
})
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2];
prevPage.$vm.popleType = 'khName'
uni.navigateBack({
delta: 1
})
})
if(uni.getStorageSync('kaidanBack')){
uni.removeStorageSync('kaidanBack')
let pages = getCurrentPages();
let prevPage = pages[pages.length - 3];
res.result.noEarn = this.formData.noEarn == ''?'0': this.formData.noEarn
prevPage.$vm.khName = res.result
uni.navigateBack({
delta: 2
})
}else{
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2];
prevPage.$vm.popleType = 'khName'
uni.navigateBack({
delta: 1
})
}
} else {
uni.showToast({
title: "添加失败",
@ -339,7 +384,8 @@
}
} else {
if (that.type == 'edit') {
if (that.type == 'edit') {
console.log('this.formData',this.formData)
that.tui.request("/app/supplier/edit", "post", this.formData, false,
true).then((res) => {
if (res.code == 200) {
@ -362,14 +408,24 @@
uni.showToast({
title: "添加成功",
icon: 'none'
})
let pages =
getCurrentPages();
let prevPage = pages[pages.length - 2];
prevPage.$vm.popleType = 'gysName'
uni.navigateBack({
delta: 1
})
})
if(uni.getStorageSync('kaidanBack')){
uni.removeStorageSync('kaidanBack')
let pages = getCurrentPages();
let prevPage = pages[pages.length - 3];
res.result.noEarn = this.formData.noEarn == ''?'0':this.formData.noEarn
prevPage.$vm.khName = res.result
uni.navigateBack({
delta: 2
})
}else{
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2];
prevPage.$vm.popleType = 'gysName'
uni.navigateBack({
delta: 1
})
}
} else {
uni.showToast({
title: "添加失败",

98
pages/billing/changeGoods1.vue

@ -1,7 +1,7 @@
<template>
<view>
<view class="title-box" style="height:8%;">
<uni-search-bar class="uni-mt-10" radius="5" placeholder="商品名称/货号/供应商" cancelButton="none" @confirm="search"
<uni-search-bar class="uni-mt-10" radius="5" placeholder="商品名称/货号/供应商" cancelButton="none"
@blur="search" @clear="clearSearch" />
</view>
<view class="content-left" style="height: 100%;float: left;position: fixed;top: 8%;">
@ -15,21 +15,21 @@
<view class="right-box" v-for="(item,index) in shopList" :key="index" @tap="toggle('bottom',item)">
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 -->
<!-- <view class="shop-mask" v-if="item.delFlag == 0"></view> -->
<view class="box-left">
<view class="box-left" @tap.stop="largeImg(item)">
<img class="img-radius" :src="item.productPicture" alt="" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
</view>
<view class="box-right">
<view class="box-right-name">
{{item.productSn}}
{{item.productSn}}({{item.productName == null ?'':item.productName}})
<text style="color: red;" v-if="item.delFlag == 0">(已下架)</text>
</view>
<view class="box-right-num">{{item.productName}}</view>
<view class="box-right-num">供应商:{{item.supplierName== null?'':item.supplierName}}</view>
<view class="box-right-price">
<view class="price-box" v-if="storageType== 0">
<!-- <view class="price-box" v-if="storageType== 0">
<text>{{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}</text>
<text>采购价</text>
</view>
</view> -->
<view class="price-box">
<text>{{item.wholesalePrice}}</text>
<text>批发价</text>
@ -49,18 +49,21 @@
<view class="right-box" v-for="(item,index) in shopList1" :key="index" @tap="toggle('bottom',item)">
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 -->
<!-- <view class="shop-mask" v-if="item.delFlag == 0 || item.purchasePrice==null || item.inStorageStatus == 0" @tap.stop="clickMask"></view> -->
<view class="box-left">
<view class="box-left" @tap.stop="largeImg(item)">
<img class="img-radius" :src="item.productPicture" alt="" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
</view>
<view class="box-right">
<view class="box-right-name">{{item.productName}}</view>
<view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-name">
{{item.productSn}}
<text v-if="item.productName">({{item.productName == null ?'':item.productName}})</text>
</view>
<view class="box-right-num">供应商:{{item.supplierName}}</view>
<view class="box-right-price">
<view class="price-box" v-if="storageType== 0">
<!-- <view class="price-box" v-if="storageType== 0">
<text>{{item.inStorageStatus==0?'待入库':item.purchasePrice == null ?'新商品':item.purchasePrice}}</text>
<text>采购价</text>
</view>
</view> -->
<view class="price-box">
<text>{{item.wholesalePrice}}</text>
<text>批发价</text>
@ -193,7 +196,19 @@
</view>
</view>
</uni-popup>
</view>
</view>
<!-- 弹出多图轮播 -->
<uni-popup ref="imgPopup" background-color="#fff">
<view class="showImg-box">
<swiper indicator-dots class="swiper-box" @change="lunbochange" circular autoplay :current="swiperDotIndex">
<swiper-item v-for="(item, index) in bigImg" :key="index">
<view class="swiper-item">
<image mode='aspectFit' :src="item.productPicture" alt="" style="width: 100%;height: 100%;border-radius: 10px;" /></image>
</view>
</swiper-item>
</swiper>
</view>
</uni-popup>
<uni-popup ref="goodsNumDialog" @change="keyWordChange" background-color="#fff">
<view class="add-popup-content">
<view class="add-popup-title">
@ -319,7 +334,9 @@
pecsList: [],
// status: 'loadmore',
pageOldTemList: [],
oldTemList: [],
oldTemList: [],
bigImg:[],
swiperDotIndex:0,
goodsList: [],
evalue: [],
newTemList: [],
@ -345,7 +362,12 @@
if (this.pageNum >= this.pages) return;
// this.status = 'loading';
this.pageNum++;
this.getShareList();
if(this.gateType == 'search'){
this.getShareList('search');
}else{
this.getShareList();
}
},
onLoad() {
this.height = wx.getSystemInfoSync().windowHeight
@ -353,7 +375,10 @@
this.storageType = uni.getStorageSync('type')
uni.setStorageSync('clearMsg', '1')
},
methods: {
methods: {
lunbochange(e) {
this.current = e.detail.current
},
//初始化获取分类列表
getGategoryList() {
this.tui.request("/app/productCategory/list", "get", {}, false, true).then((res) => {
@ -661,6 +686,9 @@
},
//顶部搜索框
search(e) {
this.pageNum = 1
this.shopList1 = []
this.shopList = []
if (e.value == '') {
this.searchName = ""
this.getShareList()
@ -683,7 +711,7 @@
data = {
categoryId: "",
searchStr: this.searchName,
pageNum: 1,
pageNum: this.pageNum,
pageSize: '10'
}
} else {
@ -973,6 +1001,25 @@
that.goodsNum = ''
})
this.$forceUpdate()
},
largeImg(img) {
if(img.productPicture == null &&img.productPictures == null ){
this.tui.toast("暂无可展示的图片")
return
}
this.bigImg = []
if(img.productPicture != null){
let data = {
productPicture:img.productPicture
}
this.bigImg.push(data)
}
if(img.productPictures != null){
for(let i=0;i<img.productPictures.length;i++){
this.bigImg.push(img.productPictures[i])
}
}
this.$refs.imgPopup.open()
},
//库存商品详情
getKCList(list) {
@ -1558,7 +1605,24 @@
right: -15rpx;
background-size: 100%;
}
.showImg-box{
width: 700rpx;
height: 1100rpx;
border-radius: 10px;
}
.swiper-box {
height: 1100rpx;
}
.swiper-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 1100rpx;
color: #fff;
background-color: #cee1fd;
border-radius: 10px;
}
.zuni-numbox {
height: 60rpx;
display: flex;

7
pages/index/checkShop.vue

@ -65,6 +65,7 @@
shopList: [],
shopId: null,
current: '',
shopOwnerName:'',
name: '',
type:''
}
@ -87,7 +88,8 @@
uni.setStorageSync('shopAddress', res.result.shopAddress)
uni.setStorageSync('shopIcon', res.result.shopIcon)
uni.setStorageSync('type', res.result.userType)
uni.setStorageSync('shopId', this.current)
uni.setStorageSync('shopId', this.current)
uni.setStorageSync("shopOwnerPhone", item.shopOwnerPhone)
this.tui.toast('切换店铺成功', 2000, true)
setTimeout(() => {
uni.reLaunch({
@ -197,7 +199,8 @@
this.name = item.companyName
}else{
this.current = item.shopId
this.name = item.shopName
this.name = item.shopName
this.shopOwnerName = item.shopOwnerName
}
},
onEditSave() {

1754
pages/index/customAndSupplierProductDetail.vue

File diff suppressed because it is too large

85
pages/index/index.vue

@ -45,7 +45,7 @@
</view> -->
</view>
</view>
<view class="waimai" @tap="quwaimai"></view>
<view class="waimai" :style="{'right':waimaiRight}" @tap="quwaimai"></view>
<view class="contentPadding">
<view class="title">
@ -66,19 +66,25 @@
<u-count-to :start-val="0" :end-val="type==0?shopInfo.totalProfit:0" :decimals="2"></u-count-to>
<view class="grid-text">今日利润</view>
</u-grid-item>
<u-grid-item>
<u-count-to :start-val="0" :end-val="shopInfo.totalCCount"></u-count-to>
<view class="grid-text">下单客户数</view>
</u-grid-item>
<u-grid-item>
<u-count-to :start-val="0" :end-val="shopInfo.returnTotalAmount"></u-count-to>
<view class="grid-text">退货金额</view>
</u-grid-item>
<u-grid-item>
<u-count-to :start-val="0" :end-val="shopInfo.returnTotalCount"></u-count-to>
<view class="grid-text">退货笔数</view>
</u-grid-item>
</u-grid>
<view style="display: flex;text-align: center;font-size: 30rpx;">
<view class="title-four">
<view style="line-height:80rpx;font-size:34rpx;">{{shopInfo.totalCCount}}</view>
<view>下单客户</view>
</view>
<view class="title-four">
<view style="line-height:80rpx;font-size:34rpx;">{{shopInfo.totalJCount}}</view>
<view>销售件数</view>
</view>
<view class="title-four">
<view style="line-height:80rpx;font-size:34rpx;">{{shopInfo.returnTotalAmount}}</view>
<view>退货金额</view>
</view>
<view class="title-four">
<view style="line-height:80rpx;font-size:34rpx;">{{shopInfo.returnTotalCount}}</view>
<view>退货数</view>
</view>
</view>
</view>
<view class="contentPadding">
<view class="title">
@ -144,7 +150,9 @@
isLink arrow-direction="left"></u-cell>
<u-cell icon="account-fill" url="/package1/index/returnOrder" title="退货单历史" clickable
isLink arrow-direction="left"></u-cell>
<view class="border-line"></view>
<view class="border-line"></view>
<u-cell icon="rewind-right-fill" url="/package1/index/updateShopMsg" title="更新店铺信息" clickable
isLink arrow-direction="left"></u-cell>
<u-cell v-if="shopName == '提钱退休' || shopName == '测试库新店' || shopName == '侧视颠仆'"
icon="integral-fill" url="/package1/AI/addAiList" title="管理员登录" clickable isLink
arrow-direction="left"></u-cell>
@ -209,6 +217,7 @@
chartData: {},
returnList:new Map(),
shopName: '',
waimaiRight:'-70rpx',
showDayPrice: false,
opts: {
padding: [15, 10, 0, 15],
@ -333,7 +342,7 @@
async cancelOrder(item, type) {
let that = this;
await this.getReturnOrder(item.id)
await this.tui.modal("提示", "您确定要撤销订单吗?", true, (res) => {
await this.tui.modal("提示", type=='goPay'?"您确定要撤销订单并重新开单吗?":"您确定要撤销订单吗?", true, (res) => {
if (res) {
that.cancelSale(item,type)
}
@ -425,7 +434,8 @@
obj.productName = item.saleDetailDTOList[i].productName
obj.productPicture = item.saleDetailDTOList[i].productPicture + '?time=' + new Date().getTime()
obj.productSn = item.saleDetailDTOList[i].productSn
obj.wholesalePrice = item.saleDetailDTOList[i].wholesalePrice
obj.wholesalePrice = item.saleDetailDTOList[i].discountAmount?item.saleDetailDTOList[i].discountAmount:item.saleDetailDTOList[i].wholesalePrice
// obj.discountAmount = item.saleDetailDTOList[i].discountAmount
obj.returnPrice = item.saleDetailDTOList[i].returnPrice
obj.saleId = item.id
obj.remark = item.remark
@ -518,9 +528,16 @@
},
//跳转外卖小程序
quwaimai() {
uni.openEmbeddedMiniProgram({
appId: 'wxf5362b6e97ecee2f'
})
if(this.waimaiRight == '-70rpx'){
this.waimaiRight = '20rpx'
}else{
uni.openEmbeddedMiniProgram({
appId: 'wxf5362b6e97ecee2f'
})
}
setTimeout(res=>{
this.waimaiRight = '-70rpx'
},2000)
},
gotoSearchData() {
uni.navigateTo({
@ -724,26 +741,6 @@
}
.u-grid-item:nth-child(2) {
background-image: linear-gradient(#FFBB77, #FFDCB9) !important;
}
.u-grid-item:nth-child(3) {
background-image: linear-gradient(#1AFD9C, #7AFEC6) !important;
}
.u-grid-item:nth-child(4) {
background-image: linear-gradient(#1AFD9C, #7AFEC6) !important;
}
.u-grid-item:nth-child(5) {
background-image: linear-gradient(#FFBB77, #FFDCB9) !important;
}
.u-grid-item:nth-child(6) {
background-image: linear-gradient(#84C1FF, #C4E1FF) !important;
}
.u-count-num {
color: #FFF !important
}
@ -800,7 +797,6 @@
.waimai {
position: fixed;
bottom: 0;
right: 20rpx;
background: url(https://jewel-shop.oss-cn-beijing.aliyuncs.com/cda1b75affd349118081f3880f815a0f.jpg) no-repeat;
background-size: 100%;
width: 130rpx;
@ -821,4 +817,13 @@
color: $u-primary;
font-size: 26upx;
}
.title-four{
width: 23% !important;
height: 160rpx;
background-image: linear-gradient(#1AFD9C, #7AFEC6) !important;
margin-left: 2%;
border-radius: 30rpx;
margin-top: 20rpx !important;
color: #fff !important;
}
</style>

74
pages/index/shareStyle.vue

@ -4,7 +4,7 @@
<uni-search-bar class="uni-mt-10" radius="5" placeholder="请输入商品名称" cancelButton="none" @blur="search" @clear="clearSearch" />
</view>
<view class="content-left" style="height: 85%;float: left;position: fixed;top: 100rpx;">
<view class="left-box" v-for="(item, index) in indexList" :key="index"
<view class="left-box" v-if="gateType == ''" v-for="(item, index) in indexList" :key="index"
:class="item.parentId ? 'left-box-hover':''" @tap="clickLeftBtn(index)">
<text style="width: 100%;height: 90rpx;line-height: 90rpx;display: inline-block;overflow: hidden;"
:class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
@ -20,10 +20,50 @@
</view>
<view class="box-right">
<view class="box-right-name">
{{item.productName}}
{{item.productName == null ?'':item.productName}}
<text style="color: red;" v-if="item.delFlag == 0">(已下架)</text>
</view>
<view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-num">供应商:{{item.supplierName == null ?'':item.supplierName}}</view>
<view class="box-right-price">
<view class="price-box" v-if="type==0">
<text>{{item.purchasePrice?item.purchasePrice:'暂无'}}</text>
<text>采购价</text>
</view>
<view class="price-box">
<text>{{item.wholesalePrice}}</text>
<text>批发价</text>
</view>
<view class="price-box">
<text>{{item.price}}</text>
<text>零售价</text>
</view>
<view class="price-box">
<text>{{item.stockCount}}</text>
<text>库存</text>
</view>
</view>
</view>
<checkbox-group @tap="checkboxChange(item)">
<label>
<checkbox :checked="item.checked" class="checkbox" />
</label>
</checkbox-group>
</view>
<view class="right-box" v-for="(item,index) in shopList1" :key="index" v-if="item.delFlag">
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 -->
<!-- <view class="shop-mask" v-if="item.delFlag == 0 || item.purchasePrice==null || item.inStorageStatus == 0" @tap.stop="clickMask"></view> -->
<view class="box-left">
<img class="img-radius" :src="item.productPicture" alt="" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
</view>
<view class="box-right">
<view class="box-right-name">
{{item.productName == null ?'':item.productName}}
<text style="color: red;" v-if="item.delFlag == 0">(已下架)</text>
</view>
<view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-num">供应商:{{item.supplierName== null?'':item.supplierName}}</view>
<view class="box-right-price">
<view class="price-box" v-if="type==0">
<text>{{item.purchasePrice?item.purchasePrice:'暂无'}}</text>
@ -128,6 +168,7 @@
shopList: [],
shopList1: [],
info: 0,
gateType:'',
goodsList: [],
categoryId: '', //分类id
searchName: '', //搜索框输入值
@ -151,8 +192,13 @@
console.log("触底")
if (this.pageNum >= this.pages) return;
// this.status = 'loading';
this.pageNum ++;
this.getShareList();
this.pageNum ++;
if(this.gateType == 'search'){
this.getShareList('search');
}else{
this.getShareList();
}
},
onShareTimeline() {
return {
@ -163,7 +209,7 @@
},
onShareAppMessage() {
return {
title: '查看我的推荐',
title: this.shopName + '的推荐',
imageUrl:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/70c3d9a274ff4feeb6df0bcb8be0f733.jpg',
path: '/pages/index/shareStyle?khid=' + this.khid
}
@ -183,7 +229,7 @@
this.type = uni.getStorageSync('type')
this.getGategoryList()
}
this.shopName = options.shopName ? options.shopName : uni.getStorageSync('shopName')
},
methods: {
//初始化获取分类列表
@ -228,7 +274,8 @@
}
}
this.$nextTick(()=>{
if(type=='search'){
if(type=='search'){
this.gateType = 'search'
this.shopList = []
this.status = 'nomore';
if (this.pages == 1) {
@ -237,7 +284,8 @@
this.shopList1 = [...this.shopList1, ...res.result.records]
}
this.pages = res.result.pages
}else{
}else{
this.gateType = ''
this.shopList1 = []
this.status = 'nomore';
if (this.pages == 1) {
@ -257,12 +305,16 @@
await this.getCheck()
},
//顶部搜索框
search(e) {
search(e) {
this.pageNum = 1
this.shopList1 = []
this.shopList = []
if(e.value == ''){
this.searchName = ""
this.getShareList()
}else{
this.searchName = e.value
this.searchName = e.value
this.getShareList('search')
}
@ -559,7 +611,7 @@
.right-box {
width: 100%;
height: 190rpx;
height: 240rpx;
display: flex;
border-bottom: 1px solid #eee;
position: relative;

2
pages/index/uparrears.vue

@ -82,7 +82,7 @@
},
returnPrice(item){
uni.navigateTo({
url: '/pages/index/waitStorageDetail?id='+ item.id
url: '/package1/index/waitStorageDetail?id='+ item.id
})
}
}

180
pages/index/waitStorage.vue

@ -1,31 +1,56 @@
<template>
<view>
<view class="search" style="position: fixed;top: 0;z-index: 99;">
<uni-datetime-picker style="margin-bottom:10px;" v-model="range" @change="searchTime" type="daterange" />
<uni-search-bar class="uni-mt-10" radius="5" placeholder="输入供应商/商品名称/货号查询" cancelButton="none"
@confirm="searchList" />
<view class="search" style="position: fixed;top: 0;z-index: 99;">
<uni-datetime-picker style="margin-bottom:10px;" v-model="range" @change="searchList" type="daterange" />
<view style="display: flex;">
<view style="width: 80%;" :style="{'width':inStorageStatus!= 0?'80%':'100%'}">
<uni-search-bar class="uni-mt-10" radius="5" placeholder="输入供应商名称搜索" cancelButton="none"
@confirm="searchList" />
</view>
<view style="width: 20%;" v-if="inStorageStatus!= 0">
<view style="width: 80%;height: 70rpx;background: #5fd9ee;text-align: center;line-height: 70rpx;border-radius: 10px;margin: 10px;color: #fff;" @tap="changeSort('paixu')">
查看
<uni-icons type="down" color="#fff" size="11" v-if="noDaysort == false"></uni-icons>
<uni-icons type="up" color="#fff" size="11" v-if="noDaysort"></uni-icons>
</view>
</view>
</view>
</view>
<view class="nahuo-mask" v-if="noDaysort">
<view style="width: 100%;margin: 0 auto;background: #fff;height: 200rpx;border: 1px solid #eee;border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;">
<view @tap="getCancelOrder()" class="paixu-content" style="border-bottom: 1px solid #eee;">
查看全部订单
</view>
<view @tap="getCancelOrder('1')" class="paixu-content">
查看已作废状态的订单
</view>
</view>
</view>
<u-alert description="点击可跳转至入库单" type="primary"></u-alert>
<view class="ulList" v-if="list.length > 0" style="overflow: scroll;margin-top:300rpx;">
<ul>
<li v-for="(item,index) in list" @tap="returnPrice(item)" :key="index">
<uni-card :title="'供应商:'+(item.supplierName == null ?'暂无':item.supplierName)"
:sub-title="item.createTime == null ?'暂无':item.createTime"
<li v-for="(item,index) in list" @tap="goDetail(item)" :key="index">
<uni-card :title="'供应商:'+(item.supplierName == null ?'暂无':item.supplierName)"
:sub-title="'操作时间:'+(item.purchaseTime == null ?'暂无':item.purchaseTime)"
:extra="'共'+(item.totalAmount == null ?'暂无':item.totalAmount) + '件'"
thumbnail="/static/images/dingdan/dd1.png">
thumbnail="/static/images/dingdan/dd1.png">
<view class="uni-body"><text class="cardText">
入库人:</text>{{item.createByName == null ?'暂无':item.createByName}}
入库时间:</text>{{item.createTime == null ?'暂无':item.createTime}}
</view>
<view class="uni-body"><text class="cardText">
入库人:</text>{{item.createByName == null ?'暂无':item.createByName}}
</view>
<view class="uni-body" v-if="item.inStorageStatus != 0 && type==0">
<text class="cardText">总成本:</text>
<text class="cardText">总成本:</text>
<text class="priceText">{{item.shouldPay == null ?'暂无':item.shouldPay}} </text>
<text decode class="cardText">{{'&nbsp;&nbsp;&nbsp;&nbsp; 欠款: '}} </text>
<text class="priceText">{{item.noPay == null ?'暂无':item.noPay}}</text>
<text class="priceText" style="color:red">{{item.noPay == null ?'暂无':item.noPay}}</text>
</view>
<view class="uni-body">
<text class="cardText">订单状态:</text>{{item.inStorageStatus == 0 ?'未入库' :item.inStorageStatus == 1 ?'已入库':item.inStorageStatus == 2 ?'AI识别-识别中...':item.inStorageStatus == 3 || (item.inStorageStatus == 4 && item.ocrCount > 0) ?'AI识别-识别完成':item.ocrCount == 0 && item.inStorageStatus == 4?'AI识别-识别失败':'暂无'}}
<text class="cardText">订单状态:</text>{{item.delFlag == 1 ?'已撤销':item.inStorageStatus == 0 ?'未入库' :item.inStorageStatus == 1 ?'已入库':item.inStorageStatus == 2 ?'AI识别-识别中...':item.inStorageStatus == 3 || (item.inStorageStatus == 4 && item.ocrCount > 0) ?'AI识别-识别完成':item.ocrCount == 0 && item.inStorageStatus == 4?'AI识别-识别失败':'暂无'}}
</view>
<view v-if="item.inStorageStatus== 0 && type==0" class="return-price" @tap.stop="returnPrice(item)">更新</view>
<view v-if="item.delFlag != 1 && type==0" class="return-price" @tap.stop="returnPrice(item,index)">撤销</view>
<view v-if="item.inStorageStatus == 2 || item.inStorageStatus == 3 || item.inStorageStatus == 4" class="return-price" style="width:105rpx;" @tap.stop="returnPrice(item)">AI入库</view>
</uni-card>
</li>
@ -54,7 +79,9 @@
supplierName: '',
startDate: '',
endDate: '',
type: '',
noDaysort:false,
type: '',
cancel:false,
pages: 1,
pageNum:1,
status: 'loadmore',
@ -66,16 +93,27 @@
this.type = uni.getStorageSync('type')
},
onShow(){
this.list = []
this.pageNum = 1
this.getList()
if(uni.getStorageSync('noReload') == true){
uni.removeStorageSync('noReload')
}else{
this.list = []
this.pageNum = 1
this.getList()
}
},
onReachBottom() {
if(this.inStorageStatus != 0){
if (this.pageNum >= this.pages) return;
this.status = 'loading';
this.pageNum += 1;
this.getList();
if(this.cancel == true){
this.getList("1");
}else{
this.getList();
}
}
},
methods: {
@ -87,16 +125,24 @@
this.pages = 1;
this.pageNum = 1;
this.list = [];
this.getList()
if(this.cancel == true){
this.getList("1");
}else{
this.getList();
}
},
searchList(res) {
this.searchStr = res.value
this.pages = 1;
this.pageNum = 1;
this.list = [];
this.getList()
this.list = [];
if(this.cancel == true){
this.getList("1");
}else{
this.getList();
}
},
getList() {
getList(type) {
var url,data;
if(this.inStorageStatus == 0){
this.tui.request("/app/purchase/list", "POST", {
@ -109,7 +155,9 @@
this.list = res.result.records
} else {
this.list = [...this.list, ...res.result.records]
}
}
this.searchStr = ""
this.noDaysort = false
} else {
this.tui.toast(res.message)
}
@ -119,7 +167,8 @@
inStorageStatus: this.inStorageStatus,
searchStr: this.searchStr,
startDate: this.range[0],
endDate: this.range[1],
endDate: this.range[1],
delFlag:type,
pageNum:this.pageNum,
pageSize:10,
}, false, false).then((res) => {
@ -131,22 +180,81 @@
this.list = res.result.records
} else {
this.list = [...this.list, ...res.result.records]
}
}
// this.searchStr = ""
this.noDaysort = false
} else {
this.tui.toast(res.message)
}
})
}
},
returnPrice(item) {
getCancelOrder(type){
this.pageNum =1
this.list = []
if(type == "1"){
this.cancel = true
}else{
this.cancel = false
}
this.getList(type)
},
changeSort(type){
this.nahuoDay = false
this.noDaysort = !this.noDaysort
},
paixuChange(text){
this.sort = text
this.popleList = []
this.pages = 1
this.searchName = ""
this.noDaysort = false
this.khOrGysList()
},
goDetail(item){
uni.setStorageSync('noReload',true)
uni.navigateTo({
url: '/package1/index/waitStorageDetail?id=' + item.id
})
},
returnPrice(item,index) {
let that = this;
if(item.inStorageStatus == 2 || item.inStorageStatus == 3 || item.inStorageStatus == 4){
uni.navigateTo({
url: '/package1/AI/AIInventoryList'
})
}else{
uni.navigateTo({
url: '/pages/index/waitStorageDetail?id=' + item.id
}else if(item.inStorageStatus == 1){
uni.showModal({
title: "提示",
content: "确定撤销该采购单吗?",
success: function(res) {
uni.showLoading({
title: '加载中...'
})
if (res.confirm) {
that.tui.request("/app/purchase/cancelPurchase", "POST", {
id: item.id,
}, false, true).then((res) => {
if (res.code == 200) {
// that.pages = 1;
// that.pageNum = 1;
// that.list = [];
that.list[index].delFlag = 1
that.$forceUpdate()
// that.getList()
that.tui.toast("撤销成功!")
} else {
that.tui.toast(res.message)
}
})
}
setTimeout(res => {
uni.hideLoading();
}, 500)
}
})
}
}
}
@ -203,4 +311,20 @@
background-color: #fff;
width: 100%;
}
.paixu-content{
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size: 30rpx;
font-weight: bold;
}
.nahuo-mask{
height: 1200rpx;
background: rgba(0, 0, 0, 0.6);
position: fixed;
top: 100px;
right: 0;
z-index: 100;
width: 100%;
}
</style>

743
pages/index/waitStorageDetail.vue

@ -1,743 +0,0 @@
<template>
<view class="container">
<uni-card :title="(sales.supplierName == null ?'暂无':sales.supplierName)+'--'+(supplier.consigneeMobile == null ?'暂无':supplier.consigneeMobile)" thumbnail="/static/images/dingdan/dd0.png">
<view class="uni-body" v-if="supplier.province">{{supplier.province + supplier.area + supplier.city + supplier.address}} </view>
</uni-card>
<view class="tui-order-item boxbg">
<view class="shop-box" style="border-top:5px solid #eee;" v-for="(item,index) in goodsList" :key="index">
<view class="shop-name">
<img class="img-radius" :src="item.productPicture" alt="" style="width: 140rpx;height: 140rpx;margin: 30rpx 0 0 30rpx;" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
<view class="shop-productName">
<view style="color:#FF5809;">{{item.productName == null ?'暂无':item.productName}}({{item.productSn == null ?'暂无':item.productSn}})</view>
<view style="display: flex;height: 55rpx;line-height: 55rpx;" v-if="type==0">
采购价: <input type="digit" :disabled="sales.inStorageStatus == 0?false:true" @blur="PriceAndWho($event,index,'caigou')" @focus="obtainPrice($event,'caigou',index)" v-model="item.purchasePrice" style="height: 55rpx;border-bottom: 1px solid #eee;color:#777;width: 100rpx;padding-left: 20rpx;">
</view>
<view>
<text style="padding: 0 5rpx;"> 数量: {{item.productCount == null ?'暂无':item.productCount}} </text>
<text v-if="type==0" style="padding-left: 10rpx;"> 总价:{{(item.productCount*item.purchasePrice)== null?'暂无':(item.productCount*item.purchasePrice)}}</text>
</view>
<view style="display: flex;height: 55rpx;line-height: 55rpx;">
批发价: <input type="digit" @blur="PriceAndWho($event,index,'pi')" @focus="obtainPrice($event,'pifa',index)" v-model="item.wholesalePrice" style="height: 55rpx;border-bottom: 1px solid #eee;color:#777;width: 100rpx;padding-left: 20rpx;" :disabled="sales.inStorageStatus == 0?false:true">
零售价:<input type="digit" @blur="PriceAndWho($event,index)" @focus="obtainPrice($event,'lingshou',index)" v-model="item.price" style="height: 55rpx;border-bottom: 1px solid #eee;color:#777;width: 100rpx;padding-left: 20rpx;" :disabled="sales.inStorageStatus == 0?false:true">
</view>
</view>
</view>
<view class="shop-type">
<view class="shop-collapse" v-for="(items,index) in item.stockLogList1" :key='index'>
<text>{{items.attributeList | sliceMsg}}</text>
<!-- <text style="color: red;">单价:¥{{item.price}}</text> -->
<text>数量:{{items.productCount == null ?'暂无':items.productCount}}</text>
</view>
</view>
</view>
<view class="tui-goods-info" style="width: 95%;margin: 0 auto;" v-if="type==0 && sales.inStorageStatus != 0">
<view class="tui-price-flex tui-size32" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">应付金额</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ sales.shouldPay == null ?'暂无':sales.shouldPay }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">已付金额</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ sales.alreadyPay == null ?'暂无':sales.alreadyPay }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">欠款</view>
<view class="tui-goods-price tui-primary-color">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ sales.noPay == null ?'暂无':sales.noPay}}</view>
</view>
</view>
<view class="tui-price-flex tui-size32">
<view class="tui-flex-shrink">备注</view>
<view class="tui-goods-price">
<uni-tooltip :content="sales.remark == null ?'暂无':sales.remark" placement="left">
<view style="font-size: 13px;width: 200px;height: 40rpx;overflow: hidden;text-align: right;">{{ sales.remark == null ?'':sales.remark}}</view>
<text style="color: blue;">查看更多</text>
</uni-tooltip>
</view>
</view>
</view>
<view class="tui-goods-info" v-if="type==0 && sales.inStorageStatus == 0">
<!-- 账号权限是否可以维护成本价格(主账号和被授权的账号可以维护),参数名:shop_admin_cost,维护在用户表中,存在前后端缓存里,把备注栏挪出来,谁都可以备注 -->
<view class="price-box-list">
<view class="price-box" v-if="type == 0">
<view style="flex: 1;text-align: left;padding-left: 20rpx;">
供应商:{{dealings.dealingsUserName?dealings.dealingsUserName:''}}
</view>
<view v-if="dealings.lastDebtAmount >= 0" style="flex: 1;text-align: right;padding-right: 20rpx;">
之前欠款:{{dealings.lastDebtAmount}}
</view>
<view v-if="dealings.lastDebtAmount < 0" style="flex: 1;text-align: right;padding-right: 20rpx;">
客户余额:{{Math.abs(dealings.lastDebtAmount)}}
</view>
</view>
<view class="content-list">
<view class="list-name">应付金额</view>
<view class="list-val">
<input type="text" v-model="shouldPay">
</view>
</view>
<view class="content-list">
<view class="list-name">已付金额</view>
<view class="list-val">
<input type="text" v-model="alreadyPay" @focus="obtainPrice($event,'alreadyPay')" @blur="changePay($event)">
</view>
</view>
<view class="content-list" v-if="yuedikou != 0 && type == 0">
<view class="list-name">余额抵扣</view>
<view class="list-val">
<input type="digit" v-model="yuedikou" disabled>
</view>
<!-- <view v-if="yuedikou > 0" @tap="noReturn" style="flex: 1;height: 30px;line-height: 30px;margin-top: 5px;font-size: 24rpx;background: #00BFFF;text-align: center;color: #fff;border-radius: 20px;">
不抵扣
</view> -->
</view>
<view class="content-list" v-if="zhiqianqiankuan > 0 && type == 0">
<view class="list-name">累计欠款</view>
<view class="list-val">
<input type="digit" v-model="leijiqiankuan" disabled>
</view>
</view>
<view class="content-list" v-if="leijiqiankuan < 0 && type == 0">
<view class="list-name">累计余额</view>
<view class="list-val">
<input type="digit" v-model="Math.abs(leijiqiankuan)" disabled>
</view>
</view>
<view class="content-list" v-if="noPay >= 0 && type == 0">
<view class="list-name">本次欠款</view>
<view class="list-val">
<input type="digit" v-model="noPay" disabled>
</view>
</view>
<view class="content-list" v-if="noPay < 0 && type == 0">
<view class="list-name">本次余额</view>
<view class="list-val">
<input type="digit" v-model="Math.abs(noPay)" disabled>
</view>
</view>
<view class="content-list">
<view class="list-name">其他费用</view>
<view class="list-val">
<input type="text" v-model="otherPay">
</view>
</view>
<view class="content-list">
<view class="list-name">备注</view>
<view class="">
<textarea v-model="remark" />
</view>
</view>
</view>
</view>
</view>
<view class="tui-order-info boxbg">
<view class="tui-order-title">
回款历史
</view>
<view class="tui-order-content" style="border-bottom: 1px solid #E0E0E0;" v-for="(item,index) in collection" :key="index">
<view class="tui-order-flex">
<view class="tui-item-title">回款金额:</view>
<view class="tui-item-content">{{ item.amount }}</view>
</view>
<view class="tui-order-flex">
<view class="tui-item-title">操作人:</view>
<view class="tui-item-content">{{ item.createByName }}</view>
</view>
<view class="tui-order-flex">
<view class="tui-item-title">操作时间:</view>
<view class="tui-item-content">{{ item.createTime }}</view>
</view>
</view>
</view>
<view class="tui-tabbar">
<view class="tui-btn-mr" v-if="type==0 && sales.inStorageStatus == 1 && sales.noPay >0" @tap="inputDialogToggle">回款</view>
<view class="tui-btn-mr" v-if="type==0 && sales.inStorageStatus == 0" @click="inventorySubmit">确认提交</view>
<view class="tui-btn-mr" @click="batchPrint">批量打印</view>
</view>
<!-- 弹出输入框 -->
<uni-popup ref="priceDialog" type="dialog">
<uni-popup-dialog ref="purInput" mode="input" inputType="digit" title="采购价" placeholder="请输入采购价"
@confirm="changePrice"></uni-popup-dialog>
</uni-popup>
<!-- 回款金额输入框 -->
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" inputType="digit" title="回款金额" placeholder="请输入回款金额"
@confirm="sureNpPay"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
return {
sales: {},
goodsList: [],
isReturn: false,
shouldPay:0,
noPay:0,
alreadyPay:0,
otherPay:0,
remark:'',
zhiqianqiankuan:0,
yuedikou:0,
leijiqiankuan:0,
id:'',
type:'',
supplier:[],
dealings:[],
collection:[]
}
},
filters: {
sliceMsg(val) {
var name = ''
if (typeof(val) == 'string') {
let newObj = JSON.parse(val)
for (let as in newObj) {
name += newObj[as] + '/'
}
}
return name;
}
},
onLoad(option) {
this.id = option.id
this.getWaitStorage(option.id)
this.collectionList(option.id)
this.type = uni.getStorageSync('type')
},
methods: {
//回款历史
collectionList(id){
this.tui.request('/app/dealingRecord/getDealingsRecordList','post', {
orderId:id
},false,true).then(res => {
this.collection = res.result
}).catch(res => {});
},
getWaitStorage(id) {
this.tui.request("/app/purchase/getPurchaseAllData", "post", {
id: id
}, false, true).then((res) => {
if (res.code == 200) {
for(let i = 0;i<res.result.purchaseDetails.length;i++){
if(res.result.purchaseDetails[i].purchasePrice != null){
res.result.purchaseDetails[i].zPrice = res.result.purchaseDetails[i].purchasePrice * res.result.purchaseDetails[i].productCount
}else{
res.result.purchaseDetails[i].zPrice = 0
}
res.result.purchaseDetails[i].lsPrice = res.result.purchaseDetails[i].lsPrice
}
this.zhiqianqiankuan = res.result.dealingsRecords[0].lastDebtAmount
this.sales = res.result.purchase
this.dealings = res.result.dealingsRecords[0]
this.noPay = res.result.purchase.noPay
this.supplier = res.result.supplier
this.remark = res.result.purchase.remark
this.goodsList = res.result.purchaseDetails
this.getAllPrice()
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
},
//计算欠款
changePay(e) {
if (this.linshiPrice == e.target.value) {
this.alreadyPay = e.target.value
} else if (Number(e.detail.value) > Number(this.shouldPay)) {
this.alreadyPay = this.shouldPay
} else {
if (e.target.value == '') {
this.alreadyPay = this.linshiPrice
} else {
this.alreadyPay = e.target.value
if((this.shouldPay - this.alreadyPay) <= Math.abs(this.zhiqianqiankuan) && this.zhiqianqiankuan <0){
this.yuedikou = this.shouldPay - this.alreadyPay
}else if((this.shouldPay - this.alreadyPay) > Math.abs(this.zhiqianqiankuan) && this.zhiqianqiankuan <0){
this.yuedikou = Math.abs(this.zhiqianqiankuan)
}
}
}
this.noPay = this.shouldPay - this.alreadyPay - this.yuedikou
this.noPay = this.noPay.toFixed(2)
this.leijiqiankuan = Number(this.zhiqianqiankuan) + Number(this.yuedikou) + Number(this.noPay)
},
obtainPrice(e, type, num,num1) {
this.linshiPrice = e.target.value
if (type == 'danjia') {
this.carList.get(num).purchasePrice = ''
} else if (type == 'pifa') {
this.carList.get(num).wholesalePrice = ''
} else if (type == 'lingshou') {
this.carList.get(num).lsprice = ''
this.$forceUpdate()
}else if(type=='danjishu'){
this.temporaryList[num].productCount = ''
this.$forceUpdate()
} else if (type == 'zongjishu') {
this.allChangeNum = ''
} else if (type == 'shouldPay') {
this.shouldPay = ''
}else if(type=='mapdanjishu'){
this.carList.get(num).stockLogList.get(num1).productCount = ''
this.$forceUpdate()
}else if (type == 'alreadyPay') {
this.alreadyPay = ''
}
this.$forceUpdate()
},
//回款金额输入框
inputDialogToggle() {
this.$refs.inputDialog.open()
},
sureNpPay(e){
if(e>this.noPay){
uni.showToast({
title: "回款金额不应超过欠款金额!",
icon: 'none'
})
return
}
this.tui.request('/app/purchase/editPayPrice','post', {
id:this.sales.id,
price:e
},false,true).then(res => {
uni.showToast({
title: "成功!",
icon: 'none'
})
uni.navigateBack();
}).catch(res => {});
},
PriceAndWho(e,id,type) {
if(type == 'pi'){
if(this.linshiPrice == e.target.value){
this.goodsList[id].wholesalePrice = e.target.value
}else{
if(e.detail.value == ''){
this.goodsList[id].wholesalePrice = this.linshiPrice
}else{
this.goodsList[id].wholesalePrice = Number(e.detail.value)
}
}
}else if(type == 'caigou'){
this.shouldPay = 0
if(this.linshiPrice == e.target.value){
this.goodsList[id].purchasePrice = e.target.value
}else{
if(e.detail.value == ''){
this.goodsList[id].purchasePrice = this.linshiPrice
}else{
this.goodsList[id].purchasePrice = Number(e.detail.value)
}
}
this.goodsList[id].zPrice = this.goodsList[id].purchasePrice * this.goodsList[id].productCount;
this.getAllPrice()
}else{
if(this.linshiPrice == e.target.value){
// this.goodsList[id].price = e.target.value
this.goodsList[id].lsPrice = e.target.value
}else{
if(e.detail.value == ''){
// this.goodsList[id].price = this.linshiPrice
this.goodsList[id].lsPrice = this.linshiPrice
}else{
// this.goodsList[id].price = Number(e.detail.value)
this.goodsList[id].lsPrice = Number(e.detail.value)
}
}
}
this.$forceUpdate()
},
obtainPrice(e,type,num){
this.linshiPrice = e.target.value
if(type=='pifa'){
this.goodsList[num].wholesalePrice = ''
this.$forceUpdate()
}else if(type=='lingshou'){
this.goodsList[num].price = ''
this.$forceUpdate()
}else if(type=='caigou'){
this.goodsList[num].purchasePrice = ''
this.$forceUpdate()
}
},
inventorySubmit() {
if(this.shouldPay == 0){
uni.showToast({
title: "请维护商品价格后入库!",
icon: 'none'
})
return
}
// else if(this.alreadyPay == 0){
// uni.showToast({
// title: "管理员必须维护价格后入库!",
// icon: 'none'
// })
// return
// }
let that = this;
let purchase = {
id:this.id,
alreadyPay: this.alreadyPay, //已付金额
noPay: this.noPay, //欠款
balanceDeductionAmount:this.yuedikou,
shouldPay: this.shouldPay, //应付金额
totalAmount: this.sales.totalAmount, //总数量
remark: this.remark,
supplierId: this.sales.supplierId, //供应商id和姓名
supplierName: this.sales.supplierName
}
this.tui.request("/app/stock/putInPrice", "post", {
purchase: purchase,
purchaseDetails: this.goodsList
}, false, false).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "入库成功",
icon: 'none'
})
uni.navigateBack({
delta: 2
})
} else {
uni.showToast({
title: "入库失败",
icon: 'none'
})
}
})
},
batchPrint(){
uni.navigateTo({
url: "/package1/inventory/batchPrint?purchase=" + JSON.stringify(this.sales) + '&purchaseDetails=' + JSON.stringify(this.goodsList)
})
},
//编辑每一个的单价
clickCollapse(index) {
this.index = index
this.$refs.priceDialog.val = ''
this.$refs.priceDialog.open()
},
//计算价格
changePrice(val) {
let that = this;
this.$refs.purInput.val = ''
that.shouldPay = 0
that.goodsList[that.index].purchasePrice = val
that.goodsList[that.index].zPrice = val * that.goodsList[that.index].productCount;
this.getAllPrice()
},
//计算总金额和总数量
getAllPrice() {
let that = this;
this.shouldPay = 0
this.totalAmount = 0
this.goodsList.forEach(function(value, key) {
that.shouldPay = that.shouldPay + value.zPrice
})
this.$nextTick(()=>{
if(parseFloat(that.zhiqianqiankuan) < 0){
if(that.shouldPay > Math.abs(that.zhiqianqiankuan)){
that.yuedikou = Math.abs(that.zhiqianqiankuan)
this.alreadyPay = this.shouldPay - Math.abs(that.zhiqianqiankuan)
}else if(that.shouldPay <= Math.abs(that.zhiqianqiankuan)){
that.yuedikou = that.shouldPay
that.alreadyPay = 0
}
}else{
this.alreadyPay = this.shouldPay
}
that.shouldPay = that.shouldPay.toFixed(2)
that.noPay = this.shouldPay - (this.alreadyPay == '' ? 0 : this.alreadyPay) - that.yuedikou
that.noPay = that.noPay.toFixed(2)
this.leijiqiankuan = Number(this.zhiqianqiankuan) + Number(this.yuedikou) + Number(this.noPay)
this.$forceUpdate()
})
},
},
}
</script>
<style lang="scss">
.container {
padding-bottom: 118rpx;
.boxbg {
background-color: #fff;
margin: 30upx;
padding: 20upx;
border-radius: 10upx;
box-shadow: 0px 1px 10px 2px #e2e2e2;
}
.tui-order-info {
margin-top: 20rpx;
}
.tui-order-content {
width: 100%;
padding: 24rpx 30rpx;
box-sizing: border-box;
background: #fff;
font-size: 24rpx;
line-height: 30rpx;
}
.tui-order-flex {
display: flex;
padding-top: 18rpx;
}
.tui-order-flex:first-child {
padding-top: 0
}
.tui-item-title {
width: 132rpx;
flex-shrink: 0;
}
.tui-item-content {
color: #666;
line-height: 32rpx;
}
.tui-order-title {
position: relative;
font-size: 28upx;
line-height: 28upx;
padding-left: 16upx;
box-sizing: border-box;
}
.tui-order-title::before {
content: '';
position: absolute;
left: 0;
top: 0;
border-left: 8upx solid $u-primary;
height: 120%;
border-radius: 4upx;
}
// .boxbg {
// background-color: #fff;
// margin: 30upx;
// border-radius: 10upx;
// box-shadow: 0px 1px 10px 2px #e2e2e2;
// }
.tui-order-item {
.u-collapse-content {
display: flex;
justify-content: space-between;
line-height: 30px;
}
.tui-goods-info {
width: 100%;
box-sizing: border-box;
background: #fff;
line-height: 26px;
border-top: 10px solid #eee;
.tui-price-flex {
display: flex;
align-items: center;
justify-content: space-between;
}
.tui-size32 {
font-size: 32rpx;
font-weight: 500;
}
.tui-size-24 {
font-size: 24rpx;
}
.tui-price-large {
font-size: 32rpx;
.lineText {
text-decoration: line-through;
font-size: 12px;
color: #888;
}
}
.tui-flex-shrink {
flex-shrink: 0;
}
.tui-goods-price {
width: 100%;
display: flex;
align-items: flex-end;
justify-content: flex-end;
font-size: 24rpx;
}
.tui-primary-color {
color: #EB0909;
}
.tui-pbtm20 {
padding-bottom: 20rpx;
}
}
}
}
.tui-tabbar {
width: 100%;
height: 98rpx;
background: #fff;
position: fixed;
left: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 26rpx;
box-shadow: 0 0 1px rgba(0, 0, 0, .3);
padding-bottom: env(safe-area-inset-bottom);
z-index: 996;
}
.tui-btn-mr {
width:130rpx;
height: 60rpx;
background: #088FEB;
color: #fff;
border-radius: 10px;
line-height: 60rpx;
text-align: center;
margin-right: 30rpx;
}
.shop-box {
width: 95%;
margin: 0 auto;
position: relative;
}
.shop-name {
width: 100%;
height: 250rpx;
line-height: 80rpx;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
font-size: 28rpx;
font-weight: bold;
display: flex;
.uni-icons {
color: #088FEB !important;
}
}
.shop-productName {
flex: 1;
display: flex;
flex-direction: column;
padding-left: 20rpx;
}
.shop-productName view {
height: 55rpx;
line-height: 55rpx;
}
.shop-collapse {
display: flex;
height: 80rpx;
font-size: 26rpx;
line-height: 80rpx;
}
.shop-collapse text {
flex: 1;
text-align: center;
padding-right: 40rpx;
border-right: 1px solid #eee;
}
.content-list {
width: 95%;
margin: 0 auto;
display: flex;
height: 80rpx;
border-bottom: 1px solid #eee;
}
.content-list:last-child {
border-bottom: none;
height: auto;
}
.list-name {
width: 200rpx;
text-align: left;
line-height: 40px;
height: 80rpx;
padding-left: 20rpx;
}
.list-val {
width: 560rpx;
height: 80rpx;
line-height: 80rpx;
}
.list-val input {
width: 400rpx;
height: 60rpx;
display: inline-block;
line-height: 60rpx;
float: left;
margin-top: 10rpx;
padding-left: 20rpx;
border-bottom: 1px solid #088FEB;
}
textarea {
margin: 20rpx;
border: 1px solid #eee;
height: 150rpx;
width: 500rpx;
}
.noPic{
border-radius: 10px;
width: 140rpx;
height: 140rpx;
text-align: center;
line-height: 140rpx;
color: #777;
background: #eee;
margin: 30rpx 0 0 30rpx;
}
.uni-tooltip {
display: flex !important;
}
.price-box{
width: 95%;
margin: 10px auto;
background: #eee;
height: 80rpx;
display: flex;
line-height: 80rpx;
text-align: center;
overflow: hidden;
border-radius: 10px;
background: #FDF5E6;
color: #EEB422;
background: linear-gradient(180deg, #fff, #FDF5E6);
border: 1px solid #FAEBD7;
}
</style>

1452
pages/inventory/changeGoods1.vue

File diff suppressed because it is too large

8283
pages/inventory/goodsList1.vue

File diff suppressed because it is too large

110
pages/inventory/inventory.vue

@ -47,7 +47,7 @@
</view>
</view>
<view class="search">
<uni-search-bar class="uni-mt-10" radius="5" placeholder="商品名称/货号/供应商" cancelButton="none" @confirm="search" @blur="search" @clear="clearSearch" />
<uni-search-bar class="uni-mt-10" radius="5" placeholder="商品名称/货号/供应商" cancelButton="none" @blur="search" @clear="clearSearch" />
</view>
<view class="content-left" style="height: 78%;float: left;position: fixed;top: 23%;">
<view v-if="gateType == ''" class="left-box" v-for="(item, index) in indexList" :key="index"
@ -57,7 +57,7 @@
</view>
<view class="content-right" style="width: 570rpx;background: #fff;margin-left:170rpx;margin-top: 300rpx;">
<view class="right-box" v-for="(item,index) in shopList" :key="index" @tap="goDetail(item)">
<view class="box-left">
<view class="box-left" @tap.stop="largeImg(item)">
<img :src="item.productPicture" class="img-radius" alt="" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
</view>
@ -94,13 +94,15 @@
</view>
</view>
<view class="right-box" v-for="(item,index) in shopList1" :key="index" @tap="goDetail(item)">
<view class="box-left">
<view class="box-left" @tap.stop="largeImg(item)">
<img :src="item.productPicture" class="img-radius" alt="" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
</view>
<view class="box-right">
<view class="box-right-name" style="height: 60rpx;line-height: 60rpx;">{{item.productName}}</view>
<view class="box-right-num">货号:{{item.productSn}}</view>
<view class="box-right">
<view class="box-right-num">货号:{{item.productSn}}</view>
<view class="box-right-name">名称:{{item.productName == null?'暂无':item.productName}}</view>
<view class="box-right-name">供应商:{{item.supplierName == null?'暂无':item.supplierName}}</view>
<!-- 1上架 0下架 -->
<view class="up-down" v-if="item.delFlag ==1" @tap.stop="upDown('0',item)">下架</view>
<view class="up-down" v-if="item.delFlag ==0" @tap.stop="upDown('1',item)">上架</view>
@ -146,6 +148,9 @@
<view class="popup-pay-container" @tap="onGridClick('5')">
<text style="display: inline-block">批量下架</text>
</view>
<view v-if="type == 0" class="popup-pay-container" @tap="onGridClick('6')">
<text style="display: inline-block">批量删除商品</text>
</view>
</view>
</uni-popup>
<!-- 弹出输入框 -->
@ -168,6 +173,18 @@
<button open-type="share" @tap="$refs.sharePopup.close()" class="popup-photo">分享给微信好友</button>
<view @tap="$refs.sharePopup.close()" class="popup-photo" style="border-bottom:0;border-top:10px solid #eee;">取消</view>
</view>
</uni-popup>
<!-- 弹出多图轮播 -->
<uni-popup ref="imgPopup" background-color="#fff">
<view class="showImg-box">
<swiper indicator-dots class="swiper-box" @change="lunbochange" circular autoplay :current="swiperDotIndex">
<swiper-item v-for="(item, index) in bigImg" :key="index">
<view class="swiper-item">
<image mode='aspectFit' show-menu-by-longpress :src="item.productPicture" alt="" style="width: 100%;height: 100%;border-radius: 10px;" /></image>
</view>
</swiper-item>
</swiper>
</view>
</uni-popup>
</view>
</template>
@ -182,6 +199,8 @@
return {
size: 30,
indexList: [],
bigImg:[],
swiperDotIndex:0,
// status: 'loadmore',
pageNum: 1, //分页的页码
shopList: [],
@ -204,7 +223,10 @@
uni.redirectTo({
url: "/package1/index/downStearmList?khid=" + option.khid
})
}
}
// if(uni.getStorageSync('noReload') == true){
// uni.removeStorageSync('noReload')
// }
let that = this
this.type=uni.getStorageSync('type')
uni.getSystemInfo({
@ -223,19 +245,48 @@
onReachBottom() {
if (this.pageNum >= this.pages) return;
// this.status = 'loading';
this.pageNum ++;
this.getShareList();
this.pageNum ++;
if(this.gateType == 'search'){
this.getShareList('search');
}else{
this.getShareList();
}
},
onShow() {
if(uni.getStorageSync('noReload') == true){
if(uni.getStorageSync('noReload') == true){
this.searchName = ''
uni.removeStorageSync('noReload')
}else{
}else{
this.searchName = ''
this.getGategoryList()
}
this.getWarnMsg()
this.getweiruku()
},
methods: {
lunbochange(e) {
this.current = e.detail.current
},
largeImg(img) {
if(img.productPicture == null &&img.productPictures == null ){
this.tui.toast("暂无可展示的图片",1000)
return
}
this.bigImg = []
if(img.productPicture != null){
let data = {
productPicture:img.productPicture
}
this.bigImg.push(data)
}
if(img.productPictures != null){
for(let i=0;i<img.productPictures.length;i++){
this.bigImg.push(img.productPictures[i])
}
}
this.$refs.imgPopup.open()
},
checkPay(type){
this.tui.request("/app/productShare/save", "POST", {
shareType: '2',
@ -396,7 +447,7 @@
},
oneShare(item){
this.goodsData = item
this.picture = item.productPicture == null ?'https://jewel-shop.oss-cn-beijing.aliyuncs.com/70c3d9a274ff4feeb6df0bcb8be0f733.jpg':item.productPicture
this.picture = item.productPicture == null || item.productPicture == "" ?'https://jewel-shop.oss-cn-beijing.aliyuncs.com/70c3d9a274ff4feeb6df0bcb8be0f733.jpg':item.productPicture
this.$refs.sharePriceDialog.open()
},
//商品上下架
@ -443,10 +494,16 @@
},
//搜索接口
search(e){
if(e.value == ''){
if(e.value == ''){
this.pageNum = 1
this.shopList1 = []
this.shopList = []
this.searchName = ""
this.getShareList()
}else{
}else{
this.pageNum = 1
this.shopList1 = []
this.shopList = []
this.searchName = e.value
this.getShareList('search')
@ -482,11 +539,16 @@
url: "/package1/inventory/batchPrint"
})
this.$refs.payDialog.close()
}else{
}else if(target == '5'){
uni.navigateTo({
url: "/package1/inventory/goodsDelisting"
})
this.$refs.payDialog.close()
}else{
uni.navigateTo({
url: "/package1/inventory/goodsDelete"
})
this.$refs.payDialog.close()
}
}
}
@ -720,6 +782,24 @@
border-top: 1px solid #eee;
color: #fff;
}
.showImg-box{
width: 700rpx;
height: 1000rpx;
border-radius: 10px;
}
.swiper-box {
height: 1000rpx;
}
.swiper-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 1000rpx;
color: #fff;
background-color: #cee1fd;
border-radius: 10px;
}
.popup-photo{
height: 110rpx;
line-height: 110rpx;

42
pages/inventory/inventoryDetail.vue

@ -48,7 +48,7 @@
<view v-show="current === 0">
<view class="container-box" v-for="(item,index) in pecsList" :key='index'>
<view class="prec-list">
<view class="prec-list-box" :style="{width:isPrint?'40%':'70%'}">
<view class="prec-list-box" :style="{width:isPrint?'40%':'64%'}">
{{item.attributeList | sliceMsg}}
</view>
<view class="prec-list-box" style="font-size: 26rpx;width: 26%;">
@ -56,7 +56,8 @@
</view>
<view>
<uni-number-box v-if="isPrint" v-model="item.productCount" max="10000"
@change="changeNumBtn(item)" style="margin-top: 10rpx;display: block;" />
@change="changeNumBtn(item)" style="margin-top: 10rpx;display: block;" />
<uni-icons type="close" @tap="delSpec(item)" v-if="isPrint == false" size="30" color="#777"></uni-icons>
</view>
</view>
</view>
@ -406,9 +407,11 @@
}
if(this.current==1){
for(let i=0;i<this.detailList.length;i++){
this.detailList[i].lirun = 0
this.detailList[i].lirun = 0
this.detailList[i].productCount = 0
for(let m=0;m<this.detailList[i].saleDetailDTOList.length;m++){
this.detailList[i].lirun += (this.detailList[i].saleDetailDTOList[m].discountAmount - this.detailList[i].saleDetailDTOList[m].purchasePrice) * this.detailList[i].saleDetailDTOList[m].stockLogList1[0].productCount
this.detailList[i].lirun += (this.detailList[i].saleDetailDTOList[m].discountAmount - this.detailList[i].saleDetailDTOList[m].purchasePrice) * this.detailList[i].saleDetailDTOList[m].stockLogList1[0].productCount
this.detailList[i].productCount += this.detailList[i].saleDetailDTOList[m].stockLogList1[0].productCount
}
}
}else if(this.current==2){
@ -551,6 +554,37 @@
uni.navigateTo({
url: "/package1/inventory/addGoods?dataList="+JSON.stringify(this.dataList)
})
},
delSpec(item){
let that = this;
uni.showModal({
title: "提示",
content: "确定删除此条库存吗?",
success: function(res) {
if(res.confirm){
that.tui.request('/app/stock/deleteStockById', "post", {
id:item.id
}, false, true).then((res1) => {
if (res1.code == 200) {
uni.showToast({
title: "删除成功",
icon: 'none'
})
that.getShareList()
if(item.stockCount > 0){
that.dataList.stockCount = that.dataList.stockCount - item.stockCount
uni.removeStorageSync('noReload')
}
} else {
uni.showToast({
title: "删除失败",
icon: 'none'
})
}
})
}
}
})
},
sliceMsg(val) {
var name = ''

20
pages/login/login.vue

@ -183,10 +183,13 @@
if (res.code == 200) {
this.toggle("center");
this.shopList = res.result
}else{
}else{
this.getCaptchaImg()
this.tui.toast(res.message)
}
}).catch((res) => {})
}).catch((res) => {
this.getCaptchaImg()
})
}else{
this.tui.request(loginUrl, "POST", data, true, true).then((res) => {
if (res.code == 200) {
@ -209,10 +212,14 @@
}else{
this.checkShop(res.result.shopList[0])
}
} else {
} else {
this.getCaptchaImg()
this.tui.toast(res.message)
}
}).catch((res) => {})
}).catch((res) => {
this.getCaptchaImg()
})
}
},
@ -255,7 +262,8 @@
uni.setStorageSync('shopName',item.shopName)
uni.setStorageSync('shopIcon',res.result.shopIcon)
uni.setStorageSync('shopAddress',res.result.shopAddress)
uni.setStorageSync('shopRemark',res.result.remark)
uni.setStorageSync('shopRemark',res.result.remark)
uni.setStorageSync("shopOwnerPhone", item.shopOwnerPhone)
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/index'
@ -428,6 +436,8 @@
padding: 15px;
width: 500rpx;
height: auto;
overflow: scroll;
max-height: 900rpx;
background-color: #fff;
}

Loading…
Cancel
Save