生产管理
This commit is contained in:
@@ -89,6 +89,7 @@ export default {
|
||||
id: '',
|
||||
name: '',
|
||||
code: '',
|
||||
grade:1,
|
||||
planQuantity: '',
|
||||
planProductId: '',
|
||||
specifications:undefined,
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-09-06 14:44:06
|
||||
* @LastEditTime: 2024-09-09 16:31:04
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-button @click="handleRoute" type="text"> {{ injectData.workOrderNum }} </el-button>
|
||||
</template>
|
||||
<script>
|
||||
import { orderAssignmentList } from '@/api/base/orderManage'
|
||||
export default {
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async handleRoute() {
|
||||
const res = await orderAssignmentList({ orderIdList: [this.injectData.id] })
|
||||
console.log(res.data);
|
||||
let arr = []
|
||||
res.data[this.injectData.id].forEach((ele) => {
|
||||
arr.push(ele.workOrderId)
|
||||
});
|
||||
let woIdString = arr.join(',')
|
||||
console.log(woIdString);
|
||||
|
||||
this.$router.push({
|
||||
path: '/produce/core-work-order-detail?woIdString=' + woIdString
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -31,9 +31,10 @@
|
||||
</template>
|
||||
<script>
|
||||
import { parseTime } from '@/utils/ruoyi'
|
||||
import { getOrderPage, orderDelete, customerList, orderFinish, orderVoid } from '@/api/base/orderManage'
|
||||
import { getOrderPage, orderDelete, customerList, orderFinish, orderVoid, orderStop } from '@/api/base/orderManage'
|
||||
import OrderAdd from './components/orderAdd'
|
||||
import orderSplit from './components/orderSplit'
|
||||
import orderNum from './components/orderNum.vue'
|
||||
|
||||
import AddWorkOrder from './components/addWorkOrder'
|
||||
import { publicFormatter } from '@/utils/dict'
|
||||
@@ -98,7 +99,8 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'workOrderNum',
|
||||
label: '工单数量'
|
||||
label: '工单数量',
|
||||
subcomponent: orderNum,
|
||||
}
|
||||
]
|
||||
export default {
|
||||
@@ -305,6 +307,22 @@ export default {
|
||||
]
|
||||
}
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:order-manage:stop')
|
||||
? {
|
||||
type: 'stop',
|
||||
btnName: '终止',
|
||||
// showParam: {
|
||||
// type: '&',
|
||||
// data: [
|
||||
// {
|
||||
// type: 'equal',
|
||||
// name: 'status',
|
||||
// value: 1
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
}
|
||||
: undefined
|
||||
].filter((v) => v),
|
||||
addOrEditTitle: '',
|
||||
@@ -333,15 +351,15 @@ export default {
|
||||
name: this.queryParams.name,
|
||||
status: this.queryParams.status,
|
||||
lastIssuedTime: this.queryParams.lastIssuedTime,
|
||||
parentId: row.parentId
|
||||
parentId: row.id
|
||||
}
|
||||
const response = await getOrderPage(queryParams)
|
||||
row.children = response.data.records
|
||||
// this.list.forEach((ele) => {
|
||||
// if (ele.parentId === row.parentId) {
|
||||
// row.children = response.data.records
|
||||
this.list.forEach((ele) => {
|
||||
if (ele.id === row.id) {
|
||||
this.$set(this.list[row._pageIndex-1], 'children', response.data.records); // 展开该行
|
||||
// }
|
||||
// })
|
||||
}
|
||||
})
|
||||
row.hasChildren = true;
|
||||
this.$set(row, 'expanded', true); // 展开该行
|
||||
} else {
|
||||
@@ -356,7 +374,6 @@ export default {
|
||||
getOrderPage({...this.queryParams}).then(res => {
|
||||
let arr = res.data.records || []
|
||||
this.total = res.data.total || 0
|
||||
console.log(11111);
|
||||
// if (arr.length > 0) {
|
||||
// customerList().then(result => {
|
||||
// let tempData = result.data || []
|
||||
@@ -445,6 +462,11 @@ export default {
|
||||
case 'complete':
|
||||
this.handleComplete(val.data)
|
||||
break
|
||||
case 'stop':
|
||||
orderStop({ id: val.data.id }).then((res) => {
|
||||
this.getList()
|
||||
})
|
||||
break
|
||||
default:
|
||||
}
|
||||
},
|
||||
|
||||
@@ -108,8 +108,15 @@
|
||||
<!-- <div :class="{ active: activeModule === 'useInfo' }" @click="toggleTab('useInfo')">用料信息</div> -->
|
||||
</div>
|
||||
<!-- 列表 -->
|
||||
<base-table v-show="activeModule === 'orderInfo'" :page="queryParams.pageNo" :limit="queryParams.pageSize"
|
||||
:table-props="tableProps1" :table-data="list1" :max-height="tableH" />
|
||||
<el-row v-show="activeModule === 'orderInfo'">
|
||||
<el-col :span="6">
|
||||
<el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps1"
|
||||
:table-data="list1" :max-height="tableH" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <base-table v-show="activeModule === 'useInfo'" :page="queryParams.pageNo" :limit="queryParams.pageSize"
|
||||
:table-props="tableProps2" :table-data="list2" :max-height="tableH" /> -->
|
||||
</div>
|
||||
@@ -119,6 +126,7 @@
|
||||
import { parseTime } from '@/utils/ruoyi'
|
||||
import { publicFormatter } from '@/utils/dict'
|
||||
import { getProcessFlowList } from '@/api/base/orderManage'
|
||||
import { orderDetail, bomUseNum, getDetailTree, getDetailTreeInfo } from '@/api/base/orderManage'
|
||||
const tableProps1 = [
|
||||
{
|
||||
prop: 'issueTime',
|
||||
@@ -199,13 +207,13 @@ const tableProps2 = [
|
||||
label: '剩余生产预计消耗'
|
||||
}
|
||||
]
|
||||
import { orderDetail, bomUseNum } from '@/api/base/orderManage'
|
||||
export default {
|
||||
name: 'OrderDetailData',
|
||||
data() {
|
||||
return {
|
||||
orderId: '',
|
||||
tableProps1,
|
||||
treeData:undefined,
|
||||
activeModule:'orderInfo',
|
||||
tableProps2,
|
||||
list1: [],
|
||||
@@ -216,6 +224,10 @@ export default {
|
||||
pageNo: 1,
|
||||
pageSize: 500
|
||||
},
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
orderMsg: {},
|
||||
processFlowName: ''
|
||||
}
|
||||
@@ -234,6 +246,15 @@ export default {
|
||||
toggleTab(val) {
|
||||
this.activeModule = val
|
||||
},
|
||||
handleNodeClick(val) {
|
||||
console.log(val)
|
||||
getDetailTreeInfo({
|
||||
id: val.id
|
||||
}).then(res => {
|
||||
this.list1 = res.data.order
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
initData(to) {
|
||||
if (to.name === 'OrderDetailData') {
|
||||
this.orderId = location.href.split('?')[1].split('=')[1]
|
||||
@@ -262,6 +283,12 @@ export default {
|
||||
this.list2 = []
|
||||
}
|
||||
})
|
||||
getDetailTree({
|
||||
id: this.orderId
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
this.treeData =res.data
|
||||
})
|
||||
// 工艺
|
||||
getProcessFlowList().then(res => {
|
||||
let arr = res.data || []
|
||||
|
||||
Reference in New Issue
Block a user