فهرست منبع

Merge branch 'develop_yh46' of jianguan-web/jg-ocs-html into pre-release

李磊 10 ماه پیش
والد
کامیت
f735e02b5f

+ 146 - 131
src/api/salesNew.js

@@ -2,168 +2,168 @@ import { axios } from '@/utils/request'
 
 // 销售 统计查询
 export const salesCount = (params) => {
-    return axios({
-      url: `/sales/queryCount`,
-      data: params,
-      method: 'post'
-    })
-  }
+  return axios({
+    url: `/sales/queryCount`,
+    data: params,
+    method: 'post'
+  })
+}
 //  销售 列表  有分页
 export const salesList = (params) => {
-    const url = `/sales/queryPage/${params.pageNo}/${params.pageSize}`
-    delete params.pageNo
-    delete params.pageSize
-    return axios({
-        url: url,
-        data: params,
-        method: 'post',
-        headers:{
-          'module': encodeURIComponent('列表查询')
-        }
-    })
+  const url = `/sales/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
 }
 // 第三方库存
 export const getThirdStockQty = (params) => {
-    return axios({
-        url: `/sunFulcess/getStockQty`,
-        data: params,
-        method: 'post'
-    })
+  return axios({
+    url: `/sunFulcess/getStockQty`,
+    data: params,
+    method: 'post'
+  })
 }
 
 // 是否已转采购单
 export const getCreatePurchaseFlag = (params) => {
-    return axios({
-        url: `/sales/getCreatePurchaseFlag`,
-        data: params,
-        method: 'post'
-    })
+  return axios({
+    url: `/sales/getCreatePurchaseFlag`,
+    data: params,
+    method: 'post'
+  })
 }
 // 转采购单
 export const allCreatePurchase = (params) => {
-    return axios({
-        url: `/sales/allCreatePurchase`,
-        data: params,
-        method: 'post'
-    })
+  return axios({
+    url: `/sales/allCreatePurchase`,
+    data: params,
+    method: 'post'
+  })
 }
 //  销售 待转费用单列表  有分页
 export const salesConvertExpenseList = (params) => {
-    const url = `/salesPromo/queryBatchConvertExpenseAccountPage/${params.pageNo}/${params.pageSize}`
-    delete params.pageNo
-    delete params.pageSize
-    return axios({
-        url: url,
-        data: params,
-        method: 'post',
-        headers:{
-          'module': encodeURIComponent('待转费用报销单列表')
-        }
-    })
+  const url = `/salesPromo/queryBatchConvertExpenseAccountPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('待转费用报销单列表')
+    }
+  })
 }
 //  销售 新增
 export const salesSave = (params) => {
-    return axios({
-      url: '/sales/insert',
-      data: params,
-      method: 'post',
-      headers:{
-        'module': encodeURIComponent('新增销售单')
-      }
-    })
+  return axios({
+    url: '/sales/insert',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('新增销售单')
+    }
+  })
 }
 // 销售 编辑
 export const salesModify = (params) => {
-    return axios({
-      url: '/sales/modifyWarehouse',
-      data: params,
-      method: 'post',
-      headers:{
-        'module': encodeURIComponent('修改仓库')
-      }
-    })
-  }
+  return axios({
+    url: '/sales/modifyWarehouse',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('修改仓库')
+    }
+  })
+}
 //  销售 详情bysn
 export const salesDetailBySn = (params) => {
-    return axios({
-      url: `/sales/findBySn/${params.salesBillSn}`,
-      method: 'get'
-    })
-  }
+  return axios({
+    url: `/sales/findBySn/${params.salesBillSn}`,
+    method: 'get'
+  })
+}
 // 查询客户名称
 export const salesDetailByNo = (params) => {
-    return axios({
-      url: `/sales/findBySaleBillNo/${params.salesBillNo}`,
-      method: 'get',
-      headers:{
-        'module': encodeURIComponent('查询客户信息')
-      }
-    })
-  }
+  return axios({
+    url: `/sales/findBySaleBillNo/${params.salesBillNo}`,
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('查询客户信息')
+    }
+  })
+}
 //  销售 删除
 export const salesDel = (params) => {
-    return axios({
-      url: `/sales/delete/${params.salesBillSn}`,
-      method: 'get',
-      headers:{
-        'module': encodeURIComponent('删除')
-      }
-    })
-  }
+  return axios({
+    url: `/sales/delete/${params.salesBillSn}`,
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('删除')
+    }
+  })
+}
 //  销售 取消
 export const salesCancle = (params) => {
-    return axios({
-      url: `/sales/cancle/${params.salesBillSn}`,
-      method: 'get',
-      headers:{
-        'module': encodeURIComponent('取消')
-      }
-    })
-  }
+  return axios({
+    url: `/sales/cancle/${params.salesBillSn}`,
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('取消')
+    }
+  })
+}
 
 // 根据销售单sn查询参加的活动
 export const salesPromoQueryList = (params) => {
-    return axios({
-        url: `/salesPromo/queryExtList`,
-        data: params,
-        method: 'post'
-    })
+  return axios({
+    url: `/salesPromo/queryExtList`,
+    data: params,
+    method: 'post'
+  })
 }
 // 更换促销,可更换活动列表
 export const salesPromoMatchProduct = (params) => {
   return axios({
-      url: `/salesPromo/queryMatchProduct`,
-      data: params,
-      method: 'post'
+    url: `/salesPromo/queryMatchProduct`,
+    data: params,
+    method: 'post'
   })
 }
 
 // 判断是否有新的活动
 export const salesQueryUnPartPromo = (params) => {
   return axios({
-      url: `/salesPromo/queryUnPartPromo/${params.salesBillSn}`,
-      data: params,
-      method: 'post'
+    url: `/salesPromo/queryUnPartPromo/${params.salesBillSn}`,
+    data: params,
+    method: 'post'
   })
 }
 // 活动优惠明细接口
 export const salesPromoQueryCount = (params) => {
   return axios({
-      url: `/salesPromo/queryCount`,
-      data: params,
-      method: 'post'
+    url: `/salesPromo/queryCount`,
+    data: params,
+    method: 'post'
   })
 }
 
 // 提交时活动规则校验
 export const salesPromoValidaSubmit = (params) => {
   return axios({
-      url: `/salesPromo/validationSubmit/${params.salesBillSn}`,
-      data: params,
-      method: 'post',
-      headers:{
-        'module': encodeURIComponent('提交前活动规则校验')
-      }
+    url: `/salesPromo/validationSubmit/${params.salesBillSn}`,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('提交前活动规则校验')
+    }
   })
 }
 
@@ -173,7 +173,7 @@ export const salesWriteAuditPass = (params) => {
     url: '/sales/auditPass',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('审核通过')
     }
   })
@@ -184,7 +184,7 @@ export const salesWriteAuditReject = (params) => {
     url: '/sales/auditReject',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('审核驳回')
     }
   })
@@ -195,7 +195,7 @@ export const salesWriteAuditPush = (params) => {
     url: '/sales/auditPush',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('一键审核')
     }
   })
@@ -206,7 +206,7 @@ export const salesWriteSubmit = (params) => {
     url: '/sales/submit',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('提交')
     }
   })
@@ -220,13 +220,30 @@ export const submitCheck = (params) => {
     data: params
   })
 }
