Merge branch 'master' of ssh://192.168.0.149:29418/高精2.0

This commit is contained in:
jiangfuzhuang
2019-06-01 10:57:43 +08:00
15 changed files with 492 additions and 94 deletions

View File

@@ -55,14 +55,14 @@ export function getExport2(num) {
})
}
// 查询分配后的标准件和外购件
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6) {
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6, val7) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_分配后',
param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}&人员编号=${person}&项目流水号_check=${check4}&项目流水号=${val4}&机床流水号_check=${check5}&机床流水号=${val5}&组件流水号_check=${check6}&组件流水号=${val6}`,
param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}&人员编号=${person}&项目流水号_check=${check4}&项目流水号=${val4}&机床流水号_check=${check5}&机床流水号=${val5}&组件流水号_check=${check6}&组件流水号=${val6}&零件类型=${val7}`,
Pagination: pageCurrent + '&' + pageSize
}
})

View File

@@ -171,14 +171,14 @@ export function setSafeValue(...params) {
})
}
// 查询分配后的标准件和外购件
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person) {
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, type) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_分配后',
param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}&人员编号=${person}`,
param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}&人员编号=${person}&零件类型=${type}`,
Pagination: pageCurrent + '&' + pageSize
}
})

View File

@@ -31,7 +31,7 @@ export function searchTable1(...params) {
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_分配后_加供应商',
param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}`,
param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&零件类型=${params[6]}`,
Pagination: params[4] + '&' + params[5]
}
})

View File

@@ -77,7 +77,7 @@ export function searchTable1(...params) {
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_分配后',
param: `物料类别流水号_check=${params[2]}&物料类别流水号=${params[3]}&物料品种流水号_check=${params[4]}&物料品种流水号=${params[5]}&项目流水号_check=${params[6]}&项目流水号=${params[7]}&机床流水号_check=${params[8]}&机床流水号=${params[9]}&组件流水号_check=${params[10]}&组件流水号=${params[11]}&物料名称_check=${params[12]}&物料名称=${params[13]}&物料状态编号=${params[14]}&物料规格_check=${params[15]}&物料规格=${params[16]}&物料型号_check=${params[17]}&物料型号=${params[18]}`,
param: `物料类别流水号_check=${params[2]}&物料类别流水号=${params[3]}&物料品种流水号_check=${params[4]}&物料品种流水号=${params[5]}&项目流水号_check=${params[6]}&项目流水号=${params[7]}&机床流水号_check=${params[8]}&机床流水号=${params[9]}&组件流水号_check=${params[10]}&组件流水号=${params[11]}&物料名称_check=${params[12]}&物料名称=${params[13]}&物料状态编号=${params[14]}&物料规格_check=${params[15]}&物料规格=${params[16]}&物料型号_check=${params[17]}&物料型号=${params[18]}&零件类型=${params[19]}`,
Pagination: params[0] + '&' + params[1]
}
})

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

