add:增加工单排产调整相关功能。
This commit is contained in:
@@ -30,6 +30,7 @@ export function getWorkprocedure() {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function getDeviceList() {
|
||||
return request({
|
||||
url: 'api/device/getDeviceList',
|
||||
@@ -68,4 +69,23 @@ export function queryById(device_id) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getWorkprocedure, getItemByDevice, savaDeviceItem, copyAdd, queryById, getDeviceList }
|
||||
export function query(data) {
|
||||
return request({
|
||||
url: 'api/device/query',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
query,
|
||||
add,
|
||||
edit,
|
||||
del,
|
||||
getWorkprocedure,
|
||||
getItemByDevice,
|
||||
savaDeviceItem,
|
||||
copyAdd,
|
||||
queryById,
|
||||
getDeviceList
|
||||
}
|
||||
|
||||
459
mes/qd/src/components/transfer/transfer.vue
Normal file
459
mes/qd/src/components/transfer/transfer.vue
Normal file
@@ -0,0 +1,459 @@
|
||||
<template>
|
||||
<div class="transfer">
|
||||
<div class="transfer-panel">
|
||||
<p class="transfer-panel-header">
|
||||
<span>{{ titleTexts && titleTexts[0] }}</span>
|
||||
<span>{{ leftSelection.length }}/{{ leftTableData.length }}</span>
|
||||
</p>
|
||||
<div v-if="showQuery">
|
||||
<el-form :inline="true" :model="leftQueryCondition" class="query-form">
|
||||
<slot name="leftCondition" v-bind:scope="leftQueryCondition"></slot>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onLeftQuerySubmit()">{{ queryTexts[0] }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
ref="leftTable"
|
||||
:data="leftTableData"
|
||||
:height="minHeight"
|
||||
:max-height="maxHeight"
|
||||
:row-key="tableRowKey"
|
||||
:row-style="handleRowStyle"
|
||||
border
|
||||
size="small"
|
||||
stripe
|
||||
@row-click="handleLeftRowClick"
|
||||
@selection-change="handleLeftSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
:selectable="handleSelectable"
|
||||
type="selection"
|
||||
width="40px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
v-for="col in leftColumns"
|
||||
:key="col.id"
|
||||
:label="col.label"
|
||||
:prop="col.id"
|
||||
:width="col.width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<slot v-bind:scope="{row: scope.row, col: col}">
|
||||
<span>{{ scope.row[col.id] }}</span>
|
||||
</slot>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
v-if="showPagination"
|
||||
:current-page="pageIndex"
|
||||
:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:pager-count="5"
|
||||
:total="totalSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
<div class="transfer-buttons">
|
||||
<el-button
|
||||
:class="buttonClasses"
|
||||
:disabled="disabledLeftButton"
|
||||
type="primary"
|
||||
@click.native="addToRight"
|
||||
>
|
||||
<span v-if="buttonTexts[0] !== undefined" class="button-text">{{ buttonTexts[0] }}</span>
|
||||
<i class="el-icon-arrow-right"></i>
|
||||
</el-button>
|
||||
<el-button
|
||||
:class="buttonClasses"
|
||||
:disabled="rightSelection.length === 0"
|
||||
type="primary"
|
||||
@click.native="addToLeft"
|
||||
>
|
||||
<i class="el-icon-arrow-left"></i>
|
||||
<span v-if="buttonTexts[1] !== undefined" class="button-text">{{ buttonTexts[1] }}</span>
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="transfer-panel">
|
||||
<p class="transfer-panel-header">
|
||||
<span>{{ titleTexts && titleTexts[1] }}</span>
|
||||
<span>{{ rightSelection.length }}/{{ rightTableData.length }}</span>
|
||||
</p>
|
||||
<div v-if="showQuery">
|
||||
<el-form :inline="true" :model="rightQueryCondition" class="query-form">
|
||||
<slot name="rightCondition" v-bind:scope="rightQueryCondition"></slot>
|
||||
<el-form-item>
|
||||
<!-- <el-button type="primary" @click="onRightQuerySubmit()">{{ queryTexts[1] }}</el-button>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
ref="rightTable"
|
||||
:data="calcRightTableData"
|
||||
:height="minHeight"
|
||||
:max-height="maxHeight"
|
||||
:row-key="tableRowKey"
|
||||
border
|
||||
size="small"
|
||||
stripe
|
||||
@row-click="handleRightRowClick"
|
||||
@selection-change="handleRightSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="40px"></el-table-column>
|
||||
<el-table-column
|
||||
v-for="col in rightColumns || leftColumns"
|
||||
:key="col.id"
|
||||
:label="col.label"
|
||||
:prop="col.id"
|
||||
:width="col.width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<slot v-bind:scope="{row: scope.row, col: col}">
|
||||
<span>{{ scope.row[col.id] }}</span>
|
||||
</slot>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
v-if="showPagination"
|
||||
:total="rightTableData.length"
|
||||
layout="total"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'EltTransfer',
|
||||
props: {
|
||||
value: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
leftColumns: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
// 显示条件查询
|
||||
showQuery: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 显示分页
|
||||
showPagination: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 左侧分页回调
|
||||
paginationCallBack: {
|
||||
type: Function,
|
||||
default: function() {
|
||||
return new Promise(((resolve, reject) => {
|
||||
try {
|
||||
resolve({ total: 0, data: null })
|
||||
} catch {
|
||||
reject()
|
||||
}
|
||||
}))
|
||||
}
|
||||
},
|
||||
// 标题文本
|
||||
titleTexts: {
|
||||
type: Array,
|
||||
default() {
|
||||
return ['待选项', '已选项']
|
||||
}
|
||||
},
|
||||
// 按钮文本
|
||||
buttonTexts: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
// 查询按钮文本
|
||||
queryTexts: {
|
||||
type: Array,
|
||||
default() {
|
||||
return ['查询', '筛选']
|
||||
}
|
||||
},
|
||||
// 右侧参数
|
||||
rightColumns: {
|
||||
type: Array,
|
||||
default() {
|
||||
return undefined
|
||||
}
|
||||
},
|
||||
// 表格最小高度
|
||||
minHeight: {
|
||||
type: String,
|
||||
default: '650px'
|
||||
},
|
||||
// 表格最大高度
|
||||
maxHeight: {
|
||||
type: String,
|
||||
default: '650px'
|
||||
},
|
||||
// 表格行数据的Key
|
||||
tableRowKey: {
|
||||
type: Function,
|
||||
default(row) {
|
||||
return row && row && row.id
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
leftTableData: [],
|
||||
rightTableData: this.value || [],
|
||||
pageIndex: 1,
|
||||
pageSize: 20,
|
||||
totalSize: 0,
|
||||
leftSelection: [],
|
||||
rightSelection: [],
|
||||
leftQueryCondition: {},
|
||||
rightQueryCondition: {},
|
||||
rightConditionTemp: undefined
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 监听 init-data 事件,接收初始化数据
|
||||
this.$on('initData', (data) => {
|
||||
this.rightTableData = data
|
||||
})
|
||||
this.handlePaginationCallBack()
|
||||
},
|
||||
computed: {
|
||||
hasButtonTexts() {
|
||||
return this.buttonTexts.length === 2
|
||||
},
|
||||
buttonClasses() {
|
||||
return ['transfer-button', { 'is-with-texts': this.hasButtonTexts }]
|
||||
},
|
||||
disabledLeftButton() {
|
||||
return !this.leftSelection.some(leftRow => !this.rightTableData.some(rightRow => this.checkObjectIsEqual(leftRow, rightRow)))
|
||||
},
|
||||
calcRightTableData() {
|
||||
if (this.showQuery && this.rightConditionTemp) {
|
||||
const conditionKeys = Object.keys(this.rightConditionTemp)
|
||||
return this.rightTableData.filter(data => {
|
||||
return conditionKeys.some(key => {
|
||||
const rowCellData = data[key]
|
||||
const condVal = this.rightConditionTemp[key].trim()
|
||||
if (rowCellData) {
|
||||
return String(rowCellData).indexOf(condVal) > -1
|
||||
}
|
||||
return true
|
||||
})
|
||||
})
|
||||
}
|
||||
return this.rightTableData
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleLeftSelectionChange(selection) {
|
||||
this.leftSelection = selection
|
||||
},
|
||||
handleRightSelectionChange(selection) {
|
||||
this.rightSelection = selection
|
||||
},
|
||||
handleLeftRowClick(row) {
|
||||
if (!this.rightTableData.some(rightRow => this.checkObjectIsEqual(rightRow, row))) {
|
||||
this.$refs.leftTable.toggleRowSelection(row)
|
||||
}
|
||||
},
|
||||
handleRightRowClick(row) {
|
||||
this.$refs.rightTable.toggleRowSelection(row)
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.handlePaginationCallBack()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageIndex = val
|
||||
this.handlePaginationCallBack()
|
||||
},
|
||||
//查询按钮
|
||||
handlePaginationCallBack() {
|
||||
if (this.showPagination && this.paginationCallBack) {
|
||||
const condition = {
|
||||
pageIndex: this.pageIndex,
|
||||
pageSize: this.pageSize,
|
||||
...this.leftQueryCondition
|
||||
}
|
||||
this.paginationCallBack.call(null, condition).then(result => {
|
||||
if (result && Array.isArray(result.data)) {
|
||||
this.leftTableData = result.data
|
||||
this.totalSize = result.total
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.leftTableData.forEach(leftRow => {
|
||||
const isHave = this.rightTableData.some(rightRow => this.checkObjectIsEqual(rightRow, leftRow))
|
||||
this.$refs.leftTable.toggleRowSelection(leftRow, isHave)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
handleRowStyle({ row }) {
|
||||
if (this.rightTableData.some(rightRow => this.checkObjectIsEqual(rightRow, row))) {
|
||||
return {
|
||||
color: 'blue'
|
||||
}
|
||||
}
|
||||
return {}
|
||||
},
|
||||
handleSelectable(row) {
|
||||
return !this.rightTableData.some(rightRow => this.checkObjectIsEqual(rightRow, row))
|
||||
},
|
||||
addToRight() {
|
||||
for (const item of this.leftSelection) {
|
||||
const isHave = this.rightTableData.some(rightRow => this.checkObjectIsEqual(rightRow, item))
|
||||
if (!isHave) {
|
||||
this.rightTableData.push(item)
|
||||
}
|
||||
}
|
||||
this.$emit('input', this.rightTableData)
|
||||
},
|
||||
addToLeft() {
|
||||
this.rightSelection.forEach(item => {
|
||||
const index = this.rightTableData.findIndex(rightRow => this.checkObjectIsEqual(rightRow, item))
|
||||
if (index !== -1) {
|
||||
this.rightTableData.splice(index, 1)
|
||||
const leftRow = this.leftTableData.find(leftRow => this.checkObjectIsEqual(leftRow, item))
|
||||
if (leftRow) {
|
||||
this.$refs.leftTable.toggleRowSelection(leftRow, false)
|
||||
}
|
||||
}
|
||||
})
|
||||
this.$emit('input', this.rightTableData)
|
||||
},
|
||||
onLeftQuerySubmit() {
|
||||
this.handlePaginationCallBack()
|
||||
},
|
||||
onRightQuerySubmit() {
|
||||
this.rightConditionTemp = JSON.parse(JSON.stringify(this.rightQueryCondition))
|
||||
},
|
||||
checkObjectIsEqual(rowObj1, rowObj2) {
|
||||
return this.tableRowKey(rowObj1) === this.tableRowKey(rowObj2)
|
||||
},
|
||||
clear() {
|
||||
this.rightTableData = []
|
||||
this.$refs.leftTable.clearSelection()
|
||||
for (const key in this.leftQueryCondition) {
|
||||
this.leftQueryCondition[key] = undefined
|
||||
}
|
||||
for (const key in this.rightQueryCondition) {
|
||||
this.rightQueryCondition[key] = undefined
|
||||
}
|
||||
this.pageIndex = 1
|
||||
this.handlePaginationCallBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.transfer {
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.el-icon-arrow-right, .el-icon-arrow-left {
|
||||
font-size: 40px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.transfer-panel {
|
||||
border: 1px solid #EBEEF5;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
background: #FFF;
|
||||
display: inline-block;
|
||||
width: calc((100% - 100px) / 2);
|
||||
max-height: 100%;
|
||||
box-sizing: border-box;
|
||||
position: relative
|
||||
}
|
||||
|
||||
.transfer-panel .transfer-panel-header {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
background: #F5F7FA;
|
||||
margin: 0;
|
||||
padding-left: 15px;
|
||||
border-bottom: 1px solid #EBEEF5;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.transfer-panel-header span:last-child {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
}
|
||||
|
||||
.transfer-buttons {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.transfer-button {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
color: #FFF;
|
||||
background-color: #409EFF;
|
||||
font-size: 0
|
||||
}
|
||||
|
||||
.transfer-button .button-text {
|
||||
margin-left: 2px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.transfer-button.is-with-texts {
|
||||
border-radius: 4px
|
||||
}
|
||||
|
||||
.transfer-button.is-disabled, .transfer-button.is-disabled:hover {
|
||||
border: 1px solid #DCDFE6;
|
||||
background-color: #F5F7FA;
|
||||
color: #C0C4CC
|
||||
}
|
||||
|
||||
.transfer-button:first-child {
|
||||
margin-bottom: 10px
|
||||
}
|
||||
|
||||
.transfer-button:nth-child(2) {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.transfer-button i, .transfer-button span {
|
||||
font-size: 14px
|
||||
}
|
||||
|
||||
.query-form {
|
||||
margin: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.query-form .el-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -25,7 +25,6 @@ import './assets/styles/index.scss'
|
||||
// 代码高亮
|
||||
import VueHighlightJS from 'vue-highlightjs'
|
||||
import 'highlight.js/styles/atom-one-dark.css'
|
||||
|
||||
import App from './App'
|
||||
import store from './store'
|
||||
import router from './router/routers'
|
||||
@@ -33,13 +32,22 @@ import router from './router/routers'
|
||||
import './assets/icons' // icon
|
||||
import './router/index' // permission control
|
||||
import 'echarts-gl'
|
||||
import { addDateRange, handleTree, parseTime, resetForm, selectDictLabel, selectDictLabels, flexWidth } from '@/utils/nladmin'
|
||||
import {
|
||||
addDateRange,
|
||||
flexWidth,
|
||||
handleTree,
|
||||
parseTime,
|
||||
resetForm,
|
||||
selectDictLabel,
|
||||
selectDictLabels
|
||||
} from '@/utils/nladmin'
|
||||
import { getValueByCode } from '@/api/system/param'
|
||||
|
||||
import 'jquery'
|
||||
|
||||
// 安装总线
|
||||
import VueBus from 'vue-bus'
|
||||
|
||||
Vue.use(scroll)
|
||||
|
||||
Vue.use(VueHighlightJS)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
:visible.sync="dialogVisible"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
title="aps提交"
|
||||
title="APS提交"
|
||||
width="500px"
|
||||
@close="close"
|
||||
>
|
||||
@@ -13,15 +13,12 @@
|
||||
<div>
|
||||
<!-- 搜索 -->
|
||||
<el-form ref="form" :model="form1" :rules="rules" label-width="110px" size="mini">
|
||||
|
||||
|
||||
<el-form-item label="订单阶段:" prop="bill_code">
|
||||
<el-select v-model="form.bill_type" style="width: 350px;">
|
||||
<el-option label="前段" value="2"/>
|
||||
<el-option label="后段" value="3"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="订单阶段:" prop="bill_code">-->
|
||||
<!-- <el-select v-model="form.bill_type" style="width: 350px;">-->
|
||||
<!-- <el-option label="前段" value="2"/>-->
|
||||
<!-- <el-option label="后段" value="3"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="订单交期:" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="form.createTime"
|
||||
@@ -31,16 +28,14 @@
|
||||
value-format="yyyy-MM-dd"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<!-- <el-form-item label="销售订单号:" prop="bill_code">
|
||||
<el-input v-model="form.bill_code" style="width: 350px;"/>
|
||||
</el-form-item> -->
|
||||
|
||||
|
||||
</el-form>
|
||||
<el-button class="filter-item" icon="el-icon-search" size="mini" type="success" @click="queryStruct">确认
|
||||
</el-button>
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 20px;">
|
||||
<el-button class="filter-item" icon="el-icon-search" size="mini" type="success" @click="queryStruct">确认
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -92,11 +87,6 @@ export default {
|
||||
this.showErrorNotification('请选择订单交期')
|
||||
return
|
||||
}
|
||||
// 校验销售订单号值是否为空
|
||||
if (!this.form.bill_type) {
|
||||
this.showErrorNotification('请选择订单阶段')
|
||||
return
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
if (this.form.createTime) {
|
||||
this.form.date_begin = this.form.createTime[0]
|
||||
@@ -106,7 +96,8 @@ export default {
|
||||
this.crud.notify('提交成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.fullscreenLoading = false
|
||||
this.dialogVisible = false
|
||||
this.form = {} // 清空表单数据
|
||||
this.form = {} // 清空表单数据]
|
||||
this.crud.toQuery()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
|
||||
@@ -5,101 +5,101 @@
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-suffix=":"
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-suffix=":"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item label="销售单号">
|
||||
<el-input
|
||||
v-model="query.sale_code"
|
||||
class="filter-item"
|
||||
clearable
|
||||
placeholder="销售单号"
|
||||
style="width: 200px;"
|
||||
v-model="query.sale_code"
|
||||
class="filter-item"
|
||||
clearable
|
||||
placeholder="销售单号"
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料搜索">
|
||||
<el-input
|
||||
v-model="query.material"
|
||||
class="filter-item"
|
||||
clearable
|
||||
placeholder="物料编码、名称或规格"
|
||||
size="small"
|
||||
style="width: 200px;"
|
||||
v-model="query.material"
|
||||
class="filter-item"
|
||||
clearable
|
||||
placeholder="物料编码、名称或规格"
|
||||
size="small"
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单交期">
|
||||
<el-date-picker
|
||||
v-model="query.planTime"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@change="crud.toQuery"
|
||||
v-model="query.planTime"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@change="crud.toQuery"
|
||||
v-model="query.createTime"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
<el-form-item label="单据类型">
|
||||
<el-select
|
||||
v-model="query.sale_type"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 200px"
|
||||
@change="crud.toQuery"
|
||||
v-model="query.sale_type"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 200px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.PCS_SAL_TYPE"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in dict.PCS_SAL_TYPE"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<el-form-item label="生成方式">
|
||||
<el-select
|
||||
v-model="query.create_mode"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 200px"
|
||||
@change="crud.toQuery"
|
||||
v-model="query.create_mode"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 200px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_CREATE_MODE"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in dict.ST_CREATE_MODE"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 200px"
|
||||
@change="crud.toQuery"
|
||||
v-model="query.status"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 200px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.PCS_SALE_STATUS"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in dict.PCS_SALE_STATUS"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -116,12 +116,12 @@
|
||||
<rrOperation :crud="crud"/>
|
||||
</el-form>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
type="success"
|
||||
@click="deleteApsData"
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
type="success"
|
||||
@click="deleteApsData"
|
||||
>
|
||||
清空测试数据
|
||||
</el-button>
|
||||
@@ -129,66 +129,66 @@
|
||||
</div>
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="uploadShow = true"
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="uploadShow = true"
|
||||
>
|
||||
导入
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
type="success"
|
||||
@click="importin"
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
type="success"
|
||||
@click="importin"
|
||||
>
|
||||
aps提交
|
||||
APS提交
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:before-close="crud.cancelCU"
|
||||
:close-on-click-modal="false"
|
||||
:title="crud.status.title"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
width="1200px"
|
||||
:before-close="crud.cancelCU"
|
||||
:close-on-click-modal="false"
|
||||
:title="crud.status.title"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
width="1200px"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:inline="true"
|
||||
:model="form"
|
||||
label-width="160px"
|
||||
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
|
||||
ref="form"
|
||||
:inline="true"
|
||||
:model="form"
|
||||
label-width="160px"
|
||||
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
|
||||
>
|
||||
<el-form-item label="车间" prop="product_area">
|
||||
<!-- unit_list-->
|
||||
<el-select
|
||||
v-model="form.product_area" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
placeholder=""
|
||||
v-model="form.product_area" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
placeholder=""
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in dict.product_area"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="销售单号" prop="sale_code">
|
||||
<el-input
|
||||
v-model="form.sale_code" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
style="width: 200px;"
|
||||
v-model="form.sale_code" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同号" prop="contract_code">
|
||||
<el-input
|
||||
v-model="form.contract_code" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
style="width: 200px;"
|
||||
v-model="form.contract_code" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="计量单位" prop="unit_name">
|
||||
@@ -203,8 +203,8 @@
|
||||
</el-form-item> -->
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<el-input
|
||||
v-model="form.material_code" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
style="width: 200px;"
|
||||
v-model="form.material_code" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="客户名称" prop="cust_name">
|
||||
@@ -219,10 +219,10 @@
|
||||
</el-form-item> -->
|
||||
<el-form-item label="计划交期时间" prop="plandeliver_date">
|
||||
<el-date-picker
|
||||
v-model="form.plandeliverDate"
|
||||
style="width: 200px;"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="form.plandeliverDate"
|
||||
style="width: 200px;"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
/>
|
||||
<el-form-item label="订单数量" prop="sale_qty">
|
||||
<el-input-number v-model="form.sale_qty" style="width: 200px;"/>
|
||||
@@ -235,51 +235,51 @@
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button
|
||||
:loading="crud.cu === 2"
|
||||
type="primary"
|
||||
@click="crud.submitCU"
|
||||
:loading="crud.cu === 2"
|
||||
type="primary"
|
||||
@click="crud.submitCU"
|
||||
>确认
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column
|
||||
label="销售单号"
|
||||
min-width="100"
|
||||
prop="sale_code"
|
||||
show-overflow-tooltip
|
||||
label="销售单号"
|
||||
min-width="100"
|
||||
prop="sale_code"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="行号"
|
||||
min-width="60"
|
||||
prop="seq_no"
|
||||
show-overflow-tooltip
|
||||
label="行号"
|
||||
min-width="60"
|
||||
prop="seq_no"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!-- <el-table-column prop="seq_no" label="明细序号" /> -->
|
||||
|
||||
<el-table-column
|
||||
:min-width="flexWidth('contract_code', crud.data, '合同号')" label="合同号"
|
||||
prop="contract_code"
|
||||
:min-width="flexWidth('contract_code', crud.data, '合同号')" label="合同号"
|
||||
prop="contract_code"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
:min-width="flexWidth('material_code', crud.data, '物料编码')" label="物料编码"
|
||||
prop="material_code"
|
||||
:min-width="flexWidth('material_code', crud.data, '物料编码')" label="物料编码"
|
||||
prop="material_code"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
:min-width="flexWidth('material_spec', crud.data, '物料规格')"
|
||||
label="物料规格"
|
||||
prop="material_spec"
|
||||
:min-width="flexWidth('material_spec', crud.data, '物料规格')"
|
||||
label="物料规格"
|
||||
prop="material_spec"
|
||||
/>
|
||||
|
||||
<!-- <el-table-column-->
|
||||
@@ -301,35 +301,34 @@
|
||||
<el-table-column label="预入库数量" min-width="88" prop="instor_qty"/>
|
||||
<el-table-column label="入库数量" prop="in_storage_qty"/>
|
||||
<el-table-column label="发货数量" prop="sendout_qty"/>
|
||||
|
||||
<el-table-column
|
||||
label="预入库交期"
|
||||
min-width="100"
|
||||
prop="warehousing_date"
|
||||
show-overflow-tooltip
|
||||
label="计划交期"
|
||||
min-width="100"
|
||||
prop="plandeliverDate"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="计划交期"
|
||||
min-width="100"
|
||||
prop="plandeliverDate"
|
||||
show-overflow-tooltip
|
||||
label="预入库交期"
|
||||
min-width="100"
|
||||
prop="warehousing_date"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="订单交期"
|
||||
min-width="100"
|
||||
prop="order_date"
|
||||
show-overflow-tooltip
|
||||
label="订单交期"
|
||||
min-width="100"
|
||||
prop="order_date"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="订单状态" prop="status">
|
||||
<el-table-column label="订单状态" min-width="100" prop="status">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.PCS_SALE_STATUS[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
min-width="80"
|
||||
prop="qty_unit_name"
|
||||
show-overflow-tooltip
|
||||
label="计量单位"
|
||||
min-width="80"
|
||||
prop="qty_unit_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="后段计划交期"-->
|
||||
@@ -344,23 +343,23 @@
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column
|
||||
:min-width="flexWidth('rawmaterial_name', crud.data, '原辅料信息')"
|
||||
label="原辅料信息"
|
||||
prop="rawmaterial_name"
|
||||
show-overflow-tooltip
|
||||
:min-width="flexWidth('rawmaterial_name', crud.data, '原辅料信息')"
|
||||
label="原辅料信息"
|
||||
prop="rawmaterial_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
:min-width="flexWidth('rate_qty', crud.data, '单重')"
|
||||
label="单重"
|
||||
prop="rate_qty"
|
||||
show-overflow-tooltip
|
||||
:min-width="flexWidth('rate_qty', crud.data, '单重')"
|
||||
label="单重"
|
||||
prop="rate_qty"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
:min-width="flexWidth('canuse_qty', crud.data, '原辅料库存')"
|
||||
label="原辅料库存"
|
||||
prop="canuse_qty"
|
||||
show-overflow-tooltip
|
||||
width="90"
|
||||
:min-width="flexWidth('canuse_qty', crud.data, '原辅料库存')"
|
||||
label="原辅料库存"
|
||||
prop="canuse_qty"
|
||||
show-overflow-tooltip
|
||||
width="90"
|
||||
/>
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="early_start_time"-->
|
||||
@@ -369,10 +368,10 @@
|
||||
<!-- show-overflow-tooltip-->
|
||||
<!-- />-->
|
||||
<el-table-column
|
||||
label="销售单类型"
|
||||
min-width="100"
|
||||
prop="sale_type"
|
||||
show-overflow-tooltip
|
||||
label="销售单类型"
|
||||
min-width="100"
|
||||
prop="sale_type"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.PCS_SAL_TYPE[scope.row.sale_type] }}
|
||||
@@ -385,19 +384,19 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人" prop="create_name"/>
|
||||
<el-table-column
|
||||
:min-width="flexWidth('createTime', crud.data, '创建时间')"
|
||||
label="创建时间"
|
||||
prop="createTime"
|
||||
:min-width="flexWidth('createTime', crud.data, '创建时间')"
|
||||
label="创建时间"
|
||||
prop="createTime"
|
||||
/>
|
||||
<el-table-column
|
||||
:min-width="flexWidth('update_time',crud.data,'修改时间')" label="修改时间"
|
||||
prop="update_time"
|
||||
:min-width="flexWidth('update_time',crud.data,'修改时间')" label="修改时间"
|
||||
prop="update_time"
|
||||
/>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
min-width="200"
|
||||
prop="remark"
|
||||
show-overflow-tooltip
|
||||
label="备注"
|
||||
min-width="200"
|
||||
prop="remark"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!-- <el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
@@ -412,8 +411,8 @@
|
||||
<pagination/>
|
||||
</div>
|
||||
<UploadDialog
|
||||
:dialog-show.sync="uploadShow"
|
||||
@tableChanged3="tableChanged3"
|
||||
:dialog-show.sync="uploadShow"
|
||||
@tableChanged3="tableChanged3"
|
||||
/>
|
||||
<Dialog :dialog-show.sync="dialogShow"/>
|
||||
</div>
|
||||
@@ -471,7 +470,7 @@ export default {
|
||||
title: '销售订单',
|
||||
url: 'api/mpsSaleOrder',
|
||||
idField: 'sale_id',
|
||||
sort: 'sale_id,desc',
|
||||
sort: 'der.sale_code,seq_no',
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: true,
|
||||
|
||||
710
mes/qd/src/views/wms/product_manage/workorder/adjustDialog.vue
Normal file
710
mes/qd/src/views/wms/product_manage/workorder/adjustDialog.vue
Normal file
@@ -0,0 +1,710 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 排产调整弹窗 -->
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="editFormVisible"
|
||||
class="edit-form"
|
||||
width="77%"
|
||||
>
|
||||
<div style="position: absolute; top: 17px; right: 68px;">
|
||||
<el-button
|
||||
plain
|
||||
size="mini"
|
||||
type="success"
|
||||
@click="openMoldsButton()"
|
||||
>
|
||||
装车总览
|
||||
</el-button>
|
||||
</div>
|
||||
<div style="margin-bottom: 20px;"></div>
|
||||
<el-tabs :tab-position="tabPosition" @tab-click="handleClick">
|
||||
<el-tab-pane v-for="(tab, index) in tabs" :key="index">
|
||||
<span slot="label">{{ tab.label }}</span>
|
||||
<div class="table-container">
|
||||
<el-table
|
||||
:data="tableData.slice(0, tableData.length / 2)"
|
||||
:show-header="false"
|
||||
border
|
||||
class="responsive-table"
|
||||
>
|
||||
<el-table-column width="150">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<el-tag
|
||||
:type="scope.row.device_status === '0' ? scope.row.type : 'danger'"
|
||||
effect="dark"
|
||||
size="medium"
|
||||
>
|
||||
{{ scope.row.device_code }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column>
|
||||
<template slot-scope="scope">
|
||||
<div class="button-container">
|
||||
<el-button
|
||||
:disabled="scope.row.device_status === '1'"
|
||||
plain
|
||||
size="mini"
|
||||
type="success"
|
||||
@click="openMaterialSpec(scope.row.device_code,'','')"
|
||||
>
|
||||
{{ scope.row.first ? scope.row.first : '规格' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.device_status === '1'"
|
||||
plain
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="openMoldsButton(scope.row.device_code)"
|
||||
>
|
||||
{{ scope.row.second ? scope.row.second : '装车内容' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.device_status === '1'"
|
||||
plain
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="openPersonButton(scope.row.device_code)"
|
||||
>
|
||||
{{ scope.row.person_name ? scope.row.person_name : '人员' }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="table-gap"></div>
|
||||
<div class="table-container">
|
||||
<el-table
|
||||
:data="tableData.slice(tableData.length / 2)"
|
||||
:show-header="false"
|
||||
border
|
||||
class="responsive-table"
|
||||
>
|
||||
<el-table-column width="150">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<el-tag
|
||||
:type="scope.row.device_status === '0' ? scope.row.type : 'danger'"
|
||||
effect="dark"
|
||||
size="medium"
|
||||
>
|
||||
{{ scope.row.device_code }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column>
|
||||
<template slot-scope="scope">
|
||||
<div class="button-container">
|
||||
<el-button
|
||||
:disabled="scope.row.device_status === '1'"
|
||||
plain
|
||||
size="mini"
|
||||
type="success"
|
||||
@click="openMaterialSpec(scope.row.device_code,'','')"
|
||||
>
|
||||
{{ scope.row.first ? scope.row.first : '规格' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.device_status === '1'"
|
||||
plain
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="openMoldsButton(scope.row.device_code)"
|
||||
>
|
||||
{{ scope.row.second ? scope.row.second : '装车内容' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.device_status === '1'"
|
||||
plain
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="openPersonButton(scope.row.device_code)"
|
||||
>
|
||||
{{ scope.row.person_name ? scope.row.person_name : '人员' }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-dialog>
|
||||
<!-- 规格弹窗 -->
|
||||
<el-dialog
|
||||
:before-close="handleClose"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="editSpecVisible"
|
||||
width="96%"
|
||||
>
|
||||
<div style="display: flex; height:800px;flex-direction: column;">
|
||||
|
||||
|
||||
<div style="display: flex; align-items: center;">
|
||||
<label style="margin-right: 10px;">规格:</label>
|
||||
<el-select
|
||||
v-model="material_spec"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="选择规格"
|
||||
remote
|
||||
style="width: 150px; margin-bottom: 15px; margin-top: 10px;"
|
||||
@change="openMaterialSpec('', material_spec,'')"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in selectSpecOptions"
|
||||
:key="item.material_spec"
|
||||
:label="item.material_spec"
|
||||
:value="item.material_spec"
|
||||
/>
|
||||
</el-select>
|
||||
<span style="margin-right: 25px;"></span>
|
||||
<label style="margin-right: 10px;">排序:</label>
|
||||
<el-select
|
||||
v-model="value"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="选择排序方式"
|
||||
remote
|
||||
style="width: 150px; margin-bottom: 15px; margin-top: 10px;"
|
||||
@change="openMaterialSpec('', '',value)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in sorts"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span style="margin-right: 50px;"></span>
|
||||
<el-button
|
||||
icon="el-icon-sort"
|
||||
style="margin-bottom: 10px;"
|
||||
type="primary"
|
||||
@click="clearSelectSpecOptions"
|
||||
>
|
||||
重置
|
||||
</el-button>
|
||||
</div>
|
||||
<transfer
|
||||
ref="transfer"
|
||||
:button-texts="['添加','删除']"
|
||||
:left-columns="leftColumns"
|
||||
:pagination-call-back="paginationCallBack"
|
||||
:query-texts="['筛选','筛选']"
|
||||
:show-pagination="true"
|
||||
:show-query="false" :table-row-key="row => row.workorder_no"
|
||||
:title-texts="['待选','已选']"
|
||||
>
|
||||
<template v-slot:leftCondition="{scope}">
|
||||
<el-form-item label="规格">
|
||||
<el-input v-model="scope.device_count" placeholder="规格"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</transfer>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: flex-end;">
|
||||
<el-button style="margin-right: 20px;" @click="clearTransfer">清空</el-button>
|
||||
<el-button type="primary" @click="submitTransfer">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 人员弹窗 -->
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:before-close="handlePersonClose"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="editPersonVisible"
|
||||
class="edit-form"
|
||||
width="60%"
|
||||
>
|
||||
<div class="table-container" style="width: 100%">
|
||||
<el-form ref="form" label-width="100px">
|
||||
<el-form-item label="">
|
||||
<div
|
||||
v-for="(item, index) in equipments"
|
||||
:key="index"
|
||||
class="check-group"
|
||||
>
|
||||
<el-tag class="custom-tag">{{ item.t_name }}</el-tag>
|
||||
<div style="margin-top: 10px; margin-bottom: 20px;">
|
||||
<el-checkbox-group
|
||||
v-model="checkedEquipments[index]"
|
||||
@change="handleChange(item.t_id)"
|
||||
>
|
||||
{{ checkedEquipments[index] }}
|
||||
<el-checkbox
|
||||
v-for="data in item.childMenu"
|
||||
:key="data.name"
|
||||
:label="data.id"
|
||||
border
|
||||
>
|
||||
{{ data.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handlePersonClose">取消</el-button>
|
||||
<el-button type="primary" @click="submitPersonList">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 装车内容弹窗 -->
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="editMoldsVisible"
|
||||
class="edit-form"
|
||||
width="55%"
|
||||
>
|
||||
<div style="margin-bottom: 20px;"></div>
|
||||
<div class="table-container" style="width: 100%">
|
||||
<el-table :data="MoldsData">
|
||||
<el-table-column label="工序" prop="workprocedure_name"></el-table-column>
|
||||
<el-table-column label="设备" prop="device_code"></el-table-column>
|
||||
<el-table-column label="装车内容" prop="material_spec"></el-table-column>
|
||||
<el-table-column label="工单编号" prop="workorder_code"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin-bottom: 40px;"></div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import device from '@/api/wms/pdm/device'
|
||||
import crudProduceshiftorder from '@/views/wms/product_manage/workorder/produceshiftorder'
|
||||
import transfer from '@/components/transfer/transfer'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
transfer
|
||||
},
|
||||
props: {
|
||||
leftTableData: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabs: [
|
||||
{ label: '激光下料' },
|
||||
{ label: '旋压下料' },
|
||||
{ label: '无屑下料' },
|
||||
{ label: '推弯一体机' },
|
||||
{ label: '直接打槽' },
|
||||
{ label: '三通拉伸' },
|
||||
{ label: '镗孔一体机' }
|
||||
],
|
||||
sorts: [
|
||||
{
|
||||
value: 'material_id',
|
||||
label: '规格'
|
||||
}, {
|
||||
value: 'num_sort',
|
||||
label: '顺序号'
|
||||
}, {
|
||||
value: 'workorder_code',
|
||||
label: '工单号'
|
||||
}, {
|
||||
value: 'device_sort',
|
||||
label: '设备号'
|
||||
}, {
|
||||
value: 'start_time',
|
||||
label: '开始生产时间'
|
||||
}, {
|
||||
value: 'workorder_status',
|
||||
label: '状态'
|
||||
}],
|
||||
value: 'start_time',
|
||||
material_spec: null,
|
||||
selectSpecOptions: [],
|
||||
deviceList: [],
|
||||
checkedEquipments: [], //选中后修改后的checked项
|
||||
checkEquip: [ //调接口的查询的数据,各el-checkbox-group默认checked项
|
||||
],
|
||||
workorderData: [],
|
||||
MoldsData: [],
|
||||
tabIndex: 0,
|
||||
editPersonVisible: false,
|
||||
editMoldsVisible: false,
|
||||
editFormVisible: false,
|
||||
editSpecVisible: false,
|
||||
tableData1: [],
|
||||
leftColumns: [
|
||||
{ label: '已排序', id: 'NO', width: '65px' },
|
||||
{ label: '生产设备', id: 'device_code', width: '110px' },
|
||||
{ label: '工单id', id: 'workorder_no', width: '150px' },
|
||||
{ label: '工单号', id: 'workorder_code', width: '110px' },
|
||||
{ label: '状态', id: 'workorder_status', width: '60px' },
|
||||
{ label: '规格', id: 'material_spec', width: '150px' },
|
||||
{ label: '开始生产时间', id: 'start_time', width: '140px' },
|
||||
{ label: '开机数', id: 'device_count', width: '63px' },
|
||||
{ label: '需生产数', id: 'plan_qty', width: '80px' },
|
||||
{ label: '已生产数', id: 'report_qty', width: '80px' },
|
||||
{ label: '未完成数', id: 'undone_qty', width: '80px' }
|
||||
// { label: '订单交期', id: 'plandeliver_date', width: '100px' }
|
||||
],
|
||||
device_code_select: '',
|
||||
sort: 'start_time',
|
||||
selectedValue: '',
|
||||
sortDirection: 'asc',
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
adjusts() {
|
||||
this.editFormVisible = true
|
||||
this.queryDeviceList(0)
|
||||
},
|
||||
//排产调整
|
||||
handleClick(tab) {
|
||||
this.tabIndex = tab.index
|
||||
device.query(this.tabIndex).then(res => {
|
||||
this.tableData = res
|
||||
})
|
||||
},
|
||||
handleClicks(tab) {
|
||||
device.query(tab).then(res => {
|
||||
this.tableData = res
|
||||
})
|
||||
},
|
||||
queryDeviceList(tab) {
|
||||
device.query(tab).then(res => {
|
||||
this.tableData = res
|
||||
})
|
||||
},
|
||||
async queryDeviceLists(tab) {
|
||||
const res = await device.query(tab)
|
||||
this.tableData = res
|
||||
},
|
||||
//关闭人员弹窗
|
||||
handlePersonClose() {
|
||||
this.checkedEquipments = []
|
||||
this.checkEquip = []
|
||||
this.editPersonVisible = false
|
||||
},
|
||||
clearTransfer() {
|
||||
this.$refs.transfer.clear()
|
||||
},
|
||||
clearSelectSpecOptions() {
|
||||
this.selectedValue = ''
|
||||
this.openMaterialSpec(this.device_code_select, this.selectedValue, this.sort)
|
||||
},
|
||||
//规格提交
|
||||
submitTransfer() {
|
||||
const transferList = this.$refs.transfer.rightTableData
|
||||
const params = {
|
||||
'transferList': transferList,
|
||||
'device_code': this.device_code_select,
|
||||
tabIndex: this.tabIndex
|
||||
}
|
||||
crudProduceshiftorder.submitAdjustWorkOrder(params).then(res => {
|
||||
this.queryDeviceLists(this.tabIndex)
|
||||
//this.editSpecVisible = false
|
||||
this.$parent.success()
|
||||
this.openMaterialSpec(this.device_code_select, this.selectedValue, this.sort)
|
||||
})
|
||||
},
|
||||
//点击规格
|
||||
async openMaterialSpec(deviceCode, selectedValue, sort) {
|
||||
try {
|
||||
debugger
|
||||
if (selectedValue !== '') {
|
||||
this.selectedValue = selectedValue
|
||||
}
|
||||
if (sort !== '') {
|
||||
this.sort = sort
|
||||
}
|
||||
const queryParam = { tabIndex: this.tabIndex }
|
||||
const res = await crudProduceshiftorder.queryAdjustWorkOrder(queryParam)
|
||||
const content = res.content
|
||||
this.selectSpecOptions = content.reduce((acc, currentItem) => {
|
||||
if (!acc.some(item => item.material_spec === currentItem.material_spec)) {
|
||||
acc.push(currentItem)
|
||||
}
|
||||
return acc
|
||||
}, [])
|
||||
debugger
|
||||
if (selectedValue !== '' || this.sort !== '') {
|
||||
if (this.selectedValue !== '') {
|
||||
debugger
|
||||
this.editSpecVisible = true
|
||||
this.tableData1 = content.filter(item => item.material_spec === this.selectedValue).sort((a, b) => a[this.sort] - b[this.sort])
|
||||
this.$nextTick(() => {
|
||||
this.$refs.transfer.leftTableData = content.filter(item => item.material_spec === this.selectedValue).sort((a, b) => a[this.sort] - b[this.sort])
|
||||
this.$refs.transfer.$emit('initData', content.filter(item => item.NO !== 999 && item.device_code === this.device_code_select).sort((a, b) => a[this.sort] - b[this.sort]))
|
||||
})
|
||||
} else {
|
||||
debugger
|
||||
if (deviceCode !== '') {
|
||||
this.device_code_select = deviceCode
|
||||
}
|
||||
this.editSpecVisible = true
|
||||
this.tableData1 = content.sort((a, b) => a[this.sort] - b[this.sort])
|
||||
this.$nextTick(() => {
|
||||
this.$refs.transfer.leftTableData = content.sort((a, b) => a[this.sort] - b[this.sort])
|
||||
this.$refs.transfer.$emit('initData', content.filter(item => item.NO !== 999 && item.device_code === this.device_code_select).sort((a, b) => a[this.sort] - b[this.sort]))
|
||||
})
|
||||
}
|
||||
}
|
||||
this.$refs.transfer.pageIndex = 1
|
||||
this.$refs.transfer.pageSize = 20
|
||||
this.$refs.transfer.totalSize = this.tableData1.length
|
||||
} catch (err) {
|
||||
debugger
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
|
||||
// async openMaterialSpec(deviceCode, selectedValue) {
|
||||
// const queryParam = { orderBy: 'no', tabIndex: this.tabIndex }
|
||||
// try {
|
||||
// const res = await crudProduceshiftorder.queryAdjustWorkOrder(queryParam)
|
||||
// const content = res.content
|
||||
// this.selectSpecOptions = content.reduce((acc, currentItem) => {
|
||||
// if (!acc.some(item => item.material_spec === currentItem.material_spec)) {
|
||||
// acc.push(currentItem)
|
||||
// }
|
||||
// return acc
|
||||
// }, [])
|
||||
// if (selectedValue) {
|
||||
// this.tableData1 = content.filter(item => item.material_spec === selectedValue)
|
||||
// this.$refs.transfer.leftTableData = content.filter(item => item.material_spec === selectedValue)
|
||||
// this.$refs.transfer.rightTableData = content.filter(item => item.material_spec === selectedValue && item.NO !== 999 && item.device_code === this.device_code_select)
|
||||
// } else {
|
||||
// if (deviceCode !== '') {
|
||||
// this.device_code_select = deviceCode
|
||||
// }
|
||||
// this.editSpecVisible = true
|
||||
// this.tableData1 = content
|
||||
// this.$refs.transfer.leftTableData = content
|
||||
// this.$refs.transfer.rightTableData = content.filter(item => item.NO !== 999 && item.device_code === this.device_code_select)
|
||||
// }
|
||||
// this.$refs.transfer.pageIndex = 1
|
||||
// this.$refs.transfer.pageSize = 20
|
||||
// this.$refs.transfer.totalSize = this.tableData1.length
|
||||
// } catch (err) {
|
||||
// console.log(err)
|
||||
// }
|
||||
// },
|
||||
//穿梭表格分页
|
||||
paginationCallBack(obj) {
|
||||
let d = this.tableData1.filter((item, index) => {
|
||||
if (index >= (obj.pageIndex - 1) * obj.pageSize && index < obj.pageIndex * obj.pageSize) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
return new Promise(((resolve, reject) => {
|
||||
try {
|
||||
resolve({ total: this.tableData1.length, data: d })
|
||||
} catch {
|
||||
reject()
|
||||
}
|
||||
}))
|
||||
},
|
||||
//规格界面选中下拉框
|
||||
// async handleSelectSpec(selectedValue) {
|
||||
// const queryParam = { tabIndex: this.tabIndex, material: selectedValue, orderBy: 'no' }
|
||||
// try {
|
||||
// const res = await crudProduceshiftorder.queryAdjustWorkOrder(queryParam)
|
||||
// this.tableData1 = res.content
|
||||
// this.$refs.transfer.leftTableData = res.content
|
||||
// } catch (err) {
|
||||
// console.log(err)
|
||||
// }
|
||||
// },
|
||||
//关闭规格弹窗
|
||||
handleClose(done) {
|
||||
this.clearTransfer()
|
||||
this.editSpecVisible = false
|
||||
},
|
||||
//人员提交
|
||||
submitPersonList() {
|
||||
if (this.checkedEquipments[0].length > 1) {
|
||||
this.$notify.warning({
|
||||
title: '提示',
|
||||
message: '一台设备只能绑定一个人员'
|
||||
})
|
||||
return
|
||||
}
|
||||
let device_no = 'device_no:' + this.device_code_select
|
||||
if (!this.checkedEquipments.some(arr => arr[0] === device_no)) {
|
||||
// 如果不存在,则添加到 checkedEquipments 中
|
||||
this.checkedEquipments.push([device_no])
|
||||
}
|
||||
crudProduceshiftorder.updateTeamSelect(this.checkedEquipments).then(res => {
|
||||
this.editPersonVisible = false
|
||||
this.queryDeviceLists(this.tabIndex)
|
||||
this.checkedEquipments = []
|
||||
this.checkEquip = []
|
||||
this.$parent.success()
|
||||
this.checkedEquipments.pop()
|
||||
})
|
||||
},
|
||||
|
||||
// fetchData(deviceCode, material_spec, spec_select) {
|
||||
// try {
|
||||
// let queryParam = { device_code: deviceCode, material: material_spec, shift_type_scode: spec_select }
|
||||
// return crudProduceshiftorder.queryAdjustWorkOrder(queryParam)
|
||||
// } catch (err) {
|
||||
// console.error(err)
|
||||
// return null
|
||||
// }
|
||||
// },
|
||||
|
||||
//点击规格统计
|
||||
specStatistic() {
|
||||
this.queryMaterialSpec()
|
||||
this.querySpecVisible = true
|
||||
},
|
||||
//点击规格统计
|
||||
async queryMaterialSpec() {
|
||||
try {
|
||||
const queryParam = { orderBy: 'start_time' }
|
||||
const res = await crudProduceshiftorder.queryStatisticsSpec(queryParam)
|
||||
const content = res.content
|
||||
this.materialSpecData = content
|
||||
this.selectSpecOptions = content.reduce((acc, currentItem) => {
|
||||
if (!acc.some(item => item.material_spec === currentItem.material_spec)) {
|
||||
acc.push(currentItem)
|
||||
}
|
||||
return acc
|
||||
}, [])
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
//点击人员
|
||||
async openPersonButton(deviceCode) {
|
||||
this.device_code_select = deviceCode
|
||||
try {
|
||||
const queryParam = { device_code: deviceCode }
|
||||
const selectRes = await crudProduceshiftorder.queryTeamSelect(queryParam)
|
||||
//const res = await crudProduceshiftorder.queryTeamMenu(queryParam)
|
||||
this.checkEquip = selectRes.checkResult
|
||||
this.equipments = selectRes.menuResult
|
||||
for (let i = 0; i < this.checkEquip.length; i++) {
|
||||
let checkArr = []
|
||||
let item = this.checkEquip[i].childMenu
|
||||
if (item.length === 0) {
|
||||
this.checkedEquipments.push([])
|
||||
} else {
|
||||
for (let j = 0; j < item.length; j++) {
|
||||
checkArr.push(item[j].id)
|
||||
}
|
||||
this.checkedEquipments.push(checkArr)
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
this.editPersonVisible = true
|
||||
},
|
||||
|
||||
//点击装车内容总览
|
||||
async openMoldsButton(deviceCode) {
|
||||
try {
|
||||
const queryParam = { device_code: deviceCode, orderBy: 'workorder.workprocedure_id' }
|
||||
const res = await crudProduceshiftorder.queryMouldsSpec(queryParam)
|
||||
|
||||
this.MoldsData = res
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
this.editMoldsVisible = true
|
||||
},
|
||||
//选中人员设备
|
||||
handleChange() {
|
||||
this.checkEquipArr = []
|
||||
let arr = this.checkedEquipments
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
let equipment = arr[i]
|
||||
if (equipment.length > 0) {
|
||||
let obj = {
|
||||
id: this.equipments[i].id,
|
||||
equips: []
|
||||
}
|
||||
for (let j = 0; j < equipment.length; j++) {
|
||||
obj.equips.push(equipment[j])
|
||||
}
|
||||
this.checkEquipArr.push(obj)
|
||||
}
|
||||
}
|
||||
console.log(this.checkEquipArr)
|
||||
},
|
||||
|
||||
//规格统计下拉框
|
||||
async materialSelectSpec(selectedValue) {
|
||||
const queryParam = { material: selectedValue, orderBy: 'start_time' }
|
||||
try {
|
||||
const res = await crudProduceshiftorder.queryStatisticsSpec(queryParam)
|
||||
this.materialSpecData = res.content
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
//设备人员分派确定
|
||||
handleConfirm() {
|
||||
this.editFormVisible = false
|
||||
}
|
||||
//排产调整
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.table-container {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 45%;
|
||||
margin-right: 10px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.table-gap {
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.table-container {
|
||||
width: 100%;
|
||||
margin-right: 0;
|
||||
|
||||
}
|
||||
|
||||
.table-gap {
|
||||
display: none;
|
||||
|
||||
}
|
||||
|
||||
.responsive-table {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
|
||||
.button-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.custom-tag {
|
||||
font-size: 24px !important;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
916
mes/qd/src/views/wms/product_manage/workorder/adjustIndex.vue
Normal file
916
mes/qd/src/views/wms/product_manage/workorder/adjustIndex.vue
Normal file
@@ -0,0 +1,916 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-suffix=":"
|
||||
label-width="90px"
|
||||
>
|
||||
|
||||
<!-- 搜索 -->
|
||||
<el-form-item label="工单检索">
|
||||
<el-input
|
||||
v-model="query.workorder_code"
|
||||
class="filter-item"
|
||||
clearable
|
||||
placeholder="工单编码、工单标识"
|
||||
size="mini"
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料搜索">
|
||||
<el-input
|
||||
v-model="query.material"
|
||||
class="filter-item"
|
||||
clearable
|
||||
placeholder="物料编码、名称或规格"
|
||||
size="mini"
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属工序">
|
||||
<el-select
|
||||
v-model="query.workprocedure_id"
|
||||
class="filter-item"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="所属工序"
|
||||
size="small"
|
||||
style="width: 220px"
|
||||
@change="changeHeader(query.search, query.workprocedure_id)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in workprocedureList"
|
||||
:key="item.workprocedure_id"
|
||||
:label="item.workprocedure_name"
|
||||
:value="item.workprocedure_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建类型">
|
||||
<el-select
|
||||
v-model="query.create_type"
|
||||
class="filter-item"
|
||||
clearable
|
||||
multiple
|
||||
placeholder="请选择"
|
||||
style="width: 200px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.WORKORDER_CREATE_TYPE"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备搜索">
|
||||
<el-input
|
||||
v-model="query.device_code"
|
||||
class="filter-item"
|
||||
clearable
|
||||
placeholder="设备编号"
|
||||
size="mini"
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="班次类型">-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="query.shift_type_scode"-->
|
||||
<!-- clearable-->
|
||||
<!-- filterable-->
|
||||
<!-- placeholder="请选择"-->
|
||||
<!-- style="width: 200px"-->
|
||||
<!-- @change="crud.toQuery"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in dict.PDM_BI_SHIFTTYPE"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="计划日期">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="query.planTime"-->
|
||||
<!-- :default-time="['00:00:00','23:59:59']"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- @change="crud.toQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="生产日期">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="query.createTime"-->
|
||||
<!-- :default-time="['00:00:00','23:59:59']"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- @change="crud.toQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<rrOperation :crud="crud"/>
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
icon="el-icon-monitor"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="specStatistic()"
|
||||
>
|
||||
规格统计
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="adjust()"
|
||||
>
|
||||
排产调整
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column v-if="false" label="生产班次工单标识" prop="workorder_id"/>
|
||||
<el-table-column label="工单编号" prop="workorder_code" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
:style="{ color:'orange' }"
|
||||
>
|
||||
{{ scope.row.workorder_code == '0' ? '' : scope.row.workorder_code }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="工单下发顺序号"
|
||||
prop="aps_workorder_no"
|
||||
width="120px"
|
||||
>
|
||||
<template slot-scope="{ row }">
|
||||
<span
|
||||
:style="{
|
||||
color: row.aps_workorder_no === 999 || row.aps_workorder_no == '0' ? '' : 'orange',
|
||||
fontWeight: row.aps_workorder_no === 999 || row.aps_workorder_no == '0' ? 'normal' : 'bold'
|
||||
}"
|
||||
>
|
||||
{{ row.aps_workorder_no === 999 || row.aps_workorder_no == '0' ? '未调整' : row.aps_workorder_no }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="工单状态" prop="workorder_status">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.MPS_BD_ORDERSTATUS[scope.row.workorder_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="workprocedure_code" label="工序编码" />-->
|
||||
<el-table-column label="生产车间" prop="product_area"/>
|
||||
<el-table-column label="计划数量" prop="plan_qty"/>
|
||||
<el-table-column label="满筐数量" prop="outupperlimit_qty"/>
|
||||
<el-table-column label="电气实时数" prop="dq_real_qty" show-overflow-tooltip width="100"/>
|
||||
<el-table-column label="报工总数" prop="real_qty"/>
|
||||
<el-table-column
|
||||
:min-width="flexWidth('material_code',crud.data,'物料编码')"
|
||||
label="物料编码"
|
||||
prop="material_code"
|
||||
/>
|
||||
<el-table-column
|
||||
:min-width="flexWidth('material_spec',crud.data,'物料规格')"
|
||||
label="物料规格"
|
||||
prop="material_spec"
|
||||
/>
|
||||
<el-table-column
|
||||
:min-width="flexWidth('device_code',crud.data,'当前设备编码')"
|
||||
label="当前设备信息"
|
||||
prop="device_code"
|
||||
/>
|
||||
<el-table-column
|
||||
:min-width="flexWidth('workprocedure_name',crud.data,'工序名称')"
|
||||
label="工序名称"
|
||||
prop="workprocedure_name"
|
||||
/>
|
||||
<!-- <el-table-column :formatter="crud.formatQlNum4" label="物料单重" prop="material_weight" width="100"/>-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- :min-width="flexWidth('planproducestart_date',crud.data,'计划开始时间')"-->
|
||||
<!-- label="计划开始时间"-->
|
||||
<!-- prop="planproducestart_date"-->
|
||||
<!-- />-->
|
||||
<!-- <el-table-column-->
|
||||
<!-- :min-width="flexWidth('planproduceend_date',crud.data,'计划结束时间')"-->
|
||||
<!-- label="计划结束时间"-->
|
||||
<!-- prop="planproduceend_date"-->
|
||||
<!-- />-->
|
||||
<el-table-column
|
||||
:min-width="flexWidth('realproducestart_date',crud.data,'实际开始时间')"
|
||||
label="实际开始时间"
|
||||
prop="realproducestart_date"
|
||||
/>
|
||||
<el-table-column
|
||||
:min-width="flexWidth('realproduceend_date',crud.data,'实际结束时间')"
|
||||
label="实际结束时间"
|
||||
prop="realproduceend_date"
|
||||
/>
|
||||
<el-table-column
|
||||
:formatter="formatBoolean"
|
||||
label="允许修改报工数"
|
||||
prop="is_canupdate_update"
|
||||
show-overflow-tooltip
|
||||
width="200"
|
||||
/>
|
||||
<el-table-column :formatter="formatBoolean" label="是否搬运" prop="is_needmove"/>
|
||||
<el-table-column label="班次类型" prop="shift_type_scode">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.PDM_BI_SHIFTTYPE[scope.row.shift_type_scode] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :formatter="formatBoolean" label="是否异常" prop="is_error"/>
|
||||
<el-table-column label="异常信息" prop="error_info" show-overflow-tooltip/>
|
||||
<el-table-column label="备注" prop="remark"/>
|
||||
<el-table-column label="工单id" prop="workorder_id" width="160px"/>
|
||||
<el-table-column label="报废总数" prop="nok_qty"/>
|
||||
<el-table-column label="报修总数" prop="repare_qty"/>
|
||||
<el-table-column label="人员实际数量" prop="person_real_qty" show-overflow-tooltip width="100"/>
|
||||
<el-table-column label="操作工" prop="current_produce_person_name" show-overflow-tooltip/>
|
||||
<el-table-column label="创建类型" prop="create_type" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.WORKORDER_CREATE_TYPE[scope.row.create_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :min-width="flexWidth('create_name',crud.data,'创建人')" label="创建人" prop="create_name"/>
|
||||
<el-table-column
|
||||
:min-width="flexWidth('create_time',crud.data,'创建时间')"
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
/>
|
||||
<el-table-column :min-width="flexWidth('down_name',crud.data,'下发人')" label="下发人" prop="down_name"/>
|
||||
<el-table-column :min-width="flexWidth('down_time',crud.data,'下发时间')" label="下发时间" prop="down_time"/>
|
||||
<el-table-column :min-width="flexWidth('confirm_name',crud.data,'完工人')" label="完工人" prop="confirm_name"/>
|
||||
<el-table-column
|
||||
:min-width="flexWidth('confirm_time',crud.data,'完工时间')"
|
||||
label="完工时间"
|
||||
prop="confirm_time"
|
||||
/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
|
||||
<!-- 规格统计 -->
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="querySpecVisible"
|
||||
class="edit-form"
|
||||
width="75%"
|
||||
>
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
<el-select
|
||||
v-model="material_spec"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="选择规格"
|
||||
remote
|
||||
style="width: 140px; margin-bottom: 10px;margin-top: 10px;"
|
||||
@change="materialSelectSpec"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in selectSpecOptions"
|
||||
:key="item.material_spec"
|
||||
:label="item.material_spec"
|
||||
:value="item.material_spec"
|
||||
/>
|
||||
</el-select>
|
||||
<div class="table-container" style="width: 100%">
|
||||
<el-table :data="materialSpecData">
|
||||
<el-table-column label="工序" prop="workprocedure_name"></el-table-column>
|
||||
<el-table-column label="规格" prop="material_spec"></el-table-column>
|
||||
<el-table-column label="计划开机数" prop="device_count"></el-table-column>
|
||||
<el-table-column label="开始生产时间" prop="start_time"></el-table-column>
|
||||
<el-table-column label="订单交期" prop="plandeliver_date"></el-table-column>
|
||||
<el-table-column label="工单号" prop="workorder_no"></el-table-column>
|
||||
<el-table-column label="工单数" prop="workorder_count"></el-table-column>
|
||||
<el-table-column label="生产总数" prop="plan_qty"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="margin-bottom: 40px;"></div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 排产调整弹窗 -->
|
||||
<adjustDialog ref="adjustDialog"/>
|
||||
|
||||
</div>
|
||||
<MaterDtl
|
||||
:dialog-show.sync="materialShow"
|
||||
:is-single="true"
|
||||
:mater-opt-code="materType"
|
||||
@setMaterValue="setMaterValue"
|
||||
/>
|
||||
<ViewDialog ref="child3"/>
|
||||
|
||||
<SaleOrderDtl
|
||||
:dialog-show.sync="saleOrderShow"
|
||||
:is-single="true"
|
||||
:mater-opt-code="materType"
|
||||
@setMaterValue="setOrderValue"
|
||||
/>
|
||||
<ViewDialog ref="child3"/>
|
||||
<reportDialog ref="report" @AddChanged="querytable"/>
|
||||
<UploadDialog :dialog-show.sync="uploadShow" @tableChanged3="tableChanged3"/>
|
||||
<AddDialog :dialog-show.sync="addShow" @AddChanged="querytable"/>
|
||||
<ReplaceDeviceDialog ref="child4" @AddChanged="querytable"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudProduceshiftorder from '@/views/wms/product_manage/workorder/produceshiftorder'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
import SaleOrderDtl from '@/views/wms/pub/OrderDialog'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import ViewDialog from '@/views/wms/product_manage/workorder/ViewDialog'
|
||||
import reportDialog from '@/views/wms/product_manage/workorder/reportDialog'
|
||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import AddDialog from '@/views/wms/product_manage/workorder/AddDialog'
|
||||
import UploadDialog from '@/views/wms/product_manage/workorder/UploadDialog'
|
||||
import ReplaceDeviceDialog from '@/views/wms/product_manage/workorder/ReplaceDeviceDialog'
|
||||
import adjustDialog from '@/views/wms/product_manage/workorder/adjustDialog'
|
||||
import SaleOrder from '@/views/wms/pcs/saleorder/index.vue'
|
||||
|
||||
const defaultForm = {
|
||||
workorder_id: null,
|
||||
workorder_code: null,
|
||||
shift_type_scode: '1',
|
||||
workprocedure_id: null,
|
||||
product_area: '',
|
||||
plan_qty: null,
|
||||
real_qty: null,
|
||||
person_real_qty: null,
|
||||
dq_real_qty: null,
|
||||
material_id: null,
|
||||
material_code: null,
|
||||
material_weight: null,
|
||||
material_name: null,
|
||||
material_spec: null,
|
||||
planproducestart_date: null,
|
||||
planproduceend_date: null,
|
||||
realproducestart_date: null,
|
||||
realproduceend_date: null,
|
||||
device_code: null,
|
||||
current_produce_person_id: null,
|
||||
is_canupdate_update: true,
|
||||
package_ext: {},
|
||||
workorder_status: null,
|
||||
is_needmove: true,
|
||||
sale_id: null,
|
||||
create_type: null,
|
||||
is_error: null,
|
||||
error_info: null,
|
||||
remark: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_id: null,
|
||||
update_name: null,
|
||||
update_time: null,
|
||||
is_delete: null
|
||||
}
|
||||
export default {
|
||||
name: 'AdjustShiftorder',
|
||||
components: {
|
||||
SaleOrder,
|
||||
AddDialog,
|
||||
pagination,
|
||||
crudOperation,
|
||||
rrOperation,
|
||||
udOperation,
|
||||
MaterDtl,
|
||||
SaleOrderDtl,
|
||||
Treeselect,
|
||||
ViewDialog,
|
||||
reportDialog,
|
||||
UploadDialog,
|
||||
ReplaceDeviceDialog,
|
||||
adjustDialog
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
dicts: ['PDM_BI_SHIFTTYPE', 'MPS_BD_ORDERSTATUS', 'WORKORDER_CREATE_TYPE', 'is_used', 'PDM_BI_ORDERTYPE', 'IS_OR_NOT', 'product_area'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '工单调整', url: 'api/produceWorkorder', idField: 'workorder_id', sort: 'workorder_id,desc',
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
},
|
||||
query: {
|
||||
product_area: '',
|
||||
is_error: '0',
|
||||
filter_order_code: '1',
|
||||
order_status: ['1', '4']
|
||||
},
|
||||
crudMethod: { ...crudProduceshiftorder }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
querySpecVisible: false,
|
||||
materialSpecData: [],
|
||||
workprocedureList: [],
|
||||
selectSpecOptions: [],
|
||||
statisticsSpecOptions: [],
|
||||
workprocedureListArea: [],
|
||||
zxj: [{ value: 'A1_ZXJ_1', label: '一线1号装箱机' }, { value: 'A1_ZXJ_2', label: '一线2号装箱机' }],
|
||||
auto_confirm: [{ value: '1', label: '自动确认' }, { value: '2', label: '定时确认' }, {
|
||||
value: '3',
|
||||
label: '人工确认'
|
||||
}],
|
||||
cxj: [{ value: 'A1_KXJ_1', label: '一线1号拆箱机' }, { value: 'A1_KXJ_2', label: '一线2号拆箱机' }],
|
||||
trueorfalse: [{ value: true, label: '是' }, { value: false, label: '否' }],
|
||||
deviceList: [],
|
||||
classes3: [],
|
||||
materType: '01',
|
||||
materialShow: false,
|
||||
saleOrderShow: false,
|
||||
addShow: false,
|
||||
replaceShow: false,
|
||||
uploadShow: false,
|
||||
userList: [],
|
||||
order_status: ['-1'],
|
||||
permission: {},
|
||||
rules: {
|
||||
produceorder_code: [
|
||||
{ required: true, message: '生产班次工单编号不能为空', trigger: 'blur' }
|
||||
],
|
||||
shift_type_scode: [
|
||||
{ required: true, message: '班次类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
workprocedure_id: [
|
||||
{ required: true, message: '工序标识不能为空', trigger: 'blur' }
|
||||
],
|
||||
produce_date: [
|
||||
{ required: true, message: '生产日期不能为空', trigger: 'blur' }
|
||||
],
|
||||
plan_qty: [
|
||||
{ required: true, message: '计划数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
material_code: [
|
||||
{ required: true, message: '物料编码不能为空', trigger: 'change' }
|
||||
],
|
||||
sale_id: [
|
||||
{ required: true, message: '销售单号不能为空', trigger: 'change' }
|
||||
],
|
||||
order_status: [
|
||||
{ required: true, message: '工单状态不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_needmove: [
|
||||
{ required: true, message: '是否搬运不能为空', trigger: 'blur' }
|
||||
],
|
||||
order_type_scode: [
|
||||
{ required: true, message: '工单类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_canupdate_update: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
device_code: [
|
||||
{ required: true, message: '设备不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getworkprocedure()
|
||||
this.getworkprocedureByarea(this.form.product_area)
|
||||
},
|
||||
methods: {
|
||||
adjust() {
|
||||
this.$refs.adjustDialog.adjusts()
|
||||
},
|
||||
//工序下拉框选择
|
||||
changeHeader(search, workprocedure_id) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
//点击规格统计
|
||||
specStatistic() {
|
||||
this.queryMaterialSpec()
|
||||
this.querySpecVisible = true
|
||||
},
|
||||
//点击规格统计
|
||||
async queryMaterialSpec() {
|
||||
try {
|
||||
const queryParam = { orderBy: 'start_time' }
|
||||
const res = await crudProduceshiftorder.queryStatisticsSpec(queryParam)
|
||||
const content = res.content
|
||||
this.materialSpecData = content
|
||||
this.selectSpecOptions = content.reduce((acc, currentItem) => {
|
||||
if (!acc.some(item => item.material_spec === currentItem.material_spec)) {
|
||||
acc.push(currentItem)
|
||||
}
|
||||
return acc
|
||||
}, [])
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
//规格统计下拉框
|
||||
async materialSelectSpec(selectedValue) {
|
||||
const queryParam = { material: selectedValue, orderBy: 'start_time' }
|
||||
try {
|
||||
const res = await crudProduceshiftorder.queryStatisticsSpec(queryParam)
|
||||
this.materialSpecData = res.content
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
databaseUploadApi() {
|
||||
},
|
||||
changeEvent1(device) {
|
||||
if (device == 'A1_BZJ_1') {
|
||||
this.form.package_ext.ealing_device_code = 'A1_ZXJ_1'
|
||||
}
|
||||
if (device == 'A1_BZJ_2') {
|
||||
this.form.package_ext.ealing_device_code = 'A1_ZXJ_2'
|
||||
}
|
||||
},
|
||||
changeEvent2(form) {
|
||||
if ((form.device_code == 'A1_BZJ_1') && (form.package_ext.unboxing_device_code == 'A1_KXJ_1')) {
|
||||
this.form.package_ext.is_foreward = '1'
|
||||
}
|
||||
if ((form.device_code == 'A1_BZJ_2') && (form.package_ext.unboxing_device_code == 'A1_KXJ_2')) {
|
||||
this.form.package_ext.is_foreward = '1'
|
||||
}
|
||||
this.form.package_ext.is_foreward = '0'
|
||||
},
|
||||
A3_changepackage(form) {
|
||||
if (form.package_ext.one_package_qty != null && form.package_ext.one_package_qty > 0) {
|
||||
form.package_ext.package_qty = parseFloat(form.plan_qty / form.package_ext.one_package_qty).toFixed(0)
|
||||
}
|
||||
},
|
||||
formatBoolean: function(row, column) {
|
||||
var ret = ''
|
||||
if (row[column.property] === true) {
|
||||
ret = '是' // 根据自己的需求设定
|
||||
} else {
|
||||
ret = '否'
|
||||
}
|
||||
return ret
|
||||
},
|
||||
formatNum0(row, column) {
|
||||
if (!row[column.property]) {
|
||||
return 0
|
||||
}
|
||||
return parseFloat(row[column.property]).toFixed(0)
|
||||
},
|
||||
tableChanged3() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
getNotWorkDeviceByWorkproceduceId(workprocedure_id) { // 根据工序标识获取设备列表
|
||||
crudProduceshiftorder.getNotWorkDeviceByWorkproceduceId({
|
||||
workprocedure_id: workprocedure_id,
|
||||
product_area: this.form.product_area
|
||||
}).then(res => {
|
||||
this.deviceList = res.content
|
||||
})
|
||||
},
|
||||
initDataPlan() {
|
||||
const date = this.dateFormatter(new Date())
|
||||
const formatter1 = this.dateFormatter1(new Date())
|
||||
this.form.planproducestart_date = date
|
||||
this.form.planproduceend_date = formatter1
|
||||
this.form.produce_date = date
|
||||
},
|
||||
change(val) {
|
||||
const d = new Date()
|
||||
const year = d.getFullYear()
|
||||
const month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)
|
||||
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
|
||||
if (val === '2') {
|
||||
this.form.planproducestart_date = [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
|
||||
const day1 = d.getDate() < 10 ? '0' + (d.getDate() + 1) : d.getDate() + 1
|
||||
this.form.planproduceend_date = [year, month, day1].join('-') + ' ' + ['07', '30', '00'].join(':')
|
||||
}
|
||||
if (val === '1') {
|
||||
this.form.planproducestart_date = [year, month, day].join('-') + ' ' + ['07', '30', '00'].join(':')
|
||||
this.form.planproduceend_date = [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
|
||||
}
|
||||
},
|
||||
dateFormatter(str) {
|
||||
const d = new Date(str)
|
||||
const year = d.getFullYear()
|
||||
const month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)
|
||||
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
|
||||
return [year, month, day].join('-') + ' ' + ['07', '30', '00'].join(':')
|
||||
},
|
||||
dateFormatter1(str) {
|
||||
const d = new Date(str)
|
||||
const year = d.getFullYear()
|
||||
const month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)
|
||||
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
|
||||
return [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
|
||||
},
|
||||
queryClassId() {
|
||||
const param = {
|
||||
'class_idStr': this.class_idStr
|
||||
}
|
||||
crudClassstandard.queryClassById(param).then(res => {
|
||||
this.classes = res.content.map(obj => {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
})
|
||||
},
|
||||
buildTree(classes) {
|
||||
classes.forEach(data => {
|
||||
if (data.children) {
|
||||
this.buildTree(data.children)
|
||||
}
|
||||
if (data.hasChildren && !data.children) {
|
||||
data.children = null // 重点代码
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取子节点数据
|
||||
loadChildNodes({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
setTimeout(() => {
|
||||
callback()
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
},
|
||||
initClass3() {
|
||||
const param = {
|
||||
parent_class_code: '07'
|
||||
}
|
||||
crudClassstandard.getClassType(param).then(res => {
|
||||
const data = res.content
|
||||
this.buildTree(data)
|
||||
this.classes3 = data
|
||||
})
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
// 工单状态多选搜索
|
||||
handTaskStatus(value) {
|
||||
this.$forceUpdate()
|
||||
if (value) {
|
||||
this.order_status = JSON.parse(JSON.stringify(value))
|
||||
this.query.order_status = this.order_status.toString()
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
// 查看
|
||||
toView(row) {
|
||||
if (row !== null) {
|
||||
this.$refs.child3.setForm(row)
|
||||
}
|
||||
},
|
||||
// 查看
|
||||
report(row) {
|
||||
this.$refs.report.setForm(row[0])
|
||||
},
|
||||
// 强制完成
|
||||
forceFinish(rows) {
|
||||
var i = Number(0)
|
||||
rows.forEach((item) => {
|
||||
crudProduceshiftorder.forceFinish({ row: item }).then(res => {
|
||||
i = i + 1
|
||||
if (i === rows.length) {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}
|
||||
})
|
||||
})
|
||||
/*
|
||||
crudProduceshiftorder.forceFinish({ row: data }).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})*/
|
||||
},
|
||||
// 取两位小数点
|
||||
rounding(row, column) {
|
||||
return parseFloat(row[column.property]).toFixed(2)
|
||||
},
|
||||
// 下发按钮禁用条件
|
||||
is_disabled(rows) {
|
||||
var length = rows.length
|
||||
if (length > 1) {
|
||||
var flag = false
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
if (rows[i].workorder_status === '5') {
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
return flag
|
||||
} else if (length === 1 && rows[0].workorder_status !== '5') {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
is_disopen(rows) {
|
||||
var length = rows.length
|
||||
if (length === 1) {
|
||||
if (rows[0].workorder_status === '2') {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
// 强制完成禁用条件
|
||||
is_finished(rows) {
|
||||
var length = rows.length
|
||||
if (length > 1) {
|
||||
var flag = false
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
if (rows[i].workorder_status === '5') {
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
return flag
|
||||
} else if (length === 1 && rows[0].workorder_status !== '5') {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
// 新增编辑给form表单物料相关信息赋值
|
||||
setMaterValue(row) {
|
||||
debugger
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_code = row.material_code
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_spec = row.material_spec
|
||||
},
|
||||
setOrderValue(row) {
|
||||
|
||||
},
|
||||
getworkprocedure() {
|
||||
debugger
|
||||
// 查询工序
|
||||
crudWorkProcedure.downSelect().then(res => {
|
||||
if (res.length > 0) {
|
||||
const keywords = ['三线', '清洗', '刻字', '码盘', '仓储', '包装']
|
||||
this.workprocedureList = res.filter(item => typeof item.workprocedure_name === 'string' && !keywords.some(keyword => item.workprocedure_name.includes(keyword)))
|
||||
}
|
||||
})
|
||||
},
|
||||
getworkprocedureByarea(area) {
|
||||
const params = { product_area: area }
|
||||
crudWorkProcedure.downSelect(params).then(res => {
|
||||
this.workprocedureListArea = res
|
||||
})
|
||||
},
|
||||
// 下发
|
||||
submits(rows) {
|
||||
var orders = []
|
||||
console.log(rows)
|
||||
rows.forEach((item) => {
|
||||
orders.push(item.workorder_id)
|
||||
})
|
||||
crudProduceshiftorder.submits(orders).then(res => {
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}, // 取消下发
|
||||
unSubmits(rows) {
|
||||
var orders = []
|
||||
console.log(rows)
|
||||
rows.forEach((item) => {
|
||||
orders.push(item.workorder_id)
|
||||
})
|
||||
crudProduceshiftorder.unSubmits(orders).then(res => {
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
openstart(rows) {
|
||||
crudProduceshiftorder.openStart(rows[0]).then(res => {
|
||||
this.crud.notify('开工成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
add() {
|
||||
this.addShow = true
|
||||
},
|
||||
replaceDevice(workProcedure_id, order_code) {
|
||||
this.$refs.child4.setForm(workProcedure_id, order_code)
|
||||
},
|
||||
copyAdd(data) {
|
||||
this.crud.toCopy(data)
|
||||
},
|
||||
[CRUD.HOOK.beforeToAdd]() {
|
||||
this.initDataPlan()
|
||||
},
|
||||
[CRUD.HOOK.beforeToEdit]() {
|
||||
console.log(this.form.package_ext)
|
||||
console.log(this.form)
|
||||
if (this.form.package_ext != undefined && this.form.package_ext != null && JSON.stringify(this.form.package_ext).length > 3) {
|
||||
this.form.package_ext = JSON.parse(this.form.package_ext)
|
||||
}
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
if (JSON.stringify(this.form.package_ext).length > 3) {
|
||||
this.form.package_ext = JSON.stringify(this.form.package_ext)
|
||||
} else {
|
||||
this.form.package_ext = ''
|
||||
}
|
||||
},
|
||||
success() {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.table-container {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 45%;
|
||||
margin-right: 10px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.table-gap {
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.table-container {
|
||||
width: 100%;
|
||||
margin-right: 0;
|
||||
|
||||
}
|
||||
|
||||
.table-gap {
|
||||
display: none;
|
||||
|
||||
}
|
||||
|
||||
.responsive-table {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.custom-tag {
|
||||
font-size: 24px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -39,6 +39,7 @@ export function submits(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function unSubmits(data) {
|
||||
return request({
|
||||
url: 'api/produceWorkorder/unSubmits',
|
||||
@@ -151,6 +152,7 @@ export function replaceDevice(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function reportApprove(data) {
|
||||
return request({
|
||||
url: '/api/produceWorkorder/reportApprove',
|
||||
@@ -159,4 +161,87 @@ export function reportApprove(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, addRows, edit, del, submits, reportApprove, unSubmits, getTable, openStart, report, saveReport, finish, getReportWork, forceFinish, reportQuery, reportQuery3, excelImport, getNotWorkDeviceByWorkproceduceId, replaceDevice }
|
||||
export function submitAdjustWorkOrder(data) {
|
||||
return request({
|
||||
url: '/api/produceWorkorder/submitAdjustWorkOrder',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryAdjustWorkOrder(data) {
|
||||
return request({
|
||||
url: '/api/produceWorkorder/queryAdjustWorkOrder',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryMouldsSpec(data) {
|
||||
return request({
|
||||
url: '/api/produceWorkorder/queryMouldsSpec',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryStatisticsSpec(data) {
|
||||
return request({
|
||||
url: '/api/produceWorkorder/queryStatisticsSpec',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateTeamSelect(data) {
|
||||
return request({
|
||||
url: '/api/pdmBiTeamcorrperson/updateTeamSelect',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryTeamSelect(data) {
|
||||
return request({
|
||||
url: '/api/pdmBiTeamcorrperson/queryTeamSelect',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getWorkOrderplanQty(data) {
|
||||
return request({
|
||||
url: '/api/produceWorkorder/getWorkOrderplanQty',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
addRows,
|
||||
edit,
|
||||
del,
|
||||
submits,
|
||||
report,
|
||||
reportApprove,
|
||||
unSubmits,
|
||||
getTable,
|
||||
openStart,
|
||||
saveReport,
|
||||
finish,
|
||||
getReportWork,
|
||||
forceFinish,
|
||||
reportQuery,
|
||||
reportQuery3,
|
||||
excelImport,
|
||||
getNotWorkDeviceByWorkproceduceId,
|
||||
replaceDevice,
|
||||
submitAdjustWorkOrder,
|
||||
queryAdjustWorkOrder,
|
||||
queryMouldsSpec,
|
||||
queryStatisticsSpec,
|
||||
queryTeamSelect,
|
||||
updateTeamSelect,
|
||||
getWorkOrderplanQty
|
||||
}
|
||||
|
||||
228
mes/qd/src/views/wms/pub/OrderDialog.vue
Normal file
228
mes/qd/src/views/wms/pub/OrderDialog.vue
Normal file
@@ -0,0 +1,228 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
title="订单选择"
|
||||
width="1250px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-suffix=":"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item label="模糊搜索">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
placeholder="销售单号、物料编码或规格"
|
||||
style="width: 200px;"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation/>
|
||||
</el-form>
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
border
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
@current-change="clickChange"
|
||||
>
|
||||
<el-table-column v-if="!isSingle" type="selection" width="55"/>
|
||||
<el-table-column v-if="isSingle" label="选择" width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i/></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="销售单号"
|
||||
min-width="100"
|
||||
prop="sale_code"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="行号"
|
||||
min-width="60"
|
||||
prop="seq_no"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!-- <el-table-column-->
|
||||
<!-- :min-width="flexWidth('contract_code', crud.data, '合同号')" label="合同号"-->
|
||||
<!-- prop="contract_code"-->
|
||||
<!-- />-->
|
||||
<el-table-column
|
||||
:min-width="flexWidth('material_code', crud.data, '物料编码')" label="物料编码"
|
||||
prop="material_code"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
:min-width="flexWidth('material_spec', crud.data, '物料规格')"
|
||||
label="物料规格"
|
||||
prop="material_spec"
|
||||
/>
|
||||
<!-- <el-table-column label="工段" prop="product_area">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ dict.label.product_area[scope.row.product_area] }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="订单数量" min-width="80" prop="sale_qty"/>
|
||||
<el-table-column label="需生产数量" min-width="88" prop="need_product_qty"/>
|
||||
<el-table-column label="已生产数量" min-width="88" prop="product_qty"/>
|
||||
<el-table-column label="刻字数量" prop="lettering_qty"/>
|
||||
<el-table-column label="预入库数量" min-width="88" prop="instor_qty"/>
|
||||
<el-table-column label="入库数量" prop="in_storage_qty"/>
|
||||
<el-table-column label="发货数量" prop="sendout_qty"/>
|
||||
|
||||
<el-table-column
|
||||
label="预入库交期"
|
||||
min-width="100"
|
||||
prop="warehousing_date"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="计划交期"
|
||||
min-width="100"
|
||||
prop="plandeliverDate"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="订单交期"
|
||||
min-width="100"
|
||||
prop="order_date"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="订单状态" prop="status">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.PCS_SALE_STATUS[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人" prop="create_name"/>
|
||||
<el-table-column
|
||||
:min-width="flexWidth('createTime', crud.data, '创建时间')"
|
||||
label="创建时间"
|
||||
prop="createTime"
|
||||
/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
|
||||
export default {
|
||||
name: 'OrderDtl',
|
||||
components: { rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '订单', url: 'api/mpsSaleOrder',
|
||||
idField: 'sale_id',
|
||||
sort: 'plandeliver_date,seq_no desc',
|
||||
optShow: {},
|
||||
crudMethod: { ...crudMaterialbase }
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
dicts: ['PCS_SALE_STATUS', 'product_series'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isSingle: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
materOptCode: {
|
||||
type: String,
|
||||
default: '00'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
classes: [],
|
||||
tableRadio: null,
|
||||
class_idStr: null,
|
||||
checkrow: null,
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
},
|
||||
seriesFormat(row) {
|
||||
return this.dict.label.product_series[row.product_series]
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (this.isSingle) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
} else {
|
||||
this.checkrow = row
|
||||
}
|
||||
}
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
},
|
||||
close() {
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
// 处理单选
|
||||
if (this.isSingle && this.tableRadio) {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('setOrderValue', this.tableRadio)
|
||||
return
|
||||
}
|
||||
this.rows = this.$refs.table.selection
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选订单')
|
||||
return
|
||||
}
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('setOrderValue', this.rows)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" rel="stylesheet/scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user