耗材管理修改

This commit is contained in:
duan 2024-10-22 14:18:14 +08:00
parent 722ce9c4c3
commit 692ca30253
7 changed files with 67 additions and 24 deletions

View File

@ -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"),
}

View File

@ -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')
})

View File

@ -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)

View File

@ -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')

View File

@ -19,7 +19,7 @@
</li>
<li>
<view>
出库数量
<text style="color: red;">*</text>出库数量
</view>
<view>
<input type="text" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
@ -27,7 +27,7 @@
</li>
<li>
<view>
单价
<text style="color: red;">*</text>单价
</view>
<view>
<input type="text" placeholder="请输入单价(元)" v-model="datas.form.list.price" name="" id="">
@ -84,6 +84,8 @@
<!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true"
text="取消"></up-button> -->
</view>
<!-- 消息提示 -->
<up-toast ref="uToastRef"></up-toast>
</template>
@ -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

View File

@ -19,7 +19,7 @@
</li>
<li>
<view>
入库数量
<text style="color: red;">*</text> 入库数量
</view>
<view>
<input type="text" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
@ -27,7 +27,7 @@
</li>
<li>
<view>
单价
<text style="color: red;">*</text>单价
</view>
<view>
<input type="text" placeholder="请输入单价(元)" v-model="datas.form.list.price" name="" id="">
@ -84,6 +84,8 @@
<!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true"
text="取消"></up-button> -->
</view>
<!-- 消息提示 -->
<up-toast ref="uToastRef"></up-toast>
</template>
@ -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,

View File

@ -14,20 +14,20 @@
</view>
<view class="receipts-money">
<text class="money-title">成交金额 ()</text>
<view class="money-num">{{ list.sale.incomeAmountAll}}</view>
<view class="money-num">{{ list.sale.incomeAmountAll||0}}</view>
</view>
<view class="money-list">
<view class="money-item">
<text class="money-title">消费笔数</text>
<view class="money-num">{{ list.vip.useNum }}</view>
<view class="money-num">{{ list.vip.useNum||0 }}</view>
</view>
<view class="money-item">
<text class="money-title">退款金额 ()</text>
<view class="money-num">{{ list.sale.outAmount}}</view>
<view class="money-num">{{ list.sale.outAmount||0}}</view>
</view>
<view class="money-item">
<text class="money-title">消费笔数</text>
<view class="money-num">{{ list.count.useNum }}</view>
<text class="money-title">消费金额</text>
<view class="money-num">{{ list.vip.useAmount||0 }}</view>
</view>
</view>
<view class="money-list" v-if="vdata.memberIsShow">