zhouhao 2 år sedan
förälder
incheckning
1321dd945d

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

@@ -110,7 +110,7 @@ export default {
           width: '180'
         },
         {
-          prop: 'materialOldNumber',
+          prop: 'materialCode',
           label: '物料编码',
           width: '180'
         },
@@ -119,11 +119,11 @@ export default {
           label: '规格型号',
           width: '300'
         },
-        {
-          prop: 'stockLockQty',
-          label: '库存数量',
-          width: '180'
-        },
+        // {
+        //   prop: 'stockQty',
+        //   label: '库存数量',
+        //   width: '180'
+        // },
         {
           prop: 'qty',
           label: '数量',

+ 35 - 27
src/views/sales_control/sales_management/components/customer_sales_form.vue

@@ -12,13 +12,13 @@
       </template>
       <template #events>
         <div v-if="!detailsId">
-          <el-button type="primary" size="mini" @click="handelSubmit(1)">提交</el-button>
-          <el-button size="mini">重置</el-button>
+          <el-button type="primary" :disabled="!dis" size="mini" @click="handelSubmit(1)">提交</el-button>
+          <el-button size="mini" @click="onReset">重置</el-button>
           <el-button size="mini" :disabled="dis" @click="handleInform(2)">通知发货</el-button>
         </div>
         <div v-else>
           <el-button type="primary" size="mini" @click="handelSubmit(2)">保存</el-button>
-          <el-button size="mini">重置</el-button>
+          <el-button size="mini" @click="onReset">重置</el-button>
         </div>
       </template>
       <template v-slot:custom="{item:{row,$index}}">
@@ -82,7 +82,7 @@ export default {
           width: '300'
         },
         {
-          prop: 'stockLockQty',
+          prop: 'stockQty',
           label: '库存数量',
           width: '180'
         },
@@ -92,16 +92,16 @@ export default {
           width: '180',
           isInput: true
         },
-        {
-          prop: 'volume',
-          label: '体积',
-          width: '180'
-        },
-        {
-          prop: 'totalVolume',
-          label: '总体积',
-          width: '180'
-        },
+        // {
+        //   prop: 'volume',
+        //   label: '体积',
+        //   width: '180'
+        // },
+        // {
+        //   prop: 'totalVolume',
+        //   label: '总体积',
+        //   width: '180'
+        // },
         {
           prop: 'notes',
           label: '备注',
@@ -167,21 +167,24 @@ export default {
       }
     },
     delChange() {
-      this.dataList.forEach((k, i) => {
-        this.selection.forEach((l, e) => {
-          if (k.id === l.id) {
-            this.dataList.splice(i, 1)
-            this.selection.splice(e, 1)
-          }
-        })
-      })
-      if (!this.dataList.length) {
-        this.$nextTick(() => {
-          this.$refs.header.screenForm = {}
-          this.customerNumber = ''
-        })
 
+      if (this.dataList.length) {
+        this.dataList.forEach((k, i) => {
+          this.selection.forEach((l, e) => {
+            if (k.id === l.id) {
+              this.dataList.splice(i, 1)
+              this.selection.splice(e, 1)
+            }
+          })
+        })
+        if (this.dataList.length == 1) {
+          this.$nextTick(() => {
+            this.$refs.header.screenForm = {}
+            this.customerNumber = ''
+          })
+        }
       }
+
     },
     handleSelection(data) {
       this.selection = data
@@ -232,6 +235,11 @@ export default {
         })
 
       }
+    },
+    onReset(){
+      Object.assign(this.$data, this.$options.data())
+      this.$refs.header.screenForm = {}
+
     }
 
   }

+ 23 - 17
src/views/sales_control/sales_management/components/return_sales_details.vue

@@ -66,7 +66,7 @@ export default {
           width: '180'
         },
         {
-          prop: 'materialOldNumber',
+          prop: 'materialCode',
           label: '物料编码',
           width: '180'
         },
@@ -76,33 +76,39 @@ export default {
           width: '300'
         },
         {
-          prop: 'stockLockQty',
-          label: '库存数量',
-          width: '180'
-        },
-        {
           prop: 'qty',
-          label: '数量',
+          label: '发货数量',
           width: '180'
         },
         {
-          prop: 'volume',
-          label: '体积',
-          width: '180'
+          prop: 'refundQty',
+          label: '退货数量',
+          width: '180',
+          isInput: true
         },
         {
-          prop: 'totalVolume',
-          label: '总体积',
-          width: '180'
+          prop: 'qty',
+          label: '已退数量',
+          width: '180',
         },
