feat:组价修改

This commit is contained in:
houjunxiang
2026-01-13 10:38:07 +08:00
parent 351c66086b
commit 4d8e7b7a06
4 changed files with 51 additions and 48 deletions

View File

@@ -1,14 +1,14 @@
// 在此不用配置接口前缀
const isDev = process.env.NODE_ENV === 'development'
// 正式环境
const BaseUrl = isDev ? 'http://172.17.19.29:48080/admin-api' : 'http://172.17.19.29:48080/admin-api'
const upgradeBaseUrl = isDev? 'http://172.17.19.29:48080/admin-api':'http://172.17.19.29:48080/admin-api'
const websocketUrl = isDev ? 'ws://172.17.19.11:30330' : 'ws://172.17.19.11:30330'
// const BaseUrl = isDev ? 'http://172.17.19.29:48080/admin-api' : 'http://172.17.19.29:48080/admin-api'
// const upgradeBaseUrl = isDev? 'http://172.17.19.29:48080/admin-api':'http://172.17.19.29:48080/admin-api'
// const websocketUrl = isDev ? 'ws://172.17.19.11:30330' : 'ws://172.17.19.11:30330'
// 公司测试环境
// const BaseUrl = isDev ? 'http://192.168.26.163:48080/admin-api' : 'http://192.168.26.116:888/admin-api'
// const upgradeBaseUrl = isDev ? 'http://192.168.26.116:888/admin-api' : 'http://192.168.26.116:888/admin-api'
// const websocketUrl = isDev ? 'ws://192.168.26.116:888/ws' : 'ws://192.168.26.116:888/ws'
const BaseUrl = isDev ? 'http://192.168.26.116:888/admin-api' : 'http://192.168.26.116:888/admin-api'
const upgradeBaseUrl = isDev ? 'http://192.168.26.116:888/admin-api' : 'http://192.168.26.116:888/admin-api'
const websocketUrl = isDev ? 'ws://192.168.26.116:888/ws' : 'ws://192.168.26.116:888/ws'
const tenantId = '1'
export const clientId = 'zgty_lims'

View File

