소스 검색

添加产品 查询

chenrui 6 달 전
부모
커밋
21d6ce0942
2개의 변경된 파일59개의 추가작업 그리고 22개의 파일을 삭제
  1. 24 9
      src/views/purchasingManagement/purchaseOrder/edit.vue
  2. 35 13
      src/views/purchasingManagement/purchaseOrderNew/chooseProductModal.vue

+ 24 - 9
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -63,35 +63,48 @@
               <!-- 搜索条件 -->
               <div class="table-page-search-wrapper">
                 <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-                  <a-row type="flex" :gutter="12" justify="start">
-                    <a-col flex="250px">
+                  <a-row :gutter="12">
+                    <a-col :md="6" :sm="24">
                       <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 flex="350px">
+                    <a-col :md="6" :sm="24">
                       <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 flex="250px">
+                    <a-col :md="6" :sm="24">
                       <a-form-model-item label="原厂编码">
                         <a-input id="purchaseOrderEdit-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
                       </a-form-model-item>
                     </a-col>
                     <template v-if="advanced">
-                      <a-col flex="250px">
+                      <a-col :md="6" :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>
-                      <a-col flex="250px">
+                      <a-col :md="6" :sm="24">
                         <a-form-item label="产品品牌">
                           <ProductBrand id="purchaseOrderEdit-productBrand" :tenantId="$route.params.dealerSn" v-model="queryParam.productBrandSn"></ProductBrand>
                         </a-form-item>
                       </a-col>
+                      <a-col :md="6" :sm="24">
+                        <a-form-item label="可用库存小于等于">
+                          <a-input-number
+                            style="width:100%;"
+                            id="purchaseOrderEdit-stockQty"
+                            v-model.trim="queryParam.stockQty"
+                            :min="0"
+                            :step="1"
+                            :precision="0"
+                            :max="99999999"
+                            placeholder="请输入库存数量"/>
+                        </a-form-item>
+                      </a-col>
                     </template>
-                    <a-col flex="auto" style="margin-bottom: 10px;">
+                    <a-col :md="6" :sm="24" 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" id="purchaseOrderEdit-advanced-btn">
@@ -321,7 +334,8 @@ export default {
         origCode: '', //  原厂编码
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
-        productTypeSn3: '' //  产品三级分类
+        productTypeSn3: '', //  产品三级分类
+        stockQty: ''// 可用库存小于等于
       },
       typeData: [], //    下拉数据
       advanced: false, //  高级搜索 展开/关闭
@@ -490,7 +504,8 @@ export default {
         origCode: '', //  原厂编码
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
-        productTypeSn3: '' //  产品三级分类
+        productTypeSn3: '', //  产品三级分类
+        stockQty: ''// 可用库存小于等于
       }
       this.productType = []
       this.$refs.table.refresh(true)

+ 35 - 13
src/views/purchasingManagement/purchaseOrderNew/chooseProductModal.vue

@@ -14,13 +14,13 @@
         <!-- 搜索条件 -->
         <div ref="searchBox" class="table-page-search-wrapper">
           <a-form layout="inline" @keyup.enter.native="searchForm">
-            <a-row type="flex" :gutter="12" justify="start">
-              <a-col flex="auto">
+            <a-row :gutter="12">
+              <a-col :md="6" :sm="24">
                 <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 flex="auto">
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="产品名称">
                   <a-input id="purchaseOrderEdit-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
                 </a-form-model-item>
@@ -30,17 +30,30 @@
                   <a-input id="purchaseOrderEdit-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
                 </a-form-model-item>
               </a-col> -->
-              <a-col flex="250px">
+              <a-col :md="6" :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>
-              <a-col flex="250px">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="产品品牌">
                   <ProductBrand id="purchaseOrderEdit-productBrand" :tenantId="$route.params.dealerSn" v-model="queryParam.productBrandSn"></ProductBrand>
                 </a-form-item>
               </a-col>
-              <a-col flex="auto">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="可用库存小于等于">
+                  <a-input-number
+                    style="width:100%;"
+                    id="purchaseOrderEdit-stockQty"
+                    v-model.trim="queryParam.stockQty"
+                    :min="0"
+                    :step="1"
+                    :precision="0"
+                    :max="99999999"
+                    placeholder="请输入库存数量"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
                 <a-button type="primary" @click="searchForm" id="purchaseOrderEdit-refresh">查询</a-button>
                 <a-button style="margin-left: 5px" @click="resetSearchForm" id="purchaseOrderEdit-reset">重置</a-button>
               </a-col>
@@ -186,7 +199,8 @@ export default {
         origCode: '', //  原厂编码
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
-        productTypeSn3: '' //  产品三级分类
+        productTypeSn3: '', //  产品三级分类
+        stockQty: ''
       },
       advanced: false, //  高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
@@ -234,12 +248,12 @@ export default {
         { title: '产品名称', dataIndex: 'name', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'origCode', width: '150px', align: 'center', customRender: function (text) { return text && text != ' ' ? text : '--' } },
         { title: '在途数', dataIndex: 'transitQty', width: '60px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '可用库存', dataIndex: 'currentStockQty', width: '60px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '60px', align: 'center' },
         { title: '单位', dataIndex: 'unit', width: '60px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '包装数', scopedSlots: { customRender: 'baozh' }, width: '60px', align: 'center' },
-        { title: '终端会员价', dataIndex: 'terminalPrice', width: '80px', align: 'right', fixed: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
-        { title: '车主零售价', dataIndex: 'carOwnersPrice', width: '80px', align: 'right', fixed: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '终端会员价', dataIndex: 'terminalPrice', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '车主零售价', dataIndex: 'carOwnersPrice', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '可用库存', dataIndex: 'currentStockQty', width: '70px', align: 'center', fixed: 'right', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购数量', dataIndex: 'qty', scopedSlots: { customRender: 'storageQuantity' }, width: '80px', align: 'center', fixed: 'right' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '80px', align: 'center', fixed: 'right' }
       ]
@@ -252,7 +266,7 @@ export default {
       }
       // 成本价权限
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(this.isDealerUp ? 10 : 9, 0, { title: '成本价', dataIndex: 'purchasePrice', width: '80px', align: 'right', fixed: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(this.isDealerUp ? 12 : 11, 0, { title: '成本价', dataIndex: 'purchasePrice', width: '80px', align: 'right', fixed: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
       }
       return arr
     }
@@ -288,7 +302,8 @@ export default {
         origCode: '', //  原厂编码
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
-        productTypeSn3: '' //  产品三级分类
+        productTypeSn3: '', //  产品三级分类
+        stockQty: ''
       }
       this.productType = []
       this.showTable = false
@@ -313,7 +328,7 @@ export default {
 }
 </script>
 
-<style lang="less">
+<style lang="less" scoped>
 .chooseProduct-drawer {
   .ant-drawer-header{
     padding: 13px 20px;
@@ -336,4 +351,11 @@ export default {
     }
   }
 }
+.chooseProduct-drawer-box{
+  /deep/.ant-input-number{
+     border: 0;
+     -webkit-box-shadow: none !important;
+     box-shadow: none !important;
+   }
+}
 </style>