浏览代码

操作按钮 加载中

chenrui 3 年之前
父节点
当前提交
b52f6d6b87
共有 65 个文件被更改,包括 3739 次插入3778 次删除
  1. 0 10
      src/config/router.config.js
  2. 0 1
      src/views/allocationManagement/chainTransferIn/edit.vue
  3. 112 105
      src/views/allocationManagement/chainTransferIn/list.vue
  4. 8 0
      src/views/allocationManagement/chainTransferOut/edit.vue
  5. 131 116
      src/views/allocationManagement/chainTransferOut/list.vue
  6. 4 0
      src/views/allocationManagement/storeTransferOut/edit.vue
  7. 122 107
      src/views/allocationManagement/storeTransferOut/list.vue
  8. 0 4
      src/views/allocationManagement/warehouseAllocation/detail.vue
  9. 4 1
      src/views/allocationManagement/warehouseAllocation/edit.vue
  10. 104 93
      src/views/allocationManagement/warehouseAllocation/list.vue
  11. 40 33
      src/views/basicData/bulkPartsTypeManagement/list.vue
  12. 57 49
      src/views/basicData/customerTypeManagement/list.vue
  13. 0 1
      src/views/basicData/expenseType/editModal.vue
  14. 51 44
      src/views/basicData/expenseType/list.vue
  15. 42 35
      src/views/basicData/storeTransferOutTypeManagement/list.vue
  16. 4 3
      src/views/bulkManagement/bulkWarehousingOrder/edit.vue
  17. 133 120
      src/views/bulkManagement/bulkWarehousingOrder/list.vue
  18. 124 113
      src/views/customerManagement/customerInfo/list.vue
  19. 7 7
      src/views/financialManagement/companyReceivablePayable/collectionPayment.vue
  20. 56 56
      src/views/financialManagement/expenseManagement/edit.vue
  21. 114 103
      src/views/financialManagement/expenseManagement/list.vue
  22. 8 8
      src/views/financialManagement/financialCollection/detailModal.vue
  23. 120 189
      src/views/financialManagement/financialCollection/list.vue
  24. 8 8
      src/views/financialManagement/financialPayment/detailModal.vue
  25. 117 186
      src/views/financialManagement/financialPayment/list.vue
  26. 87 80
      src/views/financialManagement/warehousingAudit/list.vue
  27. 0 1
      src/views/inventoryManagement/inventoryQuery/detailModal.vue
  28. 102 98
      src/views/inventoryManagement/inventoryQuery/list.vue
  29. 153 147
      src/views/inventoryManagement/inventoryWarning/list.vue
  30. 61 54
      src/views/inventoryManagement/satelliteWarehouseInventory/list.vue
  31. 63 58
      src/views/inventoryManagement/warehouse/list.vue
  32. 64 57
      src/views/inventoryManagement/warehouse/storingLocation/list.vue
  33. 177 181
      src/views/power/dataDictionary/codeItemModal.vue
  34. 78 83
      src/views/power/dataDictionary/codeModal.vue
  35. 103 106
      src/views/power/dataDictionary/dataDictionary.vue
  36. 34 31
      src/views/power/role/menuModal.vue
  37. 77 71
      src/views/power/role/roleList.vue
  38. 64 67
      src/views/power/role/roleModal.vue
  39. 77 64
      src/views/power/user/userList.vue
  40. 98 93
      src/views/power/user/userModal.vue
  41. 28 23
      src/views/power/user/userSyncModal.vue
  42. 0 20
      src/views/productManagement/priceChangeRecord/list.vue
  43. 65 59
      src/views/productManagement/productBrand/list.vue
  44. 52 45
      src/views/productManagement/productCategory/list.vue
  45. 6 6
      src/views/productManagement/productInfo/edit.vue
  46. 120 113
      src/views/productManagement/productInfo/list.vue
  47. 6 2
      src/views/purchasingManagement/purchaseOrder/edit.vue
  48. 127 120
      src/views/purchasingManagement/purchaseOrder/list.vue
  49. 74 63
      src/views/purchasingManagement/purchaseOrder/receivingAddress/chooseAddressModal.vue
  50. 2 3
      src/views/purchasingManagement/purchaseOrder/warehousing.vue
  51. 8 0
      src/views/purchasingManagement/purchaseReturn/edit.vue
  52. 98 87
      src/views/purchasingManagement/purchaseReturn/list.vue
  53. 0 156
      src/views/salesManagement/outboundOrder/detail.vue
  54. 96 91
      src/views/salesManagement/outboundOrder/list.vue
  55. 4 2
      src/views/salesManagement/salesQuery/chooseCustomModal.vue
  56. 8 2
      src/views/salesManagement/salesQuery/edit.vue
  57. 170 174
      src/views/salesManagement/salesQuery/list.vue
  58. 1 2
      src/views/salesManagement/salesQuery/productSalesRecordModal.vue
  59. 4 4
      src/views/salesManagement/salesReturn/chooseCustomModal.vue
  60. 120 109
      src/views/salesManagement/salesReturn/list.vue
  61. 8 0
      src/views/salesManagement/salesReturn/salesReturnEdit.vue
  62. 9 3
      src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue
  63. 4 0
      src/views/salesManagement/urgentItemsOffset/detail.vue
  64. 58 51
      src/views/storeManagement/bind/list.vue
  65. 67 60
      src/views/storeManagement/userAuthorization/list.vue

+ 0 - 10
src/config/router.config.js

@@ -136,16 +136,6 @@ export const asyncRouterMap = [
                   hidden: true,
                   permission: 'M_outboundList'
                 }
-              },
-              {
-                path: 'detail/:id',
-                name: 'outboundOrderDetail',
-                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/outboundOrder/detail.vue'),
-                meta: {
-                  title: '出库明细',
-                  icon: 'export',
-                  hidden: true
-                }
               }
             ]
           },

+ 0 - 1
src/views/allocationManagement/chainTransferIn/edit.vue

@@ -317,7 +317,6 @@ export default {
             }
           })
           this.warehouseCascadeData = res.data
-          console.log(this.warehouseCascadeData)
         } else {
           this.warehouseCascadeData = []
         }

+ 112 - 105
src/views/allocationManagement/chainTransferIn/list.vue

@@ -1,118 +1,120 @@
 <template>
   <a-card size="small" :bordered="false" class="chainTransferInList-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-select
-                placeholder="请选择调出对象"
-                allowClear
-                id="chainTransferInList-outTenantSn"
-                v-model="queryParam.outTenantSn"
-                :showSearch="true"
-                option-filter-prop="children"
-                :filter-option="filterOption">
-                <a-select-option v-for="item in outTenantSnData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="调拨产品类型">
-              <v-select
-                v-model="queryParam.allocationType"
-                ref="allocationType"
-                id="chainTransferInList-allocationType"
-                code="ALLOCATION_LINKAGE_PRODUCT_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="chainTransferInList-state"
-                  code="ALLOCATION_LINKAGE_PUT_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-select
+                  placeholder="请选择调出对象"
+                  allowClear
+                  id="chainTransferInList-outTenantSn"
+                  v-model="queryParam.outTenantSn"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in outTenantSnData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
+                </a-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="财务状态">
+              <a-form-item label="调拨产品类型">
                 <v-select
-                  v-model="queryParam.settleState"
-                  ref="settleState"
-                  id="chainTransferInList-settleState"
-                  code="FINANCIAL_PAY_STATUS"
-                  placeholder="请选择财务状态"
+                  v-model="queryParam.allocationType"
+                  ref="allocationType"
+                  id="chainTransferInList-allocationType"
+                  code="ALLOCATION_LINKAGE_PRODUCT_TYPE"
+                  placeholder="请选择调拨产品类型"
                   allowClear></v-select>
               </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="chainTransferInList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferInList-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: 1650, y: tableHeight }"
