| | |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label-width="70px" label="母件编码" style=" display: flex;"> |
| | | <el-form-item label="母件编码" label-width="70px" style=" display: flex;"> |
| | | <el-input v-model="form.parentpartcode" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="母件名称" style=" display: flex;"> |
| | |
| | | width="110" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-select v-if="row.isVisible===1" v-model="row.PN_TYPE" placeholder="请选择"> |
| | | <el-select |
| | | v-if="row.isVisible===1" |
| | | v-model="row.PN_TYPE" |
| | | :disabled="row.PN_TYPE==='Z'" |
| | | placeholder="请选择" |
| | | @change="val=>changeType(val,row)" |
| | | > |
| | | <el-option |
| | | v-for="item in sxArr" |
| | | :key="item.code" |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="saveRow(row)">保存</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="saveRow(row)">确定</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="cancelRow(row)">取消</el-button> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="editRow(row)">编辑</el-button> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="delRow(row)">删除</el-button> |
| | |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | type="primary" |
| | | @click="dialogVisibleConfirm" |
| | | >确 定</el-button> |
| | | >保存</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | handleRequest() { |
| | | this.getBoIventorySelect().then(res => { |
| | | if (res.code === '200') { |
| | | // this.getPartSelect() |
| | | this.getStockTypeSelect() |
| | | } |
| | | }) |
| | |
| | | // this.PartSelectArr.splice(index, 1) |
| | | // }) |
| | | }, |
| | | // 物料清单属性类型值改变时触发 |
| | | changeType(val, row) { |
| | | this.dialogTableDataArr.forEach(item => { |
| | | item.PN_TYPE = item.SMATERIRL_CODE === row.SMATERIRL_CODE ? 'Z' : 'F' |
| | | }) |
| | | }, |
| | | addDialog() { |
| | | if (this.dialogTableDataArr.find(item => item.isVisible === 1)) { |
| | | return this.$message.info('请先保存本条记录!') |
| | |
| | | BASE_QUANTITY: '', |
| | | LOSS_QUANTITY: '', |
| | | TOTAL_QUANTITY: '', |
| | | PN_TYPE: '' |
| | | PN_TYPE: this.dialogTableDataArr.length === 0 ? 'Z' : 'F' |
| | | }) |
| | | }, |
| | | saveRow(row) { |
| | |
| | | }) |
| | | }, |
| | | delRow(row) { |
| | | if (row.PN_TYPE === 'Z') { |
| | | return this.$message.info('主料不可删除!') |
| | | } |
| | | |
| | | this.PartSelectArrAll.forEach(item => { |
| | | if (item.partcode === row.SMATERIRL_CODE) { |
| | | this.PartSelectArr.unshift(item) |
| | |
| | | worklist: this.dialogTableDataArr, |
| | | opertype: this.operation === 'add' ? 'Add' : 'Update' |
| | | } |
| | | console.log(data, 89) |
| | | |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | AddUpdateBoIventory(data).then(res => { |
| | | if (res.code === '200') { |