1004749546@qq.com %!s(int64=3) %!d(string=hai) anos
pai
achega
f664fc6299

+ 90 - 85
src/views/reportData/chainReceivedSendStorageReport/list.vue

@@ -1,103 +1,105 @@
 <template>
   <a-card size="small" :bordered="false" class="sendStorageReportList-wrap">
     <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form-model
-        id="sendStorageReportList-form"
-        ref="ruleForm"
-        :model="queryParam"
-        :rules="rules"
-        :labelCol="labelCol"
-        :wrapperCol="wrapperCol"
-        @keyup.enter.native="handleSearch" >
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="连锁店" prop="targetName">
-              <a-select
-                placeholder="请选择连锁店"
-                id="sendStorageReportList-targetName"
-                allowClear
-                v-model="queryParam.targetName"
-                :showSearch="true"
-                option-filter-prop="children"
-                :filter-option="filterOption">
-                <a-select-option v-for="item in allocateTypeList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="日期" prop="date">
-              <rangeDate ref="rangeDate" v-model="queryParam.date" @change="dateChange" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="产品编码">
-              <a-input id="sendStorageReportList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
-            </a-form-model-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="table-page-search-wrapper">
+        <a-form-model
+          id="sendStorageReportList-form"
+          ref="ruleForm"
+          :model="queryParam"
+          :rules="rules"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          @keyup.enter.native="handleSearch" >
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="产品名称">
-                <a-input id="sendStorageReportList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="产品品牌">
+              <a-form-model-item label="连锁店" prop="targetName">
                 <a-select
-                  placeholder="请选择产品品牌"
-                  id="sendStorageReportList-productBrandSn"
+                  placeholder="请选择连锁店"
+                  id="sendStorageReportList-targetName"
                   allowClear
-                  v-model="queryParam.productBrandSn"
+                  v-model="queryParam.targetName"
                   :showSearch="true"
                   option-filter-prop="children"
                   :filter-option="filterOption">
-                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                  <a-select-option v-for="item in allocateTypeList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
                 </a-select>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="产品分类">
-                <a-cascader
-                  @change="changeProductType"
-                  change-on-select
-                  v-model="productType"
-                  expand-trigger="hover"
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="sendStorageReportList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear />
+              <a-form-model-item label="日期" prop="date">
+                <rangeDate ref="rangeDate" v-model="queryParam.date" @change="dateChange" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品编码">
+                <a-input id="sendStorageReportList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
               </a-form-model-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="sendStorageReportList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="sendStorageReportList-reset">重置</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 8px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form-model>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :defaultLoadData="false"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 2390 }"
