浏览代码

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

chenrui 1 年之前
父节点
当前提交
7ecaa297a6

+ 4 - 0
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -120,6 +120,10 @@
               ftext = '促'
               fcolor = '#52c41a'
             }
+            if(record.promotionFlag == 'GATE'){
+              ftext = '槛'
+              fcolor = '#108ee9'
+            }
             if(record.promotionFlag == 'DISCOUNT'){
               ftext = '特'
               fcolor = '#faad14'

+ 1 - 0
src/views/salesManagement/salesQueryNew/comps/productList.vue

@@ -164,6 +164,7 @@
         <span style="padding-right: 15px;">{{ text }}</span>
         <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>
+        <a-badge count="槛" v-if="record.promotionFlag=='GATE'" :number-style="{ backgroundColor: '#108ee9', zoom:'80%' }"></a-badge>
         <a-badge count="缺" v-if="Number(record.stockQty||0) < Number(record.unpushedQty||0)" :number-style="{ zoom:'80%' }"></a-badge>
       </template>
       <!-- 产品名称 -->

+ 2 - 1
src/views/salesManagement/salesQueryNew/detail.vue

@@ -83,7 +83,7 @@
                 <span v-if="$hasPermissions(authCode + '_salesPrice')">已发货金额:<strong>{{ detailData&&(detailData.totalDispatchAmount || detailData.totalDispatchAmount==0) ? toThousands(detailData.totalDispatchAmount) : '--' }}</strong>;</span>
                 <span v-if="$hasPermissions(authCode + '_salesPrice')">待发货金额:<strong>{{ detailData&&(detailData.totalUndispatchAmount || detailData.totalUndispatchAmount==0) ? toThousands(detailData.totalUndispatchAmount) : '--' }}</strong>;</span>
                 <span v-if="isCityPrice">市级总售价:<strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? toThousands(detailData.totalCityAmount) : '--' }}</strong>;</span>
-                <span v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalLossAmount" style="color: red;">优惠金额:<strong>{{ toThousands(detailData.totalLossAmount) }}</strong>;</span>
+                <span v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalDiscountAmount" style="color: red;">优惠金额:<strong>{{ toThousands(detailData.totalDiscountAmount) }}</strong>;</span>
               </div>
               <div>
                 <a-button v-if="detailData && (detailData.billStatus == 'WAIT_AUDIT' || detailData.billStatus == 'HQ_CHANGE')" type="link" @click="openStockOut">缺货明细</a-button>
@@ -285,6 +285,7 @@ export default {
       salesDetailBySn({ salesBillSn: this.bizSn || this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.detailData = res.data || null
+          this.detailData.totalDiscountAmount = Number(this.detailData.totalOrigAmount||0) - Number(this.detailData.totalAmount||0)
         }
         this.$refs.productList.pageInit()
       })

+ 3 - 2
src/views/salesManagement/salesQueryNew/edit.vue

@@ -83,9 +83,9 @@
           <div>
             产品总款数:<strong style="margin-right: 10px;"> {{ detailData.totalCategory }} </strong>
             总数量:<strong> {{ detailData.totalQty }} </strong>
-            <span style="margin:0 0 0 10px;" v-if="detailData.totalLossAmount">优惠金额:¥<strong>{{ toThousands(detailData.totalLossAmount) }}</strong></span>
+            <span style="margin:0 10px;" v-if="detailData.totalDiscountAmount">优惠金额:¥-<strong>{{ toThousands(detailData.totalDiscountAmount) }}</strong></span>
             <a-popover title="优惠明细" @visibleChange="(visible)=>{visible&&getPromYhDetail()}">
-              <a-button shape="round" size="small" v-if="detailData.totalLossAmount">优惠明细</a-button>
+              <a-button shape="round" size="small" v-if="detailData.totalDiscountAmount">优惠明细</a-button>
               <div slot="content">
                 <div v-if="yhDetail">
                     <div 
@@ -224,6 +224,7 @@ export default {
       salesDetailBySn({ salesBillSn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.detailData = res.data
+          this.detailData.totalDiscountAmount = Number(this.detailData.totalOrigAmount||0) - Number(this.detailData.totalAmount||0)
         }
         if(flag){
           this.getActiveList()

+ 4 - 4
src/views/salesManagement/salesQueryNew/list.vue

@@ -505,7 +505,7 @@ export default {
       const hasExpense = await queryCreateBySalesBillSn({salesBillSn: row.salesBillSn}).then(res => res.data||[])
       console.log(hasExpense)
       // 有2个以上采购额时
-      if(hasExpense && hasExpense.length > 1){
+      if(hasExpense && hasExpense.exceed && hasExpense.balance){
         _this.$confirm({
           title: '转费用报销单?',
           centered: true,
@@ -537,14 +537,14 @@ export default {
         });
       }else{
         // 直接转费用单
-        _this.expenseSave(hasExpense,_this.expenseOption)
+        _this.expenseSave(hasExpense,null)
       }
     },
     // 转费用单
     expenseSave(data, type){
       console.log(data,type)
-      const row = data[type]
-      expenseAccountSave(row).then(res => {
+      const params = type ? data[type] : data.balance||data.exceed
+      expenseAccountSave(params).then(res => {
         if(res.status == 200){
           this.$message.info(res.message)
           this.$refs.table.refresh()

+ 4 - 0
src/views/salesManagement/waitDispatchNew/detailProductList.vue

@@ -123,6 +123,10 @@
             ftext = '促'
             fcolor = '#52c41a'
           }
+          if(record.promotionFlag == 'GATE'){
+            ftext = '槛'
+            fcolor = '#108ee9'
+          }
           if(record.promotionFlag == 'DISCOUNT'){
             ftext = '特'
             fcolor = '#faad14'

+ 10 - 0
src/views/salesManagement/waitDispatchNew/queryPart.vue

@@ -62,6 +62,12 @@
         <a-button type="primary" :disabled="newLoading" class="button-info" @click="handlePlAdd">批量添加</a-button>
         <a-button type="danger" v-if="hasPrompActive" :disabled="newLoading" class="button-error" @click="handleAllCancel">整单取消</a-button>
         <a-button type="danger" v-else :disabled="newLoading" class="button-error" @click="handlePlCancel">批量取消</a-button>
+        <a-tooltip placement="top" v-if="hasPrompActive" style="margin-left:6px;">
+          <template slot="title">
+            <span>参加促销活动的销售单,不能单个取消产品,只能整单取消。</span>
+          </template>
+          <a-icon style="font-size: 14px;" type="question-circle" />
+        </a-tooltip>
         <span style="margin-left: 10px;" v-if="selectedRowKeys.length">已选 {{ selectedRowKeys.length }} 项</span>
       </div>
       <div style="padding-left: 20px;">
@@ -220,6 +226,10 @@ export default {
               ftext = '促'
               fcolor = '#52c41a'
             }
+            if(record.promotionFlag == 'GATE'){
+              ftext = '槛'
+              fcolor = '#108ee9'
+            }
             if(record.promotionFlag == 'DISCOUNT'){
               ftext = '特'
               fcolor = '#faad14'

+ 2 - 2
vue.config.js

@@ -108,9 +108,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.113:8660/ocs-admin',
+        target: 'http://192.168.2.111/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
+        // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {