feat:样品库管理
This commit is contained in:
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,9 +71,17 @@ const user = defineStore({
|
||||
// await this.getRoleMenus()
|
||||
// await this.getDeviceTimeout()
|
||||
// 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() {
|
||||
|
||||
Reference in New Issue
Block a user