This commit is contained in:
chenjianan
2019-06-01 09:38:38 +08:00
5 changed files with 76 additions and 42 deletions

View File

@@ -25,6 +25,18 @@ export function addMateriel2(num1, num2) {
}
})
}
// 保存重量和备注
export function saveWeight(num1, num2, num3, num4) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '备料管理_采购计划明细_保存重量和备注',
param: `采购计划明细流水号=${num1}&重量=${num2}&备注=${num3}&单价=${num4}`
}
})
}
// ////////////////////////////////////////////////////////////////////////////////0529新加↑
// 查询外购备料列表

View File

@@ -1,14 +1,11 @@
<template>
<div>
<el-card>
<el-row>
<span>零件图号:</span>
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
<el-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit2()">自家备料确认</el-button>
</el-row>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange2">
<el-table-column type="selection" width="55" align="center"/>
@@ -17,7 +14,7 @@
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" width="240px">
<el-table-column label="零件图号" align="center" width="280px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
@@ -40,6 +37,7 @@
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card>
<span>零件图号:</span>
<el-input v-model="partName2" placeholder="零件图号" size="small" clearable style="width:200px"/>
@@ -149,7 +147,6 @@ export default {
})
}
},
// ////////////////////////////////////////////////////////////////////////////0530新↑
// 查询表格数据
searchTable() {
this.loading = true
@@ -160,7 +157,7 @@ export default {
} else {
this.partNamecheck = false
}
searchtable(this.partNamecheck, this.partName, !this.all, this.pageCurrent, this.pageSize).then(response => {
searchtable(this.partNamecheck, this.partName, 0, this.pageCurrent, this.pageSize).then(response => {
if (response.data.total === 0) {
this.loading = false
} else {
@@ -200,11 +197,11 @@ export default {
this.editTime = date.getFullYear() + '-' + month + '-' + day
change(row.工艺计划流水号, row.重量, row.单价).then(() => {
handlechange(row.工序流水号, '0000').then(response => {
handlechange2(row.工序流水号, this.form.完成时间)
})
}).then(response => {
handlechange2(row.工序流水号, this.editTime).then(response => {
this.searchTable()
})
})
})
},
handleSelectionChange(val) {
this.arrest = val

View File

@@ -5,9 +5,6 @@
<span>零件图号:</span>
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
<!--<el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox>-->
<!--<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">自家备料确认</el-button>-->
<!--<el-button size="small" icon="el-icon-refresh" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">刷新</el-button>-->
</el-row>
</el-card>
@@ -44,7 +41,7 @@
size="mini"
type="primary"
class="el-icon-edit"
@click="handleChange1(scope.row)">备料确认</el-button>
@click="handleChange1(scope.row)">出库</el-button>
</template>
</el-table-column>
</el-table>
@@ -64,7 +61,7 @@
<span>零件图号:</span>
<el-input v-model="partName2" placeholder="零件图号" size="small" clearable style="width:200px"/>
<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-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">外购备料确认</el-button>
<el-button size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">外购备料出库</el-button>
</el-card>
<el-card>
<el-table v-loading="loading2" :data="tableData2" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange">
@@ -115,7 +112,7 @@
</template>
<script>
import { searchtable, searchtable2, change, handlechange, searchtable3, change2, handlechange2 } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
import { searchtable, searchtable2, change, handlechange, searchtable3, change2, handlechange2 } from '@/api/ManufacturingCenter/SparePartsOut'
import { mapGetters } from 'vuex'
export default {
data() {

View File

@@ -1,7 +1,7 @@
<template>
<div class="app-container">
<el-card>
<el-col :span="9">
<el-col v-show="false" :span="9">
<span>原材料名称:</span>
<el-input v-model="RawMaterialName" placeholder="原材料名称" size="mini" clearable style="width: 120px"/>
<el-button type="success" icon="el-icon-search" size="mini" style="margin-left: 10px" @click="pageCurrent=1;searchRawMaterial()">查询</el-button>
@@ -25,11 +25,11 @@
@current-change="handleCurrentChange1"/>
</div>
</el-col>
<el-col :span="14" style="margin-left: 20px">
<el-col :span="22" style="margin-left: 20px">
<span>零件图号:</span>
<el-input v-model="partDrawingNumber" placeholder="零件图号" size="mini" clearable style="width: 120px"/>
<el-button type="success" size="mini" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入物料</el-button>
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入物料</el-button>
<el-table v-loading="loading1" :data="tableData1" border style="width: 100%;height: 460px;margin-top: 15px;" 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">
@@ -42,12 +42,12 @@
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="数量" width="80" align="center">
<el-table-column label="数量" width="140" align="center">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="材料" width="80" align="center">
<el-table-column label="材料" width="140" align="center">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
@@ -134,44 +134,49 @@
@current-change="handleCurrentChange2"/>
</div>
<el-table v-loading="" :data="tableData3" border style="max-height: 300px;" height="300px" size="mini">
<el-table-column label="物料编码" align="center" min-width="150">
<el-table-column label="物料编码" align="center" width="200">
<template slot-scope="scope">
{{ scope.row.物料零件编码 }}
</template>
</el-table-column>
<el-table-column label="原材料名称" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.原材料名称 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" min-width="150">
<!--<el-table-column label="原材料名称" align="center" min-width="150">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.原材料名称 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="零件名称" align="center" width="180">
<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" width="100">
<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" width="100">
<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" width="150">
<template slot-scope="scope">
{{ scope.row.重量 }}
<el-input v-model="scope.row.重量1" size="mini" style="width:120px" @change="saveWeight(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="100" prop="备注">
<el-table-column label="单价" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.备注1" :disabled="disable" size="mini" style="width:150px"/>
<el-input v-model="scope.row.单价" size="mini" style="width:120px" @change="saveMoney(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100">
<el-table-column label="备注" align="center" prop="备注">
<template slot-scope="scope">
<el-button :disabled="disable" type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移出</el-button>
<el-input v-model="scope.row.备注1" :disabled="disable" size="mini" style="width:150px" @change="saveRemarks(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="150">
<template slot-scope="scope">
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移出</el-button>
</template>
</el-table-column>
</el-table>
@@ -389,7 +394,7 @@
<script>
import { initPartDrawing, searchPurchasedMaterials, searchPurchaseOrder, searchSupplier, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, searchMateriel,
addMateriel, deleteMateriel, saveMateriel, searchRawMaterial, addMateriel2 } from '@/api/WorkshopProcurement/CreatingPurchasingMaterials'
addMateriel, deleteMateriel, saveMateriel, searchRawMaterial, addMateriel2, saveWeight } from '@/api/WorkshopProcurement/CreatingPurchasingMaterials'
import QRCode from 'qrcode'
import $ from 'jquery'
import { mapGetters } from 'vuex'
@@ -523,6 +528,27 @@ export default {
this.RawMaterialGroup.push(val[i].原材料流水号)
}
},
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.单价)
}
},
saveMoney(index, row) {
var reg = /^[0-9]*$/
if (!reg.test(row.单价)) {
this.$message.error('请输入正确的单价')
row.单价 = ''
} else {
saveWeight(row.采购计划明细流水号, row.重量1, row.备注1, row.单价)
}
},
saveRemarks(index, row) {
saveWeight(row.采购计划明细流水号, row.重量1, row.备注1, row.单价)
},
// ///////////////////////////////////////////////////////////////////////////////////////0529新加↑
useqrcode(contractNum) {
const opts = {
@@ -724,6 +750,7 @@ export default {
this.计划完成日期 = row.计划完成日期.split(' ')[0]
this.下单日期 = row.下单日期.split(' ')[0]
searchMateriel(this.purchasingOrderNumber).then(response => {
console.log(response.data)
this.tableData3 = response.data
})
},

View File

@@ -94,9 +94,9 @@
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="原材料名称" align="center" min-width="150">
<el-table-column label="物料编码" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.原材料名称 }}
{{ scope.row.物料零件编码 }}
</template>
</el-table-column>
<el-table-column label="材料" align="center" min-width="100">
@@ -197,6 +197,7 @@ export default {
},
created() {
this.fetchData()
this.searchTable()
},
methods: {
fetchData() {