更新
This commit is contained in:
@@ -40,7 +40,7 @@ export function groupSelect(machineValue) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function basicPartsData(machine_check, machine, group_check, group, Model_check, ModelValue, pageSize, pageCurrent) {
|
export function basicPartsData(machine_check, machine, group_check, group, Model_check, ModelValue, orderName, order) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -49,8 +49,8 @@ export function basicPartsData(machine_check, machine, group_check, group, Model
|
|||||||
ModularID: router.currentRoute.path,
|
ModularID: router.currentRoute.path,
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '零件分配查询_查询',
|
name: '零件分配查询_查询',
|
||||||
param: `机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}&规格_check=${Model_check}&规格=${ModelValue}`,
|
param: `机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}&规格_check=${Model_check}&规格=${ModelValue}&排序名称=${orderName}&排序顺序=${order}`
|
||||||
Pagination: pageCurrent + '&' + pageSize
|
// Pagination: pageCurrent + '&' + pageSize
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,3 +136,8 @@ export function HashTable() {
|
|||||||
entry = new Object()
|
entry = new Object()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
import Router from 'vue-router'
|
||||||
|
const originalReplace = Router.prototype.replace
|
||||||
|
Router.prototype.replace = function replace(location) {
|
||||||
|
return originalReplace.call(this, location).catch(err => err)
|
||||||
|
}
|
||||||
|
|||||||
@@ -38,9 +38,10 @@ const service = axios.create({
|
|||||||
service.interceptors.request.use(config => {
|
service.interceptors.request.use(config => {
|
||||||
if (config.data.name !== '菜单系统模块_用户名密码_查询数据_new2' && config.data.name !== '菜单系统模块_获取角色模块_查询数据') {
|
if (config.data.name !== '菜单系统模块_用户名密码_查询数据_new2' && config.data.name !== '菜单系统模块_获取角色模块_查询数据') {
|
||||||
const id = Cookies.get('id')
|
const id = Cookies.get('id')
|
||||||
if (id) {
|
if (id !== 'undefined') {
|
||||||
console.log(id, 123)
|
console.log(id, 123)
|
||||||
} else {
|
} else {
|
||||||
|
console.log(123)
|
||||||
store.dispatch('FedLogOut').then(() => {
|
store.dispatch('FedLogOut').then(() => {
|
||||||
location.reload() // 为了重新实例化vue-router对象 避免bug
|
location.reload() // 为了重新实例化vue-router对象 避免bug
|
||||||
alert('此账号登录失效,请重新登录')
|
alert('此账号登录失效,请重新登录')
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
<el-tag v-if="Number(scope.row.是否审批)===1" type="success">已审批</el-tag>
|
<el-tag v-if="Number(scope.row.是否审批)===1" type="success">已审批</el-tag>
|
||||||
<el-tag v-if="Number(scope.row.是否审批)===0 && Number(token)!==21 && Number(token)!==36 && Number(token)!==37" type="warning">未审批</el-tag>
|
<el-tag v-if="Number(scope.row.是否审批)===0 && Number(token)!==21 && Number(token)!==36 && Number(token)!==37" type="warning">未审批</el-tag>
|
||||||
<el-button v-if="Number(scope.row.是否审批)===0 && (Number(token)===21 || Number(token)===36 || Number(token)===37)" size="mini" type="primary" plain icon="el-icon-check" @click="approvalPass(scope.row)">审批</el-button>
|
<el-button v-if="Number(scope.row.是否审批)===0 && (Number(token)===21 || Number(token)===36 || Number(token)===37)" size="mini" type="primary" plain icon="el-icon-check" @click="approvalPass(scope.row)">审批</el-button>
|
||||||
|
<el-button v-if="Number(scope.row.是否审批)===2 && (Number(token)===21 || Number(token)===36 || Number(token)===37)" size="mini" type="danger" plain icon="el-icon-check" @click="approvalPass(scope.row)">未通过</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -97,11 +98,30 @@
|
|||||||
@current-change="handleCurrentChange3"/>
|
@current-change="handleCurrentChange3"/>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible3" title="领料单审批" center style="min-height: 300px;" width="380px">
|
||||||
|
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||||
|
<el-form-item label="审批是否通过" prop="审批是否通过" center>
|
||||||
|
<el-select v-model="form2.审批是否通过" size="small" @change="selectChange">
|
||||||
|
<el-option
|
||||||
|
v-for="item in approval"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="未通过原因" prop="未通过原因">
|
||||||
|
<el-input v-model="form2.未通过原因" :disabled="disabled" size="small"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button :disabled="Open_disable" type="primary" size="small" @click="submitApproval('form2')">确定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { initPickPerson, initMachineProject, searchgroup, searchTable, searchList, createList, dropList, selectIntoList, searchListDetail, dropListDetail } from '@/api/Inventory/CreatePickingList'
|
import { initPickPerson, initMachineProject, searchgroup, searchTable, searchList, createList, dropList, selectIntoList, searchListDetail, dropListDetail, submitApproval } from '@/api/Inventory/CreatePickingList'
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
@@ -138,6 +158,26 @@ export default {
|
|||||||
rules1: {
|
rules1: {
|
||||||
领料人流水号: [{ required: true, message: '请选择领料人' }]
|
领料人流水号: [{ required: true, message: '请选择领料人' }]
|
||||||
},
|
},
|
||||||
|
Open_disable: false,
|
||||||
|
dialogVisible3: false,
|
||||||
|
form2: {
|
||||||
|
审批是否通过: 1,
|
||||||
|
未通过原因: ''
|
||||||
|
},
|
||||||
|
rules2: {
|
||||||
|
审批是否通过: [{ required: true, message: '请选择', trigger: 'change' }]
|
||||||
|
},
|
||||||
|
approval: [
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '是'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: '否'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
disabled: true,
|
||||||
pickPerson: [],
|
pickPerson: [],
|
||||||
pickingListNumber: '', // 领料单编号
|
pickingListNumber: '', // 领料单编号
|
||||||
pickingListNumberShow: '', // 领料单编号
|
pickingListNumberShow: '', // 领料单编号
|
||||||
@@ -159,38 +199,29 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 审批通过
|
// 审批通过
|
||||||
approvalPass(row) {
|
approvalPass(row) {
|
||||||
this.$confirm('是否审批通过?', '提示', {
|
this.form2.审批是否通过 = 1
|
||||||
confirmButtonText: '确定',
|
this.form2.未通过原因 = ''
|
||||||
cancelButtonText: '取消',
|
this.disabled = true
|
||||||
type: 'warning'
|
this.pickingListNum = row.领料单流水号
|
||||||
}).then(() => {
|
this.Open_disable = false
|
||||||
if (this.pickListTable2.length === 0) {
|
this.dialogVisible3 = true
|
||||||
this.$message.error('不能审批空领料单')
|
},
|
||||||
return
|
submitApproval(formName) {
|
||||||
}
|
this.$refs[formName].validate((valid) => {
|
||||||
const param = {
|
if (valid) {
|
||||||
url: '',
|
this.Open_disable = true
|
||||||
method: 'post',
|
submitApproval(this.pickingListNum, this.form2.审批是否通过, this.form2.未通过原因).then(response => {
|
||||||
data: {
|
if (response.data[0].result === '1') {
|
||||||
type: '4',
|
this.$message.success('审批成功')
|
||||||
name: `update 车间装配管理_领料单 set 是否审批 = 1 where 领料单流水号 = ${row.领料单流水号}`
|
this.dialogVisible3 = false
|
||||||
}
|
|
||||||
}
|
|
||||||
request(param).then(res => {
|
|
||||||
if (res.data[0].result === '1') {
|
|
||||||
this.$message.success('操作成功')
|
|
||||||
this.pickingListNumber = ''
|
|
||||||
this.searchList()
|
this.searchList()
|
||||||
|
} else { this.$message.error('审批失败') }
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('操作失败')
|
console.log('error submit!!')
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
|
||||||
this.$message({
|
|
||||||
type: 'info',
|
|
||||||
message: '已取消操作'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
fetchData() {
|
fetchData() {
|
||||||
@@ -386,6 +417,13 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
selectChange() {
|
||||||
|
if (this.form2.审批是否通过 === 2) {
|
||||||
|
this.disabled = false
|
||||||
|
} else if (this.form2.审批是否通过 === 1) {
|
||||||
|
this.disabled = true
|
||||||
|
}
|
||||||
|
},
|
||||||
// 多选
|
// 多选
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
this.multipleSelection = val
|
this.multipleSelection = val
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"/>
|
:value="item.value"/>
|
||||||
</el-select>142
|
</el-select>
|
||||||
<el-button size="small" type="primary" icon="el-icon-search" style="margin: 0 0 0 10px" plain @click="searchTable()">查询</el-button>
|
<el-button size="small" type="primary" icon="el-icon-search" style="margin: 0 0 0 10px" plain @click="searchTable()">查询</el-button>
|
||||||
<el-button v-positive="'loading'" :disabled="false" size="small" type="success" icon="el-icon-download" style="margin: 0 0 0 10px" plain @click="exportExcel()">导出</el-button>
|
<el-button v-positive="'loading'" :disabled="false" size="small" type="success" icon="el-icon-download" style="margin: 0 0 0 10px" plain @click="exportExcel()">导出</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -741,6 +741,7 @@ export default {
|
|||||||
// 查询机床
|
// 查询机床
|
||||||
SearchMachine() {
|
SearchMachine() {
|
||||||
searchmachine().then(response => {
|
searchmachine().then(response => {
|
||||||
|
this.Machines = []
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
this.Machines.push({
|
this.Machines.push({
|
||||||
label: response.data[i].机床图号,
|
label: response.data[i].机床图号,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
:value="item.value"/>
|
:value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input v-model="ModelValue" placeholder="名称规格型号" style="width: 180px" size="small" clearable/>
|
<el-input v-model="ModelValue" placeholder="名称规格型号" style="width: 180px" size="small" clearable/>
|
||||||
<el-button icon="el-icon-search" type="primary" plain size="small" style="margin-left:10px" @click="pageCurrentWB = 1;pageSizeWB = 1000;pageCurrent = 1;pageSize = 1000;getTableData()">查询</el-button>
|
<el-button icon="el-icon-search" type="primary" plain size="small" style="margin-left:10px" @click="getTableData()">查询</el-button>
|
||||||
<!-- <el-tooltip :open-delay="1000" effect="dark" content="导出查询数据" placement="top">
|
<!-- <el-tooltip :open-delay="1000" effect="dark" content="导出查询数据" placement="top">
|
||||||
<el-button v-positive="'loading'" type="warning" size="small" icon="el-icon-download" plain style="margin-left:10px" @click="exportExcel()">导出</el-button>
|
<el-button v-positive="'loading'" type="warning" size="small" icon="el-icon-download" plain style="margin-left:10px" @click="exportExcel()">导出</el-button>
|
||||||
</el-tooltip> -->
|
</el-tooltip> -->
|
||||||
@@ -48,13 +48,14 @@
|
|||||||
stripe
|
stripe
|
||||||
size="mini"
|
size="mini"
|
||||||
style="width: 100%;max-height: 600px"
|
style="width: 100%;max-height: 600px"
|
||||||
height="600">
|
height="600"
|
||||||
|
@sort-change="sortChange">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="序号"
|
label="序号"
|
||||||
align="center"
|
align="center"
|
||||||
type="index"
|
type="index"
|
||||||
width="50"/>
|
width="50"/>
|
||||||
<el-table-column align="center" label="零件分配" width="80">
|
<el-table-column align="center" label="分配" prop="分配" width="80px" sortable="custom">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.零件分配 }}
|
{{ scope.row.零件分配 }}
|
||||||
</template>
|
</template>
|
||||||
@@ -64,34 +65,38 @@
|
|||||||
align="center"
|
align="center"
|
||||||
prop="机床图号"
|
prop="机床图号"
|
||||||
show-overflow-tooltip=""
|
show-overflow-tooltip=""
|
||||||
min-width="100px">
|
width="100px">
|
||||||
<template slot-scope="scope">{{ scope.row.机床图号 }}</template>
|
<template slot-scope="scope">{{ scope.row.机床图号 }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="组号"
|
label="组号"
|
||||||
align="center"
|
align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
prop="组号"
|
prop="组号"
|
||||||
min-width="60px">
|
width="70px">
|
||||||
<template slot-scope="scope">{{ scope.row.组号 }}</template>
|
<template slot-scope="scope">{{ scope.row.组号 }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="名称"
|
label="名称"
|
||||||
|
show-overflow-tooltip=""
|
||||||
align="center"
|
align="center"
|
||||||
prop="名称"
|
prop="名称"
|
||||||
min-width="60px">
|
min-width="160px">
|
||||||
<template slot-scope="scope">{{ scope.row.名称 }}</template>
|
<template slot-scope="scope">{{ scope.row.名称 }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="图号或型号"
|
label="图号或型号"
|
||||||
|
show-overflow-tooltip
|
||||||
align="center"
|
align="center"
|
||||||
prop="图号或型号"
|
prop="图号或型号"
|
||||||
min-width="140px">
|
min-width="160px">
|
||||||
<template slot-scope="scope">{{ scope.row.图号或型号 }}</template>
|
<template slot-scope="scope">{{ scope.row.图号或型号 }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="规格"
|
label="规格"
|
||||||
prop="规格"
|
prop="规格"
|
||||||
align="center"
|
align="center"
|
||||||
|
width="80px"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template slot-scope="scope">{{ scope.row.规格 }}</template>
|
<template slot-scope="scope">{{ scope.row.规格 }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -99,6 +104,7 @@
|
|||||||
label="材料"
|
label="材料"
|
||||||
prop="材料"
|
prop="材料"
|
||||||
align="center"
|
align="center"
|
||||||
|
width="80px"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template slot-scope="scope">{{ scope.row.材料 }}</template>
|
<template slot-scope="scope">{{ scope.row.材料 }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -106,7 +112,7 @@
|
|||||||
label="零件名称"
|
label="零件名称"
|
||||||
align="center"
|
align="center"
|
||||||
prop="零件名称"
|
prop="零件名称"
|
||||||
min-width="140px"
|
width="140px"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template slot-scope="scope">{{ scope.row.零件名称 }}</template>
|
<template slot-scope="scope">{{ scope.row.零件名称 }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -114,22 +120,22 @@
|
|||||||
label="物料名称"
|
label="物料名称"
|
||||||
align="center"
|
align="center"
|
||||||
prop="物料名称"
|
prop="物料名称"
|
||||||
min-width="140px"
|
width="140px"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template slot-scope="scope">{{ scope.row.物料名称 }}</template>
|
<template slot-scope="scope">{{ scope.row.物料名称 }}</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="零件数量"
|
label="零件数"
|
||||||
width="80"
|
width="70px"
|
||||||
align="center">
|
align="center">
|
||||||
<template slot-scope="scope">{{ scope.row.零件数量 }}</template>
|
<template slot-scope="scope">{{ scope.row.零件数量 }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="部件数量" align="center" min-width="80">
|
<el-table-column label="部件数" align="center" width="70px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.部件数量 }}
|
{{ scope.row.部件数量 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="机床数量" align="center" min-width="80">
|
<el-table-column label="机床数" align="center" width="70px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.机床数量 }}
|
{{ scope.row.机床数量 }}
|
||||||
</template>
|
</template>
|
||||||
@@ -141,16 +147,20 @@
|
|||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="零件类型"
|
label="零件类型"
|
||||||
|
width="80px"
|
||||||
align="center">
|
align="center">
|
||||||
<template slot-scope="scope">{{ scope.row.零件类型名称 }}</template>
|
<template slot-scope="scope">{{ scope.row.零件类型名称 }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="分配人"
|
label="分配人"
|
||||||
|
width="80px"
|
||||||
|
show-overflow-tooltip=""
|
||||||
align="center">
|
align="center">
|
||||||
<template slot-scope="scope">{{ scope.row.分配人 }}</template>
|
<template slot-scope="scope">{{ scope.row.分配人 }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="分配时间"
|
label="分配时间"
|
||||||
|
width="100px"
|
||||||
align="center">
|
align="center">
|
||||||
<template slot-scope="scope">{{ scope.row.分配时间 }}</template>
|
<template slot-scope="scope">{{ scope.row.分配时间 }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -190,7 +200,9 @@
|
|||||||
<!--</template>-->
|
<!--</template>-->
|
||||||
<!--</el-table-column>-->
|
<!--</el-table-column>-->
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="block" style="margin-top: 10px;">
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<div class="block" style="margin-top: 10px;float:left">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
:current-page="pageCurrent"
|
:current-page="pageCurrent"
|
||||||
:page-sizes="[10, 20, 30, 40, 100]"
|
:page-sizes="[10, 20, 30, 40, 100]"
|
||||||
@@ -200,6 +212,9 @@
|
|||||||
@size-change="handleSizeChanges"
|
@size-change="handleSizeChanges"
|
||||||
@current-change="handleCurrentChanges"/>
|
@current-change="handleCurrentChanges"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin-top: 17px;font-size:12px;float:left">已分配:{{ distribution }}件, 分配完成{{ completionRate }}%</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- <el-card>
|
<!-- <el-card>
|
||||||
<div style="font-size: 22px;font-weight: bold;margin-top: 5px">
|
<div style="font-size: 22px;font-weight: bold;margin-top: 5px">
|
||||||
@@ -311,13 +326,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { machineSelect, groupSelect, basicPartsData, deleteBasicParts, purchasePartsData, deletePurchaseData, getFileData, searchModel } from '@/api/ManufacturingCenter/MaterialAllocation'
|
import { machineSelect, groupSelect, basicPartsData, deleteBasicParts, deletePurchaseData, getFileData, searchModel } from '@/api/ManufacturingCenter/MaterialAllocation'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { ServerIP } from '@/utils/request'
|
import { ServerIP } from '@/utils/request'
|
||||||
export default {
|
export default {
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
orderName: 1,
|
||||||
|
order: 1,
|
||||||
|
distribution: 0,
|
||||||
|
completionRate: 0,
|
||||||
machineValue: '',
|
machineValue: '',
|
||||||
machine: [],
|
machine: [],
|
||||||
groupValue: '',
|
groupValue: '',
|
||||||
@@ -362,15 +381,15 @@ export default {
|
|||||||
},
|
},
|
||||||
group(val) {
|
group(val) {
|
||||||
if (val.length > 0) {
|
if (val.length > 0) {
|
||||||
this.groupValue = val[0].value
|
// this.groupValue = val[0].value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
groupValue(val) {
|
groupValue(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.pageCurrentWB = 1
|
// this.pageCurrentWB = 1
|
||||||
this.pageSizeWB = 1000
|
// this.pageSizeWB = 1000
|
||||||
this.pageCurrent = 1
|
// this.pageCurrent = 1
|
||||||
this.pageSize = 1000
|
// this.pageSize = 1000
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -379,6 +398,20 @@ export default {
|
|||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
sortChange(column, prop, order) {
|
||||||
|
console.log(column, column.prop, column.order, 11111)
|
||||||
|
if (column.prop === '分配') {
|
||||||
|
this.orderName = 1
|
||||||
|
} else {
|
||||||
|
this.orderName = 2
|
||||||
|
}
|
||||||
|
if (column.order === 'ascending') {
|
||||||
|
this.order = 1
|
||||||
|
} else if (column.order === 'descending') {
|
||||||
|
this.order = 2
|
||||||
|
}
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
exportExcel() {
|
exportExcel() {
|
||||||
if (this.tableData.length === 0) {
|
if (this.tableData.length === 0) {
|
||||||
this.$message.warning('请先查询要导出的数据')
|
this.$message.warning('请先查询要导出的数据')
|
||||||
@@ -452,17 +485,24 @@ export default {
|
|||||||
this.getSelect(searchModel, ['规格', '规格'], 'Model', param)
|
this.getSelect(searchModel, ['规格', '规格'], 'Model', param)
|
||||||
},
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
this.getFileData(this.machineValue)
|
// this.getFileData(this.machineValue)
|
||||||
if (this.machineValue) {
|
if (this.machineValue) {
|
||||||
const machine_check = this.machineValue ? 1 : 0
|
const machine_check = this.machineValue ? 1 : 0
|
||||||
const group_check = this.groupValue ? 1 : 0
|
const group_check = this.groupValue ? 1 : 0
|
||||||
const Model_check = this.ModelValue ? 1 : 0
|
const Model_check = this.ModelValue ? 1 : 0
|
||||||
this.loading = true
|
this.loading = true
|
||||||
basicPartsData(machine_check, this.machineValue, group_check, this.groupValue, Model_check, this.ModelValue, this.pageSize, this.pageCurrent).then(response => {
|
basicPartsData(machine_check, this.machineValue, group_check, this.groupValue, Model_check, this.ModelValue, this.orderName, this.order).then(response => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
console.log(response, 7777777777)
|
||||||
const res = response.data
|
const res = response.data
|
||||||
this.total = res.total
|
this.distribution = 0
|
||||||
this.tableData = res.rows.map(item => {
|
this.completionRate = ''
|
||||||
|
this.total = response.data.length
|
||||||
|
this.tableData = res.map(item => {
|
||||||
|
if (item.零件分配 !== '未分配') {
|
||||||
|
this.distribution += 1
|
||||||
|
this.completionRate = ((this.distribution) / this.total).toFixed(2) * 100
|
||||||
|
}
|
||||||
if (item.整改类型 === '1') {
|
if (item.整改类型 === '1') {
|
||||||
item.整改类型 = '新增'
|
item.整改类型 = '新增'
|
||||||
} else if (item.整改类型 === '2') {
|
} else if (item.整改类型 === '2') {
|
||||||
@@ -476,26 +516,26 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$message.warning('请输入查询条件')
|
this.$message.warning('请输入查询条件')
|
||||||
}
|
}
|
||||||
this.loadingWB = true
|
// this.loadingWB = true
|
||||||
const machine_check = this.machineValue ? 1 : 0
|
// const machine_check = this.machineValue ? 1 : 0
|
||||||
const group_check = this.groupValue ? 1 : 0
|
// const group_check = this.groupValue ? 1 : 0
|
||||||
const Model_check = this.ModelValue ? 1 : 0
|
// const Model_check = this.ModelValue ? 1 : 0
|
||||||
purchasePartsData(machine_check, this.machineValue, group_check, this.groupValue, Model_check, this.ModelValue, this.pageSizeWB, this.pageCurrentWB).then(response => {
|
// purchasePartsData(machine_check, this.machineValue, group_check, this.groupValue, Model_check, this.ModelValue, this.pageSizeWB, this.pageCurrentWB).then(response => {
|
||||||
this.loadingWB = false
|
// this.loadingWB = false
|
||||||
const data = response.data
|
// const data = response.data
|
||||||
this.totalWB = data.total
|
// this.totalWB = data.total
|
||||||
this.tableDataWB = data.rows.map(item => {
|
// this.tableDataWB = data.rows.map(item => {
|
||||||
if (item.整改类型 === '1') {
|
// if (item.整改类型 === '1') {
|
||||||
item.整改类型 = '新增'
|
// item.整改类型 = '新增'
|
||||||
} else if (item.整改类型 === '2') {
|
// } else if (item.整改类型 === '2') {
|
||||||
item.整改类型 = '替换'
|
// item.整改类型 = '替换'
|
||||||
} else if (item.整改类型 === '3') {
|
// } else if (item.整改类型 === '3') {
|
||||||
item.整改类型 = '补充加工'
|
// item.整改类型 = '补充加工'
|
||||||
}
|
// }
|
||||||
item.零件类型 = item.零件类型 === '2' ? '外购件' : '标准件'
|
// item.零件类型 = item.零件类型 === '2' ? '外购件' : '标准件'
|
||||||
return item
|
// return item
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
openUrgentItem() {
|
openUrgentItem() {
|
||||||
if (this.$refs['form'] !== undefined) {
|
if (this.$refs['form'] !== undefined) {
|
||||||
|
|||||||
@@ -22,42 +22,42 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table v-loading="loading" :data="tableData" size="mini" style="max-height: 720px" height="720px" border @sort-change="sortChange">
|
<el-table v-loading="loading" :data="tableData" size="mini" style="max-height: 720px" height="720px" border @sort-change="sortChange">
|
||||||
<el-table-column align="center" label="跟单号" width="100px">
|
<el-table-column align="center" label="跟单号" fixed="left" width="120px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.跟单号 }}
|
{{ scope.row.跟单号 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="加工日期" width="110px" sortable="custom" prop="操作时间">
|
<el-table-column align="center" label="加工日期" fixed="left" width="110px" sortable="custom" prop="操作时间">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.完成日期 }}
|
{{ scope.row.完成日期 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="班组" width="80px">
|
<el-table-column align="center" label="班组" fixed="left" width="80px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.班组名称 }}
|
{{ scope.row.班组名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="姓名" width="80px" sortable="custom" prop="姓名">
|
<el-table-column align="center" label="姓名" fixed="left" width="80px" sortable="custom" prop="姓名">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.操作工 }}
|
{{ scope.row.操作工 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="图号" width="120px">
|
<el-table-column align="center" label="图号" fixed="left" show-overflow-tooltip width="120px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.零件图号 }}
|
{{ scope.row.零件图号 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="工序" width="50px">
|
<el-table-column align="center" label="工序" fixed="left" width="50px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.工序顺序 }}
|
{{ scope.row.工序顺序 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="工序名称" width="80px">
|
<el-table-column align="center" label="工序名称" fixed="left" width="80px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.工艺名称 }}
|
{{ scope.row.工艺名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="完成数量" width="80px">
|
<el-table-column align="center" label="完成数量" fixed="left" width="80px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.完成数量 }}
|
{{ scope.row.完成数量 }}
|
||||||
</template>
|
</template>
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
{{ scope.row.计划工时 }}
|
{{ scope.row.计划工时 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="机床图号" width="100px">
|
<el-table-column align="center" label="机床图号" show-overflow-tooltip width="110px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.机床图号 }}
|
{{ scope.row.机床图号 }}
|
||||||
</template>
|
</template>
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
{{ scope.row.设计者 }}
|
{{ scope.row.设计者 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="材料" width="150px">
|
<el-table-column align="center" label="材料" width="100px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.材料 }}
|
{{ scope.row.材料 }}
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<el-button v-positive="'loading'" :disabled="false" size="small" type="success" icon="el-icon-download" plain @click="exportExcel">导出</el-button>
|
<el-button v-positive="'loading'" :disabled="false" size="small" type="success" icon="el-icon-download" plain @click="exportExcel">导出</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table v-loading="loading" :data="tableData" :summary-method="getSummaries" show-summary size="mini" style="max-height: 590px;width: 1370px" height="720px" border @sort-change="sortChange">
|
<el-table v-loading="loading" :data="tableData" size="mini" style="max-height: 590px;width: 1370px" height="720px" border @sort-change="sortChange">
|
||||||
<el-table-column align="center" label="跟单号" width="120px">
|
<el-table-column align="center" label="跟单号" width="120px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.跟单号 }}
|
{{ scope.row.跟单号 }}
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
{{ scope.row.班组名称 }}
|
{{ scope.row.班组名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="图号" width="150px">
|
<el-table-column align="center" label="图号" show-overflow-tooltip width="120px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.零件图号 }}
|
{{ scope.row.零件图号 }}
|
||||||
</template>
|
</template>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
{{ scope.row.修补工时 }}
|
{{ scope.row.修补工时 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="备注" width="160px" show-overflow-tooltip="">
|
<el-table-column align="center" label="备注" width="100px" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.备注 }}
|
{{ scope.row.备注 }}
|
||||||
</template>
|
</template>
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
<!-- {{ scope.row.项目名称 }}-->
|
<!-- {{ scope.row.项目名称 }}-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<el-table-column align="center" label="机床图号" width="100px">
|
<el-table-column align="center" label="机床图号" width="100px" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.机床图号 }}
|
{{ scope.row.机床图号 }}
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -149,27 +149,29 @@ export default {
|
|||||||
this.searchTable()
|
this.searchTable()
|
||||||
},
|
},
|
||||||
exportTable() {
|
exportTable() {
|
||||||
let check7, check8
|
let check7, check8, check9
|
||||||
if (this.partName !== '' && this.partName !== null) {
|
if (this.partName !== '' && this.partName !== null) {
|
||||||
this.partNamecheck = true
|
this.partNamecheck = true
|
||||||
} else {
|
} else {
|
||||||
this.partNamecheck = false
|
this.partNamecheck = false
|
||||||
}
|
}
|
||||||
|
this.machineNameValue ? check9 = 1 : check9 = 0
|
||||||
this.outTime ? check7 = 1 : (check7 = 0, this.outTime = '')
|
this.outTime ? check7 = 1 : (check7 = 0, this.outTime = '')
|
||||||
this.all === false ? check8 = 0 : check8 = 1
|
this.all === false ? check8 = 0 : check8 = 1
|
||||||
var param = []
|
var param = []
|
||||||
param[0] = ['机床流水号', this.machineNameValue]
|
param[0] = ['机床流水号_check', check9]
|
||||||
param[1] = ['零件图号_check', this.partNamecheck]
|
param[1] = ['机床流水号', this.machineNameValue]
|
||||||
param[2] = ['零件图号', this.partName]
|
param[2] = ['零件图号_check', this.partNamecheck]
|
||||||
param[3] = ['投产时间_check', check7]
|
param[3] = ['零件图号', this.partName]
|
||||||
|
param[4] = ['投产时间_check', check7]
|
||||||
if (check7 === 0) {
|
if (check7 === 0) {
|
||||||
param[4] = ['开始时间', '']
|
param[5] = ['开始时间', '']
|
||||||
param[5] = ['结束时间', '']
|
param[6] = ['结束时间', '']
|
||||||
} else {
|
} else {
|
||||||
param[4] = ['开始时间', this.outTime[0]]
|
param[5] = ['开始时间', this.outTime[0]]
|
||||||
param[5] = ['结束时间', this.outTime[1]]
|
param[6] = ['结束时间', this.outTime[1]]
|
||||||
}
|
}
|
||||||
param[6] = ['加急_check', check8]
|
param[7] = ['加急_check', check8]
|
||||||
var Data = this.CreateData('2001', '报表_生产计划查询', param)
|
var Data = this.CreateData('2001', '报表_生产计划查询', param)
|
||||||
this.exportExcel_NPOI(Data)
|
this.exportExcel_NPOI(Data)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -49,43 +49,43 @@
|
|||||||
highlight-current-row
|
highlight-current-row
|
||||||
element-loading-text="拼命加载中"
|
element-loading-text="拼命加载中"
|
||||||
@selection-change="handleSelectionChange">
|
@selection-change="handleSelectionChange">
|
||||||
<el-table-column :selectable="selectable" label="选择" type="selection" align="center" width="45"/>
|
<el-table-column :selectable="selectable" label="选择" type="selection" align="center" width="45" fixed="left"/>
|
||||||
<el-table-column label="进程" align="center" width="80px">
|
<el-table-column label="进程" align="center" width="80px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.进程 }}
|
{{ scope.row.进程 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="机床图号" prop="机床图号" align="center" width="140px" show-overflow-tooltip>
|
<el-table-column label="机床图号" prop="机床图号" align="center" width="140px" show-overflow-tooltip fixed="left">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.机床图号 }}
|
{{ scope.row.机床图号 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="机床名称" prop="机床名称" align="center" width="140px" show-overflow-tooltip>
|
<!--<el-table-column label="机床名称" prop="机床名称" align="center" width="140px" show-overflow-tooltip>-->
|
||||||
<template slot-scope="scope">
|
<!--<template slot-scope="scope">-->
|
||||||
{{ scope.row.机床名称 }}
|
<!--{{ scope.row.机床名称 }}-->
|
||||||
</template>
|
<!--</template>-->
|
||||||
</el-table-column>
|
<!--</el-table-column>-->
|
||||||
<el-table-column label="组号" prop="组号" align="center" width="100px" show-overflow-tooltip>
|
<el-table-column label="组号" prop="组号" align="center" width="100px" show-overflow-tooltip fixed="left">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.组号 }}
|
{{ scope.row.组号 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="零件图号" prop="零件图号" align="center" width="173px" show-overflow-tooltip>
|
<el-table-column label="零件图号" prop="零件图号" align="center" width="173px" show-overflow-tooltip fixed="left">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.零件图号 }}
|
{{ scope.row.零件图号 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="零件名称" align="center" width="129" show-overflow-tooltip>
|
<el-table-column label="零件名称" align="center" width="129" show-overflow-tooltip fixed="left">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.零件名称 }}
|
{{ scope.row.零件名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="工序名称" align="center">
|
<el-table-column label="工序名称" align="center" fixed="left">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.工艺名称 }}
|
{{ scope.row.工艺名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="加工数" align="center">
|
<el-table-column label="加工数" align="center" fixed="left">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.投产数 }}
|
{{ scope.row.投产数 }}
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ export default {
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.CJPCgongxuwancheng{
|
.CJPCgongxuwancheng{
|
||||||
background: #d8e5f6 !important;
|
background: #9bd7fc !important;
|
||||||
}
|
}
|
||||||
.CJPClingjianjinxing{
|
.CJPClingjianjinxing{
|
||||||
background: #9bd7fc !important;
|
background: #9bd7fc !important;
|
||||||
|
|||||||
Reference in New Issue
Block a user