-      bordered>
-      <!-- 连锁调入单号 -->
-      <template slot="allocationLinkagePutNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.allocationLinkagePutNo }}</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_SUBMIT'"
-          class="button-primary"
-          @click="handleEdit(record)"
-          id="chainTransferInList-warehousing-btn">入库</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state == 'WAIT_AUDIT'"
-          class="button-warning"
-          @click="handleExamine(record)"
-          id="chainTransferInList-examine-btn">审核</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state == 'WAIT_AUDIT'"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="chainTransferInList-edit-btn">编辑</a-button>
-        <span v-if="(record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT')">--</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="chainTransferInList-state"
+                    code="ALLOCATION_LINKAGE_PUT_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.settleState"
+                    ref="settleState"
+                    id="chainTransferInList-settleState"
+                    code="FINANCIAL_PAY_STATUS"
+                    placeholder="请选择财务状态"
+                    allowClear></v-select>
+                </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="chainTransferInList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferInList-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: 1650, y: tableHeight }"
+        bordered>
+        <!-- 连锁调入单号 -->
+        <template slot="allocationLinkagePutNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.allocationLinkagePutNo }}</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_SUBMIT'"
+            class="button-primary"
+            @click="handleEdit(record)"
+            id="chainTransferInList-warehousing-btn">入库</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_AUDIT'"
+            class="button-warning"
+            @click="handleExamine(record)"
+            id="chainTransferInList-examine-btn">审核</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_AUDIT'"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="chainTransferInList-edit-btn">编辑</a-button>
+          <span v-if="(record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT')">--</span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -125,6 +127,7 @@ export default {
   components: { STable, VSelect, rangeDate },
   data () {
     return {
+      spinning: false,
       tableHeight: 0,
       advanced: false, // 高级搜索 展开/关闭
       queryParam: { //  查询条件
@@ -202,10 +205,14 @@ export default {
         content: '确认要审核通过吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           allocLinkagePutAudit({ sn: row.allocationLinkagePutSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 8 - 0
src/views/allocationManagement/chainTransferOut/edit.vue

@@ -369,19 +369,27 @@ export default {
         centered: true,
         onOk () {
           if (isAll) { //  整单删除
+            _this.spinning = true
             allocLinkageOutDetailDelAll({ sn: _this.$route.params.sn }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
                 _this.getProductList()
                 _this.$refs.chooseTable.refresh()
+                _this.spinning = false
+              } else {
+                _this.spinning = false
               }
             })
           } else { //  单个删除
+            _this.spinning = true
             allocLinkageOutDetailDel({ id: row.id }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
                 _this.getProductList()
                 _this.$refs.chooseTable.refresh()
+                _this.spinning = false
+              } else {
+                _this.spinning = false
               }
             })
           }

+ 131 - 116
src/views/allocationManagement/chainTransferOut/list.vue

@@ -1,129 +1,131 @@
 <template>
   <a-card size="small" :bordered="false" class="chainTransferOutList-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="createDate" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="调往对象">
-              <a-select
-                placeholder="请选择调往对象"
-                allowClear
-                id="chainTransferOutList-putTenantSn"
-                v-model="queryParam.putTenantSn"
-                :showSearch="true"
-                option-filter-prop="children"
-                :filter-option="filterOption">
-                <a-select-option v-for="item in putTenantSnData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="调出产品类型">
-              <v-select
-                v-model="queryParam.allocationType"
-                ref="allocationType"
-                id="chainTransferOutList-allocationType"
-                code="ALLOCATION_LINKAGE_PRODUCT_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="chainTransferOutList-state"
-                  code="ALLOCATION_LINKAGE_OUT_STATUS"
-                  placeholder="请选择业务状态"
-                  allowClear></v-select>
+              <a-form-item label="创建时间">
+                <rangeDate ref="rangeDate" :value="createDate" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="调往对象">
+                <a-select
+                  placeholder="请选择调往对象"
+                  allowClear
+                  id="chainTransferOutList-putTenantSn"
+                  v-model="queryParam.putTenantSn"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in putTenantSnData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
+                </a-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="财务状态">
+              <a-form-item label="调出产品类型">
                 <v-select
-                  v-model="queryParam.settleState"
-                  ref="settleState"
-                  id="chainTransferOutList-settleState"
-                  code="FINANCIAL_RECEIVE_STATUS"
-                  placeholder="请选择财务状态"
+                  v-model="queryParam.allocationType"
+                  ref="allocationType"
+                  id="chainTransferOutList-allocationType"
+                  code="ALLOCATION_LINKAGE_PRODUCT_TYPE"
+                  placeholder="请选择调出产品类型"
                   allowClear></v-select>
               </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="chainTransferOutList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferOutList-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="chainTransferOutList-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: 1670, y: tableHeight }"
-      bordered>
-      <!-- 连锁调出单号 -->
-      <template slot="allocationLinkageOutNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.allocationLinkageOutNo }}</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="chainTransferOutList-examine-btn">审核</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state == 'WAIT_SUBMIT' || record.state == 'WAIT_AUDIT'"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="chainTransferOutList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state == 'WAIT_OUT_WAREHOUSE'"
-          class="button-primary"
-          @click="handleOut(record)"
-          id="chainTransferOutList-out-btn">出库</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state == 'WAIT_SUBMIT' || record.state == 'WAIT_AUDIT' || record.state == 'WAIT_OUT_WAREHOUSE'"
-          class="button-error"
-          @click="handleDel(record)"
-          id="chainTransferOutList-del-btn">删除</a-button>
-        <span v-if="record.state != 'WAIT_SUBMIT' && record.state != 'WAIT_AUDIT' && record.state != 'WAIT_OUT_WAREHOUSE'">--</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="chainTransferOutList-state"
+                    code="ALLOCATION_LINKAGE_OUT_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.settleState"
+                    ref="settleState"
+                    id="chainTransferOutList-settleState"
+                    code="FINANCIAL_RECEIVE_STATUS"
+                    placeholder="请选择财务状态"
+                    allowClear></v-select>
+                </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="chainTransferOutList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="chainTransferOutList-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="chainTransferOutList-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: 1670, y: tableHeight }"
+        bordered>
+        <!-- 连锁调出单号 -->
+        <template slot="allocationLinkageOutNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.allocationLinkageOutNo }}</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="chainTransferOutList-examine-btn">审核</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_SUBMIT' || record.state == 'WAIT_AUDIT'"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="chainTransferOutList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_OUT_WAREHOUSE'"
+            class="button-primary"
+            @click="handleOut(record)"
+            id="chainTransferOutList-out-btn">出库</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_SUBMIT' || record.state == 'WAIT_AUDIT' || record.state == 'WAIT_OUT_WAREHOUSE'"
+            class="button-error"
+            @click="handleDel(record)"
+            id="chainTransferOutList-del-btn">删除</a-button>
+          <span v-if="record.state != 'WAIT_SUBMIT' && record.state != 'WAIT_AUDIT' && record.state != 'WAIT_OUT_WAREHOUSE'">--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑 -->
     <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
   </a-card>
@@ -140,6 +142,7 @@ export default {
   components: { STable, VSelect, basicInfoModal, rangeDate },
   data () {
     return {
+      spinning: false,
       tableHeight: 0,
       advanced: false, // 高级搜索 展开/关闭
       createDate: [
@@ -219,10 +222,14 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           allocLinkageOutDel({ sn: row.allocationLinkageOutSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -236,10 +243,14 @@ export default {
         content: '确认要出库吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           allocLinkageOutStock({ sn: row.allocationLinkageOutSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -253,10 +264,14 @@ export default {
         content: '确认要审核通过吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           allocLinkageAudit({ sn: row.allocationLinkageOutSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 4 - 0
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -394,11 +394,15 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           storeCallOutDetailDel({ id: row.id }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
               _this.getChooseProductList()
+              _this.spinning = false
+            }else{
+              _this.spinning = false
             }
           })
         }

+ 122 - 107
src/views/allocationManagement/storeTransferOut/list.vue

@@ -1,118 +1,120 @@
 <template>
   <a-card size="small" :bordered="false" class="storeTransferOutList-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="storeTransferOutList-putPersonName" v-model.trim="queryParam.putPersonName" allowClear placeholder="请输入调往对象名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="调拨类型">
-              <a-select id="storeTransferOutList-callOutType" v-model="queryParam.callOutType" placeholder="请选择调拨类型" allowClear >
-                <a-select-option v-for="item in storeCallOutTypeList" :key="item.storeCallOutTypeSn" :value="item.storeCallOutTypeSn">{{ 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="storeTransferOutList-state"
-                  code="STORE_CALL_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="财务状态">
-                <v-select
-                  v-model="queryParam.settleState"
-                  ref="settleState"
-                  id="storeTransferOutList-settleState"
-                  code="FINANCIAL_RECEIVE_STATUS"
-                  placeholder="请选择财务状态"
-                  allowClear
-                ></v-select>
+              <a-form-item label="调往对象名称">
+                <a-input id="storeTransferOutList-putPersonName" v-model.trim="queryParam.putPersonName" 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="storeTransferOutList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-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="storeTransferOutList-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: 1500, y: tableHeight }"
-      bordered>
-      <!-- 店内调出单号 -->
-      <template slot="storeCallOutNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.storeCallOutNo }}</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="storeTransferOutList-examine-btn">审核</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT')"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="storeTransferOutList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state == 'WAIT_OUT_WAREHOUSE'"
-          class="button-primary"
-          @click="handleOut(record)"
-          id="storeTransferOutList-out-btn">出库</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT') || (record.state == 'WAIT_OUT_WAREHOUSE')"
-          class="button-error"
-          @click="handleDel(record)"
-          id="storeTransferOutList-del-btn">删除</a-button>
-        <span v-if="(record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT') && (record.state != 'WAIT_OUT_WAREHOUSE')">--</span>
-      </template>
-    </s-table>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="调拨类型">
+                <a-select id="storeTransferOutList-callOutType" v-model="queryParam.callOutType" placeholder="请选择调拨类型" allowClear >
+                  <a-select-option v-for="item in storeCallOutTypeList" :key="item.storeCallOutTypeSn" :value="item.storeCallOutTypeSn">{{ 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="storeTransferOutList-state"
+                    code="STORE_CALL_OUT_STATE"
+                    placeholder="请选择业务状态"
+                    allowClear
+                  ></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="财务状态">
+                  <v-select
+                    v-model="queryParam.settleState"
+                    ref="settleState"
+                    id="storeTransferOutList-settleState"
+                    code="FINANCIAL_RECEIVE_STATUS"
+                    placeholder="请选择财务状态"
+                    allowClear
+                  ></v-select>
+                </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="storeTransferOutList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-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="storeTransferOutList-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: 1500, y: tableHeight }"
+        bordered>
+        <!-- 店内调出单号 -->
+        <template slot="storeCallOutNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.storeCallOutNo }}</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="storeTransferOutList-examine-btn">审核</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT')"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="storeTransferOutList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_OUT_WAREHOUSE'"
+            class="button-primary"
+            @click="handleOut(record)"
+            id="storeTransferOutList-out-btn">出库</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT') || (record.state == 'WAIT_OUT_WAREHOUSE')"
+            class="button-error"
+            @click="handleDel(record)"
+            id="storeTransferOutList-del-btn">删除</a-button>
+          <span v-if="(record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT') && (record.state != 'WAIT_OUT_WAREHOUSE')">--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑 -->
     <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
   </a-card>
@@ -128,6 +130,7 @@ export default {
   components: { STable, VSelect, basicInfoModal, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -203,10 +206,14 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           storeCallOutDel({ 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
             }
           })
         }
@@ -220,10 +227,14 @@ export default {
         content: '确认要出库吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           storeCallOutOut({ storeCallOutSn: row.storeCallOutSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -237,10 +248,14 @@ export default {
         content: '确认要审核通过吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           storeCallOutAudit({ 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
             }
           })
         }

+ 0 - 4
src/views/allocationManagement/warehouseAllocation/detail.vue

@@ -13,7 +13,6 @@
           @click.stop="handleEdit">
           编辑
         </a-button>
-        <!-- <a id="warehouseAllocationDetail-back-edit" style="color: #1890ff;margin-left: 20px;" href="javascript:;" @click="handleBack">编辑</a> -->
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
       <!-- <template slot="extra">
@@ -174,10 +173,7 @@ export default {
   },
   beforeRouteEnter (to, from, next) {
     next(vm => {
-      // vm.getProductBrand()
-      // vm.getProductType()
       vm.getHouse()
-      console.log(vm.id, vm.$route.params, 'vm.id')
     })
   }
 }

+ 4 - 1
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -425,11 +425,15 @@ export default {
           } else { //  单个删除
             params = { id: row.id }
           }
+          _this.spinning = true
           allocWarehouseDetailDel(params).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.getProductList()
               _this.getChooseProductList()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -605,7 +609,6 @@ export default {
   beforeRouteEnter (to, from, next) {
     next(vm => {
       vm.getDetail()
-      // vm.getProductList(1)
       vm.getChooseProductList(1)
       vm.getProductBrand()
       vm.getProductType()

+ 104 - 93
src/views/allocationManagement/warehouseAllocation/list.vue

@@ -1,101 +1,103 @@
 <template>
   <a-card size="small" :bordered="false" class="warehouseAllocationList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" ref="searchForm" :model="queryParam" @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-select id="warehouseAllocation-basicInfo-outWarehouseSn" allowClear placeholder="请选择调出仓库" v-model="queryParam.outWarehouseSn">
-                <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="调入仓库">
-              <a-select id="warehouseAllocation-basicInfo-putWarehouseSn" allowClear placeholder="请选择调入仓库" v-model="queryParam.putWarehouseSn">
-                <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">{{ 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" ref="searchForm" :model="queryParam" @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="warehouseAllocationList-state"
-                  code="ALLOCATION_WAREHOUSE_STATE"
-                  placeholder="请选择业务状态"
-                  allowClear
-                ></v-select>
+              <a-form-item label="创建时间">
+                <rangeDate ref="rangeDate" @change="dateChange" />
               </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="warehouseAllocationList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="warehouseAllocationList-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="warehouseAllocationList-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: 1500, y: tableHeight }"
-      bordered>
-      <!-- 单号 -->
-      <template slot="allocationWarehouseNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.allocationWarehouseNo }}</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          v-if="record.state == 'WAIT_AUDIT'"
-          size="small"
-          type="link"
-          class="button-warning"
-          @click="handleExamine(record)"
-          id="warehouseAllocationList-examine-btn">
-          审核
-        </a-button>
-        <a-button
-          v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT')"
-          size="small"
-          type="link"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="warehouseAllocationList-edit-btn">
-          编辑
-        </a-button>
-        <a-button
-          v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT')"
-          size="small"
-          type="link"
-          class="button-error"
-          @click="handleDel(record)"
-          id="warehouseAllocationList-del-btn">
-          删除
-        </a-button>
-        <span v-if="(record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT')">--</span>
-      </template>
-    </s-table>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="调出仓库">
+                <a-select id="warehouseAllocation-basicInfo-outWarehouseSn" allowClear placeholder="请选择调出仓库" v-model="queryParam.outWarehouseSn">
+                  <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">{{ item.name }}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="调入仓库">
+                <a-select id="warehouseAllocation-basicInfo-putWarehouseSn" allowClear placeholder="请选择调入仓库" v-model="queryParam.putWarehouseSn">
+                  <a-select-option v-for="(item, index) in warehouseList" :key="index" :value="item.warehouseSn">{{ 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="warehouseAllocationList-state"
+                    code="ALLOCATION_WAREHOUSE_STATE"
+                    placeholder="请选择业务状态"
+                    allowClear
+                  ></v-select>
+                </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="warehouseAllocationList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="warehouseAllocationList-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="warehouseAllocationList-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: 1500, y: tableHeight }"
+        bordered>
+        <!-- 单号 -->
+        <template slot="allocationWarehouseNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.allocationWarehouseNo }}</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            v-if="record.state == 'WAIT_AUDIT'"
+            size="small"
+            type="link"
+            class="button-warning"
+            @click="handleExamine(record)"
+            id="warehouseAllocationList-examine-btn">
+            审核
+          </a-button>
+          <a-button
+            v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT')"
+            size="small"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="warehouseAllocationList-edit-btn">
+            编辑
+          </a-button>
+          <a-button
+            v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT')"
+            size="small"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+            id="warehouseAllocationList-del-btn">
+            删除
+          </a-button>
+          <span v-if="(record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT')">--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑 -->
     <basic-info-modal :openModal="openModal" @ok="handleEdit" @close="openModal=false" />
   </a-card>
@@ -111,6 +113,7 @@ export default {
   components: { STable, VSelect, basicInfoModal, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       warehouseList: [], // 仓库列表
@@ -188,10 +191,14 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           allocWarehouseDel({ 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
             }
           })
         }
@@ -205,10 +212,14 @@ export default {
         content: '确认要审核通过吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           allocWarehouseAudit({ allocationWarehouseSn: row.allocationWarehouseSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 40 - 33
src/views/basicData/bulkPartsTypeManagement/list.vue

@@ -1,38 +1,40 @@
 <template>
   <a-card size="small" :bordered="false" class="bulkPartsTypeList-wrap">
-    <!-- 操作按钮 -->
-    <div class="table-operator-nobor">
-      <a-button v-if="$hasPermissions('B_basicData_bulkPartsType_add')" id="bulkPartsTypeList-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: 300 }"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          v-if="$hasPermissions('B_basicData_bulkPartsType_edit')"
-          size="small"
-          type="link"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="bulkPartsTypeList-edit-btn">编辑</a-button>
-        <a-button
-          v-if="$hasPermissions('B_basicData_bulkPartsType_del')"
-          size="small"
-          type="link"
-          class="button-error"
-          @click="handleDel(record)"
-          id="bulkPartsTypeList-del-btn"
-          style="margin: 0 0 0 8px;">删除</a-button>
-      </template>
-    </s-table>
+	  <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 操作按钮 -->
+      <div class="table-operator-nobor">
+        <a-button v-if="$hasPermissions('B_basicData_bulkPartsType_add')" id="bulkPartsTypeList-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: 300 }"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            v-if="$hasPermissions('B_basicData_bulkPartsType_edit')"
+            size="small"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="bulkPartsTypeList-edit-btn">编辑</a-button>
+          <a-button
+            v-if="$hasPermissions('B_basicData_bulkPartsType_del')"
+            size="small"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+            id="bulkPartsTypeList-del-btn"
+            style="margin: 0 0 0 8px;">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑散件类型 -->
     <bulkParts-type-edit-modal :openModal="openModal" :nowData="nowData" :itemId="itemId" @close="closeModal" />
   </a-card>
@@ -46,6 +48,7 @@ export default {
   components: { STable, VSelect, bulkPartsTypeEditModal },
   data () {
     return {
+      spinning: false,
       queryParam: { //  查询条件
         name: '' //  散件类型名称
       },
@@ -94,10 +97,14 @@ export default {
         content: '删除后原数据不可恢复,是否删除?',
         centered: true,
         onOk () {
+          _this.spinning = true
           sparePartsPutTypeDel({ 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
             }
           })
         }

+ 57 - 49
src/views/basicData/customerTypeManagement/list.vue

@@ -1,53 +1,55 @@
 <template>
   <a-card size="small" :bordered="false" class="customerTypeList-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="customerTypeList-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="customerTypeList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="customerTypeList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button v-if="$hasPermissions('B_basicData_customerType_add')" id="customerTypeList-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: 300 }"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          v-if="$hasPermissions('B_basicData_customerType_edit')"
-          type="link"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="customerTypeList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          v-if="$hasPermissions('B_basicData_customerType_del')"
-          type="link"
-          class="button-error"
-          @click="handleDel(record)"
-          id="customerTypeList-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="customerTypeList-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="customerTypeList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="customerTypeList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button v-if="$hasPermissions('B_basicData_customerType_add')" id="customerTypeList-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: 300 }"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            v-if="$hasPermissions('B_basicData_customerType_edit')"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="customerTypeList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            v-if="$hasPermissions('B_basicData_customerType_del')"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+            id="customerTypeList-del-btn">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑客户类型 -->
     <customer-type-edit-modal :openModal="openModal" :nowData="nowData" :itemId="itemId" @close="closeModal" />
   </a-card>
@@ -61,6 +63,7 @@ export default {
   components: { STable, VSelect, customerTypeEditModal },
   data () {
     return {
+      spinning: false,
       queryParam: { //  查询条件
         name: '' //  客户类型名称
       },
@@ -106,13 +109,18 @@ export default {
       const _this = this
       this.$confirm({
         title: '提示',
-        content: '客户类型被使用,删除后客户资料中的原有客户类型将同步被删除,确定删除吗?',
+        // content: '客户类型被使用,删除后客户资料中的原有客户类型将同步被删除,确定删除吗?',
+        content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           custTypeDel({ 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
             }
           })
         }

+ 0 - 1
src/views/basicData/expenseType/editModal.vue

@@ -130,7 +130,6 @@ export default {
         this.$emit('close')
         this.$refs.ruleForm.resetFields()
       } else {
-        console.log(this.nowData)
         //  获取父级分类 名称
         if (this.nowData) {
           this.parentType = (this.nowData.namePaths ? (this.nowData.namePaths.replace(/,/g, '>') + '>') : '') + this.nowData.name

+ 51 - 44
src/views/basicData/expenseType/list.vue

@@ -1,49 +1,51 @@
 <template>
   <a-card size="small" :bordered="false" class="expenseTypeList-wrap">
-    <!-- 操作按钮 -->
-    <div class="table-operator-nobor">
-      <a-button v-if="$hasPermissions('B_basicData_expenseType_add')" id="expenseTypeList-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: 300 }"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          v-if="record.typeLevel<3 && $hasPermissions('B_basicData_expenseType_add')"
-          type="link"
-          class="button-success"
-          size="small"
-          icon="plus"
-          id="expenseType-addSubItem"
-          @click="handleAdd(record)">新增子级</a-button>
-        <a-button
-          v-if="record.pid != 0 && $hasPermissions('B_basicData_expenseType_edit')"
-          type="link"
-          class="button-info"
-          size="small"
-          icon="edit"
-          id="expenseType-edit"
-          @click="handleEdit(record)">编辑</a-button>
-        <a-button
-          v-if="record.pid != 0 && $hasPermissions('B_basicData_expenseType_del')"
-          type="link"
-          class="button-error"
-          size="small"
-          icon="delete"
-          id="expenseType-del"
-          @click="handleDel(record)">删除</a-button>
-      </template>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 操作按钮 -->
+      <div class="table-operator-nobor">
+        <a-button v-if="$hasPermissions('B_basicData_expenseType_add')" id="expenseTypeList-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: 300 }"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            v-if="record.typeLevel<3 && $hasPermissions('B_basicData_expenseType_add')"
+            type="link"
+            class="button-success"
+            size="small"
+            icon="plus"
+            id="expenseType-addSubItem"
+            @click="handleAdd(record)">新增子级</a-button>
+          <a-button
+            v-if="record.pid != 0 && $hasPermissions('B_basicData_expenseType_edit')"
+            type="link"
+            class="button-info"
+            size="small"
+            icon="edit"
+            id="expenseType-edit"
+            @click="handleEdit(record)">编辑</a-button>
+          <a-button
+            v-if="record.pid != 0 && $hasPermissions('B_basicData_expenseType_del')"
+            type="link"
+            class="button-error"
+            size="small"
+            icon="delete"
+            id="expenseType-del"
+            @click="handleDel(record)">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑费用类型 -->
     <expense-type-edit-modal :openModal="openModal" :nowData="nowData" :itemId="itemId" @ok="handleOk" @close="closeModal" />
   </a-card>
@@ -57,6 +59,7 @@ export default {
   components: { STable, expenseTypeEditModal },
   data () {
     return {
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 6 },
         wrapperCol: { span: 16 }
@@ -125,10 +128,14 @@ export default {
         content: '删除后原数据不可恢复,是否删除?',
         centered: true,
         onOk () {
+          _this.spinning = true
           costTypeDel({ id: _this.nowId }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 42 - 35
src/views/basicData/storeTransferOutTypeManagement/list.vue

@@ -1,42 +1,44 @@
 <template>
   <a-card size="small" :bordered="false" class="storeTransferOutTypeList-wrap">
-    <!-- 操作按钮 -->
-    <div class="table-operator-nobor">
-      <a-button
-        v-if="$hasPermissions('B_basicData_storeTransferOutType_add')"
-        id="storeTransferOutTypeList-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: 300 }"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 操作按钮 -->
+      <div class="table-operator-nobor">
         <a-button
-          v-if="$hasPermissions('B_basicData_storeTransferOutType_edit')"
-          size="small"
-          type="link"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="storeTransferOutTypeList-edit-btn">编辑</a-button>
-        <a-button
-          v-if="$hasPermissions('B_basicData_storeTransferOutType_del')"
-          size="small"
-          type="link"
+          v-if="$hasPermissions('B_basicData_storeTransferOutType_add')"
+          id="storeTransferOutTypeList-add"
+          type="primary"
           class="button-error"
-          @click="handleDel(record)"
-          id="storeTransferOutTypeList-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"
+        :scroll="{ y: 300 }"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            v-if="$hasPermissions('B_basicData_storeTransferOutType_edit')"
+            size="small"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="storeTransferOutTypeList-edit-btn">编辑</a-button>
+          <a-button
+            v-if="$hasPermissions('B_basicData_storeTransferOutType_del')"
+            size="small"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+            id="storeTransferOutTypeList-del-btn">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑店内调出类型 -->
     <storeTransferOut-type-edit-modal :openModal="openModal" :nowData="nowData" :itemId="itemId" @close="closeModal" />
   </a-card>
@@ -50,6 +52,7 @@ export default {
   components: { STable, VSelect, storeTransferOutTypeEditModal },
   data () {
     return {
+      spinning: false,
       queryParam: { //  查询条件
         name: '' //  店内调出类型名称
       },
@@ -98,10 +101,14 @@ export default {
         content: '删除后原数据不可恢复,是否删除?',
         centered: true,
         onOk () {
+          _this.spinning = true
           storeCallOutTypeDel({ 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
             }
           })
         }

+ 4 - 3
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -489,10 +489,14 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           sparePartsPurDetailDel({ id: row.id }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.getChooseDealerProductList()
+              _this.spinning = false
+            }else{
+              _this.spinning = false
             }
           })
         }
@@ -710,13 +714,10 @@ export default {
     },
     // 选择产品 表格  change
     onTableChange (pagination, filters, sorter) {
-      console.log('-------------------------------')
-      console.log('params', pagination, filters, sorter)
       this.getDealerProductList(this.pageNo, sorter)
     },
     // 已选产品 表格  change
     onChooseTableChange (pagination, filters, sorter) {
-      console.log('++++++++++++++++++++++++++++++++++')
       this.getChooseDealerProductList(this.choosePageNo, sorter)
     }
   },

+ 133 - 120
src/views/bulkManagement/bulkWarehousingOrder/list.vue

@@ -1,132 +1,134 @@
 <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="创建时间">
-              <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="散件单号">
-              <a-input id="bulkWarehousingOrderList-sparePartsPurchaseNo" v-model.trim="queryParam.sparePartsPurchaseNo" allowClear placeholder="请输入散件单号"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-              <a-select
-                id="bulkWarehousingOrderList-supplierSn"
-                placeholder="请选择供应商"
-                allowClear
-                v-model="queryParam.supplierSn"
-                :showSearch="true"
-                option-filter-prop="children"
-                :filter-option="filterOption">
-                <a-select-option v-for="item in supplierList" :key="item.supplierSn" :value="item.supplierSn">{{ item.supplierName }}</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="bulkWarehousingOrderList-state"
-                  code="SPARE_PARTS_PURCHASE"
-                  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="bulkWarehousingOrderList-sparePartsPurchaseNo" v-model.trim="queryParam.sparePartsPurchaseNo" allowClear placeholder="请输入散件单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="财务状态">
-                <v-select
-                  v-model="queryParam.settleState"
-                  ref="settleState"
-                  id="bulkWarehousingOrderList-settleState"
-                  code="FINANCIAL_PAY_STATUS"
-                  placeholder="请选择财务状态"
+              <a-form-item label="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                <a-select
+                  id="bulkWarehousingOrderList-supplierSn"
+                  placeholder="请选择供应商"
                   allowClear
-                ></v-select>
+                  v-model="queryParam.supplierSn"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in supplierList" :key="item.supplierSn" :value="item.supplierSn">{{ item.supplierName }}</a-select-option>
+                </a-select>
               </a-form-item>
             </a-col>
-          </template>
-          <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>
-              <a-button
-                style="margin-left: 8px"
-                type="primary"
-                class="button-warning"
-                @click="handleExport"
-                :disabled="disabled"
-                :loading="exportLoading"
-                id="bulkWarehousingOrderList-export">导出</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 id="bulkWarehousingOrderList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
-    </div>
-    <!-- alert -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">共 <strong>{{ dataTotalCount }}</strong> 条记录,总数量合计 <strong>{{ productTotal.productTotalQty }}</strong> ,总金额合计¥<strong>{{ productTotal.productTotalCost }}</strong> </div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1360, y: tableHeight }"
-      bordered>
-      <!-- 散件单号 -->
-      <template slot="sparePartsPurchaseNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.sparePartsPurchaseNo }}</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 != 'FINISH'"
-          @click="handleEdit(record)"
-          class="button-info"
-          id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state == 'WAIT_PUT_WAREHOUSE'"
-          @click="handleWarehouse(record)"
-          class="button-primary"
-          id="bulkWarehousingOrderList-warehouse-btn">入库</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state != 'FINISH'"
-          @click="handleDel(record)"
-          class="button-error"
-          id="bulkWarehousingOrderList-del-btn">删除</a-button>
-        <span v-if="(record.state == 'FINISH') && (record.state != 'WAIT_PUT_WAREHOUSE')">--</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="bulkWarehousingOrderList-state"
+                    code="SPARE_PARTS_PURCHASE"
+                    placeholder="请选择业务状态"
+                    allowClear
+                  ></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="财务状态">
+                  <v-select
+                    v-model="queryParam.settleState"
+                    ref="settleState"
+                    id="bulkWarehousingOrderList-settleState"
+                    code="FINANCIAL_PAY_STATUS"
+                    placeholder="请选择财务状态"
+                    allowClear
+                  ></v-select>
+                </a-form-item>
+              </a-col>
+            </template>
+            <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>
+                <a-button
+                  style="margin-left: 8px"
+                  type="primary"
+                  class="button-warning"
+                  @click="handleExport"
+                  :disabled="disabled"
+                  :loading="exportLoading"
+                  id="bulkWarehousingOrderList-export">导出</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 id="bulkWarehousingOrderList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
+      </div>
+      <!-- alert -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">共 <strong>{{ dataTotalCount }}</strong> 条记录,总数量合计 <strong>{{ productTotal.productTotalQty }}</strong> ,总金额合计¥<strong>{{ productTotal.productTotalCost }}</strong> </div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1360, y: tableHeight }"
+        bordered>
+        <!-- 散件单号 -->
+        <template slot="sparePartsPurchaseNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.sparePartsPurchaseNo }}</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 != 'FINISH'"
+            @click="handleEdit(record)"
+            class="button-info"
+            id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_PUT_WAREHOUSE'"
+            @click="handleWarehouse(record)"
+            class="button-primary"
+            id="bulkWarehousingOrderList-warehouse-btn">入库</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state != 'FINISH'"
+            @click="handleDel(record)"
+            class="button-error"
+            id="bulkWarehousingOrderList-del-btn">删除</a-button>
+          <span v-if="(record.state == 'FINISH') && (record.state != 'WAIT_PUT_WAREHOUSE')">--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 选择基本信息弹框 -->
     <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
   </a-card>
@@ -143,6 +145,7 @@ export default {
   components: { STable, VSelect, basicInfoModal, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
@@ -240,10 +243,14 @@ export default {
         content: '确定要入库吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           sparePartsPurPut({ 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
             }
           })
         }
@@ -257,10 +264,14 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           sparePartsPurDel({ 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
             }
           })
         }
@@ -287,8 +298,10 @@ export default {
       const _this = this
       const params = this.queryParam
       this.exportLoading = true
+      this.spinning = true
       sparePartsPurExport(params).then(res => {
         this.exportLoading = false
+        this.spinning = false
         if (res.type == 'application/json') {
           var reader = new FileReader()
           reader.addEventListener('loadend', function () {

+ 124 - 113
src/views/customerManagement/customerInfo/list.vue

@@ -1,125 +1,127 @@
 <template>
   <a-card size="small" :bordered="false" class="customerManagementList-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="customerManagementList-customerName" v-model.trim="queryParam.customerName" allowClear placeholder="请输入客户名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="联系人">
-              <a-input id="customerManagementList-contactName" v-model.trim="queryParam.contactName" 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="最后销售时间">
-                <rangeDate ref="rangeSaleDate" @change="dateSaleChange" />
+              <a-form-item label="创建时间">
+                <rangeDate ref="rangeDate" @change="dateChange" />
               </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="provinceSn" style="margin: 0;">
-                      <a-select v-model="queryParam.provinceSn" @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="citySn" style="margin: 0;">
-                      <a-select v-model="queryParam.citySn" @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="countySn" style="margin: 0;">
-                      <a-select v-model="queryParam.countySn" 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>
             <a-col :md="6" :sm="24">
-              <a-form-item label="是否卫星仓客户">
-                <v-select code="FLAG" id="customerManagementList-satelliteFlag" v-model="queryParam.satelliteFlag" allowClear placeholder="请选择"></v-select>
+              <a-form-item label="客户名称">
+                <a-input id="customerManagementList-customerName" v-model.trim="queryParam.customerName" allowClear placeholder="请输入客户名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="客户类型">
-                <a-select v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型" style="max-width: 240px;">
-                  <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
-                </a-select>
+              <a-form-item label="联系人">
+                <a-input id="customerManagementList-contactName" v-model.trim="queryParam.contactName" allowClear placeholder="请输入联系人"/>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24" style="margin-bottom: 15px;">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="customerManagementList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="customerManagementList-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 v-if="$hasPermissions('B_customer_customerInfo_add')" id="customerManagementList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-      <!-- <a-button id="customerManagementList-merge" @click="handleMerge" style="margin: 0 0 0 15px;">客户合并</a-button> -->
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1240, y: tableHeight }"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          v-if="$hasPermissions('B_customer_customerInfo_edit')"
-          type="link"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="customerManagementList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          v-if="$hasPermissions('B_customer_customerInfo_detail')"
-          type="link"
-          class="button-success"
-          @click="handleDetail(record)"
-          id="customerManagementList-detail-btn">详情</a-button>
-        <!-- <a-button
-          size="small"
-          v-if="$hasPermissions('B_customer_customerInfo_del') && record.satelliteFlag!=1"
-          type="link"
-          class="button-error"
-          @click="handleDel(record)"
-          id="customerManagementList-del-btn">删除</a-button> -->
-      </template>
-      <template slot="enableAction" slot-scope="text, record">
-        <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.enabledFlag" @change="changeFlagHandle(text, record)"/>
-      </template>
-    </s-table>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="最后销售时间">
+                  <rangeDate ref="rangeSaleDate" @change="dateSaleChange" />
+                </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="provinceSn" style="margin: 0;">
+                        <a-select v-model="queryParam.provinceSn" @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="citySn" style="margin: 0;">
+                        <a-select v-model="queryParam.citySn" @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="countySn" style="margin: 0;">
+                        <a-select v-model="queryParam.countySn" 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>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="是否卫星仓客户">
+                  <v-select code="FLAG" id="customerManagementList-satelliteFlag" v-model="queryParam.satelliteFlag" allowClear placeholder="请选择"></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="客户类型">
+                  <a-select v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型" style="max-width: 240px;">
+                    <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24" style="margin-bottom: 15px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="customerManagementList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="customerManagementList-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 v-if="$hasPermissions('B_customer_customerInfo_add')" id="customerManagementList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+        <!-- <a-button id="customerManagementList-merge" @click="handleMerge" style="margin: 0 0 0 15px;">客户合并</a-button> -->
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1240, y: tableHeight }"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            v-if="$hasPermissions('B_customer_customerInfo_edit')"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="customerManagementList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            v-if="$hasPermissions('B_customer_customerInfo_detail')"
+            type="link"
+            class="button-success"
+            @click="handleDetail(record)"
+            id="customerManagementList-detail-btn">详情</a-button>
+          <!-- <a-button
+            size="small"
+            v-if="$hasPermissions('B_customer_customerInfo_del') && record.satelliteFlag!=1"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+            id="customerManagementList-del-btn">删除</a-button> -->
+        </template>
+        <template slot="enableAction" slot-scope="text, record">
+          <a-switch checkedChildren="启用" unCheckedChildren="禁用" v-model="record.enabledFlag" @change="changeFlagHandle(text, record)"/>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 客户详情 -->
     <customer-management-detail-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
   </a-card>
@@ -136,6 +138,7 @@ export default {
   components: { STable, VSelect, customerManagementDetailModal, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -236,10 +239,14 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           custDel({ 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
             }
           })
         }
@@ -251,11 +258,15 @@ export default {
         id: record.id,
         flag: record.enabledFlag ? '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.enabledFlag = !record.enabledFlag
+          this.$refs.table.refresh()
+          this.spinning = false
         }
       })
     },

+ 7 - 7
src/views/financialManagement/companyReceivablePayable/collectionPayment.vue

@@ -1,13 +1,13 @@
 <template>
   <div class="collectionPayment-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="collectionPayment-cont" >
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="collectionPayment-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-        <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">客户:{{ $route.params.name || '--' }}</p>
-      </template>
-    </a-page-header>
     <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="collectionPayment-cont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="collectionPayment-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <p style=" display: inline-block;margin: 0 0 0 60px;color: #000;font-size: 16px;font-weight: 600;">客户:{{ $route.params.name || '--' }}</p>
+        </template>
+      </a-page-header>
       <!-- 已选单据 -->
       <a-card size="small" :bordered="false" class="collectionPayment-cont">
         <a-collapse :activeKey="['1']">

+ 56 - 56
src/views/financialManagement/expenseManagement/edit.vue

@@ -1,64 +1,64 @@
 <template>
   <div class="expenseManagementEdit-wrap">
-    <a-page-header :ghost="false" :back-icon="false" class="expenseManagementEdit-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="expenseManagementEdit-back-btn" href="javascript:;" @click="handleBack">
-          <a-icon type="left"></a-icon>
-          返回列表
-        </a>
-      </template>
-    </a-page-header>
     <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :back-icon="false" class="expenseManagementEdit-back">
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="expenseManagementEdit-back-btn" href="javascript:;" @click="handleBack">
+            <a-icon type="left"></a-icon>
+            返回列表
+          </a>
+        </template>
+      </a-page-header>
       <a-card size="small" :bordered="false" class="expenseManagementEdit-table-page-wrapper">
         <a-form-model
-        id="expenseManagementEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol">
-        <a-form-model-item label="费用类型" prop="costType">
-          <a-cascader
-          @change="changeCostType"
-          v-model="form.costType"
-          expand-trigger="hover"
-          :options="costTypeList"
-          :fieldNames="{ label: 'name', value: 'costTypeSn', children: 'children' }"
-          id="productInfoList-costType"
-          placeholder="请选择费用类型"
-          allowClear
-          />
-        </a-form-model-item>
-        <a-form-model-item label="费用金额" prop="settleAmount">
-          <a-input-number
-          id="expenseManagementEdit-name"
-          v-model="form.settleAmount"
-          :precision="2"
-          :min="0"
-          :max="999999"
-          placeholder="请输入费用金额(0~999999)"
-          allowClear
-          style="width: 90%;"
-          />
-          元
-        </a-form-model-item>
-        <a-form-model-item label="结算方式" prop="settleStyleSn">
-          <a-select placeholder="请选择结算方式" v-model="form.settleStyleSn" @change="settleStyleChange">
-          <a-select-option v-for="item in settleStyleList" :key="item.settleStyleSn" :value="item.settleStyleSn">
-            {{ item.name }}
-          </a-select-option>
-          </a-select>
-        </a-form-model-item>
-        <a-form-model-item label="关联单号" prop="bizNo">
-          <a-input id="expenseManagementEdit-bizNo" :maxLength="30" v-model="form.bizNo" placeholder="请输入关联单号(最多30个字符)" allowClear />
-        </a-form-model-item>
-        <a-form-model-item label="备注" prop="remark">
-          <a-textarea id="expenseManagementEdit-remarks" :maxLength="500" v-model="form.remark" placeholder="请输入备注(最多500个字符)" allowClear />
-        </a-form-model-item>
-        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
-          <a-button type="primary" size="large" @click="handleSubmit" id="expenseManagementEdit-btn-save" style="margin: 0 30px;">保存</a-button>
-        </a-form-model-item>
+          id="expenseManagementEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol">
+          <a-form-model-item label="费用类型" prop="costType">
+            <a-cascader
+            @change="changeCostType"
+            v-model="form.costType"
+            expand-trigger="hover"
+            :options="costTypeList"
+            :fieldNames="{ label: 'name', value: 'costTypeSn', children: 'children' }"
+            id="productInfoList-costType"
+            placeholder="请选择费用类型"
+            allowClear
+            />
+          </a-form-model-item>
+          <a-form-model-item label="费用金额" prop="settleAmount">
+            <a-input-number
+            id="expenseManagementEdit-name"
+            v-model="form.settleAmount"
+            :precision="2"
+            :min="0"
+            :max="999999"
+            placeholder="请输入费用金额(0~999999)"
+            allowClear
+            style="width: 90%;"
+            />
+            
+          </a-form-model-item>
+          <a-form-model-item label="结算方式" prop="settleStyleSn">
+            <a-select placeholder="请选择结算方式" v-model="form.settleStyleSn" @change="settleStyleChange">
+            <a-select-option v-for="item in settleStyleList" :key="item.settleStyleSn" :value="item.settleStyleSn">
+              {{ item.name }}
+            </a-select-option>
+            </a-select>
+          </a-form-model-item>
+          <a-form-model-item label="关联单号" prop="bizNo">
+            <a-input id="expenseManagementEdit-bizNo" :maxLength="30" v-model="form.bizNo" placeholder="请输入关联单号(最多30个字符)" allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="备注" prop="remark">
+            <a-textarea id="expenseManagementEdit-remarks" :maxLength="500" v-model="form.remark" placeholder="请输入备注(最多500个字符)" allowClear />
+          </a-form-model-item>
+          <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+            <a-button type="primary" size="large" @click="handleSubmit" id="expenseManagementEdit-btn-save" style="margin: 0 30px;">保存</a-button>
+          </a-form-model-item>
         </a-form-model>
       </a-card>
 		</a-spin>

+ 114 - 103
src/views/financialManagement/expenseManagement/list.vue

@@ -1,111 +1,113 @@
 <template>
   <a-card size="small" :bordered="false" class="expenseManagementList-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="expenseManagementList-accountExpensesNo" v-model.trim="queryParam.accountExpensesNo" allowClear placeholder="请输入费用单号"/>
-            </a-form-item>
-          </a-col>
-          <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-cascader
-                @change="changeCostType"
-                change-on-select
-                v-model="costType"
-                expand-trigger="hover"
-                :options="costTypeList"
-                :fieldNames="{ label: 'name', value: 'costTypeSn', children: 'children' }"
-                id="productInfoList-costType"
-                placeholder="请选择费用类型"
-                allowClear />
-            </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="expenseManagementList-state"
-                  code="EXPENSE_AUDIT_TYPE"
-                  placeholder="请选择单据状态"
-                  allowClear></v-select>
+              <a-form-item label="费用单号">
+                <a-input id="expenseManagementList-accountExpensesNo" v-model.trim="queryParam.accountExpensesNo" allowClear placeholder="请输入费用单号"/>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <span class="table-page-search-submitButtons">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="expenseManagementList-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="expenseManagementList-reset">重置</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 id="expenseManagementList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-    </div>
-    <!-- alert -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">共 <strong>{{ totalData.count }}</strong> 条记录,金额共计 <strong>¥{{ totalData.totalAmount }}</strong></div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1120, y: tableHeight }"
-      bordered>
-      <!-- 费用类别 -->
-      <template slot="expensesType" slot-scope="text, record">
-        {{ record.expensesTypeName1 }} <span v-if="record.expensesTypeName2">>{{ record.expensesTypeName2 }}</span> <span v-if="record.expensesTypeName3">>{{ record.expensesTypeName3 }}</span>
-      </template>
-      <!-- 状态 -->
-      <template slot="accountExpensesNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ text }}</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state == 'WAIT_AUDIT'"
-          class="button-warring"
-          @click="handleAudit(record)"
-          id="expenseManagement-edit-btn">审核</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state == 'WAIT_AUDIT'"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="expenseManagement-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
-          v-if="record.state == 'WAIT_AUDIT'"
-          class="button-error"
-          @click="handleDel(record)"
-          id="expenseManagement-del-btn">删除</a-button>
-        <span v-if="record.state != 'WAIT_AUDIT'">--</span>
-      </template>
-    </s-table>
+            <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-cascader
+                  @change="changeCostType"
+                  change-on-select
+                  v-model="costType"
+                  expand-trigger="hover"
+                  :options="costTypeList"
+                  :fieldNames="{ label: 'name', value: 'costTypeSn', children: 'children' }"
+                  id="productInfoList-costType"
+                  placeholder="请选择费用类型"
+                  allowClear />
+              </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="expenseManagementList-state"
+                    code="EXPENSE_AUDIT_TYPE"
+                    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" @click="$refs.table.refresh(true)" :disabled="disabled" id="expenseManagementList-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="expenseManagementList-reset">重置</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 id="expenseManagementList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+      </div>
+      <!-- alert -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">共 <strong>{{ totalData.count }}</strong> 条记录,金额共计 <strong>¥{{ totalData.totalAmount }}</strong></div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1120, y: tableHeight }"
+        bordered>
+        <!-- 费用类别 -->
+        <template slot="expensesType" slot-scope="text, record">
+          {{ record.expensesTypeName1 }} <span v-if="record.expensesTypeName2">>{{ record.expensesTypeName2 }}</span> <span v-if="record.expensesTypeName3">>{{ record.expensesTypeName3 }}</span>
+        </template>
+        <!-- 状态 -->
+        <template slot="accountExpensesNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ text }}</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_AUDIT'"
+            class="button-warring"
+            @click="handleAudit(record)"
+            id="expenseManagement-edit-btn">审核</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_AUDIT'"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="expenseManagement-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_AUDIT'"
+            class="button-error"
+            @click="handleDel(record)"
+            id="expenseManagement-del-btn">删除</a-button>
+          <span v-if="record.state != 'WAIT_AUDIT'">--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 详情 -->
     <expense-management-detail-modal :openModal="openModal" :itemId="itemId" @close="closeDetail" />
   </a-card>
@@ -121,6 +123,7 @@ export default {
   components: { STable, VSelect, expenseManagementDetailModal, rangeDate },
   data () {
     return {
+      spinning: false,
       tableHeight: 0,
       disabled: false, //  查询、重置按钮是否可操作
       advanced: false, //  高级搜索 展开/关闭
@@ -236,12 +239,16 @@ export default {
         content: '确定要审核吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           auditExpense({
             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
             }
           })
         }
@@ -256,10 +263,14 @@ export default {
         content: '删除后原数据不可恢复,是否删除?',
         centered: true,
         onOk () {
+          _this.spinning = true
           delExpense({ id: _this.itemId }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 8 - 8
src/views/financialManagement/financialCollection/detailModal.vue

@@ -56,11 +56,11 @@ export default {
     //  获取详情
     getDetail (id) {
       findReceiptDetail({ id: id }).then(res => {
-        	if (res.status == 200) {
-        		this.detailsData = res.data
-        	} else {
-        		this.detailsData = null
-        	}
+        if (res.status == 200) {
+          this.detailsData = res.data
+        } else {
+          this.detailsData = null
+        }
       })
     }
   },
@@ -83,11 +83,11 @@ export default {
 <style lang="less">
   .financialPaymentDetail-modal{
     .ant-modal-body {
-    	padding: 40px 40px 24px;
+      padding: 40px 40px 24px;
     }
     .btn-cont {
-    	text-align: center;
-    	margin: 35px 0 10px;
+      text-align: center;
+      margin: 35px 0 10px;
     }
   }
 </style>

+ 120 - 189
src/views/financialManagement/financialCollection/list.vue

@@ -1,112 +1,114 @@
 <template>
   <a-card size="small" :bordered="false" class="financialCollectionList-wrap">
-    <!-- 标签页 -->
-    <a-tabs type="card" default-active-key="ALL" @change="handleTabChange" class="financialCollectionList-tabs ">
-      <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
-        <span slot="tab">{{ item.bizName }}({{ item.countNum }})</span>
-      </a-tab-pane>
-    </a-tabs>
-    <!-- 搜索条件 -->
-    <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="financialCollectionList-settleNo" v-model.trim="queryParam.settleNo" allowClear placeholder="请输入收款单号" /></a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="关联单号"><a-input id="financialCollectionList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单号" /></a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="商户名称">
-              <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入商户名称" />
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 标签页 -->
+      <a-tabs type="card" default-active-key="ALL" @change="handleTabChange" class="financialCollectionList-tabs ">
+        <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
+          <span slot="tab">{{ item.bizName }}({{ item.countNum }})</span>
+        </a-tab-pane>
+      </a-tabs>
+      <!-- 搜索条件 -->
+      <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.billState"
-                  ref="settleState"
-                  id="financialCollectionList-settleState"
-                  code="BILL_STATUS"
-                  placeholder="请选择单据状态"
-                  allowClear
-                ></v-select>
-              </a-form-item>
+              <a-form-item label="收款单号"><a-input id="financialCollectionList-settleNo" v-model.trim="queryParam.settleNo" allowClear placeholder="请输入收款单号" /></a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="关联单号"><a-input id="financialCollectionList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单号" /></a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="审核时间">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+              <a-form-item label="商户名称">
+                <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" 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.billState"
+                    ref="settleState"
+                    id="financialCollectionList-settleState"
+                    code="BILL_STATUS"
+                    placeholder="请选择单据状态"
+                    allowClear
+                  ></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="审核时间">
+                  <rangeDate ref="rangeDate" @change="dateChange" />
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="financialCollectionList-refresh">查询</a-button>
+                <a-button style="margin-left: 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>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- alert -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">
+          共
+          <strong>{{ totalData.count }}</strong>
+          条记录,应收金额合计
+          <strong>¥{{ totalData.totalAmount }}</strong>
+          ,其中已收金额
+          <strong>¥{{ totalData.settledAmount }}</strong>
+          ,待收金额
+          <strong>¥{{ totalData.unsettleAmount }}</strong>
+        </div>
+      </a-alert>
+      <div style="margin-bottom: 15px">
+        <a-button type="primary" id="financialCollectionList-export" :loading="loading" @click="handleCollection">批量收款</a-button>
+        <span style="margin-left: 8px">
+          <template v-if="hasSelected">
+            {{ `已选 ${selectedRowKeys.length} 项` }}
           </template>
-          <a-col :md="6" :sm="24">
-            <span class="table-page-search-submitButtons">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="financialCollectionList-refresh">查询</a-button>
-              <a-button style="margin-left: 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>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- alert -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">
-        共
-        <strong>{{ totalData.count }}</strong>
-        条记录,应收金额合计
-        <strong>¥{{ totalData.totalAmount }}</strong>
-        ,其中已收金额
-        <strong>¥{{ totalData.settledAmount }}</strong>
-        ,待收金额
-        <strong>¥{{ totalData.unsettleAmount }}</strong>
+        </span>
       </div>
-    </a-alert>
-    <div style="margin-bottom: 15px">
-      <a-button type="primary" id="financialCollectionList-export" :loading="loading" @click="handleCollection">批量收款</a-button>
-      <span style="margin-left: 8px">
-        <template v-if="hasSelected">
-          {{ `已选 ${selectedRowKeys.length} 项` }}
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :row-selection="rowSelection"
+        :rowKey="record => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1660, y: tableHeight }"
+        bordered
+      >
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            v-if="record.settleState == 'SETTLED'"
+            @click="handleVoucher(record)"
+            id="financialCollectionList-voucher-btn">凭证</a-button>
+          <a-button
+            size="small"
+            type="link"
+            :loading="loading"
+            class="button-warning"
+            v-if="record.settleState == 'UNSETTLE'&&record.satelliteFlag!=1"
+            @click="handleCollectionSing(record)"
+            id="financialCollectionList-pay-btn">收款</a-button>
+          <span v-if="!(record.settleState == 'SETTLED') && !(record.settleState == 'UNSETTLE'&&record.satelliteFlag!=1)">--</span>
+          <!-- satelliteFlag为1,是卫星仓 -->
         </template>
-      </span>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :row-selection="rowSelection"
-      :rowKey="record => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1660, y: tableHeight }"
-      bordered
-    >
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          class="button-info"
-          v-if="record.settleState == 'SETTLED'"
-          @click="handleVoucher(record)"
-          id="financialCollectionList-voucher-btn">凭证</a-button>
-        <a-button
-          size="small"
-          type="link"
-          :loading="loading"
-          class="button-warning"
-          v-if="record.settleState == 'UNSETTLE'&&record.satelliteFlag!=1"
-          @click="handleCollectionSing(record)"
-          id="financialCollectionList-pay-btn">收款</a-button>
-        <span v-if="!(record.settleState == 'SETTLED') && !(record.settleState == 'UNSETTLE'&&record.satelliteFlag!=1)">--</span>
-        <!-- satelliteFlag为1,是卫星仓 -->
-      </template>
-    </s-table>
+      </s-table>
+    </a-spin>
     <!-- 详情 -->
     <detail-modal :openModal="openModal" ref="detailModal" @close="openModal = false" />
   </a-card>
@@ -121,6 +123,7 @@ export default {
   components: { STable, VSelect, detailModal, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, //  高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       openModal: false, // 详情弹框
@@ -145,95 +148,16 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        {
-          title: '收款单号',
-          dataIndex: 'settleNo',
-          width: 220,
-          align: 'center',
-          customRender: function (text) {
-            return text || '--'
-          }
-        },
-        {
-          title: '关联单号',
-          dataIndex: 'bizNo',
-          width: 220,
-          align: 'center',
-          customRender: function (text) {
-            return text || '--'
-          }
-        },
-        {
-          title: '商户名称',
-          dataIndex: 'settleClientName',
-          align: 'center',
-          customRender: function (text) {
-            return text || '--'
-          }
-        },
-        {
-          title: '应收金额',
-          width: 100,
-          align: 'center',
-          customRender: function (text, record) {
-            const val = record.totalAmount
-            return val || val == 0 ? '¥' + val : '--'
-          }
-        },
-        {
-          title: '已收金额',
-          width: 100,
-          align: 'center',
-          customRender: function (text, record) {
-            const val = record.settledAmount
-            return val || val == 0 ? '¥' + val : '--'
-          }
-        },
-        {
-          title: '待收金额',
-          width: 100,
-          align: 'center',
-          customRender: function (text, record) {
-            const val = record.unsettleAmount
-            return val || val == 0 ? '¥' + val : '--'
-          }
-        },
-        {
-          title: '收款类型',
-          dataIndex: 'bizName',
-          width: 100,
-          align: 'center',
-          customRender: function (text) {
-            return text || '--'
-          }
-        },
-        {
-          title: '收款方式',
-          dataIndex: 'settleStyleName',
-          width: 100,
-          align: 'center',
-          customRender: function (text) {
-            return text || '--'
-          }
-        },
-        {
-          title: '审核时间',
-          dataIndex: 'auditTime',
-          width: 160,
-          align: 'center',
-          customRender: function (text) {
-            return text || '--'
-          }
-        },
-        {
-          title: '收款时间',
-          dataIndex: 'settleTime',
-          width: 160,
-          align: 'center',
-          customRender: function (text) {
-            return text || '--'
-          }
-        },
+        { title: '收款单号', dataIndex: 'settleNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单号', dataIndex: 'bizNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户名称', dataIndex: 'settleClientName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '应收金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '已收金额', dataIndex: 'settledAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '待收金额', dataIndex: 'unsettleAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '收款类型', dataIndex: 'bizName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款方式', dataIndex: 'settleStyleName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款时间', dataIndex: 'settleTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       selectedRowKeys: [], // Check here to configure the default column
@@ -292,7 +216,6 @@ export default {
     // 总计
     settleReceiptQuerySum (params) {
       settleReceiptQuerySum(params).then(res => {
-        console.log(res)
         if (res.status == 200) {
           this.totalData = Object.assign(this.totalData, res.data)
         }
@@ -315,12 +238,16 @@ export default {
     // 收款
     handleCollectionSing (row) {
       this.loading = true
+      this.spinning = true
       settleReceiptMoney([row.id]).then(res => {
         this.loading = false
         if (res.status == 200) {
           this.$message.success(res.message)
           this.selectedRowKeys = []
           this.$refs.table.refresh()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     },
@@ -337,12 +264,16 @@ export default {
         return
       }
       this.loading = true
+      this.spinning = true
       settleReceiptMoney(this.selectedRowKeys).then(res => {
         this.loading = false
         if (res.status == 200) {
           this.$message.success(res.message)
           this.selectedRowKeys = []
           this.$refs.table.refresh()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     },

+ 8 - 8
src/views/financialManagement/financialPayment/detailModal.vue

@@ -56,11 +56,11 @@ export default {
     //  获取详情
     getDetail (id) {
       findPayDetail({ id: id }).then(res => {
-        	if (res.status == 200) {
-        		this.detailsData = res.data
-        	} else {
-        		this.detailsData = null
-        	}
+        if (res.status == 200) {
+          this.detailsData = res.data
+        } else {
+          this.detailsData = null
+        }
       })
     }
   },
@@ -83,11 +83,11 @@ export default {
 <style lang="less">
   .financialPaymentDetail-modal{
     .ant-modal-body {
-    	padding: 40px 40px 24px;
+      padding: 40px 40px 24px;
     }
     .btn-cont {
-    	text-align: center;
-    	margin: 35px 0 10px;
+      text-align: center;
+      margin: 35px 0 10px;
     }
   }
 </style>

+ 117 - 186
src/views/financialManagement/financialPayment/list.vue

@@ -1,109 +1,111 @@
 <template>
   <a-card size="small" :bordered="false" class="finacialPay-wrap">
-    <!-- 标签页 -->
-    <a-tabs type="card" default-active-key="0" @change="handleTabChange" class="finacialPay-tabs">
-      <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
-        <span slot="tab">{{ item.bizName }}({{ item.countNum }})</span>
-      </a-tab-pane>
-    </a-tabs>
-    <!-- 搜索条件 -->
-    <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="finacialPay-settleNo" v-model.trim="queryParam.settleNo" allowClear placeholder="请输入付款单号" /></a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="关联单号"><a-input id="finacialPay-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单号" /></a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="商户名称">
-              <a-input id="finacialPay-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入商户名称" />
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 标签页 -->
+      <a-tabs type="card" default-active-key="0" @change="handleTabChange" class="finacialPay-tabs">
+        <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
+          <span slot="tab">{{ item.bizName }}({{ item.countNum }})</span>
+        </a-tab-pane>
+      </a-tabs>
+      <!-- 搜索条件 -->
+      <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.billState"
-                  ref="settleState"
-                  id="finacialPay-settleState"
-                  code="BILL_STATUS"
-                  placeholder="请选择单据状态"
-                  allowClear></v-select>
-              </a-form-item>
+              <a-form-item label="付款单号"><a-input id="finacialPay-settleNo" v-model.trim="queryParam.settleNo" allowClear placeholder="请输入付款单号" /></a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="关联单号"><a-input id="finacialPay-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单号" /></a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="审核时间">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+              <a-form-item label="商户名称">
+                <a-input id="finacialPay-settleClientName" v-model.trim="queryParam.settleClientName" 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.billState"
+                    ref="settleState"
+                    id="finacialPay-settleState"
+                    code="BILL_STATUS"
+                    placeholder="请选择单据状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="审核时间">
+                  <rangeDate ref="rangeDate" @change="dateChange" />
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="finacialPay-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="finacialPay-reset">重置</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>
+      <!-- alert -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">
+          共
+          <strong>{{ totalData.count }}</strong>
+          条记录,应付金额合计
+          <strong>¥{{ totalData.totalAmount }}</strong>
+          ,其中已付金额
+          <strong>¥{{ totalData.settledAmount }}</strong>
+          ,待付金额
+          <strong>¥{{ totalData.unsettleAmount }}</strong>
+        </div>
+      </a-alert>
+      <div style="margin-bottom: 15px">
+        <a-button type="primary" id="finacialPay-export" :loading="loading" @click="handlePayment">批量付款</a-button>
+        <span style="margin-left: 8px">
+          <template v-if="hasSelected">
+            {{ `已选 ${selectedRowKeys.length} 项` }}
           </template>
-          <a-col :md="6" :sm="24">
-            <span class="table-page-search-submitButtons">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="finacialPay-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="finacialPay-reset">重置</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>
-    <!-- alert -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">
-        共
-        <strong>{{ totalData.count }}</strong>
-        条记录,应付金额合计
-        <strong>¥{{ totalData.totalAmount }}</strong>
-        ,其中已付金额
-        <strong>¥{{ totalData.settledAmount }}</strong>
-        ,待付金额
-        <strong>¥{{ totalData.unsettleAmount }}</strong>
+        </span>
       </div>
-    </a-alert>
-    <div style="margin-bottom: 15px">
-      <a-button type="primary" id="finacialPay-export" :loading="loading" @click="handlePayment">批量付款</a-button>
-      <span style="margin-left: 8px">
-        <template v-if="hasSelected">
-          {{ `已选 ${selectedRowKeys.length} 项` }}
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :row-selection="rowSelection"
+        :rowKey="record => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1660, y: tableHeight }"
+        bordered
+      >
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            v-if="record.settleState == 'SETTLED'"
+            @click="handleVoucher(record)"
+            id="finacialPay-voucher-btn">凭证</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-warning"
+            :loading="loading"
+            v-else
+            @click="handlePay(record)"
+            id="finacialPay-pay-btn">付款</a-button>
         </template>
-      </span>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :row-selection="rowSelection"
-      :rowKey="record => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1660, y: tableHeight }"
-      bordered
-    >
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          class="button-info"
-          v-if="record.settleState == 'SETTLED'"
-          @click="handleVoucher(record)"
-          id="finacialPay-voucher-btn">凭证</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-warning"
-          :loading="loading"
-          v-else
-          @click="handlePay(record)"
-          id="finacialPay-pay-btn">付款</a-button>
-      </template>
-    </s-table>
+      </s-table>
+    </a-spin>
     <!-- 详情 -->
     <detail-modal :openModal="openModal" ref="detailModal" @close="openModal = false" />
   </a-card>
@@ -118,6 +120,7 @@ export default {
   components: { STable, VSelect, detailModal, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, //  高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       openModal: false, // 详情弹框
@@ -143,95 +146,16 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        {
-          title: '付款单号',
-          dataIndex: 'settleNo',
-          width: 220,
-          align: 'center',
-          customRender: function (text) {
-            return text || '--'
-          }
-        },
-        {
-          title: '关联单号',
-          dataIndex: 'bizNo',
-          width: 220,
-          align: 'center',
-          customRender: function (text) {
-            return text || '--'
-          }
-        },
-        {
-          title: '商户名称',
-          dataIndex: 'settleClientName',
-          align: 'center',
-          customRender: function (text) {
-            return text || '--'
-          }
-        },
-        {
-          title: '应付金额',
-          width: 100,
-          align: 'center',
-          customRender: function (text, record) {
-            const val = record.totalAmount
-            return val || val == 0 ? '¥' + val : '--'
-          }
-        },
-        {
-          title: '已付金额',
-          width: 100,
-          align: 'center',
-          customRender: function (text, record) {
-            const val = record.settledAmount
-            return val || val == 0 ? '¥' + val : '--'
-          }
-        },
-        {
-          title: '待付金额',
-          width: 100,
-          align: 'center',
-          customRender: function (text, record) {
-            const val = record.unsettleAmount
-            return val || val == 0 ? '¥' + val : '--'
-          }
-        },
-        {
-          title: '付款类型',
-          dataIndex: 'bizName',
-          width: 100,
-          align: 'center',
-          customRender: function (text) {
-            return text || '--'
-          }
-        },
-        {
-          title: '付款方式',
-          dataIndex: 'settleStyleName',
-          width: 100,
-          align: 'center',
-          customRender: function (text) {
-            return text || '--'
-          }
-        },
-        {
-          title: '审核时间',
-          dataIndex: 'auditTime',
-          width: 160,
-          align: 'center',
-          customRender: function (text) {
-            return text || '--'
-          }
-        },
-        {
-          title: '付款时间',
-          dataIndex: 'settleTime',
-          width: 160,
-          align: 'center',
-          customRender: function (text) {
-            return text || '--'
-          }
-        },
+        { title: '付款单号', dataIndex: 'settleNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '关联单号', dataIndex: 'bizNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户名称', dataIndex: 'settleClientName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '应付金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '已付金额', dataIndex: 'settledAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '待付金额', dataIndex: 'unsettleAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '付款类型', dataIndex: 'bizName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '付款方式', dataIndex: 'settleStyleName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '付款时间', dataIndex: 'settleTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       selectedRowKeys: [], // Check here to configure the default column
@@ -290,7 +214,6 @@ export default {
     // 总计
     settlePayQuerySum (params) {
       settlePayQuerySum(params).then(res => {
-        console.log(res)
         if (res.status == 200) {
           this.totalData = Object.assign(this.totalData, res.data)
         }
@@ -313,12 +236,16 @@ export default {
     // 付款
     handlePay (row) {
       this.loading = true
+      this.spinning = true
       settlePayMoney([row.id]).then(res => {
         this.loading = false
         if (res.status == 200) {
           this.$message.success(res.message)
           this.selectedRowKeys = []
           this.$refs.table.refresh()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     },
@@ -335,12 +262,16 @@ export default {
         return
       }
       this.loading = true
+      this.spinning = true
       settlePayMoney(this.selectedRowKeys).then(res => {
         this.loading = false
         if (res.status == 200) {
           this.$message.success(res.message)
           this.selectedRowKeys = []
           this.$refs.table.refresh()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     },

+ 87 - 80
src/views/financialManagement/warehousingAudit/list.vue

@@ -1,88 +1,90 @@
 <template>
   <a-card size="small" :bordered="false" class="warehousingAuditList-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="warehousingAuditList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="采购入库单号">
-              <a-input id="warehousingAuditList-receivingBillNo" v-model.trim="queryParam.receivingBillNo" allowClear placeholder="请输入采购入库单号"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="入库时间">
-              <rangeDate ref="rangeDate" :value="auditTime" @change="dateChange" />
-            </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.auditState"
-                  ref="auditState"
-                  id="warehousingAuditList-auditState"
-                  code="RECEIVING_BILL_STATUS"
-                  placeholder="请选择入库审核状态"
-                  allowClear></v-select>
+              <a-form-item label="采购单号">
+                <a-input id="warehousingAuditList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
               </a-form-item>
             </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <span class="table-page-search-submitButtons">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="warehousingAuditList-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="warehousingAuditList-reset">重置</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>
-    <!-- alert -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">共 <strong>{{ (productTotal&&productTotal.totalRecord) || 0 }}</strong> 条记录,其中待审核 <strong>{{ (productTotal&&productTotal.waitAuditRecord) || 0 }}</strong> 条 </div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1420, y: tableHeight }"
-      bordered>
-      <!-- 采购入库单号 -->
-      <template slot="receivingBillNo" slot-scope="text, record">
-        <span v-if="record.receivingBillNo" style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.receivingBillNo }}</span>
-        <span v-else>--</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          v-if="record.auditState=='WAIT_PUT_WAREHOUSE_AUDIT'"
-          type="link"
-          class="button-info"
-          @click="handleExamine(record, 1)"
-          id="warehousingAudit-adopt-btn">通过</a-button>
-        <a-button
-          size="small"
-          v-if="record.auditState=='WAIT_PUT_WAREHOUSE_AUDIT'"
-          type="link"
-          class="button-warning"
-          @click="handleExamine(record, 2)"
-          id="warehousingAudit-unadopt-btn">不通过</a-button>
-        <span v-if="record.auditState!='WAIT_PUT_WAREHOUSE_AUDIT'">--</span>
-      </template>
-    </s-table>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="采购入库单号">
+                <a-input id="warehousingAuditList-receivingBillNo" v-model.trim="queryParam.receivingBillNo" allowClear placeholder="请输入采购入库单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="入库时间">
+                <rangeDate ref="rangeDate" :value="auditTime" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="入库审核状态">
+                  <v-select
+                    v-model="queryParam.auditState"
+                    ref="auditState"
+                    id="warehousingAuditList-auditState"
+                    code="RECEIVING_BILL_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" @click="$refs.table.refresh(true)" :disabled="disabled" id="warehousingAuditList-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="warehousingAuditList-reset">重置</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>
+      <!-- alert -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">共 <strong>{{ (productTotal&&productTotal.totalRecord) || 0 }}</strong> 条记录,其中待审核 <strong>{{ (productTotal&&productTotal.waitAuditRecord) || 0 }}</strong> 条 </div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1420, y: tableHeight }"
+        bordered>
+        <!-- 采购入库单号 -->
+        <template slot="receivingBillNo" slot-scope="text, record">
+          <span v-if="record.receivingBillNo" style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.receivingBillNo }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            v-if="record.auditState=='WAIT_PUT_WAREHOUSE_AUDIT'"
+            type="link"
+            class="button-info"
+            @click="handleExamine(record, 1)"
+            id="warehousingAudit-adopt-btn">通过</a-button>
+          <a-button
+            size="small"
+            v-if="record.auditState=='WAIT_PUT_WAREHOUSE_AUDIT'"
+            type="link"
+            class="button-warning"
+            @click="handleExamine(record, 2)"
+            id="warehousingAudit-unadopt-btn">不通过</a-button>
+          <span v-if="record.auditState!='WAIT_PUT_WAREHOUSE_AUDIT'">--</span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -96,6 +98,7 @@ export default {
   components: { STable, VSelect, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, //  高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       auditTime: [
@@ -173,10 +176,14 @@ export default {
         content: '确定要进行' + (type == 1 ? ' 通过 ' : ' 不通过 ') + '操作吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           receivingStockInAudit({ id: row.id, auditState: type == 1 ? 'FINISH' : 'PUT_WAREHOUSE_AUDIT_REJECT' }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 0 - 1
src/views/inventoryManagement/inventoryQuery/detailModal.vue

@@ -84,7 +84,6 @@ export default {
           this.disabled = false
           // 总计
           this.getTotal(Object.assign(parameter, { stockSn: this.itemId }))
-          console.log(data)
           return data
         })
       },

+ 102 - 98
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -1,110 +1,112 @@
 <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 brandData" :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
-                  :options="typeData"
-                  expand-trigger="hover"
-                  :field-names="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  placeholder="请选择产品分类"
-                  allowClear
-                  v-model="productTypeSn"
-                  @change="changeType" />
+              <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"
-              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>{{ currentStock.currentStockQty || 0 }}</strong>;现有库存总成本(¥):<strong>{{ currentStock.currentStockCost || 0 }}</strong>。</div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1630, y: tableHeight }"
-      bordered>
-      <!-- 产品分类 -->
-      <template slot="productTypeName" slot-scope="text, record">
-        <span v-if="record.productTypeName2">{{ record.productTypeName2 || '' }} ></span>
-        <span v-if="record.productTypeName3">{{ record.productTypeName3 || '' }}</span>
-      </template>
-      <!-- 现有库存数量 -->
-      <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)*100 + Number(record.freezeCost)*100)/100 || 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 brandData" :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
+                    :options="typeData"
+                    expand-trigger="hover"
+                    :field-names="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                    placeholder="请选择产品分类"
+                    allowClear
+                    v-model="productTypeSn"
+                    @change="changeType" />
+                </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"
+                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>{{ currentStock.currentStockQty || 0 }}</strong>;现有库存总成本(¥):<strong>{{ currentStock.currentStockCost || 0 }}</strong>。</div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1630, y: tableHeight }"
+        bordered>
+        <!-- 产品分类 -->
+        <template slot="productTypeName" slot-scope="text, record">
+          <span v-if="record.productTypeName2">{{ record.productTypeName2 || '' }} ></span>
+          <span v-if="record.productTypeName3">{{ record.productTypeName3 || '' }}</span>
+        </template>
+        <!-- 现有库存数量 -->
+        <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)*100 + Number(record.freezeCost)*100)/100 || 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>
@@ -121,6 +123,7 @@ export default {
   components: { STable, VSelect, inventoryQueryDetailModal },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
@@ -244,8 +247,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 () {
@@ -293,7 +298,6 @@ export default {
     },
     // 分类  changeType
     changeType (val, selectedOptions) {
-      console.log(val, selectedOptions)
       for (let i = 0; i < val.length; i++) {
         this.queryParam['productTypeSn' + (i + 1)] = val[i]
       }

+ 153 - 147
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.warnTip"
-                  ref="warnTip"
-                  id="inventoryWarningList-warnTip"
-                  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="primary"
-              class="button-warning"
-              @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: onSelectChange }"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :dataSource="loadData"
-      :scroll="{ x: 2120, y: tableHeight }"
-      :pagination="paginationProps"
-      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="warnTip" slot-scope="text, record">
-        <span v-if="record.warnTipDictValue" :class="[record.warnTip=='OVERFLOW'?'yellow':record.warnTip=='NOT_ENOUGH'?'red':record.warnTip=='LACK'?'blue':record.warnTip=='NORMAL'?'green':'']">{{ record.warnTipDictValue }}</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.warnTip"
+                    ref="warnTip"
+                    id="inventoryWarningList-warnTip"
+                    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="primary"
+                class="button-warning"
+                @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: onSelectChange }"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :dataSource="loadData"
+        :scroll="{ x: 2120, y: tableHeight }"
+        :pagination="paginationProps"
+        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="warnTip" slot-scope="text, record">
+          <span v-if="record.warnTipDictValue" :class="[record.warnTip=='OVERFLOW'?'yellow':record.warnTip=='NOT_ENOUGH'?'red':record.warnTip=='LACK'?'blue':record.warnTip=='NORMAL'?'green':'']">{{ record.warnTipDictValue }}</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: { //  查询条件
@@ -304,17 +307,20 @@ 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
         }
       })
     },
     onSelectChange (selectedRowKeys, selectedRows) {
-      console.log('selectedRowKeys changed: ', selectedRowKeys, selectedRows)
       this.selectedRowKeys = selectedRowKeys
       this.selectedRows = selectedRows
     },

+ 61 - 54
src/views/inventoryManagement/satelliteWarehouseInventory/list.vue

@@ -1,59 +1,61 @@
 <template>
   <a-card size="small" :bordered="false" class="satelliteWarehouseInventoryList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form-model
-        id="satelliteWarehouseInventoryList-form"
-        ref="ruleForm"
-        :model="queryParam"
-        :rules="rules"
-        :labelCol="labelCol"
-        :wrapperCol="wrapperCol"
-        @keyup.enter.native="getStockList(1)" >
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="客户名称" prop="customer.customerSn">
-              <custSatelliteList ref="custSatelliteList" @change="custSatelliteChange"></custSatelliteList>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="配件名称">
-              <a-input id="satelliteWarehouseInventoryList-name" v-model.trim="queryParam.dealerProduct.name" allowClear placeholder="请输入配件名称" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-model-item label="配件编码">
-              <a-input id="satelliteWarehouseInventoryList-queryWord" v-model.trim="queryParam.dealerProduct.queryWord" allowClear placeholder="请输入产品编码或产品原厂编码" />
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="handleSearch" :disabled="disabled" id="satelliteWarehouseInventoryList-refresh">查询</a-button>
-            <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="satelliteWarehouseInventoryList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form-model>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="satelliteWarehouseInventoryList-replenishment" type="primary" @click="handleReplenishment">补货清单</a-button>
-    </div>
-    <!-- 列表 -->
-    <a-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data-source="loadData"
-      :pagination="paginationProps"
-      :loading="loading"
-      :scroll="{ x: 1210, y: tableHeight }"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" @click="handleAdd(record)" id="satelliteWarehouseInventoryList-add-btn">加入补货单</a-button>
-      </template>
-    </a-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form-model
+          id="satelliteWarehouseInventoryList-form"
+          ref="ruleForm"
+          :model="queryParam"
+          :rules="rules"
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          @keyup.enter.native="getStockList(1)" >
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="客户名称" prop="customer.customerSn">
+                <custSatelliteList ref="custSatelliteList" @change="custSatelliteChange"></custSatelliteList>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="配件名称">
+                <a-input id="satelliteWarehouseInventoryList-name" v-model.trim="queryParam.dealerProduct.name" allowClear placeholder="请输入配件名称" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="配件编码">
+                <a-input id="satelliteWarehouseInventoryList-queryWord" v-model.trim="queryParam.dealerProduct.queryWord" allowClear placeholder="请输入产品编码或产品原厂编码" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="handleSearch" :disabled="disabled" id="satelliteWarehouseInventoryList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="satelliteWarehouseInventoryList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="satelliteWarehouseInventoryList-replenishment" type="primary" @click="handleReplenishment">补货清单</a-button>
+      </div>
+      <!-- 列表 -->
+      <a-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data-source="loadData"
+        :pagination="paginationProps"
+        :loading="loading"
+        :scroll="{ x: 1210, y: tableHeight }"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button size="small" type="link" @click="handleAdd(record)" id="satelliteWarehouseInventoryList-add-btn">加入补货单</a-button>
+        </template>
+      </a-table>
+    </a-spin>
     <!-- 补货单 -->
     <satellite-warehouse-inventory-add-modal :openModal="openModal" :nowData="nowData" @close="closeModal" />
   </a-card>
@@ -68,6 +70,7 @@ export default {
   components: { STable, VSelect, satelliteWarehouseInventoryAddModal, custSatelliteList },
   data () {
     return {
+      spinning: false,
       labelCol: { span: 8 },
       wrapperCol: { span: 16 },
       tableHeight: 0,
@@ -204,9 +207,13 @@ export default {
           productQty: 1
         }
       }
+      this.spinning = true
       satelliteWHSupplyInsert(params).then(res => {
         if (res.status == 200) {
           this.$message.success('添加成功')
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     },

+ 63 - 58
src/views/inventoryManagement/warehouse/list.vue

@@ -1,61 +1,63 @@
 <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 v-if="$hasPermissions('B_inventory_warehouse_add')" 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">
-        <!-- record.sysFlag表示该仓库是否默认,为默认仓库时则不可删除不可编辑 -->
-        <a-button
-          size="small"
-          v-if="$hasPermissions('M_inventoryWarehouseStoringLocationList')"
-          type="link"
-          class="button-warning"
-          @click="goStoringLocation(record)"
-          id="warehouseList-storingLocation-btn">仓位管理</a-button>
-        <a-button
-          size="small"
-          v-if="$hasPermissions('B_inventory_warehouse_edit') && record.sysFlag==0"
-          type="link"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="warehouseList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          v-if="$hasPermissions('B_inventory_warehouse_del') && record.sysFlag==0"
-          type="link"
-          class="button-error"
-          @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 v-if="$hasPermissions('B_inventory_warehouse_add')" 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">
+          <!-- record.sysFlag表示该仓库是否默认,为默认仓库时则不可删除不可编辑 -->
+          <a-button
+            size="small"
+            v-if="$hasPermissions('M_inventoryWarehouseStoringLocationList')"
+            type="link"
+            class="button-warning"
+            @click="goStoringLocation(record)"
+            id="warehouseList-storingLocation-btn">仓位管理</a-button>
+          <a-button
+            size="small"
+            v-if="$hasPermissions('B_inventory_warehouse_edit') && record.sysFlag==0"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="warehouseList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            v-if="$hasPermissions('B_inventory_warehouse_del') && record.sysFlag==0"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+            id="warehouseList-del-btn">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑仓库 -->
     <warehouse-edit-modal :openModal="openModal" :nowData="nowData" :itemId="itemId" @ok="handleOk" @close="closeModal" />
   </a-card>
@@ -69,6 +71,7 @@ export default {
   components: { STable, warehouseEditModal },
   data () {
     return {
+      spinning: false,
       queryParam: { //  查询条件
         name: '' //  仓库名称
       },
@@ -130,12 +133,16 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           warehouseDel({
             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
             }
           })
         }
@@ -148,5 +155,3 @@ export default {
   }
 }
 </script>
-
-<style lang="less"></style>

+ 64 - 57
src/views/inventoryManagement/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 v-if="$hasPermissions('B_inventory_warehouse_storingLocation_add')" 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">
-          <!-- record.sysFlag表示该仓库是否默认,为默认仓库时则不可删除不可编辑 -->
-          <a-button
-            size="small"
-            v-if="$hasPermissions('B_inventory_warehouse_storingLocation_edit') && record.sysFlag==0"
-            type="link"
-            class="button-info"
-            @click="handleEdit(record)"
-            id="storingLocationList-edit-btn">编辑</a-button>
-          <a-button
-            size="small"
-            v-if="$hasPermissions('B_inventory_warehouse_storingLocation_del') && record.sysFlag==0"
-            type="link"
-            class="button-error"
-            @click="handleDel(record)"
-            id="storingLocationList-del-btn">删除</a-button>
+    <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 v-if="$hasPermissions('B_inventory_warehouse_storingLocation_add')" 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">
+            <!-- record.sysFlag表示该仓库是否默认,为默认仓库时则不可删除不可编辑 -->
+            <a-button
+              size="small"
+              v-if="$hasPermissions('B_inventory_warehouse_storingLocation_edit') && record.sysFlag==0"
+              type="link"
+              class="button-info"
+              @click="handleEdit(record)"
+              id="storingLocationList-edit-btn">编辑</a-button>
+            <a-button
+              size="small"
+              v-if="$hasPermissions('B_inventory_warehouse_storingLocation_del') && record.sysFlag==0"
+              type="link"
+              class="button-error"
+              @click="handleDel(record)"
+              id="storingLocationList-del-btn">删除</a-button>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
     <!-- 新增/编辑仓位 -->
     <storing-location-edit-modal :openModal="openModal" :nowData="nowData" :itemId="itemId" @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
@@ -140,6 +143,7 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           warehouseLocDel({
             id: row.id,
             warehouseSn: _this.$route.params.sn
@@ -147,6 +151,9 @@ export default {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 177 - 181
src/views/power/dataDictionary/codeItemModal.vue

@@ -1,178 +1,179 @@
 <template>
   <div>
-    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancle="cancel">
-      <a-form :form="form" @submit="handleSubmit">
-        <a-row :gutter="24">
-          <a-col :span="24">
-            <!-- code -->
-            <a-form-item label="字典码" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
-              <a-input
-                disabled
-                placeholder=""
-                v-decorator="['formData.lookupCode', {
-                  initialValue: formData.lookupCode,
-                  rules: [] }]"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancle="cancel">
+        <a-form :form="form" @submit="handleSubmit">
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <!-- code -->
+              <a-form-item label="字典码" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
+                <a-input
+                  disabled
+                  placeholder=""
+                  v-decorator="['formData.lookupCode', {
+                    initialValue: formData.lookupCode,
+                    rules: [] }]"
+                />
+              </a-form-item>
+            </a-col>
+          </a-row>
 
-        <a-row :gutter="24">
-          <a-col :span="12" style="padding-right: 0px;">
-            <!-- 名称 -->
-            <a-form-item label="名称" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
-              <a-input
-                placeholder="请输入名称(最多30个字符)"
-                :maxLength="30"
-                v-decorator="['formData.dispName', {
-                  initialValue: formData.dispName,
-                  rules: [{ required: true, message: '请输入名称!' }] }]"
-              />
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <!-- 项编码 -->
-            <a-form-item label="项编码" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
-              <a-input
-                placeholder="请输入项编码"
-                v-decorator="['formData.code', {
-                  initialValue: formData.code,
-                  rules: [{ required: true, message: '请输入项编码!' }] }]"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="12" style="padding-right: 0px;">
-            <a-form-item label="启用" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
-              <a-radio-group
-                name="radioGroup"
-                v-decorator="[
-                  'formData.isEnable',
-                  {
-                    initialValue: formData.isEnable,
-                    rules: [] },
-                ]"
-              >
-                <a-radio :value="1">是</a-radio>
-                <a-radio :value="0">否</a-radio>
-              </a-radio-group>
-            </a-form-item>
-          </a-col>
-          <!-- 排序值 -->
-          <a-col :span="12">
-            <a-form-item label="排序值" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
-              <a-input-number
-                style="width: 100%;"
-                placeholder="请输入排序值(0~999999)"
-                v-decorator="['formData.sort', {
-                  initialValue: formData.sort,
-                  rules: [{ required: true, message: '请输入排序值!' }] }]"
-                :max="999999"
-                :min="0"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <!-- 扩展参数 -->
-        <a-row :gutter="24">
-          <a-col :span="12" style="padding-right: 0px;">
-            <!-- 扩展一 -->
-            <a-form-item label="扩展一" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
-              <a-input
-                placeholder=""
-                v-decorator="['formData.attr1', {
-                  initialValue: formData.attr1,
-                  rules: [] }]"
-              />
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <!-- 扩展二 -->
-            <a-form-item label="扩展二" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
-              <a-input
-                placeholder=""
-                v-decorator="['formData.attr2', {
-                  initialValue: formData.attr2,
-                  rules: [] }]"
-              />
-            </a-form-item>
-          </a-col>
-          <a-col :span="12" style="padding-right: 0px;">
-            <!-- 扩展三 -->
-            <a-form-item label="扩展三" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
-              <a-input
-                placeholder=""
-                v-decorator="['formData.attr3', {
-                  initialValue: formData.attr3,
-                  rules: [] }]"
-              />
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <!-- 扩展四 -->
-            <a-form-item label="扩展四" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
-              <a-input
-                placeholder=""
-                v-decorator="['formData.attr4', {
-                  initialValue: formData.attr4,
-                  rules: [] }]"
-              />
-            </a-form-item>
-          </a-col>
-          <a-col :span="12" style="padding-right: 0px;">
-            <!-- 扩展五 -->
-            <a-form-item label="扩展五" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
-              <a-input
-                placeholder=""
-                v-decorator="['formData.attr5', {
-                  initialValue: formData.attr5,
-                  rules: [] }]"
-              />
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <!-- 扩展六 -->
-            <a-form-item label="扩展六" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
-              <a-input
-                placeholder=""
-                v-decorator="['formData.attr6', {
-                  initialValue: formData.attr6,
-                  rules: [] }]"
-              />
-            </a-form-item>
-          </a-col>
-        </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12" style="padding-right: 0px;">
+              <!-- 名称 -->
+              <a-form-item label="名称" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+                <a-input
+                  placeholder="请输入名称(最多30个字符)"
+                  :maxLength="30"
+                  v-decorator="['formData.dispName', {
+                    initialValue: formData.dispName,
+                    rules: [{ required: true, message: '请输入名称!' }] }]"
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <!-- 项编码 -->
+              <a-form-item label="项编码" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+                <a-input
+                  placeholder="请输入项编码"
+                  v-decorator="['formData.code', {
+                    initialValue: formData.code,
+                    rules: [{ required: true, message: '请输入项编码!' }] }]"
+                />
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="12" style="padding-right: 0px;">
+              <a-form-item label="启用" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+                <a-radio-group
+                  name="radioGroup"
+                  v-decorator="[
+                    'formData.isEnable',
+                    {
+                      initialValue: formData.isEnable,
+                      rules: [] },
+                  ]"
+                >
+                  <a-radio :value="1">是</a-radio>
+                  <a-radio :value="0">否</a-radio>
+                </a-radio-group>
+              </a-form-item>
+            </a-col>
+            <!-- 排序值 -->
+            <a-col :span="12">
+              <a-form-item label="排序值" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+                <a-input-number
+                  style="width: 100%;"
+                  placeholder="请输入排序值(0~999999)"
+                  v-decorator="['formData.sort', {
+                    initialValue: formData.sort,
+                    rules: [{ required: true, message: '请输入排序值!' }] }]"
+                  :max="999999"
+                  :min="0"
+                />
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <!-- 扩展参数 -->
+          <a-row :gutter="24">
+            <a-col :span="12" style="padding-right: 0px;">
+              <!-- 扩展一 -->
+              <a-form-item label="扩展一" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+                <a-input
+                  placeholder=""
+                  v-decorator="['formData.attr1', {
+                    initialValue: formData.attr1,
+                    rules: [] }]"
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <!-- 扩展二 -->
+              <a-form-item label="扩展二" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+                <a-input
+                  placeholder=""
+                  v-decorator="['formData.attr2', {
+                    initialValue: formData.attr2,
+                    rules: [] }]"
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12" style="padding-right: 0px;">
+              <!-- 扩展三 -->
+              <a-form-item label="扩展三" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+                <a-input
+                  placeholder=""
+                  v-decorator="['formData.attr3', {
+                    initialValue: formData.attr3,
+                    rules: [] }]"
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <!-- 扩展四 -->
+              <a-form-item label="扩展四" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+                <a-input
+                  placeholder=""
+                  v-decorator="['formData.attr4', {
+                    initialValue: formData.attr4,
+                    rules: [] }]"
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12" style="padding-right: 0px;">
+              <!-- 扩展五 -->
+              <a-form-item label="扩展五" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+                <a-input
+                  placeholder=""
+                  v-decorator="['formData.attr5', {
+                    initialValue: formData.attr5,
+                    rules: [] }]"
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <!-- 扩展六 -->
+              <a-form-item label="扩展六" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+                <a-input
+                  placeholder=""
+                  v-decorator="['formData.attr6', {
+                    initialValue: formData.attr6,
+                    rules: [] }]"
+                />
+              </a-form-item>
+            </a-col>
+          </a-row>
 
-        <a-row :gutter="24">
-          <a-col :span="24">
-            <a-form-item label="备注" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
-              <a-textarea
-                v-decorator="[
-                  'formData.remarks',
-                  {
-                    initialValue: formData.remarks,
-                    rules: [] },
-                ]"
-                :maxLength="500"
-                style="min-height: 60px;"
-                placeholder="最多500字符"
-                autosize />
-            </a-form-item>
-          </a-col>
-        </a-row>
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <a-form-item label="备注" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
+                <a-textarea
+                  v-decorator="[
+                    'formData.remarks',
+                    {
+                      initialValue: formData.remarks,
+                      rules: [] },
+                  ]"
+                  :maxLength="500"
+                  style="min-height: 60px;"
+                  placeholder="最多500字符"
+                  autosize />
+              </a-form-item>
+            </a-col>
+          </a-row>
 
-        <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-          <a-button type="primary" @click="handleSubmit()">
-            保存
-          </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
-            取消
-          </a-button>
-        </a-form-item>
-      </a-form>
-
-    </a-modal>
+          <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
+            <a-button type="primary" @click="handleSubmit()">
+              保存
+            </a-button>
+            <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+              取消
+            </a-button>
+          </a-form-item>
+        </a-form>
+      </a-modal>
+    </a-spin>
   </div>
 </template>
 
@@ -198,6 +199,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       titleText: '添加字典项',
       isshow: this.visible,
       formLayout: 'horizontal',
@@ -225,23 +227,22 @@ export default {
       this.clear()
       this.$emit('close')
     },
-
     // 保存提交
     handleSubmit () {
       const _this = this
       this.form.validateFields((err, values) => {
-        console.log(values, 'values222')
         if (!err) {
-          console.log(values.formData, ' formData.type222222222')
+          _this.spinning = true
           saveLookUpItem(Object.assign(this.formData, values.formData)).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
+            if (res.status == 200) {
               this.$message.success(res.message)
               this.$emit('refresh')
               setTimeout(function () {
                 _this.cancel()
+                _this.spinning = false
               }, 300)
             } else {
+              _this.spinning = false
               // this.$message.error(res.message)
             }
           })
@@ -254,7 +255,7 @@ export default {
       this.$confirm({
         title: '提示',
         content: '确定取消吗?',
-		centered: true,
+        centered: true,
         onOk () {
           _this.clear()
           _this.cancel()
@@ -277,9 +278,6 @@ export default {
       this.formData.attr6 = ''
       this.formData.remarks = ''
     }
-
-  },
-  mounted () {
   },
   beforeCreate () {
     this.form = this.$form.createForm(this, { name: 'miniForm' })
@@ -293,10 +291,8 @@ export default {
         if (this.data.id) { // 编辑
           this.titleText = '编辑字典项'
           this.formData = Object.assign({}, this.data)
-
           delete this.formData.no
           this.formData.isEnable = Number(this.formData.isEnable)
-          console.log(this.formData, 'this.formData')
         } else {
           this.formData.lookupCode = this.data.lookupCode
           this.titleText = '添加字典项'

+ 78 - 83
src/views/power/dataDictionary/codeModal.vue

@@ -1,81 +1,82 @@
 <template>
   <div>
-    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancle="cancel">
-      <a-form :form="form" @submit="handleSubmit">
-        <!-- 类别编码 -->
-        <a-form-item label="类别编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-input
-            placeholder="请输入类别编码"
-            :disabled="true"
-            v-decorator="['formData.code', {
-              initialValue: formData.code,
-              rules: [{ required: true, message: '请输入类别编码!' }] }]"
-          />
-        </a-form-item>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancle="cancel">
+        <a-form :form="form" @submit="handleSubmit">
+          <!-- 类别编码 -->
+          <a-form-item label="类别编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
+            <a-input
+              placeholder="请输入类别编码"
+              :disabled="true"
+              v-decorator="['formData.code', {
+                initialValue: formData.code,
+                rules: [{ required: true, message: '请输入类别编码!' }] }]"
+            />
+          </a-form-item>
 
-        <!-- 名称 -->
-        <a-form-item label="名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-input
-            placeholder="请输入名称(最多30个字符)"
-            :maxLength="30"
-            v-decorator="['formData.name', {
-              initialValue: formData.name,
-              rules: [{ required: true, message: '请输入名称!' }] }]"
-          />
-        </a-form-item>
+          <!-- 名称 -->
+          <a-form-item label="名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
+            <a-input
+              placeholder="请输入名称(最多30个字符)"
+              :maxLength="30"
+              v-decorator="['formData.name', {
+                initialValue: formData.name,
+                rules: [{ required: true, message: '请输入名称!' }] }]"
+            />
+          </a-form-item>
 
-        <!-- 排序值 -->
-        <a-form-item label="排序值" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-input-number
-            style="width: 100%;"
-            placeholder="请输入排序值(0~999999)"
-            v-decorator="['formData.sort', {
-              initialValue: formData.sort,
-              rules: [{ required: true, message: '请输入排序值!' }] }]"
-            :max="999999"
-            :min="0"
-          />
-        </a-form-item>
-        <!-- 状态 -->
-        <a-form-item label="启用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-radio-group
-            name="radioGroup"
-            v-decorator="[
-              'formData.isEnable',
-              {
-                initialValue: formData.isEnable,
-                rules: [{ required: true, message: '请选择状态!' }] },
-            ]"
-          >
-            <a-radio :value="1">是</a-radio>
-            <a-radio :value="0">否</a-radio>
-          </a-radio-group>
-        </a-form-item>
+          <!-- 排序值 -->
+          <a-form-item label="排序值" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
+            <a-input-number
+              style="width: 100%;"
+              placeholder="请输入排序值(0~999999)"
+              v-decorator="['formData.sort', {
+                initialValue: formData.sort,
+                rules: [{ required: true, message: '请输入排序值!' }] }]"
+              :max="999999"
+              :min="0"
+            />
+          </a-form-item>
+          <!-- 状态 -->
+          <a-form-item label="启用" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
+            <a-radio-group
+              name="radioGroup"
+              v-decorator="[
+                'formData.isEnable',
+                {
+                  initialValue: formData.isEnable,
+                  rules: [{ required: true, message: '请选择状态!' }] },
+              ]"
+            >
+              <a-radio :value="1">是</a-radio>
+              <a-radio :value="0">否</a-radio>
+            </a-radio-group>
+          </a-form-item>
 