+        // {
+        //   prop: 'volume',
+        //   label: '体积',
+        //   width: '180'
+        // },
+        // {
+        //   prop: 'totalVolume',
+        //   label: '总体积',
+        //   width: '180'
+        // },
         {
           prop: 'notes',
           label: '备注',
-          width: '180'
-
+          width: '180',
+          isInput: true,
+          type:'text'
         }
-      ]
-    }
+      ]    }
   },
   created() {
     if (this.detailsId) {

+ 24 - 19
src/views/sales_control/sales_management/components/return_sales_form.vue

@@ -11,13 +11,13 @@
       </template>
       <template #events>
         <div v-if="!detailsId">
-          <el-button type="primary" size="mini" @click="handelSubmit(1)">提交</el-button>
-          <el-button size="mini">重置</el-button>
+          <el-button type="primary" :disabled="!dis" size="mini" @click="handelSubmit(1)">提交</el-button>
+          <el-button size="mini" @click="onReset">重置</el-button>
           <el-button size="mini" :disabled="dis" @click="handleInform(2)">通知发货</el-button>
         </div>
         <div v-else>
           <el-button type="primary" size="mini" @click="handelSubmit(2)">保存</el-button>
-          <el-button size="mini">重置</el-button>
+          <el-button size="mini" @click="onReset">重置</el-button>
         </div>
 
       </template>
@@ -103,16 +103,16 @@ export default {
           label: '已退数量',
           width: '180',
         },
-        {
-          prop: 'volume',
-          label: '体积',
-          width: '180'
-        },
-        {
-          prop: 'totalVolume',
-          label: '总体积',
-          width: '180'
-        },
+        // {
+        //   prop: 'volume',
+        //   label: '体积',
+        //   width: '180'
+        // },
+        // {
+        //   prop: 'totalVolume',
+        //   label: '总体积',
+        //   width: '180'
+        // },
         {
           prop: 'notes',
           label: '备注',
@@ -183,13 +183,14 @@ export default {
             this.selection.splice(e, 1)
           }
         })
+        if (this.dataList.length ==1){
+          this.$nextTick(()=>{
+            this.details = {}
+            this.customerNumber = ''
+          })
+        }
+
       })
-      if (!this.dataList.length){
-        this.$nextTick(()=>{
-          this.details = {}
-          this.customerNumber = ''
-        })
-      }
     },
     handleSelection(data) {
       this.selection = data
@@ -239,6 +240,10 @@ export default {
         this.$successMsg('通知发货')
         this.$parent.pageType = 0
       })
+    },
+    onReset(){
+      Object.assign(this.$data, this.$options.data())
+
     }
 
   }

+ 12 - 2
src/views/sales_control/sales_management/customer_sales_list.vue

@@ -23,6 +23,7 @@ import import_mixin from '@/components/template/import_mixin.js'
 import { delFrontOrder, exportCustomerFrontOrder, getFrontOrderList } from '@/api/sales'
 import customer_sales_form from '@/views/sales_control/sales_management/components/customer_sales_form'
 import customer_sales_details from '@/views/sales_control/sales_management/components/customer_sales_details'
+import { getcustomerFrontList, getFrontListCustomer } from '@/api/stock'
 
 export default {
   components: { TemplatePage, customer_sales_form, customer_sales_details },
@@ -72,14 +73,23 @@ export default {
       tableEvents: {
         'selection-change': this.selectionChange
       },
-      recordSelected: []
+      recordSelected: [],
+      isFront: JSON.parse(localStorage.getItem('supply_user')).isFront,
+
     }
   },
   methods: {
     // 列表请求函数
     getList(...p) {
       this.recordSelected = []
-      return getFrontOrderList(...p)
+      let func = getcustomerFrontList
+      if (this.isFront === true) {
+        func = getcustomerFrontList
+      }
+      if (this.isFront === false) {
+        func = getFrontListCustomer
+      }
+      return func(...p)
     },
     // 列表导出函数
     exportList: exportCustomerFrontOrder,