+// 改单弹窗价格列表
+export const changeBillCheck = (params) => {
+  return axios({
+    url: '/sales/changeBillCheck',
+    method: 'post',
+    data: params
+  })
+}
+// 更新改单数据
+export const changeBillCheckUpdatePrice = (params) => {
+  return axios({
+    url: '/sales/changeBillCheckUpdatePrice',
+    method: 'post',
+    data: params
+  })
+}
+
 // 当前价格  提交
 export const updateBatch = (params) => {
   return axios({
     url: '/sales/detail/updateBatch',
     method: 'post',
     data: params,
-    headers:{
+    headers: {
       'module': encodeURIComponent('价格批量更新')
     }
   })
@@ -239,7 +256,7 @@ export const salesDetailAllList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('销售单明细列表查询')
     }
   })
@@ -268,7 +285,7 @@ export const queryBatchCreateBySalesPromoSnListGroupType = (params) => {
     url: `/expenseAccount/queryBatchCreateBySalesPromoSnListGroupType`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('销售单合并后转费用报销单')
     }
   })
@@ -279,7 +296,7 @@ export const expenseAccountSaveGroupType = (params) => {
     url: `/expenseAccount/saveCreateGroupType`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('销售单转费用报销单,确定合并')
     }
   })
@@ -290,20 +307,19 @@ export const expenseAccountSave = (params) => {
     url: `/expenseAccount/saveCreate`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('转费用报销单')
     }
   })
 }
 
-
 //  销售 打印
 export const salesPrint = (params) => {
   return axios({
     url: '/sales/print',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('销售打印')
     }
   })
@@ -314,7 +330,7 @@ export const salesPrintPreview = (params) => {
     url: '/sales/printPreview',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('销售打印预览')
     }
   })
@@ -329,14 +345,14 @@ export const salesDetailProductType = (params) => {
 // 销售 详情  打印
 export const salesDetailPrint = params => {
   const url = `/sales/print/${params.priceType}`
-  const id = params.priceType.indexOf('_TYPE')>=0 ? '销售分类打印' : '销售打印'
+  const id = params.priceType.indexOf('_TYPE') >= 0 ? '销售分类打印' : '销售打印'
   delete params.priceType
   return axios.request({
     url: url,
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
+    headers: {
       'module': encodeURIComponent(id)
     }
   })
@@ -350,7 +366,7 @@ export const salesDetailExcel = params => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
+    headers: {
       'module': encodeURIComponent('导出Excel')
     }
   })
@@ -363,13 +379,12 @@ export const salesDetailTypeExcel = params => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
+    headers: {
       'module': encodeURIComponent('销售分类导出')
     }
   })
 }
 
-
 // 仓库销售单
 //  按仓库查询销售单 列表  有分页
 export const queryPageForWarehouse = (params) => {
@@ -380,7 +395,7 @@ export const queryPageForWarehouse = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })
@@ -402,7 +417,7 @@ export const queryPageForWarehouseDetail = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('明细列表查询')
     }
   })
@@ -424,7 +439,7 @@ export const exportForWarehouse = params => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
+    headers: {
       'module': encodeURIComponent('导出')
     }
   })
@@ -438,8 +453,8 @@ export const salesOverviewQueryPage = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })
-}
+}

+ 1 - 1
src/views/dealerManagement/merchantInfoManagement/priceLevelModal.vue

@@ -4,7 +4,7 @@
     class="chooseType-modal"
     :footer="null"
     :maskClosable="false"
-    title="选择品类"
+    title="编辑价格级别"
     v-model="isShow"
     @cancel="isShow=false"
     width="500px">

+ 7 - 5
src/views/financialManagement/collectionDetailStatic/list.vue

@@ -165,6 +165,7 @@
           授信还款总金额:<strong>{{ toThousands(countData&&countData.payCreditAmount||0) }}</strong>;
           余款抵扣总金额:<strong>{{ toThousands(countData&&countData.balanceAmount||0) }}</strong>;
           跨月打款总金额:<strong>{{ toThousands(countData&&countData.nextMonthAmount||0) }}</strong>;
+          特殊申请发货总金额:<strong>{{ toThousands(countData&&countData.specialSendAmount||0) }}</strong>;
         </div>
       </div>
       <a-spin :spinning="spinning" tip="Loading...">
@@ -354,6 +355,7 @@ export default {
         { title: '授信还款', dataIndex: 'payCreditAmount', align: 'right', width: '5%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '余款抵扣', dataIndex: 'balanceAmount', align: 'right', width: '5%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '跨月打款', dataIndex: 'nextMonthAmount', align: 'right', width: '5%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '特殊申请发货', dataIndex: 'specialSendAmount', width: '5%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '户名', dataIndex: 'bankAccount', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
         { title: '汇入银行', dataIndex: 'bankName', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
         { title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
@@ -407,7 +409,7 @@ export default {
               dataList.map(item => {
                 data.push({ id: item.id, printStatus: 'NO_PRINT' })
               })
-              _this.plUpdateStatus(data,1)
+              _this.plUpdateStatus(data, 1)
             }
           })
         } else {
@@ -418,16 +420,16 @@ export default {
       if (e.key == 2) { // 批量开票
         const data = []
         rows.map(item => {
-          data.push({ id: item.id, invoiceDate: '', remarks: ''})
+          data.push({ id: item.id, invoiceDate: '', remarks: '' })
         })
         _this.plinvoiceInfo = data
         _this.plinvoiceIsShow = true
       }
     },
     // 批量操作
-    plUpdateStatus (data,type) {
+    plUpdateStatus (data, type) {
       this.spinning = true
-      financeBookDetailUpdateBatch(data,type).then(res => {
+      financeBookDetailUpdateBatch(data, type).then(res => {
         if (res.status == 200) {
           this.searchForm()
         }
@@ -440,7 +442,7 @@ export default {
         item.invoiceDate = data.invoiceDate
         item.remarks = data.remarks
       })
-      this.plUpdateStatus(this.plinvoiceInfo,0)
+      this.plUpdateStatus(this.plinvoiceInfo, 0)
     },
     // 表格选中项
     rowSelectionFun (obj) {

+ 22 - 19
src/views/financialManagement/financialCollection/detail.vue

@@ -13,24 +13,24 @@
         </template>
       </a-page-header>
       <a-card :bordered="false" class="financialCollectionAddcont" v-show="showDetail">
-         <a-descriptions :column="{ xs: 2, sm: 3, md: 3}" v-if="detailData" ref="tableSearch">
-           <a-descriptions-item label="创建时间">{{ detailData&&detailData.createDate || '--' }}</a-descriptions-item>
-           <a-descriptions-item label="收款单号">
-             {{ detailData&&detailData.bookNo || '--' }}
-           </a-descriptions-item>
-           <a-descriptions-item label="申请人">{{ detailData&&detailData.applyPersonName || '--' }}</a-descriptions-item>
-           <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
-           <a-descriptions-item span="2" label="收款事由">{{ detailData&&detailData.bookReason || '--' }}</a-descriptions-item>
-           <a-descriptions-item label="状态">{{ detailData&&detailData.statusDictValue || '--' }}</a-descriptions-item>
-           <a-descriptions-item label="付款方类型">{{ detailData&&detailData.payerTypeDictValue || '--' }}</a-descriptions-item>
-           <a-descriptions-item label="付款方">{{ detailData&&detailData.payerName || '--' }}</a-descriptions-item>
-           <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks||'--' }}</a-descriptions-item>
-           <a-descriptions-item label="附件" :span="3">
-             <a target="_blank" style="color: #00aaff;text-decoration: underline;margin-right: 15px;" :href="item.filePath" v-for="item in detailData.attachmentList" :key="item.id">
-               {{ item.fileName }}
-             </a>
-           </a-descriptions-item>
-         </a-descriptions>
+        <a-descriptions :column="{ xs: 2, sm: 3, md: 3}" v-if="detailData" ref="tableSearch">
+          <a-descriptions-item label="创建时间">{{ detailData&&detailData.createDate || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="收款单号">
+            {{ detailData&&detailData.bookNo || '--' }}
+          </a-descriptions-item>
+          <a-descriptions-item label="申请人">{{ detailData&&detailData.applyPersonName || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
+          <a-descriptions-item span="2" label="收款事由">{{ detailData&&detailData.bookReason || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="状态">{{ detailData&&detailData.statusDictValue || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="付款方类型">{{ detailData&&detailData.payerTypeDictValue || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="付款方">{{ detailData&&detailData.payerName || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks||'--' }}</a-descriptions-item>
+          <a-descriptions-item label="附件" :span="3">
+            <a target="_blank" style="color: #00aaff;text-decoration: underline;margin-right: 15px;" :href="item.filePath" v-for="item in detailData.attachmentList" :key="item.id">
+              {{ item.fileName }}
+            </a>
+          </a-descriptions-item>
+        </a-descriptions>
       </a-card>
       <!-- 财务明细 -->
       <a-card :bordered="false" size="small" class="financialCollectionAddcont" v-if="$route.params.sn||bookSn">
@@ -46,7 +46,9 @@
             收款金额合计 {{ toThousands(detailData.receiptTotalAmount ||0) }},
             使用授信合计 {{ toThousands(detailData.useTotalAmount||0) }},
             授信还款合计 {{ toThousands(detailData.payTotalAmount||0) }},
-            余款抵扣合计 {{ toThousands(detailData.balanceTotalAmount||0) }}
+            余款抵扣合计 {{ toThousands(detailData.balanceTotalAmount||0) }},
+            跨月打款合计 {{ toThousands(detailData.nextMonthTotalAmount||0) }},
+            特殊申请发货合计 {{ toThousands(detailData.specialTotalAmount||0) }}
           </div>
         </a-alert>
         <!-- 列表 -->
@@ -141,6 +143,7 @@ export default {
         { title: '授信还款', dataIndex: 'payTotalAmount', align: 'right', width: '5%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '余款抵扣', dataIndex: 'balanceAmount', align: 'right', width: '5%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '跨月打款', dataIndex: 'nextMonthAmount', align: 'right', width: '5%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '特殊申请发货', dataIndex: 'specialSendAmount', width: '5%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '户名', dataIndex: 'bankAccount', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '汇入银行', dataIndex: 'bankName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },

+ 3 - 0
src/views/financialManagement/financialCollection/edit.vue

@@ -58,6 +58,8 @@
             使用授信合计 {{ toThousands(detailData.useTotalAmount||0) }},
             授信还款合计 {{ toThousands(detailData.payTotalAmount||0) }},
             余款抵扣合计 {{ toThousands(detailData.balanceTotalAmount||0) }}
+            跨月打款合计 {{ toThousands(detailData.nextMonthTotalAmount||0) }},
+            特殊申请发货合计 {{ toThousands(detailData.specialTotalAmount||0) }}
           </div>
         </a-alert>
         <!-- 列表 -->
@@ -256,6 +258,7 @@ export default {
         { title: '授信还款', dataIndex: 'payTotalAmount', align: 'right', width: '5%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '余款抵扣', dataIndex: 'balanceAmount', align: 'right', width: '5%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '跨月打款', dataIndex: 'nextMonthAmount', align: 'right', width: '5%', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '特殊申请发货', dataIndex: 'specialSendAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '户名', dataIndex: 'bankAccount', align: 'center', width: '7%', customRender: function (text) { return text || '--' } },
         { title: '汇入银行', dataIndex: 'bankName', align: 'center', width: '7%', customRender: function (text) { return text || '--' } },
         { title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },

+ 79 - 54
src/views/financialManagement/financialCollection/fcDetailModal.vue

@@ -18,7 +18,13 @@
         <a-row>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="收款日期" prop="receiptDate">
-              <a-date-picker inputReadOnly style="width:100%" format="YYYY-MM-DD" v-model="form.receiptDate" placeholder="请选择收款日期" />
+              <a-date-picker
+                id="fcDetailModal-receiptDate"
+                inputReadOnly
+                style="width:100%"
+                format="YYYY-MM-DD"
+                v-model="form.receiptDate"
+                placeholder="请选择收款日期" />
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -39,12 +45,13 @@
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="付款方" prop="dealerSn">
               <!-- <dealerSubareaScopeList ref="settleClientName" @change="custChange" :disabled="true" /> -->
-              {{form.payerName}}
+              {{ form.payerName }}
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="付款账户类型" prop="payerAccountType">
               <v-select
+                id="fcDetailModal-payerAccountType"
                 v-model="form.payerAccountType"
                 showType="radio"
                 code="PAYER_ACCOUNT_TYPE"
@@ -58,13 +65,13 @@
           <!-- 公户 -->
           <a-col :span="12" v-if="form.payerAccountType=='PUBLIC'">
             <a-form-model-item style="margin-bottom:5px;" label="营业执照名称">
-              <a-input :maxLength="30" placeholder="请输入营业执照名称" v-model="form.payerAccountInfo"></a-input>
+              <a-input id="fcDetailModal-payerAccountInfo" :maxLength="30" placeholder="请输入营业执照名称" v-model="form.payerAccountInfo"></a-input>
             </a-form-model-item>
           </a-col>
           <!-- 私户 -->
           <a-col :span="12" v-if="form.payerAccountType=='PRIVATE'">
             <a-form-model-item style="margin-bottom:5px;" label="付款账户">
-              <a-input :maxLength="30" placeholder="付款账户" v-model="form.payerAccountInfo"></a-input>
+              <a-input id="fcDetailModal-payerAccountInfo1" :maxLength="30" placeholder="付款账户" v-model="form.payerAccountInfo"></a-input>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -78,12 +85,12 @@
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="付款方" prop="payerName">
               <!-- <a-input :maxLength="30" placeholder="请输入付款方名称" disabled v-model="form.payerName"></a-input> -->
-              {{form.payerName}}
+              {{ form.payerName }}
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="付款账户">
-              <a-input :maxLength="30" placeholder="付款账户" v-model="form.payerAccountInfo"></a-input>
+              <a-input id="fcDetailModal-payerAccountInfo2" :maxLength="30" placeholder="付款账户" v-model="form.payerAccountInfo"></a-input>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -93,6 +100,7 @@
             <a-form-model-item style="margin-bottom:5px;" label="订单金额">
               <a-input-number
                 style="width:100%"
+                id="fcDetailModal-orderAmount"
                 :min="0"
                 :max="99999999"
                 :precision="2"
@@ -104,6 +112,7 @@
             <a-form-model-item style="margin-bottom:5px;" label="收款金额">
               <a-input-number
                 style="width:100%"
+                id="fcDetailModal-receiptAmount"
                 :min="0"
                 :max="99999999"
                 :precision="2"
@@ -113,19 +122,20 @@
           </a-col>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="使用授信">
-              <a-checkbox v-model="form.useCreditFlag" @change="form.detailItemUseList=[]">是</a-checkbox>
+              <a-checkbox id="fcDetailModal-useCreditFlag" v-model="form.useCreditFlag" @change="form.detailItemUseList=[]">是</a-checkbox>
               <span v-if="form.useCreditFlag">合计: {{ useTotalAmount||'--' }}</span>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="授信还款">
-              <a-checkbox v-model="form.payCreditFlag" @change="form.detailItemPayList=[]">是</a-checkbox>
+              <a-checkbox id="fcDetailModal-payCreditFlag" v-model="form.payCreditFlag" @change="form.detailItemPayList=[]">是</a-checkbox>
               <span v-if="form.payCreditFlag">合计:  {{ payTotalAmount||'--' }}</span>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="余款抵扣">
               <a-input-number
+                id="fcDetailModal-balanceAmount"
                 style="width:100%"
                 :min="0"
                 :max="99999999"
@@ -138,6 +148,7 @@
             <a-form-model-item style="margin-bottom:5px;" label="跨月打款">
               <a-input-number
                 style="width:100%"
+                id="fcDetailModal-nextMonthAmount"
                 :min="0"
                 :max="99999999"
                 :precision="2"
@@ -145,9 +156,32 @@
                 v-model="form.nextMonthAmount"></a-input-number>
             </a-form-model-item>
           </a-col>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="特殊申请发货">
+              <a-input-number
+                style="width:100%"
+                id="fcDetailModal-specialSendAmount"
+                :min="0"
+                :max="99999999"
+                :precision="2"
+                placeholder="请输入特殊申请发货金额"
+                v-model="form.specialSendAmount"></a-input-number>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="足额打款">
+              <v-select
+                showType="radio"
+                id="fcDetailModal-fullPaymentFlag"
+                v-model="form.fullPaymentFlag"
+                code="FLAG"
+                placeholder="请选择是否足额打款"
+                allowClear></v-select>
+            </a-form-model-item>
+          </a-col>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="户名" prop="bankAccount">
-              <a-select placeholder="请选择户名" v-model="form.bankAccount" style="width: 100%" @change="handleChange">
+              <a-select placeholder="请选择户名" v-model="form.bankAccount" id="fcDetailModal-bankAccount" style="width: 100%" @change="handleChange">
                 <a-select-option v-for="item in bankList" :value="item.bankAccount">
                   {{ item.bankAccount }}
                 </a-select-option>
@@ -156,25 +190,16 @@
           </a-col>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="汇入银行" prop="bankName">
-              <a-select placeholder="请选择汇入银行" v-model="form.bankName" style="width: 100%">
+              <a-select placeholder="请选择汇入银行" id="fcDetailModal-bankName" v-model="form.bankName" style="width: 100%">
                 <a-select-option v-for="item in bankNameList" :value="item">
                   {{ item }}
                 </a-select-option>
               </a-select>
             </a-form-model-item>
           </a-col>
-          <a-col :span="12">
-            <a-form-model-item style="margin-bottom:5px;" label="足额打款">
-              <v-select
-                v-model="form.fullPaymentFlag"
-                code="FLAG"
-                placeholder="请选择是否足额打款"
-                allowClear></v-select>
-            </a-form-model-item>
-          </a-col>
           <a-col :span="24">
             <a-form-model-item style="margin-bottom:5px;" label="说明" :labelCol="{span:3}" :wrapper-col="{ span: 20 }">
-              <a-textarea :rows="2" :maxLength="500" placeholder="请输入说明(最多500个字符)" v-model="form.explainInfo"></a-textarea>
+              <a-textarea :rows="2" id="fcDetailModal-explainInfo" :maxLength="500" placeholder="请输入说明(最多500个字符)" v-model="form.explainInfo"></a-textarea>
             </a-form-model-item>
           </a-col>
           <!-- 使用授信列表 -->
@@ -189,8 +214,8 @@
           </a-col>
           <a-col :span="24">
             <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
-              <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
-              <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+              <a-button @click="cancel" style="margin-right: 15px" id="fcDetailModal-btn-back">取消</a-button>
+              <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="fcDetailModal-btn-submit">保存</a-button>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -232,32 +257,33 @@ export default {
       disabled: false,
       title: '新增收款明细',
       confirmLoading: false,
-      bookDetailSn: '',
+      bookDetailSn: '', // 收款明细sn
       formItemLayout: {
         labelCol: { span: 6 },
         wrapperCol: { span: 16 }
       },
       form: {
-        payerType: 'DEALER',
-        payerAccountType: 'PUBLIC',
-        dealerSn: undefined,
-        payerName: '',
-        payerAccountInfo: '',
-        licenseName: '',
-        receiptDate: moment(),
-        dealerCode: '',
-        orderAmount: '',
-        receiptAmount: '',
-        useCreditFlag: false,
-        detailItemUseList: [],
-        payCreditFlag: false,
-        detailItemPayList: [],
-        balanceAmount: '',
-        nextMonthAmount: '',
-        bankAccount: '东莞箭冠',
-        bankName: '东莞银行',
-        fullPaymentFlag: '1',
-        explainInfo: ''
+        payerType: 'DEALER', // 付款方
+        payerAccountType: 'PUBLIC', // 付款账户
+        dealerSn: undefined, // 客户sn
+        payerName: '', // 付款方名称
+        payerAccountInfo: '', // 付款账户
+        licenseName: '', // 营业执照
+        receiptDate: moment(), // 收款日期
+        dealerCode: '', // 财务编码
+        orderAmount: '', // 订单金额
+        receiptAmount: '', // 收款金额
+        useCreditFlag: false, // 是否使用授信
+        detailItemUseList: [], // 授信使用项目
+        payCreditFlag: false, // 是否授信还款
+        detailItemPayList: [], // 授信还款项目
+        balanceAmount: '', // 余额
+        nextMonthAmount: '', // 下月额度
+        specialSendAmount: '', // 特批额度
+        bankAccount: '东莞箭冠', // 汇入银行户名
+        bankName: '东莞银行', // 汇入银行
+        fullPaymentFlag: '1', // 足额打款
+        explainInfo: '' // 说明
       },
       rules: {
         receiptDate: [ { required: true, message: '请选择收款日期', trigger: ['change', 'blur'] } ],
@@ -265,8 +291,8 @@ export default {
         dealerSn: [ { required: true, message: '请选择付款方', trigger: ['change', 'blur'] } ],
         payerName: [ { required: true, message: '请输入付款方名称', trigger: ['change', 'blur'] } ],
         payerAccountType: [ { required: true, message: '请选择付款账户类型', trigger: ['change', 'blur'] } ],
-        bankAccount:[{ required: true, message: '请选择户名', trigger: ['change', 'blur'] }],
-        bankName:[{ required: true, message: '请选择汇入银行', trigger: ['change', 'blur'] }]
+        bankAccount: [{ required: true, message: '请选择户名', trigger: ['change', 'blur'] }],
+        bankName: [{ required: true, message: '请选择汇入银行', trigger: ['change', 'blur'] }]
       },
       useTotalAmount: '',
       payTotalAmount: '',
@@ -315,23 +341,22 @@ export default {
         this.form.licenseName = ''
         this.form.payerAccountInfo = ''
       }
-      if(this.form.payerAccountType=='PUBLIC'){
+      if (this.form.payerAccountType == 'PUBLIC') {
         this.form.bankAccount = '东莞箭冠'
         this.form.bankName = '东莞银行'
         this.bankNameList = ['东莞银行']
-      }else{
+      } else {
         this.form.bankAccount = '张丽添'
         this.form.bankName = '农业银行'
         this.bankNameList = ['农业银行']
       }
     },
     handleChange (v) {
-      console.log(v)
-      if(v){
+      if (v) {
         this.form.bankAccount = v
         const row = this.bankList.find(item => item.bankAccount == v)
         this.bankNameList = row.bankName
-        this.form.bankName = undefined  
+        this.form.bankName = undefined
       }
     },
     getLastPayerAccount () {
@@ -356,7 +381,6 @@ export default {
     },
     // 客户
     custChange (v) {
-      console.log(v)
       if (v && v.key) {
         this.form.dealerSn = v.key
         this.form.payerName = v.row ? v.row.dealerName : ''
@@ -430,10 +454,10 @@ export default {
     setDetail (data) {
       this.form = Object.assign(this.form, { payerTypeDictValue: data.payerTypeDictValue, payerType: data.payerType, dealerSn: data.dealerSn, payerName: data.payerName })
       this.$nextTick(() => {
-        if(this.form.dealerSn){
+        if (this.form.dealerSn) {
           // this.$refs.settleClientName.getDetail(this.form.dealerSn)
           this.getDealerDetail(this.form.dealerSn)
-        }else{
+        } else {
           this.form.bankAccount = '张丽添'
           this.form.bankName = '农业银行'
           this.bankNameList = ['农业银行']
@@ -476,7 +500,7 @@ export default {
       })
       this.bankNameList = []
       this.bankNameList = ['东莞银行']
-      if(this.$refs.ruleForm){
+      if (this.$refs.ruleForm) {
         this.$refs.ruleForm.resetFields()
       }
       this.form = {
@@ -496,6 +520,7 @@ export default {
         detailItemPayList: [],
         balanceAmount: '',
         nextMonthAmount: '',
+        specialSendAmount: '',
         bankAccount: '东莞箭冠',
         bankName: '东莞银行',
         fullPaymentFlag: '1',

+ 4 - 0
src/views/financialManagement/financialCollection/list.vue

@@ -92,6 +92,8 @@
               使用授信总金额:{{ toThousands(countData&&countData.useTotalAmount||0) }};
               授信还款总金额:{{ toThousands(countData&&countData.payTotalAmount||0) }};
               余款抵扣总金额:{{ toThousands(countData&&countData.balanceTotalAmount||0) }};
+              跨月打款总金额:{{ toThousands(countData&&countData.nextMonthTotalAmount||0) }};
+              特殊申请发货总金额:{{ toThousands(countData&&countData.specialTotalAmount||0) }};
             </div>
           </div>
           <div></div>
@@ -251,6 +253,8 @@ export default {
         { title: '使用授信总金额', dataIndex: 'useTotalAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '授信还款总金额', dataIndex: 'payTotalAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '余款抵扣总金额', dataIndex: 'balanceTotalAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '跨月打款总金额', dataIndex: 'nextMonthTotalAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '特殊申请发货总金额', dataIndex: 'specialTotalAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', dataIndex: 'statusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }

+ 2 - 0
src/views/salesManagement/receiptPrint/list.vue

@@ -231,6 +231,8 @@ export default {
         { title: '收款金额', dataIndex: 'receiptAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '使用授信', dataIndex: 'useCreditAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '余款抵扣', dataIndex: 'balanceAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '跨月打款', dataIndex: 'nextMonthAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '特殊申请发货', dataIndex: 'specialSendAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '户名', dataIndex: 'bankAccount', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '汇入银行', dataIndex: 'bankName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },

+ 2 - 2
src/views/salesManagement/receiptPrint/printModel.vue

@@ -26,7 +26,7 @@
                         <th style="width: 53pt;background:#f6f6f6;">订单金额</th>
                         <th style="width: 53pt;background:#f6f6f6;">收款金额</th>
                         <th style="width: 53pt;background:#f6f6f6;">使用授信</th>
-                        <th style="width: 53pt;background:#f6f6f6;">余款抵扣</th>
+                        <th style="width: 53pt;background:#f6f6f6;">授信还款</th>
                         <th style="width: 53pt;background:#f6f6f6;">汇入银行</th>
                         <th style="width: 37pt;background:#f6f6f6;">足额<br>打款</th>
                         <th style="width: 64pt;background:#f6f6f6;">说明</th>
@@ -52,7 +52,7 @@
                           {{ getTotal(item.detailItemUseList||[]) }}
                         </td>
                         <td style="padding:3pt 1pt;width: 51pt;text-align:center;">
-                          {{ item.balanceAmount?item.balanceAmount.toFixed(2):'0.00' }}
+                          {{ item.payCreditAmount?item.payCreditAmount.toFixed(2):'0.00' }}
                         </td>
                         <td style="padding:3pt 1pt;width: 51pt;">
                           {{ item.bankAccount }}<br>

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

@@ -178,7 +178,8 @@
       <!-- 折扣 -->
       <template slot="discountPrice" slot-scope="text, record">
         <div v-if="record.promotionFlag=='DISCOUNT'">
-          <span>{{ ((record.price/record.origPrice)*100).toFixed(2) }}%</span>
+          <span v-if="record.specialType=='1'">{{ record.priceLevel=='PROVINCE'? (record.provinceDiscount*100).toFixed(2):record.priceLevel=='CITY'?(record.cityDiscount*100).toFixed(2):(record.specialDiscount*100).toFixed(2) }}%</span>
+          <span v-else>{{ ((record.price/record.origPrice)*100).toFixed(2) }}%</span>
         </div>
         <div v-else>--</div>
       </template>

+ 108 - 16
src/views/salesManagement/salesQueryNew/detail.vue

@@ -182,7 +182,7 @@
         type="primary"
         id="salesDetail-edit1-btn"
         v-if="detailData&&detailData.salesBillSource == 'PURCHASE' && (detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE')&&$hasPermissions('B_salesEdit')"
-        @click="handleEdit()"
+        @click="handleChangeOrder()"
       >
         改单
       </a-button>
@@ -220,6 +220,8 @@
     <dsModal ref="dsModal" title="销售单一键审核" :openModal="showDsModal" @close="showDsModal=false" @ok="handleOnceAudit" />
     <!-- 缺货明细 -->
     <stockOutDetail :openModal="showStockOut" :detailData="detailData" :salesBillSn="$route.params.sn || bizSn" @close="showStockOut=false"></stockOutDetail>
+    <!-- 改单 -->
+    <tipModal ref="tipModal" :openModal="openTipModal" :dataList="sourceData" @close="closeTipModal" @ok="openTipModalOk"></tipModal>
   </div>
 </template>
 
@@ -234,22 +236,14 @@ import dsModal from '@/views/salesManagement/waitDispatchNew/dsModal.vue'
 import stockOutDetail from './stockOutDetailModal.vue'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
 import detailProductList from './comps/detailProductList.vue'
+import tipModal from './tipModal.vue'
 // 接口
-import {
-  salesDetailBySn,
-  salesDetailPrint,
-  salesDetailExcel,
-  salesDetailTypeExcel,
-  salesWriteAuditPass,
-  salesWriteAuditReject,
-  salesWriteAuditPush,
-  getThirdStockQty
-} from '@/api/salesNew'
+import { salesDetailBySn, salesDetailPrint, salesDetailExcel, salesDetailTypeExcel, salesWriteAuditPass, salesWriteAuditReject, salesWriteAuditPush, getThirdStockQty, salesPromoValidaSubmit, changeBillCheckUpdatePrice, changeBillCheck } from '@/api/salesNew'
 
 export default {
   name: 'SalesDetailNew',
   mixins: [commonMixin],
-  components: { VSelect, printModal, auditModal, dsModal, stockOutDetail, chooseWarehouse, detailProductList },
+  components: { VSelect, printModal, auditModal, dsModal, stockOutDetail, chooseWarehouse, detailProductList, tipModal },
   props: {
     bizSn: { //  有值则为弹框,无值则为页面
       type: [Number, String],
@@ -274,7 +268,9 @@ export default {
       auditText: null, // 审核备注信息
       fromRouter: null, // 从那个页面打开当前页面
       warehouseSn: undefined, // 所在仓库
-      promoFlag: undefined // 产品类型
+      promoFlag: undefined, // 产品类型
+      openTipModal: false, // 改单弹窗
+      sourceData: undefined// 价格变动数据
     }
   },
   computed: {
@@ -322,6 +318,48 @@ export default {
       const row = this.detailData
       this.$router.push({ name: 'salesNewEdit', params: { sn: row.salesBillSn, wSn: row.warehouseSn } })
     },
+    // 改单
+    handleChangeOrder () {
+      const _this = this
+      const row = _this.detailData
+      changeBillCheck({ salesBillSn: row.salesBillSn }).then(res => {
+        let data
+        if (res.status == 200) {
+          data = res.data
+          if (data && data.length > 0) {
+            _this.sourceData = res.data
+            const obj = {
+              buyerName: row.buyerName,
+              salesBillNo: row.salesBillNo
+            }
+            _this.$refs.tipModal.getShowInfo(obj)
+            _this.openTipModal = true
+          } else {
+            _this.$router.push({ name: 'salesNewEdit', params: { sn: row.salesBillSn, wSn: row.warehouseSn } })
+          }
+        }
+      })
+    },
+    // 改单成功  关闭弹窗
+    openTipModalOk (ajaxData) {
+      const row = this.detailData
+      ajaxData.salesBillSn = row.salesBillSn
+      ajaxData.detailList = this.sourceData
+      changeBillCheckUpdatePrice(ajaxData).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.openTipModal = false
+          this.$nextTick(() => {
+            this.$router.push({ name: 'salesNewEdit', params: { sn: row.salesBillSn, wSn: row.warehouseSn } })
+          })
+        }
+      })
+    },
+    // 取消时,跳转编辑页面
+    closeTipModal () {
+      this.openTipModal = false
+      this.$router.push({ name: 'salesNewEdit', params: { sn: this.$route.params.sn } })
+    },
     //  重置
     resetSearchForm () {
       this.warehouseSn = undefined
@@ -372,7 +410,62 @@ export default {
       this.$router.push({ name: 'waitDispatchNew', params: { salesBillSn: row.salesBillSn } })
     },
     // 打开审核/一键审核弹框
-    handleAudit (isBatch) {
+    async  handleAudit (isBatch) {
+      // 校验产品是否付个促销活动规则
+      const vaildActive = await salesPromoValidaSubmit({ salesBillSn: this.bizSn || this.$route.params.sn }).then(res => res.data)
+      if (vaildActive && vaildActive.length > 0) {
+        const a = vaildActive.filter(item => item.type == 1) // 不可提交
+        const b = vaildActive.filter(item => item.type == 0) // 可跳过继续提交
+        // 弹出不符合规则弹框,不可提交
+        if (a.length) {
+          this.$info({
+            title: '提示',
+            centered: true,
+            class: 'confirm-center',
+            okText: '关闭',
+            width: 600,
+            content: <div style="padding-top:15px;">
+              <ol>
+                {a.map(item => (
+                  <li style="padding:3px 0;">{item.message}</li>
+                ))}
+              </ol>
+              <div style="padding:10px 0;text-align:center"><strong>请按照以上提示修改后再提交</strong></div>
+            </div>
+          })
+          this.spinning = false
+        } else {
+          const _this = this
+          // 弹出确认提示信息,可跳过继续提交
+          if (b.length) {
+            _this.$confirm({
+              title: '提示',
+              centered: true,
+              class: 'confirm-center',
+              okText: '提交',
+              width: 600,
+              content: <div style="padding-top:15px;">
+                <ol>
+                  {b.map(item => (
+                    <li style="padding:3px 0;">{item.message}</li>
+                  ))}
+                </ol>
+              </div>,
+              onOk () {
+                _this.verificationSuccess(isBatch)
+              }
+            })
+            _this.spinning = false
+          } else {
+            _this.verificationSuccess(isBatch)
+          }
+        }
+      } else {
+        this.verificationSuccess(isBatch)
+      }
+    },
+    // 验证通过
+    verificationSuccess (isBatch) {
       if (isBatch) { // 一键审核
         if (this.$refs.productList.hasOutStockOfActive) {
           this.$info({
@@ -391,7 +484,6 @@ export default {
           })
           return
         }
-
         if (this.$refs.productList.hasJGtire) {
           this.$info({
             title: '提示',
@@ -400,7 +492,7 @@ export default {
           })
           return
         }
-
+        // 一键审核成功
         this.showDsModal = true
         this.$refs.dsModal.setDetail(this.detailData)
       } else {

+ 28 - 49
src/views/salesManagement/salesQueryNew/edit.vue

@@ -132,7 +132,7 @@
           :disabled="spinning"
           type="primary"
           class="button-primary"
-          @click="handleSubmit()"
+          @click="submitResult()"
           id="productInfoList-handleSubmit">提交</a-button>
       </div>
     </div>
@@ -143,12 +143,12 @@
       @close="closeProductModal"
       @addProduct="insterProduct"></chooseProduct>
     <!-- 价格更新弹窗 -->
-    <setPriceModal
+    <!-- <setPriceModal
       :show="priceUpdateModal"
       :totalRealAmount="updataData.totalRealAmount"
       :totalAmount="updataData.totalAmount"
       @ok="updatePrice"
-      @cancel="priceUpdateModal=false"></setPriceModal>
+      @cancel="priceUpdateModal=false"></setPriceModal> -->
     <!-- 新活动窗口 -->
     <newPromoModal
       :show="showNewActiveModal"
@@ -192,7 +192,7 @@ export default {
         totalRealAmount: '',
         totalAmount: ''
       },
-      priceUpdateModal: false, // 价格更新弹窗
+      // priceUpdateModal: false, // 价格更新弹窗
       showDetail: false, // 显示详细基本信息
       showCpModal: false, // 添加产品弹框
       cpCurRefId: '', // 当前操作的活动id
@@ -433,53 +433,32 @@ export default {
         }
       })
     },
-    // 价格变更,需要选择价格类型  并更新价格
-    updatePrice (type) {
-      const ajax_data = {
-        salesBillSn: this.salesBillSn,
-        productPriceChangeFlag: type
-      }
-      if (type == 0) {
-        this.submitResult(ajax_data)
-      } else {
-        // 批量更新价格
-        updateBatch(this.updataData.detailList).then(res => {
-          this.priceUpdateModal = false
-          if (res.status == 200) {
-            // 刷新详情统计
-            this.spinning = true
-            this.getOrderDetail(false, () => {
-              this.submitResult(ajax_data)
-            })
-          }
-        })
-      }
-    },
-    // 提交销售单
-    handleSubmit () {
-      // 先不提交,先判断是否有价格更新  (下级创建时判断)
-      if (this.detailData && this.detailData.salesBillSource == 'PURCHASE') {
-        submitCheck({ salesBillSn: this.salesBillSn }).then(res => {
-          if (res.status == 200) {
-            // 如果有价格变更记录
-            if (res.data.detailList.length > 0) {
-              this.updataData = res.data
-              this.$nextTick(() => {
-                // 打开变更价格弹框
-                this.priceUpdateModal = true
-              })
-            } else {
-              this.submitResult({ salesBillSn: this.salesBillSn })
-            }
-          }
-        })
-      } else {
-        this.submitResult({ salesBillSn: this.salesBillSn })
-      }
-    },
+    // // 价格变更,需要选择价格类型  并更新价格
+    // updatePrice (type) {
+    //   const ajax_data = {
+    //     salesBillSn: this.salesBillSn,
+    //     productPriceChangeFlag: type
+    //   }
+    //   if (type == 0) {
+    //     this.submitResult(ajax_data)
+    //   } else {
+    //     // 批量更新价格
+    //     updateBatch(this.updataData.detailList).then(res => {
+    //       this.priceUpdateModal = false
+    //       if (res.status == 200) {
+    //         // 刷新详情统计
+    //         this.spinning = true
+    //         this.getOrderDetail(false, () => {
+    //           this.submitResult(ajax_data)
+    //         })
+    //       }
+    //     })
+    //   }
+    // },
     // 提交销售单
-    async submitResult (data) {
+    async submitResult () {
       const _this = this
+      const data = { salesBillSn: _this.salesBillSn }
       // 校验活动规则
       const vaildActive = await salesPromoValidaSubmit({ salesBillSn: this.salesBillSn }).then(res => res.data)
       const a = vaildActive.filter(item => item.type == 1) // 不可提交

+ 52 - 3
src/views/salesManagement/salesQueryNew/list.vue

@@ -240,7 +240,7 @@
                 type="link"
                 class="button-info"
                 v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'HQ_CHANGE') && $hasPermissions('B_salesEdit')"
-                @click="handleEdit(record)"
+                @click="handleChangeOrder(record)"
               >
                 改单
               </a-button>
@@ -304,6 +304,8 @@
       <baseDataModal ref="expenseModal" @expenseSaveOk="expenseSaveOk" :show="openBaseModal" @close="openBaseModal=false"></baseDataModal>
       <!-- 导出提示框 -->
       <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+      <!-- 改单 -->
+      <tipModal ref="tipModal" :openModal="openTipModal" :dataList="sourceData" @close="closeTipModal" @ok="openTipModalOk"></tipModal>
     </a-card>
   </div>
 </template>
@@ -320,6 +322,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import { STable, VSelect } from '@/components'
 import commonModal from '@/views/common/commonModal.vue'
 import chooseCustomModal from './chooseCustomModal.vue'
+import tipModal from './tipModal.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import baseDataModal from '@/views/expenseManagement/expenseReimbursement/baseDataModal.vue'
 import reportModal from '@/views/common/reportModal.vue'
@@ -327,13 +330,13 @@ import chooseWarehouse from '@/views/common/chooseWarehouse'
 import customerService from '@/views/common/customerService'
 // 接口
 import { dispatchBatchPrintStatus, queryBySalesBillSn } from '@/api/dispatch'
-import { salesList, salesDel, salesCancle, salesCount, queryCreateBySalesBillSn, expenseAccountSave } from '@/api/salesNew'
+import { salesList, salesDel, salesCancle, salesCount, queryCreateBySalesBillSn, expenseAccountSave, changeBillCheckUpdatePrice, changeBillCheck } from '@/api/salesNew'
 import { salesDetailExport } from '@/api/salesBillReport'
 
 export default {
   name: 'SalesQueryList',
   mixins: [commonMixin],
-  components: { STable, VSelect, chooseCustomModal, dealerSubareaScopeList, Area, rangeDate, subarea, commonModal, reportModal, chooseWarehouse, baseDataModal, customerService },
+  components: { STable, VSelect, tipModal, chooseCustomModal, dealerSubareaScopeList, Area, rangeDate, subarea, commonModal, reportModal, chooseWarehouse, baseDataModal, customerService },
   data () {
     return {
       spinning: false,
@@ -346,6 +349,8 @@ export default {
       exportLoading: false, // 导出按钮加载状态
       expenseOption: false, // 已选转费用报销单状态
       tableHeight: 0, // 表格高度
+      openTipModal: false, // 改单提示弹窗
+      sourceData: [], // 改单表格数据
       // 默认时间
       time: [
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
@@ -568,6 +573,50 @@ export default {
     handleEdit (row) {
       this.$router.push({ name: 'salesNewEdit', params: { sn: row.salesBillSn } })
     },
+    // 改单
+    handleChangeOrder (row) {
+      const _this = this
+      _this.tempSalesBillSn = row.salesBillSn
+      changeBillCheck({ salesBillSn: row.salesBillSn }).then(res => {
+        let data
+        if (res.status == 200) {
+          data = res.data
+          if (data && data.length > 0) {
+            _this.sourceData = res.data
+            const obj = {
+              buyerName: row.buyerName,
+              salesBillNo: row.salesBillNo
+            }
+            _this.$refs.tipModal.getShowInfo(obj)
+            _this.openTipModal = true
+          } else {
+            _this.$router.push({ name: 'salesNewEdit', params: { sn: row.salesBillSn } })
+          }
+        }
+      })
+    },
+    // 改单成功  关闭弹窗
+    openTipModalOk (ajaxData) {
+      ajaxData.salesBillSn = this.tempSalesBillSn
+      ajaxData.detailList = this.sourceData
+      changeBillCheckUpdatePrice(ajaxData).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.openTipModal = false
+          this.$nextTick(() => {
+            this.$router.push({ name: 'salesNewEdit', params: { sn: this.tempSalesBillSn } })
+          })
+        }
+      })
+    },
+    // 取消时,跳转编辑页面
+    closeTipModal () {
+      this.openTipModal = false
+      this.$router.push({ name: 'salesNewEdit', params: { sn: this.tempSalesBillSn } })
+      this.$nextTick(() => {
+        this.tempSalesBillSn = null
+      })
+    },
     // 删除
     handleDel (row) {
       const _this = this

+ 222 - 0
src/views/salesManagement/salesQueryNew/tipModal.vue

@@ -0,0 +1,222 @@
+<template>
+  <a-modal
+    centered
+    :footer="null"
+    :maskClosable="false"
+    :closable="false"
+    class="sales-print-type-modal"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="900">
+    <solt name="title" v-if="detailInfo"><div>提示:(销售单号:{{ detailInfo.salesBillNo }}      客户名称:{{ detailInfo.buyerName }})</div></solt>
+    <solt name="title" v-else>提示</solt>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="tipModal-content">
+        <strong class="tipModal-tit">销售单以下产品价格发生变更,请确认</strong>
+        <a-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.allocateSn"
+          :columns="columns"
+          :dataSource="dataList"
+          :scroll="{ y: 300 }"
+          :pagination="false"
+          bordered>
+          <!-- 产品编码 -->
+          <template slot="productCode" slot-scope="text, record">
+            <span>{{ record.productCode||'--' }}</span>
+            <a-badge count="促" v-if="record.promotionFlag==='GIFT'" :number-style="{ backgroundColor: '#52c41a', zoom:'80%' }"></a-badge>
+          </template>
+          <!-- 初始价 省  市  特约-->
+          <template slot="provincePriceOrig" slot-scope="text, record">
+            <span v-if="record.provincePriceOrig||record.provincePriceOrig==0">
+              <span :class="record.provincePriceOrig!=record.provincePrice?'redWord':''">{{ toThousands(record.provincePriceOrig) }}</span>
+            </span>
+            <span v-else>--</span>
+          </template>
+          <template slot="cityPriceOrig" slot-scope="text, record">
+            <span v-if="record.cityPriceOrig||record.cityPriceOrig==0">
+              <span :class="record.cityPriceOrig!=record.cityPrice?'redWord':''">{{ toThousands(record.cityPriceOrig) }}</span>
+            </span>
+            <span v-else>--</span>
+          </template>
+          <template slot="specialPriceOrig" slot-scope="text, record">
+            <span v-if="record.specialPriceOrig||record.specialPriceOrig==0">
+              <span :class="record.specialPriceOrig!=record.specialPrice?'redWord':''">{{ toThousands(record.specialPriceOrig) }}</span>
+            </span>
+            <span v-else>--</span>
+          </template>
+          <!-- 最新价  省  市  特约 -->
+          <template slot="provincePrice" slot-scope="text, record">
+            <span v-if="record.provincePrice||record.provincePrice==0">
+              <span :class="record.provincePrice!=record.provincePriceOrig?'redWord':''">{{ toThousands(record.provincePrice) }}</span>
+            </span>
+            <span v-else>--</span>
+          </template>
+          <template slot="cityPrice" slot-scope="text, record">
+            <span v-if="record.cityPrice||record.cityPrice==0">
+              <span :class="record.cityPrice!=record.cityPriceOrig?'redWord':''">{{ toThousands(record.cityPrice) }}</span>
+            </span>
+            <span v-else>--</span>
+          </template>
+          <template slot="specialPrice" slot-scope="text, record">
+            <span v-if="record.specialPrice||record.specialPrice==0">
+              <span :class="record.specialPrice!=record.specialPriceOrig?'redWord':''">{{ toThousands(record.specialPrice) }}</span>
+            </span>
+            <span v-else>--</span>
+          </template>
+        </a-table>
+        <div>
+          <a-radio-group v-model="priceVal">
+            <a-radio :value="item.id" v-for="item in priceSelectList" :key="item.id">
+              {{ item.nameWord }}
+            </a-radio>
+          </a-radio-group>
+        </div>
+        <div style="margin-top:36px;text-align:center;">
+          <a-button @click="handleCancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" @click="handleSubmit" id="chooseCustom-btn-submit">确定</a-button>
+        </div>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+export default {
+  name: 'TipModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    dataList: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal,
+      spinning: false,
+      detailInfo: null,
+      sourceData: [],
+      priceVal: undefined,
+      columns: [
+        { title: '产品编码', dataIndex: 'productCode', scopedSlots: { customRender: 'productCode' }, width: '20%', align: 'center' },
+        { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '价格变更前',
+          children: [
+            {
+              title: '省级价',
+              align: 'right',
+              dataIndex: 'provincePriceOrig',
+              scopedSlots: { customRender: 'provincePriceOrig' }
+            },
+            {
+              title: '市级价',
+              align: 'right',
+              dataIndex: 'cityPriceOrig',
+              scopedSlots: { customRender: 'cityPriceOrig' }
+            },
+            {
+              title: '特约价',
+              dataIndex: 'specialPriceOrig',
+              align: 'right',
+              scopedSlots: { customRender: 'specialPriceOrig' }
+            }
+          ],
+          width: '30%' },
+        { title: '价格变更后',
+          children: [
+            {
+              title: '省级价',
+              dataIndex: 'provincePrice',
+              align: 'right',
+              scopedSlots: { customRender: 'provincePrice' }
+            },
+            {
+              title: '市级价',
+              dataIndex: 'cityPrice',
+              align: 'right',
+              scopedSlots: { customRender: 'cityPrice' }
+            },
+            {
+              title: '特约价',
+              dataIndex: 'specialPrice',
+              align: 'right',
+              scopedSlots: { customRender: 'specialPrice' }
+            }
+          ],
+          width: '30%' }
+      ],
+      priceSelectList: [{
+        id: 0,
+        nameWord: '以【价格变更前】为准'
+      }, {
+        id: 1,
+        nameWord: '以【价格变更后】为准'
+      }]
+    }
+  },
+  methods: {
+    // 获取弹窗显示信息
+    getShowInfo (obj) {
+      this.detailInfo = obj
+    },
+    //  保存
+    handleSubmit () {
+      const _this = this
+      if (_this.priceVal === undefined) {
+        this.$message.warning('请选择价格变更标准!')
+        return
+      }
+      const objInfo = {
+        productPriceChangeFlag: _this.priceVal
+      }
+      _this.$emit('ok', objInfo)
+    },
+    // 关闭弹窗
+    handleCancel () {
+      this.isShow = false
+      this.$emit('close')
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.priceVal = undefined
+      }
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .tipModal-content{
+    width:85%;
+    margin:30px auto 0;
+    text-align:center;
+    .tipModal-tit{
+      font-size: 20px;
+    }
+    .sTable{
+      margin:15px 0 25px;
+    }
+   .ant-radio-wrapper:first-child{
+      margin-right:70px !important;
+    }
+    .redWord{
+      color:#ed1c24;
+    }
+  }
+</style>

+ 4 - 4
src/views/salesReturnManagement/salesReturn/list.vue

@@ -345,11 +345,11 @@ export default {
         { title: '同步给客户', dataIndex: 'syncFlag', width: '4%', align: 'center', customRender: function (text) { return text ? ['否', '是'][text] : '--' } },
         { title: '客户采退申请单号', dataIndex: 'purchaseReturnApplyNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '总部销退单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: '10%', align: 'center' },
-        { title: '客户名称', dataIndex: 'buyerName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', dataIndex: 'buyerName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '退货类别', dataIndex: 'goodFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货类型', dataIndex: 'salesReturnTypeDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '申请退货数量', dataIndex: 'totalInitialQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '仓库实收数量', dataIndex: 'totalReceiveQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: <div>申请退货<div>数量</div></div>, dataIndex: 'totalInitialQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: <div>仓库实收<div>数量</div></div>, dataIndex: 'totalReceiveQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '坏件数量', dataIndex: 'totalBadQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '良品数量', dataIndex: 'totalGoodQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '返库数量', dataIndex: 'totalBackStockQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -358,7 +358,7 @@ export default {
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
       ]
       if (this.$hasPermissions('M_salesReturnList_salesPrice')) {
-        arr.splice(13, 0, { title: '实际退货金额', dataIndex: 'totalAmount', width: '5%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(13, 0, { title: '实际退货金额', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       return arr
     }