|
@@ -34,6 +34,7 @@
|
|
|
end-placeholder="结束日期"
|
|
end-placeholder="结束日期"
|
|
|
:clearable="false"
|
|
:clearable="false"
|
|
|
:picker-options="pickerOptions"
|
|
:picker-options="pickerOptions"
|
|
|
|
|
+ style="width: 240px"
|
|
|
>
|
|
>
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -43,45 +44,43 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<div v-loading="loading">
|
|
<div v-loading="loading">
|
|
|
<el-form label-width="107px" :model="planInfo" class="plan_form">
|
|
<el-form label-width="107px" :model="planInfo" class="plan_form">
|
|
|
- <el-row :gutter="20" type="flex" style="flex-wrap: wrap">
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
|
|
+ <el-row class="info-row" :gutter="12">
|
|
|
|
|
+ <el-col class="info-col">
|
|
|
<el-form-item label="名称:">
|
|
<el-form-item label="名称:">
|
|
|
<el-input readonly v-model="planInfo.productName"></el-input>
|
|
<el-input readonly v-model="planInfo.productName"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
|
|
|
|
+ <el-col class="info-col">
|
|
|
<el-form-item label="计划编号:">
|
|
<el-form-item label="计划编号:">
|
|
|
<el-input readonly v-model="planInfo.code"></el-input>
|
|
<el-input readonly v-model="planInfo.code"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
|
|
|
|
+ <el-col class="info-col">
|
|
|
<el-form-item label="规格:">
|
|
<el-form-item label="规格:">
|
|
|
<el-input readonly v-model="planInfo.specification"></el-input>
|
|
<el-input readonly v-model="planInfo.specification"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
|
|
|
|
+ <el-col class="info-col">
|
|
|
<el-form-item label="型号:">
|
|
<el-form-item label="型号:">
|
|
|
<el-input readonly v-model="planInfo.model"></el-input>
|
|
<el-input readonly v-model="planInfo.model"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
|
|
- <el-row>
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
|
|
+ <el-col class="info-col">
|
|
|
<el-form-item label="编码:">
|
|
<el-form-item label="编码:">
|
|
|
<el-input readonly v-model="planInfo.productCode"></el-input>
|
|
<el-input readonly v-model="planInfo.productCode"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
|
|
|
|
+ <el-col class="info-col">
|
|
|
<el-form-item label="牌号:">
|
|
<el-form-item label="牌号:">
|
|
|
<el-input readonly v-model="planInfo.brandNo"></el-input>
|
|
<el-input readonly v-model="planInfo.brandNo"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
|
|
|
|
+ <el-col class="info-col">
|
|
|
<el-form-item label="计划数量:">
|
|
<el-form-item label="计划数量:">
|
|
|
<el-input readonly v-model="planInfo.productNum"></el-input>
|
|
<el-input readonly v-model="planInfo.productNum"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6" v-if="produceType != 2">
|
|
|
|
|
|
|
+ <el-col class="info-col" v-if="produceType != 2">
|
|
|
<el-form-item label="未发总数:">
|
|
<el-form-item label="未发总数:">
|
|
|
<el-input
|
|
<el-input
|
|
|
readonly
|
|
readonly
|
|
@@ -89,8 +88,7 @@
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
-
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
|
|
+ <el-col class="info-col">
|
|
|
<el-form-item label="库存数量:">
|
|
<el-form-item label="库存数量:">
|
|
|
<el-input
|
|
<el-input
|
|
|
readonly
|
|
readonly
|
|
@@ -98,7 +96,7 @@
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6" v-if="produceType != 2">
|
|
|
|
|
|
|
+ <el-col class="info-col" v-if="produceType != 2">
|
|
|
<el-form-item label="在制总数:">
|
|
<el-form-item label="在制总数:">
|
|
|
<el-input
|
|
<el-input
|
|
|
readonly
|
|
readonly
|
|
@@ -106,7 +104,7 @@
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6" v-if="produceType != 2">
|
|
|
|
|
|
|
+ <el-col class="info-col" v-if="produceType != 2">
|
|
|
<el-form-item label="最终缺料数量:">
|
|
<el-form-item label="最终缺料数量:">
|
|
|
<el-input
|
|
<el-input
|
|
|
readonly
|
|
readonly
|
|
@@ -114,7 +112,7 @@
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
|
|
|
|
+ <el-col class="info-col">
|
|
|
<el-form-item label="最终状态:">
|
|
<el-form-item label="最终状态:">
|
|
|
<el-input
|
|
<el-input
|
|
|
:class="
|
|
:class="
|
|
@@ -153,7 +151,7 @@
|
|
|
:columns="columns"
|
|
:columns="columns"
|
|
|
:init-load="false"
|
|
:init-load="false"
|
|
|
:datasource="datasourceList"
|
|
:datasource="datasourceList"
|
|
|
- row-key="code"
|
|
|
|
|
|
|
+ row-key="_rowKey"
|
|
|
:cache-key="`aps-productionPlan-homogeneityInspectDialog`"
|
|
:cache-key="`aps-productionPlan-homogeneityInspectDialog`"
|
|
|
border
|
|
border
|
|
|
height="40vh"
|
|
height="40vh"
|
|
@@ -242,7 +240,7 @@
|
|
|
</el-option>
|
|
</el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="属性类型" v-if="produceType == 2">
|
|
|
|
|
|
|
+ <el-form-item label="属性类型">
|
|
|
<el-select
|
|
<el-select
|
|
|
size="medium"
|
|
size="medium"
|
|
|
v-model="formInline.attributeType"
|
|
v-model="formInline.attributeType"
|
|
@@ -739,6 +737,10 @@
|
|
|
value: 'all',
|
|
value: 'all',
|
|
|
label: '全部'
|
|
label: '全部'
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 1,
|
|
|
|
|
+ label: '自制件'
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
value: 2,
|
|
value: 2,
|
|
|
label: '采购件'
|
|
label: '采购件'
|
|
@@ -967,7 +969,7 @@
|
|
|
},
|
|
},
|
|
|
// 切换属性
|
|
// 切换属性
|
|
|
async attributeChange(e) {
|
|
async attributeChange(e) {
|
|
|
- if (e == 'all') {
|
|
|
|
|
|
|
+ if (e == 'all' && this.produceType == 2) {
|
|
|
this.dataMerging();
|
|
this.dataMerging();
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -982,21 +984,13 @@
|
|
|
},
|
|
},
|
|
|
// 获取物料数据信息
|
|
// 获取物料数据信息
|
|
|
async getMaterialData(data, attributeType) {
|
|
async getMaterialData(data, attributeType) {
|
|
|
- if (attributeType == 'all') {
|
|
|
|
|
|
|
+ if (attributeType == 'all' && this.produceType == 2) {
|
|
|
this.dataMerging();
|
|
this.dataMerging();
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
let kitting = this.quota_calculation == 1 ? false : true;
|
|
let kitting = this.quota_calculation == 1 ? false : true;
|
|
|
let produceType =
|
|
let produceType =
|
|
|
- this.produceType == 1
|
|
|
|
|
- ? 1
|
|
|
|
|
- : this.produceType == 4
|
|
|
|
|
- ? 4
|
|
|
|
|
- : attributeType == 2
|
|
|
|
|
- ? 2
|
|
|
|
|
- : attributeType == 3
|
|
|
|
|
- ? 3
|
|
|
|
|
- : '';
|
|
|
|
|
|
|
+ attributeType == 'all' ? this.produceType : attributeType;
|
|
|
let { startTime, endTime } = this.getTimeData();
|
|
let { startTime, endTime } = this.getTimeData();
|
|
|
let params = {
|
|
let params = {
|
|
|
planId: this.planId,
|
|
planId: this.planId,
|
|
@@ -1022,6 +1016,12 @@
|
|
|
// 结果数据处理
|
|
// 结果数据处理
|
|
|
resultProcess(result) {
|
|
resultProcess(result) {
|
|
|
this.datasourceList = [];
|
|
this.datasourceList = [];
|
|
|
|
|
+ const attributeType = this.formInline.attributeType;
|
|
|
|
|
+ if (attributeType !== 'all') {
|
|
|
|
|
+ result = (result || []).filter(
|
|
|
|
|
+ (item) => item.componentAttribute == attributeType
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
if (!result || result.length == 0) {
|
|
if (!result || result.length == 0) {
|
|
|
this.baseCount = '';
|
|
this.baseCount = '';
|
|
|
this.baseUnit = '';
|
|
this.baseUnit = '';
|
|
@@ -1030,7 +1030,8 @@
|
|
|
let first = result[0];
|
|
let first = result[0];
|
|
|
this.baseCount = first.baseCount;
|
|
this.baseCount = first.baseCount;
|
|
|
this.baseUnit = first.measuringUnit;
|
|
this.baseUnit = first.measuringUnit;
|
|
|
- result.forEach((item) => {
|
|
|
|
|
|
|
+ result.forEach((item, index) => {
|
|
|
|
|
+ item._rowKey = `${item.code || 'material'}-${index}`;
|
|
|
item.batchNo = this.planInfo.batchNo;
|
|
item.batchNo = this.planInfo.batchNo;
|
|
|
item.salesCode = this.planInfo.salesCode;
|
|
item.salesCode = this.planInfo.salesCode;
|
|
|
item.finalState =
|
|
item.finalState =
|
|
@@ -1059,7 +1060,7 @@
|
|
|
);
|
|
);
|
|
|
if (datasourceList.length) {
|
|
if (datasourceList.length) {
|
|
|
this.$refs.table.setSelectedRowKeys(
|
|
this.$refs.table.setSelectedRowKeys(
|
|
|
- datasourceList.map((el) => el.code)
|
|
|
|
|
|
|
+ datasourceList.map((el) => el._rowKey)
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -1094,6 +1095,7 @@
|
|
|
async open(dataList, produceType, parType) {
|
|
async open(dataList, produceType, parType) {
|
|
|
this.initTime();
|
|
this.initTime();
|
|
|
this.produceType = produceType;
|
|
this.produceType = produceType;
|
|
|
|
|
+ this.formInline.attributeType = produceType == 2 ? 2 : 'all';
|
|
|
this.parType = parType || '';
|
|
this.parType = parType || '';
|
|
|
this.formInline.inventoryType =
|
|
this.formInline.inventoryType =
|
|
|
Number(parType) === 1 ? '4' : Number(parType) === 7 ? '3' : '';
|
|
Number(parType) === 1 ? '4' : Number(parType) === 7 ? '3' : '';
|
|
@@ -1354,14 +1356,32 @@
|
|
|
|
|
|
|
|
.form-wrapper {
|
|
.form-wrapper {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
|
|
+ margin-top: 16px;
|
|
|
}
|
|
}
|
|
|
.planInfo {
|
|
.planInfo {
|
|
|
// display: flex;
|
|
// display: flex;
|
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
|
}
|
|
}
|
|
|
.plan_form {
|
|
.plan_form {
|
|
|
- .el-col {
|
|
|
|
|
- margin-bottom: 16px;
|
|
|
|
|
|
|
+ .info-row {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
+ row-gap: 16px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .info-col {
|
|
|
|
|
+ flex: 0 0 20%;
|
|
|
|
|
+ max-width: 20%;
|
|
|
|
|
+ padding: 0 6px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-input {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+ :deep(.el-input.is-readonly .el-input__inner),
|
|
|
|
|
+ :deep(.el-input__inner[readonly]) {
|
|
|
|
|
+ background-color: #f5f7fa;
|
|
|
|
|
+ border-color: #dcdfe6;
|
|
|
|
|
+ color: #606266;
|
|
|
|
|
+ cursor: not-allowed;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1377,8 +1397,9 @@
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
- padding: 5px 10px;
|
|
|
|
|
- border-left: 1px solid #ededed;
|
|
|
|
|
- border-right: 1px solid #ededed;
|
|
|
|
|
|
|
+ padding: 8px 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ .select-type {
|
|
|
|
|
+ width: 140px;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|