以大代小,维修导入,费用补录

This commit is contained in:
hongchao 2025-11-19 10:52:24 +08:00
parent 32b343b1cb
commit 7f34405115
5 changed files with 52 additions and 59 deletions

View File

@ -1101,12 +1101,6 @@ export default {
// this.leaseApplyDetails = []
// }
},
//
async getMaTypeDataByIdFun(val) {
const res = await getMaTypeDataById({ id: val })
this.typeListDev = res.data
console.log('🚀 ~ getMaTypeDataByIdFun ~ res:', res)
},
//
changeType(e) {
// console.log('🚀 ~ changeType ~ e:', e)

View File

@ -439,9 +439,9 @@
<span>领料单位</span>{{ leaseOutData.unitName }}
</div>
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
<span>出库时间</span>
<span>出库时间</span>{{ formattedOutTime(item.date) }}
<!-- 添加精确到时分秒的日期选择器 -->
<el-date-picker
<!-- <el-date-picker
v-show="showSelect"
v-model="item.date"
type="datetime"
@ -452,7 +452,7 @@
:picker-options="{}"
/>
<span v-show="!showSelect" @click="showSelect = true" style="cursor: pointer">{{formattedOutTime(item.date)
}}</span>
}}</span> -->
<!-- <span>{{ date }}</span> -->
</div>
@ -708,10 +708,11 @@ export default {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
// const hours = String(date.getHours()).padStart(2, '0');
// const minutes = String(date.getMinutes()).padStart(2, '0');
// const seconds = String(date.getSeconds()).padStart(2, '0');
// return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
return `${year}-${month}-${day}`
},
generateUUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {

View File

@ -45,7 +45,7 @@
v-if="settleTableData_03.length > 0"
@handelSaveSuccess="handelSaveSuccess"
/>
<!-- <FinishTable
<FinishTable
:listType="3"
:isRepair="true"
:tableTitle="`设备维修清单`"
@ -55,7 +55,7 @@
:totalPrice="repairTotalPrice"
:tableColumns="repairTableColumns"
@onChangeRepairPrice="onChangeRepairPrice"
/> -->
/>
<FinishTable
:listType="4"
@handleExport="handleExport"
@ -251,7 +251,7 @@ export default {
this.settleTableData_01 = res.leaseListOne // 01
this.settleTableData_03 = res.leaseListThree // 03
this.repairTableData = res.repairList //
this.repairTableData = res.repairPartList //
this.noReturnTableData = res.loseList //
this.scrapTableData = res.scrapList //
this.stayScrapTableData = res.preScrapList //
@ -390,9 +390,7 @@ export default {
/** 全部导出 */
handleExportAll() {
for (let i = 1; i < 7; i++) {
if(i != 3){
this.handleExport(i)
}
this.handleExport(i)
}
},
/** 单个导出 */

View File

@ -13,13 +13,13 @@
@change="iptChange"
/>
</div>
<span class="repair-tip" v-if="isRepair">
<!-- <span class="repair-tip" v-if="isRepair">
{{
currRowInfo.isSlt == 0
? '勾选需要赔偿的维修项目'
: '已选的维修赔偿项目'
}}</span
>
> -->
<el-col :span="5" class="cost-bear">
<span v-if="isCostBear">{{
constBear === 1 ? '费用承担方01' : '费用承担方03'
@ -42,7 +42,7 @@
v-hasPermi="['cost:settlement:update']"
v-if="
isSettle == 0 &&
(isCostBear || (isRepair && currRowInfo.isSlt == 0)) &&
(isCostBear) &&
tableData.length > 0
"
@click="handleEdit"
@ -78,11 +78,11 @@
width="55"
align="center"
/>
<el-table-column
<!-- <el-table-column
type="selection"
v-if="isRepair && currRowInfo.isSlt == 0"
:selectable="() => !this.selDisabled"
/>
/> -->
<el-table-column
align="center"
width="55"

View File

@ -39,7 +39,7 @@
<el-input maxlength="50" v-model="repairParams.agreementCode" disabled style="width: 240px"></el-input>
</el-form-item>
<el-form-item label="规格型号" prop="equipmentId">
<!-- <el-form-item label="规格型号" prop="equipmentId">
<el-cascader
:key="propsKey"
v-model="deviceType"
@ -54,7 +54,7 @@
popper-class="popper-select"
@change="deviceTypeChange"
></el-cascader>
</el-form-item>
</el-form-item> -->
<el-form-item>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleSave">保存</el-button>
<el-button type="success" plain icon="el-icon-download" size="mini" @click="downloadModel">模板下载</el-button>
@ -700,52 +700,52 @@ export default {
partAllCosts: (partNum * partPrice).toFixed(2),
}
//
const path = this.getParentsById(this.equipmentTypeList, item.typeId);
// //
// const path = this.getParentsById(this.equipmentTypeList, item.typeId);
// typeId
// // typeId
let exists = false;
let typeIdExistsInDeviceType = false;
// let typeIdExistsInDeviceType = false;
// typeId
for (let i = 0; i < this.equipmentList.length; i++) {
if (this.equipmentList[i].typeId == item.typeId) {
//
this.equipmentList[i] = newItem;
exists = true;
break;
}
}
// // typeId
// for (let i = 0; i < this.equipmentList.length; i++) {
// if (this.equipmentList[i].typeId == item.typeId) {
// //
// this.equipmentList[i] = newItem;
// exists = true;
// break;
// }
// }
// deviceTypetypeId
if (path && path.length > 0) {
const targetTypeId = path[path.length - 1]; // typeId
for (let i = 0; i < this.deviceType.length; i++) {
if (this.deviceType[i][this.deviceType[i].length - 1] === targetTypeId) {
typeIdExistsInDeviceType = true;
break;
}
}
}
// // deviceTypetypeId
// if (path && path.length > 0) {
// const targetTypeId = path[path.length - 1]; // typeId
// for (let i = 0; i < this.deviceType.length; i++) {
// if (this.deviceType[i][this.deviceType[i].length - 1] === targetTypeId) {
// typeIdExistsInDeviceType = true;
// break;
// }
// }
// }
//
if (!exists) {
// if (!exists) {
this.equipmentList.push(newItem);
// deviceType
if (path && !typeIdExistsInDeviceType) {
this.deviceType.push(path);
}
} else if (path && !typeIdExistsInDeviceType) {
// deviceTypetypeId
this.deviceType.push(path);
}
// if (path && !typeIdExistsInDeviceType) {
// this.deviceType.push(path);
// }
// } else if (path && !typeIdExistsInDeviceType) {
// // deviceTypetypeId
// this.deviceType.push(path);
// }
// propsKey
this.propsKey++;
// this.propsKey++;
})
} else {
this.$message.error('文件上传失败');
this.$message.error(response.msg);
}
},
//