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

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(() => {
// console.log(props,'调试121')
// let obj = JSON.parse(props.item)
// console.log(obj,'调试121')
gettbConsTypeList()
})

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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