|
|
|
@ -92,6 +92,7 @@ |
|
|
|
<el-table-column prop="supplierName" label="供应商名称" min-width="160" /> |
|
|
|
<el-table-column prop="modelNo" label="型号" min-width="120" /> |
|
|
|
<el-table-column prop="manufactureDate" label="生产日期" min-width="120" /> |
|
|
|
<el-table-column prop="remark" label="备注" min-width="180" /> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<el-dialog |
|
|
|
@ -228,6 +229,16 @@ |
|
|
|
<el-input v-model="scope.row.manufactureDate" class="qc-subpart-detail-input" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="remark" label="备注" min-width="200"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.remark" class="qc-subpart-detail-input" maxlength="200" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" width="80" fixed="right"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="text" class="qc-subpart-delete-btn" @click="removeDetailRow(scope.$index)">删除</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
@ -510,6 +521,7 @@ export default { |
|
|
|
supplierName: item.supplierName || '', |
|
|
|
modelNo: item.modelNo || '', |
|
|
|
manufactureDate: item.manufactureDate || '', |
|
|
|
remark: item.remark || '', |
|
|
|
sortNo: item.sortNo || 0 |
|
|
|
})) |
|
|
|
} else { |
|
|
|
@ -577,6 +589,7 @@ export default { |
|
|
|
supplierName: item.supplierName || '', |
|
|
|
modelNo: item.modelNo || '', |
|
|
|
manufactureDate: item.manufactureDate || '', |
|
|
|
remark: item.remark || '', |
|
|
|
sortNo: index + 1 |
|
|
|
})) |
|
|
|
} else { |
|
|
|
@ -603,11 +616,24 @@ export default { |
|
|
|
this.addForm.detailList[this.chooseContext.rowIndex].supplierName = row.SupplierName || '' |
|
|
|
} |
|
|
|
}, |
|
|
|
removeDetailRow (index) { |
|
|
|
this.$confirm('确定删除该明细吗?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.addForm.detailList.splice(index, 1) |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
submitForm () { |
|
|
|
if (!this.addForm.mainData.seqNo) { |
|
|
|
this.$message.warning('请先选择主数据') |
|
|
|
return |
|
|
|
} |
|
|
|
if (!this.addForm.detailList || this.addForm.detailList.length === 0) { |
|
|
|
this.$message.warning('明细不能为空,请至少保留一条明细数据') |
|
|
|
return |
|
|
|
} |
|
|
|
const buKey = this.addQuery.citemCode || this.queryForm.citemCode |
|
|
|
const site = this.extractSiteFromBuKey(buKey) |
|
|
|
const buNo = this.extractPureBuCode(buKey) |
|
|
|
@ -741,4 +767,8 @@ export default { |
|
|
|
margin-left: 4px; |
|
|
|
flex: 1; |
|
|
|
} |
|
|
|
|
|
|
|
.qc-subpart-delete-btn { |
|
|
|
margin-top: -3px; |
|
|
|
} |
|
|
|
</style> |