|
@@ -1037,7 +1037,7 @@
|
|
|
},
|
|
},
|
|
|
async getProducedData() {
|
|
async getProducedData() {
|
|
|
console.log(111111111111111);
|
|
console.log(111111111111111);
|
|
|
- let query = {...this.$route.query };
|
|
|
|
|
|
|
+ let query = { ...this.$route.query };
|
|
|
console.log(query, 'query');
|
|
console.log(query, 'query');
|
|
|
|
|
|
|
|
if (!query.producedList || query.producedList.length == 0) {
|
|
if (!query.producedList || query.producedList.length == 0) {
|
|
@@ -1052,7 +1052,7 @@
|
|
|
},
|
|
},
|
|
|
// 初始化时间赋值
|
|
// 初始化时间赋值
|
|
|
initTime() {
|
|
initTime() {
|
|
|
- let data = {...this.$route.query };
|
|
|
|
|
|
|
+ let data = { ...this.$route.query };
|
|
|
if (data.startTime) {
|
|
if (data.startTime) {
|
|
|
this.$set(this.form, 'startTime', data.startTime);
|
|
this.$set(this.form, 'startTime', data.startTime);
|
|
|
}
|
|
}
|
|
@@ -1182,7 +1182,7 @@
|
|
|
if (res.length) {
|
|
if (res.length) {
|
|
|
let o = res[0];
|
|
let o = res[0];
|
|
|
if (type == 'init') {
|
|
if (type == 'init') {
|
|
|
- let query = {...this.$route.query };
|
|
|
|
|
|
|
+ let query = { ...this.$route.query };
|
|
|
let id = query.bomCategoryId ? query.bomCategoryId : o.id;
|
|
let id = query.bomCategoryId ? query.bomCategoryId : o.id;
|
|
|
this.$set(this.form, 'bomCategoryId', id);
|
|
this.$set(this.form, 'bomCategoryId', id);
|
|
|
} else {
|
|
} else {
|
|
@@ -1210,7 +1210,7 @@
|
|
|
this.form.produceVersionName = '';
|
|
this.form.produceVersionName = '';
|
|
|
this.selectionRowShow = false; // ****
|
|
this.selectionRowShow = false; // ****
|
|
|
if (type == 'init') {
|
|
if (type == 'init') {
|
|
|
- let queryD = {...this.$route.query };
|
|
|
|
|
|
|
+ let queryD = { ...this.$route.query };
|
|
|
if (queryD.produceRoutingId && !queryD.bomCategoryId) {
|
|
if (queryD.produceRoutingId && !queryD.bomCategoryId) {
|
|
|
this.form.produceRoutingName = queryD.produceRoutingName;
|
|
this.form.produceRoutingName = queryD.produceRoutingName;
|
|
|
this.form.produceRoutingId = queryD.produceRoutingId;
|
|
this.form.produceRoutingId = queryD.produceRoutingId;
|
|
@@ -1261,8 +1261,15 @@
|
|
|
res.produceRoutingName || this.$route.query.produceRoutingName;
|
|
res.produceRoutingName || this.$route.query.produceRoutingName;
|
|
|
this.form.produceRoutingId =
|
|
this.form.produceRoutingId =
|
|
|
res.produceRoutingId || this.$route.query.produceRoutingId;
|
|
res.produceRoutingId || this.$route.query.produceRoutingId;
|
|
|
- this.form.factoriesId =
|
|
|
|
|
- res.factoriesId || this.$route.query.factoriesId;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (
|
|
|
|
|
+ !this.form.factoriesId &&
|
|
|
|
|
+ (res.produceRoutingId || this.$route.query.produceRoutingId)
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.form.factoriesId =
|
|
|
|
|
+ res.factoriesId || this.$route.query.factoriesId;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// this.form.produceType =
|
|
// this.form.produceType =
|
|
|
// res.produceType || this.$route.query.produceType
|
|
// res.produceType || this.$route.query.produceType
|
|
|
// ? parseInt(this.$route.query.produceType)
|
|
// ? parseInt(this.$route.query.produceType)
|
|
@@ -1344,8 +1351,9 @@
|
|
|
this.$emit('cancel');
|
|
this.$emit('cancel');
|
|
|
},
|
|
},
|
|
|
toSubmit() {
|
|
toSubmit() {
|
|
|
- if (!this.form.factoriesId)
|
|
|
|
|
|
|
+ if (!this.form.factoriesId) {
|
|
|
return this.$message.warning('请选择所属工厂');
|
|
return this.$message.warning('请选择所属工厂');
|
|
|
|
|
+ }
|
|
|
this.form.salesOrders.map((v) => {
|
|
this.form.salesOrders.map((v) => {
|
|
|
let arrTime = v.deliveryTime && v.deliveryTime.split(' ');
|
|
let arrTime = v.deliveryTime && v.deliveryTime.split(' ');
|
|
|
let arrTimeTow =
|
|
let arrTimeTow =
|
|
@@ -1526,7 +1534,7 @@
|
|
|
this.changeData();
|
|
this.changeData();
|
|
|
},
|
|
},
|
|
|
addEquipment() {
|
|
addEquipment() {
|
|
|
- let query = {...this.$route.query };
|
|
|
|
|
|
|
+ let query = { ...this.$route.query };
|
|
|
let orderType = query.orderType;
|
|
let orderType = query.orderType;
|
|
|
let arr = this.form.salesOrders;
|
|
let arr = this.form.salesOrders;
|
|
|
if (arr && arr.length > 0) {
|
|
if (arr && arr.length > 0) {
|
|
@@ -1758,7 +1766,9 @@
|
|
|
.catch(() => {
|
|
.catch(() => {
|
|
|
this.$message.error('发布失败,请重新发布!');
|
|
this.$message.error('发布失败,请重新发布!');
|
|
|
});
|
|
});
|
|
|
- } catch (error) {}
|
|
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ this.$message.error(error.message || '发布失败,请重新发布!');
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
loading.close();
|
|
loading.close();
|
|
|
}
|
|
}
|