out error“

This commit is contained in:
lixin
2018-12-11 19:38:46 +08:00
parent d765fe373f
commit 169e51435f
3 changed files with 129 additions and 18 deletions

View File

@@ -40,6 +40,7 @@
<el-table
v-loading="listLoading"
:data="tableDataBasic"
size="mini"
border
style="width: 100%;"
height="200">
@@ -68,9 +69,13 @@
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" min-width="80">
<el-table-column label="零件数量" min-width="120" align="center">
<template slot-scope="scope">
{{ scope.row.可出库数量 }}
<template v-if="scope.row.changeSafeValue">
<el-input v-model="scope.row.可出库数量" style="width: 70px;" class="edit-input" size="mini"/>
<el-button class="cancel-btn" size="mini" icon="el-icon-refresh" type="warning" @click="cancelEdit(scope.row)">取消</el-button>
</template>
<span v-else>{{ scope.row.可出库数量 }}</span>
</template>
</el-table-column>
<el-table-column label="零件类型" align="center" min-width="80">
@@ -78,9 +83,15 @@
{{ scope.row.零件类型名称 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-tickets" style="margin: 0 0 0 0px" @click="searchBasicPartRecord(scope.row)">选择</el-button>
<el-table-column label="设置" min-width="100" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.changeSafeValue" type="mini" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
<el-button
v-else
type="primary"
size="mini"
icon="el-icon-edit"
@click="scope.row.changeSafeValue=!scope.row.changeSafeValue">设置</el-button>
</template>
</el-table-column>
</el-table>
@@ -100,6 +111,7 @@
v-loading="listLoading1"
:data="BasicPartIn"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -128,6 +140,7 @@
v-show="basicshow"
:data="BasicPartOut"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -160,7 +173,7 @@
<el-card v-show="genneralshow">
<el-radio-group
v-model="radio"
size="small"
size="mini"
style="margin: 10px;"
@change="BasicShow()">
<el-radio v-model="radio" :label="1" >基本件</el-radio>
@@ -197,6 +210,7 @@
v-loading="listLoading3"
:data="tableDataGeneral"
:row-style="tableRowClassName2"
size="mini"
border
style="width: 100%;"
height="200">
@@ -237,7 +251,7 @@
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-tickets" style="margin: 0 0 0 0px" @click="searchGeneralPartRecord(scope.row)">选择</el-button>
<el-button size="small" type="warning" icon="el-icon-tickets" style="margin: 0 0 0 0px" @row-click="searchGeneralPartRecord(scope.row)">选择</el-button>
</template>
</el-table-column>
</el-table>
@@ -257,6 +271,7 @@
v-loading="listLoading4"
:data="PurchasePartIn"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -284,6 +299,7 @@
v-loading="listLoading5"
v-show="genneralshow"
:data="PurchasePartOut"
size="mini"
border
style="width: 100%;"
height="200">
@@ -310,11 +326,26 @@
</el-table>
</el-card>
</el-tab-pane>
<!--编辑零件数量对话框-->
<!--<el-dialog :visible.sync="dialogFormVisible2" title="领料单明细" center width="380px">-->
<!--<el-form ref="form4" :model="form4" :rules="rules4" label-position="left" class="demo-ruleForm">-->
<!--<el-form-item label="出库数量" prop="OutNumber" label-width="100px" size="small">-->
<!--<el-input v-model="form4.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>-->
<!--</el-form-item>-->
<!--<el-form-item label="出库备注" prop="outNote" label-width="100px">-->
<!--<el-input v-model="form4.outNote" size="small" placeholder="请输入备注" style="width: 200px"/>-->
<!--</el-form-item>-->
<!--</el-form>-->
<!--<div slot="footer" class="dialog-footer">-->
<!--<el-button @click="callOff('form4')">取消</el-button>-->
<!--<el-button type="primary" @click="submitChannge()"> </el-button>-->
<!--</div>-->
<!--</el-dialog>-->
<el-tab-pane label="采购" name="second">
<el-card v-show="purchaseshow">
<el-radio-group
v-model="radio"
size="small"
size="mini"
style="margin: 10px;"
@change="GeneralShow()">
<el-radio v-model="radio2" :label="3">外购件</el-radio>
@@ -351,6 +382,7 @@
v-loading="listLoading6"
:data="tableDataPurchase"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -409,11 +441,13 @@
<el-table
v-loading="listLoading7"
:data="PurchasePartIn"
size="mini"
border
style="width: 100%;"
height="200">
<el-table-column
label="序号"
size="mini"
align="center"
type="index"
width="50"/>
@@ -437,6 +471,7 @@
v-loading="listLoading8"
:data="PurchasePartOut"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -464,7 +499,7 @@
<el-card v-show="standardshow">
<el-radio-group
v-model="radio"
size="small"
size="mini"
style="margin: 10px;"
@change="GeneralShow()">
<el-radio v-model="radio2" :label="3">外购件</el-radio>
@@ -501,6 +536,7 @@
v-loading="listLoading9"
:data="tableDataStandard"
:row-style="tableRowClassName1"
size="mini"
border
style="width: 100%;"
height="200">
@@ -579,6 +615,7 @@
v-loading="listLoading10"
:data="StandardPartIn"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -605,6 +642,7 @@
<el-table
v-loading="listLoading11"
:data="StandardPartOut"
size="mini"
border
style="width: 100%;"
height="200">
@@ -672,6 +710,7 @@
v-loading="listLoadingx1"
:data="HouseDataBasic"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -735,6 +774,7 @@
<el-table
v-loading="listLoading10"
:data="HouseDataBasicIn"
size="mini"
border
style="width: 100%;"
height="200">
@@ -763,6 +803,7 @@
v-loading="listLoading11"
:data="HouseDataBasicOut"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -827,6 +868,7 @@
v-loading="listLoadingx2"
:data="HouseDataPurchase"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -896,6 +938,7 @@
v-loading="listLoading10"
:data="HouseDataPurchaseIn"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -923,6 +966,7 @@
v-loading="listLoading11"
:data="HouseDataPurchaseOut"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -1239,6 +1283,11 @@ export default {
searchBasicPart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableDataBasic = response.data.rows
this.listLoading = false
this.tableDataBasic.map(v => {
this.$set(v, 'changeSafeValue', false)
v.可出库数量 = v.可出库数量
return v
})
this.total = response.data.total
})
},
@@ -1426,6 +1475,23 @@ export default {
this.total6 = response.data.total
})
},
cancelEdit(row) { // 取消设置
row.安全库存量 = row.原安全库存量
row.changeSafeValue = false
this.$message('取消修改')
},
confirmEdit(row) { // 确认设置
Number(row.安全库存量) ? row.安全库存量 = Number(row.安全库存量) : row.安全库存量 = 0
setSafeValue(row.物料流水号, parseInt(row.安全库存量)).then(response => {
if (response.data[0].result === '1') {
row.changeSafeValue = false
this.$message.success('设置成功')
this.searchTable1()
} else {
this.$message.error('设置失败')
}
})
},
// 查询外购件记录
HousePurchaseRecord(row) {
this.ContractDetailValue = row.采购合同明细流水号