更新
This commit is contained in:
97
src/api/Assembly/AssemblyTaskAssignment.js
Normal file
97
src/api/Assembly/AssemblyTaskAssignment.js
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
import state from '@/store'
|
||||||
|
import router from '@/router'
|
||||||
|
// 初始化机床项目
|
||||||
|
export function initProject() {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: 'PDM_项目名称_查询数据'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 组件查询
|
||||||
|
export function searchTable(machineNumberValue) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: '车间管理_装配计划_查询数据',
|
||||||
|
param: '机床流水号=' + machineNumberValue
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function deletedata(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '2',
|
||||||
|
name: '车间管理_工作计划_删除数据',
|
||||||
|
param: '计划流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getMachineNames(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: 'PDM_机床名称_查询数据_获取数量和名称_根据机床流水号',
|
||||||
|
param: `机床流水号=${num}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取组号
|
||||||
|
export function getGroups(stepNumber) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: '车间生产管理工艺_组件状态查询_查询所有组',
|
||||||
|
param: '机床流水号=' + stepNumber
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询零件
|
||||||
|
export function selectParts(check1, stepNumber, check2, num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: '车间生产管理工艺_车间组件完成情况_查询数据',
|
||||||
|
param: '组件流水号_check=' + check1 + '&组件流水号=' + stepNumber + '&工艺计划流水号_check=' + check2 + '&工艺计划流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function addData(num, name, type) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '2',
|
||||||
|
name: '车间管理_工作计划_增加数据',
|
||||||
|
param: '机床流水号=' + num + '&任务名称=' + name + '&计划类型=' + type
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -40,7 +40,7 @@ export function groupSelect(machineValue) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function basicPartsData(machine_check, machine, group_check, group, Model_check, ModelValue, orderName, order) {
|
export function basicPartsData(machine_check, machine, group_check, group, Model_check, ModelValue, orderName, order, orderassignmentTypeValue_check, assignmentTypeValue, check_time, outTime1, outTime2) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -49,7 +49,7 @@ 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}&排序名称=${orderName}&排序顺序=${order}`
|
param: `机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}&规格_check=${Model_check}&规格=${ModelValue}&排序名称=${orderName}&排序顺序=${order}&分配类型_check=${orderassignmentTypeValue_check}&分配类型=${assignmentTypeValue}&分配时间_check=${check_time}&分配开始时间=${outTime1}&分配结束时间=${outTime2}`
|
||||||
// Pagination: pageCurrent + '&' + pageSize
|
// Pagination: pageCurrent + '&' + pageSize
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -421,3 +421,15 @@ export function inPart(num) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function getunallocated() {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '1',
|
||||||
|
name: '零件分配查询_查询数量'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -57,3 +57,16 @@ export function searchSupplier() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function repeal(num1, num2) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '2',
|
||||||
|
name: '采购管理_采购合同_审批付款_撤回_修改数据',
|
||||||
|
param: '采购合同请款流水号=' + num1 + '&审批_付款状态=' + num2
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -57,3 +57,16 @@ export function searchSupplier() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function repeal(num1, num2) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '2',
|
||||||
|
name: '采购管理_采购合同_审批付款_撤回_修改数据',
|
||||||
|
param: '采购合同请款流水号=' + num1 + '&审批_付款状态=' + num2
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -38,10 +38,11 @@ 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 !== 'undefined') {
|
if (typeof (id) !== 'undefined') {
|
||||||
console.log(id, 123)
|
console.log(id, 123)
|
||||||
|
console.log(typeof (id))
|
||||||
} else {
|
} else {
|
||||||
console.log(123)
|
console.log(456)
|
||||||
store.dispatch('FedLogOut').then(() => {
|
store.dispatch('FedLogOut').then(() => {
|
||||||
location.reload() // 为了重新实例化vue-router对象 避免bug
|
location.reload() // 为了重新实例化vue-router对象 避免bug
|
||||||
alert('此账号登录失效,请重新登录')
|
alert('此账号登录失效,请重新登录')
|
||||||
|
|||||||
347
src/views/Assembly/AssemblyTaskAssignment/index.vue
Normal file
347
src/views/Assembly/AssemblyTaskAssignment/index.vue
Normal file
@@ -0,0 +1,347 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card style="width: 91%">
|
||||||
|
<el-row style="margin-top: 10px; margin-bottom: 10px">
|
||||||
|
<span>机床编号:</span>
|
||||||
|
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="searchTable()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in machineNumber"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
<div style="float: left">{{ item.label }}</div>
|
||||||
|
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<span>机床数量:{{ machineNum }}</span>
|
||||||
|
<el-button size="small" icon="el-icon-circle-plus-outline" type="distribution" style="margin-left: 300px" @click="addTaskName()">增加装配任务</el-button>
|
||||||
|
<el-button type="danger" plain size="small" icon="el-icon-delete" style="margin-left: 300px" @click="deleteData()">删除</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="width: 52%; float: left">
|
||||||
|
<el-table v-loading="loading" :data="tableData" border stripe size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px">
|
||||||
|
<el-table-column label="机床组号" align="center" width="140px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.机床组号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="部件名称" align="center" width="100px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.部件名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="部件数" align="center" width="65px" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.部件数 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!--<el-table-column label="总数量" align="center" width="65px">-->
|
||||||
|
<!--<template slot-scope="scope">-->
|
||||||
|
<!--{{ scope.row.机床数量 }}-->
|
||||||
|
<!--</template>-->
|
||||||
|
<!--</el-table-column>-->
|
||||||
|
<el-table-column label="自制件入库" align="center" width="95px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.自制件入库率 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="外购件入库" align="center" width="95px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.外购件入库率 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="成组配套" align="center" width="90px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" size="mini" @click="openDialog(scope.row)">查看详情</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="分配时间" align="center" width="90px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.分配时间 ? scope.row.分配时间.split(' ')[0] : '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="90px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" size="mini" @click="openPeople(scope.row)">分配</el-button>
|
||||||
|
<el-button type="text" icon="el-icon-delete" size="mini" @click="deleteData(scope.row)"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="width: 38%; float: left">
|
||||||
|
<el-table :data="tableData2" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="720px">
|
||||||
|
<el-table-column label="状态" align="center" width="90px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<template v-if="scope.row.edit">
|
||||||
|
<el-select v-model="scope.row.组件流水号" filterable clearable size="small" style="width: 100px" @change="groupChange(scope.row, scope.$index)">
|
||||||
|
<el-option
|
||||||
|
v-for="item in groupNum"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ scope.row.组号 }}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="部件" align="center" width="120px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<template v-if="scope.row.edit">
|
||||||
|
<el-input v-model="scope.row.任务名称" size="mini" style="width: 100%"/>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ scope.row.任务名称 }}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="装配人" align="center" width="70px" prop="计划工时">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<template v-if="scope.row.edit">
|
||||||
|
<el-input v-model="scope.row.计划工时" size="mini" style="width: 100%" props="" @input="filterNuber(scope.row.计划工时, scope.$index, '计划工时')"/>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ scope.row.计划工时 }}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="装配开始" align="center" width="110px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.机床装配完成时间 ? scope.row.机床装配完成时间.split(' ')[0] : '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="装配暂停" align="center" width="110px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.机床装配完成时间 ? scope.row.机床装配完成时间.split(' ')[0] : '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="装配结束" align="center" width="110px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.机床装配完成时间 ? scope.row.机床装配完成时间.split(' ')[0] : '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
<el-dialog
|
||||||
|
v-el-drag-dialog
|
||||||
|
:visible.sync="dialogFormVisible"
|
||||||
|
title="零件完成情况"
|
||||||
|
width="40%">
|
||||||
|
<div style="margin: 10px 0 0 20px;height: 650px;overflow: auto">
|
||||||
|
<el-tree
|
||||||
|
:data="departmentData"
|
||||||
|
:indent="50"
|
||||||
|
:expand-on-click-node="false"
|
||||||
|
:render-content="renderContent"
|
||||||
|
node-key="机床流水号"
|
||||||
|
class="selectTree"/>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog
|
||||||
|
v-el-drag-dialog
|
||||||
|
:visible.sync="dialogFormVisible1"
|
||||||
|
title="装配任务"
|
||||||
|
center
|
||||||
|
width="400px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="120px">
|
||||||
|
<el-form-item label="任务名称" prop="任务名称">
|
||||||
|
<el-input v-model="form.任务名称" size="small" style="width: 150px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button
|
||||||
|
:disabled="addPurchaseOrder_disable"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
icon="el-icon-check"
|
||||||
|
@click="submitTaskName">确定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>import { initProject, searchTable, getMachineNames, selectParts, addData, deletedata } from '@/api/Assembly/AssemblyTaskAssignment'
|
||||||
|
// import { mapGetters } from 'vuex'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
machineNumberValue: '',
|
||||||
|
machineNumber: [],
|
||||||
|
machineNum: '',
|
||||||
|
dialogFormVisible: false,
|
||||||
|
dialogFormVisible1: false,
|
||||||
|
groupNumberValue: '',
|
||||||
|
groupNum: [],
|
||||||
|
loading: false,
|
||||||
|
tableData: [],
|
||||||
|
tableData2: [],
|
||||||
|
hadFile: [],
|
||||||
|
option: [],
|
||||||
|
plan: '',
|
||||||
|
addPurchaseOrder_disable: false,
|
||||||
|
form: {
|
||||||
|
任务名称: ''
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
任务名称: [{ required: true, message: '请填写任务名称' }]
|
||||||
|
},
|
||||||
|
departmentData: [] // 树状数据
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// created() {
|
||||||
|
// this.searchTable1()
|
||||||
|
// },
|
||||||
|
mounted() {
|
||||||
|
this.initProject()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initProject() {
|
||||||
|
initProject().then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.machineNumber.push({
|
||||||
|
label: response.data[i].机床图号,
|
||||||
|
name: response.data[i].项目名称,
|
||||||
|
value: response.data[i].机床流水号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
searchTable() {
|
||||||
|
this.loading = true
|
||||||
|
getMachineNames(this.machineNumberValue).then(response => {
|
||||||
|
this.machineNum = response.data[0].机床数量
|
||||||
|
})
|
||||||
|
searchTable(this.machineNumberValue).then(response => {
|
||||||
|
this.tableData = response.data
|
||||||
|
}).then(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
renderContent(h, { node, data, store }) {
|
||||||
|
console.log(node, 11111)
|
||||||
|
if (node.data.零件类型 === 1) { // 自制
|
||||||
|
if (parseInt(node.data.考核状态) > 6) {
|
||||||
|
return (<span class='treeNotesComplate'>{node.label}</span>)
|
||||||
|
} else {
|
||||||
|
return (<span class='treeNotesUnComplate'>{node.label}</span>)
|
||||||
|
}
|
||||||
|
} else { // 外购
|
||||||
|
if (node.data.采购状态 === '已完成') {
|
||||||
|
return (<span class='treeNotesComplate'>{node.label}</span>)
|
||||||
|
} else {
|
||||||
|
return (<span class='treeNotesUnComplate'>{node.label}</span>)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
openDialog(row) {
|
||||||
|
this.dialogFormVisible = true
|
||||||
|
this.departmentData = []
|
||||||
|
selectParts(1, row.组件流水号, 0, 0).then(response => {
|
||||||
|
for (let j = 0; j < response.data.length; j++) {
|
||||||
|
this.departmentData.push({
|
||||||
|
label: (response.data[j].零件图号 ? response.data[j].零件图号 : '无零件图号') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].规格 ? response.data[j].规格 : '') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].投产总数量 ? response.data[j].投产总数量 : '') + '..........' + (response.data[j].零件名称 ? response.data[j].零件名称 : '无零件名称') + (response.data[j].零件类型 === 1 ? '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0自制:' + response.data[j].考核状态名称 : (response.data[j].零件类型 === 2 ? '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0制造采购' : '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0外购:' + response.data[j].采购状态)),
|
||||||
|
value: response.data[j].工艺计划流水号,
|
||||||
|
考核状态: response.data[j].考核状态,
|
||||||
|
采购状态: response.data[j].采购状态,
|
||||||
|
零件类型: response.data[j].零件类型
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
openPeople(row) {},
|
||||||
|
addTaskName() {
|
||||||
|
if (this.$refs['form'] !== undefined) {
|
||||||
|
this.$refs['form'].resetFields()
|
||||||
|
}
|
||||||
|
this.form.任务名称 = ''
|
||||||
|
this.addPurchaseOrder_disable = false
|
||||||
|
this.dialogFormVisible1 = true
|
||||||
|
},
|
||||||
|
submitTaskName() {
|
||||||
|
if (this.machineNumberValue) {
|
||||||
|
this.$refs['form'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.addPurchaseOrder_disable = true
|
||||||
|
addData(this.machineNumberValue, this.form.任务名称, 1).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('新建装配任务成功')
|
||||||
|
this.searchTable()
|
||||||
|
this.dialogFormVisible1 = false
|
||||||
|
} else { this.$message.error('新建装配任务失败') }
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.warning('请先选择机床')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deleteData(row) {
|
||||||
|
this.$confirm('确认删除该装配任务', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deletedata(row.计划流水号).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.searchTable()
|
||||||
|
} else { this.$message.error('删除失败') }
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.el-table .cjzuwcqk_complet {
|
||||||
|
background: #9bd7fc !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style lang="scss">
|
||||||
|
.selectTree{
|
||||||
|
.el-tree-node__content>.el-tree-node__expand-icon{
|
||||||
|
display: inline !important;
|
||||||
|
}
|
||||||
|
.el-tree-node:focus > .el-tree-node__content {
|
||||||
|
background-color: #ccc !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.treeNotesComplate {
|
||||||
|
color: black;
|
||||||
|
background-color: #9bd7fc !important;
|
||||||
|
}
|
||||||
|
.treeNotesUnComplate {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped>
|
||||||
|
.el-form--label-left >>> .el-form-item__label {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
>>>.el-dialog--center .el-dialog__body {
|
||||||
|
text-align: initial;
|
||||||
|
padding: 20px 30px 20px
|
||||||
|
}
|
||||||
|
>>>.el-dialog__header {
|
||||||
|
padding: 20px 20px 0px;
|
||||||
|
}
|
||||||
|
>>>.el-dialog__footer {
|
||||||
|
padding: 0px 20px 20px;
|
||||||
|
/*text-align: right;*/
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
>>>.el-form-item {
|
||||||
|
margin-bottom: 13px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -22,9 +22,9 @@
|
|||||||
<el-button size="small" type="primary" icon="el-icon-search" style="margin: 0 0 0 10px" plain @click="searchList()">查询</el-button>
|
<el-button size="small" type="primary" icon="el-icon-search" style="margin: 0 0 0 10px" plain @click="searchList()">查询</el-button>
|
||||||
<el-button :disabled="审批未通过===true" size="small" style="margin-left: 100px" type="distribution" @click="inputPassword()">领料确认</el-button>
|
<el-button :disabled="审批未通过===true" size="small" style="margin-left: 100px" type="distribution" @click="inputPassword()">领料确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 25%;float: left;margin-right: 10px">
|
<div style="width: 26%;float: left;margin-right: 10px">
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table :data="pickListTable1" :row-class-name="tableRowClassName" class="shenpi" highlight-current-row border size="mini" width="100%" height="570px" @row-click="clickList">
|
<el-table :data="pickListTable1" :row-class-name="tableRowClassName" class="shenpi" highlight-current-row border size="mini" width="100%" height="585px" @row-click="clickList">
|
||||||
<el-table-column prop="领料单编号" label="领料单编号" show-overflow-tooltip align="center" width="95px">
|
<el-table-column prop="领料单编号" label="领料单编号" show-overflow-tooltip align="center" width="95px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.领料单编号 }}
|
{{ scope.row.领料单编号 }}
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<el-card>
|
<el-card>
|
||||||
<el-table :data="pickListTable2" :row-class-name="tableRowClassName1" highlight-current-row border style="width: 1000px" size="mini" height="600" @selection-change="handleSelectionChange">
|
<el-table :data="pickListTable2" :row-class-name="tableRowClassName1" highlight-current-row border style="width: 1000px" size="mini" height="600" @selection-change="handleSelectionChange">
|
||||||
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
|
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
|
||||||
<el-table-column label="名称" show-overflow-tooltip prop="名称" align="center" width="90">
|
<el-table-column label="名称" show-overflow-tooltip prop="名称" align="center" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.名称 }}
|
{{ scope.row.名称 }}
|
||||||
</template>
|
</template>
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
<!-- <el-tag v-else-if="Number(scope.row.出库数量1) === 0" type="warning" size="mini">未领</el-tag>-->
|
<!-- <el-tag v-else-if="Number(scope.row.出库数量1) === 0" type="warning" size="mini">未领</el-tag>-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="机床图号" prop="机床图号" align="center" width="80" show-overflow-tooltip>
|
<el-table-column label="机床图号" prop="机床图号" align="center" width="100" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.机床图号 }}
|
{{ scope.row.机床图号 }}
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ export default {
|
|||||||
type: '3',
|
type: '3',
|
||||||
name: `select distinct 供应商流水号,供应商名称 from (
|
name: `select distinct 供应商流水号,供应商名称 from (
|
||||||
select 供应商流水号,供应商名称,sum(数量) as 总采购数量,sum(已到货数量) as 总到货数量
|
select 供应商流水号,供应商名称,sum(数量) as 总采购数量,sum(已到货数量) as 总到货数量
|
||||||
from 库存管理_外购件_采购合同明细_视图 where 是否启用 = 1
|
from 库存管理_外购件_采购合同明细_视图 where 是否启用 = 1 and 审批情况流水号 = 1
|
||||||
group by 采购合同流水号,供应商流水号,供应商名称
|
group by 采购合同流水号,供应商流水号,供应商名称
|
||||||
having sum(数量) > sum(已到货数量)
|
having sum(数量) > sum(已到货数量)
|
||||||
) as 已采购的离线合同`
|
) as 已采购的离线合同`
|
||||||
|
|||||||
@@ -832,17 +832,24 @@ export default {
|
|||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.pageCurrent = 1
|
this.pageCurrent = 1
|
||||||
this.pageSize = val
|
this.pageSize = val
|
||||||
|
this.totalNum = 0
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
var check
|
||||||
this.Machine ? this.check1 = 1 : this.check1 = 0
|
this.Machine ? this.check1 = 1 : this.check1 = 0
|
||||||
this.Group ? this.check2 = 1 : this.check2 = 0
|
this.Group ? this.check2 = 1 : this.check2 = 0
|
||||||
searchTable(this.check1, this.Machine, this.check2, this.Group, this.pageCurrent, this.pageSize).then(response => {
|
this.materialName ? check = 1 : check = 0
|
||||||
|
searchTable(this.check1, this.Machine, this.check2, this.Group, check, this.materialName, this.order, this.pageCurrent, this.pageSize).then(response => {
|
||||||
for (let i = 0; i < response.data.result.length; i++) {
|
for (let i = 0; i < response.data.result.length; i++) {
|
||||||
if (response.data.result[i].入库时间) {
|
if (response.data.result[i].入库时间) {
|
||||||
response.data.result[i].入库时间 = response.data.result[i].入库时间.split(' ', 2)[0]
|
response.data.result[i].入库时间 = response.data.result[i].入库时间.split(' ', 2)[0]
|
||||||
|
this.totalNum += 1
|
||||||
}
|
}
|
||||||
if (response.data.result[i].计划完成时间) {
|
if (response.data.result[i].计划完成时间) {
|
||||||
response.data.result[i].计划完成时间 = response.data.result[i].计划完成时间.split(' ', 2)[0]
|
response.data.result[i].计划完成时间 = response.data.result[i].计划完成时间.split(' ', 2)[0]
|
||||||
}
|
}
|
||||||
|
if (response.data.result[i].机加工实际完成时间) {
|
||||||
|
response.data.result[i].机加工实际完成时间 = response.data.result[i].机加工实际完成时间.split(' ', 2)[0]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.tableData = response.data.result
|
this.tableData = response.data.result
|
||||||
this.total = parseInt(response.data.output[0].ItemCount)
|
this.total = parseInt(response.data.output[0].ItemCount)
|
||||||
@@ -851,17 +858,24 @@ export default {
|
|||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
this.pageCurrent = val
|
this.pageCurrent = val
|
||||||
|
this.totalNum = 0
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
var check
|
||||||
this.Machine ? this.check1 = 1 : this.check1 = 0
|
this.Machine ? this.check1 = 1 : this.check1 = 0
|
||||||
this.Group ? this.check2 = 1 : this.check2 = 0
|
this.Group ? this.check2 = 1 : this.check2 = 0
|
||||||
searchTable(this.check1, this.Machine, this.check2, this.Group, this.pageCurrent, this.pageSize).then(response => {
|
this.materialName ? check = 1 : check = 0
|
||||||
|
searchTable(this.check1, this.Machine, this.check2, this.Group, check, this.materialName, this.order, this.pageCurrent, this.pageSize).then(response => {
|
||||||
for (let i = 0; i < response.data.result.length; i++) {
|
for (let i = 0; i < response.data.result.length; i++) {
|
||||||
if (response.data.result[i].入库时间) {
|
if (response.data.result[i].入库时间) {
|
||||||
response.data.result[i].入库时间 = response.data.result[i].入库时间.split(' ', 2)[0]
|
response.data.result[i].入库时间 = response.data.result[i].入库时间.split(' ', 2)[0]
|
||||||
|
this.totalNum += 1
|
||||||
}
|
}
|
||||||
if (response.data.result[i].计划完成时间) {
|
if (response.data.result[i].计划完成时间) {
|
||||||
response.data.result[i].计划完成时间 = response.data.result[i].计划完成时间.split(' ', 2)[0]
|
response.data.result[i].计划完成时间 = response.data.result[i].计划完成时间.split(' ', 2)[0]
|
||||||
}
|
}
|
||||||
|
if (response.data.result[i].机加工实际完成时间) {
|
||||||
|
response.data.result[i].机加工实际完成时间 = response.data.result[i].机加工实际完成时间.split(' ', 2)[0]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.tableData = response.data.result
|
this.tableData = response.data.result
|
||||||
this.total = parseInt(response.data.output[0].ItemCount)
|
this.total = parseInt(response.data.output[0].ItemCount)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-select v-model="machineValue" placeholder="机床图号" style="width: 150px" filterable size="small">
|
<el-select v-model="machineValue" placeholder="机床图号" style="width: 150px" clearable filterable size="small" @clear="clearmachineValue">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in machine"
|
v-for="item in machine"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -16,10 +16,27 @@
|
|||||||
: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-select v-model="assignmentTypeValue" filterable placeholder="分配类型" size="small" style="width: 100px;margin-left: 10px" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in assignmentType"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="outTime"
|
||||||
|
type="daterange"
|
||||||
|
size="small"
|
||||||
|
format="yyyy-MM-dd"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
range-separator="~"
|
||||||
|
style="width:240px;margin-left: 0px"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"/>
|
||||||
<el-button icon="el-icon-search" type="primary" plain size="small" style="margin-left:10px" @click="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>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- <el-card>
|
<!-- <el-card>
|
||||||
<div v-for="(file, key) in hadFile" :key="key">
|
<div v-for="(file, key) in hadFile" :key="key">
|
||||||
@@ -326,15 +343,32 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { machineSelect, groupSelect, basicPartsData, deleteBasicParts, deletePurchaseData, getFileData, searchModel } from '@/api/ManufacturingCenter/MaterialAllocation'
|
import { machineSelect, groupSelect, basicPartsData, deleteBasicParts, deletePurchaseData, 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,
|
assignmentTypeValue: '',
|
||||||
order: 1,
|
assignmentType: [
|
||||||
|
{
|
||||||
|
value: '未分配',
|
||||||
|
label: '未分配'
|
||||||
|
}, {
|
||||||
|
value: '采购部',
|
||||||
|
label: '采购部'
|
||||||
|
}, {
|
||||||
|
value: '车间生产',
|
||||||
|
label: '车间生产'
|
||||||
|
}, {
|
||||||
|
value: '制造部',
|
||||||
|
label: '制造部'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
outTime: '',
|
||||||
|
orderName: 0,
|
||||||
|
order: 0,
|
||||||
distribution: 0,
|
distribution: 0,
|
||||||
completionRate: 0,
|
completionRate: 0,
|
||||||
machineValue: '',
|
machineValue: '',
|
||||||
@@ -372,6 +406,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
assignmentTypeValue(val) {
|
||||||
|
if (val) {
|
||||||
|
this.getTableData()
|
||||||
|
}
|
||||||
|
},
|
||||||
machineValue(val) {
|
machineValue(val) {
|
||||||
this.groupValue = ''
|
this.groupValue = ''
|
||||||
this.group = []
|
this.group = []
|
||||||
@@ -398,6 +437,12 @@ export default {
|
|||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
clearmachineValue() {
|
||||||
|
this.machineValue = ''
|
||||||
|
this.machine = []
|
||||||
|
this.group = []
|
||||||
|
this.groupValue = ''
|
||||||
|
},
|
||||||
sortChange(column, prop, order) {
|
sortChange(column, prop, order) {
|
||||||
console.log(column, column.prop, column.order, 11111)
|
console.log(column, column.prop, column.order, 11111)
|
||||||
if (column.prop === '分配') {
|
if (column.prop === '分配') {
|
||||||
@@ -419,6 +464,9 @@ export default {
|
|||||||
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
|
||||||
|
const assignmentTypeValue_check = this.assignmentTypeValue ? 1 : 0
|
||||||
|
let check_time
|
||||||
|
this.outTime ? check_time = 1 : (check_time = 0, this.outTime = '')
|
||||||
var param = []
|
var param = []
|
||||||
param[0] = ['机床流水号_check', machine_check]
|
param[0] = ['机床流水号_check', machine_check]
|
||||||
param[1] = ['机床流水号', this.machineValue]
|
param[1] = ['机床流水号', this.machineValue]
|
||||||
@@ -426,44 +474,17 @@ export default {
|
|||||||
param[3] = ['组件流水号', this.groupValue]
|
param[3] = ['组件流水号', this.groupValue]
|
||||||
param[4] = ['规格_check', Model_check]
|
param[4] = ['规格_check', Model_check]
|
||||||
param[5] = ['规格', this.ModelValue]
|
param[5] = ['规格', this.ModelValue]
|
||||||
var Data = this.CreateData('2001', '报表_零件分配查询_自制件_查询', param)
|
param[6] = ['排序名称', this.orderName]
|
||||||
|
param[7] = ['排序顺序', this.order]
|
||||||
|
param[8] = ['分配类型_check', assignmentTypeValue_check]
|
||||||
|
param[9] = ['分配类型', this.assignmentTypeValue]
|
||||||
|
param[10] = ['分配时间_check', check_time]
|
||||||
|
param[11] = ['分配开始时间', this.outTime[0]]
|
||||||
|
param[12] = ['分配结束时间', this.outTime[1]]
|
||||||
|
var Data = this.CreateData('2001', '报表_零件分配查询_查询', param)
|
||||||
this.exportExcel_NPOI(Data)
|
this.exportExcel_NPOI(Data)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
exportExcel2() {
|
|
||||||
if (this.tableDataWB.length === 0) {
|
|
||||||
this.$message.warning('请先查询要导出的数据')
|
|
||||||
} else {
|
|
||||||
const machine_check = this.machineValue ? 1 : 0
|
|
||||||
const group_check = this.groupValue ? 1 : 0
|
|
||||||
const Model_check = this.ModelValue ? 1 : 0
|
|
||||||
var param = []
|
|
||||||
param[0] = ['机床流水号_check', machine_check]
|
|
||||||
param[1] = ['机床流水号', this.machineValue]
|
|
||||||
param[2] = ['组件流水号_check', group_check]
|
|
||||||
param[3] = ['组件流水号', this.groupValue]
|
|
||||||
param[4] = ['规格_check', Model_check]
|
|
||||||
param[5] = ['规格', this.ModelValue]
|
|
||||||
var Data = this.CreateData('2001', '报表_零件分配查询_标准件和外购件_查询', param)
|
|
||||||
this.exportExcel_NPOI(Data)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 在什么情况下需要查询上传的附件,调用this.getFileData()即可根据
|
|
||||||
getFileData(machineValue) {
|
|
||||||
this.hadFile = []
|
|
||||||
getFileData(machineValue).then(res => {
|
|
||||||
if (res.data.length > 0) {
|
|
||||||
res.data.map(item => {
|
|
||||||
this.hadFile.push({
|
|
||||||
url: `${ServerIP}${item.文件标识}.${item.文件后缀}`,
|
|
||||||
name: `${item.文件名称}.${item.文件后缀}`,
|
|
||||||
suffix: item.文件后缀,
|
|
||||||
id: item.文件标识
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
fetchData() {
|
fetchData() {
|
||||||
this.getSelect(machineSelect, ['机床图号', '机床流水号'], 'machine')
|
this.getSelect(machineSelect, ['机床图号', '机床流水号'], 'machine')
|
||||||
},
|
},
|
||||||
@@ -486,14 +507,16 @@ export default {
|
|||||||
},
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
// this.getFileData(this.machineValue)
|
// this.getFileData(this.machineValue)
|
||||||
if (this.machineValue) {
|
if (this.machineValue || this.outTime) {
|
||||||
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
|
||||||
|
const assignmentTypeValue_check = this.assignmentTypeValue ? 1 : 0
|
||||||
|
let check_time
|
||||||
|
this.outTime ? check_time = 1 : (check_time = 0, this.outTime = '')
|
||||||
this.loading = true
|
this.loading = true
|
||||||
basicPartsData(machine_check, this.machineValue, group_check, this.groupValue, Model_check, this.ModelValue, this.orderName, this.order).then(response => {
|
basicPartsData(machine_check, this.machineValue, group_check, this.groupValue, Model_check, this.ModelValue, this.orderName, this.order, assignmentTypeValue_check, this.assignmentTypeValue, check_time, this.outTime[0], this.outTime[1]).then(response => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
console.log(response, 7777777777)
|
|
||||||
const res = response.data
|
const res = response.data
|
||||||
this.distribution = 0
|
this.distribution = 0
|
||||||
this.completionRate = ''
|
this.completionRate = ''
|
||||||
@@ -516,26 +539,6 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$message.warning('请输入查询条件')
|
this.$message.warning('请输入查询条件')
|
||||||
}
|
}
|
||||||
// this.loadingWB = true
|
|
||||||
// const machine_check = this.machineValue ? 1 : 0
|
|
||||||
// const group_check = this.groupValue ? 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 => {
|
|
||||||
// this.loadingWB = false
|
|
||||||
// const data = response.data
|
|
||||||
// this.totalWB = data.total
|
|
||||||
// this.tableDataWB = data.rows.map(item => {
|
|
||||||
// if (item.整改类型 === '1') {
|
|
||||||
// item.整改类型 = '新增'
|
|
||||||
// } else if (item.整改类型 === '2') {
|
|
||||||
// item.整改类型 = '替换'
|
|
||||||
// } else if (item.整改类型 === '3') {
|
|
||||||
// item.整改类型 = '补充加工'
|
|
||||||
// }
|
|
||||||
// item.零件类型 = item.零件类型 === '2' ? '外购件' : '标准件'
|
|
||||||
// return item
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
openUrgentItem() {
|
openUrgentItem() {
|
||||||
if (this.$refs['form'] !== undefined) {
|
if (this.$refs['form'] !== undefined) {
|
||||||
|
|||||||
@@ -27,6 +27,9 @@
|
|||||||
<el-badge :value="value" :max="99" class="item">
|
<el-badge :value="value" :max="99" class="item">
|
||||||
<el-button size="small" type="text" @click="PartCallbackInformation;dialogFormVisible1 = true">基本件打回信息</el-button>
|
<el-button size="small" type="text" @click="PartCallbackInformation;dialogFormVisible1 = true">基本件打回信息</el-button>
|
||||||
</el-badge>
|
</el-badge>
|
||||||
|
<el-badge :value="unallocatedQuantity" :max="99" class="item">
|
||||||
|
<el-button size="small" type="text" @click="hreftwo">今日未分配零件信息</el-button>
|
||||||
|
</el-badge>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-tabs type="border-card" @tab-click="selectPart">
|
<el-tabs type="border-card" @tab-click="selectPart">
|
||||||
@@ -496,7 +499,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { inPart, searchBillNumber, DeliveryTimeSelect, initProject, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed1, purchaseRequisition, purchaseRequisition1, purchaseRequisition2, MoveOut, MoveOut1, PurchasingDepartment, Production, PartCallbackInformation, PartCallbackInformation1, Delete, Delete1, editStock, editNum, OutPart, PurchasingDepartmentBack, purchaseRequisition2Back } from '@/api/ManufacturingCenter/PartAssignment'
|
import { getunallocated, inPart, searchBillNumber, DeliveryTimeSelect, initProject, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed1, purchaseRequisition, purchaseRequisition1, purchaseRequisition2, MoveOut, MoveOut1, PurchasingDepartment, Production, PartCallbackInformation, PartCallbackInformation1, Delete, Delete1, editStock, editNum, OutPart, PurchasingDepartmentBack, purchaseRequisition2Back } from '@/api/ManufacturingCenter/PartAssignment'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { getNowShotTime } from '@/utils/tool'
|
import { getNowShotTime } from '@/utils/tool'
|
||||||
import Cookie from 'js-cookie'
|
import Cookie from 'js-cookie'
|
||||||
@@ -505,6 +508,7 @@ export default {
|
|||||||
inject: ['reload'],
|
inject: ['reload'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
unallocatedQuantity: 0,
|
||||||
purchaseRequisition_loading: false,
|
purchaseRequisition_loading: false,
|
||||||
Production_loading: false,
|
Production_loading: false,
|
||||||
PurchasingDepartment_loading: false,
|
PurchasingDepartment_loading: false,
|
||||||
@@ -631,8 +635,17 @@ export default {
|
|||||||
this.fetchData()
|
this.fetchData()
|
||||||
this.PartCallbackInformation()
|
this.PartCallbackInformation()
|
||||||
this.PartCallbackInformation1()
|
this.PartCallbackInformation1()
|
||||||
|
this.getUnallocated()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
hreftwo() {
|
||||||
|
this.$router.push({ path: '/ManufacturingCenter/MaterialAllocation' })
|
||||||
|
},
|
||||||
|
getUnallocated() {
|
||||||
|
getunallocated().then(response => {
|
||||||
|
this.unallocatedQuantity = response.data[0].未分配数量
|
||||||
|
})
|
||||||
|
},
|
||||||
// EXCEL 导出
|
// EXCEL 导出
|
||||||
// 姜福壮
|
// 姜福壮
|
||||||
exportExcel() {
|
exportExcel() {
|
||||||
|
|||||||
@@ -116,11 +116,16 @@
|
|||||||
{{ scope.row.未付款原因 === '通过' ? '' : scope.row.未付款原因 }}
|
{{ scope.row.未付款原因 === '通过' ? '' : scope.row.未付款原因 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="90px" fixed="right">
|
<el-table-column label="操作" align="center" width="110px" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tooltip :open-delay="1000" effect="dark" content="查看详情" placement="top">
|
<el-tooltip :open-delay="1000" effect="dark" content="查看详情" placement="top">
|
||||||
|
<div style="display: inline-block;">
|
||||||
|
<el-button style=" margin-right: 20px" type="text" size="mini" @click="searchTable2(scope.row)">详情</el-button>
|
||||||
|
</div>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip :open-delay="1000" effect="dark" content="撤回审核" placement="top">
|
||||||
<div style="display: inline-block">
|
<div style="display: inline-block">
|
||||||
<el-button type="text" size="mini" @click="searchTable2(scope.row)">详情</el-button>
|
<el-button type="text" size="mini" @click="repeal(scope.row)">撤回</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
@@ -172,7 +177,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { initBuyer, searchTable1, searchTable2, searchSupplier } from '@/api/ManufacturingCenter/RequestApprovalQuery'
|
import { repeal, initBuyer, searchTable1, searchTable2, searchSupplier } from '@/api/ManufacturingCenter/RequestApprovalQuery'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -199,6 +204,7 @@ export default {
|
|||||||
'sidebar',
|
'sidebar',
|
||||||
'avatar',
|
'avatar',
|
||||||
'name',
|
'name',
|
||||||
|
'token',
|
||||||
'id' // 人员编号
|
'id' // 人员编号
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
@@ -208,6 +214,20 @@ export default {
|
|||||||
this.searchSupplier()
|
this.searchSupplier()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
repeal(row) {
|
||||||
|
if (row.审批情况流水号 !== '3') {
|
||||||
|
this.$message.error('请款信息已审批,无法撤回!')
|
||||||
|
} else {
|
||||||
|
repeal(row.采购合同请款流水号, 0).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('审核撤销成功')
|
||||||
|
this.searchTable1()
|
||||||
|
} else {
|
||||||
|
this.$message.error('审核撤销失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
searchSupplier() {
|
searchSupplier() {
|
||||||
this.supplier = []
|
this.supplier = []
|
||||||
searchSupplier().then(response => {
|
searchSupplier().then(response => {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="未过原因" align="center" min-width="60">
|
<el-table-column label="未过原因" align="center" min-width="60">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.未通过审核原因 }}
|
{{ scope.row.未通过审核原因 === '通过' ? '' : scope.row.未通过审核原因 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="审批时间" align="center" min-width="60">
|
<el-table-column label="审批时间" align="center" min-width="60">
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="未过原因" align="center" min-width="60">
|
<el-table-column label="未过原因" align="center" min-width="60">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.未通过审批原因 }}
|
{{ scope.row.未通过审批原因 === '通过' ? '' : scope.row.未通过审批原因 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="付款人" align="center" min-width="60">
|
<el-table-column label="付款人" align="center" min-width="60">
|
||||||
@@ -106,13 +106,18 @@
|
|||||||
{{ scope.row.未付款原因 === '通过' ? '' : scope.row.未付款原因 }}
|
{{ scope.row.未付款原因 === '通过' ? '' : scope.row.未付款原因 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="90px" fixed="right">
|
<el-table-column label="操作" align="center" width="110px" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tooltip :open-delay="1000" effect="dark" content="查看详情" placement="top">
|
<el-tooltip :open-delay="1000" effect="dark" content="查看详情" placement="top">
|
||||||
<div style="display: inline-block">
|
<div style="display: inline-block">
|
||||||
<el-button type="text" size="mini" @click="searchTable2(scope.row)">详情</el-button>
|
<el-button type="text" size="mini" @click="searchTable2(scope.row)">详情</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
<el-tooltip :open-delay="1000" effect="dark" content="撤回审核" placement="top">
|
||||||
|
<div style="display: inline-block">
|
||||||
|
<el-button type="text" size="mini" @click="repeal(scope.row)">撤回</el-button>
|
||||||
|
</div>
|
||||||
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -157,7 +162,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { initBuyer, searchTable1, searchTable2, searchSupplier } from '@/api/ManufacturingCenter/RequestApprovalQuery1'
|
import { repeal, initBuyer, searchTable1, searchTable2, searchSupplier } from '@/api/ManufacturingCenter/RequestApprovalQuery1'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -176,7 +181,9 @@ export default {
|
|||||||
tableData1: [],
|
tableData1: [],
|
||||||
loading1: false,
|
loading1: false,
|
||||||
dialogFormVisible: false,
|
dialogFormVisible: false,
|
||||||
gridData1: []
|
gridData1: [],
|
||||||
|
role: '',
|
||||||
|
jinyong: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -184,6 +191,7 @@ export default {
|
|||||||
'sidebar',
|
'sidebar',
|
||||||
'avatar',
|
'avatar',
|
||||||
'name',
|
'name',
|
||||||
|
'token',
|
||||||
'id' // 人员编号
|
'id' // 人员编号
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
@@ -193,6 +201,34 @@ export default {
|
|||||||
this.searchSupplier()
|
this.searchSupplier()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
repeal(row) {
|
||||||
|
console.log(this.token, 'token')
|
||||||
|
if (this.token === 4) {
|
||||||
|
this.role = 1
|
||||||
|
if (row.付款情况流水号 !== '3') {
|
||||||
|
this.$message('财务已付款,无法撤销!')
|
||||||
|
} else {
|
||||||
|
repeal(row.采购合同请款流水号, this.role).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('审核撤销成功')
|
||||||
|
this.searchTable1()
|
||||||
|
} else {
|
||||||
|
this.$message.error('审核撤销失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (this.token === 18) {
|
||||||
|
this.role = 2
|
||||||
|
repeal(row.采购合同请款流水号, this.role).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('审核撤销成功')
|
||||||
|
this.searchTable1()
|
||||||
|
} else {
|
||||||
|
this.$message.error('审核撤销失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
searchSupplier() {
|
searchSupplier() {
|
||||||
this.supplier = []
|
this.supplier = []
|
||||||
searchSupplier().then(response => {
|
searchSupplier().then(response => {
|
||||||
|
|||||||
@@ -157,7 +157,7 @@
|
|||||||
<!-- <h4 style="margin-top: 5px;margin-bottom: 0px;display: inline-block;width: 150px;">发票结算申请单明细</h4>-->
|
<!-- <h4 style="margin-top: 5px;margin-bottom: 0px;display: inline-block;width: 150px;">发票结算申请单明细</h4>-->
|
||||||
<!-- <span>发票号:</span>-->
|
<!-- <span>发票号:</span>-->
|
||||||
<!-- <el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>-->
|
<!-- <el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>-->
|
||||||
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 450px;" height="450px" size="mini">
|
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 400px;" height="300px" size="mini">
|
||||||
<el-table-column label="名称" align="center" min-width="100">
|
<el-table-column label="名称" align="center" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }}
|
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }}
|
||||||
@@ -193,6 +193,11 @@
|
|||||||
{{ scope.row.到票数量 }}
|
{{ scope.row.到票数量 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="金额" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ Number(scope.row.金额).toFixed(2) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="100">
|
<el-table-column label="操作" align="center" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tooltip v-show="true" :open-delay="100" content="删除" placement="right">
|
<el-tooltip v-show="true" :open-delay="100" content="删除" placement="right">
|
||||||
@@ -201,6 +206,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<span style="margin-left: 1080px">到票总额:{{ monetaryTotal.toFixed(2) }}</span>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="700px">
|
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="700px">
|
||||||
@@ -283,7 +289,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="900px">
|
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="1000px">
|
||||||
<span>供应商:</span>
|
<span>供应商:</span>
|
||||||
<el-input v-model="supplierName" size="small" placeholder="请选择供应商到票" style="margin: 0 5px 10px 0;" readonly/>
|
<el-input v-model="supplierName" size="small" placeholder="请选择供应商到票" style="margin: 0 5px 10px 0;" readonly/>
|
||||||
<el-radio-group v-model="contractType" size="small" @change="searchTable01()">
|
<el-radio-group v-model="contractType" size="small" @change="searchTable01()">
|
||||||
@@ -344,6 +350,11 @@
|
|||||||
<el-input-number v-model="scope.row.本次到票数量" :min="0" :max="scope.row.已到货数量 - scope.row.到票数量" size="mini" controls-position="right" style="width: 100%;"/>
|
<el-input-number v-model="scope.row.本次到票数量" :min="0" :max="scope.row.已到货数量 - scope.row.到票数量" size="mini" controls-position="right" style="width: 100%;"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="本次到票金额" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ Number(scope.row.本次到票数量 * scope.row.单价).toFixed(2) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-table v-show="showtable03" ref="multipleTable" :data="tableData03" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
|
<el-table v-show="showtable03" ref="multipleTable" :data="tableData03" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
|
||||||
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
|
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
|
||||||
@@ -400,6 +411,7 @@ export default {
|
|||||||
name: '', // 发票结算申请
|
name: '', // 发票结算申请
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
monetaryTotal: 0,
|
||||||
submitAdd1_disable: false,
|
submitAdd1_disable: false,
|
||||||
dateRange: '',
|
dateRange: '',
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
@@ -672,6 +684,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
searchTable2(row) {
|
searchTable2(row) {
|
||||||
|
this.monetaryTotal = 0
|
||||||
this.applyOrderNum = row.发票结算申请单流水号
|
this.applyOrderNum = row.发票结算申请单流水号
|
||||||
this.invoiceNumber = row.发票号
|
this.invoiceNumber = row.发票号
|
||||||
this.supplierName = row.供应商名称
|
this.supplierName = row.供应商名称
|
||||||
@@ -679,6 +692,11 @@ export default {
|
|||||||
Number(row.是否提交申请) === 1 ? this.disabled = true : this.disabled = false
|
Number(row.是否提交申请) === 1 ? this.disabled = true : this.disabled = false
|
||||||
searchTable2(row.发票结算申请单流水号).then(response => {
|
searchTable2(row.发票结算申请单流水号).then(response => {
|
||||||
this.tableData2 = response.data
|
this.tableData2 = response.data
|
||||||
|
if (response.data.length !== 0) {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.monetaryTotal += response.data[i].金额
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
addInStoreRecord() {
|
addInStoreRecord() {
|
||||||
|
|||||||
@@ -106,6 +106,11 @@ export default {
|
|||||||
document.getElementsByClassName('tags-view-wrapper')[0].style.minWidth = '1680px'
|
document.getElementsByClassName('tags-view-wrapper')[0].style.minWidth = '1680px'
|
||||||
document.getElementsByClassName('navbar')[0].style.minWidth = '1680px'
|
document.getElementsByClassName('navbar')[0].style.minWidth = '1680px'
|
||||||
break
|
break
|
||||||
|
case 'AssemblyTaskAssignment': // 装配任务分配
|
||||||
|
document.getElementById('app-main').style.width = '1680px'
|
||||||
|
document.getElementsByClassName('tags-view-wrapper')[0].style.minWidth = '1680px'
|
||||||
|
document.getElementsByClassName('navbar')[0].style.minWidth = '1680px'
|
||||||
|
break
|
||||||
default:
|
default:
|
||||||
document.getElementById('app-main').style.width = '1380px'
|
document.getElementById('app-main').style.width = '1380px'
|
||||||
document.getElementsByClassName('tags-view-wrapper')[0].style.minWidth = '1380px'
|
document.getElementsByClassName('tags-view-wrapper')[0].style.minWidth = '1380px'
|
||||||
|
|||||||
Reference in New Issue
Block a user