Browse Source

Merge branch 'develop_yh13' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_yh13

chenrui 2 years ago
parent
commit
323f08dffe

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1675819567292
+  "version": 1675843730513
 }

+ 13 - 13
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -21,9 +21,9 @@
           </p></template>
       </a-page-header>
       <!-- 基础信息 -->
-      <div v-if="isShowBisiceInfo" class="bulkWarehousingOrderEdit-cont">
+      <div v-show="isShowBisiceInfo" class="bulkWarehousingOrderEdit-cont">
         <a-collapse :activeKey="['1']">
-          <a-collapse-panel key="1" header="基础信息" :show-arrow="false" :disabled="true">
+          <a-collapse-panel key="1" header="基础信息" :disabled="true">
             <a-row :gutter="16">
               <a-col class="gutter-row" :span="8">
                 供应商:{{ (basicInfoData&&basicInfoData.supplierName) || '--' }}
@@ -50,35 +50,35 @@
               <!-- 搜索条件 -->
               <div class="table-page-search-wrapper">
                 <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-                  <a-row :gutter="15">
-                    <a-col :md="4" :sm="24">
+                  <a-row type="flex" :gutter="12" justify="start">
+                    <a-col flex="250px">
                       <a-form-model-item label="产品编码">
                         <a-input id="bulkWarehousingOrderEdit-code" ref="searchProductCode" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
                       </a-form-model-item>
                     </a-col>
-                    <a-col :md="4" :sm="24">
+                    <a-col flex="350px">
                       <a-form-model-item label="产品名称">
                         <a-input id="bulkWarehousingOrderEdit-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
                       </a-form-model-item>
                     </a-col>
-                    <a-col :md="4" :sm="24">
+                    <a-col flex="250px">
                       <a-form-model-item label="原厂编码">
                         <a-input id="bulkWarehousingOrderEdit-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
                       </a-form-model-item>
                     </a-col>
-                    <a-col :md="4" :sm="24">
-                      <a-form-item label="产品分类">
-                        <ProductType id="productInfoList-productType" @change="changeProductType" v-model="productType"></ProductType>
-                      </a-form-item>
-                    </a-col>
                     <template v-if="advanced">
-                      <a-col :md="4" :sm="24">
+                      <a-col flex="250px">
+                        <a-form-item label="产品分类">
+                          <ProductType id="productInfoList-productType" @change="changeProductType" v-model="productType"></ProductType>
+                        </a-form-item>
+                      </a-col>
+                      <a-col flex="250px">
                         <a-form-item label="产品品牌">
                           <ProductBrand id="bulkWarehousingOrderEdit-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
                         </a-form-item>
                       </a-col>
                     </template>
-                    <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
+                    <a-col flex="auto" style="margin-bottom: 10px;">
                       <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderEdit-refresh">查询</a-button>
                       <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="bulkWarehousingOrderEdit-reset">重置</a-button>
                       <a @click="advanced=!advanced" style="margin:0 30px 0 10px">

+ 83 - 0
src/views/common/shopingCatModal.vue

@@ -0,0 +1,83 @@
+<template>
+  <a-drawer
+    :zIndex="zIndex"
+    :title="title"
+    placement="right"
+    :visible="visible"
+    :width="width"
+    :get-container="false"
+    :wrap-style="{ position: 'absolute' }"
+    @close="onClose"
+    wrapClassName="shopingCat-drawer">
+     <shopingCat ref="shopingCat" modes="modals" @add="handleAdd"></shopingCat>
+  </a-drawer>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import shopingCat from '@/views/shoppingCarManagement/shoppingCar/list.vue'
+export default {
+  name:"shopingCatModal",
+  mixins: [commonMixin],
+  components: {
+    shopingCat
+  },
+  props: {
+    showModal: {
+      type: Boolean,
+      default: false
+    },
+    width: {
+      type: [String, Number],
+      default: '70%'
+    },
+    zIndex: {
+      type: Number,
+      default: 1050
+    },
+  },
+  watch: {
+    showModal (newValue, oldValue) {
+      this.visible = newValue
+      if (newValue) {
+         setTimeout(()=>{
+           this.$refs.shopingCat.pageInit()
+         },200)
+      }
+    },
+  },
+  data () {
+    return {
+      visible: this.showModal,
+      title: '购物车',
+    }
+  },
+  methods: {
+    onClose () {
+      this.$emit('close')
+    },
+    handleAdd (record) {
+      this.spinning = true
+      this.$emit('add', record, 0)
+    },
+  }
+}
+</script>
+
+<style lang="less">
+.shopingCat-drawer {
+  .ant-drawer-header{
+    padding: 13px 20px;
+  }
+  .ant-drawer-body {
+    padding: 10px;
+    height: calc(100% - 50px);
+    display: flex;
+    flex-direction: column;
+    overflow: auto;
+    > div {
+      height: 100%;
+    }
+  }
+}
+</style>

