cxy
This commit is contained in:
@@ -137,7 +137,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button style="margin-left: 120px;margin-top: 20px" @click="dialogFormVisible = false">取消</el-button>
|
||||
<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
|
||||
<el-button :disabled="staffNum===''" type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="计划完成日期">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目计划完成时间 }}
|
||||
{{ scope.row.发货节点 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="客户名称">
|
||||
@@ -144,9 +144,9 @@ export default {
|
||||
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchTable(this.check, this.projectValue, this.check1, this.machineNumberValue, this.check2, this.startEndDate[0], this.startEndDate[1], this.pageCurrent, this.pageSize).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
console.log(response.data.rows[i].项目计划完成时间)
|
||||
if (response.data.rows[i].项目计划完成时间 !== '') {
|
||||
response.data.rows[i].项目计划完成时间 = (response.data.rows[i].项目计划完成时间).split(' ')[0]
|
||||
console.log(response.data.rows[i].发货节点)
|
||||
if (response.data.rows[i].发货节点 !== '') {
|
||||
response.data.rows[i].发货节点 = (response.data.rows[i].发货节点).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="典型工艺机床分类">
|
||||
<el-select v-model="machineTypeValue" placeholder="机床分类" size="small" style="width:150px">
|
||||
<el-select v-model="machineTypeValue" placeholder="机床分类" size="small" style="width:150px" @change="SearchMachine">
|
||||
<el-option
|
||||
v-for="item in machineType"
|
||||
:key="item.value"
|
||||
@@ -783,6 +783,8 @@ export default {
|
||||
this.dataAll = []
|
||||
} else { this.$message.error('保存失败') }
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请勾选是否核准')
|
||||
}
|
||||
},
|
||||
upOne(row) {
|
||||
|
||||
@@ -99,9 +99,9 @@
|
||||
<td colspan="6">{{ list.工艺内容及装配具体要求 }}</td>
|
||||
<td align="center">{{ list.质检 }}</td>
|
||||
<td>{{ list.工时 }}</td>
|
||||
<td>{{ list.装配员 }}</td>
|
||||
<td>{{ list.检验员 }}</td>
|
||||
<td width="100px">{{ list.备注 }}</td>
|
||||
<td/>
|
||||
<td/>
|
||||
<td width="100px"/>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
305
src/views/BasicData/EquipmentCapabilitySetting/index.vue
Normal file
305
src/views/BasicData/EquipmentCapabilitySetting/index.vue
Normal file
@@ -0,0 +1,305 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<span>设备名称:</span>
|
||||
<el-input v-model="equipmentName" clearable size="small" style="width:200px;margin:10px;"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" @click="pageCurrent=1;pageSize=10;searchTable()">查询</el-button>
|
||||
<el-button type="primary" class="el-icon-circle-plus-outline" size="small" @click="handleAdd('form');param = 0">新增</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border highlight-current-row>
|
||||
<el-table-column
|
||||
label=" "
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="设备名称" align="center" width="280px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备编号" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备型号" align="center" width="280px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备性能指标" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备性能指标 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备工时系数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备加工工艺" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺属性 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="班次类型" align="center" width="110px">
|
||||
<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" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备预留工时系数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="handleEdit(scope.row);param = 1">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
class="el-icon-delete"
|
||||
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading"
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="800px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm" style="margin: auto">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备名称" prop="设备名称">
|
||||
<el-input v-model="form.设备名称" placeholder="设备名称" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备型号" prop="设备型号">
|
||||
<el-input v-model="form.设备型号" placeholder="设备型号" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性能指标" prop="设备性能指标">
|
||||
<el-input v-model="form.设备性能指标" placeholder="性能指标" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="加工能力" prop="设备加工能力工时">
|
||||
<el-input v-model="form.设备加工能力工时" placeholder="加工能力" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="整改工时系数" prop="整改工时比例">
|
||||
<el-input v-model="form.整改工时比例" placeholder="设备整改工时系数" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备编号" prop="设备编号">
|
||||
<el-input v-model="form.设备编号" placeholder="设备编号" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工艺" prop="工艺属性代码">
|
||||
<el-select v-model="form.工艺属性代码" filterable size="small" style="width:230px;">
|
||||
<el-option
|
||||
v-for="item in Technology"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="班次类型" prop="班次类型">
|
||||
<el-select v-model="form.班次类型" filterable size="small" style="width:230px;">
|
||||
<el-option
|
||||
v-for="item in ClassType"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工时系数" prop="设备工时系数">
|
||||
<el-input v-model="form.设备工时系数" placeholder="工时系数" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预留工时系数" prop="设备预留工时系数">
|
||||
<el-input v-model="form.设备预留工时系数" placeholder="设备预留工时系数" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff()">取消</el-button>
|
||||
<el-button v-show="title==='增加'" type="primary" @click="submitAdd()">确定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getTechnology, searchtable, edittype, handlechange, handledelete } from '@/api/BasicData/EquipmentCapabilitySetting'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
equipmentNum: '',
|
||||
num1: '',
|
||||
equipmentName: '',
|
||||
loading: false,
|
||||
tableData: [], // 表格数据
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
total: 0,
|
||||
dialogFormVisible: false,
|
||||
title: '',
|
||||
Technology: [],
|
||||
ClassType: [{
|
||||
value: 0,
|
||||
label: 0
|
||||
}, {
|
||||
value: 1,
|
||||
label: 1
|
||||
}, {
|
||||
value: 2,
|
||||
label: 2
|
||||
}, {
|
||||
value: 3,
|
||||
label: 3
|
||||
}, {
|
||||
value: 4,
|
||||
label: 4
|
||||
}],
|
||||
form: {
|
||||
设备名称: '', // 设备名称
|
||||
设备型号: '', // 设备型号
|
||||
设备性能指标: '', // 性能指标
|
||||
设备加工能力工时: '', // 加工能力
|
||||
整改工时比例: '', // 设备整改工时指数
|
||||
设备编号: '', // 设备编号
|
||||
工艺属性代码: '', // 工艺
|
||||
班次类型: '', // 班次类型
|
||||
设备工时系数: '', // 工时系数
|
||||
设备预留工时系数: '' // 设备预留工时系数
|
||||
},
|
||||
rules: {
|
||||
设备名称: [{ required: true, message: '请输入设备名称', trigger: 'blur' }],
|
||||
设备型号: [{ required: true, message: '请输入设备型号', trigger: 'blur' }],
|
||||
设备性能指标: [{ required: true, message: '请输入性能指标', trigger: 'blur' }],
|
||||
设备加工能力工时: [{ required: true, message: '请输入加工能力', trigger: 'blur' }],
|
||||
整改工时比例: [{ required: true, message: '请输入设备整改工时指数', trigger: 'blur' }],
|
||||
设备编号: [{ required: true, message: '请输入设备编号', trigger: 'blur' }],
|
||||
工艺属性代码: [{ required: true, message: '请选择工艺', trigger: 'change' }],
|
||||
班次类型: [{ required: true, message: '请选择班次类型', trigger: 'change' }],
|
||||
设备工时系数: [{ required: true, message: '请输入工时系数', trigger: 'blur' }],
|
||||
设备预留工时系数: [{ required: true, message: '请输入设备预留工时系数', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
// 初始化获取工艺
|
||||
fetchData() {
|
||||
this.getSelect(getTechnology, ['工艺名称', '工艺编号'], 'Technology')
|
||||
},
|
||||
// 查询
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.equipmentName ? this.num1 = 1 : this.num1 = 0
|
||||
this.getTable(searchtable, [this.pageCurrent, this.pageSize, this.num1, this.equipmentName], ['tableData', 'total', 'loading'])
|
||||
},
|
||||
// 点击增加
|
||||
handleAdd() {
|
||||
this.dialogFormVisible = true
|
||||
this.title = '增加'
|
||||
this.addForm('form')
|
||||
},
|
||||
// 增加确定
|
||||
submitAdd() {
|
||||
this.addTable(edittype, [this.form.设备名称, this.form.设备型号, this.form.设备性能指标, this.form.设备工时系数, this.form.工艺属性代码, this.form.班次类型, this.form.设备加工能力工时, this.form.整改工时比例, this.form.设备编号, this.form.设备预留工时系数], 'form', function() { this.searchTable(); this.dialogFormVisible = false })
|
||||
},
|
||||
// 编辑打开
|
||||
handleEdit(row) {
|
||||
this.dialogFormVisible = true
|
||||
this.title = '编辑'
|
||||
this.equipmentNum = row.设备流水号
|
||||
this.editForm(row, 'form')
|
||||
},
|
||||
// 编辑确定
|
||||
submitEdit() {
|
||||
this.editTable(handlechange, [this.equipmentNum, this.form.设备名称, this.form.设备型号, this.form.设备性能指标, this.form.设备工时系数, this.form.工艺属性代码, this.form.班次类型, this.form.设备加工能力工时, this.form.整改工时比例, this.form.设备编号, this.form.设备预留工时系数], 'form', function() { this.searchTable(); this.dialogFormVisible = false })
|
||||
},
|
||||
// 重置表单
|
||||
callOff() {
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
// 删除
|
||||
handleDelete(index, row) {
|
||||
this.deleteRow(handledelete, row.设备流水号, function() { this.searchTable() })
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-input{
|
||||
width: 200px!important;
|
||||
}
|
||||
</style>
|
||||
251
src/views/BasicData/MaintenanceEquipmentPerson/index.vue
Normal file
251
src/views/BasicData/MaintenanceEquipmentPerson/index.vue
Normal file
@@ -0,0 +1,251 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>设备名称:</span>
|
||||
<el-select v-model="equipmentNameValue" placeholder="设备名称" style="width:200px" size="small" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in equipmentName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>操作者:</span>
|
||||
<el-input v-model="operator" placeholder="操作者" size="small" clearable style="width:200px" @dblclick.native="getOperator();param = 0"/>
|
||||
<el-button type="success" size="mini" icon="el-icon-search" style="margin-left:10px" @click="getTableData">查询</el-button>
|
||||
<el-button type="primary" size="mini" icon="el-icon-circle-plus-outline" @click="handleAdd">增加</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" highlight-current-row border style="height: 500px">
|
||||
<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">
|
||||
<el-button type="primary" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button type="danger" size="mini" 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
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="选择人员" center style="min-height: 300px">
|
||||
<span>部门名称:</span>
|
||||
<el-select v-model="departmentValue" placeholder="部门名称" size="small" clearable style="width:180px" @change="getTablePeople">
|
||||
<el-option
|
||||
v-for="item in department"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-table
|
||||
:data="tablePeople"
|
||||
style="width:100%;max-height: 300px;margin-top: 20px"
|
||||
height="300"
|
||||
highlight-current-row
|
||||
@row-click="currentPeople">
|
||||
<el-table-column align="center" label="考勤编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.考勤编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="姓名">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="性别">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.性别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="工作岗位">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.岗位名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dialogFormVisible = false">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible_form" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="设备名称" prop="设备名称">
|
||||
<el-select v-model="form.设备流水号" placeholder="设备名称" style="width:200px" size="small" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in equipmentName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="班次" prop="班次" >
|
||||
<el-select v-model="form.班次" placeholder="班次" style="width:200px" size="small" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in staff"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作者" prop="操作者" >
|
||||
<el-input v-model="form.操作者" placeholder="操作者" size="small" style="width:200px" clearable @dblclick.native="getOperator();param = 1"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel">取消</el-button>
|
||||
<el-button v-show="title === '增加'" type="primary" @click="submitAdd()">确定</el-button>
|
||||
<el-button v-show="title === '编辑'" type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getEquipment, getDepartment, getTablePeople, getTableData, deleteTable, getStaff, addTable, editTable } from '@/api/BasicData/MaintenanceEquipmentPerson'
|
||||
import { SectionToChinese } from '@/utils/tool'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
equipmentNameValue: '',
|
||||
equipmentNameCheck: null,
|
||||
equipmentName: [],
|
||||
operator: '',
|
||||
operatorNum: '',
|
||||
operatorCheck: null,
|
||||
dialogFormVisible: false,
|
||||
tablePeople: [],
|
||||
departmentValue: '',
|
||||
department: [],
|
||||
tableData: [],
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
loading: false,
|
||||
title: '',
|
||||
dialogFormVisible_form: false,
|
||||
param: null,
|
||||
form: {
|
||||
设备名称: '',
|
||||
设备流水号: null,
|
||||
班次: '',
|
||||
班次代码: '',
|
||||
操作者: '',
|
||||
操作者编号: null
|
||||
},
|
||||
rules: {
|
||||
设备名称: [{ required: true, message: '请选择设备名称', trigger: 'blur' }],
|
||||
操作者: [{ required: true, message: '请选择操作者', change: 'blur' }]
|
||||
},
|
||||
staff: [],
|
||||
No: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.getTableData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(getEquipment, ['设备名称', '设备流水号'], 'equipmentName', [0, this.equipmentNameValue]) // 获取设备名称
|
||||
getStaff().then(res => { // 获取班次
|
||||
res.data.map(row => {
|
||||
this.staff.push({
|
||||
label: `${SectionToChinese(row.班次代码)}班`,
|
||||
value: row.班次代码
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
getOperator() {
|
||||
this.dialogFormVisible = true
|
||||
this.getSelect(getDepartment, ['部门', '考核部门编号'], 'department')
|
||||
},
|
||||
getTablePeople() {
|
||||
this.getData(getTablePeople, 'tablePeople', this.departmentValue)
|
||||
},
|
||||
currentPeople(row) {
|
||||
if (this.param === 0) {
|
||||
this.operator = row.姓名
|
||||
this.operatorNum = row.人员编号
|
||||
} else if (this.param === 1) {
|
||||
this.form.操作者 = row.姓名
|
||||
this.form.操作者编号 = row.人员编号
|
||||
} else {
|
||||
console.log(`err`)
|
||||
}
|
||||
},
|
||||
getTableData() {
|
||||
console.log(typeof (this.equipmentName))
|
||||
this.equipmentNameValue ? this.equipmentNameCheck = 1 : this.equipmentNameCheck = 0
|
||||
this.operator ? this.operatorCheck = 1 : this.operatorCheck = 0
|
||||
this.loading = true
|
||||
this.getTable(getTableData, [this.equipmentNameCheck, this.equipmentNameValue, this.operatorCheck, this.operatorNum, this.pageCurrent, this.pageSize], ['tableData', 'total', 'loading'])
|
||||
},
|
||||
handleAdd() {
|
||||
this.addForm('form', [this.dialogFormVisible_form = true, this.title = '增加'])
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.No = row.设备人员关系流水号
|
||||
this.editForm(row, 'form', [this.dialogFormVisible_form = true, this.title = '编辑'])
|
||||
},
|
||||
submitAdd() {
|
||||
for (let i = 0; i < this.equipmentName.length; i++) {
|
||||
if (this.form.设备流水号 === this.equipmentName[i].value) {
|
||||
this.form.设备名称 = this.equipmentName[i].label
|
||||
break
|
||||
}
|
||||
}
|
||||
this.addTable(addTable, [this.form.设备流水号, this.form.设备名称, this.form.班次, this.form.操作者, this.form.操作者编号], 'form', function() { this.getTableData(); this.dialogFormVisible_form = false })
|
||||
},
|
||||
submitEdit() {
|
||||
this.editTable(editTable, [this.form.设备名称, this.form.设备流水号, this.form.班次代码, this.form.操作者, this.form.操作者编号, this.No], 'form', function() { this.getTableData(); this.dialogFormVisible_form = false })
|
||||
},
|
||||
cancel() {
|
||||
this.dialogFormVisible_form = false
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.deleteRow(deleteTable, row.设备人员关系流水号, function() { this.getTableData() })
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.getTableData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 20px;
|
||||
}
|
||||
</style>
|
||||
199
src/views/BasicData/MaterialMaintenance/index.vue
Normal file
199
src/views/BasicData/MaterialMaintenance/index.vue
Normal file
@@ -0,0 +1,199 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>材料名称:</span>
|
||||
<el-input v-model="Material" placeholder="请输材料名称" size="small" style="width:200px" clearable/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="pageCurrent = 1;pageSize = 10;featchMaterial()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="add()">增加</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
height="580"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="材料名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="变更日期">
|
||||
<template slot-scope="scope">
|
||||
{{ 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="Edit(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="delMaterial(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="新增材料" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
|
||||
<el-form-item label="材料名称" prop="MaterialName" style="display: inline-block">
|
||||
<el-input v-model="form.MaterialName" clearable size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="callOff()">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="addMaterial('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="编辑材料" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left" label-width="110px">
|
||||
<el-form-item label="材料名称" prop="MaterialName2" style="display: inline-block">
|
||||
<el-input v-model="form2.MaterialName2" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="callOff()">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="editMaterial('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { featchMaterial, addMaterial, delMaterial, editMaterial } from '@/api/BasicData/Materialmaintenance'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ID: '',
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible2: false,
|
||||
tableData: [],
|
||||
Material: '', // 材质名称
|
||||
listLoading: false,
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: null,
|
||||
form: {
|
||||
MaterialName: ''
|
||||
},
|
||||
form2: {
|
||||
MaterialName2: ''
|
||||
},
|
||||
rules: {
|
||||
MaterialName: [{ required: true, message: '请输入材料名称', trigger: 'blur' }],
|
||||
MaterialName2: [{ required: true, message: '请输入材料名称', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.featchMaterial()
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.featchMaterial()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.featchMaterial()
|
||||
},
|
||||
featchMaterial() {
|
||||
featchMaterial(this.Material, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
callOff() {
|
||||
this.dialogFormVisible = false
|
||||
this.dialogFormVisible2 = false
|
||||
},
|
||||
add() {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.form.MaterialName = ''
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
addMaterial(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addMaterial(this.form.MaterialName).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
this.dialogFormVisible = false
|
||||
this.form = {}
|
||||
this.featchMaterial()
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
this.form = {}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
delMaterial(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delMaterial(row.材料流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.form.MaterialName = ''
|
||||
this.featchMaterial()
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
Edit(row) {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible2 = true
|
||||
this.form2.MaterialName2 = row.材料
|
||||
this.ID = row.材料流水号
|
||||
},
|
||||
editMaterial(form2) {
|
||||
this.$refs[form2].validate((valid) => {
|
||||
if (valid) {
|
||||
this.dialogFormVisible2 = false
|
||||
editMaterial(this.ID, this.form2.MaterialName2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.featchMaterial()
|
||||
this.$message.success('编辑成功')
|
||||
this.form = {}
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
this.form = {}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -537,13 +537,8 @@ export default {
|
||||
}
|
||||
},
|
||||
addPeople() {
|
||||
this.people_title = '新增人员'
|
||||
this.people_DFV = true
|
||||
this.addForm('people_form')
|
||||
},
|
||||
submitAddPeople() {
|
||||
this.people_DFV = false
|
||||
if (this.id) {
|
||||
<<<<<<< HEAD
|
||||
addPeople(this.id, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.i = 1
|
||||
@@ -553,10 +548,27 @@ export default {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
})
|
||||
=======
|
||||
this.people_title = '新增人员'
|
||||
this.people_DFV = true
|
||||
this.addForm('people_form')
|
||||
>>>>>>> 7cdb10d153358b72f95165dd7f3a12ad7675f14d
|
||||
} else {
|
||||
this.$message.warning(`请选择部门名称`)
|
||||
}
|
||||
},
|
||||
submitAddPeople() {
|
||||
this.people_DFV = false
|
||||
addPeople(this.id, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.i = 1
|
||||
this.handleNodeClick()
|
||||
this.$message.success('添加成功')
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleEditPeople(row) {
|
||||
this.people_title = '编辑人员'
|
||||
this.people_DFV = true
|
||||
|
||||
218
src/views/BasicData/SystemRrolemaintenance/index.vue
Normal file
218
src/views/BasicData/SystemRrolemaintenance/index.vue
Normal file
@@ -0,0 +1,218 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>角色功能:</span>
|
||||
<el-input v-model="RoleFunctioning" size="small" clearable style="width:200px"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="pageCurrent=1;pageSize = 10;searchData()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">增加</el-button>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 15px">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="角色编号" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.角色编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="角色功能">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.角色功能 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作日期">
|
||||
<template slot-scope="scope">
|
||||
{{ 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>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="新增角色" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
|
||||
<el-form-item label="角色名称" prop="角色功能" style="display: inline-block">
|
||||
<el-input
|
||||
v-model="form.角色功能"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="角色功能"
|
||||
style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogFormVisible1 = false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitAdd1('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="编辑角色" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px">
|
||||
<el-form-item label="角色名称" prop="角色功能" style="display: inline-block">
|
||||
<el-input
|
||||
v-model="form2.角色功能"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="角色功能"
|
||||
style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogFormVisible2 = false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitAdd2('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { InitRolefunction, deleteData, searchTable, addData, addData2 } from '@/api/BasicData/SystemRrolemaintenance'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
RoleFunctioning: '',
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: null,
|
||||
loading: false,
|
||||
tableData: [],
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
name: '',
|
||||
num: '', // 角色编号
|
||||
form: {
|
||||
角色功能: ''
|
||||
},
|
||||
form2: {
|
||||
角色功能: ''
|
||||
},
|
||||
rules: {
|
||||
角色功能: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
|
||||
},
|
||||
rules2: {
|
||||
角色功能: [{ required: true, message: '请输入角色名称', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
InitRolefunction(this.pageCurrent, this.pageSize).then(response => { // 初始化
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
searchData() {
|
||||
this.loading = true
|
||||
searchTable(this.RoleFunctioning, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
console.log(response.data)
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.fetchData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.fetchData()
|
||||
},
|
||||
handleEdit(row) {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible2 = true
|
||||
this.form2.角色功能 = row.角色功能
|
||||
this.num = row.角色编号
|
||||
},
|
||||
submitAdd2(formName) { // 编辑角色功能
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addData2(this.form2.角色功能, this.num).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.fetchData()
|
||||
this.dialogFormVisible2 = false
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
submitAdd1(formName) { // 增加角色功能
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addData(this.form.角色功能).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.form.角色功能 = ''
|
||||
this.fetchData()
|
||||
this.dialogFormVisible1 = false
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible1 = true
|
||||
},
|
||||
handleDelete(row) { // 删除
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteData(row.角色编号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
this.fetchData()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
399
src/views/BasicData/WorkshopPersonnelRoleMana/index.vue
Normal file
399
src/views/BasicData/WorkshopPersonnelRoleMana/index.vue
Normal file
@@ -0,0 +1,399 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<table style="width: 100%">
|
||||
|
||||
<el-card>
|
||||
<span>员工姓名:</span>
|
||||
<el-input v-model="staffName" placeholder="员工姓名" size="small" clearable style="width:200px"/>
|
||||
<span style="margin-left: 15px">角色名称:</span>
|
||||
<el-select v-model="roleName" placeholder="角色名称" clearable size="small" style="width:200px">
|
||||
<el-option
|
||||
v-for="item in roleNames"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="pageCurrent1=1;searchData()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handelAdd">增加</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table :data="tableData" highlight-current-row>
|
||||
<el-table-column label="员工姓名">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column disabled label="所属部门" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.部门名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="岗位名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.岗位名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="角色名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.角色功能 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="考勤编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.考勤编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="submitEdit(scope.$index, 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
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="10"
|
||||
:total="total1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</table>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="人员信息" center width="750px">
|
||||
<div style="height: 500px">
|
||||
<div style="float: left;margin-top: 10px;margin-left: 20px;overflow-y: scroll;height: 400px">
|
||||
<el-tree
|
||||
:data="data2"
|
||||
node-key="id"
|
||||
style="width: 150px;float: left"
|
||||
height="400"
|
||||
accordion
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
<el-table :data="List1" highlight-current-row height="400" style="width: 400px;float: left;margin-left: 30px" @row-click="handleCurrentChange">
|
||||
<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>
|
||||
</div>
|
||||
<el-button style="margin-left: 260px" @click="dialogFormVisible = false">取消</el-button>
|
||||
<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="增加" center style="min-height: 270px" width="800px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="员工姓名" prop="staffName">
|
||||
<el-input v-model="form1.staffName" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="dialogTableVisible()"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="角色名称" prop="roleName">
|
||||
<el-select v-model="form1.roleName" placeholder="角色名称" size="small" clearable style="width:200px">
|
||||
<el-option
|
||||
v-for="item in roleNames"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="考勤编号" >
|
||||
<el-input
|
||||
v-model="cjscgy"
|
||||
disabled
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属部门" >
|
||||
<el-input v-model="ssks" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOFF">取 消</el-button>
|
||||
<el-button type="primary" @click="submitAdd1()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="编辑" center style="min-height: 270px" width="800px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules1" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="员工姓名" >
|
||||
<el-input v-model="form2.staffName" disabled size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="角色名称" prop="roleName">
|
||||
<el-select v-model="form2.roleName" placeholder="角色名称" clearable size="small" style="width:200px">
|
||||
<el-option
|
||||
v-for="item in roleNames"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="考勤编号" >
|
||||
<el-input
|
||||
v-model="cjscgy"
|
||||
disabled
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item disabled="true" label="所属部门" >
|
||||
<el-input v-model="ssks" disabled size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOFF">取消</el-button>
|
||||
<el-button type="primary" @click="submitAdd2()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { dialogtablevisible, deleteData, getTree, fn, getTable8, initOrderType, addData1, addData2, searchTable } from '@/api/BasicData/WorkshopPersonnelRoleMana'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
number: '',
|
||||
form1: {
|
||||
staffName: '',
|
||||
roleName: ''
|
||||
},
|
||||
form2: {
|
||||
staffName: '',
|
||||
roleName: ''
|
||||
},
|
||||
rules: {
|
||||
staffName: [{ required: true, message: '请选择员工姓名', trigger: 'change' }],
|
||||
roleName: [{ required: true, message: '请选择员工角色', trigger: 'change' }]
|
||||
},
|
||||
rules1: {
|
||||
roleName: [{ required: true, message: '请选择员工角色', trigger: 'change' }]
|
||||
},
|
||||
staffName: '',
|
||||
cjscgy: '',
|
||||
List1: [],
|
||||
ssks: '',
|
||||
data2: [],
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
tableData: [],
|
||||
check1: '',
|
||||
check2: '',
|
||||
name: '', // 中间变量
|
||||
check3: '',
|
||||
check4: '',
|
||||
staffNum: '',
|
||||
personnelNumber: '',
|
||||
personnelStream: '',
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: null,
|
||||
roleName: null,
|
||||
roleNames: [],
|
||||
rybh: '',
|
||||
jsbh: '',
|
||||
dialogFormVisible: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
handelAdd(row) {
|
||||
this.dialogFormVisible1 = true
|
||||
this.ssks = ''
|
||||
this.cjscgy = ''
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
},
|
||||
submitEdit(index, row) {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible2 = true
|
||||
this.personnelStream = row.人员角色流水号
|
||||
this.form2.staffName = row.姓名
|
||||
this.ssks = row.部门名称
|
||||
this.personnelNumber = row.人员编号
|
||||
this.form2.roleName = parseInt(row.角色编号)
|
||||
this.cjscgy = row.考勤编号
|
||||
},
|
||||
callOFF() {
|
||||
this.dialogFormVisible1 = false
|
||||
this.dialogFormVisible2 = false
|
||||
this.ssks = ''
|
||||
this.cjscgy = ''
|
||||
},
|
||||
searchData() {
|
||||
if (this.staffName !== '' && this.staffName !== null) {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
if (this.roleName !== '' && this.roleName !== null) {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
searchTable(this.check1, this.staffName, this.check2, this.roleName, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
fetchData() {
|
||||
getTree().then(response => { // 获取人员信息树
|
||||
const data = response.data
|
||||
this.data2 = fn(data, 0)
|
||||
})
|
||||
initOrderType().then(response => { // 角色名称
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.roleNames.push({
|
||||
label: response.data[i].角色功能,
|
||||
value: response.data[i].角色编号
|
||||
})
|
||||
}
|
||||
})
|
||||
this.searchData()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchData()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchData()
|
||||
},
|
||||
submitAdd1() {
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
if (valid) {
|
||||
addData1(this.personnelNumber, this.form1.roleName).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.ssks = ''
|
||||
this.form1.staffName = ''
|
||||
this.form1.roleName = ''
|
||||
this.searchData()
|
||||
this.dialogFormVisible1 = false
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
submitAdd2() {
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
addData2(this.personnelStream, this.personnelNumber, this.form2.roleName).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
this.ssks = ''
|
||||
this.searchData()
|
||||
this.dialogFormVisible2 = false
|
||||
} else { this.$message.error('修改失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCurrentChange3(val) {
|
||||
this.searchgroup()
|
||||
},
|
||||
handleNodeClick(data) { // 树节点点击
|
||||
this.ssks = data.label
|
||||
getTable8(data.id).then(response => {
|
||||
this.List1 = response.data
|
||||
})
|
||||
},
|
||||
handleDelete(row) { // 删除
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteData(row.人员角色流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
} else { this.$message.error('删除失败') }
|
||||
this.searchData()
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
dialogTableVisible() {
|
||||
this.dialogFormVisible = true
|
||||
dialogtablevisible().then(response => {
|
||||
})
|
||||
},
|
||||
handleCurrentChange(row) { // 获取当前行人员信息
|
||||
this.ssks = row.节点名称
|
||||
this.number = row.考勤编号
|
||||
this.name = row.姓名
|
||||
this.personnelNumber = row.人员编号
|
||||
},
|
||||
getName() { // 提交人员
|
||||
this.cjscgy = this.number
|
||||
this.dialogFormVisible = false
|
||||
this.form1.staffName = this.name
|
||||
this.form2.staffName = this.name
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom:15px;
|
||||
margin-left: 15px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
</style>
|
||||
567
src/views/BasicData/WorkshopProcessMaintenance/index.vue
Normal file
567
src/views/BasicData/WorkshopProcessMaintenance/index.vue
Normal file
@@ -0,0 +1,567 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-card>
|
||||
<span>工艺分类:</span>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="addProcessClassification()">新增</el-button>
|
||||
<el-button size="small" type="warning" icon="el-icon-edit" @click="editProcessClassification()">编辑</el-button>
|
||||
<el-button size="small" type="danger" icon="el-icon-delete" @click="delProcessClassification()">删除</el-button>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-card>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="addProcess">新增工艺名称</el-button>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading1"
|
||||
ref="multipleTable"
|
||||
:data="tableData1"
|
||||
stripe
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
height="700">
|
||||
<el-table-column align="center" label=" " width="50px">
|
||||
<template slot-scope="scope">
|
||||
<el-radio :label="scope.row.工艺分类流水号" v-model="radio" @change.native="getCurrentRow(scope.row.工艺分类流水号, scope.row.工艺分类名称)">
|
||||
{{ a }}
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="left" label="工艺分类">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺分类名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="18">
|
||||
<el-card >
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
:row-key="getRowKeys"
|
||||
:expand-row-keys="expands"
|
||||
height="700"
|
||||
width="100%"
|
||||
@expand-change="searchTechnologicalRequirementsOfProcessNum">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<el-table :data="tableData3" border>
|
||||
<el-table-column label="工艺要求">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺要求 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
icon="el-icon-edit"
|
||||
@click="editTechnologicalRequirements(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="delTechnologicalRequirements(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
icon="el-icon-edit"
|
||||
@click="editProcess(scope.row)">编辑工艺</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="delProcess(scope.row)">删除工艺</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
@click="addTechnologicalRequirements(scope.row)">新增要求</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="增加工艺分类" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺分类" prop="ProcessClassification">
|
||||
<el-input v-model="form1.ProcessClassification" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form1')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="编辑工艺分类" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺分类" prop="ProcessClassification">
|
||||
<el-input v-model="form1.ProcessClassification" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form1')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible3" title="增加工艺" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺名称" prop="Process">
|
||||
<el-input v-model="form2.Process" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工艺名称简称" prop="ProcessShort">
|
||||
<el-input v-model="form2.ProcessShort" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form2')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible4" title="编辑工艺" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺名称" prop="Process">
|
||||
<el-input v-model="form2.Process" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工艺名称简称" prop="ProcessShort">
|
||||
<el-input v-model="form2.ProcessShort" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form2')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible5" title="新增工艺要求" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺要求" prop="Process">
|
||||
<el-input v-model="form3.TechnologicalRequirements" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form3')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible6" title="编辑工艺要求" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺要求" prop="TechnologicalRequirements">
|
||||
<el-input v-model="form3.TechnologicalRequirements" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form3')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchProcessClassification, searchProcessNameOfProcessClassification, searchTechnologicalRequirementsOfProcessNum, searchProcessClassificationOfProcessClassificationNum, addProcessClassification, editProcessClassification, delProcessClassification, addProcess, delProcess, editProcess, addTechnologicalRequirements, editTechnologicalRequirements, delTechnologicalRequirements } from '@/api/BasicData/WorkshopProcessMaintenance'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 工艺分类所需变量
|
||||
a: '',
|
||||
expands: [],
|
||||
tableData1: [],
|
||||
ProcessNum: '',
|
||||
loading1: false,
|
||||
loading2: false,
|
||||
loading3: false,
|
||||
ProcessClassificationNum: '',
|
||||
radio: null,
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
dialogFormVisible3: false,
|
||||
dialogFormVisible4: false,
|
||||
dialogFormVisible5: false,
|
||||
dialogFormVisible6: false,
|
||||
temp: null,
|
||||
ProcessClassificationNumS: '',
|
||||
form1: {
|
||||
ProcessClassification: ''
|
||||
},
|
||||
form2: {
|
||||
Process: '',
|
||||
ProcessShort: ''
|
||||
},
|
||||
form3: {
|
||||
TechnologicalRequirements: ''
|
||||
},
|
||||
rules1: {
|
||||
ProcessClassification: [{ required: true, message: '请输入工艺分类名称', trigger: 'blur' }]
|
||||
},
|
||||
rules2: {
|
||||
Process: [{ required: true, message: '请输入工艺名称' }],
|
||||
ProcessShort: [{ required: true, message: '请输入工艺名称简称' }]
|
||||
},
|
||||
rules3: {
|
||||
TechnologicalRequirements: [{ required: true, message: '请输入工艺要求', trigger: 'blur' }]
|
||||
},
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
Num: [],
|
||||
maxNum: '',
|
||||
max: [],
|
||||
code: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchProcessClassification()
|
||||
},
|
||||
methods: {
|
||||
searchProcessClassification() {
|
||||
this.loading1 = true
|
||||
searchProcessClassification(this.ProcessClassification).then(response => {
|
||||
this.loading1 = false
|
||||
this.tableData1 = response.data
|
||||
this.total1 = response.data
|
||||
return this.tableData1
|
||||
}).then(data => {
|
||||
this.Num = data
|
||||
for (let i = 0; i < this.Num.length; i++) {
|
||||
this.max.push(this.Num[i].工艺分类流水号)
|
||||
}
|
||||
return this.max
|
||||
}).then(data => {
|
||||
const a = data
|
||||
this.maxNum = a[0]
|
||||
for (let j = 0; j < a.length; j++) {
|
||||
if (this.maxNum < a[j]) {
|
||||
this.maxNum = a[j]
|
||||
}
|
||||
}
|
||||
return this.maxNum
|
||||
}).then(data => {
|
||||
const b = data
|
||||
this.radio = b
|
||||
return this.radio
|
||||
}).then(data => {
|
||||
const c = data
|
||||
this.loading2 = true
|
||||
searchProcessNameOfProcessClassification(c).then(response => {
|
||||
this.loading2 = false
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
})
|
||||
},
|
||||
addProcessClassification() {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.form1 = {}
|
||||
this.dialogFormVisible1 = true
|
||||
this.temp = 1
|
||||
},
|
||||
editProcessClassification() {
|
||||
if (this.radio !== '') {
|
||||
this.temp = 2
|
||||
this.dialogFormVisible2 = true
|
||||
searchProcessClassificationOfProcessClassificationNum(this.radio).then(response => {
|
||||
this.form1.ProcessClassification = response.data[0].工艺分类名称
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择工艺分类')
|
||||
}
|
||||
},
|
||||
submitProcessClassification() {
|
||||
editProcessClassification(this.radio, this.form1.ProcessClassification).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.dialogFormVisible2 = false
|
||||
this.searchProcessClassification()
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
submitaddProcessClassification() {
|
||||
addProcessClassification(this.form1.ProcessClassification).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.searchProcessClassification()
|
||||
this.dialogFormVisible1 = false
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
},
|
||||
submit1(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.temp === 1) {
|
||||
this.submitaddProcessClassification()
|
||||
this.form1 = {
|
||||
ProcessClassification: ''
|
||||
}
|
||||
this.temp = null
|
||||
} else if (this.temp === 2) {
|
||||
this.submitProcessClassification()
|
||||
this.form1 = {
|
||||
ProcessClassification: ''
|
||||
}
|
||||
this.temp = null
|
||||
} else if (this.temp === 3) {
|
||||
this.submitaddProcess()
|
||||
this.form2 = {
|
||||
Process: '',
|
||||
ProcessShort: ''
|
||||
}
|
||||
this.temp = null
|
||||
} else if (this.temp === 4) {
|
||||
this.submiteditProcess()
|
||||
this.form2 = {
|
||||
Process: '',
|
||||
ProcessShort: ''
|
||||
}
|
||||
this.temp = null
|
||||
} else if (this.temp === 5) {
|
||||
this.submitTechnologicalRequirements()
|
||||
this.form3 = {
|
||||
TechnologicalRequirements: ''
|
||||
}
|
||||
this.temp = null
|
||||
} else if (this.temp === 6) {
|
||||
this.submiteditTechnologicalRequirements()
|
||||
this.form3 = {
|
||||
TechnologicalRequirements: ''
|
||||
}
|
||||
this.temp = null
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
delProcessClassification() {
|
||||
if (this.radio !== '') {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delProcessClassification(this.radio).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.searchProcessClassification()
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择工艺分类')
|
||||
}
|
||||
},
|
||||
calloff() {
|
||||
this.dialogFormVisible1 = false
|
||||
this.dialogFormVisible2 = false
|
||||
this.dialogFormVisible3 = false
|
||||
this.dialogFormVisible4 = false
|
||||
this.dialogFormVisible5 = false
|
||||
this.dialogFormVisible6 = false
|
||||
this.form1 = {
|
||||
ProcessClassification: ''
|
||||
}
|
||||
this.form2 = {
|
||||
Process: '',
|
||||
ProcessShort: ''
|
||||
}
|
||||
this.form3 = {
|
||||
TechnologicalRequirements: ''
|
||||
}
|
||||
},
|
||||
getCurrentRow(row) {
|
||||
searchProcessClassificationOfProcessClassificationNum(this.radio).then(response => {
|
||||
this.form1.ProcessClassification = response.data[0].工艺分类名称
|
||||
})
|
||||
this.loading2 = true
|
||||
searchProcessNameOfProcessClassification(row).then(response => {
|
||||
this.loading2 = false
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
searchTechnologicalRequirementsOfProcessNum(row, expandedRows) {
|
||||
// this.expands = []
|
||||
// this.expands.push(row.工艺编号)
|
||||
if (expandedRows.length > 1) {
|
||||
expandedRows.shift()
|
||||
}
|
||||
this.loading3 = true
|
||||
searchTechnologicalRequirementsOfProcessNum(row.工艺编号).then(response => {
|
||||
this.loading3 = false
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
},
|
||||
addProcess() {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
if (this.radio !== '') {
|
||||
this.form2.Process = ''
|
||||
this.form2.ProcessShort = ''
|
||||
this.dialogFormVisible3 = true
|
||||
this.temp = 3
|
||||
} else {
|
||||
this.$message.warning('请选择一个工艺分类')
|
||||
}
|
||||
},
|
||||
submitaddProcess() {
|
||||
addProcess(this.radio, this.form2.Process, this.form2.ProcessShort).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.loading2 = true
|
||||
searchProcessNameOfProcessClassification(this.radio).then(response => {
|
||||
this.loading2 = false
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
this.dialogFormVisible3 = false
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
},
|
||||
editProcess(row) {
|
||||
this.dialogFormVisible4 = true
|
||||
this.temp = 4
|
||||
this.form2.Process = row.工艺名称
|
||||
this.form2.ProcessShort = row.工艺名称简称
|
||||
this.ProcessNum = row.工艺编号
|
||||
},
|
||||
submiteditProcess() {
|
||||
editProcess(this.ProcessNum, this.form2.Process, this.form2.ProcessShort).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.dialogFormVisible4 = true
|
||||
searchProcessNameOfProcessClassification(this.radio).then(response => {
|
||||
this.loading2 = false
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
this.dialogFormVisible4 = false
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
getRowKeys(row) {
|
||||
return row.工艺编号
|
||||
},
|
||||
delProcess(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delProcess(row.工艺编号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.loading2 = true
|
||||
searchProcessNameOfProcessClassification(this.radio).then(response => {
|
||||
this.loading2 = false
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
addTechnologicalRequirements(row) {
|
||||
if (this.$refs['form3'] !== undefined) {
|
||||
this.$refs['form3'].resetFields()
|
||||
}
|
||||
this.ProcessNum = row.工艺编号
|
||||
this.form3.TechnologicalRequirements = ''
|
||||
this.dialogFormVisible5 = true
|
||||
this.temp = 5
|
||||
},
|
||||
submitTechnologicalRequirements() {
|
||||
addTechnologicalRequirements(this.ProcessNum, this.form3.TechnologicalRequirements).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.loading3 = true
|
||||
searchTechnologicalRequirementsOfProcessNum(this.ProcessNum).then(response => {
|
||||
this.loading3 = false
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
this.dialogFormVisible5 = false
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
},
|
||||
editTechnologicalRequirements(row) {
|
||||
this.temp = 6
|
||||
this.dialogFormVisible6 = true
|
||||
this.form3.TechnologicalRequirements = row.工艺要求
|
||||
this.code = row.工艺要求流水号
|
||||
this.ProcessNum = row.工艺编号
|
||||
},
|
||||
submiteditTechnologicalRequirements() {
|
||||
editTechnologicalRequirements(this.code, this.form3.TechnologicalRequirements).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.loading3 = true
|
||||
searchTechnologicalRequirementsOfProcessNum(this.ProcessNum).then(response => {
|
||||
this.loading3 = false
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
this.dialogFormVisible6 = false
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
delTechnologicalRequirements(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delTechnologicalRequirements(row.工艺要求流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.loading3 = true
|
||||
searchTechnologicalRequirementsOfProcessNum(row.工艺编号).then(response => {
|
||||
this.loading3 = false
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card {
|
||||
margin-top: 15px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -268,9 +268,8 @@ export default {
|
||||
this.PeopleNumber = this.id
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
this.Machine = []
|
||||
this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
@@ -281,6 +280,7 @@ export default {
|
||||
})
|
||||
},
|
||||
searchGroupList() { // 查询组号
|
||||
this.GroupNum = []
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
@@ -291,16 +291,19 @@ export default {
|
||||
})
|
||||
},
|
||||
searchPeopleData() { // 查询人员
|
||||
this.People = []
|
||||
searchPeople().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.People.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].考勤编号
|
||||
value: parseInt(response.data[i].考勤编号)
|
||||
})
|
||||
}
|
||||
console.log(this.People)
|
||||
})
|
||||
},
|
||||
searchContractData() { // 查询合同
|
||||
this.Contract = []
|
||||
searchContract().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Contract.push({
|
||||
@@ -312,18 +315,10 @@ export default {
|
||||
},
|
||||
searchPartinfo() {
|
||||
this.tableDataPurchase = []
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
if (this.MachineValue === '') {
|
||||
this.MachineValue_check = 0
|
||||
}
|
||||
if (this.GroupNumValue === '') {
|
||||
this.GroupNumValue_check = 0
|
||||
}
|
||||
if (this.ContractValue === '') {
|
||||
this.ContractValue_check = 0
|
||||
}
|
||||
this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0
|
||||
this.MachineValue ? this.MachineValue_check = 1 : this.MachineValue_check = 0
|
||||
this.GroupNumValue ? this.GroupNumValue_check = 1 : this.GroupNumValue_check = 0
|
||||
this.ContractValue ? this.ContractValue_check = 1 : this.ContractValue_check = 0
|
||||
this.listLoading = true
|
||||
searchDirectPart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue, this.ContractValue_check, this.ContractValue).then(response => {
|
||||
this.tableDataPurchase = response.data.rows
|
||||
@@ -349,8 +344,7 @@ export default {
|
||||
// 打开直达件表单
|
||||
addDirect(row) {
|
||||
this.PeopleValue = ''
|
||||
this.form = []
|
||||
console.log(row)
|
||||
this.form = {}
|
||||
this.dialogFormVisible = true
|
||||
this.materialNum = row.物料流水号
|
||||
this.purchaseContractNumber = row.采购合同明细流水号
|
||||
@@ -367,7 +361,7 @@ export default {
|
||||
this.dialogFormVisible1 = true
|
||||
this.directPartNumber = row.直达件流水号
|
||||
this.form.DirectNumber = row.到货数量
|
||||
this.PeopleValue = row.领用人员流水号
|
||||
this.PeopleValue = parseInt(row.领用人员流水号)
|
||||
this.form.DirectNote = row.备注
|
||||
},
|
||||
// 修改直达件
|
||||
|
||||
@@ -129,7 +129,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
approvalExchangepart(row.交换单流水号, row.交换件物料流水号, row.交换件组件零件流水号, row.交换件采购合同明细流水号, row.货位流水号, row.交换数量).then(response => {
|
||||
approvalExchangepart(row.交换单流水号, row.交换件物料流水号, row.被交换件物料流水号, row.交换件组件零件流水号, row.被交换件组件零件流水号, row.交换件采购合同明细流水号, row.货位流水号, row.被交换货位流水号, row.交换数量).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable1()
|
||||
|
||||
@@ -71,22 +71,22 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">交换</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-sort-down" style="margin: 0 0 0 0px" @click="selected(scope.row)">被交换</el-button>
|
||||
<el-button :disabled="scope.row.是否禁用" size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">交换</el-button>
|
||||
<el-button :disabled="scope.row.是否禁用" size="small" type="primary" icon="el-icon-sort-down" style="margin: 0 0 0 0px" @click="selected(scope.row)">被交换</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
<el-card>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
@@ -109,12 +109,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
@@ -127,7 +127,7 @@
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div style="margin: 10px 15px">
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" @click="total = 0;pageSize = 10;pageList = 1;exchange()" >交换</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" @click="total = 0;pageSize = 10;pageList = 1;exchange('form')" >交换</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
@@ -149,12 +149,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
@@ -166,25 +166,7 @@
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--新增交换件对话框-->
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="交换单编号" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-input v-model="form.ExchangeNumber" size="small" placeholder="请输入零件交换单编号" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="交换数量" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.ExchangeNumberx" size="small" placeholder="请输入交换数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-input v-model="form.ExchangeNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button v-show="title==='交换'" type="primary" @click="addListDetailinfor('form')">确 定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--交换件表格-->
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
@@ -240,38 +222,67 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="180">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 0px" @click="dropListinfor(scope.row)">删除</el-button>
|
||||
<el-button :disabled="scope.row.是否禁用" size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button :disabled="scope.row.是否禁用" size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 0px" @click="dropListinfor(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="交换单编号" prop="ExchangeNumber" label-width="100px" size="small">
|
||||
<el-input v-model="form.ExchangeNumber" size="small" placeholder="请输入零件交换单编号" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="交换数量" prop="ExchangeNumberx" label-width="100px">
|
||||
<el-input v-model="form.ExchangeNumberx" size="small" placeholder="请输入交换数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="领料单" prop="ExchangeNumberx" label-width="100px">
|
||||
<el-select v-model="PickingListNumber" filterable clearable size="small" placeholder="领料单号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-option
|
||||
v-for="item in PickingList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="ExchangeNote" label-width="100px">
|
||||
<el-input v-model="form.ExchangeNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button v-show="title==='交换'" type="primary" @click="addListDetailinfor('form')">确 定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit(scope.$index, scope.row, 'form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchmachine, searchTeam, searchPurchasePart, addExchangepart, searchExchangePart, dropExchangeList, editExchangeList } from '@/api/Inventory/ExchangePart'
|
||||
import { initProject, searchmachine, searchTeam, searchPurchasePart, addExchangepart, searchExchangePart, dropExchangeList, editExchangeList, searchList1 } from '@/api/Inventory/ExchangePart'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ProjectValue: ' ',
|
||||
count1: 0,
|
||||
count2: 0, // 清表单验证计数器
|
||||
ProjectValue: '',
|
||||
Project: [],
|
||||
ProjectValue_check: 1,
|
||||
MachineValue: ' ',
|
||||
ProjectValue_check: 0,
|
||||
MachineValue: '',
|
||||
Machine: [],
|
||||
MachineValue_check: 1,
|
||||
GroupNumValue: ' ',
|
||||
GroupNumValue: '',
|
||||
GroupNumValue_check: 1,
|
||||
GroupNum: [],
|
||||
tableDataBasic: [],
|
||||
@@ -302,7 +313,7 @@ export default {
|
||||
rules: { // 表单验证规则
|
||||
ExchangeNumber: [{ required: true, message: '请输入交换件编号', trigger: 'blur' }],
|
||||
ExchangeNumberx: [{ required: true, message: '请输入交换件数量', trigger: 'blur' }],
|
||||
ExchangeNote: [{ required: true, message: '请输入交换件备注', trigger: 'change' }]
|
||||
ExchangeNote: [{ required: true, message: '请输入交换件备注', trigger: 'blur' }]
|
||||
},
|
||||
PageCurrent: 1,
|
||||
PageSize: 10,
|
||||
@@ -314,7 +325,9 @@ export default {
|
||||
listLoading1: '',
|
||||
exchangeListNumber: '',
|
||||
eTeamPartNumber: '',
|
||||
title: ''
|
||||
title: '',
|
||||
PickingListNumber: '',
|
||||
PickingList: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -326,6 +339,7 @@ export default {
|
||||
this.fetchData()
|
||||
this.getpeopleid()
|
||||
this.getExchangeTable()
|
||||
this.searchPickingList()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
@@ -334,27 +348,44 @@ export default {
|
||||
// 获取人员编号
|
||||
getpeopleid() {
|
||||
this.picikingPeople = this.id
|
||||
console.log(this.picikingPeople)
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
if (this.ProjectValue === '') {
|
||||
searchMachine() {
|
||||
this.MachineValue = ''
|
||||
this.Machine = []
|
||||
this.GroupNumValue = ''
|
||||
this.GroupNum = []
|
||||
if (this.ProjectValue !== '') {
|
||||
this.ProjectValue_check = 1
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
},
|
||||
searchGroupList() {
|
||||
this.GroupNumValue = ''
|
||||
this.GroupNum = []
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
this.GroupNum.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchGroupList() { // 查询组号
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
searchPickingList() {
|
||||
searchList1().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
label: response.data[i].组件名称,
|
||||
value: response.data[i].组件流水号
|
||||
this.PickingList.push({
|
||||
label: response.data[i].领料单编号,
|
||||
value: response.data[i].领料单流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -362,20 +393,24 @@ export default {
|
||||
searchPartinfo() {
|
||||
this.tableDataPurchase = []
|
||||
this.tableDataBasic = []
|
||||
if (this.ProjectValue === ' ') {
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
if (this.MachineValue === ' ') {
|
||||
if (this.MachineValue === '') {
|
||||
this.MachineValue_check = 0
|
||||
}
|
||||
if (this.GroupNumValue === ' ') {
|
||||
if (this.GroupNumValue === '') {
|
||||
this.GroupNumValue_check = 0
|
||||
}
|
||||
this.listLoading = true
|
||||
searchPurchasePart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||
this.tableDataPurchase = response.data.rows
|
||||
console.log(this.tableDataPurchase)
|
||||
this.total = response.data.total
|
||||
const data = response.data.rows
|
||||
console.log(data)
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].是否交换 === '1' || data[i].是否交换 === '2' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
}
|
||||
this.tableDataPurchase = data
|
||||
})
|
||||
this.listLoading = false
|
||||
},
|
||||
@@ -392,44 +427,77 @@ export default {
|
||||
getExchangeTable() {
|
||||
this.listLoading1 = true
|
||||
searchExchangePart(this.PageCurrent1, this.PageSize1).then(response => {
|
||||
this.tableDataExchange = response.data.rows
|
||||
const data = response.data.rows
|
||||
console.log(data)
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].审批通过 === '1' || data[i].审批通过 === '2' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
}
|
||||
this.tableDataExchange = data
|
||||
this.total1 = response.data.total
|
||||
this.listLoading1 = false
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.PageCurrent1 = 1
|
||||
this.PageSize1 = val
|
||||
this.getExchangeTable()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.PageCurrent1 = val
|
||||
this.getExchangeTable()
|
||||
},
|
||||
// 选择领料单
|
||||
chooseListinfor(row) {
|
||||
this.pickingListNumberx = row.领料单流水号
|
||||
console.log(this.pickingListNumberx)
|
||||
this.searchListDetailt()
|
||||
},
|
||||
// 增加交换件
|
||||
addListDetailinfor() {
|
||||
addExchangepart(this.form.ExchangeNumber, this.tableData1[0].组件零件流水号, this.tableData1[0].物料流水号, this.tableData1[0].采购合同明细流水号, this.tableData2[0].组件零件流水号, this.tableData1[0].物料名称, this.tableData2[0].物料名称, this.tableData2[0].货位流水号, this.form.ExchangeNumberx, this.picikingPeople, this.form.ExchangeNote).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else { this.$message.error('增加失败') }
|
||||
addListDetailinfor(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
addExchangepart(this.form.ExchangeNumber, this.tableData1[0].组件零件流水号, this.tableData1[0].物料流水号, this.tableData1[1].物料流水号, this.tableData1[0].采购合同明细流水号, this.tableData2[0].组件零件流水号, this.tableData1[0].物料名称, this.tableData2[0].物料名称, this.tableData1[0].货位流水号, this.tableData2[0].货位流水号, this.form.ExchangeNumberx, this.picikingPeople, this.form.ExchangeNote, this.PickingListNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else { this.$message.error('增加失败') }
|
||||
}).then(() => {
|
||||
this.dialogFormVisible = false
|
||||
this.PageCurrent1 = 1
|
||||
this.getExchangeTable()
|
||||
this.searchPartinfo()
|
||||
})
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.getExchangeTable()
|
||||
},
|
||||
// 打开交换表单
|
||||
exchange() {
|
||||
this.title = '交换'
|
||||
this.dialogFormVisible = true
|
||||
exchange(form) {
|
||||
if (this.tableData1.length === 0) {
|
||||
this.$message.error('请选择交换件')
|
||||
} else if (this.tableData2.length === 0) {
|
||||
this.$message.error('请选择交换件')
|
||||
} else {
|
||||
this.count1 = this.count1 + 1
|
||||
if (this.count1 !== 1) {
|
||||
this.$refs[form].resetFields()
|
||||
}
|
||||
this.title = '交换'
|
||||
this.form.ExchangeNumber = ''
|
||||
this.form.ExchangeNumberx = ''
|
||||
this.form.ExchangeNote = ''
|
||||
this.dialogFormVisible = true
|
||||
}
|
||||
},
|
||||
// 重置表单
|
||||
callOff() {
|
||||
callOff(formName) {
|
||||
this.form.ExchangeNumber = ''
|
||||
this.form.ExchangeNumberx = ''
|
||||
this.form.ExchangeNote = ''
|
||||
this.dialogFormVisible = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 选中零件交换
|
||||
selecting(row) {
|
||||
const arr = new Array(row)
|
||||
this.tableData1 = arr
|
||||
console.log(this.tableData1)
|
||||
},
|
||||
// 选中被零件交换
|
||||
selected(row) {
|
||||
@@ -445,11 +513,12 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
dropExchangeList(this.exchangeListNumber, this.eTeamPartNumber).then(response => {
|
||||
dropExchangeList(this.exchangeListNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.getExchangeTable().then(response => {
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.PageCurrent1 = 1
|
||||
this.getExchangeTable()
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" class="el-icon-success" @click="Innumber">入库</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.是否禁用"
|
||||
size="mini"
|
||||
type="danger"
|
||||
class="el-icon-delete"
|
||||
@@ -178,6 +179,8 @@ export default {
|
||||
if (response.data.length === 0) {
|
||||
this.listLoading = false
|
||||
this.$message.warning('无此零件')
|
||||
} else if (response.data[0].剩余数量 === 0) {
|
||||
this.$message.warning('该零件已入库完毕')
|
||||
} else {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (response.data[0].工艺计划流水号 === this.tableData[i].工艺计划流水号) {
|
||||
@@ -212,18 +215,26 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.tableData[i].innumber > this.tableData[i].plannumber) {
|
||||
this.tableData[i].innumber = this.tableData[i].plannumber
|
||||
if (this.locateNumber === '') {
|
||||
this.$message.error('请选择货位')
|
||||
} else {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.tableData[i].innumber === '0') {
|
||||
this.$message.error('请输入正确数量')
|
||||
} else {
|
||||
if (this.tableData[i].innumber > this.tableData[i].plannumber) {
|
||||
this.tableData[i].innumber = this.tableData[i].plannumber
|
||||
}
|
||||
insertOne(this.tableData[i].工艺计划流水号, this.tableData[i].innumber, this.PeopleNumber, this.tableData[i].capture, this.inventoryNumber, this.locateNumber, this.tableData[i].note).then(response => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '零件入库成功!'
|
||||
})
|
||||
}).then(() => {
|
||||
this.Empty()
|
||||
})
|
||||
}
|
||||
}
|
||||
insertOne(this.tableData[i].工艺计划流水号, this.tableData[i].innumber, this.PeopleNumber, this.tableData[i].capture, this.inventoryNumber, this.locateNumber, this.tableData[i].note).then(response => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '零件入库成功!'
|
||||
})
|
||||
}).then(() => {
|
||||
this.Empty()
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
@@ -245,7 +256,7 @@ export default {
|
||||
this.locateName = []
|
||||
this.locateNumber = ''
|
||||
if (this.inventoryNumber) {
|
||||
this.getSelect(getlocate, ['货位名称'], 'locateName', this.inventoryNumber)
|
||||
this.getSelect(getlocate, ['货位名称', '货位流水号'], 'locateName', this.inventoryNumber)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,6 +76,7 @@
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" class="el-icon-success" @click="Innumber">入库</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.是否禁用"
|
||||
size="mini"
|
||||
type="danger"
|
||||
class="el-icon-delete"
|
||||
@@ -160,7 +161,9 @@ export default {
|
||||
},
|
||||
websocketonmessage(msg) { // 数据接收
|
||||
this.partNumber = msg.data.split('|')[3]
|
||||
this.getscantable()
|
||||
this.partNumber = this.partNumber.slice(1)
|
||||
console.log()
|
||||
this.getscantable(this.partNumber, 3333)
|
||||
},
|
||||
websocketclose() { // 关闭
|
||||
console.log('WebSocket关闭')
|
||||
@@ -178,6 +181,8 @@ export default {
|
||||
if (response.data.length === 0) {
|
||||
this.listLoading = false
|
||||
this.$message.warning('无此零件')
|
||||
} else if (response.data[0].剩余数量 === 0) {
|
||||
this.$message.warning('该零件已入库完毕')
|
||||
} else {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (response.data[0].工艺计划流水号 === this.tableData[i].工艺计划流水号) {
|
||||
@@ -212,18 +217,26 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.tableData[i].innumber > this.tableData[i].plannumber) {
|
||||
this.tableData[i].innumber = this.tableData[i].plannumber
|
||||
if (this.locateNumber === '') {
|
||||
this.$message.error('请选择货位')
|
||||
} else {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.tableData[i].innumber === '0') {
|
||||
this.$message.error('请输入正确数量')
|
||||
} else {
|
||||
if (this.tableData[i].innumber > this.tableData[i].plannumber) {
|
||||
this.tableData[i].innumber = this.tableData[i].plannumber
|
||||
}
|
||||
insertOne(this.tableData[i].工艺计划流水号, this.tableData[i].innumber, this.PeopleNumber, this.tableData[i].capture, this.inventoryNumber, this.locateNumber, this.tableData[i].note).then(response => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '零件入库成功!'
|
||||
})
|
||||
}).then(() => {
|
||||
this.Empty()
|
||||
})
|
||||
}
|
||||
}
|
||||
insertOne(this.tableData[i].工艺计划流水号, this.tableData[i].innumber, this.PeopleNumber, this.tableData[i].capture, this.inventoryNumber, this.locateNumber, this.tableData[i].note).then(response => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '零件入库成功!'
|
||||
})
|
||||
}).then(() => {
|
||||
this.Empty()
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -40,22 +40,13 @@
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="budget" label="领用人" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.领用人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="100" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
type="primary"
|
||||
@click="handleEdit(scope.row)">修改</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="100" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
@click="handleEdit(scope.$index, scope.row, 'form')">修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@@ -100,7 +91,12 @@
|
||||
{{ scope.row.仓库名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="100" align="center" fixed="right">
|
||||
<el-table-column align="center" label="二维码" width="150">
|
||||
<template slot-scope="scope">
|
||||
<canvas :id="canvas[scope.$index]" class="code"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@@ -117,14 +113,15 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
<!--仓库表单-->
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="增加仓库" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="增加仓库" center width="450px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="center" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="仓库编号" prop="WarehouseNumber">
|
||||
<el-input
|
||||
v-model="form.WarehouseNumber"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -135,6 +132,7 @@
|
||||
<el-input
|
||||
v-model="form.WarehouseName"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -145,6 +143,7 @@
|
||||
<el-input
|
||||
v-model="form.WarehouseDescription"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -154,6 +153,7 @@
|
||||
<el-form-item label="地址" prop="Address">
|
||||
<el-input
|
||||
v-model="form.Address"
|
||||
clearable
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
@@ -161,10 +161,10 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="领用者" prop="TotalContractAmount" label-width="100px">
|
||||
<el-select v-model="PeopleValue" filterable clearable size="small" placeholder="领用者" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||
<el-form-item label="联系人" prop="ContactpeopleValue">
|
||||
<el-select v-model="form.ContactpeopleValue" clearable filterable size="small" placeholder="领用者" style="width: 200px;margin-right:10px">
|
||||
<el-option
|
||||
v-for="item in People"
|
||||
v-for="item in Contactpeople"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
@@ -177,6 +177,7 @@
|
||||
<el-form-item label="备注" prop="Note">
|
||||
<el-input
|
||||
v-model="form.Note"
|
||||
clearable
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
@@ -213,11 +214,14 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="永久" prop="永久">
|
||||
<el-input
|
||||
v-model="form2.永久"
|
||||
size="small"
|
||||
style="width:200px"/>
|
||||
<el-form-item label="是否永久" prop="永久">
|
||||
<el-select v-model="form2.永久" clearable filterable placeholder="请选择" style="width: 200px;margin-right:10px">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -241,9 +245,12 @@
|
||||
</template>
|
||||
<script>
|
||||
import { initWarehouse, addWarehouse, alterWarehouse, deleteWarehouse, searchLocate, addLocate, alterLocate, deleteLocate, searchPeople } from '@/api/Inventory/InventoryManagement'
|
||||
import QRCode from 'qrcode'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
Contactpeople: [], // 联系人
|
||||
count2: 0, // 清表单验证计数器
|
||||
tableData: [],
|
||||
tableData2: [],
|
||||
wareHouse: '',
|
||||
@@ -254,10 +261,12 @@ export default {
|
||||
WarehouseName: '', // 仓库名称
|
||||
WarehouseDescription: '', // 仓库描述
|
||||
Address: '', // 地址
|
||||
ContactpeopleValue: '',
|
||||
Note: '' // 备注
|
||||
},
|
||||
rules: { // 表单验证规则
|
||||
WarehouseNumber: [{ required: true, message: '请输入仓库编号', trigger: 'change' }],
|
||||
WarehouseNumber: [{ required: true, message: '请输入仓库编号', trigger: 'blur' }],
|
||||
ContactpeopleValue: [{ required: true, message: '请选择联系人', trigger: 'change' }],
|
||||
WarehouseName: [{ required: true, message: '请输入仓库名称', trigger: 'blur' }],
|
||||
WarehouseDescription: [{ required: true, message: '请输入仓库描述', trigger: 'blur' }],
|
||||
Address: [{ required: true, message: '请输入地址', trigger: 'blur' }],
|
||||
@@ -280,7 +289,15 @@ export default {
|
||||
LocateNumber: '',
|
||||
listLoading: '',
|
||||
PeopleValue: '',
|
||||
People: []
|
||||
People: [],
|
||||
canvas: [],
|
||||
options: [{
|
||||
value: '1',
|
||||
label: '是'
|
||||
}, {
|
||||
value: '0',
|
||||
label: '否'
|
||||
}]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -294,7 +311,6 @@ export default {
|
||||
this.listLoading = true
|
||||
initWarehouse().then(response => {
|
||||
this.listLoading = false
|
||||
console.log(response)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData.push({
|
||||
仓库流水号: response.data[i].仓库流水号,
|
||||
@@ -302,8 +318,9 @@ export default {
|
||||
仓库名称: response.data[i].仓库名称,
|
||||
仓库描述: response.data[i].仓库描述,
|
||||
地址: response.data[i].地址,
|
||||
联系人: response.data[i].联系人,
|
||||
备注: response.data[i].备注
|
||||
联系人: response.data[i].姓名,
|
||||
备注: response.data[i].备注,
|
||||
人员编号: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -313,11 +330,12 @@ export default {
|
||||
this.getLocate()
|
||||
},
|
||||
searchPeopleData() { // 查询人员
|
||||
this.Contactpeople = []
|
||||
searchPeople().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.People.push({
|
||||
this.Contactpeople.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].考勤编号
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -325,7 +343,9 @@ export default {
|
||||
getLocate() {
|
||||
this.tableData2 = []
|
||||
searchLocate(this.wareHouse).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
this.canvas.push(response.data[i].货位流水号.toString())
|
||||
this.tableData2.push({
|
||||
货位流水号: response.data[i].货位流水号,
|
||||
货位名称: response.data[i].货位名称,
|
||||
@@ -335,10 +355,20 @@ export default {
|
||||
仓库名称: response.data[i].仓库名称
|
||||
})
|
||||
}
|
||||
return data
|
||||
}).then(res => {
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
QRCode.toCanvas(document.getElementById(this.canvas[i]), res[i].货位流水号.toString(), function(error) {
|
||||
if (error) console.error(error)
|
||||
console.log('success!')
|
||||
})
|
||||
}
|
||||
this.tableData2 = res
|
||||
})
|
||||
},
|
||||
// 点击增加仓库
|
||||
ADD() {
|
||||
this.form = []
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
@@ -355,19 +385,20 @@ export default {
|
||||
this.form.WarehouseName = ''
|
||||
this.form.WarehouseDescription = ''
|
||||
this.form.Address = ''
|
||||
this.form.Contactpeople = ''
|
||||
this.form.ContactpeopleValue = ''
|
||||
this.form.Note = ''
|
||||
this.temp = null
|
||||
this.temp = ''
|
||||
} else if (this.temp === 2) {
|
||||
this.chaEdit()
|
||||
this.temp = null
|
||||
this.temp = ''
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 执行增加仓库
|
||||
addTableData() {
|
||||
addWarehouse(this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.PeopleValue, this.form.Note).then(response => {
|
||||
addWarehouse(this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.ContactpeopleValue, this.form.Note).then(response => {
|
||||
console.log(this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.ContactpeopleValue, this.form.Note)
|
||||
this.dialogFormVisible = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
@@ -375,7 +406,7 @@ export default {
|
||||
this.form.WarehouseName = ''
|
||||
this.form.WarehouseDescription = ''
|
||||
this.form.Address = ''
|
||||
this.form.Contactpeople = ''
|
||||
this.form.ContactpeopleValue = ''
|
||||
this.form.Note = ''
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
@@ -384,29 +415,23 @@ export default {
|
||||
})
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
handleEdit(index, row, formName) {
|
||||
this.temp = 2
|
||||
this.dialogFormVisible = true
|
||||
this.form.WarehouseNumber = row.仓库编号
|
||||
this.form.WarehouseName = row.仓库名称
|
||||
this.form.WarehouseDescription = row.仓库描述
|
||||
this.form.Address = row.地址
|
||||
this.form.Contactpeople = row.联系人
|
||||
this.form.ContactpeopleValue = row.人员编号
|
||||
this.form.Note = row.备注
|
||||
this.HouseNumber = row.仓库流水号
|
||||
},
|
||||
// 执行修改
|
||||
chaEdit() {
|
||||
alterWarehouse(this.HouseNumber, this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.Contactpeople, this.form.Note).then(response => {
|
||||
this.dialogFormVisible = false
|
||||
alterWarehouse(this.HouseNumber, this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.ContactpeopleValue, this.form.Note).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.form.WarehouseNumber = ''
|
||||
this.form.WarehouseName = ''
|
||||
this.form.WarehouseDescription = ''
|
||||
this.form.Address = ''
|
||||
this.form.Contactpeople = ''
|
||||
this.form.Note = ''
|
||||
this.dialogFormVisible = false
|
||||
this.getTable()
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
@@ -425,14 +450,13 @@ export default {
|
||||
this.getTable()
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 重置表单
|
||||
callOff(formName) {
|
||||
console.log(1515)
|
||||
this.form = {}
|
||||
this.form2.ContractNumberValue = ''
|
||||
this.form2.EntryName = ''
|
||||
@@ -443,6 +467,7 @@ export default {
|
||||
},
|
||||
// 点击增加货位
|
||||
ADDLocate() {
|
||||
this.form2 = []
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
@@ -498,6 +523,7 @@ export default {
|
||||
},
|
||||
// 执行修改货位
|
||||
LocateEdit() {
|
||||
console.log(this.LocateNumber, this.form2.货位名称, this.form2.工作中心, this.form2.仓库流水号, this.form2.永久, this.form2.不可用量)
|
||||
alterLocate(this.LocateNumber, this.form2.货位名称, this.form2.工作中心, this.form2.仓库流水号, this.form2.永久, this.form2.不可用量).then(response => {
|
||||
this.dialogFormVisible2 = false
|
||||
if (response.data[0].result === '1') {
|
||||
@@ -530,6 +556,15 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
useqrcode() {
|
||||
// 生成的二维码内容,可以添加变量
|
||||
this.QueryDetail = this.num
|
||||
var canvas = document.getElementById('canvas')
|
||||
QRCode.toCanvas(canvas, this.QueryDetail, function(error) {
|
||||
if (error) console.error(error)
|
||||
console.log('success!')
|
||||
})
|
||||
},
|
||||
// 重置表单
|
||||
callLocateOff(formName) {
|
||||
this.form2 = {}
|
||||
@@ -546,5 +581,8 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.code{
|
||||
width:120px!important;
|
||||
height: auto!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="addDirectPartm()">确 定</el-button>
|
||||
<el-button type="primary" @click="addDirectPartm()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-card>
|
||||
@@ -102,7 +102,7 @@
|
||||
:data="tableDataOut"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
height="350">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
@@ -177,7 +177,8 @@ export default {
|
||||
PeopleNumber: '',
|
||||
tableDataOut: [],
|
||||
listLoading: '',
|
||||
listLoading1: ''
|
||||
listLoading1: '',
|
||||
partnumber: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -200,7 +201,6 @@ export default {
|
||||
this.PeopleNumber = this.id
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
console.log(1351)
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
@@ -251,6 +251,8 @@ export default {
|
||||
this.contractNumber = row.离线合同明细流水号
|
||||
this.locateNumber = row.货位流水号
|
||||
this.materialNumber = row.物料流水号
|
||||
this.partnumber = row.货位存量
|
||||
console.log(this.partnumber)
|
||||
this.searchoutRecord()
|
||||
},
|
||||
// 重置表单
|
||||
@@ -272,21 +274,24 @@ export default {
|
||||
},
|
||||
// 离线外购件出库
|
||||
addDirectPartm() {
|
||||
console.log(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber)
|
||||
outlinePartOut(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.searchDirect()
|
||||
} else {
|
||||
this.$message.error('信息添加失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
if (this.partnumber < this.form.DirectNumber) {
|
||||
this.$message.error('请正确输入数量')
|
||||
} else {
|
||||
outlinePartOut(this.contractNumber, this.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.MachineValue, this.GroupNumValue, this.materialNumber, this.PeopleNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.searchDirect()
|
||||
} else {
|
||||
this.$message.error('信息添加失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:data="tableData1"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
height="300">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
@@ -41,7 +41,7 @@
|
||||
:data="tableDataPicking"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="200">
|
||||
height="400">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
@@ -84,7 +84,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="small" type="primary" icon="el-icon-back" style="margin: 0 0 0 0px" @click="partOut(scope.row)">出库</el-button>
|
||||
<el-button :disabled="scope.row.是否出库" size="small" type="primary" icon="el-icon-back" style="margin: 0 0 0 0px" @click="partOut(scope.row)">出库</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -93,7 +93,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchList, searchListDetail, PurchasePart, BasicPart, WorkShopPart } from '@/api/Inventory/PartOut'
|
||||
import { searchList, searchListDetail, PurchasePart, BasicPart, WorkShopPart, ListDetailOut } from '@/api/Inventory/PartOut'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
@@ -113,6 +113,7 @@ export default {
|
||||
tableDataPicking: [], // 领料单明细表格
|
||||
listNumber: '',
|
||||
pickingListNumber: null, // 领料单编号
|
||||
pickingListNumber_check: 1,
|
||||
pickingListNumberx: '', // 领料单流水号
|
||||
picikingPeople: '', // 领料人流水号
|
||||
partProjectNumber: '', // 项目流水号
|
||||
@@ -144,8 +145,14 @@ export default {
|
||||
},
|
||||
// 查询领料单
|
||||
searchListinfor() {
|
||||
if (this.pickingListNumber === null) {
|
||||
this.pickingListNumber_check = 0
|
||||
}
|
||||
this.listLoading = true
|
||||
searchList(this.pickingListNumber).then(response => {
|
||||
searchList(this.pickingListNumber_check, this.pickingListNumber).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].领料时间 = response.data[i].领料时间.substring(0, response.data[i].领料时间.length - 8)
|
||||
}
|
||||
this.tableData1 = response.data
|
||||
this.listLoading = false
|
||||
})
|
||||
@@ -154,7 +161,11 @@ export default {
|
||||
searchListDetailt() {
|
||||
this.listLoading1 = true
|
||||
searchListDetail(this.pickingListNumberx).then(response => {
|
||||
this.tableDataPicking = response.data
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].是否出库 === '1' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
}
|
||||
this.tableDataPicking = data
|
||||
this.listLoading1 = false
|
||||
})
|
||||
},
|
||||
@@ -171,19 +182,25 @@ export default {
|
||||
if (row.车间外购 === 1) {
|
||||
WorkShopPart(row.采购合同明细流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
ListDetailOut(row.领料单明细流水号)
|
||||
this.$message.success('出库成功')
|
||||
this.searchListDetailt()
|
||||
} else { this.$message.error('出库失败') }
|
||||
})
|
||||
} else if (row.零件类型 === 1 || row.零件类型 === 2) {
|
||||
PurchasePart(row.组件零件流水号, this.getpicikingPeople, row.出库数量, row.货位流水号, row.备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
ListDetailOut(row.领料单明细流水号)
|
||||
this.$message.success('出库成功')
|
||||
this.searchListDetailt()
|
||||
} else { this.$message.error('出库失败') }
|
||||
})
|
||||
} else {
|
||||
BasicPart(row.工艺计划流水号, row.出库数量, row.收件信息ID, row.备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('出库成功')
|
||||
ListDetailOut(row.领料单明细流水号)
|
||||
this.searchListDetailt()
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -168,11 +168,21 @@
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.可出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待出库数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.待出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="80">
|
||||
<template slot-scope="scope" align="center">
|
||||
{{ scope.row.零件图号 }}
|
||||
@@ -240,11 +250,21 @@
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待出库数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.待出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类型名称 }}
|
||||
@@ -307,11 +327,21 @@
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="待出库数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.待出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类型名称 }}
|
||||
@@ -434,14 +464,14 @@ import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ProjectValue: ' ',
|
||||
ProjectValue: '',
|
||||
Project: [],
|
||||
ProjectValue_check: 1,
|
||||
MachineValue: ' ',
|
||||
MachineValue: null,
|
||||
Machine: [],
|
||||
MachineValue_check: 1,
|
||||
GroupNumValue: ' ',
|
||||
GroupNumValue_check: 1,
|
||||
MachineValue_check: 0,
|
||||
GroupNumValue: null,
|
||||
GroupNumValue_check: 0,
|
||||
GroupNum: [],
|
||||
tableDataBasic: [],
|
||||
tableDataPurchase: [],
|
||||
@@ -525,7 +555,10 @@ export default {
|
||||
listLoadingx: '',
|
||||
purchaseDetailNum: '',
|
||||
dialogFormVisibleWork: false,
|
||||
time: []
|
||||
time: [],
|
||||
materialLocate: '',
|
||||
enableOut: '',
|
||||
pickingListNumber_check: 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -547,8 +580,14 @@ export default {
|
||||
console.log(this.picikingPeople)
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
if (this.ProjectValue === ' ') {
|
||||
this.MachineValue = ''
|
||||
this.Machine = []
|
||||
this.GroupNumValue = ''
|
||||
this.GroupNum = []
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
} else {
|
||||
this.ProjectValue_check = 1
|
||||
}
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
@@ -560,6 +599,8 @@ export default {
|
||||
})
|
||||
},
|
||||
searchGroupList() { // 查询组号
|
||||
this.GroupNumValue = ''
|
||||
this.GroupNum = []
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
@@ -572,14 +613,14 @@ export default {
|
||||
searchPartinfo() {
|
||||
this.tableDataPurchase = []
|
||||
this.tableDataBasic = []
|
||||
if (this.ProjectValue === ' ') {
|
||||
this.ProjectValue_check = 0
|
||||
if (this.ProjectValue !== null && this.ProjectValue !== '') {
|
||||
this.ProjectValue_check = 1
|
||||
}
|
||||
if (this.MachineValue === ' ') {
|
||||
this.MachineValue_check = 0
|
||||
if (this.MachineValue !== null && this.MachineValue !== '') {
|
||||
this.MachineValue_check = 1
|
||||
}
|
||||
if (this.GroupNumValue === ' ') {
|
||||
this.GroupNumValue_check = 0
|
||||
if (this.GroupNumValue !== null && this.GroupNumValue !== '') {
|
||||
this.GroupNumValue_check = 1
|
||||
}
|
||||
this.listLoading = true
|
||||
this.listLoading1 = true
|
||||
@@ -604,23 +645,23 @@ export default {
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.PageCurrent1 = 1
|
||||
this.PageSize1 = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent1 = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.PageCurrent = val
|
||||
this.searchPartinfo()
|
||||
},
|
||||
handleSizeChangex(val) {
|
||||
this.PageCurrentx = 1
|
||||
this.PageSizex = val
|
||||
@@ -632,8 +673,11 @@ export default {
|
||||
},
|
||||
// 查询领料单
|
||||
searchListinfor() {
|
||||
if (this.pickingListNumber === null) {
|
||||
this.pickingListNumber_check = 0
|
||||
}
|
||||
this.listLoading2 = true
|
||||
searchList(this.PageCurrent2, this.PageSize2, this.pickingListNumber).then(response => {
|
||||
searchList(this.PageCurrent2, this.PageSize2, this.pickingListNumber_check, this.pickingListNumber).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
response.data.rows[i].领料时间 = response.data.rows[i].领料时间.substring(0, response.data.rows[i].领料时间.length - 8)
|
||||
}
|
||||
@@ -685,7 +729,7 @@ export default {
|
||||
this.$message.success('删除成功')
|
||||
this.searchListinfor()
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
@@ -708,7 +752,7 @@ export default {
|
||||
this.$message.success('删除成功')
|
||||
this.searchListDetailt()
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
this.$message.error('数据占用')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
@@ -742,26 +786,30 @@ export default {
|
||||
this.materialName = row.零件名称
|
||||
this.materialType = row.零件类型名称
|
||||
this.materialNumber = row.零件图号
|
||||
this.enableOut = row.可出库数量
|
||||
this.purchaseDetailNum = row.采购合同明细流水号
|
||||
},
|
||||
addBasicListDetail(formName) {
|
||||
if (this.pickingListNumberx === '') {
|
||||
this.$message.error('请选择领料单')
|
||||
} if (this.form.OutNumber === '') {
|
||||
this.$message.error('请输入领用数量')
|
||||
} else if (this.form.OutNumber === '' || this.form.OutNumber > this.enableOut) {
|
||||
this.$message.error('请正确输入领用数量')
|
||||
} else {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialNumber, this.materialType, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 0, this.materialLocate).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.searchPartinfo()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible1 = false
|
||||
this.searchListinfor()
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.locatenumber, 0).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible1 = false
|
||||
this.searchListinfor()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 增加外购件领料单明细
|
||||
addListDetailinfor(row) {
|
||||
@@ -782,18 +830,22 @@ export default {
|
||||
this.materialType = row.物料规格
|
||||
this.dialogFormVisible = true
|
||||
this.purchaseDetailNum = row.采购合同明细流水号
|
||||
this.materialLocate = row.物料与货位对照流水号
|
||||
this.enableOut = row.货位存量 - row.待出库数量
|
||||
},
|
||||
execaddListDetail(formName) {
|
||||
if (this.pickingListNumberx === '') {
|
||||
this.$message.error('请选择领料单')
|
||||
} else if (this.OutNumber === '') {
|
||||
this.$message.error('请输入领用数量')
|
||||
} else if (this.form2.OutNumber === '' || this.form2.OutNumber > this.enableOut) {
|
||||
console.log(this.enableOut)
|
||||
this.$message.error('请正确输入领用数量')
|
||||
} else {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form2.OutNumber, this.partType, this.form2.outNote, this.craftplannumber, this.receive, this.teamPart, this.locatenumber, 0).then(response => {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form2.OutNumber, this.partType, this.form2.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 0, this.materialLocate).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.searchPartinfo()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
@@ -821,18 +873,22 @@ export default {
|
||||
this.materialType = row.物料规格
|
||||
this.dialogFormVisibleWork = true
|
||||
this.purchaseDetailNum = row.采购合同明细流水号
|
||||
this.materialLocate = row.物料与货位对照流水号
|
||||
this.enableOut = row.货位存量
|
||||
console.log(this.enableOut)
|
||||
},
|
||||
addWorkshopListDetail(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.pickingListNumberx === '') {
|
||||
this.$message.error('请选择领料单')
|
||||
} else if (this.OutNumber === '') {
|
||||
this.$message.error('请输入领用数量')
|
||||
} else if (this.form3.OutNumber === '' || this.form3.OutNumber > this.enableOut) {
|
||||
this.$message.error('请正确输入领用数量')
|
||||
} else {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form3.OutNumber, this.partType, this.form3.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 1).then(response => {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form3.OutNumber, this.partType, this.form3.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 1, this.materialLocate).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.searchPartinfo()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<el-card>
|
||||
<span style="margin: 5px">替换单编号</span>
|
||||
<el-input v-model="substituteNumber" clearable size="small" style="width:200px" />
|
||||
<span style="margin: 5px">零件图号</span>
|
||||
<el-input v-model="partNumber" clearable size="small" style="width:200px" />
|
||||
<span style="margin: 5px">替换件名称</span>
|
||||
<el-input v-model="subPartName" clearable size="small" style="width:200px" />
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getSubstitutedCard()">查询</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
@@ -65,8 +65,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
tableDataExchange: [],
|
||||
substituteNumber: '',
|
||||
partNumber: '',
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
substituteNumber: '', // 替换单编号
|
||||
subPartName: '', // 替换件名称
|
||||
listLoading: '',
|
||||
subList: '',
|
||||
locateNumber: '',
|
||||
@@ -77,7 +79,9 @@ export default {
|
||||
// 替换单查询
|
||||
getSubstitutedCard() {
|
||||
this.listloading = true
|
||||
searchSubstitutedCard().then(response => {
|
||||
this.substituteNumber ? this.check1 = 1 : this.check1 = 0
|
||||
this.subPartName ? this.check2 = 1 : this.check2 = 0
|
||||
searchSubstitutedCard(this.check1, this.substituteNumber, this.check2, this.subPartName).then(response => {
|
||||
this.tableDataExchange = response.data
|
||||
this.listloading = false
|
||||
})
|
||||
|
||||
@@ -99,12 +99,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="机床名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组件名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
@@ -349,18 +349,24 @@ export default {
|
||||
this.picikingPeople = this.id
|
||||
console.log(this.picikingPeople)
|
||||
},
|
||||
searchMachine() { // 查询机床
|
||||
if (this.ProjectValue === '') {
|
||||
searchMachine() {
|
||||
this.MachineValue = ''
|
||||
this.Machine = []
|
||||
this.GroupNumValue = ''
|
||||
this.GroupNum = []
|
||||
if (this.ProjectValue !== '') {
|
||||
this.ProjectValue_check = 1
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchGroupList() { // 查询组号
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
|
||||
@@ -158,13 +158,83 @@
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent1"
|
||||
:current-page="pageCurrent4"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total1"
|
||||
:page-size="pageSize4"
|
||||
:total="total4"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
@size-change="handleSizeChange4"
|
||||
@current-change="handleCurrentChange4"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading2"
|
||||
:data="tableData1"
|
||||
border
|
||||
style="width: 100%;"
|
||||
height="300">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="物料名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机床图号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货位存量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件类型" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent5"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize5"
|
||||
:total="total5"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange5"
|
||||
@current-change="handleCurrentChange5"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="选择机床" center style="min-height: 300px">
|
||||
@@ -273,7 +343,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchTable, searchmachine, searchgroup, searchPurchaseTable } from '@/api/ManufacturingCenter/GroupMatching'
|
||||
import { initProject, searchTable, searchmachine, searchgroup, searchPurchaseTable, searchTable1 } from '@/api/ManufacturingCenter/GroupMatching'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -293,13 +363,22 @@ export default {
|
||||
pageSize1: 10,
|
||||
pageCurrent2: 1,
|
||||
pageSize2: 10,
|
||||
pageCurrent4: 1,
|
||||
pageSize4: 10,
|
||||
pageCurrent5: 1,
|
||||
pageSize5: 10,
|
||||
tableData7: [],
|
||||
tableData6: [],
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
state: null,
|
||||
total: null,
|
||||
total1: null,
|
||||
total2: null,
|
||||
listLoading1: false,
|
||||
listLoading2: false,
|
||||
total: 0,
|
||||
total1: 0,
|
||||
total2: 0,
|
||||
total4: 0,
|
||||
total5: 0,
|
||||
title: '',
|
||||
dialogFormVisible2: false,
|
||||
dialogFormVisible3: false,
|
||||
@@ -359,6 +438,8 @@ export default {
|
||||
methods: {
|
||||
searchData() {
|
||||
this.loading = true
|
||||
this.listLoading1 = true
|
||||
this.listLoading2 = true
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check = 1
|
||||
@@ -406,8 +487,14 @@ export default {
|
||||
searchPurchaseTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response)
|
||||
this.tableDataPurchase = response.data.rows
|
||||
this.listLoading = false
|
||||
this.total1 = response.data.total
|
||||
this.listLoading1 = false
|
||||
this.total4 = parseInt(response.data.total)
|
||||
})
|
||||
searchTable1(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response)
|
||||
this.tableData1 = response.data.rows
|
||||
this.listLoading2 = false
|
||||
this.total5 = parseInt(response.data.total)
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
@@ -481,11 +568,105 @@ export default {
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchData()
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check = 1
|
||||
} else {
|
||||
this.check = 0
|
||||
}
|
||||
if (this.machineToolNumber !== '') {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
if (this.groupNumber !== '') {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
if (this.year !== null && this.year !== '') {
|
||||
this.check3 = 1
|
||||
} else {
|
||||
this.check3 = 0
|
||||
}
|
||||
if (this.month !== null && this.month !== '') {
|
||||
this.check4 = 1
|
||||
} else {
|
||||
this.check4 = 0
|
||||
}
|
||||
if (this.time !== '' && this.time !== null) {
|
||||
this.check5 = 1
|
||||
} else {
|
||||
this.check5 = 0
|
||||
}
|
||||
searchTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].入库时间 !== null) {
|
||||
response.data.rows[i].入库时间 = response.data.rows[i].入库时间.split(' ', 2)[0]
|
||||
}
|
||||
if (response.data.rows[i].计划完成时间 !== null) {
|
||||
response.data.rows[i].计划完成时间 = response.data.rows[i].计划完成时间.split(' ', 2)[0]
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
this.total = parseInt(response.data.total)
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning('请先选择项目')
|
||||
}
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchData()
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check = 1
|
||||
} else {
|
||||
this.check = 0
|
||||
}
|
||||
if (this.machineToolNumber !== '') {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
if (this.groupNumber !== '') {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
if (this.year !== null && this.year !== '') {
|
||||
this.check3 = 1
|
||||
} else {
|
||||
this.check3 = 0
|
||||
}
|
||||
if (this.month !== null && this.month !== '') {
|
||||
this.check4 = 1
|
||||
} else {
|
||||
this.check4 = 0
|
||||
}
|
||||
if (this.time !== '' && this.time !== null) {
|
||||
this.check5 = 1
|
||||
} else {
|
||||
this.check5 = 0
|
||||
}
|
||||
searchTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].入库时间 !== null) {
|
||||
response.data.rows[i].入库时间 = response.data.rows[i].入库时间.split(' ', 2)[0]
|
||||
}
|
||||
if (response.data.rows[i].计划完成时间 !== null) {
|
||||
response.data.rows[i].计划完成时间 = response.data.rows[i].计划完成时间.split(' ', 2)[0]
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
this.total = parseInt(response.data.total)
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning('请先选择项目')
|
||||
}
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
@@ -504,6 +685,184 @@ export default {
|
||||
handleCurrentChange3(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchGroupList()
|
||||
},
|
||||
handleSizeChange4(val) {
|
||||
this.pageCurrent4 = 1
|
||||
this.pageSize4 = val
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check = 1
|
||||
} else {
|
||||
this.check = 0
|
||||
}
|
||||
if (this.machineToolNumber !== '') {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
if (this.groupNumber !== '') {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
if (this.year !== null && this.year !== '') {
|
||||
this.check3 = 1
|
||||
} else {
|
||||
this.check3 = 0
|
||||
}
|
||||
if (this.month !== null && this.month !== '') {
|
||||
this.check4 = 1
|
||||
} else {
|
||||
this.check4 = 0
|
||||
}
|
||||
if (this.time !== '' && this.time !== null) {
|
||||
this.check5 = 1
|
||||
} else {
|
||||
this.check5 = 0
|
||||
}
|
||||
searchPurchaseTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent4, this.pageSize4).then(response => {
|
||||
console.log(response)
|
||||
this.tableDataPurchase = response.data.rows
|
||||
this.listLoading1 = false
|
||||
this.total4 = parseInt(response.data.total)
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning('请先选择项目')
|
||||
}
|
||||
},
|
||||
handleCurrentChange4(val) {
|
||||
this.pageCurrent4 = val
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check = 1
|
||||
} else {
|
||||
this.check = 0
|
||||
}
|
||||
if (this.machineToolNumber !== '') {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
if (this.groupNumber !== '') {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
if (this.year !== null && this.year !== '') {
|
||||
this.check3 = 1
|
||||
} else {
|
||||
this.check3 = 0
|
||||
}
|
||||
if (this.month !== null && this.month !== '') {
|
||||
this.check4 = 1
|
||||
} else {
|
||||
this.check4 = 0
|
||||
}
|
||||
if (this.time !== '' && this.time !== null) {
|
||||
this.check5 = 1
|
||||
} else {
|
||||
this.check5 = 0
|
||||
}
|
||||
searchPurchaseTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent4, this.pageSize4).then(response => {
|
||||
console.log(response)
|
||||
this.tableDataPurchase = response.data.rows
|
||||
this.listLoading1 = false
|
||||
this.total4 = parseInt(response.data.total)
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning('请先选择项目')
|
||||
}
|
||||
},
|
||||
handleSizeChange5(val) {
|
||||
this.pageCurrent5 = 1
|
||||
this.pageSize5 = val
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check = 1
|
||||
} else {
|
||||
this.check = 0
|
||||
}
|
||||
if (this.machineToolNumber !== '') {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
if (this.groupNumber !== '') {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
if (this.year !== null && this.year !== '') {
|
||||
this.check3 = 1
|
||||
} else {
|
||||
this.check3 = 0
|
||||
}
|
||||
if (this.month !== null && this.month !== '') {
|
||||
this.check4 = 1
|
||||
} else {
|
||||
this.check4 = 0
|
||||
}
|
||||
if (this.time !== '' && this.time !== null) {
|
||||
this.check5 = 1
|
||||
} else {
|
||||
this.check5 = 0
|
||||
}
|
||||
searchTable1(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent5, this.pageSize5).then(response => {
|
||||
console.log(response)
|
||||
this.tableData1 = response.data.rows
|
||||
this.listLoading2 = false
|
||||
this.total5 = parseInt(response.data.total)
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning('请先选择项目')
|
||||
}
|
||||
},
|
||||
handleCurrentChange5(val) {
|
||||
this.pageCurrent5 = val
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check = 1
|
||||
} else {
|
||||
this.check = 0
|
||||
}
|
||||
if (this.machineToolNumber !== '') {
|
||||
this.check1 = 1
|
||||
} else {
|
||||
this.check1 = 0
|
||||
}
|
||||
if (this.groupNumber !== '') {
|
||||
this.check2 = 1
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
if (this.year !== null && this.year !== '') {
|
||||
this.check3 = 1
|
||||
} else {
|
||||
this.check3 = 0
|
||||
}
|
||||
if (this.month !== null && this.month !== '') {
|
||||
this.check4 = 1
|
||||
} else {
|
||||
this.check4 = 0
|
||||
}
|
||||
if (this.time !== '' && this.time !== null) {
|
||||
this.check5 = 1
|
||||
} else {
|
||||
this.check5 = 0
|
||||
}
|
||||
searchTable1(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent5, this.pageSize5).then(response => {
|
||||
console.log(response)
|
||||
this.tableData1 = response.data.rows
|
||||
this.listLoading2 = false
|
||||
this.total5 = parseInt(response.data.total)
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning('请先选择项目')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,40 +143,40 @@
|
||||
{{ scope.row.零件类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否外协" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="tableData[scope.$index].checked_waixie" @change="gaibianwaixie(scope.$index, scope.row)"/>
|
||||
外协
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否带料" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox :disabled="!tableData[scope.$index].checked_waixie" v-model="tableData[scope.$index].checked_dailiao"/>
|
||||
带料
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否着急" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="tableData[scope.$index].checked_zhaoji"/>
|
||||
着急
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="是否外协" align="center" width="90">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-checkbox v-model="tableData[scope.$index].checked_waixie" @change="gaibianwaixie(scope.$index, scope.row)"/>-->
|
||||
<!--外协-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="是否带料" align="center" width="90">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-checkbox :disabled="!tableData[scope.$index].checked_waixie" v-model="tableData[scope.$index].checked_dailiao"/>-->
|
||||
<!--带料-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="是否着急" align="center" width="90">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-checkbox v-model="tableData[scope.$index].checked_zhaoji"/>-->
|
||||
<!--着急-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column prop="name" label="打回原因" width="170" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-input v-model="tableData[scope.$index].name" type="textarea" :rows="1" style="width:150px" placeholder="原因">-->
|
||||
<!--</el-input>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="操作" width="300px" fixed="right" align="center">
|
||||
<el-table-column label="操作" width="200px" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleEdit(scope.$index, scope.row, 'form')">分批投产</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleDele(scope.$index, scope.row, 'form1')">打回档案</el-button>
|
||||
<!--<el-button-->
|
||||
<!--size="mini"-->
|
||||
<!--type="primary"-->
|
||||
<!--@click="handleDele(scope.$index, scope.row, 'form1')">打回</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -190,16 +190,10 @@
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
<el-checkbox v-model="checked_baitu" style="margin-top:0px">是否白图</el-checkbox>
|
||||
<el-checkbox v-model="checked_gaonandu">是否高难度</el-checkbox>
|
||||
<!--<el-checkbox v-model="checked_baitu" style="margin-top:0px">是否白图</el-checkbox>-->
|
||||
<!--<el-checkbox v-model="checked_gaonandu">是否高难度</el-checkbox>-->
|
||||
<el-button type="primary" size="small" style="float:right;margin-top:10px" @click="production">投产</el-button>
|
||||
</div>
|
||||
|
||||
<!--<el-row>-->
|
||||
<!--<el-checkbox v-model="checked_baitu" style="margin-top:20px">是否白图</el-checkbox>-->
|
||||
<!--<el-checkbox v-model="checked_gaonandu">是否高难度</el-checkbox>-->
|
||||
<!--<el-button type="primary" size="small" @click="production" style="float:right;margin-top:10px">投产</el-button>-->
|
||||
<!--</el-row>-->
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
@@ -236,14 +230,14 @@
|
||||
label="批次数量">
|
||||
<template slot-scope="scope">{{ scope.row.批次数量 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="是否外协">
|
||||
<template slot-scope="scope">{{ scope.row.是否外协 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="是否带料">
|
||||
<template slot-scope="scope">{{ scope.row.是否带料 }}</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column-->
|
||||
<!--label="是否外协">-->
|
||||
<!--<template slot-scope="scope">{{ scope.row.是否外协 }}</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column-->
|
||||
<!--label="是否带料">-->
|
||||
<!--<template slot-scope="scope">{{ scope.row.是否带料 }}</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column
|
||||
label="机加工开始时间">
|
||||
<template slot-scope="scope">{{ scope.row.机加工开始时间 }}</template>
|
||||
@@ -289,7 +283,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible1" center width="24%">
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible1" center width="450px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="零件图号" prop="PDnumber">
|
||||
<el-input v-model="form.PDnumber" size="small" readonly style="width:250px" />
|
||||
@@ -415,7 +409,7 @@ export default {
|
||||
toolNumValue: '',
|
||||
toolNum: [], // 机床号
|
||||
NumValue: '',
|
||||
Num: [], // 机床后什么号
|
||||
Num: [], // 分组
|
||||
liushuihao: '',
|
||||
gongyijihua: '',
|
||||
radio: 0, // 第一组
|
||||
|
||||
@@ -74,19 +74,19 @@
|
||||
<el-tab-pane label="基本件">
|
||||
<el-table :data="tableData1" border size="mini" style="width: 100%" height="300px" @selection-change="handleSelectionChange">
|
||||
<el-table-column align="center" width="50" type="selection"/>
|
||||
<el-table-column label="物料名称" align="center">
|
||||
<el-table-column label="零件名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center">
|
||||
<el-table-column label="零件图号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center">
|
||||
<el-table-column label="材料" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center">
|
||||
@@ -186,8 +186,8 @@
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<el-button type="success" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="purchaseRequisition()">车间请购</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="PurchasingDepartment()">采购部门采购</el-button>
|
||||
<el-button type="warning" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="Production()">车间生产</el-button>
|
||||
<el-button v-show="PartType!=='基本件'" type="primary" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="PurchasingDepartment()">采购部门采购</el-button>
|
||||
<el-button v-show="PartType==='基本件'" type="warning" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="Production()">车间生产</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-row>
|
||||
@@ -228,6 +228,60 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData6" border size="mini" style="width: 100%" height="300px">
|
||||
<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-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" width="250px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="MoveOut(scope.row)">移出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData5" border size="mini" style="width: 100%" height="300px">
|
||||
<el-table-column label="物料名称" align="center">
|
||||
@@ -282,7 +336,6 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="请购单编号" prop="请购单编号">
|
||||
@@ -323,12 +376,11 @@
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchmachine, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed, purchaseRequisition, purchaseRequisition1, MoveOut, MoveOut1, PurchasingDepartment, Production } from '@/api/ManufacturingCenter/PartAssignment'
|
||||
import { initProject, searchmachine, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed, searchDetailed1, purchaseRequisition, purchaseRequisition1, MoveOut, MoveOut1, PurchasingDepartment, Production } from '@/api/ManufacturingCenter/PartAssignment'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
inject: ['reload'],
|
||||
@@ -352,6 +404,7 @@ export default {
|
||||
tableData3: [],
|
||||
tableData4: [],
|
||||
tableData5: [],
|
||||
tableData6: [],
|
||||
loading: false,
|
||||
title: '',
|
||||
dialogFormVisible: false,
|
||||
@@ -370,6 +423,7 @@ export default {
|
||||
StandardPartsAndOutsourcing: [],
|
||||
MaterialNum: [],
|
||||
MaterialName: [],
|
||||
PartToolNumber: [],
|
||||
MaterialSpecification: [],
|
||||
MaterialModel: [],
|
||||
NumberOfParts: [],
|
||||
@@ -582,24 +636,41 @@ export default {
|
||||
searchDetailed(row) {
|
||||
this.RequisitionList = row.请购单流水号
|
||||
searchDetailed(row.请购单流水号).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料计划到货时间 !== '') {
|
||||
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData5 = response.data
|
||||
})
|
||||
searchDetailed1(row.请购单流水号).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料计划到货时间 !== '') {
|
||||
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData6 = response.data
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
console.log(val)
|
||||
if (this.PartType === '基本件') {
|
||||
this.MaterialNum = []
|
||||
this.BasicPartsNumber = []
|
||||
this.MaterialName = []
|
||||
this.MaterialSpecification = []
|
||||
this.MaterialModel = []
|
||||
this.PartToolNumber = []
|
||||
this.Material = []
|
||||
this.NumberOfParts = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.MaterialNum[i] = val[i].物料流水号
|
||||
this.BasicPartsNumber[i] = val[i].基本件流水号
|
||||
this.MaterialName[i] = val[i].零件名称
|
||||
this.PartToolNumber[i] = val[i].零件图号
|
||||
this.Material[i] = val[i].材料
|
||||
this.NumberOfParts[i] = val[i].零件数量
|
||||
}
|
||||
} else if (this.PartType === '外购件') {
|
||||
this.MaterialNum = []
|
||||
this.StandardPartsAndOutsourcing = []
|
||||
this.MaterialName = []
|
||||
this.MaterialSpecification = []
|
||||
@@ -614,7 +685,12 @@ export default {
|
||||
this.NumberOfParts[i] = val[i].零件数量
|
||||
}
|
||||
} else if (this.PartType === '标准件') {
|
||||
this.MaterialNum = []
|
||||
this.StandardPartsAndOutsourcing = []
|
||||
this.MaterialName = []
|
||||
this.MaterialSpecification = []
|
||||
this.MaterialModel = []
|
||||
this.NumberOfParts = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.StandardPartsAndOutsourcing[i] = val[i].标准件和外购件流水号
|
||||
this.MaterialNum[i] = val[i].物料流水号
|
||||
@@ -631,7 +707,7 @@ export default {
|
||||
this.result = 0
|
||||
if (this.PartType === '基本件') {
|
||||
for (let i = 0; i < this.BasicPartsNumber.length; i++) {
|
||||
purchaseRequisition(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.BasicPartsNumber[i], this.MaterialName[i], this.NumberOfParts[i], 3, this.time, this.MaterialNum[i]).then(response => {
|
||||
purchaseRequisition(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.BasicPartsNumber[i], this.MaterialName[i], this.PartToolNumber[i], this.Material[i], this.NumberOfParts[i], 3, this.time, this.MaterialNum[i]).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
console.log(this.result)
|
||||
if (this.result === this.BasicPartsNumber.length) {
|
||||
@@ -640,8 +716,13 @@ export default {
|
||||
searchPart(this.groupFloatValue).then(response => {
|
||||
this.tableData1 = response.data
|
||||
})
|
||||
searchDetailed(this.RequisitionList).then(response => {
|
||||
this.tableData5 = response.data
|
||||
searchDetailed1(this.RequisitionList).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料计划到货时间 !== '') {
|
||||
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData6 = response.data
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -656,6 +737,11 @@ export default {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
searchDetailed(this.RequisitionList).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料计划到货时间 !== '') {
|
||||
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData5 = response.data
|
||||
})
|
||||
}
|
||||
@@ -671,6 +757,11 @@ export default {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
searchDetailed(this.RequisitionList).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].物料计划到货时间 !== '') {
|
||||
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData5 = response.data
|
||||
})
|
||||
}
|
||||
@@ -685,10 +776,12 @@ export default {
|
||||
}
|
||||
},
|
||||
PurchasingDepartment() {
|
||||
this.result = 0
|
||||
if (this.time !== '') {
|
||||
for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) {
|
||||
PurchasingDepartment(this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.time, this.MaterialNum[i], this.NumberOfParts[i], this.projectFloatValue, this.machineFloatValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.StandardPartsAndOutsourcing.length) {
|
||||
this.$message.success('请购成功')
|
||||
if (this.PartType === '外购件') {
|
||||
searchPart1(this.groupFloatValue, 2).then(response => {
|
||||
@@ -699,7 +792,7 @@ export default {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
}
|
||||
} else { this.$message.error('请购失败') }
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="零件投产数量" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.投产总数量 }}
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -588,7 +588,7 @@ export default {
|
||||
total: 0,
|
||||
tableData: [],
|
||||
loading: false,
|
||||
PrNum: '027W191482-0001',
|
||||
PrNum: '',
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
机床号: '',
|
||||
@@ -617,6 +617,7 @@ export default {
|
||||
searchData() {
|
||||
this.loading = true
|
||||
search(this.pageCurrent, this.pageSize, this.PrNum).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
|
||||
280
src/views/ManufacturingCenter/ProcessAdjustQuery/index.vue
Normal file
280
src/views/ManufacturingCenter/ProcessAdjustQuery/index.vue
Normal file
@@ -0,0 +1,280 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>工艺员:</span>
|
||||
<el-select v-model="craftmenValue" placeholder="工艺员" size="small" style="width:100px" @change="searchParts()">
|
||||
<el-option
|
||||
v-for="item in craftmen"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件图号:</span>
|
||||
<el-select v-model="partNumValue" filterable placeholder="零件图号" style="margin-right: 10px" size="small" clearable @clear="returnDate = ''">
|
||||
<el-option
|
||||
v-for="item in partNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchData()">查询</el-button>
|
||||
<span>打回时间:</span>
|
||||
<el-date-picker v-model="returnDate" :clearable="false" type="datetime" placeholder="打回时间" size="small" readonly/>
|
||||
</el-card>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-card>
|
||||
<div style="display: inline-block;margin-bottom: 20px">改前零件工艺</div>
|
||||
<el-table id="div1" ref="div1" :data="tableData1" :row-class-name="tableRowClassName1" size="mini" border style="height:350px;overflow-y: auto;" @mouseenter.native="changeScrollBefore">
|
||||
<el-table-column align="center" label="工序顺序" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序顺序 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="工艺名称" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="难度等级" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺难度等级 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column header-align="center" label="工艺要求">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺要求 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card style="margin-left:15px">
|
||||
<div style="display: inline-block;margin-bottom: 20px">改后零件工艺</div>
|
||||
<el-table id="div2" ref="div2" :data="tableData2" :row-class-name="tableRowClassName2" size="mini" border style="height:350px;overflow-y: scroll;" @mouseenter.native="changeScrollAfter">
|
||||
<el-table-column align="center" label="工序顺序" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序顺序 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="工艺名称" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="难度等级" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺难度等级 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column header-align="center" label="工艺要求">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺要求 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-card>
|
||||
<div id="myChart" :style="{width: '100%', height: '400px', margin: 'auto'}"/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts'
|
||||
import { initCraftmen, searchPart, searchProcessOld, searchProcessNew, searchChart } from '@/api/ManufacturingCenter/ProcessAdjustQuery'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
returnDate: '',
|
||||
craftmenValue: '',
|
||||
craftmen: [],
|
||||
partNumValue: '', // 工艺计划流水号
|
||||
partNum: [],
|
||||
partStatus: '',
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
dataX: [],
|
||||
partsNum: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchChart()
|
||||
},
|
||||
methods: {
|
||||
changeScrollBefore() {
|
||||
const div1 = document.getElementById('div1')
|
||||
const div2 = document.getElementById('div2')
|
||||
div2.removeAttribute('onscroll')
|
||||
div1.setAttribute('onscroll', 'document.getElementById(\'div2\').scrollTop = scrollTop')
|
||||
},
|
||||
changeScrollAfter() {
|
||||
const div1 = document.getElementById('div1')
|
||||
const div2 = document.getElementById('div2')
|
||||
div1.removeAttribute('onscroll')
|
||||
div2.setAttribute('onscroll', 'document.getElementById(\'div1\').scrollTop = scrollTop')
|
||||
},
|
||||
searchChart() {
|
||||
searchChart().then(response => {
|
||||
console.log(response, 11)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.dataX.push(response.data[i].姓名)
|
||||
this.partsNum.push(response.data[i].零件数量)
|
||||
}
|
||||
this.drawLine()
|
||||
})
|
||||
},
|
||||
drawLine() {
|
||||
const myChart = echarts.init(document.getElementById('myChart'))
|
||||
myChart.clear()
|
||||
myChart.setOption({
|
||||
title: {
|
||||
text: '在制零件工艺调整统计',
|
||||
left: 'center'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
name: '工艺员',
|
||||
data: this.dataX,
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
rotate: 0,
|
||||
margin: 10
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: '工艺被调整零件数',
|
||||
min: 0,
|
||||
minInterval: 1
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '工艺调整零件数',
|
||||
type: 'bar',
|
||||
data: this.partsNum,
|
||||
markLine: {
|
||||
data: [
|
||||
{ type: 'average', name: '平均值' }
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
},
|
||||
fetchData() {
|
||||
this.craftmen = []
|
||||
initCraftmen().then(response => { // 初始化工艺员
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.craftmen.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchParts() {
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
this.partNum = []
|
||||
this.partNumValue = ''
|
||||
this.returnDate = ''
|
||||
searchPart(this.craftmenValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.partNum.push({
|
||||
label: response.data[i].零件图号_零件工艺计划,
|
||||
value: response.data[i].工艺计划流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchData() {
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
if (this.partNumValue !== '' && this.partNumValue !== null) {
|
||||
searchProcessOld(this.partNumValue).then(response => {
|
||||
this.tableData1 = response.data
|
||||
this.returnDate = response.data[0].操作时间
|
||||
})
|
||||
searchProcessNew(this.partNumValue).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请先选择零件')
|
||||
}
|
||||
},
|
||||
tableRowClassName2({ row }) {
|
||||
for (let i = 0; i < this.tableData1.length; i++) {
|
||||
row.工艺编号 === null ? row.工艺编号 = 0 : row.工艺编号
|
||||
if (this.tableData1[i].工序流水号 === row.工序流水号 && this.tableData1[i].工艺编号 !== null) {
|
||||
if (this.tableData1[i].工艺编号 !== row.工艺编号 || this.tableData1[i].工艺要求 !== row.工艺要求 || this.tableData1[i].工艺难度等级 !== row.工艺难度等级) {
|
||||
return 'change'
|
||||
} else {
|
||||
if (this.tableData1[i].工序顺序 !== row.工序顺序 && (row.工艺要求 || row.工艺难度等级)) {
|
||||
return 'change'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
tableRowClassName1({ row }) {
|
||||
for (let i = 0; i < this.tableData2.length; i++) {
|
||||
row.工艺编号 === null ? row.工艺编号 = 0 : row.工艺编号
|
||||
if (this.tableData2[i].工序流水号 === row.工序流水号 && this.tableData2[i].工艺编号 !== null) {
|
||||
if (this.tableData2[i].工艺编号 !== row.工艺编号 || this.tableData2[i].工艺要求 !== row.工艺要求 || this.tableData2[i].工艺难度等级 !== row.工艺难度等级) {
|
||||
return 'change'
|
||||
} else {
|
||||
if (this.tableData1[i].工序顺序 !== row.工序顺序 && (row.工艺要求 || row.工艺难度等级)) {
|
||||
return 'change'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-table .change {
|
||||
background: oldlace;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:200px
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
@@ -10,8 +10,8 @@
|
||||
partNumValue = '';typeValue = '';partName = '';
|
||||
material = '';materialName = '';spec = '';batchNum = '';
|
||||
searchParts()">
|
||||
<el-radio :label="1">未编制</el-radio>
|
||||
<el-radio :label="2">已编制</el-radio>
|
||||
<el-radio v-model="radio" :label="1">未编制</el-radio>
|
||||
<el-radio v-model="radio" :label="2">已编制</el-radio>
|
||||
</el-radio-group>
|
||||
<span>工艺员:</span>
|
||||
<el-select
|
||||
@@ -205,7 +205,7 @@
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dialogMaterial=false">提交</el-button>
|
||||
<el-button type="primary" size="small" @click="selectMaterial2()">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
@@ -616,7 +616,9 @@ export default {
|
||||
result: 0,
|
||||
oldNum: '',
|
||||
newNum: '',
|
||||
tableRecord: []
|
||||
tableRecord: [],
|
||||
materialName2: '',
|
||||
material2: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -635,15 +637,6 @@ export default {
|
||||
this.spec = ''
|
||||
this.batchNum = ''
|
||||
},
|
||||
// tableRowClassName({ row }) {
|
||||
// for (let i = 0; i < this.tableRecord.length; i++) {
|
||||
// if (this.tableRecord[i].工序流水号 === row.工序流水号 && this.radio === 2 && this.tableRecord[i].工艺编号 !== null) { // && this.tableRecord[i].工艺难度等级 !== null && this.tableRecord[i].工艺要求 !== null
|
||||
// if (this.tableRecord[i].工艺编号 !== row.工艺编号 || this.tableRecord[i].工艺要求 !== row.工艺要求 || this.tableRecord[i].工艺难度等级 !== row.工艺难度等级 || this.tableRecord[i].工序顺序 !== row.工序顺序) {
|
||||
// return 'change'
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
returnEdit() { // 在制零件工艺修改
|
||||
if (this.partNumValue === '' || this.partNumValue === null) {
|
||||
this.$message.error('请选择零件')
|
||||
@@ -688,10 +681,17 @@ export default {
|
||||
}
|
||||
},
|
||||
selectMaterial(row) { // 选择材质
|
||||
this.materialName2 = ''
|
||||
this.material2 = ''
|
||||
this.materialName2 = row.材料
|
||||
this.material2 = row.材料流水号
|
||||
},
|
||||
selectMaterial2() {
|
||||
this.materialName = ''
|
||||
this.material = ''
|
||||
this.materialName = row.材料
|
||||
this.material = row.材料流水号
|
||||
this.materialName = this.materialName2
|
||||
this.material = this.material2
|
||||
this.dialogMaterial = false
|
||||
},
|
||||
fetchData() {
|
||||
this.materialClass = []
|
||||
@@ -923,10 +923,8 @@ export default {
|
||||
this.tableData[i].工艺难度等级 = this.tableData2[i].工艺难度等级
|
||||
this.tableData[i].工艺要求 = this.tableData2[i].工艺要求
|
||||
selectRequest(this.tableData[i].工序流水号, this.tableData[i].工艺计划流水号, this.tableData2[i].工艺编号, this.tableData2[i].工艺序号, this.tableData2[i].工艺要求).then(response => {
|
||||
console.log('该工艺保存成功', 501)
|
||||
})
|
||||
hardEdit(this.tableData[i].工序流水号, this.tableData2[i].工艺难度等级).then(response => {
|
||||
console.log(response.data, '难度等级修改成功', 502)
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
}
|
||||
@@ -970,7 +968,6 @@ export default {
|
||||
this.$message.error('请在主界面选择一个零件作为被拷贝对象')
|
||||
} else {
|
||||
gongyiCopy(this.num, this.partNumValue).then(() => { // 工艺计划流水号_完成工艺, 工艺计划流水号_被拷工艺
|
||||
console.log('已拷贝到主表', 503)
|
||||
this.searchDetail()
|
||||
})
|
||||
}
|
||||
@@ -985,18 +982,15 @@ export default {
|
||||
}
|
||||
}
|
||||
gongyiYQ(this.num).then(response => {
|
||||
console.log(response.data, 119)
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
},
|
||||
hardEdit(row) { // 修改难度等级
|
||||
hardEdit(row.工序流水号, row.工艺难度等级).then(response => {
|
||||
console.log(response.data, '难度等级修改成功', 504)
|
||||
})
|
||||
},
|
||||
requestEdit(row) { // 修改工艺要求
|
||||
requestEdit(row.工序流水号, row.工艺要求).then(response => {
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
},
|
||||
tableSearch(index) { // 主界面工艺名称分类、工艺名称及工艺要求后续查询
|
||||
@@ -1027,7 +1021,10 @@ export default {
|
||||
}
|
||||
},
|
||||
cChange() { // 工艺名称分类改变
|
||||
this.processNameValue = ''
|
||||
this.processName = []
|
||||
this.processRequestValue = ''
|
||||
this.processRequest = []
|
||||
for (let i = 0; i < this.processNameClass.length; i++) {
|
||||
if (this.processNameClassValue === this.processNameClass[i].value) {
|
||||
processNameSelect(this.processSelect[i].value).then(response => { // 查询工艺名称
|
||||
@@ -1042,6 +1039,7 @@ export default {
|
||||
}
|
||||
},
|
||||
nChange() { // 工艺名称改变
|
||||
this.processRequestValue = ''
|
||||
this.processRequest = []
|
||||
for (let i = 0; i < this.processName.length; i++) {
|
||||
if (this.processNameValue === this.processName[i].value) {
|
||||
@@ -1063,7 +1061,6 @@ export default {
|
||||
this.tableData[this.index].工艺要求 = this.str
|
||||
this.dialogFormVisible2 = false
|
||||
selectRequest(this.tableData[this.index].工序流水号, this.tableData[this.index].工艺计划流水号, this.tableData[this.index].工艺编号, this.tableData[this.index].工序顺序, this.tableData[this.index].工艺要求).then(response => {
|
||||
console.log('该工艺保存成功', 506)
|
||||
})
|
||||
},
|
||||
calTol() { // 计算公差
|
||||
@@ -1114,7 +1111,6 @@ export default {
|
||||
this.$message.error('请先选择一个零件')
|
||||
} else {
|
||||
insertOne(this.partNumValue, row.工序流水号).then(response => {
|
||||
console.log(response.data, '插入成功', 507)
|
||||
this.searchDetail()
|
||||
})
|
||||
}
|
||||
@@ -1145,7 +1141,6 @@ export default {
|
||||
this.$message.error('请先选择一个零件')
|
||||
} else {
|
||||
upOne(this.partNumValue, row.工序流水号).then(response => {
|
||||
console.log(response.data, '上移成功', 508)
|
||||
this.searchDetail()
|
||||
})
|
||||
}
|
||||
@@ -1155,7 +1150,6 @@ export default {
|
||||
this.$message.error('请先选择一个零件')
|
||||
} else {
|
||||
downOne(this.partNumValue, row.工序流水号).then(response => {
|
||||
console.log(response.data, '下移成功', 509)
|
||||
this.searchDetail()
|
||||
})
|
||||
}
|
||||
@@ -1198,7 +1192,6 @@ export default {
|
||||
}).then(() => {
|
||||
for (let i = 0; i < 30; i++) {
|
||||
hardEdit(this.tableData[i].工序流水号, '').then(response => {
|
||||
console.log(response.data, '清空难度等级', 510)
|
||||
})
|
||||
}
|
||||
deleteTable(this.newNum).then(response => {
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 200px;"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=10;total = 0">查询</el-button>
|
||||
<span>进度颜色:</span>
|
||||
<!--<span style="background-color: white">全部</span>-->
|
||||
<span style="background-color: red">拖期</span>
|
||||
<span style="background-color: yellow">即将拖期</span>
|
||||
<span style="background-color: lawngreen">如期</span>
|
||||
<span style="background-color: deepskyblue">工序外协</span>
|
||||
<span style="background-color: grey">报废</span>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
@@ -396,7 +396,6 @@ export default {
|
||||
this.Groups = []
|
||||
if (this.project !== '') {
|
||||
getMachines(this.project).then(response => {
|
||||
console.log(response.data)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machines.push({
|
||||
label: response.data[i].机床图号,
|
||||
|
||||
733
src/views/ManufacturingCenter/ProcessingStatusEdit/index.vue
Normal file
733
src/views/ManufacturingCenter/ProcessingStatusEdit/index.vue
Normal file
@@ -0,0 +1,733 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="project" size="small" filterable clearable placeholder="项目名称" @change="getMachine">
|
||||
<el-option
|
||||
v-for="item in projects"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床号:</span>
|
||||
<el-select v-model="Machine" size="small" clearable placeholder="机床号" @change="getGroup">
|
||||
<el-option
|
||||
v-for="item in Machines"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="Group" size="small" clearable placeholder="组号">
|
||||
<el-option
|
||||
v-for="item in Groups"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件号:</span>
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 200px;"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="pageCurrent=1;pageSize=10;total = 0;getTableData();">查询</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading1"
|
||||
:data="tableData1"
|
||||
class="table"
|
||||
border
|
||||
height="650">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
width="50"
|
||||
type="index"/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="零件图号"
|
||||
width="200px">
|
||||
<template slot-scope="scope">{{ 零件图号[scope.$index] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="零件名称"
|
||||
width="120px">
|
||||
<template slot-scope="scope"> {{ 零件名称[scope.$index] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="address"
|
||||
label="数量">
|
||||
<template slot-scope="scope">{{ 投产数量[scope.$index] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件加工计划进度(工艺名称,计划完成时间,实际完成时间,员工名称)" >
|
||||
<el-table-column label="[1]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][0]" @click="handleChange1(scope.$index, scope.row, 'form', 0)">
|
||||
<h4>{{ process[scope.$index][0] }}</h4><h4>{{ planDate[scope.$index][0] }} </h4><h4> {{ realDate[scope.$index][0] }}</h4><h4> {{ worker[scope.$index][0] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[2]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][1]" @click="handleChange1(scope.$index, scope.row, 'form', 1)">
|
||||
<h4>{{ process[scope.$index][1] }}</h4><h4>{{ planDate[scope.$index][1] }} </h4><h4> {{ realDate[scope.$index][1] }}</h4><h4> {{ worker[scope.$index][1] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[3]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][2]" @click="handleChange1(scope.$index, scope.row, 'form', 2)">
|
||||
<h4>{{ process[scope.$index][2] }}</h4><h4>{{ planDate[scope.$index][2] }} </h4><h4> {{ realDate[scope.$index][2] }}</h4><h4> {{ worker[scope.$index][2] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[4]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][3]" @click="handleChange1(scope.$index, scope.row, 'form', 3)">
|
||||
<h4>{{ process[scope.$index][3] }}</h4><h4>{{ planDate[scope.$index][3] }} </h4><h4> {{ realDate[scope.$index][3] }}</h4><h4> {{ worker[scope.$index][3] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[5]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][4]" @click="handleChange1(scope.$index, scope.row, 'form', 4)">
|
||||
<h4>{{ process[scope.$index][4] }}</h4><h4>{{ planDate[scope.$index][4] }} </h4><h4> {{ realDate[scope.$index][4] }}</h4><h4> {{ worker[scope.$index][4] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[6]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][5]" @click="handleChange1(scope.$index, scope.row, 'form', 5)">
|
||||
<h4>{{ process[scope.$index][5] }}</h4><h4>{{ planDate[scope.$index][5] }} </h4><h4> {{ realDate[scope.$index][5] }}</h4><h4> {{ worker[scope.$index][5] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[7]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][6]" @click="handleChange1(scope.$index, scope.row, 'form', 6)">
|
||||
<h4>{{ process[scope.$index][6] }}</h4><h4>{{ planDate[scope.$index][6] }} </h4><h4> {{ realDate[scope.$index][6] }}</h4><h4> {{ worker[scope.$index][6] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[8]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][7]" @click="handleChange1(scope.$index, scope.row, 'form', 7)">
|
||||
<h4>{{ process[scope.$index][7] }}</h4><h4>{{ planDate[scope.$index][7] }} </h4><h4> {{ realDate[scope.$index][7] }}</h4><h4> {{ worker[scope.$index][7] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[9]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][8]" @click="handleChange1(scope.$index, scope.row, 'form', 8)">
|
||||
<h4>{{ process[scope.$index][8] }}</h4><h4>{{ planDate[scope.$index][8] }} </h4><h4> {{ realDate[scope.$index][8] }}</h4><h4> {{ worker[scope.$index][8] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[10]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][9]" @click="handleChange1(scope.$index, scope.row, 'form', 9)">
|
||||
<h4>{{ process[scope.$index][9] }}</h4><h4>{{ planDate[scope.$index][9] }} </h4><h4> {{ realDate[scope.$index][9] }}</h4><h4> {{ worker[scope.$index][9] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[11]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][10]" @click="handleChange1(scope.$index, scope.row, 'form', 10)">
|
||||
<h4>{{ process[scope.$index][10] }}</h4><h4>{{ planDate[scope.$index][10] }} </h4><h4> {{ realDate[scope.$index][10] }}</h4><h4> {{ worker[scope.$index][10] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[12]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][11]" @click="handleChange1(scope.$index, scope.row, 'form', 11)">
|
||||
<h4>{{ process[scope.$index][11] }}</h4><h4>{{ planDate[scope.$index][11] }} </h4><h4> {{ realDate[scope.$index][11] }}</h4><h4> {{ worker[scope.$index][11] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[13]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][12]" @click="handleChange1(scope.$index, scope.row, 'form', 12)">
|
||||
<h4>{{ process[scope.$index][12] }}</h4><h4>{{ planDate[scope.$index][12] }} </h4><h4> {{ realDate[scope.$index][12] }}</h4><h4> {{ worker[scope.$index][12] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[14]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][13]" @click="handleChange1(scope.$index, scope.row, 'form', 13)">
|
||||
<h4>{{ process[scope.$index][13] }}</h4><h4>{{ planDate[scope.$index][13] }} </h4><h4> {{ realDate[scope.$index][13] }}</h4><h4> {{ worker[scope.$index][13] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[15]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][14]" @click="handleChange1(scope.$index, scope.row, 'form', 14)">
|
||||
<h4>{{ process[scope.$index][14] }}</h4><h4>{{ planDate[scope.$index][14] }} </h4><h4> {{ realDate[scope.$index][14] }}</h4><h4> {{ worker[scope.$index][14] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[16]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][15]" @click="handleChange1(scope.$index, scope.row, 'form', 15)">
|
||||
<h4>{{ process[scope.$index][15] }}</h4><h4>{{ planDate[scope.$index][15] }} </h4><h4> {{ realDate[scope.$index][15] }}</h4><h4> {{ worker[scope.$index][15] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[17]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][16]" @click="handleChange1(scope.$index, scope.row, 'form', 16)">
|
||||
<h4>{{ process[scope.$index][16] }}</h4><h4>{{ planDate[scope.$index][16] }} </h4><h4> {{ realDate[scope.$index][16] }}</h4><h4> {{ worker[scope.$index][16] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[18]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][17]" @click="handleChange1(scope.$index, scope.row, 'form', 17)">
|
||||
<h4>{{ process[scope.$index][17] }}</h4><h4>{{ planDate[scope.$index][17] }} </h4><h4> {{ realDate[scope.$index][17] }}</h4><h4> {{ worker[scope.$index][17] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[19]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][18]" @click="handleChange1(scope.$index, scope.row, 'form', 18)">
|
||||
<h4>{{ process[scope.$index][18] }}</h4><h4>{{ planDate[scope.$index][18] }} </h4><h4> {{ realDate[scope.$index][18] }}</h4><h4> {{ worker[scope.$index][18] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[20]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][19]" @click="handleChange1(scope.$index, scope.row, 'form', 19)">
|
||||
<h4>{{ process[scope.$index][19] }}</h4><h4>{{ planDate[scope.$index][19] }} </h4><h4> {{ realDate[scope.$index][19] }}</h4><h4> {{ worker[scope.$index][19] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[21]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][20]" @click="handleChange1(scope.$index, scope.row, 'form', 20)">
|
||||
<h4>{{ process[scope.$index][20] }}</h4><h4>{{ planDate[scope.$index][20] }} </h4><h4> {{ realDate[scope.$index][20] }}</h4><h4> {{ worker[scope.$index][20] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[22]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][21]" @click="handleChange1(scope.$index, scope.row, 'form', 21)">
|
||||
<h4>{{ process[scope.$index][21] }}</h4><h4>{{ planDate[scope.$index][21] }} </h4><h4> {{ realDate[scope.$index][21] }}</h4><h4> {{ worker[scope.$index][21] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[23]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][22]" @click="handleChange1(scope.$index, scope.row, 'form', 22)">
|
||||
<h4>{{ process[scope.$index][22] }}</h4><h4>{{ planDate[scope.$index][22] }} </h4><h4> {{ realDate[scope.$index][22] }}</h4><h4> {{ worker[scope.$index][22] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[24]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][23]" @click="handleChange1(scope.$index, scope.row, 'form', 23)">
|
||||
<h4>{{ process[scope.$index][23] }}</h4><h4>{{ planDate[scope.$index][23] }} </h4><h4> {{ realDate[scope.$index][23] }}</h4><h4> {{ worker[scope.$index][23] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[25]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][24]" @click="handleChange1(scope.$index, scope.row, 'form', 24)">
|
||||
<h4>{{ process[scope.$index][24] }}</h4><h4>{{ planDate[scope.$index][24] }} </h4><h4> {{ realDate[scope.$index][24] }}</h4><h4> {{ worker[scope.$index][24] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[26]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][25]" @click="handleChange1(scope.$index, scope.row, 'form', 25)">
|
||||
<h4>{{ process[scope.$index][25] }}</h4><h4>{{ planDate[scope.$index][25] }} </h4><h4> {{ realDate[scope.$index][25] }}</h4><h4> {{ worker[scope.$index][25] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[27]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][26]" @click="handleChange1(scope.$index, scope.row, 'form', 26)">
|
||||
<h4>{{ process[scope.$index][26] }}</h4><h4>{{ planDate[scope.$index][26] }} </h4><h4> {{ realDate[scope.$index][26] }}</h4><h4> {{ worker[scope.$index][26] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[28]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][27]" @click="handleChange1(scope.$index, scope.row, 'form', 27)">
|
||||
<h4>{{ process[scope.$index][27] }}</h4><h4>{{ planDate[scope.$index][27] }} </h4><h4> {{ realDate[scope.$index][27] }}</h4><h4> {{ worker[scope.$index][27] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[29]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][28]" @click="handleChange1(scope.$index, scope.row, 'form', 28)">
|
||||
<h4>{{ process[scope.$index][28] }}</h4><h4>{{ planDate[scope.$index][28] }} </h4><h4> {{ realDate[scope.$index][28] }}</h4><h4> {{ worker[scope.$index][28] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="[30]" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode[scope.$index][29]" @click="handleChange1(scope.$index, scope.row, 'form', 29)">
|
||||
<h4>{{ process[scope.$index][29] }}</h4><h4>{{ planDate[scope.$index][29] }} </h4><h4> {{ realDate[scope.$index][29] }}</h4><h4> {{ worker[scope.$index][29] }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="90px" class="demo-ruleForm">
|
||||
<el-row width="200px">
|
||||
<el-form-item label="操作员" prop="人员" >
|
||||
<el-input v-model="form.人员" placeholder="操作员" readonly size="small" style="width: 80%" @focus="dialogTableVisible" />
|
||||
</el-form-item>
|
||||
<el-form-item label="考勤编号" prop="考勤编号" >
|
||||
<el-input v-model="form.考勤编号" placeholder="考勤编号" disabled size="small" style="width: 80%" />
|
||||
</el-form-item>
|
||||
<el-form-item label="完成日期" prop="完成时间">
|
||||
<el-date-picker
|
||||
v-model="form.完成时间"
|
||||
style="width: 80%"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="submit('form')" >确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="人员信息" center width="750px">
|
||||
<div style="height: 500px">
|
||||
<div style="float: left;margin-top: 10px;margin-left: 20px;overflow-y: scroll;height: 400px">
|
||||
<el-tree
|
||||
:data="data2"
|
||||
node-key="id"
|
||||
style="width: 150px;float: left"
|
||||
height="400"
|
||||
accordion
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
<el-table :data="List1" highlight-current-row height="400" style="width: 400px;float: left;margin-left: 30px" @row-click="handleCurrentChange2">
|
||||
<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>
|
||||
</div>
|
||||
<el-button style="margin-left: 260px" @click="dialogFormVisible1 = false">取消</el-button>
|
||||
<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { handlechange3, getTable8, getTree, fn, dialogtablevisible, getNames, getMachines, getGroups, getTable, getTable2, handlechange, handlechange2 } from '@/api/ManufacturingCenter/ProcessingStatusEdit'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
midd: 0,
|
||||
ssks: '',
|
||||
cjscgy: '',
|
||||
List1: [],
|
||||
data2: [],
|
||||
dialogFormVisible1: false,
|
||||
Name: '',
|
||||
person: '',
|
||||
title: '',
|
||||
Num: '',
|
||||
form: {
|
||||
人员: '',
|
||||
考勤编号: '',
|
||||
完成时间: ''
|
||||
},
|
||||
rules: {
|
||||
人员: [{ required: true, message: '请选择操作员', trigger: 'change' }],
|
||||
考勤编号: [{ required: true, message: '考勤编号', trigger: 'change' }],
|
||||
完成时间: [{ required: true, message: '请选择实际完成时间', trigger: 'change' }]
|
||||
},
|
||||
Number1: '',
|
||||
dialogFormVisible: false,
|
||||
count1: 0,
|
||||
liushuihao: '',
|
||||
radioList: '0',
|
||||
length: 0,
|
||||
listLoading1: false,
|
||||
tableData1: [],
|
||||
project: '',
|
||||
projects: [],
|
||||
Machine: '',
|
||||
Machines: [],
|
||||
Group: '',
|
||||
Groups: [],
|
||||
Speed: '',
|
||||
Speeds: [{
|
||||
value: 5,
|
||||
label: '全部'
|
||||
}, {
|
||||
value: 1,
|
||||
label: '拖期'
|
||||
}, {
|
||||
value: 2,
|
||||
label: '即将拖期'
|
||||
}, {
|
||||
value: 3,
|
||||
label: '如期'
|
||||
}, {
|
||||
value: 4,
|
||||
label: '工序外协'
|
||||
}],
|
||||
number: '',
|
||||
checkbox_project: false,
|
||||
checkbox_Machine: false,
|
||||
checkbox_Group: false,
|
||||
checkbox_number: false,
|
||||
零件图号: [],
|
||||
零件名称: [],
|
||||
投产数量: [],
|
||||
result: [],
|
||||
kaoqinbianhao: [[]],
|
||||
gongxuliushuihao: [[]],
|
||||
process: [[]],
|
||||
planDate: [[]],
|
||||
worker: [[]],
|
||||
colorCode: [[]],
|
||||
realDate: [[]],
|
||||
total: 0, // 总条数
|
||||
pageSize: 10,
|
||||
pageCurrent: 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.fetchData3()
|
||||
},
|
||||
methods: {
|
||||
handleCurrentChange2(row) { // 获取当前行人员信息
|
||||
this.ssks = row.节点名称
|
||||
this.Number1 = row.考勤编号
|
||||
this.Name = row.姓名
|
||||
},
|
||||
getName() { // 提交人员
|
||||
this.dialogFormVisible1 = false
|
||||
this.form.人员 = this.Name
|
||||
this.form.考勤编号 = this.Number1
|
||||
},
|
||||
handleNodeClick(data) { // 树节点点击
|
||||
this.ssks = data.label
|
||||
getTable8(data.id).then(response => {
|
||||
this.List1 = response.data
|
||||
})
|
||||
},
|
||||
fetchData3() {
|
||||
getTree().then(response => { // 获取人员信息树
|
||||
const data = response.data
|
||||
this.data2 = fn(data, 0)
|
||||
})
|
||||
},
|
||||
dialogTableVisible() {
|
||||
this.dialogFormVisible1 = true
|
||||
dialogtablevisible()
|
||||
},
|
||||
// 查询供应商名称
|
||||
fetchData() {
|
||||
this.projects = []
|
||||
getNames().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.projects.push({
|
||||
label: response.data[i].项目名称,
|
||||
value: response.data[i].项目流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getMachine() {
|
||||
this.Machine = ''
|
||||
this.Machines = []
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
if (this.project !== '') {
|
||||
getMachines(this.project).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machines.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
getGroup() {
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
getGroups(this.Machine).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Groups.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 按条件查询
|
||||
// CASE WHEN datediff(day , 计划日期 , 完成日期) <= 2 THEN 'lightgreen'
|
||||
// WHEN datediff(day , 计划日期 , 完成日期) > 2 THEN 'red'
|
||||
// WHEN datediff(day , 计划日期 , isnull(完成日期 , getdate())) > 1 THEN 'yellow' END
|
||||
getTableData() {
|
||||
this.listLoading1 = true
|
||||
if (this.project === '') {
|
||||
this.checkbox_project = false
|
||||
} else {
|
||||
this.checkbox_project = true
|
||||
}
|
||||
if (this.Machine === '') {
|
||||
this.checkbox_Machine = false
|
||||
} else {
|
||||
this.checkbox_Machine = true
|
||||
}
|
||||
if (this.Group === '') {
|
||||
this.checkbox_Group = false
|
||||
} else {
|
||||
this.checkbox_Group = true
|
||||
}
|
||||
if (this.number === '') {
|
||||
this.checkbox_number = false
|
||||
} else {
|
||||
this.checkbox_number = true
|
||||
}
|
||||
this.tableData1 = []
|
||||
this.零件图号 = []
|
||||
this.零件名称 = []
|
||||
this.投产数量 = []
|
||||
this.result = []
|
||||
this.kaoqinbianhao = [[]]
|
||||
this.gongxuliushuihao = [[]]
|
||||
this.process = [[]]
|
||||
this.planDate = [[]]
|
||||
this.worker = [[]]
|
||||
this.colorCode = [[]]
|
||||
this.realDate = [[]]
|
||||
this.length = 0
|
||||
getTable(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.pageCurrent, this.pageSize).then(response => {
|
||||
if (response.data.rows.length === 0) {
|
||||
this.listLoading1 = false
|
||||
} else {
|
||||
this.length = parseInt(response.data.total)
|
||||
for (let i = 0; i < response.data.rows.length; i++) { // 声明二维数组
|
||||
this.零件图号.push(response.data.rows[i].零件图号)
|
||||
this.零件名称.push(response.data.rows[i].零件名称)
|
||||
this.投产数量.push(response.data.rows[i].投产数量)
|
||||
this.kaoqinbianhao[i] = []
|
||||
this.gongxuliushuihao[i] = []
|
||||
this.process[i] = []
|
||||
this.planDate[i] = []
|
||||
this.worker[i] = []
|
||||
this.colorCode[i] = []
|
||||
this.realDate[i] = []
|
||||
this.result.push(response.data.rows[i])
|
||||
}
|
||||
if (this.零件图号.length !== 0) {
|
||||
for (let i = 0; i < this.零件图号.length; i++) {
|
||||
getTable2(this.checkbox_project, this.project, this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.零件图号[i]).then(response => {
|
||||
this.liushuihao = response.data[0].工艺计划流水号
|
||||
for (let k = 0; k < response.data.length; k++) {
|
||||
if (response.data[k].工艺计划流水号 === this.liushuihao) {
|
||||
this.kaoqinbianhao[i][k] = response.data[k].工作者考勤编号
|
||||
this.gongxuliushuihao[i][k] = response.data[k].工序流水号
|
||||
this.process[i][k] = response.data[k].工艺名称简称
|
||||
this.planDate[i][k] = response.data[k].计划日期_短
|
||||
this.worker[i][k] = response.data[k].员工姓名
|
||||
this.realDate[i][k] = response.data[k].完成日期_短
|
||||
if (response.data[k].工序状态 === 5) { // 灰色:停产,不允许修改,重新投产
|
||||
this.colorCode[i][k] = 'grey'
|
||||
} else {
|
||||
this.colorCode[i][k] = response.data[k].进度颜色
|
||||
}
|
||||
if (response.data[k].工序间是否外协 === 2) {
|
||||
this.colorCode[i][k] = 'lightblue'
|
||||
}
|
||||
}
|
||||
}
|
||||
}).then(() => {
|
||||
this.tableData1.push(this.result[i])
|
||||
this.listLoading1 = false
|
||||
this.total = this.length
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.tableData1 = []
|
||||
this.listLoading1 = false
|
||||
this.total = 0
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 编辑打开
|
||||
handleChange1(index, row, formName, a) {
|
||||
if (this.process[index][a] !== '' && this.process[index][a] !== null && this.process[index][a] !== undefined && this.colorCode[index][a] !== 'grey') {
|
||||
this.count1 = this.count1 + 1
|
||||
if (this.count1 !== 1) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.midd = 0
|
||||
this.form.完成时间 = ''
|
||||
this.form.人员 = ''
|
||||
this.form.考勤编号 = ''
|
||||
if (this.worker[index][a] !== '请选择') {
|
||||
this.midd = 1
|
||||
this.form.人员 = this.worker[index][a]
|
||||
}
|
||||
if (this.kaoqinbianhao[index][a] !== 0) {
|
||||
this.form.考勤编号 = this.kaoqinbianhao[index][a]
|
||||
}
|
||||
this.title = this.process[index][a]
|
||||
this.Num = this.gongxuliushuihao[index][a]
|
||||
this.dialogFormVisible = true
|
||||
}
|
||||
},
|
||||
// 编辑确定
|
||||
handleChange() {
|
||||
if (this.midd === 0) {
|
||||
handlechange2(this.Num, this.form.考勤编号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
handlechange(this.Num, this.form.完成时间).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息编辑成功')
|
||||
} else {
|
||||
this.$message.error('信息编辑失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('信息编辑失败')
|
||||
}
|
||||
})
|
||||
this.getTableData()
|
||||
} else {
|
||||
handlechange3(this.Num, this.form.考勤编号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
handlechange(this.Num, this.form.完成时间).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息编辑成功')
|
||||
this.getTableData()
|
||||
} else {
|
||||
this.$message.error('信息编辑失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('信息编辑失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
// 提交添加或者修改
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.handleChange()
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重置表单
|
||||
callOff(formName) {
|
||||
this.dialogFormVisible = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.getTableData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.white{
|
||||
background-color: ghostwhite;
|
||||
border: 1px solid #1f2d3d;
|
||||
}
|
||||
.grey{
|
||||
background-color: grey;
|
||||
border: 1px solid #1f2d3d;
|
||||
}
|
||||
.red{
|
||||
background-color: orangered;
|
||||
border: 1px solid #1f2d3d;
|
||||
}
|
||||
.lightblue{
|
||||
background-color: deepskyblue;
|
||||
border: 1px solid #1f2d3d;
|
||||
}
|
||||
.yellow{
|
||||
background-color: yellow;
|
||||
border: 1px solid #1f2d3d;
|
||||
}
|
||||
.blank{
|
||||
background-color: transparent;
|
||||
border: 0px solid white;
|
||||
}
|
||||
.lightgreen{
|
||||
background-color: lightgreen;
|
||||
border: 1px solid #1f2d3d;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.el-form-item{
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.table h4{
|
||||
border: 1px solid transparent;
|
||||
margin: 0;
|
||||
font-weight: normal;
|
||||
width: 100px;
|
||||
height: 24px;
|
||||
}
|
||||
</style>
|
||||
@@ -73,12 +73,12 @@
|
||||
type="selection"
|
||||
align="center"
|
||||
width="35"/>
|
||||
<el-table-column label="零件图号" align="center" width="200">
|
||||
<el-table-column label="零件图号" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="130">
|
||||
<el-table-column label="零件名称" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
@@ -103,42 +103,42 @@
|
||||
{{ scope.row.工序数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否超负荷" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.是否超负荷 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外协" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="scope.row.是否预计外协" @change="table1Out(scope.row)">外协</el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加工件合格" align="center" width="230">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
v-model="tableData[scope.$index].加工件合格时间"
|
||||
size="mini"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择加工件合格时间"
|
||||
@change="timeChange(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="板焊结束" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.板焊 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200px" align="center" fixed="right">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="PlateWelding(scope.$index, scope.row, 'form1')">板焊</el-button>
|
||||
<!--<el-button size="mini" type="primary" @click="inBatches">分批</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="是否超负荷" align="center" width="100">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.是否超负荷 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="外协" width="100" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-checkbox v-model="scope.row.是否预计外协" @change="table1Out(scope.row)">外协</el-checkbox>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="加工件合格" align="center" width="230">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="tableData[scope.$index].加工件合格时间"-->
|
||||
<!--size="mini"-->
|
||||
<!--type="date"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--placeholder="选择加工件合格时间"-->
|
||||
<!--@change="timeChange(scope.row)"/>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="板焊结束" width="150" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.板焊 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="操作" width="200px" align="center" fixed="right">-->
|
||||
<!--<template slot-scope="scope" align="center">-->
|
||||
<!--<el-button-->
|
||||
<!--size="mini"-->
|
||||
<!--type="primary"-->
|
||||
<!--class="el-icon-edit"-->
|
||||
<!--@click="PlateWelding(scope.$index, scope.row, 'form1')">板焊</el-button>-->
|
||||
<!--<!–<el-button size="mini" type="primary" @click="inBatches">分批</el-button>–>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
</el-table>
|
||||
<div v-if="是否扫描 === false" class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
@@ -173,7 +173,7 @@
|
||||
v-loading="listLoading1"
|
||||
:data="tableData1"
|
||||
class="table"
|
||||
border
|
||||
borde
|
||||
style="max-height: 500px"
|
||||
height="500">
|
||||
<el-table-column label="零件图号" align="center" width="240">
|
||||
@@ -1206,6 +1206,7 @@ export default {
|
||||
if (this.零件图号.length !== 0) {
|
||||
for (let i = 0; i < this.零件图号.length; i++) {
|
||||
selection2(this.工艺计划流水号[i]).then(response => {
|
||||
console.log(response.data, 2)
|
||||
for (let k = 0; k < response.data.length; k++) {
|
||||
this.process[i][k] = response.data[k].工艺名称简称
|
||||
this.planDate[i][k] = response.data[k].计划日期_短
|
||||
@@ -1472,7 +1473,6 @@ export default {
|
||||
}).then(() => {
|
||||
plan(this.tableData1[i].工艺计划流水号).then(response => {
|
||||
if (this.tableData1[i].平衡次数 !== 0 || this.tableData1[i].是否焊接 !== 1) {
|
||||
console.log(this.tableData1[i].平衡次数, 111)
|
||||
this.result1 += parseInt(response.data[0].result)
|
||||
if (this.result1 === this.length) {
|
||||
this.$message.success('零件计划制定成功')
|
||||
|
||||
@@ -308,6 +308,7 @@ export default {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.tableData.length) {
|
||||
this.$message.success('保存成功')
|
||||
this.typeChange()
|
||||
} else if (response.data[0].result === '0') {
|
||||
this.$message.error('第' + (i + 1) + '行保存失败')
|
||||
}
|
||||
|
||||
@@ -122,10 +122,10 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible4" center style="min-height: 300px" width="800px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="零件状态" prop="零件状态" style="margin-left: 200px">
|
||||
<el-select v-model="form.零件状态" placeholder="零件状态" size="small" clearable>
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible4" center style="min-height: 300px" width="400px">
|
||||
<el-form label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="零件状态">
|
||||
<el-select v-model="partStateValue1" placeholder="零件状态" size="small">
|
||||
<el-option
|
||||
v-for="item in partState"
|
||||
:key="item.value"
|
||||
@@ -135,8 +135,8 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancel('form')">取消</el-button>
|
||||
<el-button type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
<el-button @click="cancel()">取消</el-button>
|
||||
<el-button type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
@@ -267,6 +267,7 @@ export default {
|
||||
groupNum: null, // 组件流水号
|
||||
partNumber: '', // 零件号
|
||||
partStateValue: null, // 零件状态
|
||||
partStateValue1: null,
|
||||
partState: [], // 零件状态数组
|
||||
partTypeValue: null, // 零件类型
|
||||
num: null,
|
||||
@@ -300,15 +301,7 @@ export default {
|
||||
}, {
|
||||
value: 2,
|
||||
label: '外协生产'
|
||||
}],
|
||||
form: {
|
||||
零件状态: null
|
||||
},
|
||||
rules: {
|
||||
零件状态: [
|
||||
{ required: true, message: '请选择零件状态', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
}]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -442,34 +435,24 @@ export default {
|
||||
this.dialogFormVisible3 = false
|
||||
},
|
||||
handleEdit(row) {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.form = {}
|
||||
console.log(row)
|
||||
this.title = '编辑'
|
||||
this.partStateValue1 = parseInt(row.考核状态) + 2
|
||||
this.dialogFormVisible4 = true
|
||||
this.num = row.工艺计划流水号
|
||||
},
|
||||
submitEdit(formName) { // 提交编辑
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
editData(this.num, this.form.零件状态).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogFormVisible4 = false
|
||||
this.pageCurrent = 1
|
||||
this.searchData()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
submitEdit() { // 提交编辑
|
||||
editData(this.num, this.partStateValue1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogFormVisible4 = false
|
||||
this.pageCurrent = 1
|
||||
this.searchData()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
},
|
||||
cancel(formName) { // 取消
|
||||
this.form = {}
|
||||
cancel() { // 取消
|
||||
this.dialogFormVisible4 = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
|
||||
@@ -2,38 +2,36 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div style="margin-top: -10px;">
|
||||
<el-row>
|
||||
<span>零件分类:</span>
|
||||
<el-select v-model="partsCategoriesValue" size="small" filterable clearable placeholder="零件分类" @change="getPartsName">
|
||||
<el-option
|
||||
v-for="item in partsCategories"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
|
||||
<span>零件名称:</span>
|
||||
<el-select v-model="partsNameValue" size="small" filterable clearable placeholder="零件名称" @change="getTableData" >
|
||||
<el-option
|
||||
v-for="item in partsName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
|
||||
<span>典型工艺号:</span>
|
||||
<el-input v-model="typicalNumValue" auto-complete="off" style="width: 200px" size="small" />
|
||||
<el-button size="small" type="primary" icon="el-icon-search" style="margin: 10px 0 0 10px" @click="getTableData">查询</el-button>
|
||||
<el-button size="small" type="info" icon="el-icon-circle-plus-outline" style="margin: 10px 0 0 10px" @click="addTableData">增加</el-button>
|
||||
<el-button size="small" type="success" icon="el-icon-cjn-09" style="margin: 10px 0 0 10px" @click="editConfirm">保存</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<span>零件分类:</span>
|
||||
<el-select v-model="partsCategoriesValue" size="small" filterable clearable placeholder="零件分类" @change="getPartsName">
|
||||
<el-option
|
||||
v-for="item in partsCategories"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件名称:</span>
|
||||
<el-select v-model="partsNameValue" size="small" filterable clearable placeholder="零件名称" @change="getTableData" >
|
||||
<el-option
|
||||
v-for="item in partsName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>典型工艺号:</span>
|
||||
<el-input v-model="typicalNumValue" auto-complete="off" style="width: 100px" size="small" readonly/>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin-left: 10px" @click="total=0;pageCurrent=1;pageSize=20;getTableData()">查询</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addTableData">增加</el-button>
|
||||
<el-button size="small" type="warning" icon="el-icon-menu" style="margin-left: 10px" @click="editConfirm">保存</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" border style="width: 100%;max-height: 550px;" size="mini" height="550px">
|
||||
<el-table-column prop="num" label="序号" width="50" align="center" type="index"/>
|
||||
<el-table-column prop="num" label="序号" width="50" align="center" type="index">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="工艺名称" width="230" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
@@ -66,12 +64,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="单件" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.单件定额工时" style="width:50px" placeholder="单件定额工时"/>
|
||||
<el-input v-model="scope.row.单件定额工时" size="mini" style="width:90px" placeholder="单件定额"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="准结" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.准结定额工时" style="width:50px" placeholder="准结定额工时"/>
|
||||
<el-input v-model="scope.row.准结定额工时" size="mini" style="width:90px" placeholder="准结定额"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||
@@ -101,6 +99,16 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="工艺名称、工艺要求选择" center width="400px">
|
||||
@@ -145,6 +153,9 @@ import { getPartsCategories, getPartsName, getTableData, upMove, downMove, deleR
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageCurrent: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
partsCategories: [],
|
||||
partsCategoriesCheck: null,
|
||||
partsCategoriesValue: '',
|
||||
@@ -181,7 +192,7 @@ export default {
|
||||
getPartsName(this.partsCategoriesValue).then(res => {
|
||||
const data = res.data
|
||||
data.length > 0 ? this.partsNameValue = data[0].典型工艺流水号 : this.partsNameValue = ''
|
||||
this.typicalNumValue = data[0].典型工艺号
|
||||
this.typicalNumValue = data.length > 0 ? data[0].典型工艺号 : ''
|
||||
data.map(item => {
|
||||
this.partsName.push({
|
||||
label: item.典型工艺名称,
|
||||
@@ -193,11 +204,25 @@ export default {
|
||||
getTableData() {
|
||||
this.partsCategoriesValue ? this.partsCategoriesCheck = 1 : this.partsCategoriesCheck = 0
|
||||
this.partsNameValue ? this.partsNameCheck = 1 : this.partsNameCheck = 0
|
||||
this.loading = true
|
||||
getTableData(this.partsCategoriesCheck, this.partsCategoriesValue, this.partsNameCheck, this.partsNameValue).then(res => {
|
||||
this.loading = false
|
||||
this.tableData = res.data
|
||||
})
|
||||
if (this.partsCategoriesCheck === 0 && this.partsNameCheck === 0) {
|
||||
this.$message.error('请选择查询条件')
|
||||
} else {
|
||||
this.loading = true
|
||||
getTableData(this.pageCurrent, this.pageSize, this.partsCategoriesCheck, this.partsCategoriesValue, this.partsNameCheck, this.partsNameValue).then(res => {
|
||||
this.loading = false
|
||||
this.tableData = res.data.rows
|
||||
this.total = res.data.total
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.getTableData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.getTableData()
|
||||
},
|
||||
upMove(row) {
|
||||
upMove(row.典型工艺流水号, row.典型工艺工序流水号).then(res => {
|
||||
@@ -234,7 +259,7 @@ export default {
|
||||
if (res.data[0].result === '1') {
|
||||
index++
|
||||
} else {
|
||||
this.$message.error('零件保存失败')
|
||||
this.$message.error('零件工艺保存失败')
|
||||
}
|
||||
if (index === this.tableData.length) {
|
||||
this.$message.success('保存修改成功')
|
||||
@@ -302,4 +327,7 @@ export default {
|
||||
span{
|
||||
margin: 20px;
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table :data="List" highlight-current-row border>
|
||||
<el-table :data="List" border size="small">
|
||||
<el-table-column label="设备名称" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备名称 }}
|
||||
@@ -159,6 +159,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -210,9 +211,11 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.initialization()
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.List = []
|
||||
if (this.equipmentName !== '') {
|
||||
this.check = 1
|
||||
} else {
|
||||
@@ -318,6 +321,9 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (this.List && this.List.length === 1 && this.pageCurrent > 1) {
|
||||
this.pageCurrent--
|
||||
}
|
||||
deleteTable(row.设备流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
|
||||
@@ -400,6 +400,9 @@ export default {
|
||||
this.loading3 = true
|
||||
selectMarketingManager(this.AdressID).then(response => {
|
||||
this.loading3 = false
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
|
||||
}
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
},
|
||||
@@ -438,6 +441,9 @@ export default {
|
||||
this.loading3 = false
|
||||
selectMarketingManager(data).then(response => {
|
||||
this.loading3 = false
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
|
||||
}
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
})
|
||||
@@ -467,6 +473,9 @@ export default {
|
||||
function a() {
|
||||
selectMarketingManager(this.AdressID).then(response => {
|
||||
this.loading3 = false
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
|
||||
}
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
}
|
||||
@@ -490,6 +499,9 @@ export default {
|
||||
this.loading3 = true
|
||||
selectMarketingManager(this.AdressID).then(response => {
|
||||
this.loading3 = false
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
|
||||
}
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,28 +7,33 @@
|
||||
<el-radio :label="1">未编制</el-radio>
|
||||
<el-radio :label="2">已编制</el-radio>
|
||||
</el-radio-group>
|
||||
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="entryNameValue" clearable filterable size="small" style="margin-bottom:10px" placeholder="项目名称" @change="typeChange()">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床名称:</span>
|
||||
<el-select v-model="toolNumValue" clearable filterable size="small" placeholder="机床号" style="margin-bottom:10px" @change="typeChange1()">
|
||||
<el-option
|
||||
v-for="item in toolNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>分组:</span>
|
||||
<el-select v-model="NumValue" clearable filterable size="small" style="margin-bottom:10px" placeholder="机床组号">
|
||||
<el-option
|
||||
v-for="item in Num"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
|
||||
|
||||
<span>开始时间:</span>
|
||||
<el-date-picker
|
||||
v-model="date01"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
size="small"
|
||||
placeholder="选择开始日期"/>
|
||||
|
||||
<span>结束时间:</span>
|
||||
<el-date-picker
|
||||
v-model="date02"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
size="small"
|
||||
placeholder="选择结束日期"/>
|
||||
|
||||
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize2=10; pageCurrent2=1;searchPartNum()">查询</el-button>
|
||||
</el-row>
|
||||
|
||||
@@ -71,30 +76,30 @@
|
||||
{{ scope.row.原材料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="面积" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.面积 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="重量" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.重量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料费" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料费 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="150px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="edit(scope.$index, scope.row, 'form')">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="面积" width="110" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.面积 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="重量" width="110" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.重量 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="材料费" width="110" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.材料费 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="操作" align="center" width="150px" fixed="right">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-button-->
|
||||
<!--size="mini"-->
|
||||
<!--type="primary"-->
|
||||
<!--class="el-icon-edit"-->
|
||||
<!--@click="edit(scope.$index, scope.row, 'form')">编辑</el-button>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
@@ -134,7 +139,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="外协预算价格" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].外协预算价格_系数" size="mini" />
|
||||
<el-input v-model="tableData[scope.$index].外协预算价格_计算" size="mini" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -165,10 +170,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchPartNum1, searchPartNum2, searchTable, saveWeightArea, saveMaterialPrice, saveRowPrice } from '@/api/Outsourcing/InterBudgetaryBudgets'
|
||||
import { machine, getToolNum, getNum, searchPartNum1, searchTable, saveWeightArea, saveMaterialPrice, saveRowPrice } from '@/api/Outsourcing/InterBudgetaryBudgets'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
entryNameValue: '',
|
||||
entryName: [], // 项目名称
|
||||
toolNumValue: '',
|
||||
toolNum: [], // 机床号
|
||||
NumValue: '',
|
||||
Num: [], // 分组
|
||||
lingjianhao: '',
|
||||
dialogFormVisible: false,
|
||||
form: {
|
||||
@@ -183,8 +194,6 @@ export default {
|
||||
result2: [],
|
||||
radio: 1,
|
||||
partName: '', // 零件名称
|
||||
date01: '', // 开始时间
|
||||
date02: '', // 结束时间
|
||||
loading0: false,
|
||||
tableData: [],
|
||||
loading2: false,
|
||||
@@ -194,33 +203,92 @@ export default {
|
||||
pageCurrent2: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
radioChange() {
|
||||
this.tableData2 = []
|
||||
this.entryNameValue = ''
|
||||
this.toolNumValue = ''
|
||||
this.NumValue = ''
|
||||
},
|
||||
fetchData() {
|
||||
this.entryNameValue = ''
|
||||
this.entryName = []
|
||||
machine().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.entryName.push({
|
||||
label: response.data[i].项目名称,
|
||||
value: response.data[i].项目流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
typeChange() {
|
||||
this.toolNumValue = ''
|
||||
this.toolNum = []
|
||||
this.NumValue = ''
|
||||
this.Num = []
|
||||
getToolNum(this.entryNameValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.toolNum.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
typeChange1() {
|
||||
this.NumValue = ''
|
||||
this.Num = []
|
||||
getNum(this.toolNumValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Num.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查零件号
|
||||
searchPartNum() {
|
||||
if (this.partName === null) {
|
||||
this.partName = ''
|
||||
}
|
||||
if (this.date01 === '') {
|
||||
this.date01 = null
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check_entryNameValue = 1
|
||||
} else {
|
||||
this.check_entryNameValue = 0
|
||||
}
|
||||
if (this.date02 === '') {
|
||||
this.date02 = null
|
||||
if (this.toolNumValue !== null && this.toolNumValue !== '') {
|
||||
this.check_toolNumValue = 1
|
||||
} else {
|
||||
this.check_toolNumValue = 0
|
||||
}
|
||||
if (this.NumValue !== null && this.NumValue !== '') {
|
||||
this.check_NumValue = 1
|
||||
} else {
|
||||
this.check_NumValue = 0
|
||||
}
|
||||
if (this.partName !== null && this.partName !== '') {
|
||||
this.check_partName = 1
|
||||
} else {
|
||||
this.check_partName = 0
|
||||
}
|
||||
this.loading2 = true
|
||||
this.tableData2 = []
|
||||
this.tableData = []
|
||||
if (this.radio === 1) {
|
||||
searchPartNum1(this.partName, this.date01, this.date02, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
searchPartNum1(this.check_entryNameValue, this.entryNameValue, this.check_toolNumValue, this.toolNumValue, this.check_NumValue, this.NumValue, this.check_partName, this.partName, 0, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
} else {
|
||||
searchPartNum2(this.partName, this.date01, this.date02, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
searchPartNum1(this.check_entryNameValue, this.entryNameValue, this.check_toolNumValue, this.toolNumValue, this.check_NumValue, this.NumValue, this.check_partName, this.partName, 1, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
}).then(() => {
|
||||
@@ -238,7 +306,7 @@ export default {
|
||||
return
|
||||
} else if (index === 5) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
sums[5] += parseFloat(data[i].外协预算价格_系数)
|
||||
sums[5] += parseFloat(data[i].外协预算价格_计算)
|
||||
}
|
||||
sums[5] = parseInt(sums[5] * 100) / 100
|
||||
}
|
||||
@@ -250,8 +318,8 @@ export default {
|
||||
this.tableData = []
|
||||
searchTable(row.工艺计划流水号, 1).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].外协预算价格_系数 !== 0) {
|
||||
response.data[i].外协预算价格_系数 = response.data[i].外协预算价格_系数.toFixed(2)
|
||||
if (response.data[i].外协预算价格_计算 !== 0) {
|
||||
response.data[i].外协预算价格_计算 = response.data[i].外协预算价格_计算.toFixed(2)
|
||||
}
|
||||
}
|
||||
this.cailiaofei = row.材料费
|
||||
@@ -305,7 +373,7 @@ export default {
|
||||
this.$message.error('请选择零件')
|
||||
} else {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
saveRowPrice(this.tableData[i].工序流水号, parseFloat(this.tableData[i].外协预算价格_系数), this.tableData[i].工艺计划流水号, this.cailiaofei).then(response => {
|
||||
saveRowPrice(this.tableData[i].工序流水号, parseFloat(this.tableData[i].外协预算价格_计算), this.tableData[i].工艺计划流水号, this.cailiaofei).then(response => {
|
||||
})
|
||||
}
|
||||
this.$message.success('保存成功')
|
||||
|
||||
@@ -52,26 +52,11 @@
|
||||
{{ scope.row.设备情况 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="类别" align="center" width="110px">-->
|
||||
<!--<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" width="150px">
|
||||
<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" width="200px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -138,18 +123,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--<el-row>-->
|
||||
<!--<el-col :span="12">-->
|
||||
<!--<el-form-item label="类别" prop="category">-->
|
||||
<!--<el-input v-model="form.category" placeholder="类别" clearable size="small"></el-input>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="12">-->
|
||||
<!--<el-form-item label="关注" prop="attention">-->
|
||||
<!--<el-input v-model="form.attention" placeholder="关注" clearable size="small" ></el-input>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
<!--</el-row>-->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备情况" prop="EquipmentCondition">
|
||||
@@ -162,15 +135,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--<el-row>-->
|
||||
<!--<el-col :span="12">-->
|
||||
<!--<el-form-item label="厂家序号" prop="ManufacturerNumber">-->
|
||||
<!--<el-input v-model="form.ManufacturerNumber" placeholder="厂家序号" clearable size="small"></el-input>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="12">-->
|
||||
<!--</el-col>-->
|
||||
<!--</el-row>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
:data="tableData3"
|
||||
border
|
||||
stripe
|
||||
size="small"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%;"
|
||||
height="650">
|
||||
@@ -43,30 +44,31 @@
|
||||
<template slot-scope="scope">{{ scope.row.工艺名称简称 }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="计算方式" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="parseInt(scope.row.外协价格计算标准流水号)===1" type="success" size="small">工时</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.外协价格计算标准流水号)===2" type="success" size="small">重量</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.外协价格计算标准流水号)===3" type="success" size="small">面积</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="工时价格(元/分)">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode1[scope.$index]">
|
||||
<h4>{{ scope.row.外协价格1 }}</h4>
|
||||
</div>
|
||||
{{ scope.row.外协价格1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="重量价格(元/kg)">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode2[scope.$index]">
|
||||
<h4>{{ scope.row.重量价格1 }}</h4>
|
||||
</div>
|
||||
{{ scope.row.重量价格1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="面积价格(元/m2)">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode3[scope.$index]">
|
||||
<h4>{{ scope.row.面积价格1 }}</h4>
|
||||
</div>
|
||||
{{ scope.row.面积价格1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="130px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -227,21 +229,6 @@ export default {
|
||||
getTable(this.Code_Check, this.Code, this.Code_Check1, this.processClassificationValue, this.pageList, this.pageSize).then(response => {
|
||||
this.total = parseInt(response.data.total)
|
||||
if (response.data.rows.length !== 0) {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].外协价格计算标准流水号 === '1') {
|
||||
this.colorCode1.push('mianji')
|
||||
this.colorCode2.push('')
|
||||
this.colorCode3.push('')
|
||||
} else if (response.data.rows[i].外协价格计算标准流水号 === '2') {
|
||||
this.colorCode1.push('')
|
||||
this.colorCode2.push('mianji')
|
||||
this.colorCode3.push('')
|
||||
} else {
|
||||
this.colorCode1.push('')
|
||||
this.colorCode2.push('')
|
||||
this.colorCode3.push('mianji')
|
||||
}
|
||||
}
|
||||
this.tableData3 = response.data.rows
|
||||
}
|
||||
})
|
||||
|
||||
@@ -56,12 +56,18 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="getParts">
|
||||
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="getParts">
|
||||
<el-table-column
|
||||
label=" "
|
||||
type="index"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column label="付款状态" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.实际付款时间!==''" type="success" size="small">已付款</el-tag>
|
||||
<el-tag v-else type="info" size="small">未付款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="表单号" align="center" width="280px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.表单号 }}
|
||||
@@ -425,14 +431,6 @@ export default {
|
||||
this.dialogFormVisible2 = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 表格颜色
|
||||
tableRowClassName({ row }) {
|
||||
if (row.实际付款时间 !== '') {
|
||||
return 'fukuan'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
// 获取表格2数据
|
||||
getParts(row) {
|
||||
this.loading2 = true
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
<span>表单号:</span>
|
||||
<el-input v-model="formNumber" size="small" placeholder="表单号" clearable style="width:200px"/>
|
||||
<span>外协厂家:</span>
|
||||
<el-input v-model="manufacturers" readonly size="small" placeholder="外协厂家" style="width:200px" clearable @dblclick.native="onFocus1();param=0"/>
|
||||
<el-input v-model="manufacturers" readonly size="small" placeholder="外协厂家" style="width:250px" clearable>
|
||||
<el-button slot="append" icon="el-icon-search" @click="onFocus1();param=0"/>
|
||||
</el-input>
|
||||
<span>下达任务日期:</span>
|
||||
<el-date-picker
|
||||
v-model="time"
|
||||
@@ -17,7 +19,13 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="List" :row-class-name="tableRowClassName2" highlight-current-row height="350" border @row-click="searchProcess" >
|
||||
<el-table v-loading="loading2" :data="List" highlight-current-row height="350" border @row-click="searchProcess" >
|
||||
<el-table-column label="单据状态" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.单据状态==='成交'" type="success" size="small">成交</el-tag>
|
||||
<el-tag v-else type="info" size="small">未成交</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="表单号" align="center" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.表单号 }}
|
||||
@@ -45,8 +53,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
<el-button :disabled="scope.row.单据状态==='成交'" type="primary" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button :disabled="scope.row.单据状态==='成交'" type="danger" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -425,12 +433,14 @@
|
||||
placeholder="下达任务日期"
|
||||
value-format="yyyy-MM-dd"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="外协厂家" prop="外协厂家" style="margin-left: 200px">
|
||||
<el-input v-model="form.外协厂家" readonly placeholder="外协厂家" size="small" style="width:200px" clearable>
|
||||
<el-button slot="append" icon="el-icon-search" @click="onFocus1();param=1"/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="运费" prop="运费" style="margin-left: 200px">
|
||||
<el-input v-model="form.运费" placeholder="运费" size="small" style="width:200px" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="外协厂家" prop="外协厂家" style="margin-left: 200px">
|
||||
<el-input v-model="form.外协厂家" readonly placeholder="外协厂家" size="small" style="width:200px" clearable @dblclick.native="onFocus1();param=1"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
@@ -446,8 +456,12 @@ import { getTable, getData1, getTable1, getprocedure, searchManufactor, sparePar
|
||||
import { getExplorer, method5, Cleanup } from '@/vendor/exportExcel'
|
||||
import { convertCurrency } from '@/vendor/int2Chinese'
|
||||
import { mapGetters } from 'vuex'
|
||||
import elInput from 'element-ui/packages/input'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
elInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bianliang: [],
|
||||
@@ -609,7 +623,7 @@ export default {
|
||||
this.List3 = []
|
||||
getTable(this.num, this.formNumber, this.num1, this.ManufactorNumber, this.num2, this.time1, this.time2, this.id, this.pageList, this.pageSize).then(response => {
|
||||
this.total = parseInt(response.data.total)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].任务下达日期 !== null) {
|
||||
response.data.rows[i].任务下达日期 = response.data.rows[i].任务下达日期.substr(0, 10)
|
||||
}
|
||||
@@ -871,7 +885,7 @@ export default {
|
||||
sums[4] = '材料费:'
|
||||
sums[6] = '其他费用:'
|
||||
sums[8] = '运费:'
|
||||
sums[9] = this.freight
|
||||
sums[9] = parseInt(this.freight)
|
||||
sums[10] = '合计:'
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
sums[24] += Math.round(parseFloat(data[i].外协预算总价格) * 100) / 100
|
||||
@@ -1046,6 +1060,7 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
// 确定价格
|
||||
confirmPrice() {
|
||||
this.code1 = 0
|
||||
for (let i = 0; i < this.List3.length; i++) {
|
||||
@@ -1168,6 +1183,7 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
// 成交
|
||||
Deal() {
|
||||
this.documentStatus = 2
|
||||
this.sign = 1
|
||||
@@ -1227,7 +1243,7 @@ export default {
|
||||
},
|
||||
// 提交编辑
|
||||
submitEdit() {
|
||||
editData(this.Number, this.ManufactorNumber1, this.form.运费, this.documentStatus, this.sign, this.Explain).then(response => {
|
||||
editData(this.Number, this.ManufactorNumber1, this.form.运费, this.documentStatus, 1, this.Explain).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogFormVisible = false
|
||||
@@ -1534,14 +1550,6 @@ export default {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
// 表格颜色
|
||||
tableRowClassName2({ row }) {
|
||||
if (row.单据状态 === '成交') {
|
||||
return 'chengjiao'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageList = 1
|
||||
|
||||
1340
src/views/Outsourcing/OutsourcingTaskQuery/index.vue
Normal file
1340
src/views/Outsourcing/OutsourcingTaskQuery/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,30 @@
|
||||
<div>
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="entryNameValue" clearable filterable size="small" style="margin-bottom:10px" placeholder="项目名称" @change="typeChange()">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床名称:</span>
|
||||
<el-select v-model="toolNumValue" clearable filterable size="small" placeholder="机床号" style="margin-bottom:10px" @change="typeChange1()">
|
||||
<el-option
|
||||
v-for="item in toolNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>分组:</span>
|
||||
<el-select v-model="NumValue" clearable filterable size="small" style="margin-bottom:10px" placeholder="机床组号">
|
||||
<el-option
|
||||
v-for="item in Num"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
|
||||
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize1=10; pageCurrent1=1;searchTable()">查询</el-button>
|
||||
@@ -16,11 +40,9 @@
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column label="零件图号" align="center" width="380px">
|
||||
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="320px">
|
||||
<template slot-scope="scope">
|
||||
@@ -57,19 +79,30 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="tableData2" :row-class-name="tableRowClassName" height="350" style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table v-loading="loading2" :data="tableData2" height="350" style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column
|
||||
label=" "
|
||||
type="index"
|
||||
align="center"
|
||||
width="50"/>
|
||||
|
||||
<el-table-column label="序间外协" width="100" align="center">
|
||||
<el-table-column label="加工状态" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="checkBox[scope.$index]" @change="edit(scope.$index, scope.row)">选择</el-checkbox>
|
||||
<el-tag v-if="parseInt(scope.row.工序状态)===3" type="success" size="small">未加工</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.工序状态)===4" size="small">已完成</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.工序状态)===5" size="small">停产</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="序间外协" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox :disabled="parseInt(scope.row.工序状态)!==3" v-model="checkBox[scope.$index]" @change="edit(scope.$index, scope.row)">选择</el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外协状态" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="parseInt(scope.row.工序间是否外协)===2" type="success" size="small">外协</el-tag>
|
||||
<el-tag v-else size="small">自制</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="工艺名称" align="center" width="220px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
@@ -106,10 +139,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable, searchTable2, edit, edit2 } from '@/api/Outsourcing/PreorderAssociation'
|
||||
import { machine, getToolNum, getNum, searchTable, searchTable2, edit, edit2 } from '@/api/Outsourcing/PreorderAssociation'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
entryNameValue: '',
|
||||
entryName: [], // 项目名称
|
||||
toolNumValue: '',
|
||||
toolNum: [], // 机床号
|
||||
NumValue: '',
|
||||
Num: [], // 分组
|
||||
count: 0, // 计数器 (表二是否有外协工序)
|
||||
InOut: 1, // 工序间是否外协变量 1自家 2外协
|
||||
num1: '',
|
||||
@@ -125,17 +164,73 @@ export default {
|
||||
pageCurrent1: 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.entryNameValue = ''
|
||||
this.entryName = []
|
||||
machine().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.entryName.push({
|
||||
label: response.data[i].项目名称,
|
||||
value: response.data[i].项目流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
typeChange() {
|
||||
this.toolNumValue = ''
|
||||
this.toolNum = []
|
||||
this.NumValue = ''
|
||||
this.Num = []
|
||||
getToolNum(this.entryNameValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.toolNum.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
typeChange1() {
|
||||
this.NumValue = ''
|
||||
this.Num = []
|
||||
getNum(this.toolNumValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Num.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
this.loading1 = true
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
if (this.partName !== null && this.partName !== '') {
|
||||
this.check_partName = true
|
||||
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||
this.check_entryNameValue = 1
|
||||
} else {
|
||||
this.check_partName = false
|
||||
this.check_entryNameValue = 0
|
||||
}
|
||||
searchTable(this.check_partName, this.partName, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
if (this.toolNumValue !== null && this.toolNumValue !== '') {
|
||||
this.check_toolNumValue = 1
|
||||
} else {
|
||||
this.check_toolNumValue = 0
|
||||
}
|
||||
if (this.NumValue !== null && this.NumValue !== '') {
|
||||
this.check_NumValue = 1
|
||||
} else {
|
||||
this.check_NumValue = 0
|
||||
}
|
||||
if (this.partName !== null && this.partName !== '') {
|
||||
this.check_partName = 1
|
||||
} else {
|
||||
this.check_partName = 0
|
||||
}
|
||||
searchTable(this.check_entryNameValue, this.entryNameValue, this.check_toolNumValue, this.toolNumValue, this.check_NumValue, this.NumValue, this.check_partName, this.partName, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
}).then(() => {
|
||||
@@ -147,6 +242,7 @@ export default {
|
||||
this.checkBox = []
|
||||
this.tableData2 = []
|
||||
searchTable2(row.工艺计划流水号).then(response => {
|
||||
console.log(response.data)
|
||||
this.num1 = row.工艺计划流水号
|
||||
if (response.data.length === 0) {
|
||||
this.loading0 = false
|
||||
@@ -252,14 +348,6 @@ export default {
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable()
|
||||
},
|
||||
// 表格颜色
|
||||
tableRowClassName({ row }) {
|
||||
if (row.工序间是否外协 === 2) {
|
||||
return 'waixie'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,16 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading1" :data="tableData1" size="mini" border style="width: 100%;">
|
||||
<el-table :data="tableData1" size="mini" border style="width: 100%">
|
||||
<el-table-column label="请款" min-width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="requestFund(scope.row)">请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同编号" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
@@ -59,12 +68,12 @@
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="200" align="center">
|
||||
<el-table-column label="供应商" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" width="80" align="center">
|
||||
<el-table-column label="总金额" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总金额 }}
|
||||
</template>
|
||||
@@ -74,7 +83,7 @@
|
||||
{{ scope.row.付款方式内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="欠款金额" min-width="90" align="center">
|
||||
<el-table-column label="欠款金额" min-width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.欠款金额 }}
|
||||
</template>
|
||||
@@ -91,7 +100,16 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="请款付款情况" width="900" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-table v-show="tableData11[scope.$index].length!==0" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
|
||||
<el-table :id="scope.$index" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
|
||||
<el-table-column label="取消请款" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="scope.row.审核情况流水号!==3"
|
||||
type="danger"
|
||||
size="mini"
|
||||
@click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="次数" min-width="60" align="center" type="index"/>
|
||||
<el-table-column label="请款金额" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
@@ -100,7 +118,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款时间.split(' ')[0] }}
|
||||
{{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核情况" width="80" align="center">
|
||||
@@ -133,26 +151,9 @@
|
||||
{{ scope.row.未付款原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
@click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款" min-width="80" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="requestFund(scope.row)">请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
@@ -168,22 +169,22 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<span>请款开始时间:</span>
|
||||
<span>请款时间区间:</span>
|
||||
<el-date-picker
|
||||
v-model="startRequestDate"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<span>请款结束时间:</span>
|
||||
placeholder="开始日期"/>
|
||||
~
|
||||
<el-date-picker
|
||||
v-model="endRequestDate"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
placeholder="结束日期"/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -277,7 +278,6 @@ export default {
|
||||
form1: {},
|
||||
supplierName: '',
|
||||
tableData01: [],
|
||||
loading1: false,
|
||||
tableData1: [],
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
@@ -312,7 +312,6 @@ export default {
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.loading1 = true
|
||||
this.tableData1 = []
|
||||
this.startDate && this.endDate ? this.check1 = 1 : this.check1 = 0
|
||||
this.contractNum ? this.check2 = 1 : this.check2 = 0
|
||||
@@ -322,15 +321,18 @@ export default {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
this.tableData11[j] = []
|
||||
searchCondition(response.data.rows[j].采购合同流水号).then(response0 => {
|
||||
for (let i = 0; i < response0.data.length; i++) {
|
||||
this.tableData11[j].push(response0.data[i])
|
||||
if (response0.data.length === 0) {
|
||||
this.tableData11[j].push(response0.data)
|
||||
document.getElementById(j).setAttribute('style', 'display:none')
|
||||
} else {
|
||||
for (let i = 0; i < response0.data.length; i++) {
|
||||
this.tableData11[j].push(response0.data[i])
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
}).then(() => {
|
||||
this.loading1 = false
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
@@ -356,6 +358,7 @@ export default {
|
||||
})
|
||||
},
|
||||
cancelRequestFund(row) { // 取消请款
|
||||
console.log(row)
|
||||
this.$confirm('确认取消请款吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -383,9 +386,15 @@ export default {
|
||||
},
|
||||
searchRequestTable() { // 查询请款表
|
||||
this.loading2 = true
|
||||
if (this.startRequestDate === '' || this.startRequestDate === null || this.endRequestDate === '' || this.endRequestDate === null) {
|
||||
if ((this.startRequestDate === '' || this.startRequestDate === null) && (this.endRequestDate === '' || this.endRequestDate === null)) {
|
||||
this.checkRequest = 0
|
||||
} else { this.checkRequest = 1 }
|
||||
} else if (this.startRequestDate !== '' && this.startRequestDate !== null && this.endRequestDate !== '' && this.endRequestDate !== null) {
|
||||
this.checkRequest = 1
|
||||
} else {
|
||||
this.$message.error('请款时间区间有误')
|
||||
this.loading2 = false
|
||||
return
|
||||
}
|
||||
searchRequestTable(this.checkRequest, this.startRequestDate, this.endRequestDate).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
if (response.data[j].请款时间 !== null) {
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第1次付款时间">
|
||||
<el-select v-model="payTime1Value" placeholder="请选择" size="small" clearable>
|
||||
<el-select v-model="payTime1Value" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
@@ -62,7 +62,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第2次付款时间">
|
||||
<el-select v-model="payTime2Value" :disabled="disable2" placeholder="请选择" size="small" clearable>
|
||||
<el-select v-model="payTime2Value" :disabled="disable2" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
@@ -73,7 +73,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第3次付款时间">
|
||||
<el-select v-model="payTime3Value" :disabled="disable3" placeholder="请选择" size="small" clearable>
|
||||
<el-select v-model="payTime3Value" :disabled="disable3" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
@@ -84,7 +84,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第4次付款时间">
|
||||
<el-select v-model="payTime4Value" :disabled="disable4" placeholder="请选择" size="small" clearable>
|
||||
<el-select v-model="payTime4Value" :disabled="disable4" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
@@ -97,7 +97,7 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第5次付款时间">
|
||||
<el-select v-model="payTime5Value" :disabled="disable5" placeholder="请选择" size="small" clearable>
|
||||
<el-select v-model="payTime5Value" :disabled="disable5" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
@@ -118,7 +118,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="币种">
|
||||
<el-select v-model="currencyValue" placeholder="币种" size="small" clearable>
|
||||
<el-select v-model="currencyValue" placeholder="币种" size="small">
|
||||
<el-option
|
||||
v-for="item in currency"
|
||||
:key="item.value"
|
||||
@@ -251,17 +251,17 @@ export default {
|
||||
contractName: '产品购销合同', // 合同名称
|
||||
supplierName: '', // 供应商名称
|
||||
stipulateArrivalTime: '', // 规定到货时间
|
||||
payMethodValue: '', // 付款方式流水号
|
||||
payMethodValue: 1, // 付款方式流水号
|
||||
payMethodName: '', // 付款方式名称
|
||||
payMethod: [],
|
||||
payTime: [],
|
||||
payTime1Value: '', // 付款时间
|
||||
payTime2Value: '', // 付款时间
|
||||
payTime3Value: '', // 付款时间
|
||||
payTime4Value: '', // 付款时间
|
||||
payTime5Value: '', // 付款时间
|
||||
payTime6Value: '', // 付款时间
|
||||
freight: '', // 运费
|
||||
payTime1Value: 1, // 付款时间
|
||||
payTime2Value: 1, // 付款时间
|
||||
payTime3Value: 1, // 付款时间
|
||||
payTime4Value: 1, // 付款时间
|
||||
payTime5Value: 1, // 付款时间
|
||||
payTime6Value: 1, // 付款时间
|
||||
freight: 0, // 运费
|
||||
taxRate: '0.17', // 税率
|
||||
currencyValue: 1, // 币种
|
||||
currency: [
|
||||
@@ -380,10 +380,12 @@ export default {
|
||||
})
|
||||
initPayTimeNode().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.payTime.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
if (parseInt(response.data[i].付款时间节点流水号) !== 0) {
|
||||
this.payTime.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===1" type="warning" size="small">未询价</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)!==1&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" min-width="150">
|
||||
@@ -628,7 +628,30 @@ export default {
|
||||
})
|
||||
},
|
||||
exportInquirySheet(row) { // 导出询价单
|
||||
alert('do not done')
|
||||
this.$confirm('确认导出询价单' + row.询价单编号 + '?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
import('@/vendor/Export2Excelcjn').then(excel => {
|
||||
const tHeader = ['询价单编号', '供应商名称', '物料名称', '物料规格', '物料型号', '数量', '单价', '备注'] // 表头内容
|
||||
const filterVal = ['询价单编号', '供应商名称', '物料名称', '物料规格', '物料型号', '零件数量'] // tableData3里的属性名
|
||||
const list = this.tableData3
|
||||
const data = list.map(v => filterVal.map(j => v[j]))
|
||||
excel.export_json_to_excel({
|
||||
header: tHeader,
|
||||
data,
|
||||
filename: row.询价单编号 + '_' + row.供应商名称,
|
||||
autoWidth: true,
|
||||
bookType: 'xlsx'
|
||||
})
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) { // 表1多选
|
||||
console.log(val)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="到票情况" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-progress :text-inside="true" :stroke-width="18" :percentage="parseFloat((100*(scope.row.到票总金额/scope.row.合同总金额)).toFixed(2))" status="success"/>
|
||||
<el-progress :status="Number(scope.row.到票总金额)>Number(scope.row.合同总金额)?'exception':'success'" :text-inside="true" :stroke-width="18" :percentage="Number(scope.row.到票总金额)>Number(scope.row.合同总金额)?100:parseFloat((100*(scope.row.到票总金额/scope.row.合同总金额)).toFixed(2))"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
763
src/views/PurchasingCenter/MaterialManagement/index.vue
Normal file
763
src/views/PurchasingCenter/MaterialManagement/index.vue
Normal file
@@ -0,0 +1,763 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<!--<span>部门名称:</span>-->
|
||||
<!--<el-select v-model="DepartmentValue" style="width:200px" placeholder="请选择" size="small" clearable @change="searchMaterialCategory">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in Department"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value">-->
|
||||
<!--</el-option>-->
|
||||
<!--</el-select>-->
|
||||
<span>物料类别:</span>
|
||||
<el-select
|
||||
v-model="MaterialCategoryValue"
|
||||
style="width:200px"
|
||||
placeholder="请选择"
|
||||
size="small"
|
||||
clearable
|
||||
@change="searchMaterialVariety">
|
||||
<el-option
|
||||
v-for="item in MaterialCategory"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>物料品种:</span>
|
||||
<el-select
|
||||
v-model="MaterialVarietyValue"
|
||||
style="width:200px"
|
||||
placeholder="请选择"
|
||||
size="small"
|
||||
clearable
|
||||
@change="searchMaterial">
|
||||
<el-option
|
||||
v-for="item in MaterialVariety"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-refresh"
|
||||
size="small"
|
||||
style="margin-left: 15px"
|
||||
@click="CategoryMaintenance">维护物料类别
|
||||
</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="MaterialName" placeholder="物料名称" size="small" clearable style="margin-top: 15px;width:200px"/>
|
||||
<span>物料全称:</span>
|
||||
<el-input
|
||||
v-model="FullNameOfMaterial"
|
||||
placeholder="物料全称"
|
||||
size="small"
|
||||
clearable
|
||||
style="margin-top: 15px;width:200px"/>
|
||||
<span>物料规格:</span>
|
||||
<el-input
|
||||
v-model="MaterialSpecification"
|
||||
placeholder="物料规格"
|
||||
size="small"
|
||||
clearable
|
||||
style="margin-top: 15px;width:200px"/>
|
||||
<span>物料型号:</span>
|
||||
<el-input
|
||||
v-model="MaterialModel"
|
||||
placeholder="物料型号"
|
||||
size="small"
|
||||
clearable
|
||||
style="margin-top: 15px;width:200px"/>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<span>计算单位:</span>
|
||||
<el-select
|
||||
v-model="MeasurementUnitValue"
|
||||
style="margin-top: 15px;width:200px"
|
||||
placeholder="请选择"
|
||||
size="small"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in MeasurementUnit"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>物料来源:</span>
|
||||
<el-select
|
||||
v-model="MaterialSourceValue"
|
||||
style="margin-top: 15px;width:200px"
|
||||
placeholder="请选择"
|
||||
size="small"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in MaterialSource"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span style="margin-left: 25px">供货商:</span>
|
||||
<el-input
|
||||
v-model="supplier"
|
||||
placeholder="供货商"
|
||||
size="small"
|
||||
clearable
|
||||
style="margin-top: 15px;width:200px"
|
||||
@dblclick.native="param=0;openSupplier()"/>
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-search"
|
||||
size="small"
|
||||
style="margin-top: 15px;margin-left: 15px"
|
||||
@click="pageCurrent=1;searchMaterial()">查询
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">增加</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card style="margin-top: 15px">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
height="440"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="物料名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料规格">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料型号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="供货商">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="参考价格">
|
||||
<template slot-scope="scope">
|
||||
{{ 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>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="选择供货商" center width="400px">
|
||||
<el-input v-model="supplier1" placeholder="供货商" size="small" clearable style="width:200px"/>
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-search"
|
||||
size="small"
|
||||
style="margin-left: 15px; margin-bottom: 10px"
|
||||
@click="pageCurrent1=1;searchSupplier()">查询
|
||||
</el-button>
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
border
|
||||
@row-click="selectSupplier">
|
||||
<el-table-column align="center" label="供货商">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
small
|
||||
layout="sizes, prev, pager, next"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitSupplier">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="800px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料类别" prop="物料类别流水号">
|
||||
<el-select
|
||||
v-model="form.物料类别流水号"
|
||||
style="width:200px"
|
||||
placeholder="请选择"
|
||||
size="small"
|
||||
clearable
|
||||
@change="searchMaterialVariety1">
|
||||
<el-option
|
||||
v-for="item in MaterialCategory1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料品种" prop="物料品种流水号">
|
||||
<el-select v-model="form.物料品种流水号" style="width:200px" placeholder="请选择" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in MaterialVariety1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料名称" prop="物料名称">
|
||||
<el-input v-model="form.物料名称" placeholder="物料名称" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料全名" prop="物料全名">
|
||||
<el-input v-model="form.物料全名" placeholder="物料全名" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料规格" prop="物料规格">
|
||||
<el-input v-model="form.物料规格" placeholder="物料规格" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料型号" prop="物料型号">
|
||||
<el-input v-model="form.物料型号" placeholder="物料型号" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计量单位" prop="计量单位流水号">
|
||||
<el-select v-model="form.计量单位流水号" style="width:200px" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in MeasurementUnit"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料来源" prop="物料来源流水号">
|
||||
<el-select v-model="form.物料来源流水号" style="width:200px" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in MaterialSource"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供货商" prop="供货商">
|
||||
<el-input
|
||||
v-model="form.供货商"
|
||||
placeholder="供货商"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@click.native="param=1;openSupplier()"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel('form')">取消</el-button>
|
||||
<el-button v-show="title==='增加'" type="primary" @click="submitAdd('form')">确定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="物料类别维护" center width="1200px">
|
||||
<div style="width: 47%;display: inline-block">
|
||||
<el-card>
|
||||
<span>物料类别:</span>
|
||||
<el-input v-model="MaterialCategory2" placeholder="物料类别" size="mini" clearable style="width:100px"/>
|
||||
<span>类别编号:</span>
|
||||
<el-input v-model="CategoryNumber" placeholder="类别编号" size="mini" clearable style="width:100px"/>
|
||||
<el-button type="primary" size="mini" style="margin-left: 10px" @click="handleAdd1">增加</el-button>
|
||||
<el-button type="warning" size="mini" @click="handleEdit1">编辑</el-button>
|
||||
<br>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
size="mini"
|
||||
height="328"
|
||||
highlight-current-row
|
||||
border
|
||||
@row-click="selectMaterialCategory">
|
||||
<el-table-column align="center" label="物料类别">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料类别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="类别编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类别编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="ID">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料类别ID }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="handleDelete1(scope.row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<div style="width: 49%;display: inline-block;margin-left: 20px">
|
||||
<el-card>
|
||||
<span>品种编号:</span>
|
||||
<el-input v-model="VarietyNumber" placeholder="品种编号" size="mini" clearable style="width:100px"/>
|
||||
<span>物料品种:</span>
|
||||
<el-input v-model="MaterialVariety2" placeholder="物料品种" size="mini" clearable style="width:100px"/>
|
||||
<span>规格1:</span>
|
||||
<el-input v-model="Specifications1" placeholder="规格1" size="mini" clearable style="width:100px"/>
|
||||
<br>
|
||||
<span style="margin-left: 30px">规格2:</span>
|
||||
<el-input v-model="Specifications2" placeholder="规格2" size="mini" clearable style="width:100px"/>
|
||||
<el-button type="primary" size="mini" style="margin-left: 10px" @click="handleAdd2">增加</el-button>
|
||||
<el-button type="warning" size="mini" @click="handleEdit2">编辑</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
:data="tableData3"
|
||||
size="mini"
|
||||
height="300"
|
||||
highlight-current-row
|
||||
border
|
||||
@row-click="selectMaterialVariety">
|
||||
<el-table-column align="center" label="品种编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.品种编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料品种">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料品种 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="规格1">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="规格2">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格2 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="handleDelete2(scope.row)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
initDepartmentName,
|
||||
initMaterialCategory,
|
||||
initMaterialVariety,
|
||||
initMeasurementUnit,
|
||||
initMaterialSource,
|
||||
searchmaterial,
|
||||
getSupplier,
|
||||
addData,
|
||||
editData,
|
||||
deleteData,
|
||||
searchCategory,
|
||||
searchVarieties,
|
||||
editCategory,
|
||||
addCategory,
|
||||
deleteCategory,
|
||||
editVariety,
|
||||
addVariety,
|
||||
deleteVariety
|
||||
} from '@/api/PurchasingCenter/MaterialManagement'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
DepartmentValue: '', // 部门名称
|
||||
Department: [], // 部门数组
|
||||
MaterialCategoryValue: '', // 物料类别
|
||||
MaterialCategory: [], // 物料类别数组
|
||||
MaterialVarietyValue: '', // 物料品种
|
||||
MaterialVariety: [], // 物料品种数组
|
||||
MaterialName: '', // 物料名称
|
||||
FullNameOfMaterial: '', // 物料全称
|
||||
MaterialSpecification: '', // 物料规格
|
||||
MaterialModel: '', // 物料型号
|
||||
MeasurementUnitValue: '', // 计量单位
|
||||
MeasurementUnit: [], // 计量单位数组
|
||||
MaterialSourceValue: '', // 物料来源
|
||||
MaterialSource: [], // 物料来源数组
|
||||
supplier: '', // 供货商
|
||||
supplier1: '', // 供货商(弹框)
|
||||
supplierValue: '', // 供货商流水号
|
||||
ReferencePrice: '', // 参考价格
|
||||
supplierValue1: '',
|
||||
MaterialCategory1: [],
|
||||
MaterialVariety1: [],
|
||||
MaterialCategory2: '', // 物料类别
|
||||
CategoryNumber: '', // 类别编号
|
||||
VarietyNumber: '', // 品种编号
|
||||
MaterialVariety2: '', // 物料品种
|
||||
Specifications1: '', // 规格1
|
||||
Specifications2: '', // 规格2
|
||||
MaterialCategoryNum: '', // 物料类别流水号
|
||||
MaterialVarietyNum: '', // 物料品种流水号
|
||||
param: 0,
|
||||
tableData: [],
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: null,
|
||||
tableData1: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: null,
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
check1: '',
|
||||
check2: '',
|
||||
check3: '',
|
||||
check4: '',
|
||||
check5: '',
|
||||
check6: '',
|
||||
check7: '',
|
||||
check8: '',
|
||||
check9: '',
|
||||
check10: '',
|
||||
title: '',
|
||||
form: {
|
||||
物料流水号: '',
|
||||
物料类别流水号: '',
|
||||
物料品种流水号: '',
|
||||
物料名称: '',
|
||||
物料全名: '',
|
||||
物料规格: '',
|
||||
物料型号: '',
|
||||
计量单位流水号: '',
|
||||
物料来源流水号: '',
|
||||
供货商: ''
|
||||
},
|
||||
rules: {
|
||||
物料名称: [{ required: true, message: '请输入物料名称', trigger: 'blur' }],
|
||||
供货商: [{ required: true, message: '请选择供货商', trigger: 'change' }],
|
||||
物料类别流水号: [{ required: true, message: '请选择物料类别', trigger: 'change' }],
|
||||
物料品种流水号: [{ required: true, message: '请选择物料品种', trigger: 'change' }],
|
||||
计量单位流水号: [{ required: true, message: '请选择计量单位', trigger: 'change' }],
|
||||
物料来源流水号: [{ required: true, message: '请选择物料来源', trigger: 'change' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchMaterialCategory()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initDepartmentName, ['物料部门名称', '物料部门流水号'], 'Department') // 物料部门
|
||||
this.getSelect(initMeasurementUnit, ['计量单位', '计量单位流水号'], 'MeasurementUnit') // 计量单位
|
||||
this.getSelect(initMaterialSource, ['物料来源', '物料来源流水号'], 'MaterialSource') // 物料来源
|
||||
},
|
||||
searchMaterialCategory() { // 获取物料类别
|
||||
this.MaterialCategory = []
|
||||
this.MaterialVariety = []
|
||||
this.MaterialCategoryValue = ''
|
||||
this.MaterialVarietyValue = ''
|
||||
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory', [0, this.DepartmentValue])
|
||||
},
|
||||
searchMaterialVariety() { // 初始化物料品种
|
||||
this.MaterialVariety = []
|
||||
this.MaterialVarietyValue = ''
|
||||
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety', this.MaterialCategoryValue)
|
||||
},
|
||||
searchMaterial() { // 物料查询
|
||||
this.MaterialName !== '' ? this.check1 = 1 : this.check1 = 0 // 物料名称
|
||||
this.FullNameOfMaterial !== '' ? this.check2 = 1 : this.check2 = 0 // 物料全称
|
||||
this.MaterialSpecification !== '' ? this.check3 = 1 : this.check3 = 0 // 物料规格
|
||||
this.MaterialModel !== '' ? this.check4 = 1 : this.check4 = 0 // 物料型号
|
||||
this.MaterialCategoryValue !== '' ? this.check5 = 1 : this.check5 = 0 // 物料类别
|
||||
this.MaterialVarietyValue !== '' ? this.check6 = 1 : this.check6 = 0 // 物料品种
|
||||
this.MeasurementUnitValue !== '' ? this.check7 = 1 : this.check7 = 0 // 计量单位
|
||||
this.MaterialSourceValue !== '' ? this.check8 = 1 : this.check8 = 0 // 物料来源
|
||||
this.supplier !== '' ? this.check9 = 1 : this.check9 = 0 // 供货商
|
||||
searchmaterial(this.check1, this.MaterialName, this.check2, this.FullNameOfMaterial, this.check3, this.MaterialSpecification, this.check4, this.MaterialModel, this.pageCurrent, this.pageSize, this.check5, this.MaterialCategoryValue, this.check6, this.MaterialVarietyValue, this.check7, this.MeasurementUnitValue, this.check8, this.MaterialSourceValue, this.check9, this.supplierValue).then(response => {
|
||||
this.tableData = response.data.result
|
||||
this.total = parseInt(response.data.output[0].ItemCount)
|
||||
})
|
||||
},
|
||||
openSupplier() {
|
||||
this.dialogFormVisible = true
|
||||
this.supplier1 = ''
|
||||
this.check10 = 0
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = 10
|
||||
this.getTable(getSupplier, [this.check10, this.supplier1, this.pageCurrent1, this.pageSize1], ['tableData1', 'total1'])
|
||||
},
|
||||
searchSupplier() {
|
||||
this.supplier1 !== '' ? this.check10 = 1 : this.check10 = 0
|
||||
this.getTable(getSupplier, [this.check10, this.supplier1, this.pageCurrent1, this.pageSize1], ['tableData1', 'total1'])
|
||||
},
|
||||
selectSupplier(row) {
|
||||
if (this.param === 0) {
|
||||
this.supplierValue = row.供货商流水号
|
||||
} else if (this.param === 1) {
|
||||
this.supplierValue1 = row.供货商流水号
|
||||
}
|
||||
this.supplier1 = row.供货商
|
||||
},
|
||||
submitSupplier() {
|
||||
if (this.param === 0) {
|
||||
this.supplier = this.supplier1
|
||||
} else if (this.param === 1) {
|
||||
this.form.供货商 = this.supplier1
|
||||
}
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
cancel() { // 取消
|
||||
this.dialogFormVisible1 = false
|
||||
},
|
||||
searchMaterialVariety1() { // 物料品种
|
||||
this.MaterialVariety1 = []
|
||||
this.form.物料品种流水号 = ''
|
||||
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety1', this.form.物料类别流水号)
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.supplierValue1 = ''
|
||||
this.MaterialCategory1 = []
|
||||
this.MaterialVariety1 = []
|
||||
this.supplierValue1 = row.供货商流水号
|
||||
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory1')
|
||||
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety1', row.物料类别流水号)
|
||||
this.editForm(row, 'form', [this.title = '编辑', this.dialogFormVisible1 = true])
|
||||
},
|
||||
submitEdit() {
|
||||
this.editTable(editData, [this.form.物料流水号, this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.supplierValue1], 'form', function() {
|
||||
this.searchMaterial()
|
||||
this.dialogFormVisible1 = false
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.supplierValue1 = ''
|
||||
this.MaterialCategory1 = []
|
||||
this.MaterialVariety1 = []
|
||||
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory1')
|
||||
this.addForm('form', [this.dialogFormVisible1 = true, this.title = '增加'])
|
||||
},
|
||||
submitAdd() { // 提交增加
|
||||
this.addTable(addData, [this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.supplierValue1], 'form', function() {
|
||||
this.dialogFormVisible1 = false
|
||||
this.searchMaterial()
|
||||
})
|
||||
},
|
||||
handleDelete(row) { // 删除
|
||||
this.deleteRow(deleteData, row.物料流水号, function() {
|
||||
this.searchMaterial()
|
||||
})
|
||||
},
|
||||
CategoryMaintenance() {
|
||||
this.dialogFormVisible2 = true
|
||||
this.getData(searchCategory, 'tableData2')
|
||||
},
|
||||
selectMaterialCategory(row) {
|
||||
this.MaterialCategory2 = row.物料类别
|
||||
this.CategoryNumber = row.类别编号
|
||||
this.MaterialCategoryNum = row.物料类别流水号
|
||||
this.getData(searchVarieties, 'tableData3', row.物料类别流水号)
|
||||
},
|
||||
selectMaterialVariety(row) {
|
||||
this.MaterialVarietyNum = row.物料品种流水号
|
||||
this.VarietyNumber = row.品种编号
|
||||
this.MaterialVariety2 = row.物料品种
|
||||
this.Specifications1 = row.规格1
|
||||
this.Specifications2 = row.规格2
|
||||
},
|
||||
handleEdit1() {
|
||||
editCategory(this.MaterialCategoryNum, this.MaterialCategory2, this.CategoryNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.getData(searchCategory, 'tableData2')
|
||||
this.tableData3 = []
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd1() {
|
||||
addCategory(this.MaterialCategory2, this.CategoryNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.getData(searchCategory, 'tableData2')
|
||||
this.tableData3 = []
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete1(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteCategory(row.物料类别流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.getData(searchCategory, 'tableData2')
|
||||
this.tableData3 = []
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleEdit2() {
|
||||
editVariety(this.MaterialVarietyNum, this.MaterialCategoryNum, this.MaterialVariety2, this.VarietyNumber, this.Specifications1, this.Specifications2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.getData(searchVarieties, 'tableData3', this.MaterialCategoryNum)
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleAdd2() {
|
||||
addVariety(this.MaterialCategoryNum, this.MaterialVariety2, this.VarietyNumber, this.Specifications1, this.Specifications2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.getData(searchVarieties, 'tableData3', this.MaterialCategoryNum)
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete2(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteVariety(row.物料品种流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.getData(searchVarieties, 'tableData3', this.MaterialCategoryNum)
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchMaterial()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchMaterial()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.supplier1 !== '' ? this.check10 = 1 : this.check10 = 0
|
||||
this.getTable(getSupplier, [this.check10, this.supplier1, this.pageCurrent1, this.pageSize1], ['tableData1', 'total1'])
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.supplier1 !== '' ? this.check10 = 1 : this.check10 = 0
|
||||
this.getTable(getSupplier, [this.check10, this.supplier1, this.pageCurrent1, this.pageSize1], ['tableData1', 'total1'])
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span {
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -95,7 +95,7 @@
|
||||
</el-table>
|
||||
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-left: 10px" @click="searchTable02(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button :disabled="parseInt(scope.row.审核情况流水号)!==3&&parseInt(scope.row.审批情况流水号)!==3&&parseInt(scope.row.付款情况流水号)!==3" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
<el-button :disabled="parseInt(scope.row.审核情况流水号)===1" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" show-summary border style="width: 100%;max-height: 500px;" height="500px" size="mini">
|
||||
<el-table v-loading="" :data="tableData1" show-summary stripe border style="width: 100%;max-height: 500px;" height="500px" size="mini">
|
||||
<el-table-column label="序号" align="center" width="80" type="index"/>
|
||||
<el-table-column label="项目名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
@@ -29,16 +30,16 @@
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
|
||||
@@ -99,60 +99,58 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<div style="width:900px;margin-left: 350px">
|
||||
<el-card>
|
||||
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<div style="width:900px;margin: 0 auto">
|
||||
<el-card>
|
||||
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center" style="font-weight: bold">GAOJING</td>
|
||||
<td colspan="3" align="center" style="font-weight: bold">产品销售合同</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">需方</td>
|
||||
<td colspan="1" align="center">江苏高精机电装备有限公司</td>
|
||||
<td colspan="1" align="center">合同编号</td>
|
||||
<td colspan="1" align="center">{{ contract }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">供方</td>
|
||||
<td colspan="1" align="center">{{ supplier }}</td>
|
||||
<td colspan="1" align="center">签订地点</td>
|
||||
<td colspan="1" align="center">江苏盐城</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>一、 产品名称、型号、数量、单价、品牌:</div>
|
||||
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="4">
|
||||
<tr id="tableHead" style="height: 40px">
|
||||
<td colspan="1" align="center">物料名称</td>
|
||||
<td colspan="1" align="center">物料规格</td>
|
||||
<td colspan="1" align="center">物料型号</td>
|
||||
<td colspan="1" align="center">发货天数</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center" style="font-weight: bold">GAOJING</td>
|
||||
<td colspan="3" align="center" style="font-weight: bold">产品销售合同</td>
|
||||
<td colspan="6">运费:</td>
|
||||
<td colspan="1" align="center">{{ freight }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">需方</td>
|
||||
<td colspan="1" align="center">江苏高精机电装备有限公司</td>
|
||||
<td colspan="1" align="center">合同编号</td>
|
||||
<td colspan="1" align="center">{{ contract }}</td>
|
||||
<td colspan="6">总价: (人民币){{ RMB }}(含0.17增值税) </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">供方</td>
|
||||
<td colspan="1" align="center">{{ supplier }}</td>
|
||||
<td colspan="1" align="center">签订地点</td>
|
||||
<td colspan="1" align="center">江苏盐城</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>一、 产品名称、型号、数量、单价、品牌:</div>
|
||||
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="4">
|
||||
<tr id="tableHead" style="height: 40px">
|
||||
<td colspan="1" align="center">物料名称</td>
|
||||
<td colspan="1" align="center">物料规格</td>
|
||||
<td colspan="1" align="center">物料型号</td>
|
||||
<td colspan="1" align="center">发货天数</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="6">运费:</td>
|
||||
<td colspan="1" align="center">{{ freight }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="6">总价: (人民币){{ RMB }}(含0.17增值税) </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div id="23"/>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div id="23"/>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible3" title="审批" center style="min-height: 300px;" width="20%">
|
||||
<el-dialog :visible.sync="dialogVisible3" title="审批" center style="min-height: 300px;" width="370px">
|
||||
<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-select v-model="form2.审批是否通过" size="small">
|
||||
<el-option
|
||||
v-for="item in approval"
|
||||
:key="item.value"
|
||||
@@ -161,7 +159,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="未通过原因" prop="未通过原因">
|
||||
<el-input v-model="form2.未通过原因" :disabled="disabled" size="small"/>
|
||||
<el-input v-model="form2.未通过原因" :disabled="form2.审批是否通过!==2" size="small"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -213,9 +211,8 @@ export default {
|
||||
label: '否'
|
||||
}
|
||||
],
|
||||
disabled: true,
|
||||
form2: {
|
||||
审批是否通过: '',
|
||||
审批是否通过: 1,
|
||||
未通过原因: ''
|
||||
},
|
||||
rules2: {},
|
||||
@@ -277,11 +274,6 @@ export default {
|
||||
this.dialogVisible3 = true
|
||||
this.ProcurementContractNum = row.采购合同流水号
|
||||
},
|
||||
selectChange() {
|
||||
if (this.form2.审批是否通过 === 2) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
submitApproval(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// 导出Excel方法(表格id,不加扩展名的文件名,sheet名)
|
||||
export function exportExcelMethod(tableId, fileName, sheetName) {
|
||||
tableToExcel(tableId, fileName, sheetName)
|
||||
}
|
||||
const tableToExcel = (function() {
|
||||
const uri = 'data:application/vnd.ms-excel;base64,'
|
||||
// 设置导出表格的单元格默认高度/宽度/边框样式/字体颜色/背景颜色/居中,网页显示表格宽度建议1240,tr/td视情况而定
|
||||
const template = `<html xmlns:x="urn:schemas-microsoft-com:office:excel"><head><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><meta charset="UTF-8"><style type="text/css">table td {border: 2px solid #000000;width:100px;text-align: center;color: #000000;}</style></head><body><table>{table}</table></body></html>`
|
||||
const base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) }
|
||||
const format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p] }) }
|
||||
return function(table, filename, sheetname) {
|
||||
if (!table.nodeType) table = document.getElementById(table)
|
||||
const ctx = { worksheet: sheetname || 'Worksheet', table: table.innerHTML }
|
||||
const aTag = document.createElement('a')
|
||||
aTag.href = uri + base64(format(template, ctx))
|
||||
aTag.download = filename
|
||||
aTag.click()
|
||||
}
|
||||
})()
|
||||
@@ -23,7 +23,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" clearable style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
@@ -46,6 +46,11 @@
|
||||
icon="el-icon-search"
|
||||
style="margin-left:10px"
|
||||
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
size="small"
|
||||
icon="el-icon-download"
|
||||
@click="download()">导出</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
@@ -120,27 +125,28 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<div style="float: left">
|
||||
<b>二维码:</b><br>
|
||||
<img id="img">
|
||||
</div>
|
||||
<div style="width:900px;margin-left: 350px">
|
||||
<el-card>
|
||||
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<div style="margin:5px;float: left">
|
||||
<b>二维码:</b><br>
|
||||
<img id="img">
|
||||
</div>
|
||||
<div style="width:900px;margin: 0 auto">
|
||||
<el-card>
|
||||
<div id="print" style="width:860px;">
|
||||
<table id="1" cellspacing="0px" align="center" border width="100%">
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center" style="font-weight: bold">GAOJING</td>
|
||||
<td colspan="3" align="center" style="font-weight: bold">产品销售合同</td>
|
||||
<td colspan="4" align="center" style="font-weight: bold">产品销售合同</td>
|
||||
<td colspan="2" rowspan="3" align="center" style="width: 100px"/>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">需方</td>
|
||||
<td colspan="1" align="center">江苏高精机电装备有限公司</td>
|
||||
<td colspan="2" align="center">江苏高精机电装备有限公司</td>
|
||||
<td colspan="1" align="center">合同编号</td>
|
||||
<td colspan="1" align="center">{{ contract }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">供方</td>
|
||||
<td colspan="1" align="center">{{ supplier }}</td>
|
||||
<td colspan="2" align="center">{{ supplier }}</td>
|
||||
<td colspan="1" align="center">签订地点</td>
|
||||
<td colspan="1" align="center">江苏盐城</td>
|
||||
</tr>
|
||||
@@ -149,10 +155,9 @@
|
||||
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="4">
|
||||
<tr id="tableHead" style="height: 40px">
|
||||
<td colspan="1" align="center">物料名称</td>
|
||||
<td colspan="2" align="center">物料名称</td>
|
||||
<td colspan="1" align="center">物料规格</td>
|
||||
<td colspan="1" align="center">物料型号</td>
|
||||
<td colspan="1" align="center">发货天数</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
@@ -170,9 +175,9 @@
|
||||
</tfoot>
|
||||
</table>
|
||||
<div id="23"/>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<el-card v-show="searchView">
|
||||
<!--将新一般处理页添加至通讯服务器-->
|
||||
@@ -186,6 +191,7 @@
|
||||
import { initContract, initBuyer, searchTable1, searchTable2 } from '@/api/PurchasingCenter/PurchaseContractSearch'
|
||||
import { searchFile } from '@/api/PurchasingCenter/CreateContract'
|
||||
import QRCode from 'qrcode'
|
||||
import { exportExcelMethod } from './exportExcel'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -240,6 +246,13 @@ export default {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
download() {
|
||||
if (this.contract) {
|
||||
exportExcelMethod('print', '采购合同', '采购合同sheet1')
|
||||
} else {
|
||||
this.$message.error('请选择合同')
|
||||
}
|
||||
},
|
||||
useqrcode(contractNum) {
|
||||
const opts = {
|
||||
errorCorrectionLevel: 'H',
|
||||
@@ -248,7 +261,9 @@ export default {
|
||||
quality: 0.3
|
||||
}
|
||||
}
|
||||
const str = 'http://192.168.1.111:8022/searchContract.html?contractNum=' + contractNum
|
||||
// const str = 'http://192.168.1.111:8022/searchContract.html?contractNum=' + contractNum
|
||||
// const str = 'http://192.168.1.111:8080/#/ContractInquiry/index?id=' + contractNum
|
||||
const str = contractNum
|
||||
QRCode.toDataURL(str, opts, function(err, url) {
|
||||
if (err) throw err
|
||||
const img = document.getElementById('img')
|
||||
@@ -355,7 +370,7 @@ export default {
|
||||
for (let i = 0; i < this.returns.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData')
|
||||
tr[i].innerHTML = '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead').after(tr[i])
|
||||
}
|
||||
@@ -363,10 +378,9 @@ export default {
|
||||
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
|
||||
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].发货天数
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].金额
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,45 +1,59 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
|
||||
<span>分配情况:</span>
|
||||
<el-select v-model="allocateStateValue" placeholder="分配情况" size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in allocateState"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button>
|
||||
<span>采购员:</span>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-menu"
|
||||
style="margin-left: 10px"
|
||||
@click="allocateTask">分配</el-button>
|
||||
</el-card>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="16">
|
||||
<el-card>
|
||||
<span style="margin:0">项目名称:</span>
|
||||
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="materialName" placeholder="物料名称" style="width:170px" size="small" clearable/>
|
||||
<span>分配情况:</span>
|
||||
<el-select v-model="allocateStateValue" placeholder="分配情况" size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in allocateState"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card>
|
||||
<span>采购员:</span>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-menu"
|
||||
style="margin-left: 10px"
|
||||
@click="allocateTask">分配</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
icon="el-icon-back"
|
||||
style="margin-left: 10px"
|
||||
@click="executeReturn">退回</el-button>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
@@ -109,7 +123,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, initBuyer, searchTable1, allocateTask } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
|
||||
import { initProject, initBuyer, searchTable1, allocateTask, executeReturn } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -140,6 +154,7 @@ export default {
|
||||
check2: 0,
|
||||
tableData1: [],
|
||||
standardAndPurchase: [],
|
||||
groupAndPart: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 20,
|
||||
total1: 0
|
||||
@@ -187,8 +202,10 @@ export default {
|
||||
},
|
||||
handleSelectionChange1(val) { // 多选
|
||||
this.standardAndPurchase = []
|
||||
this.groupAndPart = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.standardAndPurchase.push(val[i].标准件和外购件流水号)
|
||||
this.groupAndPart.push(val[i].组件零件流水号)
|
||||
}
|
||||
},
|
||||
selectable(row) { // 多选禁用
|
||||
@@ -231,6 +248,29 @@ export default {
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
executeReturn() { // 退回
|
||||
if (this.standardAndPurchase.length === 0) {
|
||||
this.$message.error('请选择需退回的物料')
|
||||
} else {
|
||||
this.$confirm('此操作执行后不可修改,是否确定退回?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
executeReturn(this.standardAndPurchase, this.groupAndPart).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<span>传送人:</span>
|
||||
<el-select v-model="transmitValue" placeholder="传送人" size="small" filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
v-for="item in sender"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
@@ -27,7 +27,7 @@
|
||||
<span>接收人:</span>
|
||||
<el-select v-model="recipientValue" placeholder="接收人" size="small" filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
v-for="item in receiver"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
@@ -61,7 +61,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票时间" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票时间 }}
|
||||
{{ scope.row.开票时间 ? scope.row.开票时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票金额" min-width="100px">
|
||||
@@ -96,12 +96,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="接收人" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.接收人姓名 }}
|
||||
{{ scope.row.接收人姓名==='请选择' ? '—' : scope.row.接收人姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备注" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
{{ scope.row.备注 ? scope.row.备注 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" fixed="right" width="200px">
|
||||
@@ -158,7 +158,7 @@
|
||||
<el-form-item label="传送人" prop="sendPerson">
|
||||
<el-select v-model="form1.sendPersonValue" placeholder="传送人" size="small" disabled filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
v-for="item in sender"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
@@ -167,7 +167,7 @@
|
||||
<el-form-item label="接收人" prop="receivePerson">
|
||||
<el-select v-model="form1.receivePersonValue" placeholder="接收人" size="small" filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
v-for="item in receiver"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
@@ -187,7 +187,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchInvoice, addInvoice, editInvoice, deleteInvoice, initPerson, initContract } from '@/api/PurchasingCenter/ReceiptConnectionSheet'
|
||||
import { searchInvoice, addInvoice, editInvoice, deleteInvoice, initSender, initReceiver, initContract } from '@/api/PurchasingCenter/ReceiptConnectionSheet'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -199,7 +199,8 @@ export default {
|
||||
invoiceNum: '',
|
||||
invoiceTime: '',
|
||||
transmitValue: '',
|
||||
selectPerson: [], // 传送人接收人
|
||||
sender: [], // 传送人
|
||||
receiver: [], // 接收人
|
||||
recipientValue: '',
|
||||
contractNum: '',
|
||||
pageCurrent1: 1,
|
||||
@@ -255,9 +256,17 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
initPerson().then(response => {
|
||||
initSender().then(response => { // 传送人
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.selectPerson.push({
|
||||
this.sender.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
initReceiver().then(response => { // 接收人
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.receiver.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
|
||||
@@ -19,8 +19,9 @@
|
||||
height="440"
|
||||
size="mini"
|
||||
show-summary
|
||||
highlight-current-row
|
||||
stripe
|
||||
border>
|
||||
<el-table-column align="center" label="序号" type="index"/>
|
||||
<el-table-column align="center" label="项目名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
@@ -62,16 +63,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -111,20 +102,10 @@ export default {
|
||||
if (!this.projectValue) {
|
||||
this.$message.error('请选择项目')
|
||||
} else {
|
||||
searchReceiveCheck(this.pageCurrent, this.pageSize, 1, this.projectValue).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total = response.data.total
|
||||
searchReceiveCheck(1, this.projectValue).then(response => {
|
||||
this.tableData1 = response.data
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchProject()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchProject()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
<!--二维码扫描查询-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading0" :data="tableData" height="650" style="width: 100%;" border>
|
||||
<el-table-column
|
||||
label=" "
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column label="外协厂家名称" align="center" width="280px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协厂家名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchtable } from '@/api/Outsourcing/OutFactoryMaintenance'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading0: false,
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
// 查询
|
||||
searchTable() {
|
||||
this.loading0 = true
|
||||
searchtable(this.pageCurrent, this.pageSize, this.num1, this.ManufacturerNumber, this.num2, this.ManufacturerName, this.num10, this.ManufacturerAbbreviation, this.num3, this.address, this.num4, this.roleName, this.num5, this.phNumber, this.num6, this.Fax, this.num7, this.Remarks, this.num8, this.category, this.num11, this.attention, this.num9, this.EquipmentCondition).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading0 = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
@@ -260,7 +260,7 @@
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="editFile(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
@@ -274,7 +274,7 @@
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="receiptTitle" :visible.sync="receiptVisible" center style="min-height: 200px" width="800px">
|
||||
<el-form ref="receiptForm" :rules="rules" :model="receiptForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form ref="receiptForm" :rules="receiptRules" :model="receiptForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="装箱单号" prop="装箱单号">
|
||||
@@ -321,10 +321,10 @@
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="machineVisible" :title="machineTitle" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="machineForm" :rules="rules" :model="machineForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form ref="machineForm" :rules="machineRules" :model="machineForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col v-if="machineTitle==='添加主机'" :span="24">
|
||||
<el-form-item label="机床号" prop="装箱单号">
|
||||
<el-form-item label="机床号" prop="机床号">
|
||||
<el-select v-model="machineValue" placeholder="请选择机床图号" filterable size="small">
|
||||
<el-option
|
||||
v-for="item in machine"
|
||||
@@ -354,7 +354,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="fileVisible" :title="fileTitle" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="machineForm" :rules="rules" :model="fileForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form ref="fileForm" :rules="filerules" :model="fileForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="名称" prop="名称">
|
||||
@@ -381,7 +381,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="spareVisible" :title="spareTitle" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="machineForm" :rules="rules" :model="spareForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form ref="spareForm" :rules="spareRule" :model="spareForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="名称" prop="名称">
|
||||
@@ -439,13 +439,17 @@ export default {
|
||||
spareVisible: false,
|
||||
spareTitle: '',
|
||||
spareForm: {
|
||||
序号: '',
|
||||
备件编号: '',
|
||||
名称: '',
|
||||
规格: '',
|
||||
单位: '',
|
||||
备注: '',
|
||||
数量: ''
|
||||
},
|
||||
spareRule: {
|
||||
名称: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
||||
数量: [{ required: true, message: '请输入数量', trigger: 'blur' }]
|
||||
},
|
||||
spareData: [],
|
||||
receiptForm: {
|
||||
装箱单号: '',
|
||||
@@ -455,12 +459,21 @@ export default {
|
||||
联系人: '',
|
||||
联系方式: ''
|
||||
},
|
||||
receiptRules: {
|
||||
装箱单号: [{ required: true, message: '请输入装箱单号', trigger: 'blur' }],
|
||||
名称: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
||||
发货节点: [{ required: true, message: '请输入发货节点', trigger: 'blur' }]
|
||||
},
|
||||
machineForm: {
|
||||
序号: '',
|
||||
机床号: '',
|
||||
备注: '',
|
||||
数量: ''
|
||||
},
|
||||
machineRules: {
|
||||
机床号: [{ required: true, message: '请选择机床号', trigger: 'change' }],
|
||||
数量: [{ required: true, message: '请输入数量', trigger: 'blur' }]
|
||||
},
|
||||
rules: {
|
||||
},
|
||||
machineTableData: [],
|
||||
@@ -469,10 +482,14 @@ export default {
|
||||
fileVisible: false,
|
||||
fileTitle: '',
|
||||
fileForm: {
|
||||
序号: '',
|
||||
文件编号: '',
|
||||
名称: '',
|
||||
数量: '',
|
||||
备注: ''
|
||||
},
|
||||
filerules: {
|
||||
名称: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
||||
数量: [{ required: true, message: '请输入数量', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -495,6 +512,10 @@ export default {
|
||||
}
|
||||
},
|
||||
projectValue(val) {
|
||||
this.machineTableData = []
|
||||
this.receiptData = []
|
||||
this.spareData = []
|
||||
this.fileData = []
|
||||
if (val) {
|
||||
this.getMachineSelect(val)
|
||||
}
|
||||
@@ -570,8 +591,11 @@ export default {
|
||||
cancel() {
|
||||
this.receiptVisible = false
|
||||
this.machineVisible = false
|
||||
this.fileVisible = false
|
||||
this.spareVisible = false
|
||||
},
|
||||
async getMachineData() {
|
||||
this.machineTableData = []
|
||||
const response = await getMachineData(this.receiptNum)
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
@@ -598,11 +622,15 @@ export default {
|
||||
})
|
||||
},
|
||||
async submitAddMachine() {
|
||||
const response = await addMachineData(this.projectName, this.machineValue, this.machineForm.备注, this.machineForm.数量, this.receiptNum)
|
||||
if (response.data[0].result === '1') {
|
||||
this.addTable(addMachineData, [this.projectName, this.machineValue, this.machineForm.备注, this.machineForm.数量, this.receiptNum], 'machineForm', function() {
|
||||
this.machineVisible = false
|
||||
this.getMachineData()
|
||||
}
|
||||
})
|
||||
// const response = await addMachineData(this.projectName, this.machineValue, this.machineForm.备注, this.machineForm.数量, this.receiptNum)
|
||||
// if (response.data[0].result === '1') {
|
||||
// this.machineVisible = false
|
||||
// this.getMachineData()
|
||||
// }
|
||||
},
|
||||
editMachine(row) {
|
||||
this.editForm(row, 'machineForm', function() {
|
||||
@@ -611,11 +639,15 @@ export default {
|
||||
})
|
||||
},
|
||||
async submitEditMachine() {
|
||||
const response = await updateMachineData(this.machineForm.序号, this.machineForm.数量, this.machineForm.备注)
|
||||
if (response.data[0].result === '1') {
|
||||
this.editTable(updateMachineData, [this.machineForm.序号, this.machineForm.数量, this.machineForm.备注], 'machineForm', function() {
|
||||
this.machineVisible = false
|
||||
this.getMachineData()
|
||||
}
|
||||
})
|
||||
// const response = await updateMachineData(this.machineForm.序号, this.machineForm.数量, this.machineForm.备注)
|
||||
// if (response.data[0].result === '1') {
|
||||
// this.machineVisible = false
|
||||
// this.getMachineData()
|
||||
// }
|
||||
},
|
||||
deleteMachine(row) {
|
||||
this.deleteRow(deleteMachineData, row.序号, function() {
|
||||
@@ -625,20 +657,18 @@ export default {
|
||||
async getFileData() {
|
||||
const response = await getFileData(this.receiptNum)
|
||||
this.fileData = response.data
|
||||
console.log(this.fileData)
|
||||
},
|
||||
addFile() {
|
||||
this.addForm('machineForm', function() {
|
||||
this.addForm('fileForm', function() {
|
||||
this.fileTitle = `添加文件`
|
||||
this.fileVisible = true
|
||||
})
|
||||
},
|
||||
async submitAddFile() {
|
||||
const response = await addFileData(this.fileForm.名称, this.fileForm.数量, this.fileForm.备注, this.receiptNum)
|
||||
if (response.data[0].result === '1') {
|
||||
this.addTable(addFileData, [this.fileForm.名称, this.fileForm.数量, this.fileForm.备注, this.receiptNum], 'fileForm', function() {
|
||||
this.fileVisible = false
|
||||
this.getFileData()
|
||||
}
|
||||
})
|
||||
},
|
||||
editFile(row) {
|
||||
this.editForm(row, 'fileForm', function() {
|
||||
@@ -647,14 +677,13 @@ export default {
|
||||
})
|
||||
},
|
||||
async submitEditFile() {
|
||||
const response = await editFileData(this.fileForm.名称, this.fileForm.数量, this.fileForm.备注, this.fileForm.序号)
|
||||
if (response.data[0].result === '1') {
|
||||
this.editTable(editFileData, [this.fileForm.名称, this.fileForm.数量, this.fileForm.备注, this.fileForm.文件编号], 'fileForm', function() {
|
||||
this.fileVisible = false
|
||||
this.getFileData()
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteFile(row) {
|
||||
this.deleteRow(deleteFileData, row.序号, function() {
|
||||
this.deleteRow(deleteFileData, row.文件编号, function() {
|
||||
this.getFileData()
|
||||
})
|
||||
},
|
||||
@@ -669,11 +698,15 @@ export default {
|
||||
})
|
||||
},
|
||||
async submitAddSpare() {
|
||||
const response = await addSpareData(this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.receiptNum)
|
||||
if (response.data[0].result === '1') {
|
||||
this.addTable(addSpareData, [this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.receiptNum], 'spareForm', function() {
|
||||
this.spareVisible = false
|
||||
this.getSpareData()
|
||||
}
|
||||
})
|
||||
// const response = await addSpareData(this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.receiptNum)
|
||||
// if (response.data[0].result === '1') {
|
||||
// this.spareVisible = false
|
||||
// this.getSpareData()
|
||||
// }
|
||||
},
|
||||
editSpare(row) {
|
||||
this.editForm(row, 'spareForm', function() {
|
||||
@@ -682,14 +715,18 @@ export default {
|
||||
})
|
||||
},
|
||||
async submitEditSpare() {
|
||||
const response = await editSpareData(this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.fileForm.序号)
|
||||
if (response.data[0].result === '1') {
|
||||
this.editTable(editSpareData, [this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.spareForm.备件编号], 'spareForm', function() {
|
||||
this.spareVisible = false
|
||||
this.getSpareData()
|
||||
}
|
||||
})
|
||||
// const response = await editSpareData(this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.spareForm.备件编号)
|
||||
// if (response.data[0].result === '1') {
|
||||
// this.spareVisible = false
|
||||
// this.getSpareData()
|
||||
// }
|
||||
},
|
||||
deleteSpare(row) {
|
||||
this.deleteRow(deleteSpareData, row.序号, function() {
|
||||
this.deleteRow(deleteSpareData, row.备件编号, function() {
|
||||
this.getSpareData()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -22,25 +22,24 @@
|
||||
<el-upload :on-remove="handleRemove" :file-list="itemFile" action=""/>
|
||||
</div>
|
||||
<div v-if="worksheet.length !== 0" style="float: right;margin: 20px 0">
|
||||
<el-button icon="el-icon-upload2" type="primary" size="small" @click="basicPartsToSQL">导入到数据库</el-button>
|
||||
<el-button :disabled="disabled" icon="el-icon-upload2" type="primary" size="small" @click="basicPartsToSQL">导入到数据库</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<specification-data ref="specificationData" :groups-names="groupsNames" :machine-names="machineNames" :project-name="projectName" @machineChange="machineChange"/>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
drag
|
||||
action="http://localhost:8410/submit/uploadImg.ashx?InvoiceNum=1"
|
||||
multiple>
|
||||
<i class="el-icon-upload"/>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
||||
</el-upload>
|
||||
<!--<el-upload-->
|
||||
<!--class="upload-demo"-->
|
||||
<!--drag-->
|
||||
<!--action="http://localhost:8410/submit/uploadImg.ashx?InvoiceNum=1"-->
|
||||
<!--multiple>-->
|
||||
<!--<i class="el-icon-upload"/>-->
|
||||
<!--<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>-->
|
||||
<!--<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>-->
|
||||
<!--</el-upload>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/* eslint-disable */
|
||||
import UploadExcelComponent from './UploadExcel/index.vue'
|
||||
import specificationData from './specificationData'
|
||||
import { sleep } from '../../../utils/tool'
|
||||
@@ -58,7 +57,8 @@ export default {
|
||||
loading: false,
|
||||
groupsNames: [],
|
||||
machineNames: [],
|
||||
err: 0
|
||||
err: 0,
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -88,6 +88,10 @@ export default {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
async test() {
|
||||
await sleep(10000)
|
||||
console.log(1)
|
||||
},
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
},
|
||||
@@ -112,7 +116,7 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
selected(data) { // 选择需要导入的文件
|
||||
async selected(data) { // 选择需要导入的文件
|
||||
this.worksheet = data.worksheet // 获取每个多选文件的表格坐标及值
|
||||
this.itemFile = data.itemFile
|
||||
},
|
||||
@@ -131,6 +135,7 @@ export default {
|
||||
async basicPartsToSQL() {
|
||||
try {
|
||||
this.loading = true
|
||||
this.dispatch = true
|
||||
this.err = 0
|
||||
for (let j = this.worksheet.length - 1; j >= 0; j--) {
|
||||
let establishment,
|
||||
@@ -154,48 +159,54 @@ export default {
|
||||
manufacturer,
|
||||
remarks,
|
||||
classificationCode
|
||||
const response = await isExit(this.projectValue, this.worksheet[j].F2.v)
|
||||
const res = response.data
|
||||
if (res[0].Column1 === 0) {
|
||||
this.$notify.error(`${this.worksheet[j].F2.v}机床不存在,请确认文件是否正确`)
|
||||
this.loading = false
|
||||
return
|
||||
const response = await isExit(this.projectValue, this.worksheet[j].F2.v)
|
||||
const res = response.data
|
||||
if (res[0].Column1 === 0) {
|
||||
this.$notify.error(`${this.worksheet[j].F2.v}机床不存在,请确认文件是否正确`)
|
||||
this.loading = false
|
||||
this.disabled = false
|
||||
return
|
||||
} else {
|
||||
this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = ''
|
||||
this.worksheet[j].I1 ? proofread = this.worksheet[j].I1.v : proofread = ''
|
||||
this.worksheet[j].L1 ? review = this.worksheet[j].L1.v : review = ''
|
||||
this.worksheet[j].P1 ? date = this.worksheet[j].P1.v : date = ''
|
||||
this.worksheet[j].Q1 ? pageNum = parseInt(this.worksheet[j].Q1.v.replace(/[^0-9]/ig, '')) : pageNum = ''
|
||||
this.worksheet[j].C2 ? machineName = this.worksheet[j].C2.v : machineName = ''
|
||||
this.worksheet[j].F2 ? machineNum = this.worksheet[j].F2.v : machineNum = ''
|
||||
this.worksheet[j].J2 ? componentName = this.worksheet[j].J2.v : componentName = ''
|
||||
this.worksheet[j].P2 ? componentNum = this.worksheet[j].P2.v : componentNum = ''
|
||||
this.worksheet[j].Q2 ? totalNum = parseInt(this.worksheet[j].Q2.v.replace(/[^0-9]/ig, '')) : totalNum = ''
|
||||
this.worksheet[j].R2 ? contractNum = this.worksheet[j].R2.v : contractNum = ''
|
||||
this.worksheet[j].M2 ? groupNum = this.worksheet[j].M2.v : groupNum = ''
|
||||
const len = parseInt(this.worksheet[j]['!ref'].split(':')[1].substring(1)) - 3
|
||||
for (let i = 0; i < len; i++) {
|
||||
const attr = i + 4
|
||||
drawingNum = this.worksheet[j][`B${attr}`] ? this.worksheet[j][`B${attr}`].v : ''
|
||||
name = this.worksheet[j][`D${attr}`] ? this.worksheet[j][`D${attr}`].v : ''
|
||||
type = this.worksheet[j][`F${attr}`] ? this.worksheet[j][`F${attr}`].v : ''
|
||||
material = this.worksheet[j][`J${attr}`] ? this.worksheet[j][`J${attr}`].v : ''
|
||||
spareNum = this.worksheet[j][`L${attr}`] ? this.worksheet[j][`L${attr}`].v : ''
|
||||
useNum = this.worksheet[j][`M${attr}`] ? this.worksheet[j][`M${attr}`].v : ''
|
||||
manufacturer = this.worksheet[j][`O${attr}`] ? this.worksheet[j][`O${attr}`].v : ''
|
||||
remarks = this.worksheet[j][`Q${attr}`] ? this.worksheet[j][`Q${attr}`].v : ''
|
||||
classificationCode = this.worksheet[j][`R${attr}`] ? this.worksheet[j][`R${attr}`].v : ''
|
||||
if (!drawingNum && !name && !type && !material && !spareNum && !useNum && !manufacturer && !remarks && !classificationCode) { // 当图号、名称、规格、材料、备件数量、装机数量、制造商、备注、分类码都为空时,循环终止,防止向数据库中插入多余且无用的数据
|
||||
break
|
||||
} else {
|
||||
this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = ''
|
||||
this.worksheet[j].I1 ? proofread = this.worksheet[j].I1.v : proofread = ''
|
||||
this.worksheet[j].L1 ? review = this.worksheet[j].L1.v : review = ''
|
||||
this.worksheet[j].P1 ? date = this.worksheet[j].P1.v : date = ''
|
||||
this.worksheet[j].Q1 ? pageNum = parseInt(this.worksheet[j].Q1.v.replace(/[^0-9]/ig, '')) : pageNum = ''
|
||||
this.worksheet[j].C2 ? machineName = this.worksheet[j].C2.v : machineName = ''
|
||||
this.worksheet[j].F2 ? machineNum = this.worksheet[j].F2.v : machineNum = ''
|
||||
this.worksheet[j].J2 ? componentName = this.worksheet[j].J2.v : componentName = ''
|
||||
this.worksheet[j].P2 ? componentNum = this.worksheet[j].P2.v : componentNum = ''
|
||||
this.worksheet[j].Q2 ? totalNum = parseInt(this.worksheet[j].Q2.v.replace(/[^0-9]/ig, '')) : totalNum = ''
|
||||
this.worksheet[j].R2 ? contractNum = this.worksheet[j].R2.v : contractNum = ''
|
||||
this.worksheet[j].M2 ? groupNum = this.worksheet[j].M2.v : groupNum = ''
|
||||
const len = parseInt(this.worksheet[j]['!ref'].split(':')[1].substring(1)) - 3
|
||||
for (let i = 0; i < len; i++) {
|
||||
const attr = i + 4
|
||||
drawingNum = this.worksheet[j][`B${attr}`] ? this.worksheet[j][`B${attr}`].v : ''
|
||||
name = this.worksheet[j][`D${attr}`] ? this.worksheet[j][`D${attr}`].v : ''
|
||||
type = this.worksheet[j][`F${attr}`] ? this.worksheet[j][`F${attr}`].v : ''
|
||||
material = this.worksheet[j][`J${attr}`] ? this.worksheet[j][`J${attr}`].v : ''
|
||||
spareNum = this.worksheet[j][`L${attr}`] ? this.worksheet[j][`L${attr}`].v : ''
|
||||
useNum = this.worksheet[j][`M${attr}`] ? this.worksheet[j][`M${attr}`].v : ''
|
||||
manufacturer = this.worksheet[j][`O${attr}`] ? this.worksheet[j][`O${attr}`].v : ''
|
||||
remarks = this.worksheet[j][`Q${attr}`] ? this.worksheet[j][`Q${attr}`].v : ''
|
||||
classificationCode = this.worksheet[j][`R${attr}`] ? this.worksheet[j][`R${attr}`].v : ''
|
||||
if (!drawingNum && !name && !type && !material && !spareNum && !useNum && !manufacturer && !remarks && !classificationCode) { // 当图号、名称、规格、材料、备件数量、装机数量、制造商、备注、分类码都为空时,循环终止,防止向数据库中插入多余且无用的数据
|
||||
break
|
||||
} else {
|
||||
if (machineNum && groupNum) {
|
||||
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$notify.error(`请确认导入文件是否正确`)
|
||||
return
|
||||
if (machineNum && groupNum) {
|
||||
await sleep(50)
|
||||
if (classificationCode) {
|
||||
drawingNum += '-' + classificationCode
|
||||
}
|
||||
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
} else {
|
||||
this.loading = false
|
||||
this.disabled = false
|
||||
this.$notify.error(`请确认导入文件是否正确`)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.itemFile.splice(j, 1)
|
||||
@@ -213,14 +224,12 @@ export default {
|
||||
async insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) {
|
||||
try {
|
||||
if (groupNum.indexOf('MX') > -1) {
|
||||
await sleep(10)
|
||||
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const res = response.data
|
||||
if (res[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
}
|
||||
} else {
|
||||
await sleep(10)
|
||||
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const res = response.data
|
||||
if (res[0].result === '0') {
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件类型">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.标准件类型 }}
|
||||
{{ scope.row.零件类型 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="供货商">
|
||||
@@ -273,14 +273,14 @@ export default {
|
||||
})
|
||||
} else {
|
||||
const type = this.groupName.indexOf('WG') > -1 ? 2 : 1
|
||||
console.log(type)
|
||||
this.loadingWB = true
|
||||
purchasePartsData(this.groupValue, type, this.pageCurrentWB, this.pageSizeWB).then(response => {
|
||||
this.loadingWB = false
|
||||
const data = response.data
|
||||
this.totalWB = data.total
|
||||
this.tableDataWB = data.rows.map(item => {
|
||||
item.标准件类型 = item.标准件类型 === '1' ? '外购件' : '标准件'
|
||||
console.log(item)
|
||||
item.零件类型 = item.零件类型 === '2' ? '外购件' : '标准件'
|
||||
return item
|
||||
})
|
||||
})
|
||||
|
||||
@@ -86,6 +86,38 @@
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData" stripe border style="width: 100%;max-height: 300px;margin-top: 10px" height="300px" size="mini">
|
||||
<el-table-column label="采购合同编号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购总数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到货数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-loading="" :data="tableData2" stripe border style="width: 100%;max-height: 300px;margin-top: 10px" height="300px" size="mini">
|
||||
<el-table-column label="采购合同编号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
@@ -123,7 +155,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initArrivalStateContact, searchArrivalState, searchArrivalNum } from '@/api/WorkshopProcurement/ArrivalStateSearch'
|
||||
import { initArrivalStateContact, searchArrivalState, searchArrivalNum, searchArrivalNum1 } from '@/api/WorkshopProcurement/ArrivalStateSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -135,6 +167,7 @@ export default {
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
supplierName: '',
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
pageSize1: 10,
|
||||
pageCurrent1: 1,
|
||||
@@ -203,6 +236,9 @@ export default {
|
||||
searchArrivalNum(row.采购合同流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
searchArrivalNum1(row.采购合同流水号).then(response => {
|
||||
this.tableData = response.data
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,21 +117,12 @@
|
||||
<!--</el-select>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
<el-col :span="6">
|
||||
<el-form-item label="计划到货时间">
|
||||
<el-date-picker
|
||||
v-model="planArrivalTime"
|
||||
size="small"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="规定到货时间">
|
||||
<el-date-picker
|
||||
v-model="stipulateArrivalTime"
|
||||
:picker-options="endDateOpt"
|
||||
:disabled="Boolean(!contractNumValue)"
|
||||
size="small"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
@@ -140,13 +131,13 @@
|
||||
@change="contractChange"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="采购员">
|
||||
<el-input v-model="name" size="small" readonly/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="运费">
|
||||
<el-input v-model="freight" size="small"/>
|
||||
@@ -162,22 +153,59 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData3" border style="width: 100%;max-height: 400px;" height="400px" size="mini">
|
||||
<el-table-column label="参考价格" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.参考价格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" width="100">
|
||||
<el-table :data="tableData4" border style="width: 100%;max-height: 400px;" height="300px" size="mini">
|
||||
<el-table-column label="单价" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.单价" size="mini" style="width:70px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发货天数" align="center" width="100">
|
||||
<!--<el-table-column label="发货天数" align="center" width="150">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-input v-model="deliveryDay1[scope.$index]" size="mini" style="width:70px"/>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="零件名称" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="deliveryDay[scope.$index]" size="mini" style="width:70px"/>
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订货数量" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料计划到货时间" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料计划到货时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table :data="tableData3" border style="width: 100%;max-height: 400px;" height="300px" size="mini">
|
||||
<el-table-column label="单价" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.单价" size="mini" style="width:70px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="发货天数" align="center" width="150">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-input v-model="deliveryDay[scope.$index]" size="mini" style="width:70px"/>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="物料名称" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
@@ -377,13 +405,21 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchSupplier, initPayMethod, initPayTimeNode, searchSheetContract, doneContract, initPurchaseOrder, searchData, searchContractDemo } from '@/api/WorkshopProcurement/CreatingProcurementContracts'
|
||||
import { searchSupplier, initPayMethod, initPayTimeNode, doneContract, initPurchaseOrder, searchData, searchData1, searchData2, searchContractDemo } from '@/api/WorkshopProcurement/CreatingProcurementContracts'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
inject: ['reload'],
|
||||
data() {
|
||||
return {
|
||||
submitDisable: true, // 不点击表格中的行不让确定
|
||||
minDate: null,
|
||||
endDateOpt: { // 禁用大于规定到货日期和小于当前日期
|
||||
disabledDate: (time) => {
|
||||
if (this.minDate) {
|
||||
return time.getTime() > this.minDate || time.getTime() < new Date()
|
||||
}
|
||||
}
|
||||
},
|
||||
loading: false,
|
||||
dialogVisible1: false,
|
||||
disable2: true,
|
||||
@@ -398,7 +434,9 @@ export default {
|
||||
textArea: '',
|
||||
paramRow: '', // 参数row
|
||||
contractSum: 0,
|
||||
contractSum1: 0,
|
||||
deliveryDay: [],
|
||||
deliveryDay1: [],
|
||||
contractNumValue: '',
|
||||
RequisitionNumber: '',
|
||||
contractNum: [], // 合同号
|
||||
@@ -463,11 +501,12 @@ export default {
|
||||
freight: '', // 运费
|
||||
taxRate: '', // 税率
|
||||
tableData3: [],
|
||||
tableData4: [],
|
||||
groupNum1: [],
|
||||
groupNum2: [],
|
||||
group1: '',
|
||||
group2: '',
|
||||
group3: '',
|
||||
group4: '',
|
||||
group5: '',
|
||||
group6: '',
|
||||
group7: '',
|
||||
@@ -489,7 +528,17 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
searchData() {
|
||||
const numGroup = [] // 空数组,放物料的计划到货时间
|
||||
searchData(this.contractNumValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
numGroup.push(Date.parse(response.data[i].物料计划到货时间))
|
||||
}
|
||||
this.minDate = new Date(Math.min(...numGroup))
|
||||
})
|
||||
searchData1(this.contractNumValue).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
response.data[j].物料计划到货时间 = (response.data[j].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
this.tableData3 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.deliveryDay[i] = 0
|
||||
@@ -497,19 +546,40 @@ export default {
|
||||
}
|
||||
}).then(() => {
|
||||
this.groupNum1 = this.tableData3 // 给中间变量,需要时重新push
|
||||
console.log(this.tableData3)
|
||||
})
|
||||
searchData2(this.contractNumValue).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
response.data[j].物料计划到货时间 = (response.data[j].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.deliveryDay1[i] = 0
|
||||
this.tableData4[i].金额 = parseFloat(this.tableData4[i].单价) * parseFloat(this.tableData4[i].零件数量)
|
||||
}
|
||||
}).then(() => {
|
||||
this.groupNum2 = this.tableData4 // 给中间变量,需要时重新push
|
||||
console.log(this.tableData4)
|
||||
})
|
||||
},
|
||||
calculateContractSum() { // 计算合同总额
|
||||
this.contractSum = 0
|
||||
this.contractSum1 = 0
|
||||
this.costAccount = 0
|
||||
this.riseFallPoint = 0
|
||||
this.tableData3 = []
|
||||
this.tableData4 = []
|
||||
for (let i = 0; i < this.groupNum1.length; i++) {
|
||||
this.groupNum1[i].金额 = parseFloat(this.groupNum1[i].单价) * parseFloat(this.groupNum1[i].零件数量)
|
||||
this.contractSum += parseFloat(this.groupNum1[i].金额)
|
||||
this.tableData3.push(this.groupNum1[i])
|
||||
}
|
||||
this.contractSum = this.contractSum.toFixed(2)
|
||||
for (let i = 0; i < this.groupNum2.length; i++) {
|
||||
this.groupNum2[i].金额 = parseFloat(this.groupNum2[i].单价) * parseFloat(this.groupNum2[i].零件数量)
|
||||
this.contractSum1 += parseFloat(this.groupNum2[i].金额)
|
||||
this.tableData4.push(this.groupNum2[i])
|
||||
}
|
||||
this.contractSum = (this.contractSum + this.contractSum1).toFixed(2)
|
||||
this.costAccount = this.contractSum
|
||||
if (parseInt(this.costAccount) === 0) {
|
||||
this.$message.error('成本核算不可为0')
|
||||
@@ -530,16 +600,7 @@ export default {
|
||||
})
|
||||
},
|
||||
contractChange() {
|
||||
searchSheetContract(this.inquirySheetFlowNum).then(response => {
|
||||
for (let i = 0; i < this.deliveryDay.length; i++) {
|
||||
this.stipulateArrivalTime
|
||||
? (this.deliveryDay[i] = parseInt((Date.parse(this.stipulateArrivalTime) - new Date()) / (1000 * 60 * 60 * 24)))
|
||||
: (this.deliveryDay[i] = 0)
|
||||
}
|
||||
this.tableData3 = response.data
|
||||
this.calculateContractSum()
|
||||
this.searchDemo(this.paramRow)
|
||||
})
|
||||
this.searchDemo(this.paramRow)
|
||||
},
|
||||
fetchData() {
|
||||
searchContractDemo().then(response => { // 初始化合同模板
|
||||
@@ -591,6 +652,7 @@ export default {
|
||||
this.getSelect(initPurchaseOrder, ['请购单编号', '请购单流水号'], 'contractNum')
|
||||
},
|
||||
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
|
||||
console.log(this.id)
|
||||
this.supplierName ? this.supplierCheck1 = 1 : (this.supplierCheck1 = 0, this.supplierName = '')
|
||||
this.enterpriseNature ? this.supplierCheck2 = 1 : (this.supplierCheck2 = 0, this.enterpriseNature = '')
|
||||
this.createDate ? this.supplierCheck3 = 1 : (this.supplierCheck3 = 0, this.createDate = '')
|
||||
@@ -659,7 +721,6 @@ export default {
|
||||
this.group1 = ''
|
||||
this.group2 = ''
|
||||
this.group3 = ''
|
||||
this.group4 = ''
|
||||
this.group5 = ''
|
||||
this.group6 = ''
|
||||
this.group7 = ''
|
||||
@@ -670,11 +731,18 @@ export default {
|
||||
this.group1 += this.tableData3[i].物料流水号 + ','
|
||||
this.group2 += this.tableData3[i].零件数量 + ','
|
||||
this.group3 += this.tableData3[i].单价 + ','
|
||||
this.group4 += this.deliveryDay[i] + ','
|
||||
this.group7 += this.taxRate + ','
|
||||
this.group8 += this.currencyValue + ','
|
||||
this.group9 += this.tableData3[i].请购单明细流水号 + ','
|
||||
}
|
||||
for (let i = 0; i < this.tableData4.length; i++) {
|
||||
this.group1 += this.tableData4[i].物料流水号 + ','
|
||||
this.group2 += this.tableData4[i].零件数量 + ','
|
||||
this.group3 += this.tableData4[i].单价 + ','
|
||||
this.group7 += this.taxRate + ','
|
||||
this.group8 += this.currencyValue + ','
|
||||
this.group9 += this.tableData4[i].请购单明细流水号 + ','
|
||||
}
|
||||
for (let i = 0; i < this.contractNum.length; i++) {
|
||||
if (this.contractNum[i].value === this.contractNumValue) {
|
||||
this.RequisitionNumber = this.contractNum[i].label
|
||||
@@ -717,14 +785,13 @@ export default {
|
||||
this.group1 = this.group1.substr(0, this.group1.length - 1)
|
||||
this.group2 = this.group2.substr(0, this.group2.length - 1)
|
||||
this.group3 = this.group3.substr(0, this.group3.length - 1)
|
||||
this.group4 = this.group4.substr(0, this.group4.length - 1)
|
||||
this.group5 = this.group5.substr(0, this.group5.length - 1)
|
||||
this.group6 = this.group6.substr(0, this.group6.length - 1)
|
||||
this.group7 = this.group7.substr(0, this.group7.length - 1)
|
||||
this.group8 = this.group8.substr(0, this.group8.length - 1)
|
||||
this.group9 = this.group9.substr(0, this.group9.length - 1)
|
||||
this.group10 = this.group10.substr(0, this.group10.length - 1)
|
||||
doneContract(this.contractNumValue, this.RequisitionNumber, this.contractName, this.planArrivalTime, this.stipulateArrivalTime, this.payMethodName, this.supplierValue, this.textArea, this.freight, this.group1, this.group2, this.group3, this.group4, this.group5, this.group6, this.group7, this.group8, this.group9, this.id).then(response => {
|
||||
doneContract(this.contractNumValue, this.RequisitionNumber, this.contractName, this.planArrivalTime, this.stipulateArrivalTime, this.payMethodName, this.supplierValue, this.textArea, this.freight, this.group1, this.group2, this.group3, this.group5, this.group6, this.group7, this.group8, this.group9, this.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('生成合同成功')
|
||||
this.reload()
|
||||
|
||||
@@ -20,15 +20,20 @@
|
||||
<span>合同号:</span>
|
||||
<el-input v-model="contractNum" placeholder="合同号" size="small" style="width:180px" clearable/>
|
||||
<span>采购员:</span>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px" clearable>
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input
|
||||
v-model="buyerName"
|
||||
placeholder="请双击选择"
|
||||
v-model="supplierName"
|
||||
placeholder="供应商"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:120px"
|
||||
@dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
style="width:180px"/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -38,28 +43,37 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading1" :data="tableData1" size="mini" border style="width: 100%;">
|
||||
<el-table-column label="采购合同编号" min-width="150" align="center">
|
||||
<el-table :data="tableData1" size="mini" border style="width: 100%">
|
||||
<el-table-column label="请款" min-width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="requestFund(scope.row)">请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同编号" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同名称" min-width="150" align="center">
|
||||
<el-table-column label="采购合同名称" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规定到货时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间 }}
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="200" align="center">
|
||||
<el-table-column label="供应商" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" width="80" align="center">
|
||||
<el-table-column label="总金额" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总金额 }}
|
||||
</template>
|
||||
@@ -69,7 +83,7 @@
|
||||
{{ scope.row.付款方式内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="欠款金额" min-width="100" align="center">
|
||||
<el-table-column label="欠款金额" min-width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.欠款金额 }}
|
||||
</template>
|
||||
@@ -84,9 +98,18 @@
|
||||
<el-input v-model="scope.row.本次应请款" size="mini" style="width:70px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款付款情况" width="810" align="center">
|
||||
<el-table-column label="请款付款情况" width="900" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-table v-show="tableData11[scope.$index].length!==0" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
|
||||
<el-table :id="scope.$index" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
|
||||
<el-table-column label="取消请款" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="scope.row.审核情况流水号!==3"
|
||||
type="danger"
|
||||
size="mini"
|
||||
@click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="次数" min-width="60" align="center" type="index"/>
|
||||
<el-table-column label="请款金额" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
@@ -95,25 +118,25 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款时间 }}
|
||||
{{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核情况内容" width="80" align="center">
|
||||
<el-table-column label="审核情况" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审核情况内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审核原因" width="80" align="center">
|
||||
<el-table-column label="未通过审核原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审核原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批情况内容" width="80" align="center">
|
||||
<el-table-column label="审批情况" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批情况内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审批原因" width="80" align="center">
|
||||
<el-table-column label="未通过审批原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审批原因 }}
|
||||
</template>
|
||||
@@ -123,32 +146,14 @@
|
||||
{{ scope.row.付款情况内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付款原因" width="80" align="center">
|
||||
<el-table-column label="未付款原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未付款原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款" min-width="80" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="requestFund(scope.row)">请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
@@ -164,22 +169,22 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<span>请款开始时间:</span>
|
||||
<span>请款时间区间:</span>
|
||||
<el-date-picker
|
||||
v-model="startRequestDate"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<span>请款结束时间:</span>
|
||||
placeholder="开始日期"/>
|
||||
~
|
||||
<el-date-picker
|
||||
v-model="endRequestDate"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
placeholder="结束日期"/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -190,7 +195,8 @@
|
||||
type="warning"
|
||||
size="small"
|
||||
icon="el-icon-download"
|
||||
style="margin-left:10px">导出Excel</el-button>
|
||||
style="margin-left:10px"
|
||||
>导出Excel</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
@@ -207,10 +213,10 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="规定到货时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间 }}
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="150" align="center">
|
||||
<el-table-column label="供应商" min-width="250" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
@@ -242,46 +248,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款时间 }}
|
||||
{{ scope.row.请款时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible2" title="采购员选择" center style="min-height: 300px;" width="40%">
|
||||
<el-table
|
||||
:data="tableData02"
|
||||
size="small"
|
||||
border
|
||||
style="width: 100%;min-height:300px"
|
||||
height="300px"
|
||||
highlight-current-row
|
||||
@row-click="clickBuyer">
|
||||
<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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :disabled="submitDisable" type="primary" size="small" icon="el-icon-check" @click="submitSelectBuyer">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -292,8 +263,8 @@ import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData02: [],
|
||||
dialogVisible2: false,
|
||||
personValue: '',
|
||||
person: [],
|
||||
loading2: false,
|
||||
tableData2: [],
|
||||
tableData11: [],
|
||||
@@ -303,37 +274,10 @@ export default {
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
contractNum: '',
|
||||
buyerName: '',
|
||||
dialogVisible1: false,
|
||||
submitDisable: true,
|
||||
form1: {},
|
||||
supplierValue: '',
|
||||
supplierName: '',
|
||||
enterpriseNature: '',
|
||||
createDate: '',
|
||||
registeredCapital: '',
|
||||
taxNum: '',
|
||||
EMail: '',
|
||||
address: '',
|
||||
account: '',
|
||||
openingBank: '',
|
||||
phone: '',
|
||||
fax: '',
|
||||
goodTime: '',
|
||||
supplierCheck1: 0,
|
||||
supplierCheck2: 0,
|
||||
supplierCheck3: 0,
|
||||
supplierCheck4: 0,
|
||||
supplierCheck5: 0,
|
||||
supplierCheck6: 0,
|
||||
supplierCheck7: 0,
|
||||
supplierCheck8: 0,
|
||||
supplierCheck9: 0,
|
||||
supplierCheck10: 0,
|
||||
supplierCheck11: 0,
|
||||
supplierCheck12: 0,
|
||||
tableData01: [],
|
||||
loading1: false,
|
||||
tableData1: [],
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
@@ -352,45 +296,43 @@ export default {
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.initBuyer()
|
||||
},
|
||||
methods: {
|
||||
submitSelectBuyer() { // 确定
|
||||
this.dialogVisible2 = false
|
||||
},
|
||||
clickBuyer(row) { // 点击采购员表某一行
|
||||
this.submitDisable = false
|
||||
this.buyerName = row.姓名
|
||||
},
|
||||
initBuyer() { // 初始化采购人员
|
||||
initBuyer().then(response => {
|
||||
this.tableData02 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.person.push({
|
||||
text: response.data[i].姓名,
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.loading1 = true
|
||||
this.tableData1 = []
|
||||
this.startDate && this.endDate ? this.check1 = 1 : this.check1 = 0
|
||||
this.contractNum ? this.check2 = 1 : this.check2 = 0
|
||||
this.buyerName ? this.check3 = 1 : this.check3 = 0
|
||||
this.personValue ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName ? this.check4 = 1 : this.check4 = 0
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startDate, this.endDate, this.check2, this.contractNum, this.check3, this.buyerName, this.check4, this.supplierName).then(response => {
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startDate, this.endDate, this.check2, this.contractNum, this.check3, this.personValue, this.check4, this.supplierName).then(response => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
if (response.data.rows[j].规定到货时间 !== null) {
|
||||
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
|
||||
}
|
||||
this.tableData11[j] = []
|
||||
searchCondition(response.data.rows[j].采购合同流水号).then(response0 => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
for (let i = 0; i < response0.data.length; i++) {
|
||||
if (response0.data[i].请款时间 !== null) {
|
||||
response0.data[i].请款时间 = response0.data[i].请款时间.substring(0, response0.data[i].请款时间.indexOf(' '))
|
||||
if (response0.data.length === 0) {
|
||||
this.tableData11[j].push(response0.data)
|
||||
document.getElementById(j).setAttribute('style', 'display:none')
|
||||
} else {
|
||||
for (let i = 0; i < response0.data.length; i++) {
|
||||
this.tableData11[j].push(response0.data[i])
|
||||
}
|
||||
this.tableData11[j].push(response0.data[i])
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading1 = false
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
@@ -416,6 +358,7 @@ export default {
|
||||
})
|
||||
},
|
||||
cancelRequestFund(row) { // 取消请款
|
||||
console.log(row)
|
||||
this.$confirm('确认取消请款吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -443,14 +386,17 @@ export default {
|
||||
},
|
||||
searchRequestTable() { // 查询请款表
|
||||
this.loading2 = true
|
||||
if (this.startRequestDate === '' || this.startRequestDate === null || this.endRequestDate === '' || this.endRequestDate === null) {
|
||||
if ((this.startRequestDate === '' || this.startRequestDate === null) && (this.endRequestDate === '' || this.endRequestDate === null)) {
|
||||
this.checkRequest = 0
|
||||
} else { this.checkRequest = 1 }
|
||||
} else if (this.startRequestDate !== '' && this.startRequestDate !== null && this.endRequestDate !== '' && this.endRequestDate !== null) {
|
||||
this.checkRequest = 1
|
||||
} else {
|
||||
this.$message.error('请款时间区间有误')
|
||||
this.loading2 = false
|
||||
return
|
||||
}
|
||||
searchRequestTable(this.checkRequest, this.startRequestDate, this.endRequestDate).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
if (response.data[j].规定到货时间 !== null) {
|
||||
response.data[j].规定到货时间 = response.data[j].规定到货时间.substring(0, response.data[j].规定到货时间.indexOf(' '))
|
||||
}
|
||||
if (response.data[j].请款时间 !== null) {
|
||||
response.data[j].请款时间 = response.data[j].请款时间.substring(0, response.data[j].请款时间.indexOf(' '))
|
||||
}
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="startEndDate"
|
||||
style="width:250px"
|
||||
size="small"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-option
|
||||
@@ -54,11 +44,6 @@
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预到货时间" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.预到货时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规定到货时间" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间 }}
|
||||
@@ -125,13 +110,25 @@
|
||||
</tr>
|
||||
</table>
|
||||
<div>一、 产品名称、型号、数量、单价、品牌:</div>
|
||||
<table id="50" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="51">
|
||||
<tr id="tableHead1" style="height: 40px">
|
||||
<td colspan="2" align="center">零件名称</td>
|
||||
<td colspan="1" align="center">零件图号</td>
|
||||
<td colspan="1" align="center">材料</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="4">
|
||||
<tr id="tableHead" style="height: 40px">
|
||||
<td colspan="1" align="center">物料名称</td>
|
||||
<td colspan="2" align="center">物料名称</td>
|
||||
<td colspan="1" align="center">物料规格</td>
|
||||
<td colspan="1" align="center">物料型号</td>
|
||||
<td colspan="1" align="center">发货天数</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
@@ -216,7 +213,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initContract, initBuyer, searchTable1, searchTable2, submitApproval } from '@/api/WorkshopProcurement/ProcurementContractApproval'
|
||||
import { initContract, initBuyer, searchTable1, searchTable2, searchTable3, submitApproval } from '@/api/WorkshopProcurement/ProcurementContractApproval'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -247,6 +244,7 @@ export default {
|
||||
dialogVisible3: false,
|
||||
form1: {},
|
||||
returns: [],
|
||||
returns1: [],
|
||||
tableData01: [],
|
||||
tableData02: [],
|
||||
submitDisable: true,
|
||||
@@ -389,7 +387,7 @@ export default {
|
||||
for (let i = 0; i < this.returns.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData')
|
||||
tr[i].innerHTML = '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead').after(tr[i])
|
||||
}
|
||||
@@ -397,10 +395,35 @@ export default {
|
||||
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
|
||||
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].发货天数
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].金额
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
searchTable3(this.contractValue).then(response => {
|
||||
this.returns1 = response.data
|
||||
const children1 = document.getElementsByClassName('tableData1')
|
||||
const parent1 = document.getElementById('51')
|
||||
if (children1.length !== 0) {
|
||||
for (let i = children1.length - 1; i >= 0; i--) {
|
||||
parent1.removeChild(children1[i])
|
||||
}
|
||||
}
|
||||
const tr = []
|
||||
for (let i = 0; i < this.returns1.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData1')
|
||||
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead1').after(tr[i])
|
||||
}
|
||||
for (let j = 0; j < this.returns1.length; j++) {
|
||||
document.getElementsByClassName('tableData1')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData1')[j].children[1].innerHTML = response.data[j].零件图号
|
||||
document.getElementsByClassName('tableData1')[j].children[2].innerHTML = response.data[j].材料
|
||||
document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -432,4 +455,7 @@ export default {
|
||||
.tableData{
|
||||
height: 30px;
|
||||
}
|
||||
.tableData1{
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="startEndDate"
|
||||
style="width:250px"
|
||||
size="small"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-option
|
||||
@@ -139,13 +129,25 @@
|
||||
</tr>
|
||||
</table>
|
||||
<div>一、 产品名称、型号、数量、单价、品牌:</div>
|
||||
<table id="50" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="51">
|
||||
<tr id="tableHead1" style="height: 40px">
|
||||
<td colspan="2" align="center">零件名称</td>
|
||||
<td colspan="1" align="center">零件图号</td>
|
||||
<td colspan="1" align="center">材料</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="4">
|
||||
<tr id="tableHead" style="height: 40px">
|
||||
<td colspan="1" align="center">物料名称</td>
|
||||
<td colspan="2" align="center">物料名称</td>
|
||||
<td colspan="1" align="center">物料规格</td>
|
||||
<td colspan="1" align="center">物料型号</td>
|
||||
<td colspan="1" align="center">发货天数</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
@@ -211,7 +213,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initContract, initBuyer, searchTable1, searchTable2, Disable } from '@/api/WorkshopProcurement/ProcurementContractEnquiry'
|
||||
import { initContract, initBuyer, searchTable1, searchTable2, searchTable3, Disable } from '@/api/WorkshopProcurement/ProcurementContractEnquiry'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -257,6 +259,7 @@ export default {
|
||||
form1: {},
|
||||
goodTime: '',
|
||||
returns: [],
|
||||
returns1: [],
|
||||
tableData02: [],
|
||||
submitDisable: true,
|
||||
dialogVisible2: false,
|
||||
@@ -380,7 +383,7 @@ export default {
|
||||
for (let i = 0; i < this.returns.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData')
|
||||
tr[i].innerHTML = '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead').after(tr[i])
|
||||
}
|
||||
@@ -388,10 +391,35 @@ export default {
|
||||
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
|
||||
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].发货天数
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].金额
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
searchTable3(this.contractValue).then(response => {
|
||||
this.returns1 = response.data
|
||||
const children1 = document.getElementsByClassName('tableData1')
|
||||
const parent1 = document.getElementById('51')
|
||||
if (children1.length !== 0) {
|
||||
for (let i = children1.length - 1; i >= 0; i--) {
|
||||
parent1.removeChild(children1[i])
|
||||
}
|
||||
}
|
||||
const tr = []
|
||||
for (let i = 0; i < this.returns1.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData1')
|
||||
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead1').after(tr[i])
|
||||
}
|
||||
for (let j = 0; j < this.returns1.length; j++) {
|
||||
document.getElementsByClassName('tableData1')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData1')[j].children[1].innerHTML = response.data[j].零件图号
|
||||
document.getElementsByClassName('tableData1')[j].children[2].innerHTML = response.data[j].材料
|
||||
document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -423,6 +451,9 @@ export default {
|
||||
.tableData{
|
||||
height: 30px;
|
||||
}
|
||||
.tableData1{
|
||||
height: 30px;
|
||||
}
|
||||
.el-table .adopt{
|
||||
background: limegreen;
|
||||
}
|
||||
|
||||
@@ -60,6 +60,43 @@
|
||||
|
||||
<el-card>
|
||||
<div style="margin-bottom: 20px;margin-left: 10px;font-size: 20px;">车间采购</div>
|
||||
<el-table v-loading="" :data="tableData2" show-summary border style="width: 100%;max-height: 500px;" height="300px" size="mini">
|
||||
<el-table-column label="项目名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="小计(元)" align="center" min-width="100" prop="金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-loading="" :data="tableData" show-summary border style="width: 100%;max-height: 500px;" height="300px" size="mini">
|
||||
<el-table-column label="项目名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
@@ -102,7 +139,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchProjectTotal, searchProjectTotal1 } from '@/api/WorkshopProcurement/ProjectTotalSearch'
|
||||
import { initProject, searchProjectTotal, searchProjectTotal1, searchProjectTotal2 } from '@/api/WorkshopProcurement/ProjectTotalSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -111,11 +148,9 @@ export default {
|
||||
return {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
tableData: [],
|
||||
tableData1: []
|
||||
tableData1: [],
|
||||
tableData2: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -143,25 +178,17 @@ export default {
|
||||
searchTable1() {
|
||||
if (this.projectValue) {
|
||||
searchProjectTotal(this.projectValue).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData1 = response.data
|
||||
})
|
||||
searchProjectTotal1(this.projectValue).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData = response.data
|
||||
})
|
||||
searchProjectTotal2(this.projectValue).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择项目')
|
||||
}
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;Buyer=0"/>
|
||||
<el-input v-model="buyerName" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;buyer=0"/>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<span>供应商:</span>
|
||||
@@ -104,13 +104,25 @@
|
||||
</tr>
|
||||
</table>
|
||||
<div>一、 产品名称、型号、数量、单价、品牌:</div>
|
||||
<table id="50" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="51">
|
||||
<tr id="tableHead2" style="height: 40px">
|
||||
<td colspan="2" align="center">零件名称</td>
|
||||
<td colspan="1" align="center">零件图号</td>
|
||||
<td colspan="1" align="center">材料</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="4">
|
||||
<tr id="tableHead" style="height: 40px">
|
||||
<td colspan="1" align="center">物料名称</td>
|
||||
<td colspan="2" align="center">物料名称</td>
|
||||
<td colspan="1" align="center">物料规格</td>
|
||||
<td colspan="1" align="center">物料型号</td>
|
||||
<td colspan="1" align="center">发货天数</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
@@ -143,7 +155,7 @@
|
||||
<el-row>
|
||||
<span>时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="startEndDate"
|
||||
v-model="startEndDate1"
|
||||
style="width:240px"
|
||||
size="small"
|
||||
type="daterange"
|
||||
@@ -152,9 +164,9 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" style="width:180px" filterable clearable>
|
||||
<el-select v-model="contractNumValue1" placeholder="合同号" size="small" style="width:180px" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
v-for="item in contractNum1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
@@ -167,7 +179,7 @@
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<el-input v-model="supplierName1" placeholder="供应商" size="small" clearable/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -247,13 +259,25 @@
|
||||
</tr>
|
||||
</table>
|
||||
<div>一、 产品名称、型号、数量、单价、品牌:</div>
|
||||
<table id="52" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="53">
|
||||
<tr id="tableHead3" style="height: 40px">
|
||||
<td colspan="2" align="center">零件名称</td>
|
||||
<td colspan="1" align="center">零件图号</td>
|
||||
<td colspan="1" align="center">材料</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<table id="5" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="6">
|
||||
<tr id="tableHead1" style="height: 40px">
|
||||
<td colspan="1" align="center">物料名称</td>
|
||||
<td colspan="2" align="center">物料名称</td>
|
||||
<td colspan="1" align="center">物料规格</td>
|
||||
<td colspan="1" align="center">物料型号</td>
|
||||
<td colspan="1" align="center">发货天数</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
@@ -331,7 +355,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initContract, initBuyer, searchTable1, searchTable2, searchTable3, searchTable4, submitContract } from '@/api/WorkshopProcurement/PurchaseContractChange'
|
||||
import { initContract, initContract1, initBuyer, searchTable1, searchTable2, searchTable3, searchTable4, searchTable5, searchTable6, submitContract } from '@/api/WorkshopProcurement/PurchaseContractChange'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -346,12 +370,15 @@ export default {
|
||||
check4: 0,
|
||||
check5: 0,
|
||||
startEndDate: '',
|
||||
startEndDate1: '',
|
||||
contract: '',
|
||||
contract1: '',
|
||||
freight: '',
|
||||
freight1: '',
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
contractNumValue1: '',
|
||||
contractNum1: [],
|
||||
ProcurementContractNum: '',
|
||||
buyer: 0,
|
||||
Supplier: 0,
|
||||
@@ -385,6 +412,8 @@ export default {
|
||||
},
|
||||
returns: [],
|
||||
returns1: [],
|
||||
returns2: [],
|
||||
returns3: [],
|
||||
tableData01: [],
|
||||
tableData02: [],
|
||||
submitDisable: true,
|
||||
@@ -412,6 +441,15 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
initContract1().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNum1.push({
|
||||
label: response.data[i].采购合同编号,
|
||||
name: response.data[i].采购合同名称,
|
||||
value: response.data[i].采购合同变更流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
initBuyer() { // 初始化采购人员
|
||||
initBuyer().then(response => {
|
||||
@@ -449,7 +487,7 @@ export default {
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.buyerValue, this.check4, this.supplierName, this.check5, this.approvalValue).then(response => {
|
||||
this.loading1 = false
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
if (response.data.rows[j].规定到货时间 !== null) {
|
||||
if (response.data.rows[j].规定到货时间 !== null || response.data.rows[j].规定到货时间 !== '') {
|
||||
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
|
||||
}
|
||||
}
|
||||
@@ -460,14 +498,14 @@ export default {
|
||||
searchTable3() {
|
||||
this.textarea1 = ``
|
||||
this.loading2 = true
|
||||
if (this.startEndDate === '' || this.startEndDate === null || this.startEndDate[0] === '' || this.startEndDate[1] === '') {
|
||||
if (this.startEndDate1 === '' || this.startEndDate1 === null || this.startEndDate1[0] === '' || this.startEndDate1[1] === '') {
|
||||
this.check1 = 0
|
||||
this.startEndDate = ''
|
||||
this.startEndDate1 = ''
|
||||
} else { this.check1 = 1 }
|
||||
this.contractNumValue ? this.check2 = 1 : this.check2 = 0
|
||||
this.buyerName ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName ? this.check4 = 1 : this.check4 = 0
|
||||
searchTable3(this.pageCurrent2, this.pageSize2, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.buyerValue, this.check4, this.supplierName).then(response => {
|
||||
this.contractNumValue1 ? this.check2 = 1 : this.check2 = 0
|
||||
this.buyerName1 ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName1 ? this.check4 = 1 : this.check4 = 0
|
||||
searchTable3(this.pageCurrent2, this.pageSize2, this.check1, this.startEndDate1[0], this.startEndDate1[1], this.check2, this.contractNumValue1, this.check3, this.buyerValue1, this.check4, this.supplierName1).then(response => {
|
||||
this.loading2 = false
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
if (response.data.rows[j].规定到货时间 !== null) {
|
||||
@@ -542,7 +580,7 @@ export default {
|
||||
for (let i = 0; i < this.returns.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData')
|
||||
tr[i].innerHTML = '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead').after(tr[i])
|
||||
}
|
||||
@@ -550,10 +588,35 @@ export default {
|
||||
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
|
||||
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].发货天数
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].金额
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
searchTable5(this.contractValue).then(response => {
|
||||
this.returns2 = response.data
|
||||
const children2 = document.getElementsByClassName('tableData2')
|
||||
const parent2 = document.getElementById('51')
|
||||
if (children2.length !== 0) {
|
||||
for (let i = children2.length - 1; i >= 0; i--) {
|
||||
parent2.removeChild(children2[i])
|
||||
}
|
||||
}
|
||||
const tr = []
|
||||
for (let i = 0; i < this.returns2.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData2')
|
||||
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead2').after(tr[i])
|
||||
}
|
||||
for (let j = 0; j < this.returns2.length; j++) {
|
||||
document.getElementsByClassName('tableData2')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData2')[j].children[1].innerHTML = response.data[j].零件图号
|
||||
document.getElementsByClassName('tableData2')[j].children[2].innerHTML = response.data[j].材料
|
||||
document.getElementsByClassName('tableData2')[j].children[3].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData2')[j].children[4].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData2')[j].children[5].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -580,7 +643,7 @@ export default {
|
||||
for (let i = 0; i < this.returns1.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData1')
|
||||
tr[i].innerHTML = '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead1').after(tr[i])
|
||||
}
|
||||
@@ -588,10 +651,35 @@ export default {
|
||||
document.getElementsByClassName('tableData1')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData1')[j].children[1].innerHTML = response.data[j].物料规格
|
||||
document.getElementsByClassName('tableData1')[j].children[2].innerHTML = response.data[j].物料型号
|
||||
document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].发货天数
|
||||
document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData1')[j].children[6].innerHTML = response.data[j].金额
|
||||
document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
searchTable6(this.contractValue1).then(response => {
|
||||
this.returns3 = response.data
|
||||
const children3 = document.getElementsByClassName('tableData3')
|
||||
const parent3 = document.getElementById('53')
|
||||
if (children3.length !== 0) {
|
||||
for (let i = children3.length - 1; i >= 0; i--) {
|
||||
parent3.removeChild(children3[i])
|
||||
}
|
||||
}
|
||||
const tr = []
|
||||
for (let i = 0; i < this.returns3.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData3')
|
||||
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead3').after(tr[i])
|
||||
}
|
||||
for (let j = 0; j < this.returns3.length; j++) {
|
||||
document.getElementsByClassName('tableData3')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData3')[j].children[1].innerHTML = response.data[j].零件图号
|
||||
document.getElementsByClassName('tableData3')[j].children[2].innerHTML = response.data[j].材料
|
||||
document.getElementsByClassName('tableData3')[j].children[3].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData3')[j].children[4].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData3')[j].children[5].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -620,7 +708,16 @@ export default {
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.tableData{
|
||||
height: 30px;
|
||||
}
|
||||
.tableData1{
|
||||
height: 30px;
|
||||
}
|
||||
.tableData2{
|
||||
height: 30px;
|
||||
}
|
||||
.tableData3{
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable style="width: 200px"/>
|
||||
<span>零件号:</span>
|
||||
<el-select v-model="PartNumberValue" placeholder="零件号" size="small" clearable>
|
||||
<span>零件名称:</span>
|
||||
<el-select v-model="PartNumberValue" placeholder="零件名称" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in PartNumber"
|
||||
:key="item.value"
|
||||
@@ -198,12 +198,16 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
editData(row.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('通过成功')
|
||||
this.searchTable()
|
||||
} else { this.$message.error('通过失败') }
|
||||
})
|
||||
if (row.交检日期 !== '' && row.检查日期 !== '') {
|
||||
editData(row.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('通过成功')
|
||||
this.searchTable()
|
||||
} else { this.$message.error('通过失败') }
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请填写信息')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable style="width: 200px"/>
|
||||
<span>零件号:</span>
|
||||
<el-select v-model="PartNumberValue" placeholder="零件号" size="small" clearable>
|
||||
<span>零件名称:</span>
|
||||
<el-select v-model="PartNumberValue" placeholder="零件名称" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in PartNumber"
|
||||
:key="item.value"
|
||||
@@ -161,6 +161,14 @@ export default {
|
||||
this.PartNumberValue ? this.check3 = 1 : this.check3 = 0
|
||||
searchParts(this.pageCurrent, this.pageSize, this.check1, this.contractNumValue, this.check2, this.supplierName, this.check3, this.PartNumberValue).then(response => {
|
||||
this.loading = false
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].交检日期 !== '') {
|
||||
response.data.rows[i].交检日期 = (response.data.rows[i].交检日期).split(' ')[0]
|
||||
}
|
||||
if (response.data.rows[i].检查日期 !== '') {
|
||||
response.data.rows[i].检查日期 = (response.data.rows[i].检查日期).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>发票号:</span>
|
||||
<el-input v-model="invoiceNum" size="small" clearable/>
|
||||
<el-input v-model="invoiceNum" placeholder="发票号" size="small" clearable/>
|
||||
<!--<span>开票时间:</span>-->
|
||||
<!--<el-date-picker v-model="invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>-->
|
||||
<span>采购合同号:</span>
|
||||
|
||||
@@ -74,6 +74,31 @@
|
||||
<span>账号:4001</span>
|
||||
<span>密码:4001</span>
|
||||
</div>
|
||||
<div class="tips">
|
||||
<span>财务总监</span>
|
||||
<span>账号:7001</span>
|
||||
<span>密码:7001</span>
|
||||
</div>
|
||||
<div class="tips">
|
||||
<span>出纳</span>
|
||||
<span>账号:7002</span>
|
||||
<span>密码:7002</span>
|
||||
</div>
|
||||
<div class="tips">
|
||||
<span>会计</span>
|
||||
<span>账号:7003</span>
|
||||
<span>密码:7003</span>
|
||||
</div>
|
||||
<div class="tips">
|
||||
<span>总经理</span>
|
||||
<span>账号:1002</span>
|
||||
<span>密码:1002</span>
|
||||
</div>
|
||||
<div class="tips">
|
||||
<span>工艺定额员</span>
|
||||
<span>账号:6301</span>
|
||||
<span>密码:6301</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user