瀏覽代碼

操作按钮 加载中

chenrui 3 年之前
父節點
當前提交
9807c6efa5
共有 53 個文件被更改,包括 3595 次插入3207 次删除
  1. 113 101
      src/views/allocationManagement/transferOut/list.vue
  2. 38 31
      src/views/basicData/transferTypeManagement/list.vue
  3. 61 54
      src/views/basicData/warehouse/list.vue
  4. 64 57
      src/views/basicData/warehouse/storingLocation/list.vue
  5. 31 31
      src/views/dealerManagement/dealerAccountManagement/editModal.vue
  6. 72 62
      src/views/dealerManagement/dealerAccountManagement/list.vue
  7. 4 0
      src/views/dealerManagement/dealerRelationshipBinding/list.vue
  8. 1 1
      src/views/dealerManagement/marketingDivisionSet/editModal.vue
  9. 38 31
      src/views/dealerManagement/marketingDivisionSet/list.vue
  10. 82 76
      src/views/dealerManagement/merchantInfoManagement/detailModal.vue
  11. 6 6
      src/views/dealerManagement/merchantInfoManagement/edit.vue
  12. 89 84
      src/views/dealerManagement/merchantInfoManagement/list.vue
  13. 73 62
      src/views/dealerManagement/merchantInfoManagement/permissionSetting.vue
  14. 0 1
      src/views/dealerManagement/merchantInfoManagement/updateDealerLevel.vue
  15. 132 125
      src/views/financialManagement/financialCollection/list.vue
  16. 81 74
      src/views/financialManagement/returnConfirmation/list.vue
  17. 146 99
      src/views/financialManagement/warehousingConfirmation/list.vue
  18. 14 6
      src/views/inventoryManagement/intelligentReplenishment/edit.vue
  19. 51 46
      src/views/inventoryManagement/intelligentReplenishment/import.vue
  20. 60 51
      src/views/inventoryManagement/intelligentReplenishment/list.vue
  21. 39 32
      src/views/inventoryManagement/intelligentReplenishment/productRange.vue
  22. 61 57
      src/views/inventoryManagement/intelligentReplenishment/set.vue
  23. 100 95
      src/views/inventoryManagement/inventoryQuery/list.vue
  24. 153 146
      src/views/inventoryManagement/inventoryWarning/list.vue
  25. 92 84
      src/views/power/role/roleList.vue
  26. 105 92
      src/views/power/user/userList.vue
  27. 111 106
      src/views/productManagement/priceChangeRecord/list.vue
  28. 65 58
      src/views/productManagement/productBrand/list.vue
  29. 51 45
      src/views/productManagement/productCategory/list.vue
  30. 6 6
      src/views/productManagement/productInfo/edit.vue
  31. 178 153
      src/views/productManagement/productInfo/list.vue
  32. 77 66
      src/views/productManagement/productLaunchAudit/list.vue
  33. 111 100
      src/views/productManagement/productOfflineAudit/list.vue
  34. 68 61
      src/views/productManagement/productUniversal/list.vue
  35. 6 6
      src/views/promotionRulesManagement/promotionRules/editRuleModal.vue
  36. 92 86
      src/views/promotionRulesManagement/promotionRules/list.vue
  37. 45 38
      src/views/promotionRulesManagement/promotionRules/rule.vue
  38. 78 71
      src/views/purchasingManagement/bulkWarehousingOrder/edit.vue
  39. 85 74
      src/views/purchasingManagement/bulkWarehousingOrder/list.vue
  40. 94 88
      src/views/salesManagement/examineVerify/list.vue
  41. 91 84
      src/views/salesManagement/outboundOrder/list.vue
  42. 2 5
      src/views/salesManagement/pushOrderManagement/chooseTypeModal.vue
  43. 4 0
      src/views/salesManagement/salesQuery/edit.vue
  44. 177 165
      src/views/salesManagement/salesQuery/list.vue
  45. 75 69
      src/views/salesManagement/salesReturn/detail.vue
  46. 146 136
      src/views/salesManagement/salesReturn/list.vue
  47. 6 0
      src/views/salesManagement/salesReturn/salesReturnEdit.vue
  48. 2 0
      src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue
  49. 96 91
      src/views/salesManagement/shortageStatisticsC/list.vue
  50. 76 69
      src/views/setting/noticeManagement/list.vue
  51. 95 80
      src/views/supplierManagement/associatedProduct/add.vue
  52. 0 1
      src/views/supplierManagement/supplierInfo/edit.vue
  53. 52 45
      src/views/supplierManagement/supplierInfo/list.vue

+ 113 - 101
src/views/allocationManagement/transferOut/list.vue

@@ -1,112 +1,114 @@
 <template>
   <a-card size="small" :bordered="false" class="allocateBillList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
-              <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="调往对象">
-              <a-input id="allocateBillList-targetName" v-model.trim="queryParam.targetName" allowClear placeholder="请输入调往对象"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="调拨类型">
-              <a-select id="allocateBillList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择调拨类型" allowClear >
-                <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="业务状态">
-                <v-select
-                  v-model="queryParam.state"
-                  ref="state"
-                  id="allocateBillList-state"
-                  code="ALLOCATE_STATUS"
-                  placeholder="请选择业务状态"
-                  allowClear
-                ></v-select>
+              <a-form-item label="创建时间">
+                <rangeDate ref="rangeDate" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="调拨单号">
-                <a-input id="allocateBillList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
+              <a-form-item label="调往对象">
+                <a-input id="allocateBillList-targetName" v-model.trim="queryParam.targetName" allowClear placeholder="请输入调往对象"/>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="allocateBillList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocateBillList-reset">重置</a-button>
-            <!-- <a-button
-              style="margin: 0 0 18px 5px"
-              type="primary"
-              class="button-warning"
-              @click="handleExport"
-              :disabled="disabled"
-              :loading="exportLoading"
-              id="allocateBillList-export">导出</a-button> -->
-            <a @click="advanced=!advanced" style="margin-left: 8px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="allocateBillList-add" type="primary" class="button-error" @click="openModal=true">新增</a-button>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1940, y: tableHeight }"
-      bordered>
-      <!-- 单号 -->
-      <template slot="allocateNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.allocateNo }}</span>
-      </template>
-      <!-- 财务状态 -->
-      <template slot="settleState" slot-scope="text, record">
-        <a-badge :color="text=='FINISH'?'#87d068':'gold'" :text="record.settleStateDictValue" />
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state == 'WAIT_AUDIT'"
-          class="button-warning"
-          @click="handleExamine(record)"
-          id="allocateBillList-examine-btn">审核</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT') || (record.state == 'AUDIT_REJECT')"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="allocateBillList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT') || (record.state == 'AUDIT_REJECT')"
-          class="button-error"
-          @click="handleDel(record)"
-          id="allocateBillList-del-btn">删除</a-button>
-        <span v-if="(record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT') && (record.state != 'AUDIT_REJECT')">--</span>
-      </template>
-    </s-table>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="调拨类型">
+                <a-select id="allocateBillList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择调拨类型" allowClear >
+                  <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="业务状态">
+                  <v-select
+                    v-model="queryParam.state"
+                    ref="state"
+                    id="allocateBillList-state"
+                    code="ALLOCATE_STATUS"
+                    placeholder="请选择业务状态"
+                    allowClear
+                  ></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="调拨单号">
+                  <a-input id="allocateBillList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="allocateBillList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocateBillList-reset">重置</a-button>
+              <!-- <a-button
+                style="margin: 0 0 18px 5px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="allocateBillList-export">导出</a-button> -->
+              <a @click="advanced=!advanced" style="margin-left: 8px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="allocateBillList-add" type="primary" class="button-error" @click="openModal=true">新增</a-button>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1940, y: tableHeight }"
+        bordered>
+        <!-- 单号 -->
+        <template slot="allocateNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.allocateNo }}</span>
+        </template>
+        <!-- 财务状态 -->
+        <template slot="settleState" slot-scope="text, record">
+          <a-badge :color="text=='FINISH'?'#87d068':'gold'" :text="record.settleStateDictValue" />
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_AUDIT'"
+            class="button-warning"
+            @click="handleExamine(record)"
+            id="allocateBillList-examine-btn">审核</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT') || (record.state == 'AUDIT_REJECT')"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="allocateBillList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT') || (record.state == 'AUDIT_REJECT')"
+            class="button-error"
+            @click="handleDel(record)"
+            id="allocateBillList-del-btn">删除</a-button>
+          <span v-if="(record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT') && (record.state != 'AUDIT_REJECT')">--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增 -->
     <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
     <!-- 审核 -->
