测试问题修改

This commit is contained in:
BianLzhaoMin 2024-06-06 15:57:41 +08:00
parent 9e113d0ee0
commit e1928139b7
6 changed files with 664 additions and 455 deletions

View File

@ -117,6 +117,7 @@ const user = {
/* 存储当前登录用户的userId */ /* 存储当前登录用户的userId */
sessionStorage.setItem('userId', user.userId) sessionStorage.setItem('userId', user.userId)
sessionStorage.setItem('deptId', user.deptId) sessionStorage.setItem('deptId', user.deptId)
sessionStorage.setItem('userName', user.userName)
const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : user.avatar; const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : user.avatar;
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
commit('SET_ROLES', res.roles) commit('SET_ROLES', res.roles)

View File

@ -281,9 +281,10 @@
size="mini" size="mini"
type="text" type="text"
v-if=" v-if="
scope.row.taskStatus == 98 || (scope.row.taskStatus == 98 ||
scope.row.taskStatus == 99 || scope.row.taskStatus == 99 ||
scope.row.taskStatus == 100 scope.row.taskStatus == 100) &&
scope.row.createBy === currentUserName
" "
@click="handleUpdate2(scope.row)" @click="handleUpdate2(scope.row)"
v-hasPermi="['picking:apply:reject:submit']" v-hasPermi="['picking:apply:reject:submit']"
@ -367,6 +368,7 @@ export default {
}, },
unitList: [], // unitList: [], //
proList: [], // proList: [], //
currentUserName: sessionStorage.getItem('userName'),
} }
}, },
created() { created() {

View File

@ -286,7 +286,7 @@
@click="codeOut(scope.row)" @click="codeOut(scope.row)"
v-if=" v-if="
scope.row.manageType == 0 && scope.row.manageType == 0 &&
scope.row.status != 0 scope.row.status != 2
" "
> >
编码出库 编码出库
@ -758,7 +758,10 @@ export default {
type: 'warning', type: 'warning',
}) })
.then(() => { .then(() => {
outboundCompleted({ id: this.dialogQuery.id, typeId: row.typeId }).then((response) => { outboundCompleted({
id: this.dialogQuery.id,
typeId: row.typeId,
}).then((response) => {
this.$modal.msgSuccess('完成出库成功') this.$modal.msgSuccess('完成出库成功')
this.handleDialogQuery() this.handleDialogQuery()
this.handleQuery() this.handleQuery()

View File

@ -805,7 +805,7 @@ export default {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess('操作成功') this.$modal.msgSuccess('操作成功')
// this.back() // this.back()
this.$$emit('goBackPage') this.$emit('goBackPage')
} }
}) })
} }

View File

@ -1,125 +1,310 @@
<template> <template>
<el-dialog v-dialogDrag v-loading.fullscreen.lock="fullscreenLoading" :before-close="cancel" :title="dialogTitle" <el-dialog
:visible.sync="dialogShowFlag" append-to-body width="600px"> v-dialogDrag
v-loading.fullscreen.lock="fullscreenLoading"
:before-close="cancel"
:title="dialogTitle"
:visible.sync="dialogShowFlag"
append-to-body
width="600px"
>
<div class="form_box_one"> <div class="form_box_one">
<el-form ref="dynamicValidateForm" :model="dynamicValidateForm" class="demo-dynamic" label-width="90px"> <el-form
<div v-for="(domain, index) in dynamicValidateForm.premiumList" :key="domain.key" class="bor_box"> ref="dynamicValidateForm"
:model="dynamicValidateForm"
class="demo-dynamic"
label-width="90px"
>
<div
v-for="(domain, index) in dynamicValidateForm.premiumList"
:key="domain.key"
class="bor_box"
>
<p class="form_box_title">编码管理设备</p> <p class="form_box_title">编码管理设备</p>
<div class="form_box_line"></div> <div class="form_box_line"></div>
<div class="form_box_item"> <div class="form_box_item">
<el-form-item :prop="'premiumList.' + index + '.partId'" label="选择配件:"> <el-form-item
<treeselect v-model="domain.partId" style="width: 350px" :options="deptList" :normalizer="normalizer" :prop="'premiumList.' + index + '.partId'"
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果" placeholder="请选择配件" label="选择配件:"
:disable-branch-nodes="true" /> >
<treeselect
v-model="domain.partId"
style="width: 350px"
:options="deptList"
:normalizer="normalizer"
noChildrenText="没有数据了"
noOptionsText="没有数据"
noResultsText="没有搜索结果"
placeholder="请选择配件"
:disable-branch-nodes="true"
/>
</el-form-item> </el-form-item>
<el-form-item v-if="index == 0" :prop="'premiumListTwo.' + index + '.repairer'" label="维修人:"> <el-form-item
<el-select v-model="domain.repairer" placeholder="请选择" size="small" filterable style="width: 350px"> v-if="index == 0"
<el-option v-for="dict in userSelectList" :key="dict.userId" :label="dict.userName" :prop="'premiumListTwo.' + index + '.repairer'"
:value="dict.userId" /> label="维修人:"
>
<el-select
v-model="domain.repairer"
placeholder="请选择"
size="small"
filterable
style="width: 350px"
>
<el-option
v-for="dict in userSelectList"
:key="dict.userId"
:label="dict.userName"
:value="dict.userId"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :prop="'premiumList.' + index + '.partType'" label="是否收费:" required <el-form-item
:rules="{ required: true, message: '请选择是否收费', trigger: 'blur', }"> :prop="'premiumList.' + index + '.partType'"
<el-radio-group style="width: 350px" v-model="domain.partType"> label="是否收费:"
required
:rules="{
required: true,
message: '请选择是否收费',
trigger: 'blur',
}"
>
<el-radio-group
style="width: 350px"
v-model="domain.partType"
>
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<!-- { required: true, message: '配件数量不能为空', trigger: 'blur' }, --> <!-- { required: true, message: '配件数量不能为空', trigger: 'blur' }, -->
<el-form-item :prop="'premiumList.' + index + '.partNum'" label="配件数量:" :rules="{ <el-form-item
required: false, :prop="'premiumList.' + index + '.partNum'"
validator: numberIntegerValidator, label="配件数量:"
trigger: 'blur', >
}"> <el-input
<el-input v-model="domain.partNum" placeholder="请输入" size="small" maxlength="10" v-model="domain.partNum"
style="width: 350px"></el-input> placeholder="请输入"
size="small"
maxlength="10"
style="width: 350px"
></el-input>
</el-form-item> </el-form-item>
<el-form-item :prop="'premiumList.' + index + '.partCost'" label="配件费用:" :rules="{ <el-form-item
:prop="'premiumList.' + index + '.partCost'"
label="配件费用:"
:rules="{
required: false, required: false,
validator: meneyIntegerValidator, validator: meneyIntegerValidator,
trigger: 'blur', trigger: 'blur',
}"> }"
<el-input v-model="domain.partCost" placeholder="请输入" size="small" maxlength="10" >
style="width: 350px"></el-input> <el-input
v-model="domain.partCost"
placeholder="请输入"
size="small"
maxlength="10"
style="width: 350px"
></el-input>
</el-form-item> </el-form-item>
<el-form-item :prop="'premiumList.' + index + '.repairContent'" label="维修内容:"> <el-form-item
<el-input v-model="domain.repairContent" maxlength="100" placeholder="请输入" show-word-limit size="small" :prop="'premiumList.' + index + '.repairContent'"
style="width: 350px" type="textarea"></el-input> label="维修内容:"
>
<el-input
v-model="domain.repairContent"
maxlength="100"
placeholder="请输入"
show-word-limit
size="small"
style="width: 350px"
type="textarea"
></el-input>
</el-form-item> </el-form-item>
</div> </div>
<div class="add_box"> <div class="add_box">
<el-button icon="el-icon-plus" size="mini" type="success" @click="addDomainOne">添加配件 <el-button
icon="el-icon-plus"
size="mini"
type="success"
@click="addDomainOne"
>添加配件
</el-button> </el-button>
<el-button size="mini" icon="el-icon-delete" @click="delDomain(domain, 1)" v-show="index > 0">删除</el-button> <el-button
size="mini"
icon="el-icon-delete"
@click="delDomain(domain, 1)"
v-show="index > 0"
>删除</el-button
>
</div> </div>
</div> </div>
</el-form> </el-form>
<div slot="footer" class="dialog-footer" v-if="rowObj.code !== null && rowObj.code !== ''"> <div
slot="footer"
class="dialog-footer"
v-if="rowObj.code !== null && rowObj.code !== ''"
>
<el-button @click="cancel">取消</el-button> <el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="submit">保存</el-button> <el-button type="primary" @click="submit">保存</el-button>
</div> </div>
</div> </div>
<div class="form_box_two"> <div class="form_box_two">
<el-form ref="dynamicValidateFormTwo" :model="dynamicValidateFormTwo" class="demo-dynamic" label-width="100px"> <el-form
<div v-for="(domain, index) in dynamicValidateFormTwo.premiumListTwo" :key="domain.key" class="bor_box"> ref="dynamicValidateFormTwo"
:model="dynamicValidateFormTwo"
class="demo-dynamic"
label-width="100px"
>
<div
v-for="(
domain, index
) in dynamicValidateFormTwo.premiumListTwo"
:key="domain.key"
class="bor_box"
>
<p class="form_box_title">数量管理设备</p> <p class="form_box_title">数量管理设备</p>
<div class="form_box_line"></div> <div class="form_box_line"></div>
<div class="form_box_item"> <div class="form_box_item">
<el-form-item v-if="index == 0" :prop="'premiumListTwo.' + index + '.repairNum'" label="维修数量:" :rules="{ <el-form-item
v-if="index == 0"
:prop="'premiumListTwo.' + index + '.repairNum'"
label="维修数量:"
:rules="{
required: true, required: true,
validator: numberIntegerValidator, validator: numberIntegerValidator,
trigger: 'blur', trigger: 'blur',
}"> }"
<el-input v-model="domain.repairNum" placeholder="请输入" size="small" maxlength="10" >
style="width: 350px"></el-input> <el-input
v-model="domain.repairNum"
placeholder="请输入"
size="small"
maxlength="10"
style="width: 350px"
></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="index == 0" :prop="'premiumListTwo.' + index + '.repairer'" label="维修人:"> <el-form-item
<el-select v-model="domain.repairer" placeholder="请选择" size="small" filterable style="width: 350px"> v-if="index == 0"
<el-option v-for="dict in userSelectList" :key="dict.userId" :label="dict.userName" :prop="'premiumListTwo.' + index + '.repairer'"
:value="dict.userId" /> label="维修人:"
>
<el-select
v-model="domain.repairer"
placeholder="请选择"
size="small"
filterable
style="width: 350px"
>
<el-option
v-for="dict in userSelectList"
:key="dict.userId"
:label="dict.userName"
:value="dict.userId"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :prop="'premiumList.' + index + '.partId'" label="选择配件:"> <el-form-item
<treeselect style="width: 350px" v-model="domain.partId" :options="deptList" :normalizer="normalizer" :prop="'premiumList.' + index + '.partId'"
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果" placeholder="选择上级" label="选择配件:"
:disable-branch-nodes="true" /> >
<treeselect
style="width: 350px"
v-model="domain.partId"
:options="deptList"
:normalizer="normalizer"
noChildrenText="没有数据了"
noOptionsText="没有数据"
noResultsText="没有搜索结果"
placeholder="请选择配件"
:disable-branch-nodes="true"
/>
</el-form-item> </el-form-item>
<el-form-item :prop="'premiumListTwo.' + index + '.partType'" label="是否收费:" required <el-form-item
:rules="{ required: true, message: '请选择是否收费', trigger: 'blur', }"> :prop="'premiumListTwo.' + index + '.partType'"
<el-radio-group style="width: 350px" v-model="domain.partType"> label="是否收费:"
required
:rules="{
required: true,
message: '请选择是否收费',
trigger: 'blur',
}"
>
<el-radio-group
style="width: 350px"
v-model="domain.partType"
>
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item :prop="'premiumListTwo.' + index + '.partNum'" label="配件数量:" :rules="{ <el-form-item
required: false, :prop="'premiumListTwo.' + index + '.partNum'"
validator: numberIntegerValidator, label="配件数量:"
trigger: 'blur', >
}"> <el-input
<el-input v-model="domain.partNum" placeholder="请输入" size="small" maxlength="10" v-model="domain.partNum"
style="width: 350px"></el-input> placeholder="请输入"
size="small"
maxlength="10"
style="width: 350px"
></el-input>
</el-form-item> </el-form-item>
<el-form-item :prop="'premiumListTwo.' + index + '.partCost'" label="配件费用:" :rules="{ <el-form-item
:prop="'premiumListTwo.' + index + '.partCost'"
label="配件费用:"
:rules="{
required: false, required: false,
validator: meneyIntegerValidator, validator: meneyIntegerValidator,
trigger: 'blur', trigger: 'blur',
}"> }"
<el-input v-model="domain.partCost" placeholder="请输入" size="small" maxlength="10" >
style="width: 350px"></el-input> <el-input
v-model="domain.partCost"
placeholder="请输入"
size="small"
maxlength="10"
style="width: 350px"
></el-input>
</el-form-item> </el-form-item>
<el-form-item :prop="'premiumListTwo.' + index + '.repairContent'" label="维修内容:"> <el-form-item
<el-input v-model="domain.repairContent" maxlength="100" placeholder="请输入" show-word-limit size="small" :prop="'premiumListTwo.' + index + '.repairContent'"
style="width: 350px" type="textarea"></el-input> label="维修内容:"
>
<el-input
v-model="domain.repairContent"
maxlength="100"
placeholder="请输入"
show-word-limit
size="small"
style="width: 350px"
type="textarea"
></el-input>
</el-form-item> </el-form-item>
</div> </div>
<div class="add_box"> <div class="add_box">
<el-button icon="el-icon-plus" size="mini" type="success" @click="addDomainTwo">添加配件 <el-button
icon="el-icon-plus"
size="mini"
type="success"
@click="addDomainTwo"
>添加配件
</el-button> </el-button>
<el-button size="mini" icon="el-icon-delete" @click="delDomain(domain, 2)" v-show="index > 0">删除</el-button> <el-button
size="mini"
icon="el-icon-delete"
@click="delDomain(domain, 2)"
v-show="index > 0"
>删除</el-button
>
</div> </div>
</div> </div>
</el-form> </el-form>
<div slot="footer" class="dialog-footer" v-if="rowObj.code == null || rowObj.code == ''"> <div
slot="footer"
class="dialog-footer"
v-if="rowObj.code == null || rowObj.code == ''"
>
<el-button @click="cancel">取消</el-button> <el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="submitTwo">保存</el-button> <el-button type="primary" @click="submitTwo">保存</el-button>
</div> </div>
@ -129,55 +314,54 @@
<script> <script>
import { import {
submitRepairApplyApi, submitRepairApplyApi,
getRepairMaTypeListApi, listPartType getRepairMaTypeListApi,
} from "@/api/repairTest/repair"; listPartType,
} from '@/api/repairTest/repair'
import { getUserByRoleList } from '@/api/system/user' import { getUserByRoleList } from '@/api/system/user'
// import { listPartType, } from "@/api/store/tools"; // import { listPartType, } from "@/api/store/tools";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from '@riophae/vue-treeselect'
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { import { getInfo } from '@/api/login'
getInfo,
} from "@/api/login";;
export default { export default {
components: { Treeselect }, components: { Treeselect },
props: { props: {
// //
isShowFlag: { isShowFlag: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
// //
priKey: { priKey: {
type: [String, Number], type: [String, Number],
default: "" default: '',
}, },
// //
dialogTitle: { dialogTitle: {
type: String, type: String,
default: "" default: '',
}, },
// //
rowObj: { rowObj: {
type: Object, type: Object,
default: {} default: {},
} },
}, },
watch: { watch: {
isShowFlag(val) { isShowFlag(val) {
if (val) { if (val) {
this.init(); this.init()
}
} }
}, },
},
computed: { computed: {
dialogShowFlag: { dialogShowFlag: {
get() { get() {
return this.isShowFlag; return this.isShowFlag
}, },
set(v) { set(v) {
this.$emit("update:isShowFlag", v); this.$emit('update:isShowFlag', v)
} },
} },
}, },
data() { data() {
return { return {
@ -185,40 +369,40 @@ export default {
dynamicValidateForm: { dynamicValidateForm: {
premiumList: [ premiumList: [
{ {
selected: "Y", selected: 'Y',
premium: undefined, premium: undefined,
rate: undefined, rate: undefined,
feeRate: undefined, feeRate: undefined,
fee: undefined, fee: undefined,
baofei1_unit: "", baofei1_unit: '',
shangyoufeiyonge_unit: "", shangyoufeiyonge_unit: '',
downRate: undefined, downRate: undefined,
downFee: undefined, downFee: undefined,
xiayoufeiyonge_unit: "" xiayoufeiyonge_unit: '',
} },
], ],
}, },
dynamicValidateFormTwo: { dynamicValidateFormTwo: {
premiumListTwo: [ premiumListTwo: [
{ {
selected: "Y", selected: 'Y',
premium: undefined, premium: undefined,
rate: undefined, rate: undefined,
feeRate: undefined, feeRate: undefined,
fee: undefined, fee: undefined,
baofei1_unit: "", baofei1_unit: '',
shangyoufeiyonge_unit: "", shangyoufeiyonge_unit: '',
downRate: undefined, downRate: undefined,
downFee: undefined, downFee: undefined,
xiayoufeiyonge_unit: "" xiayoufeiyonge_unit: '',
} },
], ],
}, },
deptList: [], deptList: [],
userSelectList: [], userSelectList: [],
companyId: '', companyId: '',
taskId: "" taskId: '',
}; }
}, },
mounted() { mounted() {
this.$eventBus.$on('taskId', (taskId) => { this.$eventBus.$on('taskId', (taskId) => {
@ -229,71 +413,72 @@ export default {
methods: { methods: {
// //
meneyIntegerValidator(rule, value, callback) { meneyIntegerValidator(rule, value, callback) {
const reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/; const reg =
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/
if (value === '' || reg.test(value)) { if (value === '' || reg.test(value)) {
callback(); callback()
} else { } else {
callback(new Error('请输入大于0的数,最多2为小数')); callback(new Error('请输入大于0的数,最多2为小数'))
} }
}, },
//-- //--
numberIntegerValidator(rule, value, callback) { numberIntegerValidator(rule, value, callback) {
const reg = /^\+?[1-9][0-9]*$/ const reg = /^\+?[1-9][0-9]*$/
if ((value === '' || reg.test(value)) && value <= this.rowObj.repairNum) { if ((value || reg.test(value)) && value <= this.rowObj.repairNum) {
callback() callback()
} else { } else {
callback(new Error('请输入大于0的并且小于维修总量的正整数')) callback(new Error('请输入大于0的并且小于维修总量的正整数'))
} }
}, },
getTree() { getTree() {
listPartType().then(response => { listPartType().then((response) => {
this.deptList = this.handleTree(response.data, "paId"); this.deptList = this.handleTree(response.data, 'paId')
}); })
}, },
/** 转换部门数据结构 */ /** 转换部门数据结构 */
normalizer(node) { normalizer(node) {
if (node.children && !node.children.length) { if (node.children && !node.children.length) {
delete node.children; delete node.children
} }
return { return {
id: node.paId, id: node.paId,
label: node.paName, label: node.paName,
children: node.children children: node.children,
}; }
}, },
getList() { getList() {
let params = { let params = {
taskId: this.taskId taskId: this.taskId,
} }
this.loading = true; this.loading = true
getRepairMaTypeListApi(params).then(res => { getRepairMaTypeListApi(params).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.repairList = res.rows; this.repairList = res.rows
this.total = res.total; this.total = res.total
this.loading = false; this.loading = false
} }
}) })
}, },
init() { init() {
if (this.rowObj.code !== null && this.rowObj.code !== '') { if (this.rowObj.code !== null && this.rowObj.code !== '') {
this.dynamicValidateForm.premiumList = []; this.dynamicValidateForm.premiumList = []
this.dynamicValidateFormTwo.premiumListTwo = []; this.dynamicValidateFormTwo.premiumListTwo = []
this.addDomainOne(); this.addDomainOne()
} else { } else {
this.dynamicValidateForm.premiumList = []; this.dynamicValidateForm.premiumList = []
this.dynamicValidateFormTwo.premiumListTwo = []; this.dynamicValidateFormTwo.premiumListTwo = []
this.addDomainTwo(); this.addDomainTwo()
} }
getUserByRoleList().then(response => { getUserByRoleList().then((response) => {
this.userSelectList = response.data; this.userSelectList = response.data
}) })
getInfo().then(res => { getInfo().then((res) => {
this.companyId = res.user.companyId this.companyId = res.user.companyId
}) })
}, },
// //
cancel() { cancel() {
this.dialogShowFlag = false; this.dialogShowFlag = false
// this.$refs["form"].resetFields(); // this.$refs["form"].resetFields();
// this.dynamicValidateForm.premiumList = []; // this.dynamicValidateForm.premiumList = [];
}, },
@ -305,7 +490,7 @@ export default {
// repairContent // repairContent
// repairNum // repairNum
this.dynamicValidateForm.premiumList.push({ this.dynamicValidateForm.premiumList.push({
selected: "N", selected: 'N',
// partId: '', // partId: '',
repairer: '', repairer: '',
partType: '', partType: '',
@ -313,19 +498,25 @@ export default {
partCost: '', partCost: '',
repairContent: '', repairContent: '',
repairNum: 1, repairNum: 1,
key: Date.now() key: Date.now(),
}); })
}, },
delDomain(domain, type) { delDomain(domain, type) {
if (type == 1) { if (type == 1) {
this.dynamicValidateForm.premiumList = this.dynamicValidateForm.premiumList.filter(item => item.key != domain.key); this.dynamicValidateForm.premiumList =
this.dynamicValidateForm.premiumList.filter(
(item) => item.key != domain.key,
)
} else { } else {
this.dynamicValidateFormTwo.premiumListTwo = this.dynamicValidateFormTwo.premiumListTwo.filter(item => item.key != domain.key); this.dynamicValidateFormTwo.premiumListTwo =
this.dynamicValidateFormTwo.premiumListTwo.filter(
(item) => item.key != domain.key,
)
} }
}, },
addDomainTwo() { addDomainTwo() {
this.dynamicValidateFormTwo.premiumListTwo.push({ this.dynamicValidateFormTwo.premiumListTwo.push({
selected: "N", selected: 'N',
// partId: '', // partId: '',
repairer: '', repairer: '',
partType: '', partType: '',
@ -333,14 +524,17 @@ export default {
partCost: '', partCost: '',
repairContent: '', repairContent: '',
repairNum: '', repairNum: '',
key: Date.now() key: Date.now(),
}); })
}, },
submit() { submit() {
this.$refs["dynamicValidateForm"].validate(valid => { this.$refs['dynamicValidateForm'].validate((valid) => {
if (valid) { if (valid) {
// //
console.log('this.dynamicValidateForm.premiumList1111)', this.dynamicValidateForm.premiumList); console.log(
'this.dynamicValidateForm.premiumList1111)',
this.dynamicValidateForm.premiumList,
)
let params = { let params = {
taskId: this.rowObj.taskId, taskId: this.rowObj.taskId,
maId: this.rowObj.maId, maId: this.rowObj.maId,
@ -348,10 +542,13 @@ export default {
id: this.rowObj.id, id: this.rowObj.id,
repairType: 1, repairType: 1,
companyId: this.companyId, companyId: this.companyId,
partStrList: JSON.stringify(this.dynamicValidateForm.premiumList) partStrList: JSON.stringify(
this.dynamicValidateForm.premiumList,
),
} }
this.fullscreenLoading = true this.fullscreenLoading = true
submitRepairApplyApi(params).then(res => { submitRepairApplyApi(params)
.then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.getList() this.getList()
this.fullscreenLoading = false this.fullscreenLoading = false
@ -360,17 +557,18 @@ export default {
this.$message.success('操作成功!') this.$message.success('操作成功!')
this.$emit('domainChange', res.code) this.$emit('domainChange', res.code)
} }
}).catch(() => { })
.catch(() => {
this.index = null this.index = null
this.fullscreenLoading = false this.fullscreenLoading = false
}) })
} else { } else {
return false; return false
} }
}); })
}, },
submitTwo() { submitTwo() {
this.$refs["dynamicValidateFormTwo"].validate(valid => { this.$refs['dynamicValidateFormTwo'].validate((valid) => {
if (valid) { if (valid) {
// //
let params = { let params = {
@ -380,10 +578,13 @@ export default {
id: this.rowObj.id, id: this.rowObj.id,
companyId: this.companyId, companyId: this.companyId,
repairType: 1, repairType: 1,
partStrList: JSON.stringify(this.dynamicValidateFormTwo.premiumListTwo) partStrList: JSON.stringify(
this.dynamicValidateFormTwo.premiumListTwo,
),
} }
this.fullscreenLoading = true this.fullscreenLoading = true
submitRepairApplyApi(params).then(res => { submitRepairApplyApi(params)
.then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.getList() this.getList()
this.fullscreenLoading = false this.fullscreenLoading = false
@ -392,17 +593,18 @@ export default {
this.$message.success('操作成功!') this.$message.success('操作成功!')
this.$emit('domainChange', res.code) this.$emit('domainChange', res.code)
} }
}).catch(() => { })
.catch(() => {
this.index = null this.index = null
this.fullscreenLoading = false this.fullscreenLoading = false
}) })
} else { } else {
return false; return false
} }
}); })
},
},
} }
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.form_box_one { .form_box_one {

View File

@ -261,6 +261,7 @@ export default {
this.$message.success('审核通过!') this.$message.success('审核通过!')
this.dialogConfig.outerVisible = false this.dialogConfig.outerVisible = false
this.$refs.tbRef.getList() this.$refs.tbRef.getList()
this.auditingParams.scrapDetailList = []
} }
}, },
/* 审核驳回 */ /* 审核驳回 */