zhouhao 2 سال پیش
والد
کامیت
b7fc961d13

+ 1 - 1
src/components/ReturnSalesHeader/ReturnSalesHeader.vue

@@ -8,7 +8,7 @@
             <el-input disabled v-model="details.customerOrderNo" placeholder="引用销售单"></el-input>
           </div>
         </el-col>
-        <el-col :span="16" class="item" v-if="details.id">
+        <el-col :span="16" class="item" v-if="details.detailsId">
           <div class="label">退货订单号</div>
           <div class="value">{{ details.id }}</div>
         </el-col>

+ 9 - 9
src/views/sales_control/customer_warehouse.vue

@@ -24,15 +24,15 @@ export default {
     return {
       // 事件组合
       optionsEvensGroup: [
-        [
-          [
-            {
-              name: '批量删除',
-              click: this.dels,
-              isRole: this.$checkBtnRole('del', this.$route.meta.roles)
-            }
-          ]
-        ]
+        // [
+        //   [
+        //     {
+        //       name: '批量删除',
+        //       click: this.dels,
+        //       isRole: this.$checkBtnRole('del', this.$route.meta.roles)
+        //     }
+        //   ]
+        // ]
       ],
       // 表格属性
       tableAttributes: {

+ 9 - 9
src/views/sales_control/preposition_stock_list.vue

@@ -24,15 +24,15 @@ export default {
     return {
       // 事件组合
       optionsEvensGroup: [
-        [
-          [
-            {
-              name: '批量删除',
-              click: this.dels,
-              isRole: this.$checkBtnRole('del', this.$route.meta.roles)
-            }
-          ]
-        ]
+        // [
+        //   [
+        //     {
+        //       name: '批量删除',
+        //       click: this.dels,
+        //       isRole: this.$checkBtnRole('del', this.$route.meta.roles)
+        //     }
+        //   ]
+        // ]
       ],
       // 表格属性
       tableAttributes: {

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

@@ -142,7 +142,7 @@ export default {
         {
           prop: 'notes',
           label: '备注',
-          width: '180'
+          
 
         }
       ],

+ 9 - 15
src/views/sales_control/sales_management/components/customer_sales_form.vue

@@ -82,26 +82,11 @@ export default {
           width: '300'
         },
         {
-          prop: 'stockQty',
-          label: '库存数量',
-          width: '180'
-        },
-        {
           prop: 'qty',
           label: '数量',
           width: '180',
           isInput: true
         },
-        // {
-        //   prop: 'volume',
-        //   label: '体积',
-        //   width: '180'
-        // },
-        // {
-        //   prop: 'totalVolume',
-        //   label: '总体积',
-        //   width: '180'
-        // },
         {
           prop: 'notes',
           label: '备注',
@@ -130,6 +115,15 @@ export default {
       })
     } else {
       Object.assign(this.$data, this.$options.data())
+
+      this.column.splice(3,0,
+        {
+          prop: 'stockQty',
+          label: '库存数量',
+          width: '180'
+        }
+      )
+
     }
   },
   methods: {

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

@@ -11,7 +11,7 @@
       </template>
       <template #events>
         <div>
-          <el-button type="primary" v-if="details.status==1||details.status==2" size="mini" @click="handleInform(2)">通知货</el-button>
+          <el-button type="primary" v-if="details.status==1||details.status==2" size="mini" @click="handleInform(2)">通知退货</el-button>
           <el-button size="mini" v-if="details.status==3">撤销发货</el-button>
         </div>
       </template>
@@ -80,12 +80,7 @@ export default {
           label: '发货数量',
           width: '180'
         },
-        {
-          prop: 'refundQty',
-          label: '退货数量',
-          width: '180',
-          isInput: true
-        },
+
         {
           prop: 'qty',
           label: '已退数量',
@@ -105,8 +100,7 @@ export default {
           prop: 'notes',
           label: '备注',
           width: '180',
-          isInput: true,
-          type:'text'
+
         }
       ]    }
   },

+ 22 - 11
src/views/sales_control/sales_management/components/return_sales_form.vue

@@ -13,7 +13,7 @@
         <div v-if="!detailsId">
           <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>
+          <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>
@@ -22,6 +22,9 @@
 
       </template>
       <template v-slot:custom="{item:{row,$index}}">
+          <div>{{diffQty(row)}}</div>
+      </template>
+      <template v-slot:custom="{item:{row,$index}}">
         <el-radio label="1" v-model="row.flag">增加</el-radio>
         <el-radio label="-1" v-model="row.flag">减少</el-radio>
       </template>
@@ -89,19 +92,24 @@ export default {
         },
         {
           prop: 'qty',
+          align:'left',
           label: '发货数量',
           width: '180'
         },
         {
           prop: 'refundQty',
+          align:'left',
+
           label: '退货数量',
           width: '180',
           isInput: true
         },
         {
-          prop: 'qty',
+          prop: 'diffQty',
+          align:'left',
           label: '已退数量',
           width: '180',
+
         },
         // {
         //   prop: 'volume',
@@ -125,6 +133,13 @@ export default {
       salesId:""
     }
   },
+  computed:{
+    diffQty(){
+      return (row)=>{
+        return Number(row.qty) - Number(row.refundQty)
+      }
+    }
+  },
   created() {
     if (this.detailsId) {
       detailRefund({id:this.detailsId}).then(res=>{
@@ -150,19 +165,15 @@ export default {
       return listOrder(...p)
     },
     confirm(selected) {
-      console.log(selected)
       // console.log(selected)
+      selected.forEach(k=>{
+        k.diffQty = Number(k.qty) - Number(k.refundQty)
+      })
       this.dataList = [...this.dataList,...selected]
       this.details = this.dataList[0]
       this.details.customerOrderNo = this.dataList[0].id
-      this.details.id = ''
+      this.detailsId = this.detailsId
       this.customerNumber=this.dataList[0].customerNumber
-       // this.$refs.header.details.customerName = this.dataList[0].customerName
-       // this.$refs.header.details.customerNumber = this.dataList[0].customerNumber
-       // this.$refs.header.details.customerNumber = this.dataList[0].pickTime
-       // this.$refs.header.details.customerNumber = this.dataList[0].userName
-       // this.$refs.header.details.customerNumber = this.dataList[0].phone
-       // this.$refs.header.details.customerNumber = this.dataList[0].stockType
       this.dialogVisible = false
       this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.$refs.tableView.clearSelection()
 
@@ -234,7 +245,7 @@ export default {
     },
     handleInform(status=2){
       sendRefund({id:this.salesId,status}).then(res=>{
-        this.$successMsg('通知发货')
+        this.$successMsg('退货通知')
         this.$parent.pageType = 0
       })
     },

+ 0 - 18
src/views/sales_control/sales_management/return_sales_list.vue

@@ -44,24 +44,6 @@ export default {
             }
           ]
         ],
-        [
-          [
-            {
-              name: '编辑',
-              click: () => {
-                this.pageType = 1
-              }
-            }
-          ]
-        ],
-        [
-          [
-            {
-              name: '删除',
-              click: this.dels
-            }
-          ]
-        ]
       ],
       // 表格属性
       tableAttributes: {

+ 9 - 9
src/views/sales_control/stock_three_level.vue

@@ -24,15 +24,15 @@ export default {
     return {
       // 事件组合
       optionsEvensGroup: [
-        [
-          [
-            {
-              name: '批量删除',
-              click: this.dels,
-              isRole: this.$checkBtnRole('del', this.$route.meta.roles)
-            }
-          ]
-        ]
+        // [
+        //   [
+        //     {
+        //       name: '批量删除',
+        //       click: this.dels,
+        //       isRole: this.$checkBtnRole('del', this.$route.meta.roles)
+        //     }
+        //   ]
+        // ]
       ],
       // 表格属性
       tableAttributes: {