-        <a-form-item label="备注" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-textarea
-            v-decorator="[
-              'formData.remarks',
-              { initialValue: formData.remarks,
-                rules: [] },
-            ]"
-            :maxLength="500"
-            style="min-height: 60px;"
-            placeholder="最多500字符"
-            autosize />
-        </a-form-item>
+          <a-form-item label="备注" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
+            <a-textarea
+              v-decorator="[
+                'formData.remarks',
+                { initialValue: formData.remarks,
+                  rules: [] },
+              ]"
+              :maxLength="500"
+              style="min-height: 60px;"
+              placeholder="最多500字符"
+              autosize />
+          </a-form-item>
 
-        <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-          <a-button type="primary" @click="handleSubmit()">
-            保存
-          </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
-            取消
-          </a-button>
-        </a-form-item>
-      </a-form>
-
-    </a-modal>
+          <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
+            <a-button type="primary" @click="handleSubmit()">
+              保存
+            </a-button>
+            <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
+              取消
+            </a-button>
+          </a-form-item>
+        </a-form>
+      </a-modal>
+    </a-spin>
   </div>
 </template>
 
@@ -101,6 +102,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       titleText: '添加字典',
       isshow: this.visible,
       formLayout: 'horizontal',
@@ -120,22 +122,22 @@ export default {
       this.clear()
       this.$emit('close')
     },
