feat:样品库管理
This commit is contained in:
7
App.vue
7
App.vue
@@ -4,7 +4,7 @@ import { onLaunch, onShow, onError } from '@dcloudio/uni-app'
|
||||
import { NxInit } from './nx'
|
||||
import $store from '@/nx/store'
|
||||
// #ifdef APP-PLUS
|
||||
import * as chainway from '@/uni_modules/zzjc-chainway-p100'
|
||||
import * as urovo from '@/uni_modules/zzjc-urovo'
|
||||
// #endif
|
||||
onLaunch(async () => {
|
||||
// 加载nx底层依赖
|
||||
@@ -15,9 +15,8 @@ onLaunch(async () => {
|
||||
if (brand === 'chainway') {
|
||||
plus.screen.lockOrientation('landscape')
|
||||
}
|
||||
|
||||
chainway.scanRegister(data => {
|
||||
console.log('扫码结果:' + data)
|
||||
urovo.scanRegister(data => {
|
||||
console.log('优博讯扫码结果:' + data)
|
||||
$store('biz').scanQRInfo = data
|
||||
})
|
||||
// #endif
|
||||
|
||||
@@ -363,7 +363,10 @@ defineExpose({
|
||||
<style lang="scss" scoped>
|
||||
.s-verify-mask {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.45);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -427,6 +430,8 @@ defineExpose({
|
||||
.s-verify-image-block {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -447,7 +452,9 @@ defineExpose({
|
||||
|
||||
.s-verify-loading {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -484,8 +491,8 @@ defineExpose({
|
||||
}
|
||||
|
||||
.s-verify-slider-track {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 20px;
|
||||
background: #f2f3f5;
|
||||
}
|
||||
@@ -529,7 +536,9 @@ defineExpose({
|
||||
|
||||
.s-verify-slider-text {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
9
nx/api/sampleWarehouse.js
Normal file
9
nx/api/sampleWarehouse.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import request from '@/nx/request'
|
||||
export default {
|
||||
execReturnToStock: data =>
|
||||
request({
|
||||
url: '/qms/business-sub-sample/execReturnToStock',
|
||||
method: 'GET',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -11,8 +11,7 @@ export function calcAnalysisValue(group) {
|
||||
try {
|
||||
for (const g of group) {
|
||||
for (const ele of g.fields) {
|
||||
if (!ele.formula || ele.formula == '') continue
|
||||
if (ele.valueTypeManual && ele.valueTypeManual == '1') continue
|
||||
if (!ele.formula || ele.formula == '' || ele.formula.startsWith('From')) continue
|
||||
let formula = ele.formula
|
||||
let formulas = formula.split('|')
|
||||
let formulaVal = ''
|
||||
@@ -20,11 +19,9 @@ export function calcAnalysisValue(group) {
|
||||
formulas.forEach(f => {
|
||||
let value = ''
|
||||
if (f.charAt(0) === 'p') {
|
||||
// let o = elementParamValueData.find((i) => 'p' + i.paramNo === f);
|
||||
let o = findFieldInGroup(f, group, 'p')
|
||||
value = o.value
|
||||
} else if (f.charAt(0) === 'e') {
|
||||
// let o = elementParamValueData.find((i) => 'e' + i.paramNo === f);
|
||||
let o = findFieldInGroup(f, group, 'e')
|
||||
value = o.value
|
||||
} else if (f.charAt(0) === '<' || f.charAt(0) === '>') {
|
||||
@@ -48,7 +45,7 @@ export function calcAnalysisValue(group) {
|
||||
v = eval(formulaVal)
|
||||
} else {
|
||||
v = math.evaluate(formulaVal).toString()
|
||||
v = isFinite(v) ? v.toString() : ''
|
||||
v = isFinite(v) ? v.toString() : 0
|
||||
}
|
||||
ele.value = handleRoundFiveNumber(v, ele.decimalPosition)
|
||||
}
|
||||
|
||||
@@ -206,7 +206,6 @@ export default {
|
||||
data: data
|
||||
}
|
||||
let printData = {
|
||||
// type: "preview",
|
||||
type: 'print',
|
||||
reportTemplate: reportTemplate,
|
||||
reportData: JSON.stringify(reportData)
|
||||
|
||||
@@ -71,10 +71,18 @@ const user = defineStore({
|
||||
// await this.getRoleMenus()
|
||||
// await this.getDeviceTimeout()
|
||||
// this.startTimeoutChecker()
|
||||
// 如果已经存在默认模块就跳转到对应的模块
|
||||
const defaultModulePath = uni.getStorageSync('defaultModule')
|
||||
if (defaultModulePath) {
|
||||
uni.reLaunch({
|
||||
url: defaultModulePath
|
||||
})
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
async getUserInfo() {
|
||||
const { user } = await userApi.getInfo()
|
||||
|
||||
37
pages.json
37
pages.json
@@ -225,16 +225,38 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/analysis/setting/print",
|
||||
"path": "pages/analysis/auncel/auncel-status",
|
||||
"style": {
|
||||
"navigationBarTitleText": "打印",
|
||||
"navigationBarTitleText": "天平",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
// 样品库管理
|
||||
{
|
||||
"path": "pages/sampleWarehouse/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "样品库管理",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/analysis/auncel/auncel-status",
|
||||
"path": "pages/sampleWarehouse/sampleSearch/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "天平",
|
||||
"navigationBarTitleText": "样品查询",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/sampleWarehouse/returnToStock/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "样品归库",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/sampleWarehouse/execChangeLocation/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "库位变更",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
@@ -256,6 +278,13 @@
|
||||
"navigationBarTitleText": "关于我们"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/setting/print",
|
||||
"style": {
|
||||
"navigationBarTitleText": "打印",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/me/index",
|
||||
"style": {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
leftIcon=""
|
||||
:leftText="`您好!${userInfo.nickname}`"
|
||||
>
|
||||
<u-icon @click="popupShow = true" size="28" color="#FFF" name="account-fill" />
|
||||
<u-icon @click="popupShow = true" size="28" color="#FFF" name="setting-fill" />
|
||||
</navbar-back>
|
||||
|
||||
<up-grid :col="gridCol" :border="false">
|
||||
@@ -29,7 +29,6 @@ import mePopup from '@/pages/index/me-popup.vue'
|
||||
|
||||
// 响应式数据
|
||||
const popupShow = ref(false)
|
||||
const isAllowAgainPrint = ref(false)
|
||||
|
||||
const menuItemList = ref([
|
||||
{
|
||||
@@ -57,63 +56,13 @@ const goTo = url => {
|
||||
nx.$router.go(url)
|
||||
}
|
||||
|
||||
const checkAllowAgainPrint = () => {
|
||||
const param = {
|
||||
userId: userInfo.value.id,
|
||||
clientId: 'auncel'
|
||||
}
|
||||
nx.$api.user.getAppPermission(param).then(res => {
|
||||
if (!res.success) return
|
||||
const ret = res.result || []
|
||||
if (ret.length === 0) return
|
||||
for (let i = 0; i < ret.length; i++) {
|
||||
if (ret[i].roleValue && ret[i].roleValue === 2) {
|
||||
isAllowAgainPrint.value = true
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const openLaboratoryWs = () => {
|
||||
const regData = {
|
||||
msgId: nx.$helper.uuid(),
|
||||
cmd: 'register',
|
||||
clientType: 'caaClient',
|
||||
data: {
|
||||
userId: userInfo.value.id,
|
||||
tenantId: userInfo.value.loginTenantId,
|
||||
userRealName: userInfo.value.realname
|
||||
}
|
||||
}
|
||||
nx.$measure.setRegData(JSON.stringify(regData))
|
||||
nx.$measure.open()
|
||||
}
|
||||
|
||||
// 生命周期
|
||||
onMounted(() => {
|
||||
// checkAllowAgainPrint()
|
||||
// openLaboratoryWs()
|
||||
})
|
||||
onMounted(() => {})
|
||||
// 动态设置 grid 列数
|
||||
const { gridCol } = useGridCol([400], [2, 3])
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.title_content {
|
||||
text-align: center;
|
||||
padding-top: 75px;
|
||||
letter-spacing: 10px;
|
||||
width: 100%;
|
||||
font-size: 36px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.banner {
|
||||
overflow: hidden;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.grid-text {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user