lilei 1 anno fa
parent
commit
3f8c9dc482

+ 1 - 1
src/api/salesDetailNew.js

@@ -158,7 +158,7 @@ export const salesDetailUpdateCancelQty = (params) => {
 // 整单取消待下推
 export const salesDetailCancleOfAll = (params) => {
   return axios({
-    url: '/salesn/detail/cancleOfAll',
+    url: '/salesn/detail/cancelAll',
     data: params,
     method: 'post'
   })

+ 6 - 1
src/views/salesManagement/pushOrderManagement/detail.vue

@@ -96,6 +96,11 @@
             <a-badge count="促" v-if="record.promotionFlag=='GIFT'" :number-style="{ backgroundColor: '#52c41a', zoom:'80%' }"></a-badge>
             <a-badge count="特" v-if="record.promotionFlag=='DISCOUNT'" :number-style="{ backgroundColor: '#faad14', zoom:'80%' }"></a-badge>
           </template>
+           <!-- 销售价 -->
+          <template slot="price" slot-scope="text, record">
+            {{ toThousands(text) }}
+            <span v-if="record.promotionFlag=='GIFT'" title="原价">({{ toThousands(record.origPrice) }})</span>
+          </template>
         </s-table>
       </a-card>
     </a-spin>
@@ -199,7 +204,7 @@ export default {
         // { title: '本次下推金额', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('B_dispatchDetail_salesPrice')) { //  售价权限
-        arr.splice(5, 0, { title: '销售价格', dataIndex: 'price', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(5, 0, { title: '销售价格', dataIndex: 'price', width: '8%', align: 'right', scopedSlots: { customRender: 'price' }, })
         arr.splice(9, 0, { title: '本次下推金额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       if (this.$hasPermissions('B_dispatchDetail_cityPrice')) { //  市级权限

+ 11 - 1
src/views/salesManagement/waitDispatchNew/edit.vue

@@ -14,6 +14,7 @@
           ref="partQuery"
           :newLoading="isInster"
           @cancelProduct="cancelProduct"
+          @cancelAll = "cancelAll"
           @addProduct="insterProduct"></queryPart>
       </a-card>
       <a-card size="small" :bordered="false" class="waitDispatch-cont">
@@ -55,7 +56,7 @@ import queryPart from './queryPart.vue'
 import detailProductList from './detailProductList.vue'
 import dsModal from './dsModal.vue'
 import { salesDetailBySn } from '@/api/salesNew'
-import { insertBatchOfWaitDispatch, salesDetailUpdateCancelQty } from '@/api/salesDetailNew'
+import { insertBatchOfWaitDispatch, salesDetailUpdateCancelQty, salesDetailCancleOfAll } from '@/api/salesDetailNew'
 import { pushDown } from '@/api/waitDispatchDetail'
 import { findBySalesBillSn } from '@/api/dispatch'
 
@@ -129,6 +130,15 @@ export default {
         this.isInster = false
       })
     },
+    // 整单取消
+    cancelAll(){
+      salesDetailCancleOfAll({salesBillSn: this.salesBillSn}).then(res=>{
+        if(res.status == 200){
+          this.handleBack()
+          this.$message.success(res.message)
+        }
+      })
+    },
     // 批量取消产品
     cancelProduct (list) {
       // 防止多次添加产品

+ 2 - 2
src/views/salesManagement/waitDispatchNew/queryPart.vue

@@ -182,7 +182,7 @@ export default {
   },
   computed: {
     hasPrompActive(){
-      return this.activeList.length > 0
+      return this.detailData&&this.detailData.promoFlag==1
     },
     checkboxOption () {
       return {
@@ -533,7 +533,7 @@ export default {
         centered: true,
         closable: true,
         onOk () {
-           
+          _this.$emit('cancelAll')
         }
       })
     },