+ 2 - 3
src/views/numsGoodsShelves/settlementManagement/unSettlementDetail.vue

@@ -121,8 +121,7 @@ export default {
         outEndDate: '',
         orderBillNo: ''
       },
-      // 表头
-      columns: [
+      columns: [// 表头
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '下单时间', dataIndex: 'orderDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '取货时间', dataIndex: 'outDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -131,7 +130,7 @@ export default {
         { title: '产品编码', width: '10%', dataIndex: 'productCode', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', width: '15%', dataIndex: 'productName', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '结算价', width: '10%', dataIndex: 'settlePrice', align: 'right', customRender: function (text) { return toThousands(text, 2) || '--' } },
-        { title: '下单数量', width: '8%', dataIndex: 'totalQty', align: 'center', customRender: function (text) { return toThousands(text) || '--' } },
+        { title: '下单数量', width: '8%', dataIndex: 'totalQty', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '合计金额', width: '10%', dataIndex: 'settleAmount', align: 'right', customRender: function (text) { return toThousands(text, 2) || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象

+ 13 - 13
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -17,9 +17,9 @@
         </template>
       </a-page-header>
       <!-- 基础信息 -->
-      <div v-if="isShowBisiceInfo" class="purchaseOrderEdit-cont">
+      <div v-show="isShowBisiceInfo" class="purchaseOrderEdit-cont">
         <a-collapse :activeKey="['1']">
-          <a-collapse-panel key="1" :disabled="true" :showArrow="false">
+          <a-collapse-panel key="1" :disabled="true">
             <template slot="header">
               基础信息
             </template>
@@ -63,35 +63,35 @@
               <!-- 搜索条件 -->
               <div class="table-page-search-wrapper">
                 <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-                  <a-row :gutter="15">
-                    <a-col :md="4" :sm="24">
+                  <a-row type="flex" :gutter="12" justify="start">
+                    <a-col flex="250px">
                       <a-form-model-item label="产品编码">
                         <a-input id="purchaseOrderEdit-code" ref="searchProductCode" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
                       </a-form-model-item>
                     </a-col>
-                    <a-col :md="4" :sm="24">
+                    <a-col flex="350px">
                       <a-form-model-item label="产品名称">
                         <a-input id="purchaseOrderEdit-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
                       </a-form-model-item>
                     </a-col>
-                    <a-col :md="4" :sm="24">
+                    <a-col flex="250px">
                       <a-form-model-item label="原厂编码">
                         <a-input id="purchaseOrderEdit-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
                       </a-form-model-item>
                     </a-col>
-                    <a-col :md="4" :sm="24">
-                      <a-form-item label="产品分类">
-                        <ProductType id="purchaseOrderEdit-productType" :isDealer="true" :tenantId="$route.params.dealerSn" @change="changeProductType" v-model="productType"></ProductType>
-                      </a-form-item>
-                    </a-col>
                     <template v-if="advanced">
-                      <a-col :md="4" :sm="24">
+                      <a-col flex="250px">
+                        <a-form-item label="产品分类">
+                          <ProductType id="purchaseOrderEdit-productType" :isDealer="true" :tenantId="$route.params.dealerSn" @change="changeProductType" v-model="productType"></ProductType>
+                        </a-form-item>
+                      </a-col>
+                      <a-col flex="250px">
                         <a-form-item label="产品品牌">
                           <ProductBrand id="purchaseOrderEdit-productBrand" :tenantId="$route.params.dealerSn" v-model="queryParam.productBrandSn"></ProductBrand>
                         </a-form-item>
                       </a-col>
                     </template>
-                    <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
+                    <a-col flex="auto" style="margin-bottom: 10px;">
                       <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOrderEdit-refresh">查询</a-button>
                       <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="purchaseOrderEdit-reset">重置</a-button>
                       <a @click="advanced=!advanced" style="margin:0 30px 0 10px">

+ 8 - 5
src/views/purchasingManagement/purchaseOrderNew/chooseProductModal.vue

@@ -152,10 +152,11 @@ export default {
       if (newValue) {
         this.resetSearchForm()
         this.$refs.searchProductCode.focus()
-        this.$nextTick(() => {
-          this.setTableH()
-        })
+        this.setTableH()
       }
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
     }
   },
   data () {
@@ -264,8 +265,10 @@ export default {
       this.$emit('add', record, 0)
     },
     setTableH () {
-      const searchBoxH = this.$refs.searchBox.offsetHeight
-      this.tableHeight = window.innerHeight - searchBoxH - 285
+      this.$nextTick(() => {
+        const searchBoxH = this.$refs.searchBox.offsetHeight
+        this.tableHeight = window.innerHeight - searchBoxH - 285
+      })
     }
   }
 }

+ 7 - 4
src/views/purchasingManagement/purchaseOrderNew/edit.vue

@@ -53,6 +53,7 @@
       <!-- 上次缺货 -->
       <outStockModal :openModal="openOutStockModal" :paramsData="paramsData" @close="openOutStockModal=false" @ok="hanldeOkOutStock" />
       <!-- 购物车 -->
+      <shopingCatModal :showModal="openShopCatModal" @close="openShopCatModal=false"></shopingCatModal>
       <!-- 已选产品 -->
       <div>
         <div class="chooseBox-title">
@@ -64,7 +65,7 @@
             <a-button v-if="detail&&detail.totalCategory" id="purchaseNewOrderEdit-add-btn" type="danger" @click="openChooseProduct=true"><a-icon type="plus-circle" />添加产品</a-button>
             <a-button id="purchaseNewOrderEdit-import-btn" type="danger" ghost @click="openGuideModal=true"><a-icon type="import" />产品导入</a-button>
             <a-button id="purchaseNewOrderEdit-outStock-btn" type="danger" ghost @click="handleOutStock"><a-icon type="funnel-plot" />上次缺货</a-button>
-            <a-button id="purchaseNewOrderEdit-cart-btn" type="danger" ghost><a-icon type="shopping" />购物车</a-button>
+            <a-button id="purchaseNewOrderEdit-cart-btn" type="danger" ghost @click="openShopCatModal=true"><a-icon type="shopping" />购物车</a-button>
           </div>
         </div>
         <div class="choosed-table" v-if="detail&&detail.totalCategory">
@@ -74,12 +75,12 @@
               <a-col :span="24">
                 <a-form-model :model="productForm" layout="inline" @keyup.enter.native="$refs.purchaseTable.refresh(true)" >
                   <a-row :gutter="15">
-                    <a-col :md="8" :sm="24">
+                    <a-col :md="6" :sm="24">
                       <a-form-model-item label="产品编码">
                         <a-input v-model.trim="productForm.productCode" allowClear placeholder="输入产品编码" />
                       </a-form-model-item>
                     </a-col>
-                    <a-col :md="8" :sm="24">
+                    <a-col :md="6" :sm="24">
                       <a-form-model-item label="产品名称">
                         <a-input v-model.trim="productForm.productName" allowClear placeholder="输入产品名称" />
                       </a-form-model-item>
@@ -186,6 +187,7 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import ImportGuideModal from './importGuideModal.vue'
 import outStockModal from './outStockModal.vue'
+const shopingCatModal = () => import(/* webpackChunkName: "shopingCatModal" */ '@/views/common/shopingCatModal.vue');
 import chooseAddressModal from '@/views/common/receivingAddress/chooseAddressModal.vue'
 import { purchaseDetailBySn, purchaseWriteSubmit, purchaseDetailPrint, purchaseDetailExport, purchaseDetailAddress } from '@/api/purchase'
 import { purchaseDetailList, purchaseDetailSave, purchaseDetailDel, purchaseDetailCount, purchaseDetailCancelList } from '@/api/purchaseDetail'
@@ -196,7 +198,7 @@ import Print from '@/views/common/print.vue'
 import { hdPrint } from '@/libs/JGPrint'
 export default {
   name: 'PurchaseEdit',
-  components: { STable, VSelect, ImportGuideModal, outStockModal, Print, chooseAddressModal, chooseProductModal },
+  components: { STable, VSelect, ImportGuideModal, outStockModal, Print, chooseAddressModal, chooseProductModal, shopingCatModal },
   mixins: [commonMixin],
   data () {
     return {
@@ -205,6 +207,7 @@ export default {
       spinning: false,
       detail: null, // 详细信息
       openChooseProduct: false,
+      openShopCatModal: false,
       tableHeight: 0,
       simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
       // -------已选产品-------------

+ 4 - 11
src/views/purchasingManagement/purchaseOrderNew/list.vue

@@ -4,8 +4,8 @@
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
+          <a-row type="flex" :gutter="15">
+            <a-col flex="400px">
               <a-form-item label="创建时间">
                 <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
@@ -16,7 +16,7 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <a-form-item label="供应商">
                 <a-select
                   id="purchaseOrderList-purchaseTargetSn"
                   placeholder="请选择供应商"
@@ -32,13 +32,6 @@
             </a-col>
             <a-col :md="6" :sm="24" v-show="advanced">
               <a-form-item label="业务状态">
-                <!-- <v-select
-                  v-model="queryParam.billStatus"
-                  ref="billStatus"
-                  id="purchaseOrderList-billStatus"
-                  code="PURCHASE_BILL_STATUS"
-                  placeholder="请选择业务状态"
-                  allowClear></v-select> -->
                 <a-select id="purchaseOrderList-billStatus" allowClear v-model="queryParam.billStatus" placeholder="请选择业务状态">
                   <a-select-option value="">全部</a-select-option>
                   <a-select-option value="WAIT_SUBMIT">待提交</a-select-option>
@@ -57,7 +50,7 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="6" :sm="24" v-show="advanced">
               <a-form-item label="单据来源">
                 <v-select
                   v-model="queryParam.purchaseBillSource"

+ 11 - 4
src/views/purchasingManagement/purchaseOrderNew/outStockModal.vue

@@ -64,6 +64,7 @@
             :scroll="{ y:tableHeight }"
             @rowSelection="rowSelectionFun"
             :data="loadData"
+            :defaultLoadData="false"
             :columns="columns"
             :pageSize="30"
             bordered>
@@ -157,8 +158,10 @@ export default {
   },
   methods: {
     setTableH () {
-      const searchBoxH = this.$refs.searchBox.offsetHeight
-      this.tableHeight = window.innerHeight - searchBoxH - 340
+      this.$nextTick(() => {
+        const searchBoxH = this.$refs.searchBox.offsetHeight
+        this.tableHeight = window.innerHeight - searchBoxH - 340
+      })
     },
     //  产品分类  change
     changeProductType (val, opt) {
@@ -262,6 +265,9 @@ export default {
     }
   },
   watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    },
     //  父页面传过来的弹框状态
     openModal (newValue, oldValue) {
       this.isShow = newValue
@@ -271,9 +277,10 @@ export default {
       if (!newValue) {
         this.onCancel()
       } else {
-        this.$nextTick(() => {
+        setTimeout(()=>{
           this.setTableH()
-        })
+        },200)
+        this.resetSearchForm()
         this.title = '上次采购缺货产品明细(采购单号:' + this.paramsData.purchaseBillNo + ')'
       }
     }

+ 5 - 3
src/views/salesManagement/salesQuery/edit.vue

@@ -66,7 +66,7 @@
         <!-- 搜索条件 -->
         <div class="table-page-search-wrapper">
           <a-row :gutter="15">
-            <a-col :md="24" :lg="14">
+            <a-col :md="24" :lg="12">
               <a-form-model :model="productForm" ref="ruleForm" layout="inline" @keyup.enter.native="$refs.table.refresh(true)" >
                 <a-row :gutter="15">
                   <a-col :md="8" :sm="24">
@@ -88,7 +88,7 @@
                 </a-row>
               </a-form-model>
             </a-col>
-            <a-col :md="24" :lg="10">
+            <a-col :md="24" :lg="12">
               <div style="float:right;overflow: hidden;margin-bottom:10px;">
                 <a-checkbox :value="0" :checked="tbForm.indexOf('AUDIT')>=0" @change="(e)=>{tbFormChange(e,0)}" id="salesQuery-tbsh">同步审核</a-checkbox>
                 <a-checkbox :value="1" :checked="tbForm.indexOf('STOCK_OUT')>=0" @change="(e)=>{tbFormChange(e,1)}" id="salesQuery-tbck">同步出库</a-checkbox>
@@ -109,9 +109,11 @@
                   type="default"
                   v-if="shelfInfo&&shelfInfo.state=='ENABLE'"
                   @click="showShelfModal=true"
+                  style="margin-right:5px;"
                   id="salesEdit-shelf">货架产品</a-button>
                 <a-button
-                  type="link"
+                  type="primary"
+                  ghost
                   @click="delSalerOrder"
                   :loading="delLoading"
                   id="salesEdit-del-all">整单删除</a-button>

+ 3 - 3
src/views/salesManagement/salesQuery/queryPart.vue

@@ -9,7 +9,7 @@
         :rules="rules"
         :model="queryParam"
         @keyup.enter.native="$refs.table.refresh(true)" >
-        <a-row :gutter="5">
+        <a-row type="flex" :gutter="5">
           <a-col :lg="4" :md="6" :sm="12">
             <a-form-model-item label="产品编码">
               <a-input id="productInfoList-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
@@ -59,7 +59,7 @@
               </a-form-model-item>
             </a-col>
           </template>
-          <a-col :lg="3" :md="8" :sm="12" style="margin-bottom: 10px;">
+          <a-col flex="200px" style="margin-bottom: 10px;">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" id="productInfoList-reset">重置</a-button>
             <a @click="advanced=!advanced" style="margin:0 0 0 10px">
@@ -67,7 +67,7 @@
               <a-icon :type="advanced ? 'up' : 'down'"/>
             </a>
           </a-col>
-          <a-col :lg="5" :md="8" :sm="12" style="margin-top: 6px;">
+          <a-col flex="240px" style="margin-bottom: 15px;display:flex;align-items:center;">
             <a-checkbox v-model="cost" v-if="$hasPermissions('M_ShowAllCost')" id="salesQuery-cost">成本价</a-checkbox>
             <a-checkbox v-model="cityPrice" id="salesQuery-cityPrice">市级价</a-checkbox>
             <a-checkbox v-model="tyuePrice" v-if="$store.state.user.isShowSpecialPrice==1" id="salesQuery-tyuePrice">特约价</a-checkbox>

+ 2 - 2
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -80,8 +80,8 @@
                   @click="handleSubmit()"
                   id="salesReturn-handleSubmit">提交</a-button>
                 <a-button
-                  size="small"
-                  type="link"
+                  type="primary"
+                  ghost
                   @click="salesReturnDelAll"
                   :loading="delLoading"
                   style="margin-left: 10px"

+ 2 - 2
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -81,8 +81,8 @@
                   @click="handleSubmit()"
                   id="salesReturn-handleSubmit">提交</a-button>
                 <a-button
-                  size="small"
-                  type="link"
+                  type="primary"
+                  ghost
                   @click="salesReturnDelAll"
                   :loading="delLoading"
                   style="margin-left: 10px"

+ 57 - 126
src/views/shoppingCarManagement/shoppingCar/list.vue

@@ -3,48 +3,48 @@
     <!-- 搜索条件 -->
     <div ref="tableSearch" class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchForm">
-        <a-row :gutter="15">
-          <a-col :md="8" :sm="24">
+        <a-row type="flex" :gutter="12" justify="start">
+          <a-col flex="auto">
             <a-form-item label="产品编码">
               <a-input id="shoppingCar-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
             </a-form-item>
           </a-col>
-          <a-col :md="8" :sm="24">
+          <a-col flex="auto">
             <a-form-item label="产品名称">
               <a-input id="shoppingCar-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
             </a-form-item>
           </a-col>
-          <a-col :md="8" :sm="24">
+          <a-col flex="250px">
             <a-form-item label="产品分类">
               <ProductType id="shoppingCar-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
             </a-form-item>
           </a-col>
-          <a-col :md="8" :sm="24">
+          <a-col flex="250px">
             <a-form-item label="产品品牌">
               <ProductBrand id="shoppingCar-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
               </a-select>
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+          <a-col flex="auto">
             <a-button type="primary" @click="searchForm" :disabled="disabled" id="shoppingCar-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="shoppingCar-reset">重置</a-button>
           </a-col>
         </a-row>
       </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator" v-if="$hasPermissions('B_JgProduct_enable')">
-      <a-row :gutter="16">
-        <a-col class="gutter-row" :span="12">
-          <a-button type="primary" ghost v-if="type=='globalBtn'" @click="deleteMore">
-            批量删除
-          </a-button>
-          <a-button type="primary" ghost v-else>
-            批量添加
-          </a-button>
-          <span v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys">已选 {{ rowSelectionInfo.selectedRowKeys.length }} 项</span>
-        </a-col>
-      </a-row>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-row :gutter="16">
+          <a-col class="gutter-row" :span="24">
+            <a-button type="primary" ghost v-if="modes=='pages'" @click="deleteMore">
+              批量删除
+            </a-button>
+            <a-button type="primary" ghost v-if="modes=='modals'" @click="addMore">
+              批量添加
+            </a-button>
+            <span v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys">已选 {{ rowSelectionInfo.selectedRowKeys.length }} 项</span>
+          </a-col>
+        </a-row>
+      </div>
     </div>
     <!-- 列表 -->
     <s-table
@@ -52,7 +52,7 @@
       ref="table"
       :style="{ height: tableHeight+84.5+'px' }"
       size="small"
-      :row-selection="$hasPermissions('B_JgProduct_enable')?rowSelection:null"
+      :row-selection="{ columnWidth: 40 }"
       @rowSelection="rowSelectionFun"
       rowKeyName="productSn"
       :rowKey="(record) => record.productSn"
@@ -79,6 +79,12 @@ export default {
   name: 'ShoppingCarList',
   components: { STable, ProductType, ProductBrand },
   mixins: [commonMixin],
+  props:{
+    modes:{
+      type: String,
+      default: 'pages'
+    }
+  },
   data () {
     return {
       tableHeight: 0,
@@ -120,50 +126,9 @@ export default {
       itemId: '', //  当前产品id
       productTypeList: [], //  分类下拉数据
       rowSelectionInfo: null,
-      type: 'globalBtn'
-    }
-  },
-  computed: {
-    rowSelection () {
-      return {
-        getCheckboxProps: record => ({
-          props: {
-            disabled: record.enabledFlag == undefined // Column configuration not to be checked
-          }
-        })
-      }
     }
   },
   methods: {
-    // 批量删除
-    deleteMore () {
-      this.$confirm({
-        title: '提示',
-        content: '您已经选择3个产品,确认要将已选产品从购物车中移除吗?',
-        centered: true,
-        onOk: () => {
-          console.log('确定删除')
-        }
-      })
-    },
-    inited (viewer) {
-      if (viewer) {
-        const imageUrl = []
-        viewer.map(item => {
-          imageUrl.push(item.imageUrl)
-        })
-        this.$viewerApi({
-          images: imageUrl
-        })
-      }
-    },
-    onChangeList (checkedValues) {
-      this.chooseShowList = checkedValues
-    },
-    //  详情
-    handleDetail (row) {
-      this.$router.push({ name: 'viewProduct', params: { sn: row.productSn } })
-    },
     // 查询
     searchForm () {
       this.$refs.table.clearSelected() // 清空表格选中项
@@ -186,100 +151,68 @@ export default {
     getColumns () {
       const _this = this
       this.columns = [
-        { title: '产品编码', dataIndex: 'code', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'name', width: '30%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位', dataIndex: 'origCode', width: '12%', align: 'center', customRender: function (text) { return (!text || text == ' ') ? '--' : text } },
-        { title: '包装数', dataIndex: 'terminalPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '可用库存数量', dataIndex: 'carOwnersPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品编码', dataIndex: 'code', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'name', width: '33%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '可用库存数量', dataIndex: 'carOwnersPrice', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '成本价', dataIndex: 'price1', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '采购数量', scopedSlots: { customRender: 'purchaseQty' }, width: '20%', align: 'center' }
+        { title: '单位', dataIndex: 'origCode', width: '8%', align: 'center', customRender: function (text) { return (!text || text == ' ') ? '--' : text } },
+        { title: '包装数', dataIndex: 'terminalPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '采购数量', scopedSlots: { customRender: 'purchaseQty' }, width: '15%', align: 'center' }
       ]
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    // 启用 禁用
-    changeStatus (record) {
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
+    // 批量删除
+    deleteMore () {
+      const rows = this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys || []
+      if (!this.rowSelectionInfo || (rows.length <= 0)) {
+        this.$message.warning('请在列表勾选后再进行批量操作!')
+        return
+      }
       this.$confirm({
         title: '提示',
-        content: record.enabledFlag == '1' ? '产品被禁用后,不能再销售,确定禁用吗?' : '确定启用吗?',
+        content: '您已经选择'+rows.length+'个产品,确认要将已选产品从购物车中移除吗?',
         centered: true,
         onOk: () => {
-          this.setEnable(record.enabledFlag == 1 ? '0' : '1', [record.productSn])
-        }
-      })
-    },
-    // 启用 禁用
-    setEnable (enabledFlag, snList) {
-      const params = {
-        productSnList: snList,
-        enabledFlag: enabledFlag
-      }
-      this.spinning = true
-      productUpdate(params).then(res => {
-        if (res.status == 200) {
-          this.$message.success(res.message)
-          this.$refs.table.clearSelected()
-          this.rowSelectionInfo = null
-          this.$refs.table.refresh()
-          this.spinning = false
-        } else {
-          this.$refs.table.refresh()
-          this.spinning = false
+          console.log('确定删除')
         }
       })
     },
-    // 表格选中项
-    rowSelectionFun (obj) {
-      this.rowSelectionInfo = obj || null
-    },
-    // 批量操作
-    handleOutbounds (type) {
-      console.log(this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length)
-      if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length <= 0)) {
+    // 批量添加
+    addMore () {
+      const rows = this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys || []
+      if (!this.rowSelectionInfo || (rows.length <= 0)) {
         this.$message.warning('请在列表勾选后再进行批量操作!')
         return
       }
       this.$confirm({
         title: '提示',
-        content: type == '2' ? '产品被禁用后,不能再销售,确定批量禁用吗?' : '确定批量启用吗?',
+        content: '确定批量添加吗?',
         centered: true,
         onOk: () => {
-          this.setEnable(type == '2' ? '0' : '1', this.rowSelectionInfo.selectedRowKeys)
         }
       })
     },
-    handleMenuClick (e) {
-      this.handleOutbounds(e.key)
-    },
     pageInit () {
       const _this = this
-      _this.type = _this.$route.params.type
-      this.$nextTick(() => { // 页面渲染完成后的回调
-        _this.setTableH()
-      })
+      this.setTableH()
       this.getColumns()
+      this.resetSearchForm()
     },
     setTableH () {
-      const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 235
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        const tableSearchH = this.$refs.tableSearch.offsetHeight
+        this.tableHeight = window.innerHeight - tableSearchH - (this.modes == 'pages' ? 200 : 320)
+      })
     },
-    // 打开自定义报价弹窗
-    handleEditPrice () {
-      // const oldPrice = {
-
-      // }
-      // this.$refs.editPrice.setOldPrice(oldPrice)
-      this.openEditPriceModal = true
-    }
   },
   watch: {
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
@@ -289,14 +222,12 @@ export default {
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {