修复测试错误

This commit is contained in:
liushuai
2018-11-20 10:48:34 +08:00
parent c74dbe89cb
commit 6045632874
8 changed files with 52 additions and 16 deletions

View File

@@ -582,6 +582,11 @@ export default {
searchDetailed(row) {
this.RequisitionList = row.请购单流水号
searchDetailed(row.请购单流水号).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].物料计划到货时间 !== '') {
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
}
}
this.tableData5 = response.data
})
},

View File

@@ -591,6 +591,7 @@ export default {
this.getSelect(initPurchaseOrder, ['请购单编号', '请购单流水号'], 'contractNum')
},
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
console.log(this.id)
this.supplierName ? this.supplierCheck1 = 1 : (this.supplierCheck1 = 0, this.supplierName = '')
this.enterpriseNature ? this.supplierCheck2 = 1 : (this.supplierCheck2 = 0, this.enterpriseNature = '')
this.createDate ? this.supplierCheck3 = 1 : (this.supplierCheck3 = 0, this.createDate = '')

View File

@@ -152,9 +152,9 @@
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<span>合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" style="width:180px" filterable clearable>
<el-select v-model="contractNumValue1" placeholder="合同号" size="small" style="width:180px" filterable clearable>
<el-option
v-for="item in contractNum"
v-for="item in contractNum1"
:key="item.value"
:label="item.label"
:value="item.value">
@@ -167,7 +167,7 @@
</el-row>
<el-row style="margin-top: 10px">
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
<el-input v-model="supplierName1" placeholder="供应商" size="small" clearable/>
<el-button
type="success"
size="small"
@@ -331,7 +331,7 @@
</template>
<script>
import { initContract, initBuyer, searchTable1, searchTable2, searchTable3, searchTable4, submitContract } from '@/api/WorkshopProcurement/PurchaseContractChange'
import { initContract, initContract1, initBuyer, searchTable1, searchTable2, searchTable3, searchTable4, submitContract } from '@/api/WorkshopProcurement/PurchaseContractChange'
export default {
data() {
@@ -352,6 +352,8 @@ export default {
freight1: '',
contractNumValue: '',
contractNum: [],
contractNumValue1: '',
contractNum1: [],
ProcurementContractNum: '',
buyer: 0,
Supplier: 0,
@@ -412,6 +414,15 @@ export default {
})
}
})
initContract1().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.contractNum1.push({
label: response.data[i].采购合同编号,
name: response.data[i].采购合同名称,
value: response.data[i].采购合同变更流水号
})
}
})
},
initBuyer() { // 初始化采购人员
initBuyer().then(response => {
@@ -449,7 +460,7 @@ export default {
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.buyerValue, this.check4, this.supplierName, this.check5, this.approvalValue).then(response => {
this.loading1 = false
for (let j = 0; j < response.data.rows.length; j++) {
if (response.data.rows[j].规定到货时间 !== null) {
if (response.data.rows[j].规定到货时间 !== null || response.data.rows[j].规定到货时间 !== '') {
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
}
}
@@ -464,10 +475,10 @@ export default {
this.check1 = 0
this.startEndDate = ''
} else { this.check1 = 1 }
this.contractNumValue ? this.check2 = 1 : this.check2 = 0
this.buyerName ? this.check3 = 1 : this.check3 = 0
this.supplierName ? this.check4 = 1 : this.check4 = 0
searchTable3(this.pageCurrent2, this.pageSize2, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.buyerValue, this.check4, this.supplierName).then(response => {
this.contractNumValue1 ? this.check2 = 1 : this.check2 = 0
this.buyerName1 ? this.check3 = 1 : this.check3 = 0
this.supplierName1 ? this.check4 = 1 : this.check4 = 0
searchTable3(this.pageCurrent2, this.pageSize2, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue1, this.check3, this.buyerValue1, this.check4, this.supplierName1).then(response => {
this.loading2 = false
for (let j = 0; j < response.data.rows.length; j++) {
if (response.data.rows[j].规定到货时间 !== null) {

View File

@@ -15,8 +15,8 @@
</el-select>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable style="width: 200px"/>
<span>零件:</span>
<el-select v-model="PartNumberValue" placeholder="零件" size="small" clearable>
<span>零件名称:</span>
<el-select v-model="PartNumberValue" placeholder="零件名称" size="small" filterable clearable>
<el-option
v-for="item in PartNumber"
:key="item.value"
@@ -161,6 +161,14 @@ export default {
this.PartNumberValue ? this.check3 = 1 : this.check3 = 0
searchParts(this.pageCurrent, this.pageSize, this.check1, this.contractNumValue, this.check2, this.supplierName, this.check3, this.PartNumberValue).then(response => {
this.loading = false
for (let i = 0; i < response.data.rows.length; i++) {
if (response.data.rows[i].交检日期 !== '') {
response.data.rows[i].交检日期 = (response.data.rows[i].交检日期).split(' ')[0]
}
if (response.data.rows[i].检查日期 !== '') {
response.data.rows[i].检查日期 = (response.data.rows[i].检查日期).split(' ')[0]
}
}
this.tableData = response.data.rows
this.total = response.data.total
})