This commit is contained in:
Vergil
2020-03-17 11:18:04 +08:00
6 changed files with 58 additions and 12 deletions

View File

@@ -184,12 +184,12 @@
</el-table-column>
<el-table-column label="库存(BZ)" align="center" width="80" prop="库存">
<template slot-scope="scope">
{{ scope.row.货位存量 - scope.row.占用数量 }}
{{ (scope.row.货位存量 ? scope.row.货位存量 : 0) - scope.row.占用数量 }}
</template>
</el-table-column>
<el-table-column label="使用库存数量" align="center" width="145" prop="使用库存数">
<template slot-scope="scope">
<template v-if="scope.row.库存 === '0'">
<template v-if="((scope.row.货位存量 ? scope.row.货位存量 : 0) - scope.row.占用数量) === 0">
</template>
<el-input-number v-else 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: 130px" @change="changeNumber(scope.row)"/>

View File

@@ -102,8 +102,8 @@
</el-table-column>
<el-table-column label="使用库存数量" align="center" 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)"/>
<span v-if="Number(scope.row.零件类型) !== 1 || (Number(scope.row.货位存量 ? scope.row.货位存量 : 0) - Number(scope.row.占用数量)) === 0">-</span>
<el-input-number v-if="Number(scope.row.零件类型) === 1 && (Number(scope.row.货位存量 ? scope.row.货位存量 : 0) - Number(scope.row.占用数量)) !== 0" 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>
</el-table-column>
<el-table-column label="待采数量" align="center" width="80" prop="待采购数量">