|
@@ -52,7 +52,7 @@
|
|
<span>删除</span>
|
|
<span>删除</span>
|
|
</el-button>
|
|
</el-button>
|
|
</hc-tooltip>
|
|
</hc-tooltip>
|
|
- <hc-tooltip keys="tentative_material_sampling_printer">
|
|
|
|
|
|
+ <!-- <hc-tooltip keys="tentative_material_sampling_printer">
|
|
<el-button :disabled="tableCheckedKeys.length <= 0" :loading="printerLoading" hc-btn color="#567722" @click="printerClick">
|
|
<el-button :disabled="tableCheckedKeys.length <= 0" :loading="printerLoading" hc-btn color="#567722" @click="printerClick">
|
|
<hc-icon name="printer" />
|
|
<hc-icon name="printer" />
|
|
<span>打印</span>
|
|
<span>打印</span>
|
|
@@ -63,7 +63,7 @@
|
|
<hc-icon name="folder-upload" />
|
|
<hc-icon name="folder-upload" />
|
|
<span>导入</span>
|
|
<span>导入</span>
|
|
</el-button>
|
|
</el-button>
|
|
- </hc-tooltip>
|
|
|
|
|
|
+ </hc-tooltip> -->
|
|
<hc-tooltip keys="tentative_material_sampling_delegation">
|
|
<hc-tooltip keys="tentative_material_sampling_delegation">
|
|
<el-button hc-btn color="#E75643" :disabled="!nodeErTreeId" @click="delegationClick">
|
|
<el-button hc-btn color="#E75643" :disabled="!nodeErTreeId" @click="delegationClick">
|
|
<hc-icon name="slack" />
|
|
<hc-icon name="slack" />
|
|
@@ -281,10 +281,10 @@ import commissionApi from '~api/tentative/detect/commission'
|
|
import samplingApi from '~api/tentative/material/sampling'
|
|
import samplingApi from '~api/tentative/material/sampling'
|
|
import approachApi from '~api/tentative/material/approach'
|
|
import approachApi from '~api/tentative/material/approach'
|
|
import { getContractUserList, getDictionary } from '~api/other'
|
|
import { getContractUserList, getDictionary } from '~api/other'
|
|
-import { arrIndex, arrToId, deepClone, formValidate, getArrValue, getObjValue, isNullES, isString } from 'js-fast-way'
|
|
|
|
|
|
+import { arrIndex, arrToId, deepClone, formValidate, getArrValue, getObjVal, getObjValue, isNullES, isString } from 'js-fast-way'
|
|
import { toPdfPage } from '~uti/btn-auth'
|
|
import { toPdfPage } from '~uti/btn-auth'
|
|
import Dayjs from 'dayjs'
|
|
import Dayjs from 'dayjs'
|
|
-
|
|
|
|
|
|
+import dataApi from '~api/basic/code'
|
|
//变量
|
|
//变量
|
|
const useAppState = useAppStore()
|
|
const useAppState = useAppStore()
|
|
const userInfo = ref(useAppState.getUserInfo)
|
|
const userInfo = ref(useAppState.getUserInfo)
|
|
@@ -476,9 +476,31 @@ const addFormModalClick = () => {
|
|
userId: userInfo.value.user_id,
|
|
userId: userInfo.value.user_id,
|
|
}
|
|
}
|
|
addEditFormModal.value = true
|
|
addEditFormModal.value = true
|
|
|
|
+ getMaterialNumber()
|
|
|
|
+
|
|
requestDevice()
|
|
requestDevice()
|
|
}
|
|
}
|
|
|
|
+//获取材料编号
|
|
|
|
+const backObj = ref({})
|
|
|
|
+const getMaterialNumber = async () => {
|
|
|
|
+ const { error, code, data } = await dataApi.getTrialNumber({
|
|
|
|
+ projectId: projectId.value,
|
|
|
|
+ contractId: contractId.value,
|
|
|
|
+ type: 2,
|
|
|
|
+ nodeId:primaryKeyId.value,
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ //处理数据
|
|
|
|
+
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ backObj.value = getObjVal(data)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ backObj.value = {}
|
|
|
|
|
|
|
|
+ }
|
|
|
|
+}
|
|
//编辑
|
|
//编辑
|
|
const editFormModalClick = () => {
|
|
const editFormModalClick = () => {
|
|
const keys = tableCheckedKeys.value
|
|
const keys = tableCheckedKeys.value
|
|
@@ -624,6 +646,9 @@ const addEditFormClick = async () => {
|
|
}
|
|
}
|
|
form.projectId = projectId.value
|
|
form.projectId = projectId.value
|
|
form.contractId = searchForm.value.contractId
|
|
form.contractId = searchForm.value.contractId
|
|
|
|
+ form.trialAutoNumber = backObj.value?.trialAutoNumber
|
|
|
|
+ form.autoIncrementNumber = backObj.value?.autoIncrementNumber
|
|
|
|
+
|
|
const { error, code, msg } = await samplingApi.submitForm(form)
|
|
const { error, code, msg } = await samplingApi.submitForm(form)
|
|
//处理数据
|
|
//处理数据
|
|
addEditFormLoading.value = false
|
|
addEditFormLoading.value = false
|