装备新增问题修复
This commit is contained in:
parent
14cc1b3710
commit
14487ab37d
|
|
@ -130,6 +130,7 @@ getList()
|
|||
const equipmentDeployment = () => {
|
||||
settleinTitle.value = '新增装备'
|
||||
isViewForm.value = false
|
||||
isEditForm.value = false
|
||||
Object.assign(addAndEditForm, addAndEditFormTemp)
|
||||
disabledForm.value = false
|
||||
isEditDisabled.value = true
|
||||
|
|
@ -157,7 +158,7 @@ const equipmentDeployment = () => {
|
|||
// 打开入驻弹框
|
||||
dialogFormVisibleSettlein.value = true
|
||||
}
|
||||
|
||||
const isEditForm = ref(false)
|
||||
const maId: any = ref('')
|
||||
// 编辑按钮
|
||||
const editRowInfo = (row: any) => {
|
||||
|
|
@ -166,6 +167,7 @@ const editRowInfo = (row: any) => {
|
|||
disabledForm.value = false
|
||||
isEditDisabled.value = true
|
||||
isViewForm.value = false
|
||||
isEditForm.value = true
|
||||
}
|
||||
/* 查看按钮 */
|
||||
const previewRowInfo = (row: any) => {
|
||||
|
|
@ -241,7 +243,13 @@ const getDetailData = async (row: any) => {
|
|||
insurancePdf,
|
||||
examinationPdf,
|
||||
})
|
||||
if (settleinTitle.value == '装备编辑') {
|
||||
Object.assign(addAndEditForm, {
|
||||
maId: row.maId,
|
||||
})
|
||||
|
||||
console.log(row.maId, '****')
|
||||
}
|
||||
descriptionFormList.value[0].insurancePdfs = insurancePdf
|
||||
descriptionFormList.value[0].examinationPdfs = examinationPdf
|
||||
addAndEditForm.deviceTypeList = getSelectId(deviceTypeTree.value, addAndEditForm.typeId)
|
||||
|
|
@ -475,7 +483,7 @@ const descriptionRules = ref({
|
|||
})
|
||||
// 弹框保存提交
|
||||
const submitBtn = async () => {
|
||||
submitFun(1)
|
||||
submitFun(isEditForm.value ? 3 : 1)
|
||||
// ruleFormRef.value.validate(async (valid: any) => {
|
||||
// if (valid) {
|
||||
// if (
|
||||
|
|
@ -532,7 +540,7 @@ const submitBtn = async () => {
|
|||
}
|
||||
const submitFun = (type: any) => {
|
||||
console.log(9999)
|
||||
// type 1 提交 2 存草稿
|
||||
// type 1 提交 2 存草稿 3 编辑时提交
|
||||
addAndEditForm.mainFileList = [
|
||||
...addAndEditForm.mainFileList,
|
||||
...addAndEditForm.mainFileTempList,
|
||||
|
|
@ -572,7 +580,16 @@ const submitFun = (type: any) => {
|
|||
addAndEditForm.typeId =
|
||||
addAndEditForm.deviceTypeList[addAndEditForm.deviceTypeList.length - 1]
|
||||
|
||||
const SEND_FUN_API = type == 1 ? equipmentAddApi : insertDraftApi
|
||||
let SEND_FUN_API: any = null
|
||||
if (type == 1) {
|
||||
SEND_FUN_API = equipmentAddApi
|
||||
}
|
||||
if (type == 2) {
|
||||
SEND_FUN_API = insertDraftApi
|
||||
}
|
||||
if (type == 3) {
|
||||
SEND_FUN_API = equipmentEditApi
|
||||
}
|
||||
const res: any = await SEND_FUN_API(addAndEditForm)
|
||||
console.log(res, '提交结果---')
|
||||
if (res.code === 200) {
|
||||
|
|
@ -1020,12 +1037,12 @@ const onDialogClose = () => {
|
|||
@click="handleUpdateUpDown(null, 1)"
|
||||
>批量下架</el-button
|
||||
>
|
||||
<el-button class="primary-lease" type="primary" @click="onTempDownLoad()"
|
||||
<!-- <el-button class="primary-lease" type="primary" @click="onTempDownLoad()"
|
||||
>模板下载</el-button
|
||||
>
|
||||
<el-button class="primary-lease" type="primary" @click="onBatchUpload()"
|
||||
>批量上传</el-button
|
||||
>
|
||||
>批量上传</el-button
|
||||
> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -1209,7 +1226,7 @@ const onDialogClose = () => {
|
|||
maxlength="20"
|
||||
v-model="addAndEditForm.unitName"
|
||||
clearable
|
||||
:disabled="isDisabled"
|
||||
:disabled="isDisabled || isEditForm"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -1248,7 +1265,7 @@ const onDialogClose = () => {
|
|||
placeholder="请输入租赁价格"
|
||||
clearable
|
||||
maxlength="20"
|
||||
:disabled="isDisabled"
|
||||
:disabled="isDisabled || isEditForm"
|
||||
style="width: 350px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
|
|||
Loading…
Reference in New Issue