瀏覽代碼

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

chenrui 2 年之前
父節點
當前提交
d587bb89fc

+ 1 - 1
public/version.json

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

+ 0 - 1
src/components/Table/index.js

@@ -128,7 +128,6 @@ export default {
       showTotal: total => `共 ${total} 条记录`,
       showSizeChanger: this.showSizeChanger
     }) || false
-    // console.log('this.localPagination', this.localPagination)
     this.needTotalList = this.initTotalList(this.columns)
     if (this.defaultLoadData) {
       this.loadData()

+ 1 - 4
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -125,10 +125,7 @@
                 </template>
                 <!-- 包装数 -->
                 <template slot="baozh" slot-scope="text, record">
-                  <span v-if="record.packQty&&record.packQtyUnit">
-                    {{ record.packQty||'--' }}{{ record.unit }}/{{ record.packQtyUnit||'--' }}
-                  </span>
-                  <span v-else>--</span>
+                  {{ record.packQty||'--' }}{{ record.packQty ? record.unit : '' }}/{{ record.packQtyUnit||'--' }}
                 </template>
                 <!-- 产品编码 -->
                 <template slot="code" slot-scope="text, record">

+ 29 - 6
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"
@@ -71,10 +72,7 @@
           </template>
           <!-- 包装数 -->
           <template slot="baozh" slot-scope="text, record">
-            <span v-if="record.packQty&&record.packQtyUnit">
-              {{ record.packQty||'--' }}{{ record.unit }}/{{ record.packQtyUnit||'--' }}
-            </span>
-            <span v-else>--</span>
+            {{ record.packQty||'--' }}{{ record.packQty ? record.unit : '' }}/{{ record.packQtyUnit||'--' }}
           </template>
           <!-- 产品编码 -->
           <template slot="code" slot-scope="text, record">
@@ -112,12 +110,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 +176,7 @@ export default {
       visible: this.showModal,
       title: '添加产品',
       tableHeight: 0,
+      simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
       // 选择产品
       addLoading: false,
       spinning: false,
@@ -200,6 +210,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 +259,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 +279,9 @@ export default {
         productTypeSn3: '' //  产品三级分类
       }
       this.productType = []
-      this.$refs.table.refresh(true)
+      if (this.hasVaild) {
+        this.$refs.table.refresh(true)
+      }
     },
     onClose () {
       this.$emit('close')

+ 1 - 0
src/views/purchasingManagement/purchaseOrderNew/edit.vue

@@ -107,6 +107,7 @@
             :data="chooseLoadData"
             :defaultLoadData="false"
             :showPagination="false"
+            :pageSize="5000"
             bordered>
             <!-- 采购数量 -->
             <template slot="storageQuantity" slot-scope="text, record">

+ 3 - 6
src/views/shoppingCarManagement/shoppingCar/list.vue

@@ -86,10 +86,7 @@
       </template>
       <!-- 包装数 -->
       <template slot="baozh" slot-scope="text, record">
-        <span v-if="record.productEntity.packQty&&record.productEntity.packQtyUnit">
-          {{ record.productEntity.packQty||'--' }}{{ record.productEntity.unit }}/{{ record.productEntity.packQtyUnit||'--' }}
-        </span>
-        <span v-else>--</span>
+        {{ record.productEntity.packQty||'--' }}{{ record.productEntity.packQty ? record.productEntity.unit : '' }}/{{ record.productEntity.packQtyUnit||'--' }}
       </template>
       <!-- 产品编码 -->
       <template slot="productCode" slot-scope="text, record">
@@ -202,7 +199,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 +341,8 @@ export default {
     },
     pageInit (paramsData) {
       this.paramsData = paramsData || {}
-      this.setTableH()
       this.getColumns()
+      this.setTableH()
       this.resetSearchForm()
     },
     setTableH () {