@@ -2,8 +2,8 @@
"name" : "实验室管理系统",
"appid" : "__UNI__4B3B4B0",
"description" : "实验室管理系统",
"versionName" : "1.0.2",
"versionCode" : 102,
"versionName" : "1.0.3",
"versionCode" : 103,
"transformPx" : false,
"app-plus" : {
"usingComponents" : true,
@@ -95,21 +95,21 @@
/* JSONUserAgent **/
"useragent" : {
/* userAgent */
"value" : "LIMS-PDA/1.0.2",
"value" : "LIMS-PDA/1.0.3",
/* BooleanvalueuserAgent */
"concatenate" : true
},
/* JSONAndroidUserAgentuseragent */
"useragent_android" : {
/* userAgent */
"value" : "LIMS-PDA/1.0.2",
"value" : "LIMS-PDA/1.0.3",
/* BooleanvalueuserAgent */
"concatenate" : true
},
/* JSONiOSUserAgentuseragent */
"useragent_ios" : {
/* userAgent */
"value" : "LIMS-PDA/1.0.2",
"value" : "LIMS-PDA/1.0.3",
/* BooleanvalueuserAgent */
"concatenate" : true
}

View File

@@ -34,29 +34,28 @@
:placeholder="field.placeholder"
:disabled="field.disabled || field.fillingWay == 'calculate'"
/>
<!--select-->
<view v-if="field.type == 'select'" class="x-bc select-my" @click="handleFieldClick(field)">
<text v-if="field.value">{{ field.value }}</text>
<text v-else>请选择</text>
<u-icon name="arrow-down" size="20"></u-icon>
</view>
<u-picker
v-if="field.type == 'select'"
:show="field.showPicker"
:columns="[field.options]"
keyName="displayName"
@cancel="field.showPicker = false"
@confirm="event => pickerConfirm(event, field)"
/>
<uni-data-select v-if="field.type == 'Select'" v-model="field.value" :localdata="field.options">
<template v-slot:selected="{ selectedItems }">
<view v-if="selectedItems.length == 0" style="color: #c0c4cc"> 请选择 </view>
<view v-else v-html="selectedItems[0].value"> </view>
</template>
<template v-slot:option="{ item, itemSelected }">
<uni-list-item :disabled="item.disable">
<template #body>
<view v-html="item.label"></view>
</template>
</uni-list-item>
</template>
</uni-data-select>
<!--日期-->
<view v-if="field.type == 'date'" class="x-bc select-my" @click="handleFieldClick(field)">
<view v-if="field.type == 'Date'" class="x-bc select-my" @click="handleFieldClick(field)">
<text v-if="field.value">{{ nx.$dayjs(field.value).format('YYYY-MM-DD HH:mm:ss') }}</text>
<text v-else>请选择</text>
<u-icon name="calendar-fill" size="20"></u-icon>
</view>
<u-datetime-picker
v-if="field.type == 'date'"
v-if="field.type == 'Date'"
:show="field.showPicker"
v-model="curDate"
mode="datetime"
@@ -103,7 +102,7 @@ const staticFormSchema = [
{ label: '指派单号', fieldKey: 'businessAssayTaskId', hidden: true },
{ label: '检测方法', type: 'Input', fieldKey: 'assayMethodName' },
{ label: '分析人', type: 'Input', fieldKey: 'assayOperator', disabled: true },
{ label: '检测时间', type: 'date', fieldKey: 'assayTime' }
{ label: '检测时间', type: 'Date', fieldKey: 'assayTime' }
]
let dynamicFormSchema = []
@@ -111,8 +110,7 @@ let dynamicFormSchema = []
onLoad(param => {
if (param.currentTaskId) {
currentTaskId.value = param.currentTaskId
configReportTemplateKey.value = param.configReportTemplateKey
configReportTemplateKey.value = param.configReportTemplateKey
}
loadTaskDetail()
})
@@ -152,12 +150,19 @@ async function loadTaskDetail() {
dataCollectionParams.dataCollectionKey = dataCollectionKey
}
const data = await nx.$api.assayTask.getDynamicBaseFormSchema(dataCollectionParams)
dynamicFormSchema = data.map(item => ({
label: item.fieldName,
fieldKey: item.fieldKey,
type: item.fieldType,
placeholder: '请输入'
}))
dynamicFormSchema = data.map(item => {
let customConfig = JSON.parse(item.customConfig)
let field = {
label: item.fieldName,
fieldKey: item.fieldKey,
type: item.fieldType,
placeholder: '请输入'
}
if (customConfig?.componentProps?.options) {
field.options = customConfig.componentProps.options
}
return field
})
formFields.value = [...staticFormSchema, ...dynamicFormSchema]
bindFormValue()
@@ -201,10 +206,10 @@ async function updateTableDataByConfigFields() {
if (!columnObj) continue
tab.tableData.forEach(row => {
// 赋值配置列参与计算
if(row[columnObj.fieldIndex]){
row[columnObj.fieldIndex].value = formData[key]
calcRowAnalysisValue(row, columnObj, tab.columns)
}
if (row[columnObj.fieldIndex]) {
row[columnObj.fieldIndex].value = formData[key]
calcRowAnalysisValue(row, columnObj, tab.columns)
}
})
}
}
@@ -272,9 +277,7 @@ const realFormData = computed(() => {
async function handleSave(change) {
let params = {}
const dynamicData = Object.fromEntries(
Object.entries(realFormData.value).filter(([key]) => key !== 'assayTime')
);
const dynamicData = Object.fromEntries(Object.entries(realFormData.value).filter(([key]) => key !== 'assayTime'))
console.log(dynamicData)
if (change) {
// 计算样品数据

View File

@@ -57,8 +57,8 @@ import callCheckUpdate from '@/nx/utils/check-update'
const loading = ref(false)
const captchaEnable = true
let loginInfo = reactive({
username: 'ytjyZhfx1',
password: 'P@ssword25',
username: '',
password: '',
captchaVerification: ''
})
@@ -72,11 +72,11 @@ function togglePasswordVisibility() {
onShow(() => {
//检查APP更新
// #ifdef APP-PLUS
if (process.env.NODE_ENV !== 'development') {
// if (process.env.NODE_ENV !== 'development') {
setTimeout(() => {
callCheckUpdate()
}, 1500)
}
// }
// #endif
})
async function bindLogin() {