|
@@ -446,10 +446,11 @@
|
|
|
>
|
|
|
</div>
|
|
|
<el-table
|
|
|
- :data="showMaterialInfo"
|
|
|
+ :data="materialInfo"
|
|
|
fit
|
|
|
max-height="480"
|
|
|
style="font-size: 12px"
|
|
|
+ :row-class-name="rowClassName"
|
|
|
>
|
|
|
<el-table-column
|
|
|
show-overflow-tooltip
|
|
@@ -482,15 +483,15 @@
|
|
|
:disabled="sonDisable"
|
|
|
size="mini"
|
|
|
v-model="scope.row.materialCode"
|
|
|
- @clear="cleanMx(scope.row.$index, '物料编码')"
|
|
|
- @focus="chooseMaterial(scope.row.$index)"
|
|
|
+ @clear="cleanMx(scope.$index, '物料编码')"
|
|
|
+ @focus="chooseMaterial(scope.$index)"
|
|
|
>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
:disabled="sonDisable"
|
|
|
slot="append"
|
|
|
icon="el-icon-more"
|
|
|
- @click="chooseMaterial(scope.row.$index)"
|
|
|
+ @click="chooseMaterial(scope.$index)"
|
|
|
></el-button>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
@@ -1682,16 +1683,6 @@ export default {
|
|
|
isDCCk: true,
|
|
|
};
|
|
|
},
|
|
|
- computed: {
|
|
|
- showMaterialInfo: {
|
|
|
- get() {
|
|
|
- return this.materialInfo
|
|
|
- .map((item, index) => ({ ...item, $index: index }))
|
|
|
- .filter(({ delFlag }) => delFlag !== "2");
|
|
|
- },
|
|
|
- set() {},
|
|
|
- },
|
|
|
- },
|
|
|
created() {
|
|
|
if (this.pageStu == "check") {
|
|
|
console.log("数据", this.row);
|
|
@@ -2016,16 +2007,26 @@ export default {
|
|
|
customerLogisticName: null,
|
|
|
};
|
|
|
this.materialInfo.push(newLine);
|
|
|
- console.log(this.materialInfo);
|
|
|
},
|
|
|
- delLine(index, { $index }) {
|
|
|
- // this.materialInfo.splice(index, 1);
|
|
|
+ delLine($index) {
|
|
|
+ console.log("删除行:", index);
|
|
|
this.materialInfo = this.materialInfo.map((item, index) => ({
|
|
|
...item,
|
|
|
delFlag: index === $index ? "2" : item.delFlag,
|
|
|
}));
|
|
|
- console.log("删除行:", $index, this.materialInfo);
|
|
|
},
|
|
|
+ //
|
|
|
+ rowClassName(prop) {
|
|
|
+ const {
|
|
|
+ row: { delFlag },
|
|
|
+ } = prop;
|
|
|
+ if (delFlag === "2") {
|
|
|
+ return "is-hidden";
|
|
|
+ } else {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
chooseRefer(type, isPage, title, pkOrg, isDirectStore, gubFlag) {
|
|
|
this.referCondition.type = type;
|
|
|
this.referCondition.isPage = isPage;
|
|
@@ -2287,6 +2288,10 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+::v-deep .el-table__row.is-hidden {
|
|
|
+ display: none;
|
|
|
+}
|
|
|
+
|
|
|
.btn_group {
|
|
|
width: 100%;
|
|
|
margin: 20px 0;
|