| | |
| | | :model="form" |
| | | label-width="140px" |
| | | label-position="top" |
| | | :rules="rules" |
| | | :rules="operationType === 'view' ? {} : rules" |
| | | ref="formRef" |
| | | > |
| | | <el-row :gutter="30"> |
| | |
| | | v-model="form.proDesc" |
| | | placeholder="请输入" |
| | | clearable |
| | | disabled |
| | | :disabled="operationType === 'view'" |
| | | type="textarea" |
| | | /> |
| | | </el-form-item> |
| | |
| | | </el-row> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确认</el-button> |
| | | <el-button @click="closeDia">取消</el-button> |
| | | <el-button v-if="operationType === 'approve'" type="primary" @click="submitForm">确认</el-button> |
| | | <el-button v-if="operationType === 'approve'" @click="closeDia">取消</el-button> |
| | | <el-button v-else type="primary" @click="closeDia">关闭</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | userList.value = res.data; |
| | | }); |
| | | form.value = {...row} |
| | | form.value.disposeUserId = userStore.id; |
| | | form.value.disDate = getCurrentDate(); |
| | | if (type === 'approve') { |
| | | if (!form.value.disposeUserId) { |
| | | form.value.disposeUserId = userStore.id; |
| | | } |
| | | if (!form.value.disDate) { |
| | | form.value.disDate = getCurrentDate(); |
| | | } |
| | | } |
| | | } |
| | | // const setName = (code) => { |
| | | // const index = userList.value.findIndex(item => item.deviceModel === code); |
| | |
| | | // } |
| | | // } |
| | | const submitForm = () => { |
| | | if (operationType.value === 'view') { |
| | | closeDia(); |
| | | return; |
| | | } |
| | | proxy.$refs["formRef"].validate(valid => { |
| | | if (valid) { |
| | | afterSalesServiceDispose(form.value).then(response => { |
| | | proxy.$modal.msgSuccess("新增成功") |
| | | closeDia() |
| | | }) |
| | | } |
| | | if (!valid) return; |
| | | afterSalesServiceDispose(form.value).then(() => { |
| | | proxy.$modal.msgSuccess("处理成功") |
| | | closeDia() |
| | | }) |
| | | }) |
| | | } |
| | | // 关闭弹框 |
| | |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | </style> |