@@ -126,6 +128,7 @@ export default {
   components: { STable, VSelect, basicInfoModal, rangeDate, auditModal },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -205,10 +208,14 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           allocateBillDel({ sn: row.allocateSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -222,13 +229,16 @@ export default {
     // 审核
     auditOrder (state) {
       const _this = this
+      _this.spinning = true
       allocateBillAudit({ sn: this.auditInfo.allocateSn, state: state }).then(res => {
         if (res.status == 200) {
           _this.visibleAudit = false
           _this.$message.success(res.message)
           _this.$refs.table.refresh()
+          _this.spinning = false
         } else {
           _this.visibleAudit = false
+          _this.spinning = false
         }
       })
     },
@@ -244,9 +254,11 @@ export default {
     handleExport () {
       const params = this.queryParam
       this.exportLoading = true
+      this.spinning = true
       allocateBillExport(params).then(res => {
         this.exportLoading = false
         this.download(res)
+        this.spinning = false
       })
     },
     download (data) {

+ 38 - 31
src/views/basicData/transferTypeManagement/list.vue

@@ -1,38 +1,40 @@
 <template>
   <a-card size="small" :bordered="false" class="transferTypeManagementList-wrap">
-    <!-- 操作按钮 -->
-    <div class="table-operator-nobor">
-      <a-button
-        id="transferTypeManagementList-add"
-        type="primary"
-        class="button-error"
-        @click="handleEdit()">新增</a-button>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 操作按钮 -->
+      <div class="table-operator-nobor">
         <a-button
-          size="small"
-          type="link"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="transferTypeManagementList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
+          id="transferTypeManagementList-add"
+          type="primary"
           class="button-error"
-          @click="handleDel(record)"
-          id="transferTypeManagementList-del-btn">删除</a-button>
-      </template>
-    </s-table>
+          @click="handleEdit()">新增</a-button>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="transferTypeManagementList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+            id="transferTypeManagementList-del-btn">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑 -->
     <transfer-type-management-edit-modal :openModal="openModal" :nowData="nowData" :itemSn="itemSn" @close="closeModal" />
   </a-card>
@@ -46,6 +48,7 @@ export default {
   components: { STable, VSelect, transferTypeManagementEditModal },
   data () {
     return {
+      spinning: false,
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
@@ -84,10 +87,14 @@ export default {
         content: '删除后原数据不可恢复,是否删除?',
         centered: true,
         onOk () {
+          _this.spinning = true
           allocateTypeDel({ sn: row.allocateTypeSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 61 - 54
src/views/basicData/warehouse/list.vue

@@ -1,59 +1,61 @@
 <template>
   <a-card size="small" :bordered="false" class="warehouseList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="仓库名称">
-              <a-input id="warehouseList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入仓库名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="warehouseList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="warehouseList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="warehouseList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ y: tableHeight }"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          class="button-warning"
-          @click="goStoringLocation(record)"
-          id="warehouseList-storingLocation-btn">仓位管理</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-info"
-          v-if="record.defaultFlag!='1'"
-          @click="handleEdit(record)"
-          id="warehouseList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-error"
-          v-if="record.defaultFlag!='1'"
-          @click="handleDel(record)"
-          id="warehouseList-del-btn">删除</a-button>
-      </template>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="仓库名称">
+                <a-input id="warehouseList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入仓库名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="warehouseList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="warehouseList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="warehouseList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-warning"
+            @click="goStoringLocation(record)"
+            id="warehouseList-storingLocation-btn">仓位管理</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            v-if="record.defaultFlag!='1'"
+            @click="handleEdit(record)"
+            id="warehouseList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            v-if="record.defaultFlag!='1'"
+            @click="handleDel(record)"
+            id="warehouseList-del-btn">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑仓库 -->
     <warehouse-edit-modal :openModal="openModal" :nowData="nowData" :itemSn="itemSn" @ok="handleOk" @close="closeModal" />
   </a-card>
@@ -67,6 +69,7 @@ export default {
   components: { STable, warehouseEditModal },
   data () {
     return {
+      spinning: false,
       queryParam: { //  查询条件
         name: '' //  仓库名称
       },
@@ -127,12 +130,16 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           warehouseDel({
             sn: row.warehouseSn
           }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 64 - 57
src/views/basicData/warehouse/storingLocation/list.vue

@@ -1,63 +1,65 @@
 <template>
   <div class="storingLocationList-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="storingLocationList-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="storingLocationList-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <strong style="color: rgba(0, 0, 0, 0.65);margin-left: 50px;">所属仓库:{{ $route.query.name }}</strong>
-      </template>
-    </a-page-header>
-    <a-card size="small" :bordered="false" class="storingLocationList-cont">
-      <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
-              <a-form-item label="仓位名称">
-                <a-input id="storingLocationList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入仓位名称"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storingLocationList-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storingLocationList-reset">重置</a-button>
-            </a-col>
-          </a-row>
-        </a-form>
-      </div>
-      <!-- 操作按钮 -->
-      <div class="table-operator" style="border: 0;padding: 0 0 15px;">
-        <a-button id="storingLocationList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-      </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="default"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ y: tableHeight }"
-        bordered>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-button
-            size="small"
-            type="link"
-            class="button-info"
-            v-if="record.defaultFlag!='1'"
-            @click="handleEdit(record)"
-            id="storingLocationList-edit-btn">编辑</a-button>
-          <a-button
-            size="small"
-            type="link"
-            class="button-error"
-            v-if="record.defaultFlag!='1'"
-            @click="handleDel(record)"
-            id="storingLocationList-del-btn">删除</a-button>
-          <span v-if="record.defaultFlag=='1'">--</span>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="storingLocationList-back">
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="storingLocationList-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <strong style="color: rgba(0, 0, 0, 0.65);margin-left: 50px;">所属仓库:{{ $route.query.name }}</strong>
         </template>
-      </s-table>
-    </a-card>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="storingLocationList-cont">
+        <!-- 搜索条件 -->
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="仓位名称">
+                  <a-input id="storingLocationList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入仓位名称"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storingLocationList-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storingLocationList-reset">重置</a-button>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <!-- 操作按钮 -->
+        <div class="table-operator" style="border: 0;padding: 0 0 15px;">
+          <a-button id="storingLocationList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="default"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          bordered>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              class="button-info"
+              v-if="record.defaultFlag!='1'"
+              @click="handleEdit(record)"
+              id="storingLocationList-edit-btn">编辑</a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-error"
+              v-if="record.defaultFlag!='1'"
+              @click="handleDel(record)"
+              id="storingLocationList-del-btn">删除</a-button>
+            <span v-if="record.defaultFlag=='1'">--</span>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
     <!-- 新增/编辑仓位 -->
     <storing-location-edit-modal :openModal="openModal" :nowData="nowData" :itemSn="itemSn" @ok="handleOk" @close="closeModal" />
   </div>
@@ -71,6 +73,7 @@ export default {
   components: { STable, storingLocationEditModal },
   data () {
     return {
+      spinning: false,
       tableHeight: 0,
       queryParam: { //  查询条件
         warehouseSn: this.$route.params.sn, //  仓库sn
@@ -139,12 +142,16 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           warehouseLocDel({
             sn: row.warehouseLocationSn
           }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 31 - 31
src/views/dealerManagement/dealerAccountManagement/editModal.vue

@@ -18,60 +18,60 @@
           :rules="rules"
           :label-col="formItemLayout.labelCol"
           :wrapper-col="formItemLayout.wrapperCol"
-          >
+        >
           <a-form-model-item label="经销商名称" prop="tenantSn">
             <custList ref="custList" v-if="itemId==''" id="dealerAccountEdit-tenantSn" @change="custChange"></custList>
             <span v-else>{{ detailData ? (detailData.org ? detailData.org.name : '--') : '--' }}</span>
           </a-form-model-item>
           <a-form-model-item label="管理员姓名" prop="name">
             <a-input
-            id="dealerAccountEdit-name"
-            :maxLength="30"
-            v-model.trim="form.name"
-            placeholder="请输入管理员姓名(最多30个字符)"
-            allowClear />
+              id="dealerAccountEdit-name"
+              :maxLength="30"
+              v-model.trim="form.name"
+              placeholder="请输入管理员姓名(最多30个字符)"
+              allowClear />
           </a-form-model-item>
           <a-form-model-item label="管理员手机" prop="phone">
             <a-input
-            id="dealerAccountEdit-phone"
-            :maxLength="11"
-            v-model.trim="form.phone"
-            placeholder="请输入管理员手机(最多11个字符)"
-            allowClear />
+              id="dealerAccountEdit-phone"
+              :maxLength="11"
+              v-model.trim="form.phone"
+              placeholder="请输入管理员手机(最多11个字符)"
+              allowClear />
           </a-form-model-item>
           <a-form-model-item label="管理员账号" prop="loginName">
             <a-input
-            id="dealerAccountEdit-loginName"
-            :maxLength="50"
-            v-model.trim="form.loginName"
-            placeholder="请输入管理员账号,字母/数字(最多50个字符)"
-            allowClear />
+              id="dealerAccountEdit-loginName"
+              :maxLength="50"
+              v-model.trim="form.loginName"
+              placeholder="请输入管理员账号,字母/数字(最多50个字符)"
+              allowClear />
           </a-form-model-item>
           <a-form-model-item label="管理员密码" :prop="itemId=='' ? 'password' : ''" :extra="itemId ? '说明:已录入的密码不会显示,录入新密码将会覆盖原有密码' : ''" >
             <a-input
-            id="dealerAccountEdit-password"
-            :maxLength="50"
-            type="password"
-            v-model.trim="form.password"
-            placeholder="请输入管理员密码,字母/数字(最多50个字符)"
-            allowClear />
+              id="dealerAccountEdit-password"
+              :maxLength="50"
+              type="password"
+              v-model.trim="form.password"
+              placeholder="请输入管理员密码,字母/数字(最多50个字符)"
+              allowClear />
           </a-form-model-item>
           <a-form-model-item label="最大可开通用户数" prop="org.childUserMaxNum" extra="(含管理员账号)">
             <a-input-number
-            id="dealerAccountEdit-childUserMaxNum"
-            v-model="form.org.childUserMaxNum"
-            :precision="0"
-            :min="1"
-            :max="999999"
-            placeholder="请输入数量"
-            style="width: 100%;" />
+              id="dealerAccountEdit-childUserMaxNum"
+              v-model="form.org.childUserMaxNum"
+              :precision="0"
+              :min="1"
+              :max="999999"
+              placeholder="请输入数量"
+              style="width: 100%;" />
           </a-form-model-item>
         </a-form-model>
         <div class="btn-cont">
           <a-button type="primary" id="dealerAccountEdit-save" @click="handleSave">保存</a-button>
           <a-button id="dealerAccountEdit-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
         </div>
-		  </a-spin>
+      </a-spin>
     </div>
   </a-modal>
 </template>
@@ -142,7 +142,7 @@ export default {
               _this.$emit('ok')
               _this.isShow = false
               _this.spinning = false
-            }else{
+            } else {
               _this.spinning = false
             }
           })

+ 72 - 62
src/views/dealerManagement/dealerAccountManagement/list.vue

@@ -1,67 +1,69 @@
 <template>
   <a-card size="small" :bordered="false" class="dealerAccountList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="经销商名称">
-              <a-input id="dealerAccountList-name" v-model.trim="queryParam.org.name" allowClear placeholder="请输入经销商名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="管理员账号">
-              <a-input id="dealerAccountList-loginName" v-model.trim="queryParam.loginName" allowClear placeholder="请输入管理员账号"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="账号状态">
-              <v-select code="ENABLE_FLAG" id="dealerAccountList-loginFlag" v-model="queryParam.loginFlag" allowClear placeholder="请选择账号状态"></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="dealerAccountList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="dealerAccountList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="dealerAccountList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1310, y: tableHeight }"
-      bordered>
-      <!-- 账号状态 -->
-      <template slot="loginFlag" slot-scope="text, record">
-        <a-switch
-          id="dealerAccountList-enable"
-          checkedChildren="启用"
-          unCheckedChildren="禁用"
-          @change="changeStatus(record)"
-          :checked="record.loginFlag == 1 ? true : false" />
-        <!-- <span v-else>{{ record.loginFlag==1?'已启用':'已禁用' }}</span> -->
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="dealerAccountList-edit-btn">编辑</a-button>
-        <a-button size="small" type="link" class="button-success" @click="handleDetail(record)" id="dealerAccountList-detail-btn">详情</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-warning"
-          @click="handleReset(record)"
-          id="dealerAccountList-reset-btn">重置密码</a-button>
-      </template>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="经销商名称">
+                <a-input id="dealerAccountList-name" v-model.trim="queryParam.org.name" allowClear placeholder="请输入经销商名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="管理员账号">
+                <a-input id="dealerAccountList-loginName" v-model.trim="queryParam.loginName" allowClear placeholder="请输入管理员账号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="账号状态">
+                <v-select code="ENABLE_FLAG" id="dealerAccountList-loginFlag" v-model="queryParam.loginFlag" allowClear placeholder="请选择账号状态"></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="dealerAccountList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="dealerAccountList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="dealerAccountList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1310, y: tableHeight }"
+        bordered>
+        <!-- 账号状态 -->
+        <template slot="loginFlag" slot-scope="text, record">
+          <a-switch
+            id="dealerAccountList-enable"
+            checkedChildren="启用"
+            unCheckedChildren="禁用"
+            @change="changeStatus(record)"
+            :checked="record.loginFlag == 1 ? true : false" />
+          <!-- <span v-else>{{ record.loginFlag==1?'已启用':'已禁用' }}</span> -->
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="dealerAccountList-edit-btn">编辑</a-button>
+          <a-button size="small" type="link" class="button-success" @click="handleDetail(record)" id="dealerAccountList-detail-btn">详情</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-warning"
+            @click="handleReset(record)"
+            id="dealerAccountList-reset-btn">重置密码</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑 -->
     <dealer-account-edit-modal :openModal="openModal" :nowData="nowData" :itemId="itemId" @ok="$refs.table.refresh(true)" @close="closeModal" />
     <!-- 查看 -->
@@ -78,6 +80,7 @@ export default {
   components: { STable, VSelect, dealerAccountEditModal, dealerAccountDetailModal },
   data () {
     return {
+      spinning: false,
       tableHeight: 0,
       queryParam: { //  查询条件
         org: {
@@ -159,10 +162,14 @@ export default {
         content: '重置密码后,新的密码会以短信形式发送到【管理员手机】,确定要重置吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           dealerUserResetP({ id: row.id }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -174,12 +181,15 @@ export default {
         id: record.id,
         flag: record.loginFlag == 1 ? '0' : '1'
       }
+      this.spinning = true
       dealerUserEnable(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$refs.table.refresh()
+          this.spinning = false
         } else {
           this.$refs.table.refresh()
+          this.spinning = false
         }
       })
     }

+ 4 - 0
src/views/dealerManagement/dealerRelationshipBinding/list.vue

@@ -215,10 +215,14 @@ export default {
         content: '确认要解除上下级的关系吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           unbindRelation({ subDealerSn: row.dealerSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.addItemOk()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 1 - 1
src/views/dealerManagement/marketingDivisionSet/editModal.vue

@@ -309,7 +309,7 @@ export default {
 <style lang="less">
   .marketingDivisionSetEdit-modal{
     .ant-modal-body {
-    	padding: 40px 40px 24px;
+      padding: 40px 40px 24px;
     }
     .btn-cont {
       text-align: center;

+ 38 - 31
src/views/dealerManagement/marketingDivisionSet/list.vue

@@ -1,36 +1,38 @@
 <template>
   <a-card size="small" :bordered="false" class="marketingDivisionSetList-wrap">
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="marketingDivisionSetList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :showPagination="false"
-      :data="loadData"
-      bordered>
-      <!-- 市区 -->
-      <template slot="cityArea" slot-scope="text, record">
-        <div style="display: inline-block;margin-right: 15px;" v-for="item in record.subareaAreaList" :key="item.id">
-          {{ item.areaName }}
-          <span v-if="item.citySubareaAreaList">(</span>
-          <span style="color: #999;margin:0 3px;" v-for="area in item.citySubareaAreaList" :key="area.id">
-            {{ area.areaName }}
-          </span>
-          <span v-if="item.citySubareaAreaList">)</span>
-        </div>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="marketingDivisionSetList-edit-btn">编辑</a-button>
-        <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="marketingDivisionSetList-del-btn">删除</a-button>
-      </template>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="marketingDivisionSetList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :showPagination="false"
+        :data="loadData"
+        bordered>
+        <!-- 市区 -->
+        <template slot="cityArea" slot-scope="text, record">
+          <div style="display: inline-block;margin-right: 15px;" v-for="item in record.subareaAreaList" :key="item.id">
+            {{ item.areaName }}
+            <span v-if="item.citySubareaAreaList">(</span>
+            <span style="color: #999;margin:0 3px;" v-for="area in item.citySubareaAreaList" :key="area.id">
+              {{ area.areaName }}
+            </span>
+            <span v-if="item.citySubareaAreaList">)</span>
+          </div>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="marketingDivisionSetList-edit-btn">编辑</a-button>
+          <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="marketingDivisionSetList-del-btn">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 编辑分区 -->
     <marketing-division-set-edit-modal :nowData="nowData" :openModal="openModal" :itemId="itemId" @ok="$refs.table.refresh()" @close="closeModal" />
   </a-card>
@@ -44,6 +46,7 @@ export default {
   components: { STable, VSelect, marketingDivisionSetEditModal },
   data () {
     return {
+      spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
@@ -82,10 +85,14 @@ export default {
         content: '确认要删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           subareaDeleteBySn({ sn: row.subareaSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 82 - 76
src/views/dealerManagement/merchantInfoManagement/detailModal.vue

@@ -8,83 +8,85 @@
     v-model="isShow"
     @cancle="isShow=false"
     :width="960">
-    <div v-if="form">
-      <a-collapse :activeKey="['1','2','3']" class="merchantInfoManagement-cont-m">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="2" bordered size="small">
-            <a-descriptions-item label="经销商名称">{{ form.dealerName || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="经销商别名">{{ form.dealerAlias || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="商户类型">{{ form.dealerTypeDictValue || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="联系人1">{{ form.contact || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="联系手机1">{{ form.contactMobile || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="联系角色1">{{ form.contactRole || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="联系电话">{{ form.dealerTelephone || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="地址">
-              <span v-if="form.provinceName || form.cityName || form.districtName || form.address">{{ form.provinceName }}{{ form.cityName }}{{ form.districtName }}{{ form.address }}</span>
-              <span v-else>--</span>
-            </a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-      <a-collapse class="merchantInfoManagement-cont-m">
-        <a-collapse-panel key="2" header="公司信息">
-          <a-descriptions :column="2" bordered size="small">
-            <a-descriptions-item label="经营方式">{{ form.busniessMode || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="经营项目">{{ form.busniessItmes || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="公司规模">{{ form.busniessScope || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="成立时间">{{ form.buildDate || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="一般纳税人">
-              <span v-if="form.isTaxpayer">{{ form.isTaxpayer == 1 ? '是':'否' }}</span>
-              <span v-else>--</span>
-            </a-descriptions-item>
-            <a-descriptions-item label="身份证号码">{{ form.indentityCard || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="生日">{{ form.brithday || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="籍贯">{{ form.nativePlace || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="邮箱">{{ form.mail || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="联系人2">{{ form.contact2 || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="联系角色2">{{ form.contractRole2 || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="联系手机2">{{ form.contactMobile2 || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="邮政编码">{{ form.zipCode || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="收货人">{{ form.receiveContact || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="收货人电话">{{ form.receiveMobile || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="收货地址">
-              <span v-if="form.receiveProvinceName || form.receiveCityName || form.receiveDistrictName || form.receiveAddress">{{ form.receiveProvinceName }}{{ form.receiveCityName }}{{ form.receiveDistrictName }}{{ form.receiveAddress }}</span>
-              <span v-else>--</span>
-            </a-descriptions-item>
-            <a-descriptions-item label="银行账户">{{ form.tradeAccountName || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="开户行">{{ form.tradeBankName || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="银行账号">{{ form.tradeBankAccount || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-      <a-collapse class="merchantInfoManagement-cont-m">
-        <a-collapse-panel key="3" header="总部信息">
-          <a-descriptions :column="2" bordered size="small">
-            <a-descriptions-item label="箭冠汽配代码">{{ form.jgAutoPartsCode || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="门头更换日期">{{ form.jgDoorHeaderChangeTime || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="特约价是否可见">
-              <span v-if="form.isShowSpecialPrice">{{ form.isShowSpecialPrice == 1 ? '是':'否' }}</span>
-              <span v-else>--</span>
-            </a-descriptions-item>
-            <a-descriptions-item label="备注">{{ form.remark || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-      <div class="btn-cont">
-        <a-button
-          id="merchantInfoManagement-audit"
-          size="large"
-          v-if="isAudit"
-          type="primary"
-          class="button-primary"
-          style="margin-right: 50px;"
-          @click="visibleAudit=true">审核</a-button>
-        <a-button id="merchantInfoManagement-back" size="large" @click="isShow = false" style="font-size: 12px;">返回列表</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div v-if="form">
+        <a-collapse :activeKey="['1','2','3']" class="merchantInfoManagement-cont-m">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="2" bordered size="small">
+              <a-descriptions-item label="经销商名称">{{ form.dealerName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="经销商别名">{{ form.dealerAlias || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="商户类型">{{ form.dealerTypeDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="联系人1">{{ form.contact || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="联系手机1">{{ form.contactMobile || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="联系角色1">{{ form.contactRole || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="联系电话">{{ form.dealerTelephone || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="地址">
+                <span v-if="form.provinceName || form.cityName || form.districtName || form.address">{{ form.provinceName }}{{ form.cityName }}{{ form.districtName }}{{ form.address }}</span>
+                <span v-else>--</span>
+              </a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+        <a-collapse class="merchantInfoManagement-cont-m">
+          <a-collapse-panel key="2" header="公司信息">
+            <a-descriptions :column="2" bordered size="small">
+              <a-descriptions-item label="经营方式">{{ form.busniessMode || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="经营项目">{{ form.busniessItmes || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="公司规模">{{ form.busniessScope || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="成立时间">{{ form.buildDate || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="一般纳税人">
+                <span v-if="form.isTaxpayer">{{ form.isTaxpayer == 1 ? '是':'否' }}</span>
+                <span v-else>--</span>
+              </a-descriptions-item>
+              <a-descriptions-item label="身份证号码">{{ form.indentityCard || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="生日">{{ form.brithday || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="籍贯">{{ form.nativePlace || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="邮箱">{{ form.mail || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="联系人2">{{ form.contact2 || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="联系角色2">{{ form.contractRole2 || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="联系手机2">{{ form.contactMobile2 || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="邮政编码">{{ form.zipCode || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货人">{{ form.receiveContact || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货人电话">{{ form.receiveMobile || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货地址">
+                <span v-if="form.receiveProvinceName || form.receiveCityName || form.receiveDistrictName || form.receiveAddress">{{ form.receiveProvinceName }}{{ form.receiveCityName }}{{ form.receiveDistrictName }}{{ form.receiveAddress }}</span>
+                <span v-else>--</span>
+              </a-descriptions-item>
+              <a-descriptions-item label="银行账户">{{ form.tradeAccountName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="开户行">{{ form.tradeBankName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="银行账号">{{ form.tradeBankAccount || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+        <a-collapse class="merchantInfoManagement-cont-m">
+          <a-collapse-panel key="3" header="总部信息">
+            <a-descriptions :column="2" bordered size="small">
+              <a-descriptions-item label="箭冠汽配代码">{{ form.jgAutoPartsCode || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="门头更换日期">{{ form.jgDoorHeaderChangeTime || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="特约价是否可见">
+                <span v-if="form.isShowSpecialPrice">{{ form.isShowSpecialPrice == 1 ? '是':'否' }}</span>
+                <span v-else>--</span>
+              </a-descriptions-item>
+              <a-descriptions-item label="备注">{{ form.remark || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+        <div class="btn-cont">
+          <a-button
+            id="merchantInfoManagement-audit"
+            size="large"
+            v-if="isAudit"
+            type="primary"
+            class="button-primary"
+            style="margin-right: 50px;"
+            @click="visibleAudit=true">审核</a-button>
+          <a-button id="merchantInfoManagement-back" size="large" @click="isShow = false" style="font-size: 12px;">返回列表</a-button>
+        </div>
       </div>
-    </div>
-    <div style="padding: 50px;text-align: center;" v-else>
-      <a-spin />
-    </div>
+      <div style="padding: 50px;text-align: center;" v-else>
+        <a-spin />
+      </div>
+    </a-spin>
     <!-- 审核 -->
     <auditModal :openModal="visibleAudit" @close="visibleAudit=false" @ok="auditOrder('PASS')" @fail="auditOrder('REJECT')" />
   </a-modal>
@@ -109,6 +111,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       form: null,
       title: '',
@@ -118,6 +121,7 @@ export default {
   methods: {
     // 审核
     auditOrder (auditState) {
+      this.spinning = true
       dealerAudit({
         dealerAuditSn: this.form.dealerAuditSn,
         auditState: auditState
@@ -126,8 +130,10 @@ export default {
           this.visibleAudit = false
           this.$message.success(res.message)
           this.$emit('ok')
+          this.spinning = false
         } else {
           this.visibleAudit = false
+          this.spinning = false
         }
       })
     },

+ 6 - 6
src/views/dealerManagement/merchantInfoManagement/edit.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="merchantInfoManagementEdit-wrap">
-    <a-page-header :ghost="false" :backIcon="false" @back="handleBack" class="merchantInfoManagementEdit-cont">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="merchantInfoManagement-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-    </a-page-header>
     <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" @back="handleBack" class="merchantInfoManagementEdit-cont">
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="merchantInfoManagement-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        </template>
+      </a-page-header>
       <a-form-model
         id="merchantInfoManagementEdit-form"
         ref="ruleForm"

+ 89 - 84
src/views/dealerManagement/merchantInfoManagement/list.vue

@@ -1,93 +1,95 @@
 <template>
   <a-card size="small" :bordered="false" class="merchantInfoManagementList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="区域">
-              <subarea id="merchantInfoManagementList-subarea" v-model="queryParam.subareaSn"></subarea>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="商户名称/别名">
-              <a-input id="merchantInfoManagementList-nameLike" v-model.trim="queryParam.nameLike" allowClear placeholder="请输入商户名称/别名"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="商户类型">
-              <v-select code="DEALER_TYPE" id="merchantInfoManagementList-dealerType" v-model="queryParam.dealerType" allowClear placeholder="请选择商户类型"></v-select>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="审核状态">
-                <v-select code="AUDIT_STATE" id="merchantInfoManagementList-auditState" v-model="queryParam.auditState" allowClear placeholder="请选择审核状态"></v-select>
+              <a-form-item label="区域">
+                <subarea id="merchantInfoManagementList-subarea" v-model="queryParam.subareaSn"></subarea>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="合作状态">
-                <v-select code="DEALER_COOPERATE_FLAG" id="merchantInfoManagementList-cooperateFlag" v-model="queryParam.cooperateFlag" allowClear placeholder="请选择合作状态"></v-select>
+              <a-form-item label="商户名称/别名">
+                <a-input id="merchantInfoManagementList-nameLike" v-model.trim="queryParam.nameLike" allowClear placeholder="请输入商户名称/别名"/>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="merchantInfoManagementList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 5px" @click="resetSearchForm" :disabled="disabled" id="merchantInfoManagementList-reset">重置</a-button>
-            <a-button
-              style="margin-left: 5px"
-              type="primary"
-              class="button-warning"
-              @click="handleExport"
-              :disabled="disabled"
-              :loading="exportLoading"
-              id="merchantInfoManagementList-export">导出</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 8px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="merchantInfoManagementList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
-    </div>
-    <!-- 总计 -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">合计:<strong>{{ total }}</strong>条</div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 2240, y: tableHeight }"
-      bordered>
-      <!-- 经销商 -->
-      <template slot="dealerName" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.dealerName }}</span>
-      </template>
-      <!-- 区域 -->
-      <template slot="area" slot-scope="text, record">
-        <div v-if="record.subareaNameSet&&record.subareaNameSet.length!=0">
-          <span v-for="(item, index) in record.subareaNameSet" :key="index">{{ item }}{{ index+1 == record.subareaNameSet.length ? '' : ',' }}</span>
-        </div>
-        <span v-else>--</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" class="button-warning" v-if="record.auditState == 'WAIT'" @click="handleAudit(record)" >审核</a-button>
-        <a-button size="small" type="link" class="button-success" @click="handleCooperation(record)" >合作设置</a-button>
-        <a-button size="small" type="link" class="button-error" v-if="record.auditState != 'WAIT'" @click="handleDistribution(record)">经销权</a-button>
-        <a-button size="small" type="link" class="button-primary" @click="handleLevel(record)">级别设置</a-button>
-        <a-button size="small" type="link" class="button-info" @click="handleEdit(record)">编辑</a-button>
-      </template>
-    </s-table>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="商户类型">
+                <v-select code="DEALER_TYPE" id="merchantInfoManagementList-dealerType" v-model="queryParam.dealerType" allowClear placeholder="请选择商户类型"></v-select>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="审核状态">
+                  <v-select code="AUDIT_STATE" id="merchantInfoManagementList-auditState" v-model="queryParam.auditState" allowClear placeholder="请选择审核状态"></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="合作状态">
+                  <v-select code="DEALER_COOPERATE_FLAG" id="merchantInfoManagementList-cooperateFlag" v-model="queryParam.cooperateFlag" allowClear placeholder="请选择合作状态"></v-select>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="merchantInfoManagementList-refresh">查询</a-button>
+              <a-button style="margin: 0 0 18px 5px" @click="resetSearchForm" :disabled="disabled" id="merchantInfoManagementList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 5px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="merchantInfoManagementList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 8px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="merchantInfoManagementList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
+      </div>
+      <!-- 总计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">合计:<strong>{{ total }}</strong>条</div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 2240, y: tableHeight }"
+        bordered>
+        <!-- 经销商 -->
+        <template slot="dealerName" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.dealerName }}</span>
+        </template>
+        <!-- 区域 -->
+        <template slot="area" slot-scope="text, record">
+          <div v-if="record.subareaNameSet&&record.subareaNameSet.length!=0">
+            <span v-for="(item, index) in record.subareaNameSet" :key="index">{{ item }}{{ index+1 == record.subareaNameSet.length ? '' : ',' }}</span>
+          </div>
+          <span v-else>--</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button size="small" type="link" class="button-warning" v-if="record.auditState == 'WAIT'" @click="handleAudit(record)" >审核</a-button>
+          <a-button size="small" type="link" class="button-success" @click="handleCooperation(record)" >合作设置</a-button>
+          <a-button size="small" type="link" class="button-error" v-if="record.auditState != 'WAIT'" @click="handleDistribution(record)">经销权</a-button>
+          <a-button size="small" type="link" class="button-primary" @click="handleLevel(record)">级别设置</a-button>
+          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)">编辑</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 产品详情 -->
     <merchant-info-management-detail-modal :openModal="openModal" :isAudit="isAudit" :itemId="itemId" @ok="resetForm" @close="closeModal" />
     <!-- 合作设置 -->
@@ -109,6 +111,7 @@ export default {
   components: { STable, VSelect, merchantInfoManagementDetailModal, subarea, UpdateCooperate, UpdateDealerLeve },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -193,13 +196,13 @@ export default {
     },
     // 合作设置
     handleCooperation (row) {
-      this.openUcModal = true
       this.$refs.updateCooperate.setData(row)
+      this.openUcModal = true
     },
     // 价格级别
     handleLevel (row) {
-      this.openUdModal = true
       this.$refs.updateDealerLevel.setData(row)
+      this.openUdModal = true
     },
     // 经销权
     handleDistribution (row) {
@@ -227,8 +230,10 @@ export default {
       const _this = this
       const params = this.queryParam
       this.exportLoading = true
+      _this.spinning = true
       dealerExport(params).then(res => {
         this.exportLoading = false
+        _this.spinning = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 73 - 62
src/views/dealerManagement/merchantInfoManagement/permissionSetting.vue

@@ -1,68 +1,70 @@
 <template>
   <div class="permissionSetting-wrap">
-    <a-page-header :ghost="false" :backIcon="false" @back="handleBack" class="permissionSetting-cont">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="permissionSetting-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-    </a-page-header>
-    <a-card size="small" :bordered="false" class="permissionSetting-main">
-      <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
-        <a-form-model
-          id="permissionSetting-form"
-          ref="ruleForm"
-          :model="queryParam"
-          :rules="rules"
-          layout="inline"
-          @keyup.enter.native="handleSearch">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="类型" prop="goodsType">
-                <v-select code="DEALER_GOODS_TYPE" id="permissionSetting-goodsType" v-model="queryParam.goodsType" allowClear placeholder="请选择类型"></v-select>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="类型名称" prop="goodsName">
-                <a-input id="permissionSetting-goodsName" v-model.trim="queryParam.goodsName" allowClear placeholder="请输入类型名称"/>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="产品编码" prop="goodsCode">
-                <a-input id="permissionSetting-goodsCode" v-model.trim="queryParam.goodsCode" allowClear placeholder="请输入产品编码"/>
-              </a-form-model-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-button style="margin-bottom: 18px;" type="primary" @click="handleSearch" :disabled="disabled" id="permissionSetting-refresh">查询</a-button>
-              <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="permissionSetting-reset">重置</a-button>
-            </a-col>
-          </a-row>
-        </a-form-model>
-      </div>
-      <!-- 操作按钮 -->
-      <div class="table-operator">
-        <a-button id="permissionSetting-brand" type="primary" class="button-error" @click="choosePModal('BRAND')">选择产品品牌</a-button>
-        <a-button id="permissionSetting-type" type="primary" class="button-info" @click="choosePModal('CATEGORY')">选择产品分类</a-button>
-        <a-button id="permissionSetting-product" type="primary" class="button-success" @click="choosePModal('PRODUCT')">选择产品</a-button>
-      </div>
-      <!-- 列表 -->
-      <a-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data-source="loadData"
-        :pagination="paginationProps"
-        :loading="loading"
-        :scroll="{ x: 1200, y: tableHeight }"
-        bordered>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-button size="small" type="link" class="button-error" @click="handleDel(record)">删除</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" @back="handleBack" class="permissionSetting-cont">
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="permissionSetting-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         </template>
-      </a-table>
-    </a-card>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="permissionSetting-main">
+        <!-- 搜索条件 -->
+        <div class="table-page-search-wrapper">
+          <a-form-model
+            id="permissionSetting-form"
+            ref="ruleForm"
+            :model="queryParam"
+            :rules="rules"
+            layout="inline"
+            @keyup.enter.native="handleSearch">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="类型" prop="goodsType">
+                  <v-select code="DEALER_GOODS_TYPE" id="permissionSetting-goodsType" v-model="queryParam.goodsType" allowClear placeholder="请选择类型"></v-select>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="类型名称" prop="goodsName">
+                  <a-input id="permissionSetting-goodsName" v-model.trim="queryParam.goodsName" allowClear placeholder="请输入类型名称"/>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="产品编码" prop="goodsCode">
+                  <a-input id="permissionSetting-goodsCode" v-model.trim="queryParam.goodsCode" allowClear placeholder="请输入产品编码"/>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-button style="margin-bottom: 18px;" type="primary" @click="handleSearch" :disabled="disabled" id="permissionSetting-refresh">查询</a-button>
+                <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="permissionSetting-reset">重置</a-button>
+              </a-col>
+            </a-row>
+          </a-form-model>
+        </div>
+        <!-- 操作按钮 -->
+        <div class="table-operator">
+          <a-button id="permissionSetting-brand" type="primary" class="button-error" @click="choosePModal('BRAND')">选择产品品牌</a-button>
+          <a-button id="permissionSetting-type" type="primary" class="button-info" @click="choosePModal('CATEGORY')">选择产品分类</a-button>
+          <a-button id="permissionSetting-product" type="primary" class="button-success" @click="choosePModal('PRODUCT')">选择产品</a-button>
+        </div>
+        <!-- 列表 -->
+        <a-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data-source="loadData"
+          :pagination="paginationProps"
+          :loading="loading"
+          :scroll="{ x: 1200, y: tableHeight }"
+          bordered>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button size="small" type="link" class="button-error" @click="handleDel(record)">删除</a-button>
+          </template>
+        </a-table>
+      </a-card>
+    </a-spin>
     <!-- 选择产品品牌 -->
     <chooseBrandModal :openModal="openBrandModal" :chooseData="chooseBrand" @close="openBrandModal=false" @ok="handleBrandOk" />
     <!-- 选择产品分类 -->
@@ -88,6 +90,7 @@ export default {
   components: { STable, VSelect, ChooseProductsModal, ChooseBrandModal, ChooseTypeModal },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -266,10 +269,14 @@ export default {
         goodsType: type,
         goodsSnList: snList
       }
+      _this.spinning = true
       dealerScopeSave(params).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
           _this.getProductList(1)
+          _this.spinning = false
+        } else {
+          _this.spinning = false
         }
       })
     },
@@ -281,10 +288,14 @@ export default {
         content: '确认要删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           dealerScopeDel({ sn: row.dealerScopeSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.getProductList()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 0 - 1
src/views/dealerManagement/merchantInfoManagement/updateDealerLevel.vue

@@ -71,7 +71,6 @@ export default {
       this.form.dealerName = row.dealerName
       this.form.dealerLevel = row.dealerLevel
       this.dealerLevelBak = row.dealerLevel
-      console.log(row, this.dealerLevelBak)
     },
     onSubmit () {
       const _this = this

+ 132 - 125
src/views/financialManagement/financialCollection/list.vue

@@ -1,143 +1,145 @@
 <template>
   <a-card size="small" :bordered="false" class="financialCollectionList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="审核时间">
-              <rangeDate ref="rangeAuditDate" :value="auditDate" @change="dateAuditChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="经销商名称">
-              <a-input id="financialCollectionList-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入经销商名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="商户级别">
-              <v-select
-                v-model="queryParam.dealerLevel"
-                ref="dealerLevel"
-                id="financialCollectionList-dealerLevel"
-                code="DEALER_LEVEL"
-                placeholder="请选择商户级别"
-                allowClear></v-select>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+	  <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="收款方式">
-                <v-select
-                  v-model="queryParam.settleStyleSn"
-                  ref="settleStyleSn"
-                  id="financialCollectionList-settleStyleSn"
-                  code="SETTLE_STYLE"
-                  placeholder="请选择收款方式"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="区域">
-                <subarea id="financialCollectionList-subarea" v-model="queryParam.subareaSn"></subarea>
+              <a-form-item label="审核时间">
+                <rangeDate ref="rangeAuditDate" :value="auditDate" @change="dateAuditChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="业务状态">
-                <v-select
-                  v-model="queryParam.billStatus"
-                  ref="billStatus"
-                  id="financialCollectionList-billStatus"
-                  code="SALES_RECEIVE_LIST_STATUS"
-                  placeholder="请选择业务状态"
-                  allowClear></v-select>
+              <a-form-item label="经销商名称">
+                <a-input id="financialCollectionList-buyerName" v-model.trim="queryParam.buyerName" allowClear placeholder="请输入经销商名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="财务状态">
+              <a-form-item label="商户级别">
                 <v-select
-                  v-model="queryParam.financialStatus"
-                  ref="financialStatus"
-                  id="financialCollectionList-financialStatus"
-                  code="FINANCIAL_RECEIVE_STATUS"
-                  placeholder="请选择财务状态"
+                  v-model="queryParam.dealerLevel"
+                  ref="dealerLevel"
+                  id="financialCollectionList-dealerLevel"
+                  code="DEALER_LEVEL"
+                  placeholder="请选择商户级别"
                   allowClear></v-select>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="收款时间">
-                <rangeDate ref="rangeSettleDate" @change="dateSettleChange" />
-              </a-form-item>
-            </a-col>
-            <a-col :md="12" :sm="24">
-              <a-row>
-                <a-form-item label="经销商地区">
-                  <a-col span="7">
-                    <a-form-item prop="dealerProvinceSn" style="margin: 0;">
-                      <a-select v-model="queryParam.dealerProvinceSn" @change="getCityList" placeholder="请选择省">
-                        <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </a-col>
-                  <a-col span="7" offset="1">
-                    <a-form-item prop="dealerCitySn" style="margin: 0;">
-                      <a-select v-model="queryParam.dealerCitySn" @change="getAreaList" placeholder="请选择市">
-                        <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </a-col>
-                  <a-col span="7" offset="1">
-                    <a-form-item prop="dealerCountySn" style="margin: 0;">
-                      <a-select v-model="queryParam.dealerCountySn" placeholder="请选择区/县">
-                        <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-                      </a-select>
-                    </a-form-item>
-                  </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="收款方式">
+                  <v-select
+                    v-model="queryParam.settleStyleSn"
+                    ref="settleStyleSn"
+                    id="financialCollectionList-settleStyleSn"
+                    code="SETTLE_STYLE"
+                    placeholder="请选择收款方式"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="区域">
+                  <subarea id="financialCollectionList-subarea" v-model="queryParam.subareaSn"></subarea>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="业务状态">
+                  <v-select
+                    v-model="queryParam.billStatus"
+                    ref="billStatus"
+                    id="financialCollectionList-billStatus"
+                    code="SALES_RECEIVE_LIST_STATUS"
+                    placeholder="请选择业务状态"
+                    allowClear></v-select>
                 </a-form-item>
-              </a-row>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="财务状态">
+                  <v-select
+                    v-model="queryParam.financialStatus"
+                    ref="financialStatus"
+                    id="financialCollectionList-financialStatus"
+                    code="FINANCIAL_RECEIVE_STATUS"
+                    placeholder="请选择财务状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="收款时间">
+                  <rangeDate ref="rangeSettleDate" @change="dateSettleChange" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="12" :sm="24">
+                <a-row>
+                  <a-form-item label="经销商地区">
+                    <a-col span="7">
+                      <a-form-item prop="dealerProvinceSn" style="margin: 0;">
+                        <a-select v-model="queryParam.dealerProvinceSn" @change="getCityList" placeholder="请选择省">
+                          <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
+                        </a-select>
+                      </a-form-item>
+                    </a-col>
+                    <a-col span="7" offset="1">
+                      <a-form-item prop="dealerCitySn" style="margin: 0;">
+                        <a-select v-model="queryParam.dealerCitySn" @change="getAreaList" placeholder="请选择市">
+                          <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
+                        </a-select>
+                      </a-form-item>
+                    </a-col>
+                    <a-col span="7" offset="1">
+                      <a-form-item prop="dealerCountySn" style="margin: 0;">
+                        <a-select v-model="queryParam.dealerCountySn" placeholder="请选择区/县">
+                          <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+                        </a-select>
+                      </a-form-item>
+                    </a-col>
+                  </a-form-item>
+                </a-row>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="financialCollectionList-refresh">查询</a-button>
+              <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="financialCollectionList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 8px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="financialCollectionList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="financialCollectionList-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>
-    </div>
-    <!-- 总计 -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">合计:<strong>{{ total }}</strong>条</div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1820, y: tableHeight }"
-      bordered>
-      <!-- 单号 -->
-      <template slot="salesBillNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.financialStatus=='WAIT'"
-          class="button-warning"
-          @click="handleAudit(record)"
-          id="financialCollectionList-audit-btn">收款</a-button>
-        <span v-else>--</span>
-      </template>
-    </s-table>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 总计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">合计:<strong>{{ total }}</strong>条</div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1820, y: tableHeight }"
+        bordered>
+        <!-- 单号 -->
+        <template slot="salesBillNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.financialStatus=='WAIT'"
+            class="button-warning"
+            @click="handleAudit(record)"
+            id="financialCollectionList-audit-btn">收款</a-button>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -153,6 +155,7 @@ export default {
   components: { STable, VSelect, subarea, rangeDate },
   data () {
     return {
+      spinning: false,
       queryParam: { //  查询条件
         beginAuditDate: getDate.getThreeMonthDays().starttime,
         endAuditDate: getDate.getCurrMonthDays().endtime,
@@ -257,10 +260,14 @@ export default {
         content: '确认要收款吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           salesReceipt({ sn: row.salesBillSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            }else{
+              _this.spinning = false
             }
           })
         }

+ 81 - 74
src/views/financialManagement/returnConfirmation/list.vue

@@ -1,85 +1,87 @@
 <template>
   <a-card size="small" :bordered="false" class="returnConfirmationList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
-              <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-              <custList ref="custList" id="returnConfirmationList-buyerSn" @change="custChange"></custList>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="销退单号">
-              <a-input id="returnConfirmationList-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入销退单号"/>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+	  <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="是否抓单">
-                <v-select
-                  v-model="queryParam.grabFlag"
-                  ref="grabFlag"
-                  id="returnConfirmationList-grabFlag"
-                  code="FLAG"
-                  placeholder="请选择"
-                  allowClear></v-select>
+              <a-form-item label="创建时间">
+                <rangeDate ref="rangeDate" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="状态">
-                <v-select
-                  v-model="queryParam.billStatus"
-                  ref="billStatus"
-                  id="returnConfirmationList-billStatus"
-                  code="SALES_RETURN_CONFIRM_STATUS"
-                  placeholder="请选择状态"
-                  allowClear></v-select>
+              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                <custList ref="custList" id="returnConfirmationList-buyerSn" @change="custChange"></custList>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="returnConfirmationList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="returnConfirmationList-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>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1460, y: tableHeight }"
-      bordered>
-      <!-- 销退单号 -->
-      <template slot="salesReturnBillNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesReturnBillNo }}</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.billStatus=='WAIT_FINANCIAL_AUDIT'"
-          class="button-warning"
-          @click="handleAudit(record)"
-          id="returnConfirmationList-audit-btn">退货确认</a-button>
-        <span v-else>--</span>
-      </template>
-    </s-table>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="销退单号">
+                <a-input id="returnConfirmationList-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入销退单号"/>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="是否抓单">
+                  <v-select
+                    v-model="queryParam.grabFlag"
+                    ref="grabFlag"
+                    id="returnConfirmationList-grabFlag"
+                    code="FLAG"
+                    placeholder="请选择"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="状态">
+                  <v-select
+                    v-model="queryParam.billStatus"
+                    ref="billStatus"
+                    id="returnConfirmationList-billStatus"
+                    code="SALES_RETURN_CONFIRM_STATUS"
+                    placeholder="请选择状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="returnConfirmationList-refresh">查询</a-button>
+              <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="returnConfirmationList-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>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1460, y: tableHeight }"
+        bordered>
+        <!-- 销退单号 -->
+        <template slot="salesReturnBillNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesReturnBillNo }}</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.billStatus=='WAIT_FINANCIAL_AUDIT'"
+            class="button-warning"
+            @click="handleAudit(record)"
+            id="returnConfirmationList-audit-btn">退货确认</a-button>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 查看 -->
     <confirmation-detail-modal :openModal="openModal" :itemSn="itemSn" @close="closeModal" />
   </a-card>
@@ -95,6 +97,7 @@ export default {
   components: { STable, VSelect, confirmationDetailModal, custList, rangeDate },
   data () {
     return {
+      spinning: false,
       queryParam: { //  查询条件
         beginDate: '',
         endDate: '',
@@ -192,10 +195,14 @@ export default {
     },
     auditOrder (sn, flag) {
       const _this = this
+      _this.spinning = true
       salesReturnFinancial({ salesReturnBillSn: sn, billStatus: flag }).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
           _this.$refs.table.refresh()
+          _this.spinning = false
+        }else{
+          _this.spinning = false
         }
       })
     }

+ 146 - 99
src/views/financialManagement/warehousingConfirmation/list.vue

@@ -1,67 +1,90 @@
 <template>
   <a-card size="small" :bordered="false" class="warehousingConfirmationList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="入库单号">
-              <a-input id="warehousingConfirmationList-stockPutNo" v-model.trim="queryParam.stockPutNo" allowClear placeholder="请输入入库单号"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="单据状态">
-              <v-select
-                v-model="queryParam.auditState"
-                ref="auditState"
-                id="warehousingConfirmationList-auditState"
-                code="PUT_CONFIRM_STATE"
-                placeholder="请选择单据状态"
-                allowClear></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="warehousingConfirmationList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="warehousingConfirmationList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 列表 -->
-    <div style="margin-bottom: 15px">
-      <a-button type="primary" id="warehousingConfirmationList-export" :loading="loading" @click="handleBatchAudit">批量确认</a-button>
-      <span style="margin-left: 8px">
-        <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
-      </span>
-    </div>
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :row-selection="rowSelection"
-      :rowKey="(record) => record.stockPutSn"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1530, y: tableHeight }"
-      bordered>
-      <!-- 入库单号 -->
-      <template slot="stockPutNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.stockPutNo }}</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.auditState=='WAIT'"
-          class="button-warning"
-          @click="handleAudit(record)"
-          id="warehousingConfirmationList-audit-btn">入库确认</a-button>
-        <span v-else>--</span>
-      </template>
-    </s-table>
+	  <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="入库单号">
+                <a-input id="warehousingConfirmationList-stockPutNo" v-model.trim="queryParam.stockPutNo" allowClear placeholder="请输入入库单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="单据状态">
+                <v-select
+                  v-model="queryParam.auditState"
+                  ref="auditState"
+                  id="warehousingConfirmationList-auditState"
+                  code="PUT_CONFIRM_STATE"
+                  placeholder="请选择单据状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="warehousingConfirmationList-refresh">查询</a-button>
+              <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="warehousingConfirmationList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <div style="margin-bottom: 15px">
+        <a-button type="primary" id="warehousingConfirmationList-export" :loading="loading" @click="handleBatchAudit">批量确认</a-button>
+        <span style="margin-left: 8px">
+          <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+        </span>
+      </div>
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :row-selection="rowSelection"
+        :rowKey="(record) => record.stockPutSn"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1530, y: tableHeight }"
+        bordered>
+        <!-- 入库单号 -->
+        <template slot="stockPutNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.stockPutNo }}</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.auditState=='WAIT'"
+            class="button-warning"
+            @click="handleAudit(record)"
+            id="warehousingConfirmationList-audit-btn">入库确认</a-button>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 查看 -->
     <confirmation-detail-modal :openModal="openModal" :itemSn="itemSn" :nowData="nowData" @close="closeModal" />
+    <!-- 入库确认 -->
+    <a-modal
+      centered
+      class="confirmation-modal"
+      :footer="null"
+      :maskClosable="false"
+      v-model="confirmationModal"
+      @cancle="confirmationModal=false"
+      :width="416">
+      <div class="confirmation-main">
+        <a-icon type="question-circle" style="color: #faad14;font-size: 22px;margin-right: 16px;" />
+        <div class="confirmation-cont">
+          <p class="confirmation-tit">提示</p>
+          <p class="confirmation-txt">请点击下方按钮确认操作?</p>
+        </div>
+      </div>
+      <div class="btn-box">
+        <a-button type="primary" class="button-error" @click="handleConfirmationFail">不通过</a-button>
+        <a-button type="primary" class="button-info" @click="handleConfirmationOk">通过</a-button>
+      </div>
+    </a-modal>
   </a-card>
 </template>
 
@@ -73,6 +96,7 @@ export default {
   components: { STable, VSelect, confirmationDetailModal },
   data () {
     return {
+      spinning: false,
       queryParam: { //  查询条件
         stockPutNo: '', //  入库单号
         auditState: undefined //  状态
@@ -107,7 +131,10 @@ export default {
       },
       openModal: false,
       itemSn: '',
-      nowData: null
+      nowData: null,
+      confirmationModal: false,
+      confirmationInfo: null,
+      isBatch: false
     }
   },
   computed: {
@@ -138,7 +165,6 @@ export default {
     },
     // 详情
     handleDetail (row) {
-      console.log(row)
       this.itemSn = row.stockPutSn
       this.nowData = row
       this.openModal = true
@@ -148,42 +174,50 @@ export default {
       this.nowData = null
       this.openModal = false
     },
+    // 通过
+    handleConfirmationOk(){
+      if(this.isBatch){  //  批量
+        this.auditOrder(this.selectedRowKeys, true)
+      }else{
+        this.auditOrder([this.confirmationInfo.stockPutSn], true)
+      }
+    },
+    // 不通过
+    handleConfirmationFail(){
+      if(this.isBatch){  //  批量
+        this.auditOrder(this.selectedRowKeys, false)
+      }else{
+        this.auditOrder([this.confirmationInfo.stockPutSn], false)
+      }
+    },
     // 单个审核
     handleAudit (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '请点击下方按钮确认操作',
-        centered: true,
-        okText: '通过',
-        cancelText: '不通过',
-        onOk () {
-          _this.auditOrder([row.stockPutSn], true)
-        },
-        onCancel (e) {
-          if (!e.triggerCancel) {
-            _this.auditOrder([row.stockPutSn], false)
-          }
-          _this.$destroyAll()
-        }
-      })
+      this.confirmationInfo = row
+      this.isBatch = false
+      this.confirmationModal = true
     },
-    auditOrder (snList, flag, isBatch) {
+    auditOrder (snList, flag) {
       const _this = this
-      if (isBatch) {
+      if (this.isBatch) {
         _this.loading = true
       }
+      _this.spinning = true
       stockPutConfirm({ stockPutSnList: snList, confirm: flag }).then(res => {
-        if (isBatch) {
+        if (this.isBatch) {
           _this.loading = false
         }
         if (res.status == 200) {
-          if (isBatch) {
+          if (this.isBatch) {
             _this.selectedRowKeys = []
             _this.selectedRows = []
           }
           _this.$message.success(res.message)
           _this.$refs.table.refresh()
+          _this.confirmationModal = false
+          _this.spinning = false
+        }else{
+          _this.confirmationModal = false
+          _this.spinning = false
         }
       })
     },
@@ -194,22 +228,8 @@ export default {
         _this.$message.warning('请在列表勾选后再进行批量操作!')
         return
       }
-      this.$confirm({
-        title: '提示',
-        content: '请点击下方按钮批量确认操作',
-        centered: true,
-        okText: '通过',
-        cancelText: '不通过',
-        onOk () {
-          _this.auditOrder(_this.selectedRowKeys, true, 'isBatch')
-        },
-        onCancel (e) {
-          if (!e.triggerCancel) {
-            _this.auditOrder(_this.selectedRowKeys, false, 'isBatch')
-          }
-          _this.$destroyAll()
-        }
-      })
+      this.isBatch = true
+      this.confirmationModal = true
     },
     onSelectChange (selectedRowKeys) {
       console.log('selectedRowKeys changed: ', selectedRowKeys)
@@ -225,4 +245,31 @@ export default {
       margin-top: 20px;
     }
   }
+  .confirmation-modal{
+    .ant-modal-body{
+      padding: 32px 32px 24px;
+    }
+    .confirmation-main{
+      display: flex;
+      .confirmation-cont{
+        .confirmation-tit{
+          color: rgba(0, 0, 0, 0.85);
+          font-weight: 500;
+          font-size: 16px;
+          line-height: 1.4;
+          margin: 0;
+        }
+        .confirmation-txt{
+          margin: 8px 0 0;
+          color: rgba(0, 0, 0, 0.65);
+          font-size: 14px;
+          line-height: 1.5;
+        }
+      }
+    }
+    .btn-box{
+      text-align: right;
+      margin-top: 24px;
+    }
+  }
 </style>

+ 14 - 6
src/views/inventoryManagement/intelligentReplenishment/edit.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="intelligentReplenishmentEdit-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="intelligentReplenishmentEdit-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="intelligentReplenishmentEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-    </a-page-header>
     <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="intelligentReplenishmentEdit-back">
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="intelligentReplenishmentEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        </template>
+      </a-page-header>
       <a-card size="small" :bordered="false" class="intelligentReplenishmentEdit-cont">
         <div class="steps-cont">
           <a-steps :current="current" size="small">
@@ -167,17 +167,25 @@ export default {
     },
     // 保存
     handleSave (params) {
+      this.spinning = true
       predictSave(params).then(res => {
         if (res.status == 200) {
           this.current++
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     },
     // 计算
     handleRun (params) {
+      this.spinning = true
       predictRun(params).then(res => {
         if (res.status == 200) {
           this.current++
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     },

+ 51 - 46
src/views/inventoryManagement/intelligentReplenishment/import.vue

@@ -1,52 +1,54 @@
 <template>
   <div class="intelligentReplenishmentImport-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="intelligentReplenishmentImport-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="intelligentReplenishmentImport-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-    </a-page-header>
-    <a-card :bordered="false" class="intelligentReplenishmentImport-cont">
-      <div>
-        <p class="total">共 <span>{{ listData.length }}</span> 条数据,红色字体表示数据不符合规范,请返回上一步修改文件后重新上传</p>
-        <s-table
-          class="sTable"
-          ref="table"
-          size="small"
-          :rowKey="(record) => record.id"
-          :columns="columns"
-          :data="loadData"
-          :scroll="{ x: 1440 }"
-          :rowClassName="(record, index) => record.cost ? 'redBg-row':''"
-          :showPagination="false"
-          bordered>
-        </s-table>
-        <div class="btn-cont">
-          <a-button
-            type="primary"
-            v-if="errorFlag.indexOf('1')==-1"
-            id="intelligentReplenishmentLevel-submit"
-            size="large"
-            class="button-primary"
-            @click="handleSubmit"
-            style="padding: 0 60px;">确认导入</a-button>
-          <a-button
-            type="primary"
-            v-if="errorFlag.indexOf('1')!=-1"
-            id="intelligentReplenishmentLevel-set"
-            size="large"
-            class="button-primary"
-            @click="handleBackSet"
-            style="padding: 0 60px;">上一步</a-button>
-          <a-button
-            id="intelligentReplenishmentLevel-back"
-            size="large"
-            class="button-cancel"
-            @click="handleBack"
-            style="padding: 0 60px;">取消</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="intelligentReplenishmentImport-back">
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="intelligentReplenishmentImport-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        </template>
+      </a-page-header>
+      <a-card :bordered="false" class="intelligentReplenishmentImport-cont">
+        <div>
+          <p class="total">共 <span>{{ listData.length }}</span> 条数据,红色字体表示数据不符合规范,请返回上一步修改文件后重新上传</p>
+          <s-table
+            class="sTable"
+            ref="table"
+            size="small"
+            :rowKey="(record) => record.id"
+            :columns="columns"
+            :data="loadData"
+            :scroll="{ x: 1440 }"
+            :rowClassName="(record, index) => record.cost ? 'redBg-row':''"
+            :showPagination="false"
+            bordered>
+          </s-table>
+          <div class="btn-cont">
+            <a-button
+              type="primary"
+              v-if="errorFlag.indexOf('1')==-1"
+              id="intelligentReplenishmentLevel-submit"
+              size="large"
+              class="button-primary"
+              @click="handleSubmit"
+              style="padding: 0 60px;">确认导入</a-button>
+            <a-button
+              type="primary"
+              v-if="errorFlag.indexOf('1')!=-1"
+              id="intelligentReplenishmentLevel-set"
+              size="large"
+              class="button-primary"
+              @click="handleBackSet"
+              style="padding: 0 60px;">上一步</a-button>
+            <a-button
+              id="intelligentReplenishmentLevel-back"
+              size="large"
+              class="button-cancel"
+              @click="handleBack"
+              style="padding: 0 60px;">取消</a-button>
+          </div>
         </div>
-      </div>
-    </a-card>
+      </a-card>
+    </a-spin>
   </div>
 </template>
 
@@ -57,6 +59,7 @@ export default {
   components: { STable },
   data () {
     return {
+      spinning: false,
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
@@ -96,7 +99,9 @@ export default {
     // 确认导入
     handleSubmit () {
       const _this = this
+      _this.spinning = true
       predictProductInfoInsert(this.listData).then(res => {
+        _this.spinning = false
         if (res.status == 200) {
           _this.$success({
             content: '数据导入成功!',

+ 60 - 51
src/views/inventoryManagement/intelligentReplenishment/list.vue

@@ -1,56 +1,58 @@
 <template>
   <a-card size="small" :bordered="false" class="intelligentReplenishmentList-wrap">
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="intelligentReplenishmentList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-      <a-button id="intelligentReplenishmentList-set" type="primary" class="button-warning" @click="handleSet">基础信息设置</a-button>
-    </div>
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">为保证系统性能,仅保留最近10次的预测结果</div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :showPagination="false"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          class="button-info"
-          v-if="record.state == 'WAIT'"
-          @click="handleEdit(record)"
-          id="intelligentReplenishmentList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-error"
-          v-if="record.state == 'WAIT'"
-          @click="handleDel(record)"
-          id="intelligentReplenishmentList-del-btn">删除</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-success"
-          v-if="record.state != 'WAIT'"
-          @click="handleDetail(record)"
-          id="customerManagementList-detail-btn">详情</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-warning"
-          :loading="downloadLoading"
-          v-if="record.state == 'FINISH'"
-          @click="handleDownload(record)"
-          id="chainTransferInList-download-btn">结果下载</a-button>
-      </template>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="intelligentReplenishmentList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+        <a-button id="intelligentReplenishmentList-set" type="primary" class="button-warning" @click="handleSet">基础信息设置</a-button>
+      </div>
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">为保证系统性能,仅保留最近10次的预测结果</div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :showPagination="false"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            v-if="record.state == 'WAIT'"
+            @click="handleEdit(record)"
+            id="intelligentReplenishmentList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            v-if="record.state == 'WAIT'"
+            @click="handleDel(record)"
+            id="intelligentReplenishmentList-del-btn">删除</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-success"
+            v-if="record.state != 'WAIT'"
+            @click="handleDetail(record)"
+            id="customerManagementList-detail-btn">详情</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-warning"
+            :loading="downloadLoading"
+            v-if="record.state == 'FINISH'"
+            @click="handleDownload(record)"
+            id="chainTransferInList-download-btn">结果下载</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 详情 -->
     <intelligent-replenishment-detail-modal :openModal="openDetailModal" :itemSn="itemSn" @close="closeModal" />
   </a-card>
@@ -65,6 +67,7 @@ export default {
   components: { STable, VSelect, intelligentReplenishmentDetailModal },
   data () {
     return {
+      spinning: false,
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
@@ -93,7 +96,9 @@ export default {
       if (row) { //  编辑
         this.$router.push({ path: `/inventoryManagement/intelligentReplenishment/edit/${row.stockPredictSn}` })
       } else { //  新增
+        this.spinning = true
         predictSave({}).then(res => {
+          this.spinning = false
           if (res.status == 200) {
             this.$router.push({ path: `/inventoryManagement/intelligentReplenishment/add/${res.data.stockPredictSn}` })
           }
@@ -117,10 +122,14 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           predictDel({ sn: row.stockPredictSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 39 - 32
src/views/inventoryManagement/intelligentReplenishment/productRange.vue

@@ -1,37 +1,39 @@
 <template>
   <div class="productRange-wrap">
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="productRange-brand" type="primary" class="button-error" @click="choosePModal('PRODUCT_BRAND')">选择产品品牌</a-button>
-      <a-button id="productRange-type" type="primary" class="button-info" @click="choosePModal('PRODUCT_TYPE')">选择产品分类</a-button>
-      <a-button id="productRange-product" type="primary" class="button-success" @click="choosePModal('SUPPLIER')">选择供应商</a-button>
-    </div>
-    <!-- 选择产品品牌 -->
-    <chooseBrandModal :openModal="openBrandModal" :chooseData="chooseBrand" @close="openBrandModal=false" @ok="handleBrandOk" />
-    <!-- 选择产品分类 -->
-    <chooseTypeModal :openModal="openTypeModal" :chooseData="chooseType" @close="openTypeModal=false" @ok="handleTypeOk" />
-    <!-- 选择供应商 -->
-    <chooseSupplierModal :openModal="openSupplierModal" :chooseData="chooseSupplier" @close="openSupplierModal=false" @ok="handleSupplierOk" />
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :showPagination="false"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          class="button-error"
-          @click="handleDel(record)"
-          id="productRange-del-btn">删除</a-button>
-      </template>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="productRange-brand" type="primary" class="button-error" @click="choosePModal('PRODUCT_BRAND')">选择产品品牌</a-button>
+        <a-button id="productRange-type" type="primary" class="button-info" @click="choosePModal('PRODUCT_TYPE')">选择产品分类</a-button>
+        <a-button id="productRange-product" type="primary" class="button-success" @click="choosePModal('SUPPLIER')">选择供应商</a-button>
+      </div>
+      <!-- 选择产品品牌 -->
+      <chooseBrandModal :openModal="openBrandModal" :chooseData="chooseBrand" @close="openBrandModal=false" @ok="handleBrandOk" />
+      <!-- 选择产品分类 -->
+      <chooseTypeModal :openModal="openTypeModal" :chooseData="chooseType" @close="openTypeModal=false" @ok="handleTypeOk" />
+      <!-- 选择供应商 -->
+      <chooseSupplierModal :openModal="openSupplierModal" :chooseData="chooseSupplier" @close="openSupplierModal=false" @ok="handleSupplierOk" />
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :showPagination="false"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+            id="productRange-del-btn">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
   </div>
 </template>
 
@@ -51,6 +53,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       openBrandModal: false, //  选择产品品牌
       openTypeModal: false, //  选择产品分类
       openSupplierModal: false, //  选择供应商
@@ -163,10 +166,14 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           predictRangeDel({ stockPredictSn: row.stockPredictSn, rangeDataSn: row.rangeDataSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 61 - 57
src/views/inventoryManagement/intelligentReplenishment/set.vue

@@ -1,65 +1,67 @@
 <template>
   <div class="intelligentReplenishmentSet-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="intelligentReplenishmentSet-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="intelligentReplenishmentSet-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-    </a-page-header>
-    <a-card size="small" :bordered="false" class="intelligentReplenishmentSet-cont">
-      <div class="importGuide-con">
-        <div class="explain-con">
-          <div class="explain-item">
-            <div class="explain-tit">
-              <span>1</span>准备导入
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="intelligentReplenishmentSet-back">
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="intelligentReplenishmentSet-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        </template>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="intelligentReplenishmentSet-cont">
+        <div class="importGuide-con">
+          <div class="explain-con">
+            <div class="explain-item">
+              <div class="explain-tit">
+                <span>1</span>准备导入
+              </div>
+              <p>所有允许导入的数据字段请参考模板,数据字段不符合规则,整条不予以导入。</p>
+              <ul>
+                <li>1) 下载导入模板得到的excel中,是目前系统中全部的产品信息,请修改变化的字段(该行的其他字段保持不变),并删除没有变化的行</li>
+                <li>2) “产品编码”字段为必填项</li>
+                <li>3) “订货周期”字段只能输入正整数,如果没有订货周期,保持为空即可</li>
+                <li>4) “是否淘汰”字段,如果确定淘汰,则输入“是”,如果不淘汰,则不需要输入,保持为空即可</li>
+                <li>5) “淘汰描述”字段,只有当是否淘汰为“是”时,才能录入淘汰描述,否则,淘汰描述只能保持为空</li>
+              </ul>
+              <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
             </div>
-            <p>所有允许导入的数据字段请参考模板,数据字段不符合规则,整条不予以导入。</p>
-            <ul>
-              <li>1) 下载导入模板得到的excel中,是目前系统中全部的产品信息,请修改变化的字段(该行的其他字段保持不变),并删除没有变化的行</li>
-              <li>2) “产品编码”字段为必填项</li>
-              <li>3) “订货周期”字段只能输入正整数,如果没有订货周期,保持为空即可</li>
-              <li>4) “是否淘汰”字段,如果确定淘汰,则输入“是”,如果不淘汰,则不需要输入,保持为空即可</li>
-              <li>5) “淘汰描述”字段,只有当是否淘汰为“是”时,才能录入淘汰描述,否则,淘汰描述只能保持为空</li>
-            </ul>
-            <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载导入模板</a-button>
-          </div>
-          <div class="explain-item">
-            <div class="explain-tit">
-              <span>2</span>上传数据文件
+            <div class="explain-item">
+              <div class="explain-tit">
+                <span>2</span>上传数据文件
+              </div>
+              <p>目前支持的文件类型*.xls,*.xlsx.</p>
+              <p>
+                <Upload
+                  id="importGuide-attachList"
+                  ref="importUpload"
+                  :maxNums="1"
+                  fileType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
+                  uploadType="import"
+                  :action="attachAction"
+                  :uploadParams="uploadParams"
+                  upText="添加文件"
+                  @change="changeImport"></Upload>
+              </p>
             </div>
-            <p>目前支持的文件类型*.xls,*.xlsx.</p>
-            <p>
-              <Upload
-                id="importGuide-attachList"
-                ref="importUpload"
-                :maxNums="1"
-                fileType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
-                uploadType="import"
-                :action="attachAction"
-                :uploadParams="uploadParams"
-                upText="添加文件"
-                @change="changeImport"></Upload>
-            </p>
+          </div>
+          <!-- 按钮 -->
+          <div class="btn-con">
+            <a-button
+              type="primary"
+              id="importGuide-nextStep"
+              size="large"
+              class="button-primary"
+              @click="handlerNextStep"
+              style="padding: 0 60px;">下一步</a-button>
+            <a-button
+              id="importGuide-cancel"
+              size="large"
+              class="button-cancel"
+              @click="handleBack"
+              style="padding: 0 60px;margin-left: 15px;">取消</a-button>
           </div>
         </div>
-        <!-- 按钮 -->
-        <div class="btn-con">
-          <a-button
-            type="primary"
-            id="importGuide-nextStep"
-            size="large"
-            class="button-primary"
-            @click="handlerNextStep"
-            style="padding: 0 60px;">下一步</a-button>
-          <a-button
-            id="importGuide-cancel"
-            size="large"
-            class="button-cancel"
-            @click="handleBack"
-            style="padding: 0 60px;margin-left: 15px;">取消</a-button>
-        </div>
-      </div>
-    </a-card>
+      </a-card>
+    </a-spin>
   </div>
 </template>
 
@@ -72,7 +74,7 @@ export default {
   components: { Upload },
   data () {
     return {
-      // filePath: 'http://jg-ocs.oss-cn-beijing.aliyuncs.com/templ/promo/normal_product_templ.xlsx',
+      spinning: false,
       filePath: 'javascript:;',
       attachAction: process.env.VUE_APP_API_BASE_URL + '/upload',
       paramsData: null,
@@ -102,7 +104,9 @@ export default {
     //  导出
     handleExport () {
       const _this = this
+      _this.spinning = true
       predictProductInfoExport({}).then(res => {
+        _this.spinning = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 100 - 95
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -1,108 +1,110 @@
 <template>
   <a-card size="small" :bordered="false" class="inventoryQueryList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品编码">
-              <a-input id="inventoryQueryList-productCode" v-model="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="原厂编码">
-              <a-input id="inventoryQueryList-productOrigCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入原厂编码"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="5" :sm="24">
-            <a-form-item label="产品名称">
-              <a-input id="inventoryQueryList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品品牌">
-                <a-select
-                  placeholder="请选择产品品牌"
-                  id="inventoryQueryList-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-item label="产品编码">
+                <a-input id="inventoryQueryList-productCode" v-model="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品分类">
-                <a-cascader
-                  @change="changeProductType"
-                  expand-trigger="hover"
-                  change-on-select
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="inventoryQueryList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear
-                  v-model="productType" />
+              <a-form-item label="原厂编码">
+                <a-input id="inventoryQueryList-productOrigCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入原厂编码"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="库存情况">
-                <a-select placeholder="请选择库存情况" id="inventoryQueryList-zeroQtyFlag" allowClear v-model="queryParam.zeroQtyFlag">
-                  <a-select-option v-for="item in zeroQtyData" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
-                </a-select>
+            <a-col :md="5" :sm="24">
+              <a-form-item label="产品名称">
+                <a-input id="inventoryQueryList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="7" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryList-reset">重置</a-button>
-            <a-button
-              type="primary"
-              style="margin-left: 5px"
-              class="button-warning"
-              @click="handleExport"
-              :disabled="disabled"
-              :loading="exportLoading"
-              id="inventoryQueryList-export">导出</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 合计 -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div class="ftext" slot="message">现有库存总数量(个):<strong>{{ stockQty }}</strong>;现有库存总成本(¥):<strong>{{ stockCost }}</strong>。</div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1450, y: tableHeight }"
-      bordered>
-      <!-- 现有库存数量 -->
-      <template slot="currentStockQty" slot-scope="text, record">
-        {{ (record.currentStockQty + record.freezeQty) || 0 }}
-        <span v-if="record.freezeQty">(冻结{{ record.freezeQty }})</span>
-      </template>
-      <template slot="currentStockCost" slot-scope="text, record">
-        {{ ((Number(record.currentStockCost)*1000 + Number(record.freezeCost)*1000)/1000).toFixed(2) || 0 }}
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" class="button-success" @click="goDetail(record)" id="inventoryQueryList-detail-btn">库存详情</a-button>
-        <a-button size="small" type="link" class="button-warning" @click="goWarehouseDetail(record)" id="inventoryQueryList-warehouseDetail-btn">出入库明细</a-button>
-      </template>
-    </s-table>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品品牌">
+                  <a-select
+                    placeholder="请选择产品品牌"
+                    id="inventoryQueryList-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-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品分类">
+                  <a-cascader
+                    @change="changeProductType"
+                    expand-trigger="hover"
+                    change-on-select
+                    :options="productTypeList"
+                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                    id="inventoryQueryList-productType"
+                    placeholder="请选择产品分类"
+                    allowClear
+                    v-model="productType" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="库存情况">
+                  <a-select placeholder="请选择库存情况" id="inventoryQueryList-zeroQtyFlag" allowClear v-model="queryParam.zeroQtyFlag">
+                    <a-select-option v-for="item in zeroQtyData" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="7" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryQueryList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryQueryList-reset">重置</a-button>
+              <a-button
+                type="primary"
+                style="margin-left: 5px"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="inventoryQueryList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 合计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div class="ftext" slot="message">现有库存总数量(个):<strong>{{ stockQty }}</strong>;现有库存总成本(¥):<strong>{{ stockCost }}</strong>。</div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1450, y: tableHeight }"
+        bordered>
+        <!-- 现有库存数量 -->
+        <template slot="currentStockQty" slot-scope="text, record">
+          {{ (record.currentStockQty + record.freezeQty) || 0 }}
+          <span v-if="record.freezeQty">(冻结{{ record.freezeQty }})</span>
+        </template>
+        <template slot="currentStockCost" slot-scope="text, record">
+          {{ ((Number(record.currentStockCost)*1000 + Number(record.freezeCost)*1000)/1000).toFixed(2) || 0 }}
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button size="small" type="link" class="button-success" @click="goDetail(record)" id="inventoryQueryList-detail-btn">库存详情</a-button>
+          <a-button size="small" type="link" class="button-warning" @click="goWarehouseDetail(record)" id="inventoryQueryList-warehouseDetail-btn">出入库明细</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 库存详情 -->
     <inventory-query-detail-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
   </a-card>
@@ -119,6 +121,7 @@ export default {
   components: { STable, VSelect, inventoryQueryDetailModal },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -246,8 +249,10 @@ export default {
       const _this = this
       const params = this.queryParam
       this.exportLoading = true
+      _this.spinning = true
       stockExport(params).then(res => {
         this.exportLoading = false
+        _this.spinning = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 153 - 146
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -1,160 +1,162 @@
 <template>
   <a-card size="small" :bordered="false" class="inventoryWarningList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="pageInit(1)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品编码">
-              <a-input id="inventoryWarningList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="原厂编码">
-              <a-input id="inventoryWarningList-productOrigCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入原厂编码"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品名称">
-              <a-input id="inventoryWarningList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="pageInit(1)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品品牌">
-                <a-select
-                  placeholder="请选择产品品牌"
-                  id="inventoryWarningList-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-item label="产品编码">
+                <a-input id="inventoryWarningList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-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="inventoryWarningList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear />
+              <a-form-item label="原厂编码">
+                <a-input id="inventoryWarningList-productOrigCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入原厂编码"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="预警提示">
-                <v-select
-                  v-model="queryParam.stockState"
-                  ref="stockState"
-                  id="inventoryWarningList-stockState"
-                  code="STOCK_WARN_TIP"
-                  placeholder="请选择预警提示"
-                  allowClear
-                ></v-select>
+              <a-form-item label="产品名称">
+                <a-input id="inventoryWarningList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="pageInit(1)" :disabled="disabled" id="inventoryWarningList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryWarningList-reset">重置</a-button>
-            <!-- <a-button
-              style="margin-left: 8px"
-              type="danger"
-              @click="handleExport"
-              :disabled="disabled"
-              :loading="exportLoading"
-              id="inventoryWarningList-export">导出</a-button> -->
-            <a @click="advanced=!advanced" style="margin-left: 8px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button type="primary" id="inventoryWarningList-update" :loading="loading" @click="handleupdate">批量更新</a-button>
-      <span style="margin-left: 8px">
-        <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
-      </span>
-    </div>
-    <!-- 列表 -->
-    <a-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :dataSource="loadData"
-      :scroll="{ x: 2220, y: tableHeight }"
-      :pagination="paginationProps"
-      :loading="tableLoading"
-      bordered>
-      <!-- 产品分类 -->
-      <template slot="productType" slot-scope="text, record">
-        <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 实时库存数 -->
-      <template slot="stockQty" slot-scope="text, record">
-        {{ record.currentStockQty + record.freezeQty }}
-        <span v-if="record.freezeQty">(冻结{{ record.freezeQty }})</span>
-      </template>
-      <!-- 预警提示 -->
-      <template slot="stockState" slot-scope="text, record">
-        <span v-if="record.stockStateDictValue" :class="[record.stockState=='OVERFLOW'?'yellow':record.stockState=='NOT_ENOUGH'?'red':record.stockState=='LACK'?'blue':record.stockState=='NORMAL'?'green':'']">{{ record.stockStateDictValue }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 在途数 -->
-      <template slot="inTransit" slot-scope="text, record" >
-        <div>
-          <a-input-number
-            id="inventoryWarningList-inTransit"
-            v-model="record.inTransit"
-            :precision="0"
-            :min="0"
-            :max="999999"
-            placeholder="请输入在途数" />
-        </div>
-      </template>
-      <!-- 最大库存数 -->
-      <template slot="upperLimit" slot-scope="text, record" >
-        <div>
-          <a-input-number
-            id="inventoryWarningList-upperLimit"
-            v-model="record.upperLimit"
-            :precision="0"
-            :min="0"
-            :max="999999"
-            placeholder="请输入最大库存数" />
-        </div>
-      </template>
-      <!-- 最小库存数 -->
-      <template slot="lowerLimit" slot-scope="text, record" >
-        <div>
-          <a-input-number
-            id="inventoryWarningList-lowerLimit"
-            v-model="record.lowerLimit"
-            :precision="0"
-            :min="0"
-            :max="record.upperLimit"
-            placeholder="请输入最小库存数" />
-        </div>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button type="primary" size="small" class="button-info" @click="handleSave(record)" id="inventoryWarningList-add-btn">保存</a-button>
-      </template>
-    </a-table>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品品牌">
+                  <a-select
+                    placeholder="请选择产品品牌"
+                    id="inventoryWarningList-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-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-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="inventoryWarningList-productType"
+                    placeholder="请选择产品分类"
+                    allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="预警提示">
+                  <v-select
+                    v-model="queryParam.stockState"
+                    ref="stockState"
+                    id="inventoryWarningList-stockState"
+                    code="STOCK_WARN_TIP"
+                    placeholder="请选择预警提示"
+                    allowClear
+                  ></v-select>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="pageInit(1)" :disabled="disabled" id="inventoryWarningList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryWarningList-reset">重置</a-button>
+              <!-- <a-button
+                style="margin-left: 8px"
+                type="danger"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="inventoryWarningList-export">导出</a-button> -->
+              <a @click="advanced=!advanced" style="margin-left: 8px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button type="primary" id="inventoryWarningList-update" :loading="loading" @click="handleupdate">批量更新</a-button>
+        <span style="margin-left: 8px">
+          <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+        </span>
+      </div>
+      <!-- 列表 -->
+      <a-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :dataSource="loadData"
+        :scroll="{ x: 2220, y: tableHeight }"
+        :pagination="paginationProps"
+        :loading="tableLoading"
+        bordered>
+        <!-- 产品分类 -->
+        <template slot="productType" slot-scope="text, record">
+          <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 实时库存数 -->
+        <template slot="stockQty" slot-scope="text, record">
+          {{ record.currentStockQty + record.freezeQty }}
+          <span v-if="record.freezeQty">(冻结{{ record.freezeQty }})</span>
+        </template>
+        <!-- 预警提示 -->
+        <template slot="stockState" slot-scope="text, record">
+          <span v-if="record.stockStateDictValue" :class="[record.stockState=='OVERFLOW'?'yellow':record.stockState=='NOT_ENOUGH'?'red':record.stockState=='LACK'?'blue':record.stockState=='NORMAL'?'green':'']">{{ record.stockStateDictValue }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 在途数 -->
+        <template slot="inTransit" slot-scope="text, record" >
+          <div>
+            <a-input-number
+              id="inventoryWarningList-inTransit"
+              v-model="record.inTransit"
+              :precision="0"
+              :min="0"
+              :max="999999"
+              placeholder="请输入在途数" />
+          </div>
+        </template>
+        <!-- 最大库存数 -->
+        <template slot="upperLimit" slot-scope="text, record" >
+          <div>
+            <a-input-number
+              id="inventoryWarningList-upperLimit"
+              v-model="record.upperLimit"
+              :precision="0"
+              :min="0"
+              :max="999999"
+              placeholder="请输入最大库存数" />
+          </div>
+        </template>
+        <!-- 最小库存数 -->
+        <template slot="lowerLimit" slot-scope="text, record" >
+          <div>
+            <a-input-number
+              id="inventoryWarningList-lowerLimit"
+              v-model="record.lowerLimit"
+              :precision="0"
+              :min="0"
+              :max="record.upperLimit"
+              placeholder="请输入最小库存数" />
+          </div>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button type="primary" size="small" class="button-info" @click="handleSave(record)" id="inventoryWarningList-add-btn">保存</a-button>
+        </template>
+      </a-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -168,6 +170,7 @@ export default {
   components: { STable, VSelect },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -307,12 +310,16 @@ export default {
           lowerLimit: row.lowerLimit
         })
       }
+      this.spinning = true
       stockWarnSaveBatch(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.pageInit()
           this.selectedRowKeys = []
           this.selectedRows = []
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     },

+ 92 - 84
src/views/power/role/roleList.vue

@@ -1,85 +1,87 @@
 <template>
   <a-card size="small" :bordered="false">
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline">
-        <a-row :gutter="48">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="角色名称">
-              <a-input
-                allowClear
-                v-model.trim="queryParam.name"
-                placeholder="请输入角色名称"
-                :maxLength="30"
-                id="roleList-name"
-                @pressEnter="$refs.table.refresh(true)" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="状态">
-              <v-select code="ENABLE_FLAG" v-model="queryParam.isEnable" allowClear placeholder="请选择状态" id="roleList-isEnable"></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" id="roleList-handSubmit" style="margin-right: 10px;">查询</a-button>
-            <a-button type="" @click="reset" id="roleList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <div class="table-operator">
-      <!-- <a-button v-if="$hasPermissions('B_powerMD_role_add')" type="primary" class="button-error" @click="openModal" id="roleList-openModal">新增</a-button> -->
-      <a-button type="primary" class="button-error" @click="openModal" id="roleList-openModal">新增</a-button>
-    </div>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline">
+          <a-row :gutter="48">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="角色名称">
+                <a-input
+                  allowClear
+                  v-model.trim="queryParam.name"
+                  placeholder="请输入角色名称"
+                  :maxLength="30"
+                  id="roleList-name"
+                  @pressEnter="$refs.table.refresh(true)" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="状态">
+                <v-select code="ENABLE_FLAG" v-model="queryParam.isEnable" allowClear placeholder="请选择状态" id="roleList-isEnable"></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" id="roleList-handSubmit" style="margin-right: 10px;">查询</a-button>
+              <a-button type="" @click="reset" id="roleList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <div class="table-operator">
+        <!-- <a-button v-if="$hasPermissions('B_powerMD_role_add')" type="primary" class="button-error" @click="openModal" id="roleList-openModal">新增</a-button> -->
+        <a-button type="primary" class="button-error" @click="openModal" id="roleList-openModal">新增</a-button>
+      </div>
 
-    <s-table
-      ref="table"
-      size="default"
-      rowKey="id"
-      :columns="columns"
-      :data="loadData"
-      style="word-break: break-all;"
-      bordered>
-      <!-- 启用禁用 -->
-      <span slot="status" slot-scope="text, record">
-        <!-- <a-switch
-          v-if="$hasPermissions('B_powerMD_role_enable')"
-          checkedChildren="启用"
-          unCheckedChildren="禁用"
-          id="roleList-isEnable"
-          v-model="record.isEnable"
-          @change="changeFlagHandle(text, record)" />
-        <span v-else>{{ record.isEnable==1?'已启用':'已禁用' }}</span> -->
-		<a-switch
-		  checkedChildren="启用"
-		  unCheckedChildren="禁用"
-		  id="roleList-isEnable"
-		  v-model="record.isEnable"
-		  @change="changeFlagHandle(text, record)" />
-      </span>
-      <!-- 角色描述 -->
-      <template slot="remarks" slot-scope="text, record">
-        <span class="text-overflows" :title="record.remarks">{{ record.remarks ?record.remarks : '--' }}</span>
-      </template>
-      <!-- 操作 -->
-      <span slot="action" slot-scope="text, record">
-        <!-- <a-icon v-if="$hasPermissions('M_powerMD_role_menu')" type="setting" title="菜单权限" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" @click="openMenuModal(record)" />
-        <a-icon v-if="$hasPermissions('B_powerMD_role_edit')" type="edit" title="编辑" :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}" @click="handleEdit(record)" />
-        <a-icon
-          type="delete"
-          title="删除"
-          :style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
-          v-if="!record.isEnable && $hasPermissions('B_powerMD_role_del')"
-          @click="delect(record)" /> -->
-		<a-icon type="setting" title="菜单权限" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" @click="openMenuModal(record)" />
-		<a-icon type="edit" title="编辑" :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}" @click="handleEdit(record)" />
-		<a-icon
-			type="delete"
-			title="删除"
-			:style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
-			v-if="!record.isEnable"
-			@click="delect(record)" />
-		</span>
-    </s-table>
+      <s-table
+        ref="table"
+        size="default"
+        rowKey="id"
+        :columns="columns"
+        :data="loadData"
+        style="word-break: break-all;"
+        bordered>
+        <!-- 启用禁用 -->
+        <span slot="status" slot-scope="text, record">
+          <!-- <a-switch
+            v-if="$hasPermissions('B_powerMD_role_enable')"
+            checkedChildren="启用"
+            unCheckedChildren="禁用"
+            id="roleList-isEnable"
+            v-model="record.isEnable"
+            @change="changeFlagHandle(text, record)" />
+          <span v-else>{{ record.isEnable==1?'已启用':'已禁用' }}</span> -->
+          <a-switch
+            checkedChildren="启用"
+            unCheckedChildren="禁用"
+            id="roleList-isEnable"
+            v-model="record.isEnable"
+            @change="changeFlagHandle(text, record)" />
+        </span>
+        <!-- 角色描述 -->
+        <template slot="remarks" slot-scope="text, record">
+          <span class="text-overflows" :title="record.remarks">{{ record.remarks ?record.remarks : '--' }}</span>
+        </template>
+        <!-- 操作 -->
+        <span slot="action" slot-scope="text, record">
+          <!-- <a-icon v-if="$hasPermissions('M_powerMD_role_menu')" type="setting" title="菜单权限" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" @click="openMenuModal(record)" />
+          <a-icon v-if="$hasPermissions('B_powerMD_role_edit')" type="edit" title="编辑" :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}" @click="handleEdit(record)" />
+          <a-icon
+            type="delete"
+            title="删除"
+            :style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
+            v-if="!record.isEnable && $hasPermissions('B_powerMD_role_del')"
+            @click="delect(record)" /> -->
+          <a-icon type="setting" title="菜单权限" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" @click="openMenuModal(record)" />
+          <a-icon type="edit" title="编辑" :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}" @click="handleEdit(record)" />
+          <a-icon
+            type="delete"
+            title="删除"
+            :style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
+            v-if="!record.isEnable"
+            @click="delect(record)" />
+        </span>
+      </s-table>
+    </a-spin>
     <roleModal :visible="showModal" :data="itemData" @refresh="refreshTable" @close="showModal = false"></roleModal>
     <menuModal :visible="showMenuModal" :data="menuData" @close="showMenuModal = false"></menuModal>
   </a-card>
@@ -108,6 +110,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       // 查询参数
       queryParam: {
         name: '',
@@ -216,7 +219,6 @@ export default {
         }
       })
     },
-
     // 删除
     delect (row) {
       const _this = this
@@ -225,20 +227,22 @@ export default {
         content: '删除后无法恢复,确认删除?',
         centered: true,
         onOk () {
+          _this.spinning = true
           delectRolePower({
             id: row.id
           }).then(res => {
-            console.log(res, 'res1111')
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
       })
     },
     handleEdit (row) {
-      console.log(row, 'row')
       this.showModal = true
       this.itemData = row
     },
@@ -248,11 +252,15 @@ export default {
         id: record.id,
         flag: record.isEnable ? '1' : '0'
       }
+      this.spinning = true
       updateEnableStatus(_data).then(res => {
-        if (res.status + '' === '200') {
+        if (res.status == 200) {
           this.$message.success(res.message)
+          this.$refs.table.refresh()
+          this.spinning = false
         } else {
-          record.isEnable = !record.isEnable
+          this.$refs.table.refresh()
+          this.spinning = false
         }
       })
     }

+ 105 - 92
src/views/power/user/userList.vue

@@ -1,97 +1,99 @@
 <template>
   <a-card size="small" :bordered="false">
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="用户名称">
-              <a-input allowClear v-model.trim="queryParam.name" placeholder="请输入用户名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="手机号码">
-              <a-input allowClear v-model.trim="queryParam.phone" placeholder="请输入手机号码"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="状态">
-              <v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择状态"></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="4" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" style="margin-right: 10px;">查询</a-button>
-            <a-button type="" @click="reset" id="roleList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <div class="table-operator">
-      <!-- <a-button v-if="$hasPermissions('B_powerMD_user_add')" type="primary" class="button-error" @click="openModal">新增</a-button> -->
-      <a-button type="primary" class="button-error" @click="openModal">新增</a-button>
-    </div>
-    <s-table
-      ref="table"
-      size="default"
-      rowKey="id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1350 }"
-      style="word-break: break-all;"
-      bordered
-    >
-      <span slot="status" slot-scope="text, record">
-        <!-- <a-switch v-if="$hasPermissions('B_powerMD_user_enable')" checkedChildren="启用" unCheckedChildren="禁用" v-model="record.loginFlag" @change="changeFlagHandle(text, record)"/>
-        <span v-else>{{ record.loginFlag==1?'已启用':'已禁用' }}</span> -->
-        <!-- 超级管理员不可删除不可编辑不可启禁用 -->
-        <a-switch v-if="record.superAdmin!=1" checkedChildren="启用" unCheckedChildren="禁用" v-model="record.loginFlag" @change="changeFlagHandle(text, record)"/>
-        <span v-if="record.superAdmin==1">{{ record.loginFlag==1?'已启用':'已禁用' }}</span>
-      </span>
-      <span slot="action" slot-scope="text, record">
-        <!-- <a-icon
-          type="edit"
-          title="编辑"
-          :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}"
-          v-if="$hasPermissions('B_powerMD_user_edit')"
-          @click="handleEdit(record)"
-        />
-        <a-icon
-          type="unlock"
-          title="重置密码"
-          v-if="record.loginFlag==1 && $hasPermissions('B_powerMD_user_restPwd')"
-          :style="{fontSize: '20px',color:' #ffaa00',padding: '0 10px'}"
-          @click="resetPassword(record)" />
-        <a-icon
-          type="delete"
-          title="删除"
-          :style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
-          v-if="record.loginFlag==0 && $hasPermissions('B_powerMD_user_del')"
-          @click="delect(record)"/> -->
-        <a-icon
-          type="edit"
-          title="编辑"
-          v-if="record.superAdmin!=1"
-          :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}"
-          @click="handleEdit(record)"
-        />
-        <a-icon
-          type="unlock"
-          title="重置密码"
-          v-if="record.loginFlag==1 && record.superAdmin!=1"
-          :style="{fontSize: '20px',color:' #ffaa00',padding: '0 10px'}"
-          @click="resetPassword(record)" />
-        <a-icon
-          type="delete"
-          title="删除"
-          :style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
-          v-if="record.loginFlag==0 && record.superAdmin!=1"
-          @click="delect(record)"/>
-        <a-icon
-          type="setting"
-          title="分区设置"
-          :style="{fontSize: '20px',color:' #00aa00',padding: '0 10px'}"
-          @click="handleSetting(record)" />
-      </span>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="用户名称">
+                <a-input allowClear v-model.trim="queryParam.name" placeholder="请输入用户名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="手机号码">
+                <a-input allowClear v-model.trim="queryParam.phone" placeholder="请输入手机号码"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="状态">
+                <v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择状态"></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" style="margin-right: 10px;">查询</a-button>
+              <a-button type="" @click="reset" id="roleList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <div class="table-operator">
+        <!-- <a-button v-if="$hasPermissions('B_powerMD_user_add')" type="primary" class="button-error" @click="openModal">新增</a-button> -->
+        <a-button type="primary" class="button-error" @click="openModal">新增</a-button>
+      </div>
+      <s-table
+        ref="table"
+        size="default"
+        rowKey="id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1350 }"
+        style="word-break: break-all;"
+        bordered
+      >
+        <span slot="status" slot-scope="text, record">
+          <!-- <a-switch v-if="$hasPermissions('B_powerMD_user_enable')" checkedChildren="启用" unCheckedChildren="禁用" v-model="record.loginFlag" @change="changeFlagHandle(text, record)"/>
+          <span v-else>{{ record.loginFlag==1?'已启用':'已禁用' }}</span> -->
+          <!-- 超级管理员不可删除不可编辑不可启禁用 -->
+          <a-switch v-if="record.superAdmin!=1" checkedChildren="启用" unCheckedChildren="禁用" v-model="record.loginFlag" @change="changeFlagHandle(text, record)"/>
+          <span v-if="record.superAdmin==1">{{ record.loginFlag==1?'已启用':'已禁用' }}</span>
+        </span>
+        <span slot="action" slot-scope="text, record">
+          <!-- <a-icon
+            type="edit"
+            title="编辑"
+            :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}"
+            v-if="$hasPermissions('B_powerMD_user_edit')"
+            @click="handleEdit(record)"
+          />
+          <a-icon
+            type="unlock"
+            title="重置密码"
+            v-if="record.loginFlag==1 && $hasPermissions('B_powerMD_user_restPwd')"
+            :style="{fontSize: '20px',color:' #ffaa00',padding: '0 10px'}"
+            @click="resetPassword(record)" />
+          <a-icon
+            type="delete"
+            title="删除"
+            :style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
+            v-if="record.loginFlag==0 && $hasPermissions('B_powerMD_user_del')"
+            @click="delect(record)"/> -->
+          <a-icon
+            type="edit"
+            title="编辑"
+            v-if="record.superAdmin!=1"
+            :style="{fontSize: '20px',color:' #1890FF',padding:' 0 10px'}"
+            @click="handleEdit(record)"
+          />
+          <a-icon
+            type="unlock"
+            title="重置密码"
+            v-if="record.loginFlag==1 && record.superAdmin!=1"
+            :style="{fontSize: '20px',color:' #ffaa00',padding: '0 10px'}"
+            @click="resetPassword(record)" />
+          <a-icon
+            type="delete"
+            title="删除"
+            :style="{fontSize: '20px',color: '#f00',padding: '0 10px'}"
+            v-if="record.loginFlag==0 && record.superAdmin!=1"
+            @click="delect(record)"/>
+          <a-icon
+            type="setting"
+            title="分区设置"
+            :style="{fontSize: '20px',color:' #00aa00',padding: '0 10px'}"
+            @click="handleSetting(record)" />
+        </span>
+      </s-table>
+    </a-spin>
     <userModal :visible="showModal" @refresh="$refs.table.refresh(true)" :nowData="itemData" @close="showModal = false"></userModal>
     <!-- 分区设置 -->
     <UpdateArea ref="UpdateArea" :openUdModal="openUdModal" @ok="$refs.table.refresh(true)" @close="openUdModal=false"></UpdateArea>
@@ -110,6 +112,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       // 查询参数
       queryParam: {
         name: '',
@@ -172,12 +175,16 @@ export default {
         content: '确认重置密码吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           resetPSD({
             id: row.id
           }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -191,14 +198,17 @@ export default {
         content: '删除后无法恢复,确认删除?',
         centered: true,
         onOk () {
+          _this.spinning = true
           delectUserPower({
             id: row.id
           }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
             } else {
               _this.$message.error(res.message)
+              _this.spinning = false
             }
           })
         }
@@ -214,12 +224,15 @@ export default {
         id: record.id,
         flag: record.loginFlag ? '1' : '0'
       }
+      this.spinning = true
       updateEnableStatus(_data).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$refs.table.refresh()
+          this.spinning = false
         } else {
           this.$refs.table.refresh()
+          this.spinning = false
         }
       })
     }

+ 111 - 106
src/views/productManagement/priceChangeRecord/list.vue

@@ -1,117 +1,119 @@
 <template>
   <a-card size="small" :bordered="false" class="productChangeRecordList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="变更时间">
-              <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品名称">
-              <a-input id="productChangeRecordList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品编码">
-              <a-input id="productChangeRecordList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="品牌">
-                <a-select
-                  placeholder="请选择"
-                  id="productChangeRecordList-brandSn"
-                  allowClear
-                  v-model="queryParam.brandSn"
-                  :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-item label="变更时间">
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品分类">
-                <a-cascader
-                  @change="changeProductType"
-                  expand-trigger="hover"
-                  change-on-select
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="productInfoList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear
-                  v-model="productType" />
+              <a-form-item label="产品名称">
+                <a-input id="productChangeRecordList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productChangeRecordList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productChangeRecordList-reset">重置</a-button>
-            <a-button
-              style="margin: 0 0 18px 8px"
-              type="primary"
-              class="button-warning"
-              @click="handleExport"
-              :loading="exportLoading"
-              id="productChangeRecordList-export">导出</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 8px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 总计 -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">合计:<strong>{{ total }}</strong>条</div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 2340, y: tableHeight }"
-      bordered>
-      <!-- 产品分类 -->
-      <template slot="productType" slot-scope="text, record">
-        <span v-if="record.productEntity.productTypeName2 || record.productEntity.productTypeName3">{{ record.productEntity.productTypeName2 }} {{ record.productEntity.productTypeName3 ? '>' : '' }} {{ record.productEntity.productTypeName3 }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 省级价变更后 -->
-      <template slot="afterProvincePrice" slot-scope="text, record">
-        <span v-if="record.afterProvincePrice || record.afterProvincePrice==0" :class="record.beforeProvincePrice != record.afterProvincePrice ? 'red' : ''">{{ record.afterProvincePrice }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 市级价变更后 -->
-      <template slot="afterCityPrice" slot-scope="text, record">
-        <span v-if="record.afterCityPrice || record.afterCityPrice==0" :class="record.beforeCityPrice != record.afterCityPrice ? 'red' : ''">{{ record.afterCityPrice }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 特约价变更后 -->
-      <template slot="afterSpecialPrice" slot-scope="text, record">
-        <span v-if="record.afterSpecialPrice || record.afterSpecialPrice==0" :class="record.beforeSpecialPrice != record.afterSpecialPrice ? 'red' : ''">{{ record.afterSpecialPrice }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 终端价变更后 -->
-      <template slot="afterTerminalPrice" slot-scope="text, record">
-        <span v-if="record.afterTerminalPrice || record.afterTerminalPrice==0" :class="record.beforeTerminalPrice != record.afterTerminalPrice ? 'red' : ''">{{ record.afterTerminalPrice }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 车主价变更后 -->
-      <template slot="afterCarOwnersPrice" slot-scope="text, record">
-        <span v-if="record.afterCarOwnersPrice || record.afterCarOwnersPrice==0" :class="record.beforeCarOwnersPrice != record.afterCarOwnersPrice ? 'red' : ''">{{ record.afterCarOwnersPrice }}</span>
-        <span v-else>--</span>
-      </template>
-    </s-table>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品编码">
+                <a-input id="productChangeRecordList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="品牌">
+                  <a-select
+                    placeholder="请选择"
+                    id="productChangeRecordList-brandSn"
+                    allowClear
+                    v-model="queryParam.brandSn"
+                    :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-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品分类">
+                  <a-cascader
+                    @change="changeProductType"
+                    expand-trigger="hover"
+                    change-on-select
+                    :options="productTypeList"
+                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                    id="productInfoList-productType"
+                    placeholder="请选择产品分类"
+                    allowClear
+                    v-model="productType" />
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productChangeRecordList-refresh">查询</a-button>
+              <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productChangeRecordList-reset">重置</a-button>
+              <a-button
+                style="margin: 0 0 18px 8px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :loading="exportLoading"
+                id="productChangeRecordList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 8px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 总计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">合计:<strong>{{ total }}</strong>条</div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 2340, y: tableHeight }"
+        bordered>
+        <!-- 产品分类 -->
+        <template slot="productType" slot-scope="text, record">
+          <span v-if="record.productEntity.productTypeName2 || record.productEntity.productTypeName3">{{ record.productEntity.productTypeName2 }} {{ record.productEntity.productTypeName3 ? '>' : '' }} {{ record.productEntity.productTypeName3 }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 省级价变更后 -->
+        <template slot="afterProvincePrice" slot-scope="text, record">
+          <span v-if="record.afterProvincePrice || record.afterProvincePrice==0" :class="record.beforeProvincePrice != record.afterProvincePrice ? 'red' : ''">{{ record.afterProvincePrice }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 市级价变更后 -->
+        <template slot="afterCityPrice" slot-scope="text, record">
+          <span v-if="record.afterCityPrice || record.afterCityPrice==0" :class="record.beforeCityPrice != record.afterCityPrice ? 'red' : ''">{{ record.afterCityPrice }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 特约价变更后 -->
+        <template slot="afterSpecialPrice" slot-scope="text, record">
+          <span v-if="record.afterSpecialPrice || record.afterSpecialPrice==0" :class="record.beforeSpecialPrice != record.afterSpecialPrice ? 'red' : ''">{{ record.afterSpecialPrice }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 终端价变更后 -->
+        <template slot="afterTerminalPrice" slot-scope="text, record">
+          <span v-if="record.afterTerminalPrice || record.afterTerminalPrice==0" :class="record.beforeTerminalPrice != record.afterTerminalPrice ? 'red' : ''">{{ record.afterTerminalPrice }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 车主价变更后 -->
+        <template slot="afterCarOwnersPrice" slot-scope="text, record">
+          <span v-if="record.afterCarOwnersPrice || record.afterCarOwnersPrice==0" :class="record.beforeCarOwnersPrice != record.afterCarOwnersPrice ? 'red' : ''">{{ record.afterCarOwnersPrice }}</span>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -127,6 +129,7 @@ export default {
   components: { STable, VSelect, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -283,8 +286,10 @@ export default {
       const _this = this
       const params = this.queryParam
       this.exportLoading = true
+      _this.spinning = true
       productPriceChangeExport(params).then(res => {
         this.exportLoading = false
+        _this.spinning = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 65 - 58
src/views/productManagement/productBrand/list.vue

@@ -1,63 +1,65 @@
 <template>
   <a-card size="small" :bordered="false" class="productBrandList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="品牌名称">
-              <a-input id="productBrandList-brandName" v-model.trim="queryParam.brandName" allowClear placeholder="请输入品牌名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="品牌分类">
-              <v-select code="BRAND_TYPE" id="productBrandList-brandType" v-model="queryParam.brandType" allowClear placeholder="请选择品牌分类"></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="排序字母">
-              <a-select placeholder="请选择排序字母" id="productBrandList-sortChar" allowClear v-model="queryParam.sortChar">
-                <a-select-option v-for="item in sortCharList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productBrandList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="productBrandList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="productBrandList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ y: tableHeight }"
-      bordered>
-      <!-- 产品图片 -->
-      <template slot="imageUrl" slot-scope="text, record">
-        <img :src="record.imageUrl" width="30" height="30" class="imageUrl" @click="lookPic(record.imageUrl)" />
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="productBrandList-edit-btn">编辑</a-button>
-        <a-button size="small" type="link" class="button-success" @click="handleDetail(record)" id="productBrandList-detail-btn">详情</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-error"
-          @click="handleDel(record)"
-          id="productBrandList-del-btn">删除</a-button>
-      </template>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="品牌名称">
+                <a-input id="productBrandList-brandName" v-model.trim="queryParam.brandName" allowClear placeholder="请输入品牌名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="品牌分类">
+                <v-select code="BRAND_TYPE" id="productBrandList-brandType" v-model="queryParam.brandType" allowClear placeholder="请选择品牌分类"></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="排序字母">
+                <a-select placeholder="请选择排序字母" id="productBrandList-sortChar" allowClear v-model="queryParam.sortChar">
+                  <a-select-option v-for="item in sortCharList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productBrandList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="productBrandList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="productBrandList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        bordered>
+        <!-- 产品图片 -->
+        <template slot="imageUrl" slot-scope="text, record">
+          <img :src="record.imageUrl" width="30" height="30" class="imageUrl" @click="lookPic(record.imageUrl)" />
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="productBrandList-edit-btn">编辑</a-button>
+          <a-button size="small" type="link" class="button-success" @click="handleDetail(record)" id="productBrandList-detail-btn">详情</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+            id="productBrandList-del-btn">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑产品品牌 -->
     <product-brand-edit-modal :openModal="openModal" :nowData="nowData" :itemSn="itemSn" @ok="$refs.table.refresh()" @close="closeModal" />
     <!-- 查看产品品牌 -->
@@ -86,6 +88,7 @@ export default {
   components: { STable, VSelect, productBrandEditModal, productBrandDetailModal },
   data () {
     return {
+      spinning: false,
       sortCharList: dataList.sortCharList,
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -170,10 +173,14 @@ export default {
         content: '确认要删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           productBrandDel({ sn: row.brandSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 51 - 45
src/views/productManagement/productCategory/list.vue

@@ -1,49 +1,51 @@
 <template>
   <a-card size="small" :bordered="false" class="productCategoryList-wrap">
-    <!-- 操作按钮 -->
-    <div class="table-operator-nobor">
-      <a-button id="productCategoryList-add" type="primary" class="button-error" @click="handleAdd()">新增一级分类</a-button>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :showPagination="false"
-      :defaultExpandedRowKeys="defaultExpandedRowKeys"
-      :scroll="{ y: tableHeight }"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          v-if="record.productTypeLevel<3"
-          type="link"
-          class="button-success"
-          size="small"
-          icon="plus"
-          id="productCategory-addSubItem"
-          @click="handleAdd(record)">新增子级</a-button>
-        <a-button
-          v-if="record.pid != 0"
-          type="link"
-          class="button-info"
-          size="small"
-          icon="edit"
-          id="productCategory-edit"
-          @click="handleEdit(record)">编辑</a-button>
-        <a-button
-          v-if="record.pid != 0"
-          type="link"
-          class="button-error"
-          size="small"
-          icon="delete"
-          id="productCategory-del"
-          @click="handleDel(record)">删除</a-button>
-      </template>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 操作按钮 -->
+      <div class="table-operator-nobor">
+        <a-button id="productCategoryList-add" type="primary" class="button-error" @click="handleAdd()">新增一级分类</a-button>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :showPagination="false"
+        :defaultExpandedRowKeys="defaultExpandedRowKeys"
+        :scroll="{ y: tableHeight }"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            v-if="record.productTypeLevel<3"
+            type="link"
+            class="button-success"
+            size="small"
+            icon="plus"
+            id="productCategory-addSubItem"
+            @click="handleAdd(record)">新增子级</a-button>
+          <a-button
+            v-if="record.pid != 0"
+            type="link"
+            class="button-info"
+            size="small"
+            icon="edit"
+            id="productCategory-edit"
+            @click="handleEdit(record)">编辑</a-button>
+          <a-button
+            v-if="record.pid != 0"
+            type="link"
+            class="button-error"
+            size="small"
+            icon="delete"
+            id="productCategory-del"
+            @click="handleDel(record)">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑产品分类 -->
     <product-category-edit-modal :openModal="openModal" :nowData="nowData" :itemSn="itemSn" @ok="handleOk" @close="closeModal" />
   </a-card>
@@ -57,6 +59,7 @@ export default {
   components: { STable, productCategoryEditModal },
   data () {
     return {
+      spinning: false,
       tableHeight: 0,
       formItemLayout: {
         labelCol: { span: 6 },
@@ -122,17 +125,20 @@ export default {
     },
     //  删除
     handleDel (row) {
-      console.log(row)
       const _this = this
       _this.$confirm({
         title: '提示',
         content: '删除后原数据不可恢复,是否删除?',
         centered: true,
         onOk () {
+          _this.spinning = true
           productTypeDel({ sn: row.productTypeSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 6 - 6
src/views/productManagement/productInfo/edit.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="productInfoEdit-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="productInfoEdit-cont" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-    </a-page-header>
     <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="productInfoEdit-cont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        </template>
+      </a-page-header>
       <a-form-model
         id="productInfoEdit-form"
         ref="ruleForm"

+ 178 - 153
src/views/productManagement/productInfo/list.vue

@@ -1,173 +1,175 @@
 <template>
   <a-card size="small" :bordered="false" class="productInfoList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品名称">
-              <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品编码/原厂编码">
-              <a-input id="productInfoList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-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-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品分类">
-                <a-cascader
-                  @change="changeProductType"
-                  expand-trigger="hover"
-                  change-on-select
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="productInfoList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear
-                  v-model="productType" />
+              <a-form-item label="产品名称">
+                <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品状态">
-                <v-select code="PRODUCT_STATUS" id="productInfoList-state" v-model="queryParam.state" allowClear placeholder="请选择产品状态"></v-select>
+              <a-form-item label="产品编码/原厂编码">
+                <a-input id="productInfoList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="定价状态">
-                <v-select code="PRICING_STATUS" id="productInfoList-pricingState" v-model="queryParam.pricingState" allowClear placeholder="请选择定价状态"></v-select>
+              <a-form-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-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 5px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
-            <a-button
-              style="margin-left: 5px"
-              type="primary"
-              class="button-warning"
-              @click="handleExport"
-              :disabled="disabled"
-              :loading="exportLoading"
-              id="productInfoList-export">导出</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 8px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="productInfoList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-      <a-button
-        id="productInfoList-batchAudit"
-        type="primary"
-        class="button-warning"
-        :loading="loadingAudit"
-        @click="handleBatchAudit"
-        style="margin: 0 15px;">批量审核</a-button>
-      <a-button
-        id="productInfoList-batchLaunch"
-        type="primary"
-        class="button-primary"
-        :loading="loadingLaunch"
-        @click="handleBatchLaunch"
-        style="margin: 0 15px;">批量上线</a-button>
-      <a-button
-        id="productInfoList-batchDownline"
-        type="primary"
-        class="button-grey"
-        :loading="loadingDownline"
-        @click="handleBatchDownline"
-        style="margin: 0 15px;">批量下线</a-button>
-      <span style="margin-left: 8px">
-        <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
-      </span>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 2150, y: tableHeight }"
-      bordered>
-      <!-- 自定义表头 -->
-      <template slot="arrowFalgTitle">
-        <a-tooltip placement="top">
-          <template slot="title">
-            <span>自有即箭冠产品,非自有即非箭冠产品</span>
-          </template>
-          自有<a-icon type="question-circle" :style="{ marginLeft: '10px' }" />
-        </a-tooltip>
-      </template>
-      <template slot="arrowFalg" slot-scope="text, record">
-        <span v-if="record.arrowFalg">{{ record.arrowFalg == 1 ? '是' : '否' }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 产品分类 -->
-      <template slot="productType" slot-scope="text, record">
-        <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 定价状态 -->
-      <template slot="pricingState" slot-scope="text, record">
-        <a-badge :color="record.pricingState=='WAIT_PRICING'?'gold':record.pricingState=='WAIT_PRICING_AUDIT'?'volcano':'#87d068'" :text="record.pricingStateDictValue" />
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品分类">
+                  <a-cascader
+                    @change="changeProductType"
+                    expand-trigger="hover"
+                    change-on-select
+                    :options="productTypeList"
+                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                    id="productInfoList-productType"
+                    placeholder="请选择产品分类"
+                    allowClear
+                    v-model="productType" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品状态">
+                  <v-select code="PRODUCT_STATUS" id="productInfoList-state" v-model="queryParam.state" allowClear placeholder="请选择产品状态"></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="定价状态">
+                  <v-select code="PRICING_STATUS" id="productInfoList-pricingState" v-model="queryParam.pricingState" allowClear placeholder="请选择定价状态"></v-select>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
+              <a-button style="margin: 0 0 18px 5px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 5px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="productInfoList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 8px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="productInfoList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
         <a-button
-          size="small"
-          type="link"
-          v-if="record.state=='WAIT'"
+          id="productInfoList-batchAudit"
+          type="primary"
           class="button-warning"
-          @click="handleAudit(record)"
-          id="productInfoList-audit-btn">审核</a-button>
+          :loading="loadingAudit"
+          @click="handleBatchAudit"
+          style="margin: 0 15px;">批量审核</a-button>
         <a-button
-          size="small"
-          type="link"
-          v-if="record.state=='WAIT_ONLINE'||record.state=='OFFLINE'"
+          id="productInfoList-batchLaunch"
+          type="primary"
           class="button-primary"
-          @click="handleLaunch(record)"
-          id="productInfoList-launch-btn">上线</a-button>
+          :loading="loadingLaunch"
+          @click="handleBatchLaunch"
+          style="margin: 0 15px;">批量上线</a-button>
         <a-button
-          size="small"
-          type="link"
-          v-if="record.state=='ONLINE'"
+          id="productInfoList-batchDownline"
+          type="primary"
           class="button-grey"
-          @click="handleDownline(record)"
-          id="productInfoList-downline-btn">下线</a-button>
-        <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="productInfoList-edit-btn">编辑</a-button>
-        <a-button size="small" type="link" class="button-success" @click="handleDetail(record)" id="productInfoList-detail-btn">详情</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state=='WAIT'"
-          class="button-error"
-          @click="handleDel(record)"
-          id="productInfoList-del-btn">删除</a-button>
-      </template>
-    </s-table>
+          :loading="loadingDownline"
+          @click="handleBatchDownline"
+          style="margin: 0 15px;">批量下线</a-button>
+        <span style="margin-left: 8px">
+          <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+        </span>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onChange, onSelect: onSelectChange, onSelectAll: onSelectAllChange }"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 2150, y: tableHeight }"
+        bordered>
+        <!-- 自定义表头 -->
+        <template slot="arrowFalgTitle">
+          <a-tooltip placement="top">
+            <template slot="title">
+              <span>自有即箭冠产品,非自有即非箭冠产品</span>
+            </template>
+            自有<a-icon type="question-circle" :style="{ marginLeft: '10px' }" />
+          </a-tooltip>
+        </template>
+        <template slot="arrowFalg" slot-scope="text, record">
+          <span v-if="record.arrowFalg">{{ record.arrowFalg == 1 ? '是' : '否' }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 产品分类 -->
+        <template slot="productType" slot-scope="text, record">
+          <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 定价状态 -->
+        <template slot="pricingState" slot-scope="text, record">
+          <a-badge :color="record.pricingState=='WAIT_PRICING'?'gold':record.pricingState=='WAIT_PRICING_AUDIT'?'volcano':'#87d068'" :text="record.pricingStateDictValue" />
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state=='WAIT'"
+            class="button-warning"
+            @click="handleAudit(record)"
+            id="productInfoList-audit-btn">审核</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state=='WAIT_ONLINE'||record.state=='OFFLINE'"
+            class="button-primary"
+            @click="handleLaunch(record)"
+            id="productInfoList-launch-btn">上线</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state=='ONLINE'"
+            class="button-grey"
+            @click="handleDownline(record)"
+            id="productInfoList-downline-btn">下线</a-button>
+          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="productInfoList-edit-btn">编辑</a-button>
+          <a-button size="small" type="link" class="button-success" @click="handleDetail(record)" id="productInfoList-detail-btn">详情</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state=='WAIT'"
+            class="button-error"
+            @click="handleDel(record)"
+            id="productInfoList-del-btn">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 产品详情 -->
     <product-info-detail-modal :openModal="openModal" :itemSn="itemSn" @close="closeModal" />
     <!-- 产品下线 -->
@@ -187,6 +189,7 @@ export default {
   components: { STable, VSelect, productInfoDetailModal, productInfoOfflineModal },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -289,10 +292,14 @@ export default {
         content: '确认要审核吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           productAudit({ sn: row.productSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -323,6 +330,7 @@ export default {
         centered: true,
         onOk () {
           _this.loadingAudit = true
+          _this.spinning = true
           productBatchAudit(obj).then(res => {
             _this.loadingAudit = false
             if (res.status == 200) {
@@ -330,6 +338,9 @@ export default {
               _this.selectedRows = []
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -360,6 +371,7 @@ export default {
         centered: true,
         onOk () {
           _this.loadingLaunch = true
+          _this.spinning = true
           productBatchOnline(obj).then(res => {
             _this.loadingLaunch = false
             if (res.status == 200) {
@@ -367,6 +379,9 @@ export default {
               _this.selectedRows = []
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -422,10 +437,14 @@ export default {
         content: '确认要上线吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           productOnline({ sn: row.productSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -444,10 +463,14 @@ export default {
         content: '确认要删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           productDel({ sn: row.productSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -480,8 +503,10 @@ export default {
       const _this = this
       const params = this.queryParam
       this.exportLoading = true
+      _this.spinning = true
       productExport(params).then(res => {
         this.exportLoading = false
+        _this.spinning = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 77 - 66
src/views/productManagement/productLaunchAudit/list.vue

@@ -1,71 +1,73 @@
 <template>
   <a-card size="small" :bordered="false" class="productLaunchAuditList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品名称">
-              <a-input id="productLaunchAuditList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品编码">
-              <a-input id="productLaunchAuditList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="审核状态">
-              <v-select
-                v-model="queryParam.state"
-                ref="state"
-                id="productLaunchAuditList-state"
-                code="PRODUCT_ONOFFLINE_STATUS"
-                placeholder="请选择审核状态"
-                allowClear></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productLaunchAuditList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productLaunchAuditList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 列表 -->
-    <div style="margin-bottom: 15px">
-      <a-button type="primary" id="productLaunchAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
-      <span style="margin-left: 8px">
-        <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
-      </span>
-    </div>
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :row-selection="rowSelection"
-      :rowKey="(record) => record.productSn"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1510, y: tableHeight }"
-      bordered>
-      <!-- 产品分类 -->
-      <template slot="productType" slot-scope="text, record">
-        <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state=='WAIT_ONLINE_AUDIT'"
-          class="button-warning"
-          @click="handleAudit(record)"
-          id="productLaunchAuditList-audit-btn">审核</a-button>
-        <span v-else>--</span>
-      </template>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品名称">
+                <a-input id="productLaunchAuditList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品编码">
+                <a-input id="productLaunchAuditList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="审核状态">
+                <v-select
+                  v-model="queryParam.state"
+                  ref="state"
+                  id="productLaunchAuditList-state"
+                  code="PRODUCT_ONOFFLINE_STATUS"
+                  placeholder="请选择审核状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productLaunchAuditList-refresh">查询</a-button>
+              <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productLaunchAuditList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <div style="margin-bottom: 15px">
+        <a-button type="primary" id="productLaunchAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
+        <span style="margin-left: 8px">
+          <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+        </span>
+      </div>
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :row-selection="rowSelection"
+        :rowKey="(record) => record.productSn"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1510, y: tableHeight }"
+        bordered>
+        <!-- 产品分类 -->
+        <template slot="productType" slot-scope="text, record">
+          <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state=='WAIT_ONLINE_AUDIT'"
+            class="button-warning"
+            @click="handleAudit(record)"
+            id="productLaunchAuditList-audit-btn">审核</a-button>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -76,6 +78,7 @@ export default {
   components: { STable, VSelect },
   data () {
     return {
+      spinning: false,
       queryParam: { //  查询条件
         name: '', //  名称
         code: '', //  编码
@@ -145,10 +148,14 @@ export default {
         content: '确认要上线审核吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           productOnlineAudit({ sn: row.productSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -167,6 +174,7 @@ export default {
         centered: true,
         onOk () {
           _this.loading = true
+          _this.spinning = true
           productBatchOnlineAudit(_this.selectedRowKeys).then(res => {
             _this.loading = false
             if (res.status == 200) {
@@ -174,6 +182,9 @@ export default {
               _this.selectedRows = []
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         },

+ 111 - 100
src/views/productManagement/productOfflineAudit/list.vue

@@ -1,116 +1,118 @@
 <template>
   <a-card size="small" :bordered="false" class="productOfflineAuditList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品名称">
-              <a-input id="productOfflineAuditList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品编码/通用编码">
-              <a-input id="productOfflineAuditList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码/通用编码"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="下线选项">
-              <v-select
-                v-model="queryParam.offlineReasonType"
-                ref="offlineReasonType"
-                id="productOfflineAuditList-offlineReasonType"
-                code="OFFLINE_REASON_TYPE"
-                placeholder="请选择下线选项"
-                allowClear></v-select>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="品牌">
-                <a-select
-                  placeholder="请选择"
-                  id="productOfflineAuditList-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-item label="产品名称">
+                <a-input id="productOfflineAuditList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品分类">
-                <a-cascader
-                  @change="changeProductType"
-                  expand-trigger="hover"
-                  change-on-select
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="productOfflineAuditList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear
-                  v-model="productType" />
+              <a-form-item label="产品编码/通用编码">
+                <a-input id="productOfflineAuditList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码/通用编码"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="审核状态">
+              <a-form-item label="下线选项">
                 <v-select
-                  v-model="queryParam.state"
-                  ref="state"
-                  id="productOfflineAuditList-state"
-                  code="PRODUCT_ONOFFLINE_STATUS"
-                  placeholder="请选择审核状态"
+                  v-model="queryParam.offlineReasonType"
+                  ref="offlineReasonType"
+                  id="productOfflineAuditList-offlineReasonType"
+                  code="OFFLINE_REASON_TYPE"
+                  placeholder="请选择下线选项"
                   allowClear></v-select>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productOfflineAuditList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productOfflineAuditList-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>
-    </div>
-    <!-- 列表 -->
-    <div style="margin-bottom: 15px">
-      <a-button type="primary" id="productOfflineAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
-      <span style="margin-left: 8px">
-        <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
-      </span>
-    </div>
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :row-selection="rowSelection"
-      :rowKey="(record) => record.productSn"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 2070, y: tableHeight }"
-      bordered>
-      <!-- 产品分类 -->
-      <template slot="productType" slot-scope="text, record">
-        <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state=='WAIT_OFFLINE_AUDIT'"
-          class="button-warning"
-          @click="handleAudit(record)"
-          id="productOfflineAuditList-audit-btn">审核</a-button>
-        <span v-else>--</span>
-      </template>
-    </s-table>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="品牌">
+                  <a-select
+                    placeholder="请选择"
+                    id="productOfflineAuditList-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-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品分类">
+                  <a-cascader
+                    @change="changeProductType"
+                    expand-trigger="hover"
+                    change-on-select
+                    :options="productTypeList"
+                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                    id="productOfflineAuditList-productType"
+                    placeholder="请选择产品分类"
+                    allowClear
+                    v-model="productType" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="审核状态">
+                  <v-select
+                    v-model="queryParam.state"
+                    ref="state"
+                    id="productOfflineAuditList-state"
+                    code="PRODUCT_ONOFFLINE_STATUS"
+                    placeholder="请选择审核状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productOfflineAuditList-refresh">查询</a-button>
+              <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productOfflineAuditList-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>
+      </div>
+      <!-- 列表 -->
+      <div style="margin-bottom: 15px">
+        <a-button type="primary" id="productOfflineAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
+        <span style="margin-left: 8px">
+          <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+        </span>
+      </div>
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :row-selection="rowSelection"
+        :rowKey="(record) => record.productSn"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 2070, y: tableHeight }"
+        bordered>
+        <!-- 产品分类 -->
+        <template slot="productType" slot-scope="text, record">
+          <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state=='WAIT_OFFLINE_AUDIT'"
+            class="button-warning"
+            @click="handleAudit(record)"
+            id="productOfflineAuditList-audit-btn">审核</a-button>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -123,6 +125,7 @@ export default {
   components: { STable, VSelect },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       queryParam: { //  查询条件
         name: '', //  产品名称
@@ -215,10 +218,14 @@ export default {
         content: '确认要下线审核通过吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           productOfflineAudit({ sn: row.productSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -237,6 +244,7 @@ export default {
         centered: true,
         onOk () {
           _this.loading = true
+          _this.spinning = true
           productBatchOfflineAudit(_this.selectedRowKeys).then(res => {
             _this.loading = false
             if (res.status == 200) {
@@ -244,6 +252,9 @@ export default {
               _this.selectedRows = []
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 68 - 61
src/views/productManagement/productUniversal/list.vue

@@ -1,72 +1,74 @@
 <template>
   <a-card size="small" :bordered="false" class="productUniversalList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品编码">
-              <a-input id="productUniversalList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品名称">
-              <a-input id="productUniversalList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品状态">
-              <v-select code="PRODUCT_STATUS" id="productUniversalList-productState" v-model="queryParam.productState" allowClear placeholder="请选择产品状态"></v-select>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="通用产品编码">
-                <a-input id="productUniversalList-productCommonCode" v-model.trim="queryParam.productCommonCode" allowClear placeholder="请输入通用产品编码"/>
+              <a-form-item label="产品编码">
+                <a-input id="productUniversalList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="通用产品名称">
-                <a-input id="productUniversalList-productCommonName" v-model.trim="queryParam.productCommonName" allowClear placeholder="请输入通用产品名称"/>
+              <a-form-item label="产品名称">
+                <a-input id="productUniversalList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productUniversalList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productUniversalList-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>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="productUniversalList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1580 }"
-      bordered>
-      <!-- 产品分类 -->
-      <template slot="productType" slot-scope="text, record">
-        <span v-if="record.productCommont.productTypeName2 || record.productCommont.productTypeName3">{{ record.productCommont.productTypeName2 }} {{ record.productCommont.productTypeName3 ? '>' : '' }} {{ record.productCommont.productTypeName3 }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="productUniversalList-edit-btn">编辑</a-button>
-        <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="productUniversalList-del-btn">删除</a-button>
-      </template>
-    </s-table>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品状态">
+                <v-select code="PRODUCT_STATUS" id="productUniversalList-productState" v-model="queryParam.productState" allowClear placeholder="请选择产品状态"></v-select>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="通用产品编码">
+                  <a-input id="productUniversalList-productCommonCode" v-model.trim="queryParam.productCommonCode" allowClear placeholder="请输入通用产品编码"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="通用产品名称">
+                  <a-input id="productUniversalList-productCommonName" v-model.trim="queryParam.productCommonName" allowClear placeholder="请输入通用产品名称"/>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productUniversalList-refresh">查询</a-button>
+              <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productUniversalList-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>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="productUniversalList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1580 }"
+        bordered>
+        <!-- 产品分类 -->
+        <template slot="productType" slot-scope="text, record">
+          <span v-if="record.productCommont.productTypeName2 || record.productCommont.productTypeName3">{{ record.productCommont.productTypeName2 }} {{ record.productCommont.productTypeName3 ? '>' : '' }} {{ record.productCommont.productTypeName3 }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="productUniversalList-edit-btn">编辑</a-button>
+          <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="productUniversalList-del-btn">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑 -->
     <product-universal-edit-modal :openModal="openModal" :itemId="itemId" @close="closeModal" @ok="$refs.table.refresh()" />
   </a-card>
@@ -81,6 +83,7 @@ export default {
   components: { STable, VSelect, productUniversalEditModal },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -156,10 +159,14 @@ export default {
         content: '确认要删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           productUniversalCodeDel({ id: row.id }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 6 - 6
src/views/promotionRulesManagement/promotionRules/editRuleModal.vue

@@ -8,7 +8,7 @@
     v-model="isShow"
     @cancle="isShow = false"
     :width="960">
-    <a-spin tip="Loading..." :spinning="spinLoading">
+    <a-spin :spinning="spinning" tip="Loading...">
       <a-form-model
         id="promotionRules-rule-form"
         ref="ruleForm"
@@ -222,7 +222,7 @@ export default {
       promoGoodsList: [], //  当前已选促销品
       nowChooseGoodsType: '', //  当前选择产品的类型(正价产品/促销品)
       nowData: [], //  选择产品
-      spinLoading: false
+      spinning: false
     }
   },
   computed: {
@@ -328,17 +328,17 @@ export default {
             form.promoAmountPer = ''
           }
           if (!_this.itemSn) { delete form.id }
-          _this.spinLoading = true
+          _this.spinning = true
           promoRuleSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               setTimeout(() => {
                 _this.$emit('ok')
-                _this.spinLoading = false
                 _this.isShow = false
+                _this.spinning = false
               }, 1000)
-            }else{
-              _this.spinLoading = false
+            } else {
+              _this.spinning = false
             }
           })
         } else {

+ 92 - 86
src/views/promotionRulesManagement/promotionRules/list.vue

@@ -1,91 +1,93 @@
 <template>
   <a-card size="small" :bordered="false" class="promotionRulesList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
-              <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="促销名称">
-              <a-input id="promotionRulesList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入促销名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="状态">
-              <v-select code="ENABLE_FLAG" id="promotionRulesList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="promotionRulesList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="promotionRulesList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="promotionRulesList-add" type="primary" class="button-error" @click="openModal=true">新增</a-button>
-    </div>
-    <!-- 总计 -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">合计: <strong>{{ total }}</strong>条</div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1440, y: tableHeight }"
-      bordered>
-      <!-- 促销时间 -->
-      <template slot="activeDate" slot-scope="text, record">
-        <div v-if="record.activeDateEnable != '0'">
-          <span v-if="record.activeDateStart || record.activeDateEnd">{{ record.activeDateStart }} 至 {{ record.activeDateEnd }}</span>
-          <span v-else>--</span>
-        </div>
-        <span v-else>不限</span>
-      </template>
-      <!-- 状态 -->
-      <template slot="enabledFlag" slot-scope="text, record">
-        <a-switch
-          id="promotionRulesList-enable"
-          checkedChildren="启用"
-          unCheckedChildren="禁用"
-          @change="changeStatus(record)"
-          :checked="record.enabledFlag == 1 ? true : false" />
-        <!-- <span v-else :style="{color:(record.enabledFlag==1?'#00aa00':'#999')}"> {{ record.enabledFlag==1? '已启用': '已禁用' }} </span> -->
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.enabledFlag != 1"
-          class="button-primary"
-          @click="handleRule(record)"
-          id="promotionRulesList-rule-btn">规则设置</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.enabledFlag != 1"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="promotionRulesList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-success"
-          @click="handleDetail(record)"
-          id="promotionRulesList-detail-btn">详情</a-button>
-      </template>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="创建时间">
+                <rangeDate ref="rangeDate" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="促销名称">
+                <a-input id="promotionRulesList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入促销名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="状态">
+                <v-select code="ENABLE_FLAG" id="promotionRulesList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="promotionRulesList-refresh">查询</a-button>
+              <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="promotionRulesList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="promotionRulesList-add" type="primary" class="button-error" @click="openModal=true">新增</a-button>
+      </div>
+      <!-- 总计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">合计: <strong>{{ total }}</strong>条</div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1440, y: tableHeight }"
+        bordered>
+        <!-- 促销时间 -->
+        <template slot="activeDate" slot-scope="text, record">
+          <div v-if="record.activeDateEnable != '0'">
+            <span v-if="record.activeDateStart || record.activeDateEnd">{{ record.activeDateStart }} 至 {{ record.activeDateEnd }}</span>
+            <span v-else>--</span>
+          </div>
+          <span v-else>不限</span>
+        </template>
+        <!-- 状态 -->
+        <template slot="enabledFlag" slot-scope="text, record">
+          <a-switch
+            id="promotionRulesList-enable"
+            checkedChildren="启用"
+            unCheckedChildren="禁用"
+            @change="changeStatus(record)"
+            :checked="record.enabledFlag == 1 ? true : false" />
+          <!-- <span v-else :style="{color:(record.enabledFlag==1?'#00aa00':'#999')}"> {{ record.enabledFlag==1? '已启用': '已禁用' }} </span> -->
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.enabledFlag != 1"
+            class="button-primary"
+            @click="handleRule(record)"
+            id="promotionRulesList-rule-btn">规则设置</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.enabledFlag != 1"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="promotionRulesList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-success"
+            @click="handleDetail(record)"
+            id="promotionRulesList-detail-btn">详情</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增 -->
     <basic-info-modal :openModal="openModal" :itemSn="itemSn" @ok="handleOk" @close="closeModal" />
   </a-card>
@@ -101,6 +103,7 @@ export default {
   components: { STable, VSelect, basicInfoModal, rangeDate },
   data () {
     return {
+      spinning: false,
       tableHeight: 0,
       queryParam: { //  查询条件
         beginDate: '',
@@ -191,12 +194,15 @@ export default {
         sn: record.promoActiveSn,
         flag: record.enabledFlag == 1 ? '0' : '1'
       }
+      this.spinning = true
       promoActiveEnable(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
           this.$refs.table.refresh()
+          this.spinning = false
         } else {
           this.$refs.table.refresh()
+          this.spinning = false
         }
       })
     }

+ 45 - 38
src/views/promotionRulesManagement/promotionRules/rule.vue

@@ -1,44 +1,46 @@
 <template>
   <div class="promotionRulesList-rule-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="promotionRulesList-rule-back" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="promotionRulesList-rule-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-    </a-page-header>
-    <a-card size="small" :bordered="false" class="promotionRulesList-rule-wrap">
-      <!-- 操作按钮 -->
-      <div class="table-operator">
-        <a-button id="promotionRulesList-rule-add" type="primary" class="button-error" @click="openModal=true">新增</a-button>
-      </div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="default"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :showPagination="false"
-        bordered>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-button
-            size="small"
-            type="link"
-            class="button-info"
-            @click="handleEdit(record)"
-            id="promotionRulesList-rule-edit-btn">编辑</a-button>
-          <a-button
-            size="small"
-            type="link"
-            class="button-error"
-            @click="handleDel(record)"
-            id="promotionRulesList-rule-del-btn">删除</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="promotionRulesList-rule-back" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="promotionRulesList-rule-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         </template>
-      </s-table>
-      <!-- 新增/编辑 -->
-      <edit-rule-modal :openModal="openModal" :itemSn="itemSn" @ok="handleOk" @close="closeModal" />
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="promotionRulesList-rule-wrap">
+        <!-- 操作按钮 -->
+        <div class="table-operator">
+          <a-button id="promotionRulesList-rule-add" type="primary" class="button-error" @click="openModal=true">新增</a-button>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="default"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :showPagination="false"
+          bordered>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              class="button-info"
+              @click="handleEdit(record)"
+              id="promotionRulesList-rule-edit-btn">编辑</a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-error"
+              @click="handleDel(record)"
+              id="promotionRulesList-rule-del-btn">删除</a-button>
+          </template>
+        </s-table>
+      </a-card></a-spin>
+    <!-- 新增/编辑 -->
+    <edit-rule-modal :openModal="openModal" :itemSn="itemSn" @ok="handleOk" @close="closeModal" />
     </a-card>
   </div>
 </template>
@@ -51,6 +53,7 @@ export default {
   components: { STable, VSelect, editRuleModal },
   data () {
     return {
+      spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
@@ -108,10 +111,14 @@ export default {
         content: '确认要删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           promoRuleDel({ sn: row.promoRuleSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 78 - 71
src/views/purchasingManagement/bulkWarehousingOrder/edit.vue

@@ -1,78 +1,80 @@
 <template>
   <div class="bulkWarehousingOrderEdit-wrap">
-    <!-- 内容 -->
-    <a-page-header :ghost="false" :backIcon="false" class="bulkWarehousingOrderEdit-cont" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="bulkWarehousingOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <!-- <template slot="extra">
-        <a-button key="2" id="bulkWarehousingOrderEdit-preview-btn">打印预览</a-button>
-        <a-button key="1" type="primary" id="bulkWarehousingOrderEdit-print-btn">快速打印</a-button>
-      </template> -->
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">
-            基础信息
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 内容 -->
+      <a-page-header :ghost="false" :backIcon="false" class="bulkWarehousingOrderEdit-cont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="bulkWarehousingOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <!-- <template slot="extra">
+          <a-button key="2" id="bulkWarehousingOrderEdit-preview-btn">打印预览</a-button>
+          <a-button key="1" type="primary" id="bulkWarehousingOrderEdit-print-btn">快速打印</a-button>
+        </template> -->
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1">
+            <template slot="header">
+              基础信息
+            </template>
+            <a-descriptions :column="3">
+              <a-descriptions-item label="供应商">{{ (productTotal&&productTotal.supplierName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="入库类型">{{ (productTotal&&productTotal.sparePartsTypeDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="入库单号">{{ (productTotal&&productTotal.sparePartsNo) || '--' }}</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
+        <!-- 操作按钮 -->
+        <div class="table-operator">
+          <a-button id="bulkWarehousingOrderEdit-add" type="primary" class="button-error" @click="handleEdit()">新增产品</a-button>
+        </div>
+        <!-- 总计 -->
+        <a-alert type="info" showIcon style="margin-bottom:15px">
+          <div slot="message">入库数量 <strong>{{ (productTotal&&productTotal.totalQty) || 0 }}</strong> ,入库金额 <strong>{{ (productTotal&&productTotal.totalPrice) || 0 }}</strong></div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          bordered>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              @click="handleEdit(record)"
+              class="button-info"
+              id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
+            <a-button
+              size="small"
+              type="link"
+              @click="handleDel(record)"
+              class="button-error"
+              id="bulkWarehousingOrderList-del-btn">删除</a-button>
           </template>
-          <a-descriptions :column="3">
-            <a-descriptions-item label="供应商">{{ (productTotal&&productTotal.supplierName) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="入库类型">{{ (productTotal&&productTotal.sparePartsTypeDictValue) || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="入库单号">{{ (productTotal&&productTotal.sparePartsNo) || '--' }}</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-card size="small" :bordered="false" class="bulkWarehousingOrderEdit-cont">
-      <!-- 操作按钮 -->
-      <div class="table-operator">
-        <a-button id="bulkWarehousingOrderEdit-add" type="primary" class="button-error" @click="handleEdit()">新增产品</a-button>
-      </div>
-      <!-- 总计 -->
-      <a-alert type="info" showIcon style="margin-bottom:15px">
-        <div slot="message">入库数量 <strong>{{ (productTotal&&productTotal.totalQty) || 0 }}</strong> ,入库金额 <strong>{{ (productTotal&&productTotal.totalPrice) || 0 }}</strong></div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        bordered>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-button
-            size="small"
-            type="link"
-            @click="handleEdit(record)"
-            class="button-info"
-            id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
+        </s-table>
+      </a-card>
+      <a-affix :offset-bottom="0">
+        <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
           <a-button
-            size="small"
-            type="link"
-            @click="handleDel(record)"
-            class="button-error"
-            id="bulkWarehousingOrderList-del-btn">删除</a-button>
-        </template>
-      </s-table>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button
-          type="primary"
-          id="bulkWarehousingOrderEdit-submit"
-          size="large"
-          class="button-primary"
-          @click="handleBack"
-          style="padding: 0 60px;">保存并返回</a-button>
-      </div>
-    </a-affix>
+            type="primary"
+            id="bulkWarehousingOrderEdit-submit"
+            size="large"
+            class="button-primary"
+            @click="handleBack"
+            style="padding: 0 60px;">保存并返回</a-button>
+        </div>
+      </a-affix>
+    </a-spin>
     <spare-parts-product-modal :openModal="openModal" :itemSn="itemSn" :nowData="productTotal" @ok="$refs.table.refresh(true)" @close="closeModal" />
   </div>
 </template>
@@ -86,6 +88,7 @@ export default {
   components: { STable, VSelect, sparePartsProductModal },
   data () {
     return {
+      spinning: false,
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
@@ -136,10 +139,14 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           sparePartsDeleteDetail({ sn: row.sparePartsDetailSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 85 - 74
src/views/purchasingManagement/bulkWarehousingOrder/list.vue

@@ -1,80 +1,82 @@
 <template>
   <a-card size="small" :bordered="false" class="bulkWarehousingOrderList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品编码">
-              <a-input id="bulkWarehousingOrderList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="关联单号">
-              <a-input id="bulkWarehousingOrderList-relationNo" v-model.trim="queryParam.relationNo" allowClear placeholder="请输入关联单号"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <span class="table-page-search-submitButtons" style="margin-top: 3px;">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderList-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="bulkWarehousingOrderList-reset">重置</a-button>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="bulkWarehousingOrderList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
-      <a-button
-        id="bulkWarehousingOrderList-batchAudit"
-        type="primary"
-        class="button-warning"
-        :loading="loading"
-        @click="handleBatchAudit"
-        style="margin: 0 15px;">批量审核</a-button>
-      <span style="margin-left: 8px">
-        <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
-      </span>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :row-selection="rowSelection"
-      :rowKey="(record) => record.sparePartsSn"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1960, y: tableHeight }"
-      bordered>
-      <!-- 入库单号 -->
-      <template slot="sparePartsNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.sparePartsNo }}</span>
-      </template>
-      <!-- 财务状态 -->
-      <template slot="settleState" slot-scope="text, record">
-        <a-badge :color="text=='FINISH'?'#87d068':'gold'" :text="record.settleStateDictValue" />
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品编码">
+                <a-input id="bulkWarehousingOrderList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="关联单号">
+                <a-input id="bulkWarehousingOrderList-relationNo" v-model.trim="queryParam.relationNo" allowClear placeholder="请输入关联单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons" style="margin-top: 3px;">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderList-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="bulkWarehousingOrderList-reset">重置</a-button>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="bulkWarehousingOrderList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
         <a-button
-          size="small"
-          type="link"
-          v-if="record.state == 'WAIT_AUDIT'"
-          @click="handleEdit(record)"
-          class="button-info"
-          id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state == 'WAIT_AUDIT'"
-          @click="handleDel(record)"
-          class="button-error"
-          id="bulkWarehousingOrderList-del-btn">删除</a-button>
-        <span v-if="record.state != 'WAIT_AUDIT'">--</span>
-      </template>
-    </s-table>
+          id="bulkWarehousingOrderList-batchAudit"
+          type="primary"
+          class="button-warning"
+          :loading="loading"
+          @click="handleBatchAudit"
+          style="margin: 0 15px;">批量审核</a-button>
+        <span style="margin-left: 8px">
+          <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+        </span>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :row-selection="rowSelection"
+        :rowKey="(record) => record.sparePartsSn"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1960, y: tableHeight }"
+        bordered>
+        <!-- 入库单号 -->
+        <template slot="sparePartsNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.sparePartsNo }}</span>
+        </template>
+        <!-- 财务状态 -->
+        <template slot="settleState" slot-scope="text, record">
+          <a-badge :color="text=='FINISH'?'#87d068':'gold'" :text="record.settleStateDictValue" />
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_AUDIT'"
+            @click="handleEdit(record)"
+            class="button-info"
+            id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_AUDIT'"
+            @click="handleDel(record)"
+            class="button-error"
+            id="bulkWarehousingOrderList-del-btn">删除</a-button>
+          <span v-if="record.state != 'WAIT_AUDIT'">--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 选择基本信息弹框 -->
     <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
     <sparePartsDetailModal :openModal="openDetailModal" :itemSn="itemSn" @close="closeDetailModal" />
@@ -90,6 +92,7 @@ export default {
   components: { STable, VSelect, basicInfoModal, sparePartsDetailModal },
   data () {
     return {
+      spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
       openModal: false, // 基本信息弹框是否显示
       tableHeight: 0,
@@ -189,10 +192,14 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           sparePartsDelete({ sn: row.sparePartsSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -216,12 +223,16 @@ export default {
         content: '确认要批量审核吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           sparePartsAudit(_this.selectedRowKeys).then(res => {
             if (res.status == 200) {
               _this.selectedRowKeys = []
               _this.selectedRows = []
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 94 - 88
src/views/salesManagement/examineVerify/list.vue

@@ -1,104 +1,106 @@
 <template>
   <a-card size="small" :bordered="false" class="examineVerifyList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
-              <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="客户名称">
-              <custList id="examineVerifyList-buyerName" ref="custList" @change="custChange"></custList>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="销售单号">
-              <a-input id="examineVerifyList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="出库单号">
-                <a-input id="examineVerifyList-stockOutNo" v-model.trim="queryParam.stockOutNo" allowClear placeholder="请输入出库单号"/>
+              <a-form-item label="创建时间">
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="打印状态">
-                <v-select
-                  v-model="queryParam.printStatus"
-                  ref="printStatus"
-                  id="examineVerifyList-printStatus"
-                  code="PRINT_STATUS"
-                  placeholder="请选择打印状态"
-                  allowClear></v-select>
+              <a-form-item label="客户名称">
+                <custList id="examineVerifyList-buyerName" ref="custList" @change="custChange"></custList>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="业务状态">
-                <v-select
-                  v-model="queryParam.billStatus"
-                  ref="billStatus"
-                  id="examineVerifyList-billStatus"
-                  code="DISPATCH_BILL_STATUS"
-                  placeholder="请选择单据状态"
-                  allowClear></v-select>
+              <a-form-item label="销售单号">
+                <a-input id="examineVerifyList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="备货单号">
-                <a-input id="examineVerifyList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
-              </a-form-item>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="出库单号">
+                  <a-input id="examineVerifyList-stockOutNo" v-model.trim="queryParam.stockOutNo" allowClear placeholder="请输入出库单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="打印状态">
+                  <v-select
+                    v-model="queryParam.printStatus"
+                    ref="printStatus"
+                    id="examineVerifyList-printStatus"
+                    code="PRINT_STATUS"
+                    placeholder="请选择打印状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="业务状态">
+                  <v-select
+                    v-model="queryParam.billStatus"
+                    ref="billStatus"
+                    id="examineVerifyList-billStatus"
+                    code="DISPATCH_BILL_STATUS"
+                    placeholder="请选择单据状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="备货单号">
+                  <a-input id="examineVerifyList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="examineVerifyList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="examineVerifyList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 8px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="examineVerifyList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="examineVerifyList-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>
-    </div>
-    <!-- alert -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">
-        总售价:<strong>{{ totalData.totalAmount }}</strong>元;
-        总单数:<strong>{{ totalData.totalRecord }}</strong>;
-        总款数:<strong>{{ totalData.totalCategory }}</strong>;
-        总数量:<strong>{{ totalData.totalQty }}</strong>;
+          </a-row>
+        </a-form>
       </div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 2000, y:tableHeight }"
-      bordered>
-      <!-- 下推单号 -->
-      <template slot="dispatchBillNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.dispatchBillNo }}</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          class="button-info"
-          v-if="record.billStatus=='WAIT_STOCK_UP_AUDIT'"
-          @click="handleExamine(record)"
-          id="examineVerifyList-examine-btn">备货审核</a-button>
-        <span v-else>--</span>
-      </template>
-    </s-table>
+      <!-- alert -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">
+          总售价:<strong>{{ totalData.totalAmount }}</strong>元;
+          总单数:<strong>{{ totalData.totalRecord }}</strong>;
+          总款数:<strong>{{ totalData.totalCategory }}</strong>;
+          总数量:<strong>{{ totalData.totalQty }}</strong>;
+        </div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 2000, y:tableHeight }"
+        bordered>
+        <!-- 下推单号 -->
+        <template slot="dispatchBillNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.dispatchBillNo }}</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            v-if="record.billStatus=='WAIT_STOCK_UP_AUDIT'"
+            @click="handleExamine(record)"
+            id="examineVerifyList-examine-btn">备货审核</a-button>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 审核 -->
     <auditModal :openModal="visibleAudit" @close="visibleAudit=false" @ok="auditOrder('OUTING_WAREHOUSE')" @fail="auditOrder('STOCK_UP_REJECT')" />
   </a-card>
@@ -116,6 +118,7 @@ export default {
   components: { STable, VSelect, custList, rangeDate, auditModal },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       time: [
@@ -208,6 +211,7 @@ export default {
       this.visibleAudit = true
     },
     auditOrder (billStatus) {
+      this.spinning = true
       dispatchStockUpAduit({
         dispatchBillSn: this.auditInfo.dispatchBillSn,
         billStatus: billStatus
@@ -216,8 +220,10 @@ export default {
           this.visibleAudit = false
           this.$message.success(res.message)
           this.$refs.table.refresh()
+          this.spinning = false
         } else {
           this.visibleAudit = false
+          this.spinning = false
         }
       })
     },

+ 91 - 84
src/views/salesManagement/outboundOrder/list.vue

@@ -1,98 +1,100 @@
 <template>
   <a-card size="small" :bordered="false" class="outboundOrderList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="审核时间">
-              <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="客户名称">
-              <a-input id="outboundOrderList-demanderName" v-model.trim="queryParam.demanderName" allowClear placeholder="请输入客户名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="出库类型">
-              <v-select
-                v-model="queryParam.outBizType"
-                ref="outBizType"
-                id="outboundOrderList-outBizType"
-                code="OUT_STOCK_TYPE"
-                placeholder="请选择出库类型"
-                allowClear></v-select>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="出库状态">
-                <v-select
-                  v-model="queryParam.state"
-                  ref="state"
-                  id="outboundOrderList-state"
-                  code="OUT_STATE"
-                  placeholder="请选择出库状态"
-                  allowClear></v-select>
+              <a-form-item label="审核时间">
+                <rangeDate ref="rangeDate" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="业务单号">
-                <a-input id="outboundOrderList-outBizNo" v-model.trim="queryParam.outBizNo" allowClear placeholder="请输入业务单号"/>
+              <a-form-item label="客户名称">
+                <a-input id="outboundOrderList-demanderName" v-model.trim="queryParam.demanderName" allowClear placeholder="请输入客户名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="出库单号">
-                <a-input id="outboundOrderList-stockOutNo" v-model.trim="queryParam.stockOutNo" allowClear placeholder="请输入出库单号"/>
+              <a-form-item label="出库类型">
+                <v-select
+                  v-model="queryParam.outBizType"
+                  ref="outBizType"
+                  id="outboundOrderList-outBizType"
+                  code="OUT_STOCK_TYPE"
+                  placeholder="请选择出库类型"
+                  allowClear></v-select>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="outboundOrderList-refresh" style="margin-bottom: 15px;">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="outboundOrderList-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>
-    </div>
-    <!-- 列表 -->
-    <div style="margin-bottom: 15px">
-      <a-button type="primary" id="outboundOrder-export" :loading="loading" @click="handleOutbound()">批量出库</a-button>
-      <span style="margin-left: 8px">
-        <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
-      </span>
-    </div>
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :row-selection="rowSelection"
-      :rowKey="(record) => record.stockOutSn"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1760, y: tableHeight }"
-      bordered>
-      <!-- 单号 -->
-      <template slot="stockOutNo" slot-scope="text, record">
-        <span v-if="record.stockOutNo" style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.stockOutNo }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state=='WAIT'"
-          class="button-primary"
-          @click="handleOutbound(record)"
-          id="outboundOrderList-out-btn">出库</a-button>
-        <span v-else>--</span>
-      </template>
-    </s-table>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="出库状态">
+                  <v-select
+                    v-model="queryParam.state"
+                    ref="state"
+                    id="outboundOrderList-state"
+                    code="OUT_STATE"
+                    placeholder="请选择出库状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="业务单号">
+                  <a-input id="outboundOrderList-outBizNo" v-model.trim="queryParam.outBizNo" allowClear placeholder="请输入业务单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="出库单号">
+                  <a-input id="outboundOrderList-stockOutNo" v-model.trim="queryParam.stockOutNo" allowClear placeholder="请输入出库单号"/>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="outboundOrderList-refresh" style="margin-bottom: 15px;">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="outboundOrderList-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>
+      </div>
+      <!-- 列表 -->
+      <div style="margin-bottom: 15px">
+        <a-button type="primary" id="outboundOrder-export" :loading="loading" @click="handleOutbound()">批量出库</a-button>
+        <span style="margin-left: 8px">
+          <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+        </span>
+      </div>
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :row-selection="rowSelection"
+        :rowKey="(record) => record.stockOutSn"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1760, y: tableHeight }"
+        bordered>
+        <!-- 单号 -->
+        <template slot="stockOutNo" slot-scope="text, record">
+          <span v-if="record.stockOutNo" style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.stockOutNo }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state=='WAIT'"
+            class="button-primary"
+            @click="handleOutbound(record)"
+            id="outboundOrderList-out-btn">出库</a-button>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -104,6 +106,7 @@ export default {
   components: { STable, VSelect, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0, // 表格高度
       queryParam: { //  查询条件
@@ -240,6 +243,7 @@ export default {
           if (!row) { //  批量出库
             _this.loading = true
           }
+          _this.spinning = true
           stockOutOut(params).then(res => {
             _this.loading = false
             if (res.status == 200) {
@@ -249,6 +253,9 @@ export default {
               }
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 2 - 5
src/views/salesManagement/pushOrderManagement/chooseTypeModal.vue

@@ -8,7 +8,7 @@
     v-model="isShow"
     @cancle="isShow=false"
     :width="600">
-    <a-spin tip="Loading..." :spinning="spinLoading">
+    <a-spin :spinning="spinning" tip="Loading...">
       <a-form-model
         id="pushOrderManagement-print-form"
         ref="ruleForm"
@@ -53,7 +53,7 @@ export default {
         labelCol: { span: 6 },
         wrapperCol: { span: 18 }
       },
-      spinLoading: false,
+      spinning: false,
       typeList: []
     }
   },
@@ -61,13 +61,10 @@ export default {
     // 确认
     handleSave () {
       const _this = this
-
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          _this.spinLoading = true
           _this.$emit('ok', _this.form.productTypeSn2)
           _this.isShow = false
-          _this.spinLoading = false
         } else {
           console.log('error submit!!')
           return false

+ 4 - 0
src/views/salesManagement/salesQuery/edit.vue

@@ -263,6 +263,7 @@ export default {
         closable: true,
         onOk () {
           _this.delLoading = true
+          _this.spinning = true
           salesDetailDelAll({ salesBillSn: _this.salesBillSn }).then(res => {
             if (res.status == 200) {
               _this.resetSearchForm()
@@ -270,6 +271,7 @@ export default {
               _this.$message.success(res.message)
             }
             _this.delLoading = false
+            _this.spinning = false
           })
         }
       })
@@ -284,6 +286,7 @@ export default {
         closable: true,
         onOk () {
           _this.delLoading = true
+          _this.spinning = true
           salesDetailDel({ salesBillDetailSn: row.salesBillDetailSn, salesBillSn: _this.salesBillSn }).then(res => {
             if (res.status == 200) {
               _this.resetSearchForm(true)
@@ -291,6 +294,7 @@ export default {
               _this.$message.success(res.message)
             }
             _this.delLoading = false
+            _this.spinning = false
           })
         }
       })

+ 177 - 165
src/views/salesManagement/salesQuery/list.vue

@@ -1,184 +1,186 @@
 <template>
   <a-card size="small" :bordered="false" class="salesManagementList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
-              <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-              <custList id="salesManagementList-buyerName" ref="custList" @change="custChange"></custList>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="销售单号">
-              <a-input id="salesManagementList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="采购单号">
-                <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
+              <a-form-item label="创建时间">
+                <rangeDate ref="rangeDate" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="打印状态">
-                <v-select
-                  v-model="queryParam.printStatus"
-                  ref="printStatus"
-                  id="salesManagementList-printStatus"
-                  code="PRINT_STATUS"
-                  placeholder="请选择打印状态"
-                  allowClear></v-select>
+              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                <custList id="salesManagementList-buyerName" ref="custList" @change="custChange"></custList>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="业务状态">
-                <v-select
-                  v-model="queryParam.billStatus"
-                  ref="billStatus"
-                  id="salesManagementList-billStatus"
-                  code="SALES_BILL_STATUS"
-                  placeholder="请选择业务状态"
-                  allowClear></v-select>
+              <a-form-item label="销售单号">
+                <a-input id="salesManagementList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
               </a-form-item>
             </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="采购单号">
+                  <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="打印状态">
+                  <v-select
+                    v-model="queryParam.printStatus"
+                    ref="printStatus"
+                    id="salesManagementList-printStatus"
+                    code="PRINT_STATUS"
+                    placeholder="请选择打印状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="业务状态">
+                  <v-select
+                    v-model="queryParam.billStatus"
+                    ref="billStatus"
+                    id="salesManagementList-billStatus"
+                    code="SALES_BILL_STATUS"
+                    placeholder="请选择业务状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="财务状态">
+                  <v-select
+                    v-model="queryParam.financialStatus"
+                    ref="financialStatus"
+                    id="salesManagementList-financialStatus"
+                    code="FINANCIAL_RECEIVE_STATUS"
+                    placeholder="请选择财务状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+            </template>
             <a-col :md="6" :sm="24">
-              <a-form-item label="财务状态">
-                <v-select
-                  v-model="queryParam.financialStatus"
-                  ref="financialStatus"
-                  id="salesManagementList-financialStatus"
-                  code="FINANCIAL_RECEIVE_STATUS"
-                  placeholder="请选择财务状态"
-                  allowClear></v-select>
-              </a-form-item>
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+                <a @click="advanced=!advanced" style="margin-left: 8px">
+                  {{ advanced ? '收起' : '展开' }}
+                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                </a>
+              </span>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <span class="table-page-search-submitButtons">
-              <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
-              <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <!-- <div class="table-operator">
-      <a-button type="primary" class="button-error" @click="handleAdd">新增</a-button>
-    </div> -->
-    <!-- alert -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">
-        <div>
-          总单数:<strong>{{ totalData.totalRecord }}</strong>;
-          总款数:<strong>{{ totalData.totalCategory }}</strong>;
-          总数量:<strong>{{ totalData.totalQty }}</strong>;
-          已下推数量:<strong>{{ totalData.totalPushedQty }}</strong>;
-          已发货数量:<strong>{{ totalData.totalDispatchQty }}</strong>;
-          已取消数量:<strong>{{ totalData.totalCancelQty }}</strong>;
-          待下推数量:<strong>{{ totalData.totalUnpushedQty }}</strong>;
-        </div>
-        <div>
-          总售价:<strong>{{ totalData.totalAmount }}</strong>元;
-          已下推金额::<strong>{{ totalData.totalPushedAmount }}</strong>元;
-          已取消金额::<strong>{{ totalData.totalCancelAmount }}</strong>元;
-          待下推金额::<strong>{{ totalData.totalUnpushedAmount }}</strong>元;
-          已发货金额::<strong>{{ totalData.totalDispatchAmount }}</strong>元;
-        </div>
+          </a-row>
+        </a-form>
       </div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 2640, y:tableHeight }"
-      bordered>
-      <!-- 销售单号 -->
-      <template slot="salesBillNo" slot-scope="text, record">
-        <a-badge :count="'改'+record.changeTimes" :offset="[0,-10]" v-if="record.changeTimes>0">
-          <span style="color: #00aaff;cursor: pointer;" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
-        </a-badge>
-        <span v-else style="color: #00aaff;cursor: pointer;" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
-      </template>
-      <!-- 总数量 -->
-      <template slot="totalQty" slot-scope="text, record">
-        {{ record.totalQty }}
-      </template>
-      <!-- 财务状态 -->
-      <template slot="financialStatus" slot-scope="text, record">
-        <a-badge :color="text=='FINISH'?'#87d068':'gold'" :text="record.financialStatusDictValue" />
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          class="button-warning"
-          v-if="record.billStatus == 'WAIT_AUDIT'"
-          @click="handleEexamine(record)"
-        >审核</a-button>
+      <!-- 操作按钮 -->
+      <!-- <div class="table-operator">
+        <a-button type="primary" class="button-error" @click="handleAdd">新增</a-button>
+      </div> -->
+      <!-- alert -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">
+          <div>
+            总单数:<strong>{{ totalData.totalRecord }}</strong>;
+            总款数:<strong>{{ totalData.totalCategory }}</strong>;
+            总数量:<strong>{{ totalData.totalQty }}</strong>;
+            已下推数量:<strong>{{ totalData.totalPushedQty }}</strong>;
+            已发货数量:<strong>{{ totalData.totalDispatchQty }}</strong>;
+            已取消数量:<strong>{{ totalData.totalCancelQty }}</strong>;
+            待下推数量:<strong>{{ totalData.totalUnpushedQty }}</strong>;
+          </div>
+          <div>
+            总售价:<strong>{{ totalData.totalAmount }}</strong>元;
+            已下推金额::<strong>{{ totalData.totalPushedAmount }}</strong>元;
+            已取消金额::<strong>{{ totalData.totalCancelAmount }}</strong>元;
+            待下推金额::<strong>{{ totalData.totalUnpushedAmount }}</strong>元;
+            已发货金额::<strong>{{ totalData.totalDispatchAmount }}</strong>元;
+          </div>
+        </div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 2640, y:tableHeight }"
+        bordered>
+        <!-- 销售单号 -->
+        <template slot="salesBillNo" slot-scope="text, record">
+          <a-badge :count="'改'+record.changeTimes" :offset="[0,-10]" v-if="record.changeTimes>0">
+            <span style="color: #00aaff;cursor: pointer;" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
+          </a-badge>
+          <span v-else style="color: #00aaff;cursor: pointer;" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
+        </template>
+        <!-- 总数量 -->
+        <template slot="totalQty" slot-scope="text, record">
+          {{ record.totalQty }}
+        </template>
+        <!-- 财务状态 -->
+        <template slot="financialStatus" slot-scope="text, record">
+          <a-badge :color="text=='FINISH'?'#87d068':'gold'" :text="record.financialStatusDictValue" />
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-warning"
+            v-if="record.billStatus == 'WAIT_AUDIT'"
+            @click="handleEexamine(record)"
+          >审核</a-button>
 
-        <a-button
-          size="small"
-          type="link"
-          class="button-warning"
-          v-if="record.billStatus == 'OUTING_WAREHOUSE'&&record.totalUnpushedQty>0"
-          @click="handleDispatch(record)"
-        >下推</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-warning"
+            v-if="record.billStatus == 'OUTING_WAREHOUSE'&&record.totalUnpushedQty>0"
+            @click="handleDispatch(record)"
+          >下推</a-button>
 
-        <a-button
-          size="small"
-          type="link"
-          class="button-info"
-          v-if="record.salesBillSource != 'PURCHASE' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT')"
-          @click="handleEdit(record)"
-        >
-          编辑
-        </a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-info"
-          v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE')"
-          @click="handleEdit(record)"
-        >
-          改单
-        </a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-error"
-          v-if="record.salesBillSource != 'PURCHASE' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT')"
-          @click="handleDel(record)"
-        >
-          删除
-        </a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-error"
-          v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE')"
-          @click="handleDel(record)"
-        >
-          取消
-        </a-button>
-        <span v-if="record.billStatus == 'FINISH'||record.billStatus == 'CANCEL'||(record.billStatus == 'OUTING_WAREHOUSE'&&record.totalUnpushedQty<=0)">--</span>
-      </template>
-    </s-table>
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            v-if="record.salesBillSource != 'PURCHASE' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT')"
+            @click="handleEdit(record)"
+          >
+            编辑
+          </a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE')"
+            @click="handleEdit(record)"
+          >
+            改单
+          </a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            v-if="record.salesBillSource != 'PURCHASE' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT')"
+            @click="handleDel(record)"
+          >
+            删除
+          </a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE')"
+            @click="handleDel(record)"
+          >
+            取消
+          </a-button>
+          <span v-if="record.billStatus == 'FINISH'||record.billStatus == 'CANCEL'||(record.billStatus == 'OUTING_WAREHOUSE'&&record.totalUnpushedQty<=0)">--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 选择客户弹框 -->
     <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
     <!-- 审核 -->
@@ -199,6 +201,7 @@ export default {
   components: { STable, VSelect, chooseCustomModal, custList, rangeDate, auditModal },
   data () {
     return {
+      spinning: false,
       tableHeight: 0,
       advanced: false, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
@@ -296,7 +299,9 @@ export default {
     },
     // 下推
     handleDispatch (row) {
+      this.spinning = true
       findBySalesBillSn({ salesBillSn: row.salesBillSn }).then(res => {
+        this.spinning = false
         if (res.status == 200) {
           this.$router.push({ name: 'waitDispatch', params: { salesBillSn: row.salesBillSn, dispatchBillSn: res.data.dispatchBillSn } })
         }
@@ -308,6 +313,7 @@ export default {
       this.visibleAudit = true
     },
     auditOrder (billStatus) {
+      this.spinning = true
       salesWriteAudit({
         salesBillSn: this.auditInfo.salesBillSn,
         billStatus: billStatus
@@ -316,11 +322,13 @@ export default {
           this.visibleAudit = false
           this.$message.success(res.message)
           this.$refs.table.refresh()
+          this.spinning = false
           if (billStatus == 'OUTING_WAREHOUSE') {
             this.handleDispatch({ salesBillSn: this.auditInfo.salesBillSn })
           }
         } else {
           this.visibleAudit = false
+          this.spinning = false
         }
       })
     },
@@ -341,10 +349,14 @@ export default {
         centered: true,
         closable: true,
         onOk () {
+          _this.spinning = true
           salesDel({ salesBillSn: row.salesBillSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 75 - 69
src/views/salesManagement/salesReturn/detail.vue

@@ -1,74 +1,76 @@
 <template>
   <div class="salesReturnDetail-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="salesReturnDetail-cont">
-      <template slot="subTitle">
-        <a href="javascript:;" @click="handleBack">
-          <a-icon type="left"></a-icon>
-          返回列表
-        </a>
-      </template>
-      <!-- <template slot="extra">
-        <a-button key="3" id="salesReturnDetail-preview-btn">打印预览</a-button>
-        <a-button key="4" type="primary" id="salesReturnDetail-print-btn">快速打印</a-button>
-      </template> -->
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="salesReturnDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions size="small" :column="3" v-if="detailData">
-            <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="销退单号">{{ detailData.salesReturnBillNo || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="创建时间">{{ detailData.createDate || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="退货数量">{{ detailData.totalQty || detailData.totalQty == 0 ? detailData.totalQty : '--' }}</a-descriptions-item>
-            <a-descriptions-item label="坏件数量">{{ detailData.totalBadQty || detailData.totalBadQty == 0 ? detailData.totalBadQty : '--' }}</a-descriptions-item>
-            <a-descriptions-item label="返库数量">{{ detailData.totalBackStockQty || detailData.totalBackStockQty == 0 ? detailData.totalBackStockQty : '--' }}</a-descriptions-item>
-            <a-descriptions-item label="退货金额">{{ detailData.totalAmount || detailData.totalAmount == 0 ? detailData.totalAmount : '--' }}元</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-card size="small" :bordered="false" class="pages-wrap">
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="record => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1430 }"
-        bordered></s-table>
-    </a-card>
-    <a-card size="small" :bordered="false" class="footer-cont">
-      <a-button
-        type="primary"
-        class="button-warning"
-        style="width: 150px;"
-        size="large"
-        v-if="detailData&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE')"
-        @click="visibleAudit=true"
-        id="salesReturn-eexamine-btn">审核</a-button>
-      <a-button
-        type="primary"
-        class="button-info"
-        size="large"
-        style="width: 150px;"
-        id="salesDetail-edit-btn"
-        v-if="detailData&&detailData.salesReturnBillSource == 'SALES' && (detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'WAIT_SUBMIT')"
-        @click="handleEdit()"
-      >
-        编辑
-      </a-button>
-      <a-button
-        size="large"
-        style="width: 150px;"
-        v-if="detailData&&detailData.salesReturnBillSource != 'SALES' && (detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE')"
-        type="primary"
-        class="button-info"
-        @click="handleEdit()"
-        id="salesReturn-edit-btn">改单</a-button>
-    </a-card>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="salesReturnDetail-cont">
+        <template slot="subTitle">
+          <a href="javascript:;" @click="handleBack">
+            <a-icon type="left"></a-icon>
+            返回列表
+          </a>
+        </template>
+        <!-- <template slot="extra">
+          <a-button key="3" id="salesReturnDetail-preview-btn">打印预览</a-button>
+          <a-button key="4" type="primary" id="salesReturnDetail-print-btn">快速打印</a-button>
+        </template> -->
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="salesReturnDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions size="small" :column="3" v-if="detailData">
+              <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="销退单号">{{ detailData.salesReturnBillNo || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="创建时间">{{ detailData.createDate || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="退货数量">{{ detailData.totalQty || detailData.totalQty == 0 ? detailData.totalQty : '--' }}</a-descriptions-item>
+              <a-descriptions-item label="坏件数量">{{ detailData.totalBadQty || detailData.totalBadQty == 0 ? detailData.totalBadQty : '--' }}</a-descriptions-item>
+              <a-descriptions-item label="返库数量">{{ detailData.totalBackStockQty || detailData.totalBackStockQty == 0 ? detailData.totalBackStockQty : '--' }}</a-descriptions-item>
+              <a-descriptions-item label="退货金额">{{ detailData.totalAmount || detailData.totalAmount == 0 ? detailData.totalAmount : '--' }}元</a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-card size="small" :bordered="false" class="pages-wrap">
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="record => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 1430 }"
+          bordered></s-table>
+      </a-card>
+      <a-card size="small" :bordered="false" class="footer-cont">
+        <a-button
+          type="primary"
+          class="button-warning"
+          style="width: 150px;"
+          size="large"
+          v-if="detailData&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE')"
+          @click="visibleAudit=true"
+          id="salesReturn-eexamine-btn">审核</a-button>
+        <a-button
+          type="primary"
+          class="button-info"
+          size="large"
+          style="width: 150px;"
+          id="salesDetail-edit-btn"
+          v-if="detailData&&detailData.salesReturnBillSource == 'SALES' && (detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'WAIT_SUBMIT')"
+          @click="handleEdit()"
+        >
+          编辑
+        </a-button>
+        <a-button
+          size="large"
+          style="width: 150px;"
+          v-if="detailData&&detailData.salesReturnBillSource != 'SALES' && (detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE')"
+          type="primary"
+          class="button-info"
+          @click="handleEdit()"
+          id="salesReturn-edit-btn">改单</a-button>
+      </a-card>
+    </a-spin>
     <!-- 审核 -->
     <auditModal :openModal="visibleAudit" @close="visibleAudit=false" @ok="auditOrder('WAIT_CHECK')" @fail="auditOrder('AUDIT_REJECT')" />
   </div>
@@ -85,6 +87,7 @@ export default {
   components: { STable, VSelect, auditModal },
   data () {
     return {
+      spinning: false,
       disabled: false,
       // 表头
       columns: [
@@ -192,6 +195,7 @@ export default {
       this.$router.push({ name: 'salesReturnList' })
     },
     auditOrder (billStatus) {
+      this.spinning = true
       salesReturnAudit({
         salesReturnBillSn: this.detailData.salesReturnBillSn,
         billStatus: billStatus
@@ -200,8 +204,10 @@ export default {
           this.visibleAudit = false
           this.$message.success(res.message)
           this.handleBack()
+          this.spinning = false
         } else {
           this.visibleAudit = false
+          this.spinning = false
         }
       })
     },

+ 146 - 136
src/views/salesManagement/salesReturn/list.vue

@@ -1,151 +1,153 @@
 <template>
   <a-card size="small" :bordered="false" class="salesReturn-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
-              <rangeDate ref="rangeCreateDate" :value="createDate" @change="dateCreateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="审核时间">
-              <rangeDate ref="rangeExamineDate" @change="dateExamineChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-              <custList id="salesReturn-buyerSn" ref="custList" @change="custChange"></custList>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="销退单号">
-                <a-input id="salesReturn-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入销退单号"/>
+              <a-form-item label="创建时间">
+                <rangeDate ref="rangeCreateDate" :value="createDate" @change="dateCreateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="客户采退单号">
-                <a-input id="salesReturn-purchaseReturnBillNo" v-model.trim="queryParam.purchaseReturnBillNo" allowClear placeholder="请输入客户采退单号"/>
+              <a-form-item label="审核时间">
+                <rangeDate ref="rangeExamineDate" @change="dateExamineChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="业务状态">
-                <v-select
-                  v-model="queryParam.billStatus"
-                  ref="billStatus"
-                  id="salesManagementList-billStatus"
-                  code="SALES_RETURN_BILL_STATUS"
-                  placeholder="请选择业务状态"
-                  allowClear></v-select>
+              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                <custList id="salesReturn-buyerSn" ref="custList" @change="custChange"></custList>
               </a-form-item>
             </a-col>
-            <!-- <a-col :md="6" :sm="24">
-              <a-form-item label="财务状态">
-                <v-select
-                  v-model="queryParam.financialStatus"
-                  ref="financialStatus"
-                  id="salesManagementList-financialStatus"
-                  code="FINANCIAL_STATUS"
-                  placeholder="请选择财务状态"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col> -->
-          </template>
-          <a-col :md="6" :sm="24">
-            <span class="table-page-search-submitButtons">
-              <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
-              <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 8px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button type="primary" class="button-error" @click="openModal = true">新增</a-button>
-    </div>
-    <!-- alert -->
-    <a-alert type="info" style="margin-bottom: 10px;">
-      <div slot="message">
-        退货总金额:<strong>{{ countData&&countData.totalAmount }}</strong>元;
-        总单数:<strong>{{ countData&&countData.totalRecord }}</strong>;
-        总数量:<strong>{{ countData&&countData.totalQty }}</strong>;
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="销退单号">
+                  <a-input id="salesReturn-salesReturnBillNo" v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入销退单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="客户采退单号">
+                  <a-input id="salesReturn-purchaseReturnBillNo" v-model.trim="queryParam.purchaseReturnBillNo" allowClear placeholder="请输入客户采退单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="业务状态">
+                  <v-select
+                    v-model="queryParam.billStatus"
+                    ref="billStatus"
+                    id="salesManagementList-billStatus"
+                    code="SALES_RETURN_BILL_STATUS"
+                    placeholder="请选择业务状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <!-- <a-col :md="6" :sm="24">
+                <a-form-item label="财务状态">
+                  <v-select
+                    v-model="queryParam.financialStatus"
+                    ref="financialStatus"
+                    id="salesManagementList-financialStatus"
+                    code="FINANCIAL_STATUS"
+                    placeholder="请选择财务状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col> -->
+            </template>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+                <a @click="advanced=!advanced" style="margin-left: 8px">
+                  {{ advanced ? '收起' : '展开' }}
+                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                </a>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button type="primary" class="button-error" @click="openModal = true">新增</a-button>
       </div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 2220, y: tableHeight }"
-      bordered>
-      <!-- 单号 -->
-      <template slot="salesReturnBillNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesReturnBillNo }}</span>
-      </template>
-      <!-- 财务状态 -->
-      <!-- <template slot="financialStatus" slot-scope="text, record">
-        <a-badge :color="text=='FINISH'?'#87d068':'gold'" :text="record.financialStatusDictValue" />
-      </template> -->
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          class="button-warning"
-          v-if="record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE'||record.billStatus == 'FINANCIAL_REJECT'"
-          @click="handleEexamine(record)"
-          id="salesReturn-eexamine-btn">审核</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-warning"
-          v-if="record.billStatus == 'WAIT_CHECK'"
-          @click="handleCheck(record)"
-          id="salesReturn-eexamine-btn">品检</a-button>
-        <a-button
-          size="small"
-          v-if="record.salesReturnBillSource == 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'FINANCIAL_REJECT'||record.billStatus == 'AUDIT_REJECT')"
-          type="link"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="salesReturn-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          v-if="record.salesReturnBillSource != 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE'||record.billStatus == 'FINANCIAL_REJECT')"
-          type="link"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="salesReturn-edit-btn">改单</a-button>
-        <a-button
-          size="small"
-          v-if="record.salesReturnBillSource == 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'FINANCIAL_REJECT'||record.billStatus == 'AUDIT_REJECT')"
-          type="link"
-          class="button-error"
-          @click="handleDel(record)"
-          id="salesReturn-del-btn">删除</a-button>
-        <a-button
-          size="small"
-          v-if="record.salesReturnBillSource != 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE'||record.billStatus == 'FINANCIAL_REJECT')"
-          type="link"
-          class="button-error"
-          @click="handleDel(record)"
-          id="salesReturn-del-btn">取消</a-button>
-        <span
-          v-if="!(record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE'||record.billStatus == 'FINANCIAL_REJECT') &&
-            !(record.billStatus == 'WAIT_CHECK') &&
-            !(record.salesReturnBillSource == 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'FINANCIAL_REJECT'||record.billStatus == 'AUDIT_REJECT'))">--</span>
-      </template>
-    </s-table>
+      <!-- alert -->
+      <a-alert type="info" style="margin-bottom: 10px;">
+        <div slot="message">
+          退货总金额:<strong>{{ countData&&countData.totalAmount }}</strong>元;
+          总单数:<strong>{{ countData&&countData.totalRecord }}</strong>;
+          总数量:<strong>{{ countData&&countData.totalQty }}</strong>;
+        </div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 2220, y: tableHeight }"
+        bordered>
+        <!-- 单号 -->
+        <template slot="salesReturnBillNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesReturnBillNo }}</span>
+        </template>
+        <!-- 财务状态 -->
+        <!-- <template slot="financialStatus" slot-scope="text, record">
+          <a-badge :color="text=='FINISH'?'#87d068':'gold'" :text="record.financialStatusDictValue" />
+        </template> -->
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-warning"
+            v-if="record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE'||record.billStatus == 'FINANCIAL_REJECT'"
+            @click="handleEexamine(record)"
+            id="salesReturn-eexamine-btn">审核</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-warning"
+            v-if="record.billStatus == 'WAIT_CHECK'"
+            @click="handleCheck(record)"
+            id="salesReturn-eexamine-btn">品检</a-button>
+          <a-button
+            size="small"
+            v-if="record.salesReturnBillSource == 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'FINANCIAL_REJECT'||record.billStatus == 'AUDIT_REJECT')"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="salesReturn-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            v-if="record.salesReturnBillSource != 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE'||record.billStatus == 'FINANCIAL_REJECT')"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="salesReturn-edit-btn">改单</a-button>
+          <a-button
+            size="small"
+            v-if="record.salesReturnBillSource == 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'FINANCIAL_REJECT'||record.billStatus == 'AUDIT_REJECT')"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+            id="salesReturn-del-btn">删除</a-button>
+          <a-button
+            size="small"
+            v-if="record.salesReturnBillSource != 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE'||record.billStatus == 'FINANCIAL_REJECT')"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+            id="salesReturn-del-btn">取消</a-button>
+          <span
+            v-if="!(record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE'||record.billStatus == 'FINANCIAL_REJECT') &&
+              !(record.billStatus == 'WAIT_CHECK') &&
+              !(record.salesReturnBillSource == 'SALES' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'FINANCIAL_REJECT'||record.billStatus == 'AUDIT_REJECT'))">--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 选择客户弹框 -->
     <choose-custom-modal :show="openModal" @ok="handleEdit" @cancel="openModal=false"></choose-custom-modal>
     <!-- 审核 -->
@@ -174,6 +176,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       tableHeight: 0,
       // 高级搜索 展开/关闭
       advanced: false,
@@ -272,10 +275,14 @@ export default {
         content: row.salesReturnBillSource == 'SALES' ? '确认要删除吗?' : '确认要取消吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           salesReturnDel({ salesReturnBillSn: row.salesReturnBillSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -287,6 +294,7 @@ export default {
       this.visibleAudit = true
     },
     auditOrder (billStatus) {
+      this.spinning = true
       salesReturnAudit({
         salesReturnBillSn: this.auditInfo.salesReturnBillSn,
         billStatus: billStatus
@@ -295,8 +303,10 @@ export default {
           this.visibleAudit = false
           this.$message.success(res.message)
           this.$refs.table.refresh()
+          this.spinning = false
         } else {
           this.visibleAudit = false
+          this.spinning = false
         }
       })
     },

+ 6 - 0
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -158,6 +158,7 @@ export default {
       const row = chooseLoadData.find(item => item.id === id)
       if (row) {
         row[key] = Number(value)
+        this.spinning = true
         salesReturnDetailUpdateQty({
           salesReturnDetailSn: row.salesReturnDetailSn,
           qty: row.qty
@@ -165,6 +166,9 @@ export default {
           if (res.status == 200) {
             this.resetSearchForm(true)
             this.$message.success(res.message)
+            this.spinning = false
+          } else {
+            this.spinning = false
           }
         })
       }
@@ -203,12 +207,14 @@ export default {
         closable: true,
         onOk () {
           _this.delLoading = true
+          _this.spinning = true
           salesReturnDetailDel({ salesReturnDetailSn: row.salesReturnDetailSn }).then(res => {
             if (res.status == 200) {
               _this.resetSearchForm(true)
             }
             _this.$message.info(res.message)
             _this.delLoading = false
+            _this.spinning = false
           })
         }
       })

+ 2 - 0
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -210,12 +210,14 @@ export default {
         closable: true,
         onOk () {
           _this.delLoading = true
+          _this.spinning = true
           salesReturnDetailDel({ salesReturnDetailSn: row.salesReturnDetailSn }).then(res => {
             if (res.status == 200) {
               _this.resetSearchForm(true)
             }
             _this.$message.info(res.message)
             _this.delLoading = false
+            _this.spinning = false
           })
         }
       })

+ 96 - 91
src/views/salesManagement/shortageStatisticsC/list.vue

@@ -1,107 +1,109 @@
 <template>
   <a-card size="small" :bordered="false" class="shortageStatisticsCList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
-              <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品名称">
-              <a-input id="shortageStatisticsCList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="产品编码">
-              <a-input id="shortageStatisticsCList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="客户名称">
-                <custList ref="custList" id="shortageStatisticsCList-buyerSn" @change="custChange"></custList>
+              <a-form-item label="创建时间">
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="区域">
-                <subarea id="shortageStatisticsCList-subarea" v-model="queryParam.subareaSn"></subarea>
+              <a-form-item label="产品名称">
+                <a-input id="shortageStatisticsCList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品分类">
-                <a-cascader
-                  @change="changeProductType"
-                  expand-trigger="hover"
-                  change-on-select
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="shortageStatisticsCList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear
-                  v-model="productType" />
+              <a-form-item label="产品编码">
+                <a-input id="shortageStatisticsCList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
               </a-form-item>
             </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="客户名称">
+                  <custList ref="custList" id="shortageStatisticsCList-buyerSn" @change="custChange"></custList>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="区域">
+                  <subarea id="shortageStatisticsCList-subarea" v-model="queryParam.subareaSn"></subarea>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品分类">
+                  <a-cascader
+                    @change="changeProductType"
+                    expand-trigger="hover"
+                    change-on-select
+                    :options="productTypeList"
+                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                    id="shortageStatisticsCList-productType"
+                    placeholder="请选择产品分类"
+                    allowClear
+                    v-model="productType" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="销售单号">
+                  <a-input id="shortageStatisticsCList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
+                </a-form-item>
+              </a-col>
+            </template>
             <a-col :md="6" :sm="24">
-              <a-form-item label="销售单号">
-                <a-input id="shortageStatisticsCList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
-              </a-form-item>
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="shortageStatisticsCList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="shortageStatisticsCList-reset">重置</a-button>
+              <a-button
+                style="margin-left: 8px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="shortageStatisticsCList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 8px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="shortageStatisticsCList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="shortageStatisticsCList-reset">重置</a-button>
-            <a-button
-              style="margin-left: 8px"
-              type="primary"
-              class="button-warning"
-              @click="handleExport"
-              :disabled="disabled"
-              :loading="exportLoading"
-              id="shortageStatisticsCList-export">导出</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 8px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- alert -->
-    <a-alert type="info" showIcon style="margin-bottom:10px">
-      <div slot="message">
-        <div>
-          总客户数:<strong>{{ productTotal ? ((productTotal.totalBuyerQty || productTotal.totalBuyerQty==0) ? productTotal.totalBuyerQty : '--') : '--' }}</strong>,
-          总单数:<strong>{{ productTotal ? ((productTotal.totalRecord || productTotal.totalRecord==0) ? productTotal.totalRecord : '--') : '--' }}</strong>,
-          缺货总款数:<strong>{{ productTotal ? ((productTotal.totalCategory || productTotal.totalCategory==0) ? productTotal.totalCategory : '--') : '--' }}</strong>,
-          缺货总数量:<strong>{{ productTotal ? ((productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--') : '--' }}</strong>,
-          缺货总金额(¥):<strong>{{ productTotal ? ((productTotal.totalAmount || productTotal.totalAmount==0) ? productTotal.totalAmount : '--') : '--' }}</strong>
-        </div>
-        <div>
-          本页客户数:<strong>{{ currentTotal ? ((currentTotal.totalBuyerQty || currentTotal.totalBuyerQty==0) ? currentTotal.totalBuyerQty : '--') : '--' }}</strong>,
-          本页总单数:<strong>{{ currentTotal ? ((currentTotal.totalRecord || currentTotal.totalRecord==0) ? currentTotal.totalRecord : '--') : '--' }}</strong>,
-          本页缺货总款数:<strong>{{ currentTotal ? ((currentTotal.totalCategory || currentTotal.totalCategory==0) ? currentTotal.totalCategory : '--') : '--' }}</strong>,
-          本页缺货总数量:<strong>{{ currentTotal ? ((currentTotal.totalQty || currentTotal.totalQty==0) ? currentTotal.totalQty : '--') : '--' }}</strong>,
-          本页缺货总金额(¥):<strong>{{ currentTotal ? ((currentTotal.totalAmount || currentTotal.totalAmount==0) ? currentTotal.totalAmount : '--') : '--' }}</strong>
-        </div>
-      </div></a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1210, y: tableHeight }"
-      bordered>
-      <!-- 单号 -->
-      <template slot="salesBillNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
-      </template>
-    </s-table>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- alert -->
+      <a-alert type="info" showIcon style="margin-bottom:10px">
+        <div slot="message">
+          <div>
+            总客户数:<strong>{{ productTotal ? ((productTotal.totalBuyerQty || productTotal.totalBuyerQty==0) ? productTotal.totalBuyerQty : '--') : '--' }}</strong>,
+            总单数:<strong>{{ productTotal ? ((productTotal.totalRecord || productTotal.totalRecord==0) ? productTotal.totalRecord : '--') : '--' }}</strong>,
+            缺货总款数:<strong>{{ productTotal ? ((productTotal.totalCategory || productTotal.totalCategory==0) ? productTotal.totalCategory : '--') : '--' }}</strong>,
+            缺货总数量:<strong>{{ productTotal ? ((productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--') : '--' }}</strong>,
+            缺货总金额(¥):<strong>{{ productTotal ? ((productTotal.totalAmount || productTotal.totalAmount==0) ? productTotal.totalAmount : '--') : '--' }}</strong>
+          </div>
+          <div>
+            本页客户数:<strong>{{ currentTotal ? ((currentTotal.totalBuyerQty || currentTotal.totalBuyerQty==0) ? currentTotal.totalBuyerQty : '--') : '--' }}</strong>,
+            本页总单数:<strong>{{ currentTotal ? ((currentTotal.totalRecord || currentTotal.totalRecord==0) ? currentTotal.totalRecord : '--') : '--' }}</strong>,
+            本页缺货总款数:<strong>{{ currentTotal ? ((currentTotal.totalCategory || currentTotal.totalCategory==0) ? currentTotal.totalCategory : '--') : '--' }}</strong>,
+            本页缺货总数量:<strong>{{ currentTotal ? ((currentTotal.totalQty || currentTotal.totalQty==0) ? currentTotal.totalQty : '--') : '--' }}</strong>,
+            本页缺货总金额(¥):<strong>{{ currentTotal ? ((currentTotal.totalAmount || currentTotal.totalAmount==0) ? currentTotal.totalAmount : '--') : '--' }}</strong>
+          </div>
+        </div></a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1210, y: tableHeight }"
+        bordered>
+        <!-- 单号 -->
+        <template slot="salesBillNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -118,6 +120,7 @@ export default {
   components: { STable, VSelect, custList, subarea, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -227,8 +230,10 @@ export default {
       const _this = this
       const params = this.queryParam
       this.exportLoading = true
+      _this.spinning = true
       oosDetailExport(params).then(res => {
         this.exportLoading = false
+        _this.spinning = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 76 - 69
src/views/setting/noticeManagement/list.vue

@@ -1,74 +1,76 @@
 <template>
   <a-card size="small" :bordered="false" class="noticeList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="标题">
-              <a-input id="noticeList-title" v-model.trim="queryParam.title" allowClear placeholder="请输入标题"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="类别">
-              <v-select code="NOTITY_BIZ_TYPE" id="noticeList-type" v-model="queryParam.type" allowClear placeholder="请选择类别"></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="发布状态">
-              <v-select code="NOTITY_SEND_STATUS" id="noticeList-sendStatus" v-model="queryParam.sendStatus" allowClear placeholder="请选择发布状态"></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="noticeList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="noticeList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="noticeList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
-    </div>
-    <!-- 总计 -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">合计:<strong>{{ total || 0 }}</strong>条</div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1230, y: tableHeight }"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          class="button-info"
-          v-if="record.sendStatus=='0'"
-          @click="handleEdit(record)"
-          id="noticeList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-success"
-          v-if="record.sendStatus=='1'"
-          @click="handleDetail(record)"
-          id="noticeList-detail-btn">详情</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-error"
-          v-if="record.sendStatus=='0'"
-          @click="handleDel(record)"
-          id="noticeList-del-btn">删除</a-button>
-      </template>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="标题">
+                <a-input id="noticeList-title" v-model.trim="queryParam.title" allowClear placeholder="请输入标题"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="类别">
+                <v-select code="NOTITY_BIZ_TYPE" id="noticeList-type" v-model="queryParam.type" allowClear placeholder="请选择类别"></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="发布状态">
+                <v-select code="NOTITY_SEND_STATUS" id="noticeList-sendStatus" v-model="queryParam.sendStatus" allowClear placeholder="请选择发布状态"></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="noticeList-refresh">查询</a-button>
+              <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="noticeList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="noticeList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
+      </div>
+      <!-- 总计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">合计:<strong>{{ total || 0 }}</strong>条</div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1230, y: tableHeight }"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            v-if="record.sendStatus=='0'"
+            @click="handleEdit(record)"
+            id="noticeList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-success"
+            v-if="record.sendStatus=='1'"
+            @click="handleDetail(record)"
+            id="noticeList-detail-btn">详情</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            v-if="record.sendStatus=='0'"
+            @click="handleDel(record)"
+            id="noticeList-del-btn">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 编辑 -->
     <notice-edit-modal :openModal="openModal" :itemId="itemId" @close="closeModal" @ok="$refs.table.refresh()" />
     <!-- 详情 -->
@@ -85,6 +87,7 @@ export default {
   components: { STable, VSelect, noticeEditModal, noticeDetailModal },
   data () {
     return {
+      spinning: false,
       tableHeight: 0,
       queryParam: { //  查询条件
         title: '',
@@ -169,10 +172,14 @@ export default {
         content: '确认要删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           noticeDel({ id: row.id }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 95 - 80
src/views/supplierManagement/associatedProduct/add.vue

@@ -1,88 +1,90 @@
 <template>
   <div class="associatedProduct-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="associatedProduct-head" @back="handleBack" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <span style="margin: 0 15px;color: #666;">供应商名称:{{ decodeURI($route.params.name) }}</span>
-      </template>
-    </a-page-header>
-    <!-- 列表 -->
-    <a-card size="small" :bordered="false">
-      <!-- 搜索条件 -->
-      <div class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-          <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
-              <a-form-item label="产品名称">
-                <a-input id="associatedProduct-name" v-model.trim="queryParam.product.name" allowClear placeholder="请输入产品名称"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="产品编码/原厂编码">
-                <a-input id="associatedProduct-queryWord" v-model.trim="queryParam.product.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="品牌">
-                <ProductBrand id="associatedProduct-productBrandSn" v-model="queryParam.product.productBrandSn"></ProductBrand>
-              </a-form-item>
-            </a-col>
-            <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="associatedProduct-head" @back="handleBack" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span style="margin: 0 15px;color: #666;">供应商名称:{{ decodeURI($route.params.name) }}</span>
+        </template>
+      </a-page-header>
+      <!-- 列表 -->
+      <a-card size="small" :bordered="false">
+        <!-- 搜索条件 -->
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-row :gutter="15">
               <a-col :md="6" :sm="24">
-                <a-form-item label="产品分类">
-                  <ProductType id="associatedProduct-productType" v-model="productType" @change="changeProductType"></ProductType>
+                <a-form-item label="产品名称">
+                  <a-input id="associatedProduct-name" v-model.trim="queryParam.product.name" allowClear placeholder="请输入产品名称"/>
                 </a-form-item>
               </a-col>
-            </template>
-            <a-col :md="6" :sm="24">
-              <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="associatedProduct-refresh">查询</a-button>
-              <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="associatedProduct-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>
-      </div>
-		<!-- 操作按钮 -->
-		<div class="table-operator">
-		  <a-button id="associatedProduct-addProduct-btn" type="primary" class="button-error" @click="choosePModal">增加产品</a-button>
-		  <!-- <a-button id="associatedProduct-import-btn" type="primary" class="button-success">批量导入</a-button> -->
-		</div>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="default"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1410, y: tableHeight }"
-        bordered>
-        <!-- 产品分类 -->
-        <template slot="productType" slot-scope="text, record">
-          <span v-if="record.product.productTypeName2 || record.product.productTypeName3">{{ record.product.productTypeName2 }} {{ record.product.productTypeName3 ? '>' : '' }} {{ record.product.productTypeName3 }}</span>
-          <span v-else>--</span>
-        </template>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-button
-            size="small"
-            type="link"
-            class="button-info"
-            @click="handleSetPrice(record)"
-            id="associatedProduct-setCostPrice-btn">设置成本价</a-button>
-          <a-button
-            size="small"
-            type="link"
-            class="button-error"
-            @click="handleDel(record)"
-            id="associatedProduct-del-btn">删除</a-button>
-        </template>
-      </s-table>
-    </a-card>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品编码/原厂编码">
+                  <a-input id="associatedProduct-queryWord" v-model.trim="queryParam.product.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="品牌">
+                  <ProductBrand id="associatedProduct-productBrandSn" v-model="queryParam.product.productBrandSn"></ProductBrand>
+                </a-form-item>
+              </a-col>
+              <template v-if="advanced">
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="产品分类">
+                    <ProductType id="associatedProduct-productType" v-model="productType" @change="changeProductType"></ProductType>
+                  </a-form-item>
+                </a-col>
+              </template>
+              <a-col :md="6" :sm="24">
+                <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="associatedProduct-refresh">查询</a-button>
+                <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="associatedProduct-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>
+        </div>
+        <!-- 操作按钮 -->
+        <div class="table-operator">
+          <a-button id="associatedProduct-addProduct-btn" type="primary" class="button-error" @click="choosePModal">增加产品</a-button>
+        <!-- <a-button id="associatedProduct-import-btn" type="primary" class="button-success">批量导入</a-button> -->
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="default"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ x: 1410, y: tableHeight }"
+          bordered>
+          <!-- 产品分类 -->
+          <template slot="productType" slot-scope="text, record">
+            <span v-if="record.product.productTypeName2 || record.product.productTypeName3">{{ record.product.productTypeName2 }} {{ record.product.productTypeName3 ? '>' : '' }} {{ record.product.productTypeName3 }}</span>
+            <span v-else>--</span>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              class="button-info"
+              @click="handleSetPrice(record)"
+              id="associatedProduct-setCostPrice-btn">设置成本价</a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-error"
+              @click="handleDel(record)"
+              id="associatedProduct-del-btn">删除</a-button>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
     <!-- 设置成本价 -->
     <SettingCost ref="settingCost" :openModal="openModal" @ok="$refs.table.refresh()" @close="openModal=false"></SettingCost>
     <!-- 选择产品 -->
@@ -101,6 +103,7 @@ export default {
   components: { STable, VSelect, ProductBrand, ProductType, SettingCost, ChooseProductsModal },
   data () {
     return {
+      spinning: false,
       disabled: false,
       advanced: false,
       tableHeight: 0,
@@ -178,10 +181,14 @@ export default {
         centered: true,
         closable: true,
         onOk () {
+          _this.spinning = true
           deleteProduct({ sn: row.supplierProductSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -195,10 +202,14 @@ export default {
     // 增加产品
     choosePModal () {
       // 查询所有已选sn
+      this.spinning = true
       supplierProductSnList({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.chooseProducts = res.data //  包含先前所选产品
+          this.spinning = false
           this.newProduct = true
+        } else {
+          this.spinning = false
         }
       })
     },
@@ -211,6 +222,7 @@ export default {
     },
     // 添加产品  数据处理
     addProduct () {
+      this.spinning = true
       addProduct({
         supplierSn: this.$route.params.sn,
         productSnList: this.chooseProducts
@@ -219,6 +231,9 @@ export default {
           this.$message.success(res.message)
           this.$refs.table.refresh()
           this.newProduct = false
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     }

+ 0 - 1
src/views/supplierManagement/supplierInfo/edit.vue

@@ -357,7 +357,6 @@ export default {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          console.log(_this.form, 'form data')
           const form = JSON.parse(JSON.stringify(_this.form))
           if (form.buildDate) {
             form.buildDate = moment(form.buildDate).format('YYYY-MM-DD') + ' 00:00:00'

+ 52 - 45
src/views/supplierManagement/supplierInfo/list.vue

@@ -1,48 +1,50 @@
 <template>
   <a-card size="small" :bordered="false" class="supplierInfoList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="供应商名称">
-              <a-input id="supplierInfoList-supplierName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入供应商名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="supplierInfoList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="supplierInfoList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="supplierInfoList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-    </div>
-    <!-- 总计 -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">合计:<strong>{{ total }}</strong>条</div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      bordered>
-      <!-- 状态 -->
-      <template slot="enabledFlag" slot-scope="text, record">
-        <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.enableFlag" @change="changeFlagHandle(text, record)"/>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" class="button-warning" @click="handleRelated(record)" id="supplierInfoList-related-btn">关联产品</a-button>
-        <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="supplierInfoList-edit-btn">编辑</a-button>
-      </template>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="供应商名称">
+                <a-input id="supplierInfoList-supplierName" v-model.trim="queryParam.supplierName" allowClear placeholder="请输入供应商名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="supplierInfoList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="supplierInfoList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="supplierInfoList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+      </div>
+      <!-- 总计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">合计:<strong>{{ total }}</strong>条</div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        bordered>
+        <!-- 状态 -->
+        <template slot="enabledFlag" slot-scope="text, record">
+          <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.enableFlag" @change="changeFlagHandle(text, record)"/>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button size="small" type="link" class="button-warning" @click="handleRelated(record)" id="supplierInfoList-related-btn">关联产品</a-button>
+          <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="supplierInfoList-edit-btn">编辑</a-button>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -53,6 +55,7 @@ export default {
   components: { STable, VSelect },
   data () {
     return {
+      spinning: false,
       queryParam: { //  查询条件
         supplierName: '' //  供应商名称
       },
@@ -108,11 +111,15 @@ export default {
         sn: record.supplierSn,
         flag: record.enableFlag ? '1' : '0'
       }
+      this.spinning = true
       updateEnableStatus(_data).then(res => {
-        if (res.status + '' === '200') {
+        if (res.status == 200) {
           this.$message.success(res.message)
+          this.$refs.table.refresh()
+          this.spinning = false
         } else {
-          record.enableFlag = !record.enableFlag
+          this.$refs.table.refresh()
+          this.spinning = false
         }
       })
     }