以大代小,维修导入,费用补录
This commit is contained in:
parent
32b343b1cb
commit
7f34405115
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
},
|
||||
/** 单个导出 */
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
// }
|
||||
// }
|
||||
|
||||
// 检查deviceType中是否已包含该typeId
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
// // 检查deviceType中是否已包含该typeId
|
||||
// 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) {
|
||||
// 如果是替换已有项,但deviceType中没有对应的typeId,则添加
|
||||
this.deviceType.push(path);
|
||||
}
|
||||
// if (path && !typeIdExistsInDeviceType) {
|
||||
// this.deviceType.push(path);
|
||||
// }
|
||||
// } else if (path && !typeIdExistsInDeviceType) {
|
||||
// // 如果是替换已有项,但deviceType中没有对应的typeId,则添加
|
||||
// this.deviceType.push(path);
|
||||
// }
|
||||
|
||||
// 强制更新propsKey以触发级联选择器重新渲染
|
||||
this.propsKey++;
|
||||
// this.propsKey++;
|
||||
})
|
||||
|
||||
} else {
|
||||
this.$message.error('文件上传失败');
|
||||
this.$message.error(response.msg);
|
||||
}
|
||||
},
|
||||
// 计算配件总价
|
||||
|
|
|
|||
Loading…
Reference in New Issue