Prechádzať zdrojové kódy

Merge branch 'develop_cuxiao' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_cuxiao

lilei 1 rok pred
rodič
commit
f683ca1374

+ 6 - 1
src/views/salesReturnManagement/custConfirm/list.vue

@@ -193,7 +193,7 @@
       :chooseData="chooseData"
       :openModal="showSetPriceModal"
       @setOk="setPriceOk"
-      @cancel="showSetPriceModal=false"></setPriceModal>
+      @cancel="cancelPriceModal"></setPriceModal>
     <!-- 添加产品 -->
     <chooseProductsModal
       ref="chooseProduct"
@@ -366,6 +366,11 @@ export default {
     handleBack () {
       this.$router.push({ name: 'salesReturnList', query: { closeLastOldTab: true } })
     },
+    // 关闭批量设置退货单价弹窗
+    cancelPriceModal(){
+      this.$refs.setPriceModal.closeGrabOrder();
+      this.showSetPriceModal=false
+    },
     // 添加产品
     addProduct (data) {
       const a = this.$store.state.app.goodReturnReason.find(item => item.code == data.returnReasonCode)

+ 16 - 17
src/views/salesReturnManagement/custConfirm/setPriceModal.vue

@@ -154,21 +154,21 @@ export default {
             return item.productEntity.code.indexOf(this.queryParam.productCode) >= 0 &&
             item.productEntity.name.indexOf(this.queryParam.productName) >= 0
           })
-          let arr  = ret.map(con=>{return con.salesReturnDetailSn})
-          if(arr &&arr.length>0){
-            if(this.salesBillSnList && this.salesBillSnList.length>0){
-              this.salesBillSnList.forEach(item=>{
-                let pot = arr.indexOf(item.salesReturnDetailSn)
-                if(pot!=-1){
-                  if(item.price ||item.price==0){
-                     ret[pot].price = item.price
+          const arr = ret.map(con => { return con.salesReturnDetailSn })
+          if (arr && arr.length > 0) {
+            if (this.salesBillSnList && this.salesBillSnList.length > 0) {
+              this.salesBillSnList.forEach(item => {
+                const pot = arr.indexOf(item.salesReturnDetailSn)
+                if (pot != -1) {
+                  if (item.price || item.price == 0) {
+                    ret[pot].price = item.price
                   }
-                  ret[pot].priceRemark = '抓单('+this.form.salesBillNo+')'   
+                  ret[pot].priceRemark = '抓单(' + this.form.salesBillNo + ')'
                 }
               })
             }
           }
-          
+
           res({
             list: ret,
             count: ret.length
@@ -180,7 +180,7 @@ export default {
       listInfo: null,
       noShowBillSnList: null,
       salesBillSnList: [],
-      salesBillFlag:false //抓单按钮
+      salesBillFlag: false // 抓单按钮
     }
   },
   methods: {
@@ -210,17 +210,17 @@ export default {
         productList: productArr
       }
       grabSalesBill(objInfo).then(res => {
-        if(res.status == 200){
+        if (res.status == 200) {
           const newList = res.data
           const _this = this
           _this.salesBillFlag = true
           if (newList && newList.length > 0) {
             const flag = newList.some(item => Object.keys(item).length > 2)
             if (flag) {
-              this.listInfo = newList.filter(con => Object.keys(con).length > 2)
-              this.openGrabOrderModal =this.isShow?true:false
+              _this.listInfo = newList.filter(con => Object.keys(con).length > 2)
               const noShowList = newList.filter(con => Object.keys(con).length <= 2)
-              this.noShowBillSnList = _this.getNewSalesBillList(noShowList)
+              _this.noShowBillSnList = _this.getNewSalesBillList(noShowList)
+              _this.salesBillSnList = _this.noShowBillSnList ? _this.noShowBillSnList : []
             } else {
               const resultVal = _this.getNewSalesBillList(newList)
               this.salesBillSnList = resultVal
@@ -289,7 +289,6 @@ export default {
         })
         this.form.salesReturnBillDetailList = snList
       }
-
       const params = Object.assign(this.form)
       this.disabled = true
       this.spinning = true
@@ -314,7 +313,7 @@ export default {
     },
     // 取消
     handleCommonCancel () {
-      this.salesBillFlag=false
+      this.salesBillFlag = false
       this.$emit('cancel')
     },
     // 查询