|
@@ -9,8 +9,29 @@
|
|
|
:title="'齐套性检查'"
|
|
:title="'齐套性检查'"
|
|
|
:maxable="true"
|
|
:maxable="true"
|
|
|
>
|
|
>
|
|
|
|
|
+ <el-form
|
|
|
|
|
+ label-width="107px"
|
|
|
|
|
+ :inline="true"
|
|
|
|
|
+ class="demo-form-inline"
|
|
|
|
|
+ style="margin-bottom: 16px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-form-item label="选择日期">
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="startTime"
|
|
|
|
|
+ type="date"
|
|
|
|
|
+ placeholder="选择日期"
|
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
|
+ size="large"
|
|
|
|
|
+ :picker-options="pickerOptions"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-date-picker>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-button class="" type="primary" @click="onSubmit">查询</el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
<div v-loading="loading">
|
|
<div v-loading="loading">
|
|
|
- <el-form label-width="80px" :model="orderInfo" class="order_form">
|
|
|
|
|
|
|
+ <el-form label-width="107px" :model="orderInfo" class="order_form">
|
|
|
<el-row :gutter="20" type="flex" style="flex-wrap: wrap">
|
|
<el-row :gutter="20" type="flex" style="flex-wrap: wrap">
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
<el-form-item label="销售单号:">
|
|
<el-form-item label="销售单号:">
|
|
@@ -49,19 +70,51 @@
|
|
|
<el-input readonly v-model="orderInfo.contractNum"></el-input>
|
|
<el-input readonly v-model="orderInfo.contractNum"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ <el-col :span="6">
|
|
|
|
|
+ <el-form-item label="未发总数:">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ readonly
|
|
|
|
|
+ v-model="kitComInfo.totalUnshippedQuantity"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row :gutter="20" type="flex" style="flex-wrap: wrap">
|
|
|
|
|
+ <el-col :span="6">
|
|
|
|
|
+ <el-form-item label="库存数量:">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ readonly
|
|
|
|
|
+ v-model="kitComInfo.inventoryQuantity"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="6">
|
|
|
|
|
+ <el-form-item label="在制总数:">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ readonly
|
|
|
|
|
+ v-model="kitComInfo.totalNumberProduction"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="6">
|
|
|
|
|
+ <el-form-item label="最终缺料数量:">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ readonly
|
|
|
|
|
+ v-model="kitComInfo.finalFilledShortCount"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="6">
|
|
|
|
|
+ <el-form-item label="最终状态:">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ readonly
|
|
|
|
|
+ v-model="kitComInfo.finalFilledShortState"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<div class="form-wrapper">
|
|
<div class="form-wrapper">
|
|
|
- <!-- <div>
|
|
|
|
|
- <el-row style="width: 100%">
|
|
|
|
|
- <el-col :span="6"> 销售单号:{{ orderInfo.code }} </el-col>
|
|
|
|
|
- <el-col :span="6"> 编号:{{ orderInfo.productCode }} </el-col>
|
|
|
|
|
- <el-col :span="6"> 名称:{{ orderInfo.productName }} </el-col>
|
|
|
|
|
- <el-col :span="6"> 规格:{{ orderInfo.specification }} </el-col>
|
|
|
|
|
- <el-col :span="6"> 型号:{{ orderInfo.model }} </el-col>
|
|
|
|
|
- <el-col :span="6"> 合同数量:{{ orderInfo.contractNum }} </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </div> -->
|
|
|
|
|
<div
|
|
<div
|
|
|
class="left_tree"
|
|
class="left_tree"
|
|
|
v-show="leftShow"
|
|
v-show="leftShow"
|
|
@@ -177,6 +230,20 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <!-- 默认按订单 -->
|
|
|
|
|
+ <template v-slot:toolbar v-if="produceType == 1">
|
|
|
|
|
+ <el-form :inline="true">
|
|
|
|
|
+ <el-form-item label="定额计算方法:">
|
|
|
|
|
+ <el-radio-group
|
|
|
|
|
+ v-model="quota_calculation"
|
|
|
|
|
+ @change="selectCalculate"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-radio :label="1">按订单数量</el-radio>
|
|
|
|
|
+ <el-radio :label="2">按缺料数量</el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </template>
|
|
|
<template v-slot:toolkit>
|
|
<template v-slot:toolkit>
|
|
|
<el-form :inline="true">
|
|
<el-form :inline="true">
|
|
|
<el-form-item label="基本数量">
|
|
<el-form-item label="基本数量">
|
|
@@ -288,7 +355,8 @@
|
|
|
findMaterialInfoByCategory,
|
|
findMaterialInfoByCategory,
|
|
|
findBomSalesorderCategoryIdV2,
|
|
findBomSalesorderCategoryIdV2,
|
|
|
bomVersionList,
|
|
bomVersionList,
|
|
|
- listBomType
|
|
|
|
|
|
|
+ listBomType,
|
|
|
|
|
+ getProductKitting
|
|
|
} from '@/api/productionPlan/index.js';
|
|
} from '@/api/productionPlan/index.js';
|
|
|
import { orderHomogeneityInspect } from '@/api/saleOrder/index.js';
|
|
import { orderHomogeneityInspect } from '@/api/saleOrder/index.js';
|
|
|
import stockDetailDialog from '../../productionPlan/components/stockDetailDialog.vue';
|
|
import stockDetailDialog from '../../productionPlan/components/stockDetailDialog.vue';
|
|
@@ -305,6 +373,9 @@
|
|
|
purchaseDialog
|
|
purchaseDialog
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
|
|
+ fieldShow() {
|
|
|
|
|
+ return this.produceType == 1 && this.quota_calculation === 2;
|
|
|
|
|
+ },
|
|
|
columns() {
|
|
columns() {
|
|
|
return [
|
|
return [
|
|
|
{
|
|
{
|
|
@@ -382,7 +453,8 @@
|
|
|
label: '未发总数',
|
|
label: '未发总数',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- show: this.produceType == 1
|
|
|
|
|
|
|
+ show: this.fieldShow
|
|
|
|
|
+ // 如果按订单状态 的话 隐藏
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'inventoryQuantity',
|
|
prop: 'inventoryQuantity',
|
|
@@ -415,27 +487,31 @@
|
|
|
prop: 'inTransitNum',
|
|
prop: 'inTransitNum',
|
|
|
label: '在途数量',
|
|
label: '在途数量',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- minWidth: 80
|
|
|
|
|
|
|
+ minWidth: 80,
|
|
|
|
|
+ show: this.produceType == 2
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'inTransitOrdersNum',
|
|
prop: 'inTransitOrdersNum',
|
|
|
label: '在途已关联数量 ',
|
|
label: '在途已关联数量 ',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- minWidth: 120
|
|
|
|
|
|
|
+ minWidth: 120,
|
|
|
|
|
+ show: this.produceType == 2
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
slot: 'inTransitStatusText',
|
|
slot: 'inTransitStatusText',
|
|
|
prop: 'inTransitStatusText',
|
|
prop: 'inTransitStatusText',
|
|
|
label: '在途状态',
|
|
label: '在途状态',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- minWidth: 80
|
|
|
|
|
|
|
+ minWidth: 80,
|
|
|
|
|
+ show: this.produceType == 2
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'totalNumberProduction',
|
|
prop: 'totalNumberProduction',
|
|
|
label: '在制总数',
|
|
label: '在制总数',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- show: this.produceType == 1
|
|
|
|
|
|
|
+ show: this.fieldShow
|
|
|
|
|
+ // 如果按订单状态 的话 隐藏
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
prop: 'numberProductionStateText',
|
|
prop: 'numberProductionStateText',
|
|
@@ -443,17 +519,18 @@
|
|
|
label: '在制齐套',
|
|
label: '在制齐套',
|
|
|
showOverflowTooltip: true,
|
|
showOverflowTooltip: true,
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- show: this.produceType == 1
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'productFinalStateText',
|
|
|
|
|
- slot: 'productFinalStateText',
|
|
|
|
|
- label: '成品的最终齐套',
|
|
|
|
|
- showOverflowTooltip: true,
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- minWidth: 160,
|
|
|
|
|
- show: this.produceType == 1
|
|
|
|
|
|
|
+ show: this.fieldShow
|
|
|
|
|
+ // 如果按订单状态 的话 隐藏
|
|
|
},
|
|
},
|
|
|
|
|
+ // {
|
|
|
|
|
+ // prop: 'productFinalStateText',
|
|
|
|
|
+ // slot: 'productFinalStateText',
|
|
|
|
|
+ // label: '成品的最终齐套',
|
|
|
|
|
+ // showOverflowTooltip: true,
|
|
|
|
|
+ // align: 'center',
|
|
|
|
|
+ // minWidth: 160,
|
|
|
|
|
+ // show: this.produceType == 1 && this.quota_calculation === 2
|
|
|
|
|
+ // },
|
|
|
{
|
|
{
|
|
|
label: '最终可用数量',
|
|
label: '最终可用数量',
|
|
|
prop: 'finalAvailableQuantity',
|
|
prop: 'finalAvailableQuantity',
|
|
@@ -489,7 +566,7 @@
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
visible: false,
|
|
visible: false,
|
|
|
-
|
|
|
|
|
|
|
+ kitComInfo: {},
|
|
|
bomIdList: [],
|
|
bomIdList: [],
|
|
|
requiredFormingNum: 0,
|
|
requiredFormingNum: 0,
|
|
|
formInline: {
|
|
formInline: {
|
|
@@ -557,7 +634,28 @@
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
baseCount: '',
|
|
baseCount: '',
|
|
|
- baseUnit: ''
|
|
|
|
|
|
|
+ baseUnit: '',
|
|
|
|
|
+ quota_calculation: 1,
|
|
|
|
|
+ pickerOptions: {
|
|
|
|
|
+ disabledDate: (time) => {
|
|
|
|
|
+ // 获取三个月前的日期(修正版)
|
|
|
|
|
+ const threeMonthsAgo = new Date();
|
|
|
|
|
+ threeMonthsAgo.setMonth(threeMonthsAgo.getMonth() - 3);
|
|
|
|
|
+ // 获取当前日期
|
|
|
|
|
+ const today = new Date();
|
|
|
|
|
+ // 禁用三个月前的日期之前的日期和当前日期之后的日期
|
|
|
|
|
+ // 注意:这里使用setHours(0,0,0,0)来确保只比较日期部分
|
|
|
|
|
+ const threeMonthsAgoDate = new Date(threeMonthsAgo);
|
|
|
|
|
+ threeMonthsAgoDate.setHours(0, 0, 0, 0);
|
|
|
|
|
+ const todayDate = new Date(today);
|
|
|
|
|
+ todayDate.setHours(0, 0, 0, 0);
|
|
|
|
|
+ const timeDate = new Date(time);
|
|
|
|
|
+ timeDate.setHours(0, 0, 0, 0);
|
|
|
|
|
+ return timeDate < threeMonthsAgoDate || timeDate > todayDate;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ startTime: '',
|
|
|
|
|
+ kitting: false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -593,9 +691,21 @@
|
|
|
currentDetail(row) {
|
|
currentDetail(row) {
|
|
|
this.$refs.currentDetailDialog.open({ bomCode: row.code });
|
|
this.$refs.currentDetailDialog.open({ bomCode: row.code });
|
|
|
},
|
|
},
|
|
|
|
|
+ initTime() {
|
|
|
|
|
+ // 设置默认选中三个月前的日期时间
|
|
|
|
|
+ const threeMonthsAgo = new Date();
|
|
|
|
|
+ threeMonthsAgo.setMonth(threeMonthsAgo.getMonth() - 3);
|
|
|
|
|
+
|
|
|
|
|
+ // 格式化为 YYYY-MM-DD HH:mm:ss
|
|
|
|
|
+ const year = threeMonthsAgo.getFullYear();
|
|
|
|
|
+ const month = String(threeMonthsAgo.getMonth() + 1).padStart(2, '0');
|
|
|
|
|
+ const day = String(threeMonthsAgo.getDate()).padStart(2, '0');
|
|
|
|
|
+ const time = `${year}-${month}-${day}`;
|
|
|
|
|
+ this.startTime = time;
|
|
|
|
|
+ },
|
|
|
open(dataList, order, source, produceType) {
|
|
open(dataList, order, source, produceType) {
|
|
|
- console.log(produceType, 'produceType');
|
|
|
|
|
this.produceType = produceType;
|
|
this.produceType = produceType;
|
|
|
|
|
+ this.initTime();
|
|
|
this.source = source;
|
|
this.source = source;
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
this.cardList = dataList.map((el) => {
|
|
this.cardList = dataList.map((el) => {
|
|
@@ -647,14 +757,29 @@
|
|
|
this.visible = false;
|
|
this.visible = false;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- handleNodeClick(data) {
|
|
|
|
|
- this.clearData();
|
|
|
|
|
- this.getBomData(data);
|
|
|
|
|
- // this.selectNodeId = data.id;
|
|
|
|
|
|
|
+ async handleNodeClick(data) {
|
|
|
this.orderInfo = data;
|
|
this.orderInfo = data;
|
|
|
- // console.log(data);
|
|
|
|
|
- // this.reload({planIds: [data.id]});
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ await this.getKitting();
|
|
|
|
|
+ await this.getBomData(data);
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ console.log(e, 'eeeeeeeeeeeeeeeeeee');
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
+ async getKitting() {
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ categoryId: this.orderInfo.categoryId,
|
|
|
|
|
+ startTime: this.startTime
|
|
|
|
|
+ };
|
|
|
|
|
+ const res = await getProductKitting(params);
|
|
|
|
|
+ if (res) {
|
|
|
|
|
+ this.kitComInfo = res;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ selectCalculate(val) {
|
|
|
|
|
+ this.attributeChange(this.formInline.attributeType);
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
// 获取bom 数据
|
|
// 获取bom 数据
|
|
|
async getBomData(data) {
|
|
async getBomData(data) {
|
|
|
try {
|
|
try {
|
|
@@ -684,58 +809,6 @@
|
|
|
this.$message.error(err.message);
|
|
this.$message.error(err.message);
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- // this.loading = true;
|
|
|
|
|
- // try {
|
|
|
|
|
- // this.salesOrderId = data.id;
|
|
|
|
|
- // console.log(data, 'data 11111111111');
|
|
|
|
|
- // const res = await findBomSalesorderCategoryIdV2(
|
|
|
|
|
- // data.bomCategoryId,
|
|
|
|
|
- // this.produceType
|
|
|
|
|
- // );
|
|
|
|
|
- // this.loading = false;
|
|
|
|
|
- // if (!res || res.length == 0) {
|
|
|
|
|
- // this.bomListD = [];
|
|
|
|
|
- // this.datasourceList = [];
|
|
|
|
|
- // return;
|
|
|
|
|
- // }
|
|
|
|
|
- // let obj = {};
|
|
|
|
|
- // let bomMap = {
|
|
|
|
|
- // 1: 'PBOM',
|
|
|
|
|
- // 2: 'MBOM',
|
|
|
|
|
- // 3: 'ABOM'
|
|
|
|
|
- // };
|
|
|
|
|
- // res.map((el) => {
|
|
|
|
|
- // el.bomName = bomMap[el.bomType];
|
|
|
|
|
- // let OBMINFO = {
|
|
|
|
|
- // bomId: el.bomId,
|
|
|
|
|
- // bomType: el.type,
|
|
|
|
|
- // versions: `V${el.versions}.0`,
|
|
|
|
|
- // code: el.code
|
|
|
|
|
- // };
|
|
|
|
|
- // if (obj[el.bomType]) {
|
|
|
|
|
- // obj[el.bomType].bomList.unshift(OBMINFO);
|
|
|
|
|
- // } else {
|
|
|
|
|
- // obj[el.bomType] = { ...el, bomList: [OBMINFO] };
|
|
|
|
|
- // }
|
|
|
|
|
- // });
|
|
|
|
|
- // let list = Object.values(obj);
|
|
|
|
|
- // if (list.length == 0) return;
|
|
|
|
|
- // this.bomListType = list;
|
|
|
|
|
- // let bomObj = res.find(
|
|
|
|
|
- // (item) => item.bomId == this.orderInfo.bomCategoryId
|
|
|
|
|
- // );
|
|
|
|
|
- // let idx = 0;
|
|
|
|
|
- // if (bomObj && bomObj.bomId) {
|
|
|
|
|
- // idx = list.findIndex((item) => item.bomType == bomObj.bomType);
|
|
|
|
|
- // }
|
|
|
|
|
- // const index = idx != -1 ? idx : 0;
|
|
|
|
|
- // await this.bomTypeChange(list[index].id, 'init');
|
|
|
|
|
- // this.loading = false;
|
|
|
|
|
- // } catch (err) {
|
|
|
|
|
- // this.$message.error(err.message);
|
|
|
|
|
- // this.loading = false;
|
|
|
|
|
- // }
|
|
|
|
|
},
|
|
},
|
|
|
// 选择BOM类型
|
|
// 选择BOM类型
|
|
|
async bomTypeChange(e, type) {
|
|
async bomTypeChange(e, type) {
|
|
@@ -761,7 +834,6 @@
|
|
|
list.push(obj);
|
|
list.push(obj);
|
|
|
});
|
|
});
|
|
|
this.bomListV = list;
|
|
this.bomListV = list;
|
|
|
- console.log(this.orderInfo, '11111111111111');
|
|
|
|
|
if (type == 'init') {
|
|
if (type == 'init') {
|
|
|
let obj = list.find((el) => el.bomId == this.orderInfo.bomCategoryId);
|
|
let obj = list.find((el) => el.bomId == this.orderInfo.bomCategoryId);
|
|
|
let id = obj ? obj.bomId : list[0].bomId;
|
|
let id = obj ? obj.bomId : list[0].bomId;
|
|
@@ -805,15 +877,20 @@
|
|
|
if (!this.formInline.bomId) {
|
|
if (!this.formInline.bomId) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ let kitting = this.quota_calculation == 1 ? false : true;
|
|
|
let params1 = {
|
|
let params1 = {
|
|
|
salesOrderId: this.salesOrderId,
|
|
salesOrderId: this.salesOrderId,
|
|
|
bomVersionId: this.formInline.bomId,
|
|
bomVersionId: this.formInline.bomId,
|
|
|
- produceType: 2
|
|
|
|
|
|
|
+ produceType: 2,
|
|
|
|
|
+ startTime: this.startTime,
|
|
|
|
|
+ kitting: kitting
|
|
|
};
|
|
};
|
|
|
let params2 = {
|
|
let params2 = {
|
|
|
salesOrderId: this.salesOrderId,
|
|
salesOrderId: this.salesOrderId,
|
|
|
bomVersionId: this.formInline.bomId,
|
|
bomVersionId: this.formInline.bomId,
|
|
|
- produceType: 3
|
|
|
|
|
|
|
+ produceType: 3,
|
|
|
|
|
+ startTime: this.startTime,
|
|
|
|
|
+ kitting: kitting
|
|
|
};
|
|
};
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
try {
|
|
try {
|
|
@@ -823,12 +900,10 @@
|
|
|
// 使用Promise.all并行执行多个Promise
|
|
// 使用Promise.all并行执行多个Promise
|
|
|
let results = await Promise.all([p1, p2]);
|
|
let results = await Promise.all([p1, p2]);
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
- console.log(results, 'results');
|
|
|
|
|
// 这里可以继续对results做后续处理,比如解构等
|
|
// 这里可以继续对results做后续处理,比如解构等
|
|
|
const [result1, result2] = results;
|
|
const [result1, result2] = results;
|
|
|
// 示例:可以接着处理result1和result2,比如合并数据等
|
|
// 示例:可以接着处理result1和result2,比如合并数据等
|
|
|
const mergeData = this.handleMergedData(result1, result2);
|
|
const mergeData = this.handleMergedData(result1, result2);
|
|
|
- console.log(mergeData, 'mergeData');
|
|
|
|
|
this.resultProcess(mergeData);
|
|
this.resultProcess(mergeData);
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
@@ -862,10 +937,13 @@
|
|
|
if (this.source == 'list') {
|
|
if (this.source == 'list') {
|
|
|
let produceType =
|
|
let produceType =
|
|
|
this.produceType == 1 ? 1 : attributeType == 2 ? 2 : 3;
|
|
this.produceType == 1 ? 1 : attributeType == 2 ? 2 : 3;
|
|
|
|
|
+ let kitting = this.quota_calculation == 1 ? false : true;
|
|
|
params = {
|
|
params = {
|
|
|
salesOrderId: this.salesOrderId,
|
|
salesOrderId: this.salesOrderId,
|
|
|
bomVersionId: data.bomId,
|
|
bomVersionId: data.bomId,
|
|
|
- produceType: produceType
|
|
|
|
|
|
|
+ produceType: produceType,
|
|
|
|
|
+ startTime: this.startTime,
|
|
|
|
|
+ kitting: kitting
|
|
|
};
|
|
};
|
|
|
api = findMaterialInfoSalesorder;
|
|
api = findMaterialInfoSalesorder;
|
|
|
} else {
|
|
} else {
|
|
@@ -873,7 +951,9 @@
|
|
|
params = {
|
|
params = {
|
|
|
categoryId: this.orderInfo.categoryId,
|
|
categoryId: this.orderInfo.categoryId,
|
|
|
bomVersionId: this.orderInfo.bomCategoryId,
|
|
bomVersionId: this.orderInfo.bomCategoryId,
|
|
|
- requiredFormingNum: this.orderInfo.contractNum
|
|
|
|
|
|
|
+ requiredFormingNum: this.orderInfo.contractNum,
|
|
|
|
|
+ startTime: this.startTime,
|
|
|
|
|
+ kitting: kitting
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
@@ -947,31 +1027,7 @@
|
|
|
success() {
|
|
success() {
|
|
|
this.bomVChange(this.formInline.bomId);
|
|
this.bomVChange(this.formInline.bomId);
|
|
|
},
|
|
},
|
|
|
- // issuePlan() {
|
|
|
|
|
- // if (this.selection.length == 0) {
|
|
|
|
|
- // return this.$message.warning('请至少选择一条数据');
|
|
|
|
|
- // }
|
|
|
|
|
- // for (let i = 0; i < this.selection.length; i++) {
|
|
|
|
|
- // let el = this.selection[i];
|
|
|
|
|
- // if (el.finalState == 1) {
|
|
|
|
|
- // return this.$message.warning('必须选择最终状态为缺料的数据');
|
|
|
|
|
- // }
|
|
|
|
|
- // if (el.hasIssued) {
|
|
|
|
|
- // return this.$message.warning('必须选择下发状态为未下发的数据');
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
|
|
|
|
|
- // this.orderShow = true;
|
|
|
|
|
- // // 获取新建销售订单数据
|
|
|
|
|
- // const list = this.getSalaOrder();
|
|
|
|
|
- // console.log(this.$refs, 'this.$refs');
|
|
|
|
|
-
|
|
|
|
|
- // this.$nextTick(() => {
|
|
|
|
|
- // this.$refs.createDialog.open();
|
|
|
|
|
- // this.$refs.createDialog.form.productInfoList = list;
|
|
|
|
|
- // this.$refs.createDialog.getProcessRouteData(list, this.orderInfo.id);
|
|
|
|
|
- // });
|
|
|
|
|
- // },
|
|
|
|
|
// 获取新建销售订单数据
|
|
// 获取新建销售订单数据
|
|
|
getSalaOrder() {
|
|
getSalaOrder() {
|
|
|
let obj = {};
|
|
let obj = {};
|
|
@@ -1027,6 +1083,13 @@
|
|
|
this.bomListType = [];
|
|
this.bomListType = [];
|
|
|
this.datasourceList = [];
|
|
this.datasourceList = [];
|
|
|
this.datasourceAllList = [];
|
|
this.datasourceAllList = [];
|
|
|
|
|
+ this.orderInfo = {};
|
|
|
|
|
+ this.kitComInfo = {};
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ onSubmit() {
|
|
|
|
|
+ this.getKitting();
|
|
|
|
|
+ this.attributeChange(this.formInline.attributeType);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|