项目计划管理
This commit is contained in:
49
src/api/ManufacturingCenter/ProjectPlanningQuery.js
Normal file
49
src/api/ManufacturingCenter/ProjectPlanningQuery.js
Normal file
@@ -0,0 +1,49 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 初始化 项目名称
|
||||
export function initProject() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询机床
|
||||
export function initMachine(projectNum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_机床名称_查询数据2',
|
||||
param: `项目流水号=${projectNum}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询总计划
|
||||
export function searchtable(projectNum, machineValue) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '项目计划管理_项目总计划_查询数据',
|
||||
param: '项目流水号_check=1&项目流水号=' + projectNum + '&机床流水号_check=1&机床流水号=' + machineValue
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询分计划
|
||||
export function searchtable2(machineValue, type) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '项目计划管理_项目详细计划_查询数据',
|
||||
param: '机床流水号=' + machineValue + '&计划类型=' + type
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -117,6 +117,30 @@ export function getGroupData(machine) {
|
||||
})
|
||||
}
|
||||
|
||||
export function editGroupData(num, num1, num2, num3, num4, num5) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: 'PDM_装箱单_部件_编辑数据',
|
||||
param: `部件编号=${num}&代号=${num1}&名称=${num2}&规格=${num3}&数量=${num4}&备注=${num5}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteGroupData(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: 'PDM_装箱单_部件_删除数据',
|
||||
param: `部件编号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function machineSelect(projectValue) {
|
||||
return request({
|
||||
url: '',
|
||||
@@ -177,14 +201,14 @@ export function addFileData(name, number, remark, num) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getSpareData(num) {
|
||||
export function getSpareData(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_装箱单_备件_查询数据',
|
||||
param: `项目流水号=${num}&机床流水号=${num}`
|
||||
param: `项目流水号=${num}&机床流水号=${num1}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
376
src/views/ManufacturingCenter/ProjectPlanningQuery/index.vue
Normal file
376
src/views/ManufacturingCenter/ProjectPlanningQuery/index.vue
Normal file
@@ -0,0 +1,376 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称</span>
|
||||
<el-select v-model="projectValue" placeholder="请选择项目名称" filterable size="small" @change="searchMachine">
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
|
||||
<span>机床图号</span>
|
||||
<el-select v-model="machineValue" placeholder="请选择机床图号" filterable size="small">
|
||||
<el-option
|
||||
v-for="item in machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
|
||||
<!--<span>签订日期:</span>-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="startTime"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--size="small"-->
|
||||
<!--style="width: 160px"-->
|
||||
<!--type="date"-->
|
||||
<!--placeholder="选择日期"/>-->
|
||||
<!--<span class="demonstration">~</span>-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="endTime"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--size="small"-->
|
||||
<!--style="width: 160px"-->
|
||||
<!--type="date"-->
|
||||
<!--placeholder="选择日期"/>-->
|
||||
|
||||
<!--<span>交货期:</span>-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="startTime1"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--size="small"-->
|
||||
<!--style="width: 160px"-->
|
||||
<!--type="date"-->
|
||||
<!--placeholder="选择日期"/>-->
|
||||
<!--<span class="demonstration">~</span>-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="endTime1"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--size="small"-->
|
||||
<!--style="width: 160px"-->
|
||||
<!--type="date"-->
|
||||
<!--placeholder="选择日期"/>-->
|
||||
|
||||
<el-button icon="el-icon-search" type="success" size="small" style="margin-left: 20px" @click="searchTable()">查询</el-button>
|
||||
<el-table v-loading="loading" :data="tableData" size="mini" highlight-current-row style="width: 100%; margin-top: 30px" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="项目名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床型号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同签订日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发货节点 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<div class="word">设计</div>
|
||||
<el-table v-loading="loading1" :data="tableData1" size="mini" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="组号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.任务名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开始时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.完成时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div class="word">采购</div>
|
||||
<el-table v-loading="loading1" :data="tableData2" size="mini" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="组号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.任务名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开始时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.完成时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div class="word">备料</div>
|
||||
<el-table v-loading="loading1" :data="tableData3" size="mini" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="组号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.任务名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开始时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.完成时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div class="word">制造</div>
|
||||
<el-table v-loading="loading1" :data="tableData4" size="mini" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="组号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.任务名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开始时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.完成时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div class="word">装配调试</div>
|
||||
<el-table v-loading="loading1" :data="tableData5" size="mini" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="组号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.任务名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开始时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成时间" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.完成时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { initProject, initMachine, searchtable, searchtable2 } from '@/api/ManufacturingCenter/ProjectPlanningQuery'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
machineValue: '',
|
||||
machine: [],
|
||||
loading: false,
|
||||
loading1: false,
|
||||
tableData: [], // 表格数据
|
||||
tableData1: [], // 表格数据
|
||||
tableData2: [], // 表格数据
|
||||
tableData3: [], // 表格数据
|
||||
tableData4: [], // 表格数据
|
||||
tableData5: [] // 表格数据
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
},
|
||||
searchMachine() {
|
||||
this.machine = []
|
||||
initMachine(this.projectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询表格数据
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.tableData = []
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
this.tableData3 = []
|
||||
this.tableData4 = []
|
||||
this.tableData5 = []
|
||||
if (this.projectValue !== '') {
|
||||
if (this.machineValue !== '') {
|
||||
searchtable(this.projectValue, this.machineValue).then(response => {
|
||||
this.loading = false
|
||||
this.tableData = response.data
|
||||
}).then(() => {
|
||||
searchtable2(this.machineValue, 1).then(response => {
|
||||
this.loading1 = false
|
||||
console.log(response.data, 2)
|
||||
this.tableData1 = response.data
|
||||
})
|
||||
searchtable2(this.machineValue, 2).then(response => {
|
||||
this.loading1 = false
|
||||
console.log(response.data, 3)
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
searchtable2(this.machineValue, 3).then(response => {
|
||||
this.loading1 = false
|
||||
console.log(response.data, 4)
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
searchtable2(this.machineValue, 4).then(response => {
|
||||
this.loading1 = false
|
||||
console.log(response.data, 5)
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
searchtable2(this.machineValue, 5).then(response => {
|
||||
this.loading1 = false
|
||||
console.log(response.data, 6)
|
||||
this.tableData5 = response.data
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择机床')
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请选择项目')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.word{
|
||||
font-size: 20px;
|
||||
margin-bottom: 20px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-circle-plus-outline" @click="addReceipt">增加</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" @click="addReceipt">增加</el-button>
|
||||
<el-button type="warning" size="small" icon="el-icon-download" @click="exportTable()">导出</el-button>
|
||||
<div class="title">总装箱单</div>
|
||||
<el-table
|
||||
@@ -17,7 +17,8 @@
|
||||
:data="receiptData"
|
||||
border
|
||||
size="mini"
|
||||
style="margin-top:20px">
|
||||
style="margin-top:20px"
|
||||
@row-click="searchTable">
|
||||
<el-table-column
|
||||
label="装箱单号"
|
||||
align="center"
|
||||
@@ -417,7 +418,7 @@
|
||||
<el-button v-else-if="spareTitle==='编辑备件'" type="primary" @click="submitEditSpare">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<div v-show="false" id="cjn">
|
||||
<div v-show="true" id="cjn">
|
||||
<!--封面-->
|
||||
<table class="tg" style="width: 900px">
|
||||
<colgroup>
|
||||
@@ -597,6 +598,7 @@ export default {
|
||||
receiptVisible: false,
|
||||
machineTitle: '',
|
||||
machineVisible: false,
|
||||
GroupDataVisible: false,
|
||||
spareVisible: false,
|
||||
spareTitle: '',
|
||||
spareForm: {
|
||||
@@ -621,6 +623,18 @@ export default {
|
||||
联系人: '',
|
||||
联系方式: ''
|
||||
},
|
||||
GroupDataForm: {
|
||||
部件编号: '',
|
||||
代号: '',
|
||||
名称: '',
|
||||
规格: '',
|
||||
备注: '',
|
||||
数量: ''
|
||||
},
|
||||
GroupDataRule: {
|
||||
名称: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
||||
数量: [{ required: true, message: '请输入数量', trigger: 'blur' }]
|
||||
},
|
||||
receiptRules: {
|
||||
装箱单号: [{ required: true, message: '请输入装箱单号', trigger: 'blur' }],
|
||||
名称: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
||||
@@ -678,6 +692,8 @@ export default {
|
||||
this.receiptData = []
|
||||
this.spareData = []
|
||||
this.fileData = []
|
||||
this.receiptNum = 0
|
||||
this.receiptName = ''
|
||||
if (val) {
|
||||
this.getMachineSelect(val)
|
||||
}
|
||||
@@ -686,13 +702,12 @@ export default {
|
||||
receiptNum(val) {
|
||||
if (val !== 0) {
|
||||
this.getMachineData()
|
||||
this.getFileData()
|
||||
this.getSpareData()
|
||||
}
|
||||
},
|
||||
machine(val) {
|
||||
machineTableData(val) {
|
||||
if (val.length > 0) {
|
||||
this.machineValue = val[0].value
|
||||
this.getFileData()
|
||||
this.getSpareData()
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -712,12 +727,12 @@ export default {
|
||||
const response = await getReciptData(this.projectValue)
|
||||
const data = response.data
|
||||
if (data.length > 0) {
|
||||
this.receiptNum = data[0].装箱单编号
|
||||
this.receiptName = data[0].装箱单号
|
||||
// this.receiptNum = data[0].装箱单编号
|
||||
// this.receiptName = data[0].装箱单号
|
||||
this.receiptData = data
|
||||
} else {
|
||||
this.receiptNum = 0
|
||||
this.receiptName = ''
|
||||
// this.receiptNum = 0
|
||||
// this.receiptName = ''
|
||||
}
|
||||
},
|
||||
addReceipt() {
|
||||
@@ -733,6 +748,8 @@ export default {
|
||||
submitAddReceipt() {
|
||||
this.addTable(insertReciptData, [this.receiptForm.装箱单号, this.receiptForm.发货节点, this.receiptForm.名称, this.receiptForm.收货单位, this.receiptForm.联系方式, this.receiptForm.联系人, this.projectValue], 'receiptForm', function() {
|
||||
this.receiptVisible = false
|
||||
this.receiptNum = 0
|
||||
this.receiptName = ''
|
||||
this.getReceipt()
|
||||
})
|
||||
},
|
||||
@@ -745,6 +762,8 @@ export default {
|
||||
submitEditReceipt() {
|
||||
this.editTable(updateReciptData, [this.receiptForm.装箱单号, this.receiptForm.发货节点, this.receiptForm.名称, this.receiptForm.收货单位, this.receiptForm.联系方式, this.receiptForm.联系人, this.receiptNum], 'receiptForm', function() {
|
||||
this.receiptVisible = false
|
||||
this.receiptNum = 0
|
||||
this.receiptName = ''
|
||||
this.getReceipt()
|
||||
})
|
||||
},
|
||||
@@ -761,11 +780,24 @@ export default {
|
||||
this.fileVisible = false
|
||||
this.spareVisible = false
|
||||
},
|
||||
searchTable(row) {
|
||||
console.log(row)
|
||||
this.receiptNum = row.装箱单编号
|
||||
this.receiptName = row.装箱单号
|
||||
},
|
||||
async getMachineData() {
|
||||
this.machineTableData = []
|
||||
const response = await getMachineData(this.receiptNum)
|
||||
const data = response.data
|
||||
console.log(data, 1111)
|
||||
console.log(data, 111)
|
||||
if (data.length === 0) {
|
||||
this.machineValue = ''
|
||||
this.spareData = []
|
||||
this.fileData = []
|
||||
} else {
|
||||
this.machineValue = data[0].机床号
|
||||
}
|
||||
console.log(this.machineValue, 222)
|
||||
this.groupData = []
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const resp = await getGroupData(data[i].机床号)
|
||||
@@ -782,7 +814,6 @@ export default {
|
||||
数量: data[i].数量,
|
||||
备注: data[i].备注
|
||||
})
|
||||
console.log(this.groupData, 11112)
|
||||
}
|
||||
},
|
||||
addMachine() {
|
||||
@@ -824,6 +855,24 @@ export default {
|
||||
this.getMachineData()
|
||||
})
|
||||
},
|
||||
// editGroupData(row) {
|
||||
// console.log(row)
|
||||
// this.editForm(row, 'GroupDataForm', function() {
|
||||
// this.GroupDataVisible = true
|
||||
// })
|
||||
// },
|
||||
// async submitEditGroupData() {
|
||||
// console.log(this.GroupDataForm.部件编号, this.GroupDataForm.代号, this.GroupDataForm.名称, this.GroupDataForm.规格, this.GroupDataForm.数量, this.GroupDataForm.备注)
|
||||
// editGroupData(this.GroupDataForm.部件编号, this.GroupDataForm.代号, this.GroupDataForm.名称, this.GroupDataForm.规格, this.GroupDataForm.数量, this.GroupDataForm.备注).then(response => {
|
||||
// if (response.data[0].result === '1') {
|
||||
// this.$message.success('编辑成功')
|
||||
// this.GroupDataVisible = false
|
||||
// this.getMachineData()
|
||||
// } else {
|
||||
// this.$message.error('编辑失败')
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
async getFileData() {
|
||||
const response = await getFileData(this.receiptNum)
|
||||
this.fileData = response.data
|
||||
@@ -858,6 +907,7 @@ export default {
|
||||
})
|
||||
},
|
||||
async getSpareData() {
|
||||
console.log(this.machineValue, 333)
|
||||
const response = await getSpareData(this.projectValue, this.machineValue)
|
||||
console.log(response)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
@@ -910,7 +960,7 @@ export default {
|
||||
},
|
||||
exportTable() {
|
||||
const htmlNode = $('#cjn').html()
|
||||
const body = $('body').attr('style', 'padding: 20px;margin: 0 auto;display: block;width: 800px;background: #fff;')
|
||||
const body = $('body').attr('style', 'padding: 20px;margin: 0 auto;display: block;width: 950px;background: #fff;')
|
||||
body.children().hide()
|
||||
const printNode = $(htmlNode)
|
||||
body.append(printNode)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button :disabled="disabled" type="primary" icon="el-icon-d-caret" size="small" style="margin-left: 10px" @click="transferData">传递</el-button>
|
||||
<el-button :loading="listLoading" :disabled="disabled" type="primary" icon="el-icon-d-caret" size="small" style="margin-left: 10px" @click="transferData">传递</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button :disabled="disabled" type="primary" icon="el-icon-d-caret" size="small" style="margin-left: 10px" @click="transferData">传递</el-button>
|
||||
<el-button :loading="listLoading" :disabled="disabled" type="primary" icon="el-icon-d-caret" size="small" style="margin-left: 10px" @click="transferData">传递</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" size="small" @click="allDelete">一键删除</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -92,20 +92,20 @@
|
||||
{{ scope.row.分类码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="操作" fixed="right" align="center" width="200">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-button-->
|
||||
<!--size="mini"-->
|
||||
<!--type="primary"-->
|
||||
<!--icon="el-icon-edit"-->
|
||||
<!--@click="handleEdit(scope.row)">编辑</el-button>-->
|
||||
<!--<el-button-->
|
||||
<!--size="mini"-->
|
||||
<!--type="danger"-->
|
||||
<!--icon="el-icon-delete"-->
|
||||
<!--@click="handleDelete(scope.row)">删除</el-button>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
@@ -389,6 +389,7 @@ export default {
|
||||
},
|
||||
async fetchData() {
|
||||
this.pageCurrent = 1
|
||||
this.tableData10 = []
|
||||
try {
|
||||
this.listLoading = true
|
||||
this.total = 0
|
||||
@@ -436,6 +437,7 @@ export default {
|
||||
allDelete(this.projectName, this.machineValue, this.groupValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.tableData = []
|
||||
this.tableData10 = []
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
@@ -575,6 +577,7 @@ export default {
|
||||
this.$message.success(`传递成功`)
|
||||
this.tableDataAll = []
|
||||
this.tableData = []
|
||||
this.tableData10 = []
|
||||
} else {
|
||||
this.$message.error(`${this.err}个零件传递失败`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user