更新
This commit is contained in:
83
src/api/Inventory/SelfMadePartsWarehouseOut.js
Normal file
83
src/api/Inventory/SelfMadePartsWarehouseOut.js
Normal file
@@ -0,0 +1,83 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function initProject() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 查询机床
|
||||
export function searchmachine(num, check) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_机床名称_查询数据',
|
||||
param: '项目流水号_check=' + check + '=int&项目流水号=' + num + '&机床类型代码_check=0=int&机床类型代码=1=int&机床流水号_check=0'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取组号
|
||||
export function searchgroup(num, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_组件名称_查询数据',
|
||||
param: '机床流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取表单
|
||||
export function searchdata(entryNameValue_check, entryNameValue, machineToolValue_check, machineToolValue, groupNumberValue_check, groupNumberValue, partNumber_check, partNumber, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '自制件出库_查询数据',
|
||||
param: '项目流水号_check=' + entryNameValue_check + '&项目流水号=' + entryNameValue + '&机床流水号_check=' + machineToolValue_check + '&机床流水号=' + machineToolValue + '&组件流水号_check=' + groupNumberValue_check + '&组件流水号=' + groupNumberValue + '&零件图号_check=' + partNumber_check + '&零件图号=' + partNumber,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 自制件出库
|
||||
export function warehousing(processPlanSerialNumber, leader, remarks) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '自制件出库_循环执行_新',
|
||||
param: '工艺计划流水号组=' + processPlanSerialNumber + '&考勤编号=' + leader + '&出库备注=' + remarks
|
||||
}
|
||||
})
|
||||
}
|
||||
export function selectdepartment() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '出库管理_部门查询'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function selectleaders(department) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '出库管理_人员查询',
|
||||
param: '考核部门编号=' + department
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -11,6 +11,18 @@ export function getMachines() {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 机床名称
|
||||
export function getMachinesStatue(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: ` select COUNT(*) as 是否发货 from [发货管理_发货单明细] left join [发货管理_发货单]
|
||||
on [发货管理_发货单].发货单流水号 = [发货管理_发货单明细].发货单流水号 where 机床流水号 = ${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取组号
|
||||
export function getGroups(stepNumber) {
|
||||
return request({
|
||||
@@ -18,8 +30,8 @@ export function getGroups(stepNumber) {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_传递后_组件名称_查询数据_查询所有组',
|
||||
param: '机床流水号=' + stepNumber + '=int'
|
||||
name: '车间生产管理工艺_组件状态查询_查询所有组',
|
||||
param: '机床流水号=' + stepNumber
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,12 +1,32 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function initProject() {
|
||||
export function search1() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '合同信息管理_项目名称_总_查询'
|
||||
type: '3',
|
||||
name: `select SUM(开票金额) as 开票金额,replace(convert(varchar(5), 操作时间, 121),'-','') as 开票时间 from 合同信息管理_开票记录_视图 group by replace(convert(varchar(5), 操作时间, 121),'-','')`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function search2() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: 'SELECT count(客户名称) as 客户数量,[省份] FROM [客户关系管理系统_客户_查询数据_MESWOR_视图]where [客户名称是否启用] = 1 group by [省份]'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function search3() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: `select 项目名称,CONVERT(nvarchar(50),sum(已收金额)) as 已收金额,CONVERT(nvarchar(50),sum(应收金额)) as 应收金额,CONVERT(nvarchar(50),(sum(应收金额)-sum(已收金额))) as 待收金额 from 视图_分批资金查询 where 是否启用= 1 group by 项目流水号,项目名称`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -34,14 +34,14 @@ export function groupSelect(machineValue) {
|
||||
}
|
||||
})
|
||||
}
|
||||
export function basicPartsData(project_check, project, machine_check, machine, group_check, group, pageSize, pageCurrent) {
|
||||
export function basicPartsData(project_check, project, machine_check, machine, group_check, group, whetherToImport_check, whetherToImport, pageSize, pageCurrent) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_零件明细表_基本件_查询数据_综合gj',
|
||||
param: `项目流水号_check=${project_check}&项目流水号=${project}&机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}`,
|
||||
param: `项目流水号_check=${project_check}&项目流水号=${project}&机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}&是否导入_check=${whetherToImport_check}&是否导入=${whetherToImport}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-card style="width: 1000px">
|
||||
<el-row>
|
||||
<span style="margin-left: 10px">零件图号</span>
|
||||
<el-input v-model="Partpaint" clearable size="small" style="width:200px;height: 29px;margin-top: 10px;margin-bottom: 10px" />
|
||||
<el-input v-model="Partpaint" clearable size="small" style="width:170px;height: 29px;margin-top: 10px;margin-bottom: 10px" />
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getCraftNumber()">查询</el-button>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="清除所有机床零件信息" placement="top">
|
||||
<el-button size="small" type="danger" icon="el-icon-remove-outline" style="margin: 0 0 0 10px" plain @click="Empty()">清空</el-button>
|
||||
|
||||
@@ -374,7 +374,7 @@ export default {
|
||||
// 离线外购件出库
|
||||
addDirectPartm() {
|
||||
if (Number(this.partnumber) < Number(this.form.DirectNumber)) {
|
||||
this.$message.error('请正确输入数量')
|
||||
this.$message.error('库存不够,重输领料数量')
|
||||
} else {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span style="margin-left: 10px">机床号:</span>
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;margin-bottom: 10px;width: 220px" placeholder="机床号" @change="getGroup()">
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;margin-bottom: 10px;width: 185px" placeholder="机床号" @change="getGroup()">
|
||||
<el-option
|
||||
v-for="item in Machines"
|
||||
:key="item.value"
|
||||
@@ -13,7 +13,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin-top:10px;width: 180px;">
|
||||
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin-top:10px;width: 100px;">
|
||||
<el-option
|
||||
v-for="item in Groups"
|
||||
:key="item.value"
|
||||
@@ -21,7 +21,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 180px;"/>
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 170px;"/>
|
||||
<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>
|
||||
</el-card>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="领料人" prop="出库备注" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库备注 }}
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="出库时间" prop="出库时间" width="100px">
|
||||
|
||||
269
src/views/Inventory/SelfMadePartsWarehouseOut/index.vue
Normal file
269
src/views/Inventory/SelfMadePartsWarehouseOut/index.vue
Normal file
@@ -0,0 +1,269 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<el-select v-model="entryNameValue" placeholder="项目名称" style="width:150px;margin: 10px 10px 0px 10px" size="small" clearable filterable @change="SearchMachine">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-select v-model="machineToolValue" placeholder="机床号" size="small" clearable style="width: 150px;margin: 10px 10px 0px 10px" @change="searchGroupList">
|
||||
<el-option
|
||||
v-for="item in machineTool"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-select v-model="groupNumberValue" placeholder="组号" size="small" clearable style="width: 100px;margin: 10px 10px 0px 10px">
|
||||
<el-option
|
||||
v-for="item in groupNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-input v-model="partNumber" placeholder="零件号" size="small" clearable style="width: 150px;margin: 10px 10px 0px 10px"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin: 15px 0 0 10px" @click="pageCurrent=1;pageSize=20;total=0;searchData()">查询</el-button>
|
||||
<el-button type="primary" size="small" style="margin: 15px 0 0 10px" @click="wareHousing">出库</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table :data="tableData" style="width: 760px" height="580" stripe size="mini" border @selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="45"/>
|
||||
<el-table-column align="center" label="序号" type="index" width="55px"/>
|
||||
<el-table-column align="center" label="机床图号" width="110px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="组号" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件图号" min-width="180px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件名称" min-width="180px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="数量" width="50px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="状态" width="80px">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-tag v-if="scope.row.考核状态 === '8'">入库</el-tag>-->
|
||||
<!-- </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 v-el-drag-dialog :visible.sync="dialogFormVisible" title="出库信息" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="部门" prop="部门" label-width="100px" size="small">
|
||||
<!-- <el-input v-model="form.department" size="small" placeholder="请输入人员编号" style="width: 200px"/>-->
|
||||
<el-select v-model="form.department" placeholder="请选择部门" size="small" clearable style="width: 200px;" @change="selectLeaders">
|
||||
<el-option
|
||||
v-for="item in departments"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="领料人" prop="领料人" label-width="100px" size="small">
|
||||
<el-select v-model="form.name" placeholder="请选择领料人" size="small" clearable style="width: 200px;">
|
||||
<el-option
|
||||
v-for="item in leaders"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="人员编号" prop="leader" label-width="100px" size="small">
|
||||
<el-input v-model="form.leader" size="small" placeholder="请输入人员编号" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible=false">取消</el-button>
|
||||
<el-button type="primary" @click="CHUKU()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { url } from '@/utils/request'
|
||||
// import axios from 'axios'
|
||||
import { initProject, searchmachine, searchgroup, searchdata, warehousing, selectdepartment, selectleaders } from '@/api/Inventory/SelfMadePartsWarehouseOut'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
entryNameValue: '', // 项目名称
|
||||
entryName: [],
|
||||
machineToolValue: '', // 机床号
|
||||
machineTool: [],
|
||||
groupNumberValue: '', // 组号
|
||||
groupNumber: [],
|
||||
partNumber: '',
|
||||
pageCurrent: 1,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
tableData: [],
|
||||
multipleSelection: [],
|
||||
dialogFormVisible: false,
|
||||
processPlanSerialNumber: '', // 工艺计划流水号
|
||||
remarks: '',
|
||||
form: {
|
||||
leader: '',
|
||||
name: ''
|
||||
},
|
||||
rules: {
|
||||
leader: [{ required: true, message: '请输入' }]
|
||||
},
|
||||
departments: [], // 部门
|
||||
leaders: [] // 领料人
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchData()
|
||||
},
|
||||
methods: {
|
||||
searchData() {
|
||||
const entryNameValue_check = this.entryNameValue === '' || this.entryNameValue === null ? 0 : 1
|
||||
const machineToolValue_check = this.machineToolValue === '' || this.machineToolValue === null ? 0 : 1
|
||||
const groupNumberValue_check = this.groupNumberValue === '' ? 0 : 1
|
||||
const partNumber_check = this.partNumber === '' || this.partNumber === null ? 0 : 1
|
||||
searchdata(entryNameValue_check, this.entryNameValue, machineToolValue_check, this.machineToolValue, groupNumberValue_check, this.groupNumberValue, partNumber_check, this.partNumber, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
selectDepartment() {
|
||||
selectdepartment().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.departments.push({
|
||||
label: response.data[i].部门名称,
|
||||
value: response.data[i].考核部门编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
selectLeaders() {
|
||||
selectleaders(this.form.department).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.leaders.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].考勤编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fetchData() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.entryName.push({
|
||||
label: response.data[i].项目名称,
|
||||
value: response.data[i].项目流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询机床
|
||||
SearchMachine() {
|
||||
this.machineToolValue = ''
|
||||
this.machineTool = []
|
||||
this.groupNumberValue = ''
|
||||
this.groupNumber = []
|
||||
if (this.entryNameValue) {
|
||||
searchmachine(this.entryNameValue, 1).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineTool.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 查询组号
|
||||
searchGroupList() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNumber = []
|
||||
if (this.machineToolValue) {
|
||||
searchgroup(this.machineToolValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.groupNumber.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}, // 入库
|
||||
wareHousing() {
|
||||
console.log(this.multipleSelection, 121212)
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message.warning('请勾选出库物料')
|
||||
} else {
|
||||
this.selectDepartment()
|
||||
this.dialogFormVisible = true
|
||||
this.form.leader = ''
|
||||
}
|
||||
}, // 多选
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = []
|
||||
val.map(v => {
|
||||
this.multipleSelection.push(v.工艺计划流水号)
|
||||
})
|
||||
},
|
||||
CHUKU() {
|
||||
console.log(this.form.name, 909090, this.form.leader)
|
||||
if (Number(this.form.leader) === Number(this.form.name)) {
|
||||
warehousing(this.multipleSelection, this.form.leader, this.remarks).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('出库成功')
|
||||
this.dialogFormVisible = false
|
||||
this.searchData()
|
||||
} else {
|
||||
this.$message.error('出库失败')
|
||||
this.dialogFormVisible = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('人员编号错误')
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.searchData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span style="margin-left: 10px">机床号:</span>
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;margin-bottom: 10px;width: 120px" placeholder="机床号" @change="getGroup()">
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;margin-bottom: 10px;width: 185px" placeholder="机床号" @change="getGroup()">
|
||||
<el-option
|
||||
v-for="item in Machines"
|
||||
:key="item.value"
|
||||
@@ -13,7 +13,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin-top:10px;width: 120px;">
|
||||
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin-top:10px;width: 100px;">
|
||||
<el-option
|
||||
v-for="item in Groups"
|
||||
:key="item.value"
|
||||
@@ -21,7 +21,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 120px;"/>
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 170px;"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=500;total = 0">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
@@ -121,9 +121,9 @@
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="领料人" prop="出库备注" width="80px">
|
||||
<el-table-column align="center" label="领料人" prop="领料人" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库备注 }}
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="出库时间" prop="出库时间" width="100px">
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<span>操作者:</span>
|
||||
<el-input v-model="workerName" placeholder="操作者" size="small" clearable style="width:120px; margin-top: 10px;margin-bottom: 10px"/>
|
||||
<el-input v-model="workerName" placeholder="操作者" size="small" clearable style="width:100px; margin-top: 10px;margin-bottom: 10px"/>
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partNumber" placeholder="零件图号" size="small" clearable style="width:150px"/>
|
||||
<el-input v-model="partNumber" placeholder="零件图号" size="small" clearable style="width:170px"/>
|
||||
<span>工艺名称:</span>
|
||||
<el-input v-model="technologyName" placeholder="工艺名称" size="small" clearable style="width:150px"/>
|
||||
<el-input v-model="technologyName" placeholder="工艺名称" size="small" clearable style="width:100px"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="pageCurrent=1;total=0;searchTable();">查询</el-button>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="新增补录工时" placement="top">
|
||||
<el-button type="primary" class="el-icon-plus" size="small" style="margin: 10px 0 0 10px" @click="addSupplement();">新增</el-button>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-card>
|
||||
<div style="background-color: rgb(126,172,237);color: white;margin-top: 5px">{{ 机床图号 }} {{ 机床名称 }}</div>
|
||||
<div :style="{background:MachineColor}" style="color: white;margin-top: 5px">{{ 机床图号 }} {{ 机床名称 }}</div>
|
||||
<div style="margin: 10px 0 0 20px;height: 650px;overflow: auto">
|
||||
<el-tree
|
||||
:data="departmentData"
|
||||
@@ -59,7 +59,6 @@
|
||||
:render-content="renderContent"
|
||||
node-key="机床流水号"
|
||||
class="selectTree"
|
||||
default-expand-all
|
||||
@node-click="onClick"/>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -89,11 +88,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMachines, getGroups, selectParts, selectProcedure } from '@/api/ManufacturingCenter/CompletionOfWorkshopComponents'
|
||||
import { getMachines, getMachinesStatue, getGroups, selectParts, selectProcedure } from '@/api/ManufacturingCenter/CompletionOfWorkshopComponents'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
MachineColor: '',
|
||||
MachineValue: '', // 机床号
|
||||
Machine: [],
|
||||
option: [], // 组号
|
||||
@@ -133,6 +133,13 @@ export default {
|
||||
}
|
||||
}).then(() => {
|
||||
this.MachineValue = this.Machine[0].value
|
||||
getMachinesStatue(this.MachineValue).then(res => {
|
||||
if (res.data[0].是否发货 === 0) {
|
||||
this.MachineColor = 'rgb(126,172,237)'
|
||||
} else {
|
||||
this.MachineColor = 'green'
|
||||
}
|
||||
})
|
||||
this.getTreeData()
|
||||
})
|
||||
},
|
||||
@@ -153,6 +160,7 @@ export default {
|
||||
isLeaf: false,
|
||||
label: response.data[i].组号 + '\xa0\xa0\xa0' + (response.data[i].组件名称 ? response.data[i].组件名称 : ''),
|
||||
value: response.data[i].组件流水号,
|
||||
组件完成状态: response.data[i].组件完成状态,
|
||||
father: true,
|
||||
children: []
|
||||
})
|
||||
@@ -214,7 +222,11 @@ export default {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return (<span>{node.label}</span>)
|
||||
if (node.data.组件完成状态 === '已完成') {
|
||||
return (<span class='treeNotesComplate'>{node.label}</span>)
|
||||
} else {
|
||||
return (<span class='treeNotesUnComplate'>{node.label}</span>)
|
||||
}
|
||||
}
|
||||
},
|
||||
searchTable1(row) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<el-card>
|
||||
<span>工位号:</span>
|
||||
<el-select v-model="MachineValue" filterable size="small" style="width:220px;margin-bottom:10px" placeholder="工位号" @change="searchTable();searchParts()">
|
||||
<el-select v-model="MachineValue" filterable size="small" style="width:120px;margin-bottom:10px" placeholder="工位号" @change="searchTable();searchParts()">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
:key="item.value"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>机床号:</span>
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;width: 220px" placeholder="机床号" @change="getGroup()">
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;width: 185px" placeholder="机床号" @change="getGroup()">
|
||||
<el-option
|
||||
v-for="item in Machines"
|
||||
:key="item.value"
|
||||
@@ -22,7 +22,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件号:</span>
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 200px;"/>
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 170px;"/>
|
||||
<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-row v-if="false">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-button :disabled="isShow" type="info" size="small" style="margin: 0px 180px;float: right" @click="EditData">补录完成日期</el-button>
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="margin:0px 10px 0px 10px;width: 180px;" placeholder="机床号" @change="getGroup">
|
||||
<el-select v-model="Machine" filterable clearable size="small" style="margin:0px 10px 0px 10px;width: 185px;" placeholder="机床号" @change="getGroup">
|
||||
<el-option
|
||||
v-for="item in Machines"
|
||||
:key="item.value"
|
||||
@@ -12,14 +12,14 @@
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin:0px 10px;width: 120px;" @change="getTableData">
|
||||
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin:0px 10px;width: 100px;" @change="getTableData">
|
||||
<el-option
|
||||
v-for="item in Groups"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 180px;margin:0px 10px;"/>
|
||||
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 170px;margin:0px 10px;"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin: 0px 10px;" @click="pageCurrent = 1;pageSize = 100;getTableData()">查询</el-button>
|
||||
</el-card>
|
||||
<el-row>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<el-col style="width: 610px">
|
||||
<el-card style="height: 680px">
|
||||
<el-row style="margin-top: 5px">
|
||||
<el-input v-model="Parts" placeholder="零件图号" size="small" style="width: 150px" @keyup.enter.native="getParts"/>
|
||||
<el-input v-model="Parts" placeholder="零件图号" size="small" style="width: 170px" @keyup.enter.native="getParts"/>
|
||||
<el-select v-model="PersonValue" filterable placeholder="操作者" size="small" style="width: 100px;float: right" @change="searchTableData2">
|
||||
<el-option
|
||||
v-for="item in Person"
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="客户名称" prop="客户名称" width="160" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="客户名称" prop="客户名称" min-width="160" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户名称 }}
|
||||
</template>
|
||||
@@ -207,7 +207,7 @@
|
||||
{{ scope.row.已收金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="收款阶段" width="169px">
|
||||
<el-table-column align="center" label="收款阶段" min-width="169px">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.执行进度id" filterable placeholder="请选择收款阶段" style="width: 130px" size="mini" @change="changeTime(scope.row)">
|
||||
<el-option
|
||||
@@ -916,7 +916,6 @@ export default {
|
||||
this.customerName = ''
|
||||
this.customerNames = []
|
||||
getcustomername().then(response => {
|
||||
console.log(response, 121212)
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.customerNames.push({
|
||||
value: response.data[i].客户名称,
|
||||
@@ -951,7 +950,6 @@ export default {
|
||||
this.id3 = ''
|
||||
this.listLoading2 = false
|
||||
const data = response.data.rows
|
||||
console.log(data, 111)
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用收款 = true : data[i].是否禁用收款 = false
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
@@ -1415,12 +1413,10 @@ export default {
|
||||
// this.editTable(editTableData, [this.zijinID, this.form2.TotalContractAmount], 'form2', function() { this.getTableData(); this.dialogFormVisible4 = false })
|
||||
},
|
||||
TransferPlan(row) {
|
||||
console.log(row)
|
||||
this.id = row.批次资金id
|
||||
this.max1 = parseFloat(row.未收金额)
|
||||
this.form4.转移金额 = parseFloat(row.未收金额)
|
||||
this.form4.计划阶段 = parseInt(row.付款批次) + 1
|
||||
console.log(this.form4.转移金额, this.form4.计划阶段)
|
||||
this.dialogFormVisible5 = true
|
||||
this.Planning = []
|
||||
this.addForm('form4')
|
||||
|
||||
@@ -1,71 +1,246 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card v-loading="loading">
|
||||
<div id="myChart" :style="{width: '100%', height: '570px', margin: 'auto'}"/>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-card v-loading="loading1" style="height: 450px">
|
||||
<span>年营销金额图表</span>
|
||||
<el-button size="small" type="success" icon="el-icon-search" @click="search1()">查询</el-button>
|
||||
<div id="myChart1" :style="{width: '100%', height: '400px', margin: 'auto'}"/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card v-loading="loading2" style="height: 450px">
|
||||
<span>客户分布图</span>
|
||||
<el-button size="small" type="success" icon="el-icon-search" @click="search2()">查询</el-button>
|
||||
<div id="myChart2" :style="{width: '100%', height: '400px', margin: 'auto'}"/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-card v-loading="loading3" style="height: 450px">
|
||||
<span>在执行项目金额及回款</span>
|
||||
<el-button size="small" type="success" icon="el-icon-search" @click="search3()">查询</el-button>
|
||||
<div id="myChart3" :style="{width: '100%', height: '400px', margin: 'auto'}"/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject } from '@/api/MarketingCenter/ProjectProgress'
|
||||
import { search1, search2, search3 } from '@/api/MarketingCenter/ProjectProgress'
|
||||
import echarts from 'echarts'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false
|
||||
loading1: false,
|
||||
loading2: false,
|
||||
loading3: false,
|
||||
loading4: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.search()
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
this.loading = true
|
||||
var myChart = echarts.init(document.getElementById('myChart'))
|
||||
myChart.clear()
|
||||
initProject().then(response => {
|
||||
this.loading = false
|
||||
this.drawLine(response.data)
|
||||
// 项目完成进度
|
||||
search1() {
|
||||
this.loading1 = true
|
||||
var myChart1 = echarts.init(document.getElementById('myChart1'))
|
||||
myChart1.clear()
|
||||
search1().then(response => {
|
||||
this.loading1 = false
|
||||
this.drawLine1(response.data)
|
||||
})
|
||||
},
|
||||
drawLine(data) {
|
||||
this.dataX = []
|
||||
drawLine1(data) {
|
||||
var dataX = []
|
||||
var lineData = []
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
this.dataX.push(data[i].项目名称)
|
||||
dataX.push(data[i].开票时间)
|
||||
lineData.push(data[i].开票金额)
|
||||
}
|
||||
var myChart = echarts.init(document.getElementById('myChart'))
|
||||
myChart.setOption({
|
||||
var myChart1 = echarts.init(document.getElementById('myChart1'))
|
||||
myChart1.clear()
|
||||
myChart1.setOption({
|
||||
title: {
|
||||
left: 'center',
|
||||
text: '直方图'
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '8%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
dataZoom: { // 实现缩放功能
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
name: '年份',
|
||||
// axisLabel: {
|
||||
// interval: 0,
|
||||
// rotate: 40,
|
||||
// margin: 10
|
||||
// },
|
||||
data: dataX
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: '金额',
|
||||
min: 0,
|
||||
scale: 'true'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '测量值',
|
||||
type: 'bar',
|
||||
data: lineData,
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
realtime: true,
|
||||
start: 0,
|
||||
end: 100
|
||||
position: 'top'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
},
|
||||
// 客户分布图
|
||||
search2() {
|
||||
this.loading2 = true
|
||||
var myChart2 = echarts.init(document.getElementById('myChart2'))
|
||||
myChart2.clear()
|
||||
search2().then(response => {
|
||||
this.loading2 = false
|
||||
this.drawLine2(response.data)
|
||||
})
|
||||
},
|
||||
drawLine2(data) {
|
||||
var dataX = []
|
||||
var lineData = []
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
dataX.push({
|
||||
value: parseInt(data[i].客户数量),
|
||||
name: data[i].省份
|
||||
})
|
||||
lineData.push(data[i].省份)
|
||||
}
|
||||
var myChart2 = echarts.init(document.getElementById('myChart2'))
|
||||
myChart2.clear()
|
||||
myChart2.setOption({
|
||||
title: {
|
||||
text: '客户分布图',
|
||||
x: 'center'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b} : {c} ({d}%)'
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: 'left',
|
||||
data: lineData
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '省份',
|
||||
type: 'pie',
|
||||
radius: '55%',
|
||||
center: ['50%', '60%'],
|
||||
data: dataX,
|
||||
itemStyle: {
|
||||
emphasis: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
},
|
||||
// 年营销金额图表
|
||||
search3() {
|
||||
this.loading2 = true
|
||||
var myChart3 = echarts.init(document.getElementById('myChart3'))
|
||||
myChart3.clear()
|
||||
search3().then(response => {
|
||||
this.loading2 = false
|
||||
this.drawLine3(response.data)
|
||||
})
|
||||
},
|
||||
drawLine3(data) {
|
||||
var dataX = []
|
||||
var lineData = []
|
||||
var lineData2 = []
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
dataX.push(data[i].项目名称)
|
||||
lineData.push(data[i].已收金额)
|
||||
lineData2.push(data[i].待收金额)
|
||||
}
|
||||
var myChart3 = echarts.init(document.getElementById('myChart3'))
|
||||
myChart3.clear()
|
||||
myChart3.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data: ['已收金额', '待收金额']
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
name: '项目名称',
|
||||
data: this.dataX,
|
||||
data: dataX,
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
rotate: 0,
|
||||
rotate: 40,
|
||||
margin: 10
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: '工时',
|
||||
min: 0,
|
||||
scale: 'true'
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '已收金额',
|
||||
type: 'bar',
|
||||
stack: '总量',
|
||||
color: '#67C23A',
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
position: 'inside'
|
||||
}
|
||||
},
|
||||
data: lineData
|
||||
},
|
||||
{
|
||||
name: '待收金额',
|
||||
type: 'bar',
|
||||
stack: '总量',
|
||||
color: 'rgb(213,58,53)',
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
position: 'top'
|
||||
}
|
||||
},
|
||||
data: lineData2
|
||||
}
|
||||
]
|
||||
})
|
||||
this.loading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,10 +101,10 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="数量" width="100">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="disabledPick === false">
|
||||
<el-input-number v-model="scope.row.数量" :min="1" label="描述文字" size="mini" controls-position="right" style="width:100px" @change="handleChange"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<!--<template v-if="disabledPick === false">-->
|
||||
<!--<el-input-number v-model="scope.row.数量" :min="1" label="描述文字" size="mini" controls-position="right" style="width:100px" @change="handleChange"/>-->
|
||||
<!--</template>-->
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<el-card>
|
||||
<span>项目名称</span>
|
||||
<el-select v-model="projectValue" placeholder="请选择项目名称" filterable size="small">
|
||||
<el-select v-model="projectValue" placeholder="请选择项目名称" filterable size="small" style="width: 185px">
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
@@ -10,7 +10,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床图号</span>
|
||||
<el-select v-model="machineValue" placeholder="请选择机床图号" filterable size="small">
|
||||
<el-select v-model="machineValue" placeholder="请选择机床图号" filterable size="small" style="width: 185px">
|
||||
<el-option
|
||||
v-for="item in machine"
|
||||
:key="item.value"
|
||||
@@ -18,87 +18,86 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>组号</span>
|
||||
<el-select v-model="groupValue" placeholder="请选择组号" filterable size="small">
|
||||
<el-select v-model="groupValue" placeholder="请选择组号" filterable size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in group"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-select v-model="whetherToImport" clearable placeholder="是否导入" filterable size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in whetherToImports"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
|
||||
<el-button icon="el-icon-search" type="success" size="small" @click="pageCurrentWB = 1;pageSizeWB = 10;pageCurrent = 1;pageSize = 10;getTableData()">查询</el-button>
|
||||
<el-upload
|
||||
:disabled="disabled"
|
||||
:action="action"
|
||||
:on-success="uploadSuccess"
|
||||
:on-error="uploadFailure"
|
||||
:show-file-list="showFileList"
|
||||
:file-list="fileList"
|
||||
style="float: right; margin: 0px 50px"
|
||||
class="upload-demo"
|
||||
multiple>
|
||||
<el-button type="success" size="small" style="float: right; margin: 0px 50px" @click="batchImportOfDrawings">图纸批量导入</el-button>
|
||||
</el-upload>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
highlight-current-row
|
||||
border
|
||||
size="mini"
|
||||
style="width: 100%;max-height: 520px"
|
||||
height="520">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<el-table-column
|
||||
label="机床图号"
|
||||
align="center"
|
||||
min-width="100px">
|
||||
<template slot-scope="scope">{{ scope.row.机床图号 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="零件图号"
|
||||
align="center"
|
||||
min-width="100px">
|
||||
<template slot-scope="scope">{{ scope.row.零件图号 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="零件名称"
|
||||
align="center"
|
||||
min-width="100px">
|
||||
<template slot-scope="scope">{{ scope.row.零件名称 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
align="center"
|
||||
min-width="100px">
|
||||
<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
|
||||
min-width="50px"
|
||||
label="零件图纸"
|
||||
align="center">
|
||||
<el-table v-loading="loading" :data="tableData" border size="mini" style="width: 100%;max-height: 520px" height="520">
|
||||
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||
<el-table-column label="机床图号" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-button circle icon="el-icon-search" size="small" @click="getNum(scope.row)"/>
|
||||
<!--<el-button slot="reference" type="success" icon="el-icon-search" circle size="mini"></el-button>-->
|
||||
<!--<el-button type="success" icon="el-icon-search" circle size="mini"></el-button>-->
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
min-width="80px"
|
||||
label="操作"
|
||||
align="center">
|
||||
<el-table-column label="零件图号" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" align="center" min-width="100px">
|
||||
<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">
|
||||
<el-tag v-if="Number(scope.row.是否导入)===1" type="success">已导入</el-tag>
|
||||
<el-tag v-else type="danger">未导入</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="50px" label="零件图纸" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button circle icon="el-icon-search" size="small" @click="getNum(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="80px" label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<!--<FileUpload ref="FileUpload" :num="scope.row.基本件流水号" table-name="机加工MES_零件图PDF表" @listenMsg ="listenMsgFromChid"/>-->
|
||||
<el-upload
|
||||
:disabled="disabled"
|
||||
:action="action"
|
||||
@@ -123,7 +122,6 @@
|
||||
@size-change="handleSizeChanges"
|
||||
@current-change="handleCurrentChanges"/>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:show-close="close"
|
||||
@@ -171,15 +169,27 @@ export default {
|
||||
loading: false,
|
||||
tableData: [],
|
||||
fileList: [],
|
||||
showFileList: true,
|
||||
showFileList: false,
|
||||
action: '',
|
||||
disabled: false,
|
||||
tableName: '机加工MES_零件图PDF表',
|
||||
num: '',
|
||||
num1: '1',
|
||||
hadFile: [],
|
||||
isDeleteShow: false,
|
||||
deleteShow: '1',
|
||||
operationType: '0'
|
||||
row1: [],
|
||||
operationType: '0',
|
||||
str: '',
|
||||
arr: [],
|
||||
whetherToImport: '',
|
||||
whetherToImports: [{
|
||||
value: '1',
|
||||
label: '已导入'
|
||||
}, {
|
||||
value: 'null',
|
||||
label: '未导入'
|
||||
}]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -236,24 +246,51 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getAction(row) {
|
||||
this.num = row.基本件流水号
|
||||
this.action = `${MESUploadFile}?&num=${this.num}&tableName=${this.tableName}`
|
||||
this.num = row.零件图号
|
||||
this.action = `${MESUploadFile}?&num=${this.num}&tableName=${this.tableName}&type=2`
|
||||
},
|
||||
batchImportOfDrawings() {
|
||||
this.action = `${MESUploadFile}?&num=${this.num1}&tableName=${this.tableName}&type=1`
|
||||
},
|
||||
getNum(row) {
|
||||
this.row1 = row
|
||||
this.dialogVisible = true
|
||||
this.num = row.基本件流水号
|
||||
this.getFileList(this.num)
|
||||
this.getFileList(row.零件图号)
|
||||
},
|
||||
uploadSuccess(res, file, fileList) {
|
||||
this.getTableData()
|
||||
if (res[0].result === '1') {
|
||||
const index = fileList.indexOf(file)
|
||||
fileList.splice(index, 1)
|
||||
} else {
|
||||
this.$message.error(`${file.name}文件上传失败,请检查上传文件是否正确!`)
|
||||
this.str = res[0].result
|
||||
this.arr = this.str.split('|')
|
||||
if (this.arr[1] === '无该零件') {
|
||||
this.$notify.error({
|
||||
title: '提示',
|
||||
message: `${this.arr[0]}该零件不存在,请检查上传文件名称是否正确!`,
|
||||
duration: 0
|
||||
})
|
||||
}
|
||||
if (this.arr[1] === '重复') {
|
||||
this.$notify.error({
|
||||
title: '提示',
|
||||
message: `${this.arr[0]}请勿重复上传!`,
|
||||
duration: 0
|
||||
})
|
||||
}
|
||||
if (this.arr[1] === '零件图号不正确') {
|
||||
this.$notify.error({
|
||||
title: '提示',
|
||||
message: `${this.arr[0]}和所选图号不符!`,
|
||||
duration: 0
|
||||
})
|
||||
}
|
||||
}
|
||||
if (fileList.length === 0) {
|
||||
this.$message.success('文件上传成功')
|
||||
// this.$refs.FileDown.getFileList(this.num)
|
||||
// this.getTableData()
|
||||
}
|
||||
},
|
||||
uploadFailure(a, file, fileList) {
|
||||
@@ -274,8 +311,9 @@ export default {
|
||||
const project_check = this.projectValue ? 1 : 0
|
||||
const machine_check = this.machineValue ? 1 : 0
|
||||
const group_check = this.groupValue ? 1 : 0
|
||||
const whetherToImport_check = this.whetherToImport ? 1 : 0
|
||||
this.loading = true
|
||||
basicPartsData(project_check, this.projectValue, machine_check, this.machineValue, group_check, this.groupValue, this.pageSize, this.pageCurrent).then(response => {
|
||||
basicPartsData(project_check, this.projectValue, machine_check, this.machineValue, group_check, this.groupValue, whetherToImport_check, this.whetherToImport, this.pageSize, this.pageCurrent).then(response => {
|
||||
this.loading = false
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
@@ -299,7 +337,7 @@ export default {
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: `select * from ${this.tableName} where 是否启用 = 1 and num = ${value}`
|
||||
name: `select * from ${this.tableName} where 是否启用 = 1 and name = '${value}'`
|
||||
}
|
||||
}).then(data => {
|
||||
this.suffix = data.data
|
||||
@@ -342,11 +380,14 @@ export default {
|
||||
name: `delete from ${this.tableName} where uid = N'${id}'`
|
||||
}
|
||||
}).then(response => {
|
||||
this.getTableData()
|
||||
if (response.data.length === 0) {
|
||||
this.$message.success('删除成功')
|
||||
this.dialogVisible = false
|
||||
this.getFileList(this.num)
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
this.dialogVisible = false
|
||||
this.getFileList(this.num)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user