报表优化

yangwl
wws 12 months ago
parent 229540d1c1
commit b78a92af9f

@ -643,7 +643,6 @@ export default {
setWorkCenter() {
getWorkCenter().then(response => {
this.workCenterList = response.data;
console.log(this.workCenterList)
})
},
/** 查询计划工单列表 */
@ -732,8 +731,6 @@ export default {
const orderCode = row.orderCode || this.ids
getDeviceOrder(orderCode).then(response => {
this.form = response.data;
console.log("这里是回显信息")
console.log(response.data)
for (let i = 0; i < this.form.detailList.length; i++) {
for (let j = 0; j < this.form.detailList[i].standardList.length; j++) {
this.form.detailList[i].standardList[j].itemName = this.form.detailList[i].itemName;
@ -749,7 +746,6 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.orderId != null) {
console.log(this.form)
updateDeviceOrder(this.form).then(response => {
this.$modal.msgSuccess("提交成功");
this.open = false;

@ -782,8 +782,6 @@ export default {
},
//
changeArray(e) {
console.log(e)
console.log(this.form.planTimeArray)
if (this.form.planLoop == null) {
this.$message({
message: '请输入循环周期!',
@ -912,13 +910,6 @@ export default {
// -
editorTheItem(e) {
console.log('e')
console.log(e)
console.log("form")
console.log(this.form.equipmentItem)
console.log("长度")
console.log(this.form.equipmentItem.length)
//
this.itemDetailList = [];
@ -927,19 +918,12 @@ export default {
for (let i = 0; i < this.form.equipmentItem.length; i++) {
if (e.equipmentCode == this.form.equipmentItem[i].equipmentCode) {
console.log("一次")
console.log(e.equipmentCode == this.form.equipmentItem[i].equipmentCode)
console.log(e.equipmentCode)
console.log(this.form.equipmentItem[i].equipmentCode)
for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) {
//
var itemName = this.form.equipmentItem[i].equPlanDetailList[j].itemName;
console.log("长度")
console.log(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length)
for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++){
if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].showFlag == true) {
@ -949,7 +933,6 @@ export default {
}else {
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定量";
}
console.log(qw++)
this.itemDetailList.push(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k]);
}

@ -17,21 +17,23 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="单号" prop="orderCode">
<el-form-item label="单号" prop="orderCode">
<el-input
v-model="queryParams.orderCode"
placeholder="请输入单号"
placeholder="请输入单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="车间" prop="planWorkshop">
<el-input
v-model="queryParams.planWorkshop"
placeholder="请输入车间"
clearable
@keyup.enter.native="handleQuery"
/>
<el-form-item label="车间编码" prop="planWorkshop">
<el-select v-model="queryParams.planWorkshop" placeholder="请选择车间" clearable>
<el-option
v-for="work in workCenterList"
:key="work.factoryCode"
:label="work.factoryName"
:value="work.factoryCode"
/>
</el-select>
</el-form-item>
<el-form-item v-if="false" label="产线" prop="planProdLine">
<el-input
@ -41,6 +43,16 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="循环周期" prop="planLoop">
<el-select v-model="queryParams.planLoopType" placeholder="请选择循环周期" clearable>
<el-option
v-for="dict in dict.type.device_loop_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="false" label="循环周期" prop="planLoop">
<el-input
v-model="queryParams.planLoop"
@ -89,6 +101,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="equipmentCode">
<el-input
v-model="queryParams.equipmentName"
placeholder="请输入设备名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="工单费用" prop="orderCost">
<el-input
v-model="queryParams.orderCost"
@ -97,10 +117,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="责任人" prop="planPerson">
<el-form-item label="点检人" prop="planPerson">
<el-input
v-model="queryParams.planPerson"
placeholder="请输入责任人"
placeholder="请输入点检人"
clearable
@keyup.enter.native="handleQuery"
/>
@ -161,7 +181,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="createBy">
<el-form-item v-if="false" label="创建人" prop="createBy">
<el-input
v-model="queryParams.createBy"
placeholder="请输入创建人"
@ -169,7 +189,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-form-item v-if="false" label="创建时间" prop="createTime">
<el-date-picker clearable
v-model="queryParams.createTime"
type="date"
@ -177,7 +197,7 @@
placeholder="请选择创建时间">
</el-date-picker>
</el-form-item>
<el-form-item label="更新人" prop="updateBy">
<el-form-item v-if="false" label="更新人" prop="updateBy">
<el-input
v-model="queryParams.updateBy"
placeholder="请输入更新人"
@ -185,7 +205,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="更新时间" prop="updateTime">
<el-form-item v-if="false" label="更新时间" prop="updateTime">
<el-date-picker clearable
v-model="queryParams.updateTime"
type="date"
@ -193,6 +213,58 @@
placeholder="请选择更新时间">
</el-date-picker>
</el-form-item>
<el-form-item label-width="100px" label="循环范围开始" prop="planLoopStart">
<el-date-picker
v-model="queryParams.loopStartArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label-width="100px" label="循环范围结束" prop="planLoopEnd">
<el-date-picker
v-model="queryParams.loopEndArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label-width="100px" label="执行开始时间" prop="orderStart">
<el-date-picker
v-model="queryParams.orderStartArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label-width="100px" label="执行结束时间" prop="orderEnd">
<el-date-picker
v-model="queryParams.orderEndArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -249,59 +321,72 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table @cell-click="showWork" v-loading="loading" :data="inspectionWorkList">
<el-table-column v-if="false" label="主键" align="center" prop="orderId"/>
<el-table-column v-if="false" label="计划id" align="center" prop="planId"/>
<el-table-column label="计划编码" align="center" prop="planCode"/>
<el-table-column v-if="false" label="计划类型" align="center" prop="planType"/>
<el-table-column label="单号" align="center" prop="orderCode"/>
<el-table-column label="车间" align="center" prop="planWorkshop"/>
<el-table-column v-if="false" label="产线" align="center" prop="planProdLine"/>
<el-table-column label="循环周期" align="center" prop="planLoop"/>
<el-table-column label="循环周期类型" align="center" prop="planLoopType"/>
<el-table-column label="循环执行时间开始" align="center" prop="planLoopStart" width="180">
<el-table v-loading="loading" :data="inspectionWorkList">
<el-table-column v-if="false" label="主键" align="center" prop="orderId" />
<el-table-column v-if="false" label="计划id" align="center" prop="planId" />
<el-table-column width="150" label="计划编码" align="center" prop="planCode" />
<el-table-column v-if="false" label="计划类型" align="center" prop="planType" />
<el-table-column width="150" label="巡检单号" align="center" prop="orderCode" >
<template slot-scope="scope">
<el-button
type="text"
@click="showWork(scope.row)"
>{{ scope.row.orderCode }}</el-button
>
</template>
</el-table-column>
<el-table-column label="车间编码" align="center" prop="planWorkshop" />
<el-table-column width="150" label="车间" align="center" prop="workCenterName"/>
<el-table-column v-if="false" label="产线" align="center" prop="planProdLine" />
<el-table-column label="循环周期" align="center" prop="planLoop" />
<el-table-column width="120" label="循环周期类型" align="center" prop="planLoopType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.device_loop_type" :value="scope.row.planLoopType"/>
</template>
</el-table-column>
<el-table-column width="120" label="循环范围开始" align="center" prop="planLoopStart">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopStart, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="循环执行时间结束" align="center" prop="planLoopEnd" width="180">
<el-table-column width="120" label="循环范围结束" align="center" prop="planLoopEnd">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopEnd, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="实际开始时间" align="center" prop="orderStart" width="180">
<el-table-column width="120" label="执行开始时间" align="center" prop="orderStart">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderStart, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="实际结束时间" align="center" prop="orderEnd" width="180">
<el-table-column width="120" label="执行结束时间" align="center" prop="orderEnd">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderEnd, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="设备编码" align="center" prop="equipmentCode"/>
<el-table-column label="设备名称" align="center" prop="equipmentName"/>
<el-table-column label="工单状态" align="center" prop="orderStatus">
<el-table-column width="100" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column width="120" label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="工单状态" align="center" prop="orderStatus" >
<template slot-scope="scope">
<dict-tag :options="dict.type.device_order_status" :value="scope.row.orderStatus"/>
</template>
</el-table-column>
<el-table-column v-if="false" label="工单费用" align="center" prop="orderCost"/>
<el-table-column label="责任人" align="center" prop="planPerson"/>
<el-table-column v-if="false" label="工单用时" align="center" prop="orderCostTime"/>
<el-table-column v-if="false" label="签字" align="center" prop="orderSignPerson"/>
<el-table-column v-if="false" label="工厂" align="center" prop="factoryCode"/>
<el-table-column v-if="false" label="备用字段1" align="center" prop="attr1"/>
<el-table-column v-if="false" label="备用字段2" align="center" prop="attr2"/>
<el-table-column v-if="false" label="备用字段3" align="center" prop="attr3"/>
<el-table-column v-if="false" label="删除标志" align="center" prop="delFlag"/>
<el-table-column label="创建人" align="center" prop="createBy"/>
<el-table-column v-if="false" label="工单费用" align="center" prop="orderCost" />
<el-table-column label="巡检人" align="center" prop="planPerson" />
<el-table-column v-if="false" label="工单用时" align="center" prop="orderCostTime" />
<el-table-column v-if="false" label="签字" align="center" prop="orderSignPerson" />
<el-table-column v-if="false" label="工厂" align="center" prop="factoryCode" />
<el-table-column v-if="false" label="备用字段1" align="center" prop="attr1" />
<el-table-column v-if="false" label="备用字段2" align="center" prop="attr2" />
<el-table-column v-if="false" label="备用字段3" align="center" prop="attr3" />
<el-table-column v-if="false" label="删除标志" align="center" prop="delFlag" />
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updateBy"/>
<el-table-column label="更新人" align="center" prop="updateBy" />
<el-table-column label="更新时间" align="center" prop="updateTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
@ -435,6 +520,8 @@ import {
addInspectionWork,
updateInspectionWork
} from "@/api/device/inspectionWork";
import {listDeviceOrder} from "@/api/device/deviceOrder";
import {getWorkCenter} from "@/api/device/plan";
export default {
name: "InspectionWork",
@ -442,6 +529,34 @@ export default {
data() {
return {
test: false,
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
// VO
workVO: {
order: {
@ -503,7 +618,7 @@ export default {
orderStart: null,
orderEnd: null,
equipmentCode: null,
orderStatus: null,
orderStatus: '1',
orderCost: null,
planPerson: null,
orderCostTime: null,
@ -516,7 +631,11 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
loopStartArray: [],
orderStartArray: [],
orderEndArray: [],
loopEndArray: [],
},
//
form: {},
@ -525,18 +644,22 @@ export default {
};
},
created() {
this.setWorkCenter();
this.getList();
},
methods: {
//
setWorkCenter() {
getWorkCenter().then(response => {
this.workCenterList = response.data;
})
},
//
showWork(row) {
console.log("测试成功")
console.log(row)
this.reset();
const orderId = row.orderId || this.ids
getInspectionWork(orderId).then(response => {
this.workVO = response.data;
console.log(this.workVO);
this.workDetail = true;
});
@ -544,7 +667,7 @@ export default {
/** 查询巡检记录列表 */
getList() {
this.loading = true;
listInspectionWork(this.queryParams).then(response => {
listDeviceOrder(this.queryParams).then(response => {
this.inspectionWorkList = response.rows;
this.total = response.total;
this.loading = false;
@ -572,7 +695,7 @@ export default {
orderStart: null,
orderEnd: null,
equipmentCode: null,
orderStatus: null,
orderStatus: '1',
orderCost: null,
planPerson: null,
orderCostTime: null,
@ -585,7 +708,11 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
loopStartArray: [],
orderStartArray: [],
orderEndArray: [],
loopEndArray: [],
};
this.resetForm("form");
},
@ -596,6 +723,10 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.loopStartArray = [];
this.queryParams.orderStartArray = [];
this.queryParams.orderEndArray = [];
this.queryParams.loopEndArray = [];
this.resetForm("queryForm");
this.handleQuery();
},

@ -17,21 +17,23 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="单号" prop="orderCode">
<el-form-item label="单号" prop="orderCode">
<el-input
v-model="queryParams.orderCode"
placeholder="请输入单号"
placeholder="请输入单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="车间" prop="planWorkshop">
<el-input
v-model="queryParams.planWorkshop"
placeholder="请输入车间"
clearable
@keyup.enter.native="handleQuery"
/>
<el-form-item label="车间编码" prop="planWorkshop">
<el-select v-model="queryParams.planWorkshop" placeholder="请选择车间" clearable>
<el-option
v-for="work in workCenterList"
:key="work.factoryCode"
:label="work.factoryName"
:value="work.factoryCode"
/>
</el-select>
</el-form-item>
<el-form-item v-if="false" label="产线" prop="planProdLine">
<el-input
@ -41,6 +43,16 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="循环周期" prop="planLoop">
<el-select v-model="queryParams.planLoopType" placeholder="请选择循环周期" clearable>
<el-option
v-for="dict in dict.type.device_loop_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="false" label="循环周期" prop="planLoop">
<el-input
v-model="queryParams.planLoop"
@ -89,6 +101,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="equipmentCode">
<el-input
v-model="queryParams.equipmentName"
placeholder="请输入设备名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="工单费用" prop="orderCost">
<el-input
v-model="queryParams.orderCost"
@ -97,10 +117,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="责任人" prop="planPerson">
<el-form-item label="点检人" prop="planPerson">
<el-input
v-model="queryParams.planPerson"
placeholder="请输入责任人"
placeholder="请输入点检人"
clearable
@keyup.enter.native="handleQuery"
/>
@ -161,7 +181,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="createBy">
<el-form-item v-if="false" label="创建人" prop="createBy">
<el-input
v-model="queryParams.createBy"
placeholder="请输入创建人"
@ -169,7 +189,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-form-item v-if="false" label="创建时间" prop="createTime">
<el-date-picker clearable
v-model="queryParams.createTime"
type="date"
@ -177,7 +197,7 @@
placeholder="请选择创建时间">
</el-date-picker>
</el-form-item>
<el-form-item label="更新人" prop="updateBy">
<el-form-item v-if="false" label="更新人" prop="updateBy">
<el-input
v-model="queryParams.updateBy"
placeholder="请输入更新人"
@ -185,7 +205,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="更新时间" prop="updateTime">
<el-form-item v-if="false" label="更新时间" prop="updateTime">
<el-date-picker clearable
v-model="queryParams.updateTime"
type="date"
@ -193,6 +213,78 @@
placeholder="请选择更新时间">
</el-date-picker>
</el-form-item>
<el-form-item label-width="100px" label="循环范围开始" prop="planLoopStart">
<el-date-picker
v-model="queryParams.loopStartArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label-width="100px" label="循环范围结束" prop="planLoopEnd">
<el-date-picker
v-model="queryParams.loopEndArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label-width="100px" label="执行开始时间" prop="orderStart">
<el-date-picker
v-model="queryParams.orderStartArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label-width="100px" label="执行结束时间" prop="orderEnd">
<el-date-picker
v-model="queryParams.orderEndArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label="保养类型" prop="upkeep">
<el-select v-model="queryParams.upkeep" placeholder="请选择保养类型" clearable>
<el-option
v-for="dict in dict.type.device_upkeep_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="检验状态" prop="orderInspect">
<el-select v-model="queryParams.orderInspect" placeholder="请选择保养类型" clearable>
<el-option
v-for="dict in dict.type.device_inspect_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -245,59 +337,82 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table @cell-click="showWork" v-loading="loading" :data="inspectionWorkList">
<el-table v-loading="loading" :data="inspectionWorkList">
<el-table-column v-if="false" label="主键" align="center" prop="orderId" />
<el-table-column v-if="false" label="计划id" align="center" prop="planId" />
<el-table-column label="计划编码" align="center" prop="planCode" />
<el-table-column width="150" label="计划编码" align="center" prop="planCode" />
<el-table-column v-if="false" label="计划类型" align="center" prop="planType" />
<el-table-column label="单号" align="center" prop="orderCode" />
<el-table-column label="车间" align="center" prop="planWorkshop" />
<el-table-column width="150" label="巡检单号" align="center" prop="orderCode" fixed>
<template slot-scope="scope">
<el-button
type="text"
@click="showWork(scope.row)"
>{{ scope.row.orderCode }}</el-button
>
</template>
</el-table-column>
<el-table-column label="车间编码" align="center" prop="planWorkshop" />
<el-table-column width="150" label="车间" align="center" prop="workCenterName"/>
<el-table-column v-if="false" label="产线" align="center" prop="planProdLine" />
<el-table-column label="循环周期" align="center" prop="planLoop" />
<el-table-column label="循环周期类型" align="center" prop="planLoopType" />
<el-table-column label="循环执行时间开始" align="center" prop="planLoopStart" width="180">
<el-table-column width="120" label="循环周期类型" align="center" prop="planLoopType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.device_loop_type" :value="scope.row.planLoopType"/>
</template>
</el-table-column>
<el-table-column width="120" label="循环范围开始" align="center" prop="planLoopStart">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopStart, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="循环执行时间结束" align="center" prop="planLoopEnd" width="180">
<el-table-column width="120" label="循环范围结束" align="center" prop="planLoopEnd">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopEnd, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="实际开始时间" align="center" prop="orderStart" width="180">
<el-table-column width="120" label="执行开始时间" align="center" prop="orderStart">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderStart, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="实际结束时间" align="center" prop="orderEnd" width="180">
<el-table-column width="120" label="执行结束时间" align="center" prop="orderEnd">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderEnd, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="设备编码" align="center" prop="equipmentCode" />
<el-table-column label="设备名称" align="center" prop="equipmentName" />
<el-table-column width="100" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column width="120" label="设备名称" align="center" prop="equipmentName" />
<el-table-column width="80" label="保养类型" align="center" prop="upkeep" >
<template slot-scope="scope">
<dict-tag :options="dict.type.device_upkeep_type" :value="scope.row.upkeep"/>
</template>
</el-table-column>
<el-table-column label="工单状态" align="center" prop="orderStatus" >
<template slot-scope="scope">
<dict-tag :options="dict.type.device_order_status" :value="scope.row.orderStatus"/>
</template>
</el-table-column>
<el-table-column v-if="false" label="工单费用" align="center" prop="orderCost" />
<el-table-column label="责任人" align="center" prop="planPerson" />
<el-table-column v-if="false" label="工单用时" align="center" prop="orderCostTime" />
<el-table-column v-if="false" label="签字" align="center" prop="orderSignPerson" />
<el-table-column v-if="false" label="工厂" align="center" prop="factoryCode" />
<el-table-column v-if="false" label="备用字段1" align="center" prop="attr1" />
<el-table-column v-if="false" label="备用字段2" align="center" prop="attr2" />
<el-table-column v-if="false" label="备用字段3" align="center" prop="attr3" />
<el-table-column v-if="false" label="删除标志" align="center" prop="delFlag" />
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="检验状态" align="center" prop="orderInspect">
<template slot-scope="scope">
<dict-tag :options="dict.type.device_inspect_status" :value="scope.row.orderInspect"/>
</template>
</el-table-column>
<el-table-column label="工单费用" align="center" prop="orderCost"/>
<el-table-column label="保养人" align="center" prop="planPerson"/>
<el-table-column label="工单用时" align="center" prop="orderCostTime"/>
<el-table-column v-if="false" label="签字" align="center" prop="orderSignPerson"/>
<el-table-column v-if="false" label="工厂" align="center" prop="factoryCode"/>
<el-table-column v-if="false" label="备用字段1" align="center" prop="attr1"/>
<el-table-column v-if="false" label="备用字段2" align="center" prop="attr2"/>
<el-table-column v-if="false" label="备用字段3" align="center" prop="attr3"/>
<el-table-column v-if="false" label="删除标志" align="center" prop="delFlag"/>
<el-table-column label="创建人" align="center" prop="createBy"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updateBy" />
<el-table-column label="更新人" align="center" prop="updateBy"/>
<el-table-column label="更新时间" align="center" prop="updateTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
@ -445,12 +560,42 @@
<script>
import { listInspectionWork, getInspectionWork, delInspectionWork, addInspectionWork, updateInspectionWork } from "@/api/device/inspectionWork";
import {listDeviceOrder} from "@/api/device/deviceOrder";
import {getWorkCenter} from "@/api/device/plan";
export default {
name: "InspectionWork",
dicts: ['device_order_status', 'device_loop_type'],
data() {
return {
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
// VO
workVO: {
order: {
@ -514,7 +659,7 @@ export default {
orderStart: null,
orderEnd: null,
equipmentCode: null,
orderStatus: null,
orderStatus: '1',
orderCost: null,
planPerson: null,
orderCostTime: null,
@ -527,7 +672,11 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
loopStartArray: [],
orderStartArray: [],
orderEndArray: [],
loopEndArray: [],
},
//
form: {},
@ -537,18 +686,22 @@ export default {
};
},
created() {
this.setWorkCenter();
this.getList();
},
methods: {
//
setWorkCenter() {
getWorkCenter().then(response => {
this.workCenterList = response.data;
})
},
//
showWork(row) {
console.log("测试成功")
console.log(row)
this.reset();
const orderId = row.orderId || this.ids
getInspectionWork(orderId).then(response => {
this.workVO = response.data;
console.log(this.workVO);
this.workDetail = true;
});
@ -556,7 +709,7 @@ export default {
/** 查询保养记录列表 */
getList() {
this.loading = true;
listInspectionWork(this.queryParams).then(response => {
listDeviceOrder(this.queryParams).then(response => {
this.inspectionWorkList = response.rows;
this.total = response.total;
this.loading = false;
@ -584,7 +737,7 @@ export default {
orderStart: null,
orderEnd: null,
equipmentCode: null,
orderStatus: null,
orderStatus: '1',
orderCost: null,
planPerson: null,
orderCostTime: null,
@ -597,7 +750,11 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
loopStartArray: [],
orderStartArray: [],
orderEndArray: [],
loopEndArray: [],
};
this.resetForm("form");
},

@ -822,7 +822,6 @@ export default {
setWorkCenter() {
getWorkCenter().then(response => {
this.workCenterList = response.data;
console.log(this.workCenterList)
})
},
//
@ -831,8 +830,6 @@ export default {
},
//
changeArray(e) {
console.log(e)
console.log(this.form.planTimeArray)
if (this.form.planLoop == null) {
this.$message({
message: '请输入循环周期!',
@ -950,10 +947,6 @@ export default {
},
//
delStandard(e) {
console.log("e")
console.log(e)
console.log("this")
console.log(this.itemDetailList)
e.showFlag = false;
for (let i = 0; i < this.itemDetailList.length; i++) {
if (this.itemDetailList[i].detailCode == e.detailCode) {
@ -965,13 +958,6 @@ export default {
// -
editorTheItem(e) {
console.log('e')
console.log(e)
console.log("form")
console.log(this.form.equipmentItem)
console.log("长度")
console.log(this.form.equipmentItem.length)
//
this.itemDetailList = [];
@ -980,19 +966,12 @@ export default {
for (let i = 0; i < this.form.equipmentItem.length; i++) {
if (e.equipmentCode == this.form.equipmentItem[i].equipmentCode) {
console.log("一次")
console.log(e.equipmentCode == this.form.equipmentItem[i].equipmentCode)
console.log(e.equipmentCode)
console.log(this.form.equipmentItem[i].equipmentCode)
for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) {
//
var itemName = this.form.equipmentItem[i].equPlanDetailList[j].itemName;
console.log("长度")
console.log(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length)
for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++){
if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].showFlag == true) {
@ -1002,7 +981,6 @@ export default {
}else {
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定量";
}
console.log(qw++)
this.itemDetailList.push(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k]);
}
@ -1191,8 +1169,6 @@ export default {
initUpdatePlanInfo(row).then(response => {
this.form = response.data;
console.log(response.data)
this.selectPersonList = response.data.personListVO;
for (let i = 0; i < this.form.equipmentItem.length; i++) {

@ -638,7 +638,6 @@ export default {
setWorkCenter() {
getWorkCenter().then(response => {
this.workCenterList = response.data;
console.log(this.workCenterList)
})
},
/** 查询点检工单列表 */
@ -725,8 +724,6 @@ export default {
const orderCode = row.orderCode || this.ids
getDeviceOrder(orderCode).then(response => {
this.form = response.data;
console.log("这里是回显信息")
console.log(response.data)
if (response.data.timeArray[0] == null) {
response.data.timeArray = [];
}

@ -17,21 +17,23 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="单号" prop="orderCode">
<el-form-item label="单号" prop="orderCode">
<el-input
v-model="queryParams.orderCode"
placeholder="请输入单号"
placeholder="请输入单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="车间" prop="planWorkshop">
<el-input
v-model="queryParams.planWorkshop"
placeholder="请输入车间"
clearable
@keyup.enter.native="handleQuery"
/>
<el-form-item label="车间编码" prop="planWorkshop">
<el-select v-model="queryParams.planWorkshop" placeholder="请选择车间" clearable>
<el-option
v-for="work in workCenterList"
:key="work.factoryCode"
:label="work.factoryName"
:value="work.factoryCode"
/>
</el-select>
</el-form-item>
<el-form-item v-if="false" label="产线" prop="planProdLine">
<el-input
@ -41,6 +43,16 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="循环周期" prop="planLoop">
<el-select v-model="queryParams.planLoopType" placeholder="请选择循环周期" clearable>
<el-option
v-for="dict in dict.type.device_loop_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="false" label="循环周期" prop="planLoop">
<el-input
v-model="queryParams.planLoop"
@ -89,6 +101,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="equipmentCode">
<el-input
v-model="queryParams.equipmentName"
placeholder="请输入设备名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="工单费用" prop="orderCost">
<el-input
v-model="queryParams.orderCost"
@ -97,10 +117,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="责任人" prop="planPerson">
<el-form-item label="点检人" prop="planPerson">
<el-input
v-model="queryParams.planPerson"
placeholder="请输入责任人"
placeholder="请输入点检人"
clearable
@keyup.enter.native="handleQuery"
/>
@ -161,7 +181,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="createBy">
<el-form-item v-if="false" label="创建人" prop="createBy">
<el-input
v-model="queryParams.createBy"
placeholder="请输入创建人"
@ -169,7 +189,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-form-item v-if="false" label="创建时间" prop="createTime">
<el-date-picker clearable
v-model="queryParams.createTime"
type="date"
@ -177,7 +197,7 @@
placeholder="请选择创建时间">
</el-date-picker>
</el-form-item>
<el-form-item label="更新人" prop="updateBy">
<el-form-item v-if="false" label="更新人" prop="updateBy">
<el-input
v-model="queryParams.updateBy"
placeholder="请输入更新人"
@ -185,7 +205,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="更新时间" prop="updateTime">
<el-form-item v-if="false" label="更新时间" prop="updateTime">
<el-date-picker clearable
v-model="queryParams.updateTime"
type="date"
@ -193,6 +213,45 @@
placeholder="请选择更新时间">
</el-date-picker>
</el-form-item>
<el-form-item label-width="100px" label="循环开始时间" prop="planLoopStart">
<el-date-picker
v-model="queryParams.loopStartArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label-width="100px" label="执行开始时间" prop="orderStart">
<el-date-picker
v-model="queryParams.orderStartArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label-width="100px" label="执行结束时间" prop="orderEnd">
<el-date-picker
v-model="queryParams.orderEndArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -245,45 +304,58 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table @cell-click="showWork" v-loading="loading" :data="inspectionWorkList">
<el-table v-loading="loading" :data="inspectionWorkList">
<el-table-column v-if="false" label="主键" align="center" prop="orderId" />
<el-table-column v-if="false" label="计划id" align="center" prop="planId" />
<el-table-column width="150" label="计划编码" align="center" prop="planCode" />
<el-table-column v-if="false" label="计划类型" align="center" prop="planType" />
<el-table-column width="150" label="单号" align="center" prop="orderCode" />
<el-table-column label="车间" align="center" prop="planWorkshop" />
<el-table-column width="150" label="点检单号" align="center" prop="orderCode" fixed>
<template slot-scope="scope">
<el-button
type="text"
@click="showWork(scope.row)"
>{{ scope.row.orderCode }}</el-button
>
</template>
</el-table-column>
<el-table-column label="车间编码" align="center" prop="planWorkshop" />
<el-table-column width="150" label="车间" align="center" prop="workCenterName"/>
<el-table-column v-if="false" label="产线" align="center" prop="planProdLine" />
<el-table-column label="循环周期" align="center" prop="planLoop" />
<el-table-column width="120" label="循环周期类型" align="center" prop="planLoopType" />
<el-table-column label="循环执行时间开始" align="center" prop="planLoopStart" width="150">
<el-table-column width="120" label="循环周期类型" align="center" prop="planLoopType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.device_loop_type" :value="scope.row.planLoopType"/>
</template>
</el-table-column>
<el-table-column width="120" label="循环开始时间" align="center" prop="planLoopStart">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopStart, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="循环执行时间结束" align="center" prop="planLoopEnd" width="150">
<el-table-column v-if="false" width="120" label="循环范围结束" align="center" prop="planLoopEnd">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopEnd, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="实际开始时间" align="center" prop="orderStart" width="150">
<el-table-column width="120" label="执行开始时间" align="center" prop="orderStart">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderStart, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="实际结束时间" align="center" prop="orderEnd" width="150">
<el-table-column width="120" label="执行结束时间" align="center" prop="orderEnd">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderEnd, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="设备编码" align="center" prop="equipmentCode" />
<el-table-column label="设备名称" align="center" prop="equipmentName" />
<el-table-column width="100" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column width="120" label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="工单状态" align="center" prop="orderStatus" >
<template slot-scope="scope">
<dict-tag :options="dict.type.device_order_status" :value="scope.row.orderStatus"/>
</template>
</el-table-column>
<el-table-column v-if="false" label="工单费用" align="center" prop="orderCost" />
<el-table-column label="责任人" align="center" prop="planPerson" />
<el-table-column label="点检人" align="center" prop="planPerson" />
<el-table-column v-if="false" label="工单用时" align="center" prop="orderCostTime" />
<el-table-column v-if="false" label="签字" align="center" prop="orderSignPerson" />
<el-table-column v-if="false" label="工厂" align="center" prop="factoryCode" />
@ -292,13 +364,13 @@
<el-table-column v-if="false" label="备用字段3" align="center" prop="attr3" />
<el-table-column v-if="false" label="删除标志" align="center" prop="delFlag" />
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createTime" width="150">
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updateBy" />
<el-table-column label="更新时间" align="center" prop="updateTime" width="150">
<el-table-column label="更新时间" align="center" prop="updateTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
@ -423,12 +495,44 @@
<script>
import { listInspectionWork, getInspectionWork, delInspectionWork, addInspectionWork, updateInspectionWork } from "@/api/device/inspectionWork";
import {getWorkCenter} from "@/api/device/plan";
import {listDeviceOrder} from "@/api/device/deviceOrder";
export default {
name: "InspectionWork",
dicts: ['device_order_status', 'device_loop_type'],
data() {
return {
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
//
workCenterList:[],
// VO
workVO: {
order: {
@ -490,7 +594,7 @@ export default {
orderStart: null,
orderEnd: null,
equipmentCode: null,
orderStatus: null,
orderStatus: '1',
orderCost: null,
planPerson: null,
orderCostTime: null,
@ -503,7 +607,10 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
loopStartArray: [],
orderStartArray: [],
orderEndArray: [],
},
//
form: {},
@ -513,18 +620,22 @@ export default {
};
},
created() {
this.setWorkCenter();
this.getList();
},
methods: {
//
//
setWorkCenter() {
getWorkCenter().then(response => {
this.workCenterList = response.data;
})
},
//
showWork(row) {
console.log("测试成功")
console.log(row)
this.reset();
const orderId = row.orderId || this.ids
getInspectionWork(orderId).then(response => {
this.workVO = response.data;
console.log(this.workVO);
this.workDetail = true;
});
@ -532,7 +643,7 @@ export default {
/** 查询点检记录列表 */
getList() {
this.loading = true;
listInspectionWork(this.queryParams).then(response => {
listDeviceOrder(this.queryParams).then(response => {
this.inspectionWorkList = response.rows;
this.total = response.total;
this.loading = false;
@ -560,7 +671,7 @@ export default {
orderStart: null,
orderEnd: null,
equipmentCode: null,
orderStatus: null,
orderStatus: '1',
orderCost: null,
planPerson: null,
orderCostTime: null,
@ -573,7 +684,10 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
loopStartArray: [],
orderStartArray: [],
orderEndArray: [],
};
this.resetForm("form");
},
@ -584,6 +698,9 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.loopStartArray = [];
this.queryParams.orderStartArray = [];
this.queryParams.orderEndArray = [];
this.resetForm("queryForm");
this.handleQuery();
},

@ -1167,6 +1167,7 @@ export default {
};
},
created() {
this.setWorkCenter();
this.getList();
},
methods: {
@ -1184,8 +1185,6 @@ export default {
},
//
subInspect() {
console.log("点击了提交检验确定按钮")
console.log(this.ids)
const data = {
ids : this.ids,
inspect : this.inspect,
@ -1221,8 +1220,6 @@ export default {
},
//
subOrder() {
console.log("提交按钮")
console.log(this.form)
this.form.personList = this.selectPersonList;
addUpkeepOrder(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
@ -1329,10 +1326,6 @@ export default {
},
//
spareChangeCom() {
console.log("点击了完成按钮")
console.log(this.chooseSpareList)
console.log("form")
console.log(this.form)
this.spareDialog = false;
},
//
@ -1343,8 +1336,6 @@ export default {
},
// -
delSpareList(e) {
console.log("删除备件")
console.log(e)
for (let i = 0; i < this.chooseSpareList.length; i++){
if (this.chooseSpareList[i].materialCode == e.materialCode) {
this.chooseSpareList.splice(i,1);
@ -1357,8 +1348,6 @@ export default {
},
// -
addSpareList(e) {
console.log("选择备件")
console.log(e)
for (let i = 0; i < this.chooseSpareList.length; i++){
if (this.chooseSpareList[i].materialCode == e.materialCode) {
this.$message({
@ -1376,16 +1365,12 @@ export default {
},
//
changeArray(e) {
console.log("改变了保养执行时间")
},
//
confirmSelectSpareBtn() {
console.log("点击了选择备件确定按钮")
},
//
selectChangeSpare(e) {
console.log("多选改变")
console.log(e)
this.selOnSpare = e;
},
//
@ -1397,7 +1382,6 @@ export default {
pageSize: 10,
};
this.setSpareList();
console.log("点击了搜索重置按钮")
},
//
setSpareList() {
@ -1405,18 +1389,14 @@ export default {
this.spareTotal = response.total;
this.spareList = response.rows;
this.spareLoading = false;
console.log(response)
})
},
//
getSpareList() {
this.setSpareList()
console.log("点击了搜索备件按钮")
},
//
selectSpareBtn(e) {
console.log("点击了选择备件按钮!")
console.log(e)
this.setSpareList();
if (e.spareList == null) {
e.spareList = [];
@ -1510,8 +1490,6 @@ export default {
const orderCode = row.orderCode || this.ids
getDeviceOrder(orderCode).then(response => {
this.form = response.data;
console.log("这里是回显信息")
console.log(response.data)
if (response.data.timeArray[0] == null) {
response.data.timeArray = []
}
@ -1527,21 +1505,15 @@ export default {
},
/** 提交按钮 */
submitForm() {
console.log("提交按钮")
console.log(this.form)
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.orderId != null) {
console.log("点击了提交")
console.log(this.form)
updateDeviceOrder(this.form).then(response => {
this.$modal.msgSuccess("提交成功");
this.open = false;
this.getList();
});
} else {
console.log("提交按钮")
console.log(this.form)
// addUpkeepOrder(this.form).then(response => {
// this.$modal.msgSuccess("");
// this.open = false;

@ -1049,7 +1049,6 @@ export default {
methods: {
//
handleEdit(index, row) {
console.log('row:',index, row);
if (row.amount < Number(row.applyNum)) {
this.$message({
message: '超过库存数量!',
@ -1060,16 +1059,11 @@ export default {
},
//
spareChangeCom() {
console.log("点击了完成按钮")
console.log(this.chooseSpareList)
console.log("form")
console.log(this.form)
this.spareDialog = false;
},
//
changeApplySpareNum(e) {
for (let i = 0; i < this.selOnSpare.length; i++) {
console.log("备件数量改变")
if (this.selOnSpare[i].amount < e) {
this.$message({
message: '超过库存数量!',
@ -1082,8 +1076,6 @@ export default {
},
// -
delSpareList(e) {
console.log("删除备件")
console.log(e)
for (let i = 0; i < this.chooseSpareList.length; i++){
if (this.chooseSpareList[i].materialCode == e.materialCode) {
this.chooseSpareList.splice(i,1);
@ -1096,8 +1088,6 @@ export default {
},
// -
addSpareList(e) {
console.log("选择备件123")
console.log(e)
for (let i = 0; i < this.chooseSpareList.length; i++){
if (this.chooseSpareList[i].materialCode == e.materialCode) {
this.$message({
@ -1115,8 +1105,6 @@ export default {
},
// -
changeArray(e) {
console.log(e)
console.log(this.form.planTimeArray)
if (this.form.planLoop == null) {
this.$message({
message: '请输入循环周期!',
@ -1210,12 +1198,9 @@ export default {
},
//
confirmSelectSpareBtn() {
console.log("点击了选择备件确定按钮")
},
//
selectChangeSpare(e) {
console.log("多选改变")
console.log(e)
this.selOnSpare = e;
},
//
@ -1227,7 +1212,6 @@ export default {
pageSize: 10,
};
this.setSpareList();
console.log("点击了搜索重置按钮")
},
//
setSpareList() {
@ -1239,18 +1223,14 @@ export default {
this.spareList[i].amount = Number(this.spareList[i].amount) - Number(this.spareList[i].storageAmount)
}
this.spareLoading = false;
console.log(response)
})
},
//
getSpareList() {
this.setSpareList()
console.log("点击了搜索备件按钮")
},
//
selectSpareBtn(e) {
console.log("点击了选择备件按钮321")
console.log(e)
this.setSpareList();
if (e.spareList == null) {
e.spareList = [];
@ -1296,13 +1276,6 @@ export default {
// -
editorTheItem(e) {
console.log('e')
console.log(e)
console.log("form")
console.log(this.form.equipmentItem)
console.log("长度")
console.log(this.form.equipmentItem.length)
//
this.itemDetailList = [];
@ -1311,19 +1284,12 @@ export default {
for (let i = 0; i < this.form.equipmentItem.length; i++) {
if (e.equipmentCode == this.form.equipmentItem[i].equipmentCode) {
console.log("一次")
console.log(e.equipmentCode == this.form.equipmentItem[i].equipmentCode)
console.log(e.equipmentCode)
console.log(this.form.equipmentItem[i].equipmentCode)
for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) {
//
var itemName = this.form.equipmentItem[i].equPlanDetailList[j].itemName;
console.log("长度")
console.log(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length)
for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++){
if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].showFlag == true) {
@ -1333,7 +1299,6 @@ export default {
}else {
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定量";
}
console.log(qw++)
this.itemDetailList.push(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k]);
}
@ -1532,8 +1497,6 @@ export default {
initUpdatePlanInfo(row).then(response => {
this.form = response.data;
console.log("这里!!!!")
console.log(response.data)
this.selectPersonList = response.data.personListVO;
@ -1547,9 +1510,6 @@ export default {
}
console.log("这里时修改前")
console.log(this.form)
this.open = true;
this.title = "修改计划";
})
@ -1561,8 +1521,6 @@ export default {
this.planLoading = true;
if (this.form.planId != null) {
this.form.personList = this.selectPersonList;
console.log("这里时修改后")
console.log(this.form)
updateUpkeepPlan(this.form).then(response => {
this.planLoading = false;
this.$modal.msgSuccess("修改成功");

Loading…
Cancel
Save