|
@@ -31,7 +31,7 @@
|
|
|
</el-popconfirm>
|
|
|
</template>
|
|
|
</sales-table>
|
|
|
- <sales-dialog ref="dia" :dialogVisible="dialogVisible" :func="getDialogList"
|
|
|
+ <sales-dialog ref="dia" :dialogVisible="dialogVisible" :customerNumber="customerNumber" :func="getDialogList"
|
|
|
@confirm="confirm"
|
|
|
/>
|
|
|
</div>
|
|
@@ -115,6 +115,17 @@ export default {
|
|
|
},
|
|
|
confirm(selected) {
|
|
|
// console.log(selected)
|
|
|
+ this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData.forEach(k=>{
|
|
|
+ selected.forEach(l=>{
|
|
|
+ if ( l.id == k.id){
|
|
|
+ // k.disabled = true
|
|
|
+ this.$set(k,'disabled',false)
|
|
|
+ }else {
|
|
|
+ this.$set(k,'disabled',true)
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
this.dataList = JSON.parse(JSON.stringify(selected))
|
|
|
this.$refs.header.screenForm.customerName = this.dataList[0].customerName
|
|
|
this.$refs.header.screenForm.customerNumber = this.dataList[0].customerNumber
|
|
@@ -125,6 +136,12 @@ export default {
|
|
|
},
|
|
|
handleDel(item, index) {
|
|
|
this.dataList.splice(index, 1)
|
|
|
+ this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData.find(k=>{
|
|
|
+ if (k.id==item.id){
|
|
|
+ this.$set(k,'disabled',true)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
//去掉相同数据
|
|
|
resArr(arr1, arr2) {
|
|
@@ -133,6 +150,13 @@ export default {
|
|
|
delChange() {
|
|
|
if (this.dataList.length){
|
|
|
this.dataList = this.resArr(this.dataList,this.selection)
|
|
|
+ this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData.forEach(k=>{
|
|
|
+ this.selection.forEach(l=>{
|
|
|
+ if ( l.id == k.id){
|
|
|
+ this.$set(k,'disabled',true)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
if (!this.dataList.length){
|
|
|
this.customerNumber = ''
|
|
|
}
|