-
     // 保存提交
     handleSubmit () {
       const _this = this
       this.form.validateFields((err, values) => {
         if (!err) {
-          console.log(values.formData, ' formData.type222222222')
+          _this.spinning = true
           saveLookUp(Object.assign(this.formData, values.formData)).then(res => {
-            console.log(res, 'res--save')
             if (res.status + '' === '200') {
               this.$message.success(res.message ? res.message : '保存成功')
               this.$emit('refresh')
               setTimeout(function () {
                 _this.cancel()
+                _this.spinning = false
               }, 300)
             } else {
+              _this.spinning = false
               // this.$message.warning(res.message)
             }
           })
@@ -148,7 +150,7 @@ export default {
       this.$confirm({
         title: '提示',
         content: '确定取消吗?',
-		centered: true,
+        centered: true,
         onOk () {
           _this.clear()
           _this.cancel()
@@ -164,9 +166,6 @@ export default {
       this.formData.isEnable = ''
       this.formData.remarks = ''
     }
-
-  },
-  mounted () {
   },
   beforeCreate () {
     this.form = this.$form.createForm(this, { name: 'miniForm' })
@@ -180,10 +179,8 @@ export default {
         if (this.data.id) { // 编辑
           this.formData.titleText = '编辑字典'
           this.formData = Object.assign({}, this.data)
-
           delete this.formData.no
           this.formData.isEnable = Number(this.formData.isEnable)
-          console.log(this.formData, 'this.formData')
         } else {
           this.formData.titleText = '添加字典'
         }
@@ -196,8 +193,6 @@ export default {
 </script>
 
 <style >
-  .modalBox{
-  }
   .ant-modal-footer {
     display: none;
   }

+ 103 - 106
src/views/power/dataDictionary/dataDictionary.vue

@@ -1,97 +1,98 @@
 <template>
   <a-card size="small" :bordered="false">
-    <a-row :gutter="24">
-      <!-- 左侧字典列表 -->
-      <a-col :span="6">
-        <a-row :gutter="24">
-          <!-- <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="addCode">添加字典</a-button> -->
-          <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="editCode">编辑字典</a-button>
-          <!-- <a-select style="width: 110px" placeholder="更多操作" allowClear >
-               <a-select-option @click="editCode" value="编辑字典">编辑字典</a-select-option>
-               <a-select-option @click="delectCode" value="删除字典">删除字典</a-select-option>
-             </a-select> -->
-        </a-row>
-        <a-row :gutter="24" class="textCount">
-          <a-icon type="info-circle" style="color: #1890FF;margin-right: 10px;" />
-          <span>当前选择:<span style="color: #40a9ff;font-weight: 600;">{{ selectedMenu }}</span><span v-if="selectedKey.length" class="imgSize" @click="cancelSel">取消选择</span></span>
-        </a-row>
-        <a-row :gutter="24" >
-          <a-input-search v-model="code" placeholder="输入编码类别/名称 搜索字典" style="width: 100%" @search="getCodeList" />
-        </a-row>
-        <a-row :gutter="24" >
-          <a-menu class="menu-box" style="border-right: 0;max-height: 650px;overflow: auto;" v-model="selectedKey" >
-            <a-menu-item style="margin-bottom: 0px;height: 30px; line-height: 30px;" v-for="(item,index) in codeList" :key="index" :value="item">{{ item.name }}</a-menu-item>
-          </a-menu>
-          <span v-if="noData" style="line-height: 50px; font-weight: 600;">暂无数据</span>
-        </a-row>
-      </a-col>
-      <!-- 右侧数据列表 -->
-      <a-col :span="18" >
-        <div style="padding-left: 20px;">
-          <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="queryParam.dispName" placeholder="请输入数据名称"/>
-                  </a-form-item>
-                </a-col>
-
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="状态">
-                    <a-select
-                      allowClear
-                      v-model="queryParam.isEnable"
-                      placeholder="请选择"
-                    >
-                      <a-select-option :value="1">
-                        是
-                      </a-select-option>
-                      <a-select-option :value="0">
-                        否
-                      </a-select-option>
-                    </a-select>
-                    <!-- <v-select code="FLAG" v-model="queryParam.enableFlag" allowClear placeholder="是否启用"></v-select> -->
-                  </a-form-item>
-                </a-col>
-                <a-col :md="2" :sm="24">
-                  <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
-                </a-col>
-                <!-- <a-col :md="2" :sm="24">
-                  <a-button type="primary" @click="queryParam=''">重置</a-button>
-                </a-col> -->
-              </a-row>
-            </a-form>
-          </div>
-          <!-- <a-divider/> -->
-          <div class="table-operator">
-            <a-button type="primary" icon="plus" @click="openCodeItemModal">添加数据</a-button>
-            <!-- <a-button type="" icon="delete" @click="delectAll">批量删除</a-button> -->
-            <a-button type="" icon="reload" @click="$refs.table.refresh(true)">刷新数据</a-button>
-          </div>
-          <!-- <div  class="textCount">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-row :gutter="24">
+        <!-- 左侧字典列表 -->
+        <a-col :span="6">
+          <a-row :gutter="24">
+            <!-- <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="addCode">添加字典</a-button> -->
+            <a-button style="margin-right: 10px;" type="primary" icon="plus" @click="editCode">编辑字典</a-button>
+            <!-- <a-select style="width: 110px" placeholder="更多操作" allowClear >
+                 <a-select-option @click="editCode" value="编辑字典">编辑字典</a-select-option>
+                 <a-select-option @click="delectCode" value="删除字典">删除字典</a-select-option>
+               </a-select> -->
+          </a-row>
+          <a-row :gutter="24" class="textCount">
             <a-icon type="info-circle" style="color: #1890FF;margin-right: 10px;" />
-            <span>已选择<span style="color: #40a9ff;font-weight: 600;margin-left: 10px;">{{selectedNum}}项</span><span class="imgSize">清空</span></span>
-          </div> -->
-          <s-table
-            ref="table"
-            size="default"
-            rowKey="id"
-            :columns="columns"
-            :data="loadData"
-            bordered
-          >
-            <span slot="action" slot-scope="text, record">
-              <template>
-                <a class="action-button" @click="handleEdit(record)">修改</a>
-                <a v-if="!record.isEnable" class="action-button red-text" @click="delect(record)">删除</a>
-              </template>
-            </span>
-          </s-table>
-        </div>
+            <span>当前选择:<span style="color: #40a9ff;font-weight: 600;">{{ selectedMenu }}</span><span v-if="selectedKey.length" class="imgSize" @click="cancelSel">取消选择</span></span>
+          </a-row>
+          <a-row :gutter="24" >
+            <a-input-search v-model="code" placeholder="输入编码类别/名称 搜索字典" style="width: 100%" @search="getCodeList" />
+          </a-row>
+          <a-row :gutter="24" >
+            <a-menu class="menu-box" style="border-right: 0;max-height: 650px;overflow: auto;" v-model="selectedKey" >
+              <a-menu-item style="margin-bottom: 0px;height: 30px; line-height: 30px;" v-for="(item,index) in codeList" :key="index" :value="item">{{ item.name }}</a-menu-item>
+            </a-menu>
+            <span v-if="noData" style="line-height: 50px; font-weight: 600;">暂无数据</span>
+          </a-row>
+        </a-col>
+        <!-- 右侧数据列表 -->
+        <a-col :span="18" >
+          <div style="padding-left: 20px;">
+            <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="queryParam.dispName" placeholder="请输入数据名称"/>
+                    </a-form-item>
+                  </a-col>
 
-      </a-col>
-    </a-row>
+                  <a-col :md="6" :sm="24">
+                    <a-form-item label="状态">
+                      <a-select
+                        allowClear
+                        v-model="queryParam.isEnable"
+                        placeholder="请选择"
+                      >
+                        <a-select-option :value="1">
+                          是
+                        </a-select-option>
+                        <a-select-option :value="0">
+                          否
+                        </a-select-option>
+                      </a-select>
+                      <!-- <v-select code="FLAG" v-model="queryParam.enableFlag" allowClear placeholder="是否启用"></v-select> -->
+                    </a-form-item>
+                  </a-col>
+                  <a-col :md="2" :sm="24">
+                    <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                  </a-col>
+                  <!-- <a-col :md="2" :sm="24">
+                    <a-button type="primary" @click="queryParam=''">重置</a-button>
+                  </a-col> -->
+                </a-row>
+              </a-form>
+            </div>
+            <!-- <a-divider/> -->
+            <div class="table-operator">
+              <a-button type="primary" icon="plus" @click="openCodeItemModal">添加数据</a-button>
+              <!-- <a-button type="" icon="delete" @click="delectAll">批量删除</a-button> -->
+              <a-button type="" icon="reload" @click="$refs.table.refresh(true)">刷新数据</a-button>
+            </div>
+            <!-- <div  class="textCount">
+              <a-icon type="info-circle" style="color: #1890FF;margin-right: 10px;" />
+              <span>已选择<span style="color: #40a9ff;font-weight: 600;margin-left: 10px;">{{selectedNum}}项</span><span class="imgSize">清空</span></span>
+            </div> -->
+            <s-table
+              ref="table"
+              size="default"
+              rowKey="id"
+              :columns="columns"
+              :data="loadData"
+              bordered
+            >
+              <span slot="action" slot-scope="text, record">
+                <template>
+                  <a class="action-button" @click="handleEdit(record)">修改</a>
+                  <a v-if="!record.isEnable" class="action-button red-text" @click="delect(record)">删除</a>
+                </template>
+              </span>
+            </s-table>
+          </div>
+        </a-col>
+      </a-row>
+    </a-spin>
     <codeModal :visible="showCodeModal" :data="codeData" @refresh="getCodeList" @close="showCodeModal = false"></codeModal>
     <codeItemModal :visible="showItemCodeModal" :data="itemCodeData" @refresh="$refs.table.refresh(true)" @close="showItemCodeModal = false"></codeItemModal>
   </a-card>
@@ -124,6 +125,7 @@ export default {
     //    }
     //  }
     return {
+      spinning: false,
       // 查询参数
       queryParam: {
         dispName: '',
@@ -202,8 +204,6 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        console.log(parameter, 'parameter')
-
         return getLookUpItem(Object.assign(parameter, this.queryParam)).then(res => {
           const no = (res.data.pageNo - 1) * res.data.pageSize
           for (let i = 0; i < res.data.list.length; i++) {
@@ -218,12 +218,9 @@ export default {
     }
   },
   methods: {
-
     // 获取字典列表
     getCodeList () {
-      console.log({ code: this.code })
       listLookUp({ code: this.code }).then(res => {
-        console.log(res, 'res1111111')
         if (res.status == 200) {
           this.codeList = res.data
           this.noData = false
@@ -256,14 +253,18 @@ export default {
       this.$confirm({
         title: '警告',
         content: `确定要删除 ${this.codeList[this.selectedKey].name} 吗?`,
-		centered: true,
+        centered: true,
         onOk () {
+          _this.spinning = true
           delLookUp({
             id: id
           }).then(res => {
             if (res.status == 200) {
               _this.$message.success('删除成功')
               _this.getCodeList()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           }).catch(() => {
             _this.$message.success('删除失败, 请稍后重试')
@@ -276,7 +277,6 @@ export default {
       this.selectedKey = []
       this.selectedMenu = ''
     },
-
     // 新增数据
     openCodeItemModal () {
       if (!this.selectedKey.length) {
@@ -285,7 +285,6 @@ export default {
       this.showItemCodeModal = true
       this.itemCodeData = { lookupCode: this.codeList[this.selectedKey].code }
     },
-
     // 批量删除数据
     delectAll () {
       if (!this.selectedNum) {
@@ -295,7 +294,7 @@ export default {
       this.$confirm({
         title: '警告',
         content: `确定要删除您选择的这${this.selectedNum}条数据吗?`,
-		centered: true,
+        centered: true,
         onOk () {
           // delectUserPower({
           //   id: row.id
@@ -316,15 +315,18 @@ export default {
       this.$confirm({
         title: '警告',
         content: '确定要删除吗?',
-		centered: true,
+        centered: true,
         onOk () {
+          _this.spinning = true
           delLookUpItem({
             id: row.id
           }).then(res => {
-            console.log(res, 'res1111')
             if (res.status == 200) {
               _this.$message.success('删除成功')
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           }).catch(() => {
             _this.$message.success('删除失败, 请稍后重试')
@@ -333,13 +335,9 @@ export default {
       })
     },
     handleEdit (row) {
-      console.log(row, 'row')
       this.showItemCodeModal = true
       this.itemCodeData = row
     }
-
-  },
-  mounted () {
   },
   beforeCreate () {
     this.form = this.$form.createForm(this, { name: 'miniForm' })
@@ -351,7 +349,6 @@ export default {
   },
   watch: {
     selectedKey (newValue, oldValue) {
-      console.log(newValue, 'newValue')
       if (newValue.length) {
         this.selectedMenu = this.codeList[this.selectedKey].name + ' ' + '(' + this.codeList[this.selectedKey].code + ')'
         this.queryParam.lookupCode = this.codeList[this.selectedKey].code

+ 34 - 31
src/views/power/role/menuModal.vue

@@ -1,32 +1,34 @@
 <template>
   <div>
-    <a-modal
-      centered
-      class="modalBox"
-      :title="roleName"
-      v-model="isshow"
-      @cancle="cancel"
-      :maskClosable="false">
-      <a-form class="form-box" style="max-height: 600px;" :form="form" @submit="handleSubmit">
-        <a-tree
-          checkable
-          @check="onCheck"
-          @expand="onExpand"
-          :expandedKeys="expandedKeys"
-          :autoExpandParent="autoExpandParent"
-          v-model="checkedKeys"
-          :treeData="treeData"
-        />
-      </a-form>
-      <a-form-item :wrapper-col="{ offset: 15 }">
-        <a-button type="primary" @click="handleSubmit()" id="menuModal-handleSubmit">
-          保存
-        </a-button>
-        <a-button :style="{ marginLeft: '8px' }" @click="cancel" id="menuModal-handleCancel">
-          取消
-        </a-button>
-      </a-form-item>
-    </a-modal>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-modal
+        centered
+        class="modalBox"
+        :title="roleName"
+        v-model="isshow"
+        @cancle="cancel"
+        :maskClosable="false">
+        <a-form class="form-box" style="max-height: 600px;" :form="form" @submit="handleSubmit">
+          <a-tree
+            checkable
+            @check="onCheck"
+            @expand="onExpand"
+            :expandedKeys="expandedKeys"
+            :autoExpandParent="autoExpandParent"
+            v-model="checkedKeys"
+            :treeData="treeData"
+          />
+        </a-form>
+        <a-form-item :wrapper-col="{ offset: 15 }">
+          <a-button type="primary" @click="handleSubmit()" id="menuModal-handleSubmit">
+            保存
+          </a-button>
+          <a-button :style="{ marginLeft: '8px' }" @click="cancel" id="menuModal-handleCancel">
+            取消
+          </a-button>
+        </a-form-item>
+      </a-modal>
+    </a-spin>
   </div>
 </template>
 
@@ -52,6 +54,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       treeData: [],
       roleName: '',
       expandedKeys: [],
@@ -83,21 +86,21 @@ export default {
       const _this = this
       this.form.validateFields((err, values) => {
         if (!err) {
-          console.log(this.checkedData)
           if (this.checkedData.length == 0) {
             return this.$message.warning('请先选择菜单')
           }
           const arr = this.checkedData.join(',')
-          console.log({ id: this.id, menuIds: arr })
+          _this.spinning = true
           addMenuPower({ id: this.id, menuIds: arr }).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
+            if (res.status == 200) {
               this.$message.success(res.message ? res.message : '保存成功')
               this.$emit('refresh')
               setTimeout(function () {
                 _this.cancel()
+                _this.spinning = false
               }, 300)
             } else {
+              _this.spinning = false
               // this.$message.error(res.message)
             }
           })

+ 77 - 71
src/views/power/role/roleList.vue

@@ -1,70 +1,71 @@
 <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>
-    </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>
-      </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)" />
-      </span>
-    </s-table>
+    <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>
+      </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>
+        </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)" />
+        </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>
@@ -93,6 +94,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       // 查询参数
       queryParam: {
         name: '',
@@ -149,7 +151,6 @@ export default {
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        console.log(parameter, 'parameter')
         return getPowerRoleList(Object.assign(parameter, this.queryParam)).then(res => {
           const no = (res.data.pageNo - 1) * res.data.pageSize
           for (let i = 0; i < res.data.list.length; i++) {
@@ -197,7 +198,6 @@ export default {
         if (res.status == 200) {
           _this.menuData = res.data
           this.showMenuModal = true
-          console.log(res.data, 'this.itemData')
         }
       })
     },
@@ -210,20 +210,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
     },
@@ -233,11 +235,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
         }
       })
     }

+ 64 - 67
src/views/power/role/roleModal.vue

@@ -1,66 +1,67 @@
 <template>
   <div>
-    <a-modal
-      centered
-      class="modalBox"
-      :title="titleText"
-      v-model="isshow"
-      @cancle="cancel"
-      :maskClosable="false"
-      width="45%">
-      <a-form :form="form" @submit="handleSubmit">
-        <!-- 用户名称 -->
-        <a-form-item label="角色名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-input
-            placeholder="请输入角色名称(最多30个字符)"
-            :maxLength="30"
-            v-decorator="['formData.name', {
-              initialValue: formData.name,
-              getValueFromEvent: $filterEmpty,
-              rules: [{ required: true, message: '请输入角色名称(最多30个字符)!' },{pattern:'^[^<|>]{1,30}$',message:'请输入不含<或>的字符,最多30个字符'}] }]"
-          />
-        </a-form-item>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-modal
+        centered
+        class="modalBox"
+        :title="titleText"
+        v-model="isshow"
+        @cancle="cancel"
+        :maskClosable="false"
+        width="45%">
+        <a-form :form="form" @submit="handleSubmit">
+          <!-- 用户名称 -->
+          <a-form-item label="角色名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
+            <a-input
+              placeholder="请输入角色名称(最多30个字符)"
+              :maxLength="30"
+              v-decorator="['formData.name', {
+                initialValue: formData.name,
+                getValueFromEvent: $filterEmpty,
+                rules: [{ required: true, message: '请输入角色名称(最多30个字符)!' },{pattern:'^[^<|>]{1,30}$',message:'请输入不含<或>的字符,最多30个字符'}] }]"
+            />
+          </a-form-item>
 
-        <!-- 状态 -->
-        <a-form-item label="状态" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-radio-group
-            name="radioGroup"
-            v-decorator="[
-              'formData.isEnable',
-              {
-                initialValue: formData.isEnable,
-                rules: [{ required: true, message: '请选择状态!' }] },
-            ]"
-          >
-            <a-radio :value="1">启用</a-radio>
-            <a-radio :value="0">禁用</a-radio>
-          </a-radio-group>
-        </a-form-item>
+          <!-- 状态 -->
+          <a-form-item label="状态" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
+            <a-radio-group
+              name="radioGroup"
+              v-decorator="[
+                'formData.isEnable',
+                {
+                  initialValue: formData.isEnable,
+                  rules: [{ required: true, message: '请选择状态!' }] },
+              ]"
+            >
+              <a-radio :value="1">启用</a-radio>
+              <a-radio :value="0">禁用</a-radio>
+            </a-radio-group>
+          </a-form-item>
 
-        <a-form-item label="角色描述" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
-          <a-textarea
-            v-decorator="[
-              'formData.remarks',
-              { initialValue: formData.remarks,
-                rules: [] },
-            ]"
-            style="min-height: 60px;"
-            :maxLength="500"
-            placeholder="请输入描述(最多500个字符)"
-            autosize />
-        </a-form-item>
+          <a-form-item label="角色描述" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
+            <a-textarea
+              v-decorator="[
+                'formData.remarks',
+                { initialValue: formData.remarks,
+                  rules: [] },
+              ]"
+              style="min-height: 60px;"
+              :maxLength="500"
+              placeholder="请输入描述(最多500个字符)"
+              autosize />
+          </a-form-item>
 
-        <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
-          <a-button type="primary" @click="handleSubmit()">
-            保存
-          </a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="cancel">
-            取消
-          </a-button>
-        </a-form-item>
-      </a-form>
-
-    </a-modal>
+          <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
+            <a-button type="primary" @click="handleSubmit()">
+              保存
+            </a-button>
+            <a-button :style="{ marginLeft: '8px' }" @click="cancel">
+              取消
+            </a-button>
+          </a-form-item>
+        </a-form>
+      </a-modal>
+    </a-spin>
   </div>
 </template>
 
@@ -86,6 +87,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       titleText: '添加角色',
       isshow: this.visible,
       formLayout: 'horizontal',
@@ -95,7 +97,6 @@ export default {
         isEnable: '', // 活动状态
         remarks: ''
       }
-
     }
   },
   methods: {
@@ -108,16 +109,17 @@ export default {
       const _this = this
       this.form.validateFields((err, values) => {
         if (!err) {
-          console.log(values.formData, ' formData.type222222222')
+          _this.spinning = true
           saveRolePower(Object.assign(this.formData, values.formData)).then(res => {
-            console.log(res, 'res--save')
-            if (res.status + '' === '200') {
+            if (res.status == 200) {
               this.$message.success(res.message ? res.message : '保存成功')
               this.$emit('refresh')
               setTimeout(function () {
                 _this.cancel()
+                _this.spinning = false
               }, 300)
             } else {
+              _this.spinning = false
               // this.$message.error(res.message)
             }
           })
@@ -132,8 +134,6 @@ export default {
       this.formData.remarks = ''
     }
   },
-  mounted () {
-  },
   beforeCreate () {
     this.form = this.$form.createForm(this, { name: 'roleModal' })
   },
@@ -148,7 +148,6 @@ export default {
           this.formData = Object.assign({}, this.data)
           delete this.formData.no
           this.formData.isEnable = Number(this.formData.isEnable)
-          console.log(this.formData, 'this.formData')
         } else {
           this.titleText = '添加角色'
         }
@@ -161,8 +160,6 @@ export default {
 </script>
 
 <style >
-  .modalBox{
-  }
   .ant-modal-footer {
     display: none;
   }

+ 77 - 64
src/views/power/user/userList.vue

@@ -1,69 +1,71 @@
 <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 id="userList-name" allowClear v-model.trim="queryParam.name" placeholder="请输入用户名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="手机号码">
-              <a-input id="userList-phone" allowClear v-model.trim="queryParam.phone" placeholder="请输入手机号码"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="状态">
-              <v-select id="userList-loginFlag" 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)" id="userList-search">查询</a-button>
-            <a-button type="" @click="reset" id="userList-reset" style="margin-left: 10px;">重置</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>
-    </div>
-    <s-table
-      ref="table"
-      size="default"
-      rowKey="id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1360 }"
-      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>
-      </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 && record.ownerOrgFlag==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 && record.ownerOrgFlag==1 && $hasPermissions('B_powerMD_user_del')"
-          @click="delect(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 id="userList-name" allowClear v-model.trim="queryParam.name" placeholder="请输入用户名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="手机号码">
+                <a-input id="userList-phone" allowClear v-model.trim="queryParam.phone" placeholder="请输入手机号码"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="状态">
+                <v-select id="userList-loginFlag" 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)" id="userList-search">查询</a-button>
+              <a-button type="" @click="reset" id="userList-reset" style="margin-left: 10px;">重置</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>
+      </div>
+      <s-table
+        ref="table"
+        size="default"
+        rowKey="id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1360 }"
+        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>
+        </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 && record.ownerOrgFlag==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 && record.ownerOrgFlag==1 && $hasPermissions('B_powerMD_user_del')"
+            @click="delect(record)"/>
+        </span>
+      </s-table>
+    </a-spin>
     <!-- 自建账号  新增/编辑 -->
     <userModal :visible="showModal" @refresh="$refs.table.refresh(true)" :nowData="itemData" @close="handleUserCancel"></userModal>
     <userSyncModal :openModal="showSyncModal" @ok="$refs.table.refresh(true)" :nowData="itemData" @close="handleCancel" />
@@ -82,6 +84,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       // 查询参数
       queryParam: {
         name: '',
@@ -144,12 +147,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
             }
           })
         }
@@ -163,14 +170,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
             }
           })
         }
@@ -195,12 +205,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
         }
       })
     }

+ 98 - 93
src/views/power/user/userModal.vue

@@ -1,97 +1,99 @@
 <template>
   <div>
-    <a-modal
-      centered
-      class="userEdit-modal"
-      :footer="null"
-      :maskClosable="false"
-      :title="titleText"
-      v-model="isshow"
-      @cancle="isshow=false"
-      :width="800">
-      <a-form-model
-        id="userEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <a-form-model-item label="用户名称" prop="name">
-              <a-input
-                id="userEdit-name"
-                v-model.trim="form.name"
-                @change="filterEmpty"
-                :maxLength="30"
-                allowClear
-                placeholder="请输入用户名称(最多30个字符)"/>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-model-item label="手机号码" prop="phone">
-              <a-input id="userEdit-phone" v-model.trim="form.phone":maxLength="11" allowClear placeholder="请输入手机号码"/>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="20">
-          <a-col :span="24">
-            <a-form-model-item label="用户账号" prop="loginName" :label-col="{span: 3}" :wrapper-col="{span: 20}">
-              <a-input id="userEdit-loginName" v-model.trim="form.loginName":maxLength="50" allowClear placeholder="请输入用户账号(最多50个字符)"/>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <!-- 性别 -->
-          <a-col :span="12">
-            <a-form-model-item label="性别" prop="sex">
-              <v-select
-                ref="sex"
-                id="userEdit-sex"
-                code="SEX"
-                v-model="form.sex"
-                placeholder="请选择性别"
-                allowClear ></v-select>
-            </a-form-model-item>
-          </a-col>
-          <!-- 状态 -->
-          <a-col :span="12">
-            <a-form-model-item label="状态" prop="loginFlag">
-              <a-radio-group name="radioGroup" v-model="form.loginFlag" placeholder="请选择状态">
-                <a-radio :value="1">是</a-radio>
-                <a-radio :value="0">否</a-radio>
-              </a-radio-group>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="24">
-            <a-form-model-item label="角色" prop="roleNames" :label-col="{span: 3}" :wrapper-col="{span: 20}">
-              <a-select
-                placeholder="请选择角色"
-                id="userSyncEdit-roleNames"
-                allowClear
-                v-model="form.roleNames"
-                mode="multiple">
-                <a-select-option v-for="item in roleList" :key="item.id" :value="item.id" :disabled="item.isEnable == '0' ? true : false">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="24">
-            <a-form-model-item label="备注" prop="remarks" :label-col="{span: 3}" :wrapper-col="{span: 20}">
-              <a-textarea id="userEdit-remarks" v-model.trim="form.remarks":maxLength="500" allowClear placeholder="请输入备注(最多500个字符)"/>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
-        <a-form-model-item :label-col="{span: 0}" :wrapper-col="{span: 24}" style="text-align: center;">
-          <a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '8px' }">保存</a-button>
-          <a-button :style="{ marginLeft: '8px' }" @click="isshow=false">取消</a-button>
-        </a-form-model-item>
-      </a-form-model>
-    </a-modal>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-modal
+        centered
+        class="userEdit-modal"
+        :footer="null"
+        :maskClosable="false"
+        :title="titleText"
+        v-model="isshow"
+        @cancle="isshow=false"
+        :width="800">
+        <a-form-model
+          id="userEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-model-item label="用户名称" prop="name">
+                <a-input
+                  id="userEdit-name"
+                  v-model.trim="form.name"
+                  @change="filterEmpty"
+                  :maxLength="30"
+                  allowClear
+                  placeholder="请输入用户名称(最多30个字符)"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-model-item label="手机号码" prop="phone">
+                <a-input id="userEdit-phone" v-model.trim="form.phone":maxLength="11" allowClear placeholder="请输入手机号码"/>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="20">
+            <a-col :span="24">
+              <a-form-model-item label="用户账号" prop="loginName" :label-col="{span: 3}" :wrapper-col="{span: 20}">
+                <a-input id="userEdit-loginName" v-model.trim="form.loginName":maxLength="50" allowClear placeholder="请输入用户账号(最多50个字符)"/>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <!-- 性别 -->
+            <a-col :span="12">
+              <a-form-model-item label="性别" prop="sex">
+                <v-select
+                  ref="sex"
+                  id="userEdit-sex"
+                  code="SEX"
+                  v-model="form.sex"
+                  placeholder="请选择性别"
+                  allowClear ></v-select>
+              </a-form-model-item>
+            </a-col>
+            <!-- 状态 -->
+            <a-col :span="12">
+              <a-form-model-item label="状态" prop="loginFlag">
+                <a-radio-group name="radioGroup" v-model="form.loginFlag" placeholder="请选择状态">
+                  <a-radio :value="1">是</a-radio>
+                  <a-radio :value="0">否</a-radio>
+                </a-radio-group>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <a-form-model-item label="角色" prop="roleNames" :label-col="{span: 3}" :wrapper-col="{span: 20}">
+                <a-select
+                  placeholder="请选择角色"
+                  id="userSyncEdit-roleNames"
+                  allowClear
+                  v-model="form.roleNames"
+                  mode="multiple">
+                  <a-select-option v-for="item in roleList" :key="item.id" :value="item.id" :disabled="item.isEnable == '0' ? true : false">{{ item.name }}</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <a-form-model-item label="备注" prop="remarks" :label-col="{span: 3}" :wrapper-col="{span: 20}">
+                <a-textarea id="userEdit-remarks" v-model.trim="form.remarks":maxLength="500" allowClear placeholder="请输入备注(最多500个字符)"/>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <a-form-model-item :label-col="{span: 0}" :wrapper-col="{span: 24}" style="text-align: center;">
+            <a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '8px' }">保存</a-button>
+            <a-button :style="{ marginLeft: '8px' }" @click="isshow=false">取消</a-button>
+          </a-form-model-item>
+        </a-form-model>
+      </a-modal>
+    </a-spin>
   </div>
 </template>
 
@@ -117,6 +119,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       titleText: '新增用户',
       isshow: this.visible,
       roleList: [],
@@ -160,15 +163,17 @@ export default {
           const params = JSON.parse(JSON.stringify(_this.form))
           params.roleNames = _this.form.roleNames.join(',')
           params.id = _this.nowData && _this.nowData.id ? _this.nowData.id : null
+          _this.spinning = true
           saveUserPower(params).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$emit('refresh')
               setTimeout(function () {
                 _this.isshow = false
+                _this.spinning = false
               }, 300)
             } else {
-
+              _this.spinning = false
             }
           })
         } else {

+ 28 - 23
src/views/power/user/userSyncModal.vue

@@ -8,29 +8,31 @@
     v-model="isShow"
     @cancle="isShow=false"
     :width="800">
-    <!-- 表单 -->
-    <div>
-      <a-form-model
-        id="userSyncEdit-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol"
-      >
-        <a-form-model-item label="用户名称">{{ detailData && detailData.name ? detailData.name : '--' }}</a-form-model-item>
-        <a-form-model-item label="用户账号">{{ detailData && detailData.loginName ? detailData.loginName : '--' }}</a-form-model-item>
-        <a-form-model-item label="用户角色" prop="roleNames">
-          <a-select placeholder="请选择角色" id="userSyncEdit-roleNames" allowClear v-model="form.roleNames" mode="multiple">
-            <a-select-option v-for="item in roleList" :key="item.id" :value="item.id" :disabled="item.isEnable == '0' ? true : false">{{ item.name }}</a-select-option>
-          </a-select>
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="userSyncEdit-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="userSyncEdit-modal-back" @click="isShow = false" style="margin-left: 15px;">关闭</a-button>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 表单 -->
+      <div>
+        <a-form-model
+          id="userSyncEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="用户名称">{{ detailData && detailData.name ? detailData.name : '--' }}</a-form-model-item>
+          <a-form-model-item label="用户账号">{{ detailData && detailData.loginName ? detailData.loginName : '--' }}</a-form-model-item>
+          <a-form-model-item label="用户角色" prop="roleNames">
+            <a-select placeholder="请选择角色" id="userSyncEdit-roleNames" allowClear v-model="form.roleNames" mode="multiple">
+              <a-select-option v-for="item in roleList" :key="item.id" :value="item.id" :disabled="item.isEnable == '0' ? true : false">{{ item.name }}</a-select-option>
+            </a-select>
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="userSyncEdit-modal-save" @click="handleSave">保存</a-button>
+          <a-button id="userSyncEdit-modal-back" @click="isShow = false" style="margin-left: 15px;">关闭</a-button>
+        </div>
       </div>
-    </div>
+    </a-spin>
   </a-modal>
 </template>
 
@@ -52,6 +54,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
         labelCol: { span: 6 },
@@ -75,15 +78,17 @@ export default {
         if (valid) {
           const params = JSON.parse(JSON.stringify(_this.detailData))
           params.roleNames = _this.form.roleNames.join(',')
+          _this.spinning = true
           saveUserPower(params).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$emit('ok')
               setTimeout(function () {
                 _this.isShow = false
+                _this.spinning = false
               }, 300)
             } else {
-
+              _this.spinning = false
             }
           })
         } else {

+ 0 - 20
src/views/productManagement/priceChangeRecord/list.vue

@@ -273,31 +273,11 @@ export default {
       this.queryParam.productTypeSn3 = ''
       this.$refs.table.refresh(true)
     },
-    // 审核
-    handleAudit (row) {
-      this.itemId = row.id
-      this.openAuditModal = true
-    },
     filterOption (input, option) {
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
-    //  编辑
-    handleEdit (row) {
-      this.itemId = row.id
-      this.openModal = true
-    },
-    //  关闭弹框
-    closeModal () {
-      this.itemId = ''
-      this.openModal = false
-    },
-    //  关闭审核弹框
-    closeAuditModal () {
-      this.itemId = ''
-      this.openAuditModal = false
-    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''

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

@@ -1,64 +1,66 @@
 <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="ENABLE_FLAG" id="productBrandList-enabledFlag" v-model="queryParam.enabledFlag" 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="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 v-if="$hasPermissions('B_product_dealerProductBrand_add')" id="productBrandList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-      <!-- <a-button id="productBrandList-import" @click="handleImport">导入品牌</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="enabledFlag" slot-scope="text, record">
-        <a-switch
-          id="productBrandList-enable"
-          checkedChildren="启用"
-          unCheckedChildren="禁用"
-          v-if="$hasPermissions('B_product_dealerProductBrand_enable')&&record.sysFlag == 0"
-          @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"
-          v-if="$hasPermissions('B_product_dealerProductBrand_edit')&&record.sysFlag == 0"
-          type="link"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="productBrandList-edit-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="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="ENABLE_FLAG" id="productBrandList-enabledFlag" v-model="queryParam.enabledFlag" 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="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 v-if="$hasPermissions('B_product_dealerProductBrand_add')" id="productBrandList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+        <!-- <a-button id="productBrandList-import" @click="handleImport">导入品牌</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="enabledFlag" slot-scope="text, record">
+          <a-switch
+            id="productBrandList-enable"
+            checkedChildren="启用"
+            unCheckedChildren="禁用"
+            v-if="$hasPermissions('B_product_dealerProductBrand_enable')&&record.sysFlag == 0"
+            @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"
+            v-if="$hasPermissions('B_product_dealerProductBrand_edit')&&record.sysFlag == 0"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="productBrandList-edit-btn">编辑</a-button>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑产品品牌 -->
     <product-brand-edit-modal :openModal="openModal" :nowData="nowData" :itemId="itemId" @ok="handleOk" @close="closeModal" />
   </a-card>
@@ -72,6 +74,7 @@ export default {
   components: { STable, VSelect, productBrandEditModal },
   data () {
     return {
+      spinning: false,
       queryParam: { //  查询条件
         brandName: '', //  品牌名称
         enabledFlag: undefined //  状态
@@ -137,12 +140,15 @@ export default {
         id: record.id,
         enabledFlag: record.enabledFlag == 1 ? '0' : '1'
       }
+      _this.spinning = true
       dealerProductBrandUpdate(_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
         }
       })
     },

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

@@ -1,50 +1,52 @@
 <template>
   <a-card size="small" :bordered="false" class="productCategoryList-wrap">
-    <!-- 操作按钮 -->
-    <div class="table-operator-nobor">
-      <a-button v-if="$hasPermissions('B_product_dealerProductType_add')" 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 && $hasPermissions('B_product_dealerProductType_add')&&record.sysFlag == 0"
-          type="link"
-          class="button-success"
-          size="small"
-          icon="plus"
-          id="productCategory-addSubItem"
-          @click="handleAdd(record)">新增子级</a-button>
-        <a-button
-          v-if="record.pid != 0 && $hasPermissions('B_product_dealerProductType_edit')&&record.sysFlag == 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 && $hasPermissions('B_product_dealerProductType_del')&&record.sysFlag == 0"
-          type="link"
-          class="button-error"
-          size="small"
-          icon="delete"
-          id="productCategory-del"
-          @click="handleDel(record)">删除</a-button>
-        <span v-if="record.sysFlag != 0">--</span>
-      </template>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 操作按钮 -->
+      <div class="table-operator-nobor">
+        <a-button v-if="$hasPermissions('B_product_dealerProductType_add')" 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 && $hasPermissions('B_product_dealerProductType_add')&&record.sysFlag == 0"
+            type="link"
+            class="button-success"
+            size="small"
+            icon="plus"
+            id="productCategory-addSubItem"
+            @click="handleAdd(record)">新增子级</a-button>
+          <a-button
+            v-if="record.pid != 0 && $hasPermissions('B_product_dealerProductType_edit')&&record.sysFlag == 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 && $hasPermissions('B_product_dealerProductType_del')&&record.sysFlag == 0"
+            type="link"
+            class="button-error"
+            size="small"
+            icon="delete"
+            id="productCategory-del"
+            @click="handleDel(record)">删除</a-button>
+          <span v-if="record.sysFlag != 0">--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑产品分类 -->
     <product-category-edit-modal :openModal="openModal" :nowData="nowData" :itemId="itemId" @ok="handleOk" @close="closeModal" />
   </a-card>
@@ -58,6 +60,7 @@ export default {
   components: { STable, productCategoryEditModal },
   data () {
     return {
+      spinning: false,
       tableHeight: 0,
       formItemLayout: {
         labelCol: { span: 6 },
@@ -130,10 +133,14 @@ export default {
         content: '删除后原数据不可恢复,是否删除?',
         centered: true,
         onOk () {
+          _this.spinning = true
           dealerProductTypeDel({ id: _this.nowId }).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-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="productInfoEdit-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-back">
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="productInfoEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        </template>
+      </a-page-header>
       <a-card size="small" :bordered="false" class="productInfoEdit-table-page-wrapper">
         <a-form-model
           id="productInfoEdit-form"

+ 120 - 113
src/views/productManagement/productInfo/list.vue

@@ -1,126 +1,128 @@
 <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-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
-            </a-form-item>
-          </a-col>
-          <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-origCode" v-model.trim="queryParam.origCode" 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="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 label="产品编码">
+                <a-input id="productInfoList-code" v-model.trim="queryParam.code" 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="productInfoList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear />
+              <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="ENABLE_FLAG" id="productInfoList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></v-select>
+              <a-form-item label="原厂编码">
+                <a-input id="productInfoList-origCode" v-model.trim="queryParam.origCode" 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="productInfoList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
-            <!-- <a-button
-              style="margin: 0 0 18px 8px"
-              type="danger"
-              @click="handleExport"
-              :disabled="disabled"
-              :loading="exportLoading"
-              id="inventoryQueryList-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 v-if="$hasPermissions('B_product_dealerProduct_add')" id="productInfoList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-      <!-- <a-button id="productInfoList-import" @click="handleImport" style="margin: 0 15px;">批量导入产品</a-button> -->
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1820, 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="enabledFlag" slot-scope="text, record">
-        <a-switch
-          id="productInfoList-enable"
-          checkedChildren="启用"
-          unCheckedChildren="禁用"
-          v-if="$hasPermissions('B_product_dealerProduct_enable')"
-          @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"
-          v-if="$hasPermissions('B_product_dealerProduct_edit')"
-          type="link"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="productInfoList-edit-btn">编辑</a-button>
-        <a-button
-          v-if="$hasPermissions('B_product_dealerProduct_detail')"
-          size="small"
-          type="link"
-          class="button-success"
-          @click="handleDetail(record)"
-          id="productInfoList-detail-btn">详情</a-button>
-      </template>
-    </s-table>
+            <template v-if="advanced">
+              <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>
+              <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="productInfoList-productType"
+                    placeholder="请选择产品分类"
+                    allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="状态">
+                  <v-select code="ENABLE_FLAG" id="productInfoList-enabledFlag" v-model="queryParam.enabledFlag" 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 8px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
+              <!-- <a-button
+                style="margin: 0 0 18px 8px"
+                type="danger"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                id="inventoryQueryList-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 v-if="$hasPermissions('B_product_dealerProduct_add')" id="productInfoList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+        <!-- <a-button id="productInfoList-import" @click="handleImport" style="margin: 0 15px;">批量导入产品</a-button> -->
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1820, 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="enabledFlag" slot-scope="text, record">
+          <a-switch
+            id="productInfoList-enable"
+            checkedChildren="启用"
+            unCheckedChildren="禁用"
+            v-if="$hasPermissions('B_product_dealerProduct_enable')"
+            @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"
+            v-if="$hasPermissions('B_product_dealerProduct_edit')"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="productInfoList-edit-btn">编辑</a-button>
+          <a-button
+            v-if="$hasPermissions('B_product_dealerProduct_detail')"
+            size="small"
+            type="link"
+            class="button-success"
+            @click="handleDetail(record)"
+            id="productInfoList-detail-btn">详情</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 产品详情 -->
     <product-info-detail-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
   </a-card>
@@ -137,6 +139,7 @@ export default {
   components: { STable, VSelect, productInfoDetailModal },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       productType: [],
@@ -220,7 +223,6 @@ export default {
 
     },
     filterOption (input, option) {
-      console.log(option.componentOptions.children[0].text, 'option')
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
@@ -262,21 +264,26 @@ export default {
         id: record.id,
         enabledFlag: record.enabledFlag == 1 ? '0' : '1'
       }
+      this.spinning = true
       dealerProductUpdate(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
         }
       })
     },
     //  导出
     handleExport () {
       this.exportLoading = true
+      this.spinning = true
       dealerProductExport(this.queryParam).then(res => {
         this.exportLoading = false
         this.download(res)
+        this.spinning = false
       })
     },
     download (data) {

+ 6 - 2
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -332,12 +332,17 @@ export default {
         closable: true,
         onOk () {
           _this.delLoading = true
+          _this.spinning = true
           purchaseDetailDel({ id: row.id }).then(res => {
             if (res.status == 200) {
               _this.resetPurchaseDetail(true)
               _this.$message.success(res.message)
+              _this.delLoading = false
+              _this.spinning = false
+            } else {
+              _this.delLoading = false
+              _this.spinning = false
             }
-            _this.delLoading = false
           })
         }
       })
@@ -349,7 +354,6 @@ export default {
     },
     // 修改数量后
     qtyBlur (val, record) {
-      console.log(val, record)
       this.handleAdd(record, 1)
     },
     //  导入明细

+ 127 - 120
src/views/purchasingManagement/purchaseOrder/list.vue

@@ -1,125 +1,127 @@
 <template>
   <a-card size="small" :bordered="false" class="purchaseOrderList-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="purchaseOrderList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-              <a-select
-                id="purchaseOrderList-purchaseTargetSn"
-                placeholder="请选择供应商"
-                allowClear
-                v-model="queryParam.purchaseTargetSn"
-                :showSearch="true"
-                option-filter-prop="children"
-                :filter-option="filterOption"
-                @change="tragetTypeChange">
-                <a-select-option v-for="item in supplierList" :key="item.purchaseTargetSn" :value="item.purchaseTargetSn">{{ item.purchaseTargetName }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24" v-show="advanced">
-            <a-form-item label="业务状态">
-              <v-select
-                v-model="queryParam.billStatus"
-                ref="billStatus"
-                id="purchaseOrderList-billStatus"
-                code="PURCHASE_BILL_STATUS"
-                placeholder="请选择业务状态"
-                allowClear></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24" v-show="advanced">
-            <a-form-item label="财务状态">
-              <v-select
-                v-model="queryParam.financialStatus"
-                ref="financialStatus"
-                id="purchaseOrderList-financialStatus"
-                code="FINANCIAL_PAY_STATUS"
-                placeholder="请选择财务状态"
-                allowClear></v-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <span class="table-page-search-submitButtons">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOrderList-refresh">查询</a-button>
-              <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="purchaseOrderList-reset">重置</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 id="purchaseOrderList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
-    </div>
-    <!-- alert -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">共 <strong>{{ totalData.totalRecord }}</strong> 条记录,采购数量合计 <strong>{{ totalData.totalQty }}</strong> ,采购金额合计¥<strong>{{ totalData.totalAmount }}</strong> </div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1495, y: tableHeight }"
-      bordered>
-      <!-- 采购单号 -->
-      <template slot="purchaseBillNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.purchaseBillNo }}</span>
-      </template>
-      <!-- 财务状态 -->
-      <template slot="financialStatus" slot-scope="text, record">
-        <a-badge :color="text=='FINISH'?'#87d068':'gold'" :text="$refs.financialStatus.getNameByCode(text)" />
-      </template>
-      <!-- 业务状态 -->
-      <template slot="billStatus" slot-scope="text, record">
-        {{ $refs.billStatus.getNameByCode(text) }}
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          class="button-info"
-          v-if="record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT'"
-          @click="handleEdit(record)"
-        >编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-warning"
-          v-if="record.billStatus == 'WAIT_PUT_WAREHOUSE'"
-          @click="handleWarehouse(record)"
-        >签收入库</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-error"
-          v-if="record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT'"
-          @click="handleDel(record)"
-        >删除</a-button>
-        <span v-if="record.billStatus != 'WAIT_SUBMIT'&&record.billStatus != 'AUDIT_REJECT'&&record.billStatus != 'WAIT_PUT_WAREHOUSE'">--</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="创建时间">
+                <rangeDate ref="rangeDate" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="采购单号">
+                <a-input id="purchaseOrderList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                <a-select
+                  id="purchaseOrderList-purchaseTargetSn"
+                  placeholder="请选择供应商"
+                  allowClear
+                  v-model="queryParam.purchaseTargetSn"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption"
+                  @change="tragetTypeChange">
+                  <a-select-option v-for="item in supplierList" :key="item.purchaseTargetSn" :value="item.purchaseTargetSn">{{ item.purchaseTargetName }}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24" v-show="advanced">
+              <a-form-item label="业务状态">
+                <v-select
+                  v-model="queryParam.billStatus"
+                  ref="billStatus"
+                  id="purchaseOrderList-billStatus"
+                  code="PURCHASE_BILL_STATUS"
+                  placeholder="请选择业务状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24" v-show="advanced">
+              <a-form-item label="财务状态">
+                <v-select
+                  v-model="queryParam.financialStatus"
+                  ref="financialStatus"
+                  id="purchaseOrderList-financialStatus"
+                  code="FINANCIAL_PAY_STATUS"
+                  placeholder="请选择财务状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOrderList-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="purchaseOrderList-reset">重置</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 id="purchaseOrderList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
+      </div>
+      <!-- alert -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">共 <strong>{{ totalData.totalRecord }}</strong> 条记录,采购数量合计 <strong>{{ totalData.totalQty }}</strong> ,采购金额合计¥<strong>{{ totalData.totalAmount }}</strong> </div>
+      </a-alert>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1495, y: tableHeight }"
+        bordered>
+        <!-- 采购单号 -->
+        <template slot="purchaseBillNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.purchaseBillNo }}</span>
+        </template>
+        <!-- 财务状态 -->
+        <template slot="financialStatus" slot-scope="text, record">
+          <a-badge :color="text=='FINISH'?'#87d068':'gold'" :text="$refs.financialStatus.getNameByCode(text)" />
+        </template>
+        <!-- 业务状态 -->
+        <template slot="billStatus" slot-scope="text, record">
+          {{ $refs.billStatus.getNameByCode(text) }}
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            v-if="record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT'"
+            @click="handleEdit(record)"
+          >编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-warning"
+            v-if="record.billStatus == 'WAIT_PUT_WAREHOUSE'"
+            @click="handleWarehouse(record)"
+          >签收入库</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            v-if="record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT'"
+            @click="handleDel(record)"
+          >删除</a-button>
+          <span v-if="record.billStatus != 'WAIT_SUBMIT'&&record.billStatus != 'AUDIT_REJECT'&&record.billStatus != 'WAIT_PUT_WAREHOUSE'">--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 选择基本信息弹框 -->
     <basic-info-modal :openModal="openModal" @ok="handleOk" @cancel="openModal=false" />
   </a-card>
@@ -134,6 +136,7 @@ export default {
   components: { STable, VSelect, basicInfoModal, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, //  高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       openModal: false, // 基本信息弹框是否显示
@@ -234,12 +237,16 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           purchaseDel({
             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
             }
           })
         }

+ 74 - 63
src/views/purchasingManagement/purchaseOrder/receivingAddress/chooseAddressModal.vue

@@ -8,67 +8,69 @@
     v-model="isShow"
     @cancel="isShow=false"
     :width="900">
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="chooseAddressList-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: 1050 }"
-      :showPagination="false"
-      bordered>
-      <!-- 收货人 -->
-      <template slot="consignee" slot-scope="text, record">
-        <div class="item-box">
-          <a-tooltip placement="top">
-            <template slot="title">
-              <span>{{ record.consigneeName }}</span>
-            </template>
-            <p class="ellipsis-txt">{{ record.consigneeName }}</p>
-          </a-tooltip>
-          <span v-if="record.defaultFlag==1" class="badge-txt">默认</span>
-        </div>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="primary"
-          class="button-success"
-          v-if="record.defaultFlag==0"
-          @click="handleDefault(record)"
-          id="chooseAddressList-default-btn">设为默认</a-button>
-        <a-button
-          size="small"
-          type="primary"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="chooseAddressList-edit-btn"
-        >编辑</a-button>
-        <a-button
-          size="small"
-          type="primary"
-          class="button-error"
-          @click="handleDel(record)"
-          id="chooseAddressList-del-btn"
-        >删除</a-button>
-      </template>
-      <!-- 选择 -->
-      <template slot="choose" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="primary"
-          class="button-primary"
-          @click="handleChoose(record)"
-          id="chooseAddressList-choose-btn">选择</a-button>
-      </template>
-    </s-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="chooseAddressList-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: 1050 }"
+        :showPagination="false"
+        bordered>
+        <!-- 收货人 -->
+        <template slot="consignee" slot-scope="text, record">
+          <div class="item-box">
+            <a-tooltip placement="top">
+              <template slot="title">
+                <span>{{ record.consigneeName }}</span>
+              </template>
+              <p class="ellipsis-txt">{{ record.consigneeName }}</p>
+            </a-tooltip>
+            <span v-if="record.defaultFlag==1" class="badge-txt">默认</span>
+          </div>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="primary"
+            class="button-success"
+            v-if="record.defaultFlag==0"
+            @click="handleDefault(record)"
+            id="chooseAddressList-default-btn">设为默认</a-button>
+          <a-button
+            size="small"
+            type="primary"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="chooseAddressList-edit-btn"
+          >编辑</a-button>
+          <a-button
+            size="small"
+            type="primary"
+            class="button-error"
+            @click="handleDel(record)"
+            id="chooseAddressList-del-btn"
+          >删除</a-button>
+        </template>
+        <!-- 选择 -->
+        <template slot="choose" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="primary"
+            class="button-primary"
+            @click="handleChoose(record)"
+            id="chooseAddressList-choose-btn">选择</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑地址 -->
     <edit-address-modal ref="addrModal" :openModal="openAddrModal" @ok="handleOk" @close="openAddrModal=false" />
   </a-modal>
@@ -89,6 +91,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       queryParam: {},
       // 表头
@@ -120,11 +123,15 @@ export default {
   methods: {
     //  设为默认
     handleDefault (row) {
+      this.spinning = true
       shippingAddressSet({ id: row.id }).then(res => {
         if (res.status == 200) {
+          this.$message.success(res.message)
           this.$refs.table.refresh(true)
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
-        this.$message.info(res.message)
       })
     },
     //  新增/编辑收货地址
@@ -155,14 +162,18 @@ export default {
       this.$confirm({
         title: '提示',
         content: '删除后不可恢复,确定要进行删除吗?',
-		    centered: true,
+        centered: true,
         onOk () {
+          _this.spinning = true
           shippingAddressDel({
             id: row.id
           }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh(true)
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 2 - 3
src/views/purchasingManagement/purchaseOrder/warehousing.vue

@@ -209,7 +209,6 @@ export default {
     },
     // 修改仓库仓位
     changeWarehouseCascade (val, opt, ind, bindex) {
-      console.log(val, opt, ind)
       let loadData = this.chooseLoadData[bindex][ind]
       if (val.length == 1) {
         this.$message.warning('当前仓库无仓位,请选择其他仓库')
@@ -260,8 +259,8 @@ export default {
 <style lang="less">
   .purchaseOrderWarehousing-wrap{
     .btn-cont {
-    	text-align: center;
-    	margin: 35px 0 10px;
+      text-align: center;
+      margin: 35px 0 10px;
     }
     .billno{
       font-size: 14px;

+ 8 - 0
src/views/purchasingManagement/purchaseReturn/edit.vue

@@ -275,19 +275,27 @@ export default {
         centered: true,
         onOk () {
           if (isAll) { //  整单删除
+            _this.spinning = true
             purchaseReturnDelAll({ purchaseReturnSn: _this.$route.params.sn }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
                 _this.getPurchaseBillDetailList()
                 _this.getChooseProductList()
+                _this.spinning = false
+              }else{
+                _this.spinning = false
               }
             })
           } else { //  单个删除
+            _this.spinning = true
             purchaseReturnDetailDel({ id: row.id }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
                 _this.getPurchaseBillDetailList()
                 _this.getChooseProductList()
+                _this.spinning = false
+              }else{
+                _this.spinning = false
               }
             })
           }

+ 98 - 87
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -1,96 +1,98 @@
 <template>
   <a-card size="small" :bordered="false" class="purchaseReturnList-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="purchaseReturnList-purchaseReturnNo" v-model.trim="queryParam.purchaseReturnNo" 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="purchaseReturnList-state"
-                code="PURCHASE_RETURN_STATUS"
-                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-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="purchaseReturnList-purchaseReturnNo" v-model.trim="queryParam.purchaseReturnNo" allowClear placeholder="请输入退货单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="业务状态">
                 <v-select
-                  v-model="queryParam.settleState"
-                  ref="settleState"
-                  id="chainTransferOutList-settleState"
-                  code="FINANCIAL_RECEIVE_STATUS"
-                  placeholder="请选择财务状态"
-                  allowClear></v-select>
+                  v-model="queryParam.state"
+                  ref="state"
+                  id="purchaseReturnList-state"
+                  code="PURCHASE_RETURN_STATUS"
+                  placeholder="请选择业务状态"
+                  allowClear
+                ></v-select>
               </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="purchaseReturnList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseReturnList-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="purchaseReturnList-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: 1250, y: tableHeight }"
-      bordered>
-      <!-- 采退单号 -->
-      <template slot="purchaseReturnNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.purchaseReturnNo }}</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"
-          class="button-info"
-          v-if="record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT'"
-          @click="handleEdit(record)"
-          id="purchaseReturnList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-error"
-          v-if="record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT'"
-          @click="handleDel(record)"
-          id="purchaseReturnList-del-btn">删除</a-button>
-        <span v-if="!(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT')">--</span>
-      </template>
-    </s-table>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="财务状态">
+                  <v-select
+                    v-model="queryParam.settleState"
+                    ref="settleState"
+                    id="chainTransferOutList-settleState"
+                    code="FINANCIAL_RECEIVE_STATUS"
+                    placeholder="请选择财务状态"
+                    allowClear></v-select>
+                </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="purchaseReturnList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseReturnList-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="purchaseReturnList-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: 1250, y: tableHeight }"
+        bordered>
+        <!-- 采退单号 -->
+        <template slot="purchaseReturnNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.purchaseReturnNo }}</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"
+            class="button-info"
+            v-if="record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT'"
+            @click="handleEdit(record)"
+            id="purchaseReturnList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            v-if="record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT'"
+            @click="handleDel(record)"
+            id="purchaseReturnList-del-btn">删除</a-button>
+          <span v-if="!(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT')">--</span>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -103,6 +105,7 @@ export default {
   components: { STable, VSelect, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       queryParam: { //  查询条件
         beginDate: '',
@@ -165,10 +168,14 @@ export default {
         content: '删除后不可恢复,确定要进行删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           purchaseReturnDel({ 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
             }
           })
         }
@@ -200,10 +207,14 @@ export default {
               returnTargetName: _this.purchaseTragetType[0].purchaseTargetName,
               returnTargetType: _this.purchaseTragetType[0].purchaseTargetType
             }
+            _this.spinning = true
             purchaseReturnSave(params).then(res => {
               if (res.status == 200) {
                 const data = res.data
+                _this.spinning = false
                 _this.$router.push({ path: `/purchasingManagement/purchaseReturn/add/${data.id}/${data.purchaseReturnSn}/${data.returnTargetName}` })
+              } else {
+                _this.spinning = false
               }
             })
           }

+ 0 - 156
src/views/salesManagement/outboundOrder/detail.vue

@@ -1,156 +0,0 @@
-<template>
-  <div class="outboundOrderDetail-wrap">
-    <a-page-header :ghost="false" @back="handleBack" class="outboundOrderDetail-cont">
-      <template slot="subTitle">
-        <a href="javascript:;" @click="handleBack">返回列表</a>
-        <a-button size="small" id="outboundOrderDetail-ts-btn" style="margin-left:30px" key="0">订单推送</a-button>
-        <!-- <a-button size="small" id="outboundOrderDetail-export-btn" type="danger" style="margin-left:20px" key="1">销售导出</a-button> -->
-      </template>
-      <!-- <template slot="extra">
-        <span>打印字段:</span>
-        <a-select key="2" style="width:150px" id="sales-pritKey" placeholder="请选择打印字段" allowClear>
-          <a-select-option v-for="item in pritKey" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
-        </a-select>
-        <span><i style="color: red;">*</i>打印模板:</span>
-        <a-select key="3" style="width:150px" id="sales-pritKey" placeholder="请选择打印模板" allowClear>
-          <a-select-option v-for="item in pritModal" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
-        </a-select>
-        <a-button key="4" id="outboundOrderDetail-preview-btn">打印预览</a-button>
-        <a-button key="5" type="primary" id="outboundOrderDetail-print-btn">快速打印</a-button>
-      </template> -->
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="outboundOrderDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions size="small" :column="3">
-            <a-descriptions-item label="客户名称">张三的</a-descriptions-item>
-            <a-descriptions-item label="客户地址">山西省太原市阿斯加德法律静安寺水电费</a-descriptions-item>
-            <a-descriptions-item label="支付方式">货到付款</a-descriptions-item>
-            <a-descriptions-item label="收款方式">现金</a-descriptions-item>
-            <a-descriptions-item label="联系手机">13709146191</a-descriptions-item>
-            <a-descriptions-item label="联系电话">13709146191</a-descriptions-item>
-            <a-descriptions-item label="备注">备注备注备注备注备注</a-descriptions-item>
-            <a-descriptions-item label="销售单号">34242sdf234234</a-descriptions-item>
-            <a-descriptions-item label="制单人">王明</a-descriptions-item>
-            <a-descriptions-item label="业务员">李四</a-descriptions-item>
-            <a-descriptions-item label="审核状态">未审核</a-descriptions-item>
-            <a-descriptions-item label="完结状态">未完结</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-card size="small" :bordered="false" class="outboundOrderDetail-cont">
-      <!-- alert -->
-      <a-alert type="info" style="margin-bottom: 15px;">
-        <div slot="message">
-          总款数:<strong>12</strong>;总数量:<strong>12</strong>;总赠品数量:<strong>12</strong>;急件总款数:<strong>12</strong>;急件总数量:<strong>12</strong>;<br/>
-          总售价:<strong>12</strong>;总成本:<strong>12</strong>;总毛利:<strong>12</strong>;折后总售价:<strong>12</strong>;折扣:<strong>12%</strong>;折扣金额:<strong>12</strong>;
-        </div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="default"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1660 }"
-        bordered>
-        <!-- 状态 -->
-        <template slot="state" slot-scope="text, record">
-          <a-tag :color="record.state==1?'green':'red'" >{{ record.state==1? '已出库': '未出库' }}</a-tag>
-        </template>
-      </s-table>
-    </a-card>
-  </div>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-export default {
-  name: 'SalesDetail',
-  components: {
-    STable,
-    VSelect
-  },
-  data () {
-    return {
-      disabled: false,
-      pritKey: [
-        { id: 0, name: '打印促销' },
-        { id: 1, name: '打印支付方式' },
-        { id: 2, name: '打印收款方式' }
-      ],
-      pritModal: [
-        { id: 0, name: '普通模板一' },
-        { id: 1, name: '普通模板二' },
-        { id: 2, name: '仓库模板一' }
-      ],
-      // 表头
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'salerNo', width: 140, align: 'center' },
-        { title: '产品名称', dataIndex: 'storeNo', align: 'center' },
-        { title: '原厂编码', dataIndex: 'custName', width: 140, align: 'center' },
-        { title: '成本价', dataIndex: 'totalP', width: 100, align: 'center' },
-        { title: '售价', dataIndex: 'totalNums', width: 100, align: 'center' },
-        { title: '折后售价', dataIndex: 'totalPrice', width: 100, align: 'center' },
-        { title: '销售数量', dataIndex: 'payType', width: 100, align: 'center' },
-        { title: '单位', dataIndex: 'mementPay', width: 100, align: 'center' },
-        { title: '辅助数量', dataIndex: 'shDate', width: 100, align: 'center' },
-        { title: '售价小计', dataIndex: 'isJj', width: 100, align: 'center' },
-        { title: '折后小计', dataIndex: 'status', width: 100, align: 'center' },
-        { title: '仓库', dataIndex: 'status', width: 100, align: 'center' },
-        { title: '仓位', dataIndex: 'status', width: 100, align: 'center' },
-        { title: '销售类型', dataIndex: 'status', width: 100, align: 'center' }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
-            ],
-            count: 10
-          }
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      }
-    }
-  },
-  methods: {
-    //  返回
-    handleBack () {
-      this.$router.push({ path: '/salesManagement/outboundOrder/list' })
-    }
-  }
-}
-</script>
-
-<style lang="less">
-  .outboundOrderDetail-wrap{
-    .outboundOrderDetail-cont{
-      margin-bottom: 15px;
-    }
-  }
-</style>

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

@@ -1,99 +1,101 @@
 <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="queryParam.demanderName" placeholder="请输入单位名称" allowClear />
-            </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="单据状态">
+              <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="queryParam.demanderName" placeholder="请输入单位名称" allowClear />
+              </a-form-item>
+            </a-col>
+            <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="请选择单据状态"
+                  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" :disabled="!hasSelected" :loading="loading" @click="handleOutbounds">批量出库</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.id"
-      :columns="columns"
-      :data="loadData"
-      :showPagination="false"
-      :scroll="{ x: 1710 }"
-      bordered> -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1720, y: tableHeight }"
-      bordered>
-      <!-- 操作 -->
-      <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>
-        <a-button
-          size="small"
-          type="link"
-          class="button-success"
-          @click="handleDetail(record)"
-          id="outboundOrderList-detail-btn">详情</a-button>
-      </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>
+            </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" :disabled="!hasSelected" :loading="loading" @click="handleOutbounds">批量出库</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.id"
+        :columns="columns"
+        :data="loadData"
+        :showPagination="false"
+        :scroll="{ x: 1710 }"
+        bordered> -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ x: 1720, y: tableHeight }"
+        bordered>
+        <!-- 操作 -->
+        <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>
+          <a-button
+            size="small"
+            type="link"
+            class="button-success"
+            @click="handleDetail(record)"
+            id="outboundOrderList-detail-btn">详情</a-button>
+        </template>
+      </s-table>
+    </a-spin>
   </a-card>
 </template>
 
@@ -105,6 +107,7 @@ export default {
   components: { STable, VSelect, rangeDate },
   data () {
     return {
+      spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0, // 表格高度
       queryParam: { //  查询条件
@@ -207,7 +210,6 @@ export default {
         // this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
       } else if (row.outBizType == 'LINKAGE_CALL_OUT') { // 连锁调出
         this.$router.push({ path: `/allocationManagement/chainTransferOut/detail/${row.outBizSn}` })
-        // this.$router.push({ path: `/purchasingManagement/purchaseReturn/detail/${row.outBizSn}` })
       } else if (row.outBizType == 'WAREHOUSE_CALL_OUT') { // 仓库调出
         this.$router.push({ path: `/allocationManagement/warehouseAllocation/detail/${row.outBizSn}` })
       } else {
@@ -222,10 +224,14 @@ export default {
         content: '确认要出库吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           stockOutOut(Object.assign(row, { outStockEnum: row.outBizType })).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            }else{
+              _this.spinning = false
             }
           })
         }
@@ -245,7 +251,6 @@ export default {
       }, 1000)
     },
     onSelectChange (selectedRowKeys) {
-      console.log('selectedRowKeys changed: ', selectedRowKeys)
       this.selectedRowKeys = selectedRowKeys
     }
   },

+ 4 - 2
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -399,9 +399,13 @@ export default {
         priceType: this.form.priceType, //  价格类型
         settleStyleSn: this.form.settleStyleSn //  收款方式
       }
+      this.spinning = true
       updateByCustomerSn(params).then(res => {
         if (res.status != 200) {
           this.$message.error(res.message)
+          this.spinning = false
+        }else{
+          this.spinning = false
         }
       })
     },
@@ -411,7 +415,6 @@ export default {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          console.log(_this.priceTypeBak, _this.form.priceType)
           // 如果价格类型改变,提示
           if (_this.priceTypeBak != _this.form.priceType && this.isEdit) {
             this.$confirm({
@@ -445,7 +448,6 @@ export default {
     salesSaveFun () {
       const _this = this
       const form = this.form
-      console.log(form, 'save data')
       _this.spinning = true
       salesSave(form).then(res => {
         if (res.status == 200) {

+ 8 - 2
src/views/salesManagement/salesQuery/edit.vue

@@ -207,7 +207,6 @@ export default {
   },
   methods: {
     onCellChange (id, key, value) {
-      console.log(id, key, value)
       const dataSource = [...this.dataSource]
       const row = dataSource.find(item => item.id === id)
       if (row) {
@@ -216,6 +215,7 @@ export default {
       }
       // 修改价格
       if (key == 'price') {
+        this.spinning = true
         salesDetailUpdatePrice({
           salesBillSn: row.salesBillSn,
           productSn: row.productSn,
@@ -223,9 +223,11 @@ export default {
         }).then(res => {
           this.resetSearchForm(true)
           this.$message.info(res.message)
+          this.spinning = false
         })
       }
       if (key == 'qty') {
+        this.spinning = true
         salesDetailUpdateQty({
           id: row.id,
           qty: row.qty
@@ -235,6 +237,7 @@ export default {
             this.$refs.partQuery.resetCurForm()
           }
           this.$message.info(res.message)
+          this.spinning = false
         })
       }
     },
@@ -310,7 +313,6 @@ export default {
       if (this.detailData.discountAmount < 0) {
         return
       }
-      console.log(this.detailData)
       this.spinning = true
       salesWriteDiscount({
         discountAmount: this.detailData.discountAmount,
@@ -335,12 +337,14 @@ export default {
         closable: true,
         onOk () {
           _this.delLoading = true
+          _this.spinning = true
           salesDetailDelAll({ salesBillSn: _this.detailData.salesBillSn }).then(res => {
             if (res.status == 200) {
               _this.resetSearchForm()
             }
             _this.$message.info(res.message)
             _this.delLoading = false
+            _this.spinning = false
           })
         }
       })
@@ -355,12 +359,14 @@ export default {
         closable: true,
         onOk () {
           _this.delLoading = true
+          _this.spinning = true
           salesDetailDel({ id: row.id }).then(res => {
             if (res.status == 200) {
               _this.resetSearchForm(true)
             }
             _this.$message.info(res.message)
             _this.delLoading = false
+            _this.spinning = false
           })
         }
       })

+ 170 - 174
src/views/salesManagement/salesQuery/list.vue

@@ -1,174 +1,176 @@
 <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}">
-              <a-select
-                id="salesManagementList-buyerName"
-                placeholder="请选择客户"
-                allowClear
-                v-model="queryParam.buyerName"
-                :showSearch="true"
-                option-filter-prop="children"
-                :filter-option="filterOption">
-                <a-select-option v-for="item in custAllList" :key="item.customerSn" :value="item.customerName">{{ item.customerName }}</a-select-option>
-              </a-select>
-            </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="收款方式">
-                <a-select placeholder="请选择收款方式" v-model="queryParam.settleStyleSn">
-                  <a-select-option v-for="item in settleStyleList" :key="item.settleStyleSn" :value="item.settleStyleSn">
-                    {{ item.name }}
-                  </a-select-option>
+              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                <a-select
+                  id="salesManagementList-buyerName"
+                  placeholder="请选择客户"
+                  allowClear
+                  v-model="queryParam.buyerName"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in custAllList" :key="item.customerSn" :value="item.customerName">{{ item.customerName }}</a-select-option>
                 </a-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 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="收款方式">
+                  <a-select placeholder="请选择收款方式" v-model="queryParam.settleStyleSn">
+                    <a-select-option v-for="item in settleStyleList" :key="item.settleStyleSn" :value="item.settleStyleSn">
+                      {{ item.name }}
+                    </a-select-option>
+                  </a-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">
-        总售价:<strong>{{ totalData.totalAmount }}</strong>元;
-        总单数:<strong>{{ totalData.totalRecord }}</strong>;
-        总款数:<strong>{{ totalData.totalCategory }}</strong>;
-        总数量:<strong>{{ totalData.totalQty }}</strong>;
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button type="primary" class="button-error" @click="handleAdd">新增(零售)</a-button>
       </div>
-    </a-alert>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 2050, 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="oosFlag" slot-scope="text, record">
-        <a-tag :color="record.oosFlag==1?'red':'#ccc'" >{{ record.oosFlagDictValue }}</a-tag>
-      </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"
-          v-if="record.billStatus == 'WAIT_OUT_WAREHOUSE'"
-          class="button-primary"
-          @click="handleSend(record)"
-        >出库</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-info"
-          v-if="(record.salesBillSource == 'SATELLITE' || record.salesBillSource == 'SALES') && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'AUDIT_REJECT')"
-          @click="handleEdit(record)"
-        >
-          编辑
-        </a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-error"
-          v-if="(record.salesBillSource == 'SATELLITE' || record.salesBillSource == 'SALES') && record.billStatus != 'FINISH'"
-          @click="handleDel(record)"
-        >
-          删除
-        </a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-info"
-          v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT')"
-          @click="handleEdit(record)"
-        >
-          改单
-        </a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-error"
-          v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT')"
-          @click="handleDel(record, 'cancel')"
-        >
-          取消
-        </a-button>
-        <span v-if="record.billStatus == 'FINISH'">--</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: 2050, 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="oosFlag" slot-scope="text, record">
+          <a-tag :color="record.oosFlag==1?'red':'#ccc'" >{{ record.oosFlagDictValue }}</a-tag>
+        </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"
+            v-if="record.billStatus == 'WAIT_OUT_WAREHOUSE'"
+            class="button-primary"
+            @click="handleSend(record)"
+          >出库</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            v-if="(record.salesBillSource == 'SATELLITE' || record.salesBillSource == 'SALES') && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'AUDIT_REJECT')"
+            @click="handleEdit(record)"
+          >
+            编辑
+          </a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            v-if="(record.salesBillSource == 'SATELLITE' || record.salesBillSource == 'SALES') && record.billStatus != 'FINISH'"
+            @click="handleDel(record)"
+          >
+            删除
+          </a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT')"
+            @click="handleEdit(record)"
+          >
+            改单
+          </a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            v-if="record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT')"
+            @click="handleDel(record, 'cancel')"
+          >
+            取消
+          </a-button>
+          <span v-if="record.billStatus == 'FINISH'">--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 选择客户弹框 -->
     <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
     <!-- 审核 -->
@@ -189,6 +191,7 @@ export default {
   components: { STable, VSelect, chooseCustomModal, rangeDate, auditModal },
   data () {
     return {
+      spinning: false,
       tableHeight: 0,
       advanced: false, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
@@ -271,28 +274,11 @@ export default {
     },
     //  审核
     handleEexamine (row) {
-      // const _this = this
-      // this.$confirm({
-      //   title: '提示',
-      //   content: '请点击下方按钮确认操作?',
-      //   centered: true,
-      //   closable: true,
-      //   okText: '审核通过',
-      //   cancelText: '审核不通过',
-      //   onOk () {
-      //     _this.auditOrder(row.id, 'WAIT_OUT_WAREHOUSE')
-      //   },
-      //   onCancel (e) {
-      //     if (!e.triggerCancel) {
-      //       _this.auditOrder(row.id, 'AUDIT_REJECT')
-      //     }
-      //     _this.$destroyAll()
-      //   }
-      // })
       this.auditInfo = row
       this.visibleAudit = true
     },
     auditOrder (billStatus) {
+      this.spinning = true
       salesWriteAudit({
         id: this.auditInfo.id,
         billStatus: billStatus
@@ -301,8 +287,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
         }
       })
     },
@@ -315,12 +303,16 @@ export default {
         centered: true,
         closable: true,
         onOk () {
+          _this.spinning = true
           salesWriteStockOut({
             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
             }
           })
         }
@@ -347,10 +339,14 @@ export default {
         centered: true,
         closable: true,
         onOk () {
+          _this.spinning = true
           salesDel({ 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
             }
           })
         }

+ 1 - 2
src/views/salesManagement/salesQuery/productSalesRecordModal.vue

@@ -143,7 +143,6 @@ export default {
     },
     //  分页 页码change
     changePage (current) {
-      console.log(current)
       this.pageNo = current
       this.handelSearch()
     },
@@ -176,7 +175,7 @@ export default {
 <style lang="less">
   .salesRecord-modal{
     .ant-modal-body {
-    	padding: 10px;
+      padding: 10px;
     }
   }
 </style>

+ 4 - 4
src/views/salesManagement/salesReturn/chooseCustomModal.vue

@@ -306,9 +306,13 @@ export default {
         countyName: this.form.countyName,
         customerAddr: this.form.customerAddr //  详细地址
       }
+      this.spinning = true
       updateByCustomerSn(params).then(res => {
         if (res.status != 200) {
           this.$message.error(res.message)
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     },
@@ -334,7 +338,6 @@ export default {
     salesSaveFun () {
       const _this = this
       const form = this.form
-      console.log(form, 'save data')
       _this.spinning = true
       salesReturnSave(form).then(res => {
         if (res.status == 200) {
@@ -434,6 +437,3 @@ export default {
   }
 }
 </script>
-
-<style>
-</style>

+ 120 - 109
src/views/salesManagement/salesReturn/list.vue

@@ -1,121 +1,123 @@
 <template>
   <a-card size="small" :bordered="false" class="salesReturn-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="审核时间">
-              <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}">
-              <a-select
-                id="salesReturn-buyerSn"
-                placeholder="请选择客户"
-                allowClear
-                v-model="queryParam.buyerSn"
-                :showSearch="true"
-                option-filter-prop="children"
-                :filter-option="filterOption">
-                <a-select-option v-for="item in custAllList" :key="item.customerSn" :value="item.customerSn">{{ item.customerName }}</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">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="退货单号">
-                <a-input id="salesReturn-salesReturnNo" v-model.trim="queryParam.salesReturnNo" 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.state"
-                  ref="state"
-                  id="salesManagementList-state"
-                  code="SALES_RETURN_BILL_STATUS"
-                  placeholder="请选择业务状态"
-                  allowClear></v-select>
+              <a-form-item label="审核时间">
+                <rangeDate ref="rangeExamineDate" @change="dateExamineChange" />
               </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: 15px;">
-      <div slot="message">
-        退货总金额:<strong>{{ countData&&countData.totalAmount }}</strong>元;
-        总单数:<strong>{{ countData&&countData.totalBillNumber }}</strong>;
-        总款数:<strong>{{ countData&&countData.totalCategory }}</strong>;
-        总数量:<strong>{{ countData&&countData.totalQty }}</strong>;
+            <a-col :md="6" :sm="24">
+              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                <a-select
+                  id="salesReturn-buyerSn"
+                  placeholder="请选择客户"
+                  allowClear
+                  v-model="queryParam.buyerSn"
+                  :showSearch="true"
+                  option-filter-prop="children"
+                  :filter-option="filterOption">
+                  <a-select-option v-for="item in custAllList" :key="item.customerSn" :value="item.customerSn">{{ item.customerName }}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="退货单号">
+                  <a-input id="salesReturn-salesReturnNo" v-model.trim="queryParam.salesReturnNo" 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="salesManagementList-state"
+                    code="SALES_RETURN_BILL_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: 1810, y: tableHeight }"
-      bordered>
-      <!-- 单号 -->
-      <template slot="salesReturnNo" slot-scope="text, record">
-        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesReturnNo }}</span>
-      </template>
-      <!-- 财务状态 -->
-      <template slot="financialStatus" 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"
-          class="button-warning"
-          v-if="record.state == 'WAIT_AUDIT'"
-          @click="handleEexamine(record)"
-          id="salesReturn-eexamine-btn">审核</a-button>
-        <a-button
-          size="small"
-          v-if="record.state == 'WAIT_AUDIT'||record.state == 'WAIT_SUBMIT'"
-          type="link"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="salesReturn-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          v-if="record.state == 'WAIT_AUDIT'||record.state == 'WAIT_SUBMIT'"
-          type="link"
-          class="button-error"
-          @click="handleDel(record)"
-          id="salesReturn-del-btn">删除</a-button>
-        <span v-if="record.state == 'FINISH'">--</span>
-      </template>
-    </s-table>
+      <!-- alert -->
+      <a-alert type="info" style="margin-bottom: 15px;">
+        <div slot="message">
+          退货总金额:<strong>{{ countData&&countData.totalAmount }}</strong>元;
+          总单数:<strong>{{ countData&&countData.totalBillNumber }}</strong>;
+          总款数:<strong>{{ countData&&countData.totalCategory }}</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: 1810, y: tableHeight }"
+        bordered>
+        <!-- 单号 -->
+        <template slot="salesReturnNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.salesReturnNo }}</span>
+        </template>
+        <!-- 财务状态 -->
+        <template slot="financialStatus" 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"
+            class="button-warning"
+            v-if="record.state == 'WAIT_AUDIT'"
+            @click="handleEexamine(record)"
+            id="salesReturn-eexamine-btn">审核</a-button>
+          <a-button
+            size="small"
+            v-if="record.state == 'WAIT_AUDIT'||record.state == 'WAIT_SUBMIT'"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="salesReturn-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            v-if="record.state == 'WAIT_AUDIT'||record.state == 'WAIT_SUBMIT'"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+            id="salesReturn-del-btn">删除</a-button>
+          <span v-if="record.state == 'FINISH'">--</span>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 选择客户弹框 -->
     <choose-custom-modal :show="openModal" @ok="handleEdit" @cancel="openModal=false"></choose-custom-modal>
   </a-card>
@@ -137,6 +139,7 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       tableHeight: 0,
       // 高级搜索 展开/关闭
       advanced: false,
@@ -222,10 +225,14 @@ export default {
         content: '确认要删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           salesReturnDel({ sn: row.salesReturnSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }
@@ -239,12 +246,16 @@ export default {
         content: '确认要审核吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           salesReturnAudit({
             sn: row.salesReturnSn
           }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

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

@@ -334,6 +334,7 @@ export default {
       if (this.ordeDetail.discountAmount < 0) {
         return
       }
+      this.spinning = true
       salesReturnDiscount({
         discountAmount: this.ordeDetail.discountAmount,
         salesReturnSn: this.ordeDetail.salesReturnSn,
@@ -341,6 +342,9 @@ export default {
       }).then(res => {
         if (res.status == 200) {
           this.resetSearchForm()
+          this.spinning = false
+        }else{
+          this.spinning = false
         }
       })
     },
@@ -354,12 +358,14 @@ export default {
         closable: true,
         onOk () {
           _this.delLoading = true
+          _this.spinning = true
           salesReturnDelAll({ sn: _this.ordeDetail.salesReturnSn }).then(res => {
             if (res.status == 200) {
               _this.resetSearchForm()
             }
             _this.$message.info(res.message)
             _this.delLoading = false
+            _this.spinning = false
           })
         }
       })
@@ -374,12 +380,14 @@ export default {
         closable: true,
         onOk () {
           _this.delLoading = true
+          _this.spinning = true
           salesReturnDetailDel({ id: row.id }).then(res => {
             if (res.status == 200) {
               _this.resetSearchForm(true)
             }
             _this.$message.info(res.message)
             _this.delLoading = false
+            _this.spinning = false
           })
         }
       })

+ 9 - 3
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -328,6 +328,7 @@ export default {
       if (this.ordeDetail.discountAmount < 0) {
         return
       }
+      this.spinning = true
       salesReturnDiscount({
         discountAmount: this.ordeDetail.discountAmount,
         salesReturnSn: this.ordeDetail.salesReturnSn,
@@ -335,6 +336,9 @@ export default {
       }).then(res => {
         if (res.status == 200) {
           this.resetSearchForm()
+          this.spinning = false
+        } else {
+          this.spinning = false
         }
       })
     },
@@ -348,12 +352,14 @@ export default {
         closable: true,
         onOk () {
           _this.delLoading = true
+          _this.spinning = true
           salesReturnDelAll({ sn: _this.ordeDetail.salesReturnSn }).then(res => {
             if (res.status == 200) {
               _this.resetSearchForm()
             }
             _this.$message.info(res.message)
             _this.delLoading = false
+            _this.spinning = false
           })
         }
       })
@@ -368,12 +374,14 @@ export default {
         closable: true,
         onOk () {
           _this.delLoading = true
+          _this.spinning = true
           salesReturnDetailDel({ id: row.id }).then(res => {
             if (res.status == 200) {
               _this.resetSearchForm(true)
             }
             _this.$message.info(res.message)
             _this.delLoading = false
+            _this.spinning = false
           })
         }
       })
@@ -476,9 +484,7 @@ export default {
     this.getWarehouseCascade()
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      console.log('beforeRouteEnter')
-    })
+    next(vm => {})
   }
 }
 </script>

+ 4 - 0
src/views/salesManagement/urgentItemsOffset/detail.vue

@@ -133,11 +133,15 @@ export default {
         content: '确定要进行冲减吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           urgentWriteDown({ urgentBillSn: _this.$route.params.sn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.getDetail()
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 58 - 51
src/views/storeManagement/bind/list.vue

@@ -1,56 +1,58 @@
 <template>
   <a-card size="small" :bordered="false" class="bindList-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="bindList-orgName" v-model.trim="queryParam.orgName" allowClear placeholder="请输入中心店名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="配送店名称">
-              <a-input id="bindList-childName" v-model.trim="queryParam.childName" 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="bindList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="bindList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="bindList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.orgSn"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ y: tableHeight }"
-      bordered>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="bindList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-error"
-          @click="handleDel(record)"
-          id="bindList-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="bindList-orgName" v-model.trim="queryParam.orgName" allowClear placeholder="请输入中心店名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="配送店名称">
+                <a-input id="bindList-childName" v-model.trim="queryParam.childName" 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="bindList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="bindList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="bindList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.orgSn"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        bordered>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="bindList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+            id="bindList-del-btn">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑 -->
     <storeManagement-bind-edit-modal :openModal="openModal" :nowData="nowData" :itemSn="itemSn" @ok="$refs.table.refresh(true)" @close="closeModal" />
   </a-card>
@@ -64,6 +66,7 @@ export default {
   components: { STable, storeManagementBindEditModal },
   data () {
     return {
+      spinning: false,
       queryParam: { //  查询条件
         orgName: '',
         childName: ''
@@ -123,12 +126,16 @@ export default {
         content: '删除后会直接解除原有的绑定关系及用户授权,确定删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           jxsorgRelationDel({
             sn: row.orgSn
           }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }

+ 67 - 60
src/views/storeManagement/userAuthorization/list.vue

@@ -1,65 +1,67 @@
 <template>
   <a-card size="small" :bordered="false" class="userAuthList-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="userAuthList-ownerOrgName" v-model.trim="queryParam.ownerOrgName" allowClear placeholder="请输入中心店名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="中心店授权账号">
-              <a-input id="userAuthList-userQueryWord" v-model.trim="queryParam.userQueryWord" allowClear placeholder="请输入中心店授权账号"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="配送店名称">
-              <a-input id="userAuthList-orgName" v-model.trim="queryParam.orgName" 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="userAuthList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="userAuthList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="userAuthList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.userSn"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ y: tableHeight }"
-      bordered>
-      <!-- 授权账号 -->
-      <template slot="loginName" slot-scope="text, record">
-        <span>{{ record.user.name || '' }} - {{ record.user.loginName || '' }}</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          size="small"
-          type="link"
-          class="button-info"
-          @click="handleEdit(record)"
-          id="userAuthList-edit-btn">编辑</a-button>
-        <a-button
-          size="small"
-          type="link"
-          class="button-error"
-          @click="handleDel(record)"
-          id="userAuthList-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="userAuthList-ownerOrgName" v-model.trim="queryParam.ownerOrgName" allowClear placeholder="请输入中心店名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="中心店授权账号">
+                <a-input id="userAuthList-userQueryWord" v-model.trim="queryParam.userQueryWord" allowClear placeholder="请输入中心店授权账号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="配送店名称">
+                <a-input id="userAuthList-orgName" v-model.trim="queryParam.orgName" 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="userAuthList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="userAuthList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button id="userAuthList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.userSn"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        bordered>
+        <!-- 授权账号 -->
+        <template slot="loginName" slot-scope="text, record">
+          <span>{{ record.user.name || '' }} - {{ record.user.loginName || '' }}</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-info"
+            @click="handleEdit(record)"
+            id="userAuthList-edit-btn">编辑</a-button>
+          <a-button
+            size="small"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+            id="userAuthList-del-btn">删除</a-button>
+        </template>
+      </s-table>
+    </a-spin>
     <!-- 新增/编辑 -->
     <storeManagement-user-auth-edit-modal :openModal="openModal" :itemSn="itemSn" @ok="$refs.table.refresh(true)" @close="closeModal" />
   </a-card>
@@ -73,6 +75,7 @@ export default {
   components: { STable, storeManagementUserAuthEditModal },
   data () {
     return {
+      spinning: false,
       queryParam: { //  查询条件
         ownerOrgName: '',
         userQueryWord: '',
@@ -133,12 +136,16 @@ export default {
         content: '删除后会直接解除原有的授权,确定删除吗?',
         centered: true,
         onOk () {
+          _this.spinning = true
           userOrgDel({
             sn: row.userSn
           }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
             }
           })
         }