This commit is contained in:
zhangdingyu
2019-12-12 14:11:35 +08:00
23 changed files with 562 additions and 134 deletions

View File

@@ -0,0 +1,83 @@
import request from '@/utils/request'
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_项目名称_查询数据_按时间排序'
}
})
}
// 查询机床
export function searchmachine(num, check) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_机床名称_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + num + '&机床类型代码_check=0=int&机床类型代码=1=int&机床流水号_check=0'
}
})
}
// 获取组号
export function searchgroup(num, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_组件名称_查询数据',
param: '机床流水号=' + num
}
})
}
// 获取表单
export function searchdata(entryNameValue_check, entryNameValue, machineToolValue_check, machineToolValue, groupNumberValue_check, groupNumberValue, partNumber_check, partNumber, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '自制件出库_查询数据',
param: '项目流水号_check=' + entryNameValue_check + '&项目流水号=' + entryNameValue + '&机床流水号_check=' + machineToolValue_check + '&机床流水号=' + machineToolValue + '&组件流水号_check=' + groupNumberValue_check + '&组件流水号=' + groupNumberValue + '&零件图号_check=' + partNumber_check + '&零件图号=' + partNumber,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 自制件出库
export function warehousing(processPlanSerialNumber, leader, remarks) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '自制件出库_循环执行_新',
param: '工艺计划流水号组=' + processPlanSerialNumber + '&考勤编号=' + leader + '&出库备注=' + remarks
}
})
}
export function selectdepartment() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '出库管理_部门查询'
}
})
}
export function selectleaders(department) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '出库管理_人员查询',
param: '考核部门编号=' + department
}
})
}

View File

@@ -88,27 +88,27 @@ export function changeNum(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, check8, val11) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: 'xqs_采购管理_采购部采购_查询物料_分配后_带库存_创建询价单', name: 'xqs_采购管理_采购部采购_查询物料_分配后_带库存_创建询价单',
param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}&人员编号=${person}&项目流水号_check=${check4}&项目流水号=${val4}&机床流水号_check=${check5}&机床流水号=${val5}&组件流水号_check=${check6}&组件流水号=${val6}&时间_check=${val8}&开始时间=${val9}&结束时间=${val10}`, param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}&人员编号=${person}&项目流水号_check=${check4}&项目流水号=${val4}&机床流水号_check=${check5}&机床流水号=${val5}&组件流水号_check=${check6}&组件流水号=${val6}&时间_check=${val8}&开始时间=${val9}&结束时间=${val10}&供货商_check=${check8}&供货商=${val11}`,
Pagination: pageCurrent + '&' + pageSize Pagination: pageCurrent + '&' + pageSize
} }
}) })
} }
// 查询分配后的基本件 // 查询分配后的基本件
export function searchPart(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6, val8, val9, val10) { export function searchPart(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6, val8, val9, val10, check8, val11) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '采购管理_采购部采购_查询物料_基本件_分配后_创建询价单', name: '采购管理_采购部采购_查询物料_基本件_分配后_创建询价单',
param: `物料状态编号=${num1}&零件图号_check=${check1}&零件图号=${val1}&零件名称_check=${check2}&零件名称=${val2}&零件规格_check=${check3}&零件规格=${val3}&人员编号=${person}&项目流水号_check=${check4}&项目流水号=${val4}&机床流水号_check=${check5}&机床流水号=${val5}&组件流水号_check=${check6}&组件流水号=${val6}&时间_check=${val8}&开始时间=${val9}&结束时间=${val10}`, param: `物料状态编号=${num1}&零件图号_check=${check1}&零件图号=${val1}&零件名称_check=${check2}&零件名称=${val2}&零件规格_check=${check3}&零件规格=${val3}&人员编号=${person}&项目流水号_check=${check4}&项目流水号=${val4}&机床流水号_check=${check5}&机床流水号=${val5}&组件流水号_check=${check6}&组件流水号=${val6}&时间_check=${val8}&开始时间=${val9}&结束时间=${val10}&供货商_check=${check8}&供货商=${val11}`,
Pagination: pageCurrent + '&' + pageSize Pagination: pageCurrent + '&' + pageSize
} }
}) })

View File

@@ -18,7 +18,7 @@ export function initSupplier11(num) {
data: { data: {
type: '3', type: '3',
name: ` SELECT distinct 供应商流水号,供应商名称 name: ` SELECT distinct 供应商流水号,供应商名称
FROM 采购管理_询价单_视图 FROM 采购管理_询价单_视图_新
where not EXISTS (select * from 采购管理_采购合同_采购部 where 是否启用 = 1 and (是否未通过 is null or 是否未通过 <> 1) and 询价单编号 = 采购合同编号) and 采购员流水号 = ${num}` where not EXISTS (select * from 采购管理_采购合同_采购部 where 是否启用 = 1 and (是否未通过 is null or 是否未通过 <> 1) and 询价单编号 = 采购合同编号) and 采购员流水号 = ${num}`
} }
}) })
@@ -30,7 +30,7 @@ export function searchInquirySheet(check2, value2, check3, id, check4, supplier)
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '采购管理_询价单_查询数据', name: '采购管理_询价单_查询数据_创建合同',
param: `询价单编号_check=${check2}&询价单编号=${value2}&采购员流水号_check=${check3}&采购员流水号=${id}&供应商流水号_check=${check4}&供应商流水号=${supplier}` param: `询价单编号_check=${check2}&询价单编号=${value2}&采购员流水号_check=${check3}&采购员流水号=${id}&供应商流水号_check=${check4}&供应商流水号=${supplier}`
} }
}) })

View File

@@ -26,14 +26,14 @@ export function addMateriel2(num1, num2) {
}) })
} }
// 保存重量和备注 // 保存重量和备注
export function saveWeight(num1, num2, num3, num4, num5, num6, num7) { export function saveWeight(num1, num2, num3, num4, num8) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '备料管理_采购计划明细_保存重量和备注_9745', name: '备料管理_采购计划明细_保存重量和备注_9745',
param: `采购计划流水号=${num1}&成品尺寸=${num2}&备注=${num3}&单位=${num4}&零件图号=${num5}&材料=${num6}&零件名称=${num7}` param: `采购计划明细流水号=${num1}&成品尺寸=${num2}&备注=${num3}&单位=${num4}&采购数量=${num8}`
} }
}) })
} }
@@ -124,15 +124,26 @@ export function searchMateriel(num) {
} }
}) })
} }
export function searchMateriel1(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '备料管理_采购计划明细_查询数据_新',
param: `采购计划流水号=${num}`
}
})
}
// 增加采购计划明细 // 增加采购计划明细
export function addMateriel(num1, num2) { export function addMateriel(num1, num2, num3) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '备料管理_采购计划明细_增加数据', name: '备料管理_采购计划明细_增加数据',
param: `采购计划流水号=${num1}&工艺计划流水号组=${num2}` param: `采购计划流水号=${num1}&工艺计划流水号组=${num2}&数量组=${num3}`
} }
}) })
} }

