维修修改
This commit is contained in:
parent
0013ca35a7
commit
4892bb2bb9
|
|
@ -334,12 +334,7 @@
|
|||
|
||||
<!-- ****************数量维修****************** -->
|
||||
<!-- 数量维修 -->
|
||||
<el-dialog
|
||||
title="数量维修"
|
||||
:visible.sync="openNum"
|
||||
width="1250px"
|
||||
append-to-body
|
||||
>
|
||||
<el-dialog title="数量维修" :visible.sync="openNum" width="1250px" append-to-body>
|
||||
<el-row :gutter="24" style="padding-bottom: 20px;border-bottom: 2px solid #dcdfe6;">
|
||||
<el-col :span="4">
|
||||
<div style="font-weight: 600;">
|
||||
|
|
@ -357,27 +352,17 @@
|
|||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div class="dialog-content">
|
||||
<div class="left">
|
||||
<!-- 左侧内容 -->
|
||||
<el-form
|
||||
ref="formLeft"
|
||||
:model="formLeft"
|
||||
:rules="rulesLeft"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form ref="formLeft" :model="formLeft" :rules="rulesLeft" label-width="80px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="内部维修数量" prop="repairNum" label-width="120px">
|
||||
<el-input
|
||||
v-model.number="formLeft.repairNum"
|
||||
placeholder="请输入内部维修数量"
|
||||
maxlength="20"
|
||||
type="number"
|
||||
min="0"
|
||||
style="width: 220px"
|
||||
@input="waitRepairCount"
|
||||
/>
|
||||
<el-input v-model.number="formLeft.repairNum" placeholder="请输入内部维修数量"
|
||||
maxlength="20" type="number" min="0"
|
||||
style="width: 220px" @input="waitRepairCount"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -451,40 +436,20 @@
|
|||
<div class="divider"></div>
|
||||
<div class="middle">
|
||||
<!-- 中间内容 -->
|
||||
<el-form
|
||||
ref="formMiddle"
|
||||
:model="formMiddle"
|
||||
:rules="rulesMiddle"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form ref="formMiddle" :model="formMiddle" :rules="rulesMiddle" label-width="80px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="返厂维修数量" prop="repairNum" label-width="120px">
|
||||
<el-input
|
||||
v-model.number="formMiddle.repairNum"
|
||||
placeholder="请输入返厂维修数量"
|
||||
maxlength="20"
|
||||
type="number"
|
||||
min="0"
|
||||
style="width: 220px"
|
||||
@input="waitRepairCount"
|
||||
/>
|
||||
<el-input v-model.number="formMiddle.repairNum" placeholder="请输入返厂维修数量" maxlength="20" type="number" min="0" style="width: 220px" @input="waitRepairCount"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="物资厂家" prop="supplierId">
|
||||
<el-select
|
||||
v-model="formMiddle.supplierId"
|
||||
placeholder="物资厂家"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 260px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in supplierList"
|
||||
<el-select v-model="formMiddle.supplierId"
|
||||
placeholder="物资厂家" clearable filterable style="width: 260px">
|
||||
<el-option v-for="item in supplierList"
|
||||
:key="item.supplierId"
|
||||
:label="item.supplier"
|
||||
:value="item.supplierId"
|
||||
|
|
@ -493,36 +458,16 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div
|
||||
v-for="(item, index) in partItemsMiddle"
|
||||
:key="index"
|
||||
class="dynamic-item"
|
||||
>
|
||||
<div v-for="(item, index) in partItemsMiddle" :key="index" class="dynamic-item">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="配件名称" prop="partName" label-width="80px">
|
||||
<el-input
|
||||
v-model="item.partName"
|
||||
placeholder="请输入"
|
||||
maxlength="20"
|
||||
style="width: 90px"
|
||||
>
|
||||
</el-input>
|
||||
<el-input v-model="item.partName" placeholder="请输入" maxlength="20" style="width: 90px"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item
|
||||
label="是否收费"
|
||||
prop="partType"
|
||||
label-width="70px"
|
||||
>
|
||||
<el-select
|
||||
v-model="item.partType"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
clearable
|
||||
style="width: 80px"
|
||||
>
|
||||
<el-form-item label="是否收费" prop="partType" label-width="70px">
|
||||
<el-select v-model="item.partType" placeholder="请选择" filterable clearable style="width: 80px">
|
||||
<el-option label="是" value="1"></el-option>
|
||||
<el-option label="否" value="0"></el-option>
|
||||
</el-select>
|
||||
|
|
@ -532,47 +477,20 @@
|
|||
<el-row :gutter="24">
|
||||
<el-col :span="9">
|
||||
<el-form-item label="配件数量" prop="partNum" label-width="80px" >
|
||||
<el-input
|
||||
v-model.number="item.partNum"
|
||||
placeholder="请输入配件数量"
|
||||
maxlength="20"
|
||||
type="number" :min="0"
|
||||
style="width: 90px"
|
||||
>
|
||||
</el-input>
|
||||
<el-input v-model.number="item.partNum" placeholder="请输入配件数量"
|
||||
maxlength="20" type="number" :min="0" style="width: 90px"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="金额" prop="partPrice" label-width="70px">
|
||||
<el-input
|
||||
v-model.number="item.partPrice"
|
||||
placeholder="请输入"
|
||||
maxlength="20" type="number" :min="0"
|
||||
style="width: 95px"
|
||||
>
|
||||
<el-input v-model.number="item.partPrice" placeholder="请输入金额"
|
||||
maxlength="20" type="number" :min="0" style="width: 95px">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col
|
||||
:span="6"
|
||||
style="
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<i
|
||||
class="el-icon-plus"
|
||||
style="font-size: 20px; color: blue"
|
||||
@click="addPartItemMiddle"
|
||||
></i>
|
||||
<i
|
||||
class="el-icon-minus"
|
||||
style="font-size: 20px; color: red"
|
||||
v-if="index != 0"
|
||||
@click="removePartItemMiddle(index)"
|
||||
></i>
|
||||
<el-col :span="6" style="margin-top: 10px;display: flex;justify-content: center;align-items: center;">
|
||||
<i class="el-icon-plus" style="font-size: 20px; color: blue" @click="addPartItemMiddle"></i>
|
||||
<i class="el-icon-minus" style="font-size: 20px; color: red" v-if="index != 0" @click="removePartItemMiddle(index)"></i>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
|
@ -582,37 +500,15 @@
|
|||
<div class="divider"></div>
|
||||
<div class="right">
|
||||
<!-- 右侧内容 -->
|
||||
<el-form
|
||||
:model="formRight"
|
||||
ref="formRight"
|
||||
size="small"
|
||||
:rules="rulesRight"
|
||||
:inline="true"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form :model="formRight" ref="formRight" size="small" :rules="rulesRight" :inline="true" label-width="80px">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="待报废数量" prop="scrapNum" label-width="100px">
|
||||
<el-input
|
||||
v-model.number="formRight.scrapNum"
|
||||
placeholder="请输入待报废数量"
|
||||
maxlength="20"
|
||||
type="number"
|
||||
style="width: 210px"
|
||||
min="0"
|
||||
@input="waitRepairCount"
|
||||
/>
|
||||
<el-input v-model.number="formRight.scrapNum" placeholder="请输入待报废数量" maxlength="20" type="number" style="width: 210px" min="0" @input="waitRepairCount"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item label="损坏原因" prop="scrapType">
|
||||
<el-select
|
||||
v-model="formRight.scrapType"
|
||||
placeholder="损坏原因"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in damageReasonList"
|
||||
<el-select v-model="formRight.scrapType" placeholder="损坏原因" clearable filterable style="width: 240px">
|
||||
<el-option v-for="item in damageReasonList"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
|
|
@ -620,16 +516,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报废原因" prop="scrapReason">
|
||||
<el-input
|
||||
v-model="formRight.scrapReason"
|
||||
placeholder="请输入报废原因"
|
||||
clearable
|
||||
maxlength="150"
|
||||
type="textarea"
|
||||
style="width: 240px"
|
||||
rows="4"
|
||||
>
|
||||
</el-input>
|
||||
<el-input v-model="formRight.scrapReason" placeholder="请输入报废原因" clearable maxlength="150" type="textarea" style="width: 240px" rows="4"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="照片">
|
||||
<el-upload
|
||||
|
|
@ -652,21 +539,9 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
style="
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<el-button type="primary" size="mini" :disabled="flagSave" @click="saveNumAll"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button type="normal" size="mini" @click="saveCancelAll"
|
||||
>取消</el-button
|
||||
>
|
||||
<div style=" width: 100%; height: 50px; display: flex; justify-content: flex-end; align-items: center;">
|
||||
<el-button type="primary" size="mini" :disabled="flagSave" @click="saveNumAll">保存</el-button>
|
||||
<el-button type="normal" size="mini" @click="saveCancelAll">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
|
@ -706,8 +581,8 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
uploadKey: Date.now(),
|
||||
partItems: [{ partNum: "", partType: "", partId:null, storageNum:"" }],
|
||||
partItemsMiddle: [{ partName: "", partNum: "", partPrice: "0", partType: "" }],
|
||||
partItems: [{ partNum: "", partType: "0", partId:null, storageNum:"" }],
|
||||
partItemsMiddle: [{ partName: "", partNum: "", partPrice: "0", partType: "0" }],
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
|
|
@ -1081,9 +956,9 @@ export default {
|
|||
this.resetForm("formLeft");
|
||||
this.resetForm("formMiddle")
|
||||
this.resetForm("formRight")
|
||||
this.partItems = [{ partNum: "", partType: "", partId:null, storageNum:"" }],
|
||||
this.partItems = [{ partNum: "", partType: "0", partId:null, storageNum:"" }],
|
||||
this.partItemsMiddle= [
|
||||
{ partName: "", partNum: "", partPrice: "0", partType: "" },
|
||||
{ partName: "", partNum: "", partPrice: "0", partType: "0" },
|
||||
],
|
||||
this.openNum = true;
|
||||
});
|
||||
|
|
@ -1605,7 +1480,7 @@ export default {
|
|||
},
|
||||
//数量-左侧-内部维修-添加
|
||||
addPartItem() {
|
||||
this.partItems.push({ partNum: "", partType: "", partId:null, storageNum:"" });
|
||||
this.partItems.push({ partNum: "", partType: "0", partId:null, storageNum:"" });
|
||||
this.dividerHeight += 200; // 每次增加配件时,竖线高度增加
|
||||
},
|
||||
//数量-左侧-内部维修-删除
|
||||
|
|
@ -1617,7 +1492,7 @@ export default {
|
|||
},
|
||||
//数量管理中间-返厂维修-添加
|
||||
addPartItemMiddle() {
|
||||
this.partItemsMiddle.push({ partTypeName: "", partNum: "", partType: "" });
|
||||
this.partItemsMiddle.push({ partTypeName: "", partNum: "", partType: "0" });
|
||||
this.dividerHeight += 200; // 每次增加配件时,竖线高度增加
|
||||
},
|
||||
//数量管理中间-返厂维修-删除
|
||||
|
|
@ -1820,8 +1695,8 @@ export default {
|
|||
this.resetForm("formLeft");
|
||||
this.resetForm("formMiddle")
|
||||
this.resetForm("formRight")
|
||||
this.partItems = [{ partNum: "", partType: "", partId:null, storageNum:"" }],
|
||||
this.partItemsMiddle = [{ partName: "", partNum: "", partPrice: "0", partType: "" }],
|
||||
this.partItems = [{ partNum: "", partType: "0", partId:null, storageNum:"" }],
|
||||
this.partItemsMiddle = [{ partName: "", partNum: "", partPrice: "0", partType: "0" }],
|
||||
this.openNum=false;
|
||||
},
|
||||
//待维修数量限制统计
|
||||
|
|
@ -1846,45 +1721,45 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
//隐藏图片上传框的css
|
||||
::v-deep.disabled {
|
||||
.el-upload--picture-card {
|
||||
display: none;
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
.part-select {
|
||||
.el-cascader-panel .el-scrollbar .el-checkbox {
|
||||
display: none;
|
||||
//隐藏图片上传框的css
|
||||
::v-deep.disabled {
|
||||
.el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.part-select {
|
||||
.el-cascader-panel .el-scrollbar .el-checkbox {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.el-cascader-panel .el-scrollbar:nth-child(3) .el-checkbox {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
.dialog-content {
|
||||
height: 600px;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.el-cascader-panel .el-scrollbar:nth-child(3) .el-checkbox {
|
||||
display: block !important;
|
||||
.left,
|
||||
.middle,
|
||||
.right {
|
||||
flex: 1;
|
||||
padding: 10px 0;
|
||||
}
|
||||
}
|
||||
.dialog-content {
|
||||
height: 600px;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.left,
|
||||
.middle,
|
||||
.right {
|
||||
flex: 1;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.divider {
|
||||
width: 2px;
|
||||
background-color: #dcdfe6;
|
||||
height: 100%;
|
||||
margin: 0 10px;
|
||||
flex-shrink: 0; /* 防止竖线在内容较少时缩小 */
|
||||
}
|
||||
.divider {
|
||||
width: 2px;
|
||||
background-color: #dcdfe6;
|
||||
height: 100%;
|
||||
margin: 0 10px;
|
||||
flex-shrink: 0; /* 防止竖线在内容较少时缩小 */
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue