Browse Source

Merge branch 'develop_yh21' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh21

lilei 1 năm trước cách đây
mục cha
commit
8099161b23
1 tập tin đã thay đổi với 20 bổ sung22 xóa
  1. 20 22
      src/views/salesManagement/salesOrderWarehouse/list.vue

+ 20 - 22
src/views/salesManagement/salesOrderWarehouse/list.vue

@@ -38,11 +38,11 @@
             </a-col>
             <a-col :md="6" :sm="24" v-show="isShowWarehouse">
               <a-form-model-item label="出库仓库">
-                <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn" :isPermission="true"></chooseWarehouse>
+                <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesOrderWarehouseList-refresh">查询</a-button>
+              <a-button type="primary" @click="setSearch" :disabled="disabled" id="salesOrderWarehouseList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesOrderWarehouseList-reset">重置</a-button>
               <a-button
                 style="margin-left: 10px"
@@ -121,6 +121,16 @@ export default {
         shippingAddrProvinceSn: undefined,
         warehouseSn: undefined
       },
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售单号', scopedSlots: { customRender: 'stockOutNo' }, width: '10%', align: 'center' },
+        { title: '提交时间', dataIndex: 'submitDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '出库仓库', dataIndex: 'warehouseName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总数量', dataIndex: 'totalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
       exportLoading: false,
       disabled: false, //  查询、重置按钮是否可操作
       loading: false,
@@ -148,27 +158,15 @@ export default {
       }
     }
   },
-  computed: {
-    isShowWarehouse () {
-      return this.$store.state.app.isWarehouse
-    },
-    columns () {
-      const arr = [
-        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', scopedSlots: { customRender: 'stockOutNo' }, width: '10%', align: 'center' },
-        { title: '提交时间', dataIndex: 'submitDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '总数量', dataIndex: 'totalQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
-      ]
-	  if (this.isShowWarehouse) {
-	    arr.splice(5, 0, { title: '出库仓库', dataIndex: 'warehouseName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
-	  }
-      return arr
-    }
-  },
   methods: {
+    //  查询
+    setSearch  () {
+      if (!this.queryParam.beginDate && !this.queryParam.endDate) {
+        this.$message.error('请先选择创建时间!')
+        return
+      }
+      this.$refs.table.refresh(true)
+    },
     custChange (val) {
       this.queryParam.buyerSn = val.key
     },