wangfukang 2 years ago
parent
commit
456dab7df1
  1. 58
      pages/billing/addUser.vue
  2. 8
      pages/billing/changeGoods1.vue
  3. 2
      pages/index/checkShop.vue
  4. 1469
      pages/index/customAndSupplierProductDetail.vue
  5. 276
      pages/index/dataStatistics.vue
  6. 2
      pages/index/home.vue
  7. 191
      pages/index/index.vue
  8. 128
      pages/index/shareStyle.vue
  9. 2232
      pages/inventory/goodsList1.vue
  10. 7
      pages/inventory/inventory.vue
  11. 149
      pages/inventory/inventoryDetail.vue
  12. 16
      pages/login/login.vue

58
pages/billing/addUser.vue

@ -9,7 +9,11 @@
</uni-forms-item>
<uni-forms-item label="手机号码" name="consigneeMobile">
<uni-easyinput type="number" v-model="formData.consigneeMobile" placeholder="请输入手机号码" />
</uni-forms-item>
</uni-forms-item>
<!-- <uni-forms-item v-if="popleType == 'khName'" label="客户分类" name="consigneeMobile">
<uni-data-select class="uni-data-select" :localdata="categoryList" v-model="formData.fenlei"
placeholder="请选择分类" @change="categoryChange" style="width: 60%;"></uni-data-select>
</uni-forms-item> -->
<uni-forms-item class="qichu" label="期初欠款" name="consigneeMobile" v-if="popleType == 'khName'">
<input type="number" @tap="showPrice = true" disabled v-model="formData.noEarn" placeholder="请输入客户已有欠款" style="width: 100%;height: 100%;border: 1px solid #eee;padding-left: 20rpx;"/>
</uni-forms-item>
@ -56,7 +60,8 @@
showPrice:false,
keyboardNum:'',
userInfo: '',
show: false,
show: false,
categoryList:[],
goodsNum:'',
delShow: false,
addressObj: {},
@ -70,7 +75,9 @@
province: '',
city: '',
area: '',
noEarn:""
noEarn:"",
fenlei:'',
fenleiName:''
},
// 单选数据源
sexs: [{
@ -122,7 +129,13 @@
onLoad(option) {
this.popleType = option.popleType
this.type = option.type
let data = JSON.parse(option.data)
this.getCategoryList()
let data = ''
console.log(option.data)
if(option.data != undefined){
data = option.data
}
data = JSON.parse(data)
if (option.type = "edit") {
this.formData.address1 = data.province + data.city + data.area
this.formData.address = data.address
@ -130,8 +143,9 @@
this.formData.city = data.city
this.formData.province = data.province
this.formData.id = data.id
this.formData.consigneeMobile = data.consigneeMobile || data.phone || ""
console.log(this.formData.consigneeMobile)
this.formData.fenlei = data.categoryId
this.formData.fenleiName = data.categoryName
this.formData.consigneeMobile = data.consigneeMobile || data.phone || ""
this.formData.consigneeName = data.consigneeName || data.name || ""
}
@ -147,6 +161,34 @@
})
},
methods: {
//获取客户分类
getCategoryList(){
this.tui.request("/app/customerCategory/getCustomerCategoryListByShopId", "POST", {
shopId:uni.getStorageSync('shopId')
}, false, true).then((res) => {
if (res.code == 200) {
for(let i=0;i<res.result.length;i++){
res.result[i].text = res.result[i].categoryName
res.result[i].value = res.result[i].id
}
setTimeout(res1=>{
this.categoryList = res.result
},200)
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
},
//切换分类
categoryChange(e) {
for (let i = 0; i < this.categoryList.length; i++) {
if (this.categoryList[i].value == e) {
this.formData.fenlei = e;
this.formData.fenleiName = this.categoryList[i].text
}
}
},
//获取手机通讯录
getUserPhone() {
let that = this;
@ -321,6 +363,8 @@
city: this.formData.city,
area: this.formData.area,
id: this.formData.id,
categoryId:this.formData.fenlei,
categoryName:this.formData.fenleiName,
userName: this.formData.consigneeMobile
}, false, true).then((res) => {
if (res.code == 200) {
@ -349,6 +393,8 @@
province: this.formData.province,
city: this.formData.city,
area: this.formData.area,
categoryId:this.formData.fenlei,
categoryName:this.formData.fenleiName,
userName: this.formData.consigneeMobile,
amountOwed:this.formData.noEarn
}, false, true).then((res) => {

8
pages/billing/changeGoods1.vue

@ -11,7 +11,7 @@
:class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
</view>
</view>
<view class="content-right" style="width: 570rpx;background: #fff;margin:16% 0 120rpx 170rpx;">
<view class="content-right" style="width: 570rpx;background: #fff;margin:0 0 120rpx 170rpx;padding-top: 16%;">
<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> -->
@ -966,9 +966,11 @@
})
await this.$nextTick(() => {
let data = {
attrId:this.goodsDetail.attrId,
id: this.goodsDetail.id,
price: this.zPrice,
num: this.zNum,
customerCategoryRule:JSON.parse(this.goodsDetail.customerCategoryRule),
categoryId: this.goodsDetail.categoryId,
productName: this.goodsDetail.productName,
productSn: this.goodsDetail.productSn,
@ -978,6 +980,7 @@
saleDetailQueryDTO: this.temporaryList,
saleDetailQueryDTO1: [],
purchasePrice: this.goodsDetail.purchasePrice,
unitPrice: this.goodsDetail.wholesalePrice,
wholesalePrice: this.goodsDetail.wholesalePrice,
lsprice: this.goodsDetail.price
}
@ -1083,6 +1086,7 @@
}
this.$nextTick(() => {
let data = {
attrId:this.goodsDetail.attrId,
id: this.goodsDetail.id,
price: this.zPrice,
num: this.zNum,
@ -1090,10 +1094,12 @@
productName: this.goodsDetail.productName,
productSn: this.goodsDetail.productSn,
returnPrice: this.goodsDetail.wholesalePrice,
customerCategoryRule:JSON.parse(this.goodsDetail.customerCategoryRule),
productPicture: this.goodsDetail.productPicture,
supplierName: this.goodsDetail.supplierName,
saleDetailQueryDTO: newList,
saleDetailQueryDTO1: [],
unitPrice:this.goodsDetail.wholesalePrice,
purchasePrice: this.goodsDetail.purchasePrice,
wholesalePrice: this.goodsDetail.wholesalePrice,
lsprice: this.goodsDetail.price

2
pages/index/checkShop.vue

@ -128,7 +128,7 @@
that.tui.toast('登录成功', 2000, true)
setTimeout(() => {
uni.reLaunch({
url: '/package1/other/logistics'
url: '/package1/other/newLogisticsIndex'
})
}, 200)
},

1469
pages/index/customAndSupplierProductDetail.vue

File diff suppressed because it is too large

276
pages/index/dataStatistics.vue

@ -50,18 +50,221 @@
</view>
</view> -->
<view style="width: 100%;margin: 20rpx auto;background: #fff;">
<view class="box" v-for="(item,index) in dataList" :key="index" @tap="goDetail(item)">
<view class="box" @tap="goDetail('xiaoshou')">
<view style="width: 69%;">
<view style="width: 50rpx;height: 50rpx;float: left;margin-right: 20rpx;">
<uni-icons :type="item.icon" size="24" color="red"></uni-icons>
<uni-icons type="cart" size="24" color="red"></uni-icons>
</view>
{{item.name}}
销售金额
</view>
<view style="width: 30%;">
<text style="display: inline-block;width: 150rpx;text-align: center;">{{item.name == '销售金额'?shopInfo.totalAmount:item.name == '销售总件数'?shopInfo.totalJCount:item.name == '退货总件数'?shopInfo.returnTotalCount:item.name == '实收金额'?shopInfo.totalAlreadyEarn:item.name == '利润' && type == 0?shopInfo.totalProfit:item.name == '进货金额' && type == 0?shopInfo.purchasingCost:item.name == '退货金额'?shopInfo.returnTotalAmount:item.name == '下单客户'?shopInfo.totalCCount:""}}</text>
<text style="display: inline-block;width: 150rpx;text-align: center;">{{shopInfo.totalAmount}}</text>
<uni-icons type="right" size="24" color="#777"></uni-icons>
</view>
</view>
<view class="box" @tap="goDetail('xiaoshou')">
<view style="width: 69%;">
<view style="width: 50rpx;height: 50rpx;float: left;margin-right: 20rpx;">
<uni-icons type="cart" size="24" color="red"></uni-icons>
</view>
销售总件数
</view>
<view style="width: 30%;">
<text style="display: inline-block;width: 150rpx;text-align: center;">{{shopInfo.totalJCount}}</text>
<uni-icons type="right" size="24" color="#777"></uni-icons>
</view>
</view>
<view style="width: 100%;height: 10rpx;background: #eee;"></view>
<view class="box" @tap="goDetail('xiaoshoulirun')">
<view style="width: 69%;">
<view style="width: 50rpx;height: 50rpx;float: left;margin-right: 20rpx;">
<uni-icons type="wallet" size="24" color="red"></uni-icons>
</view>
销售利润
</view>
<view style="width: 30%;">
<text style="display: inline-block;width: 150rpx;text-align: center;">{{shopInfo.totalProfit==null?0:shopInfo.totalProfit}}</text>
<uni-icons type="right" size="24" color="#777"></uni-icons>
</view>
</view>
<view class="box" @tap="showDayPrice = true">
<view style="width: 69%;">
<view style="width: 50rpx;height: 50rpx;float: left;margin-right: 20rpx;">
<uni-icons type="wallet" size="24" color="red"></uni-icons>
</view>
实际利润
</view>
<view style="width: 30%;">
<text style="display: inline-block;width: 150rpx;text-align: center;">{{((shopInfo.totalProfit == null?0:shopInfo.totalProfit)-shopInfo.returnTotalAmount+shopInfo.saleReturnCost).toFixed(2)}}</text>
<uni-icons type="right" size="24" color="#777"></uni-icons>
</view>
</view>
<view style="width: 100%;height: 10rpx;background: #eee;"></view>
<view class="box" @tap="goDetail('jinhuo')">
<view style="width: 69%;">
<view style="width: 50rpx;height: 50rpx;float: left;margin-right: 20rpx;">
<uni-icons type="home" size="24" color="red"></uni-icons>
</view>
进货金额
</view>
<view style="width: 30%;">
<text style="display: inline-block;width: 150rpx;text-align: center;">{{shopInfo.purchasingCost}}</text>
<uni-icons type="right" size="24" color="#777"></uni-icons>
</view>
</view>
<view class="box" @tap="goDetail('jinhuo')">
<view style="width: 69%;">
<view style="width: 50rpx;height: 50rpx;float: left;margin-right: 20rpx;">
<uni-icons type="home" size="24" color="red"></uni-icons>
</view>
进货总件数
</view>
<view style="width: 30%;">
<text style="display: inline-block;width: 150rpx;text-align: center;">{{shopInfo.purchasingCount}}</text>
<uni-icons type="right" size="24" color="#777"></uni-icons>
</view>
</view>
<view style="width: 100%;height: 10rpx;background: #eee;"></view>
<view class="box" @tap="goDetail('tuihuo')">
<view style="width: 69%;">
<view style="width: 50rpx;height: 50rpx;float: left;margin-right: 20rpx;">
<uni-icons type="refreshempty" size="24" color="red"></uni-icons>
</view>
退货金额
</view>
<view style="width: 30%;">
<text style="display: inline-block;width: 150rpx;text-align: center;">{{shopInfo.returnTotalAmount}}</text>
<uni-icons type="right" size="24" color="#777"></uni-icons>
</view>
</view>
<view class="box" @tap="goDetail('tuihuo')">
<view style="width: 69%;">
<view style="width: 50rpx;height: 50rpx;float: left;margin-right: 20rpx;">
<uni-icons type="refreshempty" size="24" color="red"></uni-icons>
</view>
退货总件数
</view>
<view style="width: 30%;">
<text style="display: inline-block;width: 150rpx;text-align: center;">{{shopInfo.returnTotalCount}}</text>
<uni-icons type="right" size="24" color="#777"></uni-icons>
</view>
</view>
<view style="width: 100%;height: 10rpx;background: #eee;"></view>
<view class="box" @tap="goDetail('shishou')">
<view style="width: 69%;">
<view style="width: 50rpx;height: 50rpx;float: left;margin-right: 20rpx;">
<uni-icons type="auth" size="24" color="red"></uni-icons>
</view>
实收金额
</view>
<view style="width: 30%;">
<text style="display: inline-block;width: 150rpx;text-align: center;">{{shopInfo.totalAlreadyEarn}}</text>
<uni-icons type="right" size="24" color="#777"></uni-icons>
</view>
</view>
<view class="box" @tap="goDetail('xiadankehu')">
<view style="width: 69%;">
<view style="width: 50rpx;height: 50rpx;float: left;margin-right: 20rpx;">
<uni-icons type="staff" size="24" color="red"></uni-icons>
</view>
下单客户
</view>
<view style="width: 30%;">
<text style="display: inline-block;width: 150rpx;text-align: center;">{{shopInfo.totalCCount}}</text>
<uni-icons type="right" size="24" color="#777"></uni-icons>
</view>
</view>
<view class="box" @tap="goDetail('rexiao')">
<view style="width: 69%;">
<view style="width: 50rpx;height: 50rpx;float: left;margin-right: 20rpx;">
<uni-icons type="fire" size="24" color="red"></uni-icons>
</view>
热销商品
</view>
<view style="width: 30%;">
<text style="display: inline-block;width: 150rpx;text-align: center;"></text>
<uni-icons type="right" size="24" color="#777"></uni-icons>
</view>
</view>
</view>
<view v-if="showDayPrice" style="width:100%;height:100%;position: fixed;top: 0;background: rgba(0,0,0,0.7);">
<view
style="position: fixed;margin:auto;height:660rpx;left:0;right:0;top:0;bottom:0;width:600rpx;background:#fff;border-radius: 10px;color: #000;">
<view style="width:100%;height:80rpx;font-size: 30rpx;text-align: center;line-height: 80rpx;font-weight: bold;">
利润明细
</view>
<view style="display: flex;">
<view style="width: 25%;display: flex;flex-direction: column;text-align: center;">
<text style="font-weight: bold;">{{shopInfo.totalAmount}}</text>
<text>销售金额</text>
</view>
<view style="width: 25%;display: flex;flex-direction: column;text-align: center;">
<text style="font-weight: bold;">{{shopInfo.totalAmount - shopInfo.totalProfit}}</text>
<text>销售成本</text>
</view>
<view style="width: 25%;display: flex;flex-direction: column;text-align: center;">
<text style="font-weight: bold;">{{shopInfo.returnTotalAmount}}</text>
<text>退货金额</text>
</view>
<view style="width: 25%;display: flex;flex-direction: column;text-align: center;">
<text style="font-weight: bold;">{{shopInfo.saleReturnCost}}</text>
<text>退货成本</text>
</view>
</view>
<view style="width: 95%;height:380rpx;margin: 0 auto;margin-top: 20rpx;border-top: 1px solid #eee;">
<view style="background: #ecf5ff;width: 100%;color: #5fd9ee;height: 80rpx;line-height: 80rpx;padding-left: 10px;">
点击↓↓↓可查看计算公式
</view>
<view class="tan-lirun" @tap="changeFormula('0')">
<text style="font-weight: bold;margin-top: 20rpx;">{{shopInfo.totalProfit}}</text>
<text>销售利润</text>
</view>
<view @tap="changeFormula('1')" class="tan-lirun" style="float: right;" >
<text style="font-weight: bold;margin-top: 20rpx;">{{(shopInfo.totalAmount-(shopInfo.totalAmount-shopInfo.totalProfit)-shopInfo.returnTotalAmount+shopInfo.saleReturnCost).toFixed(2)}}</text>
<text>实际利润</text>
</view>
<view @tap="changeFormula('3')" class="tan-lirun">
<text style="font-weight: bold;margin-top: 20rpx;">{{shopInfo.totalProfit == 0?0:((shopInfo.totalProfit/shopInfo.totalAmount)*100).toFixed(2)}}%</text>
<text>销售利润率</text>
</view>
<view @tap="changeFormula('2')" class="tan-lirun" style="float: right;">
<text style="font-weight: bold;margin-top: 20rpx;">{{(shopInfo.totalProfit-shopInfo.returnTotalAmount+shopInfo.saleReturnCost)==0?0:(((shopInfo.totalProfit-shopInfo.returnTotalAmount+shopInfo.saleReturnCost)/(shopInfo.totalAmount-shopInfo.returnTotalAmount))*100).toFixed(2)}}%</text>
<text>实际利润率</text>
</view>
</view>
<view @tap="showDayPrice = false" style="height: 100rpx;width: 100%;line-height: 100rpx;text-align: center;border-top: 1px solid #eee;font-size: 40rpx;">
确定
</view>
</view>
</view>
<view v-if="showFormula"
style="height:230rpx;position: fixed;z-index:999;margin:auto;left:0;right:0;top:0;bottom:0;width:200px;background: rgba(0,0,0,0.7);border-radius: 10px;color: #eee;">
<view style="width:100%;height:80rpx;font-size: 30rpx;text-align: center;line-height: 80rpx;">
{{showDan == 0?'销售利润':showDan == 1?'实际利润':showDan == 2?'实际利润率':showDan == 3?'销售利润率':''}}计算公式
</view>
<view style="text-align: center;line-height: 40rpx;">
<view v-if="showDan == 3" style="margin-top: 20rpx;">
<view>公式:销售利润/销售金额*100</view>
<view>{{shopInfo.totalProfit}}/{{shopInfo.totalAmount}}*100={{(shopInfo.totalProfit == 0 && shopInfo.totalAmount == 0)?0:((shopInfo.totalProfit/shopInfo.totalAmount)*100).toFixed(2)}}%</view>
</view>
<view v-if="showDan == 2" style="margin-top: 20rpx;">
<view>公式:实际利润/(销售金额-退货金额)</view>
<view>{{(shopInfo.totalAmount-(shopInfo.totalAmount-shopInfo.totalProfit)-shopInfo.returnTotalAmount+shopInfo.saleReturnCost).toFixed(2)}}/{{shopInfo.totalAmount - shopInfo.returnTotalAmount}} * 100={{(shopInfo.totalProfit-shopInfo.returnTotalAmount+shopInfo.saleReturnCost)==0?0:(((shopInfo.totalProfit-shopInfo.returnTotalAmount+shopInfo.saleReturnCost)/(shopInfo.totalAmount-shopInfo.returnTotalAmount))*100).toFixed(2)}}%</view>
</view>
<view v-if="showDan == 1" style="margin-top: 20rpx;">
<view>公式:销售利润-(退货金额-退货成本)</view>
<view>{{shopInfo.totalProfit}}-({{shopInfo.returnTotalAmount}}-{{shopInfo.saleReturnCost}})={{(shopInfo.totalAmount-(shopInfo.totalAmount-shopInfo.totalProfit)-shopInfo.returnTotalAmount+shopInfo.saleReturnCost).toFixed(2)}}</view>
</view>
<view v-if="showDan == 0" style="margin-top: 20rpx;">
<view>公式:销售金额-销售成本</view>
<view>{{shopInfo.totalAmount}}-{{shopInfo.totalAmount - shopInfo.totalProfit}}={{shopInfo.totalProfit}}</view>
</view>
</view>
</view>
</view>
</template>
@ -70,8 +273,15 @@
export default {
data() {
return {
showDan:'',
showFormula: false,
range:[],
shopInfo:{},
shopInfo:{
totalProfit:0,
returnTotalAmount:0,
saleReturnCost:0
},
showDayPrice: false,
type:uni.getStorageSync('type'),
dataList:[{
name:'销售金额',
@ -86,13 +296,21 @@
value:'shishou',
icon:'auth'
},{
name:'利润',
value:'lirun',
name:'销售利润',
value:'xiaoshoulirun',
icon:'wallet'
},{
name:'实际利润',
value:'shijilirun',
icon:'wallet'
},{
name:'进货金额',
value:'jinhuo',
icon:'home'
},{
name:'进货总件数',
value:'jinhuo',
icon:'home'
},{
name:'退货金额',
value:'tuihuo',
@ -103,8 +321,12 @@
icon:'refreshempty'
},{
name:'下单客户',
value:'xiadankehu',
value:'xiadan',
icon:'staff'
},{
name:'热销商品',
value:'rexiao',
icon:'fire'
}]
};
},
@ -116,19 +338,37 @@
},
methods: {
goDetail(item){
if(item.value == 'lirun'){
if(item == 'xiaoshoulirun'){
uni.navigateTo({
url:'/package1/index/lirun?value='+ item.value + '&range=' + JSON.stringify(this.range)
url:'/package1/index/lirun?value='+ item + '&range=' + JSON.stringify(this.range)
})
}else if(item == 'shijilirun'){
this.showDayPrice = true
}else if(item == 'rexiao'){
uni.navigateTo({
url:'/package1/index/fireGoods'
})
}else{
uni.navigateTo({
url:'/package1/index/statisticsDetail?value='+ item.value + '&range=' + JSON.stringify(this.range)
url:'/package1/index/statisticsDetail?value='+ item + '&range=' + JSON.stringify(this.range)
})
}
},
changeFormula(type){
console.log(type)
this.showFormula = true
this.showDan = type
setTimeout(res=>{
this.showFormula = false
},2000)
},
getSaleInfo() {
this.shopInfo = {}
this.shopInfo = {
totalProfit:0,
returnTotalAmount:0,
saleReturnCost:0
}
this.tui.request("/app/sale/getShopAll", "POST", {
pageVo: {
pageSize: 5,
@ -273,4 +513,16 @@
font-size: 34rpx;
border-bottom: 1px solid #eee;
}
.tan-lirun{
margin-top: 20rpx;
width: 45%;
height: 60px;
display: flex;
flex-direction: column;
text-align: center;
float: left;
background-image: linear-gradient(#84C1FF, #C4E1FF) !important;
color: #fff;
border-radius: 10px;
}
</style>

2
pages/index/home.vue

@ -16,7 +16,7 @@
if (uni.getStorageSync('hiver_token')) {
if (uni.getStorageSync('wayValue') == 1) {
uni.reLaunch({
url: '/package1/other/logistics'
url: '/package1/other/newLogisticsIndex'
})
} else if (uni.getStorageSync('wayValue') == 0) {
uni.reLaunch({

191
pages/index/index.vue

@ -7,12 +7,10 @@
</view>
<view class="contentPadding" style="color:#000; !important;padding: 28rpx 20rpx 0 !important;">
<view class="title-btn-d">
<view class="title-btn-sbtn" @tap="goSonPage('/pages/index/returnList')">
<view class="title-btn-sbtn" @tap="goSonPage('/package1/index/fireGoods')">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/b46f57fed2604228bcd1801a156fafbc.jpg"
alt="" class="title-img" />
<text>待退货</text>
<text v-if="waitCount.waitReturnCount > 0"
class="red-circle">{{waitCount.waitReturnCount > 99 ? '99+' :waitCount.waitReturnCount}}</text>
<text>热销商品</text>
</view>
<view class="title-btn-sbtn" @tap="goSonPage('/package1/index/order?listStatus=6')">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/15211be8bbf74600ba90e040c57e2f45.jpg"
@ -65,9 +63,11 @@
<uni-icons type="help" size="21"
style="position: absolute;bottom: 35rpx;right: 10rpx;"></uni-icons>
</u-grid-item>
<u-grid-item>
<u-count-to :start-val="0" :end-val="type==0?shopInfo.totalProfit:0" :decimals="2"></u-count-to>
<u-grid-item @tap='shijiPrice = true'>
<u-count-to :start-val="0" :end-val="type==0?(shopInfo.totalProfit-shopInfo.returnTotalAmount+shopInfo.saleReturnCost).toFixed(2):0" :decimals="2"></u-count-to>
<view class="grid-text">今日利润</view>
<uni-icons type="help" size="21"
style="position: absolute;bottom: 35rpx;right: 10rpx;"></uni-icons>
</u-grid-item>
</u-grid>
<view style="display: flex;text-align: center;font-size: 30rpx;">
@ -149,6 +149,8 @@
<view class="border-line"></view>
<u-cell icon="account-fill" url="/package1/index/peopleList?popleType=khName&noClick=1"
title="客户管理" clickable isLink arrow-direction="left"></u-cell>
<!-- <u-cell icon="account-fill" url="/package1/index/customClassList"
title="客户分类" clickable isLink arrow-direction="left"></u-cell> -->
<!-- <u-cell icon="account-fill" url="/pages/index/downstream" v-if="type==0" title="客户欠款"
clickable isLink arrow-direction="left"></u-cell> -->
<u-cell icon="account-fill" url="/package1/index/order?type=dingdan" title="销售单历史" clickable
@ -163,7 +165,7 @@
<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 == '测试库新店'"
<u-cell v-if="shopName == '提钱' || shopName == '测试库新店'"
icon="integral-fill" url="/package1/AI/addAiList" title="管理员登录" clickable isLink
arrow-direction="left"></u-cell>
<!-- <u-cell icon="integral-fill" url="" title="电费缴纳" clickable isLink
@ -190,7 +192,7 @@
<!-- 宣传页 -->
<uni-popup ref="publicizepopup" background-color="#fff">
<view class="publicize-content">
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/f0caf92a14d243e8b8b42f0ddf765a96.jpg"
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/baa8e7c7b38d4feabeed8cf43f49ccfb.png"
alt="宣传图">
<view class="pop-close" @tap="popClose">X</view>
</view>
@ -207,6 +209,86 @@
</view>
</view>
</view>
<view v-if="showFormula"
style="height:230rpx;position: fixed;z-index:999;margin:auto;left:0;right:0;top:0;bottom:0;width:200px;background: rgba(0,0,0,0.7);border-radius: 10px;color: #eee;">
<view style="width:100%;height:80rpx;font-size: 30rpx;text-align: center;line-height: 80rpx;">
{{showDan == 0?'销售利润':showDan == 1?'实际利润':showDan == 2?'实际利润率':showDan == 3?'销售利润率':''}}计算公式
</view>
<view style="text-align: center;line-height: 40rpx;">
<view v-if="showDan == 3" style="margin-top: 20rpx;">
<view>公式:销售利润/销售金额*100</view>
<view>{{shopInfo.totalProfit}}/{{shopInfo.totalAmount}}*100={{(shopInfo.totalProfit == 0 && shopInfo.totalAmount == 0)?0:((shopInfo.totalProfit/shopInfo.totalAmount)*100).toFixed(2)}}%</view>
</view>
<view v-if="showDan == 2" style="margin-top: 20rpx;">
<view>公式:实际利润/(销售金额-退货金额)</view>
<view>{{(shopInfo.totalAmount-(shopInfo.totalAmount-shopInfo.totalProfit)-shopInfo.returnTotalAmount+shopInfo.saleReturnCost).toFixed(2)}}/{{shopInfo.totalAmount - shopInfo.returnTotalAmount}} * 100={{(shopInfo.totalProfit-shopInfo.returnTotalAmount+shopInfo.saleReturnCost)==0?0:(((shopInfo.totalProfit-shopInfo.returnTotalAmount+shopInfo.saleReturnCost)/(shopInfo.totalAmount-shopInfo.returnTotalAmount))*100).toFixed(2)}}%</view>
</view>
<view v-if="showDan == 1" style="margin-top: 20rpx;">
<view>公式:销售利润-(退货金额-退货成本)</view>
<view>{{shopInfo.totalProfit}}-({{shopInfo.returnTotalAmount}}-{{shopInfo.saleReturnCost}})={{(shopInfo.totalAmount-(shopInfo.totalAmount-shopInfo.totalProfit)-shopInfo.returnTotalAmount+shopInfo.saleReturnCost).toFixed(2)}}</view>
</view>
<view v-if="showDan == 0" style="margin-top: 20rpx;">
<view>公式:销售金额-销售成本</view>
<view>{{shopInfo.totalAmount}}-{{shopInfo.totalAmount - shopInfo.totalProfit}}={{shopInfo.totalProfit}}</view>
</view>
</view>
</view>
<view v-if="shijiPrice" style="width:100%;height:100%;position: fixed;top: 0;background: rgba(0,0,0,0.7);">
<view
style="position: fixed;margin:auto;height:660rpx;left:0;right:0;top:0;bottom:0;width:600rpx;background:#fff;border-radius: 10px;color: #000;">
<view style="width:100%;height:80rpx;font-size: 30rpx;text-align: center;line-height: 80rpx;font-weight: bold;">
利润明细
</view>
<view style="display: flex;">
<view style="width: 25%;display: flex;flex-direction: column;text-align: center;">
<text style="font-weight: bold;">{{shopInfo.totalAmount}}</text>
<text>销售金额</text>
</view>
<view style="width: 25%;display: flex;flex-direction: column;text-align: center;">
<text style="font-weight: bold;">{{shopInfo.totalAmount - shopInfo.totalProfit}}</text>
<text>销售成本</text>
</view>
<view style="width: 25%;display: flex;flex-direction: column;text-align: center;">
<text style="font-weight: bold;">{{shopInfo.returnTotalAmount}}</text>
<text>退货金额</text>
</view>
<view style="width: 25%;display: flex;flex-direction: column;text-align: center;">
<text style="font-weight: bold;">{{shopInfo.saleReturnCost}}</text>
<text>退货成本</text>
</view>
</view>
<view style="width: 95%;height:380rpx;margin: 0 auto;margin-top: 20rpx;border-top: 1px solid #eee;">
<view style="background: #ecf5ff;width: 100%;color: #5fd9ee;height: 80rpx;line-height: 80rpx;padding-left: 10px;">
点击↓↓↓可查看计算公式
</view>
<view class="tan-lirun" @tap="changeFormula('0')">
<text style="font-weight: bold;margin-top: 20rpx;">{{shopInfo.totalProfit}}</text>
<text>销售利润</text>
</view>
<view @tap="changeFormula('1')" class="tan-lirun" style="float: right;" >
<text style="font-weight: bold;margin-top: 20rpx;">{{(shopInfo.totalAmount-(shopInfo.totalAmount-shopInfo.totalProfit)-shopInfo.returnTotalAmount+shopInfo.saleReturnCost).toFixed(2)}}</text>
<text>实际利润</text>
</view>
<view @tap="changeFormula('3')" class="tan-lirun">
<text style="font-weight: bold;margin-top: 20rpx;">{{shopInfo.totalProfit == 0 ?0:((shopInfo.totalProfit/shopInfo.totalAmount)*100).toFixed(2)}}%</text>
<text>销售利润率</text>
</view>
<view @tap="changeFormula('2')" class="tan-lirun" style="float: right;">
<text style="font-weight: bold;margin-top: 20rpx;">{{(shopInfo.totalProfit-shopInfo.returnTotalAmount+shopInfo.saleReturnCost)==0?0:(((shopInfo.totalProfit-shopInfo.returnTotalAmount+shopInfo.saleReturnCost)/(shopInfo.totalAmount-shopInfo.returnTotalAmount))*100).toFixed(2)}}%</text>
<text>实际利润率</text>
</view>
</view>
<view @tap="shijiPrice = false" style="height: 100rpx;width: 100%;line-height: 100rpx;text-align: center;border-top: 1px solid #eee;font-size: 40rpx;">
确定
</view>
</view>
</view>
</view>
</template>
<!-- cmd-nav-bar.vue index.vue pages.json -->
@ -224,11 +306,14 @@
src: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg',
inventoryList: [],
settingShow: false,
chartData: {},
showFormula: false,
chartData: {},
showDan:'',
returnList:new Map(),
shopName: '',
waimaiRight:'-70rpx',
showDayPrice: false,
shijiPrice:false,
opts: {
padding: [15, 10, 0, 15],
dataLabel: true,
@ -264,7 +349,19 @@
}
},
},
shopInfo: {},
shopInfo: {
totalAmount: 0,
totalAlreadyEarn: 0,
totalPayAmount: 0,
totalCCount: 0,
totalCount: 0,
totalJCount: 0,
totalProfit: 0,
saleReturnCost:0,
returnTotalAmount: 0,
returnTotalCount: 0,
totalAlreadyEarnDetail: 0
},
waitCount: {},
enDayShow:false,
endDay:'',
@ -282,6 +379,7 @@
},
onShow() {
this.getSaleInfo()
this.getEndTime()
},
onLoad() {
let that = this;
@ -303,7 +401,7 @@
that.type = res.data
}
});
this.getEndTime()
var today = new Date();
var day = today.getDate();
//宣传页
@ -321,26 +419,18 @@
methods: {
//获取店铺到期时间
getEndTime(){
var today = new Date();
var day = today.getDate();
if(uni.getStorageSync('endTime')){
this.endTime = uni.getStorageSync('endTime')
this.endDay = this.daysUntil(this.endTime)
this.textArr = []
this.tui.request("/app/shop/getShopInfoById", "post", {
id: uni.getStorageSync('shopId')
}, false, true).then((res) => {
uni.setStorageSync('endTime',res.result.endTime)
this.endTime = res.result.endTime
this.endDay = this.daysUntil(res.result.endTime)
if(this.endDay < 7){
this.enDayShow = true
}
}else{
this.tui.request("/app/shop/getShopInfoById", "post", {
id: uni.getStorageSync('shopId')
}, false, true).then((res) => {
uni.setStorageSync('endTime',res.result.endTime)
this.endTime = res.result.endTime
this.endDay = this.daysUntil(res.result.endTime)
if(this.endDay < 7){
this.enDayShow = true
}
})
}
})
setTimeout(res1=>{
if(this.endTime != undefined){
let text = '您的店铺有效期至'+this.endTime+',还有'+this.endDay+'天到期,请及时联系管理员续费或开通'
@ -357,6 +447,14 @@
const daysDifference = Math.ceil(differenceInMs / (1000 * 60 * 60 * 24));
return daysDifference;
},
changeFormula(type){
console.log(type)
this.showFormula = true
this.showDan = type
setTimeout(res=>{
this.showFormula = false
},2000)
},
popClose() {
this.$refs.publicizepopup.close()
},
@ -487,7 +585,7 @@
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].discountAmount?item.saleDetailDTOList[i].discountAmount:item.saleDetailDTOList[i].wholesalePrice
obj.wholesalePrice = item.saleDetailDTOList[i].wholesalePrice
// obj.discountAmount = item.saleDetailDTOList[i].discountAmount
obj.returnPrice = item.saleDetailDTOList[i].returnPrice
obj.saleId = item.id
@ -527,7 +625,19 @@
})
},
getSaleInfo() {
this.shopInfo = {}
this.shopInfo = {
totalAmount: 0,
totalAlreadyEarn: 0,
totalPayAmount: 0,
totalCCount: 0,
totalCount: 0,
totalJCount: 0,
totalProfit: 0,
saleReturnCost:0,
returnTotalAmount: 0,
returnTotalCount: 0,
totalAlreadyEarnDetail: 0
}
this.inventoryList = []
this.tui.request("/app/sale/getShopAll", "POST", {
pageVo: {
@ -544,6 +654,7 @@
totalCount: res.result.totalCount,
totalJCount: res.result.totalJCount,
totalProfit: res.result.totalProfit,
saleReturnCost:res.result.saleReturnCost,
returnTotalAmount: res.result.returnTotalAmount,
returnTotalCount: res.result.returnTotalCount,
totalAlreadyEarnDetail: res.result.totalAlreadyEarnDetail
@ -814,14 +925,14 @@
}
.publicize-content {
width: 460rpx;
height: 600rpx;
width: 600rpx;
height: 700rpx;
}
.publicize-content img {
width: 460rpx;
height: 460rpx;
width: 600rpx;
height: 600rpx;
border-radius: 50px;
}
@ -883,4 +994,16 @@
line-height: 60rpx;
font-size: 30rpx;
}
.tan-lirun{
margin-top: 20rpx;
width: 45%;
height: 60px;
display: flex;
flex-direction: column;
text-align: center;
float: left;
background-image: linear-gradient(#84C1FF, #C4E1FF) !important;
color: #fff;
border-radius: 10px;
}
</style>

128
pages/index/shareStyle.vue

@ -10,7 +10,7 @@
:class="item.parentId ? 'red' :''">{{item.categoryName}}</text>
</view>
</view>
<view class="content-right" style="width: 570rpx;background: #fff;margin: 100rpx 0 120rpx 170rpx;height: 76%;padding-bottom: 50rpx;">
<view class="content-right" style="padding-top:14%;width: 570rpx;background: #fff;margin: 0 0 120rpx 170rpx;height: 76%;padding-bottom: 50rpx;">
<view class="right-box" v-for="(item,index) in shopList" :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> -->
@ -155,6 +155,10 @@
</view>
</view>
</uni-popup>
<view v-if="canvasshow">
<canvas canvas-id="myCanvas" style="width: 1700px; height: 2200px;"></canvas>
</view>
</view>
</template>
@ -163,6 +167,7 @@
components: {},
data() {
return {
canvasshow:false,
indexList: [],
pageNum: 1, //分页的页码
shopList: [],
@ -182,7 +187,9 @@
gwcList: [],
checkPayData:'',
data:{},
height:0
height:0,
base64:'',
tempFilePath:''
}
},
created() {
@ -232,6 +239,112 @@
this.shopName = options.shopName ? options.shopName : uni.getStorageSync('shopName')
},
methods: {
getUserData(khid){
let that = this;
this.tui.request("/order/ow/getWechatQrcode", "post", {
page: 'package1/index/downStearmList',
scene:khid,
envVersion: __wxConfig.envVersion,
}, false, true).then((res1) => {
console.log('getWechatQrcode',res1)
if (res1.code == 200) {
let imgA = res1.result;
uni.downloadFile({
url: imgA,
success: (res2) => {
console.log('downloadFile',res2)
this.base64 = res2.tempFilePath
if(this.data.shareType == "1"){
uni.showLoading({
title:'请求中...'
})
setTimeout(res3=>{
uni.hideLoading()
uni.showModal({
title:'提示',
content:'确定要分享全部吗?',
success(res3) {
if(res3.confirm){
console.log('点了确定')
that.getData()
}
}
})
},500)
}else{
this.$refs.share.open()
}
}
});
} else {
this.tui.toast(res.message)
}
}).catch((res) => {
console.log('报错',res)
})
},
getData() {
let that = this
uni.showLoading({
title:'生成中...'
})
this.canvasshow = true
const ctx = uni.createCanvasContext('myCanvas', this);
//背景图
let imgA = 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/0f96ca9700b741d486dd23bbe4e0f970.jpg';
uni.downloadFile({
url: imgA,
success: (res2) => {
console.log('下载北京图',res2)
if (res2.statusCode === 200) {
// // 绘制第一张图片
ctx.drawImage(res2.tempFilePath, 0, 0, 1700, 2200);
ctx.draw()
// 绘制第二张图片
ctx.drawImage(that.base64, 650, 850, 400, 400);
ctx.draw(true);
// 设置字体样式
ctx.font = 'bold 200px SimSun';
// 设置文字颜色
ctx.fillStyle = '#088FEB';
var text = this.shopName;
var textWidth = ctx.measureText(text).width;
console.log(textWidth)
// 计算居中位置
var x = (1700 - textWidth) / 2;
// 绘制文字
ctx.fillText(text, x, 700);
ctx.draw(true)
setTimeout(ress=>{
uni.canvasToTempFilePath({
x: 0,
y: 0,
width: 1700,
height: 2200,
destWidth: 1701,
destHeight: 2200,
canvasId: 'myCanvas',
success: (res3) => {
console.log('图片预览',res3.tempFilePath)
this.canvasshow = false
this.tempFilePath = res3.tempFilePath
uni.previewImage({
urls: [res3.tempFilePath]
})
uni.hideLoading()
}
});
},500)
}
}
});
},
//初始化获取分类列表
getGategoryList() {
this.tui.request("/app/productCategory/list", "get", {
@ -457,19 +570,20 @@
}
})
},
checkPay(type){
checkPay(type){
let that = this;
this.data.priceType = type
this.tui.request("/app/productShare/save", "POST", this.data, false, true).then((res) => {
if (res.code == 200) {
this.khid = res.result.id
this.khid = res.result.id
this.getUserData(this.khid)
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
this.checkPayData = type
}).catch((res) => {})
this.checkPayData = type
this.$refs.payDialog.close()
this.$refs.share.open()
},
//关闭购物车弹窗
closeCar() {

2232
pages/inventory/goodsList1.vue

File diff suppressed because it is too large

7
pages/inventory/inventory.vue

@ -56,6 +56,10 @@
</view>
</view>
<view class="content-right" style="width: 570rpx;background: #fff;margin-left:170rpx;margin-top: 300rpx;">
<view style="display: flex;height: 60rpx;line-height: 60rpx;background: #C6E2FF;color: #777;text-align: center;">
<view style="width: 50%;">商品数:{{indexList[categoryIndex].count != undefined ? indexList[categoryIndex].count : 0}}</view>
<view style="width: 50%;">库存数:{{indexList[categoryIndex].stockCount != undefined ? indexList[categoryIndex].stockCount : 0}}</view>
</view>
<view class="right-box" v-for="(item,index) in shopList" :key="index" @tap="goDetail(item)">
<view class="box-left" @tap.stop="largeImg(item)">
<img :src="item.productPicture" class="img-radius" alt="" v-if="item.productPicture">
@ -347,7 +351,8 @@
} else {
this.indexList[i].parentId = false
}
}
}
this.categoryIndex = index
this.categoryId = this.indexList[index].id
this.pageNum = 1
this.searchName = ""

149
pages/inventory/inventoryDetail.vue

@ -90,57 +90,83 @@
</uni-table>
</view>
</view>
<view v-show="current === 2">
<view v-for="(item,index) in detailList" :key="index" @tap="goDetail(item)">
<view style="width: 100%;height: 80rpx;line-height: 80rpx;">
<text style="display:inline-block;width: 55%;text-align: center;font-weight: bold;font-size: 30rpx;">
{{item.purchase.createTime}}
</text>
<text style="display:inline-block;width: 45%;text-align: center;border-left: 1px solid #eee;">
操作:{{item.purchase.createByName}}
</text>
</view>
<uni-table border stripe emptyText="暂无更多数据">
<uni-tr style="background: #eee;">
<uni-th align="center" width="85">供应商</uni-th>
<uni-th align="center" width="50">数量</uni-th>
<uni-th align="center" width="70">进货价</uni-th>
<uni-th align="center" width="70">总价</uni-th>
</uni-tr>
<uni-tr>
<uni-td align="center">{{item.purchase.supplierName}}</uni-td>
<uni-td align="center" @tap.stop="rukuDetail(item.purchaseDetails[0])"><text style="color:blue;text-decoration: underline;">{{item.purchase.totalAmount}}</text></uni-td>
<uni-td align="center">{{type == 0?(item.purchaseDetails[0].purchasePrice==null?0:item.purchaseDetails[0].purchasePrice):0}}</uni-td>
<uni-td align="center">{{type == 0?item.purchaseDetails[0].zPrice:0}}</uni-td>
</uni-tr>
</uni-table>
<view v-show="current === 2">
<view v-for="(item,index) in detailList" :key="index">
<view style="width: 100%;height: 80rpx;line-height: 80rpx;">
<text style="display:inline-block;width: 55%;text-align: center;font-weight: bold;font-size: 30rpx;">
{{item.createTime}}
</text>
<text style="display:inline-block;width: 45%;text-align: center;border-left: 1px solid #eee;">
操作:{{item.createByName?item.createByName:''}}
</text>
</view>
<uni-table border stripe emptyText="暂无更多数据">
<uni-tr style="background: #eee;">
<uni-th align="center" width="85">客户</uni-th>
<uni-th align="center" width="50">数量</uni-th>
<uni-th align="center" width="70">退货价</uni-th>
<uni-th align="center" width="70">采购价</uni-th>
</uni-tr>
<uni-tr @tap="tuihuoDetail(item)">
<uni-td align="center">{{item.userName?item.userName:''}}</uni-td>
<uni-td align="center">{{item.returnSaleDetailList[0].productCount?item.returnSaleDetailList[0].productCount:'0'}}</uni-td>
<uni-td align="center">{{item.returnSaleDetailList[0].discountAmount?item.returnSaleDetailList[0].discountAmount:'0'}}</uni-td>
<uni-td align="center">{{type == 0?(item.returnSaleDetailList[0].purchasePrice?item.returnSaleDetailList[0].purchasePrice:'0'):0}}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
<view v-show="current === 3">
<view v-for="(item,index) in detailList" :key="index">
<view style="width: 100%;height: 80rpx;line-height: 80rpx;">
<text style="display:inline-block;width: 55%;text-align: center;font-weight: bold;font-size: 30rpx;">
{{item.createTime}}
</text>
<text style="display:inline-block;width: 45%;text-align: center;border-left: 1px solid #eee;">
操作:{{item.createByName?item.createByName:''}}
</text>
</view>
<uni-table border stripe emptyText="暂无更多数据">
<uni-tr style="background: #eee;">
<uni-th align="center" width="85">客户</uni-th>
<uni-th align="center" width="50">数量</uni-th>
<uni-th align="center" width="70">退货价</uni-th>
<uni-th align="center" width="70">采购价</uni-th>
</uni-tr>
<uni-tr @tap="tuihuoDetail(item)">
<uni-td align="center">{{item.userName?item.userName:''}}</uni-td>
<uni-td align="center">{{item.returnSaleDetailList[0].productCount?item.returnSaleDetailList[0].productCount:'0'}}</uni-td>
<uni-td align="center">{{item.returnSaleDetailList[0].discountAmount?item.returnSaleDetailList[0].discountAmount:'0'}}</uni-td>
<uni-td align="center">{{type == 0?(item.returnSaleDetailList[0].purchasePrice?item.returnSaleDetailList[0].purchasePrice:'0'):0}}</uni-td>
</uni-tr>
</uni-table>
<view v-for="(item,index) in detailList" :key="index" @tap="goDetail(item)">
<view style="width: 100%;height: 80rpx;line-height: 80rpx;">
<text style="display:inline-block;width: 55%;text-align: center;font-weight: bold;font-size: 30rpx;">
{{item.purchase.createTime}}
</text>
<text style="display:inline-block;width: 45%;text-align: center;border-left: 1px solid #eee;">
操作:{{item.purchase.createByName}}
</text>
</view>
<uni-table border stripe emptyText="暂无更多数据">
<uni-tr style="background: #eee;">
<uni-th align="center" width="85">供应商</uni-th>
<uni-th align="center" width="50">数量</uni-th>
<uni-th align="center" width="70">进货价</uni-th>
<uni-th align="center" width="70">总价</uni-th>
</uni-tr>
<uni-tr>
<uni-td align="center">{{item.purchase.supplierName}}</uni-td>
<uni-td align="center" @tap.stop="rukuDetail(item.purchaseDetails[0])"><text style="color:blue;text-decoration: underline;">{{item.purchase.totalAmount}}</text></uni-td>
<uni-td align="center">{{type == 0?(item.purchaseDetails[0].purchasePrice==null?0:item.purchaseDetails[0].purchasePrice):0}}</uni-td>
<uni-td align="center">{{type == 0?item.purchaseDetails[0].zPrice:0}}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
<view v-show="current === 4">
<view v-for="(item,index) in detailList" :key="index" @tap="goDetail(item)">
<view style="width: 100%;height: 80rpx;line-height: 80rpx;">
<text style="display:inline-block;width: 55%;text-align: center;font-weight: bold;font-size: 30rpx;">
{{item.purchase.createTime}}
</text>
<text style="display:inline-block;width: 45%;text-align: center;border-left: 1px solid #eee;">
操作:{{item.purchase.createByName}}
</text>
</view>
<uni-table border stripe emptyText="暂无更多数据">
<uni-tr style="background: #eee;">
<uni-th align="center" width="85">供应商</uni-th>
<uni-th align="center" width="50">数量</uni-th>
<uni-th align="center" width="70">进货价</uni-th>
<uni-th align="center" width="70">总价</uni-th>
</uni-tr>
<uni-tr>
<uni-td align="center">{{item.purchase.supplierName}}</uni-td>
<uni-td align="center" @tap.stop="rukuDetail(item.purchaseDetails[0])"><text style="color:blue;text-decoration: underline;">{{item.purchase.totalAmount}}</text></uni-td>
<uni-td align="center">{{type == 0?(item.purchaseDetails[0].purchasePrice==null?0:item.purchaseDetails[0].purchasePrice):0}}</uni-td>
<uni-td align="center">{{type == 0?item.purchaseDetails[0].zPrice:0}}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
</view>
<!-- 打印选择框 -->
@ -291,7 +317,7 @@
GDList:[],
isPrint:false,
bufferData: [],
items:['库存', '销售明细', '入库明细','退货'],
items:['库存', '销售明细', '销售退货','入库明细'],
current: 0,
horizontal: 'right',
pecsList:[],
@ -386,10 +412,12 @@
var url;
if(this.current==1){ //销售
url = "/app/sale/getSaleListByProductId"
}else if(this.current==2){ //入库
url = "/app/purchase/getPurchaseListByProductId"
}else if(this.current==3){ //退货
}else if(this.current==2){ //销售退货
url = "/app/return/getReturnSaleListByProductId"
}else if(this.current==3){ //入库
url = "/app/purchase/getPurchaseListByProductId"
}else if(this.current==4){ //退货
url = "/app/purchase/getPurchaseListByProductId"
}
this.tui.request(url, "post", {
productId: this.dataList.id,
@ -410,23 +438,26 @@
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 += (Number(this.detailList[i].saleDetailDTOList[m].discountAmount) - Number(this.detailList[i].saleDetailDTOList[m].purchasePrice)) * Number(this.detailList[i].saleDetailDTOList[m].stockLogList1[0].productCount)
console.log(this.detailList[i].lirun)
this.detailList[i].productCount += this.detailList[i].saleDetailDTOList[m].stockLogList1[0].productCount
}
}
this.detailList[i].lirun = this.detailList[i].lirun.toFixed(2)
}
}else if(this.current==2){
for(let i=0;i<this.detailList.length;i++){
for(let m=0;m<this.detailList[i].purchaseDetails.length;m++){
this.detailList[i].purchaseDetails[m].zPrice = this.detailList[i].purchaseDetails[m].productCount * this.detailList[i].purchaseDetails[m].purchasePrice
}
}
}else if(this.current==3){
for(let i=0;i<this.detailList.length;i++){
this.detailList[i].returnSaleDetailList[0].productCount = 0
for(let m=0;m<this.detailList[i].returnSaleDetailList[0].stockLogList1.length;m++){
this.detailList[i].returnSaleDetailList[0].productCount += this.detailList[i].returnSaleDetailList[0].stockLogList1[m].productCount
}
}
}else if(this.current==3){
for(let i=0;i<this.detailList.length;i++){
for(let m=0;m<this.detailList[i].purchaseDetails.length;m++){
this.detailList[i].purchaseDetails[m].zPrice = this.detailList[i].purchaseDetails[m].productCount * this.detailList[i].purchaseDetails[m].purchasePrice
}
}
}
this.pages = res.result.pages

16
pages/login/login.vue

@ -213,11 +213,10 @@
this.checkShop(res.result.shopList[0])
}
} else {
this.tui.toast(res.message)
setTimeout(res=>{
this.tui.toast(res.message)
},1000)
this.getCaptchaImg()
this.getCaptchaImg()
},1000)
}
}).catch((res) => {
@ -233,9 +232,12 @@
success: function (res1) {
if(that.wayValue ==1){
that.tui.request("/app/logitics/chooseCompany", "POST", {
companyId: item.id
companyId: item.id,
username:item.username
}, false, true).then((res) => {
if (res.code == 200) {
if (res.code == 200) {
uni.setStorageSync('username',res.result.logiticsCompany.username)
uni.setStorageSync('mobile',res.result.logiticsCompany.mobile)
uni.setStorageSync("hiver_token", res.result.lcomToken)
uni.setStorageSync("transCompany", res.result.logiticsCompany.id)
uni.setStorageSync("isOnLine", res.result.logiticsCompany.isOnLine)
@ -246,7 +248,7 @@
that.tui.toast('登录成功', 2000, true)
setTimeout(() => {
uni.reLaunch({
url: '/package1/other/logistics'
url: '/package1/other/newLogisticsIndex'
})
}, 200)
} else {

Loading…
Cancel
Save