耗材解决问题
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="ConsumablesTop">
|
||||
<view @tap="showStatus = !showStatus">
|
||||
{{datas.title}}
|
||||
<view @tap="showStatus = !showStatus" style="display: flex;align-items: center;">
|
||||
{{datas.title}}<up-icon name="arrow-down" size="12"></up-icon>
|
||||
</view>
|
||||
<view>
|
||||
<input v-model="datas.conName" @input="inputEvent" type="text" placeholder="请输入耗材名称" />
|
||||
@@ -20,7 +20,7 @@
|
||||
<view :style="{height: '14px'}"></view>
|
||||
</view>
|
||||
|
||||
<ul class="ConsumablesConent">
|
||||
<ul class="ConsumablesConent" v-if="datas.list.length">
|
||||
<li v-for="(item,index) in datas.list" :key="index">
|
||||
<view>
|
||||
{{item.conName}}
|
||||
@@ -49,12 +49,18 @@
|
||||
所属商品: {{ filtersSproductId(item.productId)}}
|
||||
</view>
|
||||
<view class="">
|
||||
<up-button type="primary" color="#999" @tap="toUrl('PAGES_VIEWRECORDS',{item:JSON.stringify(item)})" :plain="true" text="查看记录"></up-button>
|
||||
<up-button type="primary" color="#999" @tap="toUrl('PAGES_VIEWRECORDS',{item:JSON.stringify(item)})"
|
||||
:plain="true" text="查看记录"></up-button>
|
||||
<up-button type="primary" @click="toggle(item)" :plain="true" text="更多操作"></up-button>
|
||||
</view>
|
||||
</view>
|
||||
</li>
|
||||
<li style="background-color: rgba(0,0,0,0); height: 200rpx;"></li>
|
||||
</ul>
|
||||
<view v-else style="text-align: center;">
|
||||
<image src="./bg.png" style="width: 325rpx;height: 335rpx;" mode=""></image>
|
||||
<view style="font-size: 28rpx;color: #999;">暂无数据</view>
|
||||
</view>
|
||||
<view class="ConsumablesBottom">
|
||||
<view @tap="toUrl('PAGES_ADD_CONSUMABLES')">
|
||||
新增耗材
|
||||
@@ -76,8 +82,13 @@
|
||||
reactive,
|
||||
computed
|
||||
} from 'vue';
|
||||
import {onShow} from '@dcloudio/uni-app'
|
||||
import {
|
||||
onShow
|
||||
} from '@dcloudio/uni-app'
|
||||
import go from '@/commons/utils/go.js';
|
||||
import {
|
||||
hasPermission
|
||||
} from '@/commons/utils/hasPermission.js';
|
||||
import {
|
||||
viewConInfoFlowget,
|
||||
tbConsType,
|
||||
@@ -120,6 +131,7 @@
|
||||
// 获取分类列表
|
||||
gettbConsTypeList()
|
||||
})
|
||||
|
||||
function changeNowStatusIndex(i) {
|
||||
nowStatusIndex.value = i
|
||||
showStatus.value = false
|
||||
@@ -159,49 +171,69 @@
|
||||
report.data.consId = d.id
|
||||
actionSheet.active = d
|
||||
}
|
||||
|
||||
|
||||
let sheetClick = (index) => {
|
||||
if (index == 0) {
|
||||
//打开报损弹窗
|
||||
reportDamage.value.open(actionSheet.activeId);
|
||||
report.data.name = actionSheet.active.conName
|
||||
report.data.unit = actionSheet.active.conUnit
|
||||
// 权限
|
||||
hasPermission('允许提交报损').then(ele => {
|
||||
if (ele) {
|
||||
//打开报损弹窗
|
||||
reportDamage.value.open(actionSheet.activeId);
|
||||
report.data.name = actionSheet.active.conName
|
||||
report.data.unit = actionSheet.active.conUnit
|
||||
}
|
||||
})
|
||||
} else if (index == 1) {
|
||||
toUrl('PAGES_EDIT_CONSUMABLES', {
|
||||
item: JSON.stringify(actionSheet.active)
|
||||
})
|
||||
} else if (index == 2) {
|
||||
toUrl('PAGES_SALES_INVENTORYCHECK', {
|
||||
item: JSON.stringify(actionSheet.active)
|
||||
hasPermission('允许耗材盘点').then(ele => {
|
||||
if (ele) {
|
||||
toUrl('PAGES_SALES_INVENTORYCHECK', {
|
||||
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)
|
||||
hasPermission('允许耗材入库').then(ele => {
|
||||
if (ele) {
|
||||
toUrl('PAGES_SALES_WAREHOUSEENTRY', {
|
||||
consId: actionSheet.activeId,
|
||||
item: JSON.stringify(actionSheet.active)
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (index == 4) {
|
||||
toUrl('PAGES_SALES_OUTBOUND', {
|
||||
consId: actionSheet.activeId,
|
||||
item: JSON.stringify(actionSheet.active)
|
||||
hasPermission('允许耗材出库').then(ele => {
|
||||
if (ele) {
|
||||
toUrl('PAGES_SALES_OUTBOUND', {
|
||||
consId: actionSheet.activeId,
|
||||
item: JSON.stringify(actionSheet.active)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// async function viewpermission(d) {
|
||||
// let res = await hasPermission(d)
|
||||
// console.log(res,'调试1')
|
||||
// return res
|
||||
// }
|
||||
async function getList(d = "") {
|
||||
viewConInfoFlowget({
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
conName: datas.conName,
|
||||
conTypeId: d,
|
||||
size:100,
|
||||
page:0
|
||||
size: 100,
|
||||
page: 0
|
||||
}).then(res => {
|
||||
datas.list = res.content
|
||||
})
|
||||
}
|
||||
|
||||
function inputEvent(d) {
|
||||
datas.conName = d.detail.value
|
||||
datas.conName = d.detail.value.replace(/\s*/g,"");
|
||||
getList()
|
||||
}
|
||||
|
||||
@@ -413,7 +445,7 @@
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.df() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user