|
@@ -238,7 +238,7 @@ const getExcelHtml = async (item,index) => {
|
|
onRightClick(event, KeyName, index)
|
|
onRightClick(event, KeyName, index)
|
|
},
|
|
},
|
|
onBlur: (event, KeyName, reg, val, msg) => {
|
|
onBlur: (event, KeyName, reg, val, msg) => {
|
|
- if (reg) {
|
|
|
|
|
|
+ if (val && reg) {
|
|
console.log(KeyName, val, reg, msg)
|
|
console.log(KeyName, val, reg, msg)
|
|
let regx = new RegExp(reg);
|
|
let regx = new RegExp(reg);
|
|
console.log(regx)
|
|
console.log(regx)
|
|
@@ -248,12 +248,15 @@ const getExcelHtml = async (item,index) => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
item.isTableFormRender = true
|
|
item.isTableFormRender = true
|
|
|
|
+ item.isRenderTableForm = true
|
|
} else {
|
|
} else {
|
|
item.isTableForm = false
|
|
item.isTableForm = false
|
|
|
|
+ item.isRenderTableForm = true
|
|
window?.$message?.warning('暂无表单')
|
|
window?.$message?.warning('暂无表单')
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
item.isTableForm = false
|
|
item.isTableForm = false
|
|
|
|
+ item.isRenderTableForm = false
|
|
window?.$message?.warning('pkeyId为空')
|
|
window?.$message?.warning('pkeyId为空')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -357,15 +360,19 @@ const copyClick = async (item,index) => {
|
|
const pkeyIds = item.pkeyId ? item.pkeyId + '' : ''
|
|
const pkeyIds = item.pkeyId ? item.pkeyId + '' : ''
|
|
if (pkeyIds) {
|
|
if (pkeyIds) {
|
|
if (isStatus.value !== '3') {
|
|
if (isStatus.value !== '3') {
|
|
- const res = await saveExcelBussData(item,index,false)
|
|
|
|
- if (res) {
|
|
|
|
- const {error, code} = await wbsApi.copeBussTab({pkeyId: pkeyIds})
|
|
|
|
- if (!error && code === 200) {
|
|
|
|
- window?.$message?.success('操作成功')
|
|
|
|
- renewData()
|
|
|
|
|
|
+ if (!item.isRenderTableForm) {
|
|
|
|
+ await copeBussTab()
|
|
|
|
+ } else if (!item.isTableForm) {
|
|
|
|
+ window?.$message?.warning('暂无表单数据')
|
|
|
|
+ } else if (item.isRenderTableForm) {
|
|
|
|
+ const res = await saveExcelBussData(item,index,false)
|
|
|
|
+ if (res) {
|
|
|
|
+ await copeBussTab()
|
|
|
|
+ } else {
|
|
|
|
+ window?.$message?.warning('复制本表操作失败')
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- window?.$message?.warning('复制本表操作失败')
|
|
|
|
|
|
+ window?.$message?.warning(`数据异常了, isRenderTableForm: ${item.isRenderTableForm}, isTableForm: ${item.isTableForm}, pkeyIds:${pkeyIds}`)
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
window?.$message?.warning('已上报的资料,不允许复制')
|
|
window?.$message?.warning('已上报的资料,不允许复制')
|
|
@@ -375,6 +382,17 @@ const copyClick = async (item,index) => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const copeBussTab = async (pkeyIds) => {
|
|
|
|
+ const {error, code} = await wbsApi.copeBussTab({
|
|
|
|
+ pkeyId: pkeyIds
|
|
|
|
+ })
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ window?.$message?.success('操作成功')
|
|
|
|
+ renewData()
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
//隐藏本表
|
|
//隐藏本表
|
|
const hideClick = async (item) => {
|
|
const hideClick = async (item) => {
|
|
const pkeyIds = item.pkeyId ? item.pkeyId + '' : ''
|
|
const pkeyIds = item.pkeyId ? item.pkeyId + '' : ''
|
|
@@ -416,6 +434,8 @@ const uploadClick = (item) => {
|
|
uploadData.value = getFormDataInit(item,pkeyIds)
|
|
uploadData.value = getFormDataInit(item,pkeyIds)
|
|
//获取文件列表
|
|
//获取文件列表
|
|
getBussFileList(pkeyIds)
|
|
getBussFileList(pkeyIds)
|
|
|
|
+ } else if (!item.isRenderTableForm) {
|
|
|
|
+ window?.$message?.warning('请先展开表单')
|
|
} else if (!item.isTableForm) {
|
|
} else if (!item.isTableForm) {
|
|
window?.$message?.warning('暂无表单数据')
|
|
window?.$message?.warning('暂无表单数据')
|
|
} else {
|
|
} else {
|