维修管理
This commit is contained in:
parent
8c5cf9aac4
commit
2a59185686
|
|
@ -54,3 +54,22 @@ export function saveCodeList(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//维修提交
|
||||||
|
export function sendList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/repair/endRepairTask',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//维修合格
|
||||||
|
export function auditPass(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/repair/completeRepair',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@
|
||||||
<el-button size="mini" type="warning" @click="handleRepair(scope.row)"
|
<el-button size="mini" type="warning" @click="handleRepair(scope.row)"
|
||||||
>维修</el-button
|
>维修</el-button
|
||||||
>
|
>
|
||||||
<el-button size="mini" type="success">合格</el-button>
|
<el-button size="mini" type="success" @click="handleAddSingle(scope.row)">合格</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -538,10 +538,10 @@
|
||||||
:inline="true"
|
:inline="true"
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
>
|
>
|
||||||
<el-form-item label="报废原因" prop="scrapReason">
|
<!-- <el-form-item label="报废原因" prop="scrapReason">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="scrapForm.scrapReason"
|
v-model="scrapForm.scrapReason"
|
||||||
placeholder="损坏原因"
|
placeholder="报废原因"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
style="width: 250px"
|
style="width: 250px"
|
||||||
|
|
@ -553,10 +553,10 @@
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="损坏原因" prop="damageReason">
|
<el-form-item label="损坏原因" prop="scrapType">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="scrapForm.damageReason"
|
v-model="scrapForm.scrapType"
|
||||||
placeholder="损坏原因"
|
placeholder="损坏原因"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
|
|
@ -570,22 +570,22 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="其他原因" prop="remark">
|
<el-form-item label="报废原因" prop="scrapReason">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="scrapForm.otherReason"
|
v-model="scrapForm.scrapReason"
|
||||||
placeholder="请输入其他原因"
|
placeholder="请输入报废原因"
|
||||||
clearable
|
clearable
|
||||||
maxlength="150"
|
maxlength="150"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
style="width: 250px"
|
style="width: 300px"
|
||||||
rows="4"
|
rows="4"
|
||||||
/>
|
>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item label="照片">
|
<el-form-item label="照片">
|
||||||
<el-upload
|
<el-upload
|
||||||
action="#"
|
action="#"
|
||||||
:limit="3"
|
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:show-file-list="true"
|
:show-file-list="true"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
|
|
@ -651,6 +651,7 @@
|
||||||
maxlength="20"
|
maxlength="20"
|
||||||
type="number"
|
type="number"
|
||||||
style="width: 265px"
|
style="width: 265px"
|
||||||
|
@input="waitRepairCount"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -750,6 +751,7 @@
|
||||||
maxlength="20"
|
maxlength="20"
|
||||||
type="number"
|
type="number"
|
||||||
style="width: 265px"
|
style="width: 265px"
|
||||||
|
@input="waitRepairCount"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -880,25 +882,10 @@
|
||||||
maxlength="20"
|
maxlength="20"
|
||||||
type="number"
|
type="number"
|
||||||
style="width: 250px"
|
style="width: 250px"
|
||||||
|
@input="waitRepairCount"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-form-item label="报废原因" prop="scrapReason">
|
|
||||||
<el-select
|
|
||||||
v-model="formRight.scrapReason"
|
|
||||||
placeholder="报废原因"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
style="width: 250px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in damageReasonList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="损坏原因" prop="scrapType">
|
<el-form-item label="损坏原因" prop="scrapType">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formRight.scrapType"
|
v-model="formRight.scrapType"
|
||||||
|
|
@ -915,35 +902,33 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="其他原因" prop="otherReason">
|
<el-form-item label="报废原因" prop="scrapReason">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="formRight.otherReason"
|
v-model="formRight.scrapReason"
|
||||||
placeholder="请输入其他原因"
|
placeholder="请输入报废原因"
|
||||||
clearable
|
clearable
|
||||||
maxlength="150"
|
maxlength="150"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
style="width: 300px"
|
style="width: 300px"
|
||||||
rows="4"
|
rows="4"
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="照片" prop="picture">
|
|
||||||
<el-upload
|
|
||||||
ref="upload"
|
|
||||||
:limit="1"
|
|
||||||
:headers="upload.headers"
|
|
||||||
drag
|
|
||||||
:action="upload.url"
|
|
||||||
:show-file-list="false"
|
|
||||||
accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
|
||||||
:on-success="handleFileSuccess3"
|
|
||||||
:auto-upload="true"
|
|
||||||
style="margin-left: 100px"
|
|
||||||
>
|
>
|
||||||
<i class="el-icon-upload"></i>
|
</el-input>
|
||||||
<div class="el-upload__text">
|
</el-form-item>
|
||||||
将文件拖到此处,或<em>点击上传</em>
|
<el-form-item label="照片">
|
||||||
</div>
|
<el-upload
|
||||||
<!-- <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div> -->
|
action="#"
|
||||||
|
:file-list="fileList"
|
||||||
|
:show-file-list="true"
|
||||||
|
:auto-upload="false"
|
||||||
|
:key="uploadKey"
|
||||||
|
list-type="picture-card"
|
||||||
|
accept=".png, .jpg, .jpeg"
|
||||||
|
:on-change="handleChange"
|
||||||
|
:class="{ disabled: uploadDisabled }"
|
||||||
|
:on-preview="picturePreview"
|
||||||
|
:on-remove="handleRemove"
|
||||||
|
>
|
||||||
|
<i class="el-icon-plus avatar-uploader-icon"></i>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -959,7 +944,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<el-button type="primary" size="mini" @click="saveNumAll"
|
<el-button type="primary" size="mini" :disabled="flagSave" @click="saveNumAll"
|
||||||
>保存</el-button
|
>保存</el-button
|
||||||
>
|
>
|
||||||
<el-button type="normal" size="mini" @click="saveCancelAll"
|
<el-button type="normal" size="mini" @click="saveCancelAll"
|
||||||
|
|
@ -981,6 +966,7 @@ import {
|
||||||
getAppRepairMaTypeList,
|
getAppRepairMaTypeList,
|
||||||
partTypeTreeList,
|
partTypeTreeList,
|
||||||
saveCodeList,
|
saveCodeList,
|
||||||
|
auditPass,
|
||||||
} from "@/api/repair/repair.js";
|
} from "@/api/repair/repair.js";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
@ -1013,7 +999,7 @@ export default {
|
||||||
uploadKey: Date.now(),
|
uploadKey: Date.now(),
|
||||||
partItems: [{ partType: "", partNum: "", isCharge: "" }],
|
partItems: [{ partType: "", partNum: "", isCharge: "" }],
|
||||||
partItemsMiddle: [
|
partItemsMiddle: [
|
||||||
{ partName: "", partNum: "", partPrice: "", isCharge: "" },
|
{ partName: "", partNum: "", partPrice: "0", isCharge: "" },
|
||||||
],
|
],
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|
@ -1115,8 +1101,8 @@ export default {
|
||||||
fileUrl: "",
|
fileUrl: "",
|
||||||
},
|
},
|
||||||
damageReasonList: [
|
damageReasonList: [
|
||||||
{ label: "自然损坏", id: "自然损坏" },
|
{ label: "自然损坏", id: 0 },
|
||||||
{ label: "人为损坏", id: "人为损坏" },
|
{ label: "人为损坏", id: 1 },
|
||||||
], //自然损坏、人为损坏
|
], //自然损坏、人为损坏
|
||||||
scrapRules: {},
|
scrapRules: {},
|
||||||
//树状勾选
|
//树状勾选
|
||||||
|
|
@ -1137,17 +1123,105 @@ export default {
|
||||||
//数量维修
|
//数量维修
|
||||||
openNum: false,
|
openNum: false,
|
||||||
partTypeTreeTwo: [],
|
partTypeTreeTwo: [],
|
||||||
formLeft: {},
|
|
||||||
formMiddle: {},
|
//数量维修三部分
|
||||||
formRight:{},
|
formLeft: {
|
||||||
rulesLeft: {},
|
repairNum:0
|
||||||
rulesMiddle: {},
|
},
|
||||||
rulesRight: {},
|
formMiddle: {
|
||||||
|
repairNum:0
|
||||||
|
},
|
||||||
|
formRight:{
|
||||||
|
scrapNum:0
|
||||||
|
},
|
||||||
|
|
||||||
|
rulesLeft: {
|
||||||
|
repairNum: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入内部维修数量",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
rulesMiddle: {
|
||||||
|
repairNum: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入返厂维修数量",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
partPrice: [
|
||||||
|
{
|
||||||
|
required: false,
|
||||||
|
message: "请输入金额",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// validator: (rule, value, callback) => {
|
||||||
|
// const regex = /^[+-]?(0|[1-9]\d*)(\.\d+)?$/;
|
||||||
|
// if(!regex.test(value)){
|
||||||
|
// return callback(new Error('请勿输入非数字'));
|
||||||
|
// }
|
||||||
|
// const pat = parseFloat(value);
|
||||||
|
// console.log('pat',pat)
|
||||||
|
// if(pat.toString().includes('.')==true){
|
||||||
|
// if (pat <0 ||pat.toString().split(".")[1].length>6) {
|
||||||
|
// callback(new Error('请必须输入大于0的数据且小数点后最多保留六位'));
|
||||||
|
// } else {
|
||||||
|
// callback();
|
||||||
|
// }
|
||||||
|
// }else{
|
||||||
|
// if (pat<0) {
|
||||||
|
// callback(new Error('请必须输入大于0的数据且小数点后最多保留六位'));
|
||||||
|
// }else{
|
||||||
|
// callback();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// trigger: 'blur'
|
||||||
|
// }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
rulesRight: {
|
||||||
|
scrapNum: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入返厂维修数量",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
scrapType: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择损坏原因",
|
||||||
|
trigger: "change",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
scrapReason: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入报废原因",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
//文件数组
|
||||||
fileList: [],
|
fileList: [],
|
||||||
|
//暂存的文件数组
|
||||||
|
fileListTemp:[],
|
||||||
|
|
||||||
typeTemp: "",
|
typeTemp: "",
|
||||||
typeNameTemp: "",
|
typeNameTemp: "",
|
||||||
typeeTmp: "",
|
//待维修数量
|
||||||
disrepairNumTemp: undefined,
|
disrepairNumTemp: undefined,
|
||||||
|
//数量维修是否能保存
|
||||||
|
flagSave: false,
|
||||||
|
//合格勾选对象数组
|
||||||
|
idsList:[],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -1193,31 +1267,42 @@ export default {
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.queryParams.equipmentList = selection;
|
this.queryParams.equipmentList = selection;
|
||||||
|
this.idsList = [];
|
||||||
|
this.ids = selection.map((item) => item.id);
|
||||||
|
selection.forEach((item) => {
|
||||||
|
this.idsList.push(item.id);
|
||||||
|
});
|
||||||
|
this.single = selection.length != 1;
|
||||||
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
/** 批量合格按钮操作 */
|
/** 批量合格按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
if (this.queryParams.equipmentList.length == 0) {
|
if (this.ids.length == 0) {
|
||||||
this.$message.error("请先勾选数据");
|
this.$alert("请至少勾选一条数据", "提示", {
|
||||||
return;
|
type: "warning",
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
auditPass(this.idsList).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess("通过成功");
|
||||||
}
|
}
|
||||||
console.log(this.queryParams);
|
});
|
||||||
// this.queryParams.backApplyInfo = {
|
}
|
||||||
// remark: this.queryParams.remark,
|
},
|
||||||
// agreementId: this.queryParams.agreementId,
|
//单个合格按钮操作
|
||||||
// backTime: this.queryParams.backTime,
|
handleAddSingle(row){
|
||||||
// }
|
const ids = [];
|
||||||
// let params = {
|
ids.push(row.id);
|
||||||
// backApplyInfo: this.queryParams.backApplyInfo,
|
this.$modal
|
||||||
// backApplyDetailsList:
|
.confirm("是否确认合格所选择的数据项?")
|
||||||
// this.queryParams.equipmentList,
|
.then(function () {
|
||||||
// }
|
return auditPass(ids);
|
||||||
// const res = await editBackApply(params)
|
})
|
||||||
// if (res.code == 200) {
|
.then(() => {
|
||||||
// this.$message({ type: 'success', message: res.msg })
|
this.$modal.msgSuccess("合格成功");
|
||||||
// setTimeout(() => {
|
})
|
||||||
// this.$emit('goBackPage')
|
.catch(() => {});
|
||||||
// }, 1000)
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
//是否可用勾选框
|
//是否可用勾选框
|
||||||
selectable(row) {
|
selectable(row) {
|
||||||
|
|
@ -1287,43 +1372,6 @@ export default {
|
||||||
this.openNum = true;
|
this.openNum = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// this.repairRowData = row;
|
|
||||||
// this.repairDeviceList = [];
|
|
||||||
// this.repairRowData.repairDeviceList = [
|
|
||||||
// {
|
|
||||||
// materialName: "速差自控器",
|
|
||||||
// typeName: "G-J-10",
|
|
||||||
// maId: "1",
|
|
||||||
// maCode: "W202407-00001",
|
|
||||||
// maStatus: "待修",
|
|
||||||
// apDetection: "",
|
|
||||||
// partTableList: [],
|
|
||||||
// backTableList: [],
|
|
||||||
// bmFileInfos: [],
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// materialName: "速差自控器",
|
|
||||||
// typeName: "G-J-10",
|
|
||||||
// maId: "2",
|
|
||||||
// maCode: "W202407-00002",
|
|
||||||
// maStatus: "待修",
|
|
||||||
// apDetection: "",
|
|
||||||
// partTableList: [],
|
|
||||||
// backTableList: [],
|
|
||||||
// bmFileInfos: [],
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// materialName: "速差自控器",
|
|
||||||
// typeName: "G-J-10",
|
|
||||||
// maId: "3",
|
|
||||||
// maCode: "W202407-00003",
|
|
||||||
// maStatus: "待修",
|
|
||||||
// apDetection: "",
|
|
||||||
// partTableList: [],
|
|
||||||
// backTableList: [],
|
|
||||||
// bmFileInfos: [],
|
|
||||||
// },
|
|
||||||
// ];
|
|
||||||
if (
|
if (
|
||||||
this.repairRowData.repairDeviceList &&
|
this.repairRowData.repairDeviceList &&
|
||||||
this.repairRowData.repairDeviceList.length > 0
|
this.repairRowData.repairDeviceList.length > 0
|
||||||
|
|
@ -1341,12 +1389,12 @@ export default {
|
||||||
},
|
},
|
||||||
// 编码维修弹窗保存
|
// 编码维修弹窗保存
|
||||||
saveCodeDialog() {
|
saveCodeDialog() {
|
||||||
console.log(this.repairRowData);
|
|
||||||
console.log(this.repairDeviceList);
|
|
||||||
this.repairRowData.repairDeviceList = this.repairDeviceList;
|
this.repairRowData.repairDeviceList = this.repairDeviceList;
|
||||||
saveCodeList(this.repairRowData.repairDeviceList).then((response) => {
|
saveCodeList(this.repairRowData.repairDeviceList).then((response) => {
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("保存成功");
|
this.$modal.msgSuccess("保存成功");
|
||||||
|
this.fileList = [];
|
||||||
|
this.fileListTemp = [];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.openCode = false;
|
this.openCode = false;
|
||||||
|
|
@ -1397,8 +1445,6 @@ export default {
|
||||||
},
|
},
|
||||||
// 图片上传
|
// 图片上传
|
||||||
handleChange(file, fileList) {
|
handleChange(file, fileList) {
|
||||||
console.log(file);
|
|
||||||
console.log(fileList);
|
|
||||||
if (this.beforeUpload(file) == false) {
|
if (this.beforeUpload(file) == false) {
|
||||||
fileList.splice(fileList.length - 1, 1);
|
fileList.splice(fileList.length - 1, 1);
|
||||||
}
|
}
|
||||||
|
|
@ -1429,25 +1475,66 @@ export default {
|
||||||
});
|
});
|
||||||
this.fileList.splice(sum, 1);
|
this.fileList.splice(sum, 1);
|
||||||
},
|
},
|
||||||
// 保存按钮
|
// 待报废保存按钮
|
||||||
saveSubmit() {
|
async saveSubmit() {
|
||||||
this.uploadKey = Date.now();
|
this.uploadKey = Date.now();
|
||||||
scrapRowData;
|
if(this.fileList.length!=0){
|
||||||
|
await this.getImaUpload(),
|
||||||
|
await this.addWaitRepairPic(this.scrapForm);
|
||||||
|
}else{
|
||||||
|
await this.addWaitRepairPic(this.scrapForm);
|
||||||
|
}
|
||||||
|
this.scrapRowData.repairType = 3
|
||||||
|
this.scrapRowData.codeScrapRepairPartList.push(this.scrapForm)
|
||||||
|
|
||||||
this.openScrap = false;
|
this.openScrap = false;
|
||||||
this.fileList = [];
|
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
// 取消按钮
|
//上传文件库
|
||||||
|
async getImaUpload(){
|
||||||
|
this.fileListTemp = [];
|
||||||
|
const reqData = new FormData()
|
||||||
|
const {fileTwo} = await this.getFileData()
|
||||||
|
let res = await imgUpLoadThree(fileTwo);
|
||||||
|
console.log('res',res)
|
||||||
|
if (res.code === 200) {
|
||||||
|
res.data.forEach(item=>{
|
||||||
|
let objTwo = { 'name': item.name, 'url': item.url,};
|
||||||
|
this.fileListTemp.push(objTwo);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError(res.msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
//提交时循环fileList 获取raw文件
|
||||||
|
async getFileData() {
|
||||||
|
const fileTwo = []
|
||||||
|
this.fileList.forEach(item => {
|
||||||
|
if (item?.hasOwnProperty('raw')) {
|
||||||
|
fileTwo.push(item.raw)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return { fileTwo }
|
||||||
|
},
|
||||||
|
|
||||||
|
async addWaitRepairPic(scrapForm){
|
||||||
|
this.scrapForm.fileList=this.fileListTemp
|
||||||
|
this.openScrap = false;
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
// 待报废取消按钮
|
||||||
saveCancel() {
|
saveCancel() {
|
||||||
this.uploadKey = Date.now();
|
this.uploadKey = Date.now();
|
||||||
this.openScrap = false;
|
this.openScrap = false;
|
||||||
this.fileList = [];
|
this.fileList = [];
|
||||||
this.reset();
|
this.fileListTemp = [];
|
||||||
|
this.resetForm("scrapForm");
|
||||||
},
|
},
|
||||||
|
|
||||||
//内部维修
|
//内部维修
|
||||||
openInnerDialog(row) {
|
openInnerDialog(row) {
|
||||||
console.log("index", row.index);
|
|
||||||
console.log("index2", row);
|
|
||||||
this.innerRowData = row;
|
this.innerRowData = row;
|
||||||
this.partTableList = [];
|
this.partTableList = [];
|
||||||
if (
|
if (
|
||||||
|
|
@ -1558,8 +1645,6 @@ export default {
|
||||||
},
|
},
|
||||||
//内部维修- 弹窗保存
|
//内部维修- 弹窗保存
|
||||||
saveInnerDialog() {
|
saveInnerDialog() {
|
||||||
console.log(this.innerRowData);
|
|
||||||
console.log(this.partTableList);
|
|
||||||
const isNum = this.partTableList.some(
|
const isNum = this.partTableList.some(
|
||||||
(item) => item.partNum == 0 || item.partNum == undefined
|
(item) => item.partNum == 0 || item.partNum == undefined
|
||||||
);
|
);
|
||||||
|
|
@ -1619,8 +1704,6 @@ export default {
|
||||||
},
|
},
|
||||||
//返场维修- 弹窗保存
|
//返场维修- 弹窗保存
|
||||||
saveBackDialog() {
|
saveBackDialog() {
|
||||||
console.log(this.backRowData);
|
|
||||||
console.log(this.backTableList);
|
|
||||||
if (this.backTableList.length > 0) {
|
if (this.backTableList.length > 0) {
|
||||||
this.$refs["backForm"].validate((valid) => {
|
this.$refs["backForm"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
@ -1672,11 +1755,7 @@ export default {
|
||||||
// 待报废-打开
|
// 待报废-打开
|
||||||
openScrapDialog(row) {
|
openScrapDialog(row) {
|
||||||
this.scrapRowData = row;
|
this.scrapRowData = row;
|
||||||
// if(this.scrapRowData.backTableList&&this.scrapRowData.backTableList.length>0){
|
|
||||||
// this.scrapForm = this.scrapRowData.scrapForm;
|
|
||||||
// }else{
|
|
||||||
this.scrapForm = {};
|
this.scrapForm = {};
|
||||||
// }
|
|
||||||
this.openScrap = true;
|
this.openScrap = true;
|
||||||
},
|
},
|
||||||
// 待报废弹窗文件上传成功处理-编码弹窗上传
|
// 待报废弹窗文件上传成功处理-编码弹窗上传
|
||||||
|
|
@ -1716,6 +1795,8 @@ export default {
|
||||||
|
|
||||||
//数量管理保存
|
//数量管理保存
|
||||||
saveNumAll() {
|
saveNumAll() {
|
||||||
|
this.$refs["formLeft","formMiddle","formRight"].validate(async(valid)=>{
|
||||||
|
if(valid){
|
||||||
for (let i = 0; i < this.partItems.length; i++) {
|
for (let i = 0; i < this.partItems.length; i++) {
|
||||||
this.innerRowData.repairDeviceList[0].numberInRepairPartList.push({
|
this.innerRowData.repairDeviceList[0].numberInRepairPartList.push({
|
||||||
isCharge: this.partItems[i].isCharge,
|
isCharge: this.partItems[i].isCharge,
|
||||||
|
|
@ -1734,25 +1815,48 @@ export default {
|
||||||
repairNum: this.formMiddle.repairNum,
|
repairNum: this.formMiddle.repairNum,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.innerRowData.repairDeviceList[0].numberScrapRepairPartList.push({
|
this.uploadKey = Date.now();
|
||||||
scrapReason: this.formRight.scrapReason,
|
if(this.fileList.length!=0){
|
||||||
scrapNum: this.formRight.scrapNum,
|
await this.getImaUpload(),
|
||||||
scrapType: this.formRight.scrapType,
|
this.formRight.fileList = this.fileListTemp;
|
||||||
otherReason: this.formRight.otherReason,
|
}else{
|
||||||
})
|
this.formRight.fileList = this.fileListTemp;
|
||||||
|
}
|
||||||
|
console.log('this.formRight',this.formRight)
|
||||||
|
this.innerRowData.repairDeviceList[0].numberScrapRepairPartList.push(this.formRight)
|
||||||
this.innerRowData.repairDeviceList[0].repairType = 1;
|
this.innerRowData.repairDeviceList[0].repairType = 1;
|
||||||
saveCodeList(this.innerRowData.repairDeviceList).then((response) => {
|
saveCodeList(this.innerRowData.repairDeviceList).then((response) => {
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
this.$modal.msgSuccess("保存成功");
|
this.$modal.msgSuccess("保存成功");
|
||||||
|
this.fileList=[];
|
||||||
|
this.fileListTemp=[];
|
||||||
this.openNum=false;
|
this.openNum=false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//数量管理取消
|
//数量管理取消
|
||||||
saveCancelAll(){
|
saveCancelAll(){
|
||||||
|
this.fileList=[];
|
||||||
|
this.fileListTemp=[];
|
||||||
this.openNum=false;
|
this.openNum=false;
|
||||||
|
},
|
||||||
|
|
||||||
|
//待维修数量限制统计
|
||||||
|
waitRepairCount(){
|
||||||
|
console.log('this.formLeft.repairNum',this.formLeft.repairNum)
|
||||||
|
console.log('this.formMiddle.repairNum',this.formMiddle.repairNum)
|
||||||
|
console.log('this.formRight.scrapNum',this.formRight.scrapNum)
|
||||||
|
console.log('this.disrepairNumTemp',this.disrepairNumTemp)
|
||||||
|
if((Number(this.formLeft.repairNum) + Number(this.formMiddle.repairNum)+ Number(this.formRight.scrapNum)) >this.disrepairNumTemp){
|
||||||
|
this.flagSave = true;
|
||||||
|
this.$message.error("输入的数字之和大于"+this.disrepairNumTemp);
|
||||||
|
}else{
|
||||||
|
this.flagSave = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,8 @@
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.back_task_status"
|
v-for="dict in dict.type.repair_task_status"
|
||||||
|
v-if="dict.value == 0 || dict.value == 1 || dict.value == 2"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
|
|
@ -60,7 +61,7 @@
|
||||||
<el-button type="primary" plain size="mini" @click="handleAdd">新增</el-button>
|
<el-button type="primary" plain size="mini" @click="handleAdd">新增</el-button>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain size="mini">提交</el-button>
|
<el-button type="warning" plain size="mini" @click="handleSend">提交</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain size="mini" @click="handleReject">退回</el-button>
|
<el-button type="danger" plain size="mini" @click="handleReject">退回</el-button>
|
||||||
|
|
@ -89,15 +90,15 @@
|
||||||
<el-table-column label="创建人" align="center" prop="createName" :show-overflow-tooltip="true"/>
|
<el-table-column label="创建人" align="center" prop="createName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
|
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="状态" align="center" :show-overflow-tooltip="true" prop="repairStatusCode">
|
<el-table-column label="状态" align="center" :show-overflow-tooltip="true" prop="repairStatusCode">
|
||||||
<!-- <template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.back_task_status" :value="scope.row.repairStatusCode"/>
|
<dict-tag :options="dict.type.repair_task_status" :value="scope.row.repairStatusCode"/>
|
||||||
</template> -->
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
|
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" plain icon="el-icon-zoom-in" @click="handleSee(scope.row)" >查看</el-button>
|
<el-button size="mini" plain icon="el-icon-zoom-in" @click="handleSee(scope.row)" >查看</el-button>
|
||||||
<el-button size="mini" type="primary" plain icon="el-icon-edit" @click="handleUpdate(scope.row)">维修</el-button>
|
<el-button size="mini" type="primary" plain icon="el-icon-edit" v-if="scope.row.repairStatusCode!='1'" @click="handleUpdate(scope.row)">维修</el-button>
|
||||||
<el-button size="mini" type="danger" icon="el-icon-delete" @click="handleReject(scope.row)">驳回</el-button>
|
<el-button size="mini" type="danger" icon="el-icon-delete" @click="handleReject(scope.row)">驳回</el-button>
|
||||||
<el-button size="mini" type="success" @click="handlePrint(scope.row)">维修任务单</el-button>
|
<el-button size="mini" type="success" @click="handlePrint(scope.row)">维修任务单</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -341,7 +342,8 @@
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getRepairTaskList,
|
getRepairTaskList,
|
||||||
rejectRepair
|
rejectRepair,
|
||||||
|
sendList,
|
||||||
} from '@/api/repair/repair.js'
|
} from '@/api/repair/repair.js'
|
||||||
|
|
||||||
import { getInfo, h } from '@/api/login'
|
import { getInfo, h } from '@/api/login'
|
||||||
|
|
@ -349,7 +351,7 @@ import {
|
||||||
import vueEasyPrint from "vue-easy-print";
|
import vueEasyPrint from "vue-easy-print";
|
||||||
export default {
|
export default {
|
||||||
name: '',
|
name: '',
|
||||||
dicts: ['back_task_status'],
|
dicts: ['repair_task_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
type: '',
|
type: '',
|
||||||
|
|
@ -392,6 +394,10 @@ export default {
|
||||||
proList: [],
|
proList: [],
|
||||||
//维修单显示
|
//维修单显示
|
||||||
openPrint:false,
|
openPrint:false,
|
||||||
|
printData: {},
|
||||||
|
//选择的taskId数组
|
||||||
|
ids:[],
|
||||||
|
taskList:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -438,12 +444,12 @@ export default {
|
||||||
this.$refs.queryForm.resetFields()
|
this.$refs.queryForm.resetFields()
|
||||||
this.handleQuery()
|
this.handleQuery()
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// // 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
// handleSelectionChange(selection) {
|
||||||
this.ids = selection.map((item) => item.taskId)
|
// this.ids = selection.map((item) => item.taskId)
|
||||||
this.single = selection.length != 1
|
// this.single = selection.length != 1
|
||||||
this.multiple = !selection.length
|
// this.multiple = !selection.length
|
||||||
},
|
// },
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$emit('handelAdd')
|
this.$emit('handelAdd')
|
||||||
|
|
@ -484,7 +490,34 @@ export default {
|
||||||
this.openPrint = true;
|
this.openPrint = true;
|
||||||
this.title = "机具设备维修任务单";
|
this.title = "机具设备维修任务单";
|
||||||
},
|
},
|
||||||
|
//提交
|
||||||
|
handleSend(row){
|
||||||
|
if (this.ids.length == 0) {
|
||||||
|
this.$alert("请至少勾选一条要提交的数据", "提示", {
|
||||||
|
type: "warning",
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
sendList(this.taskList).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess("通过成功");
|
||||||
|
}
|
||||||
|
this.getList()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.taskList = [];
|
||||||
|
this.ids = selection.map((item) => item.taskId);
|
||||||
|
selection.forEach((item) => {
|
||||||
|
this.taskList.push({ taskId: item.taskId });
|
||||||
|
});
|
||||||
|
this.single = selection.length != 1;
|
||||||
|
this.multiple = !selection.length;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue