zhouhao 2 년 전
부모
커밋
b6a8892d2e

+ 3 - 2
src/components/SalesDialog/SalesDialog.vue

@@ -155,8 +155,9 @@ export default {
       // this.$parent.dialogVisible = false
     },
     selectable(row,index){
-      if (this.customerNumber || row.disabled){
-        if (row.customerNumber == this.customerNumber || row.disabled){
+      if (this.customerNumber){
+        console.log(row.customerNumber == this.customerNumber,row.disabled)
+        if (row.customerNumber == this.customerNumber && row.disabled){
           return true
         }else{
           return  false

+ 1 - 1
src/views/sales_control/components/WarehouseDetails.vue

@@ -4,7 +4,7 @@
     <warehousing-header page-type="details" :details="details" />
     <sales-table :dataList="dataList" :column="column">
     </sales-table>
-    <div class="warehousing">
+    <div class="warehousing" v-if="details.approvalName">
       <div class="diy-table-1">
         <el-row>
           <el-col :span="8" class="item">

+ 3 - 3
src/views/sales_control/components/WarehouseForm.vue

@@ -31,7 +31,7 @@
         </el-popconfirm>
       </template>
     </sales-table>
-    <sales-dialog :dialogVisible="dialogVisible" :customerNumber="customerNumber" :func="getDialogList"
+    <sales-dialog ref="dia" :dialogVisible="dialogVisible"  :func="getDialogList"
                   @confirm="confirm"
     />
   </div>
@@ -115,16 +115,16 @@ export default {
     },
     confirm(selected) {
       // console.log(selected)
-      this.dataList = selected
+      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
       this.customerNumber = this.dataList[0].customerNumber
       this.dialogVisible = false
+      this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.$refs.tableView.clearSelection()
 
     },
     handleDel(item, index) {
       this.dataList.splice(index, 1)
-      this.selection.splice(index, 1)
     },
     //去掉相同数据
     resArr(arr1, arr2) {

+ 26 - 2
src/views/sales_control/sales_management/components/return_sales_form.vue

@@ -102,7 +102,6 @@ export default {
         {
           prop: 'refundQty',
           align: 'left',
-
           label: '退货数量',
           width: '180',
           isInput: true
@@ -148,6 +147,11 @@ export default {
       detailRefund({ id: this.detailsId }).then(res => {
         this.dataList = res.data.orders
         this.details = res.data
+        this.dataList.forEach(k => {
+          console.log(k,'11')
+          k.diffQty = Number(k.qty) - Number(k.refundQty||0)
+        })
+        console.log(this.dataList)
         this.details.customerOrderNo = this.dataList[0].id
         this.customerNumber = res.data.materialId
       })
@@ -169,7 +173,14 @@ 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)
+          }
+        })
+      })
       selected.forEach(k => {
         k.diffQty = Number(k.qty) - Number(k.refundQty)
       })
@@ -186,6 +197,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
+        }
+      })
       // if (!this.dataList.length){
       //   this.$nextTick(()=>{
       //     this.details = {}
@@ -200,6 +217,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 = ''
         }