Compare commits

...

2 Commits

Author SHA1 Message Date
zwq
4bf610eeb1 更新bug 2024-11-06 08:53:24 +08:00
8e0ac6f962 Merge pull request '更新' (#401) from projects/mes-zwq into projects/mes-test
Reviewed-on: #401
2024-10-17 09:28:51 +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

@ -1,4 +1,4 @@
<!-- <!--
filename: index.vue filename: index.vue
author: liubin author: liubin
date: 2023-08-31 09:14:19 date: 2023-08-31 09:14:19
@ -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)
if (new Date(timeVal[1]).getTime() - new Date(timeVal[0]).getTime() <= 30 * 60 * 1000) {
this.queryParams.recordTime = timeVal;
await this.handleQuery();
} else {
this.$message.warning('时间范围最大30分钟限制')
}
} else { } else {
this.queryParams.time = []; this.queryParams.recordTime = [];
this.$message.warning('时间段必选!')
} }
await this.handleQuery();
}, },
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,257 +1,314 @@
<!-- <!--
* @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
<!-- <el-row :gutter="20"> --> ref="orderAddForm"
<!-- <el-col :span='6'> --> :rules="rules"
<el-form-item label="拆分数量" prop="attr3"> :model="form"
<el-input v-model.number="form.attr3" oninput="value=value.replace(/[^\d]/g,'')"></el-input> :inline="true"
</el-form-item> class="demo-form-inline">
<el-form-item> <!-- <el-row :gutter="20"> -->
<el-button type="primary" @click="handleSplit">确定</el-button> <!-- <el-col :span='6'> -->
</el-form-item> <el-form-item label="拆分数量" prop="attr3">
<!-- </el-col> --> <el-input
<!-- </el-row> --> v-model.number="form.attr3"
<base-table :table-props="tableProps" :table-data="list" :max-height="tableH"> oninput="value=value.replace(/[^\d]/g,'')"></el-input>
<!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="240" label="操作" :method-list="tableBtn" </el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSplit">确定</el-button>
</el-form-item>
<!-- </el-col> -->
<!-- </el-row> -->
<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"
@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,
const tableProps = [ getProcessFlowList,
{ orderUpdate,
prop: 'name', orderCreate,
label: '订单名称', orderSplit,
minWidth: 120, } from '@/api/base/orderManage';
showOverflowtooltip: true,
subcomponent: inputArea
},
{
prop: 'code',
label: '订单编码',
minWidth: 180,
subcomponent: inputArea
},
{
prop: 'productName',
label: '产品',
showOverflowtooltip: true,
subcomponent: inputArea
},
// {
// prop: 'priority',
// label: '',
// filter: publicFormatter('order_priority')
// },
{
prop: 'planQuantity',
label: '计划加工量',
width: 100,
subcomponent: inputArea
},
{
prop: 'deliveTime',
label: '交货日期',
filter: parseTime,
minWidth: 160,
subcomponent: inputArea
},
{
prop: 'customerId',
label: '客户',
showOverflowtooltip: true,
subcomponent: inputArea
},
{
prop: 'price',
label: '单价',
width: 100,
subcomponent: inputArea
},
{
prop: 'packSpec',
label: '包装规格',
width: 100,
subcomponent: inputArea
},
{
prop: 'remark',
label: '备注',
width: 100,
subcomponent: inputArea
},
]
export default {
name: 'OrderAdd',
data() {
return {
tableProps,
list: [],
tableH: this.tableHeight(260),
form: {
id: '',
name: '',
code: '',
planQuantity: '',
planProductId: '',
price: '',
customerId: '',
attr3:undefined,
priority: '',
packSpec: '',
workers: '',
materialMethod: 1,
remark: '',
deliveTime:undefined,
// description: '',
planStartTime: '',
},
rules: {
attr3: [{ required: true, message: "拆分数量不能为空", trigger: "blur" }],
},
productList: [],
customerList: [],
processFlowList: [],
isEdit: false //
}
},
created () {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
},
methods: {
handleSplit() {
let obj = {
attr3: this.form.attr3,
id:this.form.id
}
orderSplit(obj).then((res) => {
this.list = res.data
})
},
init(obj) {
// this.getList()
// if (obj) {
this.isEdit = true
this.form = {}
this.list = []
this.form.id = obj.id
// getOrderById({id: this.form.id}).then(res => {
// if (res.code === 0) {
// this.form.name = res.data.name
// this.form.code = res.data.code
// this.form.planQuantity = res.data.planQuantity
// this.form.planProductId = res.data.planProductId
// this.form.price = res.data.price
// this.form.customerId = res.data.customerId
// this.form.priority = res.data.priority ? res.data.priority + '' : ''
// this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null
// this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : ''
// this.form.workers = res.data.workers
// this.form.processFlowId = res.data.processFlowId
// this.form.materialMethod = res.data.materialMethod
// this.form.planFinishTime = res.data.planFinishTime ? res.data.planFinishTime : null
// this.form.remark = res.data.remark
// // this.form.description = res.data.description
// }
// })
// } else {
// this.isEdit = false
// this.form.id = ''
// //
// getOrderCode().then(res => {
// this.form.code = res.data || ''
// })
// }
},
// getList() {
// //
// getProductAll().then(res => {
// this.productList = res.data || []
// })
// //
// getCustomerList().then(res => {
// this.customerList = res.data || []
// })
// //
// getProcessFlowList().then(res => {
// this.processFlowList = res.data || []
// })
// },
// timeChange() {
// if (this.form.planStartTime && this.form.planFinishTime) {
// if (this.form.planStartTime > this.form.planFinishTime) {
// this.$modal.msgError('')
// }
// }
// },
// //
// materialMethodChange(val) {
// if (val === 2 && !this.form.processFlowId) {
// this.form.materialMethod = 1
// this.$modal.msgError("");
// }
// },
// //
// processFlowIdChange(val) {
// console.log(val)
// if (!val) {
// this.form.materialMethod = 1
// }
// },
submitForm() {
Promise.all(this.list.map((ele) => {
return orderCreate(ele);
})).then((res) => {
this.$modal.msgSuccess("操作成功");
this.$emit('splitWorkOrderSubmit');
});
// this.$refs['orderAddForm'].validate((valid) => { import { getCustomerList } from '@/api/base/customer';
// if (valid) { import { parseTime } from '@/utils/ruoyi';
// if (this.form.planStartTime && this.form.planFinishTime) { import inputArea from './inputArea.vue';
// if (this.form.planStartTime > this.form.planFinishTime) { import selectMember from './selectMember';
// this.$modal.msgError('') import selectTime from './selectTime';
// return false const tableProps = [
// } {
// } prop: 'name',
// // console.log(this.form) label: '订单名称',
// if (this.isEdit) { minWidth: 120,
// // showOverflowtooltip: true,
// orderUpdate({ ...this.form }).then((res) => { subcomponent: inputArea,
// if (res.code === 0) { },
// this.$modal.msgSuccess(""); {
// this.$emit('successSubmit') prop: 'code',
// } label: '订单编码',
// }) minWidth: 180,
// } else { subcomponent: inputArea,
// this.form.status = 1 },
// this.form.triggerOrigin = 1 {
// orderCreate({ ...this.form }).then((res) => { prop: 'productName',
// if (res.code === 0) { label: '产品',
// this.$modal.msgSuccess(""); showOverflowtooltip: true,
// this.$emit('successSubmit') subcomponent: inputArea,
// } },
// }) {
// } prop: 'specifications',
// } else { label: '产品规格',
// return false showOverflowtooltip: true,
// } subcomponent: inputArea,
// }) },
}, // {
formClear() { // prop: 'priority',
this.$refs.orderAddForm.resetFields() // label: '',
} // filter: publicFormatter('order_priority')
} // },
} {
prop: 'planQuantity',
label: '计划加工量',
width: 100,
subcomponent: inputArea,
},
{
prop: 'deliveTime',
label: '交货日期',
filter: parseTime,
minWidth: 160,
subcomponent: selectTime,
},
{
prop: 'customerId',
label: '客户',
showOverflowtooltip: true,
subcomponent: selectMember,
},
{
prop: 'price',
label: '单价',
width: 100,
subcomponent: inputArea,
},
{
prop: 'packSpec',
label: '包装规格',
width: 100,
subcomponent: selectMember,
},
{
prop: 'remark',
label: '备注',
width: 100,
subcomponent: inputArea,
},
];
export default {
name: 'OrderAdd',
data() {
return {
tableProps,
list: [],
tableH: this.tableHeight(260),
form: {
id: '',
name: '',
code: '',
planQuantity: '',
planProductId: '',
price: '',
customerId: '',
attr3: undefined,
priority: '',
packSpec: '',
workers: '',
materialMethod: 1,
remark: '',
deliveTime: undefined,
// description: '',
planStartTime: '',
},
rules: {
attr3: [
{ required: true, message: '拆分数量不能为空', trigger: 'blur' },
],
},
productList: [],
customerList: [],
processFlowList: [],
isEdit: false, //
};
},
created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260);
});
},
methods: {
handleSplit() {
if (this.form.attr3) {
this.list = [];
let obj = {
attr3: this.form.attr3,
id: this.form.id,
};
orderSplit(obj).then((res) => {
this.list = res.data;
this.list.forEach((item, index) => {
item.name = item.name + '-' + (index + 1);
});
});
} else {
this.$message('拆分数量不能为空');
}
},
init(obj) {
this.getList();
// if (obj) {
this.isEdit = true;
this.form = {};
this.list = [];
this.form.id = obj.id;
// getOrderById({id: this.form.id}).then(res => {
// if (res.code === 0) {
// this.form.name = res.data.name
// this.form.code = res.data.code
// this.form.planQuantity = res.data.planQuantity
// this.form.planProductId = res.data.planProductId
// this.form.price = res.data.price
// this.form.customerId = res.data.customerId
// this.form.priority = res.data.priority ? res.data.priority + '' : ''
// this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null
// this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : ''
// this.form.workers = res.data.workers
// this.form.processFlowId = res.data.processFlowId
// this.form.materialMethod = res.data.materialMethod
// this.form.planFinishTime = res.data.planFinishTime ? res.data.planFinishTime : null
// this.form.remark = res.data.remark
// // this.form.description = res.data.description
// }
// })
// } else {
// this.isEdit = false
// this.form.id = ''
// //
// getOrderCode().then(res => {
// this.form.code = res.data || ''
// })
// }
},
getList() {
//
// getProductAll().then(res => {
// this.productList = res.data || []
// })
//
getCustomerList().then((res) => {
this.customerList = res.data || [];
this.$set(this.tableProps[6], 'customerList', this.customerList);
});
//
// getProcessFlowList().then(res => {
// this.processFlowList = res.data || []
// })
},
// timeChange() {
// if (this.form.planStartTime && this.form.planFinishTime) {
// if (this.form.planStartTime > this.form.planFinishTime) {
// this.$modal.msgError('')
// }
// }
// },
// //
// materialMethodChange(val) {
// if (val === 2 && !this.form.processFlowId) {
// this.form.materialMethod = 1
// this.$modal.msgError("");
// }
// },
// //
// processFlowIdChange(val) {
// console.log(val)
// if (!val) {
// 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() {
Promise.all(
this.list.map((ele) => {
return orderCreate(ele);
})
).then((res) => {
this.$modal.msgSuccess('操作成功');
this.$emit('splitWorkOrderSubmit');
});
// this.$refs['orderAddForm'].validate((valid) => {
// if (valid) {
// if (this.form.planStartTime && this.form.planFinishTime) {
// if (this.form.planStartTime > this.form.planFinishTime) {
// this.$modal.msgError('')
// return false
// }
// }
// // console.log(this.form)
// if (this.isEdit) {
// //
// orderUpdate({ ...this.form }).then((res) => {
// if (res.code === 0) {
// this.$modal.msgSuccess("");
// this.$emit('successSubmit')
// }
// })
// } else {
// this.form.status = 1
// this.form.triggerOrigin = 1
// orderCreate({ ...this.form }).then((res) => {
// if (res.code === 0) {
// this.$modal.msgSuccess("");
// this.$emit('successSubmit')
// }
// })
// }
// } else {
// return false
// }
// })
},
formClear() {
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>
<!-- <el-col :span="3">
<div class="blodTip">计划开始时间</div>
<div class="lightTip">{{ parseTime(orderMsg.planStartTime) }}</div>
</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>