|
@@ -206,7 +206,7 @@ import mainApi from '~api/tentative/detect/commission'
|
|
import samplingApi from '~api/tentative/material/sampling'
|
|
import samplingApi from '~api/tentative/material/sampling'
|
|
import TestTree from '~src/views/tentative/material/components/TestTree.vue'
|
|
import TestTree from '~src/views/tentative/material/components/TestTree.vue'
|
|
import SamplingPage from './commission/sampling.vue'
|
|
import SamplingPage from './commission/sampling.vue'
|
|
-import { isCancel } from 'axios'
|
|
|
|
|
|
+
|
|
import wbsApi from '~api/data-fill/wbs'
|
|
import wbsApi from '~api/data-fill/wbs'
|
|
import dataApi from '~api/basic/code'
|
|
import dataApi from '~api/basic/code'
|
|
|
|
|
|
@@ -362,6 +362,7 @@ const addFormData = () => {
|
|
const delegateContractChange = async () => {
|
|
const delegateContractChange = async () => {
|
|
delegateHtmlLoading.value = true
|
|
delegateHtmlLoading.value = true
|
|
//await getDelegateDataInfo(editHtmlId.value)
|
|
//await getDelegateDataInfo(editHtmlId.value)
|
|
|
|
+
|
|
await getDelegateExcelHtml()
|
|
await getDelegateExcelHtml()
|
|
getMaterialNumber()
|
|
getMaterialNumber()
|
|
|
|
|
|
@@ -419,6 +420,14 @@ const getDelegateExcelHtml = async () => {
|
|
//关联材料选择
|
|
//关联材料选择
|
|
const linkSamplingChange = async ({ id, entrustId }) => {
|
|
const linkSamplingChange = async ({ id, entrustId }) => {
|
|
await getDelegateExcelHtml()
|
|
await getDelegateExcelHtml()
|
|
|
|
+ if (id) {
|
|
|
|
+ isCancel.value = false
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ isCancel.value = true
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
await getDelegateDataInfo(id, entrustId, delegateHtmlForm.value)
|
|
await getDelegateDataInfo(id, entrustId, delegateHtmlForm.value)
|
|
|
|
|
|
|
|
|
|
@@ -436,7 +445,8 @@ const getDelegateDataInfo = async (id, entrustId, formData) => {
|
|
contractId: delegateContractId.value,
|
|
contractId: delegateContractId.value,
|
|
nodeId: primaryKeyId,
|
|
nodeId: primaryKeyId,
|
|
formData: JSON.stringify(formData),
|
|
formData: JSON.stringify(formData),
|
|
- isCancel:id ? false : true,
|
|
|
|
|
|
+ isCancel:isCancel.value,
|
|
|
|
+
|
|
})
|
|
})
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
delegateHtmlForm.value = getObjValue(data[0])
|
|
delegateHtmlForm.value = getObjValue(data[0])
|
|
@@ -453,6 +463,7 @@ const delegateHtmlRender = (form) => {
|
|
|
|
|
|
//修改
|
|
//修改
|
|
const editHtmlId = ref('')
|
|
const editHtmlId = ref('')
|
|
|
|
+const isCancel = ref(false)//取消选择是true 其他为false
|
|
|
|
|
|
const rowEdit = async (row) => {
|
|
const rowEdit = async (row) => {
|
|
|
|
|
|
@@ -463,7 +474,7 @@ const rowEdit = async (row) => {
|
|
// delegateContractChange()
|
|
// delegateContractChange()
|
|
row.rowLoad = true
|
|
row.rowLoad = true
|
|
delegateHtmlLoading.value = true
|
|
delegateHtmlLoading.value = true
|
|
-
|
|
|
|
|
|
+ isCancel.value = false
|
|
await getDelegateExcelHtml()
|
|
await getDelegateExcelHtml()
|
|
await getDelegateDataInfo('', row.id)
|
|
await getDelegateDataInfo('', row.id)
|
|
|
|
|