This commit is contained in:
bryan sun
2019-12-09 15:32:08 +08:00
27 changed files with 2238 additions and 813 deletions

View File

@@ -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) { export function getGroups(stepNumber) {
return request({ return request({
@@ -18,8 +30,8 @@ export function getGroups(stepNumber) {
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '车间生产管理工艺_传递后_组件名称_查询数据_查询所有组', name: '车间生产管理工艺_组件状态查询_查询所有组',
param: '机床流水号=' + stepNumber + '=int' param: '机床流水号=' + stepNumber
} }
}) })
} }

View File

@@ -20,15 +20,14 @@ export function intPartState() {
} }
}) })
} }
export function searchmachine(num, check, pageCurrent, pageSize) { export function searchmachine(num, check) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: 'PDM_机床名称_查询数据', name: 'PDM_机床名称_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + num + '&机床类型代码_check=0=int&机床类型代码=1=int&机床流水号_check=0', param: '项目流水号_check=' + check + '=int&项目流水号=' + num + '&机床类型代码_check=0=int&机床类型代码=1=int&机床流水号_check=0'
Pagination: pageCurrent + '&' + pageSize
} }
}) })
} }
@@ -39,30 +38,19 @@ export function searchgroup(num, pageCurrent, pageSize) {
data: { data: {
type: '1', type: '1',
name: 'PDM_组件名称_查询数据', name: 'PDM_组件名称_查询数据',
param: '机床流水号=' + num, param: '机床流水号=' + num
Pagination: pageCurrent + '&' + pageSize
} }
}) })
} }
export function searchTable(check, entryNameValue, check1, machine, check2, groupNum, check3, partNumber, check4, partStateValue, check5, partTypeValue) { export function searchTable(check, entryNameValue, check1, machine, check2, groupNum, check3, partNumber, check4, partStateValue, check5, partTypeValue, pageCurrent, pageSize) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '车间生产管理工艺_零件工艺计划_查询数据_状态_新_MESWORK', name: '车间生产管理工艺_零件工艺计划_查询数据_状态_新_MESWORK',
param: '项目流水号_check=' + check + '=int&项目流水号=' + entryNameValue + '&机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '=int&零件图号_check=' + check3 + '=int&零件图号=' + partNumber + '=string&考核状态_check=' + check4 + '=int&考核状态=' + partStateValue + '=int&单件是否外协_check=' + check5 + '=int&单件是否外协=' + partTypeValue + '=int' param: '项目流水号_check=' + check + '=int&项目流水号=' + entryNameValue + '&机床流水号_check=' + check1 + '=int&机床流水号=' + machine + '=int&组件流水号_check=' + check2 + '=int&组件流水号=' + groupNum + '=int&零件图号_check=' + check3 + '=int&零件图号=' + partNumber + '=string&考核状态_check=' + check4 + '=int&考核状态=' + partStateValue + '=int&单件是否外协_check=' + check5 + '=int&单件是否外协=' + partTypeValue + '=int',
} Pagination: pageCurrent + '&' + pageSize
})
}
export function editData(num, state) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工艺计划_考核状态',
param: '工艺计划流水号=' + num + '=int&考核状态=' + state + '=int'
} }
}) })
} }

View File

