bug 2
This commit is contained in:
@@ -123,6 +123,7 @@
|
||||
filterable
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@change="setLine"
|
||||
placeholder="请选择车间名称">
|
||||
<el-option
|
||||
v-for="(dict, index) in getDictDatas('workshop')"
|
||||
@@ -163,7 +164,7 @@
|
||||
import { getProductAll } from '@/api/base/product'
|
||||
import { getProcessFlowList, workOrderList } from '@/api/base/orderManage'
|
||||
import { createCoreWO, updateCoreWO, getCode, getCoreWO } from '@/api/base/coreWorkOrder'
|
||||
import { getLineAll } from '@/api/base/productionLine'
|
||||
import { getLinelistByRoom, getLineAll } from '@/api/base/productionLine'
|
||||
import basicAdd from '../../core/mixins/basic-add';
|
||||
|
||||
export default {
|
||||
@@ -225,6 +226,14 @@ export default {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
setLine() {
|
||||
// 产线
|
||||
getLinelistByRoom({
|
||||
room: this.dataForm.roomNameDict
|
||||
}).then(res => {
|
||||
this.productLineList = res.data || []
|
||||
})
|
||||
},
|
||||
// 工艺变更
|
||||
materialMethodChange(val) {
|
||||
if (val === 2 && !this.dataForm.processFlowId) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-03-13 14:47:44
|
||||
* @LastEditTime: 2024-03-15 15:34:58
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -17,30 +17,47 @@
|
||||
</small-title>
|
||||
<div class="content">
|
||||
<div class="formContent">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<div class="blodTip">工单名称</div>
|
||||
<div class="lightTip">{{ dataForm.name }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="blodTip">工单编码</div>
|
||||
<div class="lightTip">{{ dataForm.code }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="blodTip">产品名称</div>
|
||||
<div class="lightTip">{{ dataForm.productName }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<div class="blodTip">产品规格</div>
|
||||
<div class="lightTip">{{ dataForm.specifications }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="blodTip">实际生产数量</div>
|
||||
<div class="lightTip">{{ dataForm.expectedTime }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form :model="dataForm" ref="dataForm" label-width="120px" label-position="top" class="demo-ruleForm" :rules="rules">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工单名称" prop="name">
|
||||
<!-- <el-input v-model="dataForm.name" autocomplete="off"></el-input> -->
|
||||
<span>{{ dataForm.name }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工单编码" prop="code">
|
||||
<span>{{ dataForm.code }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产品名称" prop="productName">
|
||||
<span>{{ dataForm.productName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产品规格" prop="specifications">
|
||||
<span>{{ dataForm.specifications }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="实际生产数量" prop="actualQuantity">
|
||||
<el-input v-model.number="dataForm.actualQuantity" autocomplete="off" style="width: 80%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="实际生产完成时间" prop="finishProduceTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.finishProduceTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期时间" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="attr-list">
|
||||
@@ -99,11 +116,11 @@
|
||||
</div>
|
||||
|
||||
<div class="drawer-body__footer">
|
||||
<el-button style="" type="primary" @click="goback()">关闭</el-button>
|
||||
<el-button style="" @click="goback()">取消</el-button>
|
||||
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button> -->
|
||||
</el-button> -->
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -117,7 +134,7 @@
|
||||
|
||||
<script>
|
||||
import basicAdd from '../../core/mixins/basic-add';
|
||||
import { getConOrderList, updateConCoreWOr, getCoreWO } from '@/api/base/coreWorkOrder';
|
||||
import { getConOrderList, updateConCoreWOr, getCoreWO, statusChange } from '@/api/base/coreWorkOrder';
|
||||
import SmallTitle from '../material/SmallTitle';
|
||||
// import { parseTime } from '../../core/mixins/code-filter';
|
||||
// import attrAdd from './attr-add';
|
||||
@@ -148,11 +165,43 @@ export default {
|
||||
tableData: [],
|
||||
visible: false,
|
||||
isdetail: false,
|
||||
idAttrShow: false
|
||||
idAttrShow: false,
|
||||
rules: {
|
||||
name: [{ required: true, message: "工单名称不能为空", trigger: "blur" }],
|
||||
finishProduceTime: [{ required: true, message: "实际生产完成时间不能为空", trigger: "change" }]
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
statusChange({
|
||||
id: this.dataForm.id,
|
||||
status: 4,
|
||||
finishProduceTime: this.dataForm.finishProduceTime,
|
||||
actualQuantity: this.dataForm.actualQuantity
|
||||
}).then(response => {
|
||||
this.$modal.msgSuccess("操作成功!工单状态稍后将会更新!");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
// this.urlOptions.createURL(this.dataForm).then(response => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
// this.visible = false;
|
||||
// this.$emit("refreshDataList");
|
||||
// });
|
||||
});
|
||||
},
|
||||
initData() {
|
||||
// this.materialAttrList.splice(0);
|
||||
this.listQuery.total = 0;
|
||||
@@ -255,6 +304,9 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
/* .item .el-form-item__label {
|
||||
color: red;
|
||||
} */
|
||||
.drawer >>> .el-drawer {
|
||||
border-radius: 8px 0 0 8px;
|
||||
display: flex;
|
||||
@@ -263,6 +315,7 @@ export default {
|
||||
|
||||
.drawer >>> .el-form-item__label {
|
||||
padding: 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.drawer >>> .el-drawer__header {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-03-13 14:42:32
|
||||
* @LastEditTime: 2024-03-15 15:40:24
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -97,6 +97,10 @@
|
||||
<div class="blodTip">关联工艺</div>
|
||||
<div class="lightTip">{{ dataForm.processFlowName }}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="blodTip">车间名称</div>
|
||||
<div class="lightTip">{{ (dataForm.roomNameDict || dataForm.roomNameDict === 0) ? getDictDataLabel('workshop', dataForm.roomNameDict) : '-' }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -431,28 +431,33 @@ export default {
|
||||
opration = '终止'
|
||||
}
|
||||
console.log('22',val)
|
||||
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
statusChange(param).then(({ data }) => {
|
||||
this.$message({
|
||||
message: '操作成功!工单状态稍后将会更新!',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
// 分配产量
|
||||
if (param.status === 4) {
|
||||
this.allocationOrder(param);
|
||||
}
|
||||
},
|
||||
if (param.status !== 4) {
|
||||
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
statusChange(param).then(({ data }) => {
|
||||
this.$message({
|
||||
message: '操作成功!工单状态稍后将会更新!',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
// 分配产量
|
||||
// if (param.status === 4) {
|
||||
// this.allocationOrder(param);
|
||||
// }
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
})
|
||||
.catch(() => { });
|
||||
} else {
|
||||
// 完成弹出分配框
|
||||
this.allocationOrder(param);
|
||||
}
|
||||
}
|
||||
},
|
||||
allocationOrder(val) {
|
||||
@@ -460,20 +465,25 @@ export default {
|
||||
getConOrderList({
|
||||
workOrderId: val.id,
|
||||
}).then((response) => {
|
||||
if (response.data.length > 0) {
|
||||
this.$confirm('工单结束,可分配产量', "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.allocationVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.allocation.init(val.id, true);
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
}
|
||||
|
||||
this.$confirm('工单结束,可分配产量', "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.allocationVisible = true;
|
||||
this.$nextTick(() => {
|
||||
if (response.data.length > 0) {
|
||||
// 有绑定订单带id
|
||||
this.$refs.allocation.init(val.id);
|
||||
} else {
|
||||
this.$refs.allocation.init();
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
|
||||
// this.listQuery.total = response.data.total;
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user