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 { NxInit } from './nx'
|
||||||
import $store from '@/nx/store'
|
import $store from '@/nx/store'
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
import * as chainway from '@/uni_modules/zzjc-chainway-p100'
|
import * as urovo from '@/uni_modules/zzjc-urovo'
|
||||||
// #endif
|
// #endif
|
||||||
onLaunch(async () => {
|
onLaunch(async () => {
|
||||||
// 加载nx底层依赖
|
// 加载nx底层依赖
|
||||||
@@ -15,9 +15,8 @@ onLaunch(async () => {
|
|||||||
if (brand === 'chainway') {
|
if (brand === 'chainway') {
|
||||||
plus.screen.lockOrientation('landscape')
|
plus.screen.lockOrientation('landscape')
|
||||||
}
|
}
|
||||||
|
urovo.scanRegister(data => {
|
||||||
chainway.scanRegister(data => {
|
console.log('优博讯扫码结果:' + data)
|
||||||
console.log('扫码结果:' + data)
|
|
||||||
$store('biz').scanQRInfo = data
|
$store('biz').scanQRInfo = data
|
||||||
})
|
})
|
||||||
// #endif
|
// #endif
|
||||||
|
|||||||
@@ -363,7 +363,10 @@ defineExpose({
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.s-verify-mask {
|
.s-verify-mask {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
background: rgba(0, 0, 0, 0.45);
|
background: rgba(0, 0, 0, 0.45);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -427,6 +430,8 @@ defineExpose({
|
|||||||
.s-verify-image-block {
|
.s-verify-image-block {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -447,7 +452,9 @@ defineExpose({
|
|||||||
|
|
||||||
.s-verify-loading {
|
.s-verify-loading {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -484,8 +491,8 @@ defineExpose({
|
|||||||
}
|
}
|
||||||
|
|
||||||
.s-verify-slider-track {
|
.s-verify-slider-track {
|
||||||
position: absolute;
|
width: 100%;
|
||||||
inset: 0;
|
height: 100%;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
background: #f2f3f5;
|
background: #f2f3f5;
|
||||||
}
|
}
|
||||||
@@ -529,7 +536,9 @@ defineExpose({
|
|||||||
|
|
||||||
.s-verify-slider-text {
|
.s-verify-slider-text {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: 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 {
|
try {
|
||||||
for (const g of group) {
|
for (const g of group) {
|
||||||
for (const ele of g.fields) {
|
for (const ele of g.fields) {
|
||||||
if (!ele.formula || ele.formula == '') continue
|
if (!ele.formula || ele.formula == '' || ele.formula.startsWith('From')) continue
|
||||||
if (ele.valueTypeManual && ele.valueTypeManual == '1') continue
|
|
||||||
let formula = ele.formula
|
let formula = ele.formula
|
||||||
let formulas = formula.split('|')
|
let formulas = formula.split('|')
|
||||||
let formulaVal = ''
|
let formulaVal = ''
|
||||||
@@ -20,11 +19,9 @@ export function calcAnalysisValue(group) {
|
|||||||
formulas.forEach(f => {
|
formulas.forEach(f => {
|
||||||
let value = ''
|
let value = ''
|
||||||
if (f.charAt(0) === 'p') {
|
if (f.charAt(0) === 'p') {
|
||||||
// let o = elementParamValueData.find((i) => 'p' + i.paramNo === f);
|
|
||||||
let o = findFieldInGroup(f, group, 'p')
|
let o = findFieldInGroup(f, group, 'p')
|
||||||
value = o.value
|
value = o.value
|
||||||
} else if (f.charAt(0) === 'e') {
|
} else if (f.charAt(0) === 'e') {
|
||||||
// let o = elementParamValueData.find((i) => 'e' + i.paramNo === f);
|
|
||||||
let o = findFieldInGroup(f, group, 'e')
|
let o = findFieldInGroup(f, group, 'e')
|
||||||
value = o.value
|
value = o.value
|
||||||
} else if (f.charAt(0) === '<' || f.charAt(0) === '>') {
|
} else if (f.charAt(0) === '<' || f.charAt(0) === '>') {
|
||||||
@@ -48,7 +45,7 @@ export function calcAnalysisValue(group) {
|
|||||||
v = eval(formulaVal)
|
v = eval(formulaVal)
|
||||||
} else {
|
} else {
|
||||||
v = math.evaluate(formulaVal).toString()
|
v = math.evaluate(formulaVal).toString()
|
||||||
v = isFinite(v) ? v.toString() : ''
|
v = isFinite(v) ? v.toString() : 0
|
||||||
}
|
}
|
||||||
ele.value = handleRoundFiveNumber(v, ele.decimalPosition)
|
ele.value = handleRoundFiveNumber(v, ele.decimalPosition)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -206,7 +206,6 @@ export default {
|
|||||||
data: data
|
data: data
|
||||||
}
|
}
|
||||||
let printData = {
|
let printData = {
|
||||||
// type: "preview",
|
|
||||||
type: 'print',
|
type: 'print',
|
||||||
reportTemplate: reportTemplate,
|
reportTemplate: reportTemplate,
|
||||||
reportData: JSON.stringify(reportData)
|
reportData: JSON.stringify(reportData)
|
||||||
|
|||||||
@@ -71,9 +71,17 @@ const user = defineStore({
|
|||||||
// await this.getRoleMenus()
|
// await this.getRoleMenus()
|
||||||
// await this.getDeviceTimeout()
|
// await this.getDeviceTimeout()
|
||||||
// this.startTimeoutChecker()
|
// this.startTimeoutChecker()
|
||||||
uni.reLaunch({
|
// 如果已经存在默认模块就跳转到对应的模块
|
||||||
url: '/pages/index/index'
|
const defaultModulePath = uni.getStorageSync('defaultModule')
|
||||||
})
|
if (defaultModulePath) {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: defaultModulePath
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getUserInfo() {
|
async getUserInfo() {
|
||||||
|
|||||||
37
pages.json
37
pages.json
@@ -225,16 +225,38 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/analysis/setting/print",
|
"path": "pages/analysis/auncel/auncel-status",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "打印",
|
"navigationBarTitleText": "天平",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 样品库管理
|
||||||
|
{
|
||||||
|
"path": "pages/sampleWarehouse/index/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "样品库管理",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/analysis/auncel/auncel-status",
|
"path": "pages/sampleWarehouse/sampleSearch/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "天平",
|
"navigationBarTitleText": "样品查询",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/sampleWarehouse/returnToStock/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "样品归库",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/sampleWarehouse/execChangeLocation/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "库位变更",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -256,6 +278,13 @@
|
|||||||
"navigationBarTitleText": "关于我们"
|
"navigationBarTitleText": "关于我们"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/setting/print",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "打印",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/me/index",
|
"path": "pages/me/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
leftIcon=""
|
leftIcon=""
|
||||||
:leftText="`您好!${userInfo.nickname}`"
|
: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>
|
</navbar-back>
|
||||||
|
|
||||||
<up-grid :col="gridCol" :border="false">
|
<up-grid :col="gridCol" :border="false">
|
||||||
@@ -29,7 +29,6 @@ import mePopup from '@/pages/index/me-popup.vue'
|
|||||||
|
|
||||||
// 响应式数据
|
// 响应式数据
|
||||||
const popupShow = ref(false)
|
const popupShow = ref(false)
|
||||||
const isAllowAgainPrint = ref(false)
|
|
||||||
|
|
||||||
const menuItemList = ref([
|
const menuItemList = ref([
|
||||||
{
|
{
|
||||||
@@ -57,63 +56,13 @@ const goTo = url => {
|
|||||||
nx.$router.go(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(() => {
|
onMounted(() => {})
|
||||||
// checkAllowAgainPrint()
|
|
||||||
// openLaboratoryWs()
|
|
||||||
})
|
|
||||||
// 动态设置 grid 列数
|
// 动态设置 grid 列数
|
||||||
const { gridCol } = useGridCol([400], [2, 3])
|
const { gridCol } = useGridCol([400], [2, 3])
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<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 {
|
.grid-text {
|
||||||
font-size: 24px;
|
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