bug
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-11-06 14:38:20
|
||||
* @LastEditTime: 2023-11-20 16:51:24
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -95,7 +95,8 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'material',
|
||||
label: '原料名称'
|
||||
label: '原料名称',
|
||||
filter: publicFormatter('material')
|
||||
},
|
||||
{
|
||||
prop: 'origin',
|
||||
@@ -103,7 +104,7 @@ const tableProps = [
|
||||
filter: (val) => ['', '内部', '采购'][val]
|
||||
},
|
||||
{
|
||||
prop: 'supplierId',
|
||||
prop: 'supplierName',
|
||||
label: '供应商',
|
||||
},
|
||||
{
|
||||
@@ -195,7 +196,7 @@ export default {
|
||||
...this.listQuery,
|
||||
workOrderId: this.dataForm.id,
|
||||
}).then((response) => {
|
||||
this.materialList = response.data.list;
|
||||
this.materialList = response.data.records;
|
||||
this.listQuery.total = response.data.total;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label="产品规格" prop="productSpec">
|
||||
<el-input v-model="dataForm.productSpec" disabled></el-input>
|
||||
<el-form-item label="产品规格" prop="specifications">
|
||||
<el-input v-model="dataForm.specifications" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -35,9 +35,9 @@
|
||||
<el-col :span='12'>
|
||||
<el-form-item label="计划开始时间">
|
||||
<el-date-picker
|
||||
v-model="planStartTime"
|
||||
v-model="dataForm.planStartTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="timestamp"
|
||||
style="width: 100%;"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
@@ -46,9 +46,9 @@
|
||||
<el-col :span='12'>
|
||||
<el-form-item label="计划完成时间">
|
||||
<el-date-picker
|
||||
v-model="planFinishTime"
|
||||
v-model="dataForm.planFinishTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="timestamp"
|
||||
style="width: 100%;"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
@@ -83,8 +83,8 @@
|
||||
<el-col :span='12'>
|
||||
<el-form-item label="物料计算方式" prop="materialMethod">
|
||||
<el-radio-group v-model="dataForm.materialMethod" @change="materialMethodChange">
|
||||
<el-radio :label="1">产品基础</el-radio>
|
||||
<el-radio :label="2">工艺扩展</el-radio>
|
||||
<el-radio :label="1">产品基础BOM</el-radio>
|
||||
<el-radio :label="2">工艺扩展BOM</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -168,7 +168,7 @@ export default {
|
||||
name: '',
|
||||
code: '',
|
||||
planProductId: '',
|
||||
productSpec: '',
|
||||
specifications: '',
|
||||
planStartTime: '',
|
||||
planFinishTime: '',
|
||||
planAssignQuantity: 0,
|
||||
@@ -186,7 +186,7 @@ export default {
|
||||
planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }],
|
||||
planAssignQuantity: [{ required: true, message: "计划投入数量不能为空", trigger: "blur" }],
|
||||
planQuantity: [{ required: true, message: "计划生产数量不能为空", trigger: "blur" }],
|
||||
productLineIds: [{ required: true, message: "产品不能为空", trigger: "change" }]
|
||||
productLineIds: [{ required: true, message: "关联产线不能为空", trigger: "change" }]
|
||||
},
|
||||
productList: [],
|
||||
processFlowList: [],
|
||||
@@ -232,6 +232,10 @@ export default {
|
||||
if (this.dataForm.id) {
|
||||
getCoreWO(id).then(response => {
|
||||
this.dataForm = response.data;
|
||||
if (this.dataForm.priority !== undefined) {
|
||||
this.dataForm.priority = String(this.dataForm.priority)
|
||||
}
|
||||
this.dataForm.priority
|
||||
});
|
||||
} else {
|
||||
if (this.urlOptions.isGetCode) {
|
||||
@@ -264,7 +268,11 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$emit("refreshDataList", true);
|
||||
console.log('121', this.dataForm.name)
|
||||
this.$emit("refreshDataList", {
|
||||
id: response.data,
|
||||
name: this.dataForm.name
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<el-input
|
||||
v-model="dataForm.batch"
|
||||
clearable
|
||||
placeholder="请输入规格" />
|
||||
placeholder="请输入批次号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="num">
|
||||
<el-input-number
|
||||
@@ -143,13 +143,19 @@ export default {
|
||||
},
|
||||
init(id) {
|
||||
this.dataForm.id = id || '';
|
||||
console.log('1', this.dataForm.id)
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
getCoreWOMa(this.dataForm.id).then((res) => {
|
||||
this.dataForm = res.data
|
||||
if (this.dataForm.unit !== undefined) {
|
||||
this.dataForm.unit = String(this.dataForm.unit)
|
||||
}
|
||||
if (this.dataForm.material !== undefined) {
|
||||
this.dataForm.material = String(this.dataForm.material)
|
||||
}
|
||||
console.log('111', this.dataForm)
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-11-16 13:45:13
|
||||
* @LastEditTime: 2023-11-22 09:47:53
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -16,6 +16,7 @@
|
||||
<!-- <small-title slot="title" :no-padding="true">
|
||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||
</small-title> -->
|
||||
<el-button style="float: right" type="primary" @click="goback()">返回</el-button>
|
||||
<div v-show="workOrderButton.length">
|
||||
<el-button v-for="(work, index) in workOrderButton" :key="index" type="primary" @click="init(work.id, true)">{{ work.name }}</el-button>
|
||||
</div>
|
||||
@@ -33,7 +34,7 @@
|
||||
<el-col :span="8">工单名称:{{ dataForm.name }}</el-col>
|
||||
<el-col :span="8">工单来源:{{ dataForm.triggerOrigin === 1 ? 'MES' : dataForm.triggerOrigin === 2 ? 'ERP' : ''}}</el-col>
|
||||
<el-col :span="8">所属订单:
|
||||
<span v-for="(item, index) in orderArray" :key="index" style="margin-right: 10px">{{ item.name }}</span>
|
||||
<span v-for="(item, index) in orderList" :key="index" style="margin-right: 10px">{{ item.orderName }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
@@ -42,7 +43,7 @@
|
||||
<el-col :span="8">计划生产数量:{{ dataForm.planQuantity }}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">预计用时(小时):{{ dataForm.expectedTime }}</el-col>
|
||||
<el-col :span="8">预计用时(小时):{{ dataForm.remainingTime }}</el-col>
|
||||
<el-col :span="8">计划投入数量:{{ dataForm.planAssignQuantity }}</el-col>
|
||||
<el-col :span="8">优先级:{{ fitlerP(dataForm.priority) }}</el-col>
|
||||
</el-row>
|
||||
@@ -63,9 +64,7 @@
|
||||
</small-title>
|
||||
<div class="formContent">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">订单创建时间:
|
||||
<span v-for="(item, index) in orderArray" :key="index" style="margin-right: 10px; white-space: pre-wrap">{{ parseTime(item.createTime) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="8">工单创建时间:{{ parseTime(dataForm.createTime) }}</el-col>
|
||||
<el-col :span="8">计划开始时间:{{ parseTime(dataForm.planStartTime) }}</el-col>
|
||||
<el-col :span="8">计划完成时间:{{ parseTime(dataForm.planFinishTime) }}</el-col>
|
||||
</el-row>
|
||||
@@ -143,7 +142,7 @@
|
||||
<script>
|
||||
// import basicAdd from '../../core/mixins/basic-add';
|
||||
import { getCoreWO, getMaterialBomPage, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
|
||||
import { orderList } from "@/api/base/orderManage";
|
||||
// import { orderList } from "@/api/base/orderManage";
|
||||
import { getProcessFlowList } from '@/api/base/orderManage'
|
||||
import SmallTitle from './SmallTitle';
|
||||
import { publicFormatter } from "@/utils/dict";
|
||||
@@ -186,7 +185,7 @@ const tableProps = [
|
||||
const tableProps1 = [
|
||||
{
|
||||
prop: 'materialName',
|
||||
label: '原料名称'
|
||||
label: '物料名称'
|
||||
},
|
||||
{
|
||||
prop: 'unit',
|
||||
@@ -223,7 +222,7 @@ export default {
|
||||
dataForm: {},
|
||||
orderList: [],
|
||||
materialList: [],
|
||||
orderArray: [],
|
||||
// orderArray: [],
|
||||
visible: false,
|
||||
isdetail: false,
|
||||
workOrderButton: [],
|
||||
@@ -336,12 +335,11 @@ export default {
|
||||
});
|
||||
}
|
||||
// 获取订单相关信息
|
||||
orderList({
|
||||
workOrderId: this.dataForm.id
|
||||
}).then((response) => {
|
||||
this.orderArray = response.data;
|
||||
// this.listQuery.total = response.data.total;
|
||||
});
|
||||
// orderList({
|
||||
// workOrderId: this.dataForm.id
|
||||
// }).then((response) => {
|
||||
// this.orderArray = response.data;
|
||||
// });
|
||||
},
|
||||
init(id, isdetail) {
|
||||
this.initData();
|
||||
@@ -374,8 +372,7 @@ export default {
|
||||
});
|
||||
},
|
||||
goback() {
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
this.$router.go(-1);
|
||||
// this.initData();
|
||||
},
|
||||
goEdit() {
|
||||
|
||||
@@ -213,7 +213,7 @@ export default {
|
||||
{
|
||||
name: 'status',
|
||||
type: 'equal',
|
||||
value: 3
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
name: 'status',
|
||||
@@ -313,7 +313,15 @@ export default {
|
||||
refreshWorkOrder(val) {
|
||||
console.log(val)
|
||||
if (val) {
|
||||
console.log('打印')
|
||||
// 预使用原料信息
|
||||
console.log('预使用原料信息')
|
||||
this.handleCancel()
|
||||
this.getDataList()
|
||||
this.materialVisible = true;
|
||||
this.addOrEditTitle = "预使用主原料信息";
|
||||
this.$nextTick(() => {
|
||||
this.$refs.material.init(val, true);
|
||||
});
|
||||
} else {
|
||||
this.successSubmit()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user