|
@@ -206,17 +206,24 @@ onMounted(() => {
|
|
tabTypeKey.value= routerQuery?.tabTypeKey || '1'
|
|
tabTypeKey.value= routerQuery?.tabTypeKey || '1'
|
|
const { title, mixRatioTestIds} = getObjValue(testTreeItem.value);
|
|
const { title, mixRatioTestIds} = getObjValue(testTreeItem.value);
|
|
const info = getStoreData('test-form') || {}
|
|
const info = getStoreData('test-form') || {}
|
|
|
|
+ console.log(info,'info');
|
|
isMixRatioTestIds.value = !(!mixRatioTestIds || mixRatioTestIds <= 0);
|
|
isMixRatioTestIds.value = !(!mixRatioTestIds || mixRatioTestIds <= 0);
|
|
listItemBaseData.value.contractId = contractId.value
|
|
listItemBaseData.value.contractId = contractId.value
|
|
listItemBaseData.value.trialProjectName = title
|
|
listItemBaseData.value.trialProjectName = title
|
|
listItemBaseData.value.reportDate = dayDate
|
|
listItemBaseData.value.reportDate = dayDate
|
|
listItemBaseData.value.detectionCategory = Number(dataType)
|
|
listItemBaseData.value.detectionCategory = Number(dataType)
|
|
listItemBaseData.value.trialUserName =info.trialUserName||(userInfo.value['nick_name'])
|
|
listItemBaseData.value.trialUserName =info.trialUserName||(userInfo.value['nick_name'])
|
|
|
|
+
|
|
|
|
+ listItemBaseData.value.projectPosition = info.projectPosition||''
|
|
|
|
+ listItemBaseData.value.rawMaterialIds = info.rawMaterialIds||''
|
|
|
|
+ listItemBaseData.value.sampleIds = info.sampleIds||''
|
|
|
|
+
|
|
if(info&&info.detectionResult){
|
|
if(info&&info.detectionResult){
|
|
listItemBaseData.value.detectionResult=info.detectionResult.toString()
|
|
listItemBaseData.value.detectionResult=info.detectionResult.toString()
|
|
}
|
|
}
|
|
if(info&&info.projectPosition){
|
|
if(info&&info.projectPosition){
|
|
defaultCheckarrIds.value=info.projectPosition.split(',')
|
|
defaultCheckarrIds.value=info.projectPosition.split(',')
|
|
|
|
+
|
|
}
|
|
}
|
|
getSearchNodeTables()
|
|
getSearchNodeTables()
|
|
getSearchNodeTablesall(1)
|
|
getSearchNodeTablesall(1)
|
|
@@ -457,7 +464,6 @@ const checkrelationString=ref([])
|
|
|
|
|
|
const divisionTreeCheck = (data) => {
|
|
const divisionTreeCheck = (data) => {
|
|
checkrelationId.value=data
|
|
checkrelationId.value=data
|
|
- console.log(data,'data');
|
|
|
|
}
|
|
}
|
|
const seaElTreeProps = ref({
|
|
const seaElTreeProps = ref({
|
|
label: 'title',
|
|
label: 'title',
|
|
@@ -538,6 +544,10 @@ const linksRelateModalSave =async () => {
|
|
idarr.push(item.primaryKeyId)
|
|
idarr.push(item.primaryKeyId)
|
|
})
|
|
})
|
|
checkrelationString.value=idarr.toString()
|
|
checkrelationString.value=idarr.toString()
|
|
|
|
+ if( checkrelationString.value.length>0){
|
|
|
|
+ listItemBaseData.value.projectPosition=checkrelationString.value
|
|
|
|
+ }
|
|
|
|
+
|
|
window.$message?.success('操作成功')
|
|
window.$message?.success('操作成功')
|
|
linksRelateModal.value = false
|
|
linksRelateModal.value = false
|
|
|
|
|
|
@@ -586,8 +596,8 @@ const linksRawTableSelection = (rows) => {
|
|
|
|
|
|
const linksRawModalSave =async () => {
|
|
const linksRawModalSave =async () => {
|
|
linksRawModal.value = false
|
|
linksRawModal.value = false
|
|
- console.log(tableRawCheckedKeysid.value,'tableRawCheckedKeysid.value');
|
|
|
|
listItemBaseData.value.rawMaterialIds=tableRawCheckedKeysid.value
|
|
listItemBaseData.value.rawMaterialIds=tableRawCheckedKeysid.value
|
|
|
|
+ window.$message?.success('操作成功')
|
|
// const { error, code, data } = await dataApi.rawMaterialSubmit({
|
|
// const { error, code, data } = await dataApi.rawMaterialSubmit({
|
|
// id: dataId,
|
|
// id: dataId,
|
|
// ids:tableRawCheckedKeysid.value,
|
|
// ids:tableRawCheckedKeysid.value,
|
|
@@ -710,20 +720,8 @@ const linksSampleTableSelection = (rows) => {
|
|
//保存关联
|
|
//保存关联
|
|
const linksSampleModalSave =async () => {
|
|
const linksSampleModalSave =async () => {
|
|
const rows = tableSampleCheckedKeys.value
|
|
const rows = tableSampleCheckedKeys.value
|
|
-
|
|
|
|
listItemBaseData.value.sampleIds = rowsToId(rows) || '';
|
|
listItemBaseData.value.sampleIds = rowsToId(rows) || '';
|
|
- // console.log( rowsToId(rows),' rowsToId(rows)');
|
|
|
|
- // const { error, code, data } = await dataApi.recordsampleSubmit({
|
|
|
|
- // id: dataId,
|
|
|
|
- // sampleIds:rowsToId(rows) || '',
|
|
|
|
- // })
|
|
|
|
- // if (!error && code === 200) {
|
|
|
|
- // window.$message?.success('操作成功')
|
|
|
|
- // tableSampleRef.value?.clearSelection();
|
|
|
|
- // }
|
|
|
|
- // else {
|
|
|
|
- // // window.$message?.warning(error)
|
|
|
|
- // }
|
|
|
|
|
|
+ window.$message?.success('操作成功')
|
|
|
|
|
|
tableSampleCheckedKeys.value = [];
|
|
tableSampleCheckedKeys.value = [];
|
|
linksSampleModal.value = false
|
|
linksSampleModal.value = false
|
|
@@ -741,12 +739,7 @@ const tableFormSaveClick = async () => {
|
|
// console.log(listItemBaseData.value,'.listItemBaseData.value');
|
|
// console.log(listItemBaseData.value,'.listItemBaseData.value');
|
|
|
|
|
|
//false是编辑
|
|
//false是编辑
|
|
- //编辑要传记录和报告单
|
|
|
|
- if(checkrelationString.value.length>0){
|
|
|
|
- listItemBaseData.value.projectPosition=checkrelationString.value
|
|
|
|
- }else{
|
|
|
|
- listItemBaseData.value.projectPosition=''
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
|
|
if(tabTypeKey.value==='2'&&listItemBaseData.value.detectionResult===''){
|
|
if(tabTypeKey.value==='2'&&listItemBaseData.value.detectionResult===''){
|
|
window.$message?.warning('请选择报告单是否合格')
|
|
window.$message?.warning('请选择报告单是否合格')
|