This commit is contained in:
caoxinyu
2019-09-29 17:37:37 +08:00
10 changed files with 221 additions and 49 deletions

View File

@@ -9,7 +9,7 @@
<el-checkbox v-model="all" size="small">查询全部</el-checkbox>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="打印备料单" placement="top"/>
<el-tooltip effect="dark" content="打印备料单" placement="top" open-delay="1200">
<el-tooltip :open-delay="1200" effect="dark" content="打印备料单" placement="top">
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left:0px" @click="exportTable('BL')">导出备料单</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="将选中零件分配为自家备料" placement="top">

View File

@@ -68,7 +68,7 @@
<el-card>
<span>零件图号:</span>
<el-input v-model="partName2" placeholder="零件图号" size="small" clearable style="width:200px;margin: 3px 0"/>
<el-tooltip :open-delay="1200" effect="dark" content="外购备料确认" placement="top">
<el-tooltip :open-delay="1200" effect="dark" content="外购备料查询" placement="top">
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="total2=0;pageSize2=10; pageCurrent2=1;searchTable2()">查询</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="外购备料完成" placement="top">
@@ -120,7 +120,8 @@
</div>
</template>
<script>import { getMachines, getGroups, searchtable, searchtable2, searchtable3, change2, change3, edit } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
<script>
import { getMachines, getGroups, searchtable, searchtable2, searchtable3, change2, change3, edit } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
import { mapGetters } from 'vuex'
import Cookie from 'js-cookie'
export default {
@@ -172,10 +173,11 @@ export default {
}
}
},
// created() {
// this.searchTable()
// this.searchTable2()
// },
created() {
this.getMachine()
this.searchTable()
this.searchTable2()
},
methods: {
handleSelectionChange2(val) {
this.arrest2 = val

View File

@@ -36,7 +36,7 @@
<span>物料名称:</span>
<el-input v-model="MaterialName" placeholder="物料名称" size="small" clearable />
</el-col>
<el-col style="width: 280px;margin-top: 10px">
<el-col style="width: 280px;margin-top: 3px">
<span>物料全称:</span>
<el-input
v-model="FullNameOfMaterial"
@@ -44,7 +44,7 @@
size="small"
clearable/>
</el-col>
<el-col style="width: 280px;margin-top: 10px">
<el-col style="width: 280px;margin-top: 3px">
<span>物料规格:</span>
<el-input
v-model="MaterialSpecification"
@@ -52,7 +52,7 @@
size="small"
clearable/>
</el-col>
<el-col style="width: 280px;margin-top: 10px">
<el-col style="width: 280px;margin-top: 3px">
<span>物料型号:</span>
<el-input
v-model="MaterialModel"
@@ -92,13 +92,26 @@
</el-col>
<el-col style="width: 280px">
<span style="margin-left: 25px">供货商:</span>
<el-input
v-model="supplier"
placeholder="供货商"
size="small"
<el-select
v-model="GonghuoshangValue"
placeholder="请选择"
filterable
style="margin-bottom: 3px;margin-top: 10px"
clearable
@dblclick.native="param=0;openSupplier()"/>
size="small"
clearable>
<el-option
v-for="item in Gonghuoshang"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<!--<el-input-->
<!--v-model="supplier"-->
<!--placeholder="供货商"-->
<!--size="small"-->
<!--style="margin-bottom: 3px;margin-top: 10px"-->
<!--clearable-->
<!--@dblclick.native="param=0;openSupplier()"/>-->
</el-col>
<el-col style="width: 450px">
<el-button
@@ -313,14 +326,27 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="供货商" prop="供货商">
<el-input
v-model="form.供货商"
placeholder="供货商"
size="small"
clearable
<el-form-item label="供货商" prop="GonghuoshangValue">
<el-select
v-model="form.GonghuoshangValue"
placeholder="请选择"
filterable
style="width:200px"
@click.native="param=1;openSupplier()"/>
size="small"
clearable>
<el-option
v-for="item in Gonghuoshang2"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<!--<el-input-->
<!--v-model="form.供货商"-->
<!--placeholder="供货商"-->
<!--size="small"-->
<!--clearable-->
<!--style="width:200px"-->
<!--@click.native="param=1;openSupplier()"/>-->
</el-form-item>
</el-col>
<el-col :span="12">
@@ -459,6 +485,7 @@
<script>
import {
getSupplier1,
AddGonghuoshang,
initDepartmentName,
initMaterialCategory,
@@ -484,6 +511,9 @@ import { mapGetters } from 'vuex'
export default {
data() {
return {
Gonghuoshang: [],
Gonghuoshang2: [],
GonghuoshangValue: '',
form3: {
供货商名称: ''
},
@@ -555,11 +585,11 @@ export default {
物料型号: '',
计量单位流水号: '',
物料来源流水号: '',
供货商: ''
GonghuoshangValue: ''
},
rules: {
物料名称: [{ required: true, message: '请输入物料名称', trigger: 'blur' }],
供货商: [{ required: true, message: '请选择供货商', trigger: 'change' }],
GonghuoshangValue: [{ required: true, message: '请选择供货商', trigger: 'change' }],
物料类别流水号: [{ required: true, message: '请选择物料类别', trigger: 'change' }],
物料品种流水号: [{ required: true, message: '请选择物料品种', trigger: 'change' }],
计量单位流水号: [{ required: true, message: '请选择计量单位', trigger: 'change' }],
@@ -577,8 +607,25 @@ export default {
created() {
this.fetchData()
this.searchMaterialCategory()
this.getGonghuoshang()
},
methods: {
getGonghuoshang() { // 供货商初始化查询
this.Gonghuoshang = []
this.Gonghuoshang2 = []
getSupplier1(0, 0).then(response => {
response.data.map(v => {
this.Gonghuoshang.push({
label: v.供货商,
value: v.供货商流水号
})
this.Gonghuoshang2.push({
label: v.供货商,
value: v.供货商流水号
})
})
})
},
open() {
if (this.$refs['form3'] !== undefined) {
this.$refs['form3'].resetFields()
@@ -627,8 +674,8 @@ export default {
this.MaterialVarietyValue !== '' ? this.check6 = 1 : this.check6 = 0 // 物料品种
this.MeasurementUnitValue !== '' ? this.check7 = 1 : this.check7 = 0 // 计量单位
this.MaterialSourceValue !== '' ? this.check8 = 1 : this.check8 = 0 // 物料来源
this.supplier !== '' ? this.check9 = 1 : this.check9 = 0 // 供货商
searchmaterial(this.check1, this.MaterialName, this.check2, this.FullNameOfMaterial, this.check3, this.MaterialSpecification, this.check4, this.MaterialModel, this.pageCurrent, this.pageSize, this.check5, this.MaterialCategoryValue, this.check6, this.MaterialVarietyValue, this.check7, this.MeasurementUnitValue, this.check8, this.MaterialSourceValue, this.check9, this.supplierValue).then(response => {
this.GonghuoshangValue !== '' ? this.check9 = 1 : this.check9 = 0 // 供货商
searchmaterial(this.check1, this.MaterialName, this.check2, this.FullNameOfMaterial, this.check3, this.MaterialSpecification, this.check4, this.MaterialModel, this.pageCurrent, this.pageSize, this.check5, this.MaterialCategoryValue, this.check6, this.MaterialVarietyValue, this.check7, this.MeasurementUnitValue, this.check8, this.MaterialSourceValue, this.check9, this.GonghuoshangValue).then(response => {
this.tableData = response.data.result
this.total = parseInt(response.data.output[0].ItemCount)
})
@@ -692,7 +739,7 @@ export default {
this.addForm('form', [this.dialogFormVisible1 = true, this.title = '增加'])
},
submitAdd() { // 提交增加
this.addTable(addData, [this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.supplierValue1], 'form', function() {
this.addTable(addData, [this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.form.GonghuoshangValue], 'form', function() {
this.dialogFormVisible1 = false
this.searchMaterial()
})

View File

@@ -292,7 +292,7 @@
</el-table-column>
<el-table-column align="center" label="创立日期">
<template slot-scope="scope">
{{ scope.row.创立日期 }}
{{ scope.row.创立日期&&scope.row.创立日期!=='1900-01-01' ? scope.row.创立日期 : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="注册资本">
@@ -435,7 +435,6 @@ export default {
methods: {
searchData() {
searchData1(this.contractNumValue).then(response => {
console.log(response.data, 222)
for (let j = 0; j < response.data.length; j++) {
response.data[j].物料计划到货时间 = (response.data[j].物料计划到货时间).split(' ')[0]
}

View File

@@ -182,9 +182,9 @@
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="求购重量" align="center">
<el-table-column label="成品尺寸(长、宽、高)" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.重量1" size="mini" style="width:120px" @change="saveWeight(scope.$index, scope.row)"/>
<el-input v-model="scope.row.成品尺寸" size="mini" style="width:120px" @change="saveWeight(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="单价" align="center" >
@@ -368,7 +368,7 @@
</div>
</el-dialog>
<el-card style="width: 1100px;margin: 10px auto">
<div id="cjn" style="width: 1000px;margin: 0 auto">
<div id="WGBLD" style="width: 1000px;margin: 0 auto">
<table cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr>
<th colspan="14"><h3>江苏高精机电装备有限公司</h3></th>
@@ -389,7 +389,7 @@
<td colspan="5" style="text-align: center;width: 35%">{{ 计划完成日期 }}</td>
</tr>
</table>
<table cellspacing="0px" align="center" border="1 solid black" width="100%" style="margin-top: 20px">
<table cellspacing="0px" align="center" border="1 solid black" width="100%" style="margin-top: 0px">
<tr id="tablehead" style="height: 35px">
<td style="text-align: center;width: 7%">序号</td>
<td colspan="2" style="text-align: center;width: 20%">图号</td>
@@ -397,7 +397,7 @@
<td colspan="2" style="text-align: center;width: 10%">材料</td>
<td colspan="2" style="text-align: center;width: 8%">单位</td>
<td colspan="2" style="text-align: center;width: 8%">数量</td>
<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>
</tr>
<tr v-for="(list, index) in tableData3" :key="index" style="height: 35px">
@@ -407,7 +407,7 @@
<td colspan="2" style="text-align: center;width: 10%">{{ list.材料 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.单位 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.批次数量 }}</td>
<td colspan="2" style="text-align: center;width: 20%">{{ list.重量 }}</td>
<td colspan="2" style="text-align: center;width: 20%">{{ list.成品尺寸 }}</td>
<td style="text-align: center;width: 17%">{{ list.备注1 }}</td>
</tr>
</table>
@@ -423,6 +423,7 @@ import { initPartDrawing, searchPurchasedMaterials, searchPurchaseOrder, searchS
import QRCode from 'qrcode'
import $ from 'jquery'
import { mapGetters } from 'vuex'
export default {
name: '', // 采购计划
data() {
@@ -555,13 +556,7 @@ export default {
}
},
saveWeight(index, row) {
var reg = /^[0-9]*$/
if (!reg.test(row.重量1)) {
this.$message.error('请输入正确的重量')
row.重量1 = ''
} else {
saveWeight(row.采购计划明细流水号, row.重量1, row.备注1, row.单价)
}
saveWeight(row.采购计划明细流水号, row.成品尺寸, row.备注1, row.单价)
},
saveMoney(index, row) {
var reg = /^[0-9]*$/
@@ -569,11 +564,11 @@ export default {
this.$message.error('请输入正确的单价')
row.单价 = ''
} else {
saveWeight(row.采购计划明细流水号, row.重量1, row.备注1, row.单价)
saveWeight(row.采购计划明细流水号, row.成品尺寸, row.备注1, row.单价)
}
},
saveRemarks(index, row) {
saveWeight(row.采购计划明细流水号, row.重量1, row.备注1, row.单价)
saveWeight(row.采购计划明细流水号, row.成品尺寸, row.备注1, row.单价)
},
// ///////////////////////////////////////////////////////////////////////////////////////0529新加↑
useqrcode(contractNum) {
@@ -777,7 +772,6 @@ export default {
this.计划完成日期 = row.计划完成日期.split(' ')[0]
this.下单日期 = row.下单日期.split(' ')[0]
searchMateriel(this.purchasingOrderNumber).then(response => {
console.log(response.data)
this.tableData3 = response.data
})
},
@@ -863,7 +857,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const htmlNode = $('#cjn').html()
const htmlNode = $('#WGBLD').html()
const body = $('body')
body.children().hide()
const printNode = $(htmlNode)

View File

@@ -0,0 +1,92 @@
<template>
<div>
<el-card>
<el-col style="margin-left: 0px">
<span>零件图号:</span>
<el-input v-model="partDrawingNumber" placeholder="零件图号" size="small" clearable style="margin: 3px 0"/>
<el-tooltip :open-delay="1200" effect="dark" content="查询备料零件" placement="top">
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="向选择的采购单里添加采购零件" placement="top">
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入物料</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="将零件打回重新分配备料计划" placement="top">
<el-button type="danger" size="small" icon="el-icon-download" style="margin-left: 10px" @click="back">打回</el-button>
</el-tooltip>
<el-table v-loading="loading1" :data="tableData1" border stripe highlight-current-row style="width: 100%;margin-top:3px;" height="330" size="mini" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column label="零件图号" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="数量" width="140" align="center">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="材料" align="center">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent1"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, prev, pager, next"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-col>
</el-card>
</div>
</template>
<script>
</script>
<style scoped>
.offlineContract td{
height: 40px;
text-align: center;
}
/*.el-card{*/
/* margin-bottom: 15px;*/
/*}*/
.el-date-editor{
width:150px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
/*margin: 10px 0 10px 0px;*/
}
.el-tag{
margin: 0
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
.edit-input {
padding-right: 100px;
}
.cancel-btn {
position: absolute;
right: 15px;
top: 5px;
}
</style>

View File

@@ -17,7 +17,7 @@
<span class="svg-container svg-container_login">
<svg-icon icon-class="username" />
</span>
<el-input v-model="loginForm.username" name="username" type="text" auto-complete="on" placeholder="请输入用户名" @input.native="changeUser" />
<el-input v-model="loginForm.username" name="username" type="text" auto-complete="off" placeholder="请输入用户名" @input.native="changeUser" />
</el-form-item>
<el-form-item prop="password">
<span class="svg-container">