更新bug #402

Merged
zwq merged 1 commits from projects/mes-zwq into projects/mes-test 2024-11-06 08:53:58 +08:00
11 changed files with 523 additions and 324 deletions

View File

@ -1,8 +1,8 @@
### ###
# @Author: Do not edit # @Author: Do not edit
# @Date: 2023-08-29 09:40:39 # @Date: 2023-08-29 09:40:39
# @LastEditTime: 2024-09-02 09:07:05 # @LastEditTime: 2024-10-21 16:41:54
# @LastEditors: zhp # @LastEditors: zwq
# @Description: # @Description:
### ###
# 开发环境配置 # 开发环境配置
@ -22,7 +22,7 @@ VUE_APP_TITLE = MES系统
# VUE_APP_BASE_API = 'http://192.168.1.56:48082' # VUE_APP_BASE_API = 'http://192.168.1.56:48082'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080' # VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# VUE_APP_BASE_API = 'http://192.168.1.64:48082' # VUE_APP_BASE_API = 'http://192.168.1.64:48082'
VUE_APP_BASE_API = 'http://192.168.1.20:48082' VUE_APP_BASE_API = 'http://mes2.kszny.picaiba.com'

View File

@ -407,7 +407,7 @@ export default {
} }
} }
.current-date { .current-date {
font-size: 10px; font-size: 15px;
font-weight: 500; font-weight: 500;
position: absolute; position: absolute;
right: 0px; right: 0px;

View File

@ -44,16 +44,17 @@ import { Message } from 'element-ui';
import LocalDataManager from './utils/local-data-manager'; import LocalDataManager from './utils/local-data-manager';
// import response from './response'; // import response from './response';
import moment from 'moment'; import moment from 'moment';
import { parseTime } from '@/utils/ruoyi'
export default { export default {
name: 'EquipmentFullParams', name: 'EquipmentFullParams',
components: {}, components: {},
props: {}, props: {},
data() { data() {
const now = new Date(); // const now = new Date().getTime();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()]; // const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date(y, m, d, 0, 0, 0, 0).getTime(); const today = new Date().getTime();
const aWeekAgo = today - 3600 * 1000 * 24 * 7; const tenminAgo = new Date(today - (10 * 60 * 1000)).getTime();
return { return {
searchBarFormConfig: [ searchBarFormConfig: [
{ {
@ -73,10 +74,10 @@ export default {
{ {
type: 'datePicker', type: 'datePicker',
label: '时间段', label: '时间段',
dateType: 'daterange', // datetimerange dateType: 'datetimerange', // datetimerange
format: 'yyyy-MM-dd HH:mm:ss', format: 'yyyy-MM-dd HH:mm:ss',
// valueFormat: 'yyyy-MM-dd HH:mm:ss', // valueFormat: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'timestamp', valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
@ -93,14 +94,20 @@ export default {
}, },
], ],
queryParams: { queryParams: {
id: null, equipmentId: null,
time: [new Date(aWeekAgo), new Date(today)], recordTime: [parseTime(tenminAgo), parseTime(today)],
}, },
tableList: [ tableList: [
// { // {
// key: 'base-table__key__1', // key: 'base-table__key__1',
// tableProps: [], // tableProps: [{
// list: [], // prop: 'name',
// label: 'name'
// }],
// dataManager: {dataList: [{name: '1'}]},
// list: [{
// name: '11'
// }],
// pageNo: 1, // pageNo: 1,
// pageSize: 3, // pageSize: 3,
// total: 0, // total: 0,
@ -111,7 +118,7 @@ export default {
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
if (Object.keys(to.params).length > 0) { if (Object.keys(to.params).length > 0) {
next((vm) => { next((vm) => {
vm.$set(vm.queryParams, 'id', to.params.equipmentId); vm.$set(vm.queryParams, 'equipmentId', to.params.equipmentId);
vm.$set( vm.$set(
vm.searchBarFormConfig[0], vm.searchBarFormConfig[0],
'defaultSelect', 'defaultSelect',
@ -122,6 +129,11 @@ export default {
'defaultSelect', 'defaultSelect',
to.params.equipmentCode to.params.equipmentCode
); );
vm.$set(
vm.searchBarFormConfig[2],
'defaultSelect',
vm.queryParams.recordTime
);
vm.handleQuery(); vm.handleQuery();
}); });
} else { } else {
@ -155,7 +167,7 @@ export default {
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
// clean job // clean job
this.$set(this.queryParams, 'id', null); this.$set(this.queryParams, 'equipmentId', null);
this.$set(this.searchBarFormConfig[0], 'defaultSelect', null); this.$set(this.searchBarFormConfig[0], 'defaultSelect', null);
this.$set(this.searchBarFormConfig[1], 'defaultSelect', null); this.$set(this.searchBarFormConfig[1], 'defaultSelect', null);
this.tableList = []; this.tableList = [];
@ -192,7 +204,7 @@ export default {
props.push({ props.push({
label: item.name, label: item.name,
prop: item.name, prop: item.name,
width: 128, // width: 128,
}); });
firstLineData[item.name] = `${item.minValue ?? ''}-${ firstLineData[item.name] = `${item.minValue ?? ''}-${
item.maxValue ?? '' item.maxValue ?? ''
@ -268,11 +280,18 @@ export default {
async handleSearchBarBtnClick({ btnName, timeVal }) { async handleSearchBarBtnClick({ btnName, timeVal }) {
if (timeVal && timeVal.length > 0) { if (timeVal && timeVal.length > 0) {
this.queryParams.time = timeVal; console.log('nihc ', timeVal)
} else { if (new Date(timeVal[1]).getTime() - new Date(timeVal[0]).getTime() <= 30 * 60 * 1000) {
this.queryParams.time = []; this.queryParams.recordTime = timeVal;
}
await this.handleQuery(); await this.handleQuery();
} else {
this.$message.warning('时间范围最大30分钟限制')
}
} else {
this.queryParams.recordTime = [];
this.$message.warning('时间段必选!')
}
}, },
handleEmitFun(table, val) { handleEmitFun(table, val) {
@ -295,9 +314,12 @@ export default {
} }
.tables { .tables {
display: grid; /* display: grid; */
grid-template-columns: 1fr 1fr; /* grid-template-columns: 1fr 1fr; */
gap: 18px; /* gap: 18px; */
display: flex;
flex-direction: column;
width: 100%;
} }
.tables >>> .baseTable { .tables >>> .baseTable {
@ -306,5 +328,6 @@ export default {
.custom-table { .custom-table {
overflow-x: hidden; overflow-x: hidden;
margin-bottom: 10px;
} }
</style> </style>

View File

@ -22,7 +22,7 @@ export default {
}, },
methods: { methods: {
changeInput() { changeInput() {
console.log(this.list) this.list.sType = 1
this.$emit('emitData', this.list) this.$emit('emitData', this.list)
} }
} }

View File

@ -31,9 +31,15 @@
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span='6'> <el-col :span='6'>
<el-form-item label="单价" prop="price"> <el-form-item label="产品规格" prop="specifications">
<el-input-number v-model="form.price" :min="0" :max="9999999999999" :precision='2' style="width: 100%;"> <el-input v-model="form.specifications"></el-input>
</el-input-number> </el-form-item>
</el-col>
<el-col :span='6'>
<el-form-item label="交货日期" prop="deliveTime">
<el-date-picker v-model="form.deliveTime" type="datetime" style="width: 100%;" value-format="timestamp"
@change="timeChange" placeholder="选择日期">
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span='6'> <el-col :span='6'>
@ -44,6 +50,16 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span='6'>
<el-form-item label="单价" prop="price">
<el-input-number v-model="form.price" :min="0" :max="9999999999999" :precision='2' style="width: 100%;">
</el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
</el-row>
<el-row :gutter="20">
<el-col :span='6'> <el-col :span='6'>
<el-form-item label="包装规格" prop="packSpec"> <el-form-item label="包装规格" prop="packSpec">
<el-select v-model="form.packSpec" placeholder="请选择" style="width: 100%;" clearable> <el-select v-model="form.packSpec" placeholder="请选择" style="width: 100%;" clearable>
@ -53,22 +69,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span='6'>
<el-form-item label="交货日期" prop="deliveTime">
<el-date-picker v-model="form.deliveTime" type="datetime" style="width: 100%;" value-format="timestamp"
@change="timeChange" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
</el-row>
<el-row :gutter="20">
<el-col :span='6'>
<el-form-item label="产品规格" prop="specifications">
<el-input v-model="form.specifications"></el-input>
</el-form-item>
</el-col>
<el-col :span='12'> <el-col :span='12'>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark"></el-input> <el-input v-model="form.remark"></el-input>

View File

@ -1,51 +1,79 @@
<!-- <!--
* @Author: zhp * @Author: zwq
* @Date: 2024-08-01 16:27:30 * @Date: 2024-09-26 14:08:58
* @LastEditTime: 2024-09-04 15:56:53 * @LastEditors: zwq
* @LastEditors: zhp * @LastEditTime: 2024-11-05 14:19:46
* @Description: * @Description:
--> -->
<template> <template>
<el-form ref="orderAddForm" :rules="rules" :model="form" :inline="true" class="demo-form-inline"> <el-form
ref="orderAddForm"
:rules="rules"
:model="form"
:inline="true"
class="demo-form-inline">
<!-- <el-row :gutter="20"> --> <!-- <el-row :gutter="20"> -->
<!-- <el-col :span='6'> --> <!-- <el-col :span='6'> -->
<el-form-item label="拆分数量" prop="attr3"> <el-form-item label="拆分数量" prop="attr3">
<el-input v-model.number="form.attr3" oninput="value=value.replace(/[^\d]/g,'')"></el-input> <el-input
v-model.number="form.attr3"
oninput="value=value.replace(/[^\d]/g,'')"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleSplit">确定</el-button> <el-button type="primary" @click="handleSplit">确定</el-button>
</el-form-item> </el-form-item>
<!-- </el-col> --> <!-- </el-col> -->
<!-- </el-row> --> <!-- </el-row> -->
<base-table :table-props="tableProps" :table-data="list" :max-height="tableH"> <base-table
:table-props="tableProps"
:table-data="list"
@emitFun="inputChange"
:max-height="tableH">
<!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="240" label="操作" :method-list="tableBtn" <!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="240" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> --> @clickBtn="handleClick" /> -->
</base-table> </base-table>
</el-form> </el-form>
</template> </template>
<script> <script>
import { getOrderCode, getOrderById, getProcessFlowList, orderUpdate, orderCreate, orderSplit } from '@/api/base/orderManage' import {
import { parseTime } from '@/utils/ruoyi' getOrderCode,
import inputArea from './inputArea.vue' getOrderById,
getProcessFlowList,
orderUpdate,
orderCreate,
orderSplit,
} from '@/api/base/orderManage';
import { getCustomerList } from '@/api/base/customer';
import { parseTime } from '@/utils/ruoyi';
import inputArea from './inputArea.vue';
import selectMember from './selectMember';
import selectTime from './selectTime';
const tableProps = [ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: '订单名称', label: '订单名称',
minWidth: 120, minWidth: 120,
showOverflowtooltip: true, showOverflowtooltip: true,
subcomponent: inputArea subcomponent: inputArea,
}, },
{ {
prop: 'code', prop: 'code',
label: '订单编码', label: '订单编码',
minWidth: 180, minWidth: 180,
subcomponent: inputArea subcomponent: inputArea,
}, },
{ {
prop: 'productName', prop: 'productName',
label: '产品', label: '产品',
showOverflowtooltip: true, showOverflowtooltip: true,
subcomponent: inputArea subcomponent: inputArea,
},
{
prop: 'specifications',
label: '产品规格',
showOverflowtooltip: true,
subcomponent: inputArea,
}, },
// { // {
// prop: 'priority', // prop: 'priority',
@ -56,40 +84,40 @@ const tableProps = [
prop: 'planQuantity', prop: 'planQuantity',
label: '计划加工量', label: '计划加工量',
width: 100, width: 100,
subcomponent: inputArea subcomponent: inputArea,
}, },
{ {
prop: 'deliveTime', prop: 'deliveTime',
label: '交货日期', label: '交货日期',
filter: parseTime, filter: parseTime,
minWidth: 160, minWidth: 160,
subcomponent: inputArea subcomponent: selectTime,
}, },
{ {
prop: 'customerId', prop: 'customerId',
label: '客户', label: '客户',
showOverflowtooltip: true, showOverflowtooltip: true,
subcomponent: inputArea subcomponent: selectMember,
}, },
{ {
prop: 'price', prop: 'price',
label: '单价', label: '单价',
width: 100, width: 100,
subcomponent: inputArea subcomponent: inputArea,
}, },
{ {
prop: 'packSpec', prop: 'packSpec',
label: '包装规格', label: '包装规格',
width: 100, width: 100,
subcomponent: inputArea subcomponent: selectMember,
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注',
width: 100, width: 100,
subcomponent: inputArea subcomponent: inputArea,
}, },
] ];
export default { export default {
name: 'OrderAdd', name: 'OrderAdd',
data() { data() {
@ -105,47 +133,57 @@ export default {
planProductId: '', planProductId: '',
price: '', price: '',
customerId: '', customerId: '',
attr3:undefined, attr3: undefined,
priority: '', priority: '',
packSpec: '', packSpec: '',
workers: '', workers: '',
materialMethod: 1, materialMethod: 1,
remark: '', remark: '',
deliveTime:undefined, deliveTime: undefined,
// description: '', // description: '',
planStartTime: '', planStartTime: '',
}, },
rules: { rules: {
attr3: [{ required: true, message: "拆分数量不能为空", trigger: "blur" }], attr3: [
{ required: true, message: '拆分数量不能为空', trigger: 'blur' },
],
}, },
productList: [], productList: [],
customerList: [], customerList: [],
processFlowList: [], processFlowList: [],
isEdit: false // isEdit: false, //
} };
}, },
created () { created() {
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260) this.tableH = this.tableHeight(260);
}) });
}, },
methods: { methods: {
handleSplit() { handleSplit() {
if (this.form.attr3) {
this.list = [];
let obj = { let obj = {
attr3: this.form.attr3, attr3: this.form.attr3,
id:this.form.id id: this.form.id,
} };
orderSplit(obj).then((res) => { orderSplit(obj).then((res) => {
this.list = res.data this.list = res.data;
}) this.list.forEach((item, index) => {
item.name = item.name + '-' + (index + 1);
});
});
} else {
this.$message('拆分数量不能为空');
}
}, },
init(obj) { init(obj) {
// this.getList() this.getList();
// if (obj) { // if (obj) {
this.isEdit = true this.isEdit = true;
this.form = {} this.form = {};
this.list = [] this.list = [];
this.form.id = obj.id this.form.id = obj.id;
// getOrderById({id: this.form.id}).then(res => { // getOrderById({id: this.form.id}).then(res => {
// if (res.code === 0) { // if (res.code === 0) {
// this.form.name = res.data.name // this.form.name = res.data.name
@ -174,20 +212,21 @@ export default {
// }) // })
// } // }
}, },
// getList() { getList() {
// // //
// getProductAll().then(res => { // getProductAll().then(res => {
// this.productList = res.data || [] // this.productList = res.data || []
// }) // })
// // //
// getCustomerList().then(res => { getCustomerList().then((res) => {
// this.customerList = res.data || [] this.customerList = res.data || [];
// }) this.$set(this.tableProps[6], 'customerList', this.customerList);
// // });
//
// getProcessFlowList().then(res => { // getProcessFlowList().then(res => {
// this.processFlowList = res.data || [] // this.processFlowList = res.data || []
// }) // })
// }, },
// timeChange() { // timeChange() {
// if (this.form.planStartTime && this.form.planFinishTime) { // if (this.form.planStartTime && this.form.planFinishTime) {
// if (this.form.planStartTime > this.form.planFinishTime) { // if (this.form.planStartTime > this.form.planFinishTime) {
@ -209,11 +248,29 @@ export default {
// this.form.materialMethod = 1 // this.form.materialMethod = 1
// } // }
// }, // },
inputChange(data) {
console.log(data)
switch (data.sType) {
case 1:
this.list[data._pageIndex - 1][data.prop] = data[data.prop];
break;
case 2:
this.list[data._pageIndex - 1][data.prop] = data[data.prop];
break;
case 3:
this.list[data._pageIndex - 1][data.prop] = data.deliveTime;
break;
default:
console.log(val);
}
},
submitForm() { submitForm() {
Promise.all(this.list.map((ele) => { Promise.all(
this.list.map((ele) => {
return orderCreate(ele); return orderCreate(ele);
})).then((res) => { })
this.$modal.msgSuccess("操作成功"); ).then((res) => {
this.$modal.msgSuccess('操作成功');
this.$emit('splitWorkOrderSubmit'); this.$emit('splitWorkOrderSubmit');
}); });
@ -250,8 +307,8 @@ export default {
// }) // })
}, },
formClear() { formClear() {
this.$refs.orderAddForm.resetFields() this.$refs.orderAddForm.resetFields();
} },
} },
} };
</script> </script>

View File

@ -0,0 +1,51 @@
<template>
<div class="tableInner">
<el-select
v-model="list[list.prop]"
@change="changeInput">
<el-option
v-for="item in list.prop === 'packSpec'
? getDictDatas(DICT_TYPE.PACK_SPEC)
: list.customerList"
:key="list.prop === 'packSpec' ? item.value : item.id"
:label="list.prop === 'packSpec' ? item.label : item.name"
:value="
list.prop === 'packSpec' ? parseInt(item.value) : item.id
"></el-option>
</el-select>
</div>
</template>
<script>
export default {
name: 'InputArea',
props: {
injectData: {
type: Object,
default: () => ({}),
},
itemProp: {
type: String,
},
},
data() {
return {
list: this.injectData,
};
},
created() {
},
methods: {
changeInput() {
this.list.sType = 2;
this.$emit('emitData', this.list);
},
},
};
</script>
<style scoped>
.tableInner .el-input__inner {
border: none;
padding: 0;
height: 33px;
}
</style>

View File

@ -0,0 +1,47 @@
<template>
<div class="tableInner">
<el-date-picker
@change="changeInput"
v-model="list.deliveTime"
type="datetime"
size="mini"
:style="{width:'100%'}"
format='yyyy-MM-dd'
value-format="timestamp"
prefix-icon="none"
placeholder="选择日期">
</el-date-picker>
</div>
</template>
<script>
export default {
name: "InputArea",
props: {
injectData: {
type: Object,
default: () => ({}),
},
itemProp: {
type: String,
},
},
data() {
return {
list: this.injectData,
};
},
methods: {
changeInput() {
this.list.sType = 3
this.$emit("emitData", this.list);
},
},
};
</script>
<style scoped>
.tableInner .el-input__inner {
border: none;
padding: 0;
height: 33px;
}
</style>

View File

@ -39,11 +39,11 @@ import orderNum from './components/orderNum.vue'
import AddWorkOrder from './components/addWorkOrder' import AddWorkOrder from './components/addWorkOrder'
import { publicFormatter } from '@/utils/dict' import { publicFormatter } from '@/utils/dict'
const tableProps = [ const tableProps = [
{ // {
prop: 'type', // prop: 'type',
label: '订单类型', // label: '',
showOverflowtooltip: true // showOverflowtooltip: true
}, // },
{ {
prop: 'createTime', prop: 'createTime',
label: '添加时间', label: '添加时间',
@ -59,10 +59,10 @@ const tableProps = [
{ {
prop: 'code', prop: 'code',
label: '订单编码', label: '订单编码',
minWidth: 180 minWidth: 160
}, },
{ {
prop: 'customerId', prop: 'customerName',
label: '客户', label: '客户',
showOverflowtooltip: true showOverflowtooltip: true
}, },
@ -93,7 +93,7 @@ const tableProps = [
}, },
{ {
prop: 'deliveTime', prop: 'deliveTime',
label: '添加时间', label: '交货时间',
filter: parseTime, filter: parseTime,
minWidth: 160 minWidth: 160
}, },
@ -170,8 +170,8 @@ export default {
this.$auth.hasPermi('base:order-manage:split') this.$auth.hasPermi('base:order-manage:split')
? { ? {
type: 'split', type: 'split',
btnName: '拆分单', btnName: '拆分单',
showTip: '拆分单', showTip: '拆分单',
showParam: { showParam: {
type: '&', type: '&',
data: [ data: [

View File

@ -21,7 +21,7 @@
<div class="lightTip">{{ orderMsg.name }}</div> <div class="lightTip">{{ orderMsg.name }}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="blodTip">产品信息</div> <div class="blodTip">产品名称</div>
<div class="lightTip">{{ orderMsg.productName }}</div> <div class="lightTip">{{ orderMsg.productName }}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
@ -38,37 +38,41 @@
{{ getDictDataLabel(DICT_TYPE.PACK_SPEC, orderMsg.packSpec) }} {{ getDictDataLabel(DICT_TYPE.PACK_SPEC, orderMsg.packSpec) }}
</div> </div>
</el-col> </el-col>
<!-- <el-col :span='3'> <el-col :span='3'>
<div class="blodTip">物料计算方式</div> <div class="blodTip">物料计算方式</div>
<div class="lightTip">{{orderMsg.materialMethod ? (orderMsg.materialMethod === 1 ? '产品基础' : '工艺扩展') : ''}} <div class="lightTip">{{orderMsg.materialMethod ? (orderMsg.materialMethod === 1 ? '产品基础' : '工艺扩展') : ''}}
</div> </div>
</el-col>
<!-- <el-col :span="3">
<div class="blodTip">计划开始时间</div>
<div class="lightTip">{{ parseTime(orderMsg.planStartTime) }}</div>
</el-col> --> </el-col> -->
</el-row>
<el-row>
<el-col :span="3"> <el-col :span="3">
<div class="blodTip">创建时间</div> <div class="blodTip">创建时间</div>
<div class="lightTip">{{ parseTime(orderMsg.createTime) }}</div> <div class="lightTip">{{ parseTime(orderMsg.createTime) }}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="blodTip">计划开始时间</div> <div class="blodTip">交货时间</div>
<div class="lightTip">{{ parseTime(orderMsg.planStartTime) }}</div> <div class="lightTip">{{ parseTime(orderMsg.deliveTime) }}</div>
</el-col> </el-col>
</el-row> <!-- <el-col :span="3">
<el-row>
<el-col :span="3">
<div class="blodTip">计划完成时间</div> <div class="blodTip">计划完成时间</div>
<div class="lightTip">{{ parseTime(orderMsg.planFinishTime) }}</div> <div class="lightTip">{{ parseTime(orderMsg.planFinishTime) }}</div>
</el-col> </el-col> -->
<el-col :span="3"> <el-col :span="3">
<div class="blodTip">计划加工数量</div> <div class="blodTip">计划加工数量</div>
<div class="lightTip">{{ orderMsg.planQuantity }}</div> <div class="lightTip">{{ orderMsg.planQuantity }}</div>
</el-col> </el-col>
<el-col :span="3"> <!-- <el-col :span="3">
<div class="blodTip">加工平方数(平方米)</div> <div class="blodTip">加工平方数(平方米)</div>
<div class="lightTip">{{ orderMsg.planArea }}</div> <div class="lightTip">{{ orderMsg.planArea }}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="blodTip">预计用时()</div> <div class="blodTip">预计用时()</div>
<div class="lightTip">{{ orderMsg.expectTime }}</div> <div class="lightTip">{{ orderMsg.expectTime }}</div>
</el-col> </el-col> -->
<el-col :span="3"> <el-col :span="3">
<div class="blodTip">状态</div> <div class="blodTip">状态</div>
<div class="lightTip"> <div class="lightTip">
@ -87,12 +91,12 @@
{{ parseTime(orderMsg.finishProduceTime) }} {{ parseTime(orderMsg.finishProduceTime) }}
</div> </div>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="3"> <el-col :span="3">
<div class="blodTip">实际生产数量</div> <div class="blodTip">实际生产数量</div>
<div class="lightTip">{{ orderMsg.actualQuantity }}</div> <div class="lightTip">{{ orderMsg.actualQuantity }}</div>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="3"> <el-col :span="3">
<div class="blodTip">完成比%</div> <div class="blodTip">完成比%</div>
<div class="lightTip">{{ orderMsg.completeProp }}</div> <div class="lightTip">{{ orderMsg.completeProp }}</div>
@ -102,9 +106,13 @@
<div class="lightTip">{{ orderMsg.nokQuantity }}</div> <div class="lightTip">{{ orderMsg.nokQuantity }}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="blodTip">备注</div>
<div class="lightTip">{{ orderMsg.remark }}</div>
</el-col>
<!-- <el-col :span="3">
<div class="blodTip">负责人</div> <div class="blodTip">负责人</div>
<div class="lightTip">{{ orderMsg.workers }}</div> <div class="lightTip">{{ orderMsg.workers }}</div>
</el-col> </el-col> -->
<!-- <el-col :span='3'> <!-- <el-col :span='3'>
<div class="blodTip">关联工艺</div> <div class="blodTip">关联工艺</div>
<div class="lightTip">{{processFlowName}}</div> <div class="lightTip">{{processFlowName}}</div>
@ -275,11 +283,11 @@ export default {
processFlowName: '', processFlowName: '',
}; };
}, },
mounted() { activated() {
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
this.tableH = this.tableHeight(510) / 2; this.tableH = this.tableHeight(510) / 2;
}); });
this.orderId = location.href.split('?')[1].split('=')[1]; this.orderId = location.href.split('=')[1];
this.getMsg(); this.getMsg();
}, },
watch: { watch: {
@ -300,11 +308,12 @@ export default {
}, },
initData(to) { initData(to) {
if (to.name === 'OrderDetailData') { if (to.name === 'OrderDetailData') {
this.orderId = location.href.split('?')[1].split('=')[1]; this.orderId = location.href.split('=')[1];
this.getMsg(); this.getMsg();
} }
}, },
getMsg() { getMsg() {
console.log(this.orderId)
orderDetail({ orderDetail({
id: this.orderId, id: this.orderId,
}).then((res) => { }).then((res) => {

View File

@ -122,7 +122,7 @@
<el-form-item label="负责部门" prop="deptId"> <el-form-item label="负责部门" prop="deptId">
<el-select <el-select
v-model="dataForm.deptId" v-model="dataForm.deptId"
placeholder="请选择关联产线" placeholder="请选择负责部门"
style="width: 100%"> style="width: 100%">
<el-option <el-option
v-for="item in deptList" v-for="item in deptList"
@ -142,9 +142,7 @@
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<span style="margin: 0 20px 15px 0; display: inline-block"> <span class="add-type">物料计算方式</span>
物料计算方式
</span>
<el-radio-group <el-radio-group
v-model="dataForm.materialMethod" v-model="dataForm.materialMethod"
@change="materialMethodChange"> @change="materialMethodChange">
@ -161,7 +159,7 @@
<div v-if="dataForm.materialMethod === 1"> <div v-if="dataForm.materialMethod === 1">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<span style="margin: 8px 0; display: inline-block">关联产线</span> <span style="margin: 8px 0;" class="add-type">关联产线</span>
<el-button style="margin-left: 20px" type="text" @click="addBind"> <el-button style="margin-left: 20px" type="text" @click="addBind">
新增 新增
</el-button> </el-button>
@ -313,6 +311,9 @@ export default {
planQuantity: [ planQuantity: [
{ required: true, message: '计划生产数量不能为空', trigger: 'blur' }, { required: true, message: '计划生产数量不能为空', trigger: 'blur' },
], ],
deptId: [
{ required: true, message: '负责部门不能为空', trigger: 'change' },
],
}, },
productList: [], productList: [],
processFlowList: [], processFlowList: [],
@ -482,3 +483,14 @@ export default {
}, },
}; };
</script> </script>
<style scoped>
.add-type {
margin: 0 20px 15px 0;
display: inline-block;
}
.add-type::before {
content: '*';
color: #ff4949;
margin-right: 4px;
}
</style>