View File

@@ -26,7 +26,7 @@ export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFil
export const MESUploadFile = `http://192.168.1.231:8411/submit/MESUploadFile.ashx` export const MESUploadFile = `http://192.168.1.231:8411/submit/MESUploadFile.ashx`
export const MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx` export const MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx`
const service = axios.create({ const service = axios.create({
baseURL: `http://192.168.0.110:8002/submit/MESCommonBase.ashx`, baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间 timeout: 1500000 // 请求超时时间
}) })
export default service export default service

View File

@@ -3,7 +3,7 @@
<el-card style="width: 1000px"> <el-card style="width: 1000px">
<el-row> <el-row>
<span style="margin-left: 10px">零件图号</span> <span style="margin-left: 10px">零件图号</span>
<el-input v-model="Partpaint" clearable size="small" style="width:200px;height: 29px;margin-top: 10px;margin-bottom: 10px" /> <el-input v-model="Partpaint" clearable size="small" style="width:170px;height: 29px;margin-top: 10px;margin-bottom: 10px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getCraftNumber()">查询</el-button> <el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getCraftNumber()">查询</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="清除所有机床零件信息" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="清除所有机床零件信息" placement="top">
<el-button size="small" type="danger" icon="el-icon-remove-outline" style="margin: 0 0 0 10px" plain @click="Empty()">清空</el-button> <el-button size="small" type="danger" icon="el-icon-remove-outline" style="margin: 0 0 0 10px" plain @click="Empty()">清空</el-button>

View File

@@ -347,7 +347,6 @@ export default {
}, },
// 打开表单 // 打开表单
parOut(row) { parOut(row) {
this.form.department = '装配车间'
this.locateNumber = row.货位流水号 this.locateNumber = row.货位流水号
this.materialNumber = row.物料流水号 this.materialNumber = row.物料流水号
this.partnumber = row.货位存量 this.partnumber = row.货位存量
@@ -375,7 +374,7 @@ export default {
// 离线外购件出库 // 离线外购件出库
addDirectPartm() { addDirectPartm() {
if (Number(this.partnumber) < Number(this.form.DirectNumber)) { if (Number(this.partnumber) < Number(this.form.DirectNumber)) {
this.$message.error('请正确输入数量') this.$message.error('库存不够,重输领料数量')
} else { } else {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {

View File

@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<span style="margin-left: 10px">机床号:</span> <span style="margin-left: 10px">机床号:</span>
<el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;margin-bottom: 10px;width: 220px" placeholder="机床号" @change="getGroup()"> <el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;margin-bottom: 10px;width: 185px" placeholder="机床号" @change="getGroup()">
<el-option <el-option
v-for="item in Machines" v-for="item in Machines"
:key="item.value" :key="item.value"
@@ -13,7 +13,7 @@
</el-option> </el-option>
</el-select> </el-select>
<span>组号:</span> <span>组号:</span>
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin-top:10px;width: 180px;"> <el-select v-model="Group" size="small" clearable placeholder="组号" style="margin-top:10px;width: 100px;">
<el-option <el-option
v-for="item in Groups" v-for="item in Groups"
:key="item.value" :key="item.value"
@@ -21,7 +21,7 @@
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<span>零件图号:</span> <span>零件图号:</span>
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 180px;"/> <el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 170px;"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=10;total = 0">查询</el-button> <el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=10;total = 0">查询</el-button>
</el-card> </el-card>
@@ -62,7 +62,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="领料人" prop="出库备注" width="80px"> <el-table-column align="center" label="领料人" prop="出库备注" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.出库备注 }} {{ scope.row.姓名 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="出库时间" prop="出库时间" width="100px"> <el-table-column align="center" label="出库时间" prop="出库时间" width="100px">

View File

@@ -0,0 +1,269 @@
<template>
<div class="app-container">
<el-card>
<el-row>
<el-select v-model="entryNameValue" placeholder="项目名称" style="width:150px;margin: 10px 10px 0px 10px" size="small" clearable filterable @change="SearchMachine">
<el-option
v-for="item in entryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="machineToolValue" placeholder="机床号" size="small" clearable style="width: 150px;margin: 10px 10px 0px 10px" @change="searchGroupList">
<el-option
v-for="item in machineTool"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="groupNumberValue" placeholder="组号" size="small" clearable style="width: 100px;margin: 10px 10px 0px 10px">
<el-option
v-for="item in groupNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-input v-model="partNumber" placeholder="零件号" size="small" clearable style="width: 150px;margin: 10px 10px 0px 10px"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin: 15px 0 0 10px" @click="pageCurrent=1;pageSize=20;total=0;searchData()">查询</el-button>
<el-button type="primary" size="small" style="margin: 15px 0 0 10px" @click="wareHousing">出库</el-button>
</el-row>
</el-card>
<el-card>
<el-table :data="tableData" style="width: 760px" height="580" stripe size="mini" border @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="45"/>
<el-table-column align="center" label="序号" type="index" width="55px"/>
<el-table-column align="center" label="机床图号" width="110px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" width="80px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件图号" min-width="180px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件名称" min-width="180px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="数量" width="50px">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<!-- <el-table-column align="center" label="状态" width="80px">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag v-if="scope.row.考核状态 === '8'">入库</el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="出库信息" center width="380px">
<el-form ref="form" :model="form" :rules="rules" label-position="left">
<el-form-item label="部门" prop="部门" label-width="100px" size="small">
<!-- <el-input v-model="form.department" size="small" placeholder="请输入人员编号" style="width: 200px"/>-->
<el-select v-model="form.department" placeholder="请选择部门" size="small" clearable style="width: 200px;" @change="selectLeaders">
<el-option
v-for="item in departments"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="领料人" prop="领料人" label-width="100px" size="small">
<el-select v-model="form.name" placeholder="请选择领料人" size="small" clearable style="width: 200px;">
<el-option
v-for="item in leaders"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="人员编号" prop="leader" label-width="100px" size="small">
<el-input v-model="form.leader" size="small" placeholder="请输入人员编号" style="width: 200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible=false">取消</el-button>
<el-button type="primary" @click="CHUKU()"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
// import { url } from '@/utils/request'
// import axios from 'axios'
import { initProject, searchmachine, searchgroup, searchdata, warehousing, selectdepartment, selectleaders } from '@/api/Inventory/SelfMadePartsWarehouseOut'
export default {
data() {
return {
entryNameValue: '', // 项目名称
entryName: [],
machineToolValue: '', // 机床号
machineTool: [],
groupNumberValue: '', // 组号
groupNumber: [],
partNumber: '',
pageCurrent: 1,
pageSize: 20,
total: 0,
tableData: [],
multipleSelection: [],
dialogFormVisible: false,
processPlanSerialNumber: '', // 工艺计划流水号
remarks: '',
form: {
leader: '',
name: ''
},
rules: {
leader: [{ required: true, message: '请输入' }]
},
departments: [], // 部门
leaders: [] // 领料人
}
},
created() {
this.fetchData()
this.searchData()
},
methods: {
searchData() {
const entryNameValue_check = this.entryNameValue === '' || this.entryNameValue === null ? 0 : 1
const machineToolValue_check = this.machineToolValue === '' || this.machineToolValue === null ? 0 : 1
const groupNumberValue_check = this.groupNumberValue === '' ? 0 : 1
const partNumber_check = this.partNumber === '' || this.partNumber === null ? 0 : 1
searchdata(entryNameValue_check, this.entryNameValue, machineToolValue_check, this.machineToolValue, groupNumberValue_check, this.groupNumberValue, partNumber_check, this.partNumber, this.pageCurrent, this.pageSize).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
})
},
selectDepartment() {
selectdepartment().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.departments.push({
label: response.data[i].部门名称,
value: response.data[i].考核部门编号
})
}
})
},
selectLeaders() {
selectleaders(this.form.department).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.leaders.push({
label: response.data[i].姓名,
value: response.data[i].考勤编号
})
}
})
},
fetchData() {
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.entryName.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
})
}
})
},
// 查询机床
SearchMachine() {
this.machineToolValue = ''
this.machineTool = []
this.groupNumberValue = ''
this.groupNumber = []
if (this.entryNameValue) {
searchmachine(this.entryNameValue, 1).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineTool.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
}
},
// 查询组号
searchGroupList() {
this.groupNumberValue = ''
this.groupNumber = []
if (this.machineToolValue) {
searchgroup(this.machineToolValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.groupNumber.push({
label: response.data[i].组号,
value: response.data[i].组件流水号
})
}
})
}
}, // 入库
wareHousing() {
console.log(this.multipleSelection, 121212)
if (this.multipleSelection.length === 0) {
this.$message.warning('请勾选出库物料')
} else {
this.selectDepartment()
this.dialogFormVisible = true
this.form.leader = ''
}
}, // 多选
handleSelectionChange(val) {
this.multipleSelection = []
val.map(v => {
this.multipleSelection.push(v.工艺计划流水号)
})
},
CHUKU() {
console.log(this.form.name, 909090, this.form.leader)
if (Number(this.form.leader) === Number(this.form.name)) {
warehousing(this.multipleSelection, this.form.leader, this.remarks).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')
this.dialogFormVisible = false
this.searchData()
} else {
this.$message.error('出库失败')
this.dialogFormVisible = false
}
})
} else {
this.$message.error('人员编号错误')
}
},
handleSizeChange(val) {
this.pageSize = val
this.searchData()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchData()
}
}
}
</script>
<style scoped>
</style>

