Bladeren bron

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

chenrui 1 jaar geleden
bovenliggende
commit
ead99dea73

+ 0 - 51
src/api/sales.js

@@ -240,57 +240,6 @@ export const updateWarehouse = (params) => {
   })
 }
 
-//  按仓库查询销售单 列表  有分页
-export const queryPageForWarehouse = (params) => {
-  const url = `/salesn/queryPageForWarehouse/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-// 获取按仓库查询销售单数量
-export const queryCountForWarehouse = (params) => {
-  return axios({
-    url: '/salesn/queryCountForWarehouse',
-    method: 'post',
-    data: params
-  })
-}
-// 按仓库查询销售明细 列表
-export const queryPageForWarehouseDetail = (params) => {
-  const url = `/salesn/detail/queryPageForWarehouse/${params.pageNo}/${params.pageSize}`
-  delete params.pageNo
-  delete params.pageSize
-  return axios({
-    url: url,
-    data: params,
-    method: 'post'
-  })
-}
-
-// 获取按仓库查询销售单明细数量
-export const queryCountForWarehouseDetail = (params) => {
-  return axios({
-    url: '/sales/detail/queryCountForWarehouse',
-    method: 'post',
-    data: params
-  })
-}
-// 按仓库导出销售单
-
-export const exportForWarehouse = params => {
-  const url = `/sales/exportForWarehouse`
-  return axios.request({
-    url: url,
-    data: params,
-    method: 'post',
-    responseType: 'blob'
-  })
-}
-
 // 销售一览表 列表
 export const salesOverviewQueryPage = (params) => {
   const url = `/salesOverview/queryPage/${params.pageNo}/${params.pageSize}`

+ 52 - 0
src/api/salesNew.js

@@ -240,3 +240,55 @@ export const salesDetailTypeExcel = params => {
     responseType: 'blob'
   })
 }
+
+
+// 仓库销售单
+//  按仓库查询销售单 列表  有分页
+export const queryPageForWarehouse = (params) => {
+  const url = `/salesn/queryPageForWarehouse/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 获取按仓库查询销售单数量
+export const queryCountForWarehouse = (params) => {
+  return axios({
+    url: '/salesn/queryCountForWarehouse',
+    method: 'post',
+    data: params
+  })
+}
+// 按仓库查询销售明细 列表
+export const queryPageForWarehouseDetail = (params) => {
+  const url = `/salesn/detail/queryPageForWarehouse/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 获取按仓库查询销售单明细数量
+export const queryCountForWarehouseDetail = (params) => {
+  return axios({
+    url: '/salesn/detail/queryCountForWarehouse',
+    method: 'post',
+    data: params
+  })
+}
+// 按仓库导出销售单
+export const exportForWarehouse = params => {
+  const url = `/salesn/exportForWarehouse`
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}

+ 4 - 5
src/views/salesManagement/salesOrderWarehouse/detail.vue

@@ -58,10 +58,9 @@
           bordered>
           <!-- 产品编码 -->
           <template slot="productCode" slot-scope="text, record">
-            <a-badge count="促" v-if="record.promotionFlag == 1">
-              <div style="padding-right: 15px;">{{ text }}</div>
-            </a-badge>
-            <span v-else>{{ text }}</span>
+            <span>{{ 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>
           </template>
         </s-table>
       </a-card>
@@ -76,7 +75,7 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import moment from 'moment'
 import { exportExcel } from '@/libs/JGPrint.js'
-import { queryPageForWarehouseDetail, queryCountForWarehouseDetail, salesDetailBySn, salesDetailExcel } from '@/api/sales'
+import { queryPageForWarehouseDetail, queryCountForWarehouseDetail, salesDetailBySn, salesDetailExcel } from '@/api/salesNew'
 import printModal from './printModal.vue'
 export default {
   name: 'SalesOrderWarehouseDetail',

+ 1 - 2
src/views/salesManagement/salesOrderWarehouse/list.vue

@@ -88,7 +88,6 @@
         <template slot="stockOutNo" slot-scope="text, record" v-if="$hasPermissions('B_salesOrderWarehouseDetail')">
           <span class="link-bule" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
           <a-badge count="促" v-if="record.promotionFlag=='GIFT'" :number-style="{ backgroundColor: '#52c41a', zoom:'80%' }"></a-badge>
-          <!-- <a-badge count="正" v-if="record.promotionFlag=='REGULAR'" :number-style="{ backgroundColor: '#108ee9', zoom:'80%' }"></a-badge> -->
           <a-badge count="特" v-if="record.promotionFlag=='DISCOUNT'" :number-style="{ backgroundColor: '#faad14', zoom:'80%' }"></a-badge>
         </template>
       </s-table>
@@ -107,7 +106,7 @@ import Area from '@/views/common/area.js'
 import reportModal from '@/views/common/reportModal.vue'
 import { STable, VSelect } from '@/components'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
-import { queryPageForWarehouse, queryCountForWarehouse, exportForWarehouse } from '@/api/sales'
+import { queryPageForWarehouse, queryCountForWarehouse, exportForWarehouse } from '@/api/salesNew'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
 export default {

+ 0 - 1
src/views/salesManagement/salesOrderWarehouse/printModal.vue

@@ -42,7 +42,6 @@
 </template>
 
 <script>
-import { salesDetailProductType } from '@/api/sales'
 export default {
   props: {
     openModal: { //  弹框显示状态

+ 14 - 14
src/views/salesManagement/salesQueryNew/comps/activeQueryPart.vue

@@ -59,7 +59,7 @@
       :columns="columns"
       :data="loadData"
       :customRow="handleClickRow"
-      :scroll="{ y: tableHeight }"
+      :scroll="{ y: tableHeight, x: 1040 }"
       :defaultLoadData="false"
       :pageSize="50"
       bordered>
@@ -179,27 +179,27 @@ export default {
   computed: {
     columns () {
       const arr = [
-        { title: '产品编码', dataIndex: 'productCode', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', scopedSlots: { customRender: 'productName' }, width: '18%', align: 'left' },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '品牌', dataIndex: 'productBrandName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '出库仓库', dataIndex: 'warehouseName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '库存数量', dataIndex: 'currentStockQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品编码', dataIndex: 'productCode', width: '150px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', scopedSlots: { customRender: 'productName' }, align: 'left' },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '100px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '品牌', dataIndex: 'productBrandName', width: '100px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '库存数量', dataIndex: 'currentStockQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productUnit', width: '60px', align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '售价', dataIndex: 'productPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '包装数', dataIndex: 'packQtyV', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '包装数', dataIndex: 'packQtyV', width: '60px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '起订量', dataIndex: 'unitQtyV', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '下单数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '8%', align: 'center' },
-        { title: '单位', dataIndex: 'productUnit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+        { title: '下单数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '80px', align: 'center', fixed: 'right' },
+        { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '60px', align: 'center', fixed: 'right' }
       ]
-      let idx = 6
+      let idx = 7
       if (this.$hasPermissions('B_salesEdit_salesPrice')) { // 售价权限
-        arr.splice(idx, 0, { title: '售价', dataIndex: 'productPrice', width: '8%', align: 'right', scopedSlots: { customRender: 'productPrice' } })
+        arr.splice(idx, 0, { title: '售价', dataIndex: 'productPrice', width: '60px', align: 'right', scopedSlots: { customRender: 'productPrice' } })
         idx = idx + 1
       }
       // 促销品没有起订量
       if(this.promoProductClz != 'GIFT'){
-        arr.splice(idx+1, 0,{ title: '起订量', dataIndex: 'unitQtyV', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(idx+1, 0,{ title: '起订量', dataIndex: 'unitQtyV', width: '60px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr
     }

+ 1 - 1
src/views/salesManagement/salesQueryNew/comps/chooseProduct.vue

@@ -4,7 +4,7 @@
     title="选择产品"
     placement="right"
     :visible="isShow"
-    width="70%"
+    width="80%"
     :get-container="false"
     :wrap-style="{ position: 'absolute' }"
     :headerStyle="{ padding: '10px' }"

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

@@ -31,7 +31,7 @@
                   {{ descDetail.accrualFlag == 1 ? ',数量叠加':',数量不叠加' }}
                 </span>
                 <span v-else-if="descDetail.promotionRuleType == 'BUY_PROD_GIVE_MONEY'">
-                  {{ descDetail.regularSameFlag==='1'?'同款产品,':'不同款产品,' }}
+                  <!-- {{ descDetail.regularSameFlag==='1'?'同款产品,':'不同款产品,' }} -->
                   购买满{{ descDetail.regularAmount }}元正价产品,送{{ descDetail.giveAmount }}元促销品采购额
                   {{ descDetail.accrualFlag == 1 ? ',金额叠加':',金额不叠加' }}
                 </span>

+ 11 - 10
src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

@@ -78,16 +78,17 @@
     
     <!-- 已选配件列表 -->
     <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :scroll="showTotal ? null :{ y: tableHeight }"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :row-selection="{ columnWidth: 40 }"
-      @rowSelection="rowSelectionFun"
-      :pageSize="showTotal?10:30"
+      class="sTable" 
+      ref="table" 
+      size="small" 
+      :scroll="showTotal ? null :{ y: tableHeight }" 
+      :rowKey="(record) => record.id" 
+      :columns="columns" 
+      :data="loadData" 
+      :row-selection="{ columnWidth: 40 }" 
+      @rowSelection="rowSelectionFun" 
+      :pageSize="showTotal?10:30" 
+      :defaultLoadData="false"
       bordered>
       <!-- 产品编码 -->
       <template slot="productCode" slot-scope="text, record">

+ 12 - 12
src/views/salesManagement/salesQueryNew/comps/queryPart.vue

@@ -56,7 +56,7 @@
       :columns="columns"
       :data="loadData"
       :customRow="handleClickRow"
-      :scroll="{ y: tableHeight }"
+      :scroll="{ y: tableHeight, x: 1050 }"
       :pageSize="50"
       :defaultLoadData="false"
       bordered>
@@ -162,20 +162,20 @@ export default {
   computed: {
     columns () {
       const arr = [
-        { title: '产品编码', dataIndex: 'productCode', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', scopedSlots: { customRender: 'productName' }, width: '18%', align: 'left' },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '品牌', dataIndex: 'productBrandName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '出库仓库', dataIndex: 'warehouseName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '库存数量', dataIndex: 'currentStockQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productUnit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: '150px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', scopedSlots: { customRender: 'productName' }, align: 'left' },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '100px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '品牌', dataIndex: 'productBrandName', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '库存数量', dataIndex: 'currentStockQty', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productUnit', width: '60px', align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '售价', dataIndex: 'productPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '包装数', dataIndex: 'packQtyV', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '8%', align: 'center' },
-        { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+        { title: '包装数', dataIndex: 'packQtyV', width: '60px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '80px', align: 'center', fixed: 'right' },
+        { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '60px', align: 'center', fixed: 'right' }
       ]
       if (this.$hasPermissions('B_salesEdit_salesPrice')) { // 售价权限
-        arr.splice(6, 0, { title: '售价', dataIndex: 'productPrice', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(6, 0, { title: '售价', dataIndex: 'productPrice', width: '80px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       return arr
     }

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

@@ -35,7 +35,7 @@
           ref="productNormalList" 
           @insterOk="insterActiveOk"
           @openCpModal="openProductModal" 
-          :showTotal="activeList.length>0"
+          :showTotal="showTotal"
           :detailData="detailData" 
           :warehouseSn="warehouseSn" 
           :salesBillSn="salesBillSn"></productNormalList>
@@ -195,6 +195,9 @@ export default {
     }
   },
   computed: {
+    showTotal(){
+      return this.activeList.length > 0
+    },
     shippingAddress () {
       const shippingAddrProvinceName = this.detailData && this.detailData.salesBillExtEntity && this.detailData.salesBillExtEntity.shippingAddrProvinceName ? this.detailData.salesBillExtEntity.shippingAddrProvinceName : ''
       const shippingAddrCityName = this.detailData && this.detailData.salesBillExtEntity && this.detailData.salesBillExtEntity.shippingAddrCityName ? this.detailData.salesBillExtEntity.shippingAddrCityName : ''
@@ -245,10 +248,14 @@ export default {
         item.disabled = item.enabledFlag == 0
         this.activeDesKey['search-'+item.promoRuleSn] = false
       })
+      // 加载正常产品列表
+      setTimeout(()=> {
+        this.$refs.productNormalList.resetSearchForm()
+      }, 500)
     },
     // 获取是否有新活动
     async getNewActive(){
-      const hasNewActive = await salesQueryUnPartPromo({ salesBillSn: this.$route.params.sn }).then(res => res.data)
+      const hasNewActive = await salesQueryUnPartPromo({ salesBillSn: this.$route.params.sn, enabledFlag: "1" }).then(res => res.data)
       if(hasNewActive.length){
         this.newActiveList = hasNewActive
         this.showNewActiveModal=true