首检完成
This commit is contained in:
160
src/views/kanbanManagement/tuzhuangworkshop2.vue
Normal file
160
src/views/kanbanManagement/tuzhuangworkshop2.vue
Normal file
@@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div>
|
||||
<el-form :model="search" inline>
|
||||
<el-form-item label="年">
|
||||
<el-input v-model="search.year" placeholder="输入年份"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="周">
|
||||
<el-input-number v-model="search.week" :min="1" :max="100" label="输入周"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="日">
|
||||
<el-select v-model="search.date" placeholder="请选择日">
|
||||
<el-option label="周一" value="1"> </el-option>
|
||||
<el-option label="周二" value="2"> </el-option>
|
||||
<el-option label="周三" value="3"> </el-option>
|
||||
<el-option label="周四" value="4"> </el-option>
|
||||
<el-option label="周五" value="5"> </el-option>
|
||||
<el-option label="周六" value="6"> </el-option>
|
||||
<el-option label="周日" value="7"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleClick">搜索</el-button>
|
||||
</el-form>
|
||||
</div>
|
||||
<vxe-table
|
||||
border
|
||||
resizable
|
||||
show-overflow
|
||||
ref="xTable"
|
||||
v-loading="loading_1"
|
||||
:cell-style="rowClassName"
|
||||
height="800"
|
||||
:row-config="{ isHover: true, useKey: true }"
|
||||
:column-config="{ useKey: true }"
|
||||
:data="workorder_table_data"
|
||||
>
|
||||
<vxe-column type="seq" width="60"></vxe-column>
|
||||
<vxe-column field="clientWorkorder" title="工单号" width="130" type="html"></vxe-column>
|
||||
<vxe-column field="blankNumber" title="毛坯号" type="html"></vxe-column>
|
||||
<vxe-column field="finishedPartNumber" title="成品零件号" type="html"></vxe-column>
|
||||
<vxe-column field="productDescription" title="产品描述" type="html"></vxe-column>
|
||||
<vxe-column field="colour" title="颜色" type="html"></vxe-column>
|
||||
<vxe-column field="specifications" title="规格" type="html"></vxe-column>
|
||||
<vxe-column field="codeNumber" title="编码号" type="html"></vxe-column>
|
||||
<vxe-column field="vehicleNumber" title="车数" type="html"></vxe-column>
|
||||
<vxe-column field="hangNumber" title="挂具摆放数" type="html"></vxe-column>
|
||||
<vxe-column field="previousNumber" title="上件数" type="html"></vxe-column>
|
||||
<vxe-column field="cylinderNumber" title="双组号缸号" type="html"></vxe-column>
|
||||
<vxe-column field="remark1" title="备注1" type="html"></vxe-column>
|
||||
<vxe-column field="remark2" title="备注2" type="html"></vxe-column>
|
||||
</vxe-table>
|
||||
<pagination
|
||||
v-show="pagination.total > 0"
|
||||
:total="pagination.total"
|
||||
:page.sync="pagination.pageNum"
|
||||
:limit.sync="pagination.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getWorkoderList_piliang, startOnline, cancelOnline } from '@/api/productManagement/workorder_online.js'
|
||||
|
||||
export default {
|
||||
name: 'workorder_online',
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
year: new Date().getFullYear(),
|
||||
week: null,
|
||||
date: null,
|
||||
},
|
||||
pagination: {
|
||||
total: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 新增修改工单模态框
|
||||
dialog: {
|
||||
title: '',
|
||||
open: false,
|
||||
form: {},
|
||||
},
|
||||
loading_1: true,
|
||||
workorder_table_data: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
this.getList()
|
||||
},
|
||||
//todo 获取生产工单列表
|
||||
getList() {
|
||||
const query = { ...this.search, ...this.pagination }
|
||||
if (query.week == null || query.week == undefined || query.week == '') query.week = -1
|
||||
if (query.year == null || query.year == undefined || query.year == '') query.year = -1
|
||||
getWorkoderList_piliang(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.loading_1 = false
|
||||
this.workorder_table_data = res.data.item1
|
||||
this.pagination.total = res.data.item2
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//todo 开始上线
|
||||
updateitem(row) {
|
||||
startOnline(row.id).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success('上线成功')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
//todo 取消上线
|
||||
cancelitem(row) {
|
||||
this.$modal
|
||||
.confirm('是否确认取消生产工单名称为' + row.productDescription + '"的数据项?')
|
||||
.then(function () {
|
||||
return cancelOnline(row.id)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success('取消成功')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
//todo 更改单元格格式
|
||||
rowClassName(item) {
|
||||
if (item.row.status > 0) {
|
||||
return {
|
||||
backgroundColor: '#FFFF00',
|
||||
}
|
||||
}
|
||||
return null
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-dropdown-link {
|
||||
cursor: pointer;
|
||||
color: #93ff40;
|
||||
}
|
||||
.el-icon-arrow-down {
|
||||
font-size: 0.5rem;
|
||||
}
|
||||
.sortable-ghost {
|
||||
opacity: 0.4;
|
||||
background-color: #409eff;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user