更新
This commit is contained in:
@@ -75,6 +75,18 @@ export function getExport2(num) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 使用库存
|
||||||
|
export function changeNum(num, num1, num2, num3, num4) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '采购管理_离线采购_占用数量_插入',
|
||||||
|
param: `物料流水号=${num}&使用库存数=${num1}&机床流水号=${num2}&组件零件流水号=${num3}&数量=${num4}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
// 查询分配后的标准件和外购件
|
// 查询分配后的标准件和外购件
|
||||||
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6, val8, val9, val10) {
|
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6, val8, val9, val10) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
27
src/api/WorkshopProcurement/OutsourcingMaterialsSearch.js
Normal file
27
src/api/WorkshopProcurement/OutsourcingMaterialsSearch.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询供应商
|
||||||
|
export function searchSupplier(check1, value1, check2, value2, check3, value3, check4, value4, check5, value5, check6, value6, check7, value7, check8, value8, check9, value9, check10, value10, check11, value11, check12, value12) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '采购管理_供应商_查询数据_根据条件',
|
||||||
|
param: '供应商名称_check=' + check1 + '&供应商名称=' + value1 + '&企业性质_check=' + check2 + '&企业性质=' + value2 + '&创立日期_check=' + check3 + '&创立日期=' + value3 + '&注册资本_check=' + check4 + '&注册资本=' + value4 + '&税号_check=' + check5 + '&税号=' + value5 + '&电子信箱_check=' + check6 + '&电子信箱=' + value6 + '&地址_check=' + check7 + '&地址=' + value7 + '&帐号_check=' + check8 + '&帐号=' + value8 + '&开户行_check=' + check9 + '&开户行=' + value9 + '&电话号码_check=' + check10 + '&电话号码=' + value10 + '&传真_check=' + check11 + '&传真=' + value11 + '&货期_check=' + check12 + '&货期=' + value12
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询备料
|
||||||
|
export function searchTable(check, supplierNameValue, check1, partNumber, check2, MaterialsValue, pageSize, pageCurrent) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '备料管理_外购备料_综合查询数据',
|
||||||
|
param: '供应商流水号_check=' + check + '&供应商流水号=' + supplierNameValue + '&零件图号_check=' + check1 + '&零件图号=' + partNumber + '&备料状态_check=' + check2 + '&备料状态=' + MaterialsValue,
|
||||||
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -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.0.103:8074/submit/MESCommonBase.ashx`,
|
||||||
timeout: 1500000 // 请求超时时间
|
timeout: 1500000 // 请求超时时间
|
||||||
})
|
})
|
||||||
export default service
|
export default service
|
||||||
|
|||||||
@@ -174,12 +174,18 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="待询价数" align="center" min-width="80">
|
<el-table-column label="待询价数" align="center" min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.待询价数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
|
{{ Number(scope.row.零件类型) === 1 ? scope.row.待询价数量 = Number(scope.row.零件数量) - Number(scope.row.使用库存数) : scope.row.待询价数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库存数" align="center" min-width="60">
|
<el-table-column label="库存(BZ)" align="center" min-width="70" prop="库存">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ Number(scope.row.货位存量) }}
|
{{ Number(scope.row.零件类型) === 1 ? scope.row.库存 = Number(scope.row.货位存量 ? scope.row.货位存量 : 0) - Number(scope.row.占用数量) : '-' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="使用库存数量" align="center" min-width="105" prop="使用库存数">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="Number(scope.row.零件类型) !== 1">-</span>
|
||||||
|
<el-input-number v-if="Number(scope.row.零件类型) === 1" v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > (Number(scope.row.货位存量) - Number(scope.row.占用数量)) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量) + Number(scope.row.使用库存数)) : Number(scope.row.零件数量)" :disabled="(Number(scope.row.货位存量) - Number(scope.row.占用数量)) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 90px" @change="changeNumber(scope.row)"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="已用滞货" align="center" min-width="70">
|
<el-table-column label="已用滞货" align="center" min-width="70">
|
||||||
@@ -1086,7 +1092,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { timeSearch, timeChange1, timeChange2, tiaozheng2, tiaozheng1, getPerson, getBillNum, searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
|
import { timeSearch, timeChange1, timeChange2, tiaozheng2, tiaozheng1, getPerson, getBillNum, searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
|
||||||
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder,
|
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder,
|
||||||
submitUseInventory, initProject, searchMachine, searchGroup, searchBaseInfo, editBaseInfo, getExport1, getExport2, searchMerge } from '@/api/PurchasingCenter/CreateInquirySheet'
|
submitUseInventory, initProject, searchMachine, searchGroup, searchBaseInfo, editBaseInfo, getExport1, getExport2, searchMerge, changeNum } from '@/api/PurchasingCenter/CreateInquirySheet'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { exportExcelMethod } from './exportExcel'
|
import { exportExcelMethod } from './exportExcel'
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
@@ -1316,6 +1322,16 @@ export default {
|
|||||||
this.searchTable11()
|
this.searchTable11()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
changeNumber(row) {
|
||||||
|
changeNum(row.物料流水号, row.使用库存数, row.机床流水号, row.组件零件流水号, row.零件数量).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('使用成功')
|
||||||
|
this.searchTable11()
|
||||||
|
} else {
|
||||||
|
this.$message.success('使用失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
handleSelection(val, row) {
|
handleSelection(val, row) {
|
||||||
this.tableData11.forEach((item, i) => {
|
this.tableData11.forEach((item, i) => {
|
||||||
if (item.组件零件流水号 === row.组件零件流水号) {
|
if (item.组件零件流水号 === row.组件零件流水号) {
|
||||||
|
|||||||
@@ -47,15 +47,9 @@
|
|||||||
style="width: 100%;max-height: 500px;"
|
style="width: 100%;max-height: 500px;"
|
||||||
height="500px"
|
height="500px"
|
||||||
size="mini"
|
size="mini"
|
||||||
@selection-change="handleSelectionChange1">
|
@selection-change="handleSelectionChange1"
|
||||||
|
@select="handleSelection">
|
||||||
<el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
|
<el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
|
||||||
<el-table-column label="物料状态" prop="询价状态编号" align="center" width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===1" type="warning" size="small">未询价</el-tag>
|
|
||||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
|
|
||||||
<el-tag v-if="parseInt(scope.row.询价状态编号)!==1&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="名称" align="center" prop="物料名称" min-width="100" show-overflow-tooltip>
|
<el-table-column label="名称" align="center" prop="物料名称" min-width="100" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.物料名称 }}
|
{{ scope.row.物料名称 }}
|
||||||
@@ -109,7 +103,7 @@
|
|||||||
<el-table-column label="使用库存数量" align="center" min-width="105" prop="使用库存数">
|
<el-table-column label="使用库存数量" align="center" min-width="105" prop="使用库存数">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="Number(scope.row.零件类型) !== 1">-</span>
|
<span v-if="Number(scope.row.零件类型) !== 1">-</span>
|
||||||
<el-input-number v-if="Number(scope.row.零件类型) === 1" v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > Number(scope.row.货位存量) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量)) : Number(scope.row.零件数量)" :disabled="Number(scope.row.货位存量) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 90px" @change="changeNumber(scope.row)"/>
|
<el-input-number v-if="Number(scope.row.零件类型) === 1" v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > (Number(scope.row.货位存量) - Number(scope.row.占用数量)) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量) + Number(scope.row.使用库存数)) : Number(scope.row.零件数量)" :disabled="(Number(scope.row.货位存量) - Number(scope.row.占用数量)) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 90px" @change="changeNumber(scope.row)"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="待采数量" align="center" min-width="70" prop="待采购数量">
|
<el-table-column label="待采数量" align="center" min-width="70" prop="待采购数量">
|
||||||
@@ -171,11 +165,13 @@
|
|||||||
<el-table
|
<el-table
|
||||||
v-loading=""
|
v-loading=""
|
||||||
:data="tableData22"
|
:data="tableData22"
|
||||||
|
:row-class-name="tableRowClassName2"
|
||||||
border
|
border
|
||||||
style="width: 100%;max-height: 500px;"
|
style="width: 100%;max-height: 500px;"
|
||||||
height="500px"
|
height="500px"
|
||||||
size="mini"
|
size="mini"
|
||||||
@selection-change="handleSelectionChange1">
|
@selection-change="handleSelectionChange1"
|
||||||
|
@select="handleSelection1">
|
||||||
<el-table-column align="center" width="50" type="selection"/>
|
<el-table-column align="center" width="50" type="selection"/>
|
||||||
<el-table-column label="名称" align="center" prop="物料名称" min-width="100" show-overflow-tooltip>
|
<el-table-column label="名称" align="center" prop="物料名称" min-width="100" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -808,6 +804,8 @@ export default {
|
|||||||
tableData4: [], // 合同模板
|
tableData4: [], // 合同模板
|
||||||
stipulateArrivalTime: '', // 规定到货时间
|
stipulateArrivalTime: '', // 规定到货时间
|
||||||
离线合同状态: '',
|
离线合同状态: '',
|
||||||
|
numbers: [],
|
||||||
|
numbers1: [],
|
||||||
paramRow: '', // 参数row
|
paramRow: '', // 参数row
|
||||||
disable: true, // 其他的禁用
|
disable: true, // 其他的禁用
|
||||||
tabName: '标准件',
|
tabName: '标准件',
|
||||||
@@ -830,6 +828,55 @@ export default {
|
|||||||
this.initDirection()
|
this.initDirection()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleSelection(val, row) {
|
||||||
|
console.log(row, 123)
|
||||||
|
this.tableData00.forEach((item, i) => {
|
||||||
|
if (item.组件零件流水号 === row.组件零件流水号 && row.组件零件流水号 !== '0') {
|
||||||
|
if (this.numbers.indexOf(i) === -1) {
|
||||||
|
this.numbers.push(i)
|
||||||
|
} else {
|
||||||
|
this.numbers.splice(this.numbers.indexOf(i), 1)
|
||||||
|
}
|
||||||
|
} else if (item.组件零件基本件流水号 === row.组件零件基本件流水号 && row.组件零件基本件流水号 !== '0') {
|
||||||
|
if (this.numbers.indexOf(i) === -1) {
|
||||||
|
this.numbers.push(i)
|
||||||
|
} else {
|
||||||
|
this.numbers.splice(this.numbers.indexOf(i), 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(this.numbers, 123)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSelection1(val, row) {
|
||||||
|
this.tableData22.forEach((item, i) => {
|
||||||
|
if (item.物料流水号 === row.物料流水号) {
|
||||||
|
console.log(this.numbers1.indexOf(i), 234)
|
||||||
|
if (this.numbers1.indexOf(i) === -1) {
|
||||||
|
this.numbers1.push(i)
|
||||||
|
} else {
|
||||||
|
this.numbers1.splice(this.numbers1.indexOf(i), 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
tableRowClassName({ row, rowIndex }) {
|
||||||
|
let color = ''
|
||||||
|
this.numbers.forEach((r, i) => {
|
||||||
|
if (rowIndex === r) {
|
||||||
|
color = 'MistyRose'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return color
|
||||||
|
},
|
||||||
|
tableRowClassName2({ row, rowIndex }) {
|
||||||
|
let color = ''
|
||||||
|
this.numbers1.forEach((r, i) => {
|
||||||
|
if (rowIndex === r) {
|
||||||
|
color = 'MistyRose'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return color
|
||||||
|
},
|
||||||
initDirection() {
|
initDirection() {
|
||||||
const direction = this.$getDirection()
|
const direction = this.$getDirection()
|
||||||
direction.on('keyup', function(e, val) {
|
direction.on('keyup', function(e, val) {
|
||||||
@@ -1490,12 +1537,6 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
tableRowClassName({ row, rowIndex }) {
|
|
||||||
if (parseInt(row.是否确认) === 0) {
|
|
||||||
return 'MistyRose'
|
|
||||||
}
|
|
||||||
return ''
|
|
||||||
},
|
|
||||||
handleSelectionChange1(val) { // 标准件和外购件多选
|
handleSelectionChange1(val) { // 标准件和外购件多选
|
||||||
this.标准件和外购件流水号 = []
|
this.标准件和外购件流水号 = []
|
||||||
this.基本件流水号 = []
|
this.基本件流水号 = []
|
||||||
@@ -1669,6 +1710,6 @@ export default {
|
|||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.el-table .MistyRose {
|
.el-table .MistyRose {
|
||||||
background: MistyRose!important;
|
background: #9BD7FC!important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,242 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card style="width: 72%">
|
||||||
|
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||||
|
<span>供应商</span>
|
||||||
|
<el-select v-model="supplierNameValue" style="width:200px" placeholder="供应商" size="small" filterable clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in supplierNames"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<span>零件图号</span>
|
||||||
|
<el-input v-model="partNumber" size="small" placeholder="零件图号" style="width: 160px" clearable/>
|
||||||
|
<span>备料状态</span>
|
||||||
|
<el-select v-model="MaterialsValue" placeholder="请选择备料状态" filterable size="small" style="width: 100px" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in Materials"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<el-button icon="el-icon-search" type="success" size="small" @click="pageCurrent = 1;pageSize = 100;getTableData()">查询</el-button>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="width: 72%">
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
highlight-current-row
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
size="mini"
|
||||||
|
style="width: 100%"
|
||||||
|
height="760">
|
||||||
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
type="index"
|
||||||
|
width="50"/>
|
||||||
|
<el-table-column
|
||||||
|
label="备料状态"
|
||||||
|
align="center"
|
||||||
|
width="80px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="Number(scope.row.是否到货)===0" type="warning" size="mini">未到</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.是否到货)===1" type="primary" size="mini">已到</el-tag>
|
||||||
|
<el-tag v-if="Number(scope.row.是否到货)===2" type="success" size="mini">已结</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="供应商"
|
||||||
|
align="center"
|
||||||
|
min-width="210px">
|
||||||
|
<template slot-scope="scope">{{ scope.row.供应商名称 }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="物料编码"
|
||||||
|
align="center"
|
||||||
|
min-width="180px">
|
||||||
|
<template slot-scope="scope">{{ scope.row.物料编码 }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="物料名称"
|
||||||
|
align="center"
|
||||||
|
width="120px">
|
||||||
|
<template slot-scope="scope">{{ scope.row.零件名称 }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="材料"
|
||||||
|
width="100"
|
||||||
|
align="center">
|
||||||
|
<template slot-scope="scope">{{ scope.row.材料 }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备料件数" align="center" width="70">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.批次数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备料时间" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.下单日期 ? scope.row.下单日期.split(' ')[0] : '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="到货件数"
|
||||||
|
align="center"
|
||||||
|
width="70">
|
||||||
|
<template slot-scope="scope">{{ scope.row.到货数量 }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="到货时间"
|
||||||
|
align="center"
|
||||||
|
width="100">
|
||||||
|
<template slot-scope="scope">{{ scope.row.日期 ? scope.row.日期.split(' ')[0] : '' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="结算时间"
|
||||||
|
align="center"
|
||||||
|
width="100">
|
||||||
|
<template slot-scope="scope">{{ scope.row.开票时间 ? scope.row.开票时间.split(' ')[0] : '' }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block" style="margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="pageCurrent"
|
||||||
|
:page-sizes="[10, 20, 30, 40, 100]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:total="total"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChanges"
|
||||||
|
@current-change="handleCurrentChanges"/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { searchSupplier, searchTable } from '@/api/WorkshopProcurement/OutsourcingMaterialsSearch'
|
||||||
|
export default {
|
||||||
|
name: 'Index',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
supplierNameValue: '',
|
||||||
|
supplierNames: [],
|
||||||
|
partNumber: '',
|
||||||
|
MaterialsValue: '',
|
||||||
|
Materials: [{
|
||||||
|
value: 0,
|
||||||
|
label: '未到'
|
||||||
|
}, {
|
||||||
|
value: 1,
|
||||||
|
label: '已到'
|
||||||
|
}, {
|
||||||
|
value: 2,
|
||||||
|
label: '已结'
|
||||||
|
}],
|
||||||
|
loading: false,
|
||||||
|
total: 0,
|
||||||
|
tableData: [],
|
||||||
|
pageCurrent: 1,
|
||||||
|
pageSize: 100
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
fetchData() {
|
||||||
|
searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.supplierNames.push({
|
||||||
|
label: response.data[i].供应商名称,
|
||||||
|
value: response.data[i].供应商流水号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getTableData() {
|
||||||
|
this.loading = true
|
||||||
|
let check, check1, check2
|
||||||
|
this.supplierNameValue ? check = 1 : check = 0
|
||||||
|
this.partNumber ? check1 = 1 : check1 = 0
|
||||||
|
if (this.MaterialsValue !== '' && this.MaterialsValue !== null) {
|
||||||
|
check2 = 1
|
||||||
|
} else {
|
||||||
|
check2 = 0
|
||||||
|
}
|
||||||
|
console.log(this.MaterialsValue, check2, 123)
|
||||||
|
searchTable(check, this.supplierNameValue, check1, this.partNumber, check2, this.MaterialsValue, this.pageSize, this.pageCurrent).then(response => {
|
||||||
|
this.tableData = response.data.rows
|
||||||
|
this.total = response.data.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSizeChanges(val) {
|
||||||
|
this.pageCurrent = 1
|
||||||
|
this.pageSize = val
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
handleCurrentChanges(val) {
|
||||||
|
this.pageCurrent = val
|
||||||
|
this.getTableData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
span{
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
.wrapper{
|
||||||
|
width: 225px;
|
||||||
|
height: 50px;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid #b8c7d9;
|
||||||
|
float: left;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
position: relative;
|
||||||
|
padding: 8px 8px 0 8px;
|
||||||
|
}
|
||||||
|
.action{
|
||||||
|
position: absolute;
|
||||||
|
top: 4px;
|
||||||
|
right: 8px;
|
||||||
|
}
|
||||||
|
.delete{
|
||||||
|
padding: 0 5px;
|
||||||
|
border-radius: 3px;
|
||||||
|
color: #0f84b0;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
.delete:hover{
|
||||||
|
background: -webkit-linear-gradient(top,#0ba9e3,#0099d3);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
a{
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.icon{
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 7px;
|
||||||
|
margin-top: 2px;
|
||||||
|
font-size: 26px;
|
||||||
|
}
|
||||||
|
.info{
|
||||||
|
position: absolute;
|
||||||
|
left: 44px;
|
||||||
|
line-height: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
.el-card {
|
||||||
|
padding: 0px !important;
|
||||||
|
margin: 0px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user