耗材问题提交,盘点传值问题计算问题

This commit is contained in:
duan
2024-10-30 16:02:19 +08:00
parent 8b0e22e2cd
commit 042c20a52d
10 changed files with 28 additions and 26 deletions

View File

@@ -91,9 +91,6 @@
// } // }
// }) // })
onMounted(() => { onMounted(() => {
// console.log(props,'调试121')
// let obj = JSON.parse(props.item)
// console.log(obj,'调试121')
gettbConsTypeList() gettbConsTypeList()
}) })

View File

@@ -182,7 +182,6 @@
* 确认 * 确认
*/ */
function affirm() { function affirm() {
console.log(consId.value,'调试1')
let params = { let params = {
coverImg: vdata.imgUrlList, coverImg: vdata.imgUrlList,
consId: consId.value, consId: consId.value,

View File

@@ -167,9 +167,9 @@
let toggle = (d) => { let toggle = (d) => {
refMoreSheet.value.open() refMoreSheet.value.open()
actionSheet.active = d
actionSheet.activeId = d.id actionSheet.activeId = d.id
report.data.consId = d.id report.data.consId = d.id
actionSheet.active = d
} }
let sheetClick = (index) => { let sheetClick = (index) => {
@@ -217,7 +217,6 @@
} }
// async function viewpermission(d) { // async function viewpermission(d) {
// let res = await hasPermission(d) // let res = await hasPermission(d)
// console.log(res,'调试1')
// return res // return res
// } // }
async function getList(d = "") { async function getList(d = "") {

View File

@@ -67,7 +67,7 @@
let showStatus = ref(false) let showStatus = ref(false)
const props = defineProps({ const props = defineProps({
item: { item: {
type: Object type: ''
} }
}) })
let datas = reactive({ let datas = reactive({
@@ -86,12 +86,12 @@
// let a = datas.item.balance * -1 // let a = datas.item.balance * -1
// return formatDecimal((a - datas.form.balance) * datas.item.price) // return formatDecimal((a - datas.form.balance) * datas.item.price)
// } else { // } else {
return formatDecimal((datas.item.balance - datas.form.balance) * datas.item.price) return (datas.form.balance - datas.item.balance ) * datas.item.price
// } // }
}) })
let profitNumber = computed(() => { let profitNumber = computed(() => {
// 盈亏数量 // 盈亏数量
return datas.item.balance - datas.form.balance return datas.form.balance- datas.item.balance
}) })
function toggle() { function toggle() {

View File

@@ -18,12 +18,13 @@
</view> </view>
<view class="viewrecordsTop"> <view class="viewrecordsTop">
<view style="padding:32rpx 16rpx;"> <view style="padding:32rpx 16rpx;">
<view class=""> <view @tap="getNewdata('addCountNumber')">
增加数量 <text 增加数量 <text
style="color: #76ACF0;font-weight: bold;">{{datas.countList?datas.countList.addCountNumber:''}}</text> style="color: #76ACF0;font-weight: bold;">{{datas.countList?datas.countList.addCountNumber:''}}</text>
</view> </view>
<view class="df viewdf"> <view class="df viewdf">
<view style="font-size: 24rpx;border-right: 1px solid #999; width: 142rpx;text-align: center;"> <view @tap="getNewdata('stockInNumber')"
style="font-size: 24rpx;border-right: 1px solid #999; width: 142rpx;text-align: center;">
<view style="color: #999999;"> <view style="color: #999999;">
入库 入库
</view> </view>
@@ -31,7 +32,7 @@
{{datas.countList?datas.countList.stockInNumber:''}} {{datas.countList?datas.countList.stockInNumber:''}}
</view> </view>
</view> </view>
<view style="font-size: 24rpx;width: 178rpx;text-align: center;"> <view @tap="getNewdata('addNumber')" style="font-size: 24rpx;width: 178rpx;text-align: center;">
<view style="color: #999999;"> <view style="color: #999999;">
手动增加 手动增加
</view> </view>
@@ -42,12 +43,13 @@
</view> </view>
</view> </view>
<view style="padding:32rpx 16rpx;"> <view style="padding:32rpx 16rpx;">
<view class=""> <view class="" @tap="getNewdata('subCountNumber')">
减少数量 <text 减少数量 <text
style="color: #52BDA4;font-weight: bold;">{{datas.countList?datas.countList.subCountNumber:0}}</text> style="color: #52BDA4;font-weight: bold;">{{datas.countList?datas.countList.subCountNumber:0}}</text>
</view> </view>
<view class="df viewdf"> <view class="df viewdf">
<view style="font-size: 24rpx;border-right: 1px solid #999; width: 112rpx;text-align: center;"> <view @tap="getNewdata('subNumber')"
style="font-size: 24rpx;border-right: 1px solid #999; width: 112rpx;text-align: center;">
<view style="color: #999999;"> <view style="color: #999999;">
手动减少 手动减少
</view> </view>
@@ -55,7 +57,8 @@
{{datas.countList?datas.countList.subNumber:0}} {{datas.countList?datas.countList.subNumber:0}}
</view> </view>
</view> </view>
<view style="font-size: 24rpx;border-right: 1px solid #999; width: 82rpx;text-align: center;"> <view @tap="getNewdata('stockOutNumber')"
style="font-size: 24rpx;border-right: 1px solid #999; width: 82rpx;text-align: center;">
<view style="color: #999999;"> <view style="color: #999999;">
出库 出库
</view> </view>
@@ -63,7 +66,7 @@
{{datas.countList?datas.countList.stockOutNumber:0}} {{datas.countList?datas.countList.stockOutNumber:0}}
</view> </view>
</view> </view>
<view style="font-size: 24rpx;width: 112rpx;text-align: center;"> <view @tap="getNewdata('saleNumber')" style="font-size: 24rpx;width: 112rpx;text-align: center;">
<view style="color: #999999;"> <view style="color: #999999;">
商品消耗 商品消耗
</view> </view>
@@ -139,7 +142,6 @@
let showStatus = ref(false) let showStatus = ref(false)
onMounted(() => { onMounted(() => {
let items = JSON.parse(props.item) let items = JSON.parse(props.item)
// console.log(items, '调试1')
getlist() getlist()
}) })
const refs = getCurrentInstance() const refs = getCurrentInstance()
@@ -161,6 +163,11 @@
return data return data
} }
let nowStatusIndex = ref(0) let nowStatusIndex = ref(0)
let columnName = ref('')
let getNewdata = (d) => {
columnName.value = d
getlist()
}
function changeNowStatusIndex(i) { function changeNowStatusIndex(i) {
nowStatusIndex.value = i nowStatusIndex.value = i
@@ -171,14 +178,15 @@
const statusHeight = computed(() => { const statusHeight = computed(() => {
return 30 * datas.status.length + 14 + 'px' return 30 * datas.status.length + 14 + 'px'
}) })
let getlist = (conTypeId = "", start, end) => { let getlist = (conTypeId = "", start, end, ) => {
let ids = JSON.parse(props.item)
// 列表 // 列表
tbConsInfoFlowstock({ tbConsInfoFlowstock({
page: 0, page: 0,
shopId: uni.getStorageSync("shopId"), shopId: uni.getStorageSync("shopId"),
size: 30, size: 30,
consId: JSON.parse(props.item).conTypeId, consId: ids.id,
column: "addCountNumber", column: columnName.value,
conTypeId, conTypeId,
@@ -194,6 +202,7 @@
conTypeId, conTypeId,
startTime: start, startTime: start,
endTime: end, endTime: end,
consId: JSON.parse(props.item).id,
}).then(res => { }).then(res => {
datas.countList = res datas.countList = res
}) })
@@ -215,7 +224,6 @@
} }
</style> </style>
<style scoped lang="less"> <style scoped lang="less">
.viewrecordsType { .viewrecordsType {
height: 100rpx; height: 100rpx;
background-color: #fff; background-color: #fff;

View File

@@ -55,7 +55,6 @@ import {rolesGet } from '@/http/yskApi/requestAll.js';
params.isNotHasType2 = 1; params.isNotHasType2 = 1;
rolesGet({ rolesGet({
}).then((res) => { }).then((res) => {
console.log(res, '调试1')
}) })
return res.content return res.content
} }

View File

@@ -197,7 +197,6 @@
} }
function confirm(e) { function confirm(e) {
// console.log(e.value, '调试1')
datas.rolesdata = e.value[0] datas.rolesdata = e.value[0]
show.value = false show.value = false
} }

View File

@@ -139,7 +139,6 @@
function changeTimeFunc(val) { function changeTimeFunc(val) {
vdata.timeSelected = val; vdata.timeSelected = val;
getList() getList()
// console.log(vdata.timeSelected,'调试121')
// refData(); // refData();
// if (vdata.memberIsShow) { // if (vdata.memberIsShow) {
// getMemberData(); // getMemberData();

View File

@@ -6,7 +6,7 @@
<view class="income"> <view class="income">
<view>总收入</view> <view>总收入</view>
<view>{{totalRevenuedata}}</view> <view>{{totalRevenuedata}}</view>
<view>后海&双屿</view> <view>{{shopName}}</view>
</view> </view>
<!-- 统计 or 快捷扫码 --> <!-- 统计 or 快捷扫码 -->
<!-- <Stats ref="statsRef" /> --> <!-- <Stats ref="statsRef" /> -->
@@ -46,12 +46,15 @@
hasPermission hasPermission
} from '@/commons/utils/hasPermission.js' } from '@/commons/utils/hasPermission.js'
uni.hideTabBar() uni.hideTabBar()
let shopName = ref()
onLoad((options) => { onLoad((options) => {
shopName.value = uni.getStorageSync('shopName');
}); });
let totalRevenuedata = ref() let totalRevenuedata = ref()
let totalRevenue= (d)=>{ let totalRevenue= (d)=>{
totalRevenuedata.value=d totalRevenuedata.value=d
} }
// 导航列表 // 导航列表
const navList = [ const navList = [
// { // {

View File

@@ -280,7 +280,6 @@
// } // }
// 获取商户信息,有就回显 // 获取商户信息,有就回显
let info = uni.getStorageSync('MerchantId') let info = uni.getStorageSync('MerchantId')
// console.log(info.merchantName,'调试121')
if (info.merchantName) { if (info.merchantName) {
vdata.formData.merchantName = info.merchantName vdata.formData.merchantName = info.merchantName
vdata.formData.username = info.username vdata.formData.username = info.username