@@ -75,7 +75,7 @@
<el-table-column label="货位存量" align="center" width="180" prop="货位存量">
<template slot-scope="scope">
<template v-if="scope.row.changeValue">
<el-input-number v-model="scope.row.货位存量" controls-position="right" size="mini" style="width: 90px"/>
<el-input-number v-model="scope.row.货位存量" :min="0" :precision="2" controls-position="right" size="mini" style="width: 90px"/>
<el-button class="cancel-btn" size="mini" type="warning" @click="cancelEdit(scope.row)">取消</el-button>
</template>
<span v-else>{{ scope.row.货位存量 }}</span>
@@ -173,7 +173,7 @@
</el-col>
<el-col style="width: 210px">
<span>货位存量:</span>
<el-input-number v-model="localNumber" :min="0" placeholder="物料名称" size="small" clearable style="margin-bottom: 10px;"/>
<el-input-number v-model="localNumber" :min="0" :precision="2" placeholder="物料名称" size="small" clearable style="margin-bottom: 10px;"/>
</el-col>
<el-col style="width: 180px">
<span>是否为滞货:</span>

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>
<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-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,10 +197,10 @@ export default {
this.editTime = date.getFullYear() + '-' + month + '-' + day
change(row.工艺计划流水号, row.重量, row.单价).then(() => {
handlechange(row.工序流水号, '0000').then(response => {
handlechange2(row.工序流水号, this.form.完成时间)
handlechange2(row.工序流水号, this.editTime).then(response => {
this.searchTable()
})
})
}).then(response => {
this.searchTable()
})
},
handleSelectionChange(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

@@ -3,7 +3,7 @@
<el-row>
<el-col :span="24">
<el-tabs v-model="tabName" type="border-card" @tab-click="tabClick">
<el-tab-pane label="标准件和外购件" name="标准件和外购件">
<el-tab-pane label="外购件" name="外购件">
<el-row style="margin-bottom: 5px">
<span>项目名称:</span>
<el-select v-model="projectValue" style="width:200px" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
@@ -457,6 +457,11 @@
<el-input v-model="scope.row.数量" size="mini" style="width:100%"/>
</template>
</el-table-column>
<el-table-column label="单位" align="center" width="60">
<template slot-scope="scope">
{{ scope.row.计量单位 }}
</template>
</el-table-column>
<el-table-column label="询价备注" align="center" min-width="120">
<template slot-scope="scope">
<el-input v-model="scope.row.备注" size="mini" style="width:100%"/>
@@ -503,7 +508,8 @@
<td width="16.6%" colspan="2">图号</td>
<td width="16.6%" colspan="2">名称</td>
<td width="16.6%" colspan="2">规格</td>
<td width="16.6%" colspan="2">数量</td>
<td width="8.3%">数量</td>
<td width="8.3%">单位</td>
<td width="16.6%" colspan="2">单价</td>
<td colspan="3">备注</td>
</tr>
@@ -809,7 +815,7 @@ export default {
value: 2
}
],
tabName: '标准件和外购件',
tabName: '外购件',
baseInfoLoading: false,
dialogVisible5: false,
form3: { // 询价单基础信息表单
@@ -868,7 +874,7 @@ export default {
materialName: '',
materialSpec: '',
materialModel: '',
tableData11: [], // 标准件和外购件列表
tableData11: [], // 外购件列表
total11: 0,
pageCurrent11: 1,
pageSize11: 10,
@@ -996,7 +1002,7 @@ export default {
const data2 = res2.data.map(v => filterVal2.map(j => v[j]))
dataGroup.push(data2)
const headerGroup = [['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '待询价数量', '备注', '供货商'], ['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '材料', '待询价数量', '备注', '供货商']]
const sheetGroup = ['标准件和外购件(未询价)', '基本件(未询价)']
const sheetGroup = ['外购件(未询价)', '基本件(未询价)']
excel.export_json_to_excel({
headerGroup: headerGroup,
dataGroup: dataGroup,
@@ -1149,7 +1155,7 @@ export default {
filterHandler(value, row) { // 筛选供货商
return row['供货商'] === value
},
searchTable11() { // 查询标准件和外购件列表
searchTable11() { // 查询外购件列表
let check1, check2, check3, check4, check5, check6
this.materialName ? check1 = 1 : check1 = 0
this.materialSpec ? check2 = 1 : check2 = 0
@@ -1157,7 +1163,7 @@ export default {
this.projectValue ? check4 = 1 : check4 = 0
this.machineValue ? check5 = 1 : check5 = 0
this.groupValue ? check6 = 1 : check6 = 0
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).then(response => {
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, 2).then(response => {
this.tableData11 = response.data.rows
this.total11 = response.data.total
const remark = []
@@ -1364,7 +1370,7 @@ export default {
for (let i = 0; i < length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = `<td width="8.3%" height="30px"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" colspan="3"/>`
tr[i].innerHTML = `<td width="8.3%" height="30px"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="8.3%"/><td height="30px" width="8.3%"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" colspan="3"/>`
$('#tablehead').after(tr[i])
}
for (let j = 0; j < res.data.length; j++) {
@@ -1373,7 +1379,8 @@ export default {
document.getElementsByClassName('tableData')[j].children[2].innerHTML = res.data[j].物料名称 || res.data[j].零件名称
document.getElementsByClassName('tableData')[j].children[3].innerHTML = res.data[j].物料规格 || res.data[j].规格
document.getElementsByClassName('tableData')[j].children[4].innerHTML = res.data[j].数量
document.getElementsByClassName('tableData')[j].children[6].innerHTML = res.data[j].备注
document.getElementsByClassName('tableData')[j].children[5].innerHTML = res.data[j].计量单位
document.getElementsByClassName('tableData')[j].children[7].innerHTML = res.data[j].备注
}
document.getElementById('inquirySheetNum').innerHTML = this.orderExport
document.getElementById('supplier').innerHTML = ''
@@ -1422,7 +1429,7 @@ export default {
for (let i = 0; i < length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = `<td width="8.3%" height="30px"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" colspan="3"/>`
tr[i].innerHTML = `<td width="8.3%" height="30px"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" width="8.3%"/><td height="30px" width="8.3%"/><td height="30px" width="16.6%" colspan="2"/><td height="30px" colspan="3"/>`
$('#tablehead').after(tr[i])
}
for (let j = 0; j < res.data.length; j++) {
@@ -1431,7 +1438,8 @@ export default {
document.getElementsByClassName('tableData')[j].children[2].innerHTML = res.data[j].物料名称 || res.data[j].零件名称
document.getElementsByClassName('tableData')[j].children[3].innerHTML = res.data[j].物料规格 || res.data[j].规格
document.getElementsByClassName('tableData')[j].children[4].innerHTML = res.data[j].数量
document.getElementsByClassName('tableData')[j].children[6].innerHTML = res.data[j].备注
document.getElementsByClassName('tableData')[j].children[5].innerHTML = res.data[j].计量单位
document.getElementsByClassName('tableData')[j].children[7].innerHTML = res.data[j].备注
}
document.getElementById('inquirySheetNum').innerHTML = this.orderExport
document.getElementById('supplier').innerHTML = ''

View File

@@ -122,6 +122,11 @@
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="单位" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.计量单位 }}
</template>
</el-table-column>
<el-table-column v-show="hasTax==='未税'" label="单价(未税)" align="center" width="120">
<template slot-scope="scope">
<el-input v-show="hasTax==='未税'" v-model="scope.row.未税单价" size="mini" style="width:100%"/>
@@ -361,6 +366,7 @@ export default {
名称: response.data[i].组件零件流水号 ? response.data[i].物料名称 : response.data[i].零件名称,
规格: response.data[i].组件零件流水号 ? response.data[i].物料规格 : response.data[i].规格,
数量: response.data[i].数量,
计量单位: response.data[i].计量单位,
未税单价: 0,
未税总额: 0,
含税单价: 0,
@@ -518,7 +524,8 @@ export default {
<td>名称</td>
<td>规格型号</td>
<td>数量</td>
<td >单</td>
<td>单</td>
<td>单价</td>
<td>合计</td>
<td>交货时间</td>
<td>备注</td>
@@ -569,6 +576,7 @@ export default {
名称: v.名称,
规格: v.规格,
数量: Number(v.数量),
计量单位: v.计量单位,
单价: this.hasTax === '含税' ? v.含税单价 : v.未税单价,
合计: (Number(v.数量) * (this.hasTax === '含税' ? Number(v.含税单价) : Number(v.未税单价))).toFixed(2),
交货期: v.交货期 ? v.交货期.split(' ')[0] : '',
@@ -576,7 +584,7 @@ export default {
})
})
let mergeData = []
mergeData = groupBy(merge, ['图号', '名称', '规格', '单价', '合计', '交货期', '备注'], (mergeData, v) => {
mergeData = groupBy(merge, ['图号', '名称', '规格', '计量单位', '单价', '合计', '交货期', '备注'], (mergeData, v) => {
mergeData = mergeData || 0
mergeData += v.数量
return mergeData
@@ -587,7 +595,7 @@ export default {
for (let i = 0; i < mergeData.length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = '<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>'
tr[i].innerHTML = '<td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>'
const tableHead = $('#tableHead')
tableHead ? tableHead.after(tr[i]) : ''
}
@@ -606,10 +614,11 @@ export default {
document.getElementsByClassName('tableData')[j].children[4].innerHTML = mergeData[j].名称
document.getElementsByClassName('tableData')[j].children[5].innerHTML = mergeData[j].规格
document.getElementsByClassName('tableData')[j].children[6].innerHTML = mergeData[j].数量
document.getElementsByClassName('tableData')[j].children[7].innerHTML = mergeData[j].单价
document.getElementsByClassName('tableData')[j].children[8].innerHTML = (Number(mergeData[j].数量) * Number(mergeData[j].单价)).toFixed(2)
document.getElementsByClassName('tableData')[j].children[9].innerHTML = mergeData[j].交货期
document.getElementsByClassName('tableData')[j].children[10].innerHTML = mergeData[j].备注
document.getElementsByClassName('tableData')[j].children[7].innerHTML = mergeData[j].计量单位
document.getElementsByClassName('tableData')[j].children[8].innerHTML = mergeData[j].单价
document.getElementsByClassName('tableData')[j].children[9].innerHTML = (Number(mergeData[j].数量) * Number(mergeData[j].单价)).toFixed(2)
document.getElementsByClassName('tableData')[j].children[10].innerHTML = mergeData[j].交货期
document.getElementsByClassName('tableData')[j].children[11].innerHTML = mergeData[j].备注
}
}
this.actualTotal = this.actualTotal.toFixed(2)

View File

@@ -371,6 +371,11 @@
<el-input v-model="scope.row.数量" :disabled="disable" size="mini" style="width:70px"/>
</template>
</el-table-column>
<el-table-column label="单位" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.计量单位 }}
</template>
</el-table-column>
<el-table-column label="参考价格" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.参考价格 }}
@@ -383,7 +388,7 @@
</el-table-column>
<el-table-column label="合计" align="center" min-width="100" prop="合计">
<template slot-scope="scope">
{{ (parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0)).toFixed(2) }}
{{ (Number(scope.row.单价||0) * Number(scope.row.数量||0)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
@@ -636,7 +641,8 @@
<td>规格</td>
<td colspan="2">型号</td>
<td>数量</td>
<td colspan="2">单价</td>
<td>单价</td>
<td>单位</td>
<td colspan="2">合计</td>
<td>交货期</td>
<td colspan="2">备注</td>
@@ -1130,7 +1136,7 @@ export default {
if (index === 0) {
sums[index] = '总价'
} else if (index === 7) {
const values = data.map(item => Number(parseFloat(item['单价']) * parseInt(item['数量'])))
const values = data.map(item => Number(Number(item['单价']) * Number(item['数量'])))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
@@ -1291,7 +1297,7 @@ export default {
for (let i = 0; i < length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = `<td style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/>`
tr[i].innerHTML = `<td style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/>`
$('#tablehead').after(tr[i])
}
let total = 0
@@ -1302,9 +1308,10 @@ export default {
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData3[j].物料型号
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData3[j].数量
document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData3[j].单价
document.getElementsByClassName('tableData')[j].children[6].innerHTML = (this.tableData3[j].数量 * this.tableData3[j].单价).toFixed(2)
document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.tableData3[j].交货期要求
document.getElementsByClassName('tableData')[j].children[8].innerHTML = this.tableData3[j].备注
document.getElementsByClassName('tableData')[j].children[6].innerHTML = this.tableData3[j].计量单位
document.getElementsByClassName('tableData')[j].children[7].innerHTML = (this.tableData3[j].数量 * this.tableData3[j].单价).toFixed(2)
document.getElementsByClassName('tableData')[j].children[8].innerHTML = this.tableData3[j].交货期要求
document.getElementsByClassName('tableData')[j].children[9].innerHTML = this.tableData3[j].备注
total += Number(this.tableData3[j].数量 * this.tableData3[j].单价)
}
total = total.toFixed(2)
@@ -1360,7 +1367,7 @@ export default {
this.materialName ? check1 = 1 : check1 = 0
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
searchMaterial(this.pageCurrent00, this.pageSize00, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id).then(response => {
searchMaterial(this.pageCurrent00, this.pageSize00, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id, 1).then(response => {
this.tableData00 = response.data.rows
this.total00 = response.data.total
const remark = []

View File

@@ -24,7 +24,85 @@
</el-card>
<el-tabs v-model="PartType" type="border-card" @tab-click="searchTable()">
<el-tab-pane label="标准件和外购件" name="标准件和外购件">
<el-tab-pane label="标准件" name="标准件">
<el-table :data="tableData0" size="mini" style="max-height: 600px" height="600px" border stripe>
<el-table-column align="center" label="采购情况" width="80px">
<template slot-scope="scope">
<el-tag v-if="!scope.row.人员编号" type="primary" size="small">未分配</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" 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.询价状态编号)===3&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="机床图号" width="100px">
<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="名称" width="100px">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="型号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="规格" min-width="200px">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="技术下达数量" width="100px">
<template slot-scope="scope">
{{ scope.row.零件数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="合同采购数量" width="100px">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.数量 || scope.row.离线采购数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="到货数量" width="100px">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.已到货数量 || scope.row.离线到货数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="供应商" min-width="150px">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.供应商名称 || scope.row.离线合同供应商名称 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="合同编号" min-width="100px">
<template slot-scope="scope">
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.采购合同编号 || scope.row.离线合同编号 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购员" width="100px">
<template slot-scope="scope">
{{ scope.row.姓名 || '—' }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent0"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize0"
:total="total0"
style="margin-top:10px;display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange0"
@current-change="handleCurrentChange0"/>
</div>
</el-tab-pane>
<el-tab-pane label="外购件" name="外购件">
<el-table :data="tableData1" size="mini" style="max-height: 600px" height="600px" border stripe>
<el-table-column align="center" label="采购情况" width="80px">
<template slot-scope="scope">
@@ -200,10 +278,14 @@ export default {
machineNumber: [],
groupNumberValue: '',
groupNumber: [],
PartType: '标准件和外购件',
PartType: '标准件',
tableData0: [],
tableData1: [],
tableData2: [],
tableData3: [],
pageCurrent0: 1,
pageSize0: 20,
total0: 0,
pageCurrent1: 1,
pageSize1: 20,
total1: 0,
@@ -247,18 +329,23 @@ export default {
})
},
searchTable() {
if (this.PartType === '标准件和外购件') {
this.pageCurrent1 = 1
this.pageSize1 = 20
this.total1 = 0
if (this.PartType === '标准件') {
this.searchTable0()
} else if (this.PartType === '外购件') {
this.searchTable1()
} else if (this.PartType === '基本件') {
this.pageCurrent2 = 1
this.pageSize2 = 20
this.total2 = 0
this.searchTable2()
}
},
handleSizeChange0(val) {
this.pageSize0 = val
this.pageCurrent0 = 1
this.searchTable0()
},
handleCurrentChange0(val) {
this.pageCurrent0 = val
this.searchTable0()
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
@@ -277,11 +364,20 @@ export default {
this.pageCurrent2 = val
this.searchTable2()
},
searchTable1() { // 查询标准件和外购件
searchTable0() { // 查询标准件
let check1, check2
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent1, this.pageSize1).then(response => {
searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent0, this.pageSize0, 1).then(response => {
this.tableData0 = response.data.rows
this.total0 = response.data.total
})
},
searchTable1() { // 查询外购件
let check1, check2
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
searchTable1(check1, this.machineNumberValue, check2, this.groupNumberValue, this.pageCurrent1, this.pageSize1, 2).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})

View File

@@ -1,7 +1,221 @@
<template>
<div class="app-container">
<el-tabs v-model="tabName" type="border-card" @tab-click="searchTable1();searchTable2()">
<el-tab-pane label="标准件和外购件" name="标准件和外购件">
<el-tabs v-model="tabName" type="border-card" @tab-click="searchTable0();searchTable1();searchTable2();">
<el-tab-pane label="标准件" name="标准件">
<el-row style="margin-bottom: 5px">
<span style="margin-left: 0">项目名称:</span>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床图号:</span>
<el-select v-model="machineValue" placeholder="机床图号" size="small" filterable clearable @change="machineChange">
<el-option
v-for="item in machine"
:key="item.value"
:label="item.label"
:value="item.value">
<b style="float: left">{{ item.label }}</b>
<b style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</b>
</el-option>
</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>
<div style="float:right;">
<span style="margin-left: 0">采购员:</span>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</div>
</el-row>
<el-row style="margin-bottom: 5px">
<span style="margin-left: 0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</span>
<el-select v-model="groupValue" placeholder="组号" size="small" filterable clearable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-right: -10px">物料状态:</span>
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
<div style="float:right;padding-top:10px;">
<el-button
type="primary"
size="small"
icon="el-icon-menu"
style="margin-left: 10px"
@click="allocateTask1">分配</el-button>
<el-button
type="danger"
size="small"
icon="el-icon-back"
style="margin-left: 10px"
@click="executeReturn1">退回</el-button>
</div>
</el-row>
<el-row style="margin-bottom: 15px">
<span style="margin-left: 0">物料类别:</span>
<el-select
v-model="MaterialCategoryValue"
placeholder="请选择"
size="small"
clearable
@change="searchMaterialVariety">
<el-option
v-for="item in MaterialCategory"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>物料品种:</span>
<el-select
v-model="MaterialVarietyValue"
placeholder="请选择"
size="small"
clearable>
<el-option
v-for="item in MaterialVariety"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-row>
<el-row style="margin-bottom: 15px">
<span style="margin-left: 0">物料名称:</span>
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
<span>物料规格:</span>
<el-input v-model="materialSpec" placeholder="物料规格" size="small" clearable/>
<span>物料型号:</span>
<el-input v-model="materialModel" placeholder="物料型号" size="small" clearable/>
</el-row>
<el-row style="margin-bottom: 10px">
<el-table v-loading="" :data="tableData0" size="mini" style="max-height: 600px" height="500px" border stripe @selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable" align="center" type="selection"/>
<el-table-column align="center" label="采购情况" min-width="80px">
<template slot-scope="scope">
<el-tag v-if="scope.row.人员编号===''" type="primary" size="small">未分配</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" 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.采购状态编号)===3" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" min-width="100px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床图号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" min-width="80px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料类别" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料类别 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料品种" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料品种 }}
</template>
</el-table-column>
<el-table-column align="center" label="图号或型号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="名称" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="规格" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="数量" min-width="80px">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注" min-width="100px">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column align="center" label="供货商" min-width="100px">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}
</template>
</el-table-column>
<el-table-column align="center" label="计划到货时间" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料计划到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column align="center" label="生产分配时间" min-width="100px">
<template slot-scope="scope">
{{ scope.row.操作日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" prop="姓名">
<template slot-scope="scope">
{{ scope.row.姓名 ? scope.row.姓名 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购分配时间" min-width="100px">
<template slot-scope="scope">
{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="撤回分配" min-width="100px" fixed="right">
<template slot-scope="scope">
<el-button
:disabled="!(parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='')"
type="primary"
size="mini"
icon="el-icon-back"
@click="retract(scope.row)">撤回</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<div class="block">
<el-pagination
:current-page="pageCurrent0"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize0"
:total="total0"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange0"
@current-change="handleCurrentChange0"/>
</div>
</el-tab-pane>
<el-tab-pane label="外购件" name="外购件">
<el-row style="margin-bottom: 5px">
<span style="margin-left: 0">项目名称:</span>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
@@ -419,7 +633,7 @@ export default {
value: 2
}
],
tabName: '标准件和外购件',
tabName: '标准件',
partNum: '',
partName: '',
partSpec: '',
@@ -472,12 +686,16 @@ export default {
check2: 0,
check3: 0,
check4: 0,
tableData0: [],
tableData1: [],
tableData2: [],
standardAndPurchase: [],
basic: [],
groupAndPart: [],
groupAndPartBasic: [],
pageCurrent0: 1,
pageSize0: 20,
total0: 0,
pageCurrent1: 1,
pageSize1: 20,
total1: 0,
@@ -493,7 +711,7 @@ export default {
])
},
created() {
this.searchTable1() // 查表1
this.searchTable0() // 查表1
this.fetchData() // 初始化数据
},
methods: {
@@ -520,6 +738,7 @@ export default {
retract1(row.标准件和外购件流水号).then(res => {
if (Number(res.data[0].result) === 1) {
this.$message.success('撤回成功')
this.searchTable0()
this.searchTable1()
} else {
this.$message.error('撤回失败')
@@ -585,7 +804,7 @@ export default {
this.MaterialVarietyValue = ''
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety', this.MaterialCategoryValue)
},
searchTable1() { // 查询标准件和外购件
searchTable0() { // 查询标准件
this.MaterialCategoryValue ? this.check1 = 1 : this.check1 = 0
this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0
this.projectValue ? this.check3 = 1 : this.check3 = 0
@@ -595,8 +814,22 @@ export default {
this.materialName ? this.check4 = 1 : this.check4 = 0
this.materialSpec ? check2 = 1 : check2 = 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).then(response => {
console.log(response.data.rows)
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).then(response => {
this.tableData0 = response.data.rows
this.total0 = response.data.total
})
},
searchTable1() { // 查询外购件
this.MaterialCategoryValue ? this.check1 = 1 : this.check1 = 0
this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0
this.projectValue ? this.check3 = 1 : this.check3 = 0
let check0, check1, check2, check3
this.machineValue ? check0 = 1 : check0 = 0
this.groupValue ? check1 = 1 : check1 = 0
this.materialName ? this.check4 = 1 : this.check4 = 0
this.materialSpec ? check2 = 1 : check2 = 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 => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
@@ -648,6 +881,7 @@ export default {
allocateTask1(this.standardAndPurchase, this.personValue).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable0()
this.searchTable1()
} else { this.$message.error('操作失败') }
})
@@ -687,6 +921,15 @@ export default {
filterHandler(value, row) {
return parseInt(row['人员编号']) === parseInt(value)
},
handleSizeChange0(val) {
this.pageSize0 = val
this.pageCurrent0 = 1
this.searchTable0()
},
handleCurrentChange0(val) {
this.pageCurrent0 = val
this.searchTable0()
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
@@ -717,6 +960,7 @@ export default {
executeReturn1(this.standardAndPurchase, this.groupAndPart).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable0()
this.searchTable1()
} else { this.$message.error('操作失败') }
})

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() {