lilei 2 years ago
parent
commit
8f80432749

+ 1 - 1
public/version.json

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

+ 28 - 2
src/views/purchasingManagement/purchaseOrderNew/chooseProductModal.vue

@@ -41,7 +41,7 @@
                 </a-form-item>
               </a-col>
               <a-col flex="auto">
-                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOrderEdit-refresh">查询</a-button>
+                <a-button type="primary" @click="searchForm" :disabled="disabled" id="purchaseOrderEdit-refresh">查询</a-button>
                 <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="purchaseOrderEdit-reset">重置</a-button>
               </a-col>
             </a-row>
@@ -49,6 +49,7 @@
         </div>
         <!-- 列表 -->
         <s-table
+          v-if="hasVaild"
           class="sTable"
           ref="table"
           size="small"
@@ -112,12 +113,23 @@
             <span v-else>--</span>
           </template>
         </s-table>
+        <div v-else>
+          <a-empty
+            :image="simpleImage"
+            :image-style="{
+              height: '60px',
+            }"
+          >
+            <span style="color:red" slot="description">请输入查询条件</span>
+          </a-empty>
+        </div>
       </div>
     </a-spin>
   </a-drawer>
 </template>
 
 <script>
+import { Empty } from 'ant-design-vue'
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import ProductType from '../../common/productType.js'
@@ -167,6 +179,7 @@ export default {
       visible: this.showModal,
       title: '添加产品',
       tableHeight: 0,
+      simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
       // 选择产品
       addLoading: false,
       spinning: false,
@@ -200,6 +213,9 @@ export default {
     }
   },
   computed: {
+    hasVaild () {
+      return this.queryParam.code || this.queryParam.name || this.queryParam.productBrandSn || this.queryParam.productTypeSn1
+    },
     tableWidth () {
       let w = 1100
       if (this.isDealerUp) {
@@ -246,6 +262,14 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
+    // 查询
+    searchForm () {
+      if (this.hasVaild) {
+        this.$refs.table.refresh(true)
+      } else {
+        this.$message.info('请输入查询条件')
+      }
+    },
     // 重置产品库
     resetSearchForm () {
       this.queryParam = {
@@ -258,7 +282,9 @@ export default {
         productTypeSn3: '' //  产品三级分类
       }
       this.productType = []
-      this.$refs.table.refresh(true)
+      if (this.hasVaild) {
+        this.$refs.table.refresh(true)
+      }
     },
     onClose () {
       this.$emit('close')

+ 2 - 2
src/views/shoppingCarManagement/shoppingCar/list.vue

@@ -202,7 +202,7 @@ export default {
         ]
       } else {
         this.columns = [
-          { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '200px', align: 'center' },
+          { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '200px', align: 'center', fixed: 'left' },
           { title: '产品名称', dataIndex: 'productEntity.name', width: '250px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
           { title: '可用库存数量', dataIndex: 'currentStockQty', width: '140px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
           { title: '成本价', dataIndex: 'productEntity.purchasePrice', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
@@ -344,8 +344,8 @@ export default {
     },
     pageInit (paramsData) {
       this.paramsData = paramsData || {}
-      this.setTableH()
       this.getColumns()
+      this.setTableH()
       this.resetSearchForm()
     },
     setTableH () {