diff --git a/src/views/mes/production/index.vue b/src/views/mes/production/index.vue
index cbfdd9e..3908c35 100644
--- a/src/views/mes/production/index.vue
+++ b/src/views/mes/production/index.vue
@@ -110,7 +110,7 @@
@pagination="getList"
/>
-
+
@@ -185,7 +185,7 @@ export default {
this.queryParams.productDateStart = moment(this.queryParams.productDateArray[0]).format('YYYY-MM-DD');
this.queryParams.productDateEnd = moment(this.queryParams.productDateArray[1]).format('YYYY-MM-DD');
}
-
+
this.loading = true;
getProductionList(this.queryParams).then(response => {
this.prepareList = response.rows;
@@ -243,7 +243,7 @@ export default {
/** 导出按钮操作 */
handleExport() {
- this.download('mes/prepare/export', {
+ this.download('mes/reportWork/productionExport', {
...this.queryParams
}, `prepare_${new Date().getTime()}.xlsx`)
},
diff --git a/src/views/plan/order/index.vue b/src/views/plan/order/index.vue
index c9c8e9b..4fd970d 100644
--- a/src/views/plan/order/index.vue
+++ b/src/views/plan/order/index.vue
@@ -345,18 +345,12 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -378,6 +372,13 @@
+
+
+
+
+
+
@@ -411,12 +412,13 @@
row-key="workorderCode"
style="width: 100%"
max-height="240"
+ default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
-
+
@@ -548,7 +550,7 @@ export default {
// 拆分表单参数
splitForm: {
id: null,
- prodLineCode: null,
+ prodLineCodeArray: [],
splitNum: null,
productDate: null,
shiftId: null,
@@ -557,7 +559,10 @@ export default {
},
// 表单校验
rules: {},
- addrules: {}
+ addrules: {},
+ /**********************************/
+ eRouteProps: { multiple: true },
+ eRouteOptions: []
}
},
created() {
@@ -576,7 +581,7 @@ export default {
// 选择工艺
changeRoute(routeCode) {
getProEquipment(routeCode).then(response => {
- this.proline = response.data
+ this.eRouteOptions = response.data
})
},
// 选择线体改变
@@ -877,9 +882,9 @@ export default {
})
return
}
- if (this.splitForm.prodLineCode == null) {
+ if (this.splitForm.prodLineCodeArray.length ==0) {
this.$message({
- message: '请选择线体!',
+ message: '请选择各流程节点的设备!',
type: 'warning'
})
return
@@ -924,7 +929,7 @@ export default {
//下面是请求处理
const data = {
formFields: this.formFields,
- prodLineCode: this.splitForm.prodLineCode,
+ prodLineCodeArray: this.splitForm.prodLineCodeArray,
productDate: this.splitForm.productDate,
shiftId: this.splitForm.shiftId,
splitNum: this.splitForm.splitNum,
@@ -946,7 +951,7 @@ export default {
// 清除缓存
this.splitForm = {
id: null,
- prodLineCode: null,
+ prodLineCode: [],
splitNum: null,
productDate: null,
shiftId: null,
@@ -1076,7 +1081,7 @@ export default {
resetBatch() {
this.splitForm = {
id: null,
- prodLineCode: null,
+ prodLineCode: [],
splitNum: null,
productDate: null,
shiftId: null,
@@ -1146,6 +1151,7 @@ export default {
if (row != null) {
this.splitForm.parentOrder = row.orderCode
}
+
getOrder(row.id).then(response => {
this.splitForm = response.data
this.splitOpen = true
diff --git a/src/views/plan/workorder/index.vue b/src/views/plan/workorder/index.vue
index 741e5c7..31b5a38 100644
--- a/src/views/plan/workorder/index.vue
+++ b/src/views/plan/workorder/index.vue
@@ -170,7 +170,7 @@
-
+
{{ parseTime(scope.row.productDate, '{y}-{m}-{d}') }}
@@ -343,18 +343,12 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -379,6 +373,13 @@
+
+
+
+
+
+
@@ -417,7 +418,7 @@
-
+
@@ -505,7 +506,7 @@ export default {
refreshProTable: true,
// 拆分form
splitForm:{
- prodLineCode: null,
+ prodLineCodeArray: [],
splitNum: null,
productDate: null,
shiftId: null,
@@ -585,8 +586,12 @@ export default {
unit: [
{ required: true, message: "单位不能为空", trigger: "blur" }
],
- }
+ },
+ /**********************************/
+ eRouteProps: { multiple: true },
+ eRouteOptions: []
};
+
},
created() {
this.getList();
@@ -710,7 +715,7 @@ export default {
/** 更改工艺 */
routeChange(e){
getProEquipment(e).then(response => {
- this.proline = response.data
+ this.eRouteOptions = response.data
})
this.workForm.routeCode = e
},
@@ -768,10 +773,7 @@ export default {
checkDate(e){
this.workForm.productDate = e
},
- /** 成型机选择 */
- machineType(e) {
- this.workForm.prodLineCode = e
- },
+
/** 查询生产工单列表 */
getList() {
this.loading = true;
@@ -809,6 +811,7 @@ export default {
quantitySplit: null,
routeCode: null,
prodLineCode: null,
+ prodLineCodeArray:[],
productDate: null,
shiftId: null,
parentOrder: null,
@@ -859,14 +862,14 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
- // 除了未派发都不允许修改
- if (this.selectWork.status == "w1"){
- this.$message({
- message:'工单已派发!不可修改!',
- type:'warning'
- })
- return;
- }
+ // 除了未派发都不允许修改(改为:未生产前都可以修改)
+ //if (this.selectWork.status == "w1"){
+ // this.$message({
+ // message:'工单已派发!不可修改!',
+ // type:'warning'
+ // })
+ // return;
+ //}
// 校验是否可以修改
checkWorkOrder(this.selectWork.workorderId).then(response => {
if (response.code == 500){
@@ -882,7 +885,7 @@ export default {
this.splitData = [];
this.productData =[];
this.splitForm={
- prodLineCode: null,
+ prodLineCodeArray: [],
splitNum: null,
productDate: null,
shiftId: null,
@@ -902,6 +905,10 @@ export default {
getProEquipment(this.selectWork.routeCode).then(response => {
this.proline = response.data
})
+ })
+ // 获取工艺设备信息
+ getProEquipment(this.selectWork.routeCode).then(response2 => {
+ this.eRouteOptions = response2.data
})
// 获取批次信息list
getWorkBatchList(this.selectWork).then(response => {
@@ -932,7 +939,7 @@ export default {
// 设置拆分数量
this.splitForm.splitNum = this.splitData[0].quantitySplit
// 设置选择机型
- this.splitForm.prodLineCode = this.splitData[0].prodLineCode
+ this.splitForm.prodLineCodeArray = response.data.workOrder.prodLineCodeArray
// 设置班次
this.splitForm.shiftId = this.splitData[0].shiftDesc
// 设置工艺
@@ -978,21 +985,6 @@ export default {
},
/** 拆分-提交按钮 */
submitForm() {
- // 判断数据不能为空
- if (this.splitForm.splitNum == null || this.splitForm.shiftId == null || this.splitForm.prodLineCode == null || this.splitForm.routeCode == null) {
- this.$message({
- message: '数据不能为空!',
- type: 'warning'
- })
- return
- }
- if (this.splitForm.routeCode == null) {
- this.$message({
- message: '数据不能为空!',
- type: 'warning'
- })
- return
- }
// 判断如果拆分数量不等于拆分批次数量之和
let sum = 0
for (let i = 0; i < this.formFields.length; i++) {
@@ -1020,7 +1012,7 @@ export default {
//下面是请求处理
const data = {
formFields: this.formFields,
- prodLineCode: this.workForm.prodLineCode,
+ prodLineCodeArray: this.splitForm.prodLineCodeArray,
productDate: this.splitForm.productDate,
shiftId: this.workForm.shiftId,
splitNum: this.workForm.splitNum,
@@ -1042,7 +1034,7 @@ export default {
// 清除缓存
this.splitForm = {
id: null,
- prodLineCode: null,
+ prodLineCodeArray: [],
splitNum: null,
productDate: null,
shiftId: null,