zhouhao 2 vuotta sitten
vanhempi
commit
7af113571d

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

@@ -150,10 +150,15 @@ export default {
       // this.$parent.dialogVisible = false
     },
     selectable(row,index){
-      if (row.customerNumber == this.customerNumber){
-          return false
+      if (this.customerNumber){
+        if (row.customerNumber == this.customerNumber){
+          return true
+        }else{
+          return  false
+        }
+      }else {
+        return  true
       }
-      return  true
 
     }
     // 批量删除

+ 1 - 1
src/views/sales_control/sales_management/components/customer_sales_details.vue

@@ -12,7 +12,7 @@
       <template #events>
         <div v-if="details.status==1 || details.status==2">
           <el-button type="primary" size="mini" @click="handleInform(2)">通知发货</el-button>
-          <el-button size="mini">撤销发货</el-button>
+<!--          <el-button size="mini" v-if="">撤销发货</el-button>-->
         </div>
         <div v-if="details.status==3">
           <el-button type="primary" size="mini" @click="handleInform(3)">发货</el-button>

+ 16 - 12
src/views/sales_control/sales_management/components/customer_sales_form.vue

@@ -35,7 +35,7 @@
         </el-popconfirm>
       </template>
     </sales-table>
-    <sales-dialog :dialogVisible="dialogVisible" :customerNumber="customerNumber" :func="getDialogList"
+    <sales-dialog ref="dia" :dialogVisible="dialogVisible" :customerNumber="customerNumber" :func="getDialogList"
                   @confirm="confirm"
     />
   </div>
@@ -62,7 +62,7 @@ export default {
       customerNumber: '',
       dataList: [],
       selection: [],
-      disabled:false,
+      disabled: false,
       flag: 1,
       dis: true,
       column: [
@@ -72,7 +72,7 @@ export default {
           width: '180'
         },
         {
-          prop: 'materialOldNumber',
+          prop: 'materialCode',
           label: '物料编码',
           width: '180'
         },
@@ -111,7 +111,8 @@ export default {
 
         }
       ],
-      isFront:JSON.parse(localStorage.getItem('supply_user')).isFront
+      isFront: JSON.parse(localStorage.getItem('supply_user')).isFront,
+      salesId: ''
     }
   },
   created() {
@@ -119,13 +120,13 @@ export default {
       getFrontOrderDetail({ id: this.detailsId }).then(res => {
         this.dataList = res.data.orders
         this.$refs.header.screenForm = res.data
-        this.$refs.header.screenForm.disabled =this.disabled  = res.data.status !== 1?true:false
+        this.$refs.header.screenForm.disabled = this.disabled = res.data.status !== 1 ? true : false
 
         this.$refs.header.screenForm.provinceId = res.data.province
         this.$refs.header.screenForm.cityId = res.data.city
         this.$refs.header.screenForm.areaId = res.data.area
         this.$refs.header.screenForm.streetId = res.data.street
-        this.$refs.header.screenForm.stockType = res.data.stockType == 1 ? '前置仓' : '商家仓'
+        this.$refs.header.screenForm.stockType = res.data.stockType
       })
     } else {
       Object.assign(this.$data, this.$options.data())
@@ -135,10 +136,10 @@ export default {
 
     getDialogList(p) {
       let func = getcustomerFrontList
-      if (this.isFront===true){
+      if (this.isFront === true) {
         func = getcustomerFrontList
       }
-      if (this.isFront===false){
+      if (this.isFront === false) {
         func = getFrontListCustomer
       }
       return func(...p)
@@ -155,12 +156,14 @@ export default {
     },
     handleDel(item, index) {
       this.dataList.splice(index, 1)
+      // this.$refs.multipleTable.clearSelection()
+
+      console.log(this.$refs.dia)
       if (!this.dataList.length) {
         this.$nextTick(() => {
           this.$refs.header.screenForm = {}
           this.customerNumber = ''
         })
-
       }
     },
     delChange() {
@@ -185,8 +188,9 @@ export default {
     },
     handleInform(status = 2) {
       console.log(33)
-      sbumitFrontOrder({ id: this.$refs.header.screenForm.id, status }).then(res => {
-        console.log(res)
+      sbumitFrontOrder({ id: this.salesId, status }).then(res => {
+        this.$successMsg('通知发货')
+        this.$parent.pageType = 0
       })
     },
     handelSubmit(type, status = 1) {
@@ -216,7 +220,7 @@ export default {
           this.$successMsg('新增成功')
           this.dis = false
           // this.$parent.pageType = 0
-
+          this.salesId = res.data
           this.$forceUpdate()
         })
 

+ 9 - 3
src/views/sales_control/sales_management/components/return_sales_form.vue

@@ -78,7 +78,7 @@ export default {
           width: '180'
         },
         {
-          prop: 'materialOldNumber',
+          prop: 'materialCode',
           label: '物料编码',
           width: '180'
         },
@@ -121,7 +121,8 @@ export default {
           type:'text'
         }
       ],
-      isFront:JSON.parse(localStorage.getItem('supply_user')).isFront
+      isFront:JSON.parse(localStorage.getItem('supply_user')).isFront,
+      salesId:""
     }
   },
   created() {
@@ -218,6 +219,8 @@ export default {
         params.id = ''
         addRefund(params).then(res => {
           this.$successMsg('新增成功')
+          this.salesId = res.data
+
           // this.$parent.pageType = 0
           this.dis =false
           this.$forceUpdate()
@@ -232,7 +235,10 @@ export default {
       }
     },
     handleInform(status=2){
-      sendRefund({id:this.$refs.header.details.id,status})
+      sendRefund({id:this.salesId,status}).then(res=>{
+        this.$successMsg('通知发货')
+        this.$parent.pageType = 0
+      })
     }
 
   }