@@ -0,0 +1,119 @@
import request from '@/utils/request'
// 获取工位 表1
export function getTableData1() {
return request({
url: '',
method: 'post',
data: {
type: '3',
name: 'SELECT *FROM [基础数据_设备工位点检表]inner join dbo.基础数据_点检类型名称 on [基础数据_设备工位点检表].点检表类型 = 基础数据_点检类型名称.点检表类型流水号'
}
})
}
// 点检类型 表2
export function getTableData2() {
return request({
url: '',
method: 'post',
data: {
type: '3',
name: 'select * from 基础数据_点检类型名称'
}
})
}
// 点检内容 表3
export function getTableData3(num) {
return request({
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 基础数据_点检内容 where 点检表类型 = ${num}`
}
})
}
// 表1 编辑
export function editType(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '4',
name: `update [基础数据_设备工位点检表] set 点检表类型 = ${num1} where ID = ${num2}`
}
})
}
export function confirmEdit1(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '4',
name: `update [基础数据_点检类型名称] set 点检表类型名称 = '${num1}' where 点检表类型流水号 = ${num2}`
}
})
}
export function confirmEdit2(num1, num2, num3) {
return request({
url: '',
method: 'post',
data: {
type: '4',
name: `update 基础数据_点检内容 set 保养周期 = ${num1} ,保养项目 = '${num2}' where ID = ${num3}`
}
})
}
export function openDelete1(num1) {
return request({
url: '',
method: 'post',
data: {
type: '4',
name: `delete 基础数据_点检类型名称 where 点检表类型流水号 = ${num1}`
}
})
}
export function selectCount(num1) {
return request({
url: '',
method: 'post',
data: {
type: '3',
name: `SELECT 工位号 FROM [基础数据_设备工位点检表] where 点检表类型 = ${num1}`
}
})
}
export function openDelete2(num1) {
return request({
url: '',
method: 'post',
data: {
type: '4',
name: `delete 基础数据_点检内容 where ID = ${num1}`
}
})
}
export function submit1(num1) {
return request({
url: '',
method: 'post',
data: {
type: '4',
name: `insert into 基础数据_点检类型名称 (点检表类型名称) values ('${num1}')`
}
})
}
export function submit2(num1, num2, num3) {
return request({
url: '',
method: 'post',
data: {
type: '4',
name: ` declare @id int = 0
SELECT top 1 @id = ID FROM [ERPTOOL_GJ].[dbo].基础数据_点检内容 order by ID desc
set @id = @id + 1
insert into 基础数据_点检内容 (点检任务编号,点检表类型,保养项目,保养周期) values (@id,${num1},'${num2}',${num3})`
}
})
}

View File

@@ -0,0 +1,32 @@
import request from '@/utils/request'
export function search1() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '合同信息管理_项目名称_总_查询'
}
})
}
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 count(客户名称) as 客户数量,[省份] FROM [客户关系管理系统_客户_查询数据_MESWOR_视图]where [客户名称是否启用] = 1 group by [省份]'
}
})
}

View File

@@ -0,0 +1,27 @@
import request from '@/utils/request'
// 获取零件工序信息(零件号表中)
export function getprocedure(processPlan, single) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工序_查询数据_根据工艺计划流水号_工艺名称简称_新',
param: '工艺计划流水号=' + processPlan + '=int&单件是否外协=' + single + '=int'
}
})
}
// 查询外协零件
export function searchTable(check, supplierNameValue, check1, MaterialsValue, pageSize, pageCurrent) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理_外协零件_查询数据',
param: '外协厂家_check=' + check + '&外协厂家=' + supplierNameValue + '&外协状态_check=' + check1 + '&外协状态=' + MaterialsValue,
Pagination: pageCurrent + '&' + pageSize
}
})
}

View File

@@ -75,6 +75,18 @@ export function getExport2(num) {
} }
}) })
} }
// 使用库存
export function changeNum(num, num1, num2, num3, num4) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_离线采购_占用数量_插入',
param: `物料流水号=${num}&使用库存数=${num1}&机床流水号=${num2}&组件零件流水号=${num3}&数量=${num4}`
}
})
}
// 查询分配后的标准件和外购件 // 查询分配后的标准件和外购件
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6, val8, val9, val10) { export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6, val8, val9, val10) {
return request({ return request({
@@ -114,14 +126,14 @@ export function searchSupplier(check1, value1, check2, value2, check3, value3, c
}) })
} }
// 查询询价单 // 查询询价单
export function searchCreateInquirySheet(pageCurrent, pageSize, check1, name, check2, num, id) { export function searchCreateInquirySheet(pageCurrent, pageSize, check2, num, id) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '采购管理_询价单_查询数据', name: '采购管理_询价单_查询数据',
param: `供应商名称_check=${check1}&供应商名称=${name}&询价单编号_check=${check2}&询价单编号=${num}&采购员流水号_check=1&采购员流水号=${id}`, param: `询价单编号_check=${check2}&询价单编号=${num}&采购员流水号_check=1&采购员流水号=${id}`,
Pagination: pageCurrent + '&' + pageSize Pagination: pageCurrent + '&' + pageSize
} }
}) })
@@ -254,7 +266,7 @@ export function saveOrder(num1, num2, num3) {
data: { data: {
type: '2', type: '2',
name: '采购管理_询价单明细_保存数据', name: '采购管理_询价单明细_保存数据',
param: `询价单明细流水号=${num1}&数量=${num2}&备注=${num3}` param: `询价单明细流水号=${num1}&数量=${num2}&备注=${num3}`
} }
}) })
} }

View File

@@ -24,14 +24,14 @@ export function initSupplier11(num) {
}) })
} }
// 查询询价单列表 表1 // 查询询价单列表 表1
export function searchInquirySheet(check1, value1, check2, value2, check3, id, check4, supplier) { export function searchInquirySheet(check2, value2, check3, id, check4, supplier) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '采购管理_询价单_查询数据', name: '采购管理_询价单_查询数据',
param: `供应商名称_check=${check1}&供应商名称=${value1}&询价单编号_check=${check2}&询价单编号=${value2}&采购员流水号_check=${check3}&采购员流水号=${id}&供应商流水号_check=${check4}&供应商流水号=${supplier}` param: `询价单编号_check=${check2}&询价单编号=${value2}&采购员流水号_check=${check3}&采购员流水号=${id}&供应商流水号_check=${check4}&供应商流水号=${supplier}`
} }
}) })
} }

View File

@@ -0,0 +1,25 @@
import request from '@/utils/request'
export function getData(date1, date2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购效率_查询数据_折线图',
param: '开始时间=' + date1 + '&结束时间=' + date2
}
})
}
export function getData1(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购效率分析_查询',
param: '采购合同流水号=' + num
}
})
}

View File

@@ -0,0 +1,27 @@
import request from '@/utils/request'
// 查询供应商
export function searchSupplier(check1, value1, check2, value2, check3, value3, check4, value4, check5, value5, check6, value6, check7, value7, check8, value8, check9, value9, check10, value10, check11, value11, check12, value12) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_供应商_查询数据_根据条件',
param: '供应商名称_check=' + check1 + '&供应商名称=' + value1 + '&企业性质_check=' + check2 + '&企业性质=' + value2 + '&创立日期_check=' + check3 + '&创立日期=' + value3 + '&注册资本_check=' + check4 + '&注册资本=' + value4 + '&税号_check=' + check5 + '&税号=' + value5 + '&电子信箱_check=' + check6 + '&电子信箱=' + value6 + '&地址_check=' + check7 + '&地址=' + value7 + '&帐号_check=' + check8 + '&帐号=' + value8 + '&开户行_check=' + check9 + '&开户行=' + value9 + '&电话号码_check=' + check10 + '&电话号码=' + value10 + '&传真_check=' + check11 + '&传真=' + value11 + '&货期_check=' + check12 + '&货期=' + value12
}
})
}
// 查询备料
export function searchTable(check, supplierNameValue, check1, partNumber, check2, MaterialsValue, pageSize, pageCurrent) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_外购备料_综合查询数据',
param: '供应商流水号_check=' + check + '&供应商流水号=' + supplierNameValue + '&零件图号_check=' + check1 + '&零件图号=' + partNumber + '&备料状态_check=' + check2 + '&备料状态=' + MaterialsValue,
Pagination: pageCurrent + '&' + pageSize
}
})
}

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1557552071193" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2463" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M938.666667 810.666667V85.333333H106.666667v448h21.333333v64h64v85.333334h42.666667v-85.333334h64v-64h21.333333V298.666667h362.666667v512h-106.666667v-85.333334h-170.666667v85.333334h-106.666666v-85.333334H128v85.333334H42.666667v128h938.666666v-128zM256 554.666667H170.666667v-21.333334h85.333333z m21.333333-298.666667v234.666667H149.333333V128h746.666667v682.666667h-170.666667V256z m170.666667 512h85.333333v42.666667h-85.333333zM170.666667 768h85.333333v42.666667H170.666667z m768 128H85.333333v-42.666667h853.333334z" p-id="2464" fill="#1296db"></path><path d="M661.333333 192m-42.666666 0a42.666667 42.666667 0 1 0 85.333333 0 42.666667 42.666667 0 1 0-85.333333 0Z" p-id="2465" fill="#1296db"></path><path d="M277.333333 170.666667h298.666667v42.666666H277.333333zM789.333333 597.333333h42.666667v170.666667h-42.666667zM789.333333 469.333333h42.666667v85.333334h-42.666667zM789.333333 341.333333h42.666667v85.333334h-42.666667z" p-id="2466" fill="#1296db"></path></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -20,18 +20,17 @@
</el-select> </el-select>
</el-card> </el-card>
<el-row> <el-row>
<el-col style="width: 450px"> <el-col :span="8">
<el-card> <el-card>
<el-table :data="tableData1" style="height: 670px" highlight-current-row border> <el-table :data="tableData1" :row-class-name="tableRowClassName" style="height: 670px" highlight-current-row border>
<el-table-column type="index" label="序号" width="50"/> <el-table-column align="center" label="工序名" width="110">
<el-table-column align="center" label="工序名" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.工艺名称 }} {{ scope.row.工艺名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作者" width="120"> <el-table-column align="center" label="操作者" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.员工姓名 }} {{ scope.row.员工姓名 === '超级管理员' && scope.row.工序状态 !== 4 ? '' : scope.row.员工姓名 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="数量" show-overflow-tooltip min-width="90"> <el-table-column align="center" label="数量" show-overflow-tooltip min-width="90">
@@ -39,26 +38,31 @@
{{ scope.row.投产数量 }} {{ scope.row.投产数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="工序状态" show-overflow-tooltip min-width="90">
<template slot-scope="scope">
<span v-if="scope.row.工序状态 >= 4">已完成</span>
<span v-else>未完成</span>
</template>
</el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</el-col> </el-col>
<el-col style="width:600px"> <el-col :span="16">
<el-card> <el-card>
<span>机床图号{{ 机床图号 }} 机床名称{{ 机床名称 }}</span> <div :style="{background:MachineColor}" style="color: white;margin-top: 5px">{{ 机床图号 }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ 机床名称 }}</div>
<div style="margin: 10px 0 0 50px;height: 300px;overflow: auto"> <div style="margin: 10px 0 0 20px;height: 650px;overflow: auto">
<el-tree <el-tree
:data="departmentData" :data="departmentData"
:props="defaultProps" :props="defaultProps"
:indent="80" :indent="50"
:expand-on-click-node="false" :expand-on-click-node="false"
:render-content="renderContent" :render-content="renderContent"
node-key="机床流水号" node-key="机床流水号"
class="selectTree" class="selectTree"
default-expand-all
@node-click="onClick"/> @node-click="onClick"/>
</div> </div>
</el-card> </el-card>
<el-card style="height: 350px"> <el-card v-if="false" style="height: 350px">
<el-table :data="tableData2" height="300" highlight-current-row border @row-click="searchTable1"> <el-table :data="tableData2" height="300" highlight-current-row border @row-click="searchTable1">
<el-table-column type="index" label="序号" width="50"/> <el-table-column type="index" label="序号" width="50"/>
<el-table-column align="center" label="图号及规格" width="220"> <el-table-column align="center" label="图号及规格" width="220">
@@ -84,11 +88,12 @@
</template> </template>
<script> <script>
import { getMachines, getGroups, selectParts, selectProcedure } from '@/api/ManufacturingCenter/CompletionOfWorkshopComponents' import { getMachines, getMachinesStatue, getGroups, selectParts, selectProcedure } from '@/api/ManufacturingCenter/CompletionOfWorkshopComponents'
export default { export default {
data() { data() {
return { return {
MachineColor: '',
MachineValue: '', // 机床号 MachineValue: '', // 机床号
Machine: [], Machine: [],
option: [], // 组号 option: [], // 组号
@@ -128,6 +133,13 @@ export default {
} }
}).then(() => { }).then(() => {
this.MachineValue = this.Machine[0].value 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() this.getTreeData()
}) })
}, },
@@ -148,6 +160,7 @@ export default {
isLeaf: false, isLeaf: false,
label: response.data[i].组号 + '\xa0\xa0\xa0' + (response.data[i].组件名称 ? response.data[i].组件名称 : ''), label: response.data[i].组号 + '\xa0\xa0\xa0' + (response.data[i].组件名称 ? response.data[i].组件名称 : ''),
value: response.data[i].组件流水号, value: response.data[i].组件流水号,
组件完成状态: response.data[i].组件完成状态,
father: true, father: true,
children: [] children: []
}) })
@@ -159,8 +172,11 @@ export default {
firstLevel.children = [] firstLevel.children = []
for (let j = 0; j < response.data.length; j++) { for (let j = 0; j < response.data.length; j++) {
firstLevel.children.push({ firstLevel.children.push({
label: (response.data[j].零件图号 ? response.data[j].零件图号 : '无零件图号') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].规格 ? response.data[j].规格 : '') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].投产总数量 ? response.data[j].投产总数量 : '') + '..........' + (response.data[j].零件名称 ? response.data[j].零件名称 : '无零件名称'), label: (response.data[j].零件图号 ? response.data[j].零件图号 : '无零件图号') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].规格 ? response.data[j].规格 : '') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].投产总数量 ? response.data[j].投产总数量 : '') + '..........' + (response.data[j].零件名称 ? response.data[j].零件名称 : '无零件名称') + (response.data[j].零件类型 === 1 ? '' : '\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0外购'),
value: response.data[j].工艺计划流水号, value: response.data[j].工艺计划流水号,
考核状态: response.data[j].考核状态,
采购状态: response.data[j].采购状态,
零件类型: response.data[j].零件类型,
father: false father: false
}) })
} }
@@ -173,29 +189,66 @@ export default {
onClick(num) { onClick(num) {
this.tableData1 = [] this.tableData1 = []
this.tableData2 = [] this.tableData2 = []
if (num.father === true) { if (num.father === false) {
selectParts(1, num.value, 0, 0).then(response => { if (num.零件类型 === 1) {
this.tableData2 = response.data selectProcedure(num.value).then(response => {
}) this.tableData1 = response.data
} else {
selectParts(0, 0, 1, num.value).then(response => {
this.tableData2 = response.data
}) })
} }
}
// if (num.father === true) {
// selectParts(1, num.value, 0, 0).then(response => {
// this.tableData2 = response.data
// })
// } else {
// selectParts(0, 0, 1, num.value).then(response => {
// this.tableData2 = response.data
// })
// }
}, },
renderContent(h, { node, data, store }) { renderContent(h, { node, data, store }) {
return (<span class='treeNotes'>{node.label}</span>) if (node.data.father === false) {
if (node.data.零件类型 === 1) { // 自制
if (parseInt(node.data.考核状态) > 6) {
return (<span class='treeNotesComplate'>{node.label}</span>)
} else {
return (<span class='treeNotesUnComplate'>{node.label}</span>)
}
} else { // 外购
if (node.data.采购状态 === '已完成') {
return (<span class='treeNotesComplate'>{node.label}</span>)
} else {
return (<span class='treeNotesUnComplate'>{node.label}</span>)
}
}
} else {
if (node.data.组件完成状态 === '已完成') {
return (<span class='treeNotesComplate'>{node.label}</span>)
} else {
return (<span class='treeNotesUnComplate'>{node.label}</span>)
}
}
}, },
searchTable1(row) { searchTable1(row) {
this.tableData1 = [] this.tableData1 = []
selectProcedure(row.工艺计划流水号).then(response => { selectProcedure(row.工艺计划流水号).then(response => {
this.tableData1 = response.data this.tableData1 = response.data
}) })
},
tableRowClassName({ row, rowIndex }) {
if (row.工序状态 >= 4) {
return 'cjzuwcqk_complet'
}
} }
} }
} }
</script> </script>
<style>
.el-table .cjzuwcqk_complet {
background: #67C23A;
}
</style>
<style lang="scss"> <style lang="scss">
.selectTree{ .selectTree{
.el-tree-node__content>.el-tree-node__expand-icon{ .el-tree-node__content>.el-tree-node__expand-icon{
@@ -205,7 +258,11 @@ export default {
background-color: #ccc !important; background-color: #ccc !important;
} }
} }
.treeNotes { .treeNotesComplate {
background-color: green; color: black;
background-color: #67C23A;
}
.treeNotesUnComplate {
color: black;
} }
</style> </style>

View File

@@ -2,79 +2,57 @@
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<el-row> <el-row>
<!-- <span>项目名称:</span>--> <el-select v-model="entryNameValue" placeholder="项目名称" style="width:150px;margin: 10px 10px 0px 10px" size="small" clearable filterable @change="SearchMachine">
<el-select
v-model="entryNameValue"
placeholder="项目名称"
style="width:200px;margin: 10px 10px 0px 10px"
size="small"
clearable
filterable
@change="empty">
<el-option <el-option
v-for="item in entryName" v-for="item in entryName"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<!-- <span>机床图号:</span>--> <el-select v-model="machineToolValue" placeholder="机床号" size="small" clearable style="width: 150px;margin: 10px 10px 0px 10px" @change="searchGroupList">
<el-input v-model="machineToolNumber" placeholder="机床号" size="small" readonly clearable style="width:200px;margin: 10px 10px 0px 10px" @change="empty1"> <el-option
<el-button slot="append" icon="el-icon-search" @click="SearchMachine" /> v-for="item in machineTool"
</el-input> :key="item.value"
<!-- <span>组号:</span>--> :label="item.label"
<el-input v-model="groupNumber" placeholder="组号" size="small" readonly clearable style="width:200px;margin: 10px 10px 0px 10px"> :value="item.value"/>
<el-button slot="append" icon="el-icon-search" @click="searchGroupList" /> </el-select>
</el-input> <el-select v-model="groupNumberValue" placeholder="组号" size="small" clearable style="width: 100px;margin: 10px 10px 0px 10px">
<!-- <span>零件图号:</span>--> <el-option
<el-input v-model="partNumber" placeholder="零件号" size="small" clearable style="width:200px;margin: 10px 10px 0px 10px"/> v-for="item in groupNumber"
<!-- <span>零件状态:</span>--> :key="item.value"
<el-select v-model="partStateValue" placeholder="零件状态" size="small" clearable style="width:200px;margin: 10px 10px 0px 10px"> :label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="partStateValue" placeholder="零件状态" size="small" clearable style="width: 120px;margin: 10px 10px 0px 10px">
<el-option <el-option
v-for="item in partState" v-for="item in partState"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<!--<span>零件类型:</span>--> <el-input v-model="partNumber" placeholder="零件号" size="small" clearable style="width: 150px;margin: 10px 10px 0px 10px"/>
<!--<el-select v-model="partTypeValue" placeholder="零件类型" size="small" clearable style="margin-top: 15px;width: 200px">-->
<!--<el-option-->
<!--v-for="item in partType"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"/>-->
<!--</el-select>-->
<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="success" icon="el-icon-search" size="small" style="margin: 15px 0 0 10px" @click="pageCurrent=1;pageSize=20;total=0;searchData()">查询</el-button>
</el-row> </el-row>
<!-- <el-row>-->
<!-- </el-row>-->
</el-card> </el-card>
<el-card> <el-card>
<el-table <el-table v-loading="loading0" :data="tableData" style="width: 100%" height="550" stripe size="mini" border>
v-loading="loading0"
:data="tableData"
style="width: 100%"
height="820"
stripe
size="mini"
highlight-current-row
border>
<el-table-column align="center" label="序号" type="index" width="55px"/> <el-table-column align="center" label="序号" type="index" width="55px"/>
<el-table-column align="center" label="机床图号" width="110px"> <el-table-column align="center" label="机床图号" width="110px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.机床图号 }} {{ scope.row.机床图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="组号" width="50px"> <el-table-column align="center" label="组号" width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="零件图号" width="100px" show-overflow-tooltip> <el-table-column align="center" label="零件图号" min-width="180px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件图号 }} {{ scope.row.零件图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="零件名称" width="80px" show-overflow-tooltip> <el-table-column align="center" label="零件名称" min-width="110px" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件名称 }} {{ scope.row.零件名称 }}
</template> </template>
@@ -84,12 +62,12 @@
{{ scope.row.批次数量 }} {{ scope.row.批次数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="投产时间" width="80px"> <el-table-column align="center" label="投产时间" width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.传递时间 }} {{ scope.row.传递时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="零件状态" min-width="400px"> <el-table-column align="center" label="零件状态" width="650px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-steps :active="scope.row.考核状态" finish-status="success" simple> <el-steps :active="scope.row.考核状态" finish-status="success" simple>
<el-step title="投产" /> <el-step title="投产" />
@@ -102,200 +80,49 @@
</el-steps> </el-steps>
</template> </template>
</el-table-column> </el-table-column>
<!--<el-table-column label="操作" fixed="right" align="center" width="120px">-->
<!--<template slot-scope="scope">-->
<!--<el-button-->
<!--size="mini"-->
<!--type="primary"-->
<!--icon="el-icon-edit"-->
<!--@click="handleEdit(scope.row)">编辑</el-button>-->
<!--</template>-->
<!--</el-table-column>-->
</el-table> </el-table>
<!-- <div class="block" style="margin-top: 10px;">--> <div class="block" style="margin-top: 10px;">
<!-- <el-pagination--> <el-pagination
<!-- :current-page="pageCurrent"--> :current-page="pageCurrent"
<!-- :page-sizes="[10, 20, 30, 40, 50]"--> :page-sizes="[10, 20, 30, 40, 50]"
<!-- :page-size="pageSize"--> :page-size="pageSize"
<!-- :total="total"--> :total="total"
<!-- layout="total, sizes, prev, pager, next, jumper"--> layout="total, sizes, prev, pager, next, jumper"
<!-- @size-change="handleSizeChange"--> @size-change="handleSizeChange"
<!-- @current-change="handleCurrentChange"/>--> @current-change="handleCurrentChange"/>
<!-- </div>--> </div>
</el-card> </el-card>
<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"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel()">取消</el-button>
<el-button type="primary" @click="submitEdit()">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible2" title="选择机床" center style="min-height: 300px">
<el-table
:data="tableData6"
style="width:100%;max-height: 300px;display: inline-block"
height="300"
highlight-current-row
border
@row-click="selectMachine">
<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 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, 40, 50]"
:page-size="pageSize1"
:total="total1"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitName">提交</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible3" title="选择组号" center style="min-height: 300px">
<el-table
:data="tableData7"
style="width:100%;max-height: 300px;display: inline-block"
height="300"
highlight-current-row
border
@row-click="selectGroup">
<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>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize2"
:total="total2"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange3"
@current-change="handleCurrentChange3"/>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitGroup">提交</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { initProject, intPartState, searchTable, searchmachine, searchgroup, editData } from '@/api/ManufacturingCenter/StatusQuery' import { initProject, intPartState, searchTable, searchmachine, searchgroup } from '@/api/ManufacturingCenter/StatusQuery'
import elInput from 'element-ui/packages/input'
export default { export default {
components: {
elInput
},
data() { data() {
return { return {
loading0: false, loading0: false,
entryNameValue: '', // 项目流水号 entryNameValue: '', // 项目流水号
entryName: [], // 项目数组 entryName: [], // 项目数组
machineToolNumber: '', // 机床图号 machineToolValue: '', // 机床图号
machineNumber: '', machineTool: [],
machine: null, // 机床流水 groupNumberValue: '', //
groupNumber: '', // 组号 groupNumber: [],
groupNumber1: '',
groupNum: null, // 组件流水号
partNumber: '', // 零件号 partNumber: '', // 零件号
partStateValue: null, // 零件状态 partStateValue: null, // 零件状态
partStateValue1: null, partStateValue1: null,
partState: [], // 零件状态数组 partState: [], // 零件状态数组
partTypeValue: null, // 零件类型 partTypeValue: null, // 零件类型
num: null, num: null,
// pageCurrent: 1, pageCurrent: 1,
// pageSize: 20, pageSize: 20,
pageCurrent1: 1,
pageSize1: 20,
pageCurrent2: 1,
pageSize2: 20,
tableData7: [], tableData7: [],
tableData6: [], tableData6: [],
tableData: [], tableData: [],
state: null, state: null,
// total: null, total: null,
total1: null,
total2: null,
title: '', title: '',
dialogFormVisible2: false,
dialogFormVisible3: false,
dialogFormVisible4: false,
List: [], List: [],
check: null,
check1: null,
check2: null,
check3: null,
check4: null,
check5: null,
partType: [{ partType: [{
value: 1, value: 1,
label: '自家生产' label: '自家生产'
@@ -307,7 +134,7 @@ export default {
}, },
created() { created() {
this.fetchData() this.fetchData()
this.getList() this.searchData()
}, },
methods: { methods: {
fetchData() { fetchData() {
@@ -319,51 +146,6 @@ export default {
}) })
} }
}) })
},
searchData() {
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.partNumber !== '') {
this.check3 = 1
} else {
this.check3 = 0
}
if (this.partStateValue !== null && this.partStateValue !== '') {
this.check4 = 1
} else {
this.check4 = 0
}
if (this.partTypeValue !== null && this.partTypeValue !== '') {
this.check5 = 1
} else {
this.check5 = 0
}
this.loading0 = true
searchTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.partNumber, this.check4, this.partStateValue, this.check5, this.partTypeValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
response.data[i].考核状态 = parseInt(response.data[i].考核状态) - 2
if (response.data[i].传递时间 !== undefined || response.data[i].hasOwnProperty('传递时间')) {
response.data[i].传递时间 = response.data[i].传递时间.split(' ', 2)[0]
}
}
this.loading0 = false
this.tableData = response.data
})
},
getList() { // 初始化项目名称
initProject().then(response => { initProject().then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.entryName.push({ this.entryName.push({
@@ -373,109 +155,66 @@ export default {
} }
}) })
}, },
empty() { // 查询机床
this.machineToolNumber = '' SearchMachine() {
this.groupNumber = '' this.machineToolValue = ''
}, this.machineTool = []
SearchMachine() { // 查询机床 this.groupNumberValue = ''
if (this.entryNameValue !== null && this.entryNameValue !== '') { this.groupNumber = []
this.dialogFormVisible2 = true if (this.entryNameValue) {
this.check6 = 1 searchmachine(this.entryNameValue, 1).then(response => {
searchmachine(this.entryNameValue, this.check6, this.pageCurrent1, this.pageSize1).then(response => { for (let i = 0; i < response.data.length; i++) {
for (let i = 0; i < response.data.total; i++) { this.machineTool.push({
if (response.data.rows[i].机床开始时间 !== '') { label: response.data[i].机床图号,
response.data.rows[i].机床开始时间 = response.data.rows[i].机床开始时间.substr(0, 10) value: response.data[i].机床流水号
}
if (response.data.rows[i].机床结束时间 !== '') {
response.data.rows[i].机床结束时间 = response.data.rows[i].机床结束时间.substr(0, 10)
}
if (response.data.rows[i].工位属性 === '请选择') {
response.data.rows[i].工位属性 = ''
}
if (response.data.rows[i].机床主管 === '请选择') {
response.data.rows[i].机床主管 = ''
}
}
this.tableData6 = response.data.rows
this.total1 = parseInt(response.data.total)
}) })
} else {
this.$message.warning('请先选择项目')
} }
},
selectMachine(row) { // 选择机床号
this.machine = row.机床流水号
this.machineNumber = row.机床图号
},
submitName() { // 提交机床号
this.machineToolNumber = this.machineNumber
this.dialogFormVisible2 = false
},
empty1() {
this.groupNumber = ''
},
searchGroupList() { // 查询组号
if (this.machineToolNumber !== '') {
this.tableData7 = []
this.dialogFormVisible3 = true
searchgroup(this.machine, this.pageCurrent2, this.pageSize2).then(response => {
this.tableData7 = response.data.rows
this.total2 = parseInt(response.data.total)
}) })
} else {
this.$message.warning('请先选择机床')
} }
}, },
selectGroup(row) { // 选择组号 // 查询组号
this.groupNumber1 = row.组号 searchGroupList() {
this.groupNum = row.组件流水号 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].组件流水号
})
}
})
}
}, },
submitGroup() { // 提交组号 searchData() {
this.groupNumber = this.groupNumber1 var check, check1, check2, check3, check4, check5
this.dialogFormVisible3 = false if (this.entryNameValue) { check = 1 } else { check = 0 }
if (this.machineToolValue) { check1 = 1 } else { check1 = 0 }
if (this.groupNumberValue) { check2 = 1 } else { check2 = 0 }
if (this.partNumber) { check3 = 1 } else { check3 = 0 }
if (this.partStateValue) { check4 = 1 } else { check4 = 0 }
if (this.partTypeValue) { check5 = 1 } else { check5 = 0 }
this.loading0 = true
searchTable(check, this.entryNameValue, check1, this.machineToolValue, check2, this.groupNumberValue, check3, this.partNumber, check4, this.partStateValue, check5, this.partTypeValue, this.pageCurrent, this.pageSize).then(response => {
for (let i = 0; i < response.data.rows.length; i++) {
response.data.rows[i].考核状态 = parseInt(response.data.rows[i].考核状态) - 2
if (response.data.rows[i].传递时间 !== undefined || response.data.rows[i].hasOwnProperty('传递时间')) {
response.data.rows[i].传递时间 = response.data.rows[i].传递时间.split(' ', 2)[0]
}
}
this.loading0 = false
this.total = response.data.total
this.tableData = response.data.rows
})
}, },
handleEdit(row) { handleSizeChange(val) {
this.title = '编辑' this.pageSize = val
this.partStateValue1 = parseInt(row.考核状态) + 2
this.dialogFormVisible4 = true
this.num = row.工艺计划流水号
},
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() this.searchData()
} else { this.$message.error('编辑失败') }
})
}, },
cancel() { // 取消 handleCurrentChange(val) {
this.dialogFormVisible4 = false this.pageCurrent = val
}, this.searchData()
// handleSizeChange(val) {
// this.pageSize = val
// this.searchData()
// },
// handleCurrentChange(val) {
// this.pageCurrent = val
// this.searchData()
// },
handleSizeChange1(val) {
this.pageSize1 = val
this.SearchMachine()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.SearchMachine()
},
handleSizeChange3(val) {
this.pageSize2 = val
this.searchGroupList()
},
handleCurrentChange3(val) {
this.pageCurrent2 = val
this.searchGroupList()
} }
} }
} }

View File

@@ -0,0 +1,416 @@
<template>
<div class="app-container">
<el-card>
<div>设备对应点检类型维护</div>
<el-table v-loading="loading1" :data="tableData1" height="200" highlight-current-row border>
<el-table-column align="center" label="序号" type="index" width="50"/>
<el-table-column align="center" label="工位号" width="110">
<template slot-scope="scope">
{{ scope.row.工位号 }}
</template>
</el-table-column>
<el-table-column align="center" label="设备名称" min-width="150">
<template slot-scope="scope">
{{ scope.row.设备名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="设备编号" show-overflow-tooltip min-width="200">
<template slot-scope="scope">
{{ scope.row.设备编号 }}
</template>
</el-table-column>
<el-table-column align="center" label="点检表类型" min-width="150">
<template slot-scope="scope">
<el-select v-model="tableData1[scope.$index].点检表类型流水号" filterable size="small" placeholder="点检表类型" style="margin:3px 10px;width: 150px" @change="editType(scope.row)">
<el-option
v-for="item in 点检表类型"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<div>点检类型点检内容维护</div>
<el-col :span="6">
<el-table v-loading="loading2" :data="tableData2" height="300" highlight-current-row border @row-click="getTableData3">
<el-table-column align="center" label="序号" type="index" width="50"/>
<el-table-column align="center" label="点检类型名称" min-width="150">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.点检表类型名称" style="width:120px;margin-right:3px" clearable size="mini" width="120"/>
</template>
<span v-else>{{ scope.row.点检表类型名称 }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="160">
<template slot="header" slot-scope="scope">
<el-button size="mini" type="primary" icon="el-icon-circle-plus-outline" @click="handleAdd1('form1')">新增</el-button>
</template>
<template slot-scope="scope">
<el-button v-if="scope.row.edit" type="text" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit1(scope.row)">确定</el-button>
<el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="text" @click="cancelEdit1(scope.$index, scope.row)">取消</el-button>
<el-button v-else type="text" size="mini" icon="el-icon-edit" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
<el-button v-if="!scope.row.edit" type="danger" size="mini" plain icon="el-icon-delete" @click="openDelete1(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-col>
<el-col :span="18">
<el-table v-loading="loading3" :data="tableData3" height="300" highlight-current-row border>
<el-table-column align="center" label="序号" type="index" width="50"/>
<el-table-column align="center" label="保养周期" min-width="110">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-select v-model="tableData3[scope.$index].保养周期" filterable size="small" placeholder="点检表类型" style="margin:3px 10px;width: 150px" @change="editType(scope.row)">
<el-option
v-for="item in 保养周期"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</template>
<template v-else slot-scope="scope">
<span v-if="scope.row.保养周期 === 1"></span>
<span v-if="scope.row.保养周期 === 7"></span>
<span v-if="scope.row.保养周期 === 30"></span>
<span v-if="scope.row.保养周期 === 90"></span>
<span v-if="scope.row.保养周期 === 365"></span>
</template>
</template>
</el-table-column>
<el-table-column align="center" label="保养项目" min-width="250">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.保养项目" style="width: 90%;margin-right:3px" clearable size="mini" width="120"/>
</template>
<span v-else>{{ scope.row.保养项目 }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="160">
<template slot="header" slot-scope="scope">
<el-button size="mini" type="primary" icon="el-icon-circle-plus-outline" @click="handleAdd2('form2')">新增</el-button>
</template>
<template slot-scope="scope">
<el-button v-if="scope.row.edit" type="text" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit2(scope.row)">确定</el-button>
<el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="text" @click="cancelEdit2(scope.$index, scope.row)">取消</el-button>
<el-button v-else type="text" size="mini" icon="el-icon-edit" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
<el-button v-if="!scope.row.edit" type="danger" size="mini" plain icon="el-icon-delete" @click="openDelete2(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-card>
<el-dialog :visible.sync="dialogFormVisible1" title="新增" center width="500px">
<el-form ref="form1" :model="form1" :rules="rules" label-position="right" label-width="160px">
<el-form-item label="点检类型名称" prop="点检类型名称">
<el-input v-model="form1.点检类型名称" placeholder="点检类型名称" clearable size="small" style="width:180px;"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff1('form1')">取消</el-button>
<el-button type="primary" @click="submit1('form1')" >确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible2" title="新增" center width="500px">
<el-form ref="form2" :model="form2" :rules="rules" label-position="right" label-width="160px">
<el-form-item label="保养项目" prop="保养项目">
<el-input v-model="form2.保养项目" placeholder="保养项目" clearable size="small" style="width:180px;"/>
</el-form-item>
<el-form-item label="保养周期" prop="保养周期">
<el-select v-model="form2.保养周期" filterable size="small" placeholder="保养周期" style="width: 180px">
<el-option
v-for="item in 保养周期"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff2('form2')">取消</el-button>
<el-button type="primary" @click="submit2('form2')" >确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getTableData1, getTableData2, getTableData3, editType, confirmEdit1, confirmEdit2, selectCount, openDelete1, openDelete2, submit1, submit2 } from '@/api/ManufacturingCenter/maintainInformation'
export default {
data() {
return {
点检表类型: [],
tableData1: [],
loading1: false,
tableData2: [],
loading2: false,
点检表类型流水号: '',
保养周期: [{
value: 1,
label: '日'
}, {
value: 7,
label: '周'
}, {
value: 30,
label: '月'
}, {
value: 90,
label: '季'
}, {
value: 365,
label: '年'
}],
tableData3: [],
loading3: false,
form1: {
点检类型名称: ''
},
dialogFormVisible1: false,
form2: {
保养项目: '',
保养周期: ''
},
dialogFormVisible2: false,
rules: { // 表单验证规则
点检类型名称: [{ required: true, message: '请输入点检类型名称', trigger: 'blur' }],
保养项目: [{ required: true, message: '请输入保养项目', trigger: 'blur' }],
保养周期: [{ required: true, message: '请选择保养周期', trigger: 'change' }]
}
}
},
created() {
this.getTableData1()
this.getTableData2()
},
methods: {
getTableData1() {
this.tableData1 = []
this.loading1 = true
getTableData1().then(response => {
this.tableData1 = response.data
this.loading1 = false
})
},
// 编辑 表1
editType(row) {
editType(row.点检表类型流水号, row.ID)
},
getTableData2() {
this.点检表类型 = []
this.tableData2 = []
this.loading2 = true
getTableData2().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.点检表类型.push({
label: response.data[i].点检表类型名称,
value: response.data[i].点检表类型流水号
})
}
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.tableData2.push({
点检表类型流水号: response.data[i].点检表类型流水号,
点检表类型名称: response.data[i].点检表类型名称,
点检表类型流水号_原: response.data[i].点检表类型流水号,
点检表类型名称_原: response.data[i].点检表类型名称,
edit: false
})
}
}
this.loading2 = false
})
},
// 取消编辑
cancelEdit1(index, row) {
row.edit = false
row.点检表类型名称 = this.tableData2[index].点检表类型名称_原
this.$message('取消修改')
},
// 编辑 表2
confirmEdit1(row) {
confirmEdit1(row.点检表类型名称, row.点检表类型流水号).then(response => {
row.edit = false
})
},
// 删除 表2
openDelete1(row) {
this.$confirm('此操作将永久删除该行信息, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
selectCount(row.点检表类型流水号).then(response => {
if (response.data.length === 0) {
openDelete1(row.点检表类型流水号).then(() => {
this.tableData3 = []
this.getTableData2()
})
} else {
var message
message = '工位:'
for (let i = 0; i < response.data.length; i++) {
if (i === response.data.length - 1) {
message = message + response.data[i].工位号
} else {
message = message + response.data[i].工位号 + '、'
}
}
message = message + '占用,请先将以上工位改为其他点检类型'
this.$message.error(message)
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 新增 表2
handleAdd1(formName) {
if (this.$refs[formName] !== undefined) {
this.$refs[formName].resetFields()
}
this.form1.点检类型名称 = ''
this.dialogFormVisible1 = true
},
callOff1() {
this.dialogFormVisible1 = false
},
submit1(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
submit1(this.form1.点检类型名称).then(response => {
this.getTableData2()
this.dialogFormVisible1 = false
})
} else {
return false
}
})
},
getTableData3(row) {
this.点检表类型流水号 = row.点检表类型流水号
this.tableData3 = []
this.loading3 = true
getTableData3(row.点检表类型流水号).then(response => {
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.tableData3.push({
ID: response.data[i].ID,
保养周期: response.data[i].保养周期,
保养项目: response.data[i].保养项目,
保养周期_原: response.data[i].保养周期,
保养项目_原: response.data[i].保养项目,
edit: false
})
}
}
this.loading3 = false
})
},
// 取消编辑
cancelEdit2(index, row) {
row.edit = false
row.保养周期 = this.tableData3[index].保养周期_原
row.保养项目 = this.tableData3[index].保养项目_原
this.$message('取消修改')
},
// 编辑 表3
confirmEdit2(row) {
confirmEdit2(row.保养周期, row.保养项目, row.ID).then(response => {
row.edit = false
})
},
// 删除 表3
openDelete2(row) {
this.$confirm('此操作将永久删除该行信息, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
openDelete2(row.ID).then(() => {
this.tableData3 = []
this.loading3 = true
getTableData3(this.点检表类型流水号).then(response => {
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.tableData3.push({
ID: response.data[i].ID,
保养周期: response.data[i].保养周期,
保养项目: response.data[i].保养项目,
保养周期_原: response.data[i].保养周期,
保养项目_原: response.data[i].保养项目,
edit: false
})
}
}
this.loading3 = false
})
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 新增 表3
handleAdd2(formName) {
if (this.$refs[formName] !== undefined) {
this.$refs[formName].resetFields()
}
this.form2.保养项目 = ''
this.form2.保养周期 = ''
if (this.点检表类型流水号) {
this.dialogFormVisible2 = true
} else {
this.$message.error('请先选择一个点检类型')
}
},
callOff2() {
this.dialogFormVisible2 = false
},
submit2(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.点检表类型流水号) {
submit2(this.点检表类型流水号, this.form2.保养项目, this.form2.保养周期).then(response => {
this.tableData3 = []
this.loading3 = true
getTableData3(this.点检表类型流水号).then(response => {
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.tableData3.push({
ID: response.data[i].ID,
保养周期: response.data[i].保养周期,
保养项目: response.data[i].保养项目,
保养周期_原: response.data[i].保养周期,
保养项目_原: response.data[i].保养项目,
edit: false
})
}
}
this.loading3 = false
})
})
}
this.dialogFormVisible2 = false
} else {
return false
}
})
}
}
}
</script>
<style>
</style>

View File

@@ -24,8 +24,8 @@
<el-button type="success" icon="el-icon-search" class="move" size="small" style="margin-left: 10px" @click="selectCustomerOfName">查询</el-button> <el-button type="success" icon="el-icon-search" class="move" size="small" style="margin-left: 10px" @click="selectCustomerOfName">查询</el-button>
</el-card> </el-card>
<el-card> <el-card>
<el-button icon="el-icon-circle-plus-outline" size="small" style="margin-top: 3px;background-color: orange" @click="addMarketingManager();flag = 1" >添加营销经理</el-button> <el-button icon="el-icon-circle-plus-outline" type="primary" size="small" style="margin-top: 3px;" @click="addMarketingManager();flag = 1" >添加营销经理</el-button>
<el-button icon="el-icon-circle-plus-outline" size="small" style="margin-top: 3px;background-color: #f2dede" @click = "addCustomer();flag1 = 1">新增客户</el-button> <el-button icon="el-icon-circle-plus-outline" type="primary" plain size="small" style="margin-top: 3px" @click = "addCustomer();flag1 = 1">新增客户</el-button>
<el-table v-loading="loading3" :data="tableData3" highlight-current-row height="192" size="mini" stripe style="width: 100%;margin-top: 3px;margin-bottom: 0px" border> <el-table v-loading="loading3" :data="tableData3" highlight-current-row height="192" size="mini" stripe style="width: 100%;margin-top: 3px;margin-bottom: 0px" border>
<!--<el-table-column label="责权省份" align="center" min-width="80">--> <!--<el-table-column label="责权省份" align="center" min-width="80">-->
<!--<template slot-scope="scope">--> <!--<template slot-scope="scope">-->

View File

@@ -15,41 +15,8 @@
</el-card> </el-card>
<el-card> <el-card>
<el-table <el-col :span="15">
v-loading="listLoading" <el-table v-loading="listLoading" :data="tableData1" highlight-current-row style="margin-top: 3px" height="580" border size="mini" @row-click="selectMachine">
:data="tableData1"
:row-key="getRowKeys"
:expand-row-keys="expands"
highlight-current-row
style="width: 1280px; margin-top: 3px"
height="700"
border
size="mini"
@row-click="fetchTableData"
@expand-change="selectMachine">
<el-table-column type="expand" label="详情">
<template slot-scope="scope">
<el-table :data="tableData2" class="subTableHeader" border stripe style="width: 400px; text-align: center" size="mini">
<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>
</template>
</el-table-column>
<el-table-column align="center" label="合同编号" prop="合同编号" width="130">
<template slot-scope="scope">
<template>
<el-tag slot="reference" type="mini">{{ scope.row.合同编号 }}</el-tag>
</template>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" prop="项目名称" width="150" show-overflow-tooltip> <el-table-column align="center" label="项目名称" prop="项目名称" width="150" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.项目名称 }} {{ scope.row.项目名称 }}
@@ -60,31 +27,21 @@
{{ scope.row.客户名称 }} {{ scope.row.客户名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="合同总额" width="110">
<template slot-scope="scope">
{{ scope.row.合同总金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="付款方式" width="80"> <el-table-column align="center" label="付款方式" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.付款方式 }} {{ scope.row.付款方式 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="合同总额(万元)" width="110">
<template slot-scope="scope">
{{ scope.row.合同总金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="已付金额" width="80"> <el-table-column align="center" label="已付金额" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ Number(scope.row.已支付).toFixed(2) }} {{ Number(scope.row.已支付).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="销售经理" prop="营销经理" width="100">
<template slot-scope="scope">
{{ scope.row.营销经理 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同信息备注" width="120">
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同签订日期" width="110"> <el-table-column align="center" label="合同签订日期" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.合同签订日期&&scope.row.合同签订日期!=='1900/1/1' ? scope.row.合同签订日期 : '-' }} {{ scope.row.合同签订日期&&scope.row.合同签订日期!=='1900/1/1' ? scope.row.合同签订日期 : '-' }}
@@ -95,6 +52,23 @@
{{ scope.row.发货节点&&scope.row.发货节点!=='1900/1/1' ? scope.row.发货节点 : '-' }} {{ scope.row.发货节点&&scope.row.发货节点!=='1900/1/1' ? scope.row.发货节点 : '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="销售经理" prop="营销经理" width="100">
<template slot-scope="scope">
{{ scope.row.营销经理 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同编号" prop="合同编号" width="130">
<template slot-scope="scope">
<template>
<el-tag slot="reference" type="mini">{{ scope.row.合同编号 }}</el-tag>
</template>
</template>
</el-table-column>
<el-table-column align="center" label="合同信息备注" width="120">
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
</el-table-column>
</el-table> </el-table>
<div class="block"> <div class="block">
<el-pagination <el-pagination
@@ -106,6 +80,26 @@
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange"/> @current-change="handleCurrentChange"/>
</div> </div>
</el-col>
<el-col :span="9">
<el-table :data="tableData2" class="subTableHeader" border stripe style="text-align: center" size="mini">
<el-table-column label="设备型号" align="center" width="230" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="设备名称" align="center" min-width="150" show-overflow-tooltip>
<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>
</el-col>
</el-card> </el-card>
<!--营销经理选择--> <!--营销经理选择-->
@@ -729,6 +723,7 @@ export default {
} }
} }
selectMachine(row.项目流水号).then(response => { selectMachine(row.项目流水号).then(response => {
console.log(response.data)
this.tableData2 = response.data this.tableData2 = response.data
}) })
this.projectNum = row.项目流水号 this.projectNum = row.项目流水号

View File

@@ -68,7 +68,7 @@
{{ scope.row.项目名称 }} {{ scope.row.项目名称 }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.客户名称 }} {{ scope.row.客户名称 }}
</template> </template>
@@ -88,49 +88,7 @@
{{ scope.row.姓名 }} {{ scope.row.姓名 }}
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column align="center" label="已完成进度" width="90">--> <el-table-column label="操作" align="center" width="60" fixed="right">
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.执行进度名 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" label="已到账金额(万元)" width="130">-->
<!-- <template slot-scope="scope">-->
<!-- {{ Number(scope.row.已支付).toFixed(2) }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" label="未到账金额(万元)" width="130">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag size="mini" style="width: 100px" type="warning">{{ Number(scope.row.未支付金额).toFixed(2) }}</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" label="付款进度" width="150">-->
<!-- <template slot-scope="scope">-->
<!-- <div style="width: 130px">-->
<!-- <el-progress :text-inside="true" :stroke-width="18" :percentage="parseFloat(scope.row.付款百分比)" size="mini" status="success" />-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" label="联系人" width="60">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.联系人 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" label="联系电话" width="100" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.电话 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" label="银行账号" width="80" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.银行账号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column align="center" label="税号" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.税号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" align="center" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="编辑" placement="top"> <el-tooltip :open-delay="1000" effect="dark" content="编辑" placement="top">
<div style="display: inline-block"> <div style="display: inline-block">
@@ -142,6 +100,16 @@
@click.stop="EditTableData(scope.row)"/> @click.stop="EditTableData(scope.row)"/>
</div> </div>
</el-tooltip> </el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="新增发票" placement="top">
<div style="display: inline-block">
<el-button
:disabled="scope.row.是否禁用编辑"
type="text"
size="mini"
icon="el-icon-circle-plus-outline"
@click.stop="EditTableData(scope.row)"/>
</div>
</el-tooltip>
<!--<el-tooltip :open-delay="1000" effect="dark" content="删除" placement="top">--> <!--<el-tooltip :open-delay="1000" effect="dark" content="删除" placement="top">-->
<!--<div style="display: inline-block">--> <!--<div style="display: inline-block">-->
<!--<el-button--> <!--<el-button-->
@@ -239,7 +207,7 @@
{{ scope.row.已收金额 }} {{ scope.row.已收金额 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="收款阶段" width="169px"> <el-table-column align="center" label="收款阶段" min-width="169px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.执行进度id" filterable placeholder="请选择收款阶段" style="width: 130px" size="mini" @change="changeTime(scope.row)"> <el-select v-model="scope.row.执行进度id" filterable placeholder="请选择收款阶段" style="width: 130px" size="mini" @change="changeTime(scope.row)">
<el-option <el-option
@@ -948,7 +916,6 @@ export default {
this.customerName = '' this.customerName = ''
this.customerNames = [] this.customerNames = []
getcustomername().then(response => { getcustomername().then(response => {
console.log(response, 121212)
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.customerNames.push({ this.customerNames.push({
value: response.data[i].客户名称, value: response.data[i].客户名称,
@@ -983,7 +950,6 @@ export default {
this.id3 = '' this.id3 = ''
this.listLoading2 = false this.listLoading2 = false
const data = response.data.rows const data = response.data.rows
console.log(data, 111)
for (let i = 0; i < data.length; i++) { 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
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
@@ -1447,12 +1413,10 @@ export default {
// this.editTable(editTableData, [this.zijinID, this.form2.TotalContractAmount], 'form2', function() { this.getTableData(); this.dialogFormVisible4 = false }) // this.editTable(editTableData, [this.zijinID, this.form2.TotalContractAmount], 'form2', function() { this.getTableData(); this.dialogFormVisible4 = false })
}, },
TransferPlan(row) { TransferPlan(row) {
console.log(row)
this.id = row.批次资金id this.id = row.批次资金id
this.max1 = parseFloat(row.未收金额) this.max1 = parseFloat(row.未收金额)
this.form4.转移金额 = parseFloat(row.未收金额) this.form4.转移金额 = parseFloat(row.未收金额)
this.form4.计划阶段 = parseInt(row.付款批次) + 1 this.form4.计划阶段 = parseInt(row.付款批次) + 1
console.log(this.form4.转移金额, this.form4.计划阶段)
this.dialogFormVisible5 = true this.dialogFormVisible5 = true
this.Planning = [] this.Planning = []
this.addForm('form4') this.addForm('form4')

View File

@@ -992,6 +992,7 @@ export default {
this.form.付款方式 = parseInt(row.付款方式代码) this.form.付款方式 = parseInt(row.付款方式代码)
this.biddingNumber = row.招标保证金流水号 this.biddingNumber = row.招标保证金流水号
this.form.bidding = row.招标企业 this.form.bidding = row.招标企业
this.form.contractAmount = row.合同总金额
this.disabled = true this.disabled = true
this.temp = 2 this.temp = 2
this.isTrue = false this.isTrue = false

View File

@@ -0,0 +1,293 @@
<template>
<div class="app-container">
<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-col :span="12">
<el-card v-loading="loading4" style="height: 450px">
<span>在执行项目金额及回款</span>
<el-button size="small" type="success" icon="el-icon-search" @click="search4()">查询</el-button>
<div id="myChart4" :style="{width: '100%', height: '400px', margin: 'auto'}"/>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import { search1, search2, search3 } from '@/api/MarketingCenter/ProjectProgress'
import echarts from 'echarts'
export default {
data() {
return {
loading1: false,
loading2: false,
loading3: false,
loading4: false
}
},
methods: {
// 项目完成进度
search1() {
this.loading1 = true
var myChart1 = echarts.init(document.getElementById('myChart1'))
myChart1.clear()
search1().then(response => {
this.loading1 = false
this.drawLine1(response.data)
})
},
drawLine1(data) {
var dataX = []
var lineData = []
for (let i = 0; i < data.length; i++) {
dataX.push(data[i].项目名称)
lineData.push((Math.random() * 100).toFixed(2))
}
var myChart1 = echarts.init(document.getElementById('myChart1'))
myChart1.clear()
myChart1.setOption({
title: {
left: 'center',
text: '直方图'
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
tooltip: {
trigger: 'axis'
},
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,
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 = []
for (let i = 0; i < data.length; i++) {
dataX.push({
value: parseInt(data[i].客户数量),
name: data[i].省份
})
lineData.push(data[i].省份)
}
var myChart3 = echarts.init(document.getElementById('myChart3'))
myChart3.clear()
myChart3.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)'
}
}
}
]
})
},
search4() {
this.loading1 = true
var myChart1 = echarts.init(document.getElementById('myChart1'))
myChart1.clear()
search1().then(response => {
this.loading1 = false
this.drawLine1(response.data)
})
},
drawLine4(data) {
var dataX = []
var lineData = []
for (let i = 0; i < data.length; i++) {
dataX.push(data[i].项目名称)
lineData.push((Math.random() * 100).toFixed(2))
}
var myChart1 = echarts.init(document.getElementById('myChart1'))
myChart1.clear()
myChart1.setOption({
title: {
left: 'center',
text: '直方图'
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
tooltip: {
trigger: 'axis'
},
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,
position: 'top'
}
}
}
]
})
}
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,231 @@
<template>
<div class="app-container">
<el-card style="width: 65%">
<div style="margin-top: 7px; margin-bottom: 7px">
<span>外协厂家</span>
<el-input v-model="supplierNameValue" size="small" placeholder="外协厂家" style="width: 160px" clearable/>
<span>外协状态</span>
<el-select v-model="MaterialsValue" placeholder="外协状态" filterable size="small" style="width: 100px" clearable>
<el-option
v-for="item in Materials"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button icon="el-icon-search" type="success" size="small" @click="pageCurrent = 1;pageSize = 50;getTableData()">查询</el-button>
</div>
</el-card>
<el-card style="width: 65%">
<el-table
v-loading="loading"
:data="tableData"
highlight-current-row
border
stripe
size="mini"
style="width: 100%"
height="760">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column
label="外协状态"
align="center"
width="70px">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.到货状态)!==1" type="warning" size="mini">未到</el-tag>
<el-tag v-if="Number(scope.row.到货状态)===1" type="success" size="mini">已到</el-tag>
</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="160px">
<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="70">
<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="160px">
<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>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 50, 100]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChanges"
@current-change="handleCurrentChanges"/>
</div>
</el-card>
</div>
</template>
<script>
import { searchTable, getprocedure } from '@/api/Outsourcing/OutsourcingPartsQuery'
export default {
name: 'Index',
data() {
return {
supplierNameValue: '',
loading: false,
total: 0,
MaterialsValue: '',
Materials: [{
value: 0,
label: '未到'
}, {
value: 1,
label: '已到'
}],
tableData: [],
procedure: [],
pageCurrent: 1,
pageSize: 50
}
},
created() {
this.getTableData()
},
methods: {
getTableData() {
this.tableData = []
this.loading = true
let check, check1
this.supplierNameValue ? check = 1 : check = 0
if (this.MaterialsValue !== '' && this.MaterialsValue !== null) {
check1 = 1
} else {
check1 = 0
}
searchTable(check, this.supplierNameValue, check1, this.MaterialsValue, this.pageSize, this.pageCurrent).then(response => {
for (let i = 0; i < response.data.rows.length; i++) {
this.tableData.push({
到货状态: response.data.rows[i].到货状态,
项目名称: response.data.rows[i].项目名称,
零件图号: response.data.rows[i].零件图号,
零件名称: response.data.rows[i].零件名称,
批次数量: response.data.rows[i].批次数量,
外协厂家名称: response.data.rows[i].外协厂家名称,
表单号: response.data.rows[i].表单号,
工艺计划流水号: response.data.rows[i].工艺计划流水号,
单件是否外协: response.data.rows[i].单件是否外协,
外协工序: ''
})
}
this.getProcedure(this.tableData)
this.total = response.data.total
this.loading = false
})
},
getProcedure(row) {
for (let i = 0; i < row.length; i++) {
getprocedure(row[i].工艺计划流水号, row[i].单件是否外协).then(response => {
this.procedure[i] = ''
for (let j = 0; j < response.data.length; j++) {
this.procedure[i] = this.procedure[i] + ' ' + response.data[j].工艺名称简称
}
this.tableData[i].外协工序 = this.procedure[i]
})
}
},
handleSizeChanges(val) {
this.pageCurrent = 1
this.pageSize = val
this.getTableData()
},
handleCurrentChanges(val) {
this.pageCurrent = val
this.getTableData()
}
}
}
</script>
<style scoped>
span{
margin: 0px;
}
.wrapper{
width: 225px;
height: 50px;
overflow: hidden;
border: 1px solid #b8c7d9;
float: left;
margin: 0px;
}
.content{
position: relative;
padding: 8px 8px 0 8px;
}
.action{
position: absolute;
top: 4px;
right: 8px;
}
.delete{
padding: 0 5px;
border-radius: 3px;
color: #0f84b0;
font-size: 12px;
}
.delete:hover{
background: -webkit-linear-gradient(top,#0ba9e3,#0099d3);
color: #fff;
}
a{
text-decoration: none;
}
.icon{
width: 30px;
height: 30px;
display: inline-block;
margin-right: 7px;
margin-top: 2px;
font-size: 26px;
}
.info{
position: absolute;
left: 44px;
line-height: 30px;
display: inline-block;
color: #999;
}
.el-card {
padding: 0px !important;
margin: 0px !important;
}
</style>

View File

@@ -16,22 +16,22 @@
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<el-divider content-position="right"/> <!--<el-divider content-position="right"/>-->
<el-divider content-position="right"> <!--<el-divider content-position="right">-->
<el-button type="text" @click="searchUnBuyPartNumber">刷新</el-button> | 待采购零件数 <!--<el-button type="text" @click="searchUnBuyPartNumber">刷新</el-button> | 待采购零件数-->
</el-divider> <!--</el-divider>-->
<el-row> <!--<el-row>-->
<el-col v-for="(machine,index) in machines2" :key="index" style="width: 200px"> <!--<el-col v-for="(machine,index) in machines2" :key="index" style="width: 200px">-->
<el-card shadow="hover" class="sudoku_item" style="height:80px;width: 90%" @click.native="clickCard2(machine.项目流水号, machine.机床流水号)"> <!--<el-card shadow="hover" class="sudoku_item" style="height:80px;width: 90%" @click.native="clickCard2(machine.项目流水号, machine.机床流水号)">-->
<el-badge :value="machine.未采购零件数"> <!--<el-badge :value="machine.未采购零件数">-->
<div style="width: 100px;height:50px;margin:0" class="sudoku_item"> <!--<div style="width: 100px;height:50px;margin:0" class="sudoku_item">-->
{{ machine.机床图号 }} <!--{{ machine.机床图号 }}-->
</div> <!--</div>-->
</el-badge> <!--</el-badge>-->
</el-card> <!--</el-card>-->
</el-col> <!--</el-col>-->
</el-row> <!--</el-row>-->
<el-divider content-position="right"/> <!--<el-divider content-position="right"/>-->
</div> </div>
</el-card> </el-card>
<el-row id="PurchasingCenter/CreateInquirySheet"> <el-row id="PurchasingCenter/CreateInquirySheet">
@@ -46,7 +46,7 @@
<!--:label="item.label"--> <!--:label="item.label"-->
<!--:value="item.value"/>--> <!--:value="item.value"/>-->
<!--</el-select>--> <!--</el-select>-->
<el-input v-model="materialName" placeholder="名称规格" size="small" style="width:120px" clearable @keyup.enter.native="materialStatusValue=[0];pageCurrent11=1;pageSize11=20;total11=0;searchTable11()"/> <el-input v-model="materialName" placeholder="名称规格" size="small" style="width:120px" clearable @keyup.enter.native="searchTable11()"/>
<el-select v-model="machineValue" placeholder="机床" size="small" clearable filterable> <el-select v-model="machineValue" placeholder="机床" size="small" clearable filterable>
<el-option <el-option
v-for="item in machine" v-for="item in machine"
@@ -63,9 +63,11 @@
<!--</el-select>--> <!--</el-select>-->
<!--<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" style="width: 100px" size="small"/>--> <!--<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" style="width: 100px" size="small"/>-->
<!--<el-input v-model="materialSpec" placeholder="物料规格" size="small" style="width:120px" clearable/>--> <!--<el-input v-model="materialSpec" placeholder="物料规格" size="small" style="width:120px" clearable/>-->
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="materialStatusValue=[0];pageCurrent11=1;pageSize11=100;total11=0;searchTable11()">查询</el-button> <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable11()">查询</el-button>
<el-button type="warning" size="small" icon="el-icon-download" style="margin-left: 10px" @click="exportUninquirySheet">导出未询价单</el-button> <el-button type="warning" size="small" icon="el-icon-download" style="margin-left: 10px" @click="exportUninquirySheet">导出未询价单</el-button>
<el-switch v-model="switchValue" active-color="#13ce66" inactive-color="#ff4949" style="margin-left: 50px"/> <el-tooltip :open-delay="1000" effect="dark" content="开启物料变更" placement="top">
<el-switch v-model="switchValue" active-color="#13ce66" inactive-color="#ff4949" style="margin-left: 30px"/>
</el-tooltip>
<el-date-picker <el-date-picker
v-model="startTime" v-model="startTime"
size="small" size="small"
@@ -78,14 +80,19 @@
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
@change="timeChange1()"/> @change="timeChange1()"/>
<el-button type="success" size="small" style="float: right" @click="visible2 = false;tiaozheng1()">调整采购任务</el-button> <el-popover v-model="visible1" placement="top" width="140">
<el-select v-model="PersonValue" style="width:100px;float: right" placeholder="人员" size="small" filterable clearable> <div style="text-align: right; margin: 0">
<el-select v-model="PersonValue" style="width:100px" placeholder="人员" size="small" filterable clearable>
<el-option <el-option
v-for="item in Person" v-for="item in Person"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<el-button type="primary" size="mini" @click="visible1 = false;tiaozheng1()">确定</el-button>
</div>
<el-button slot="reference" type="success" size="small" plain style="float: right;margin-right: 20px">调整采购任务</el-button>
</el-popover>
<!--<el-popover v-model="visible" title="调整采购任务" placement="top" width="180">--> <!--<el-popover v-model="visible" title="调整采购任务" placement="top" width="180">-->
<!--<div style="text-align: right; margin: 0">--> <!--<div style="text-align: right; margin: 0">-->
<!--<el-select v-model="PersonValue" style="width:150px" placeholder="人员" size="small" filterable clearable>--> <!--<el-select v-model="PersonValue" style="width:150px" placeholder="人员" size="small" filterable clearable>-->
@@ -109,31 +116,42 @@
style="width: 100%;max-height: 500px;" style="width: 100%;max-height: 500px;"
height="500px" height="500px"
size="mini" size="mini"
@selection-change="handleSelectionChange1"> @selection-change="handleSelectionChange1"
@select="handleSelection">
<el-table-column :selectable="selectable" align="center" width="50" type="selection"/> <el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
<el-table-column v-if="switchValue" label="操作" align="center" width="100" fixed="left"> <el-table-column v-if="switchValue" label="操作" align="center" width="100" fixed="left">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1" type="primary" size="mini" @click="materialChange(scope.row)">物料变更</el-button> <el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1" type="primary" size="mini" @click="materialChange(scope.row)">物料变更</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="center" width="70"> <!--<el-table-column label="状态" align="center" width="70">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
<span v-if="unInquiry(scope.row)" style="color: orange">未询价</span> <!--<span v-if="unInquiry(scope.row)" style="color: orange">未询价</span>-->
<span v-if="inquiry(scope.row)" style="color: blue">已询价</span> <!--<span v-if="inquiry(scope.row)" style="color: blue">已询价</span>-->
<span v-if="approval(scope.row)" style="color: green">审批中</span> <!--<span v-if="approval(scope.row)" style="color: green">审批中</span>-->
<span v-if="purchased(scope.row)">已采购</span> <!--<span v-if="purchased(scope.row)">已采购</span>-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商" show-overflow-tooltip> <el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供货商 }} {{ scope.row.供货商 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" width="130" prop="机床图号" show-overflow-tooltip> <el-table-column label="机床图号" align="center" width="130" prop="机床图号" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.机床图号 }} {{ scope.row.机床图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="组号" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="名称" align="center" width="180" prop="名称"> <el-table-column label="名称" align="center" width="180" prop="名称">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料名称 }} {{ scope.row.物料名称 }}
@@ -149,11 +167,6 @@
{{ scope.row.物料型号 }} {{ scope.row.物料型号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="组号" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="分配数" align="center" min-width="60"> <el-table-column label="分配数" align="center" min-width="60">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件数量 }} {{ scope.row.零件数量 }}
@@ -161,12 +174,18 @@
</el-table-column> </el-table-column>
<el-table-column label="待询价数" align="center" min-width="80"> <el-table-column label="待询价数" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.待询价数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }} {{ Number(scope.row.零件类型) === 1 ? scope.row.待询价数量 = Number(scope.row.零件数量) - Number(scope.row.使用库存数) : scope.row.待询价数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库存" align="center" min-width="60"> <el-table-column label="库存(BZ)" align="center" min-width="70" prop="库存">
<template slot-scope="scope"> <template slot-scope="scope">
{{ Number(scope.row.货位存量) }} {{ Number(scope.row.零件类型) === 1 ? scope.row.库存 = Number(scope.row.货位存量 ? scope.row.货位存量 : 0) - Number(scope.row.占用数量) : '-' }}
</template>
</el-table-column>
<el-table-column label="使用库存数量" align="center" min-width="105" prop="使用库存数">
<template slot-scope="scope">
<span v-if="Number(scope.row.零件类型) !== 1">-</span>
<el-input-number v-if="Number(scope.row.零件类型) === 1" v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > (Number(scope.row.货位存量) - Number(scope.row.占用数量)) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量) + Number(scope.row.使用库存数)) : Number(scope.row.零件数量)" :disabled="(Number(scope.row.货位存量) - Number(scope.row.占用数量)) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 90px" @change="changeNumber(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="已用滞货" align="center" min-width="70"> <el-table-column label="已用滞货" align="center" min-width="70">
@@ -192,11 +211,6 @@
{{ Number(scope.row.滞货数量) }} {{ Number(scope.row.滞货数量) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="分配时间" align="center" min-width="90"> <el-table-column label="分配时间" align="center" min-width="90">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.任务分配时间.split(' ')[0] }} {{ scope.row.任务分配时间.split(' ')[0] }}
@@ -207,12 +221,12 @@
{{ scope.row.组件设计者 || scope.row.机床设计者 || '—' }} {{ scope.row.组件设计者 || scope.row.机床设计者 || '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="询价单编号" align="center" min-width="100"> <!--<el-table-column label="询价单编号" align="center" min-width="100">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
<b v-if="inquiry(scope.row)">{{ scope.row.询价单编号 }}</b> <!--<b v-if="inquiry(scope.row)">{{ scope.row.询价单编号 }}</b>-->
<b v-else>—</b> <!--<b v-else>—</b>-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<!--<el-table-column :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型">--> <!--<el-table-column :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型">-->
<!--<template slot-scope="scope">--> <!--<template slot-scope="scope">-->
<!--{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}--> <!--{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}-->
@@ -225,10 +239,17 @@
:page-sizes="[10, 50, 100, 150]" :page-sizes="[10, 50, 100, 150]"
:page-size="pageSize11" :page-size="pageSize11"
:total="total11" :total="total11"
style="display:inline-block;width:50%" style="display:inline-block;width:50px"
layout="total, sizes, prev, pager, next, jumper" layout="total"
@size-change="handleSizeChange11" @size-change="handleSizeChange11"
@current-change="handleCurrentChange11"/> @current-change="handleCurrentChange11"/>
<el-tooltip :open-delay="1000" effect="dark" content="为选择的询价单添加物料" placement="top">
<el-button
type="warning"
size="small"
style="margin: 0px 20px"
@click="addInquirySheet">选入物料</el-button>
</el-tooltip>
</div> </div>
</el-row> </el-row>
</el-tab-pane> </el-tab-pane>
@@ -241,7 +262,7 @@
<!--:label="item.label"--> <!--:label="item.label"-->
<!--:value="item.value"/>--> <!--:value="item.value"/>-->
<!--</el-select>--> <!--</el-select>-->
<el-input v-model="partNum" placeholder="图号名称规格" size="small" clearable @keyup.enter.native="materialStatusValue=[0];pageCurrent11=1;pageSize11=20;total11=0;searchTable12()"/> <el-input v-model="partNum" placeholder="图号名称规格" size="small" clearable @keyup.enter.native="searchTable12()"/>
<el-select v-model="machineValue" placeholder="机床" size="small" clearable filterable> <el-select v-model="machineValue" placeholder="机床" size="small" clearable filterable>
<el-option <el-option
v-for="item in machine" v-for="item in machine"
@@ -257,7 +278,7 @@
<!--:value="item.value"/>--> <!--:value="item.value"/>-->
<!--</el-select>--> <!--</el-select>-->
<!--<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" style="width: 100px" size="small"/>--> <!--<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" style="width: 100px" size="small"/>-->
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="materialStatusValue=[0];pageCurrent12=1;pageSize12=100;total12=0;searchTable12()">查询</el-button> <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable12()">查询</el-button>
<el-button type="warning" size="small" icon="el-icon-download" style="margin-left: 10px" @click="exportUninquirySheet">导出未询价单</el-button> <el-button type="warning" size="small" icon="el-icon-download" style="margin-left: 10px" @click="exportUninquirySheet">导出未询价单</el-button>
<el-date-picker <el-date-picker
v-model="endTime" v-model="endTime"
@@ -299,31 +320,37 @@
<el-table <el-table
v-loading="" v-loading=""
:data="tableData12" :data="tableData12"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName2"
border border
style="width: 100%;max-height: 500px;" style="width: 100%;max-height: 500px;"
height="500px" height="500px"
size="mini" size="mini"
@selection-change="handleSelectionChange2"> @selection-change="handleSelectionChange2"
@select="handleSelection1">
<el-table-column :selectable="selectable" align="center" width="50" type="selection"/> <el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
<!--<el-table-column label="操作" align="center" width="100" fixed="left">--> <!--<el-table-column label="操作" align="center" width="100" fixed="left">-->
<!--<template slot-scope="scope">--> <!--<template slot-scope="scope">-->
<!--<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1" type="primary" size="mini" @click="partChange(scope.row)">零件变更</el-button>--> <!--<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1" type="primary" size="mini" @click="partChange(scope.row)">零件变更</el-button>-->
<!--</template>--> <!--</template>-->
<!--</el-table-column>--> <!--</el-table-column>-->
<el-table-column label="采购状态" align="center" width="80"> <!--<el-table-column label="采购状态" align="center" width="80">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
<el-tag v-if="unInquiry(scope.row)" type="warning" size="small">未询价</el-tag> <!--<el-tag v-if="unInquiry(scope.row)" type="warning" size="small">未询价</el-tag>-->
<el-tag v-if="inquiry(scope.row)" type="success" size="small">已询价</el-tag> <!--<el-tag v-if="inquiry(scope.row)" type="success" size="small">已询价</el-tag>-->
<el-tag v-if="approval(scope.row)" type="primary" size="small">审批中</el-tag> <!--<el-tag v-if="approval(scope.row)" type="primary" size="small">审批中</el-tag>-->
<el-tag v-if="purchased(scope.row)" type="info" size="small">已采购</el-tag> <!--<el-tag v-if="purchased(scope.row)" type="info" size="small">已采购</el-tag>-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商"> <el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供货商 }} {{ scope.row.供货商 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="图号" align="center" min-width="130"> <el-table-column label="图号" align="center" min-width="130">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件图号 }} {{ scope.row.零件图号 }}
@@ -364,11 +391,6 @@
{{ scope.row.零件数量 }} {{ scope.row.零件数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="分配时间" align="center" min-width="100"> <el-table-column label="分配时间" align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.任务分配时间.split(' ')[0] }} {{ scope.row.任务分配时间.split(' ')[0] }}
@@ -379,12 +401,12 @@
{{ scope.row.组件设计者 || scope.row.机床设计者 || '—' }} {{ scope.row.组件设计者 || scope.row.机床设计者 || '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="询价单编号" align="center" min-width="100"> <!--<el-table-column label="询价单编号" align="center" min-width="100">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
<b v-if="inquiry(scope.row)">{{ scope.row.询价单编号 }}</b> <!--<b v-if="inquiry(scope.row)">{{ scope.row.询价单编号 }}</b>-->
<b v-else>—</b> <!--<b v-else>—</b>-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
</el-table> </el-table>
</el-row> </el-row>
<div class="block"> <div class="block">
@@ -393,10 +415,17 @@
:page-sizes="[10, 50, 100, 150]" :page-sizes="[10, 50, 100, 150]"
:page-size="pageSize12" :page-size="pageSize12"
:total="total12" :total="total12"
style="display:inline-block;width:50%" style="display:inline-block;width:50px"
layout="total, sizes, prev, pager, next, jumper" layout="total"
@size-change="handleSizeChange12" @size-change="handleSizeChange12"
@current-change="handleCurrentChange12"/> @current-change="handleCurrentChange12"/>
<el-tooltip :open-delay="1000" effect="dark" content="为选择的询价单添加物料" placement="top">
<el-button
type="warning"
size="small"
style="margin: 0px 20px"
@click="addInquirySheet">选入物料</el-button>
</el-tooltip>
</div> </div>
</el-tab-pane> </el-tab-pane>
<!--<el-tab-pane v-show="false" label="标准件" name="标准件">--> <!--<el-tab-pane v-show="false" label="标准件" name="标准件">-->
@@ -585,39 +614,24 @@
<el-card> <el-card>
<el-card style="width: 1188px"> <el-card style="width: 1188px">
<el-row> <el-row>
<el-input v-model="inquirySheetNum" placeholder="询价单号" size="small" clearable/> <el-input v-model="inquirySheetNum" placeholder="询价单号或供应商" size="small" clearable @keyup.enter.native="pageCurrent2=1;pageSize2=10000;total2=0;searchTable2()"/>
<el-input v-model="supplierName" placeholder="供应商" size="small" style="margin: 0px 10px" clearable/>
<el-button <el-button
type="success" type="success"
size="small" size="mini"
icon="el-icon-search" icon="el-icon-search"
style="margin:0px 10px" style="margin:0px 10px"
@click="pageCurrent2=1;pageSize2=10000;total2=0;searchTable2()">查询</el-button> @click="pageCurrent2=1;pageSize2=10000;total2=0;searchTable2()">查询</el-button>
<el-tooltip :open-delay="1000" effect="dark" content="为选择的询价单添加物料" placement="top">
<el-button
type="warning"
size="small"
style="margin: 0px 20px"
@click="addInquirySheet">选入物料</el-button>
</el-tooltip>
<el-button <el-button
type="primary" type="primary"
size="small" icon="el-icon-circle-plus-outline"
style="float: right;margin:0px 10px" size="mini"
@click="createInquirySheet">创建询价单</el-button> style="margin-left: 10px"
</el-row> @click="createInquirySheet">创建</el-button>
<el-row style="margin-top: 5px;"> <el-button type="warning" size="mini" plain icon="el-icon-edit" style="margin-left: 10px" @click="editInquirySheet()">编辑</el-button>
<h3 style="margin: 0px 30px;display:inline-block; ">询价单</h3> <el-button type="danger" size="mini" plain icon="el-icon-delete" style="margin-left: 10px" @click="deleteInquirySheet()">删除</el-button>
<el-button type="warning" size="mini" plain icon="el-icon-edit" style="margin: 0px 20px" @click="editInquirySheet()">编辑</el-button>
<el-button type="danger" size="mini" plain icon="el-icon-delete" style="margin: 0px 60px 0px 20px" @click="deleteInquirySheet()">删除</el-button>
<!--<h3 style="margin: 0px 40px;display:inline-block;">询价单明细</h3>-->
<el-button :disabled="tableData3.length===0" type="primary" size="small" plain style="float: right" @click="printInquirySheet()">打印</el-button> <el-button :disabled="tableData3.length===0" type="primary" size="small" plain style="float: right" @click="printInquirySheet()">打印</el-button>
<el-button :disabled="tableData3.length===0" type="warning" size="small" style="margin-left:10px;float: right" @click="exportInquirySheet()">导出</el-button> <el-button :disabled="tableData3.length===0" type="warning" size="small" style="margin-left:10px;float: right" @click="exportInquirySheet()">导出</el-button>
<el-tooltip :open-delay="1000" effect="dark" content="保存该询价单" placement="top" style="float: right">
<el-button :disabled="tableData3.length===0" type="success" size="small" @click="saveOrder()">保存</el-button>
</el-tooltip>
</el-row> </el-row>
<!--<el-button :loading="baseInfoLoading" type="success" size="mini" style="float: right" plain @click="inquirySheetBaseInfoMaintain">信息维护</el-button>-->
</el-card> </el-card>
<el-row> <el-row>
<el-col style="width:310px"> <el-col style="width:310px">
@@ -722,7 +736,7 @@
</el-table-column> </el-table-column>
<el-table-column label="实询数" align="center" width="110"> <el-table-column label="实询数" align="center" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-direction="{x: 0, y: scope.$index}" v-model="scope.row.数量" size="mini" style="width: 75px"/> <el-input v-direction="{x: 0, y: scope.$index}" v-model="scope.row.数量" size="mini" style="width: 75px" @change="saveOrder(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单位" align="center" width="50"> <el-table-column label="单位" align="center" width="50">
@@ -732,7 +746,7 @@
</el-table-column> </el-table-column>
<el-table-column label="询价备注" align="center" width="110"> <el-table-column label="询价备注" align="center" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-direction="{x: 1, y: scope.$index}" v-model="scope.row.备注" size="mini" style="width: 75px"/> <el-input v-direction="{x: 1, y: scope.$index}" v-model="scope.row.备注" size="mini" style="width: 75px" @change="saveOrder(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="询价单编号" align="center" min-width="100">--> <!-- <el-table-column label="询价单编号" align="center" min-width="100">-->
@@ -1078,7 +1092,7 @@
<script> <script>
import { timeSearch, timeChange1, timeChange2, tiaozheng2, tiaozheng1, getPerson, getBillNum, searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet, import { timeSearch, timeChange1, timeChange2, tiaozheng2, tiaozheng1, getPerson, getBillNum, searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder, createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder,
submitUseInventory, initProject, searchMachine, searchGroup, searchBaseInfo, editBaseInfo, getExport1, getExport2, searchMerge } from '@/api/PurchasingCenter/CreateInquirySheet' submitUseInventory, initProject, searchMachine, searchGroup, searchBaseInfo, editBaseInfo, getExport1, getExport2, searchMerge, changeNum } from '@/api/PurchasingCenter/CreateInquirySheet'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { exportExcelMethod } from './exportExcel' import { exportExcelMethod } from './exportExcel'
import $ from 'jquery' import $ from 'jquery'
@@ -1173,11 +1187,11 @@ export default {
tableData11: [], // 外购件列表 tableData11: [], // 外购件列表
total11: 0, total11: 0,
pageCurrent11: 1, pageCurrent11: 1,
pageSize11: 100, pageSize11: 1000,
tableData12: [], // 基本件列表 tableData12: [], // 基本件列表
total12: 0, total12: 0,
pageCurrent12: 1, pageCurrent12: 1,
pageSize12: 100, pageSize12: 1000,
tableData13: [], // 外购件列表 tableData13: [], // 外购件列表
total13: 0, total13: 0,
pageCurrent13: 1, pageCurrent13: 1,
@@ -1190,6 +1204,7 @@ export default {
pageSize2: 10000, pageSize2: 10000,
tableData3: [], // 询价单明细 tableData3: [], // 询价单明细
dialogVisible1: false, dialogVisible1: false,
visible1: false,
inquirySheetNum: '', // 询价单号 inquirySheetNum: '', // 询价单号
inquirySheetFlowNum: '', // 询价单流水号 inquirySheetFlowNum: '', // 询价单流水号
form1: {}, form1: {},
@@ -1258,6 +1273,8 @@ export default {
cancelNum: 0, cancelNum: 0,
machines1: [], machines1: [],
machines2: [], machines2: [],
numbers: [],
numbers1: [],
row1: '' row1: ''
} }
}, },
@@ -1305,6 +1322,40 @@ export default {
this.searchTable11() this.searchTable11()
}) })
}, },
changeNumber(row) {
changeNum(row.物料流水号, row.使用库存数, row.机床流水号, row.组件零件流水号, row.零件数量).then(response => {
if (response.data[0].result === '1') {
this.$message.success('使用成功')
this.searchTable11()
} else {
this.$message.success('使用失败')
}
})
},
handleSelection(val, row) {
this.tableData11.forEach((item, i) => {
if (item.组件零件流水号 === row.组件零件流水号) {
console.log(this.numbers.indexOf(i), 234)
if (this.numbers.indexOf(i) === -1) {
this.numbers.push(i)
} else {
this.numbers.splice(this.numbers.indexOf(i), 1)
}
}
})
},
handleSelection1(val, row) {
this.tableData12.forEach((item, i) => {
if (item.组件零件基本件流水号 === row.组件零件基本件流水号) {
console.log(this.numbers1.indexOf(i), 234)
if (this.numbers1.indexOf(i) === -1) {
this.numbers1.push(i)
} else {
this.numbers1.splice(this.numbers1.indexOf(i), 1)
}
}
})
},
timeChange1() { timeChange1() {
if (this.startTime) { if (this.startTime) {
timeChange1(this.startTime[0], this.startTime[1]) timeChange1(this.startTime[0], this.startTime[1])
@@ -1443,7 +1494,7 @@ export default {
where 采购管理_采购合同_采购部.是否未通过 = 0 where 采购管理_采购合同_采购部.是否未通过 = 0
) as 通过的合同 on 通过的合同.组件零件流水号 = MRP_计划订单_组件零件清单_标准件和外购件_视图.组件零件流水号 ) as 通过的合同 on 通过的合同.组件零件流水号 = MRP_计划订单_组件零件清单_标准件和外购件_视图.组件零件流水号
left join 采购管理_供应商 on 通过的合同.供应商流水号 = 采购管理_供应商.供应商流水号 left join 采购管理_供应商 on 通过的合同.供应商流水号 = 采购管理_供应商.供应商流水号
where 询价状态编号 = 1 and 采购状态编号 = 1 and 零件类型 = 2 where 询价状态编号 = 1 and 采购状态编号 = 1
and 人员编号 = ${this.id} and 人员编号 = ${this.id}
group by 项目流水号,机床流水号,机床图号,人员编号 group by 项目流水号,机床流水号,机床图号,人员编号
union all union all
@@ -1682,20 +1733,9 @@ export default {
// this.$message.info('已取消操作') // this.$message.info('已取消操作')
// }) // })
// }, // },
saveOrder() { // 保存询价单 saveOrder(row) { // 保存询价单
const orderNumGroup = [] console.log(row, 1111)
const numGroup = [] saveOrder(row.询价单明细流水号, row.数量, row.备注).then(response => {})
const remarkGroup = []
for (let i = 0; i < this.tableData3.length; i++) {
orderNumGroup.push(this.tableData3[i].询价单明细流水号)
numGroup.push(this.tableData3[i].数量)
remarkGroup.push(this.tableData3[i].备注)
}
saveOrder(orderNumGroup, numGroup, remarkGroup).then(response => {
if (response.data[0].result === '1') {
this.$message.success('保存成功')
} else { this.$message.error('保存失败') }
})
}, },
selectable(row, index) { // 控制某行是否可选 selectable(row, index) { // 控制某行是否可选
return (parseInt(row.询价状态编号) === 1 && parseInt(row.采购状态编号) < 3 && parseInt(row.是否确认) === 1) // 未询价&&未采购&&确认物料修改 return (parseInt(row.询价状态编号) === 1 && parseInt(row.采购状态编号) < 3 && parseInt(row.是否确认) === 1) // 未询价&&未采购&&确认物料修改
@@ -1715,7 +1755,7 @@ export default {
this.machineValue ? check5 = 1 : check5 = 0 this.machineValue ? check5 = 1 : check5 = 0
this.groupValue ? check6 = 1 : check6 = 0 this.groupValue ? check6 = 1 : check6 = 0
this.startTime ? check7 = 1 : (check7 = 0, this.startTime = '') this.startTime ? check7 = 1 : (check7 = 0, this.startTime = '')
searchMaterial(this.pageCurrent11, this.pageSize11, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue, check7, this.startTime[0], this.startTime[1]).then(response => { searchMaterial(this.pageCurrent11, this.pageSize11, 3, check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue, check7, this.startTime[0], this.startTime[1]).then(response => {
this.tableData11 = response.data.rows this.tableData11 = response.data.rows
this.total11 = response.data.total this.total11 = response.data.total
const remark = [] const remark = []
@@ -1754,7 +1794,7 @@ export default {
this.machineValue ? check5 = 1 : check5 = 0 this.machineValue ? check5 = 1 : check5 = 0
this.groupValue ? check6 = 1 : check6 = 0 this.groupValue ? check6 = 1 : check6 = 0
this.endTime ? check7 = 1 : (check7 = 0, this.endTime = '') this.endTime ? check7 = 1 : (check7 = 0, this.endTime = '')
searchPart(this.pageCurrent12, this.pageSize12, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.partNum, check2, this.partName, check3, this.partSpec, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue, check7, this.endTime[0], this.endTime[1]).then(response => { searchPart(this.pageCurrent12, this.pageSize12, 3, check1, this.partNum, check2, this.partName, check3, this.partSpec, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue, check7, this.endTime[0], this.endTime[1]).then(response => {
this.tableData12 = response.data.rows this.tableData12 = response.data.rows
this.total12 = response.data.total this.total12 = response.data.total
const remark = [] const remark = []
@@ -1789,7 +1829,7 @@ export default {
this.machineValue ? check5 = 1 : check5 = 0 this.machineValue ? check5 = 1 : check5 = 0
this.groupValue ? check6 = 1 : check6 = 0 this.groupValue ? check6 = 1 : check6 = 0
this.endTime ? check7 = 1 : (check7 = 0, this.endTime = '') this.endTime ? check7 = 1 : (check7 = 0, this.endTime = '')
searchPart(this.pageCurrent12, this.pageSize12, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.partNum, check2, this.partName, check3, this.partSpec, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue, check7, this.endTime[0], this.endTime[1]).then(response => { searchPart(this.pageCurrent12, this.pageSize12, 3, check1, this.partNum, check2, this.partName, check3, this.partSpec, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue, check7, this.endTime[0], this.endTime[1]).then(response => {
this.tableData12 = response.data.rows this.tableData12 = response.data.rows
this.total12 = response.data.total this.total12 = response.data.total
const remark = [] const remark = []
@@ -1816,9 +1856,8 @@ export default {
this.searchTable13() this.searchTable13()
}, },
searchTable2() { // 查询询价单列表 searchTable2() { // 查询询价单列表
this.supplierName ? this.check3 = 1 : this.check3 = 0
this.inquirySheetNum ? this.check4 = 1 : this.check4 = 0 this.inquirySheetNum ? this.check4 = 1 : this.check4 = 0
searchCreateInquirySheet(this.pageCurrent2, this.pageSize2, this.check3, this.supplierName, this.check4, this.inquirySheetNum, this.id).then(response => { searchCreateInquirySheet(this.pageCurrent2, this.pageSize2, this.check4, this.inquirySheetNum, this.id).then(response => {
this.tableData2 = response.data.rows this.tableData2 = response.data.rows
this.total2 = response.data.total this.total2 = response.data.total
}) })
@@ -2292,10 +2331,22 @@ export default {
}) })
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (parseInt(row.是否确认) === 0) { let color = ''
return 'MistyRose' this.numbers.forEach((r, i) => {
if (rowIndex === r) {
color = 'MistyRose'
} }
return '' })
return color
},
tableRowClassName2({ row, rowIndex }) {
let color = ''
this.numbers1.forEach((r, i) => {
if (rowIndex === r) {
color = 'MistyRose'
}
})
return color
} }
} }
} }
@@ -2345,7 +2396,7 @@ export default {
background: Tomato!important; background: Tomato!important;
} }
.el-table .MistyRose { .el-table .MistyRose {
background: MistyRose!important; background: #9BD7FC!important;
} }
.el-table .gray { .el-table .gray {
background: lightgray; background: lightgray;

View File

@@ -38,8 +38,12 @@
active-value="含税" active-value="含税"
inactive-value="未税"/> inactive-value="未税"/>
</el-tooltip> </el-tooltip>
<el-button v-if="quickChangePrice" size="mini" style="margin: 0px 0 0 10px" @click="quickChangePrice=!quickChangePrice">快速修改价格</el-button>
<el-button v-else size="mini" style="margin: 10px 0 0 10px" @click="quickChangePrice=!quickChangePrice">还原</el-button>
<el-button v-show="isShowN" type="text" style="margin: 10px 0 0 10px" @click="isShowN=false">折叠</el-button>
<el-button v-show="!isShowN" type="text" style="margin: 10px 0 0 10px" @click="isShowN=true">展开其他说明</el-button>
</el-row> </el-row>
<el-row style="margin-top: 10px"> <el-row v-show="isShowN" style="margin-top: 10px">
<!--<span>交货日期:</span>--> <!--<span>交货日期:</span>-->
<el-input v-model="deliveryDate" :disabled="!contractNumValue" size="small" placeholder="交货日期" type="textarea" rows="1" @blur="contractHeaderChange"/> <el-input v-model="deliveryDate" :disabled="!contractNumValue" size="small" placeholder="交货日期" type="textarea" rows="1" @blur="contractHeaderChange"/>
<!--<span>开票信息:</span>--> <!--<span>开票信息:</span>-->
@@ -50,8 +54,6 @@
<el-input v-model="payMethod" :disabled="!contractNumValue" size="small" placeholder="支付方式" type="textarea" rows="1" @blur="contractHeaderChange"/> <el-input v-model="payMethod" :disabled="!contractNumValue" size="small" placeholder="支付方式" type="textarea" rows="1" @blur="contractHeaderChange"/>
<!--<span>其他说明:</span>--> <!--<span>其他说明:</span>-->
<el-input v-model="otherInfo" :disabled="!contractNumValue" size="small" placeholder="其他说明" type="textarea" rows="1" @blur="contractHeaderChange"/> <el-input v-model="otherInfo" :disabled="!contractNumValue" size="small" placeholder="其他说明" type="textarea" rows="1" @blur="contractHeaderChange"/>
<el-button v-if="quickChangePrice" size="mini" style="margin: 0px 0 0 10px" @click="quickChangePrice=!quickChangePrice">快速修改价格</el-button>
<el-button v-else size="mini" style="margin: 10px 0 0 10px" @click="quickChangePrice=!quickChangePrice">还原</el-button>
</el-row> </el-row>
<el-table :data="tableData1" border style="margin: 10px 0;max-height: 480px;" height="480px" size="mini" show-summary tooltip-effect="dark"> <el-table :data="tableData1" border style="margin: 10px 0;max-height: 480px;" height="480px" size="mini" show-summary tooltip-effect="dark">
@@ -171,6 +173,7 @@ export default {
inject: ['reload'], inject: ['reload'],
data() { data() {
return { return {
isShowN: false,
supplierValue11: '', // 供应商查询条件 supplierValue11: '', // 供应商查询条件
supplier11: [], supplier11: [],
quickChangePrice: true, quickChangePrice: true,
@@ -255,7 +258,7 @@ export default {
this.contractNumValue = '' this.contractNumValue = ''
this.tableData1 = [] this.tableData1 = []
if (this.supplierValue11) { this.asdasd = 1 } else { this.asdasd = 0 } if (this.supplierValue11) { this.asdasd = 1 } else { this.asdasd = 0 }
searchInquirySheet(0, 0, 0, 0, 1, this.id, this.asdasd, this.supplierValue11).then(response => { // 初始化询价单号 searchInquirySheet(0, 0, 1, this.id, this.asdasd, this.supplierValue11).then(response => { // 初始化询价单号
this.contractNums = [] this.contractNums = []
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.contractNums.push({ this.contractNums.push({
@@ -394,7 +397,7 @@ export default {
this.account2 = res.data[0] ? res.data[0].帐号 : '' this.account2 = res.data[0] ? res.data[0].帐号 : ''
this.bank2 = res.data[0] ? res.data[0].开户行 : '' this.bank2 = res.data[0] ? res.data[0].开户行 : ''
}) })
searchInquirySheet(0, 0, 0, 0, 1, this.id, 0, 0).then(response => { // 初始化询价单号 searchInquirySheet(0, 0, 1, this.id, 0, 0).then(response => { // 初始化询价单号
this.contractNums = [] this.contractNums = []
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.contractNums.push({ this.contractNums.push({
@@ -430,7 +433,7 @@ export default {
supplierChange() { supplierChange() {
let check let check
this.supplierValue ? check = 1 : check = 0 this.supplierValue ? check = 1 : check = 0
searchInquirySheet(0, 0, 0, 0, 1, this.id, check, this.supplierValue).then(response => { // 初始化询价单号 searchInquirySheet(0, 0, 1, this.id, check, this.supplierValue).then(response => { // 初始化询价单号
this.contractNums = [] this.contractNums = []
this.contractNumValue = '' this.contractNumValue = ''
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {

View File

@@ -47,15 +47,9 @@
style="width: 100%;max-height: 500px;" style="width: 100%;max-height: 500px;"
height="500px" height="500px"
size="mini" size="mini"
@selection-change="handleSelectionChange1"> @selection-change="handleSelectionChange1"
@select="handleSelection">
<el-table-column :selectable="selectable" align="center" width="50" type="selection"/> <el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
<el-table-column label="物料状态" prop="询价状态编号" align="center" width="80">
<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.询价状态编号)!==1&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column label="名称" align="center" prop="物料名称" min-width="100" show-overflow-tooltip> <el-table-column label="名称" align="center" prop="物料名称" min-width="100" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料名称 }} {{ scope.row.物料名称 }}
@@ -109,7 +103,7 @@
<el-table-column label="使用库存数量" align="center" min-width="105" prop="使用库存数"> <el-table-column label="使用库存数量" align="center" min-width="105" prop="使用库存数">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="Number(scope.row.零件类型) !== 1">-</span> <span v-if="Number(scope.row.零件类型) !== 1">-</span>
<el-input-number v-if="Number(scope.row.零件类型) === 1" v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > Number(scope.row.货位存量) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量)) : Number(scope.row.零件数量)" :disabled="Number(scope.row.货位存量) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 90px" @change="changeNumber(scope.row)"/> <el-input-number v-if="Number(scope.row.零件类型) === 1" v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > (Number(scope.row.货位存量) - Number(scope.row.占用数量)) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量) + Number(scope.row.使用库存数)) : Number(scope.row.零件数量)" :disabled="(Number(scope.row.货位存量) - Number(scope.row.占用数量)) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 90px" @change="changeNumber(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="待采数量" align="center" min-width="70" prop="待采购数量"> <el-table-column label="待采数量" align="center" min-width="70" prop="待采购数量">
@@ -165,17 +159,19 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="仓库" name="仓库"> <el-tab-pane label="仓库" name="仓库">
<el-row> <el-row>
<el-input v-model="materialName" style="width: 150px;margin-left: 10px" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent11=1;pageSize11=20;total11=0;searchTable22()"/> <el-input v-model="materialName" style="width: 150px;margin-left: 10px" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent22=1;pageSize22=20;total22=0;searchTable22()"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable22()">查询</el-button> <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable22()">查询</el-button>
</el-row> </el-row>
<el-table <el-table
v-loading="" v-loading=""
:data="tableData22" :data="tableData22"
:row-class-name="tableRowClassName2"
border border
style="width: 100%;max-height: 500px;" style="width: 100%;max-height: 500px;"
height="500px" height="500px"
size="mini" size="mini"
@selection-change="handleSelectionChange1"> @selection-change="handleSelectionChange1"
@select="handleSelection1">
<el-table-column align="center" width="50" type="selection"/> <el-table-column align="center" width="50" type="selection"/>
<el-table-column label="名称" align="center" prop="物料名称" min-width="100" show-overflow-tooltip> <el-table-column label="名称" align="center" prop="物料名称" min-width="100" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
@@ -808,6 +804,8 @@ export default {
tableData4: [], // 合同模板 tableData4: [], // 合同模板
stipulateArrivalTime: '', // 规定到货时间 stipulateArrivalTime: '', // 规定到货时间
离线合同状态: '', 离线合同状态: '',
numbers: [],
numbers1: [],
paramRow: '', // 参数row paramRow: '', // 参数row
disable: true, // 其他的禁用 disable: true, // 其他的禁用
tabName: '标准件', tabName: '标准件',
@@ -830,6 +828,55 @@ export default {
this.initDirection() this.initDirection()
}, },
methods: { methods: {
handleSelection(val, row) {
console.log(row, 123)
this.tableData00.forEach((item, i) => {
if (item.组件零件流水号 === row.组件零件流水号 && row.组件零件流水号 !== '0') {
if (this.numbers.indexOf(i) === -1) {
this.numbers.push(i)
} else {
this.numbers.splice(this.numbers.indexOf(i), 1)
}
} else if (item.组件零件基本件流水号 === row.组件零件基本件流水号 && row.组件零件基本件流水号 !== '0') {
if (this.numbers.indexOf(i) === -1) {
this.numbers.push(i)
} else {
this.numbers.splice(this.numbers.indexOf(i), 1)
}
}
console.log(this.numbers, 123)
})
},
handleSelection1(val, row) {
this.tableData22.forEach((item, i) => {
if (item.物料流水号 === row.物料流水号) {
console.log(this.numbers1.indexOf(i), 234)
if (this.numbers1.indexOf(i) === -1) {
this.numbers1.push(i)
} else {
this.numbers1.splice(this.numbers1.indexOf(i), 1)
}
}
})
},
tableRowClassName({ row, rowIndex }) {
let color = ''
this.numbers.forEach((r, i) => {
if (rowIndex === r) {
color = 'MistyRose'
}
})
return color
},
tableRowClassName2({ row, rowIndex }) {
let color = ''
this.numbers1.forEach((r, i) => {
if (rowIndex === r) {
color = 'MistyRose'
}
})
return color
},
initDirection() { initDirection() {
const direction = this.$getDirection() const direction = this.$getDirection()
direction.on('keyup', function(e, val) { direction.on('keyup', function(e, val) {
@@ -1490,12 +1537,6 @@ export default {
}) })
}) })
}, },
tableRowClassName({ row, rowIndex }) {
if (parseInt(row.是否确认) === 0) {
return 'MistyRose'
}
return ''
},
handleSelectionChange1(val) { // 标准件和外购件多选 handleSelectionChange1(val) { // 标准件和外购件多选
this.标准件和外购件流水号 = [] this.标准件和外购件流水号 = []
this.基本件流水号 = [] this.基本件流水号 = []
@@ -1612,13 +1653,13 @@ export default {
}) })
}) })
}, },
handleSizeChange22(val) { // 标准件和外购件列表分页 handleSizeChange22(val) { // 仓库表分页
this.pageSize11 = val this.pageSize22 = val
this.pageCurrent11 = 1 this.pageCurrent22 = 1
this.searchTable22() this.searchTable22()
}, },
handleCurrentChange22(val) { // 标准件和外购件列表分页 handleCurrentChange22(val) { // 仓库表分页
this.pageCurrent11 = val this.pageCurrent22 = val
this.searchTable22() this.searchTable22()
} }
} }
@@ -1669,6 +1710,6 @@ export default {
</style> </style>
<style> <style>
.el-table .MistyRose { .el-table .MistyRose {
background: MistyRose!important; background: #9BD7FC!important;
} }
</style> </style>

View File

@@ -21,11 +21,6 @@
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请款时间" prop="请款时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column label="请款人" prop="姓名" align="center" min-width="70" show-overflow-tooltip> <el-table-column label="请款人" prop="姓名" align="center" min-width="70" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 }} {{ scope.row.姓名 }}
@@ -36,38 +31,43 @@
{{ scope.row.请款金额 }} {{ scope.row.请款金额 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核内容" width="80" align="center"> <el-table-column label="请款时间" prop="请款时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column label="审核结果" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="Number(scope.row.审核情况流水号)===3" type="primary" size="small">未审核</el-tag> <el-tag v-if="Number(scope.row.审核情况流水号)===3" type="primary" size="small">未审核</el-tag>
<el-tag v-if="Number(scope.row.审核情况流水号)===1" type="success" size="small">已通过</el-tag> <el-tag v-if="Number(scope.row.审核情况流水号)===1" type="success" size="small">已通过</el-tag>
<el-tag v-if="Number(scope.row.审核情况流水号)===2" type="danger" size="small">不通过</el-tag> <el-tag v-if="Number(scope.row.审核情况流水号)===2" type="danger" size="small">不通过</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="未过审核原因" width="100" align="center"> <el-table-column label="审核未过原因" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.未通过审核原因 === '通过' ? '—' : scope.row.未通过审核原因 }} {{ scope.row.未通过审核原因 === '通过' ? '—' : scope.row.未通过审核原因 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审批内容" width="70" align="center"> <el-table-column label="审批结果" width="70" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag> <el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag> <el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag> <el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="未通过审批原因" width="110" align="center"> <el-table-column label="审批未过原因" width="110" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }} {{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="付款情况" width="80" align="center"> <el-table-column label="付款结果" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag> <el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已付款</el-tag> <el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已付款</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag> <el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="未付原因" width="100" align="center"> <el-table-column label="未付原因" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }} {{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
</template> </template>
@@ -100,6 +100,11 @@
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }} {{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="120" align="center" label="合同总额" prop="合同总额">
<template slot-scope="scope">
{{ parseFloat(scope.row.合同总额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column width="120" align="center" label="已付金额" prop="已付金额"> <el-table-column width="120" align="center" label="已付金额" prop="已付金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseFloat(scope.row.已付金额).toFixed(2) }} {{ parseFloat(scope.row.已付金额).toFixed(2) }}
@@ -139,16 +144,16 @@
{{ scope.row.合同类型 === 1 ? scope.row.已到货数量 : scope.row.到货数量 }} {{ scope.row.合同类型 === 1 ? scope.row.已到货数量 : scope.row.到货数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="合计" align="center" min-width="100" prop="合计"> <!--<el-table-column label="合计" align="center" min-width="100" prop="合计">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
{{ (parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0)).toFixed(2) }} <!--{{ (parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0)).toFixed(2) }}-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column label="单价" align="center" min-width="100" prop="单价"> <!--<el-table-column label="单价" align="center" min-width="100" prop="单价">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
{{ parseFloat(scope.row.单价||0).toFixed(2) }} <!--{{ parseFloat(scope.row.单价||0).toFixed(2) }}-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求"> <el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.合同类型 === 1 ? scope.row.交货期.split(' ')[0] === '1900-01-01' ? '-' : scope.row.交货期.split(' ')[0] : scope.row.交货期要求 }} {{ scope.row.合同类型 === 1 ? scope.row.交货期.split(' ')[0] === '1900-01-01' ? '-' : scope.row.交货期.split(' ')[0] : scope.row.交货期要求 }}
@@ -370,7 +375,7 @@ export default {
if (index === 0) { if (index === 0) {
sums[index] = '总价' sums[index] = '总价'
return return
} else if (index === 2 || index === 3) { } else if (index === 2 || index === 3 || index === 1) {
const values = data.map(item => Number(item[column.property])) const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) { if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {

View File

@@ -29,7 +29,7 @@
<!--:label="item.label"--> <!--:label="item.label"-->
<!--:value="item.value"/>--> <!--:value="item.value"/>-->
<!--</el-select>--> <!--</el-select>-->
<el-input v-model="materialName" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent2=1;pageSize2=20;total2=0;searchTable2()"/> <el-input v-model="materialName" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent0=1;pageSize0=50;total0=0;searchTable0()"/>
<el-select v-model="machineValue" placeholder="机床图号" size="small" filterable clearable @change="machineChange"> <el-select v-model="machineValue" placeholder="机床图号" size="small" filterable clearable @change="machineChange">
<el-option <el-option
v-for="item in machine" v-for="item in machine"
@@ -84,7 +84,9 @@
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px;" @click="pageCurrent0=1;pageSize0=20;total0=0;searchTable0()">查询</el-button> <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px;" @click="pageCurrent0=1;pageSize0=50;total0=0;searchTable0()">查询</el-button>
<el-radio v-model="radio" label="1" style="margin-left: 10px" @change="pageCurrent0=1;pageSize0=50;total0=0;searchTable0()">未分配</el-radio>
<el-radio v-model="radio" label="2" style="margin-left: 10px" @change="pageCurrent0=1;pageSize0=50;total0=0;searchTable0()">已分配</el-radio>
<div style="float:right;"> <div style="float:right;">
<span style="margin-left: 0">采购员:</span> <span style="margin-left: 0">采购员:</span>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px"> <el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
@@ -113,7 +115,7 @@
</div> </div>
</el-row> </el-row>
<el-row style="margin-bottom: 10px"> <el-row style="margin-bottom: 10px">
<el-table v-loading="" :data="tableData0" size="mini" height="800px" border stripe @selection-change="handleSelectionChange1"> <el-table v-loading="loading" :data="tableData0" size="mini" height="800px" border stripe @selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable" align="center" type="selection"/> <el-table-column :selectable="selectable" align="center" type="selection"/>
<el-table-column align="center" label="采购情况" prop="询价状态编号" min-width="100px"> <el-table-column align="center" label="采购情况" prop="询价状态编号" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -183,27 +185,27 @@
<!--{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}--> <!--{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}-->
<!--</template>--> <!--</template>-->
<!--</el-table-column>--> <!--</el-table-column>-->
<el-table-column align="center" label="计划到货时间" min-width="100px"> <!--<el-table-column align="center" label="计划到货时间" min-width="100px">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
{{ scope.row.物料计划到货时间.split(' ')[0] }} <!--{{ scope.row.物料计划到货时间.split(' ')[0] }}-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column align="center" label="生产分配时间" min-width="100px"> <!--<el-table-column align="center" label="生产分配时间" min-width="100px">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
{{ scope.row.操作日期.split(' ')[0] }} <!--{{ scope.row.操作日期.split(' ')[0] }}-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" prop="姓名"> <el-table-column v-if="radio==='2'" :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" prop="姓名">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 ? scope.row.姓名 : '—' }} {{ scope.row.姓名 ? scope.row.姓名 : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="采购分配时间" min-width="100px"> <!--<el-table-column align="center" label="采购分配时间" min-width="100px">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '—' }} <!--{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '—' }}-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column align="center" label="撤回分配" min-width="100px" fixed="right"> <el-table-column v-if="radio==='2'" align="center" label="撤回分配" min-width="100px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="撤回已分配的采购任务" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="撤回已分配的采购任务" placement="top">
<el-button <el-button
@@ -220,7 +222,7 @@
<div class="block"> <div class="block">
<el-pagination <el-pagination
:current-page="pageCurrent0" :current-page="pageCurrent0"
:page-sizes="[10, 20, 30, 40]" :page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize0" :page-size="pageSize0"
:total="total0" :total="total0"
style="display:inline-block;width:50%" style="display:inline-block;width:50%"
@@ -238,7 +240,7 @@
<!--:label="item.label"--> <!--:label="item.label"-->
<!--:value="item.value"/>--> <!--:value="item.value"/>-->
<!--</el-select>--> <!--</el-select>-->
<el-input v-model="materialName" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent2=1;pageSize2=20;total2=0;searchTable2()"/> <el-input v-model="materialName" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent1=1;pageSize1=50;total1=0;searchTable1()"/>
<el-select v-model="machineValue" placeholder="机床图号" size="small" filterable clearable> <el-select v-model="machineValue" placeholder="机床图号" size="small" filterable clearable>
<el-option <el-option
v-for="item in machine" v-for="item in machine"
@@ -280,7 +282,9 @@
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </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-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px;" @click="pageCurrent1=1;pageSize1=50;total1=0;searchTable1()">查询</el-button>
<el-radio v-model="radio" label="1" style="margin-left: 10px" @change="pageCurrent1=1;pageSize1=50;total1=0;searchTable1()">未分配</el-radio>
<el-radio v-model="radio" label="2" style="margin-left: 10px" @change="pageCurrent1=1;pageSize1=50;total1=0;searchTable1()">已分配</el-radio>
<div style="float:right;"> <div style="float:right;">
<span style="margin-left: 0">采购员:</span> <span style="margin-left: 0">采购员:</span>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px"> <el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
@@ -295,7 +299,7 @@
</div> </div>
</el-row> </el-row>
<el-row style="margin-bottom: 10px"> <el-row style="margin-bottom: 10px">
<el-table v-loading="" :data="tableData1" size="mini" height="800px" border stripe @selection-change="handleSelectionChange1"> <el-table v-loading="loading" :data="tableData1" size="mini" height="800px" border stripe @selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable" align="center" type="selection"/> <el-table-column :selectable="selectable" align="center" type="selection"/>
<el-table-column align="center" prop="询价状态编号" label="采购情况" min-width="100px"> <el-table-column align="center" prop="询价状态编号" label="采购情况" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -365,27 +369,27 @@
<!--{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}--> <!--{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}-->
<!--</template>--> <!--</template>-->
<!--</el-table-column>--> <!--</el-table-column>-->
<el-table-column align="center" label="计划到货时间" min-width="100px"> <!--<el-table-column align="center" label="计划到货时间" min-width="100px">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
{{ scope.row.物料计划到货时间.split(' ')[0] }} <!--{{ scope.row.物料计划到货时间.split(' ')[0] }}-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column align="center" label="生产分配时间" min-width="100px"> <!--<el-table-column align="center" label="生产分配时间" min-width="100px">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
{{ scope.row.操作日期.split(' ')[0] }} <!--{{ scope.row.操作日期.split(' ')[0] }}-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" prop="姓名"> <el-table-column v-if="radio==='2'" :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" prop="姓名">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 ? scope.row.姓名 : '—' }} {{ scope.row.姓名 ? scope.row.姓名 : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="采购分配时间" min-width="100px"> <!--<el-table-column align="center" label="采购分配时间" min-width="100px">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '—' }} <!--{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '—' }}-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column align="center" label="撤回分配" min-width="100px" fixed="right"> <el-table-column v-if="radio==='2'" align="center" label="撤回分配" min-width="100px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
:disabled="!(parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='')" :disabled="!(parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='')"
@@ -400,7 +404,7 @@
<div class="block"> <div class="block">
<el-pagination <el-pagination
:current-page="pageCurrent1" :current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]" :page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize1" :page-size="pageSize1"
:total="total1" :total="total1"
style="display:inline-block;width:50%" style="display:inline-block;width:50%"
@@ -418,7 +422,7 @@
<!--:label="item.label"--> <!--:label="item.label"-->
<!--:value="item.value"/>--> <!--:value="item.value"/>-->
<!--</el-select>--> <!--</el-select>-->
<el-input v-model="partNum" placeholder="图号名称规格材料" size="small" clearable @keyup.enter.native="pageCurrent2=1;pageSize2=20;total2=0;searchTable2()"/> <el-input v-model="partNum" placeholder="图号名称规格材料" size="small" clearable @keyup.enter.native="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()"/>
<el-select v-model="machineValue" placeholder="机床图号" size="small" filterable clearable> <el-select v-model="machineValue" placeholder="机床图号" size="small" filterable clearable>
<el-option <el-option
v-for="item in machine" v-for="item in machine"
@@ -437,7 +441,9 @@
<!--:value="item.value"/>--> <!--:value="item.value"/>-->
<!--</el-select>--> <!--</el-select>-->
<!--<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" size="small"/>--> <!--<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" size="small"/>-->
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px;" @click="pageCurrent2=1;pageSize2=20;total2=0;searchTable2()">查询</el-button> <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px;" @click="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()">查询</el-button>
<el-radio v-model="radio" label="1" style="margin-left: 10px" @change="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()">未分配</el-radio>
<el-radio v-model="radio" label="2" style="margin-left: 10px" @change="pageCurrent2=1;pageSize2=50;total2=0;searchTable2()">已分配</el-radio>
<div style="float:right"> <div style="float:right">
<span style="margin-left: 0">采购员:</span> <span style="margin-left: 0">采购员:</span>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px"> <el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
@@ -452,7 +458,7 @@
</div> </div>
</el-row> </el-row>
<el-row style="margin-bottom: 10px"> <el-row style="margin-bottom: 10px">
<el-table v-loading="" :data="tableData2" size="mini" height="800px" border stripe @selection-change="handleSelectionChange2"> <el-table v-loading="loading" :data="tableData2" size="mini" height="800px" border stripe @selection-change="handleSelectionChange2">
<el-table-column :selectable="selectable" align="center" type="selection"/> <el-table-column :selectable="selectable" align="center" type="selection"/>
<el-table-column align="center" prop="询价状态编号" label="采购情况" min-width="80px"> <el-table-column align="center" prop="询价状态编号" label="采购情况" min-width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -512,27 +518,27 @@
{{ scope.row.供货商 }} {{ scope.row.供货商 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="计划到货时间" min-width="100px"> <!--<el-table-column align="center" label="计划到货时间" min-width="100px">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
{{ scope.row.物料计划到货时间.split(' ')[0] }} <!--{{ scope.row.物料计划到货时间.split(' ')[0] }}-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column align="center" label="生产分配时间" min-width="100px"> <!--<el-table-column align="center" label="生产分配时间" min-width="100px">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
{{ scope.row.操作日期.split(' ')[0] }} <!--{{ scope.row.操作日期.split(' ')[0] }}-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" prop="buyer"> <el-table-column v-if="radio==='2'" :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" prop="buyer">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 ? scope.row.姓名 : '—' }} {{ scope.row.姓名 ? scope.row.姓名 : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="采购分配时间" min-width="100px"> <!--<el-table-column align="center" label="采购分配时间" min-width="100px">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '—' }} <!--{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '—' }}-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column align="center" label="撤回分配" min-width="100px" fixed="right"> <el-table-column v-if="radio==='2'" align="center" label="撤回分配" min-width="100px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
:disabled="!(parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='')" :disabled="!(parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='')"
@@ -547,7 +553,7 @@
<div class="block"> <div class="block">
<el-pagination <el-pagination
:current-page="pageCurrent2" :current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]" :page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize2" :page-size="pageSize2"
:total="total2" :total="total2"
style="display:inline-block;width:50%" style="display:inline-block;width:50%"
@@ -605,8 +611,10 @@ export default {
} }
}] }]
}, },
loading: false,
dateRange: '', dateRange: '',
timer2: '', timer2: '',
radio: '1',
machines: [], machines: [],
source: [ source: [
{ {
@@ -636,7 +644,6 @@ export default {
groupValue: '', groupValue: '',
group: [], group: [],
materialName: '', materialName: '',
materialStatusValue: [0], // 物料状态
materialStatus: [ materialStatus: [
{ {
value: 0, value: 0,
@@ -679,13 +686,13 @@ export default {
groupAndPart: [], groupAndPart: [],
groupAndPartBasic: [], groupAndPartBasic: [],
pageCurrent0: 1, pageCurrent0: 1,
pageSize0: 20, pageSize0: 50,
total0: 0, total0: 0,
pageCurrent1: 1, pageCurrent1: 1,
pageSize1: 20, pageSize1: 50,
total1: 0, total1: 0,
pageCurrent2: 1, pageCurrent2: 1,
pageSize2: 20, pageSize2: 50,
total2: 0 total2: 0
} }
}, },
@@ -752,7 +759,6 @@ export default {
}) })
} }
this.machineValue = machine this.machineValue = machine
this.materialStatusValue = [1]
this.searchTable0() this.searchTable0()
this.searchTable1() this.searchTable1()
this.searchTable2() this.searchTable2()
@@ -796,6 +802,7 @@ export default {
}) })
}, },
fetchData() { // 初始化 fetchData() { // 初始化
console.log(this.radio, 222)
initProject().then(response => { initProject().then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.project.push({ this.project.push({
@@ -850,6 +857,7 @@ export default {
} }
}, },
searchTable0() { // 查询标准件 searchTable0() { // 查询标准件
this.loading = true
this.MaterialCategoryValue ? this.check1 = 1 : this.check1 = 0 this.MaterialCategoryValue ? this.check1 = 1 : this.check1 = 0
this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0 this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0
this.projectValue ? this.check3 = 1 : this.check3 = 0 this.projectValue ? this.check3 = 1 : this.check3 = 0
@@ -860,12 +868,14 @@ export default {
this.materialSpec ? check2 = 1 : check2 = 0 this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0 this.materialModel ? check3 = 1 : check3 = 0
// this.dateRange ? check4 = 0 : (check4 = 0, this.dateRange = '') // this.dateRange ? check4 = 0 : (check4 = 0, this.dateRange = '')
searchTable1(this.pageCurrent0, this.pageSize0, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, check0, this.machineValue, check1, this.groupValue, this.check4, this.materialName, this.materialStatusValue[this.materialStatusValue.length - 1], check2, this.materialSpec, check3, this.materialModel, 1, 0, '', '').then(response => { searchTable1(this.pageCurrent0, this.pageSize0, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, check0, this.machineValue, check1, this.groupValue, this.check4, this.materialName, parseInt(this.radio), check2, this.materialSpec, check3, this.materialModel, 1, 0, '', '').then(response => {
this.tableData0 = response.data.rows this.tableData0 = response.data.rows
this.total0 = response.data.total this.total0 = response.data.total
this.loading = false
}) })
}, },
searchTable1() { // 查询外购件 searchTable1() { // 查询外购件
this.loading = true
this.MaterialCategoryValue ? this.check1 = 1 : this.check1 = 0 this.MaterialCategoryValue ? this.check1 = 1 : this.check1 = 0
this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0 this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0
this.projectValue ? this.check3 = 1 : this.check3 = 0 this.projectValue ? this.check3 = 1 : this.check3 = 0
@@ -875,12 +885,14 @@ export default {
this.materialName ? this.check4 = 1 : this.check4 = 0 this.materialName ? this.check4 = 1 : this.check4 = 0
this.materialSpec ? check2 = 1 : check2 = 0 this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0 this.materialModel ? check3 = 1 : check3 = 0
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, check0, this.machineValue, check1, this.groupValue, this.check4, this.materialName, this.materialStatusValue[this.materialStatusValue.length - 1], check2, this.materialSpec, check3, this.materialModel, 2).then(response => { searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, check0, this.machineValue, check1, this.groupValue, this.check4, this.materialName, parseInt(this.radio), check2, this.materialSpec, check3, this.materialModel, 2).then(response => {
this.tableData1 = response.data.rows this.tableData1 = response.data.rows
this.total1 = response.data.total this.total1 = response.data.total
this.loading = false
}) })
}, },
searchTable2() { // 查询基本件 searchTable2() { // 查询基本件
this.loading = true
this.projectValue ? this.check3 = 1 : this.check3 = 0 this.projectValue ? this.check3 = 1 : this.check3 = 0
let check1, check2, check3, check4, check5, check6 let check1, check2, check3, check4, check5, check6
this.partNum ? check1 = 1 : check1 = 0 this.partNum ? check1 = 1 : check1 = 0
@@ -889,9 +901,10 @@ export default {
this.partMaterial ? check4 = 1 : check4 = 0 this.partMaterial ? check4 = 1 : check4 = 0
this.machineValue ? check5 = 1 : check5 = 0 this.machineValue ? check5 = 1 : check5 = 0
this.groupValue ? check6 = 1 : check6 = 0 this.groupValue ? check6 = 1 : check6 = 0
searchTable2(this.pageCurrent2, this.pageSize2, this.check3, this.projectValue, check5, this.machineValue, check6, this.groupValue, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.partNum, check2, this.partName, check3, this.partSpec, check4, this.partMaterial).then(response => { searchTable2(this.pageCurrent2, this.pageSize2, this.check3, this.projectValue, check5, this.machineValue, check6, this.groupValue, parseInt(this.radio), check1, this.partNum, check2, this.partName, check3, this.partSpec, check4, this.partMaterial).then(response => {
this.tableData2 = response.data.rows this.tableData2 = response.data.rows
this.total2 = response.data.total this.total2 = response.data.total
this.loading = false
}) })
}, },
handleSelectionChange1(val) { // 标准件和外购件多选 handleSelectionChange1(val) { // 标准件和外购件多选
@@ -1086,6 +1099,9 @@ export default {
width:150px; width:150px;
margin-right: 10px; margin-right: 10px;
} }
.el-radio{
margin-right: 0px;
}
</style> </style>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
.item { .item {

View File

@@ -0,0 +1,127 @@
<template>
<div class="app-container">
<el-card>
<span style="margin-left: 10px">时间段:</span>
<el-date-picker
v-model="date1"
style="width:160px;margin:10px;"
size="small"
type="date"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期"/>
<span>~</span>
<el-date-picker
v-model="date2"
style="width:160px;margin:10px;"
size="small"
type="date"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchData1()">查询</el-button>
</el-card>
<el-card>
<div id="myChart" style="width: 1000px; height: 570px; margin: auto"/>
</el-card>
</div>
</template>
<script>
import { getData, getData1 } from '@/api/PurchasingCenter/PurchasingEfficiencyAnalysis'
export default {
data() {
return {
tableData: [],
data1: '',
data2: ''
}
},
mounted() {},
methods: {
getTableData() {
this.tableData = []
getData(this.date1, this.date2).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.tableData.push({
采购合同流水号: response.data[i].采购合同流水号,
采购合同编号: response.data[i].采购合同编号,
合同生成日期: response.data[i].操作日期,
平均分配日期: '',
平均采购时间: ''
})
}
this.getTableData1(this.tableData)
}).then(() => {
this.drawLine()
})
},
getTableData1(row) {
for (let i = 0; i < row.length; i++) {
getData1(row[i].采购合同流水号).then(response => {
this.tableData[i].平均分配日期 = response.data[0].平均分配日期
this.tableData[i].平均采购时间 = response.data[0].平均采购时间
})
}
},
// 绘制图形
drawLine() {
const myChart = this.$echarts.init(document.getElementById('myChart'))
const xData = []
const lineData = []
for (let i = 0; i < this.tableData.length; i++) {
xData.push(this.tableData[i].采购合同编号.split(' ')[0])
lineData.push(this.tableData[i].平均采购时间.toFixed(2))
}
myChart.clear()
myChart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
legend: {
data: ['采购用时']
},
xAxis: [
{
type: 'category',
name: '合同编号',
data: xData,
axisPointer: {
type: 'shadow'
}
}
],
yAxis: [
{
type: 'value',
name: '采购用时'
}
],
series: [
{
name: '采购用时',
type: 'line',
label: {
normal: {
show: true,
position: 'top'
}
},
data: lineData
}
]
})
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,243 @@
<template>
<div class="app-container">
<el-card style="width: 72%">
<div style="margin-top: 7px; margin-bottom: 7px">
<span>供应商</span>
<el-select v-model="supplierNameValue" style="width:200px" placeholder="供应商" size="small" filterable clearable>
<el-option
v-for="item in supplierNames"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>零件图号</span>
<el-input v-model="partNumber" size="small" placeholder="零件图号" style="width: 160px" clearable/>
<span>备料状态</span>
<el-select v-model="MaterialsValue" placeholder="请选择备料状态" filterable size="small" style="width: 100px" clearable>
<el-option
v-for="item in Materials"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button icon="el-icon-search" type="success" size="small" @click="pageCurrent = 1;pageSize = 100;getTableData()">查询</el-button>
</div>
</el-card>
<el-card style="width: 72%">
<el-table
v-loading="loading"
:data="tableData"
highlight-current-row
border
stripe
size="mini"
style="width: 100%"
height="760">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column
label="备料状态"
align="center"
width="80px">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否到货)===0" type="warning" size="mini">未到</el-tag>
<el-tag v-if="Number(scope.row.是否到货)===1" type="primary" size="mini">已到</el-tag>
<el-tag v-if="Number(scope.row.是否到货)===2" type="success" size="mini">已结</el-tag>
</template>
</el-table-column>
<el-table-column
label="供应商"
align="center"
min-width="210px">
<template slot-scope="scope">{{ scope.row.供应商名称 }}</template>
</el-table-column>
<el-table-column
label="物料编码"
align="center"
min-width="180px">
<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="材料"
width="100"
align="center">
<template slot-scope="scope">{{ scope.row.材料 }}</template>
</el-table-column>
<el-table-column label="备料件数" align="center" width="70">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="备料时间" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.下单日期 ? scope.row.下单日期.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column
label="到货件数"
align="center"
width="70">
<template slot-scope="scope">{{ scope.row.到货数量 }}</template>
</el-table-column>
<el-table-column
label="到货时间"
align="center"
width="100">
<template slot-scope="scope">{{ scope.row.日期 ? scope.row.日期.split(' ')[0] : '' }}</template>
</el-table-column>
<el-table-column
label="结算时间"
align="center"
width="100">
<template slot-scope="scope">{{ scope.row.开票时间 ? scope.row.开票时间.split(' ')[0] : '' }}</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 100]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChanges"
@current-change="handleCurrentChanges"/>
</div>
</el-card>
</div>
</template>
<script>
import { searchSupplier, searchTable } from '@/api/WorkshopProcurement/OutsourcingMaterialsSearch'
export default {
name: 'Index',
data() {
return {
supplierNameValue: '',
supplierNames: [],
partNumber: '',
MaterialsValue: '',
Materials: [{
value: 0,
label: '未到'
}, {
value: 1,
label: '已到'
}, {
value: 2,
label: '已结'
}],
loading: false,
total: 0,
tableData: [],
pageCurrent: 1,
pageSize: 100
}
},
created() {
this.fetchData()
this.getTableData()
},
methods: {
fetchData() {
searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => {
for (let i = 0; i < response.data.length; i++) {
this.supplierNames.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商流水号
})
}
})
},
getTableData() {
this.loading = true
let check, check1, check2
this.supplierNameValue ? check = 1 : check = 0
this.partNumber ? check1 = 1 : check1 = 0
if (this.MaterialsValue !== '' && this.MaterialsValue !== null) {
check2 = 1
} else {
check2 = 0
}
console.log(this.MaterialsValue, check2, 123)
searchTable(check, this.supplierNameValue, check1, this.partNumber, check2, this.MaterialsValue, this.pageSize, this.pageCurrent).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false
})
},
handleSizeChanges(val) {
this.pageCurrent = 1
this.pageSize = val
this.getTableData()
},
handleCurrentChanges(val) {
this.pageCurrent = val
this.getTableData()
}
}
}
</script>
<style scoped>
span{
margin: 0px;
}
.wrapper{
width: 225px;
height: 50px;
overflow: hidden;
border: 1px solid #b8c7d9;
float: left;
margin: 0px;
}
.content{
position: relative;
padding: 8px 8px 0 8px;
}
.action{
position: absolute;
top: 4px;
right: 8px;
}
.delete{
padding: 0 5px;
border-radius: 3px;
color: #0f84b0;
font-size: 12px;
}
.delete:hover{
background: -webkit-linear-gradient(top,#0ba9e3,#0099d3);
color: #fff;
}
a{
text-decoration: none;
}
.icon{
width: 30px;
height: 30px;
display: inline-block;
margin-right: 7px;
margin-top: 2px;
font-size: 26px;
}
.info{
position: absolute;
left: 44px;
line-height: 30px;
display: inline-block;
color: #999;
}
.el-card {
padding: 0px !important;
margin: 0px !important;
}
</style>

View File

@@ -699,9 +699,9 @@ export default {
height: 30px; height: 30px;
} }
.el-table .adopt{ .el-table .adopt{
background: limegreen; background: #9BD7FC;
} }
.el-table .NotThrough{ .el-table .NotThrough{
background: palevioletred; background: #FF9759;
} }
</style> </style>