|
@@ -436,68 +436,63 @@
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
async check() {
|
|
async check() {
|
|
|
- console.log(111111333333);
|
|
|
|
|
-
|
|
|
|
|
if (this.selection.length > 0) {
|
|
if (this.selection.length > 0) {
|
|
|
- // let codeList = [];
|
|
|
|
|
- // this.selection.map((ele) => {
|
|
|
|
|
- // if (ele.code) {
|
|
|
|
|
- // codeList.push(ele.code);
|
|
|
|
|
- // }
|
|
|
|
|
- // });
|
|
|
|
|
- // let res = await getByCodeList(codeList);
|
|
|
|
|
- // console.log(res, '0000000000000000');
|
|
|
|
|
- // let flag = true;
|
|
|
|
|
- // let type = 0;
|
|
|
|
|
- // let data = [];
|
|
|
|
|
- // let data2 = [];
|
|
|
|
|
- // let first = null;
|
|
|
|
|
- // let firstFlag = true;
|
|
|
|
|
- // if (res) {
|
|
|
|
|
- // for (let ele of res) {
|
|
|
|
|
- // let list = ele.productInfoList;
|
|
|
|
|
- // if (firstFlag) {
|
|
|
|
|
- // first = ele;
|
|
|
|
|
- // firstFlag = false;
|
|
|
|
|
- // }
|
|
|
|
|
- // if (list) {
|
|
|
|
|
- // let pre = null;
|
|
|
|
|
- // for (let item of list) {
|
|
|
|
|
- // if (!item.productType) {
|
|
|
|
|
- // flag = false;
|
|
|
|
|
- // this.$message.warning(
|
|
|
|
|
- // '产品(' + item.productCode + ')未选择生产类型'
|
|
|
|
|
- // );
|
|
|
|
|
- // return;
|
|
|
|
|
- // }
|
|
|
|
|
- // type = item.productType;
|
|
|
|
|
- // if (!item.bomCategoryId) {
|
|
|
|
|
- // flag = false;
|
|
|
|
|
- // this.$message.warning(
|
|
|
|
|
- // '产品(' + item.productCode + ')未选择BOM版本'
|
|
|
|
|
- // );
|
|
|
|
|
- // return;
|
|
|
|
|
- // }
|
|
|
|
|
- // if (pre) {
|
|
|
|
|
- // if (pre.productType != item.productType) {
|
|
|
|
|
- // flag = false;
|
|
|
|
|
- // this.$message.warning('请选择生产类型相同的订单');
|
|
|
|
|
- // return;
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- // pre = item;
|
|
|
|
|
- // JSON.parse(JSON.stringify({}))
|
|
|
|
|
- // data.push(item.id);
|
|
|
|
|
- // item.code = ele.code;
|
|
|
|
|
- // data2.push(item);
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- // console.log(this.selection, 'this.selection 333333');
|
|
|
|
|
- // console.log(data2,'data2')
|
|
|
|
|
- // console.log(first,'first 123')
|
|
|
|
|
- this.$refs.orderHomogeneityInspectDialog.open(this.selection);
|
|
|
|
|
|
|
+ let codeList = [];
|
|
|
|
|
+ this.selection.map((ele) => {
|
|
|
|
|
+ if (ele.code) {
|
|
|
|
|
+ codeList.push(ele.code);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ let res = await getByCodeList(codeList);
|
|
|
|
|
+ console.log(res, '0000000000000000');
|
|
|
|
|
+ let flag = true;
|
|
|
|
|
+ let type = 0;
|
|
|
|
|
+ let data = [];
|
|
|
|
|
+ let data2 = [];
|
|
|
|
|
+ let first = null;
|
|
|
|
|
+ let firstFlag = true;
|
|
|
|
|
+ if (res) {
|
|
|
|
|
+ for (let ele of res) {
|
|
|
|
|
+ let list = ele.productInfoList;
|
|
|
|
|
+ if (firstFlag) {
|
|
|
|
|
+ first = ele;
|
|
|
|
|
+ firstFlag = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (list) {
|
|
|
|
|
+ let pre = null;
|
|
|
|
|
+ for (let item of list) {
|
|
|
|
|
+ // if (!item.productType) {
|
|
|
|
|
+ // flag = false;
|
|
|
|
|
+ // this.$message.warning(
|
|
|
|
|
+ // '产品(' + item.productCode + ')未选择生产类型'
|
|
|
|
|
+ // );
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // type = item.productType;
|
|
|
|
|
+ // if (!item.bomCategoryId) {
|
|
|
|
|
+ // flag = false;
|
|
|
|
|
+ // this.$message.warning(
|
|
|
|
|
+ // '产品(' + item.productCode + ')未选择BOM版本'
|
|
|
|
|
+ // );
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if (pre) {
|
|
|
|
|
+ // if (pre.productType != item.productType) {
|
|
|
|
|
+ // flag = false;
|
|
|
|
|
+ // this.$message.warning('请选择生产类型相同的订单');
|
|
|
|
|
+ // return;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ pre = item;
|
|
|
|
|
+ // JSON.parse(JSON.stringify({}))
|
|
|
|
|
+ data.push(item.id);
|
|
|
|
|
+ item.code = ele.code;
|
|
|
|
|
+ data2.push(item);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$refs.orderHomogeneityInspectDialog.open(data2, first);
|
|
|
// if (flag) {
|
|
// if (flag) {
|
|
|
// // 齐料
|
|
// // 齐料
|
|
|
// if (type == 2) {
|
|
// if (type == 2) {
|