View File

@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<span style="margin-left: 10px">机床号:</span> <span style="margin-left: 10px">机床号:</span>
<el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;margin-bottom: 10px;width: 120px" placeholder="机床号" @change="getGroup()"> <el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;margin-bottom: 10px;width: 185px" placeholder="机床号" @change="getGroup()">
<el-option <el-option
v-for="item in Machines" v-for="item in Machines"
:key="item.value" :key="item.value"
@@ -13,7 +13,7 @@
</el-option> </el-option>
</el-select> </el-select>
<span>组号:</span> <span>组号:</span>
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin-top:10px;width: 120px;"> <el-select v-model="Group" size="small" clearable placeholder="组号" style="margin-top:10px;width: 100px;">
<el-option <el-option
v-for="item in Groups" v-for="item in Groups"
:key="item.value" :key="item.value"
@@ -21,7 +21,7 @@
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<span>零件图号:</span> <span>零件图号:</span>
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 120px;"/> <el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 170px;"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=500;total = 0">查询</el-button> <el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=500;total = 0">查询</el-button>
</el-card> </el-card>
@@ -121,9 +121,9 @@
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="领料人" prop="出库备注" width="80px"> <el-table-column align="center" label="领料人" prop="领料人" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.出库备注 }} {{ scope.row.姓名 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="出库时间" prop="出库时间" width="100px"> <el-table-column align="center" label="出库时间" prop="出库时间" width="100px">
@@ -210,21 +210,9 @@ export default {
getTableData() { getTableData() {
this.listLoading1 = true this.listLoading1 = true
this.listLoading2 = true this.listLoading2 = true
if (this.Machine === '') { this.Machine ? this.checkbox_Machine = 1 : this.checkbox_Machine = 0
this.checkbox_Machine = 0 this.Group ? this.checkbox_Group = 1 : this.checkbox_Group = 0
} else { this.number ? this.checkbox_number = 1 : this.checkbox_number = 0
this.checkbox_Machine = 1
}
if (this.Group === '') {
this.checkbox_Group = 0
} else {
this.checkbox_Group = 1
}
if (this.number === '') {
this.checkbox_number = 0
} else {
this.checkbox_number = 1
}
this.tableData1 = [] this.tableData1 = []
this.tableData0 = [] this.tableData0 = []
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.pageCurrent, this.pageSize).then(response => { getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, this.pageCurrent, this.pageSize).then(response => {
@@ -249,10 +237,13 @@ export default {
handleSizeChange(val) { handleSizeChange(val) {
this.pageCurrent = 1 this.pageCurrent = 1
this.pageSize = val this.pageSize = val
this.pageCurrent0 = 1
this.pageSize0 = val
this.getTableData() this.getTableData()
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.pageCurrent = val this.pageCurrent = val
this.pageCurrent0 = val
this.getTableData() this.getTableData()
} }
} }

View File

@@ -37,11 +37,11 @@
</el-row> </el-row>
<el-row> <el-row>
<span>操作者:</span> <span>操作者:</span>
<el-input v-model="workerName" placeholder="操作者" size="small" clearable style="width:120px; margin-top: 10px;margin-bottom: 10px"/> <el-input v-model="workerName" placeholder="操作者" size="small" clearable style="width:100px; margin-top: 10px;margin-bottom: 10px"/>
<span>零件图号:</span> <span>零件图号:</span>
<el-input v-model="partNumber" placeholder="零件图号" size="small" clearable style="width:150px"/> <el-input v-model="partNumber" placeholder="零件图号" size="small" clearable style="width:170px"/>
<span>工艺名称:</span> <span>工艺名称:</span>
<el-input v-model="technologyName" placeholder="工艺名称" size="small" clearable style="width:150px"/> <el-input v-model="technologyName" placeholder="工艺名称" size="small" clearable style="width:100px"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="pageCurrent=1;total=0;searchTable();">查询</el-button> <el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="pageCurrent=1;total=0;searchTable();">查询</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="新增补录工时" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="新增补录工时" placement="top">
<el-button type="primary" class="el-icon-plus" size="small" style="margin: 10px 0 0 10px" @click="addSupplement();">新增</el-button> <el-button type="primary" class="el-icon-plus" size="small" style="margin: 10px 0 0 10px" @click="addSupplement();">新增</el-button>

View File

@@ -3,7 +3,7 @@
<el-card> <el-card>
<span>工位号:</span> <span>工位号:</span>
<el-select v-model="MachineValue" filterable size="small" style="width:220px;margin-bottom:10px" placeholder="工位号" @change="searchTable();searchParts()"> <el-select v-model="MachineValue" filterable size="small" style="width:120px;margin-bottom:10px" placeholder="工位号" @change="searchTable();searchParts()">
<el-option <el-option
v-for="item in Machine" v-for="item in Machine"
:key="item.value" :key="item.value"

View File

@@ -3,7 +3,7 @@
<el-card> <el-card>
<el-row> <el-row>
<span>机床号:</span> <span>机床号:</span>
<el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;width: 220px" placeholder="机床号" @change="getGroup()"> <el-select v-model="Machine" filterable clearable size="small" style="margin-top:10px;width: 185px" placeholder="机床号" @change="getGroup()">
<el-option <el-option
v-for="item in Machines" v-for="item in Machines"
:key="item.value" :key="item.value"
@@ -22,7 +22,7 @@
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<span>零件号:</span> <span>零件号:</span>
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 200px;"/> <el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 170px;"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="pageCurrent=1;pageSize=10;total = 0;getTableData();">查询</el-button> <el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="pageCurrent=1;pageSize=10;total = 0;getTableData();">查询</el-button>
</el-row> </el-row>
<el-row v-if="false"> <el-row v-if="false">

View File

@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<el-button :disabled="isShow" type="info" size="small" style="margin: 0px 180px;float: right" @click="EditData">补录完成日期</el-button> <el-button :disabled="isShow" type="info" size="small" style="margin: 0px 180px;float: right" @click="EditData">补录完成日期</el-button>
<el-select v-model="Machine" filterable clearable size="small" style="margin:0px 10px 0px 10px;width: 180px;" placeholder="机床号" @change="getGroup"> <el-select v-model="Machine" filterable clearable size="small" style="margin:0px 10px 0px 10px;width: 185px;" placeholder="机床号" @change="getGroup">
<el-option <el-option
v-for="item in Machines" v-for="item in Machines"
:key="item.value" :key="item.value"
@@ -12,14 +12,14 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div> <div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="Group" size="small" clearable placeholder="组号" style="margin:0px 10px;width: 120px;" @change="getTableData"> <el-select v-model="Group" size="small" clearable placeholder="组号" style="margin:0px 10px;width: 100px;" @change="getTableData">
<el-option <el-option
v-for="item in Groups" v-for="item in Groups"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 180px;margin:0px 10px;"/> <el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 170px;margin:0px 10px;"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 0px 10px;" @click="pageCurrent = 1;pageSize = 100;getTableData()">查询</el-button> <el-button type="success" class="el-icon-search" size="small" style="margin: 0px 10px;" @click="pageCurrent = 1;pageSize = 100;getTableData()">查询</el-button>
</el-card> </el-card>
<el-row> <el-row>

View File

@@ -4,7 +4,7 @@
<el-col style="width: 610px"> <el-col style="width: 610px">
<el-card style="height: 680px"> <el-card style="height: 680px">
<el-row style="margin-top: 5px"> <el-row style="margin-top: 5px">
<el-input v-model="Parts" placeholder="零件图号" size="small" style="width: 150px" @keyup.enter.native="getParts"/> <el-input v-model="Parts" placeholder="零件图号" size="small" style="width: 170px" @keyup.enter.native="getParts"/>
<el-select v-model="PersonValue" filterable placeholder="操作者" size="small" style="width: 100px;float: right" @change="searchTableData2"> <el-select v-model="PersonValue" filterable placeholder="操作者" size="small" style="width: 100px;float: right" @change="searchTableData2">
<el-option <el-option
v-for="item in Person" v-for="item in Person"

View File

@@ -47,6 +47,7 @@
<!--: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="searchTable11()"/> <el-input v-model="materialName" placeholder="名称规格" size="small" style="width:120px" clearable @keyup.enter.native="searchTable11()"/>
<el-input v-model="supplierName" placeholder="供货商" size="small" style="width:120px" clearable/>
<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"
@@ -68,18 +69,17 @@
<el-tooltip :open-delay="1000" effect="dark" content="开启物料变更" placement="top"> <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-switch v-model="switchValue" active-color="#13ce66" inactive-color="#ff4949" style="margin-left: 30px"/>
</el-tooltip> </el-tooltip>
<!--<el-date-picker--> <el-date-picker
<!--v-model="startTime"--> v-model="startTime"
<!--size="small"--> size="small"
<!--type="daterange"--> type="daterange"
<!--align="center"--> align="center"
<!--value-format="yyyy-MM-dd"--> value-format="yyyy-MM-dd"
<!--format="yyyy-MM-dd"--> format="yyyy-MM-dd"
<!--range-separator=""--> range-separator=""
<!--style="width:250px"--> style="width:250px"
<!--start-placeholder="开始日期"--> start-placeholder="开始日期"
<!--end-placeholder="结束日期"--> end-placeholder="结束日期"/>
<!--@change="timeChange1()"/>-->
<el-popover v-model="visible1" placement="top" width="140"> <el-popover v-model="visible1" placement="top" width="140">
<div style="text-align: right; margin: 0"> <div style="text-align: right; margin: 0">
<el-select v-model="PersonValue" style="width:100px" placeholder="人员" size="small" filterable clearable> <el-select v-model="PersonValue" style="width:100px" placeholder="人员" size="small" filterable clearable>
@@ -109,7 +109,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-table <el-table
v-loading="" v-loading="loading"
:data="tableData11" :data="tableData11"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
border border
@@ -263,6 +263,7 @@
<!--:value="item.value"/>--> <!--:value="item.value"/>-->
<!--</el-select>--> <!--</el-select>-->
<el-input v-model="partNum" placeholder="图号名称规格" size="small" clearable @keyup.enter.native="searchTable12()"/> <el-input v-model="partNum" placeholder="图号名称规格" size="small" clearable @keyup.enter.native="searchTable12()"/>
<el-input v-model="supplierName" placeholder="供货商" size="small" style="width:120px" clearable/>
<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"
@@ -280,18 +281,17 @@
<!--<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="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"
<!--size="small"--> size="small"
<!--type="daterange"--> type="daterange"
<!--align="center"--> align="center"
<!--value-format="yyyy-MM-dd"--> value-format="yyyy-MM-dd"
<!--format="yyyy-MM-dd"--> format="yyyy-MM-dd"
<!--range-separator=""--> range-separator=""
<!--style="width:250px"--> style="width:250px"
<!--start-placeholder="开始日期"--> start-placeholder="开始日期"
<!--end-placeholder="结束日期"--> end-placeholder="结束日期"/>
<!--@change="timeChange2()"/>-->
<el-button type="success" size="small" style="float: right" @click="visible2 = false;tiaozheng2()">调整采购任务</el-button> <el-button type="success" size="small" style="float: right" @click="visible2 = false;tiaozheng2()">调整采购任务</el-button>
<el-select v-model="PersonValue" style="width:100px;float: right" placeholder="人员" size="small" filterable clearable> <el-select v-model="PersonValue" style="width:100px;float: right" placeholder="人员" size="small" filterable clearable>
<el-option <el-option
@@ -318,7 +318,7 @@
</el-row> </el-row>
<el-row style="margin-bottom: 10px"> <el-row style="margin-bottom: 10px">
<el-table <el-table
v-loading="" v-loading="loading"
:data="tableData12" :data="tableData12"
:row-class-name="tableRowClassName2" :row-class-name="tableRowClassName2"
border border
@@ -1090,7 +1090,7 @@
</template> </template>
<script> <script>
import { timeSearch, timeChange1, timeChange2, tiaozheng2, tiaozheng1, getPerson, getBillNum, searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet, import { 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, changeNum } 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'
@@ -1102,8 +1102,9 @@ export default {
name: '', // 创建询价单 name: '', // 创建询价单
data() { data() {
return { return {
startTime: [], startTime: '',
endTime: [], endTime: '',
loading: false,
标准件和外购件流水号: [], 标准件和外购件流水号: [],
基本件流水号: [], 基本件流水号: [],
visible: false, visible: false,
@@ -1299,7 +1300,7 @@ export default {
} }
}, },
created() { created() {
this.timeSearch() // this.timeSearch()
this.getPerson() this.getPerson()
this.fetchData() this.fetchData()
this.projectChange() this.projectChange()
@@ -1315,13 +1316,13 @@ export default {
}, 500) }, 500)
}, },
methods: { methods: {
timeSearch() { // timeSearch() {
timeSearch().then(response => { // timeSearch().then(response => {
this.startTime = [response.data[0].外购件开始时间, response.data[0].外购件结束时间] // this.startTime = [response.data[0].外购件开始时间, response.data[0].外购件结束时间]
this.endTime = [response.data[0].基本件开始时间, response.data[0].基本件结束时间] // this.endTime = [response.data[0].基本件开始时间, response.data[0].基本件结束时间]
this.searchTable11() // this.searchTable11()
}) // })
}, // },
changeNumber(row) { changeNumber(row) {
changeNum(row.物料流水号, row.使用库存数, row.机床流水号, row.组件零件流水号, row.零件数量).then(response => { changeNum(row.物料流水号, row.使用库存数, row.机床流水号, row.组件零件流水号, row.零件数量).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
@@ -1356,16 +1357,16 @@ export default {
} }
}) })
}, },
timeChange1() { // timeChange1() {
if (this.startTime) { // if (this.startTime) {
timeChange1(this.startTime[0], this.startTime[1]) // timeChange1(this.startTime[0], this.startTime[1])
} // }
}, // },
timeChange2() { // timeChange2() {
if (this.endTime) { // if (this.endTime) {
timeChange2(this.endTime[0], this.endTime[1]) // timeChange2(this.endTime[0], this.endTime[1])
} // }
}, // },
Jump() { Jump() {
window.location.hash = '#PurchasingCenter/CreateInquirySheet' window.location.hash = '#PurchasingCenter/CreateInquirySheet'
}, },
@@ -1747,15 +1748,17 @@ export default {
return row['供货商'].trim() === value return row['供货商'].trim() === value
}, },
searchTable11() { // 查询外购件列表 searchTable11() { // 查询外购件列表
let check1, check2, check3, check4, check5, check6, check7 this.loading = true
let check1, check2, check3, check4, check5, check6, check7, check8
this.materialName ? check1 = 1 : check1 = 0 this.materialName ? check1 = 1 : check1 = 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
this.projectValue ? check4 = 1 : check4 = 0 this.projectValue ? check4 = 0 : 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
this.startTime ? check7 = 0 : (check7 = 0, this.startTime = '') this.startTime ? check7 = 1 : (check7 = 0, this.startTime = '')
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.supplierName ? check8 = 1 : check8 = 0
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], check8, this.supplierName).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 = []
@@ -1774,6 +1777,7 @@ export default {
this.supplierFilters.push({ text: v.供货商, value: v.供货商 }) this.supplierFilters.push({ text: v.供货商, value: v.供货商 })
} }
}) })
this.loading = false
}) })
}, },
handleSizeChange11(val) { // 标准件和外购件列表分页 handleSizeChange11(val) { // 标准件和外购件列表分页
@@ -1786,15 +1790,17 @@ export default {
this.searchTable11() this.searchTable11()
}, },
searchTable12() { // 查询基本件列表 searchTable12() { // 查询基本件列表
let check1, check2, check3, check4, check5, check6, check7 this.loading = true
let check1, check2, check3, check4, check5, check6, check7, check8
this.partNum ? check1 = 1 : check1 = 0 this.partNum ? check1 = 1 : check1 = 0
this.partName ? check2 = 1 : check2 = 0 this.partName ? check2 = 1 : check2 = 0
this.partSpec ? check3 = 1 : check3 = 0 this.partSpec ? check3 = 1 : check3 = 0
this.projectValue ? check4 = 1 : check4 = 0 this.projectValue ? check4 = 0 : 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
this.endTime ? check7 = 0 : (check7 = 0, this.endTime = '') this.endTime ? check7 = 1 : (check7 = 0, this.endTime = '')
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.supplierName ? check8 = 1 : check8 = 0
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], check8, this.supplierName).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 = []
@@ -1809,6 +1815,7 @@ export default {
this.supplierFilters.push({ text: v.供货商, value: v.供货商 }) this.supplierFilters.push({ text: v.供货商, value: v.供货商 })
} }
}) })
this.loading = false
}) })
}, },
handleSizeChange12(val) { // 基本件列表分页 handleSizeChange12(val) { // 基本件列表分页

View File

@@ -56,7 +56,7 @@
<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-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 v-loading="loading" :data="tableData1" border style="margin: 10px 0;max-height: 480px;" height="480px" size="mini" show-summary tooltip-effect="dark">
<el-table-column label="序号" align="center" width="50" type="index"/> <el-table-column label="序号" align="center" width="50" type="index"/>
<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">
@@ -152,7 +152,7 @@
<div v-show="false">{{ content }}</div> <div v-show="false">{{ content }}</div>
<!--富文本编辑器--> <!--富文本编辑器-->
<div v-show="!preview" id="tinymce" style="height:850px;"> <div v-show="!preview" id="tinymce" style="height:850px;">
<tinymce ref="tinymce" :height="700" v-model="contentNew" style="width:800px;margin: 0 auto"/> <tinymce ref="tinymce" :height="700" v-model="contentNew" style="width:800px;margin: 0 auto;pointer-events: none"/>
</div> </div>
<!--网页预览--> <!--网页预览-->
<div v-show="preview" class="editor-content" style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="content"/> <div v-show="preview" class="editor-content" style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="content"/>
@@ -174,6 +174,7 @@ export default {
data() { data() {
return { return {
isShowN: false, isShowN: false,
loading: false,
supplierValue11: '', // 供应商查询条件 supplierValue11: '', // 供应商查询条件
supplier11: [], supplier11: [],
quickChangePrice: true, quickChangePrice: true,
@@ -463,6 +464,7 @@ export default {
} }
}, },
contractChange() { // 选择合同select contractChange() { // 选择合同select
this.loading = true
searchContractHeader(this.contractNumValue).then(response => { searchContractHeader(this.contractNumValue).then(response => {
this.deliveryDate = response.data[0].交货日期 this.deliveryDate = response.data[0].交货日期
this.invoiceInfo = response.data[0].开票信息 this.invoiceInfo = response.data[0].开票信息
@@ -515,6 +517,7 @@ export default {
备注: response.data[i].备注 备注: response.data[i].备注
}) })
} }
this.loading = false
}) })
}, },
demoChange() { // 模板change demoChange() { // 模板change

View File

@@ -19,11 +19,51 @@
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
format="yyyy-MM-dd" format="yyyy-MM-dd"
placeholder="选择日期"/> placeholder="选择日期"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchData1()">查询</el-button> <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="getTableData()">查询</el-button>
</el-card> </el-card>
<el-card> <el-card>
<div id="myChart" style="width: 1000px; height: 570px; margin: auto"/> <div id="myChart" style="width: 1000px; height: 570px; margin: auto"/>
</el-card> </el-card>
<el-card style="width: 650px">
<el-table
:data="tableData"
highlight-current-row
border
stripe
size="mini"
style="width: 100%"
height="460">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<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="80px">
<template slot-scope="scope">{{ scope.row.平均采购时间 }}</template>
</el-table-column>
<el-table-column
label="平均分配日期"
width="170"
align="center">
<template slot-scope="scope">{{ scope.row.平均分配日期 }}</template>
</el-table-column>
<el-table-column
label="合同生成日期"
align="center"
width="170">
<template slot-scope="scope">{{ scope.row.合同生成日期 }}</template>
</el-table-column>
</el-table>
</el-card>
</div> </div>
</template> </template>
@@ -33,28 +73,26 @@ export default {
data() { data() {
return { return {
tableData: [], tableData: [],
data1: '', date1: '',
data2: '' date2: ''
} }
}, },
mounted() {},
methods: { methods: {
getTableData() { async getTableData() {
this.tableData = [] this.tableData = []
getData(this.date1, this.date2).then(response => { getData(this.date1, this.date2).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.tableData.push({ this.tableData.push({
采购合同流水号: response.data[i].采购合同流水号, 采购合同流水号: response.data[i].采购合同流水号,
采购合同编号: response.data[i].采购合同编号, 采购合同编号: response.data[i].采购合同编号,
合同生成日期: response.data[i].操作日期, 合同生成日期: response.data[i].操作时间,
平均分配日期: '', 平均分配日期: '',
平均采购时间: '' 平均采购时间: ''
}) })
} }
this.getTableData1(this.tableData) this.getTableData1(this.tableData)
}).then(() => {
this.drawLine()
}) })
setTimeout(this.drawLine, 2000)
}, },
getTableData1(row) { getTableData1(row) {
for (let i = 0; i < row.length; i++) { for (let i = 0; i < row.length; i++) {
@@ -70,8 +108,9 @@ export default {
const xData = [] const xData = []
const lineData = [] const lineData = []
for (let i = 0; i < this.tableData.length; i++) { for (let i = 0; i < this.tableData.length; i++) {
xData.push(this.tableData[i].采购合同编号.split(' ')[0]) console.log(this.tableData[i].采购合同编号)
lineData.push(this.tableData[i].平均采购时间.toFixed(2)) xData.push(this.tableData[i].采购合同编号)
lineData.push(this.tableData[i].平均采购时间)
} }
myChart.clear() myChart.clear()
myChart.setOption({ myChart.setOption({
@@ -94,13 +133,17 @@ export default {
data: xData, data: xData,
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow'
},
axisLabel: {
interval: 0,
rotate: 40
} }
} }
], ],
yAxis: [ yAxis: [
{ {
type: 'value', type: 'value',
name: '采购用时' name: '采购用时(H)'
} }
], ],
series: [ series: [

View File

@@ -2,7 +2,7 @@
<div> <div>
<el-card> <el-card>
<span>项目名称</span> <span>项目名称</span>
<el-select v-model="projectValue" placeholder="请选择项目名称" style="width: 150px" filterable size="small"> <el-select v-model="projectValue" placeholder="请选择项目名称" filterable size="small" style="width: 185px">
<el-option <el-option
v-for="item in project" v-for="item in project"
:key="item.value" :key="item.value"
@@ -10,7 +10,7 @@
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<span>机床图号</span> <span>机床图号</span>
<el-select v-model="machineValue" placeholder="请选择机床图号" style="width: 150px" filterable size="small"> <el-select v-model="machineValue" placeholder="请选择机床图号" filterable size="small" style="width: 185px">
<el-option <el-option
v-for="item in machine" v-for="item in machine"
:key="item.value" :key="item.value"
@@ -18,14 +18,14 @@
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<span>组号</span> <span>组号</span>
<el-select v-model="groupValue" placeholder="请选择组号" style="width: 150px" filterable size="small"> <el-select v-model="groupValue" placeholder="请选择组号" filterable size="small" style="width: 100px">
<el-option <el-option
v-for="item in group" v-for="item in group"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<el-select v-model="whetherToImport" clearable placeholder="是否导入" style="width: 150px" filterable size="small"> <el-select v-model="whetherToImport" clearable placeholder="是否导入" filterable size="small" style="width: 100px">
<el-option <el-option
v-for="item in whetherToImports" v-for="item in whetherToImports"
:key="item.value" :key="item.value"

View File

@@ -165,9 +165,9 @@
{{ scope.row.材料 }} {{ 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="115">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.总数量 }} <el-input-number :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.采购数量" :min="0" size="mini" style="width: 100%" @change="saveWeight(scope.$index, scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="成品尺寸(长、宽、高)" align="center" min-width="120px"> <el-table-column label="成品尺寸(长、宽、高)" align="center" min-width="120px">
@@ -284,7 +284,7 @@
<td colspan="2" style="text-align: center;width: 20%">成品尺寸</td> <td colspan="2" style="text-align: center;width: 20%">成品尺寸</td>
<td style="text-align: center;width: 17%">备注</td> <td style="text-align: center;width: 17%">备注</td>
</tr> </tr>
<tr v-for="(list, index) in tableData3" :key="index" style="height: 35px"> <tr v-for="(list, index) in tableData4" :key="index" style="height: 35px">
<td style="text-align: center;width: 7%">{{ index + 1 }}</td> <td style="text-align: center;width: 7%">{{ index + 1 }}</td>
<td colspan="2" style="text-align: center;width: 20%">{{ list.物料零件编码 }}</td> <td colspan="2" style="text-align: center;width: 20%">{{ list.物料零件编码 }}</td>
<td colspan="2" style="text-align: center;width: 10%">{{ list.零件名称 }}</td> <td colspan="2" style="text-align: center;width: 10%">{{ list.零件名称 }}</td>
@@ -302,7 +302,7 @@
</template> </template>
<script> <script>
import { initPartDrawing, searchPurchasedMaterials, searchPurchaseOrder, addPurchaseOrder, searchSupplier, editPurchaseOrder, deletePurchaseOrder, searchMateriel, import { initPartDrawing, searchPurchasedMaterials, searchPurchaseOrder, addPurchaseOrder, searchSupplier, editPurchaseOrder, deletePurchaseOrder, searchMateriel, searchMateriel1,
addMateriel, deleteMateriel, saveMateriel, saveMateriel1, searchRawMaterial, addMateriel2, saveWeight, edit2 } from '@/api/WorkshopProcurement/CreatingPurchasingMaterials' addMateriel, deleteMateriel, saveMateriel, saveMateriel1, searchRawMaterial, addMateriel2, saveWeight, edit2 } from '@/api/WorkshopProcurement/CreatingPurchasingMaterials'
import QRCode from 'qrcode' import QRCode from 'qrcode'
import $ from 'jquery' import $ from 'jquery'
@@ -386,6 +386,7 @@ export default {
}, },
tableData3: [], tableData3: [],
materielGroup: [], // 工艺计划流水号组 materielGroup: [], // 工艺计划流水号组
partNum: [], // 默认采购数量
partGroup: [], // 采购计划明细流水号组 partGroup: [], // 采购计划明细流水号组
unit: [], // 单位组 unit: [], // 单位组
Remarks: [], // 备注组 Remarks: [], // 备注组
@@ -439,6 +440,9 @@ export default {
this.searchTable1() this.searchTable1()
this.searchRawMaterial() this.searchRawMaterial()
searchMateriel(this.purchasingOrderNumber).then(response => { searchMateriel(this.purchasingOrderNumber).then(response => {
this.tableData4 = response.data
})
searchMateriel1(this.purchasingOrderNumber).then(response => {
this.tableData3 = response.data this.tableData3 = response.data
}) })
} else { this.$message.error('选入失败') } } else { this.$message.error('选入失败') }
@@ -452,10 +456,10 @@ export default {
} }
}, },
saveWeight(index, row) { saveWeight(index, row) {
saveWeight(row.采购计划流水号, row.成品尺寸, row.备注1, row.单位, row.零件图号, row.材料, row.零件名称) saveWeight(row.采购计划明细流水号, row.成品尺寸, row.备注1, row.单位, row.采购数量)
}, },
saveMoney(index, row) { saveMoney(index, row) {
saveWeight(row.采购计划流水号, row.成品尺寸, row.备注1, row.单位, row.零件图号, row.材料, row.零件名称) saveWeight(row.采购计划明细流水号, row.成品尺寸, row.备注1, row.单位, row.采购数量)
// var reg = /^[0-9]*$/ // var reg = /^[0-9]*$/
// if (!reg.test(row.单价)) { // if (!reg.test(row.单价)) {
// this.$message.error('请输入正确的单价') // this.$message.error('请输入正确的单价')
@@ -464,7 +468,7 @@ export default {
// } // }
}, },
saveRemarks(index, row) { saveRemarks(index, row) {
saveWeight(row.采购计划流水号, row.成品尺寸, row.备注1, row.单位, row.零件图号, row.材料, row.零件名称) saveWeight(row.采购计划明细流水号, row.成品尺寸, row.备注1, row.单位, row.采购数量)
}, },
// ///////////////////////////////////////////////////////////////////////////////////////0529新加↑ // ///////////////////////////////////////////////////////////////////////////////////////0529新加↑
useqrcode(contractNum) { useqrcode(contractNum) {
@@ -512,8 +516,10 @@ export default {
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.materielGroup = [] this.materielGroup = []
this.partNum = []
for (let i = 0; i < val.length; i++) { for (let i = 0; i < val.length; i++) {
this.materielGroup.push(val[i].工艺计划流水号) this.materielGroup.push(val[i].工艺计划流水号)
this.partNum.push(val[i].批次数量)
} }
}, },
searchTable2() { // 查询采购单列表 searchTable2() { // 查询采购单列表
@@ -594,6 +600,9 @@ export default {
this.$message.success('删除成功') this.$message.success('删除成功')
this.searchTable2() this.searchTable2()
searchMateriel(this.purchasingOrderNumber).then(response => { searchMateriel(this.purchasingOrderNumber).then(response => {
this.tableData4 = response.data
})
searchMateriel1(this.purchasingOrderNumber).then(response => {
this.tableData3 = response.data this.tableData3 = response.data
}) })
} else { this.$message.error('数据占用,删除失败') } } else { this.$message.error('数据占用,删除失败') }
@@ -614,7 +623,11 @@ export default {
this.计划完成日期 = row.计划完成日期.split(' ')[0] this.计划完成日期 = row.计划完成日期.split(' ')[0]
this.下单日期 = row.下单日期.split(' ')[0] this.下单日期 = row.下单日期.split(' ')[0]
searchMateriel(this.purchasingOrderNumber).then(response => { searchMateriel(this.purchasingOrderNumber).then(response => {
this.tableData4 = response.data
})
searchMateriel1(this.purchasingOrderNumber).then(response => {
this.tableData3 = response.data this.tableData3 = response.data
console.log(response.data)
}) })
}, },
addMateriel() { // 将材料选入请购单 addMateriel() { // 将材料选入请购单
@@ -623,11 +636,14 @@ export default {
} else if (this.materielGroup.length === 0) { } else if (this.materielGroup.length === 0) {
this.$message.warning('请勾选物料') this.$message.warning('请勾选物料')
} else { } else {
addMateriel(this.purchasingOrderNumber, this.materielGroup).then(response => { addMateriel(this.purchasingOrderNumber, this.materielGroup, this.partNum).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('选入成功') this.$message.success('选入成功')
this.searchTable1() this.searchTable1()
searchMateriel(this.purchasingOrderNumber).then(response => { searchMateriel(this.purchasingOrderNumber).then(response => {
this.tableData4 = response.data
})
searchMateriel1(this.purchasingOrderNumber).then(response => {
this.tableData3 = response.data this.tableData3 = response.data
}) })
} else { this.$message.error('选入失败') } } else { this.$message.error('选入失败') }
@@ -665,6 +681,9 @@ export default {
this.$message.success('保存成功') this.$message.success('保存成功')
this.searchTable2() this.searchTable2()
searchMateriel(this.purchasingOrderNumber).then(response => { searchMateriel(this.purchasingOrderNumber).then(response => {
this.tableData4 = response.data
})
searchMateriel1(this.purchasingOrderNumber).then(response => {
this.tableData3 = response.data this.tableData3 = response.data
}) })
} else { this.$message.error('保存失败') } } else { this.$message.error('保存失败') }
@@ -682,6 +701,9 @@ export default {
this.$message.success('移除成功') this.$message.success('移除成功')
this.searchTable1() this.searchTable1()
searchMateriel(this.purchasingOrderNumber).then(response => { searchMateriel(this.purchasingOrderNumber).then(response => {
this.tableData4 = response.data
})
searchMateriel1(this.purchasingOrderNumber).then(response => {
this.tableData3 = response.data this.tableData3 = response.data
}) })
} else { this.$message.error('移除失败') } } else { this.$message.error('移除失败') }

View File

@@ -333,7 +333,7 @@
</el-table-column> </el-table-column>
<el-table-column label="备料件数" align="center" width="70px"> <el-table-column label="备料件数" align="center" width="70px">
<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" width="70px"> <el-table-column label="已到件数" align="center" width="70px">
@@ -343,7 +343,7 @@
</el-table-column> </el-table-column>
<el-table-column label="到货件数" align="center" width="110px"> <el-table-column label="到货件数" align="center" width="110px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.批次数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:90px" @change="saveData(scope.row)"/> <el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.采购数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:90px" @change="saveData(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货重量" align="center" width="110px" prop="到货重量"> <el-table-column label="到货重量" align="center" width="110px" prop="到货重量">
@@ -460,7 +460,7 @@
</el-table-column> </el-table-column>
<el-table-column label="备料件数" align="center" width="70px"> <el-table-column label="备料件数" align="center" width="70px">
<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" width="70px"> <el-table-column label="已到件数" align="center" width="70px">
@@ -470,7 +470,7 @@
</el-table-column> </el-table-column>
<el-table-column label="到货件数" align="center" width="110px"> <el-table-column label="到货件数" align="center" width="110px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.批次数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:90px" @change="saveData(scope.row)"/> <el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.采购数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:90px" @change="saveData(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货重量" align="center" width="110px"> <el-table-column label="到货重量" align="center" width="110px">

View File

@@ -74,7 +74,7 @@
</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">
{{ scope.row.批次数量 }} {{ scope.row.采购数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备料时间" align="center" width="100"> <el-table-column label="备料时间" align="center" width="100">

View File

@@ -92,7 +92,7 @@
<el-table-column label="操作" align="center" min-width="100px"> <el-table-column label="操作" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="warning" plain size="mini" @click="exportTable()">打印</el-button> <el-button type="warning" plain size="mini" @click="exportTable()">打印</el-button>
<el-button type="danger" plain size="mini" @click="Disable(scope.row)">禁用</el-button> <el-button type="danger" plain size="mini" @click="Disable(scope.row)">打回</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>