-      bordered>
-      <template slot="footer" slot-scope="currentPageData">
-        <span>
-          合计: 期初数量:{{ totalData.beginQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期初金额:{{ totalData.beginAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入数量:{{ totalData.putQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入金额:{{ totalData.putAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 发出数量:{{ totalData.outQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  发出金额:{{ totalData.outAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算数量:{{ totalData.endQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算金额:{{ totalData.endAmount || '--' }}
-        </span>
-      </template>
-    </s-table>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="产品名称">
+                  <a-input id="sendStorageReportList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="产品品牌">
+                  <a-select
+                    placeholder="请选择产品品牌"
+                    id="sendStorageReportList-productBrandSn"
+                    allowClear
+                    v-model="queryParam.productBrandSn"
+                    :showSearch="true"
+                    option-filter-prop="children"
+                    :filter-option="filterOption">
+                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="产品分类">
+                  <a-cascader
+                    @change="changeProductType"
+                    change-on-select
+                    v-model="productType"
+                    expand-trigger="hover"
+                    :options="productTypeList"
+                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                    id="sendStorageReportList-productType"
+                    placeholder="请选择产品分类"
+                    allowClear />
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="sendStorageReportList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="sendStorageReportList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 8px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :defaultLoadData="false"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 2390 }"
+        bordered>
+        <template slot="footer" slot-scope="currentPageData">
+          <span>
+            合计: 期初数量:{{ totalData.beginQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期初金额:{{ totalData.beginAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入数量:{{ totalData.putQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入金额:{{ totalData.putAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 发出数量:{{ totalData.outQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  发出金额:{{ totalData.outAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算数量:{{ totalData.endQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算金额:{{ totalData.endAmount || '--' }}
+          </span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -111,6 +113,7 @@ export default {
   components: { STable, VSelect, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -208,6 +211,7 @@ export default {
       loadData: parameter => {
 		  if (this.queryParam.beginDate && this.queryParam.targetName) {
 			  this.disabled = true
+			  this.spinning = true
 			  const params = {
 			    beginDate: this.queryParam.beginDate,
 			    endDate: this.queryParam.endDate,
@@ -229,6 +233,7 @@ export default {
 			      data.list[i].no = no + i + 1
 			  	  }
 			  	  this.disabled = false
+				  this.spinning = false
 			  	  return data
 			  })
 		  } else {

+ 81 - 76
src/views/reportData/receivedSendStorageReport/list.vue

@@ -1,88 +1,90 @@
 <template>
   <a-card size="small" :bordered="false" class="chainStockReportList-wrap">
     <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form-model
-        id="chainStockReportList-form"
-        ref="ruleForm"
-        :model="queryParam"
-        :rules="rules"
-        :labelCol="labelCol"
-        :wrapperCol="wrapperCol"
-        @keyup.enter.native="handleSearch" >
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="日期" prop="date">
-              <rangeDate ref="rangeDate" v-model="queryParam.date" @change="dateChange" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="产品编码">
-              <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="产品名称">
-              <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
-            </a-form-model-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="table-page-search-wrapper">
+        <a-form-model
+          id="chainStockReportList-form"
+          ref="ruleForm"
+          :model="queryParam"
+          :rules="rules"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          @keyup.enter.native="handleSearch" >
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="产品品牌">
-                <a-select
-                  placeholder="请选择产品品牌"
-                  id="productInfoList-productBrandSn"
-                  allowClear
-                  v-model="queryParam.productBrandSn"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
-                </a-select>
+              <a-form-model-item label="日期" prop="date">
+                <rangeDate ref="rangeDate" v-model="queryParam.date" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="产品分类">
-                <a-cascader
-                  @change="changeProductType"
-                  change-on-select
-                  v-model="productType"
-                  expand-trigger="hover"
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="productInfoList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear />
+              <a-form-model-item label="产品编码">
+                <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
               </a-form-model-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainStockReportList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainStockReportList-reset">重置</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 8px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form-model>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1170 }"
-      bordered>
-      <template slot="footer" slot-scope="currentPageData">
-        <span>
-          合计: 期初数量:{{ totalData.beginQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期初金额:{{ totalData.beginAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入数量:{{ totalData.putQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入金额:{{ totalData.putAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 发出数量:{{ totalData.outQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  发出金额:{{ totalData.outAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算数量:{{ totalData.endQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算金额:{{ totalData.endAmount || '--' }}
-        </span>
-      </template>
-    </s-table>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="产品品牌">
+                  <a-select
+                    placeholder="请选择产品品牌"
+                    id="productInfoList-productBrandSn"
+                    allowClear
+                    v-model="queryParam.productBrandSn"
+                    :showSearch="true"
+                    option-filter-prop="children"
+                    :filter-option="filterOption">
+                    <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="产品分类">
+                  <a-cascader
+                    @change="changeProductType"
+                    change-on-select
+                    v-model="productType"
+                    expand-trigger="hover"
+                    :options="productTypeList"
+                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                    id="productInfoList-productType"
+                    placeholder="请选择产品分类"
+                    allowClear />
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="chainStockReportList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="chainStockReportList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 8px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1170 }"
+        bordered>
+        <template slot="footer" slot-scope="currentPageData">
+          <span>
+            合计: 期初数量:{{ totalData.beginQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期初金额:{{ totalData.beginAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入数量:{{ totalData.putQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入金额:{{ totalData.putAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 发出数量:{{ totalData.outQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  发出金额:{{ totalData.outAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算数量:{{ totalData.endQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算金额:{{ totalData.endAmount || '--' }}
+          </span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -99,6 +101,7 @@ export default {
   data () {
     return {
       advanced: false, // 高级搜索 展开/关闭
+	  spinning: false,
       tableHeight: 0,
       queryParam: { //  查询条件
         beginDate: '',
@@ -193,6 +196,7 @@ export default {
       loadData: parameter => {
         if (this.queryParam.beginDate) {
           this.disabled = true
+		  this.spinning = true
           const params = {
             beginDate: this.queryParam.beginDate,
             endDate: this.queryParam.endDate,
@@ -213,6 +217,7 @@ export default {
               data.list[i].no = no + i + 1
             }
             this.disabled = false
+            this.spinning = false
             return data
           })
         } else {