Compare commits

..

No commits in common. "e11c71edf1abf861701cda91ea3d8a239ebe5cd1" and "8e0ac6f96256536728d7d1e2dc2bf2a09b1d5c7e" have entirely different histories.

11 changed files with 321 additions and 520 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-10-21 16:41:54 # @LastEditTime: 2024-09-02 09:07:05
# @LastEditors: zwq # @LastEditors: zhp
# @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://mes2.kszny.picaiba.com' VUE_APP_BASE_API = 'http://192.168.1.20:48082'

View File

@ -407,7 +407,7 @@ export default {
} }
} }
.current-date { .current-date {
font-size: 15px; font-size: 10px;
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,17 +44,16 @@ 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().getTime(); const now = new Date();
// const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()]; const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
const today = new Date().getTime(); const today = new Date(y, m, d, 0, 0, 0, 0).getTime();
const tenminAgo = new Date(today - (10 * 60 * 1000)).getTime(); const aWeekAgo = today - 3600 * 1000 * 24 * 7;
return { return {
searchBarFormConfig: [ searchBarFormConfig: [
{ {
@ -74,10 +73,10 @@ export default {
{ {
type: 'datePicker', type: 'datePicker',
label: '时间段', label: '时间段',
dateType: 'datetimerange', // datetimerange dateType: 'daterange', // 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: 'yyyy-MM-dd HH:mm:ss', valueFormat: 'timestamp',
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
@ -94,20 +93,14 @@ export default {
}, },
], ],
queryParams: { queryParams: {
equipmentId: null, id: null,
recordTime: [parseTime(tenminAgo), parseTime(today)], time: [new Date(aWeekAgo), new Date(today)],
}, },
tableList: [ tableList: [
// { // {
// key: 'base-table__key__1', // key: 'base-table__key__1',
// tableProps: [{ // tableProps: [],
// prop: 'name', // list: [],
// label: 'name'
// }],
// dataManager: {dataList: [{name: '1'}]},
// list: [{
// name: '11'
// }],
// pageNo: 1, // pageNo: 1,
// pageSize: 3, // pageSize: 3,
// total: 0, // total: 0,
@ -118,7 +111,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, 'equipmentId', to.params.equipmentId); vm.$set(vm.queryParams, 'id', to.params.equipmentId);
vm.$set( vm.$set(
vm.searchBarFormConfig[0], vm.searchBarFormConfig[0],
'defaultSelect', 'defaultSelect',
@ -129,11 +122,6 @@ 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 {
@ -167,7 +155,7 @@ export default {
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
// clean job // clean job
this.$set(this.queryParams, 'equipmentId', null); this.$set(this.queryParams, 'id', 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 = [];
@ -204,7 +192,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 ?? ''
@ -280,18 +268,11 @@ export default {
async handleSearchBarBtnClick({ btnName, timeVal }) { async handleSearchBarBtnClick({ btnName, timeVal }) {
if (timeVal && timeVal.length > 0) { if (timeVal && timeVal.length > 0) {
console.log('nihc ', timeVal) this.queryParams.time = 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.recordTime = []; this.queryParams.time = [];
this.$message.warning('时间段必选!')
} }
await this.handleQuery();
}, },
handleEmitFun(table, val) { handleEmitFun(table, val) {
@ -314,12 +295,9 @@ 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 {
@ -328,6 +306,5 @@ 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() {
this.list.sType = 1 console.log(this.list)
this.$emit('emitData', this.list) this.$emit('emitData', this.list)
} }
} }

View File

@ -31,15 +31,9 @@
</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="specifications"> <el-form-item label="单价" prop="price">
<el-input v-model="form.specifications"></el-input> <el-input-number v-model="form.price" :min="0" :max="9999999999999" :precision='2' style="width: 100%;">
</el-form-item> </el-input-number>
</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'>
@ -51,9 +45,19 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span='6'> <el-col :span='6'>
<el-form-item label="单价" prop="price"> <el-form-item label="包装规格" prop="packSpec">
<el-input-number v-model="form.price" :min="0" :max="9999999999999" :precision='2' style="width: 100%;"> <el-select v-model="form.packSpec" placeholder="请选择" style="width: 100%;" clearable>
</el-input-number> <el-option v-for="item in getDictDatas(DICT_TYPE.PACK_SPEC)" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</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-row> </el-row>
@ -61,12 +65,8 @@
</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="packSpec"> <el-form-item label="产品规格" prop="specifications">
<el-select v-model="form.packSpec" placeholder="请选择" style="width: 100%;" clearable> <el-input v-model="form.specifications"></el-input>
<el-option v-for="item in getDictDatas(DICT_TYPE.PACK_SPEC)" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span='12'> <el-col :span='12'>

View File

@ -1,314 +1,257 @@
<!-- <!--
* @Author: zwq * @Author: zhp
* @Date: 2024-09-26 14:08:58 * @Date: 2024-08-01 16:27:30
* @LastEditors: zwq * @LastEditTime: 2024-09-04 15:56:53
* @LastEditTime: 2024-11-05 14:19:46 * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-form <el-form ref="orderAddForm" :rules="rules" :model="form" :inline="true" class="demo-form-inline">
ref="orderAddForm" <!-- <el-row :gutter="20"> -->
:rules="rules" <!-- <el-col :span='6'> -->
:model="form" <el-form-item label="拆分数量" prop="attr3">
:inline="true" <el-input v-model.number="form.attr3" oninput="value=value.replace(/[^\d]/g,'')"></el-input>
class="demo-form-inline"> </el-form-item>
<!-- <el-row :gutter="20"> --> <el-form-item>
<!-- <el-col :span='6'> --> <el-button type="primary" @click="handleSplit">确定</el-button>
<el-form-item label="拆分数量" prop="attr3"> </el-form-item>
<el-input <!-- </el-col> -->
v-model.number="form.attr3" <!-- </el-row> -->
oninput="value=value.replace(/[^\d]/g,'')"></el-input> <base-table :table-props="tableProps" :table-data="list" :max-height="tableH">
</el-form-item> <!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="240" label="操作" :method-list="tableBtn"
<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 { import { getOrderCode, getOrderById, getProcessFlowList, orderUpdate, orderCreate, orderSplit } from '@/api/base/orderManage'
getOrderCode, import { parseTime } from '@/utils/ruoyi'
getOrderById, import inputArea from './inputArea.vue'
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', // prop: 'priority',
label: '产品规格', // label: '',
showOverflowtooltip: true, // filter: publicFormatter('order_priority')
subcomponent: inputArea, // },
}, {
// { prop: 'planQuantity',
// prop: 'priority', label: '计划加工量',
// label: '', width: 100,
// filter: publicFormatter('order_priority') subcomponent: inputArea
// }, },
{ {
prop: 'planQuantity', prop: 'deliveTime',
label: '计划加工量', label: '交货日期',
width: 100, filter: parseTime,
subcomponent: inputArea, minWidth: 160,
}, subcomponent: inputArea
{ },
prop: 'deliveTime', {
label: '交货日期', prop: 'customerId',
filter: parseTime, label: '客户',
minWidth: 160, showOverflowtooltip: true,
subcomponent: selectTime, subcomponent: inputArea
}, },
{ {
prop: 'customerId', prop: 'price',
label: '客户', label: '单价',
showOverflowtooltip: true, width: 100,
subcomponent: selectMember, subcomponent: inputArea
}, },
{ {
prop: 'price', prop: 'packSpec',
label: '单价', label: '包装规格',
width: 100, width: 100,
subcomponent: inputArea, subcomponent: inputArea
}, },
{ {
prop: 'packSpec', prop: 'remark',
label: '包装规格', label: '备注',
width: 100, width: 100,
subcomponent: selectMember, subcomponent: inputArea
}, },
{ ]
prop: 'remark',
label: '备注',
width: 100,
subcomponent: inputArea,
},
];
export default { export default {
name: 'OrderAdd', name: 'OrderAdd',
data() { data() {
return { return {
tableProps, tableProps,
list: [], list: [],
tableH: this.tableHeight(260), tableH: this.tableHeight(260),
form: { form: {
id: '', id: '',
name: '', name: '',
code: '', code: '',
planQuantity: '', planQuantity: '',
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: [ attr3: [{ required: true, message: "拆分数量不能为空", trigger: "blur" }],
{ required: true, message: '拆分数量不能为空', trigger: 'blur' }, },
], productList: [],
}, customerList: [],
productList: [], processFlowList: [],
customerList: [], isEdit: false //
processFlowList: [], }
isEdit: false, // },
}; created () {
}, window.addEventListener('resize', () => {
created() { this.tableH = this.tableHeight(260)
window.addEventListener('resize', () => { })
this.tableH = this.tableHeight(260); },
}); methods: {
}, handleSplit() {
methods: { let obj = {
handleSplit() { attr3: this.form.attr3,
if (this.form.attr3) { id:this.form.id
this.list = []; }
let obj = { orderSplit(obj).then((res) => {
attr3: this.form.attr3, this.list = res.data
id: this.form.id, })
}; },
orderSplit(obj).then((res) => { init(obj) {
this.list = res.data; // this.getList()
this.list.forEach((item, index) => { // if (obj) {
item.name = item.name + '-' + (index + 1); this.isEdit = true
}); this.form = {}
}); this.list = []
} else { this.form.id = obj.id
this.$message('拆分数量不能为空'); // getOrderById({id: this.form.id}).then(res => {
} // if (res.code === 0) {
}, // this.form.name = res.data.name
init(obj) { // this.form.code = res.data.code
this.getList(); // this.form.planQuantity = res.data.planQuantity
// if (obj) { // this.form.planProductId = res.data.planProductId
this.isEdit = true; // this.form.price = res.data.price
this.form = {}; // this.form.customerId = res.data.customerId
this.list = []; // this.form.priority = res.data.priority ? res.data.priority + '' : ''
this.form.id = obj.id; // this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null
// getOrderById({id: this.form.id}).then(res => { // this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : ''
// if (res.code === 0) { // this.form.workers = res.data.workers
// this.form.name = res.data.name // this.form.processFlowId = res.data.processFlowId
// this.form.code = res.data.code // this.form.materialMethod = res.data.materialMethod
// this.form.planQuantity = res.data.planQuantity // this.form.planFinishTime = res.data.planFinishTime ? res.data.planFinishTime : null
// this.form.planProductId = res.data.planProductId // this.form.remark = res.data.remark
// this.form.price = res.data.price // // this.form.description = res.data.description
// 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 // } else {
// this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : '' // this.isEdit = false
// this.form.workers = res.data.workers // this.form.id = ''
// this.form.processFlowId = res.data.processFlowId // //
// this.form.materialMethod = res.data.materialMethod // getOrderCode().then(res => {
// this.form.planFinishTime = res.data.planFinishTime ? res.data.planFinishTime : null // this.form.code = res.data || ''
// this.form.remark = res.data.remark // })
// // this.form.description = res.data.description // }
// } },
// }) // getList() {
// } else { // //
// this.isEdit = false // getProductAll().then(res => {
// this.form.id = '' // this.productList = res.data || []
// // // })
// getOrderCode().then(res => { // //
// this.form.code = res.data || '' // getCustomerList().then(res => {
// }) // this.customerList = res.data || []
// } // })
}, // //
getList() { // getProcessFlowList().then(res => {
// // this.processFlowList = res.data || []
// getProductAll().then(res => { // })
// this.productList = res.data || [] // },
// }) // timeChange() {
// // if (this.form.planStartTime && this.form.planFinishTime) {
getCustomerList().then((res) => { // if (this.form.planStartTime > this.form.planFinishTime) {
this.customerList = res.data || []; // this.$modal.msgError('')
this.$set(this.tableProps[6], 'customerList', this.customerList); // }
}); // }
// // },
// getProcessFlowList().then(res => { // //
// this.processFlowList = res.data || [] // materialMethodChange(val) {
// }) // if (val === 2 && !this.form.processFlowId) {
}, // this.form.materialMethod = 1
// timeChange() { // this.$modal.msgError("");
// if (this.form.planStartTime && this.form.planFinishTime) { // }
// if (this.form.planStartTime > this.form.planFinishTime) { // },
// this.$modal.msgError('') // //
// } // processFlowIdChange(val) {
// } // console.log(val)
// }, // if (!val) {
// // // this.form.materialMethod = 1
// materialMethodChange(val) { // }
// if (val === 2 && !this.form.processFlowId) { // },
// this.form.materialMethod = 1 submitForm() {
// this.$modal.msgError(""); Promise.all(this.list.map((ele) => {
// } return orderCreate(ele);
// }, })).then((res) => {
// // this.$modal.msgSuccess("操作成功");
// processFlowIdChange(val) { this.$emit('splitWorkOrderSubmit');
// 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) => { // this.$refs['orderAddForm'].validate((valid) => {
// if (valid) { // if (valid) {
// 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) {
// this.$modal.msgError('') // this.$modal.msgError('')
// return false // return false
// } // }
// } // }
// // console.log(this.form) // // console.log(this.form)
// if (this.isEdit) { // if (this.isEdit) {
// // // //
// orderUpdate({ ...this.form }).then((res) => { // orderUpdate({ ...this.form }).then((res) => {
// if (res.code === 0) { // if (res.code === 0) {
// this.$modal.msgSuccess(""); // this.$modal.msgSuccess("");
// this.$emit('successSubmit') // this.$emit('successSubmit')
// } // }
// }) // })
// } else { // } else {
// this.form.status = 1 // this.form.status = 1
// this.form.triggerOrigin = 1 // this.form.triggerOrigin = 1
// orderCreate({ ...this.form }).then((res) => { // orderCreate({ ...this.form }).then((res) => {
// if (res.code === 0) { // if (res.code === 0) {
// this.$modal.msgSuccess(""); // this.$modal.msgSuccess("");
// this.$emit('successSubmit') // this.$emit('successSubmit')
// } // }
// }) // })
// } // }
// } else { // } else {
// return false // return false
// } // }
// }) // })
}, },
formClear() { formClear() {
this.$refs.orderAddForm.resetFields(); this.$refs.orderAddForm.resetFields()
}, }
}, }
}; }
</script> </script>

View File

@ -1,51 +0,0 @@
<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

@ -1,47 +0,0 @@
<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: 160 minWidth: 180
}, },
{ {
prop: 'customerName', prop: 'customerId',
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,41 +38,37 @@
{{ 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.deliveTime) }}</div> <div class="lightTip">{{ parseTime(orderMsg.planStartTime) }}</div>
</el-col> </el-col>
<!-- <el-col :span="3"> </el-row>
<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">
@ -91,12 +87,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>
@ -106,13 +102,9 @@
<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>
@ -283,11 +275,11 @@ export default {
processFlowName: '', processFlowName: '',
}; };
}, },
activated() { mounted() {
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
this.tableH = this.tableHeight(510) / 2; this.tableH = this.tableHeight(510) / 2;
}); });
this.orderId = location.href.split('=')[1]; this.orderId = location.href.split('?')[1].split('=')[1];
this.getMsg(); this.getMsg();
}, },
watch: { watch: {
@ -308,12 +300,11 @@ export default {
}, },
initData(to) { initData(to) {
if (to.name === 'OrderDetailData') { if (to.name === 'OrderDetailData') {
this.orderId = location.href.split('=')[1]; this.orderId = location.href.split('?')[1].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,7 +142,9 @@
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<span class="add-type">物料计算方式</span> <span style="margin: 0 20px 15px 0; display: inline-block">
物料计算方式
</span>
<el-radio-group <el-radio-group
v-model="dataForm.materialMethod" v-model="dataForm.materialMethod"
@change="materialMethodChange"> @change="materialMethodChange">
@ -159,7 +161,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;" class="add-type">关联产线</span> <span style="margin: 8px 0; display: inline-block">关联产线</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>
@ -311,9 +313,6 @@ export default {
planQuantity: [ planQuantity: [
{ required: true, message: '计划生产数量不能为空', trigger: 'blur' }, { required: true, message: '计划生产数量不能为空', trigger: 'blur' },
], ],
deptId: [
{ required: true, message: '负责部门不能为空', trigger: 'change' },
],
}, },
productList: [], productList: [],
processFlowList: [], processFlowList: [],
@ -483,14 +482,3 @@ 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>