lilei 7 mēneši atpakaļ
vecāks
revīzija
754eec23d5

+ 9 - 1
src/components/Select/index.js

@@ -36,6 +36,14 @@ export default {
       default: function () {
         return []
       }
+    },
+    size: {
+      type: String,
+      default: 'default'
+    },
+    placeholder: {
+      type: String,
+      default: ''
     }
   }),
   created () {
@@ -128,7 +136,7 @@ export default {
       )
     }
     return (
-      <Select vModel={props.value} {...{ props, on: on }}>
+      <Select vModel={props.value}  {...{ props, on: on }}>
         {
           this.dataList.map(item => {
             return (<a-select-option value={item.code} key={item.code}>{item['dispName']}</a-select-option>)

+ 6 - 0
src/views/common/chooseWarehouse.js

@@ -4,9 +4,11 @@ const warehouse = {
       <a-select
         :placeholder="placeholder"
         :id="id"
+        style="width:100%;"
         :allowClear="allowClear"
         :value="defaultVal"
         :showSearch="true"
+        :size="size"
         :disabled="disabled"
         :mode="modeType"
         @change="handleChange"
@@ -27,6 +29,10 @@ const warehouse = {
       type: Boolean,
       default: true
     },
+    size: {
+      type: String,
+      default: 'default'
+    },
     id: {
       type: String,
       default: ''

+ 7 - 1
src/views/common/productBrand.js

@@ -5,6 +5,8 @@ const ProductBrand = {
         :placeholder="placeholder"
         :id="id"
         allowClear
+        style="width:100%;"
+        :size="size"
         :value="defaultVal"
         :showSearch="true"
         :disabled="disabled"
@@ -34,7 +36,11 @@ const ProductBrand = {
     disabled: {
       type: Boolean,
       default: false
-    }
+    },
+    size: {
+      type: String,
+      default: 'default'
+      }
   },
   data() {
     return {

+ 6 - 0
src/views/common/productType.js

@@ -5,11 +5,13 @@ const ProductType = {
         @change="handleChange"
         :change-on-select="changeOnSelect"
         :value="defaultVal"
+        style="width:100%;"
         :expand-trigger="expandType"
         :options="productTypeList"
         :show-search="{ filter }"
         :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
         :id="id"
+        :size="size"
         placeholder="请选择产品分类"
         :allowClear="true"/>
     `,
@@ -35,6 +37,10 @@ const ProductType = {
     changeOnSelect: {
       type: Boolean,
       default: true
+    },
+    size:{
+      type: String,
+      default: 'default'
     }
   },
   data () {

+ 6 - 0
src/views/common/productTypeAll.js

@@ -5,6 +5,8 @@ const ProductType = {
         @change="handleChange"
         change-on-select
         :value="defaultVal"
+        :size="size"
+        style="width:100%;"
         expand-trigger="hover"
         :options="productTypeList"
         :disabled="disabled"
@@ -36,6 +38,10 @@ const ProductType = {
     isAll: {
       type: Boolean,
       default: true
+    },
+    size: {
+      type: String,
+      default: 'default'
     }
   },
   data () {

+ 51 - 19
src/views/salesManagement/salesQueryNew/comps/productList.vue

@@ -3,33 +3,59 @@
     <!-- 筛选条件 -->
     <div class="table-page-search-wrapper" style="margin:0" v-show="showSearchBox">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="4" :sm="24">
+        <a-row :gutter="15" type="flex">
+          <a-col flex="1">
             <a-form-item label="出库仓库" prop="warehouseSn">
-              <chooseWarehouse :id="'salesEdit-warehouseSn-'+id" ref="warehouse" v-model="queryParam.warehouseSn" @load="warehouseLoad"></chooseWarehouse>
+              <chooseWarehouse
+                style="width:100%;"
+                :id="'salesEdit-warehouseSn-'+id"
+                ref="warehouse"
+                v-model="queryParam.warehouseSn"
+                @load="warehouseLoad"></chooseWarehouse>
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col flex="1">
             <a-form-item label="产品编码" prop="productCode">
-              <a-input :id="'salesEdit-productCode-'+id" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+              <a-input
+                style="width:100%;"
+                :id="'salesEdit-productCode-'+id"
+                v-model.trim="queryParam.productCode"
+                placeholder="请输入产品编码"
+                allowClear />
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col flex="1">
             <a-form-item label="产品名称" prop="productName">
-              <a-input :id="'salesEdit-productName-'+id" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
+              <a-input
+                style="width:100%;"
+                :id="'salesEdit-productName-'+id"
+                v-model.trim="queryParam.productName"
+                placeholder="请输入产品名称"
+                allowClear />
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col flex="1">
             <a-form-item label="品牌">
               <ProductBrand :id="'salesEdit-productBrandSn-'+id" v-model="queryParam.productBrandSn"></ProductBrand>
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col flex="1">
             <a-form-item label="产品分类">
-              <productTypeAll :id="'salesEdit-productType-'+id" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></productTypeAll>
+              <productTypeAll
+                style="width:100%;"
+                :id="'salesEdit-productType-'+id"
+                size="small"
+                placeholder="请选择产品分类"
+                @change="changeProductType"
+                v-model="productType"></productTypeAll>
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
+          <a-col flex="1">
+            <a-form-item label="满足起订量">
+              <v-select code="FLAG" allowClear placeholder="请选择是否满足起订量"></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col flex="2" style="margin-bottom: 10px;">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" :id="'salesEdit-refresh-'+id">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" :id="'salesEdit-reset-'+id">重置</a-button>
           </a-col>
@@ -70,6 +96,7 @@
           <span v-if="selectTotal" style="margin-left:10px;">已选{{ selectTotal }}项</span>
         </a-col>
         <a-col :md="12" :sm="24" style="text-align:right;">
+          <label><a-checkbox v-model="queryParam.showLj"></a-checkbox> 显示累计产品</label>
           <a-button
             :id="'salesEdit-searchBox-'+id"
             type="link"
@@ -125,6 +152,10 @@
         </div>
         <div v-else>--</div>
       </template>
+      <!-- 规则数量 -->
+      <template slot="rulesNums" slot-scope="text, record">
+        <a-button type="link" :id="'salesEdit-gzqty-'+id+'-'+record.id" size="small" class="button-info">1</a-button>
+      </template>
       <!-- 销售数量 -->
       <template slot="salesNums" slot-scope="text, record">
         <a-input-number
@@ -294,7 +325,7 @@ export default {
           return data
         })
       },
-      showSearchBox: false, // 是否显示筛选条件
+      showSearchBox: true, // 是否显示筛选条件
       openWarehouseModal: false, // 打开仓库设置
       delLoading: false, // 删除logding
       disabled: false, //  查询、重置按钮是否可操作
@@ -328,21 +359,22 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '12%', align: 'center' },
         { title: '产品名称', dataIndex: 'productEntity.name', scopedSlots: { customRender: 'productName' }, width: '25%', align: 'left' },
-        { title: '起订量', dataIndex: 'unitQtyV', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '规则数量', scopedSlots: { customRender: 'rulesNums' }, width: '4%', align: 'center' },
+        { title: '起订量', dataIndex: 'unitQtyV', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '6%', align: 'center' },
-        { title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '6%', align: 'center' },
-        { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '10%', align: 'center' },
+        { title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '5%', align: 'center' },
+        { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '8%', align: 'center' },
         { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       if (this.showStockCol) {
-        arr.splice(6, 0, { title: '第三方库存', dataIndex: 'thirdStockQty', width: '6%', align: 'center', customRender: text => ((text || text == 0) ? text : '--') })
+        arr.splice(7, 0, { title: '第三方库存', dataIndex: 'thirdStockQty', width: '6%', align: 'center', customRender: text => ((text || text == 0) ? text : '--') })
       }
       // 售价权限
       if (this.$hasPermissions('B_salesEdit_salesPrice')) {
-        arr.splice(3, 0, { title: '售价', dataIndex: 'price', width: '6%', align: 'right', scopedSlots: { customRender: 'price' } })
-        arr.splice(4, 0, { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
-        arr.splice((this.showStockCol ? 9 : 8), 0, { title: '售价小计', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(4, 0, { title: '售价', dataIndex: 'price', width: '6%', align: 'right', scopedSlots: { customRender: 'price' } })
+        arr.splice(5, 0, { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
+        arr.splice((this.showStockCol ? 10 : 9), 0, { title: '售价小计', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
       return arr
     }

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

@@ -14,7 +14,7 @@
               <a-input id="salesEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
             </a-form-item>
           </a-col>
-          <a-col flex="2">
+          <a-col flex="1">
             <a-form-item label="产品名称" prop="productName">
               <a-input id="salesEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
             </a-form-item>