|
@@ -119,7 +119,7 @@
|
|
|
<el-button
|
|
|
type="text"
|
|
|
class="textColor"
|
|
|
- @click="hanleDeleInd(scope.$index, scope.row.cid)"
|
|
|
+ @click="hanleDeleInd(scope.$index, scope.row.cid,scope.row.materialId)"
|
|
|
>删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -1079,16 +1079,17 @@ export default {
|
|
|
indexMethod(index) {
|
|
|
console.log(index)
|
|
|
},
|
|
|
- hanleDeleInd(index, id) {
|
|
|
- if (id) {
|
|
|
+ hanleDeleInd(index, id,materialId) {
|
|
|
+
|
|
|
+ if (id || materialId) {
|
|
|
const dataArr = JSON.parse(JSON.stringify(this.dataList))
|
|
|
for (let j = 0; j < dataArr.length; j++) {
|
|
|
- if (id == dataArr[j].id) {
|
|
|
- dataArr[j].disabled = false
|
|
|
+ if ((id || materialId) === dataArr[j].id) {
|
|
|
+ // dataArr[j].disabled = false
|
|
|
+ console.log(747)
|
|
|
this.$set(dataArr[j], 'disabled', false)
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
this.dataList = dataArr
|
|
|
}
|
|
|
|
|
@@ -1428,6 +1429,7 @@ export default {
|
|
|
const rebateList = []
|
|
|
const walletIds = []
|
|
|
const walletRebateIds = []
|
|
|
+ result.data[i].id = result.data[i].materialId
|
|
|
result.data[i].isPublishArr = [
|
|
|
{
|
|
|
value: '是',
|
|
@@ -1514,10 +1516,21 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- function resArrs(arr1, arr2) {
|
|
|
- return arr1.filter((v) => arr2.every((val) => val.materialId != v.id))
|
|
|
+
|
|
|
+
|
|
|
+ this.items = [...this.items,...result.data]
|
|
|
+ let newArr = [];
|
|
|
+ let obj = {};
|
|
|
+ for (var i = 0; i < this.items.length; i++) {
|
|
|
+ if (!obj[this.items[i].key]) {
|
|
|
+ newArr.push(this.items[i])
|
|
|
+ obj[this.items[i].key] = true
|
|
|
+ }
|
|
|
}
|
|
|
- this.items = [...this.items,...resArrs(result.data,this.dataList)]
|
|
|
+ console.log(newArr,454)
|
|
|
+ this.items = newArr
|
|
|
+ // console.log(resArrs(result.data,this.dataList),'55555')
|
|
|
+
|
|
|
} else {
|
|
|
this.$alert(result.message, '导入失败', {
|
|
|
confirmButtonText: '确定'
|