howie преди 3 години
родител
ревизия
8b2b0c6647

+ 9 - 1
src/views/supply/apply/apply_list.vue

@@ -295,7 +295,7 @@
     <ApplyDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
     <ApplyExamine :listItem="queryItem" v-if="isShowExamine" @backListFormDetail="backList" />
     <ApplyForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
-    <ApplyReturnForm :listItem="queryItem" v-if="isShowReturnForm" @backListFormDetail="backList" />
+    <ApplyReturnForm :listItem="queryItem" v-if="isShowReturnForm" @backListFormDetail="backList" :isShow="isShow"/>
 
   </div>
 </template>
@@ -404,7 +404,15 @@ export default {
     this.getSalesmanList();
     this.getList();
   },
+  activated() {
+      this.isShow = false
+  if (this.$route.query && this.$route.query.isShow) {
+    this.isShow = this.$route.query.isShow
 
+      this.toReturnForm()
+  }
+
+},
   methods: {
     // 获取业务员列表
     getSalesmanList() {

+ 12 - 6
src/views/supply/apply/components/apply_return_form.vue

@@ -112,7 +112,7 @@
         </el-table-column>
       </el-table>
     </div>
-    
+
     <div class="page-footer">
       <div class="footer">
         <el-button type="primary" @click="clickSubmitForm('SAVE')">保 存</el-button>
@@ -209,7 +209,7 @@
           </div>
         </div>
       </div>
-      
+
       <span slot="footer" class="dialog-footer">
         <el-button @click="closeDialog">取 消</el-button>
         <el-button type="primary" @click="submitAddGoods">确 定</el-button>
@@ -266,7 +266,7 @@ export default {
       // typeList: [],
       stockList: [],
       categoryList: [],
-      
+
       tableGoodsList: [],
       isFirst: false,
     }
@@ -308,7 +308,13 @@ export default {
   methods: {
     // 返回列表
     goBack() {
-      this.$emit('backListFormDetail');
+       console.log(45454);
+      if (this.$parent.isShow=='true') {
+        this.$router.replace('/supply/implement/sum_list')
+      }else{
+         this.$emit('backListFormDetail');
+      }
+
     },
 
     // 获取详情
@@ -373,7 +379,7 @@ export default {
         this.categoryList = res.data.records;
       })
     },
-    
+
     // 库存字段
     stockFilter(item, type) {
       let STOCK_ORDER_INVOICE = this.stockList.find(o => o.dictCode == 'STOCK_ORDER_INVOICE').dictValue;
@@ -583,4 +589,4 @@ export default {
       padding-left: 10px;
     }
   }
-</style>
+</style>

+ 5 - 2
src/views/supply/apply/components/engin_return_form.vue

@@ -331,7 +331,7 @@ export default {
   },
   name: 'EnginForm',
   componentName: 'EnginForm',
-  props: ['listItem'],
+  props: ['listItem','isShow'],
   filters: {
     orderTypeFilter(val) {
       const MAP = {
@@ -455,7 +455,10 @@ export default {
   methods: {
     // 返回列表
     goBack() {
-      this.$emit('backListFormDetail');
+
+         this.$emit('backListFormDetail');
+
+
     },
 
     getDate() {

+ 23 - 2
src/views/supply/deliver/sum_list.vue

@@ -107,7 +107,9 @@
           <div class="fl">
             <el-button type="primary" size="mini" @click="toPrint" :disabled="tableSelection.length < 1">打印发货单</el-button>
           </div>
-          <div class="fr">
+          <!--  -->
+          <div class="fr" style="display: flex;">
+            <el-button size="mini" type="primary" v-if="$checkBtnRole('refund', $route.meta.roles)"  style="margin-right: 10px;" icon="el-icon-plus" @click="$router.push('/supply/deliver/apply_list?isShow=true')">退货申请</el-button>
             <ExportButton :exUrl="'invoice/exportInvoice'" :exParams="exParams" />
           </div>
         </div>
@@ -210,7 +212,11 @@
                 {{scope.row.payAmount | numToFixed}}
               </template>
             </el-table-column>
-
+             <el-table-column align="right" label="未出库数量" prop="singlePayPrice" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{comRefundableQty(scope.row.type ,scope.row.salesExamineStatus , scope.row)}}
+              </template>
+            </el-table-column>
             <el-table-column align="right" label="发货数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="left" label="业务员" prop="serviceName" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="left" label="政策单号" prop="policyCode" min-width="100" show-overflow-tooltip></el-table-column>
@@ -305,6 +311,21 @@ export default {
         serviceId: this.screenForm.salesMan,
       }
     },
+    comRefundableQty(){
+      return (type,status,row)=>{
+        if (type == 2) {
+            return ''
+        }else{
+            if (status == 'OK') {
+                return 0
+            }else{
+              return row.refundableQty
+            }
+
+        }
+
+      }
+    }
   },
 
   created() {