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 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 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 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 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 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 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 websocketUrl = isDev ? 'ws://192.168.26.116:888/ws' : 'ws://192.168.26.116:888/ws'
const tenantId = '1' const tenantId = '1'
export const clientId = 'zgty_lims' export const clientId = 'zgty_lims'

View File

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

View File

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

View File

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