|
@@ -156,18 +156,32 @@ export default {
|
|
|
},
|
|
|
// 删除行
|
|
|
async delTableRow(prop, index) {
|
|
|
- // prop.splice(index, 1);
|
|
|
- for (const key in this.params) {
|
|
|
-
|
|
|
- // if (Array.isArray(this.params[key])) {
|
|
|
- if (key === 'puOrderItemList' || key === 'puOrderExecuteList') {
|
|
|
-
|
|
|
- this.params[key][index].id ? (this.params[key][index]['delFlag'] = '2') :this.params[key].splice(index, 1);
|
|
|
-
|
|
|
+ console.log(prop,'prop');
|
|
|
+ if(prop.length === 1){
|
|
|
+ this.$alert('订单行不允许为空', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ callback: action => {
|
|
|
+ // this.$message({
|
|
|
+ // type: 'info',
|
|
|
+ // message: `action: ${ action }`
|
|
|
+ // });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+
|
|
|
+ // prop.splice(index, 1);
|
|
|
+ for (const key in this.params) {
|
|
|
+
|
|
|
+ // if (Array.isArray(this.params[key])) {
|
|
|
+ if (key === 'puOrderItemList' || key === 'puOrderExecuteList') {
|
|
|
+
|
|
|
+ this.params[key][index].id ? (this.params[key][index]['delFlag'] = '2') :this.params[key].splice(index, 1);
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+ await this.handleGetPrice();
|
|
|
}
|
|
|
-
|
|
|
- await this.handleGetPrice();
|
|
|
},
|
|
|
// 取消
|
|
|
handleCancel() {
|
|
@@ -728,7 +742,7 @@ export default {
|
|
|
<el-table-column fixed="right" label="操作" width="120">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
- v-if="params.source == '3' && !handleIsRevise()"
|
|
|
+ v-if="!handleIsRevise()"
|
|
|
@click.native.prevent="delTableRow(params[tabName], scope.$index)"
|
|
|
type="text"
|
|
|
size="small"
|