diff --git a/pageConsumables/components/my-reportDamage.vue b/pageConsumables/components/my-reportDamage.vue index 360d7c9..15f2492 100644 --- a/pageConsumables/components/my-reportDamage.vue +++ b/pageConsumables/components/my-reportDamage.vue @@ -86,7 +86,7 @@ }) let show = ref(props.show) let type = ref(props.type) - let itemData = ref(props.item) + let consId = ref() watch(() => props.show, (newval) => { show.value = newval }) @@ -104,7 +104,10 @@ /** * 打开报损弹窗 */ - function open() { + function open(d) { + if(d){ + consId.value = d + } show.value = true; emits('open') } @@ -179,9 +182,10 @@ * 确认 */ function affirm() { + console.log(consId.value,'调试1') let params = { coverImg: vdata.imgUrlList, - consId: itemData.value.consId, + consId: consId.value, amount: vdata.stockNumber, shopId: uni.getStorageSync("shopId"), } diff --git a/pageConsumables/editConsumables.vue b/pageConsumables/editConsumables.vue index aa574b0..88476a6 100644 --- a/pageConsumables/editConsumables.vue +++ b/pageConsumables/editConsumables.vue @@ -112,7 +112,7 @@ ...datas.form, shopId: uni.getStorageSync("shopId"), conTypeId: datas.list[datas.nowStatusIndex].id, - id: datas.form.consId + id: datas.form.id }]).then(res => { go.to('PAGES_SALES_CONSUMABLES') }) diff --git a/pageConsumables/index.vue b/pageConsumables/index.vue index f1f7c78..aa185d6 100644 --- a/pageConsumables/index.vue +++ b/pageConsumables/index.vue @@ -74,9 +74,9 @@ import { ref, reactive, - onMounted, computed } from 'vue'; + import {onShow} from '@dcloudio/uni-app' import go from '@/commons/utils/go.js'; import { viewConInfoFlowget, @@ -115,12 +115,11 @@ }) let showStatus = ref(false) let nowStatusIndex = ref(0) - onMounted(() => { + onShow(() => { getList() // 获取分类列表 gettbConsTypeList() }) - function changeNowStatusIndex(i) { nowStatusIndex.value = i showStatus.value = false @@ -156,15 +155,15 @@ let toggle = (d) => { refMoreSheet.value.open() - actionSheet.activeId = d.consId - report.data.consId = d.consId + actionSheet.activeId = d.id + report.data.consId = d.id actionSheet.active = d } let sheetClick = (index) => { if (index == 0) { //打开报损弹窗 - reportDamage.value.open(); + reportDamage.value.open(actionSheet.activeId); report.data.name = actionSheet.active.conName report.data.unit = actionSheet.active.conUnit } else if (index == 1) { @@ -176,6 +175,7 @@ item: JSON.stringify(actionSheet.active) }) } else if (index == 3) { + console.log(actionSheet.activeId,'调试1') toUrl('PAGES_SALES_WAREHOUSEENTRY', { consId: actionSheet.activeId, item: JSON.stringify(actionSheet.active) diff --git a/pageConsumables/inventoryCheck.vue b/pageConsumables/inventoryCheck.vue index 5126368..1535e31 100644 --- a/pageConsumables/inventoryCheck.vue +++ b/pageConsumables/inventoryCheck.vue @@ -97,7 +97,7 @@ function toggle() { tbConsInfotbConCheck({ stockNumber: datas.item.balance, - conInfoId: datas.form.consId, + conInfoId: datas.form.id, lpNum: profitNumber._value }).then(res => { go.to('PAGES_SALES_CONSUMABLES') diff --git a/pageConsumables/outbound.vue b/pageConsumables/outbound.vue index 351d053..9a622d1 100644 --- a/pageConsumables/outbound.vue +++ b/pageConsumables/outbound.vue @@ -19,7 +19,7 @@
  • - 出库数量 + *出库数量 @@ -27,7 +27,7 @@
  • - 单价 + *单价 @@ -84,6 +84,8 @@ + + @@ -92,7 +94,8 @@ ref, computed, reactive, - onMounted + onMounted, + getCurrentInstance } from 'vue'; import color from '@/commons/color.js'; import go from '@/commons/utils/go.js'; @@ -102,6 +105,7 @@ tbShopPurveyor } from '@/http/yskApi/requestAll.js'; let showStatus = ref(false) + const refs = getCurrentInstance() let datas = reactive({ // 供应商列表 list: [], @@ -156,8 +160,25 @@ } function sumbit() { + + if (!datas.form.list.stockNumber) { + refs.ctx.$refs.uToastRef.show({ + type: 'default', + message: "请输入必填项", + }) + return + } + if(!datas.form.list.price){ + refs.ctx.$refs.uToastRef.show({ + type: 'default', + message: "请输入必填项", + }) + return + } datas.form.list.conInfoId = props.consId datas.form.list = [datas.form.list] + + tbConsInfostockInOut({ ...datas.form, // 供应商id diff --git a/pageConsumables/warehouseEntry.vue b/pageConsumables/warehouseEntry.vue index 1309266..612477e 100644 --- a/pageConsumables/warehouseEntry.vue +++ b/pageConsumables/warehouseEntry.vue @@ -19,7 +19,7 @@
  • - 入库数量 + * 入库数量 @@ -27,7 +27,7 @@
  • - 单价 + *单价 @@ -84,6 +84,8 @@ + + @@ -92,7 +94,8 @@ ref, computed, reactive, - onMounted + onMounted, + getCurrentInstance } from 'vue'; import color from '@/commons/color.js'; import go from '@/commons/utils/go.js'; @@ -126,8 +129,9 @@ onMounted(() => { getList() datas.item = JSON.parse(props.item) + datas.form = assign(datas.form, ...datas.item) }) - + const refs = getCurrentInstance() function toggle() { go.to('PAGES_ADD_SUPPLIER') } @@ -156,7 +160,21 @@ } function sumbit() { - datas.form.list.conInfoId = props.consId + if (!datas.form.list.stockNumber) { + refs.ctx.$refs.uToastRef.show({ + type: 'default', + message: "请输入必填项", + }) + return + } + if(!datas.form.list.price){ + refs.ctx.$refs.uToastRef.show({ + type: 'default', + message: "请输入必填项", + }) + return + } + datas.form.list.conInfoId = datas.item.id datas.form.list = [datas.form.list] tbConsInfostockInOut({ ...datas.form, diff --git a/pages/index/components/Stats.vue b/pages/index/components/Stats.vue index 7e0faed..28e4dac 100644 --- a/pages/index/components/Stats.vue +++ b/pages/index/components/Stats.vue @@ -14,20 +14,20 @@ 成交金额 (元) - {{ list.sale.incomeAmountAll}} + {{ list.sale.incomeAmountAll||0}} 消费笔数 - {{ list.vip.useNum }} + {{ list.vip.useNum||0 }} 退款金额 (元) - {{ list.sale.outAmount}} + {{ list.sale.outAmount||0}} - 消费笔数 - {{ list.count.useNum }} + 消费金额 + {{ list.vip.useAmount||0 }}